"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[6326],{86326:(e,t,r)=>{r.r(t),r.d(t,{default:()=>x});var a=r(66204),s=r(38684),n=r(80846),i=r(31211),o=r(82051),l=r(93840),c=r(94926),m=r(10126),d=r(7146),u=r(43902),h=r(3206),p=r(12060),g=r(74688),b=r(67710);const v=(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.Z,{fetchResults:e=>(0,b.kx)({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"}})})),f=(0,s.ZL)()((e=>({importFormContainer:{padding:e.spacing(2)},button:{margin:e.spacing(2)},container:{padding:e.spacing(4)}}))),x=(0,n.observer)((function({model:e}){const{classes:t}=f(),r=(0,i.getSession)(e),{assemblyNames:s,assemblyManager:n}=r,{error:g}=e,[b,x]=(0,a.useState)(s[0]),[S,Z]=(0,a.useState)(),k=n.get(b),y=s.length?k?.error:"No configured assemblies",w=y||g,[C,E]=(0,a.useState)(""),M=k?.regions,P=!!M,W=M?M[0]?.refName:"";return(0,a.useEffect)((()=>{E(W)}),[W,b]),a.createElement("div",{className:t.container},w?a.createElement(u.ErrorMessage,{error:w}):null,a.createElement(o.Z,{className:t.importFormContainer},a.createElement("form",{onSubmit:async t=>{if(t.preventDefault(),e.setError(void 0),C)try{S?.getDisplayString()===C&&S.hasLocation()?await(0,p.Xp)({option:S,model:e,assemblyName:b}):S?.results?.length?e.setSearchResults(S.results,S.getLabel(),b):k&&await(0,p.I8)({input:C,assembly:k,model:e})}catch(e){console.error(e),r.notify(`${e}`,"warning")}}},a.createElement(l.ZP,{container:!0,spacing:1,justifyContent:"center",alignItems:"center"},a.createElement(l.ZP,{item:!0},a.createElement(c.Z,null,a.createElement(u.AssemblySelector,{onChange:e=>x(e),localStorageKey:"lgv",session:r,selected:b}))),a.createElement(l.ZP,{item:!0},b?y?a.createElement(h.Z,{style:{color:"red"}}):P?a.createElement(c.Z,null,a.createElement(v,{value:C,setValue:E,selectedAsm:b,setOption:Z,model:e})):a.createElement(m.Z,{size:20,disableShrink:!0}):null),a.createElement(l.ZP,{item:!0},a.createElement(c.Z,null,a.createElement(d.Z,{type:"submit",disabled:!C,className:t.button,variant:"contained",color:"primary"},"Open")),a.createElement(c.Z,null,a.createElement(d.Z,{disabled:!C,className:t.button,onClick:()=>{e.setError(void 0),e.showAllRegionsInAssembly(b)},variant:"contained",color:"secondary"},"Show all regions in assembly")))))))}))},10126:(e,t,r)=>{r.d(t,{Z:()=>C});var a=r(55559),s=r(30984),n=r(66204),i=r(56317),o=r(58029),l=r(71580),c=r(40118),m=r(57369),d=r(61125),u=r(22489),h=r(43188);const p=["className","color","disableShrink","size","style","thickness","value","variant"];let g,b,v,f,x=e=>e;const S=(0,l.F4)(g||(g=x`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`)),Z=(0,l.F4)(b||(b=x`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

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

  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`)),k=(0,d.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${(0,c.Z)(r.color)}`]]}})((({ownerState:e,theme:t})=>(0,s.Z)({display:"inline-block"},"determinate"===e.variant&&{transition:t.transitions.create("transform")},"inherit"!==e.color&&{color:(t.vars||t).palette[e.color].main})),(({ownerState:e})=>"indeterminate"===e.variant&&(0,l.iv)(v||(v=x`
      animation: ${0} 1.4s linear infinite;
    `),S))),y=(0,d.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),w=(0,d.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${(0,c.Z)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})((({ownerState:e,theme:t})=>(0,s.Z)({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})),(({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&(0,l.iv)(f||(f=x`
      animation: ${0} 1.4s ease-in-out infinite;
    `),Z))),C=n.forwardRef((function(e,t){const r=(0,m.Z)({props:e,name:"MuiCircularProgress"}),{className:n,color:l="primary",disableShrink:d=!1,size:g=40,style:b,thickness:v=3.6,value:f=0,variant:x="indeterminate"}=r,S=(0,a.Z)(r,p),Z=(0,s.Z)({},r,{color:l,disableShrink:d,size:g,thickness:v,value:f,variant:x}),C=(e=>{const{classes:t,variant:r,color:a,disableShrink:s}=e,n={root:["root",r,`color${(0,c.Z)(a)}`],svg:["svg"],circle:["circle",`circle${(0,c.Z)(r)}`,s&&"circleDisableShrink"]};return(0,o.Z)(n,u.C,t)})(Z),E={},M={},P={};if("determinate"===x){const e=2*Math.PI*((44-v)/2);E.strokeDasharray=e.toFixed(3),P["aria-valuenow"]=Math.round(f),E.strokeDashoffset=`${((100-f)/100*e).toFixed(3)}px`,M.transform="rotate(-90deg)"}return(0,h.jsx)(k,(0,s.Z)({className:(0,i.Z)(C.root,n),style:(0,s.Z)({width:g,height:g},M,b),ownerState:Z,ref:t,role:"progressbar"},P,S,{children:(0,h.jsx)(y,{className:C.svg,ownerState:Z,viewBox:"22 22 44 44",children:(0,h.jsx)(w,{className:C.circle,style:E,ownerState:Z,cx:44,cy:44,r:(44-v)/2,fill:"none",strokeWidth:v})})}))}))},22489:(e,t,r)=>{r.d(t,{C:()=>n,Z:()=>i});var a=r(58109),s=r(95201);function n(e){return(0,s.Z)("MuiCircularProgress",e)}const i=(0,a.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"])},82051:(e,t,r)=>{r.d(t,{Z:()=>k});var a=r(55559),s=r(30984),n=r(66204),i=r(56317),o=r(46730),l=r(95201),c=r(58029),m=r(77877),d=r(605),u=r(71684),h=r(43188);const p=["className","component","disableGutters","fixed","maxWidth","classes"],g=(0,u.Z)(),b=(0,d.Z)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`maxWidth${(0,o.Z)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),v=e=>(0,m.Z)({props:e,name:"MuiContainer",defaultTheme:g});var f=r(40118),x=r(61125),S=r(57369);const Z=function(e={}){const{createStyledComponent:t=b,useThemeProps:r=v,componentName:m="MuiContainer"}=e,d=t((({theme:e,ownerState:t})=>(0,s.Z)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!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})=>(0,s.Z)({},"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}`}}))),u=n.forwardRef((function(e,t){const n=r(e),{className:u,component:g="div",disableGutters:b=!1,fixed:v=!1,maxWidth:f="lg"}=n,x=(0,a.Z)(n,p),S=(0,s.Z)({},n,{component:g,disableGutters:b,fixed:v,maxWidth:f}),Z=((e,t)=>{const{classes:r,fixed:a,disableGutters:s,maxWidth:n}=e,i={root:["root",n&&`maxWidth${(0,o.Z)(String(n))}`,a&&"fixed",s&&"disableGutters"]};return(0,c.Z)(i,(e=>(0,l.Z)(t,e)),r)})(S,m);return(0,h.jsx)(d,(0,s.Z)({as:g,ownerState:S,className:(0,i.Z)(Z.root,u),ref:t},x))}));return u}({createStyledComponent:(0,x.ZP)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`maxWidth${(0,f.Z)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,S.Z)({props:e,name:"MuiContainer"})}),k=Z}}]);
//# sourceMappingURL=6326.724fed57.chunk.js.map