(this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[79],{1197:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return w}));var n=a(89),r=a(86),c=a(84),s=a(12),u=a(91),i=a(92),o=a(83),f=a.n(o),p=a(826),b=a(121),l=a(110),v=a(134),d=a(122),h=a(82),j=a(190),O=a.n(j),g=a(353),w=function(e){Object(u.a)(a,e);var t=Object(i.a)(a);function a(e,s,u){var i;Object(c.a)(this,a),(i=t.call(this,e,s,u)).fasta=void 0,i.seqCache=new O.a({cache:new g.a({maxSize:200}),fill:function(){var e=Object(r.a)(f.a.mark((function e(t,a){var r,c,s;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.refName,c=t.start,s=t.end,e.abrupt("return",i.fasta.getSequence(r,c,s,Object(n.a)(Object(n.a)({},t),{},{signal:a})));case 2:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()});var o=Object(h.readConfObject)(e,"fastaLocation"),b=Object(h.readConfObject)(e,"faiLocation"),v={fasta:Object(l.openLocation)(o,i.pluginManager),fai:Object(l.openLocation)(b,i.pluginManager)};return i.fasta=new p.IndexedFasta(v),i}return Object(s.a)(a,[{key:"getRefNames",value:function(e){return this.fasta.getSequenceNames(e)}},{key:"getRegions",value:function(){var e=Object(r.a)(f.a.mark((function e(t){var a;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.fasta.getSequenceSizes(t);case 2:return a=e.sent,e.abrupt("return",Object.keys(a).map((function(e){return{refName:e,start:0,end:a[e]}})));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getFeatures",value:function(e,t){var a=this,n=e.refName,c=e.start,s=e.end;return Object(v.ObservableCreate)(function(){var e=Object(r.a)(f.a.mark((function e(r){var u,i,o,p,b,l,v,h,j;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.fasta.getSequenceSize(n,t);case 2:for(u=e.sent,i=void 0!==u?Math.min(u,s):s,o=[],l=s+((p=128e3)-s%p),v=b=c-c%p;v<l;v+=p)h={refName:n,start:v,end:v+p},o.push(a.seqCache.get(JSON.stringify(h),h,null===t||void 0===t?void 0:t.signal));return e.next=11,Promise.all(o);case 11:(j=e.sent.join("").slice(c-b).slice(0,s-c))&&r.next(new d.a({id:"".concat(n," ").concat(c,"-").concat(i),data:{refName:n,start:c,end:i,seq:j}})),r.complete();case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:"freeResources",value:function(){}}]),a}(b.BaseFeatureDataAdapter)}}]);
//# sourceMappingURL=79.e724224c.chunk.js.map