"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[3285],{23285:(e,t,n)=>{n.r(t),n.d(t,{bufferToString:()=>s,parseCsvBuffer:()=>l,parseTsvBuffer:()=>u});var r=n(90872);function s(e){return new TextDecoder("utf8",{fatal:!0}).decode(e)}async function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(await n.e(6226).then(n.t.bind(n,16226,23)).then((e=>e.default)))({noheader:!0,output:"csv",...t}).fromString(s(e))}function a(e,t,n){var s;const o=e.rows[0].cells[t].text||"";let a,c="Text";try{a=(0,r.parseLocString)(o,n)}catch(l){}return null!==(s=a)&&void 0!==s&&s.refName&&"number"===typeof a.start?c="LocString":/^\d+(\.\d+)?$/.test(o)&&(c="Number"),c}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{hasColumnNameLine:n=!1,columnNameLineNumber:s=1,isValidRefName:o=(()=>!1),selectedAssemblyName:c}=t;let l=0;const u={isLoaded:!0,rows:e.map(((e,t)=>{const r=t+(n?0:1);return e.length>l&&(l=e.length),{id:String(r),cells:e.map(((e,t)=>({columnNumber:t,text:e})))}}))},i={};if(n&&void 0!==s){const[e]=u.rows.splice(s-1,1);e&&e.cells.forEach(((e,t)=>{i[t]=e.text||""}))}const f=[],m=[];for(let d=0;d<l;d+=1){m.push(d);const e=a(u,d,o);if("LocString"===e)for(const t of u.rows){const e=t.cells[d];e.extendedData=(0,r.parseLocString)(e.text,o)}f[d]={name:i[d],dataType:{type:e}}}return{rowSet:u,columnDisplayOrder:m,hasColumnNames:!!n,columns:f,assemblyName:c}}async function l(e,t){return c(await o(e),t)}async function u(e,t){return c(await o(e,{delimiter:"\t"}),t)}}}]);
//# sourceMappingURL=3285.dec624ea.chunk.js.map