"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[3025],{3025:(t,e,r)=>{r.r(e),r.d(e,{parseBedPEBuffer:()=>o});var n=r(52205),a=r(32622);function o(t){const e=(0,a.P)(t),r=e.filter(t=>!(t.startsWith("#")||t.startsWith("browser")||t.startsWith("track"))),o=e.findLast(t=>t.startsWith("#")),s=["refName","start","end","mateRef","mateStart","mateEnd","name","score","strand","mateStrand"],u=Math.max(0,(r[0]?.split("\t").length||0)-s.length),c=o?.includes("\t")?o.slice(1).split("\t").slice(s.length).map(t=>t.trim()):Array.from({length:u},(t,e)=>`field_${e}`);return{columns:[...s,...c].map(t=>({name:t})),rowSet:{rows:r.map((t,e)=>{const r=t.split("\t");return{cellData:{refName:r[0],start:r[1],end:r[2],mateRefName:r[3],mateStart:r[4],mateEnd:r[5],name:r[6],score:+r[7]||r[7],strand:r[8],mateStrand:r[9],...Object.fromEntries(c.map((t,e)=>{const a=r[e+s.length];return[t,(0,n.Et)(a)?+a:a]}))},feature:{uniqueId:`bedpe-${e}`,refName:r[0],start:+r[1],end:+r[2],strand:(0,a.c)(r[8]),mate:{refName:r[3],start:+r[4],end:+r[5],strand:(0,a.c)(r[9])},name:r[6],score:r[7],...Object.fromEntries(c.map((t,e)=>{const a=r[e+s.length];return[t,(0,n.Et)(a)?+a:a]}))}}})}}}},32622:(t,e,r)=>{function n(t){return"+"===t?1:"-"===t?-1:void 0}function a(t){return new TextDecoder("utf8").decode(t).split(/\n|\r\n|\r/).map(t=>t.trim()).filter(t=>!!t)}r.d(e,{P:()=>a,c:()=>n})},52205:(t,e,r)=>{function n(t){return"number"==typeof t&&!Number.isNaN(t)}function a(t){return"function"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(){try{const t="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}}function u(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}r.d(e,{E1:()=>m,Et:()=>n,Go:()=>f,Gv:()=>o,I9:()=>l,Nt:()=>u,Tn:()=>a,Ve:()=>d,qE:()=>c,s3:()=>s,y1:()=>i});const c=(t,e,r)=>Math.max(e,Math.min(r,t));function i(t,e){return Array.from({length:e-t}).map((e,r)=>t+r)}function m(t){const e=(r=t,()=>{let t=r+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296});var r;return(t,r)=>t+(r-t)*e()}function f(t){return"function"==typeof structuredClone?structuredClone(t):JSON.parse(JSON.stringify(t))}function l(t){}const d=(t,e)=>r=>{t&&e(r)}}}]);
//# sourceMappingURL=3025.ccaa59c9.chunk.js.map