(this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[70],{1284:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return m}));var n=a(89),r=a.n(n),c=a(92),s=a(91),u=a(90),i=a(93),o=a(94),f=a(95),p=a(858),b=a(126),v=a(122),l=a(142),d=a(140),h=a(82),j=a(170),O=a.n(j),w=a(363),m=function(e){Object(o.a)(a,e);var t=Object(f.a)(a);function a(e){var n;Object(u.a)(this,a),(n=t.call(this,e)).fasta=void 0,n.seqCache=new O.a({cache:new w.a({maxSize:200}),fill:function(){var e=Object(s.a)(r.a.mark((function e(t,a){var s,u,i;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=t.refName,u=t.start,i=t.end,e.abrupt("return",n.fasta.getSequence(s,u,i,Object(c.a)(Object(c.a)({},t),{},{signal:a})));case 2:case"end":return e.stop()}}),e)})));return function(t,a){return e.apply(this,arguments)}}()});var i=Object(h.readConfObject)(e,"fastaLocation"),o=Object(h.readConfObject)(e,"faiLocation"),f={fasta:Object(v.openLocation)(i),fai:Object(v.openLocation)(o)};return n.fasta=new p.IndexedFasta(f),n}return Object(i.a)(a,[{key:"getRefNames",value:function(e){return this.fasta.getSequenceNames(e)}},{key:"getRegions",value:function(){var e=Object(s.a)(r.a.mark((function e(t){var a;return r.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,u=e.end;return Object(l.ObservableCreate)(function(){var e=Object(s.a)(r.a.mark((function e(s){var i,o,f,p,b,v,l,h,j;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.fasta.getSequenceSize(n,t);case 2:for(i=e.sent,o=void 0!==i?Math.min(i,u):u,f=[],v=u+((p=128e3)-u%p),l=b=c-c%p;l<v;l+=p)h={refName:n,start:l,end:l+p},f.push(a.seqCache.get(JSON.stringify(h),h,null===t||void 0===t?void 0:t.signal));return e.next=11,Promise.all(f);case 11:(j=e.sent.join("").slice(c-b).slice(0,u-c))&&s.next(new d.a({id:"".concat(n," ").concat(c,"-").concat(o),data:{refName:n,start:c,end:o,seq:j}})),s.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=70.5d3c277d.chunk.js.map