"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[2798,1954],{91954:function(e,t,r){r.r(t),r.d(t,{default:function(){return h}});var n=r(41361),a=r(32723),u=r(68079),s=r(34795),c=r(9249),f=r(87371),i=r(45754),o=r(13820),l=r(20783),p=r(14956),v=r(26131),Z=r(9077),h=function(e){(0,i.Z)(r,e);var t=(0,o.Z)(r);function r(e,n,a){var u;(0,c.Z)(this,r),(u=t.call(this,e,n,a)).features=void 0;var s=(0,Z.readConfObject)(e,"features");return u.features=r.makeFeatures(s||[]),u}return(0,f.Z)(r,[{key:"getRefNames",value:function(){var e=(0,s.Z)((0,a.Z)().mark((function e(){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,u.Z)(this.features.keys()));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getRefNameAliases",value:function(){var e=(0,s.Z)((0,a.Z)().mark((function e(){return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,u.Z)(this.features.values()).map((function(e){return{refName:e[0].get("refName"),aliases:e[0].get("aliases")}})));case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getFeatures",value:function(e){var t=this,r=e.refName,u=e.start,c=e.end;return(0,v.ObservableCreate)(function(){var e=(0,s.Z)((0,a.Z)().mark((function e(s){var f,i,o,l;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f=t.features.get(r)||[],i=(0,n.Z)(f);try{for(i.s();!(o=i.n()).done;)(l=o.value).get("end")>u&&l.get("start")<c&&s.next(l)}catch(a){i.e(a)}finally{i.f()}s.complete();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:"freeResources",value:function(){}}],[{key:"makeFeatures",value:function(e){var t,r=new Map,a=(0,n.Z)(e);try{for(a.s();!(t=a.n()).done;){var u=t.value;if(u){var s=this.makeFeature(u),c=s.get("refName"),f=r.get(c);f||(f=[],r.set(c,f)),f.push(s)}}}catch(l){a.e(l)}finally{a.f()}var i,o=(0,n.Z)(r.values());try{for(o.s();!(i=o.n()).done;){i.value.sort((function(e,t){return e.get("start")-t.get("start")}))}}catch(l){o.e(l)}finally{o.f()}return r}},{key:"makeFeature",value:function(e){return new p.Z(e)}}]),r}(l.BaseFeatureDataAdapter)},92798:function(e,t,r){r.r(t),r.d(t,{default:function(){return k}});var n=r(96234),a=r(41361),u=r(32723),s=r(33028),c=r(34795),f=r(9249),i=r(87371),o=r(93069),l=r(95058),p=r(45754),v=r(13820),Z=r(14956),h=r(26131),d=r(95915),y=r(91954),g=r(81450),k=function(e){(0,p.Z)(r,e);var t=(0,v.Z)(r);function r(){return(0,f.Z)(this,r),t.apply(this,arguments)}return(0,i.Z)(r,[{key:"getFeatures",value:function(e){var t=this;return(0,h.ObservableCreate)(function(){var n=(0,c.Z)((0,u.Z)().mark((function n(a){var c,f;return(0,u.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,g.z)((0,o.Z)((0,l.Z)(r.prototype),"getFeatures",t).call(t,e).pipe((0,d.q)()));case 2:c=n.sent,f=c[0],a.next(new Z.Z((0,s.Z)((0,s.Z)({},f.toJSON()),{},{uniqueId:"".concat(f.id(),":").concat(e.start,"-").concat(e.end),end:e.end,start:e.start,seq:f.get("seq").slice(Math.max(e.start-f.get("start"),0),Math.max(e.end-f.get("start"),0))}))),a.complete();case 6:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())}},{key:"getRegions",value:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(){var t,r,s,c,f,i,o,l,p,v;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=[],r=(0,a.Z)(this.features);try{for(r.s();!(s=r.n()).done;){c=(0,n.Z)(s.value,2),f=c[0],i=c[1],o=void 0,l=(0,a.Z)(i);try{for(l.s();!(p=l.n()).done;)v=p.value,o&&o.end>=v.get("start")&&o.start<=v.get("end")?o.end=v.get("end"):(o&&t.push(o),o={refName:f,start:v.get("start"),end:v.get("end")})}catch(u){l.e(u)}finally{l.f()}o&&t.push(o)}}catch(u){r.e(u)}finally{r.f()}return e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"freeResources",value:function(){}}]),r}(y.default)}}]);
//# sourceMappingURL=2798.ceb0e21f.chunk.js.map