(this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[73],{2485:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return j}));var r=n(89),a=n.n(r),s=n(91),u=n(90),c=n(93),i=n(94),o=n(95),p=n(126),f=n(122),h=n(142),d=n(82),v=n(563),l=n(259),b=n.n(l),w=n(290),g=function(e){var t=e.split("\n"),n=[],r=[],a=[];return t.forEach((function(e){e.startsWith("##contig")?r.push(e.split("##contig=<ID=")[1].split(",")[0]):e.startsWith("#")?n.push(e):e&&a.push(e)})),{header:n.join("\n"),lines:a,refNames:r}},j=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this,e)).setupP=void 0,r}return Object(c.a)(n,[{key:"decodeFileContents",value:function(){var e=Object(s.a)(a.a.mark((function e(){var t,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Object(d.readConfObject)(this.config,"vcfLocation"),e.next=3,Object(f.openLocation)(t).readFile();case 3:if("number"!==typeof(n=e.sent)[0]||31!==n[0]||"number"!==typeof n[1]||139!==n[1]||"number"!==typeof n[2]||8!==n[2]){e.next=12;break}return e.t0=new TextDecoder,e.next=8,Object(w.unzip)(n);case 8:e.t1=e.sent,n=e.t0.decode.call(e.t0,e.t1),e.next=13;break;case 12:n=n.toString();case 13:return e.abrupt("return",g(n));case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getHeader",value:function(){var e=Object(s.a)(a.a.mark((function e(){var t,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decodeFileContents();case 2:return t=e.sent,n=t.header,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getMetadata",value:function(){var e=Object(s.a)(a.a.mark((function e(){var t,n,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decodeFileContents();case 2:return t=e.sent,n=t.header,r=new b.a({header:n}),e.abrupt("return",r.getMetadata());case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getLines",value:function(){var e=Object(s.a)(a.a.mark((function e(){var t,n,r,s,u=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decodeFileContents();case 2:return t=e.sent,n=t.header,r=t.lines,s=new b.a({header:n}),e.abrupt("return",r.map((function(e,t){return new v.a({variant:s.parseLine(e),parser:s,id:"".concat(u.id,"-vcf-").concat(t)})})));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setup",value:function(){var e=Object(s.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setupP||(this.setupP=this.getLines()),e.abrupt("return",this.setupP);case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getRefNames",value:function(){var e=Object(s.a)(a.a.mark((function e(){var t,n,r=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,this.decodeFileContents();case 3:return t=e.sent,n=t.refNames,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getFeatures",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(h.ObservableCreate)(function(){var n=Object(s.a)(a.a.mark((function n(r){return a.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.setup();case 2:n.sent.forEach((function(t){t.get("refName")===e.refName&&t.get("end")>e.start&&t.get("start")<e.end&&r.next(t)})),r.complete();case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),n.signal)}},{key:"freeResources",value:function(){}}]),n}(p.BaseFeatureDataAdapter);j.capabilities=["getFeatures","getRefNames"]}}]);
//# sourceMappingURL=73.859decec.chunk.js.map