"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[9372],{29372:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var a=r(7552),s=r(75785),n=r(68446),i=r(99546),o=r(75653),l=r(67314),c=r(48171),m=r(59705),d=r(5401),u=r(49823),p=r(84313),h=r(6184),g=r(5658),b=r(50574);const f=(0,n.observer)((function({model:e,selectedAsm:t,value:r,setValue:s,setOption:n}){const o=(0,i.getSession)(e),{assemblyManager:l,textSearchManager:c}=o,{rankSearchResults:m}=e,d=e.searchScope(t),u=l.get(t);return a.createElement(g.A,{fetchResults:e=>(0,b.Jf)({queryString:e,assembly:u,textSearchManager:c,rankSearchResults:m,searchScope:d}),model:e,assemblyName:t,value:r,minWidth:270,onChange:e=>{s(e)},onSelect:e=>{n(e)},TextFieldProps:{variant:"outlined",helperText:"Enter sequence name, feature name, or location"}})})),v=(0,s.n9)()((e=>({importFormContainer:{padding:e.spacing(2)},button:{margin:e.spacing(2)},container:{padding:e.spacing(4)}}))),y=(0,n.observer)((function({model:e}){const{classes:t}=v(),r=(0,i.getSession)(e),{assemblyNames:s,assemblyManager:n}=r,{error:g}=e,[b,y]=(0,a.useState)(s[0]),[x,A]=(0,a.useState)(),S=n.get(b),k=s.length?S?.error:"No configured assemblies",w=k||g,[E,C]=(0,a.useState)(""),M=S?.regions,R=!!M,W=M&&M[0]?.refName||"";return(0,a.useEffect)((()=>{C(W)}),[W,b]),a.createElement("div",{className:t.container},w?a.createElement(u.ErrorMessage,{error:w}):null,a.createElement(o.A,{className:t.importFormContainer},a.createElement("form",{onSubmit:async t=>{if(t.preventDefault(),e.setError(void 0),E)try{x?.getDisplayString()===E&&x.hasLocation()?await(0,h.Kd)({option:x,model:e,assemblyName:b}):x?.results?.length?e.setSearchResults(x.results,x.getLabel(),b):S&&await(0,h.cm)({input:E,assembly:S,model:e})}catch(e){console.error(e),r.notify(`${e}`,"warning")}}},a.createElement(l.Ay,{container:!0,spacing:1,justifyContent:"center",alignItems:"center"},a.createElement(l.Ay,{item:!0},a.createElement(c.A,null,a.createElement(u.AssemblySelector,{onChange:e=>{y(e)},localStorageKey:"lgv",session:r,selected:b}))),a.createElement(l.Ay,{item:!0},b?k?a.createElement(p.A,{style:{color:"red"}}):R?a.createElement(c.A,null,a.createElement(f,{value:E,setValue:C,selectedAsm:b,setOption:A,model:e})):a.createElement(m.A,{size:20,disableShrink:!0}):null),a.createElement(l.Ay,{item:!0},a.createElement(c.A,null,a.createElement(d.A,{type:"submit",disabled:!E,className:t.button,variant:"contained",color:"primary"},"Open")),a.createElement(c.A,null,a.createElement(d.A,{disabled:!E,className:t.button,onClick:()=>{e.setError(void 0),e.showAllRegionsInAssembly(b)},variant:"contained",color:"secondary"},"Show all regions in assembly")))))))}))},59705:(e,t,r)=>{r.d(t,{A:()=>x});var a=r(7552),s=r(93878),n=r(70799),i=r(64761),o=r(51148),l=r(60129),c=r(4785),m=r(15622),d=r(72489),u=r(69500);const p=i.i7`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`,h=i.i7`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`,g="string"!=typeof p?i.AH`
        animation: ${p} 1.4s linear infinite;
      `:null,b="string"!=typeof h?i.AH`
        animation: ${h} 1.4s ease-in-out infinite;
      `:null,f=(0,o.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${(0,m.A)(r.color)}`]]}})((0,l.A)((({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:g||{animation:`${p} 1.4s linear infinite`}},...Object.entries(e.palette).filter((([,e])=>e&&e.main)).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})))]})))),v=(0,o.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),y=(0,o.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${(0,m.A)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})((0,l.A)((({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:b||{animation:`${h} 1.4s ease-in-out infinite`}}]})))),x=a.forwardRef((function(e,t){const r=(0,c.b)({props:e,name:"MuiCircularProgress"}),{className:a,color:i="primary",disableShrink:o=!1,size:l=40,style:p,thickness:h=3.6,value:g=0,variant:b="indeterminate",...x}=r,A={...r,color:i,disableShrink:o,size:l,thickness:h,value:g,variant:b},S=(e=>{const{classes:t,variant:r,color:a,disableShrink:s}=e,i={root:["root",r,`color${(0,m.A)(a)}`],svg:["svg"],circle:["circle",`circle${(0,m.A)(r)}`,s&&"circleDisableShrink"]};return(0,n.A)(i,d.b,t)})(A),k={},w={},E={};if("determinate"===b){const e=2*Math.PI*((44-h)/2);k.strokeDasharray=e.toFixed(3),E["aria-valuenow"]=Math.round(g),k.strokeDashoffset=`${((100-g)/100*e).toFixed(3)}px`,w.transform="rotate(-90deg)"}return(0,u.jsx)(f,{className:(0,s.A)(S.root,a),style:{width:l,height:l,...w,...p},ownerState:A,ref:t,role:"progressbar",...E,...x,children:(0,u.jsx)(v,{className:S.svg,ownerState:A,viewBox:"22 22 44 44",children:(0,u.jsx)(y,{className:S.circle,style:k,ownerState:A,cx:44,cy:44,r:(44-h)/2,fill:"none",strokeWidth:h})})})}))},72489:(e,t,r)=>{r.d(t,{A:()=>i,b:()=>n});var a=r(33761),s=r(85693);function n(e){return(0,s.Ay)("MuiCircularProgress",e)}const i=(0,a.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"])},75653:(e,t,r)=>{r.d(t,{A:()=>y});var a=r(7552),s=r(93878),n=r(85693),i=r(70799),o=r(33283),l=r(82081),c=r(24959),m=r(72861),d=r(69500);const u=(0,m.A)(),p=(0,c.A)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`maxWidth${(0,o.A)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),h=e=>(0,l.A)({props:e,name:"MuiContainer",defaultTheme:u});var g=r(15622),b=r(51148),f=r(31049);const v=function(e={}){const{createStyledComponent:t=p,useThemeProps:r=h,componentName:l="MuiContainer"}=e,c=t((({theme:e,ownerState:t})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}})),(({theme:e,ownerState:t})=>t.fixed&&Object.keys(e.breakpoints.values).reduce(((t,r)=>{const a=r,s=e.breakpoints.values[a];return 0!==s&&(t[e.breakpoints.up(a)]={maxWidth:`${s}${e.breakpoints.unit}`}),t}),{})),(({theme:e,ownerState:t})=>({..."xs"===t.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},...t.maxWidth&&"xs"!==t.maxWidth&&{[e.breakpoints.up(t.maxWidth)]:{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`}}}))),m=a.forwardRef((function(e,t){const a=r(e),{className:m,component:u="div",disableGutters:p=!1,fixed:h=!1,maxWidth:g="lg",classes:b,...f}=a,v={...a,component:u,disableGutters:p,fixed:h,maxWidth:g},y=((e,t)=>{const{classes:r,fixed:a,disableGutters:s,maxWidth:l}=e,c={root:["root",l&&`maxWidth${(0,o.A)(String(l))}`,a&&"fixed",s&&"disableGutters"]};return(0,i.A)(c,(e=>(0,n.Ay)(t,e)),r)})(v,l);return(0,d.jsx)(c,{as:u,ownerState:v,className:(0,s.A)(y.root,m),ref:t,...f})}));return m}({createStyledComponent:(0,b.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`maxWidth${(0,g.A)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,f.A)({props:e,name:"MuiContainer"})}),y=v},24959:(e,t,r)=>{r.d(t,{A:()=>a});const a=(0,r(15543).Ay)()}}]);
//# sourceMappingURL=9372.64974cd5.chunk.js.map