"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[66],{10066:function(e,n,a){a.r(n);var r=a(96234),s=a(30969),t=a(59071),c=a(33359),o=a(87006),l=a(21098),i=a(49884),h=a(88876),u=a(96074),d=a(72097),x=a(59767),g=a(40909),p=a(53276),Z=a(90550),k=a(81073),f=a(37574),j=(0,p.ZL)()({dialogContent:{width:"40em"}}),C=(0,Z.observer)((function(e){var n,a=e.model,p=e.handleClose,Z=j().classes,C=(0,s.useState)(""),b=(0,r.Z)(C,2),S=b[0],m=b[1],v=(0,s.useState)(!0),w=(0,r.Z)(v,2),y=w[0],q=w[1],T=(0,s.useState)(!0),A=(0,r.Z)(T,2),_=A[0],N=A[1],D=(0,s.useState)(!0),F=(0,r.Z)(D,2),I=F[0],R=F[1];try{new RegExp(S)}catch(W){n=W}return(0,f.jsxs)(x.Dialog,{maxWidth:"xl",open:!0,onClose:p,title:"Sequence search",children:[(0,f.jsxs)(t.Z,{className:Z.dialogContent,children:[(0,f.jsx)(c.Z,{children:"Supply a sequence to search for. A track will be created with the resulting matches once submitted. You can also supply regex style expressions e.g. AACT(C|T)."}),(0,f.jsx)(o.Z,{value:S,onChange:function(e){return m(e.target.value)},helperText:"Sequence search pattern"}),(0,f.jsxs)(l.Z,{children:[(0,f.jsx)(i.Z,{control:(0,f.jsx)(h.Z,{checked:y,onChange:function(e){return q(e.target.checked)}}),label:"Search forward strand"}),(0,f.jsx)(i.Z,{control:(0,f.jsx)(h.Z,{checked:_,onChange:function(e){return N(e.target.checked)}}),label:"Search reverse strand"}),(0,f.jsx)(i.Z,{control:(0,f.jsx)(h.Z,{checked:I,onChange:function(e){return R(e.target.checked)}}),label:"Case insensitive"})]}),n?(0,f.jsx)(c.Z,{color:"error",children:"".concat(n)}):null]}),(0,f.jsxs)(u.Z,{children:[(0,f.jsx)(d.Z,{onClick:function(){if(S){var e,n="sequence_search_".concat(+Date.now()),r=(0,k.getSession)(a),s=r.assemblyManager,t=a.assemblyNames[0];if((0,k.isSessionWithAddTracks)(r))r.addTrackConf({trackId:n,name:"Sequence search ".concat(S),assemblyNames:[t],type:"FeatureTrack",adapter:{type:"SequenceSearchAdapter",search:S,searchForward:y,searchReverse:_,caseInsensitive:I,sequenceAdapter:(0,g.getSnapshot)(null===(e=s.get(t))||void 0===e?void 0:e.configuration.sequence.adapter)}}),a.showTrack(n)}p()},variant:"contained",color:"primary",children:"Submit"}),(0,f.jsx)(d.Z,{onClick:function(){return p()},variant:"contained",color:"secondary",children:"Close"})]})]})}));n.default=C}}]);
//# sourceMappingURL=66.db0ca703.chunk.js.map