"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[1241],{91241:function(e,n,a){a.r(n);var r=a(96234),t=a(96902),c=a(52809),s=a(35388),o=a(66519),l=a(52),i=a(80367),u=a(32114),h=a(99688),d=a(44536),g=a(46186),x=a(63680),p=a(91188),Z=a(4782),j=a(97531),k=a(29938),C=(0,p.ZL)()({dialogContent:{width:"40em"}});n.default=(0,Z.observer)((function(e){var n,a=e.model,p=e.handleClose,Z=C().classes,b=(0,t.useState)(""),f=(0,r.Z)(b,2),S=f[0],m=f[1],v=(0,t.useState)(!0),w=(0,r.Z)(v,2),y=w[0],q=w[1],T=(0,t.useState)(!0),_=(0,r.Z)(T,2),A=_[0],N=_[1],D=(0,t.useState)(!0),F=(0,r.Z)(D,2),I=F[0],R=F[1];try{new RegExp(S)}catch(E){n=E}return(0,k.jsxs)(g.Dialog,{maxWidth:"xl",open:!0,onClose:p,title:"Sequence search",children:[(0,k.jsxs)(c.Z,{className:Z.dialogContent,children:[(0,k.jsx)(s.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,k.jsx)(o.Z,{value:S,onChange:function(e){return m(e.target.value)},helperText:"Sequence search pattern"}),(0,k.jsxs)(l.Z,{children:[(0,k.jsx)(i.Z,{control:(0,k.jsx)(u.Z,{checked:y,onChange:function(e){return q(e.target.checked)}}),label:"Search forward strand"}),(0,k.jsx)(i.Z,{control:(0,k.jsx)(u.Z,{checked:A,onChange:function(e){return N(e.target.checked)}}),label:"Search reverse strand"}),(0,k.jsx)(i.Z,{control:(0,k.jsx)(u.Z,{checked:I,onChange:function(e){return R(e.target.checked)}}),label:"Case insensitive"})]}),n?(0,k.jsx)(s.Z,{color:"error",children:"".concat(n)}):null]}),(0,k.jsxs)(h.Z,{children:[(0,k.jsx)(d.Z,{onClick:function(){if(S){var e,n="sequence_search_".concat(+Date.now()),r=(0,j.getSession)(a),t=r.assemblyManager,c=a.assemblyNames[0];r.addTrackConf({trackId:n,name:"Sequence search ".concat(S),assemblyNames:[c],type:"FeatureTrack",adapter:{type:"SequenceSearchAdapter",search:S,searchForward:y,searchReverse:A,caseInsensitive:I,sequenceAdapter:(0,x.getSnapshot)(null===(e=t.get(c))||void 0===e?void 0:e.configuration.sequence.adapter)}}),a.toggleTrack(n)}p()},variant:"contained",color:"primary",children:"Submit"}),(0,k.jsx)(d.Z,{onClick:function(){return p()},variant:"contained",color:"secondary",children:"Close"})]})]})}))}}]);
//# sourceMappingURL=1241.9d880226.chunk.js.map