this.webpackChunk([35,2],{1137:function(e,t,n){"use strict";n.r(t),n.d(t,"bufferToString",(function(){return s})),n.d(t,"parseCsvBuffer",(function(){return p})),n.d(t,"parseTsvBuffer",(function(){return v}));var r=n(4),a=n.n(r),u=n(5),i=n(7),o=n(10),c=n(6);function s(e){return new TextDecoder("utf-8",{fatal:!0}).decode(e)}function m(e){return f.apply(this,arguments)}function f(){return f=Object(o.a)(a.a.mark((function e(t){var r,i,o=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,n.e(37).then(n.t.bind(null,1266,7)).then((function(e){return e.default}));case 3:return i=e.sent,e.abrupt("return",i(Object(u.a)({noheader:!0,output:"csv"},r)).fromString(s(t)));case 5:case"end":return e.stop()}}),e)}))),f.apply(this,arguments)}function l(e,t,n){var r,a=e.rows[0].cells[t].text||"",u="Text";try{r=Object(c.parseLocString)(a,n)}catch(i){}return r&&r.refName&&"number"===typeof r.start?u="LocString":/^\d+(\.\d+)?$/.test(a)&&(u="Number"),u}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{hasColumnNameLine:!1,columnNameLineNumber:1,isValidRefName:function(){return!1}},n=0,r={isLoaded:!0,rows:e.map((function(e,r){var a=r+(t.hasColumnNameLine?0:1);return e.length>n&&(n=e.length),{id:String(a),cells:e.map((function(e,t){return{columnNumber:t,text:e}}))}}))},a={};if(t.hasColumnNameLine&&void 0!==t.columnNameLineNumber){var u=r.rows.splice(t.columnNameLineNumber-1,1),o=Object(i.a)(u,1),s=o[0];s&&s.cells.forEach((function(e,t){a[t]=e.text||""}))}for(var m=[],f=[],d=function(e){f.push(e);var n=l(r,e,t.isValidRefName);"LocString"===n&&r.rows.forEach((function(n){var r=n.cells[e];r.extendedData=Object(c.parseLocString)(r.text,t.isValidRefName)})),m[e]={name:a[e],dataType:{type:n}}},p=0;p<n;p+=1)d(p);return{rowSet:r,columnDisplayOrder:f,hasColumnNames:!!t.hasColumnNameLine,columns:m,assemblyName:t.selectedAssemblyName}}function p(e){return h.apply(this,arguments)}function h(){return h=Object(o.a)(a.a.mark((function e(t){var n,r,u=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{hasColumnNameLine:!1,columnNameLineNumber:1,isValidRefName:function(){return!1}},e.next=3,m(t);case 3:return r=e.sent,e.abrupt("return",d(r,n));case 5:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}function v(e){return N.apply(this,arguments)}function N(){return N=Object(o.a)(a.a.mark((function e(t){var n,r,u=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{hasColumnNameLine:!1,columnNameLineNumber:1,isValidRefName:function(){return!1}},e.next=3,m(t,{delimiter:"\t"});case 3:return r=e.sent,e.abrupt("return",d(r,n));case 5:case"end":return e.stop()}}),e)}))),N.apply(this,arguments)}},2007:function(e,t,n){"use strict";n.r(t),n.d(t,"parseVcfBuffer",(function(){return c})),n.d(t,"splitVcfFileHeaderAndBody",(function(){return s}));var r=n(125),a=n(588),u=n(1137),i=[{name:"CHROM",type:"Text"},{name:"POS",type:"Number"},{name:"ID",type:"Text"},{name:"REF",type:"Text"},{name:"ALT",type:"Text"},{name:"QUAL",type:"Number"},{name:"FILTER",type:"Text"},{name:"INFO",type:"Text"},{name:"FORMAT",type:"Text"}];function o(e,t,n){var r=e.parseLine(t),u=new a.a({variant:r,parser:e,id:"vcf-".concat(n)}),i=t.split("\t").map((function(e){return"."===e?"":e}));return 8===i.length&&i.push(""),{id:String(n+1),extendedData:{vcfFeature:u.toJSON()},cells:i.map((function(e,t){return{columnNumber:t,text:e}}))}}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{hasColumnNameLine:!1,columnNameLineNumber:0,isValidRefName:function(){return!1}},n=s(Object(u.bufferToString)(e)),a=n.header,c=n.body,m=[],f=new r.a({header:a});a="",c.split("\n").forEach((function(e,t){/\S/.test(e)&&m.push(o(f,e,t))})),c="";for(var l={isLoaded:!0,rows:m},d=[],p=[],h=0;h<i.length;h+=1)d.push(h),p[h]={name:i[h].name,dataType:{type:i[h].type}};for(var v=0;v<f.samples.length;v+=1){var N=i.length+v;d.push(N),p[N]={name:f.samples[v],dataType:{type:"Text"}}}return d.push(d.length),p.unshift({name:"Location",dataType:{type:"LocString"},isDerived:!0,derivationFunctionText:"jexl:{text:row.extendedData.vcfFeature.refName+':'\n\n    +row.extendedData.vcfFeature.start+'..'+row.extendedData.vcfFeature.end, extendedData:\n\n    {refName:row.extendedData.vcfFeature.refName,start:row.extendedData.vcfFeature.start,end:row.extendedData.vcfFeature.end}}"}),{rowSet:l,columnDisplayOrder:d,hasColumnNames:!0,columns:p,assemblyName:t.selectedAssemblyName}}function s(e){for(var t,n=0;n<e.length;n+=1){var r=e[n];if("\n"===t&&"#"!==r)break;t=r}return{header:e.substr(0,n),body:e.substr(n)}}}});
//# sourceMappingURL=35.d97312aa0737aaeef47c.worker.js.map