text: (this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[31],{2273:function(e,t,a){"use strict";var n=a(92);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(a(1)),c=(0,n(a(96)).default)(o.default.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Create");t.default=c},2274:function(e,t,a){"use strict";var n=a(92);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(a(1)),c=(0,n(a(96)).default)(o.default.createElement("path",{d:"M11.67 3.87L9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");t.default=c},2525:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return Q}));var n=a(82),o=a(1),c=a.n(o),r=a(85),l=a(51),i=a(2437),s=a(2454),u=a(2463),m=a(2458),d=a(2457),p=a(312),b=a.n(p),f=a(2274),E=a.n(f),g=a(150),v=a.n(g),j=a(2427),y=a(2482),O=a(2483),L=a(2439),B=a(2484),w=a(2485),A=a(2486),C=a(2423),h=a(2435),k=a(2273),F=a.n(k),S=a(354),N=a.n(S),z=a(81),x=Object(l.a)((function(){return{table:{minWidth:500,minHeight:150},buttonCell:{padding:3},button:{display:"inline-block",padding:3,minHeight:0,minWidth:0}}})),T=Object(r.observer)((function(e){var t=e.rootModel,a=e.setIsAssemblyBeingEdited,n=e.setAssemblyBeingEdited,o=x();var r=t.jbrowse.assemblies.map((function(e){var r=Object(z.readConfObject)(e,"name"),l=Object(z.readConfObject)(e,"aliases");return c.a.createElement(A.a,{key:r},c.a.createElement(L.a,null,r),c.a.createElement(L.a,null,l?l.toString():""),c.a.createElement(L.a,{className:o.buttonCell},c.a.createElement(j.a,{"data-testid":"".concat(r,"-edit"),className:o.button,onClick:function(){a(!0),n(e)}},c.a.createElement(F.a,{color:"primary"})),c.a.createElement(j.a,{"data-testid":"".concat(r,"-delete"),className:o.button,onClick:function(){!function(e){t.jbrowse.removeAssemblyConf(e)}(r)}},c.a.createElement(N.a,{color:"error"}))))}));return c.a.createElement(B.a,{component:C.a},c.a.createElement(y.a,{className:o.table},c.a.createElement(w.a,null,c.a.createElement(A.a,null,c.a.createElement(L.a,null,c.a.createElement(h.a,{variant:"h5"},"Name")),c.a.createElement(L.a,null,c.a.createElement(h.a,{variant:"h5"},"Aliases")),c.a.createElement(L.a,null,c.a.createElement(h.a,{variant:"h5"},"Actions")))),c.a.createElement(O.a,null,r)))})),M=a(699),I=a(1332),W=a(2412),_=a(2431),q=a(2460),G=Object(l.a)((function(e){return Object(I.a)({root:{flexGrow:1,overflow:"hidden",padding:e.spacing(0,3)},paper:{maxWidth:400,margin:"".concat(e.spacing(1),"px auto"),padding:e.spacing(2)},createButton:{marginTop:"1em",justifyContent:"center"},paperContent:{flex:"auto",margin:"".concat(e.spacing(1),"px auto"),padding:e.spacing(1),overflow:"auto"}})})),J=Object(r.observer)((function(e){var t=e.adapterSelection,a=e.setAdapterSelection,n=e.adapterTypes;return c.a.createElement(W.a,{value:t,label:"Type",select:!0,helperText:"Type of adapter to use",fullWidth:!0,onChange:function(e){a(e.target.value)}},n.map((function(e){return c.a.createElement(_.a,{key:e,value:e},e)})))})),P=Object(r.observer)((function(e){var t=e.adapterSelection,a=e.fastaLocation,n=e.setFastaLocation,o=e.faiLocation,r=e.setFaiLocation,l=e.gziLocation,i=e.setGziLocation,s=e.twoBitLocation,u=e.setTwoBitLocation;return"IndexedFastaAdapter"===t||"BgzipFastaAdapter"===t?c.a.createElement(q.a,{container:!0,spacing:2},c.a.createElement(q.a,{item:!0},c.a.createElement(M.a,{name:"fastaLocation",location:a,setLocation:function(e){return n(e)}})),c.a.createElement(q.a,{item:!0},c.a.createElement(M.a,{name:"faiLocation",location:o,setLocation:function(e){return r(e)}})),"BgzipFastaAdapter"===t?c.a.createElement(q.a,{item:!0},c.a.createElement(M.a,{name:"gziLocation",location:l,setLocation:function(e){return i(e)}})):null):"TwoBitAdapter"===t?c.a.createElement(M.a,{name:"twoBitLocation",location:s,setLocation:function(e){return u(e)}}):null})),H=Object(r.observer)((function(e){var t=e.rootModel,a=e.setFormOpen,r=G(),l=["IndexedFastaAdapter","BgzipFastaAdapter","TwoBitAdapter"],s=Object(o.useState)(""),u=Object(n.a)(s,2),m=u[0],d=u[1],p=Object(o.useState)(l[0]),f=Object(n.a)(p,2),E=f[0],g=f[1],v=Object(o.useState)({uri:""}),j=Object(n.a)(v,2),y=j[0],O=j[1],L=Object(o.useState)({uri:""}),B=Object(n.a)(L,2),w=B[0],A=B[1],h=Object(o.useState)({uri:""}),k=Object(n.a)(h,2),F=k[0],S=k[1],N=Object(o.useState)({uri:""}),z=Object(n.a)(N,2),x=z[0],T=z[1];return c.a.createElement("div",{className:r.root},c.a.createElement(C.a,{className:r.paper},c.a.createElement(W.a,{id:"assembly-name",inputProps:{"data-testid":"assembly-name"},label:"Assembly Name",variant:"outlined",value:m,onChange:function(e){return d(e.target.value)}}),c.a.createElement(J,{adapterSelection:E,setAdapterSelection:g,adapterTypes:l}),c.a.createElement("div",{className:r.paperContent},c.a.createElement(P,{adapterSelection:E,fastaLocation:y,setFastaLocation:O,faiLocation:w,setFaiLocation:A,gziLocation:F,setGziLocation:S,twoBitLocation:x,setTwoBitLocation:T}))),c.a.createElement(q.a,{container:!0,className:r.createButton},c.a.createElement(q.a,{item:!0},c.a.createElement(i.a,{variant:"contained",color:"secondary",startIcon:c.a.createElement(b.a,null),onClick:function(){var e;""===m?t.session.notify("Can't create an assembly without a name"):(a(!1),"IndexedFastaAdapter"===E?e={name:m,sequence:{adapter:{type:"IndexedFastaAdapter",fastaLocation:y,faiLocation:w}}}:"BgzipFastaAdapter"===E?e={name:m,sequence:{adapter:{type:"BgzipFastaAdapter",fastaLocation:y,faiLocation:w,gziLocation:F}}}:"TwoBitAdapter"===E&&(e={name:m,sequence:{adapter:{type:"TwoBitAdapter",twoBitLocation:x}}}),t.jbrowse.addAssemblyConf(e),t.session.notify("Successfully added ".concat(m," assembly to JBrowse 2"),"success"))}},"Create new assembly"))))})),V=a(883),D=Object(r.observer)((function(e){var t=e.assembly;return c.a.createElement(V.a,{model:{target:t}})})),K=Object(l.a)((function(e){return{titleBox:{color:"#fff",backgroundColor:e.palette.primary.main,textAlign:"center"},dialogContent:{width:"100%"},backButton:{color:"#fff",position:"absolute",left:e.spacing(4),top:e.spacing(4)},closeButton:{position:"absolute",right:e.spacing(1),top:e.spacing(1),color:e.palette.grey[500]}}}));var Q=Object(r.observer)((function(e){var t=e.rootModel,a=e.open,r=e.onClose,l=K(),p=Object(o.useState)(!1),f=Object(n.a)(p,2),g=f[0],y=f[1],O=Object(o.useState)(!1),L=Object(n.a)(O,2),B=L[0],w=L[1],A=Object(o.useState)(),C=Object(n.a)(A,2),h=C[0],k=C[1],F=!g&&!B;return c.a.createElement(s.a,{open:a,onClose:function(){return r(!1)}},c.a.createElement(d.a,{className:l.titleBox},F?"Assembly manager":null,g?c.a.createElement(c.a.Fragment,null,c.a.createElement(j.a,{"aria-label":"back",className:l.backButton,onClick:function(){return y(!1)}},c.a.createElement(E.a,null)),"Add new assembly"):null,B?c.a.createElement(c.a.Fragment,null,c.a.createElement(j.a,{"aria-label":"back",className:l.backButton,onClick:function(){return w(!1)}},c.a.createElement(E.a,null)),function(e){if(void 0!==e)return e.name;return null}(h)):null,c.a.createElement(j.a,{"aria-label":"close",className:l.closeButton,onClick:function(){return r(!1)}},c.a.createElement(v.a,null))),c.a.createElement(m.a,null,c.a.createElement("div",{className:l.dialogContent},F?c.a.createElement(T,{rootModel:t,setIsAssemblyBeingEdited:w,setAssemblyBeingEdited:k}):null,B?c.a.createElement(D,{assembly:h}):null,g?c.a.createElement(H,{rootModel:t,setFormOpen:y}):null)),c.a.createElement(u.a,null,F?c.a.createElement(c.a.Fragment,null,c.a.createElement(i.a,{color:"secondary",variant:"contained",onClick:function(){return r(!1)}},"Close"),c.a.createElement(i.a,{variant:"contained",color:"secondary",startIcon:c.a.createElement(b.a,null),onClick:function(){return y(!0)}},"Add new assembly")):null))}))}}]);
  //# sourceMappingURL=31.264faa85.chunk.js.map