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