"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[477],{20477:function(e,r,t){t.r(r),t.d(r,{bufferToString:function(){return i},parseCsvBuffer:function(){return m},parseTsvBuffer:function(){return v}});var n=t(32723),u=t(33028),a=t(41361),s=t(96234),o=t(34795),c=t(97531);function i(e){return new TextDecoder("utf8",{fatal:!0}).decode(e)}function f(e){return p.apply(this,arguments)}function p(){return p=(0,o.Z)((0,n.Z)().mark((function e(r){var a,s,o=arguments;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,t.e(8639).then(t.t.bind(t,88639,23)).then((function(e){return e.default}));case 3:return s=e.sent,e.abrupt("return",s((0,u.Z)({noheader:!0,output:"csv"},a)).fromString(i(r)));case 5:case"end":return e.stop()}}),e)}))),p.apply(this,arguments)}function l(e,r,t){var n,u=e.rows[0].cells[r].text||"",a="Text";try{n=(0,c.parseLocString)(u,t)}catch(s){}return n&&n.refName&&"number"===typeof n.start?a="LocString":/^\d+(\.\d+)?$/.test(u)&&(a="Number"),a}function d(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.hasColumnNameLine,n=void 0!==t&&t,u=r.columnNameLineNumber,o=void 0===u?1:u,i=r.isValidRefName,f=void 0===i?function(){return!1}:i,p=r.selectedAssemblyName,d=0,m={isLoaded:!0,rows:e.map((function(e,r){var t=r+(n?0:1);return e.length>d&&(d=e.length),{id:String(t),cells:e.map((function(e,r){return{columnNumber:r,text:e}}))}}))},h={};if(n&&void 0!==o){var v=m.rows.splice(o-1,1),w=(0,s.Z)(v,1)[0];w&&w.cells.forEach((function(e,r){h[r]=e.text||""}))}for(var b=[],y=[],x=0;x<d;x+=1){y.push(x);var Z=l(m,x,f);if("LocString"===Z){var g,N=(0,a.Z)(m.rows);try{for(N.s();!(g=N.n()).done;){var S=g.value.cells[x];S.extendedData=(0,c.parseLocString)(S.text,f)}}catch(k){N.e(k)}finally{N.f()}}b[x]={name:h[x],dataType:{type:Z}}}return{rowSet:m,columnDisplayOrder:y,hasColumnNames:!!n,columns:b,assemblyName:p}}function m(e,r){return h.apply(this,arguments)}function h(){return(h=(0,o.Z)((0,n.Z)().mark((function e(r,t){var u;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(r);case 2:return u=e.sent,e.abrupt("return",d(u,t));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e,r){return w.apply(this,arguments)}function w(){return(w=(0,o.Z)((0,n.Z)().mark((function e(r,t){var u;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(r,{delimiter:"\t"});case 2:return u=e.sent,e.abrupt("return",d(u,t));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}}]);
//# sourceMappingURL=477.fa8912db.chunk.js.map