@genome-spy/core 0.64.0 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/{index-CCJIjehY.js → AbortablePromiseCache-CcuMrnn7.js} +22 -91
- package/dist/bundle/browser-txUcLy2H.js +123 -0
- package/dist/bundle/index-BQpbYrv4.js +1712 -0
- package/dist/bundle/index-BhtHKLUo.js +73 -0
- package/dist/bundle/index-C0llXMqm.js +280 -0
- package/dist/bundle/index-CCe8rnZz.js +716 -0
- package/dist/bundle/index-CD7FLu9x.js +269 -0
- package/dist/bundle/{index-C08YCM2T.js → index-D-w7Mmt9.js} +246 -126
- package/dist/bundle/index-D74H8TTz.js +508 -0
- package/dist/bundle/index-DhcU-Gk-.js +1487 -0
- package/dist/bundle/index.es.js +4878 -4680
- package/dist/bundle/index.js +151 -167
- package/dist/bundle/inflate-DRgHi_KK.js +1050 -0
- package/dist/schema.json +9 -1
- package/dist/src/data/collector.d.ts +7 -2
- package/dist/src/data/collector.d.ts.map +1 -1
- package/dist/src/data/collector.js +13 -2
- package/dist/src/data/dataFlow.d.ts +20 -42
- package/dist/src/data/dataFlow.d.ts.map +1 -1
- package/dist/src/data/dataFlow.js +57 -80
- package/dist/src/data/dataFlow.test.js +35 -2
- package/dist/src/data/flowHandle.d.ts +15 -0
- package/dist/src/data/flowHandle.d.ts.map +1 -0
- package/dist/src/data/flowHandle.js +13 -0
- package/dist/src/data/flowInit.d.ts +85 -0
- package/dist/src/data/flowInit.d.ts.map +1 -0
- package/dist/src/data/flowInit.js +238 -0
- package/dist/src/data/flowInit.test.d.ts +2 -0
- package/dist/src/data/flowInit.test.d.ts.map +1 -0
- package/dist/src/data/flowInit.test.js +413 -0
- package/dist/src/data/flowOptimizer.d.ts +6 -4
- package/dist/src/data/flowOptimizer.d.ts.map +1 -1
- package/dist/src/data/flowOptimizer.js +29 -14
- package/dist/src/data/flowOptimizer.test.js +20 -15
- package/dist/src/data/sources/lazy/bamSource.js +1 -1
- package/dist/src/data/sources/lazy/bigBedSource.js +1 -1
- package/dist/src/data/sources/lazy/bigWigSource.js +1 -1
- package/dist/src/data/sources/lazy/gff3Source.d.ts +2 -6
- package/dist/src/data/sources/lazy/gff3Source.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/gff3Source.js +4 -8
- package/dist/src/data/sources/lazy/indexedFastaSource.d.ts.map +1 -1
- package/dist/src/data/sources/lazy/indexedFastaSource.js +17 -17
- package/dist/src/data/sources/lazy/tabixSource.js +1 -1
- package/dist/src/genomeSpy.d.ts +1 -1
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +18 -61
- package/dist/src/marks/mark.d.ts +1 -0
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +22 -1
- package/dist/src/spec/sampleView.d.ts +3 -2
- package/dist/src/types/viewContext.d.ts +1 -1
- package/dist/src/view/axisResolution.d.ts +5 -0
- package/dist/src/view/axisResolution.d.ts.map +1 -1
- package/dist/src/view/axisResolution.js +16 -1
- package/dist/src/view/facetView.d.ts.map +1 -1
- package/dist/src/view/facetView.js +1 -0
- package/dist/src/view/flowBuilder.d.ts +2 -2
- package/dist/src/view/flowBuilder.d.ts.map +1 -1
- package/dist/src/view/flowBuilder.js +21 -4
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +13 -0
- package/dist/src/view/gridView/selectionRect.d.ts +8 -4
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -1
- package/dist/src/view/gridView/selectionRect.js +28 -3
- package/dist/src/view/gridView/selectionRect.test.d.ts +2 -0
- package/dist/src/view/gridView/selectionRect.test.d.ts.map +1 -0
- package/dist/src/view/gridView/selectionRect.test.js +87 -0
- package/dist/src/view/paramMediator.d.ts +2 -1
- package/dist/src/view/paramMediator.d.ts.map +1 -1
- package/dist/src/view/paramMediator.js +13 -1
- package/dist/src/view/paramMediator.test.js +22 -0
- package/dist/src/view/scaleResolution.d.ts +5 -0
- package/dist/src/view/scaleResolution.d.ts.map +1 -1
- package/dist/src/view/scaleResolution.js +10 -0
- package/dist/src/view/testUtils.d.ts.map +1 -1
- package/dist/src/view/testUtils.js +16 -4
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +58 -8
- package/dist/src/view/view.d.ts +17 -1
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +57 -1
- package/dist/src/view/viewDispose.test.d.ts +2 -0
- package/dist/src/view/viewDispose.test.d.ts.map +1 -0
- package/dist/src/view/viewDispose.test.js +110 -0
- package/dist/src/view/viewUtils.d.ts +4 -4
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +19 -15
- package/dist/src/view/viewUtils.test.d.ts +2 -0
- package/dist/src/view/viewUtils.test.d.ts.map +1 -0
- package/dist/src/view/viewUtils.test.js +87 -0
- package/package.json +10 -10
- package/dist/bundle/__vite-browser-external-C--ziKoh.js +0 -8
- package/dist/bundle/_commonjsHelpers-DjF3Plf2.js +0 -26
- package/dist/bundle/index-5ajWdKly.js +0 -1319
- package/dist/bundle/index-B03-Om4z.js +0 -274
- package/dist/bundle/index-BftNdA0O.js +0 -27
- package/dist/bundle/index-Bg7C4Xat.js +0 -2750
- package/dist/bundle/index-C3QR8Lv6.js +0 -2131
- package/dist/bundle/index-DTcHjAHp.js +0 -505
- package/dist/bundle/index-DnIkxb0L.js +0 -1025
- package/dist/bundle/index-Ww3TAo6_.js +0 -71
- package/dist/bundle/index-g8iXgW0W.js +0 -651
- package/dist/bundle/long-B-FASCSo.js +0 -2387
- package/dist/bundle/remoteFile-BuaqFGWk.js +0 -94
package/dist/bundle/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function($,ee){typeof exports=="object"&&typeof module<"u"?ee(exports):typeof define=="function"&&define.amd?define(["exports"],ee):($=typeof globalThis<"u"?globalThis:$||self,ee($.genomeSpyEmbed={}))})(this,function($){"use strict";var xF=Object.defineProperty;var mx=$=>{throw TypeError($)};var AF=($,ee,Se)=>ee in $?xF($,ee,{enumerable:!0,configurable:!0,writable:!0,value:Se}):$[ee]=Se;var Y=($,ee,Se)=>AF($,typeof ee!="symbol"?ee+"":ee,Se),od=($,ee,Se)=>ee.has($)||mx("Cannot "+Se);var E=($,ee,Se)=>(od($,ee,"read from private field"),Se?Se.call($):ee.get($)),R=($,ee,Se)=>ee.has($)?mx("Cannot add the same private member more than once"):ee instanceof WeakSet?ee.add($):ee.set($,Se),G=($,ee,Se,ri)=>(od($,ee,"write to private field"),ri?ri.call($,Se):ee.set($,Se),Se),O=($,ee,Se)=>(od($,ee,"access private method"),Se);var gx=($,ee,Se,ri)=>({set _(Ru){G($,ee,Ru,Se)},get _(){return E($,ee,ri)}});var Qb,mn,Zi,jr,Qr,Ki,$o,$e,Zn,Ji,ea,$i,yx,bx,Wr,Da,ta,Kn,qr,es,ts,na,Pt,ns,Jn,ad,cd,rs,Eu,xx,is,ct,Yr,ra,q,ud,ld,Sn,fd,Ax,wx,hd,dd,Fu,pd,ti,vx,Sx,ia,md,ss,os,as,sa,oa,cs,Zt,Ia,gd,aa,us,Ex,Cx,gn,ca,$n,Xr,ls,ht,yd,bd,xd,Dx,ua,Ad,Cu,Ix,fs,hs,ds,la,ps,ms,fa,wd,ha,vd,Zr,gs,da,pa,ys,ma,ga,yn,Kr,ya,Rt,ba,bs,xa,Aa,wa,xs,va,Du,Tx,As,bn,Jr,er,tr,ws,Sa,nr,$r,Iu,Bx,vs,Ss,et,ei,Es,re,ni,kx,Sd,Ta,Ed,Cd,Dd,Fx,Pu,Px,Cs,vt,Mu,Mx,Rx,Ox;function ee(n,e,t){return n.fields=e||[],n.fname=t,n}function Se(n){return n==null?null:n.fname}function ri(n){return n==null?null:n.fields}function Ru(n){return n.length===1?Nx(n[0]):Lx(n)}const Nx=n=>function(e){return e[n]},Lx=n=>{const e=n.length;return function(t){for(let r=0;r<e;++r)t=t[n[r]];return t}};function Ct(n){throw Error(n)}function zx(n){const e=[],t=n.length;let r=null,i=0,s="",o,a,c;n=n+"";function u(){e.push(s+n.substring(o,a)),s="",o=a+1}for(o=a=0;a<t;++a)if(c=n[a],c==="\\")s+=n.substring(o,a++),o=a;else if(c===r)u(),r=null,i=-1;else{if(r)continue;o===i&&c==='"'||o===i&&c==="'"?(o=a+1,r=c):c==="."&&!i?a>o?u():o=a+1:c==="["?(a>o&&u(),i=o=a+1):c==="]"&&(i||Ct("Access path missing open bracket: "+n),i>0&&u(),i=0,o=a+1)}return i&&Ct("Access path missing closing bracket: "+n),r&&Ct("Access path missing closing quote: "+n),a>o&&(a++,u()),e}function Ba(n,e,t){const r=zx(n);return n=r.length===1?r[0]:n,ee((t&&t.get||Ru)(r),[n],e||n)}Ba("id");const ka=ee(n=>n,[],"identity");ee(()=>0,[],"zero"),ee(()=>1,[],"one"),ee(()=>!0,[],"true"),ee(()=>!1,[],"false"),[...Object.getOwnPropertyNames(Object.prototype).filter(n=>typeof Object.prototype[n]=="function")];var Ue=Array.isArray;function Ge(n){return n===Object(n)}function en(n){return n[n.length-1]}function Fa(n){return n==null||n===""?null:+n}const Id=n=>e=>n*Math.exp(e),Td=n=>e=>Math.log(n*e),Ux=n=>e=>Math.sign(e)*Math.log1p(Math.abs(e/n)),Gx=n=>e=>Math.sign(e)*Math.expm1(Math.abs(e))*n,Pa=n=>e=>e<0?-Math.pow(-e,n):Math.pow(e,n);function Ou(n,e,t,r){const i=t(n[0]),s=t(en(n)),o=(s-i)*e;return[r(i-o),r(s-o)]}function Hx(n,e){return Ou(n,e,Fa,ka)}function Vx(n,e){var t=Math.sign(n[0]);return Ou(n,e,Td(t),Id(t))}function _x(n,e,t){return Ou(n,e,Pa(t),Pa(1/t))}function Ma(n,e,t,r,i){const s=r(n[0]),o=r(en(n)),a=e!=null?r(e):(s+o)/2;return[i(a+(s-a)*t),i(a+(o-a)*t)]}function Bd(n,e,t){return Ma(n,e,t,Fa,ka)}function kd(n,e,t){const r=Math.sign(n[0]);return Ma(n,e,t,Td(r),Id(r))}function Nu(n,e,t,r){return Ma(n,e,t,Pa(r),Pa(1/r))}function jx(n,e,t,r){return Ma(n,e,t,Ux(r),Gx(r))}function Fd(n){return n!=null?Ue(n)?n:[n]:[]}function Qx(n,e,t){let r=n[0],i=n[1],s;return i<r&&(s=i,i=r,r=s),s=i-r,s>=t-e?[e,t]:[r=Math.min(Math.max(r,e),t-s),r+s]}function Nt(n){return typeof n=="function"}const Wx="descending";function Pd(n,e,t){t=t||{},e=Fd(e)||[];const r=[],i=[],s={},o=t.comparator||qx;return Fd(n).forEach((a,c)=>{a!=null&&(r.push(e[c]===Wx?-1:1),i.push(a=Nt(a)?a:Ba(a,null,t)),(ri(a)||[]).forEach(u=>s[u]=1))}),i.length===0?null:ee(o(i,r),Object.keys(s))}const Md=(n,e)=>(n<e||n==null)&&e!=null?-1:(n>e||e==null)&&n!=null?1:(e=e instanceof Date?+e:e,(n=n instanceof Date?+n:n)!==n&&e===e?-1:e!==e&&n===n?1:0),qx=(n,e)=>n.length===1?Yx(n[0],e[0]):Xx(n,e,n.length),Yx=(n,e)=>function(t,r){return Md(n(t),n(r))*e},Xx=(n,e,t)=>(e.push(0),function(r,i){let s,o=0,a=-1;for(;o===0&&++a<t;)s=n[a],o=Md(s(r),s(i));return o*e[a]});function Zx(n){for(let e,t,r=1,i=arguments.length;r<i;++r){e=arguments[r];for(t in e)n[t]=e[t]}return n}function Rd(n,e){return Object.hasOwn(n,e)}function Is(n){return typeof n=="boolean"}function Kx(n){return Object.prototype.toString.call(n)==="[object Date]"}function Jx(n){return n&&Nt(n[Symbol.iterator])}function Ze(n){return typeof n=="number"}function $x(n){return Object.prototype.toString.call(n)==="[object RegExp]"}function me(n){return typeof n=="string"}function Od(n,e){const t=n[0],r=en(n),i=+e;return i?i===1?r:t+i*(r-t):t}function Ts(n){return n&&en(n)-n[0]||0}function Lu(n){return Ue(n)?`[${n.map(e=>e===null?"null":Lu(e))}]`:Ge(n)||me(n)?JSON.stringify(n).replaceAll("\u2028","\\u2028").replaceAll("\u2029","\\u2029"):n}function eA(n){return n==null||n===""?null:!n||n==="false"||n==="0"?!1:!!n}const tA=n=>Ze(n)||Kx(n)?n:Date.parse(n);function nA(n,e){return e=e||tA,n==null||n===""?null:e(n)}function rA(n){return n==null||n===""?null:n+""}function iA(n){const e={},t=n.length;for(let r=0;r<t;++r)e[n[r]]=!0;return e}/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const Ra=globalThis,zu=Ra.ShadowRoot&&(Ra.ShadyCSS===void 0||Ra.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Nd=Symbol(),Ld=new WeakMap;let sA=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Nd)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(zu&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Ld.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Ld.set(t,e))}return e}toString(){return this.cssText}};const oA=n=>new sA(typeof n=="string"?n:n+"",void 0,Nd),aA=(n,e)=>{if(zu)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const r=document.createElement("style"),i=Ra.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=t.cssText,n.appendChild(r)}},zd=zu?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return oA(t)})(n):n;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:cA,defineProperty:uA,getOwnPropertyDescriptor:lA,getOwnPropertyNames:fA,getOwnPropertySymbols:hA,getPrototypeOf:dA}=Object,En=globalThis,Ud=En.trustedTypes,pA=Ud?Ud.emptyScript:"",Uu=En.reactiveElementPolyfillSupport,Bs=(n,e)=>n,Gu={toAttribute(n,e){switch(e){case Boolean:n=n?pA:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Gd=(n,e)=>!cA(n,e),Hd={attribute:!0,type:String,converter:Gu,reflect:!1,useDefault:!1,hasChanged:Gd};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),En.litPropertyMetadata??(En.litPropertyMetadata=new WeakMap);let ii=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Hd){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,t);i!==void 0&&uA(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){const{get:i,set:s}=lA(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:i,set(o){const a=i==null?void 0:i.call(this);s==null||s.call(this,o),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Hd}static _$Ei(){if(this.hasOwnProperty(Bs("elementProperties")))return;const e=dA(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Bs("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Bs("properties"))){const t=this.properties,r=[...fA(t),...hA(t)];for(const i of r)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[r,i]of t)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const i=this._$Eu(t,r);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)t.unshift(zd(i))}else e!==void 0&&t.push(zd(e));return t}static _$Eu(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(t=>t(this))}addController(e){var t;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((t=e.hostConnected)==null||t.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return aA(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(t=>{var r;return(r=t.hostConnected)==null?void 0:r.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(t=>{var r;return(r=t.hostDisconnected)==null?void 0:r.call(t)})}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){var s;const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const o=(((s=r.converter)==null?void 0:s.toAttribute)!==void 0?r.converter:Gu).toAttribute(t,r.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){var s,o;const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const a=r.getPropertyOptions(i),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((s=a.converter)==null?void 0:s.fromAttribute)!==void 0?a.converter:Gu;this._$Em=i,this[i]=c.fromAttribute(t,a.type)??((o=this._$Ej)==null?void 0:o.get(i))??null,this._$Em=null}}requestUpdate(e,t,r){var i;if(e!==void 0){const s=this.constructor,o=this[e];if(r??(r=s.getPropertyOptions(e)),!((r.hasChanged??Gd)(o,t)||r.useDefault&&r.reflect&&o===((i=this._$Ej)==null?void 0:i.get(e))&&!this.hasAttribute(s._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:i,wrapped:s},o){r&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,o??t??this[e]),s!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,o]of i){const{wrapped:a}=o,c=this[s];a!==!0||this._$AL.has(s)||c===void 0||this.C(s,void 0,o,c)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(r=this._$EO)==null||r.forEach(i=>{var s;return(s=i.hostUpdate)==null?void 0:s.call(i)}),this.update(t)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};ii.elementStyles=[],ii.shadowRootOptions={mode:"open"},ii[Bs("elementProperties")]=new Map,ii[Bs("finalized")]=new Map,Uu==null||Uu({ReactiveElement:ii}),(En.reactiveElementVersions??(En.reactiveElementVersions=[])).push("2.1.0");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const ks=globalThis,Oa=ks.trustedTypes,Vd=Oa?Oa.createPolicy("lit-html",{createHTML:n=>n}):void 0,_d="$lit$",Cn=`lit$${Math.random().toFixed(9).slice(2)}$`,jd="?"+Cn,mA=`<${jd}>`,ar=document,Fs=()=>ar.createComment(""),Ps=n=>n===null||typeof n!="object"&&typeof n!="function",Hu=Array.isArray,gA=n=>Hu(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",Vu=`[
|
|
14
|
+
\f\r]`,Ms=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qd=/-->/g,Wd=/>/g,cr=RegExp(`>|${Vu}(?:([^\\s"'>=/]+)(${Vu}*=${Vu}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),qd=/'/g,Yd=/"/g,Xd=/^(?:script|style|textarea|title)$/i,yA=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),ye=yA(1),ur=Symbol.for("lit-noChange"),Ee=Symbol.for("lit-nothing"),Zd=new WeakMap,lr=ar.createTreeWalker(ar,129);function Kd(n,e){if(!Hu(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Vd!==void 0?Vd.createHTML(e):e}const bA=(n,e)=>{const t=n.length-1,r=[];let i,s=e===2?"<svg>":e===3?"<math>":"",o=Ms;for(let a=0;a<t;a++){const c=n[a];let u,l,f=-1,d=0;for(;d<c.length&&(o.lastIndex=d,l=o.exec(c),l!==null);)d=o.lastIndex,o===Ms?l[1]==="!--"?o=Qd:l[1]!==void 0?o=Wd:l[2]!==void 0?(Xd.test(l[2])&&(i=RegExp("</"+l[2],"g")),o=cr):l[3]!==void 0&&(o=cr):o===cr?l[0]===">"?(o=i??Ms,f=-1):l[1]===void 0?f=-2:(f=o.lastIndex-l[2].length,u=l[1],o=l[3]===void 0?cr:l[3]==='"'?Yd:qd):o===Yd||o===qd?o=cr:o===Qd||o===Wd?o=Ms:(o=cr,i=void 0);const h=o===cr&&n[a+1].startsWith("/>")?" ":"";s+=o===Ms?c+mA:f>=0?(r.push(u),c.slice(0,f)+_d+c.slice(f)+Cn+h):c+Cn+(f===-2?a:h)}return[Kd(n,s+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class Rs{constructor({strings:e,_$litType$:t},r){let i;this.parts=[];let s=0,o=0;const a=e.length-1,c=this.parts,[u,l]=bA(e,t);if(this.el=Rs.createElement(u,r),lr.currentNode=this.el.content,t===2||t===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=lr.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const f of i.getAttributeNames())if(f.endsWith(_d)){const d=l[o++],h=i.getAttribute(f).split(Cn),p=/([.?@])?(.*)/.exec(d);c.push({type:1,index:s,name:p[2],strings:h,ctor:p[1]==="."?AA:p[1]==="?"?wA:p[1]==="@"?vA:Na}),i.removeAttribute(f)}else f.startsWith(Cn)&&(c.push({type:6,index:s}),i.removeAttribute(f));if(Xd.test(i.tagName)){const f=i.textContent.split(Cn),d=f.length-1;if(d>0){i.textContent=Oa?Oa.emptyScript:"";for(let h=0;h<d;h++)i.append(f[h],Fs()),lr.nextNode(),c.push({type:2,index:++s});i.append(f[d],Fs())}}}else if(i.nodeType===8)if(i.data===jd)c.push({type:2,index:s});else{let f=-1;for(;(f=i.data.indexOf(Cn,f+1))!==-1;)c.push({type:7,index:s}),f+=Cn.length-1}s++}}static createElement(e,t){const r=ar.createElement("template");return r.innerHTML=e,r}}function si(n,e,t=n,r){var o,a;if(e===ur)return e;let i=r!==void 0?(o=t._$Co)==null?void 0:o[r]:t._$Cl;const s=Ps(e)?void 0:e._$litDirective$;return(i==null?void 0:i.constructor)!==s&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),s===void 0?i=void 0:(i=new s(n),i._$AT(n,t,r)),r!==void 0?(t._$Co??(t._$Co=[]))[r]=i:t._$Cl=i),i!==void 0&&(e=si(n,i._$AS(n,e.values),i,r)),e}class xA{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,i=((e==null?void 0:e.creationScope)??ar).importNode(t,!0);lr.currentNode=i;let s=lr.nextNode(),o=0,a=0,c=r[0];for(;c!==void 0;){if(o===c.index){let u;c.type===2?u=new Os(s,s.nextSibling,this,e):c.type===1?u=new c.ctor(s,c.name,c.strings,this,e):c.type===6&&(u=new SA(s,this,e)),this._$AV.push(u),c=r[++a]}o!==(c==null?void 0:c.index)&&(s=lr.nextNode(),o++)}return lr.currentNode=ar,i}p(e){let t=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class Os{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,t,r,i){this.type=2,this._$AH=Ee,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=si(this,e,t),Ps(e)?e===Ee||e==null||e===""?(this._$AH!==Ee&&this._$AR(),this._$AH=Ee):e!==this._$AH&&e!==ur&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):gA(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Ee&&Ps(this._$AH)?this._$AA.nextSibling.data=e:this.T(ar.createTextNode(e)),this._$AH=e}$(e){var s;const{values:t,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Rs.createElement(Kd(r.h,r.h[0]),this.options)),r);if(((s=this._$AH)==null?void 0:s._$AD)===i)this._$AH.p(t);else{const o=new xA(i,this),a=o.u(this.options);o.p(t),this.T(a),this._$AH=o}}_$AC(e){let t=Zd.get(e.strings);return t===void 0&&Zd.set(e.strings,t=new Rs(e)),t}k(e){Hu(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,i=0;for(const s of e)i===t.length?t.push(r=new Os(this.O(Fs()),this.O(Fs()),this,this.options)):r=t[i],r._$AI(s),i++;i<t.length&&(this._$AR(r&&r._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,t);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}}class Na{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,i,s){this.type=1,this._$AH=Ee,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Ee}_$AI(e,t=this,r,i){const s=this.strings;let o=!1;if(s===void 0)e=si(this,e,t,0),o=!Ps(e)||e!==this._$AH&&e!==ur,o&&(this._$AH=e);else{const a=e;let c,u;for(e=s[0],c=0;c<s.length-1;c++)u=si(this,a[r+c],t,c),u===ur&&(u=this._$AH[c]),o||(o=!Ps(u)||u!==this._$AH[c]),u===Ee?e=Ee:e!==Ee&&(e+=(u??"")+s[c+1]),this._$AH[c]=u}o&&!i&&this.j(e)}j(e){e===Ee?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class AA extends Na{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Ee?void 0:e}}class wA extends Na{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Ee)}}class vA extends Na{constructor(e,t,r,i,s){super(e,t,r,i,s),this.type=5}_$AI(e,t=this){if((e=si(this,e,t,0)??Ee)===ur)return;const r=this._$AH,i=e===Ee&&r!==Ee||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,s=e!==Ee&&(r===Ee||i);i&&this.element.removeEventListener(this.name,this,r),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t;typeof this._$AH=="function"?this._$AH.call(((t=this.options)==null?void 0:t.host)??this.element,e):this._$AH.handleEvent(e)}}let SA=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){si(this,e)}};const _u=ks.litHtmlPolyfillSupport;_u==null||_u(Rs,Os),(ks.litHtmlVersions??(ks.litHtmlVersions=[])).push("3.3.0");const Ns=(n,e,t)=>{const r=(t==null?void 0:t.renderBefore)??e;let i=r._$litPart$;if(i===void 0){const s=(t==null?void 0:t.renderBefore)??null;r._$litPart$=i=new Os(e.insertBefore(Fs(),s),s,void 0,t??{})}return i._$AI(n),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const
|
|
20
|
-
\r]`),n
|
|
21
|
-
`)}function a(f,d){return d==null&&(d=
|
|
22
|
-
`)}function c(f){return f.map(
|
|
23
|
-
`)}function l(f){return f.map(u).join(t)}function u(f){return f==null?"":f instanceof Date?YA(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:o,format:s,formatBody:a,formatRows:c,formatRow:l,formatValue:u}}var QA=Bp(" "),ZA=QA.parseRows;function XA(t){return t}function KA(t){if(t==null)return XA;var e,n,r=t.scale[0],o=t.scale[1],i=t.translate[0],s=t.translate[1];return function(a,c){c||(e=n=0);var l=2,u=a.length,f=new Array(u);for(f[0]=(e+=a[0])*r+i,f[1]=(n+=a[1])*o+s;l<u;)f[l]=a[l],++l;return f}}function JA(t,e){for(var n,r=t.length,o=r-e;o<--r;)n=t[o],t[o++]=t[r],t[r]=n}function $A(t,e){return typeof e=="string"&&(e=t.objects[e]),e.type==="GeometryCollection"?{type:"FeatureCollection",features:e.geometries.map(function(n){return kp(t,n)})}:kp(t,e)}function kp(t,e){var n=e.id,r=e.bbox,o=e.properties==null?{}:e.properties,i=_p(t,e);return n==null&&r==null?{type:"Feature",properties:o,geometry:i}:r==null?{type:"Feature",id:n,properties:o,geometry:i}:{type:"Feature",id:n,bbox:r,properties:o,geometry:i}}function _p(t,e){var n=KA(t.transform),r=t.arcs;function o(u,f){f.length&&f.pop();for(var d=r[u<0?~u:u],h=0,p=d.length;h<p;++h)f.push(n(d[h],h));u<0&&JA(f,p)}function i(u){return n(u)}function s(u){for(var f=[],d=0,h=u.length;d<h;++d)o(u[d],f);return f.length<2&&f.push(f[0]),f}function a(u){for(var f=s(u);f.length<4;)f.push(f[0]);return f}function c(u){return u.map(a)}function l(u){var f=u.type,d;switch(f){case"GeometryCollection":return{type:f,geometries:u.geometries.map(l)};case"Point":d=i(u.coordinates);break;case"MultiPoint":d=u.coordinates.map(i);break;case"LineString":d=s(u.arcs);break;case"MultiLineString":d=u.arcs.map(s);break;case"Polygon":d=c(u.arcs);break;case"MultiPolygon":d=u.arcs.map(c);break;default:return null}return{type:f,coordinates:d}}return l(e)}function e3(t,e){var n={},r={},o={},i=[],s=-1;e.forEach(function(l,u){var f=t.arcs[l<0?~l:l],d;f.length<3&&!f[1][0]&&!f[1][1]&&(d=e[++s],e[s]=l,e[u]=d)}),e.forEach(function(l){var u=a(l),f=u[0],d=u[1],h,p;if(h=o[f])if(delete o[h.end],h.push(l),h.end=d,p=r[d]){delete r[p.start];var y=p===h?h:h.concat(p);r[y.start=h.start]=o[y.end=p.end]=y}else r[h.start]=o[h.end]=h;else if(h=r[d])if(delete r[h.start],h.unshift(l),h.start=f,p=o[f]){delete o[p.end];var v=p===h?h:p.concat(h);r[v.start=p.start]=o[v.end=h.end]=v}else r[h.start]=o[h.end]=h;else h=[l],r[h.start=f]=o[h.end=d]=h});function a(l){var u=t.arcs[l<0?~l:l],f=u[0],d;return t.transform?(d=[0,0],u.forEach(function(h){d[0]+=h[0],d[1]+=h[1]})):d=u[u.length-1],l<0?[d,f]:[f,d]}function c(l,u){for(var f in l){var d=l[f];delete u[d.start],delete d.start,delete d.end,d.forEach(function(h){n[h<0?~h:h]=1}),i.push(d)}}return c(o,r),c(r,o),e.forEach(function(l){n[l<0?~l:l]||i.push([l])}),i}function t3(t){return _p(t,n3.apply(this,arguments))}function n3(t,e,n){var r,o,i;if(arguments.length>1)r=r3(t,e,n);else for(o=0,r=new Array(i=t.arcs.length);o<i;++o)r[o]=o;return{type:"MultiLineString",arcs:e3(t,r)}}function r3(t,e,n){var r=[],o=[],i;function s(f){var d=f<0?~f:f;(o[d]||(o[d]=[])).push({i:f,g:i})}function a(f){f.forEach(s)}function c(f){f.forEach(a)}function l(f){f.forEach(c)}function u(f){switch(i=f,f.type){case"GeometryCollection":f.geometries.forEach(u);break;case"LineString":a(f.arcs);break;case"MultiLineString":case"Polygon":c(f.arcs);break;case"MultiPolygon":l(f.arcs);break}}return u(e),o.forEach(n==null?function(f){r.push(f[0].i)}:function(f){n(f[0].g,f[f.length-1].g)&&r.push(f[0].i)}),r}function ti(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function i3(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ni(t){let e,n,r;t.length!==2?(e=ti,n=(a,c)=>ti(t(a),c),r=(a,c)=>t(a)-c):(e=t===ti||t===i3?t:o3,n=t,r=t);function o(a,c,l=0,u=a.length){if(l<u){if(e(c,c)!==0)return u;do{const f=l+u>>>1;n(a[f],c)<0?l=f+1:u=f}while(l<u)}return l}function i(a,c,l=0,u=a.length){if(l<u){if(e(c,c)!==0)return u;do{const f=l+u>>>1;n(a[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function s(a,c,l=0,u=a.length){const f=o(a,c,l,u-1);return f>l&&r(a[f-1],c)>-r(a[f],c)?f-1:f}return{left:o,center:s,right:i}}function o3(){return 0}function Rp(t){return t===null?NaN:+t}function*s3(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const Fp=ni(ti),mr=Fp.right;Fp.left,ni(Rp).center;function a3(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&++n}return n}function c3(t,e){let n=0,r,o=0,i=0;if(e===void 0)for(let s of t)s!=null&&(s=+s)>=s&&(r=s-o,o+=r/++n,i+=r*(s-o));else{let s=-1;for(let a of t)(a=e(a,++s,t))!=null&&(a=+a)>=a&&(r=a-o,o+=r/++n,i+=r*(a-o))}if(n>1)return i/(n-1)}function l3(t,e){let n,r;for(const o of t)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)));return[n,r]}class Yn extends Map{constructor(e,n=h3){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,o]of e)this.set(r,o)}get(e){return super.get(Mp(this,e))}has(e){return super.has(Mp(this,e))}set(e,n){return super.set(u3(this,e),n)}delete(e){return super.delete(f3(this,e))}}function Mp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function u3({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function f3({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function h3(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Wu(t){return t}function Cc(t,...e){return Pp(t,Wu,Wu,e)}function d3(t,...e){return Pp(t,Array.from,Wu,e)}function Pp(t,e,n,r){return function o(i,s){if(s>=r.length)return n(i);const a=new Yn,c=r[s++];let l=-1;for(const u of i){const f=c(u,++l,i),d=a.get(f);d?d.push(u):a.set(f,[u])}for(const[u,f]of a)a.set(u,o(f,s));return e(a)}(t,0)}function p3(t=ti){if(t===ti)return Lp;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Lp(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const g3=Math.sqrt(50),m3=Math.sqrt(10),y3=Math.sqrt(2);function Ic(t,e,n){const r=(e-t)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),s=i>=g3?10:i>=m3?5:i>=y3?2:1;let a,c,l;return o<0?(l=Math.pow(10,-o)/s,a=Math.round(t*l),c=Math.round(e*l),a/l<t&&++a,c/l>e&&--c,l=-l):(l=Math.pow(10,o)*s,a=Math.round(t/l),c=Math.round(e/l),a*l<t&&++a,c*l>e&&--c),c<a&&.5<=n&&n<2?Ic(t,e,n*2):[a,c,l]}function Tc(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[o,i,s]=r?Ic(e,t,n):Ic(t,e,n);if(!(i>=o))return[];const a=i-o+1,c=new Array(a);if(r)if(s<0)for(let l=0;l<a;++l)c[l]=(i-l)/-s;else for(let l=0;l<a;++l)c[l]=(i-l)*s;else if(s<0)for(let l=0;l<a;++l)c[l]=(o+l)/-s;else for(let l=0;l<a;++l)c[l]=(o+l)*s;return c}function Yu(t,e,n){return e=+e,t=+t,n=+n,Ic(t,e,n)[2]}function ri(t,e,n){e=+e,t=+t,n=+n;const r=e<t,o=r?Yu(e,t,n):Yu(t,e,n);return(r?-1:1)*(o<0?1/-o:o)}function Qu(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o)}return n}function Zu(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o)}return n}function Op(t,e,n=0,r=1/0,o){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(o=o===void 0?Lp:p3(o);r>n;){if(r-n>600){const c=r-n+1,l=e-n+1,u=Math.log(c),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(c-f)/c)*(l-c/2<0?-1:1),h=Math.max(n,Math.floor(e-l*f/c+d)),p=Math.min(r,Math.floor(e+(c-l)*f/c+d));Op(t,e,h,p,o)}const i=t[e];let s=n,a=r;for(Cs(t,n,e),o(t[r],i)>0&&Cs(t,n,r);s<a;){for(Cs(t,s,a),++s,--a;o(t[s],i)<0;)++s;for(;o(t[a],i)>0;)--a}o(t[n],i)===0?Cs(t,n,a):(++a,Cs(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function Cs(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b3(t,e,n){if(t=Float64Array.from(s3(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Zu(t);if(e>=1)return Qu(t);var r,o=(r-1)*e,i=Math.floor(o),s=Qu(Op(t,i).subarray(0,i+1)),a=Zu(t.subarray(i+1));return s+(a-s)*(o-i)}}function Np(t,e,n=Rp){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,o=(r-1)*e,i=Math.floor(o),s=+n(t[i],i,t),a=+n(t[i+1],i+1,t);return s+(a-s)*(o-i)}}function w3(t,e){let n=0,r=0;if(e===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(++n,r+=o);else{let o=-1;for(let i of t)(i=e(i,++o,t))!=null&&(i=+i)>=i&&(++n,r+=i)}if(n)return r/n}function x3(t,e){return b3(t,.5,e)}function Is(t,e,n){t=+t,e=+e,n=(o=arguments.length)<2?(e=t,t=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((e-t)/n))|0,i=new Array(o);++r<o;)i[r]=t+r*n;return i}function Ts(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let o of t)(o=+e(o,++r,t))&&(n+=o)}return n}function v3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Dc(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Yi(t){return t=Dc(Math.abs(t)),t?t[1]:NaN}function A3(t,e){return function(n,r){for(var o=n.length,i=[],s=0,a=t[0],c=0;o>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),i.push(n.substring(o-=a,o+a)),!((c+=a+1)>r));)a=t[s=(s+1)%t.length];return i.reverse().join(e)}}function E3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var S3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qi(t){if(!(e=S3.exec(t)))throw new Error("invalid format: "+t);var e;return new Xu({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Qi.prototype=Xu.prototype;function Xu(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Xu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function C3(t){e:for(var e=t.length,n=1,r=-1,o;n<e;++n)switch(t[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+t[n])break e;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(o+1):t}var zp;function I3(t,e){var n=Dc(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(zp=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Dc(t,Math.max(0,e+i-1))[0]}function Up(t,e){var n=Dc(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const Gp={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:v3,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Up(t*100,e),r:Up,s:I3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Hp(t){return t}var Vp=Array.prototype.map,jp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function T3(t){var e=t.grouping===void 0||t.thousands===void 0?Hp:A3(Vp.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",o=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?Hp:E3(Vp.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function l(f){f=Qi(f);var d=f.fill,h=f.align,p=f.sign,y=f.symbol,v=f.zero,b=f.width,A=f.comma,S=f.precision,E=f.trim,I=f.type;I==="n"?(A=!0,I="g"):Gp[I]||(S===void 0&&(S=12),E=!0,I="g"),(v||d==="0"&&h==="=")&&(v=!0,d="0",h="=");var _=y==="$"?n:y==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",B=y==="$"?r:/[%p]/.test(I)?s:"",N=Gp[I],F=/[defgprs%]/.test(I);S=S===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function M(C){var Y=_,Q=B,oe,se,ae;if(I==="c")Q=N(C)+Q,C="";else{C=+C;var ce=C<0||1/C<0;if(C=isNaN(C)?c:N(Math.abs(C),S),E&&(C=C3(C)),ce&&+C==0&&p!=="+"&&(ce=!1),Y=(ce?p==="("?p:a:p==="-"||p==="("?"":p)+Y,Q=(I==="s"?jp[8+zp/3]:"")+Q+(ce&&p==="("?")":""),F){for(oe=-1,se=C.length;++oe<se;)if(ae=C.charCodeAt(oe),48>ae||ae>57){Q=(ae===46?o+C.slice(oe+1):C.slice(oe))+Q,C=C.slice(0,oe);break}}}A&&!v&&(C=e(C,1/0));var ye=Y.length+C.length+Q.length,de=ye<b?new Array(b-ye+1).join(d):"";switch(A&&v&&(C=e(de+C,de.length?b-Q.length:1/0),de=""),h){case"<":C=Y+C+Q+de;break;case"=":C=Y+de+C+Q;break;case"^":C=de.slice(0,ye=de.length>>1)+Y+C+Q+de.slice(ye);break;default:C=de+Y+C+Q;break}return i(C)}return M.toString=function(){return f+""},M}function u(f,d){var h=l((f=Qi(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Yi(d)/3)))*3,y=Math.pow(10,-p),v=jp[8+p/3];return function(b){return h(y*b)+v}}return{format:l,formatPrefix:u}}var Bc,Dt,qp;D3({thousands:",",grouping:[3],currency:["$",""]});function D3(t){return Bc=T3(t),Dt=Bc.format,qp=Bc.formatPrefix,Bc}function B3(t){return Math.max(0,-Yi(Math.abs(t)))}function k3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yi(e)/3)))*3-Yi(Math.abs(t)))}function _3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Yi(e)-Yi(t))+1}const Ku=new Date,Ju=new Date;function mt(t,e,n,r){function o(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(t(i=new Date(+i)),i),o.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),o.round=i=>{const s=o(i),a=o.ceil(i);return i-s<a-i?s:a},o.offset=(i,s)=>(e(i=new Date(+i),s==null?1:Math.floor(s)),i),o.range=(i,s,a)=>{const c=[];if(i=o.ceil(i),a=a==null?1:Math.floor(a),!(i<s)||!(a>0))return c;let l;do c.push(l=new Date(+i)),e(i,a),t(i);while(l<i&&i<s);return c},o.filter=i=>mt(s=>{if(s>=s)for(;t(s),!i(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!i(s););else for(;--a>=0;)for(;e(s,1),!i(s););}),n&&(o.count=(i,s)=>(Ku.setTime(+i),Ju.setTime(+s),t(Ku),t(Ju),Math.floor(n(Ku,Ju))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?s=>r(s)%i===0:s=>o.count(0,s)%i===0):o)),o}const Zi=mt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Zi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?mt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Zi),Zi.range;const Qn=1e3,on=Qn*60,Zn=on*60,Xn=Zn*24,$u=Xn*7,Wp=Xn*30,ef=Xn*365,Kn=mt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Qn)},(t,e)=>(e-t)/Qn,t=>t.getUTCSeconds());Kn.range;const kc=mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qn)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getMinutes());kc.range;const _c=mt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getUTCMinutes());_c.range;const Rc=mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qn-t.getMinutes()*on)},(t,e)=>{t.setTime(+t+e*Zn)},(t,e)=>(e-t)/Zn,t=>t.getHours());Rc.range;const Fc=mt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Zn)},(t,e)=>(e-t)/Zn,t=>t.getUTCHours());Fc.range;const yr=mt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*on)/Xn,t=>t.getDate()-1);yr.range;const ii=mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Xn,t=>t.getUTCDate()-1);ii.range;const Yp=mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Xn,t=>Math.floor(t/Xn));Yp.range;function oi(t){return mt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*on)/$u)}const Ds=oi(0),Mc=oi(1),R3=oi(2),F3=oi(3),Xi=oi(4),M3=oi(5),P3=oi(6);Ds.range,Mc.range,R3.range,F3.range,Xi.range,M3.range,P3.range;function si(t){return mt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/$u)}const Bs=si(0),Pc=si(1),L3=si(2),O3=si(3),Ki=si(4),N3=si(5),z3=si(6);Bs.range,Pc.range,L3.range,O3.range,Ki.range,N3.range,z3.range;const Ji=mt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Ji.range;const $i=mt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());$i.range;const Fn=mt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Fn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:mt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}),Fn.range;const Mn=mt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Mn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:mt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}),Mn.range;function Qp(t,e,n,r,o,i){const s=[[Kn,1,Qn],[Kn,5,5*Qn],[Kn,15,15*Qn],[Kn,30,30*Qn],[i,1,on],[i,5,5*on],[i,15,15*on],[i,30,30*on],[o,1,Zn],[o,3,3*Zn],[o,6,6*Zn],[o,12,12*Zn],[r,1,Xn],[r,2,2*Xn],[n,1,$u],[e,1,Wp],[e,3,3*Wp],[t,1,ef]];function a(l,u,f){const d=u<l;d&&([l,u]=[u,l]);const h=f&&typeof f.range=="function"?f:c(l,u,f),p=h?h.range(l,+u+1):[];return d?p.reverse():p}function c(l,u,f){const d=Math.abs(u-l)/f,h=ni(([,,v])=>v).right(s,d);if(h===s.length)return t.every(ri(l/ef,u/ef,f));if(h===0)return Zi.every(Math.max(ri(l,u,f),1));const[p,y]=s[d/s[h-1][2]<s[h][2]/d?h-1:h];return p.every(y)}return[a,c]}const[U3,G3]=Qp(Mn,$i,Bs,Yp,Fc,_c),[H3,V3]=Qp(Fn,Ji,Ds,yr,Rc,kc),ks="year",_s="quarter",Rs="month",Fs="week",Ms="date",Lc="day",tf="dayofyear",Ps="hours",Ls="minutes",Os="seconds",Oc="milliseconds";[ks,_s,Rs,Fs,Ms,Lc,tf,Ps,Ls,Os,Oc].reduce((t,e,n)=>(t[e]=1+n,t),{});const j3={[ks]:Fn,[_s]:Ji.every(3),[Rs]:Ji,[Fs]:Ds,[Ms]:yr,[Lc]:yr,[tf]:yr,[Ps]:Rc,[Ls]:kc,[Os]:Kn,[Oc]:Zi},q3={[ks]:Mn,[_s]:$i.every(3),[Rs]:$i,[Fs]:Bs,[Ms]:ii,[Lc]:ii,[tf]:ii,[Ps]:Fc,[Ls]:_c,[Os]:Kn,[Oc]:Zi};function W3(t){return j3[t]}function Y3(t){return q3[t]}function nf(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function rf(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ns(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Zp(t){var e=t.dateTime,n=t.date,r=t.time,o=t.periods,i=t.days,s=t.shortDays,a=t.months,c=t.shortMonths,l=zs(o),u=Us(o),f=zs(i),d=Us(i),h=zs(s),p=Us(s),y=zs(a),v=Us(a),b=zs(c),A=Us(c),S={a:ce,A:ye,b:de,B:Ce,c:null,d:tg,e:tg,f:mE,g:IE,G:DE,H:dE,I:pE,j:gE,L:ng,m:yE,M:bE,p:me,q:Ee,Q:cg,s:lg,S:wE,u:xE,U:vE,V:AE,w:EE,W:SE,x:null,X:null,y:CE,Y:TE,Z:BE,"%":ag},E={a:De,A:Ge,b:Ve,B:q,c:null,d:ig,e:ig,f:FE,g:VE,G:qE,H:kE,I:_E,j:RE,L:og,m:ME,M:PE,p:W,q:ee,Q:cg,s:lg,S:LE,u:OE,U:NE,V:zE,w:UE,W:GE,x:null,X:null,y:HE,Y:jE,Z:WE,"%":ag},I={a:M,A:C,b:Y,B:Q,c:oe,d:$p,e:$p,f:lE,g:Jp,G:Kp,H:eg,I:eg,j:oE,L:cE,m:iE,M:sE,p:F,q:rE,Q:fE,s:hE,S:aE,u:J3,U:$3,V:eE,w:K3,W:tE,x:se,X:ae,y:Jp,Y:Kp,Z:nE,"%":uE};S.x=_(n,S),S.X=_(r,S),S.c=_(e,S),E.x=_(n,E),E.X=_(r,E),E.c=_(e,E);function _(J,fe){return function(L){var D=[],te=-1,le=0,Be=J.length,ve,Se,Re;for(L instanceof Date||(L=new Date(+L));++te<Be;)J.charCodeAt(te)===37&&(D.push(J.slice(le,te)),(Se=Xp[ve=J.charAt(++te)])!=null?ve=J.charAt(++te):Se=ve==="e"?" ":"0",(Re=fe[ve])&&(ve=Re(L,Se)),D.push(ve),le=te+1);return D.push(J.slice(le,te)),D.join("")}}function B(J,fe){return function(L){var D=Ns(1900,void 0,1),te=N(D,J,L+="",0),le,Be;if(te!=L.length)return null;if("Q"in D)return new Date(D.Q);if("s"in D)return new Date(D.s*1e3+("L"in D?D.L:0));if(fe&&!("Z"in D)&&(D.Z=0),"p"in D&&(D.H=D.H%12+D.p*12),D.m===void 0&&(D.m="q"in D?D.q:0),"V"in D){if(D.V<1||D.V>53)return null;"w"in D||(D.w=1),"Z"in D?(le=rf(Ns(D.y,0,1)),Be=le.getUTCDay(),le=Be>4||Be===0?Pc.ceil(le):Pc(le),le=ii.offset(le,(D.V-1)*7),D.y=le.getUTCFullYear(),D.m=le.getUTCMonth(),D.d=le.getUTCDate()+(D.w+6)%7):(le=nf(Ns(D.y,0,1)),Be=le.getDay(),le=Be>4||Be===0?Mc.ceil(le):Mc(le),le=yr.offset(le,(D.V-1)*7),D.y=le.getFullYear(),D.m=le.getMonth(),D.d=le.getDate()+(D.w+6)%7)}else("W"in D||"U"in D)&&("w"in D||(D.w="u"in D?D.u%7:"W"in D?1:0),Be="Z"in D?rf(Ns(D.y,0,1)).getUTCDay():nf(Ns(D.y,0,1)).getDay(),D.m=0,D.d="W"in D?(D.w+6)%7+D.W*7-(Be+5)%7:D.w+D.U*7-(Be+6)%7);return"Z"in D?(D.H+=D.Z/100|0,D.M+=D.Z%100,rf(D)):nf(D)}}function N(J,fe,L,D){for(var te=0,le=fe.length,Be=L.length,ve,Se;te<le;){if(D>=Be)return-1;if(ve=fe.charCodeAt(te++),ve===37){if(ve=fe.charAt(te++),Se=I[ve in Xp?fe.charAt(te++):ve],!Se||(D=Se(J,L,D))<0)return-1}else if(ve!=L.charCodeAt(D++))return-1}return D}function F(J,fe,L){var D=l.exec(fe.slice(L));return D?(J.p=u.get(D[0].toLowerCase()),L+D[0].length):-1}function M(J,fe,L){var D=h.exec(fe.slice(L));return D?(J.w=p.get(D[0].toLowerCase()),L+D[0].length):-1}function C(J,fe,L){var D=f.exec(fe.slice(L));return D?(J.w=d.get(D[0].toLowerCase()),L+D[0].length):-1}function Y(J,fe,L){var D=b.exec(fe.slice(L));return D?(J.m=A.get(D[0].toLowerCase()),L+D[0].length):-1}function Q(J,fe,L){var D=y.exec(fe.slice(L));return D?(J.m=v.get(D[0].toLowerCase()),L+D[0].length):-1}function oe(J,fe,L){return N(J,e,fe,L)}function se(J,fe,L){return N(J,n,fe,L)}function ae(J,fe,L){return N(J,r,fe,L)}function ce(J){return s[J.getDay()]}function ye(J){return i[J.getDay()]}function de(J){return c[J.getMonth()]}function Ce(J){return a[J.getMonth()]}function me(J){return o[+(J.getHours()>=12)]}function Ee(J){return 1+~~(J.getMonth()/3)}function De(J){return s[J.getUTCDay()]}function Ge(J){return i[J.getUTCDay()]}function Ve(J){return c[J.getUTCMonth()]}function q(J){return a[J.getUTCMonth()]}function W(J){return o[+(J.getUTCHours()>=12)]}function ee(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var fe=_(J+="",S);return fe.toString=function(){return J},fe},parse:function(J){var fe=B(J+="",!1);return fe.toString=function(){return J},fe},utcFormat:function(J){var fe=_(J+="",E);return fe.toString=function(){return J},fe},utcParse:function(J){var fe=B(J+="",!0);return fe.toString=function(){return J},fe}}}var Xp={"-":"",_:" ",0:"0"},xt=/^\s*\d+/,Q3=/^%/,Z3=/[\\^$*+?|[\]().{}]/g;function qe(t,e,n){var r=t<0?"-":"",o=(r?-t:t)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(e)+o:o)}function X3(t){return t.replace(Z3,"\\$&")}function zs(t){return new RegExp("^(?:"+t.map(X3).join("|")+")","i")}function Us(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function K3(t,e,n){var r=xt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function J3(t,e,n){var r=xt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $3(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function eE(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function tE(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Kp(t,e,n){var r=xt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Jp(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function nE(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function rE(t,e,n){var r=xt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function iE(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function $p(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function oE(t,e,n){var r=xt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function eg(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function sE(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function aE(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function cE(t,e,n){var r=xt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function lE(t,e,n){var r=xt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function uE(t,e,n){var r=Q3.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function fE(t,e,n){var r=xt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function hE(t,e,n){var r=xt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function tg(t,e){return qe(t.getDate(),e,2)}function dE(t,e){return qe(t.getHours(),e,2)}function pE(t,e){return qe(t.getHours()%12||12,e,2)}function gE(t,e){return qe(1+yr.count(Fn(t),t),e,3)}function ng(t,e){return qe(t.getMilliseconds(),e,3)}function mE(t,e){return ng(t,e)+"000"}function yE(t,e){return qe(t.getMonth()+1,e,2)}function bE(t,e){return qe(t.getMinutes(),e,2)}function wE(t,e){return qe(t.getSeconds(),e,2)}function xE(t){var e=t.getDay();return e===0?7:e}function vE(t,e){return qe(Ds.count(Fn(t)-1,t),e,2)}function rg(t){var e=t.getDay();return e>=4||e===0?Xi(t):Xi.ceil(t)}function AE(t,e){return t=rg(t),qe(Xi.count(Fn(t),t)+(Fn(t).getDay()===4),e,2)}function EE(t){return t.getDay()}function SE(t,e){return qe(Mc.count(Fn(t)-1,t),e,2)}function CE(t,e){return qe(t.getFullYear()%100,e,2)}function IE(t,e){return t=rg(t),qe(t.getFullYear()%100,e,2)}function TE(t,e){return qe(t.getFullYear()%1e4,e,4)}function DE(t,e){var n=t.getDay();return t=n>=4||n===0?Xi(t):Xi.ceil(t),qe(t.getFullYear()%1e4,e,4)}function BE(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+qe(e/60|0,"0",2)+qe(e%60,"0",2)}function ig(t,e){return qe(t.getUTCDate(),e,2)}function kE(t,e){return qe(t.getUTCHours(),e,2)}function _E(t,e){return qe(t.getUTCHours()%12||12,e,2)}function RE(t,e){return qe(1+ii.count(Mn(t),t),e,3)}function og(t,e){return qe(t.getUTCMilliseconds(),e,3)}function FE(t,e){return og(t,e)+"000"}function ME(t,e){return qe(t.getUTCMonth()+1,e,2)}function PE(t,e){return qe(t.getUTCMinutes(),e,2)}function LE(t,e){return qe(t.getUTCSeconds(),e,2)}function OE(t){var e=t.getUTCDay();return e===0?7:e}function NE(t,e){return qe(Bs.count(Mn(t)-1,t),e,2)}function sg(t){var e=t.getUTCDay();return e>=4||e===0?Ki(t):Ki.ceil(t)}function zE(t,e){return t=sg(t),qe(Ki.count(Mn(t),t)+(Mn(t).getUTCDay()===4),e,2)}function UE(t){return t.getUTCDay()}function GE(t,e){return qe(Pc.count(Mn(t)-1,t),e,2)}function HE(t,e){return qe(t.getUTCFullYear()%100,e,2)}function VE(t,e){return t=sg(t),qe(t.getUTCFullYear()%100,e,2)}function jE(t,e){return qe(t.getUTCFullYear()%1e4,e,4)}function qE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ki(t):Ki.ceil(t),qe(t.getUTCFullYear()%1e4,e,4)}function WE(){return"+0000"}function ag(){return"%"}function cg(t){return+t}function lg(t){return Math.floor(+t/1e3)}var eo,of,ug,sf,fg;YE({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function YE(t){return eo=Zp(t),of=eo.format,ug=eo.parse,sf=eo.utcFormat,fg=eo.utcParse,eo}function Nc(t){const e={};return n=>e[n]||(e[n]=t(n))}function hg(t,e,n){n=n||{},Rt(n)||bn(`Invalid time multi-format specifier: ${n}`);const r=e(Os),o=e(Ls),i=e(Ps),s=e(Ms),a=e(Fs),c=e(Rs),l=e(_s),u=e(ks),f=t(n[Oc]||".%L"),d=t(n[Os]||":%S"),h=t(n[Ls]||"%I:%M"),p=t(n[Ps]||"%I %p"),y=t(n[Ms]||n[Lc]||"%a %d"),v=t(n[Fs]||"%b %d"),b=t(n[Rs]||"%B"),A=t(n[_s]||"%B"),S=t(n[ks]||"%Y");return E=>(r(E)<E?f:o(E)<E?d:i(E)<E?h:s(E)<E?p:c(E)<E?a(E)<E?y:v:u(E)<E?l(E)<E?b:A:S)(E)}function dg(t){const e=Nc(t.format),n=Nc(t.utcFormat);return{timeFormat:r=>rt(r)?e(r):hg(e,W3,r),utcFormat:r=>rt(r)?n(r):hg(n,Y3,r),timeParse:Nc(t.parse),utcParse:Nc(t.utcParse)}}let af;QE();function QE(){return af=dg({format:of,parse:ug,utcFormat:sf,utcParse:fg})}function ZE(t){return dg(Zp(t))}function XE(t){return arguments.length?af=ZE(t):af}const KE=t=>t!=null&&t===t,JE=t=>t==="true"||t==="false"||t===!0||t===!1,$E=t=>!Number.isNaN(Date.parse(t)),pg=t=>!Number.isNaN(+t)&&!(t instanceof Date),eS=t=>pg(t)&&Number.isInteger(+t),gg={boolean:vA,integer:bc,number:bc,date:EA,string:SA,unknown:yc},zc=[JE,eS,pg,$E],tS=["boolean","integer","number","date"];function nS(t,e){if(!t||!t.length)return"unknown";const n=t.length,r=zc.length,o=zc.map((i,s)=>s+1);for(let i=0,s=0,a,c;i<n;++i)for(c=e?t[i][e]:t[i],a=0;a<r;++a)if(o[a]&&KE(c)&&!zc[a](c)&&(o[a]=0,++s,s===zc.length))return"string";return tS[o.reduce((i,s)=>i===0?s:i,0)-1]}function rS(t,e){return e.reduce((n,r)=>(n[r]=nS(t,r),n),{})}function mg(t){const e=function(n,r){const o={delimiter:t};return cf(n,r?yA(r,o):o)};return e.responseType="text",e}function cf(t,e){return e.header&&(t=e.header.map(Pu).join(e.delimiter)+`
|
|
24
|
-
`+
|
|
19
|
+
*/const fr=globalThis;let La=class extends ii{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=e.firstChild),e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ns(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return ur}};La._$litElement$=!0,La.finalized=!0,(Qb=fr.litElementHydrateSupport)==null||Qb.call(fr,{LitElement:La});const ju=fr.litElementPolyfillSupport;ju==null||ju({LitElement:La}),(fr.litElementVersions??(fr.litElementVersions=[])).push("4.2.0");var Jd={},Qu={},Wu=34,Ls=10,qu=13;function $d(n){return new Function("d","return {"+n.map(function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'}).join(",")+"}")}function EA(n,e){var t=$d(n);return function(r,i){return e(t(r),i,n)}}function e0(n){var e=Object.create(null),t=[];return n.forEach(function(r){for(var i in r)i in e||t.push(e[i]=i)}),t}function rt(n,e){var t=n+"",r=t.length;return r<e?new Array(e-r+1).join(0)+t:t}function CA(n){return n<0?"-"+rt(-n,6):n>9999?"+"+rt(n,6):rt(n,4)}function DA(n){var e=n.getUTCHours(),t=n.getUTCMinutes(),r=n.getUTCSeconds(),i=n.getUTCMilliseconds();return isNaN(n)?"Invalid Date":CA(n.getUTCFullYear())+"-"+rt(n.getUTCMonth()+1,2)+"-"+rt(n.getUTCDate(),2)+(i?"T"+rt(e,2)+":"+rt(t,2)+":"+rt(r,2)+"."+rt(i,3)+"Z":r?"T"+rt(e,2)+":"+rt(t,2)+":"+rt(r,2)+"Z":t||e?"T"+rt(e,2)+":"+rt(t,2)+"Z":"")}function t0(n){var e=new RegExp('["'+n+`
|
|
20
|
+
\r]`),t=n.charCodeAt(0);function r(f,d){var h,p,m=i(f,function(g,y){if(h)return h(g,y-1);p=g,h=d?EA(g,d):$d(g)});return m.columns=p||[],m}function i(f,d){var h=[],p=f.length,m=0,g=0,y,x=p<=0,A=!1;f.charCodeAt(p-1)===Ls&&--p,f.charCodeAt(p-1)===qu&&--p;function w(){if(x)return Qu;if(A)return A=!1,Jd;var C,v=m,T;if(f.charCodeAt(v)===Wu){for(;m++<p&&f.charCodeAt(m)!==Wu||f.charCodeAt(++m)===Wu;);return(C=m)>=p?x=!0:(T=f.charCodeAt(m++))===Ls?A=!0:T===qu&&(A=!0,f.charCodeAt(m)===Ls&&++m),f.slice(v+1,C-1).replace(/""/g,'"')}for(;m<p;){if((T=f.charCodeAt(C=m++))===Ls)A=!0;else if(T===qu)A=!0,f.charCodeAt(m)===Ls&&++m;else if(T!==t)continue;return f.slice(v,C)}return x=!0,f.slice(v,p)}for(;(y=w())!==Qu;){for(var S=[];y!==Jd&&y!==Qu;)S.push(y),y=w();d&&(S=d(S,g++))==null||h.push(S)}return h}function s(f,d){return f.map(function(h){return d.map(function(p){return l(h[p])}).join(n)})}function o(f,d){return d==null&&(d=e0(f)),[d.map(l).join(n)].concat(s(f,d)).join(`
|
|
21
|
+
`)}function a(f,d){return d==null&&(d=e0(f)),s(f,d).join(`
|
|
22
|
+
`)}function c(f){return f.map(u).join(`
|
|
23
|
+
`)}function u(f){return f.map(l).join(n)}function l(f){return f==null?"":f instanceof Date?DA(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:a,formatRows:c,formatRow:u,formatValue:l}}var IA=t0(" "),TA=IA.parseRows;function BA(n){return n}function kA(n){if(n==null)return BA;var e,t,r=n.scale[0],i=n.scale[1],s=n.translate[0],o=n.translate[1];return function(a,c){c||(e=t=0);var u=2,l=a.length,f=new Array(l);for(f[0]=(e+=a[0])*r+s,f[1]=(t+=a[1])*i+o;u<l;)f[u]=a[u],++u;return f}}function FA(n,e){for(var t,r=n.length,i=r-e;i<--r;)t=n[i],n[i++]=n[r],n[r]=t}function PA(n,e){return typeof e=="string"&&(e=n.objects[e]),e.type==="GeometryCollection"?{type:"FeatureCollection",features:e.geometries.map(function(t){return n0(n,t)})}:n0(n,e)}function n0(n,e){var t=e.id,r=e.bbox,i=e.properties==null?{}:e.properties,s=r0(n,e);return t==null&&r==null?{type:"Feature",properties:i,geometry:s}:r==null?{type:"Feature",id:t,properties:i,geometry:s}:{type:"Feature",id:t,bbox:r,properties:i,geometry:s}}function r0(n,e){var t=kA(n.transform),r=n.arcs;function i(l,f){f.length&&f.pop();for(var d=r[l<0?~l:l],h=0,p=d.length;h<p;++h)f.push(t(d[h],h));l<0&&FA(f,p)}function s(l){return t(l)}function o(l){for(var f=[],d=0,h=l.length;d<h;++d)i(l[d],f);return f.length<2&&f.push(f[0]),f}function a(l){for(var f=o(l);f.length<4;)f.push(f[0]);return f}function c(l){return l.map(a)}function u(l){var f=l.type,d;switch(f){case"GeometryCollection":return{type:f,geometries:l.geometries.map(u)};case"Point":d=s(l.coordinates);break;case"MultiPoint":d=l.coordinates.map(s);break;case"LineString":d=o(l.arcs);break;case"MultiLineString":d=l.arcs.map(o);break;case"Polygon":d=c(l.arcs);break;case"MultiPolygon":d=l.arcs.map(c);break;default:return null}return{type:f,coordinates:d}}return u(e)}function MA(n,e){var t={},r={},i={},s=[],o=-1;e.forEach(function(u,l){var f=n.arcs[u<0?~u:u],d;f.length<3&&!f[1][0]&&!f[1][1]&&(d=e[++o],e[o]=u,e[l]=d)}),e.forEach(function(u){var l=a(u),f=l[0],d=l[1],h,p;if(h=i[f])if(delete i[h.end],h.push(u),h.end=d,p=r[d]){delete r[p.start];var m=p===h?h:h.concat(p);r[m.start=h.start]=i[m.end=p.end]=m}else r[h.start]=i[h.end]=h;else if(h=r[d])if(delete r[h.start],h.unshift(u),h.start=f,p=i[f]){delete i[p.end];var g=p===h?h:p.concat(h);r[g.start=p.start]=i[g.end=h.end]=g}else r[h.start]=i[h.end]=h;else h=[u],r[h.start=f]=i[h.end=d]=h});function a(u){var l=n.arcs[u<0?~u:u],f=l[0],d;return n.transform?(d=[0,0],l.forEach(function(h){d[0]+=h[0],d[1]+=h[1]})):d=l[l.length-1],u<0?[d,f]:[f,d]}function c(u,l){for(var f in u){var d=u[f];delete l[d.start],delete d.start,delete d.end,d.forEach(function(h){t[h<0?~h:h]=1}),s.push(d)}}return c(i,r),c(r,i),e.forEach(function(u){t[u<0?~u:u]||s.push([u])}),s}function RA(n){return r0(n,OA.apply(this,arguments))}function OA(n,e,t){var r,i,s;if(arguments.length>1)r=NA(n,e,t);else for(i=0,r=new Array(s=n.arcs.length);i<s;++i)r[i]=i;return{type:"MultiLineString",arcs:MA(n,r)}}function NA(n,e,t){var r=[],i=[],s;function o(f){var d=f<0?~f:f;(i[d]||(i[d]=[])).push({i:f,g:s})}function a(f){f.forEach(o)}function c(f){f.forEach(a)}function u(f){f.forEach(c)}function l(f){switch(s=f,f.type){case"GeometryCollection":f.geometries.forEach(l);break;case"LineString":a(f.arcs);break;case"MultiLineString":case"Polygon":c(f.arcs);break;case"MultiPolygon":u(f.arcs);break}}return l(e),i.forEach(t==null?function(f){r.push(f[0].i)}:function(f){t(f[0].g,f[f.length-1].g)&&r.push(f[0].i)}),r}function hr(n,e){return n==null||e==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function LA(n,e){return n==null||e==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function dr(n){let e,t,r;n.length!==2?(e=hr,t=(a,c)=>hr(n(a),c),r=(a,c)=>n(a)-c):(e=n===hr||n===LA?n:zA,t=n,r=n);function i(a,c,u=0,l=a.length){if(u<l){if(e(c,c)!==0)return l;do{const f=u+l>>>1;t(a[f],c)<0?u=f+1:l=f}while(u<l)}return u}function s(a,c,u=0,l=a.length){if(u<l){if(e(c,c)!==0)return l;do{const f=u+l>>>1;t(a[f],c)<=0?u=f+1:l=f}while(u<l)}return u}function o(a,c,u=0,l=a.length){const f=i(a,c,u,l-1);return f>u&&r(a[f-1],c)>-r(a[f],c)?f-1:f}return{left:i,center:o,right:s}}function zA(){return 0}function i0(n){return n===null?NaN:+n}function*UA(n,e){if(e===void 0)for(let t of n)t!=null&&(t=+t)>=t&&(yield t);else{let t=-1;for(let r of n)(r=e(r,++t,n))!=null&&(r=+r)>=r&&(yield r)}}const s0=dr(hr),Dn=s0.right;s0.left,dr(i0).center;function GA(n,e){let t=0;if(e===void 0)for(let r of n)r!=null&&(r=+r)>=r&&++t;else{let r=-1;for(let i of n)(i=e(i,++r,n))!=null&&(i=+i)>=i&&++t}return t}function HA(n,e){let t=0,r,i=0,s=0;if(e===void 0)for(let o of n)o!=null&&(o=+o)>=o&&(r=o-i,i+=r/++t,s+=r*(o-i));else{let o=-1;for(let a of n)(a=e(a,++o,n))!=null&&(a=+a)>=a&&(r=a-i,i+=r/++t,s+=r*(a-i))}if(t>1)return s/(t-1)}function VA(n,e){let t,r;for(const i of n)i!=null&&(t===void 0?i>=i&&(t=r=i):(t>i&&(t=i),r<i&&(r=i)));return[t,r]}class tn extends Map{constructor(e,t=QA){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(o0(this,e))}has(e){return super.has(o0(this,e))}set(e,t){return super.set(_A(this,e),t)}delete(e){return super.delete(jA(this,e))}}function o0({_intern:n,_key:e},t){const r=e(t);return n.has(r)?n.get(r):t}function _A({_intern:n,_key:e},t){const r=e(t);return n.has(r)?n.get(r):(n.set(r,t),t)}function jA({_intern:n,_key:e},t){const r=e(t);return n.has(r)&&(t=n.get(r),n.delete(r)),t}function QA(n){return n!==null&&typeof n=="object"?n.valueOf():n}function Yu(n){return n}function za(n,...e){return a0(n,Yu,Yu,e)}function WA(n,...e){return a0(n,Array.from,Yu,e)}function a0(n,e,t,r){return function i(s,o){if(o>=r.length)return t(s);const a=new tn,c=r[o++];let u=-1;for(const l of s){const f=c(l,++u,s),d=a.get(f);d?d.push(l):a.set(f,[l])}for(const[l,f]of a)a.set(l,i(f,o));return e(a)}(n,0)}function qA(n=hr){if(n===hr)return c0;if(typeof n!="function")throw new TypeError("compare is not a function");return(e,t)=>{const r=n(e,t);return r||r===0?r:(n(t,t)===0)-(n(e,e)===0)}}function c0(n,e){return(n==null||!(n>=n))-(e==null||!(e>=e))||(n<e?-1:n>e?1:0)}const YA=Math.sqrt(50),XA=Math.sqrt(10),ZA=Math.sqrt(2);function Ua(n,e,t){const r=(e-n)/Math.max(0,t),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=YA?10:s>=XA?5:s>=ZA?2:1;let a,c,u;return i<0?(u=Math.pow(10,-i)/o,a=Math.round(n*u),c=Math.round(e*u),a/u<n&&++a,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*o,a=Math.round(n/u),c=Math.round(e/u),a*u<n&&++a,c*u>e&&--c),c<a&&.5<=t&&t<2?Ua(n,e,t*2):[a,c,u]}function Ga(n,e,t){if(e=+e,n=+n,t=+t,!(t>0))return[];if(n===e)return[n];const r=e<n,[i,s,o]=r?Ua(e,n,t):Ua(n,e,t);if(!(s>=i))return[];const a=s-i+1,c=new Array(a);if(r)if(o<0)for(let u=0;u<a;++u)c[u]=(s-u)/-o;else for(let u=0;u<a;++u)c[u]=(s-u)*o;else if(o<0)for(let u=0;u<a;++u)c[u]=(i+u)/-o;else for(let u=0;u<a;++u)c[u]=(i+u)*o;return c}function Xu(n,e,t){return e=+e,n=+n,t=+t,Ua(n,e,t)[2]}function pr(n,e,t){e=+e,n=+n,t=+t;const r=e<n,i=r?Xu(e,n,t):Xu(n,e,t);return(r?-1:1)*(i<0?1/-i:i)}function Zu(n,e){let t;if(e===void 0)for(const r of n)r!=null&&(t<r||t===void 0&&r>=r)&&(t=r);else{let r=-1;for(let i of n)(i=e(i,++r,n))!=null&&(t<i||t===void 0&&i>=i)&&(t=i)}return t}function Ku(n,e){let t;if(e===void 0)for(const r of n)r!=null&&(t>r||t===void 0&&r>=r)&&(t=r);else{let r=-1;for(let i of n)(i=e(i,++r,n))!=null&&(t>i||t===void 0&&i>=i)&&(t=i)}return t}function u0(n,e,t=0,r=1/0,i){if(e=Math.floor(e),t=Math.floor(Math.max(0,t)),r=Math.floor(Math.min(n.length-1,r)),!(t<=e&&e<=r))return n;for(i=i===void 0?c0:qA(i);r>t;){if(r-t>600){const c=r-t+1,u=e-t+1,l=Math.log(c),f=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*f*(c-f)/c)*(u-c/2<0?-1:1),h=Math.max(t,Math.floor(e-u*f/c+d)),p=Math.min(r,Math.floor(e+(c-u)*f/c+d));u0(n,e,h,p,i)}const s=n[e];let o=t,a=r;for(zs(n,t,e),i(n[r],s)>0&&zs(n,t,r);o<a;){for(zs(n,o,a),++o,--a;i(n[o],s)<0;)++o;for(;i(n[a],s)>0;)--a}i(n[t],s)===0?zs(n,t,a):(++a,zs(n,a,r)),a<=e&&(t=a+1),e<=a&&(r=a-1)}return n}function zs(n,e,t){const r=n[e];n[e]=n[t],n[t]=r}function KA(n,e,t){if(n=Float64Array.from(UA(n,t)),!(!(r=n.length)||isNaN(e=+e))){if(e<=0||r<2)return Ku(n);if(e>=1)return Zu(n);var r,i=(r-1)*e,s=Math.floor(i),o=Zu(u0(n,s).subarray(0,s+1)),a=Ku(n.subarray(s+1));return o+(a-o)*(i-s)}}function l0(n,e,t=i0){if(!(!(r=n.length)||isNaN(e=+e))){if(e<=0||r<2)return+t(n[0],0,n);if(e>=1)return+t(n[r-1],r-1,n);var r,i=(r-1)*e,s=Math.floor(i),o=+t(n[s],s,n),a=+t(n[s+1],s+1,n);return o+(a-o)*(i-s)}}function JA(n,e){let t=0,r=0;if(e===void 0)for(let i of n)i!=null&&(i=+i)>=i&&(++t,r+=i);else{let i=-1;for(let s of n)(s=e(s,++i,n))!=null&&(s=+s)>=s&&(++t,r+=s)}if(t)return r/t}function $A(n,e){return KA(n,.5,e)}function Us(n,e,t){n=+n,e=+e,t=(i=arguments.length)<2?(e=n,n=0,1):i<3?1:+t;for(var r=-1,i=Math.max(0,Math.ceil((e-n)/t))|0,s=new Array(i);++r<i;)s[r]=n+r*t;return s}function Gs(n,e){let t=0;if(e===void 0)for(let r of n)(r=+r)&&(t+=r);else{let r=-1;for(let i of n)(i=+e(i,++r,n))&&(t+=i)}return t}function ew(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function Ha(n,e){if((t=(n=e?n.toExponential(e-1):n.toExponential()).indexOf("e"))<0)return null;var t,r=n.slice(0,t);return[r.length>1?r[0]+r.slice(2):r,+n.slice(t+1)]}function oi(n){return n=Ha(Math.abs(n)),n?n[1]:NaN}function tw(n,e){return function(t,r){for(var i=t.length,s=[],o=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),s.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[o=(o+1)%n.length];return s.reverse().join(e)}}function nw(n){return function(e){return e.replace(/[0-9]/g,function(t){return n[+t]})}}var rw=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ai(n){if(!(e=rw.exec(n)))throw new Error("invalid format: "+n);var e;return new Ju({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ai.prototype=Ju.prototype;function Ju(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}Ju.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function iw(n){e:for(var e=n.length,t=1,r=-1,i;t<e;++t)switch(n[t]){case".":r=i=t;break;case"0":r===0&&(r=t),i=t;break;default:if(!+n[t])break e;r>0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var f0;function sw(n,e){var t=Ha(n,e);if(!t)return n+"";var r=t[0],i=t[1],s=i-(f0=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Ha(n,Math.max(0,e+s-1))[0]}function h0(n,e){var t=Ha(n,e);if(!t)return n+"";var r=t[0],i=t[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const d0={"%":(n,e)=>(n*100).toFixed(e),b:n=>Math.round(n).toString(2),c:n=>n+"",d:ew,e:(n,e)=>n.toExponential(e),f:(n,e)=>n.toFixed(e),g:(n,e)=>n.toPrecision(e),o:n=>Math.round(n).toString(8),p:(n,e)=>h0(n*100,e),r:h0,s:sw,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function p0(n){return n}var m0=Array.prototype.map,g0=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ow(n){var e=n.grouping===void 0||n.thousands===void 0?p0:tw(m0.call(n.grouping,Number),n.thousands+""),t=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",s=n.numerals===void 0?p0:nw(m0.call(n.numerals,String)),o=n.percent===void 0?"%":n.percent+"",a=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function u(f){f=ai(f);var d=f.fill,h=f.align,p=f.sign,m=f.symbol,g=f.zero,y=f.width,x=f.comma,A=f.precision,w=f.trim,S=f.type;S==="n"?(x=!0,S="g"):d0[S]||(A===void 0&&(A=12),w=!0,S="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var C=m==="$"?t:m==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",v=m==="$"?r:/[%p]/.test(S)?o:"",T=d0[S],P=/[defgprs%]/.test(S);A=A===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function F(k){var L=C,U=v,j,K,_;if(S==="c")U=T(k)+U,k="";else{k=+k;var te=k<0||1/k<0;if(k=isNaN(k)?c:T(Math.abs(k),A),w&&(k=iw(k)),te&&+k==0&&p!=="+"&&(te=!1),L=(te?p==="("?p:a:p==="-"||p==="("?"":p)+L,U=(S==="s"?g0[8+f0/3]:"")+U+(te&&p==="("?")":""),P){for(j=-1,K=k.length;++j<K;)if(_=k.charCodeAt(j),48>_||_>57){U=(_===46?i+k.slice(j+1):k.slice(j))+U,k=k.slice(0,j);break}}}x&&!g&&(k=e(k,1/0));var ce=L.length+k.length+U.length,ie=ce<y?new Array(y-ce+1).join(d):"";switch(x&&g&&(k=e(ie+k,ie.length?y-U.length:1/0),ie=""),h){case"<":k=L+k+U+ie;break;case"=":k=L+ie+k+U;break;case"^":k=ie.slice(0,ce=ie.length>>1)+L+k+U+ie.slice(ce);break;default:k=ie+L+k+U;break}return s(k)}return F.toString=function(){return f+""},F}function l(f,d){var h=u((f=ai(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(oi(d)/3)))*3,m=Math.pow(10,-p),g=g0[8+p/3];return function(y){return h(m*y)+g}}return{format:u,formatPrefix:l}}var Va,Le,y0;aw({thousands:",",grouping:[3],currency:["$",""]});function aw(n){return Va=ow(n),Le=Va.format,y0=Va.formatPrefix,Va}function cw(n){return Math.max(0,-oi(Math.abs(n)))}function uw(n,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(oi(e)/3)))*3-oi(Math.abs(n)))}function lw(n,e){return n=Math.abs(n),e=Math.abs(e)-n,Math.max(0,oi(e)-oi(n))+1}const $u=new Date,el=new Date;function Ie(n,e,t,r){function i(s){return n(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(n(s=new Date(+s)),s),i.ceil=s=>(n(s=new Date(s-1)),e(s,1),n(s),s),i.round=s=>{const o=i(s),a=i.ceil(s);return s-o<a-s?o:a},i.offset=(s,o)=>(e(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,a)=>{const c=[];if(s=i.ceil(s),a=a==null?1:Math.floor(a),!(s<o)||!(a>0))return c;let u;do c.push(u=new Date(+s)),e(s,a),n(s);while(u<s&&s<o);return c},i.filter=s=>Ie(o=>{if(o>=o)for(;n(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;e(o,-1),!s(o););else for(;--a>=0;)for(;e(o,1),!s(o););}),t&&(i.count=(s,o)=>($u.setTime(+s),el.setTime(+o),n($u),n(el),Math.floor(t($u,el))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const ci=Ie(()=>{},(n,e)=>{n.setTime(+n+e)},(n,e)=>e-n);ci.every=n=>(n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?Ie(e=>{e.setTime(Math.floor(e/n)*n)},(e,t)=>{e.setTime(+e+t*n)},(e,t)=>(t-e)/n):ci),ci.range;const nn=1e3,dt=nn*60,rn=dt*60,sn=rn*24,tl=sn*7,b0=sn*30,nl=sn*365,on=Ie(n=>{n.setTime(n-n.getMilliseconds())},(n,e)=>{n.setTime(+n+e*nn)},(n,e)=>(e-n)/nn,n=>n.getUTCSeconds());on.range;const _a=Ie(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*nn)},(n,e)=>{n.setTime(+n+e*dt)},(n,e)=>(e-n)/dt,n=>n.getMinutes());_a.range;const ja=Ie(n=>{n.setUTCSeconds(0,0)},(n,e)=>{n.setTime(+n+e*dt)},(n,e)=>(e-n)/dt,n=>n.getUTCMinutes());ja.range;const Qa=Ie(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*nn-n.getMinutes()*dt)},(n,e)=>{n.setTime(+n+e*rn)},(n,e)=>(e-n)/rn,n=>n.getHours());Qa.range;const Wa=Ie(n=>{n.setUTCMinutes(0,0,0)},(n,e)=>{n.setTime(+n+e*rn)},(n,e)=>(e-n)/rn,n=>n.getUTCHours());Wa.range;const In=Ie(n=>n.setHours(0,0,0,0),(n,e)=>n.setDate(n.getDate()+e),(n,e)=>(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*dt)/sn,n=>n.getDate()-1);In.range;const mr=Ie(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/sn,n=>n.getUTCDate()-1);mr.range;const x0=Ie(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/sn,n=>Math.floor(n/sn));x0.range;function gr(n){return Ie(e=>{e.setDate(e.getDate()-(e.getDay()+7-n)%7),e.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*dt)/tl)}const Hs=gr(0),qa=gr(1),fw=gr(2),hw=gr(3),ui=gr(4),dw=gr(5),pw=gr(6);Hs.range,qa.range,fw.range,hw.range,ui.range,dw.range,pw.range;function yr(n){return Ie(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-n)%7),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/tl)}const Vs=yr(0),Ya=yr(1),mw=yr(2),gw=yr(3),li=yr(4),yw=yr(5),bw=yr(6);Vs.range,Ya.range,mw.range,gw.range,li.range,yw.range,bw.range;const fi=Ie(n=>{n.setDate(1),n.setHours(0,0,0,0)},(n,e)=>{n.setMonth(n.getMonth()+e)},(n,e)=>e.getMonth()-n.getMonth()+(e.getFullYear()-n.getFullYear())*12,n=>n.getMonth());fi.range;const hi=Ie(n=>{n.setUTCDate(1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCMonth(n.getUTCMonth()+e)},(n,e)=>e.getUTCMonth()-n.getUTCMonth()+(e.getUTCFullYear()-n.getUTCFullYear())*12,n=>n.getUTCMonth());hi.range;const Lt=Ie(n=>{n.setMonth(0,1),n.setHours(0,0,0,0)},(n,e)=>{n.setFullYear(n.getFullYear()+e)},(n,e)=>e.getFullYear()-n.getFullYear(),n=>n.getFullYear());Lt.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:Ie(e=>{e.setFullYear(Math.floor(e.getFullYear()/n)*n),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t*n)}),Lt.range;const zt=Ie(n=>{n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e)},(n,e)=>e.getUTCFullYear()-n.getUTCFullYear(),n=>n.getUTCFullYear());zt.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:Ie(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/n)*n),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t*n)}),zt.range;function A0(n,e,t,r,i,s){const o=[[on,1,nn],[on,5,5*nn],[on,15,15*nn],[on,30,30*nn],[s,1,dt],[s,5,5*dt],[s,15,15*dt],[s,30,30*dt],[i,1,rn],[i,3,3*rn],[i,6,6*rn],[i,12,12*rn],[r,1,sn],[r,2,2*sn],[t,1,tl],[e,1,b0],[e,3,3*b0],[n,1,nl]];function a(u,l,f){const d=l<u;d&&([u,l]=[l,u]);const h=f&&typeof f.range=="function"?f:c(u,l,f),p=h?h.range(u,+l+1):[];return d?p.reverse():p}function c(u,l,f){const d=Math.abs(l-u)/f,h=dr(([,,g])=>g).right(o,d);if(h===o.length)return n.every(pr(u/nl,l/nl,f));if(h===0)return ci.every(Math.max(pr(u,l,f),1));const[p,m]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return p.every(m)}return[a,c]}const[xw,Aw]=A0(zt,hi,Vs,x0,Wa,ja),[ww,vw]=A0(Lt,fi,Hs,In,Qa,_a),_s="year",js="quarter",Qs="month",Ws="week",qs="date",Xa="day",rl="dayofyear",Ys="hours",Xs="minutes",Zs="seconds",Za="milliseconds";[_s,js,Qs,Ws,qs,Xa,rl,Ys,Xs,Zs,Za].reduce((n,e,t)=>(n[e]=1+t,n),{});const Sw={[_s]:Lt,[js]:fi.every(3),[Qs]:fi,[Ws]:Hs,[qs]:In,[Xa]:In,[rl]:In,[Ys]:Qa,[Xs]:_a,[Zs]:on,[Za]:ci},Ew={[_s]:zt,[js]:hi.every(3),[Qs]:hi,[Ws]:Vs,[qs]:mr,[Xa]:mr,[rl]:mr,[Ys]:Wa,[Xs]:ja,[Zs]:on,[Za]:ci};function Cw(n){return Sw[n]}function Dw(n){return Ew[n]}function il(n){if(0<=n.y&&n.y<100){var e=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return e.setFullYear(n.y),e}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function sl(n){if(0<=n.y&&n.y<100){var e=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return e.setUTCFullYear(n.y),e}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function Ks(n,e,t){return{y:n,m:e,d:t,H:0,M:0,S:0,L:0}}function w0(n){var e=n.dateTime,t=n.date,r=n.time,i=n.periods,s=n.days,o=n.shortDays,a=n.months,c=n.shortMonths,u=Js(i),l=$s(i),f=Js(s),d=$s(s),h=Js(o),p=$s(o),m=Js(a),g=$s(a),y=Js(c),x=$s(c),A={a:te,A:ce,b:ie,B:Ne,c:null,d:I0,e:I0,f:Xw,g:sv,G:av,H:Ww,I:qw,j:Yw,L:T0,m:Zw,M:Kw,p:ve,q:Kt,Q:R0,s:O0,S:Jw,u:$w,U:ev,V:tv,w:nv,W:rv,x:null,X:null,y:iv,Y:ov,Z:cv,"%":M0},w={a:Jt,A:rr,b:Ds,B:De,c:null,d:k0,e:k0,f:hv,g:vv,G:Ev,H:uv,I:lv,j:fv,L:F0,m:dv,M:pv,p:St,q:ut,Q:R0,s:O0,S:mv,u:gv,U:yv,V:bv,w:xv,W:Av,x:null,X:null,y:wv,Y:Sv,Z:Cv,"%":M0},S={a:F,A:k,b:L,B:U,c:j,d:C0,e:C0,f:Vw,g:E0,G:S0,H:D0,I:D0,j:zw,L:Hw,m:Lw,M:Uw,p:P,q:Nw,Q:jw,s:Qw,S:Gw,u:Fw,U:Pw,V:Mw,w:kw,W:Rw,x:K,X:_,y:E0,Y:S0,Z:Ow,"%":_w};A.x=C(t,A),A.X=C(r,A),A.c=C(e,A),w.x=C(t,w),w.X=C(r,w),w.c=C(e,w);function C(H,J){return function(ne){var M=[],Ye=-1,he=0,tt=H.length,Xe,xn,Ea;for(ne instanceof Date||(ne=new Date(+ne));++Ye<tt;)H.charCodeAt(Ye)===37&&(M.push(H.slice(he,Ye)),(xn=v0[Xe=H.charAt(++Ye)])!=null?Xe=H.charAt(++Ye):xn=Xe==="e"?" ":"0",(Ea=J[Xe])&&(Xe=Ea(ne,xn)),M.push(Xe),he=Ye+1);return M.push(H.slice(he,Ye)),M.join("")}}function v(H,J){return function(ne){var M=Ks(1900,void 0,1),Ye=T(M,H,ne+="",0),he,tt;if(Ye!=ne.length)return null;if("Q"in M)return new Date(M.Q);if("s"in M)return new Date(M.s*1e3+("L"in M?M.L:0));if(J&&!("Z"in M)&&(M.Z=0),"p"in M&&(M.H=M.H%12+M.p*12),M.m===void 0&&(M.m="q"in M?M.q:0),"V"in M){if(M.V<1||M.V>53)return null;"w"in M||(M.w=1),"Z"in M?(he=sl(Ks(M.y,0,1)),tt=he.getUTCDay(),he=tt>4||tt===0?Ya.ceil(he):Ya(he),he=mr.offset(he,(M.V-1)*7),M.y=he.getUTCFullYear(),M.m=he.getUTCMonth(),M.d=he.getUTCDate()+(M.w+6)%7):(he=il(Ks(M.y,0,1)),tt=he.getDay(),he=tt>4||tt===0?qa.ceil(he):qa(he),he=In.offset(he,(M.V-1)*7),M.y=he.getFullYear(),M.m=he.getMonth(),M.d=he.getDate()+(M.w+6)%7)}else("W"in M||"U"in M)&&("w"in M||(M.w="u"in M?M.u%7:"W"in M?1:0),tt="Z"in M?sl(Ks(M.y,0,1)).getUTCDay():il(Ks(M.y,0,1)).getDay(),M.m=0,M.d="W"in M?(M.w+6)%7+M.W*7-(tt+5)%7:M.w+M.U*7-(tt+6)%7);return"Z"in M?(M.H+=M.Z/100|0,M.M+=M.Z%100,sl(M)):il(M)}}function T(H,J,ne,M){for(var Ye=0,he=J.length,tt=ne.length,Xe,xn;Ye<he;){if(M>=tt)return-1;if(Xe=J.charCodeAt(Ye++),Xe===37){if(Xe=J.charAt(Ye++),xn=S[Xe in v0?J.charAt(Ye++):Xe],!xn||(M=xn(H,ne,M))<0)return-1}else if(Xe!=ne.charCodeAt(M++))return-1}return M}function P(H,J,ne){var M=u.exec(J.slice(ne));return M?(H.p=l.get(M[0].toLowerCase()),ne+M[0].length):-1}function F(H,J,ne){var M=h.exec(J.slice(ne));return M?(H.w=p.get(M[0].toLowerCase()),ne+M[0].length):-1}function k(H,J,ne){var M=f.exec(J.slice(ne));return M?(H.w=d.get(M[0].toLowerCase()),ne+M[0].length):-1}function L(H,J,ne){var M=y.exec(J.slice(ne));return M?(H.m=x.get(M[0].toLowerCase()),ne+M[0].length):-1}function U(H,J,ne){var M=m.exec(J.slice(ne));return M?(H.m=g.get(M[0].toLowerCase()),ne+M[0].length):-1}function j(H,J,ne){return T(H,e,J,ne)}function K(H,J,ne){return T(H,t,J,ne)}function _(H,J,ne){return T(H,r,J,ne)}function te(H){return o[H.getDay()]}function ce(H){return s[H.getDay()]}function ie(H){return c[H.getMonth()]}function Ne(H){return a[H.getMonth()]}function ve(H){return i[+(H.getHours()>=12)]}function Kt(H){return 1+~~(H.getMonth()/3)}function Jt(H){return o[H.getUTCDay()]}function rr(H){return s[H.getUTCDay()]}function Ds(H){return c[H.getUTCMonth()]}function De(H){return a[H.getUTCMonth()]}function St(H){return i[+(H.getUTCHours()>=12)]}function ut(H){return 1+~~(H.getUTCMonth()/3)}return{format:function(H){var J=C(H+="",A);return J.toString=function(){return H},J},parse:function(H){var J=v(H+="",!1);return J.toString=function(){return H},J},utcFormat:function(H){var J=C(H+="",w);return J.toString=function(){return H},J},utcParse:function(H){var J=v(H+="",!0);return J.toString=function(){return H},J}}}var v0={"-":"",_:" ",0:"0"},Fe=/^\s*\d+/,Iw=/^%/,Tw=/[\\^$*+?|[\]().{}]/g;function oe(n,e,t){var r=n<0?"-":"",i=(r?-n:n)+"",s=i.length;return r+(s<t?new Array(t-s+1).join(e)+i:i)}function Bw(n){return n.replace(Tw,"\\$&")}function Js(n){return new RegExp("^(?:"+n.map(Bw).join("|")+")","i")}function $s(n){return new Map(n.map((e,t)=>[e.toLowerCase(),t]))}function kw(n,e,t){var r=Fe.exec(e.slice(t,t+1));return r?(n.w=+r[0],t+r[0].length):-1}function Fw(n,e,t){var r=Fe.exec(e.slice(t,t+1));return r?(n.u=+r[0],t+r[0].length):-1}function Pw(n,e,t){var r=Fe.exec(e.slice(t,t+2));return r?(n.U=+r[0],t+r[0].length):-1}function Mw(n,e,t){var r=Fe.exec(e.slice(t,t+2));return r?(n.V=+r[0],t+r[0].length):-1}function Rw(n,e,t){var r=Fe.exec(e.slice(t,t+2));return r?(n.W=+r[0],t+r[0].length):-1}function S0(n,e,t){var r=Fe.exec(e.slice(t,t+4));return r?(n.y=+r[0],t+r[0].length):-1}function E0(n,e,t){var r=Fe.exec(e.slice(t,t+2));return r?(n.y=+r[0]+(+r[0]>68?1900:2e3),t+r[0].length):-1}function Ow(n,e,t){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(t,t+6));return r?(n.Z=r[1]?0:-(r[2]+(r[3]||"00")),t+r[0].length):-1}function Nw(n,e,t){var r=Fe.exec(e.slice(t,t+1));return r?(n.q=r[0]*3-3,t+r[0].length):-1}function Lw(n,e,t){var r=Fe.exec(e.slice(t,t+2));return r?(n.m=r[0]-1,t+r[0].length):-1}function C0(n,e,t){var r=Fe.exec(e.slice(t,t+2));return r?(n.d=+r[0],t+r[0].length):-1}function zw(n,e,t){var r=Fe.exec(e.slice(t,t+3));return r?(n.m=0,n.d=+r[0],t+r[0].length):-1}function D0(n,e,t){var r=Fe.exec(e.slice(t,t+2));return r?(n.H=+r[0],t+r[0].length):-1}function Uw(n,e,t){var r=Fe.exec(e.slice(t,t+2));return r?(n.M=+r[0],t+r[0].length):-1}function Gw(n,e,t){var r=Fe.exec(e.slice(t,t+2));return r?(n.S=+r[0],t+r[0].length):-1}function Hw(n,e,t){var r=Fe.exec(e.slice(t,t+3));return r?(n.L=+r[0],t+r[0].length):-1}function Vw(n,e,t){var r=Fe.exec(e.slice(t,t+6));return r?(n.L=Math.floor(r[0]/1e3),t+r[0].length):-1}function _w(n,e,t){var r=Iw.exec(e.slice(t,t+1));return r?t+r[0].length:-1}function jw(n,e,t){var r=Fe.exec(e.slice(t));return r?(n.Q=+r[0],t+r[0].length):-1}function Qw(n,e,t){var r=Fe.exec(e.slice(t));return r?(n.s=+r[0],t+r[0].length):-1}function I0(n,e){return oe(n.getDate(),e,2)}function Ww(n,e){return oe(n.getHours(),e,2)}function qw(n,e){return oe(n.getHours()%12||12,e,2)}function Yw(n,e){return oe(1+In.count(Lt(n),n),e,3)}function T0(n,e){return oe(n.getMilliseconds(),e,3)}function Xw(n,e){return T0(n,e)+"000"}function Zw(n,e){return oe(n.getMonth()+1,e,2)}function Kw(n,e){return oe(n.getMinutes(),e,2)}function Jw(n,e){return oe(n.getSeconds(),e,2)}function $w(n){var e=n.getDay();return e===0?7:e}function ev(n,e){return oe(Hs.count(Lt(n)-1,n),e,2)}function B0(n){var e=n.getDay();return e>=4||e===0?ui(n):ui.ceil(n)}function tv(n,e){return n=B0(n),oe(ui.count(Lt(n),n)+(Lt(n).getDay()===4),e,2)}function nv(n){return n.getDay()}function rv(n,e){return oe(qa.count(Lt(n)-1,n),e,2)}function iv(n,e){return oe(n.getFullYear()%100,e,2)}function sv(n,e){return n=B0(n),oe(n.getFullYear()%100,e,2)}function ov(n,e){return oe(n.getFullYear()%1e4,e,4)}function av(n,e){var t=n.getDay();return n=t>=4||t===0?ui(n):ui.ceil(n),oe(n.getFullYear()%1e4,e,4)}function cv(n){var e=n.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+oe(e/60|0,"0",2)+oe(e%60,"0",2)}function k0(n,e){return oe(n.getUTCDate(),e,2)}function uv(n,e){return oe(n.getUTCHours(),e,2)}function lv(n,e){return oe(n.getUTCHours()%12||12,e,2)}function fv(n,e){return oe(1+mr.count(zt(n),n),e,3)}function F0(n,e){return oe(n.getUTCMilliseconds(),e,3)}function hv(n,e){return F0(n,e)+"000"}function dv(n,e){return oe(n.getUTCMonth()+1,e,2)}function pv(n,e){return oe(n.getUTCMinutes(),e,2)}function mv(n,e){return oe(n.getUTCSeconds(),e,2)}function gv(n){var e=n.getUTCDay();return e===0?7:e}function yv(n,e){return oe(Vs.count(zt(n)-1,n),e,2)}function P0(n){var e=n.getUTCDay();return e>=4||e===0?li(n):li.ceil(n)}function bv(n,e){return n=P0(n),oe(li.count(zt(n),n)+(zt(n).getUTCDay()===4),e,2)}function xv(n){return n.getUTCDay()}function Av(n,e){return oe(Ya.count(zt(n)-1,n),e,2)}function wv(n,e){return oe(n.getUTCFullYear()%100,e,2)}function vv(n,e){return n=P0(n),oe(n.getUTCFullYear()%100,e,2)}function Sv(n,e){return oe(n.getUTCFullYear()%1e4,e,4)}function Ev(n,e){var t=n.getUTCDay();return n=t>=4||t===0?li(n):li.ceil(n),oe(n.getUTCFullYear()%1e4,e,4)}function Cv(){return"+0000"}function M0(){return"%"}function R0(n){return+n}function O0(n){return Math.floor(+n/1e3)}var di,ol,N0,al,L0;Dv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Dv(n){return di=w0(n),ol=di.format,N0=di.parse,al=di.utcFormat,L0=di.utcParse,di}function Ka(n){const e={};return t=>e[t]||(e[t]=n(t))}function z0(n,e,t){t=t||{},Ge(t)||Ct(`Invalid time multi-format specifier: ${t}`);const r=e(Zs),i=e(Xs),s=e(Ys),o=e(qs),a=e(Ws),c=e(Qs),u=e(js),l=e(_s),f=n(t[Za]||".%L"),d=n(t[Zs]||":%S"),h=n(t[Xs]||"%I:%M"),p=n(t[Ys]||"%I %p"),m=n(t[qs]||t[Xa]||"%a %d"),g=n(t[Ws]||"%b %d"),y=n(t[Qs]||"%B"),x=n(t[js]||"%B"),A=n(t[_s]||"%Y");return w=>(r(w)<w?f:i(w)<w?d:s(w)<w?h:o(w)<w?p:c(w)<w?a(w)<w?m:g:l(w)<w?u(w)<w?y:x:A)(w)}function U0(n){const e=Ka(n.format),t=Ka(n.utcFormat);return{timeFormat:r=>me(r)?e(r):z0(e,Cw,r),utcFormat:r=>me(r)?t(r):z0(t,Dw,r),timeParse:Ka(n.parse),utcParse:Ka(n.utcParse)}}let cl;Iv();function Iv(){return cl=U0({format:ol,parse:N0,utcFormat:al,utcParse:L0})}function Tv(n){return U0(w0(n))}function Bv(n){return arguments.length?cl=Tv(n):cl}const kv=n=>n!=null&&n===n,Fv=n=>n==="true"||n==="false"||n===!0||n===!1,Pv=n=>!Number.isNaN(Date.parse(n)),G0=n=>!Number.isNaN(+n)&&!(n instanceof Date),Mv=n=>G0(n)&&Number.isInteger(+n),H0={boolean:eA,integer:Fa,number:Fa,date:nA,string:rA,unknown:ka},Ja=[Fv,Mv,G0,Pv],Rv=["boolean","integer","number","date"];function Ov(n,e){if(!n||!n.length)return"unknown";const t=n.length,r=Ja.length,i=Ja.map((s,o)=>o+1);for(let s=0,o=0,a,c;s<t;++s)for(c=e?n[s][e]:n[s],a=0;a<r;++a)if(i[a]&&kv(c)&&!Ja[a](c)&&(i[a]=0,++o,o===Ja.length))return"string";return Rv[i.reduce((s,o)=>s===0?o:s,0)-1]}function Nv(n,e){return e.reduce((t,r)=>(t[r]=Ov(n,r),t),{})}function V0(n){const e=function(t,r){const i={delimiter:n};return ul(t,r?Zx(r,i):i)};return e.responseType="text",e}function ul(n,e){return e.header&&(n=e.header.map(Lu).join(e.delimiter)+`
|
|
24
|
+
`+n),t0(e.delimiter).parse(n+"")}ul.responseType="text";function Lv(n){return typeof Buffer=="function"&&Nt(Buffer.isBuffer)?Buffer.isBuffer(n):!1}function ll(n,e){const t=e&&e.property?Ba(e.property):ka;return Ge(n)&&!Lv(n)?zv(t(n),e):t(JSON.parse(n))}ll.responseType="json";function zv(n,e){return!Ue(n)&&Jx(n)&&(n=[...n]),e&&e.copy?JSON.parse(JSON.stringify(n)):n}const Uv={interior:(n,e)=>n!==e,exterior:(n,e)=>n===e};function _0(n,e){let t,r,i,s;return n=ll(n,e),e&&e.feature?(t=PA,i=e.feature):e&&e.mesh?(t=RA,i=e.mesh,s=Uv[e.filter]):Ct("Missing TopoJSON feature or mesh parameter."),r=(r=n.objects[i])?t(n,r,s):Ct("Invalid TopoJSON object: "+i),r&&r.features||[r]}_0.responseType="json";const fl={dsv:ul,csv:V0(","),tsv:V0(" "),json:ll,topojson:_0};function hl(n,e){return arguments.length>1?(fl[n]=e,this):Rd(fl,n)?fl[n]:null}function dl(n,e,t,r){e=e||{};const i=hl(e.type||"json");return i||Ct("Unknown data format type: "+e.type),n=i(n,e),e.parse&&Gv(n,e.parse,t,r),Rd(n,"columns")&&delete n.columns,n}function Gv(n,e,t,r){if(!n.length)return;const i=Bv();t=t||i.timeParse,r=r||i.utcParse;let s=n.columns||Object.keys(n[0]),o,a,c,u,l,f;e==="auto"&&(e=Nv(n,s)),s=Object.keys(e);const d=s.map(h=>{const p=e[h];let m,g;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return m=p.split(/:(.+)?/,2),g=m[1],(g[0]==="'"&&g[g.length-1]==="'"||g[0]==='"'&&g[g.length-1]==='"')&&(g=g.slice(1,-1)),(m[0]==="utc"?r:t)(g);if(!H0[p])throw Error("Illegal format pattern: "+h+":"+p);return H0[p]});for(c=0,l=n.length,f=s.length;c<l;++c)for(o=n[c],u=0;u<f;++u)a=s[u],o[a]=d[u](o[a])}/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/const
|
|
28
|
+
*/const Hv={ATTRIBUTE:1},Vv=n=>(...e)=>({_$litDirective$:n,values:e});let _v=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2018 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
-
*/const
|
|
32
|
+
*/const j0="important",jv=" !"+j0,Qv=Vv(class extends _v{constructor(n){var e;if(super(n),n.type!==Hv.ATTRIBUTE||n.name!=="style"||((e=n.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((e,t)=>{const r=n[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(n,[e]){const{style:t}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(const r in e){const i=e[r];if(i!=null){this.ft.add(r);const s=typeof i=="string"&&i.endsWith(jv);r.includes("-")||s?t.setProperty(r,s?i.slice(0,-11):i,s?j0:""):t[r]=i}}return ur}}),Wv="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e.spinner_ajPY{transform-origin:center;animation:spinner_AtaB%20.75s%20infinite%20linear}@keyframes%20spinner_AtaB{100%25{transform:rotate(360deg)}}%3c/style%3e%3cpath%20d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z'%20opacity='.25'/%3e%3cpath%20d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'%20class='spinner_ajPY'/%3e%3c/svg%3e",qv=`
|
|
33
33
|
:root {
|
|
34
34
|
--genome-spy-basic-spacing: 10px;
|
|
35
35
|
--genome-spy-font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial,
|
|
@@ -302,9 +302,9 @@ flex-basis: content;
|
|
|
302
302
|
font-size: 14px;
|
|
303
303
|
padding: var(--genome-spy-basic-spacing);
|
|
304
304
|
}
|
|
305
|
-
`;function
|
|
305
|
+
`;function Yv(n,e){var t=n.getBoundingClientRect();return[e.clientX-t.left-n.clientLeft,e.clientY-t.top-n.clientTop]}function $a(n,e){return n.length==e.length&&n.every((t,r)=>n[r]===e[r])}function He(n){return Array.isArray(n)?n:typeof n<"u"?[n]:[]}function eo(n){return n[n.length-1]}class Xv{constructor(e){R(this,mn,!1);R(this,Zi,!0);R(this,jr);R(this,Qr,0);R(this,Ki);R(this,$o,0);R(this,$e);R(this,Zn);R(this,Ji,[!0]);G(this,Zn,e),G(this,$e,document.createElement("div")),E(this,$e).className="tooltip",E(this,Zn).appendChild(E(this,$e)),this.clear()}set sticky(e){!e&&E(this,mn)&&this.clear(),G(this,mn,e),E(this,$e).classList.toggle("sticky",E(this,mn))}get sticky(){return E(this,mn)}set visible(e){e!=E(this,Zi)&&(E(this,$e).style.display=e?null:"none",G(this,Zi,e))}get visible(){return E(this,Zi)}get enabled(){return eo(E(this,Ji))??!0}pushEnabledState(e){E(this,Ji).push(e),e||(this.visible=!1)}popEnabledState(){E(this,Ji).pop()}handleMouseMove(e){if(E(this,mn))return;this.mouseCoords=Yv(E(this,Zn),e);const t=performance.now();!this.visible&&!this._isPenalty()&&t-E(this,$o)>500&&G(this,Qr,t+70),E(this,Ki)&&Zv(this.mouseCoords,E(this,Ki))>20&&G(this,Qr,t+400),G(this,Ki,this.mouseCoords),this.visible&&this.updatePlacement(),G(this,$o,t)}updatePlacement(){const[t,r]=this.mouseCoords;let i=t+20;i>E(this,Zn).clientWidth-E(this,$e).offsetWidth&&(i=t-20-E(this,$e).offsetWidth),E(this,$e).style.left=i+"px",E(this,$e).style.top=Math.min(r+20,E(this,Zn).clientHeight-E(this,$e).offsetHeight)+"px"}setContent(e){if(!E(this,mn)){if(!e||!this.enabled||this._isPenalty()){this.visible&&(Ns("",E(this,$e)),this.visible=!1),G(this,jr,void 0);return}Ns(e,E(this,$e)),this.visible=!0,this.updatePlacement()}}clear(){G(this,jr,void 0),this.setContent(void 0)}updateWithDatum(e,t){e!==E(this,jr)&&(G(this,jr,e),t||(t=r=>Promise.resolve(ye` ${JSON.stringify(r)} `)),t(e).then(r=>this.setContent(r)).catch(r=>{if(r!=="debounced")throw r}))}_isPenalty(){return E(this,Qr)&&E(this,Qr)>performance.now()}}mn=new WeakMap,Zi=new WeakMap,jr=new WeakMap,Qr=new WeakMap,Ki=new WeakMap,$o=new WeakMap,$e=new WeakMap,Zn=new WeakMap,Ji=new WeakMap;function Zv(n,e){let t=0;for(let r=0;r<n.length;r++)t+=(n[r]-e[r])**2;return Math.sqrt(t)}/* @license twgl.js 4.24.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
|
|
306
306
|
Available via the MIT license.
|
|
307
|
-
see: http://github.com/greggman/twgl.js for details */const df=5120,Hs=5121,pf=5122,gf=5123,mf=5124,yf=5125,bf=5126,bS=32819,wS=32820,xS=33635,vS=5131,AS=33640,ES=35899,SS=35902,CS=36269,IS=34042,wg={};{const t=wg;t[df]=Int8Array,t[Hs]=Uint8Array,t[pf]=Int16Array,t[gf]=Uint16Array,t[mf]=Int32Array,t[yf]=Uint32Array,t[bf]=Float32Array,t[bS]=Uint16Array,t[wS]=Uint16Array,t[xS]=Uint16Array,t[vS]=Uint16Array,t[AS]=Uint32Array,t[ES]=Uint32Array,t[SS]=Uint32Array,t[CS]=Uint32Array,t[IS]=Uint32Array}function wf(t){if(t instanceof Int8Array)return df;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)return Hs;if(t instanceof Int16Array)return pf;if(t instanceof Uint16Array)return gf;if(t instanceof Int32Array)return mf;if(t instanceof Uint32Array)return yf;if(t instanceof Float32Array)return bf;throw new Error("unsupported typed array type")}function TS(t){if(t===Int8Array)return df;if(t===Uint8Array||t===Uint8ClampedArray)return Hs;if(t===Int16Array)return pf;if(t===Uint16Array)return gf;if(t===Int32Array)return mf;if(t===Uint32Array)return yf;if(t===Float32Array)return bf;throw new Error("unsupported typed array type")}function DS(t){const e=wg[t];if(!e)throw new Error("unknown gl type");return e}const Gc=typeof SharedArrayBuffer<"u"?function(e){return e&&e.buffer&&(e.buffer instanceof ArrayBuffer||e.buffer instanceof SharedArrayBuffer)}:function(e){return e&&e.buffer&&e.buffer instanceof ArrayBuffer};function BS(...t){console.error(...t)}function xg(...t){console.warn(...t)}function kS(t,e){return typeof WebGLBuffer<"u"&&e instanceof WebGLBuffer}function vg(t,e){return typeof WebGLRenderbuffer<"u"&&e instanceof WebGLRenderbuffer}function Hc(t,e){return typeof WebGLTexture<"u"&&e instanceof WebGLTexture}function _S(t,e){return typeof WebGLSampler<"u"&&e instanceof WebGLSampler}const Ag=35044,Pn=34962,RS=34963,FS=34660,MS=5120,PS=5121,LS=5122,OS=5123,NS=5124,zS=5125,US=5126,Eg={attribPrefix:""};function Sg(t,e,n,r,o){t.bindBuffer(e,n),t.bufferData(e,r,o||Ag)}function Cg(t,e,n,r){if(kS(t,e))return e;n=n||Pn;const o=t.createBuffer();return Sg(t,n,o,e,r),o}function Ig(t){return t==="indices"}function GS(t){return t instanceof Int8Array||t instanceof Uint8Array}function HS(t){return t===Int8Array||t===Uint8Array}function VS(t){return t.length?t:t.data}const jS=/coord|texture/i,qS=/color|colour/i;function Tg(t,e){let n;if(jS.test(t)?n=2:qS.test(t)?n=4:n=3,e%n>0)throw new Error(`Can not guess numComponents for attribute '${t}'. Tried ${n} but ${e} values is not evenly divisible by ${n}. You should specify it.`);return n}function WS(t,e){return t.numComponents||t.size||Tg(e,VS(t).length)}function xf(t,e){if(Gc(t))return t;if(Gc(t.data))return t.data;Array.isArray(t)&&(t={data:t});let n=t.type;return n||(Ig(e)?n=Uint16Array:n=Float32Array),new n(t.data)}function YS(t,e){const n={};return Object.keys(e).forEach(function(r){if(!Ig(r)){const o=e[r],i=o.attrib||o.name||o.attribName||Eg.attribPrefix+r;if(o.value){if(!Array.isArray(o.value)&&!Gc(o.value))throw new Error("array.value is not array or typedarray");n[i]={value:o.value}}else{let s,a,c,l;if(o.buffer&&o.buffer instanceof WebGLBuffer)s=o.buffer,l=o.numComponents||o.size,a=o.type,c=o.normalize;else if(typeof o=="number"||typeof o.data=="number"){const u=o.data||o,f=o.type||Float32Array,d=u*f.BYTES_PER_ELEMENT;a=TS(f),c=o.normalize!==void 0?o.normalize:HS(f),l=o.numComponents||o.size||Tg(r,u),s=t.createBuffer(),t.bindBuffer(Pn,s),t.bufferData(Pn,d,o.drawType||Ag)}else{const u=xf(o,r);s=Cg(t,u,void 0,o.drawType),a=wf(u),c=o.normalize!==void 0?o.normalize:GS(u),l=WS(o,r)}n[i]={buffer:s,numComponents:l,type:a,normalize:c,stride:o.stride||0,offset:o.offset||0,divisor:o.divisor===void 0?void 0:o.divisor,drawType:o.drawType}}}}),t.bindBuffer(Pn,null),n}function QS(t,e,n,r){n=xf(n),r!==void 0?(t.bindBuffer(Pn,e.buffer),t.bufferSubData(Pn,r,n)):Sg(t,Pn,e.buffer,n,e.drawType)}function ZS(t,e){return e===MS||e===PS?1:e===LS||e===OS?2:e===NS||e===zS||e===US?4:0}const vf=["position","positions","a_position"];function XS(t,e){let n,r;for(r=0;r<vf.length&&(n=vf[r],!(n in e||(n=Eg.attribPrefix+n,n in e)));++r);r===vf.length&&(n=Object.keys(e)[0]);const o=e[n];if(!o.buffer)return 1;t.bindBuffer(Pn,o.buffer);const i=t.getBufferParameter(Pn,FS);t.bindBuffer(Pn,null);const s=ZS(t,o.type),a=i/s,c=o.numComponents||o.size,l=a/c;if(l%1!==0)throw new Error(`numComponents ${c} not correct for length ${length}`);return l}function KS(t,e,n){const r=YS(t,e),o=Object.assign({},n||{});o.attribs=Object.assign({},n?n.attribs:{},r);const i=e.indices;if(i){const s=xf(i,"indices");o.indices=Cg(t,s,RS),o.numElements=s.length,o.elementType=wf(s)}else o.numElements||(o.numElements=XS(t,o.attribs));return o}function to(t){return!!t.texStorage2D}const Af=function(){const t={},e={};function n(r){const o=r.constructor.name;if(!t[o]){for(const i in r)if(typeof r[i]=="number"){const s=e[r[i]];e[r[i]]=s?`${s} | ${i}`:i}t[o]=!0}}return function(o,i){return n(o),e[i]||(typeof i=="number"?`0x${i.toString(16)}`:i)}}(),br={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},no=Gc,Dg=function(){let t;return function(){return t=t||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),t}}(),Bg=6406,Ln=6407,st=6408,kg=6409,_g=6410,Vs=6402,Rg=34041,Vc=33071,JS=9728,$S=9729,Jn=3553,$n=34067,wr=32879,xr=35866,jc=34069,e4=34070,t4=34071,n4=34072,r4=34073,i4=34074,Ef=10241,Sf=10240,qc=10242,Wc=10243,Fg=32882,o4=33082,s4=33083,a4=33084,c4=33085,Cf=3317,Mg=3314,Pg=32878,Lg=3316,Og=3315,Ng=32877,l4=37443,u4=37441,f4=37440,h4=33321,d4=36756,p4=33325,g4=33326,m4=33330,y4=33329,b4=33338,w4=33337,x4=33340,v4=33339,A4=33323,E4=36757,S4=33327,C4=33328,I4=33336,T4=33335,D4=33332,B4=33331,k4=33334,_4=33333,R4=32849,F4=35905,M4=36194,P4=36758,L4=35898,O4=35901,N4=34843,z4=34837,U4=36221,G4=36239,H4=36215,V4=36233,j4=36209,q4=36227,W4=32856,Y4=35907,Q4=36759,Z4=32855,X4=32854,K4=32857,J4=34842,$4=34836,eC=36220,tC=36238,nC=36975,rC=36214,iC=36232,oC=36226,sC=36208,aC=33189,cC=33190,lC=36012,uC=36013,fC=35056,vr=5120,at=5121,Yc=5122,ro=5123,Qc=5124,ai=5125,Mt=5126,zg=32819,Ug=32820,Gg=33635,wn=5131,js=36193,If=33640,hC=35899,dC=35902,pC=36269,gC=34042,Zc=33319,io=33320,Xc=6403,oo=36244,so=36248,ci=36249;let Tf;function Kc(t){if(!Tf){const e={};e[Bg]={textureFormat:Bg,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,wn,js,Mt]},e[kg]={textureFormat:kg,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,wn,js,Mt]},e[_g]={textureFormat:_g,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[at,wn,js,Mt]},e[Ln]={textureFormat:Ln,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[at,wn,js,Mt,Gg]},e[st]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[at,wn,js,Mt,zg,Ug]},e[Vs]={textureFormat:Vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[ai,ro]},e[h4]={textureFormat:Xc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[at]},e[d4]={textureFormat:Xc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[vr]},e[p4]={textureFormat:Xc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Mt,wn]},e[g4]={textureFormat:Xc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[m4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[at]},e[y4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[vr]},e[D4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[ro]},e[B4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Yc]},e[k4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ai]},e[_4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Qc]},e[A4]={textureFormat:Zc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[at]},e[E4]={textureFormat:Zc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[vr]},e[S4]={textureFormat:Zc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Mt,wn]},e[C4]={textureFormat:Zc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Mt]},e[I4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[at]},e[T4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[vr]},e[b4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ro]},e[w4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Yc]},e[x4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[ai]},e[v4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Qc]},e[R4]={textureFormat:Ln,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[F4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[M4]={textureFormat:Ln,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[at,Gg]},e[P4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[vr]},e[L4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,wn,hC]},e[O4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,wn,dC]},e[N4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Mt,wn]},e[z4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Mt]},e[U4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[at]},e[G4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[vr]},e[H4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[ro]},e[V4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Yc]},e[j4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[ai]},e[q4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Qc]},e[W4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[Y4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[Q4]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[vr]},e[Z4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[at,Ug,If]},e[X4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[at,zg]},e[K4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[If]},e[J4]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Mt,wn]},e[$4]={textureFormat:st,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Mt]},e[eC]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[at]},e[tC]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[vr]},e[nC]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[If]},e[rC]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[ro]},e[iC]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Yc]},e[oC]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Qc]},e[sC]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[ai]},e[aC]={textureFormat:Vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[ro,ai]},e[cC]={textureFormat:Vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ai]},e[lC]={textureFormat:Vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[fC]={textureFormat:Rg,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[gC]},e[uC]={textureFormat:Rg,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[pC]},Object.keys(e).forEach(function(n){const r=e[n];r.bytesPerElementMap={},r.bytesPerElement.forEach(function(o,i){const s=r.type[i];r.bytesPerElementMap[s]=o})}),Tf=e}return Tf[t]}function mC(t,e){const n=Kc(t);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[e];if(r===void 0)throw"unknown internal format";return r}function ao(t){const e=Kc(t);if(!e)throw"unknown internal format";return{format:e.textureFormat,type:e.type[0]}}function Hg(t){return(t&t-1)===0}function yC(t,e,n,r){if(!to(t))return Hg(e)&&Hg(n);const o=Kc(r);if(!o)throw"unknown internal format";return o.colorRenderable&&o.textureFilterable}function bC(t){const e=Kc(t);if(!e)throw"unknown internal format";return e.textureFilterable}function Vg(t,e,n){return no(e)?wf(e):n||at}function Jc(t,e,n,r,o){if(o%1!==0)throw"can't guess dimensions";if(!n&&!r){const i=Math.sqrt(o/(e===$n?6:1));i%1===0?(n=i,r=i):(n=o,r=1)}else if(r){if(!n&&(n=o/r,n%1))throw"can't guess dimensions"}else if(r=o/n,r%1)throw"can't guess dimensions";return{width:n,height:r}}function co(t,e){e.colorspaceConversion!==void 0&&t.pixelStorei(l4,e.colorspaceConversion),e.premultiplyAlpha!==void 0&&t.pixelStorei(u4,e.premultiplyAlpha),e.flipY!==void 0&&t.pixelStorei(f4,e.flipY)}function jg(t){t.pixelStorei(Cf,4),to(t)&&(t.pixelStorei(Mg,0),t.pixelStorei(Pg,0),t.pixelStorei(Lg,0),t.pixelStorei(Og,0),t.pixelStorei(Ng,0))}function wC(t,e,n,r){r.minMag&&(n.call(t,e,Ef,r.minMag),n.call(t,e,Sf,r.minMag)),r.min&&n.call(t,e,Ef,r.min),r.mag&&n.call(t,e,Sf,r.mag),r.wrap&&(n.call(t,e,qc,r.wrap),n.call(t,e,Wc,r.wrap),(e===wr||_S(t,e))&&n.call(t,e,Fg,r.wrap)),r.wrapR&&n.call(t,e,Fg,r.wrapR),r.wrapS&&n.call(t,e,qc,r.wrapS),r.wrapT&&n.call(t,e,Wc,r.wrapT),r.minLod&&n.call(t,e,o4,r.minLod),r.maxLod&&n.call(t,e,s4,r.maxLod),r.baseLevel&&n.call(t,e,a4,r.baseLevel),r.maxLevel&&n.call(t,e,c4,r.maxLevel)}function qg(t,e,n){const r=n.target||Jn;t.bindTexture(r,e),wC(t,r,t.texParameteri,n)}function xC(t){return t=t||br.textureColor,no(t)?t:new Uint8Array([t[0]*255,t[1]*255,t[2]*255,t[3]*255])}function Df(t,e,n,r,o,i){n=n||br.textureOptions,i=i||st;const s=n.target||Jn;if(r=r||n.width,o=o||n.height,t.bindTexture(s,e),yC(t,r,o,i))t.generateMipmap(s);else{const a=bC(i)?$S:JS;t.texParameteri(s,Ef,a),t.texParameteri(s,Sf,a),t.texParameteri(s,qc,Vc),t.texParameteri(s,Wc,Vc)}}function qs(t){return t.auto===!0||t.auto===void 0&&t.level===void 0}function Bf(t,e){return e=e||{},e.cubeFaceOrder||[jc,e4,t4,n4,r4,i4]}function kf(t,e){const r=Bf(t,e).map(function(o,i){return{face:o,ndx:i}});return r.sort(function(o,i){return o.face-i.face}),r}function Wg(t,e,n,r){r=r||br.textureOptions;const o=r.target||Jn,i=r.level||0;let s=n.width,a=n.height;const c=r.internalFormat||r.format||st,l=ao(c),u=r.format||l.format,f=r.type||l.type;if(co(t,r),t.bindTexture(o,e),o===$n){const d=n.width,h=n.height;let p,y;if(d/6===h)p=h,y=[0,0,1,0,2,0,3,0,4,0,5,0];else if(h/6===d)p=d,y=[0,0,0,1,0,2,0,3,0,4,0,5];else if(d/3===h/2)p=d/3,y=[0,0,1,0,2,0,0,1,1,1,2,1];else if(d/2===h/3)p=d/2,y=[0,0,1,0,0,1,1,1,0,2,1,2];else throw"can't figure out cube map from element: "+(n.src?n.src:n.nodeName);const v=Dg();v?(v.canvas.width=p,v.canvas.height=p,s=p,a=p,kf(t,r).forEach(function(b){const A=y[b.ndx*2+0]*p,S=y[b.ndx*2+1]*p;v.drawImage(n,A,S,p,p,0,0,p,p),t.texImage2D(b.face,i,c,u,f,v.canvas)}),v.canvas.width=1,v.canvas.height=1):typeof createImageBitmap<"u"&&(s=p,a=p,kf(t,r).forEach(function(b){const A=y[b.ndx*2+0]*p,S=y[b.ndx*2+1]*p;t.texImage2D(b.face,i,c,p,p,0,u,f,null),createImageBitmap(n,A,S,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(E){co(t,r),t.bindTexture(o,e),t.texImage2D(b.face,i,c,u,f,E),qs(r)&&Df(t,e,r,s,a,c)})}))}else if(o===wr||o===xr){const d=Math.min(n.width,n.height),h=Math.max(n.width,n.height),p=h/d;if(p%1!==0)throw"can not compute 3D dimensions of element";const y=n.width===h?1:0,v=n.height===h?1:0;t.pixelStorei(Cf,1),t.pixelStorei(Mg,n.width),t.pixelStorei(Pg,0),t.pixelStorei(Ng,0),t.texImage3D(o,i,c,d,d,d,0,u,f,null);for(let b=0;b<p;++b){const A=b*d*y,S=b*d*v;t.pixelStorei(Lg,A),t.pixelStorei(Og,S),t.texSubImage3D(o,i,0,0,b,d,d,1,u,f,n)}jg(t)}else t.texImage2D(o,i,c,u,f,n);qs(r)&&Df(t,e,r,s,a,c),qg(t,e,r)}function Ws(){}function vC(t){if(typeof document<"u"){const e=document.createElement("a");return e.href=t,e.hostname===location.hostname&&e.port===location.port&&e.protocol===location.protocol}else{const e=new URL(location.href).origin;return new URL(t,location.href).origin===e}}function AC(t,e){return e===void 0&&!vC(t)?"anonymous":e}function EC(t,e,n){n=n||Ws;let r;if(e=e!==void 0?e:br.crossOrigin,e=AC(t,e),typeof Image<"u"){r=new Image,e!==void 0&&(r.crossOrigin=e);const o=function(){r.removeEventListener("error",i),r.removeEventListener("load",s),r=null},i=function(){const c="couldn't load image: "+t;BS(c),n(c,r),o()},s=function(){n(null,r),o()};return r.addEventListener("error",i),r.addEventListener("load",s),r.src=t,r}else if(typeof ImageBitmap<"u"){let o,i;const s=function(){n(o,i)},a={};e&&(a.mode="cors"),fetch(t,a).then(function(c){if(!c.ok)throw c;return c.blob()}).then(function(c){return createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(c){i=c,setTimeout(s)}).catch(function(c){o=c,setTimeout(s)}),r=null}return r}function Yg(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof ImageData<"u"&&t instanceof ImageData||typeof HTMLElement<"u"&&t instanceof HTMLElement}function _f(t,e,n){return Yg(t)?(setTimeout(function(){n(null,t)}),t):EC(t,e,n)}function Rf(t,e,n){n=n||br.textureOptions;const r=n.target||Jn;if(t.bindTexture(r,e),n.color===!1)return;const o=xC(n.color);if(r===$n)for(let i=0;i<6;++i)t.texImage2D(jc+i,0,st,1,1,0,st,at,o);else r===wr||r===xr?t.texImage3D(r,0,st,1,1,1,0,st,at,o):t.texImage2D(r,0,st,1,1,0,st,at,o)}function SC(t,e,n,r){return r=r||Ws,n=n||br.textureOptions,Rf(t,e,n),n=Object.assign({},n),_f(n.src,n.crossOrigin,function(i,s){i?r(i,e,s):(Wg(t,e,s,n),r(null,e,s))})}function CC(t,e,n,r){r=r||Ws;const o=n.src;if(o.length!==6)throw"there must be 6 urls for a cubemap";const i=n.level||0,s=n.internalFormat||n.format||st,a=ao(s),c=n.format||a.format,l=n.type||at,u=n.target||Jn;if(u!==$n)throw"target must be TEXTURE_CUBE_MAP";Rf(t,e,n),n=Object.assign({},n);let f=6;const d=[],h=Bf(t,n);let p;function y(v){return function(b,A){--f,b?d.push(b):A.width!==A.height?d.push("cubemap face img is not a square: "+A.src):(co(t,n),t.bindTexture(u,e),f===5?Bf().forEach(function(S){t.texImage2D(S,i,s,c,l,A)}):t.texImage2D(v,i,s,c,l,A),qs(n)&&t.generateMipmap(u)),f===0&&r(d.length?d:void 0,e,p)}}p=o.map(function(v,b){return _f(v,n.crossOrigin,y(h[b]))})}function IC(t,e,n,r){r=r||Ws;const o=n.src,i=n.internalFormat||n.format||st,s=ao(i),a=n.format||s.format,c=n.type||at,l=n.target||xr;if(l!==wr&&l!==xr)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";Rf(t,e,n),n=Object.assign({},n);let u=o.length;const f=[];let d;const h=n.level||0;let p=n.width,y=n.height;const v=o.length;let b=!0;function A(S){return function(E,I){if(--u,E)f.push(E);else{if(co(t,n),t.bindTexture(l,e),b){b=!1,p=n.width||I.width,y=n.height||I.height,t.texImage3D(l,h,i,p,y,v,0,a,c,null);for(let _=0;_<v;++_)t.texSubImage3D(l,h,0,0,_,p,y,1,a,c,I)}else{let _=I,B;(I.width!==p||I.height!==y)&&(B=Dg(),_=B.canvas,B.canvas.width=p,B.canvas.height=y,B.drawImage(I,0,0,p,y)),t.texSubImage3D(l,h,0,0,S,p,y,1,a,c,_),B&&_===B.canvas&&(B.canvas.width=0,B.canvas.height=0)}qs(n)&&t.generateMipmap(l)}u===0&&r(f.length?f:void 0,e,d)}}d=o.map(function(S,E){return _f(S,n.crossOrigin,A(E))})}function Qg(t,e,n,r){r=r||br.textureOptions;const o=r.target||Jn;t.bindTexture(o,e);let i=r.width,s=r.height,a=r.depth;const c=r.level||0,l=r.internalFormat||r.format||st,u=ao(l),f=r.format||u.format,d=r.type||Vg(t,n,u.type);if(no(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const v=DS(d);n=new v(n)}const h=mC(l,d),p=n.byteLength/h;if(p%1)throw"length wrong size for format: "+Af(t,f);let y;if(o===wr||o===xr)if(!i&&!s&&!a){const v=Math.cbrt(p);if(v%1!==0)throw"can't guess cube size of array of numElements: "+p;i=v,s=v,a=v}else i&&(!s||!a)?(y=Jc(t,o,s,a,p/i),s=y.width,a=y.height):s&&(!i||!a)?(y=Jc(t,o,i,a,p/s),i=y.width,a=y.height):(y=Jc(t,o,i,s,p/a),i=y.width,s=y.height);else y=Jc(t,o,i,s,p),i=y.width,s=y.height;if(jg(t),t.pixelStorei(Cf,r.unpackAlignment||1),co(t,r),o===$n){const v=h/n.BYTES_PER_ELEMENT,b=p/6*v;kf(t,r).forEach(A=>{const S=b*A.ndx,E=n.subarray(S,S+b);t.texImage2D(A.face,c,l,i,s,0,f,d,E)})}else o===wr||o===xr?t.texImage3D(o,c,l,i,s,a,0,f,d,n):t.texImage2D(o,c,l,i,s,0,f,d,n);return{width:i,height:s,depth:a,type:d}}function TC(t,e,n){const r=n.target||Jn;t.bindTexture(r,e);const o=n.level||0,i=n.internalFormat||n.format||st,s=ao(i),a=n.format||s.format,c=n.type||s.type;if(co(t,n),r===$n)for(let l=0;l<6;++l)t.texImage2D(jc+l,o,i,n.width,n.height,0,a,c,null);else r===wr||r===xr?t.texImage3D(r,o,i,n.width,n.height,n.depth,0,a,c,null):t.texImage2D(r,o,i,n.width,n.height,0,a,c,null)}function Ys(t,e,n){n=n||Ws,e=e||br.textureOptions;const r=t.createTexture(),o=e.target||Jn;let i=e.width||1,s=e.height||1;const a=e.internalFormat||st;t.bindTexture(o,r),o===$n&&(t.texParameteri(o,qc,Vc),t.texParameteri(o,Wc,Vc));let c=e.src;if(c)if(typeof c=="function"&&(c=c(t,e)),typeof c=="string")SC(t,r,e,n);else if(no(c)||Array.isArray(c)&&(typeof c[0]=="number"||Array.isArray(c[0])||no(c[0]))){const l=Qg(t,r,c,e);i=l.width,s=l.height}else Array.isArray(c)&&(typeof c[0]=="string"||Yg(c[0]))?o===$n?CC(t,r,e,n):IC(t,r,e,n):(Wg(t,r,c,e),i=c.width,s=c.height);else TC(t,r,e);return qs(e)&&Df(t,r,e,i,s,a),qg(t,r,e),r}function DC(t,e,n,r,o,i){r=r||n.width,o=o||n.height,i=i||n.depth;const s=n.target||Jn;t.bindTexture(s,e);const a=n.level||0,c=n.internalFormat||n.format||st,l=ao(c),u=n.format||l.format;let f;const d=n.src;if(d&&(no(d)||Array.isArray(d)&&typeof d[0]=="number")?f=n.type||Vg(t,d,l.type):f=n.type||l.type,s===$n)for(let h=0;h<6;++h)t.texImage2D(jc+h,a,c,r,o,0,u,f,null);else s===wr||s===xr?t.texImage3D(s,a,c,r,o,i,0,u,f,null):t.texImage2D(s,a,c,r,o,0,u,f,null)}const BC=xg,$c=33984,kC=35048,el=34962,_C=34963,Ff=35345,Zg=35718,RC=35721,FC=35971,MC=35382,PC=35396,LC=35398,OC=35392,NC=35395,tl=5126,Xg=35664,Kg=35665,Jg=35666,Mf=5124,$g=35667,em=35668,tm=35669,nm=35670,rm=35671,im=35672,om=35673,sm=35674,am=35675,cm=35676,zC=35678,UC=35680,GC=35679,HC=35682,VC=35685,jC=35686,qC=35687,WC=35688,YC=35689,QC=35690,ZC=36289,XC=36292,KC=36293,Pf=5125,lm=36294,um=36295,fm=36296,JC=36298,$C=36299,e6=36300,t6=36303,n6=36306,r6=36307,i6=36308,o6=36311,nl=3553,rl=34067,Lf=32879,il=35866,Oe={};function hm(t,e){return Oe[e].bindPoint}function s6(t,e){return function(n){t.uniform1f(e,n)}}function a6(t,e){return function(n){t.uniform1fv(e,n)}}function c6(t,e){return function(n){t.uniform2fv(e,n)}}function l6(t,e){return function(n){t.uniform3fv(e,n)}}function u6(t,e){return function(n){t.uniform4fv(e,n)}}function dm(t,e){return function(n){t.uniform1i(e,n)}}function pm(t,e){return function(n){t.uniform1iv(e,n)}}function gm(t,e){return function(n){t.uniform2iv(e,n)}}function mm(t,e){return function(n){t.uniform3iv(e,n)}}function ym(t,e){return function(n){t.uniform4iv(e,n)}}function f6(t,e){return function(n){t.uniform1ui(e,n)}}function h6(t,e){return function(n){t.uniform1uiv(e,n)}}function d6(t,e){return function(n){t.uniform2uiv(e,n)}}function p6(t,e){return function(n){t.uniform3uiv(e,n)}}function g6(t,e){return function(n){t.uniform4uiv(e,n)}}function m6(t,e){return function(n){t.uniformMatrix2fv(e,!1,n)}}function y6(t,e){return function(n){t.uniformMatrix3fv(e,!1,n)}}function b6(t,e){return function(n){t.uniformMatrix4fv(e,!1,n)}}function w6(t,e){return function(n){t.uniformMatrix2x3fv(e,!1,n)}}function x6(t,e){return function(n){t.uniformMatrix3x2fv(e,!1,n)}}function v6(t,e){return function(n){t.uniformMatrix2x4fv(e,!1,n)}}function A6(t,e){return function(n){t.uniformMatrix4x2fv(e,!1,n)}}function E6(t,e){return function(n){t.uniformMatrix3x4fv(e,!1,n)}}function S6(t,e){return function(n){t.uniformMatrix4x3fv(e,!1,n)}}function Vt(t,e,n,r){const o=hm(t,e);return to(t)?function(i){let s,a;Hc(t,i)?(s=i,a=null):(s=i.texture,a=i.sampler),t.uniform1i(r,n),t.activeTexture($c+n),t.bindTexture(o,s),t.bindSampler(n,a)}:function(i){t.uniform1i(r,n),t.activeTexture($c+n),t.bindTexture(o,i)}}function jt(t,e,n,r,o){const i=hm(t,e),s=new Int32Array(o);for(let a=0;a<o;++a)s[a]=n+a;return to(t)?function(a){t.uniform1iv(r,s),a.forEach(function(c,l){t.activeTexture($c+s[l]);let u,f;Hc(t,c)?(u=c,f=null):(u=c.texture,f=c.sampler),t.bindSampler(n,f),t.bindTexture(i,u)})}:function(a){t.uniform1iv(r,s),a.forEach(function(c,l){t.activeTexture($c+s[l]),t.bindTexture(i,c)})}}Oe[tl]={Type:Float32Array,size:4,setter:s6,arraySetter:a6},Oe[Xg]={Type:Float32Array,size:8,setter:c6,cols:2},Oe[Kg]={Type:Float32Array,size:12,setter:l6,cols:3},Oe[Jg]={Type:Float32Array,size:16,setter:u6,cols:4},Oe[Mf]={Type:Int32Array,size:4,setter:dm,arraySetter:pm},Oe[$g]={Type:Int32Array,size:8,setter:gm,cols:2},Oe[em]={Type:Int32Array,size:12,setter:mm,cols:3},Oe[tm]={Type:Int32Array,size:16,setter:ym,cols:4},Oe[Pf]={Type:Uint32Array,size:4,setter:f6,arraySetter:h6},Oe[lm]={Type:Uint32Array,size:8,setter:d6,cols:2},Oe[um]={Type:Uint32Array,size:12,setter:p6,cols:3},Oe[fm]={Type:Uint32Array,size:16,setter:g6,cols:4},Oe[nm]={Type:Uint32Array,size:4,setter:dm,arraySetter:pm},Oe[rm]={Type:Uint32Array,size:8,setter:gm,cols:2},Oe[im]={Type:Uint32Array,size:12,setter:mm,cols:3},Oe[om]={Type:Uint32Array,size:16,setter:ym,cols:4},Oe[sm]={Type:Float32Array,size:32,setter:m6,rows:2,cols:2},Oe[am]={Type:Float32Array,size:48,setter:y6,rows:3,cols:3},Oe[cm]={Type:Float32Array,size:64,setter:b6,rows:4,cols:4},Oe[VC]={Type:Float32Array,size:32,setter:w6,rows:2,cols:3},Oe[jC]={Type:Float32Array,size:32,setter:v6,rows:2,cols:4},Oe[qC]={Type:Float32Array,size:48,setter:x6,rows:3,cols:2},Oe[WC]={Type:Float32Array,size:48,setter:E6,rows:3,cols:4},Oe[YC]={Type:Float32Array,size:64,setter:A6,rows:4,cols:2},Oe[QC]={Type:Float32Array,size:64,setter:S6,rows:4,cols:3},Oe[zC]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:nl},Oe[UC]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:rl},Oe[GC]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:Lf},Oe[HC]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:nl},Oe[ZC]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:il},Oe[XC]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:il},Oe[KC]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:rl},Oe[JC]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:nl},Oe[$C]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:Lf},Oe[e6]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:rl},Oe[t6]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:il},Oe[n6]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:nl},Oe[r6]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:Lf},Oe[i6]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:rl},Oe[o6]={Type:null,size:0,setter:Vt,arraySetter:jt,bindPoint:il};function ol(t,e){return function(n){if(n.value)switch(t.disableVertexAttribArray(e),n.value.length){case 4:t.vertexAttrib4fv(e,n.value);break;case 3:t.vertexAttrib3fv(e,n.value);break;case 2:t.vertexAttrib2fv(e,n.value);break;case 1:t.vertexAttrib1fv(e,n.value);break;default:throw new Error("the length of a float constant value must be between 1 and 4!")}else t.bindBuffer(el,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribPointer(e,n.numComponents||n.size,n.type||tl,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function Ar(t,e){return function(n){if(n.value)if(t.disableVertexAttribArray(e),n.value.length===4)t.vertexAttrib4iv(e,n.value);else throw new Error("The length of an integer constant value must be 4!");else t.bindBuffer(el,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||Mf,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function sl(t,e){return function(n){if(n.value)if(t.disableVertexAttribArray(e),n.value.length===4)t.vertexAttrib4uiv(e,n.value);else throw new Error("The length of an unsigned integer constant value must be 4!");else t.bindBuffer(el,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||Pf,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function Of(t,e,n){const r=n.size,o=n.count;return function(i){t.bindBuffer(el,i.buffer);const s=i.size||i.numComponents||r,a=s/o,c=i.type||tl,u=Oe[c].size*s,f=i.normalize||!1,d=i.offset||0,h=u/o;for(let p=0;p<o;++p)t.enableVertexAttribArray(e+p),t.vertexAttribPointer(e+p,a,c,f,u,d+h*p),i.divisor!==void 0&&t.vertexAttribDivisor(e+p,i.divisor)}}const gt={};gt[tl]={size:4,setter:ol},gt[Xg]={size:8,setter:ol},gt[Kg]={size:12,setter:ol},gt[Jg]={size:16,setter:ol},gt[Mf]={size:4,setter:Ar},gt[$g]={size:8,setter:Ar},gt[em]={size:12,setter:Ar},gt[tm]={size:16,setter:Ar},gt[Pf]={size:4,setter:sl},gt[lm]={size:8,setter:sl},gt[um]={size:12,setter:sl},gt[fm]={size:16,setter:sl},gt[nm]={size:4,setter:Ar},gt[rm]={size:8,setter:Ar},gt[im]={size:12,setter:Ar},gt[om]={size:16,setter:Ar},gt[sm]={size:4,setter:Of,count:2},gt[am]={size:9,setter:Of,count:3},gt[cm]={size:16,setter:Of,count:4};function bm(t){const e=t.name;return e.startsWith("gl_")||e.startsWith("webgl_")}const C6=/(\.|\[|]|\w+)/g,I6=t=>t>="0"&&t<="9";function wm(t,e,n,r){const o=t.split(C6).filter(a=>a!=="");let i=0,s="";for(;;){const a=o[i++];s+=a;const c=I6(a[0]),l=c?parseInt(a):a;if(c&&(s+=o[i++]),i===o.length){n[l]=e;break}else{const f=o[i++],d=f==="[",h=n[l]||(d?[]:{});n[l]=h,n=h,r[s]=r[s]||function(p){return function(y){Sm(p,y)}}(h),s+=f}}}function T6(t,e){let n=0;function r(a,c,l){const u=c.name.endsWith("[0]"),f=c.type,d=Oe[f];if(!d)throw new Error(`unknown type: 0x${f.toString(16)}`);let h;if(d.bindPoint){const p=n;n+=c.size,u?h=d.arraySetter(t,f,p,l,c.size):h=d.setter(t,f,p,l,c.size)}else d.arraySetter&&u?h=d.arraySetter(t,l):h=d.setter(t,l);return h.location=l,h}const o={},i={},s=t.getProgramParameter(e,Zg);for(let a=0;a<s;++a){const c=t.getActiveUniform(e,a);if(bm(c))continue;let l=c.name;l.endsWith("[0]")&&(l=l.substr(0,l.length-3));const u=t.getUniformLocation(e,c.name);if(u){const f=r(e,c,u);o[l]=f,wm(l,f,i,o)}}return o}function D6(t,e){const n={},r=t.getProgramParameter(e,FC);for(let o=0;o<r;++o){const i=t.getTransformFeedbackVarying(e,o);n[i.name]={index:o,type:i.type,size:i.size}}return n}function B6(t,e){const n=t.getProgramParameter(e,Zg),r=[],o=[];for(let a=0;a<n;++a){o.push(a),r.push({});const c=t.getActiveUniform(e,a);r[a].name=c.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(a){const c=a[0],l=a[1];t.getActiveUniforms(e,o,t[c]).forEach(function(u,f){r[f][l]=u})});const i={},s=t.getProgramParameter(e,MC);for(let a=0;a<s;++a){const c=t.getActiveUniformBlockName(e,a),l={index:t.getUniformBlockIndex(e,c),usedByVertexShader:t.getActiveUniformBlockParameter(e,a,PC),usedByFragmentShader:t.getActiveUniformBlockParameter(e,a,LC),size:t.getActiveUniformBlockParameter(e,a,OC),uniformIndices:t.getActiveUniformBlockParameter(e,a,NC)};l.used=l.usedByVertexShader||l.usedByFragmentShader,i[c]=l}return{blockSpecs:i,uniformData:r}}const xm=/\[\d+\]\.$/,k6=(t,e)=>((t+(e-1))/e|0)*e;function _6(t,e,n,r){if(e||n){r=r||1;const i=t.length/4;return function(s){let a=0,c=0;for(let l=0;l<i;++l){for(let u=0;u<r;++u)t[a++]=s[c++];a+=4-r}}}else return function(o){o.length?t.set(o):t[0]=o}}function R6(t,e,n,r){const o=n.blockSpecs,i=n.uniformData,s=o[r];if(!s)return BC("no uniform block object named:",r),{name:r,uniforms:{}};const a=new ArrayBuffer(s.size),c=t.createBuffer(),l=s.index;t.bindBuffer(Ff,c),t.uniformBlockBinding(e,s.index,l);let u=r+".";xm.test(u)&&(u=u.replace(xm,"."));const f={},d={},h={};return s.uniformIndices.forEach(function(p){const y=i[p];let v=y.name;v.startsWith(u)&&(v=v.substr(u.length));const b=v.endsWith("[0]");b&&(v=v.substr(0,v.length-3));const A=Oe[y.type],S=A.Type,E=b?k6(A.size,16)*y.size:A.size*y.size,I=new S(a,y.offset,E/S.BYTES_PER_ELEMENT);f[v]=I;const _=_6(I,b,A.rows,A.cols);d[v]=_,wm(v,_,h,d)}),{name:r,array:a,asFloat:new Float32Array(a),buffer:c,uniforms:f,setters:d}}function vm(t,e,n){return R6(t,e.program,e.uniformBlockSpec,n)}function Am(t,e,n){const o=(e.uniformBlockSpec||e).blockSpecs[n.name];if(o){const i=o.index;return t.bindBufferRange(Ff,i,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function Em(t,e,n){Am(t,e,n)&&t.bufferData(Ff,n.array,kC)}function Qs(t,e){const n=t.setters;for(const r in e){const o=n[r];if(o){const i=e[r];o(i)}}}function Sm(t,e){for(const n in e){const r=t[n];typeof r=="function"?r(e[n]):Sm(t[n],e[n])}}function li(t,...e){const n=t.uniformSetters||t,r=e.length;for(let o=0;o<r;++o){const i=e[o];if(Array.isArray(i)){const s=i.length;for(let a=0;a<s;++a)li(n,i[a])}else for(const s in i){const a=n[s];a&&a(i[s])}}}function F6(t,e){const n={},r=t.getProgramParameter(e,RC);for(let o=0;o<r;++o){const i=t.getActiveAttrib(e,o);if(bm(i))continue;const s=t.getAttribLocation(e,i.name),a=gt[i.type],c=a.setter(t,s,a);c.location=s,n[i.name]=c}return n}function M6(t,e){for(const n in e){const r=t[n];r&&r(e[n])}}function ui(t,e,n){n.vertexArrayObject?t.bindVertexArray(n.vertexArrayObject):(M6(e.attribSetters||e,n.attribs),n.indices&&t.bindBuffer(_C,n.indices))}function P6(t,e){const n=T6(t,e),r=F6(t,e),o={program:e,uniformSetters:n,attribSetters:r};return to(t)&&(o.uniformBlockSpec=B6(t,e),o.transformFeedbackInfo=D6(t,e)),o}const L6=4,Cm=5123;function al(t,e,n,r,o,i){n=n===void 0?L6:n;const s=e.indices,a=e.elementType,c=r===void 0?e.numElements:r;o=o===void 0?0:o,a||s?i!==void 0?t.drawElementsInstanced(n,c,a===void 0?Cm:e.elementType,o,i):t.drawElements(n,c,a===void 0?Cm:e.elementType,o):i!==void 0?t.drawArraysInstanced(n,o,c,i):t.drawArrays(n,o,c)}const O6=36160,fi=36161,N6=3553,z6=5121,U6=6402,G6=6408,H6=33190,V6=36012,j6=35056,q6=36013,W6=32854,Y6=32855,Q6=36194,Im=33189,Tm=6401,Dm=36168,Nf=34041,zf=36064,cl=36096,Bm=36128,Uf=33306,Gf=33071,Hf=9729,km=[{format:G6,type:z6,min:Hf,wrap:Gf},{format:Nf}],xn={};xn[Nf]=Uf,xn[Tm]=Bm,xn[Dm]=Bm,xn[U6]=cl,xn[Im]=cl,xn[H6]=cl,xn[V6]=cl,xn[j6]=Uf,xn[q6]=Uf;function Z6(t,e){return xn[t]||xn[e]}const Er={};Er[W6]=!0,Er[Y6]=!0,Er[Q6]=!0,Er[Nf]=!0,Er[Im]=!0,Er[Tm]=!0,Er[Dm]=!0;function X6(t){return Er[t]}const K6=32;function J6(t){return t>=zf&&t<zf+K6}function _m(t,e,n,r){const o=O6,i=t.createFramebuffer();t.bindFramebuffer(o,i),n=n||t.drawingBufferWidth,r=r||t.drawingBufferHeight,e=e||km;const s=[],a={framebuffer:i,attachments:[],width:n,height:r};return e.forEach(function(c,l){let u=c.attachment;const f=c.samples,d=c.format;let h=c.attachmentPoint||Z6(d,c.internalFormat);if(h||(h=zf+l),J6(h)&&s.push(h),!u)if(f!==void 0||X6(d))u=t.createRenderbuffer(),t.bindRenderbuffer(fi,u),f>1?t.renderbufferStorageMultisample(fi,f,d,n,r):t.renderbufferStorage(fi,d,n,r);else{const p=Object.assign({},c);p.width=n,p.height=r,p.auto===void 0&&(p.auto=!1,p.min=p.min||p.minMag||Hf,p.mag=p.mag||p.minMag||Hf,p.wrapS=p.wrapS||p.wrap||Gf,p.wrapT=p.wrapT||p.wrap||Gf),u=Ys(t,p)}if(vg(t,u))t.framebufferRenderbuffer(o,h,fi,u);else if(Hc(t,u))c.layer!==void 0?t.framebufferTextureLayer(o,h,u,c.level||0,c.layer):t.framebufferTexture2D(o,h,c.target||N6,u,c.level||0);else throw new Error("unknown attachment type");a.attachments.push(u)}),t.drawBuffers&&t.drawBuffers(s),a}function $6(t,e,n,r,o){r=r||t.drawingBufferWidth,o=o||t.drawingBufferHeight,e.width=r,e.height=o,n=n||km,n.forEach(function(i,s){const a=e.attachments[s],c=i.format,l=i.samples;if(l!==void 0||vg(t,a))t.bindRenderbuffer(fi,a),l>1?t.renderbufferStorageMultisample(fi,l,c,r,o):t.renderbufferStorage(fi,c,r,o);else if(Hc(t,a))DC(t,a,i,r,o);else throw new Error("unknown attachment type")})}function e8(t,e,n){const r=t.createVertexArray();return t.bindVertexArray(r),e.length||(e=[e]),e.forEach(function(o){ui(t,o,n)}),t.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const t8=/^(.*?)_/;function n8(t,e){Af(t,0);const n=t.getExtension(e);if(n){const r={},o=t8.exec(e)[1],i="_"+o;for(const s in n){const a=n[s],c=typeof a=="function",l=c?o:i;let u=s;s.endsWith(l)&&(u=s.substring(0,s.length-l.length)),t[u]!==void 0?!c&&t[u]!==a&&xg(u,t[u],a,s):c?t[u]=function(f){return function(){return f.apply(n,arguments)}}(a):(t[u]=a,r[u]=a)}r.constructor={name:n.constructor.name},Af(r,0)}return n}const Rm=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_color_buffer_float","EXT_color_buffer_half_float","EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2","EXT_frag_depth","EXT_sRGB","EXT_shader_texture_lod","EXT_texture_filter_anisotropic","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_compressed_texture_atc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_pvrtc","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_depth_texture","WEBGL_draw_buffers"];function Fm(t){for(let e=0;e<Rm.length;++e)n8(t,Rm[e])}function r8(t,e){const n=["webgl2","webgl","experimental-webgl"];let r=null;for(let o=0;o<n.length;++o)if(r=t.getContext(n[o],e),r){Fm(r);break}return r}function i8(t,e){return r8(t,e)}const o8=`flat out lowp vec4 vFillColor;flat out lowp vec4 vStrokeColor;flat out float vHalfStrokeWidth;flat out vec4 vCornerRadii;
|
|
307
|
+
see: http://github.com/greggman/twgl.js for details */const pl=5120,to=5121,ml=5122,gl=5123,yl=5124,bl=5125,xl=5126,Kv=32819,Jv=32820,$v=33635,e3=5131,t3=33640,n3=35899,r3=35902,i3=36269,s3=34042,Q0={};{const n=Q0;n[pl]=Int8Array,n[to]=Uint8Array,n[ml]=Int16Array,n[gl]=Uint16Array,n[yl]=Int32Array,n[bl]=Uint32Array,n[xl]=Float32Array,n[Kv]=Uint16Array,n[Jv]=Uint16Array,n[$v]=Uint16Array,n[e3]=Uint16Array,n[t3]=Uint32Array,n[n3]=Uint32Array,n[r3]=Uint32Array,n[i3]=Uint32Array,n[s3]=Uint32Array}function Al(n){if(n instanceof Int8Array)return pl;if(n instanceof Uint8Array||n instanceof Uint8ClampedArray)return to;if(n instanceof Int16Array)return ml;if(n instanceof Uint16Array)return gl;if(n instanceof Int32Array)return yl;if(n instanceof Uint32Array)return bl;if(n instanceof Float32Array)return xl;throw new Error("unsupported typed array type")}function o3(n){if(n===Int8Array)return pl;if(n===Uint8Array||n===Uint8ClampedArray)return to;if(n===Int16Array)return ml;if(n===Uint16Array)return gl;if(n===Int32Array)return yl;if(n===Uint32Array)return bl;if(n===Float32Array)return xl;throw new Error("unsupported typed array type")}function a3(n){const e=Q0[n];if(!e)throw new Error("unknown gl type");return e}const ec=typeof SharedArrayBuffer<"u"?function(e){return e&&e.buffer&&(e.buffer instanceof ArrayBuffer||e.buffer instanceof SharedArrayBuffer)}:function(e){return e&&e.buffer&&e.buffer instanceof ArrayBuffer};function c3(...n){console.error(...n)}function W0(...n){console.warn(...n)}function u3(n,e){return typeof WebGLBuffer<"u"&&e instanceof WebGLBuffer}function q0(n,e){return typeof WebGLRenderbuffer<"u"&&e instanceof WebGLRenderbuffer}function tc(n,e){return typeof WebGLTexture<"u"&&e instanceof WebGLTexture}function l3(n,e){return typeof WebGLSampler<"u"&&e instanceof WebGLSampler}const Y0=35044,Ut=34962,f3=34963,h3=34660,d3=5120,p3=5121,m3=5122,g3=5123,y3=5124,b3=5125,x3=5126,X0={attribPrefix:""};function Z0(n,e,t,r,i){n.bindBuffer(e,t),n.bufferData(e,r,i||Y0)}function K0(n,e,t,r){if(u3(n,e))return e;t=t||Ut;const i=n.createBuffer();return Z0(n,t,i,e,r),i}function J0(n){return n==="indices"}function A3(n){return n instanceof Int8Array||n instanceof Uint8Array}function w3(n){return n===Int8Array||n===Uint8Array}function v3(n){return n.length?n:n.data}const S3=/coord|texture/i,E3=/color|colour/i;function $0(n,e){let t;if(S3.test(n)?t=2:E3.test(n)?t=4:t=3,e%t>0)throw new Error(`Can not guess numComponents for attribute '${n}'. Tried ${t} but ${e} values is not evenly divisible by ${t}. You should specify it.`);return t}function C3(n,e){return n.numComponents||n.size||$0(e,v3(n).length)}function wl(n,e){if(ec(n))return n;if(ec(n.data))return n.data;Array.isArray(n)&&(n={data:n});let t=n.type;return t||(J0(e)?t=Uint16Array:t=Float32Array),new t(n.data)}function D3(n,e){const t={};return Object.keys(e).forEach(function(r){if(!J0(r)){const i=e[r],s=i.attrib||i.name||i.attribName||X0.attribPrefix+r;if(i.value){if(!Array.isArray(i.value)&&!ec(i.value))throw new Error("array.value is not array or typedarray");t[s]={value:i.value}}else{let o,a,c,u;if(i.buffer&&i.buffer instanceof WebGLBuffer)o=i.buffer,u=i.numComponents||i.size,a=i.type,c=i.normalize;else if(typeof i=="number"||typeof i.data=="number"){const l=i.data||i,f=i.type||Float32Array,d=l*f.BYTES_PER_ELEMENT;a=o3(f),c=i.normalize!==void 0?i.normalize:w3(f),u=i.numComponents||i.size||$0(r,l),o=n.createBuffer(),n.bindBuffer(Ut,o),n.bufferData(Ut,d,i.drawType||Y0)}else{const l=wl(i,r);o=K0(n,l,void 0,i.drawType),a=Al(l),c=i.normalize!==void 0?i.normalize:A3(l),u=C3(i,r)}t[s]={buffer:o,numComponents:u,type:a,normalize:c,stride:i.stride||0,offset:i.offset||0,divisor:i.divisor===void 0?void 0:i.divisor,drawType:i.drawType}}}}),n.bindBuffer(Ut,null),t}function I3(n,e,t,r){t=wl(t),r!==void 0?(n.bindBuffer(Ut,e.buffer),n.bufferSubData(Ut,r,t)):Z0(n,Ut,e.buffer,t,e.drawType)}function T3(n,e){return e===d3||e===p3?1:e===m3||e===g3?2:e===y3||e===b3||e===x3?4:0}const vl=["position","positions","a_position"];function B3(n,e){let t,r;for(r=0;r<vl.length&&(t=vl[r],!(t in e||(t=X0.attribPrefix+t,t in e)));++r);r===vl.length&&(t=Object.keys(e)[0]);const i=e[t];if(!i.buffer)return 1;n.bindBuffer(Ut,i.buffer);const s=n.getBufferParameter(Ut,h3);n.bindBuffer(Ut,null);const o=T3(n,i.type),a=s/o,c=i.numComponents||i.size,u=a/c;if(u%1!==0)throw new Error(`numComponents ${c} not correct for length ${length}`);return u}function k3(n,e,t){const r=D3(n,e),i=Object.assign({},t||{});i.attribs=Object.assign({},t?t.attribs:{},r);const s=e.indices;if(s){const o=wl(s,"indices");i.indices=K0(n,o,f3),i.numElements=o.length,i.elementType=Al(o)}else i.numElements||(i.numElements=B3(n,i.attribs));return i}function pi(n){return!!n.texStorage2D}const Sl=function(){const n={},e={};function t(r){const i=r.constructor.name;if(!n[i]){for(const s in r)if(typeof r[s]=="number"){const o=e[r[s]];e[r[s]]=o?`${o} | ${s}`:s}n[i]=!0}}return function(i,s){return t(i),e[s]||(typeof s=="number"?`0x${s.toString(16)}`:s)}}(),Tn={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},mi=ec,ep=function(){let n;return function(){return n=n||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),n}}(),tp=6406,Gt=6407,be=6408,np=6409,rp=6410,no=6402,ip=34041,nc=33071,F3=9728,P3=9729,an=3553,cn=34067,Bn=32879,kn=35866,rc=34069,M3=34070,R3=34071,O3=34072,N3=34073,L3=34074,El=10241,Cl=10240,ic=10242,sc=10243,sp=32882,z3=33082,U3=33083,G3=33084,H3=33085,Dl=3317,op=3314,ap=32878,cp=3316,up=3315,lp=32877,V3=37443,_3=37441,j3=37440,Q3=33321,W3=36756,q3=33325,Y3=33326,X3=33330,Z3=33329,K3=33338,J3=33337,$3=33340,eS=33339,tS=33323,nS=36757,rS=33327,iS=33328,sS=33336,oS=33335,aS=33332,cS=33331,uS=33334,lS=33333,fS=32849,hS=35905,dS=36194,pS=36758,mS=35898,gS=35901,yS=34843,bS=34837,xS=36221,AS=36239,wS=36215,vS=36233,SS=36209,ES=36227,CS=32856,DS=35907,IS=36759,TS=32855,BS=32854,kS=32857,FS=34842,PS=34836,MS=36220,RS=36238,OS=36975,NS=36214,LS=36232,zS=36226,US=36208,GS=33189,HS=33190,VS=36012,_S=36013,jS=35056,Fn=5120,xe=5121,oc=5122,gi=5123,ac=5124,br=5125,Ve=5126,fp=32819,hp=32820,dp=33635,Dt=5131,ro=36193,Il=33640,QS=35899,WS=35902,qS=36269,YS=34042,cc=33319,yi=33320,uc=6403,bi=36244,xi=36248,xr=36249;let Tl;function lc(n){if(!Tl){const e={};e[tp]={textureFormat:tp,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[xe,Dt,ro,Ve]},e[np]={textureFormat:np,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[xe,Dt,ro,Ve]},e[rp]={textureFormat:rp,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[xe,Dt,ro,Ve]},e[Gt]={textureFormat:Gt,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[xe,Dt,ro,Ve,dp]},e[be]={textureFormat:be,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[xe,Dt,ro,Ve,fp,hp]},e[no]={textureFormat:no,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[br,gi]},e[Q3]={textureFormat:uc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[xe]},e[W3]={textureFormat:uc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[Fn]},e[q3]={textureFormat:uc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Ve,Dt]},e[Y3]={textureFormat:uc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Ve]},e[X3]={textureFormat:bi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[xe]},e[Z3]={textureFormat:bi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[Fn]},e[aS]={textureFormat:bi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[gi]},e[cS]={textureFormat:bi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[oc]},e[uS]={textureFormat:bi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[br]},e[lS]={textureFormat:bi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ac]},e[tS]={textureFormat:cc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[xe]},e[nS]={textureFormat:cc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[Fn]},e[rS]={textureFormat:cc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Ve,Dt]},e[iS]={textureFormat:cc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Ve]},e[sS]={textureFormat:yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[xe]},e[oS]={textureFormat:yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Fn]},e[K3]={textureFormat:yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[gi]},e[J3]={textureFormat:yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[oc]},e[$3]={textureFormat:yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[br]},e[eS]={textureFormat:yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[ac]},e[fS]={textureFormat:Gt,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[xe]},e[hS]={textureFormat:Gt,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[xe]},e[dS]={textureFormat:Gt,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[xe,dp]},e[pS]={textureFormat:Gt,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[Fn]},e[mS]={textureFormat:Gt,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Ve,Dt,QS]},e[gS]={textureFormat:Gt,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Ve,Dt,WS]},e[yS]={textureFormat:Gt,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Ve,Dt]},e[bS]={textureFormat:Gt,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Ve]},e[xS]={textureFormat:xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[xe]},e[AS]={textureFormat:xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[Fn]},e[wS]={textureFormat:xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[gi]},e[vS]={textureFormat:xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[oc]},e[SS]={textureFormat:xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[br]},e[ES]={textureFormat:xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[ac]},e[CS]={textureFormat:be,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[xe]},e[DS]={textureFormat:be,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[xe]},e[IS]={textureFormat:be,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[Fn]},e[TS]={textureFormat:be,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[xe,hp,Il]},e[BS]={textureFormat:be,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[xe,fp]},e[kS]={textureFormat:be,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Il]},e[FS]={textureFormat:be,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Ve,Dt]},e[PS]={textureFormat:be,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Ve]},e[MS]={textureFormat:xr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[xe]},e[RS]={textureFormat:xr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Fn]},e[OS]={textureFormat:xr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Il]},e[NS]={textureFormat:xr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[gi]},e[LS]={textureFormat:xr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[oc]},e[zS]={textureFormat:xr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[ac]},e[US]={textureFormat:xr,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[br]},e[GS]={textureFormat:no,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[gi,br]},e[HS]={textureFormat:no,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[br]},e[VS]={textureFormat:no,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ve]},e[jS]={textureFormat:ip,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[YS]},e[_S]={textureFormat:ip,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[qS]},Object.keys(e).forEach(function(t){const r=e[t];r.bytesPerElementMap={},r.bytesPerElement.forEach(function(i,s){const o=r.type[s];r.bytesPerElementMap[o]=i})}),Tl=e}return Tl[n]}function XS(n,e){const t=lc(n);if(!t)throw"unknown internal format";const r=t.bytesPerElementMap[e];if(r===void 0)throw"unknown internal format";return r}function Ai(n){const e=lc(n);if(!e)throw"unknown internal format";return{format:e.textureFormat,type:e.type[0]}}function pp(n){return(n&n-1)===0}function ZS(n,e,t,r){if(!pi(n))return pp(e)&&pp(t);const i=lc(r);if(!i)throw"unknown internal format";return i.colorRenderable&&i.textureFilterable}function KS(n){const e=lc(n);if(!e)throw"unknown internal format";return e.textureFilterable}function mp(n,e,t){return mi(e)?Al(e):t||xe}function fc(n,e,t,r,i){if(i%1!==0)throw"can't guess dimensions";if(!t&&!r){const s=Math.sqrt(i/(e===cn?6:1));s%1===0?(t=s,r=s):(t=i,r=1)}else if(r){if(!t&&(t=i/r,t%1))throw"can't guess dimensions"}else if(r=i/t,r%1)throw"can't guess dimensions";return{width:t,height:r}}function wi(n,e){e.colorspaceConversion!==void 0&&n.pixelStorei(V3,e.colorspaceConversion),e.premultiplyAlpha!==void 0&&n.pixelStorei(_3,e.premultiplyAlpha),e.flipY!==void 0&&n.pixelStorei(j3,e.flipY)}function gp(n){n.pixelStorei(Dl,4),pi(n)&&(n.pixelStorei(op,0),n.pixelStorei(ap,0),n.pixelStorei(cp,0),n.pixelStorei(up,0),n.pixelStorei(lp,0))}function JS(n,e,t,r){r.minMag&&(t.call(n,e,El,r.minMag),t.call(n,e,Cl,r.minMag)),r.min&&t.call(n,e,El,r.min),r.mag&&t.call(n,e,Cl,r.mag),r.wrap&&(t.call(n,e,ic,r.wrap),t.call(n,e,sc,r.wrap),(e===Bn||l3(n,e))&&t.call(n,e,sp,r.wrap)),r.wrapR&&t.call(n,e,sp,r.wrapR),r.wrapS&&t.call(n,e,ic,r.wrapS),r.wrapT&&t.call(n,e,sc,r.wrapT),r.minLod&&t.call(n,e,z3,r.minLod),r.maxLod&&t.call(n,e,U3,r.maxLod),r.baseLevel&&t.call(n,e,G3,r.baseLevel),r.maxLevel&&t.call(n,e,H3,r.maxLevel)}function yp(n,e,t){const r=t.target||an;n.bindTexture(r,e),JS(n,r,n.texParameteri,t)}function $S(n){return n=n||Tn.textureColor,mi(n)?n:new Uint8Array([n[0]*255,n[1]*255,n[2]*255,n[3]*255])}function Bl(n,e,t,r,i,s){t=t||Tn.textureOptions,s=s||be;const o=t.target||an;if(r=r||t.width,i=i||t.height,n.bindTexture(o,e),ZS(n,r,i,s))n.generateMipmap(o);else{const a=KS(s)?P3:F3;n.texParameteri(o,El,a),n.texParameteri(o,Cl,a),n.texParameteri(o,ic,nc),n.texParameteri(o,sc,nc)}}function io(n){return n.auto===!0||n.auto===void 0&&n.level===void 0}function kl(n,e){return e=e||{},e.cubeFaceOrder||[rc,M3,R3,O3,N3,L3]}function Fl(n,e){const r=kl(n,e).map(function(i,s){return{face:i,ndx:s}});return r.sort(function(i,s){return i.face-s.face}),r}function bp(n,e,t,r){r=r||Tn.textureOptions;const i=r.target||an,s=r.level||0;let o=t.width,a=t.height;const c=r.internalFormat||r.format||be,u=Ai(c),l=r.format||u.format,f=r.type||u.type;if(wi(n,r),n.bindTexture(i,e),i===cn){const d=t.width,h=t.height;let p,m;if(d/6===h)p=h,m=[0,0,1,0,2,0,3,0,4,0,5,0];else if(h/6===d)p=d,m=[0,0,0,1,0,2,0,3,0,4,0,5];else if(d/3===h/2)p=d/3,m=[0,0,1,0,2,0,0,1,1,1,2,1];else if(d/2===h/3)p=d/2,m=[0,0,1,0,0,1,1,1,0,2,1,2];else throw"can't figure out cube map from element: "+(t.src?t.src:t.nodeName);const g=ep();g?(g.canvas.width=p,g.canvas.height=p,o=p,a=p,Fl(n,r).forEach(function(y){const x=m[y.ndx*2+0]*p,A=m[y.ndx*2+1]*p;g.drawImage(t,x,A,p,p,0,0,p,p),n.texImage2D(y.face,s,c,l,f,g.canvas)}),g.canvas.width=1,g.canvas.height=1):typeof createImageBitmap<"u"&&(o=p,a=p,Fl(n,r).forEach(function(y){const x=m[y.ndx*2+0]*p,A=m[y.ndx*2+1]*p;n.texImage2D(y.face,s,c,p,p,0,l,f,null),createImageBitmap(t,x,A,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(w){wi(n,r),n.bindTexture(i,e),n.texImage2D(y.face,s,c,l,f,w),io(r)&&Bl(n,e,r,o,a,c)})}))}else if(i===Bn||i===kn){const d=Math.min(t.width,t.height),h=Math.max(t.width,t.height),p=h/d;if(p%1!==0)throw"can not compute 3D dimensions of element";const m=t.width===h?1:0,g=t.height===h?1:0;n.pixelStorei(Dl,1),n.pixelStorei(op,t.width),n.pixelStorei(ap,0),n.pixelStorei(lp,0),n.texImage3D(i,s,c,d,d,d,0,l,f,null);for(let y=0;y<p;++y){const x=y*d*m,A=y*d*g;n.pixelStorei(cp,x),n.pixelStorei(up,A),n.texSubImage3D(i,s,0,0,y,d,d,1,l,f,t)}gp(n)}else n.texImage2D(i,s,c,l,f,t);io(r)&&Bl(n,e,r,o,a,c),yp(n,e,r)}function so(){}function eE(n){if(typeof document<"u"){const e=document.createElement("a");return e.href=n,e.hostname===location.hostname&&e.port===location.port&&e.protocol===location.protocol}else{const e=new URL(location.href).origin;return new URL(n,location.href).origin===e}}function tE(n,e){return e===void 0&&!eE(n)?"anonymous":e}function nE(n,e,t){t=t||so;let r;if(e=e!==void 0?e:Tn.crossOrigin,e=tE(n,e),typeof Image<"u"){r=new Image,e!==void 0&&(r.crossOrigin=e);const i=function(){r.removeEventListener("error",s),r.removeEventListener("load",o),r=null},s=function(){const c="couldn't load image: "+n;c3(c),t(c,r),i()},o=function(){t(null,r),i()};return r.addEventListener("error",s),r.addEventListener("load",o),r.src=n,r}else if(typeof ImageBitmap<"u"){let i,s;const o=function(){t(i,s)},a={};e&&(a.mode="cors"),fetch(n,a).then(function(c){if(!c.ok)throw c;return c.blob()}).then(function(c){return createImageBitmap(c,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(c){s=c,setTimeout(o)}).catch(function(c){i=c,setTimeout(o)}),r=null}return r}function xp(n){return typeof ImageBitmap<"u"&&n instanceof ImageBitmap||typeof ImageData<"u"&&n instanceof ImageData||typeof HTMLElement<"u"&&n instanceof HTMLElement}function Pl(n,e,t){return xp(n)?(setTimeout(function(){t(null,n)}),n):nE(n,e,t)}function Ml(n,e,t){t=t||Tn.textureOptions;const r=t.target||an;if(n.bindTexture(r,e),t.color===!1)return;const i=$S(t.color);if(r===cn)for(let s=0;s<6;++s)n.texImage2D(rc+s,0,be,1,1,0,be,xe,i);else r===Bn||r===kn?n.texImage3D(r,0,be,1,1,1,0,be,xe,i):n.texImage2D(r,0,be,1,1,0,be,xe,i)}function rE(n,e,t,r){return r=r||so,t=t||Tn.textureOptions,Ml(n,e,t),t=Object.assign({},t),Pl(t.src,t.crossOrigin,function(s,o){s?r(s,e,o):(bp(n,e,o,t),r(null,e,o))})}function iE(n,e,t,r){r=r||so;const i=t.src;if(i.length!==6)throw"there must be 6 urls for a cubemap";const s=t.level||0,o=t.internalFormat||t.format||be,a=Ai(o),c=t.format||a.format,u=t.type||xe,l=t.target||an;if(l!==cn)throw"target must be TEXTURE_CUBE_MAP";Ml(n,e,t),t=Object.assign({},t);let f=6;const d=[],h=kl(n,t);let p;function m(g){return function(y,x){--f,y?d.push(y):x.width!==x.height?d.push("cubemap face img is not a square: "+x.src):(wi(n,t),n.bindTexture(l,e),f===5?kl().forEach(function(A){n.texImage2D(A,s,o,c,u,x)}):n.texImage2D(g,s,o,c,u,x),io(t)&&n.generateMipmap(l)),f===0&&r(d.length?d:void 0,e,p)}}p=i.map(function(g,y){return Pl(g,t.crossOrigin,m(h[y]))})}function sE(n,e,t,r){r=r||so;const i=t.src,s=t.internalFormat||t.format||be,o=Ai(s),a=t.format||o.format,c=t.type||xe,u=t.target||kn;if(u!==Bn&&u!==kn)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";Ml(n,e,t),t=Object.assign({},t);let l=i.length;const f=[];let d;const h=t.level||0;let p=t.width,m=t.height;const g=i.length;let y=!0;function x(A){return function(w,S){if(--l,w)f.push(w);else{if(wi(n,t),n.bindTexture(u,e),y){y=!1,p=t.width||S.width,m=t.height||S.height,n.texImage3D(u,h,s,p,m,g,0,a,c,null);for(let C=0;C<g;++C)n.texSubImage3D(u,h,0,0,C,p,m,1,a,c,S)}else{let C=S,v;(S.width!==p||S.height!==m)&&(v=ep(),C=v.canvas,v.canvas.width=p,v.canvas.height=m,v.drawImage(S,0,0,p,m)),n.texSubImage3D(u,h,0,0,A,p,m,1,a,c,C),v&&C===v.canvas&&(v.canvas.width=0,v.canvas.height=0)}io(t)&&n.generateMipmap(u)}l===0&&r(f.length?f:void 0,e,d)}}d=i.map(function(A,w){return Pl(A,t.crossOrigin,x(w))})}function Ap(n,e,t,r){r=r||Tn.textureOptions;const i=r.target||an;n.bindTexture(i,e);let s=r.width,o=r.height,a=r.depth;const c=r.level||0,u=r.internalFormat||r.format||be,l=Ai(u),f=r.format||l.format,d=r.type||mp(n,t,l.type);if(mi(t))t instanceof Uint8ClampedArray&&(t=new Uint8Array(t.buffer));else{const g=a3(d);t=new g(t)}const h=XS(u,d),p=t.byteLength/h;if(p%1)throw"length wrong size for format: "+Sl(n,f);let m;if(i===Bn||i===kn)if(!s&&!o&&!a){const g=Math.cbrt(p);if(g%1!==0)throw"can't guess cube size of array of numElements: "+p;s=g,o=g,a=g}else s&&(!o||!a)?(m=fc(n,i,o,a,p/s),o=m.width,a=m.height):o&&(!s||!a)?(m=fc(n,i,s,a,p/o),s=m.width,a=m.height):(m=fc(n,i,s,o,p/a),s=m.width,o=m.height);else m=fc(n,i,s,o,p),s=m.width,o=m.height;if(gp(n),n.pixelStorei(Dl,r.unpackAlignment||1),wi(n,r),i===cn){const g=h/t.BYTES_PER_ELEMENT,y=p/6*g;Fl(n,r).forEach(x=>{const A=y*x.ndx,w=t.subarray(A,A+y);n.texImage2D(x.face,c,u,s,o,0,f,d,w)})}else i===Bn||i===kn?n.texImage3D(i,c,u,s,o,a,0,f,d,t):n.texImage2D(i,c,u,s,o,0,f,d,t);return{width:s,height:o,depth:a,type:d}}function oE(n,e,t){const r=t.target||an;n.bindTexture(r,e);const i=t.level||0,s=t.internalFormat||t.format||be,o=Ai(s),a=t.format||o.format,c=t.type||o.type;if(wi(n,t),r===cn)for(let u=0;u<6;++u)n.texImage2D(rc+u,i,s,t.width,t.height,0,a,c,null);else r===Bn||r===kn?n.texImage3D(r,i,s,t.width,t.height,t.depth,0,a,c,null):n.texImage2D(r,i,s,t.width,t.height,0,a,c,null)}function oo(n,e,t){t=t||so,e=e||Tn.textureOptions;const r=n.createTexture(),i=e.target||an;let s=e.width||1,o=e.height||1;const a=e.internalFormat||be;n.bindTexture(i,r),i===cn&&(n.texParameteri(i,ic,nc),n.texParameteri(i,sc,nc));let c=e.src;if(c)if(typeof c=="function"&&(c=c(n,e)),typeof c=="string")rE(n,r,e,t);else if(mi(c)||Array.isArray(c)&&(typeof c[0]=="number"||Array.isArray(c[0])||mi(c[0]))){const u=Ap(n,r,c,e);s=u.width,o=u.height}else Array.isArray(c)&&(typeof c[0]=="string"||xp(c[0]))?i===cn?iE(n,r,e,t):sE(n,r,e,t):(bp(n,r,c,e),s=c.width,o=c.height);else oE(n,r,e);return io(e)&&Bl(n,r,e,s,o,a),yp(n,r,e),r}function aE(n,e,t,r,i,s){r=r||t.width,i=i||t.height,s=s||t.depth;const o=t.target||an;n.bindTexture(o,e);const a=t.level||0,c=t.internalFormat||t.format||be,u=Ai(c),l=t.format||u.format;let f;const d=t.src;if(d&&(mi(d)||Array.isArray(d)&&typeof d[0]=="number")?f=t.type||mp(n,d,u.type):f=t.type||u.type,o===cn)for(let h=0;h<6;++h)n.texImage2D(rc+h,a,c,r,i,0,l,f,null);else o===Bn||o===kn?n.texImage3D(o,a,c,r,i,s,0,l,f,null):n.texImage2D(o,a,c,r,i,0,l,f,null)}const cE=W0,hc=33984,uE=35048,dc=34962,lE=34963,Rl=35345,wp=35718,fE=35721,hE=35971,dE=35382,pE=35396,mE=35398,gE=35392,yE=35395,pc=5126,vp=35664,Sp=35665,Ep=35666,Ol=5124,Cp=35667,Dp=35668,Ip=35669,Tp=35670,Bp=35671,kp=35672,Fp=35673,Pp=35674,Mp=35675,Rp=35676,bE=35678,xE=35680,AE=35679,wE=35682,vE=35685,SE=35686,EE=35687,CE=35688,DE=35689,IE=35690,TE=36289,BE=36292,kE=36293,Nl=5125,Op=36294,Np=36295,Lp=36296,FE=36298,PE=36299,ME=36300,RE=36303,OE=36306,NE=36307,LE=36308,zE=36311,mc=3553,gc=34067,Ll=32879,yc=35866,Z={};function zp(n,e){return Z[e].bindPoint}function UE(n,e){return function(t){n.uniform1f(e,t)}}function GE(n,e){return function(t){n.uniform1fv(e,t)}}function HE(n,e){return function(t){n.uniform2fv(e,t)}}function VE(n,e){return function(t){n.uniform3fv(e,t)}}function _E(n,e){return function(t){n.uniform4fv(e,t)}}function Up(n,e){return function(t){n.uniform1i(e,t)}}function Gp(n,e){return function(t){n.uniform1iv(e,t)}}function Hp(n,e){return function(t){n.uniform2iv(e,t)}}function Vp(n,e){return function(t){n.uniform3iv(e,t)}}function _p(n,e){return function(t){n.uniform4iv(e,t)}}function jE(n,e){return function(t){n.uniform1ui(e,t)}}function QE(n,e){return function(t){n.uniform1uiv(e,t)}}function WE(n,e){return function(t){n.uniform2uiv(e,t)}}function qE(n,e){return function(t){n.uniform3uiv(e,t)}}function YE(n,e){return function(t){n.uniform4uiv(e,t)}}function XE(n,e){return function(t){n.uniformMatrix2fv(e,!1,t)}}function ZE(n,e){return function(t){n.uniformMatrix3fv(e,!1,t)}}function KE(n,e){return function(t){n.uniformMatrix4fv(e,!1,t)}}function JE(n,e){return function(t){n.uniformMatrix2x3fv(e,!1,t)}}function $E(n,e){return function(t){n.uniformMatrix3x2fv(e,!1,t)}}function eC(n,e){return function(t){n.uniformMatrix2x4fv(e,!1,t)}}function tC(n,e){return function(t){n.uniformMatrix4x2fv(e,!1,t)}}function nC(n,e){return function(t){n.uniformMatrix3x4fv(e,!1,t)}}function rC(n,e){return function(t){n.uniformMatrix4x3fv(e,!1,t)}}function Ke(n,e,t,r){const i=zp(n,e);return pi(n)?function(s){let o,a;tc(n,s)?(o=s,a=null):(o=s.texture,a=s.sampler),n.uniform1i(r,t),n.activeTexture(hc+t),n.bindTexture(i,o),n.bindSampler(t,a)}:function(s){n.uniform1i(r,t),n.activeTexture(hc+t),n.bindTexture(i,s)}}function Je(n,e,t,r,i){const s=zp(n,e),o=new Int32Array(i);for(let a=0;a<i;++a)o[a]=t+a;return pi(n)?function(a){n.uniform1iv(r,o),a.forEach(function(c,u){n.activeTexture(hc+o[u]);let l,f;tc(n,c)?(l=c,f=null):(l=c.texture,f=c.sampler),n.bindSampler(t,f),n.bindTexture(s,l)})}:function(a){n.uniform1iv(r,o),a.forEach(function(c,u){n.activeTexture(hc+o[u]),n.bindTexture(s,c)})}}Z[pc]={Type:Float32Array,size:4,setter:UE,arraySetter:GE},Z[vp]={Type:Float32Array,size:8,setter:HE,cols:2},Z[Sp]={Type:Float32Array,size:12,setter:VE,cols:3},Z[Ep]={Type:Float32Array,size:16,setter:_E,cols:4},Z[Ol]={Type:Int32Array,size:4,setter:Up,arraySetter:Gp},Z[Cp]={Type:Int32Array,size:8,setter:Hp,cols:2},Z[Dp]={Type:Int32Array,size:12,setter:Vp,cols:3},Z[Ip]={Type:Int32Array,size:16,setter:_p,cols:4},Z[Nl]={Type:Uint32Array,size:4,setter:jE,arraySetter:QE},Z[Op]={Type:Uint32Array,size:8,setter:WE,cols:2},Z[Np]={Type:Uint32Array,size:12,setter:qE,cols:3},Z[Lp]={Type:Uint32Array,size:16,setter:YE,cols:4},Z[Tp]={Type:Uint32Array,size:4,setter:Up,arraySetter:Gp},Z[Bp]={Type:Uint32Array,size:8,setter:Hp,cols:2},Z[kp]={Type:Uint32Array,size:12,setter:Vp,cols:3},Z[Fp]={Type:Uint32Array,size:16,setter:_p,cols:4},Z[Pp]={Type:Float32Array,size:32,setter:XE,rows:2,cols:2},Z[Mp]={Type:Float32Array,size:48,setter:ZE,rows:3,cols:3},Z[Rp]={Type:Float32Array,size:64,setter:KE,rows:4,cols:4},Z[vE]={Type:Float32Array,size:32,setter:JE,rows:2,cols:3},Z[SE]={Type:Float32Array,size:32,setter:eC,rows:2,cols:4},Z[EE]={Type:Float32Array,size:48,setter:$E,rows:3,cols:2},Z[CE]={Type:Float32Array,size:48,setter:nC,rows:3,cols:4},Z[DE]={Type:Float32Array,size:64,setter:tC,rows:4,cols:2},Z[IE]={Type:Float32Array,size:64,setter:rC,rows:4,cols:3},Z[bE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:mc},Z[xE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:gc},Z[AE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:Ll},Z[wE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:mc},Z[TE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:yc},Z[BE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:yc},Z[kE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:gc},Z[FE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:mc},Z[PE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:Ll},Z[ME]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:gc},Z[RE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:yc},Z[OE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:mc},Z[NE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:Ll},Z[LE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:gc},Z[zE]={Type:null,size:0,setter:Ke,arraySetter:Je,bindPoint:yc};function bc(n,e){return function(t){if(t.value)switch(n.disableVertexAttribArray(e),t.value.length){case 4:n.vertexAttrib4fv(e,t.value);break;case 3:n.vertexAttrib3fv(e,t.value);break;case 2:n.vertexAttrib2fv(e,t.value);break;case 1:n.vertexAttrib1fv(e,t.value);break;default:throw new Error("the length of a float constant value must be between 1 and 4!")}else n.bindBuffer(dc,t.buffer),n.enableVertexAttribArray(e),n.vertexAttribPointer(e,t.numComponents||t.size,t.type||pc,t.normalize||!1,t.stride||0,t.offset||0),t.divisor!==void 0&&n.vertexAttribDivisor(e,t.divisor)}}function Pn(n,e){return function(t){if(t.value)if(n.disableVertexAttribArray(e),t.value.length===4)n.vertexAttrib4iv(e,t.value);else throw new Error("The length of an integer constant value must be 4!");else n.bindBuffer(dc,t.buffer),n.enableVertexAttribArray(e),n.vertexAttribIPointer(e,t.numComponents||t.size,t.type||Ol,t.stride||0,t.offset||0),t.divisor!==void 0&&n.vertexAttribDivisor(e,t.divisor)}}function xc(n,e){return function(t){if(t.value)if(n.disableVertexAttribArray(e),t.value.length===4)n.vertexAttrib4uiv(e,t.value);else throw new Error("The length of an unsigned integer constant value must be 4!");else n.bindBuffer(dc,t.buffer),n.enableVertexAttribArray(e),n.vertexAttribIPointer(e,t.numComponents||t.size,t.type||Nl,t.stride||0,t.offset||0),t.divisor!==void 0&&n.vertexAttribDivisor(e,t.divisor)}}function zl(n,e,t){const r=t.size,i=t.count;return function(s){n.bindBuffer(dc,s.buffer);const o=s.size||s.numComponents||r,a=o/i,c=s.type||pc,l=Z[c].size*o,f=s.normalize||!1,d=s.offset||0,h=l/i;for(let p=0;p<i;++p)n.enableVertexAttribArray(e+p),n.vertexAttribPointer(e+p,a,c,f,l,d+h*p),s.divisor!==void 0&&n.vertexAttribDivisor(e+p,s.divisor)}}const Ce={};Ce[pc]={size:4,setter:bc},Ce[vp]={size:8,setter:bc},Ce[Sp]={size:12,setter:bc},Ce[Ep]={size:16,setter:bc},Ce[Ol]={size:4,setter:Pn},Ce[Cp]={size:8,setter:Pn},Ce[Dp]={size:12,setter:Pn},Ce[Ip]={size:16,setter:Pn},Ce[Nl]={size:4,setter:xc},Ce[Op]={size:8,setter:xc},Ce[Np]={size:12,setter:xc},Ce[Lp]={size:16,setter:xc},Ce[Tp]={size:4,setter:Pn},Ce[Bp]={size:8,setter:Pn},Ce[kp]={size:12,setter:Pn},Ce[Fp]={size:16,setter:Pn},Ce[Pp]={size:4,setter:zl,count:2},Ce[Mp]={size:9,setter:zl,count:3},Ce[Rp]={size:16,setter:zl,count:4};function jp(n){const e=n.name;return e.startsWith("gl_")||e.startsWith("webgl_")}const iC=/(\.|\[|]|\w+)/g,sC=n=>n>="0"&&n<="9";function Qp(n,e,t,r){const i=n.split(iC).filter(a=>a!=="");let s=0,o="";for(;;){const a=i[s++];o+=a;const c=sC(a[0]),u=c?parseInt(a):a;if(c&&(o+=i[s++]),s===i.length){t[u]=e;break}else{const f=i[s++],d=f==="[",h=t[u]||(d?[]:{});t[u]=h,t=h,r[o]=r[o]||function(p){return function(m){Zp(p,m)}}(h),o+=f}}}function oC(n,e){let t=0;function r(a,c,u){const l=c.name.endsWith("[0]"),f=c.type,d=Z[f];if(!d)throw new Error(`unknown type: 0x${f.toString(16)}`);let h;if(d.bindPoint){const p=t;t+=c.size,l?h=d.arraySetter(n,f,p,u,c.size):h=d.setter(n,f,p,u,c.size)}else d.arraySetter&&l?h=d.arraySetter(n,u):h=d.setter(n,u);return h.location=u,h}const i={},s={},o=n.getProgramParameter(e,wp);for(let a=0;a<o;++a){const c=n.getActiveUniform(e,a);if(jp(c))continue;let u=c.name;u.endsWith("[0]")&&(u=u.substr(0,u.length-3));const l=n.getUniformLocation(e,c.name);if(l){const f=r(e,c,l);i[u]=f,Qp(u,f,s,i)}}return i}function aC(n,e){const t={},r=n.getProgramParameter(e,hE);for(let i=0;i<r;++i){const s=n.getTransformFeedbackVarying(e,i);t[s.name]={index:i,type:s.type,size:s.size}}return t}function cC(n,e){const t=n.getProgramParameter(e,wp),r=[],i=[];for(let a=0;a<t;++a){i.push(a),r.push({});const c=n.getActiveUniform(e,a);r[a].name=c.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(a){const c=a[0],u=a[1];n.getActiveUniforms(e,i,n[c]).forEach(function(l,f){r[f][u]=l})});const s={},o=n.getProgramParameter(e,dE);for(let a=0;a<o;++a){const c=n.getActiveUniformBlockName(e,a),u={index:n.getUniformBlockIndex(e,c),usedByVertexShader:n.getActiveUniformBlockParameter(e,a,pE),usedByFragmentShader:n.getActiveUniformBlockParameter(e,a,mE),size:n.getActiveUniformBlockParameter(e,a,gE),uniformIndices:n.getActiveUniformBlockParameter(e,a,yE)};u.used=u.usedByVertexShader||u.usedByFragmentShader,s[c]=u}return{blockSpecs:s,uniformData:r}}const Wp=/\[\d+\]\.$/,uC=(n,e)=>((n+(e-1))/e|0)*e;function lC(n,e,t,r){if(e||t){r=r||1;const s=n.length/4;return function(o){let a=0,c=0;for(let u=0;u<s;++u){for(let l=0;l<r;++l)n[a++]=o[c++];a+=4-r}}}else return function(i){i.length?n.set(i):n[0]=i}}function fC(n,e,t,r){const i=t.blockSpecs,s=t.uniformData,o=i[r];if(!o)return cE("no uniform block object named:",r),{name:r,uniforms:{}};const a=new ArrayBuffer(o.size),c=n.createBuffer(),u=o.index;n.bindBuffer(Rl,c),n.uniformBlockBinding(e,o.index,u);let l=r+".";Wp.test(l)&&(l=l.replace(Wp,"."));const f={},d={},h={};return o.uniformIndices.forEach(function(p){const m=s[p];let g=m.name;g.startsWith(l)&&(g=g.substr(l.length));const y=g.endsWith("[0]");y&&(g=g.substr(0,g.length-3));const x=Z[m.type],A=x.Type,w=y?uC(x.size,16)*m.size:x.size*m.size,S=new A(a,m.offset,w/A.BYTES_PER_ELEMENT);f[g]=S;const C=lC(S,y,x.rows,x.cols);d[g]=C,Qp(g,C,h,d)}),{name:r,array:a,asFloat:new Float32Array(a),buffer:c,uniforms:f,setters:d}}function qp(n,e,t){return fC(n,e.program,e.uniformBlockSpec,t)}function Yp(n,e,t){const i=(e.uniformBlockSpec||e).blockSpecs[t.name];if(i){const s=i.index;return n.bindBufferRange(Rl,s,t.buffer,t.offset||0,t.array.byteLength),!0}return!1}function Xp(n,e,t){Yp(n,e,t)&&n.bufferData(Rl,t.array,uE)}function ao(n,e){const t=n.setters;for(const r in e){const i=t[r];if(i){const s=e[r];i(s)}}}function Zp(n,e){for(const t in e){const r=n[t];typeof r=="function"?r(e[t]):Zp(n[t],e[t])}}function Ar(n,...e){const t=n.uniformSetters||n,r=e.length;for(let i=0;i<r;++i){const s=e[i];if(Array.isArray(s)){const o=s.length;for(let a=0;a<o;++a)Ar(t,s[a])}else for(const o in s){const a=t[o];a&&a(s[o])}}}function hC(n,e){const t={},r=n.getProgramParameter(e,fE);for(let i=0;i<r;++i){const s=n.getActiveAttrib(e,i);if(jp(s))continue;const o=n.getAttribLocation(e,s.name),a=Ce[s.type],c=a.setter(n,o,a);c.location=o,t[s.name]=c}return t}function dC(n,e){for(const t in e){const r=n[t];r&&r(e[t])}}function wr(n,e,t){t.vertexArrayObject?n.bindVertexArray(t.vertexArrayObject):(dC(e.attribSetters||e,t.attribs),t.indices&&n.bindBuffer(lE,t.indices))}function pC(n,e){const t=oC(n,e),r=hC(n,e),i={program:e,uniformSetters:t,attribSetters:r};return pi(n)&&(i.uniformBlockSpec=cC(n,e),i.transformFeedbackInfo=aC(n,e)),i}const mC=4,Kp=5123;function Ac(n,e,t,r,i,s){t=t===void 0?mC:t;const o=e.indices,a=e.elementType,c=r===void 0?e.numElements:r;i=i===void 0?0:i,a||o?s!==void 0?n.drawElementsInstanced(t,c,a===void 0?Kp:e.elementType,i,s):n.drawElements(t,c,a===void 0?Kp:e.elementType,i):s!==void 0?n.drawArraysInstanced(t,i,c,s):n.drawArrays(t,i,c)}const gC=36160,vr=36161,yC=3553,bC=5121,xC=6402,AC=6408,wC=33190,vC=36012,SC=35056,EC=36013,CC=32854,DC=32855,IC=36194,Jp=33189,$p=6401,em=36168,Ul=34041,Gl=36064,wc=36096,tm=36128,Hl=33306,Vl=33071,_l=9729,nm=[{format:AC,type:bC,min:_l,wrap:Vl},{format:Ul}],It={};It[Ul]=Hl,It[$p]=tm,It[em]=tm,It[xC]=wc,It[Jp]=wc,It[wC]=wc,It[vC]=wc,It[SC]=Hl,It[EC]=Hl;function TC(n,e){return It[n]||It[e]}const Mn={};Mn[CC]=!0,Mn[DC]=!0,Mn[IC]=!0,Mn[Ul]=!0,Mn[Jp]=!0,Mn[$p]=!0,Mn[em]=!0;function BC(n){return Mn[n]}const kC=32;function FC(n){return n>=Gl&&n<Gl+kC}function rm(n,e,t,r){const i=gC,s=n.createFramebuffer();n.bindFramebuffer(i,s),t=t||n.drawingBufferWidth,r=r||n.drawingBufferHeight,e=e||nm;const o=[],a={framebuffer:s,attachments:[],width:t,height:r};return e.forEach(function(c,u){let l=c.attachment;const f=c.samples,d=c.format;let h=c.attachmentPoint||TC(d,c.internalFormat);if(h||(h=Gl+u),FC(h)&&o.push(h),!l)if(f!==void 0||BC(d))l=n.createRenderbuffer(),n.bindRenderbuffer(vr,l),f>1?n.renderbufferStorageMultisample(vr,f,d,t,r):n.renderbufferStorage(vr,d,t,r);else{const p=Object.assign({},c);p.width=t,p.height=r,p.auto===void 0&&(p.auto=!1,p.min=p.min||p.minMag||_l,p.mag=p.mag||p.minMag||_l,p.wrapS=p.wrapS||p.wrap||Vl,p.wrapT=p.wrapT||p.wrap||Vl),l=oo(n,p)}if(q0(n,l))n.framebufferRenderbuffer(i,h,vr,l);else if(tc(n,l))c.layer!==void 0?n.framebufferTextureLayer(i,h,l,c.level||0,c.layer):n.framebufferTexture2D(i,h,c.target||yC,l,c.level||0);else throw new Error("unknown attachment type");a.attachments.push(l)}),n.drawBuffers&&n.drawBuffers(o),a}function PC(n,e,t,r,i){r=r||n.drawingBufferWidth,i=i||n.drawingBufferHeight,e.width=r,e.height=i,t=t||nm,t.forEach(function(s,o){const a=e.attachments[o],c=s.format,u=s.samples;if(u!==void 0||q0(n,a))n.bindRenderbuffer(vr,a),u>1?n.renderbufferStorageMultisample(vr,u,c,r,i):n.renderbufferStorage(vr,c,r,i);else if(tc(n,a))aE(n,a,s,r,i);else throw new Error("unknown attachment type")})}function MC(n,e,t){const r=n.createVertexArray();return n.bindVertexArray(r),e.length||(e=[e]),e.forEach(function(i){wr(n,i,t)}),n.bindVertexArray(null),{numElements:t.numElements,elementType:t.elementType,vertexArrayObject:r}}const RC=/^(.*?)_/;function OC(n,e){Sl(n,0);const t=n.getExtension(e);if(t){const r={},i=RC.exec(e)[1],s="_"+i;for(const o in t){const a=t[o],c=typeof a=="function",u=c?i:s;let l=o;o.endsWith(u)&&(l=o.substring(0,o.length-u.length)),n[l]!==void 0?!c&&n[l]!==a&&W0(l,n[l],a,o):c?n[l]=function(f){return function(){return f.apply(t,arguments)}}(a):(n[l]=a,r[l]=a)}r.constructor={name:t.constructor.name},Sl(r,0)}return t}const im=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_color_buffer_float","EXT_color_buffer_half_float","EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2","EXT_frag_depth","EXT_sRGB","EXT_shader_texture_lod","EXT_texture_filter_anisotropic","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_compressed_texture_atc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_pvrtc","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_depth_texture","WEBGL_draw_buffers"];function sm(n){for(let e=0;e<im.length;++e)OC(n,im[e])}function NC(n,e){const t=["webgl2","webgl","experimental-webgl"];let r=null;for(let i=0;i<t.length;++i)if(r=n.getContext(t[i],e),r){sm(r);break}return r}function LC(n,e){return NC(n,e)}const zC=`flat out lowp vec4 vFillColor;flat out lowp vec4 vStrokeColor;flat out float vHalfStrokeWidth;flat out vec4 vCornerRadii;
|
|
308
308
|
#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
|
|
309
309
|
out vec2 vPosInPixels;
|
|
310
310
|
#endif
|
|
@@ -312,7 +312,7 @@ flat out vec2 vHalfSizeInPixels;/***Adjusts the vertex position to ensure that t
|
|
|
312
312
|
#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
|
|
313
313
|
float aaPadding=1.0/uDevicePixelRatio;float shadowPadding=uShadowBlur+max(abs(uShadowOffsetX),abs(uShadowOffsetY));float strokeWidth=getScaled_strokeWidth();float strokeOpacity=getScaled_strokeOpacity()*opaFactor;vec2 centeredFrac=frac-0.5;vec2 expand=centeredFrac*(strokeWidth+aaPadding+shadowPadding*2.0)/uViewportSize;pos+=expand;vec2 sizeInPixels=size*uViewportSize;vPosInPixels=(centeredFrac+expand/size)*sizeInPixels;vHalfSizeInPixels=sizeInPixels/2.0;vCornerRadii=min(cornerRadii,min(vHalfSizeInPixels.x,vHalfSizeInPixels.y));vHalfStrokeWidth=strokeWidth/2.0;vStrokeColor=vec4(getScaled_stroke()*strokeOpacity,strokeOpacity);
|
|
314
314
|
#endif
|
|
315
|
-
gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,
|
|
315
|
+
gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,UC=`#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
|
|
316
316
|
in vec2 vPosInPixels;
|
|
317
317
|
#endif
|
|
318
318
|
flat in vec2 vHalfSizeInPixels;flat in lowp vec4 vFillColor;flat in lowp vec4 vStrokeColor;flat in float vHalfStrokeWidth;flat in vec4 vCornerRadii;out lowp vec4 fragColor;
|
|
@@ -338,88 +338,88 @@ if(vHalfStrokeWidth>0.0&&uHatchPattern>0){d=max(d,-pattern());}fragColor=distanc
|
|
|
338
338
|
#else
|
|
339
339
|
fragColor=vFillColor;if(uPickingEnabled){fragColor=vPickingColor;}
|
|
340
340
|
#endif
|
|
341
|
-
}`,
|
|
341
|
+
}`,GC=`layout(std140)uniform Mark{uniform float uMinWidth;uniform float uMinHeight;uniform float uMinOpacity;uniform float uCornerRadiusTopRight;uniform float uCornerRadiusBottomRight;uniform float uCornerRadiusTopLeft;uniform float uCornerRadiusBottomLeft;uniform int uHatchPattern;uniform vec3 uShadowColor;uniform float uShadowOpacity;uniform float uShadowBlur;uniform float uShadowOffsetX;uniform float uShadowOffsetY;
|
|
342
342
|
#pragma markUniforms
|
|
343
|
-
};`,
|
|
344
|
-
`),
|
|
343
|
+
};`,om=1e4;class HC{constructor(e){R(this,$i);R(this,ea,!1);this.size=e,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}configure(){if(E(this,ea))throw new Error("Already configured!");O(this,$i,yx).call(this),O(this,$i,bx).call(this),G(this,ea,!0)}addConverter(e,t){const r=this.createUpdater(e,t.numComponents||1,t.targetArrayType??Float32Array,t.arrayReference),i=t.f;this.dataUpdaters.push(t.arrayReference?s=>r(i(s)):s=>r(i(s)))}createUpdater(e,t,r=Float32Array,i=void 0){if(!Ze(this.size))throw new Error("The number of vertices must be defined!");let s,o,a=0;const c=new r(this.size*t);if(this.arrays[e]={data:c,numComponents:t},t==1){let u=0;const l=f=>{u=+f};s=()=>{c[a++]=u},o=l}else{let u=i??[0];const l=i?f=>{}:f=>{u=f};switch(t){case 1:break;case 2:s=()=>{c[a++]=u[0],c[a++]=u[1]},o=l;break;case 3:s=()=>{c[a++]=u[0],c[a++]=u[1],c[a++]=u[2]},o=l;break;case 4:s=()=>{c[a++]=u[0],c[a++]=u[1],c[a++]=u[2],c[a++]=u[3]},o=l;break;default:throw new Error("Invalid numComponents: "+t)}}return this.pushers.push(s),o}pushAll(){throw new Error("Call configure() first!")}updateFromDatum(e){throw new Error("Call configure() first!")}pushFromDatum(e){this.updateFromDatum(e),this.pushAll()}}ea=new WeakMap,$i=new WeakSet,yx=function(){if(this.size>om){const e=this.pushers.map((r,i)=>`const p${i} = that.pushers[${i}];`).join(`
|
|
344
|
+
`),t=this.pushers.map((r,i)=>` p${i}();`).join(`
|
|
345
345
|
`);this.pushAll=new Function("that",`${e}
|
|
346
346
|
return function unrolledPushAll() {
|
|
347
|
-
${
|
|
347
|
+
${t}
|
|
348
348
|
that.vertexCount++;
|
|
349
|
-
};`)(this)}else this.pushAll=()=>{for(let e=0;e<this.pushers.length;e++)this.pushers[e]();this.vertexCount++}},
|
|
350
|
-
`),
|
|
349
|
+
};`)(this)}else this.pushAll=()=>{for(let e=0;e<this.pushers.length;e++)this.pushers[e]();this.vertexCount++}},bx=function(){if(this.size>om){const e=this.dataUpdaters.map((r,i)=>`const u${i} = that.dataUpdaters[${i}];`).join(`
|
|
350
|
+
`),t=this.dataUpdaters.map((r,i)=>` u${i}(datum);`).join(`
|
|
351
351
|
`);this.updateFromDatum=new Function("that","datum",`${e}
|
|
352
352
|
return function unrolledUpdateFromDatum(datum) {
|
|
353
|
-
${
|
|
354
|
-
};`)(this)}else this.updateFromDatum=e=>{for(let
|
|
355
|
-
${
|
|
353
|
+
${t}
|
|
354
|
+
};`)(this)}else this.updateFromDatum=e=>{for(let t=0;t<this.dataUpdaters.length;t++)this.dataUpdaters[t](e)}};const co=5,jl=127;function Ql(n){const e=[];for(let p=0;p<=jl;p++)e.push(void 0);const t=new Map;for(const p of n.chars)p.id<=jl?e[p.id]=p:t.set(p.id,p);const r=8722;t.has(r)||t.set(r,e[45]);function i(p){return(p<=jl?e[p]:t.get(p))||e[63]}function s(p){return i(p.charCodeAt(0))}const o=n.common.base,a=s("x"),c=s("X"),u=s("q"),l=a.height-co*2,f=c.height-co*2,d=u.height-a.height+u.yoffset-a.yoffset;function h(p,m=1){let g=0;for(let y=0;y<p.length;y++)g+=i(p.charCodeAt(y)).xadvance;return g/o*m}return{measureWidth:h,getCharByCode:i,getChar:s,xHeight:l,capHeight:f,descent:d,common:n.common}}function vi(n,e=0,t=1){return Math.max(e,Math.min(t,n))}const am=2**31-1,VC=-2147483648;function _C(n,e,t,r=t){const i=new Array(n);i.fill(am);let s=VC,o=-1/0,a=!1;const c=new Array(n);c.fill(0);const u=e[0],f=(e[1]-e[0])/n,d=(y,x)=>{const A=(y-u)/f,w=Math.floor(A);return vi(x&&w==A?w-1:w,0,n-1)};function h(y,x,A){if(a)return;if(x>s)s=x;else{a=!0;return}const w=t(y);if(w<o){a=!0;return}o=w;const S=d(w,!1);i[S]>x&&(i[S]=x),c[S]<A&&(c[S]=A)}function p(y,x,A){if(a)return;if(x>s)s=x;else{a=!0,console.debug("Items (vertices) are not ordered properly. Disabling binned index.");return}const w=t(y),S=r(y);if(w<o){a=!0;return}else if(S<w){a=!0;return}o=w;const C=d(w,!1),v=d(S,!0);for(let T=C;T<=v;T++)i[T]>x&&(i[T]=x),c[T]<A&&(c[T]=A)}const m=(y,x,A=[0,0])=>{const w=d(y,!1),S=d(x,!0),C=i[w],v=Math.max(c[S],C);return A[0]=C,A[1]=v,A},g=()=>{if(a)return;for(let x=1;x<c.length;x++)c[x]<c[x-1]&&(c[x]=c[x-1]);let y=!0;for(let x=i.length-1;x>0;x--)y&&i[x]==am?(i[x]=c[x],y=!1):i[x-1]>i[x]&&(i[x-1]=i[x]);return m};return h.getIndex=g,p.getIndex=g,t==r?h:p}const Ht=1,Rn=2,Wl=4;class ql{constructor(e){R(this,Wr);Y(this,"stats",{count:0,first:null});Y(this,"paramMediatorProvider",null);this.paramMediatorProvider=e,this.children=[],this.parent=void 0,this.completed=!1}get behavior(){return 0}get label(){return`(${this.constructor.name})`}reset(){this.completed=!1;for(const e of this.children)e.reset();this.stats.count=0,this.stats.first=null}initialize(){}setParent(e){this.parent=e}addChild(e){if(e.parent)throw new Error("Cannot add the child! It already has a parent.");return this.children.push(e),e.setParent(this),O(this,Wr,Da).call(this),this}adopt(e){e.parent&&e.parent.removeChild(e),this.addChild(e)}adoptChildrenOf(e){for(const t of e.children)this.adopt(t)}insertAsParent(e){var t;if(this.isRoot())throw new Error("Cannot insert a new parent for a root node!");e.parent=this.parent,this.parent.children[this.parent.children.indexOf(this)]=e,O(t=this.parent,Wr,Da).call(t),this.parent=void 0,e.addChild(this)}removeChild(e){const t=this.children.indexOf(e);if(t>-1)this.children.splice(t,1),e.parent=void 0,O(this,Wr,Da).call(this);else throw new Error("Trying to remove an unknown child node!")}excise(){var e;if(this.isRoot())throw new Error("Cannot excise root node!");if(this.isTerminal())this.parent.removeChild(this);else if(this.children.length==1){const t=this.children[0];t.setParent(this.parent),this.parent.children[this.parent.children.indexOf(this)]=t,O(e=this.parent,Wr,Da).call(e),this.setParent(void 0),this.children.length=0}else throw new Error("Cannot excise a node that has multiple children!")}isRoot(){return!this.parent}isBranching(){return this.children.length>1}isTerminal(){return this.children.length==0}visit(e){e(this);for(const t of this.children)t.visit(e);e.afterChildren&&e.afterChildren(this)}subtreeToString(e=0){const t=this.children.map(r=>r.subtreeToString(e+1)).join("");return`${" ".repeat(e*2)}* ${this.label}${"identifier"in this&&this.identifier?": "+this.identifier:""}
|
|
355
|
+
${t}`}handle(e){this._propagate(e)}complete(){this.completed=!0;for(const e of this.children)e.complete()}beginBatch(e){for(const t of this.children)t.beginBatch(e)}get paramMediator(){if(this.paramMediatorProvider)return this.paramMediatorProvider.paramMediator;if(!this.parent)throw new Error("Cannot find paramMediator!");return this.parent.paramMediator}repropagate(){if(this.parent)this.parent.repropagate();else throw new Error("Cannot repropagate data, no FlowNode with stored data found!")}_propagate(e){}}Wr=new WeakSet,Da=function(){this._propagate=Function("children","stats",Us(this.children.length).map(e=>`const child${e} = children[${e}];`).join(`
|
|
356
356
|
`)+`return function propagate(datum) {
|
|
357
357
|
if (stats.count === 0) {
|
|
358
358
|
stats.first = structuredClone(datum);
|
|
359
359
|
}
|
|
360
360
|
stats.count++;
|
|
361
|
-
${
|
|
361
|
+
${Us(this.children.length).map(e=>`child${e}.handle(datum);`).join(`
|
|
362
362
|
`)}
|
|
363
|
-
};`)(this.children,this.stats)};function Lm(t){return t.type=="file"}function f8(t){return t.type=="facet"}class yt extends Wf{constructor(n,r){super(r);he(this,Va);Ae(this,Va,n.type)}get label(){return j(this,Va)}}Va=new WeakMap;const sn="_uniqueId",Om=1e4,Nm=[null];class Yf extends yt{get behavior(){return Sr}constructor(e){super(e),this.params=e,this.as=e.as??sn,this._blocks=[],this._usedBlocks=0,this._id=-1}initialize(){}reset(){super.reset(),this._usedBlocks=0,this._id=-1}handle(e){e[this.as]=this._nextId(),this._propagate(e)}_nextId(){return++this._id%Om==0&&(this._id=this._getBlock()*Om),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const e=Nm.length;return Nm[e]=this,this._blocks.push(e),this._usedBlocks++,e}}function uo(t,e,n){return t.fields=e||[],t.fname=n,t}function h8(t){return t.length===1?d8(t[0]):p8(t)}const d8=t=>function(e){return e[t]},p8=t=>{const e=t.length;return function(n){for(let r=0;r<e;++r)n=n[t[r]];return n}};function an(t){throw Error(t)}function g8(t){const e=[],n=t.length;let r=null,o=0,i="",s,a,c;t=t+"";function l(){e.push(i+t.substring(s,a)),i="",s=a+1}for(s=a=0;a<n;++a)if(c=t[a],c==="\\")i+=t.substring(s,a++),s=a;else if(c===r)l(),r=null,o=-1;else{if(r)continue;s===o&&c==='"'||s===o&&c==="'"?(s=a+1,r=c):c==="."&&!o?a>s?l():s=a+1:c==="["?(a>s&&l(),o=s=a+1):c==="]"&&(o||an("Access path missing open bracket: "+t),o>0&&l(),o=0,s=a+1)}return o&&an("Access path missing closing bracket: "+t),r&&an("Access path missing closing quote: "+t),a>s&&(a++,l()),e}function m8(t,e,n){const r=g8(t);return t=r.length===1?r[0]:t,uo(h8(r),[t],t)}m8("id"),uo(t=>t,[],"identity"),uo(()=>0,[],"zero"),uo(()=>1,[],"one"),uo(()=>!0,[],"true"),uo(()=>!1,[],"false");const y8=new Set([...Object.getOwnPropertyNames(Object.prototype).filter(t=>typeof Object.prototype[t]=="function"),"__proto__"]);function zm(t){return typeof t=="function"}function ll(t,e){return Object.hasOwn(t,e)}function b8(t){return typeof t=="string"}function Um(t){const e={},n=t.length;for(let r=0;r<n;++r)e[t[r]]=!0;return e}const w8="RawCode",x8="Literal",v8="Property",A8="Identifier",E8="ArrayExpression",S8="BinaryExpression",C8="CallExpression",I8="ConditionalExpression",T8="LogicalExpression",D8="MemberExpression",B8="ObjectExpression",k8="UnaryExpression";function vn(t){this.type=t}vn.prototype.visit=function(t){let e,n,r;if(t(this))return 1;for(e=_8(this),n=0,r=e.length;n<r;++n)if(e[n].visit(t))return 1};function _8(t){switch(t.type){case E8:return t.elements;case S8:case T8:return[t.left,t.right];case C8:return[t.callee].concat(t.arguments);case I8:return[t.test,t.consequent,t.alternate];case D8:return[t.object,t.property];case B8:return t.properties;case v8:return[t.key,t.value];case k8:return[t.argument];case A8:case x8:case w8:default:return[]}}var Nn,Ie,ie,Pt,Xe,ul=1,Xs=2,hi=3,Cr=4,fl=5,di=6,Yt=7,Ks=8,R8=9;Nn={},Nn[ul]="Boolean",Nn[Xs]="<end>",Nn[hi]="Identifier",Nn[Cr]="Keyword",Nn[fl]="Null",Nn[di]="Numeric",Nn[Yt]="Punctuator",Nn[Ks]="String",Nn[R8]="RegularExpression";var F8="ArrayExpression",M8="BinaryExpression",P8="CallExpression",L8="ConditionalExpression",Gm="Identifier",O8="Literal",N8="LogicalExpression",z8="MemberExpression",U8="ObjectExpression",G8="Property",H8="UnaryExpression",vt="Unexpected token %0",V8="Unexpected number",j8="Unexpected string",q8="Unexpected identifier",W8="Unexpected reserved word",Y8="Unexpected end of input",Qf="Invalid regular expression",Zf="Invalid regular expression: missing /",Hm="Octal literals are not allowed in strict mode.",Q8="Duplicate data property in object literal not allowed in strict mode",Bt="ILLEGAL",Js="Disabled.",Z8=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),X8=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u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-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function hl(t,e){if(!t)throw new Error("ASSERT: "+e)}function er(t){return t>=48&&t<=57}function Xf(t){return"0123456789abcdefABCDEF".includes(t)}function $s(t){return"01234567".includes(t)}function K8(t){return t===32||t===9||t===11||t===12||t===160||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(t)}function ea(t){return t===10||t===13||t===8232||t===8233}function ta(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&Z8.test(String.fromCharCode(t))}function dl(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===92||t>=128&&X8.test(String.fromCharCode(t))}const J8={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function Vm(){for(;ie<Pt;){const t=Ie.charCodeAt(ie);if(K8(t)||ea(t))++ie;else break}}function Kf(t){var e,n,r,o=0;for(n=t==="u"?4:2,e=0;e<n;++e)ie<Pt&&Xf(Ie[ie])?(r=Ie[ie++],o=o*16+"0123456789abcdef".indexOf(r.toLowerCase())):We({},vt,Bt);return String.fromCharCode(o)}function $8(){var t,e,n,r;for(t=Ie[ie],e=0,t==="}"&&We({},vt,Bt);ie<Pt&&(t=Ie[ie++],!!Xf(t));)e=e*16+"0123456789abcdef".indexOf(t.toLowerCase());return(e>1114111||t!=="}")&&We({},vt,Bt),e<=65535?String.fromCharCode(e):(n=(e-65536>>10)+55296,r=(e-65536&1023)+56320,String.fromCharCode(n,r))}function jm(){var t,e;for(t=Ie.charCodeAt(ie++),e=String.fromCharCode(t),t===92&&(Ie.charCodeAt(ie)!==117&&We({},vt,Bt),++ie,t=Kf("u"),(!t||t==="\\"||!ta(t.charCodeAt(0)))&&We({},vt,Bt),e=t);ie<Pt&&(t=Ie.charCodeAt(ie),!!dl(t));)++ie,e+=String.fromCharCode(t),t===92&&(e=e.substr(0,e.length-1),Ie.charCodeAt(ie)!==117&&We({},vt,Bt),++ie,t=Kf("u"),(!t||t==="\\"||!dl(t.charCodeAt(0)))&&We({},vt,Bt),e+=t);return e}function e5(){var t,e;for(t=ie++;ie<Pt;){if(e=Ie.charCodeAt(ie),e===92)return ie=t,jm();if(dl(e))++ie;else break}return Ie.slice(t,ie)}function t5(){var t,e,n;return t=ie,e=Ie.charCodeAt(ie)===92?jm():e5(),e.length===1?n=hi:J8.hasOwnProperty(e)?n=Cr:e==="null"?n=fl:e==="true"||e==="false"?n=ul:n=hi,{type:n,value:e,start:t,end:ie}}function Jf(){var t=ie,e=Ie.charCodeAt(ie),n,r=Ie[ie],o,i,s;switch(e){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++ie,{type:Yt,value:String.fromCharCode(e),start:t,end:ie};default:if(n=Ie.charCodeAt(ie+1),n===61)switch(e){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return ie+=2,{type:Yt,value:String.fromCharCode(e)+String.fromCharCode(n),start:t,end:ie};case 33:case 61:return ie+=2,Ie.charCodeAt(ie)===61&&++ie,{type:Yt,value:Ie.slice(t,ie),start:t,end:ie}}}if(s=Ie.substr(ie,4),s===">>>=")return ie+=4,{type:Yt,value:s,start:t,end:ie};if(i=s.substr(0,3),i===">>>"||i==="<<="||i===">>=")return ie+=3,{type:Yt,value:i,start:t,end:ie};if(o=i.substr(0,2),r===o[1]&&"+-<>&|".includes(r)||o==="=>")return ie+=2,{type:Yt,value:o,start:t,end:ie};if(o==="//"&&We({},vt,Bt),"<>=!+-*%&|^/".includes(r))return++ie,{type:Yt,value:r,start:t,end:ie};We({},vt,Bt)}function n5(t){let e="";for(;ie<Pt&&Xf(Ie[ie]);)e+=Ie[ie++];return e.length===0&&We({},vt,Bt),ta(Ie.charCodeAt(ie))&&We({},vt,Bt),{type:di,value:parseInt("0x"+e,16),start:t,end:ie}}function r5(t){let e="0"+Ie[ie++];for(;ie<Pt&&$s(Ie[ie]);)e+=Ie[ie++];return(ta(Ie.charCodeAt(ie))||er(Ie.charCodeAt(ie)))&&We({},vt,Bt),{type:di,value:parseInt(e,8),octal:!0,start:t,end:ie}}function qm(){var t,e,n;if(n=Ie[ie],hl(er(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),e=ie,t="",n!=="."){if(t=Ie[ie++],n=Ie[ie],t==="0"){if(n==="x"||n==="X")return++ie,n5(e);if($s(n))return r5(e);n&&er(n.charCodeAt(0))&&We({},vt,Bt)}for(;er(Ie.charCodeAt(ie));)t+=Ie[ie++];n=Ie[ie]}if(n==="."){for(t+=Ie[ie++];er(Ie.charCodeAt(ie));)t+=Ie[ie++];n=Ie[ie]}if(n==="e"||n==="E")if(t+=Ie[ie++],n=Ie[ie],(n==="+"||n==="-")&&(t+=Ie[ie++]),er(Ie.charCodeAt(ie)))for(;er(Ie.charCodeAt(ie));)t+=Ie[ie++];else We({},vt,Bt);return ta(Ie.charCodeAt(ie))&&We({},vt,Bt),{type:di,value:parseFloat(t),start:e,end:ie}}function i5(){var t="",e,n,r,o,i=!1;for(e=Ie[ie],hl(e==="'"||e==='"',"String literal must starts with a quote"),n=ie,++ie;ie<Pt;)if(r=Ie[ie++],r===e){e="";break}else if(r==="\\")if(r=Ie[ie++],!r||!ea(r.charCodeAt(0)))switch(r){case"u":case"x":Ie[ie]==="{"?(++ie,t+=$8()):t+=Kf(r);break;case"n":t+=`
|
|
364
|
-
`;break;case"r":
|
|
365
|
-
`&&++ie;else{if(ea(r.charCodeAt(0)))break;t+=r}return e!==""&&We({},vt,Bt),{type:Ks,value:t,octal:i,start:n,end:ie}}function o5(t,e){let n=t;e.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(r,o)=>{if(parseInt(o,16)<=1114111)return"x";We({},Qf)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{We({},Qf)}try{return new RegExp(t,e)}catch{return null}}function s5(){var t,e,n,r,o;for(t=Ie[ie],hl(t==="/","Regular expression literal must start with a slash"),e=Ie[ie++],n=!1,r=!1;ie<Pt;)if(t=Ie[ie++],e+=t,t==="\\")t=Ie[ie++],ea(t.charCodeAt(0))&&We({},Zf),e+=t;else if(ea(t.charCodeAt(0)))We({},Zf);else if(n)t==="]"&&(n=!1);else if(t==="/"){r=!0;break}else t==="["&&(n=!0);return r||We({},Zf),o=e.substr(1,e.length-2),{value:o,literal:e}}function a5(){var t,e,n;for(e="",n="";ie<Pt&&(t=Ie[ie],!!dl(t.charCodeAt(0)));)++ie,t==="\\"&&ie<Pt?We({},vt,Bt):(n+=t,e+=t);return n.search(/[^gimuy]/g)>=0&&We({},Qf,n),{value:n,literal:e}}function c5(){var t,e,n,r;return Xe=null,Vm(),t=ie,e=s5(),n=a5(),r=o5(e.value,n.value),{literal:e.literal+n.literal,value:r,regex:{pattern:e.value,flags:n.value},start:t,end:ie}}function l5(t){return t.type===hi||t.type===Cr||t.type===ul||t.type===fl}function Wm(){if(Vm(),ie>=Pt)return{type:Xs,start:ie,end:ie};const t=Ie.charCodeAt(ie);return ta(t)?t5():t===40||t===41||t===59?Jf():t===39||t===34?i5():t===46?er(Ie.charCodeAt(ie+1))?qm():Jf():er(t)?qm():Jf()}function Qt(){const t=Xe;return ie=t.end,Xe=Wm(),ie=t.end,t}function Ym(){const t=ie;Xe=Wm(),ie=t}function u5(t){const e=new vn(F8);return e.elements=t,e}function Qm(t,e,n){const r=new vn(t==="||"||t==="&&"?N8:M8);return r.operator=t,r.left=e,r.right=n,r}function f5(t,e){const n=new vn(P8);return n.callee=t,n.arguments=e,n}function h5(t,e,n){const r=new vn(L8);return r.test=t,r.consequent=e,r.alternate=n,r}function $f(t){const e=new vn(Gm);return e.name=t,e}function na(t){const e=new vn(O8);return e.value=t.value,e.raw=Ie.slice(t.start,t.end),t.regex&&(e.raw==="//"&&(e.raw="/(?:)/"),e.regex=t.regex),e}function Zm(t,e,n){const r=new vn(z8);return r.computed=t==="[",r.object=e,r.property=n,r.computed||(n.member=!0),r}function d5(t){const e=new vn(U8);return e.properties=t,e}function Xm(t,e,n){const r=new vn(G8);return r.key=e,r.value=n,r.kind=t,r}function p5(t,e){const n=new vn(H8);return n.operator=t,n.argument=e,n.prefix=!0,n}function We(t,e){var n,r=Array.prototype.slice.call(arguments,2),o=e.replace(/%(\d)/g,(i,s)=>(hl(s<r.length,"Message reference must be in range"),r[s]));throw n=new Error(o),n.index=ie,n.description=o,n}function pl(t){t.type===Xs&&We(t,Y8),t.type===di&&We(t,V8),t.type===Ks&&We(t,j8),t.type===hi&&We(t,q8),t.type===Cr&&We(t,W8),We(t,vt,t.value)}function Lt(t){const e=Qt();(e.type!==Yt||e.value!==t)&&pl(e)}function it(t){return Xe.type===Yt&&Xe.value===t}function eh(t){return Xe.type===Cr&&Xe.value===t}function g5(){const t=[];for(ie=Xe.start,Lt("[");!it("]");)it(",")?(Qt(),t.push(null)):(t.push(pi()),it("]")||Lt(","));return Qt(),u5(t)}function Km(){ie=Xe.start;const t=Qt();return t.type===Ks||t.type===di?(t.octal&&We(t,Hm),na(t)):$f(t.value)}function m5(){var t,e,n,r;if(ie=Xe.start,t=Xe,t.type===hi)return n=Km(),Lt(":"),r=pi(),Xm("init",n,r);if(t.type===Xs||t.type===Yt)pl(t);else return e=Km(),Lt(":"),r=pi(),Xm("init",e,r)}function y5(){var t=[],e,n,r,o={},i=String;for(ie=Xe.start,Lt("{");!it("}");)e=m5(),e.key.type===Gm?n=e.key.name:n=i(e.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(o,r)?We({},Q8):o[r]=!0,t.push(e),it("}")||Lt(",");return Lt("}"),d5(t)}function b5(){Lt("(");const t=th();return Lt(")"),t}const w5={if:1};function x5(){var t,e,n;if(it("("))return b5();if(it("["))return g5();if(it("{"))return y5();if(t=Xe.type,ie=Xe.start,t===hi||w5[Xe.value])n=$f(Qt().value);else if(t===Ks||t===di)Xe.octal&&We(Xe,Hm),n=na(Qt());else{if(t===Cr)throw new Error(Js);t===ul?(e=Qt(),e.value=e.value==="true",n=na(e)):t===fl?(e=Qt(),e.value=null,n=na(e)):it("/")||it("/=")?(n=na(c5()),Ym()):pl(Qt())}return n}function v5(){const t=[];if(Lt("("),!it(")"))for(;ie<Pt&&(t.push(pi()),!it(")"));)Lt(",");return Lt(")"),t}function A5(){ie=Xe.start;const t=Qt();return l5(t)||pl(t),$f(t.value)}function E5(){return Lt("."),A5()}function S5(){Lt("[");const t=th();return Lt("]"),t}function C5(){var t,e,n;for(t=x5();;)if(it("."))n=E5(),t=Zm(".",t,n);else if(it("("))e=v5(),t=f5(t,e);else if(it("["))n=S5(),t=Zm("[",t,n);else break;return t}function Jm(){const t=C5();if(Xe.type===Yt&&(it("++")||it("--")))throw new Error(Js);return t}function gl(){var t,e;if(Xe.type!==Yt&&Xe.type!==Cr)e=Jm();else{if(it("++")||it("--"))throw new Error(Js);if(it("+")||it("-")||it("~")||it("!"))t=Qt(),e=gl(),e=p5(t.value,e);else{if(eh("delete")||eh("void")||eh("typeof"))throw new Error(Js);e=Jm()}}return e}function $m(t){let e=0;if(t.type!==Yt&&t.type!==Cr)return 0;switch(t.value){case"||":e=1;break;case"&&":e=2;break;case"|":e=3;break;case"^":e=4;break;case"&":e=5;break;case"==":case"!=":case"===":case"!==":e=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":e=7;break;case"<<":case">>":case">>>":e=8;break;case"+":case"-":e=9;break;case"*":case"/":case"%":e=11;break}return e}function I5(){var t,e,n,r,o,i,s,a,c,l;if(t=Xe,c=gl(),r=Xe,o=$m(r),o===0)return c;for(r.prec=o,Qt(),e=[t,Xe],s=gl(),i=[c,r,s];(o=$m(Xe))>0;){for(;i.length>2&&o<=i[i.length-2].prec;)s=i.pop(),a=i.pop().value,c=i.pop(),e.pop(),n=Qm(a,c,s),i.push(n);r=Qt(),r.prec=o,i.push(r),e.push(Xe),n=gl(),i.push(n)}for(l=i.length-1,n=i[l],e.pop();l>1;)e.pop(),n=Qm(i[l-1].value,i[l-2],n),l-=2;return n}function pi(){var t,e,n;return t=I5(),it("?")&&(Qt(),e=pi(),Lt(":"),n=pi(),t=h5(t,e,n)),t}function th(){const t=pi();if(it(","))throw new Error(Js);return t}function e1(t){Ie=t,ie=0,Pt=Ie.length,Xe=null,Ym();const e=th();if(Xe.type!==Xs)throw new Error("Unexpect token after expression.");return e}var T5={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function t1(t){function e(s,a,c,l){let u=t(a[0]);return c&&(u=c+"("+u+")",c.lastIndexOf("new ",0)===0&&(u="("+u+")")),u+"."+s+(l<0?"":l===0?"()":"("+a.slice(1).map(t).join(",")+")")}function n(s,a,c){return l=>e(s,l,a,c)}const r="new Date",o="String",i="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(s){s.length<3&&an("Missing arguments to clamp function."),s.length>3&&an("Too many arguments to clamp function.");const a=s.map(t);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:r,date:n("getDate",r,0),day:n("getDay",r,0),year:n("getFullYear",r,0),month:n("getMonth",r,0),hours:n("getHours",r,0),minutes:n("getMinutes",r,0),seconds:n("getSeconds",r,0),milliseconds:n("getMilliseconds",r,0),time:n("getTime",r,0),timezoneoffset:n("getTimezoneOffset",r,0),utcdate:n("getUTCDate",r,0),utcday:n("getUTCDay",r,0),utcyear:n("getUTCFullYear",r,0),utcmonth:n("getUTCMonth",r,0),utchours:n("getUTCHours",r,0),utcminutes:n("getUTCMinutes",r,0),utcseconds:n("getUTCSeconds",r,0),utcmilliseconds:n("getUTCMilliseconds",r,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",o,0),lower:n("toLowerCase",o,0),substring:n("substring",o),split:n("split",o),trim:n("trim",o,0),btoa:"btoa",atob:"atob",regexp:i,test:n("test",i),if:function(s){s.length<3&&an("Missing arguments to if function."),s.length>3&&an("Too many arguments to if function.");const a=s.map(t);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function D5(t){const e=t&&t.length-1;return e&&(t[0]==='"'&&t[e]==='"'||t[0]==="'"&&t[e]==="'")?t.slice(1,-1):t}function n1(t){t=t||{};const e=t.allowed?Um(t.allowed):{},n=t.forbidden?Um(t.forbidden):{},r=t.constants||T5,o=(t.functions||t1)(f),i=t.globalvar,s=t.fieldvar,a=zm(i)?i:p=>`${i}["${p}"]`;[...Object.getOwnPropertyNames(Object.prototype).filter(p=>typeof Object.prototype[p]=="function")];let c={},l={},u=0;function f(p){if(b8(p))return p;const y=d[p.type];return y==null&&an("Unsupported type: "+p.type),y(p)}const d={Literal:p=>p.raw,Identifier:p=>{const y=p.name;return u>0?y:ll(n,y)?an("Illegal identifier: "+y):ll(r,y)?r[y]:ll(e,y)?y:(c[y]=1,a(y))},MemberExpression:p=>{const y=!p.computed,v=f(p.object);y&&(u+=1);const b=f(p.property);return v===s&&(l[D5(b)]=1),y&&(u-=1),v+(y?"."+b:"["+b+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&an("Illegal callee type: "+p.callee.type);const y=p.callee.name,v=p.arguments,b=ll(o,y)&&o[y];return b||an("Unrecognized function: "+y),zm(b)?b(v):b+"("+v.map(f).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(f).join(",")+"]",BinaryExpression:p=>"("+f(p.left)+" "+p.operator+" "+f(p.right)+")",UnaryExpression:p=>"("+p.operator+f(p.argument)+")",ConditionalExpression:p=>"("+f(p.test)+"?"+f(p.consequent)+":"+f(p.alternate)+")",LogicalExpression:p=>"("+f(p.left)+p.operator+f(p.right)+")",ObjectExpression:p=>{for(const y of p.properties){const v=y.key.name;y8.has(v)&&an("Illegal property: "+v)}return"{"+p.properties.map(f).join(",")+"}"},Property:p=>{u+=1;const y=f(p.key);return u-=1,y+":"+f(p.value)}};function h(p){const y={code:f(p),globals:Object.keys(c),fields:Object.keys(l)};return c={},l={},y}return h.functions=o,h.constants=r,h}function r1(t,e,n){return n=(n-t)/(e-t),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function B5(t,e,n){return lo((n-t)/(e-t),0,1)}const i1={clamp:lo,format(t,e){return Dt(e)(t)},mapHasKey(t,e){return t.has(e)},isArray:_t,isBoolean:ps,isDefined(t){return t!==void 0},isNumber:Ht,isObject:Rt,isRegExp:xA,isString:rt,isValid(t){return t!=null&&t===t},lerp:lp,linearstep:B5,replace(t,e,n){return String(t).replace(e,n)},smoothstep:r1};function k5(t){const e=t1(t);for(const n in i1)e[n]=`this.${n}`;return e}const _5=n1({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:k5});function R5(t,e={}){try{const n=e1(t),r=_5(n),o=Function("datum","globalObject",`"use strict";
|
|
363
|
+
};`)(this.children,this.stats)};function cm(n){return n.type=="file"}function jC(n){return n.type=="facet"}class Te extends ql{constructor(t,r){super(r);R(this,ta);G(this,ta,t.type)}get label(){return E(this,ta)}}ta=new WeakMap;const pt="_uniqueId",um=1e4,lm=[null];class Yl extends Te{get behavior(){return Rn}constructor(e){super(e),this.params=e,this.as=e.as??pt,this._blocks=[],this._usedBlocks=0,this._id=-1}initialize(){}reset(){super.reset(),this._usedBlocks=0,this._id=-1}handle(e){e[this.as]=this._nextId(),this._propagate(e)}_nextId(){return++this._id%um==0&&(this._id=this._getBlock()*um),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const e=lm.length;return lm[e]=this,this._blocks.push(e),this._usedBlocks++,e}}function Si(n,e,t){return n.fields=e||[],n.fname=t,n}function QC(n){return n.length===1?WC(n[0]):qC(n)}const WC=n=>function(e){return e[n]},qC=n=>{const e=n.length;return function(t){for(let r=0;r<e;++r)t=t[n[r]];return t}};function mt(n){throw Error(n)}function YC(n){const e=[],t=n.length;let r=null,i=0,s="",o,a,c;n=n+"";function u(){e.push(s+n.substring(o,a)),s="",o=a+1}for(o=a=0;a<t;++a)if(c=n[a],c==="\\")s+=n.substring(o,a++),o=a;else if(c===r)u(),r=null,i=-1;else{if(r)continue;o===i&&c==='"'||o===i&&c==="'"?(o=a+1,r=c):c==="."&&!i?a>o?u():o=a+1:c==="["?(a>o&&u(),i=o=a+1):c==="]"&&(i||mt("Access path missing open bracket: "+n),i>0&&u(),i=0,o=a+1)}return i&&mt("Access path missing closing bracket: "+n),r&&mt("Access path missing closing quote: "+n),a>o&&(a++,u()),e}function XC(n,e,t){const r=YC(n);return n=r.length===1?r[0]:n,Si(QC(r),[n],n)}XC("id"),Si(n=>n,[],"identity"),Si(()=>0,[],"zero"),Si(()=>1,[],"one"),Si(()=>!0,[],"true"),Si(()=>!1,[],"false");const ZC=new Set([...Object.getOwnPropertyNames(Object.prototype).filter(n=>typeof Object.prototype[n]=="function"),"__proto__"]);function fm(n){return typeof n=="function"}function vc(n,e){return Object.hasOwn(n,e)}function KC(n){return typeof n=="string"}function hm(n){const e={},t=n.length;for(let r=0;r<t;++r)e[n[r]]=!0;return e}const JC="RawCode",$C="Literal",e4="Property",t4="Identifier",n4="ArrayExpression",r4="BinaryExpression",i4="CallExpression",s4="ConditionalExpression",o4="LogicalExpression",a4="MemberExpression",c4="ObjectExpression",u4="UnaryExpression";function Tt(n){this.type=n}Tt.prototype.visit=function(n){let e,t,r;if(n(this))return 1;for(e=l4(this),t=0,r=e.length;t<r;++t)if(e[t].visit(n))return 1};function l4(n){switch(n.type){case n4:return n.elements;case r4:case o4:return[n.left,n.right];case i4:return[n.callee].concat(n.arguments);case s4:return[n.test,n.consequent,n.alternate];case a4:return[n.object,n.property];case c4:return n.properties;case e4:return[n.key,n.value];case u4:return[n.argument];case t4:case $C:case JC:default:return[]}}var Vt,V,B,_e,fe,Sc=1,uo=2,Sr=3,On=4,Ec=5,Er=6,it=7,lo=8,f4=9;Vt={},Vt[Sc]="Boolean",Vt[uo]="<end>",Vt[Sr]="Identifier",Vt[On]="Keyword",Vt[Ec]="Null",Vt[Er]="Numeric",Vt[it]="Punctuator",Vt[lo]="String",Vt[f4]="RegularExpression";var h4="ArrayExpression",d4="BinaryExpression",p4="CallExpression",m4="ConditionalExpression",dm="Identifier",g4="Literal",y4="LogicalExpression",b4="MemberExpression",x4="ObjectExpression",A4="Property",w4="UnaryExpression",Pe="Unexpected token %0",v4="Unexpected number",S4="Unexpected string",E4="Unexpected identifier",C4="Unexpected reserved word",D4="Unexpected end of input",Xl="Invalid regular expression",Zl="Invalid regular expression: missing /",pm="Octal literals are not allowed in strict mode.",I4="Duplicate data property in object literal not allowed in strict mode",ze="ILLEGAL",fo="Disabled.",T4=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),B4=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u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-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function Cc(n,e){if(!n)throw new Error("ASSERT: "+e)}function un(n){return n>=48&&n<=57}function Kl(n){return"0123456789abcdefABCDEF".includes(n)}function ho(n){return"01234567".includes(n)}function k4(n){return n===32||n===9||n===11||n===12||n===160||n>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(n)}function po(n){return n===10||n===13||n===8232||n===8233}function mo(n){return n===36||n===95||n>=65&&n<=90||n>=97&&n<=122||n===92||n>=128&&T4.test(String.fromCharCode(n))}function Dc(n){return n===36||n===95||n>=65&&n<=90||n>=97&&n<=122||n>=48&&n<=57||n===92||n>=128&&B4.test(String.fromCharCode(n))}const F4={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function mm(){for(;B<_e;){const n=V.charCodeAt(B);if(k4(n)||po(n))++B;else break}}function Jl(n){var e,t,r,i=0;for(t=n==="u"?4:2,e=0;e<t;++e)B<_e&&Kl(V[B])?(r=V[B++],i=i*16+"0123456789abcdef".indexOf(r.toLowerCase())):ae({},Pe,ze);return String.fromCharCode(i)}function P4(){var n,e,t,r;for(n=V[B],e=0,n==="}"&&ae({},Pe,ze);B<_e&&(n=V[B++],!!Kl(n));)e=e*16+"0123456789abcdef".indexOf(n.toLowerCase());return(e>1114111||n!=="}")&&ae({},Pe,ze),e<=65535?String.fromCharCode(e):(t=(e-65536>>10)+55296,r=(e-65536&1023)+56320,String.fromCharCode(t,r))}function gm(){var n,e;for(n=V.charCodeAt(B++),e=String.fromCharCode(n),n===92&&(V.charCodeAt(B)!==117&&ae({},Pe,ze),++B,n=Jl("u"),(!n||n==="\\"||!mo(n.charCodeAt(0)))&&ae({},Pe,ze),e=n);B<_e&&(n=V.charCodeAt(B),!!Dc(n));)++B,e+=String.fromCharCode(n),n===92&&(e=e.substr(0,e.length-1),V.charCodeAt(B)!==117&&ae({},Pe,ze),++B,n=Jl("u"),(!n||n==="\\"||!Dc(n.charCodeAt(0)))&&ae({},Pe,ze),e+=n);return e}function M4(){var n,e;for(n=B++;B<_e;){if(e=V.charCodeAt(B),e===92)return B=n,gm();if(Dc(e))++B;else break}return V.slice(n,B)}function R4(){var n,e,t;return n=B,e=V.charCodeAt(B)===92?gm():M4(),e.length===1?t=Sr:F4.hasOwnProperty(e)?t=On:e==="null"?t=Ec:e==="true"||e==="false"?t=Sc:t=Sr,{type:t,value:e,start:n,end:B}}function $l(){var n=B,e=V.charCodeAt(B),t,r=V[B],i,s,o;switch(e){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++B,{type:it,value:String.fromCharCode(e),start:n,end:B};default:if(t=V.charCodeAt(B+1),t===61)switch(e){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return B+=2,{type:it,value:String.fromCharCode(e)+String.fromCharCode(t),start:n,end:B};case 33:case 61:return B+=2,V.charCodeAt(B)===61&&++B,{type:it,value:V.slice(n,B),start:n,end:B}}}if(o=V.substr(B,4),o===">>>=")return B+=4,{type:it,value:o,start:n,end:B};if(s=o.substr(0,3),s===">>>"||s==="<<="||s===">>=")return B+=3,{type:it,value:s,start:n,end:B};if(i=s.substr(0,2),r===i[1]&&"+-<>&|".includes(r)||i==="=>")return B+=2,{type:it,value:i,start:n,end:B};if(i==="//"&&ae({},Pe,ze),"<>=!+-*%&|^/".includes(r))return++B,{type:it,value:r,start:n,end:B};ae({},Pe,ze)}function O4(n){let e="";for(;B<_e&&Kl(V[B]);)e+=V[B++];return e.length===0&&ae({},Pe,ze),mo(V.charCodeAt(B))&&ae({},Pe,ze),{type:Er,value:parseInt("0x"+e,16),start:n,end:B}}function N4(n){let e="0"+V[B++];for(;B<_e&&ho(V[B]);)e+=V[B++];return(mo(V.charCodeAt(B))||un(V.charCodeAt(B)))&&ae({},Pe,ze),{type:Er,value:parseInt(e,8),octal:!0,start:n,end:B}}function ym(){var n,e,t;if(t=V[B],Cc(un(t.charCodeAt(0))||t===".","Numeric literal must start with a decimal digit or a decimal point"),e=B,n="",t!=="."){if(n=V[B++],t=V[B],n==="0"){if(t==="x"||t==="X")return++B,O4(e);if(ho(t))return N4(e);t&&un(t.charCodeAt(0))&&ae({},Pe,ze)}for(;un(V.charCodeAt(B));)n+=V[B++];t=V[B]}if(t==="."){for(n+=V[B++];un(V.charCodeAt(B));)n+=V[B++];t=V[B]}if(t==="e"||t==="E")if(n+=V[B++],t=V[B],(t==="+"||t==="-")&&(n+=V[B++]),un(V.charCodeAt(B)))for(;un(V.charCodeAt(B));)n+=V[B++];else ae({},Pe,ze);return mo(V.charCodeAt(B))&&ae({},Pe,ze),{type:Er,value:parseFloat(n),start:e,end:B}}function L4(){var n="",e,t,r,i,s=!1;for(e=V[B],Cc(e==="'"||e==='"',"String literal must starts with a quote"),t=B,++B;B<_e;)if(r=V[B++],r===e){e="";break}else if(r==="\\")if(r=V[B++],!r||!po(r.charCodeAt(0)))switch(r){case"u":case"x":V[B]==="{"?(++B,n+=P4()):n+=Jl(r);break;case"n":n+=`
|
|
364
|
+
`;break;case"r":n+="\r";break;case"t":n+=" ";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:ho(r)?(i="01234567".indexOf(r),i!==0&&(s=!0),B<_e&&ho(V[B])&&(s=!0,i=i*8+"01234567".indexOf(V[B++]),"0123".includes(r)&&B<_e&&ho(V[B])&&(i=i*8+"01234567".indexOf(V[B++]))),n+=String.fromCharCode(i)):n+=r;break}else r==="\r"&&V[B]===`
|
|
365
|
+
`&&++B;else{if(po(r.charCodeAt(0)))break;n+=r}return e!==""&&ae({},Pe,ze),{type:lo,value:n,octal:s,start:t,end:B}}function z4(n,e){let t=n;e.includes("u")&&(t=t.replace(/\\u\{([0-9a-fA-F]+)\}/g,(r,i)=>{if(parseInt(i,16)<=1114111)return"x";ae({},Xl)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(t)}catch{ae({},Xl)}try{return new RegExp(n,e)}catch{return null}}function U4(){var n,e,t,r,i;for(n=V[B],Cc(n==="/","Regular expression literal must start with a slash"),e=V[B++],t=!1,r=!1;B<_e;)if(n=V[B++],e+=n,n==="\\")n=V[B++],po(n.charCodeAt(0))&&ae({},Zl),e+=n;else if(po(n.charCodeAt(0)))ae({},Zl);else if(t)n==="]"&&(t=!1);else if(n==="/"){r=!0;break}else n==="["&&(t=!0);return r||ae({},Zl),i=e.substr(1,e.length-2),{value:i,literal:e}}function G4(){var n,e,t;for(e="",t="";B<_e&&(n=V[B],!!Dc(n.charCodeAt(0)));)++B,n==="\\"&&B<_e?ae({},Pe,ze):(t+=n,e+=n);return t.search(/[^gimuy]/g)>=0&&ae({},Xl,t),{value:t,literal:e}}function H4(){var n,e,t,r;return fe=null,mm(),n=B,e=U4(),t=G4(),r=z4(e.value,t.value),{literal:e.literal+t.literal,value:r,regex:{pattern:e.value,flags:t.value},start:n,end:B}}function V4(n){return n.type===Sr||n.type===On||n.type===Sc||n.type===Ec}function bm(){if(mm(),B>=_e)return{type:uo,start:B,end:B};const n=V.charCodeAt(B);return mo(n)?R4():n===40||n===41||n===59?$l():n===39||n===34?L4():n===46?un(V.charCodeAt(B+1))?ym():$l():un(n)?ym():$l()}function st(){const n=fe;return B=n.end,fe=bm(),B=n.end,n}function xm(){const n=B;fe=bm(),B=n}function _4(n){const e=new Tt(h4);return e.elements=n,e}function Am(n,e,t){const r=new Tt(n==="||"||n==="&&"?y4:d4);return r.operator=n,r.left=e,r.right=t,r}function j4(n,e){const t=new Tt(p4);return t.callee=n,t.arguments=e,t}function Q4(n,e,t){const r=new Tt(m4);return r.test=n,r.consequent=e,r.alternate=t,r}function ef(n){const e=new Tt(dm);return e.name=n,e}function go(n){const e=new Tt(g4);return e.value=n.value,e.raw=V.slice(n.start,n.end),n.regex&&(e.raw==="//"&&(e.raw="/(?:)/"),e.regex=n.regex),e}function wm(n,e,t){const r=new Tt(b4);return r.computed=n==="[",r.object=e,r.property=t,r.computed||(t.member=!0),r}function W4(n){const e=new Tt(x4);return e.properties=n,e}function vm(n,e,t){const r=new Tt(A4);return r.key=e,r.value=t,r.kind=n,r}function q4(n,e){const t=new Tt(w4);return t.operator=n,t.argument=e,t.prefix=!0,t}function ae(n,e){var t,r=Array.prototype.slice.call(arguments,2),i=e.replace(/%(\d)/g,(s,o)=>(Cc(o<r.length,"Message reference must be in range"),r[o]));throw t=new Error(i),t.index=B,t.description=i,t}function Ic(n){n.type===uo&&ae(n,D4),n.type===Er&&ae(n,v4),n.type===lo&&ae(n,S4),n.type===Sr&&ae(n,E4),n.type===On&&ae(n,C4),ae(n,Pe,n.value)}function je(n){const e=st();(e.type!==it||e.value!==n)&&Ic(e)}function ge(n){return fe.type===it&&fe.value===n}function tf(n){return fe.type===On&&fe.value===n}function Y4(){const n=[];for(B=fe.start,je("[");!ge("]");)ge(",")?(st(),n.push(null)):(n.push(Cr()),ge("]")||je(","));return st(),_4(n)}function Sm(){B=fe.start;const n=st();return n.type===lo||n.type===Er?(n.octal&&ae(n,pm),go(n)):ef(n.value)}function X4(){var n,e,t,r;if(B=fe.start,n=fe,n.type===Sr)return t=Sm(),je(":"),r=Cr(),vm("init",t,r);if(n.type===uo||n.type===it)Ic(n);else return e=Sm(),je(":"),r=Cr(),vm("init",e,r)}function Z4(){var n=[],e,t,r,i={},s=String;for(B=fe.start,je("{");!ge("}");)e=X4(),e.key.type===dm?t=e.key.name:t=s(e.key.value),r="$"+t,Object.prototype.hasOwnProperty.call(i,r)?ae({},I4):i[r]=!0,n.push(e),ge("}")||je(",");return je("}"),W4(n)}function K4(){je("(");const n=nf();return je(")"),n}const J4={if:1};function $4(){var n,e,t;if(ge("("))return K4();if(ge("["))return Y4();if(ge("{"))return Z4();if(n=fe.type,B=fe.start,n===Sr||J4[fe.value])t=ef(st().value);else if(n===lo||n===Er)fe.octal&&ae(fe,pm),t=go(st());else{if(n===On)throw new Error(fo);n===Sc?(e=st(),e.value=e.value==="true",t=go(e)):n===Ec?(e=st(),e.value=null,t=go(e)):ge("/")||ge("/=")?(t=go(H4()),xm()):Ic(st())}return t}function e8(){const n=[];if(je("("),!ge(")"))for(;B<_e&&(n.push(Cr()),!ge(")"));)je(",");return je(")"),n}function t8(){B=fe.start;const n=st();return V4(n)||Ic(n),ef(n.value)}function n8(){return je("."),t8()}function r8(){je("[");const n=nf();return je("]"),n}function i8(){var n,e,t;for(n=$4();;)if(ge("."))t=n8(),n=wm(".",n,t);else if(ge("("))e=e8(),n=j4(n,e);else if(ge("["))t=r8(),n=wm("[",n,t);else break;return n}function Em(){const n=i8();if(fe.type===it&&(ge("++")||ge("--")))throw new Error(fo);return n}function Tc(){var n,e;if(fe.type!==it&&fe.type!==On)e=Em();else{if(ge("++")||ge("--"))throw new Error(fo);if(ge("+")||ge("-")||ge("~")||ge("!"))n=st(),e=Tc(),e=q4(n.value,e);else{if(tf("delete")||tf("void")||tf("typeof"))throw new Error(fo);e=Em()}}return e}function Cm(n){let e=0;if(n.type!==it&&n.type!==On)return 0;switch(n.value){case"||":e=1;break;case"&&":e=2;break;case"|":e=3;break;case"^":e=4;break;case"&":e=5;break;case"==":case"!=":case"===":case"!==":e=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":e=7;break;case"<<":case">>":case">>>":e=8;break;case"+":case"-":e=9;break;case"*":case"/":case"%":e=11;break}return e}function s8(){var n,e,t,r,i,s,o,a,c,u;if(n=fe,c=Tc(),r=fe,i=Cm(r),i===0)return c;for(r.prec=i,st(),e=[n,fe],o=Tc(),s=[c,r,o];(i=Cm(fe))>0;){for(;s.length>2&&i<=s[s.length-2].prec;)o=s.pop(),a=s.pop().value,c=s.pop(),e.pop(),t=Am(a,c,o),s.push(t);r=st(),r.prec=i,s.push(r),e.push(fe),t=Tc(),s.push(t)}for(u=s.length-1,t=s[u],e.pop();u>1;)e.pop(),t=Am(s[u-1].value,s[u-2],t),u-=2;return t}function Cr(){var n,e,t;return n=s8(),ge("?")&&(st(),e=Cr(),je(":"),t=Cr(),n=Q4(n,e,t)),n}function nf(){const n=Cr();if(ge(","))throw new Error(fo);return n}function Dm(n){V=n,B=0,_e=V.length,fe=null,xm();const e=nf();if(fe.type!==uo)throw new Error("Unexpect token after expression.");return e}var o8={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function Im(n){function e(o,a,c,u){let l=n(a[0]);return c&&(l=c+"("+l+")",c.lastIndexOf("new ",0)===0&&(l="("+l+")")),l+"."+o+(u<0?"":u===0?"()":"("+a.slice(1).map(n).join(",")+")")}function t(o,a,c){return u=>e(o,u,a,c)}const r="new Date",i="String",s="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(o){o.length<3&&mt("Missing arguments to clamp function."),o.length>3&&mt("Too many arguments to clamp function.");const a=o.map(n);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:r,date:t("getDate",r,0),day:t("getDay",r,0),year:t("getFullYear",r,0),month:t("getMonth",r,0),hours:t("getHours",r,0),minutes:t("getMinutes",r,0),seconds:t("getSeconds",r,0),milliseconds:t("getMilliseconds",r,0),time:t("getTime",r,0),timezoneoffset:t("getTimezoneOffset",r,0),utcdate:t("getUTCDate",r,0),utcday:t("getUTCDay",r,0),utcyear:t("getUTCFullYear",r,0),utcmonth:t("getUTCMonth",r,0),utchours:t("getUTCHours",r,0),utcminutes:t("getUTCMinutes",r,0),utcseconds:t("getUTCSeconds",r,0),utcmilliseconds:t("getUTCMilliseconds",r,0),length:t("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:t("toUpperCase",i,0),lower:t("toLowerCase",i,0),substring:t("substring",i),split:t("split",i),trim:t("trim",i,0),btoa:"btoa",atob:"atob",regexp:s,test:t("test",s),if:function(o){o.length<3&&mt("Missing arguments to if function."),o.length>3&&mt("Too many arguments to if function.");const a=o.map(n);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function a8(n){const e=n&&n.length-1;return e&&(n[0]==='"'&&n[e]==='"'||n[0]==="'"&&n[e]==="'")?n.slice(1,-1):n}function Tm(n){n=n||{};const e=n.allowed?hm(n.allowed):{},t=n.forbidden?hm(n.forbidden):{},r=n.constants||o8,i=(n.functions||Im)(f),s=n.globalvar,o=n.fieldvar,a=fm(s)?s:p=>`${s}["${p}"]`;[...Object.getOwnPropertyNames(Object.prototype).filter(p=>typeof Object.prototype[p]=="function")];let c={},u={},l=0;function f(p){if(KC(p))return p;const m=d[p.type];return m==null&&mt("Unsupported type: "+p.type),m(p)}const d={Literal:p=>p.raw,Identifier:p=>{const m=p.name;return l>0?m:vc(t,m)?mt("Illegal identifier: "+m):vc(r,m)?r[m]:vc(e,m)?m:(c[m]=1,a(m))},MemberExpression:p=>{const m=!p.computed,g=f(p.object);m&&(l+=1);const y=f(p.property);return g===o&&(u[a8(y)]=1),m&&(l-=1),g+(m?"."+y:"["+y+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&mt("Illegal callee type: "+p.callee.type);const m=p.callee.name,g=p.arguments,y=vc(i,m)&&i[m];return y||mt("Unrecognized function: "+m),fm(y)?y(g):y+"("+g.map(f).join(",")+")"},ArrayExpression:p=>"["+p.elements.map(f).join(",")+"]",BinaryExpression:p=>"("+f(p.left)+" "+p.operator+" "+f(p.right)+")",UnaryExpression:p=>"("+p.operator+f(p.argument)+")",ConditionalExpression:p=>"("+f(p.test)+"?"+f(p.consequent)+":"+f(p.alternate)+")",LogicalExpression:p=>"("+f(p.left)+p.operator+f(p.right)+")",ObjectExpression:p=>{for(const m of p.properties){const g=m.key.name;ZC.has(g)&&mt("Illegal property: "+g)}return"{"+p.properties.map(f).join(",")+"}"},Property:p=>{l+=1;const m=f(p.key);return l-=1,m+":"+f(p.value)}};function h(p){const m={code:f(p),globals:Object.keys(c),fields:Object.keys(u)};return c={},u={},m}return h.functions=i,h.constants=r,h}function Bm(n,e,t){return t=(t-n)/(e-n),t=Math.max(0,Math.min(1,t)),t*t*(3-2*t)}function c8(n,e,t){return vi((t-n)/(e-n),0,1)}const km={clamp:vi,format(n,e){return Le(e)(n)},mapHasKey(n,e){return n.has(e)},isArray:Ue,isBoolean:Is,isDefined(n){return n!==void 0},isNumber:Ze,isObject:Ge,isRegExp:$x,isString:me,isValid(n){return n!=null&&n===n},lerp:Od,linearstep:c8,replace(n,e,t){return String(n).replace(e,t)},smoothstep:Bm};function u8(n){const e=Im(n);for(const t in km)e[t]=`this.${t}`;return e}const l8=Tm({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:u8});function f8(n,e={}){try{const t=Dm(n),r=l8(t),i=Function("datum","globalObject",`"use strict";
|
|
366
366
|
try {
|
|
367
367
|
return (${r.code});
|
|
368
368
|
} catch (e) {
|
|
369
|
-
throw new Error("Error evaluating expression: " + ${JSON.stringify(
|
|
370
|
-
}`).bind(
|
|
369
|
+
throw new Error("Error evaluating expression: " + ${JSON.stringify(n)} + ", " + e.message, e);
|
|
370
|
+
}`).bind(km),s=o=>i(o,e);return s.fields=r.fields,s.globals=r.globals,s.code=r.code,s}catch(t){throw new Error(`Invalid expression: ${n}, ${t.message}`)}}const h8=Tm({forbidden:[],allowed:["event"],globalvar:"globalObject"});function Fm(n){try{const e=Dm(n),t=h8(e);return Function("event","globalObject",`"use strict";
|
|
371
371
|
try {
|
|
372
|
-
return !!(${
|
|
372
|
+
return !!(${t.code});
|
|
373
373
|
} catch (e) {
|
|
374
|
-
throw new Error("Error evaluating expression: " + ${JSON.stringify(
|
|
375
|
-
}`)}catch(e){throw new Error(`Invalid expression: ${
|
|
374
|
+
throw new Error("Error evaluating expression: " + ${JSON.stringify(n)} + ", " + e.message, e);
|
|
375
|
+
}`)}catch(e){throw new Error(`Invalid expression: ${n}, ${e.message}`)}}class d8{constructor(e){R(this,Kn);Y(this,"paramListeners");R(this,qr,new Map);R(this,es,new Map);R(this,ts,new Map);R(this,na);G(this,na,e??(()=>{})),G(this,Kn,new Map),this.paramListeners=new Map}registerParam(e){const t=e.name;if("value"in e&&"expr"in e)throw new Error(`The parameter "${t}" must not have both value and expr properties!`);let r;if(e.push=="outer"){const i=this.findMediatorForParam(t);if(!i)throw new Error(`Parameter "${t}" not found in outer scope!`);const s=i.paramConfigs.get(t);if("expr"in s||"select"in s)throw new Error(`The outer parameter "${t}" must not have expr or select properties!`);r=i.getSetter(t),E(this,qr).set(t,r)}else if("value"in e)r=this.allocateSetter(t,e.value);else if("expr"in e){const i=this.createExpression(e.expr),s=this.allocateSetter(t,i(null));i.addListener(()=>s(i(null))),r=o=>{}}else r=this.allocateSetter(t,null);if("select"in e){const i=kc(e.select);if(Fc(i))r(i.toggle?sf():rf(null));else if(Lm(i)){if(!i.encodings)throw new Error(`Interval selection "${t}" must have encodings defined!`);r(Rm(i.encodings))}}return E(this,ts).set(t,e),r}allocateSetter(e,t,r=!1){if(yo(e),E(this,qr).has(e))throw new Error("Setter already allocated for parameter: "+e);const i=s=>{const o=E(this,Kn).get(e);if(s!==o){E(this,Kn).set(e,s);const a=this.paramListeners.get(e);if(a&&!r)for(const c of a)c()}};return i(t),E(this,qr).set(e,i),i}getSetter(e){const t=E(this,qr).get(e);if(!t)throw new Error("Setter not found for parameter: "+e);return t}getValue(e){return E(this,Kn).get(e)}findValue(e){const t=this.findMediatorForParam(e);return t==null?void 0:t.getValue(e)}get paramConfigs(){return E(this,ts)}findMediatorForParam(e){var t;return E(this,Kn).has(e)?this:(t=E(this,na).call(this))==null?void 0:t.findMediatorForParam(e)}createExpression(e){if(E(this,es).has(e))return E(this,es).get(e);const t={},r=f8(e,t),i=new Map;for(const o of r.globals){const a=this.findMediatorForParam(o);if(!a)throw new Error(`Unknown variable "${o}" in expression: ${e}`);i.set(o,a),Object.defineProperty(t,o,{enumerable:!0,get(){return a.getValue(o)}})}const s=new Set;return r.addListener=o=>{for(const[a,c]of i){const u=c.paramListeners.get(a)??new Set;c.paramListeners.set(a,u),u.add(o),s.add(o)}},r.removeListener=o=>{var a;for(const[c,u]of i)(a=u.paramListeners.get(c))==null||a.delete(o);s.delete(o)},r.invalidate=()=>{var o;for(const[a,c]of i)for(const u of s)(o=c.paramListeners.get(a))==null||o.delete(u);s.clear()},r.identifier=()=>r.code,E(this,es).set(e,r),r}evaluateAndGet(e){return this.createExpression(e)()}hasPointSelections(){for(const e of E(this,ts).values())if(Pm(e)){const t=e.select;if(me(t)){if(t=="point")return!0}else if(t.type=="point")return!0}return!1}}Kn=new WeakMap,qr=new WeakMap,es=new WeakMap,ts=new WeakMap,na=new WeakMap;function Qe(n){return typeof n=="object"&&n!=null&&"expr"in n&&me(n.expr)}function gt(n){if(Qe(n))throw new Error(`ExprRef ${JSON.stringify(n)} not allowed here. Expected a scalar value.`);return n}function p8(n){return("expr"in n||"bind"in n)&&!("select"in n)}function Pm(n){return!("expr"in n||"bind"in n)&&"select"in n}function Bc(n,e,t){const r={...e},i=[],s=o=>{i.push(o),i.length===1&&queueMicrotask(()=>{t(i.slice()),i.length=0})};for(const[o,a]of Object.entries(e))if(Qe(a)){const c=n.createExpression(a.expr);t&&c.addListener(()=>s(o)),Object.defineProperty(r,o,{enumerable:!0,get(){return c()}})}else r[o]=a;return r}function yo(n){if(!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(n))throw new Error(`Invalid parameter name: ${n}. Must be a valid JavaScript identifier.`);return n}function Mm(n){return Object.assign(()=>n,{addListener:()=>{},removeListener:()=>{},invalidate:()=>{},identifier:()=>"constant",fields:[],globals:[],code:JSON.stringify(n)})}function rf(n){return{type:"single",datum:n,uniqueId:n==null?void 0:n[pt]}}function sf(n){return n??(n=[]),{type:"multi",data:new Map(n.map(e=>[e[pt],e]))}}function Rm(n){return{type:"interval",intervals:Object.fromEntries(n.map(e=>[e,null]))}}function m8(n,{add:e,remove:t,toggle:r}){const i=n.data;for(const s of e??[])i.set(s[pt],s);for(const s of t??[])i.delete(s[pt]);for(const s of r??[]){const o=s[pt];i.has(o)?i.delete(o):i.set(o,s)}return{type:"multi",data:i}}function g8(n,e){const t=!!(n.empty??!0),r=yo(n.param),i=n.fields??{};if(Nm(e))return`${r}.uniqueId == null ? ${t} : ${r}.uniqueId === datum[${JSON.stringify(pt)}]`;if(of(e))return`${r}.data.size == 0 ? ${t} : mapHasKey(${r}.data, datum[${JSON.stringify(pt)}])`;if(Om(e)){const s=Object.keys(e.intervals),o=Object.keys(i).filter(cf);if(o.length===0)throw new Error("Filtering using interval selections requires at least one primary positional channel in the config! "+JSON.stringify(n));if(o.some(u=>!s.includes(u)))throw new Error(`Selection channels (${s.join(", ")}) do not match the fields: ${JSON.stringify(n)}!`);const a=u=>`datum[${JSON.stringify(u)}]`;return s.map(u=>{const l=lf(u),f=i[u],d=i[l]??i[u],h=`${r}.intervals.${u}[0] <= ${a(d)}`,p=`${a(f)} <= ${r}.intervals.${u}[1]`;return`(${r}.intervals.${u} ? (${h} && ${p}) : ${t})`}).join(" && ")}else throw new Error(`Unrecognized selection type : ${JSON.stringify(e)}`)}function Om(n){return n.type==="interval"}function Nm(n){return n.type==="single"}function of(n){return n.type==="multi"}function kc(n){const e=typeof n=="string"?{type:n}:{...n};return e.on=e.on?Um(e.on):Fc(e)?{type:"click"}:void 0,e.clear=e.clear===!1?void 0:e.clear===!0||e.clear==null?{type:"dblclick"}:Um(e.clear),Fc(e)&&e.on.type==="click"&&(e.toggle=!0),e}function Fc(n){return n&&n.type=="point"}function Lm(n){return n&&n.type=="interval"}function zm(n){return Object.values(n.intervals).some(e=>e&&e.length===2)}function y8(n,e){return Object.entries(n.intervals).every(([t,r])=>(t=="x"||t=="y")&&r&&r[0]<=e[t]&&r[1]>=e[t])}function Um(n){if(typeof n=="string"){const e=n.match(/^([a-zA-Z]+)(?:\[(.+)\])?$/);if(!e)throw new Error(`Invalid event type string: ${n}`);const[,t,r]=e,i={type:t};return r&&(i.filter=r),i}else return n}function ue(n,e=n){if(/^[A-Za-z0-9_]+$/.test(n)){const t=function(i){n in i||b8(i,n)},r=new Function("validator",`
|
|
376
376
|
let validated = !validator;
|
|
377
377
|
return function accessField(datum) {
|
|
378
378
|
if (!validated) {
|
|
379
379
|
validator(datum);
|
|
380
380
|
validated = true;
|
|
381
381
|
}
|
|
382
|
-
return datum[${JSON.stringify(
|
|
383
|
-
}`)(n);return Je(r,[t],e)}else return mc(t)}function z5(t,e){throw new Error(`Invalid field "${e}". Available fields or properties: ${Object.keys(t).join(", ")}`)}function p1(t,e,n){if(!t)return;function r(i){const s=i;return s.fields??(s.fields=[]),s.constant=s.fields.length===0,s.channelDef=e,s.channel=t,s.scaleChannel=(($t(e)&&e.resolutionChannel)??(xl(t)&&t))||void 0,"param"in e?(s.predicate=a1(!1),s.predicate.param=e.param,s.predicate.empty=e.empty??!0):(s.predicate=a1(!0),s.predicate.empty=!1),s.asNumberAccessor=()=>s,s}function o(i){if(Ot(i)){const s=r(n.createExpression(i.expr));if(s.fields.length>0)throw new Error("Expression in DatumDef/ValueDef cannot access data fields: "+i.expr);return s}else{const s=i;return r(()=>s)}}if(Ir(e))try{return r(Qe(e.field))}catch(i){throw new Error(`Invalid field definition: ${i.message}`)}else{if(oa(e))return r(n.createExpression(e.expr));if(ia(e))return o(e.datum);if(ln(e))return o(e.value);throw new Error(`Invalid channel definition: "${t}": ${JSON.stringify(e)}! The channel definition must contain one of the following properties: "field", "datum", "value" or "expr".`)}}function U5(t,e,n){const r=[];if(j5(e)||oh(e)){const o=Array.isArray(e.condition)?e.condition:[e.condition];for(const i of o)r.push(p1(t,i,n))}if(r.push(p1(t,e,n)),r.filter(o=>!o.constant).length>1)throw new Error("Only one accessor can be non-constant. Channel: "+t);return r}function G5(t,e){const n={},r=o=>{var i;return(i=t.getScaleResolution(o))==null?void 0:i.scale};for(const[o,i]of Object.entries(e))i&&(n[o]=H5(U5(o,i,t.paramMediator),r));return n}function H5(t,e){if(t.length===1)return g1(t[0],e);const n=t.map(i=>i.predicate),r=t.map(i=>g1(i,e));return Object.assign(i=>{for(let s=0;s<r.length;s++)if(n[s](i))return r[s](i)},{constant:!1,accessors:r.map(i=>i.accessors[0]),dataAccessor:r.map(i=>i.dataAccessor).find(i=>i),scale:r.map(i=>i.scale).find(i=>i),channelDef:t.at(-1).channelDef})}function g1(t,e){const{channel:n,scaleChannel:r,channelDef:o}=t,i=t.scaleChannel?e(r):void 0;if(r&&!i)throw new Error(`Missing scale! "${n}": ${JSON.stringify(o)}`);return Object.assign(i?s=>i(t(s)):s=>t(s),{scale:i,constant:t.constant,accessors:[t],dataAccessor:t.constant?void 0:t,channelDef:o})}function ln(t){return t&&"value"in t}function Ir(t){return t&&"field"in t}function ia(t){return t&&"datum"in t}function $t(t){return Ir(t)||ia(t)||oa(t)||y1(t)}function m1(t){if(oh(t)){const e=t.condition;if(!Array.isArray(e)&&$t(e))return e}else if($t(t))return t}function V5(t,e){const n=t.mark.encoding[e];if($t(n))return n;throw new Error("Not a channel def with scale!")}function y1(t){return t&&"chrom"in t}function oa(t){return t&&"expr"in t}function j5(t){return(Ir(t)||ia(t))&&"condition"in t}function oh(t){return ln(t)&&"condition"in t}const gi=["x","y"],q5=["x2","y2"],W5=[...gi,...q5];function sh(t){return gi.includes(t)}function sa(t){return W5.includes(t)}const b1={x:"x2",y:"y2"},w1=Object.fromEntries(Object.entries(b1).map(t=>[t[1],t[0]]));function ah(t){return t in w1}function ch(t){const e=b1[t];if(e)return e;throw new Error(`${t} has no secondary channel!`)}function mi(t){return w1[t]??t}function Tr(t){return["color","fill","stroke"].includes(mi(t))}function wl(t){return["shape"].includes(t)}function xl(t){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(t)}function Y5(t){switch(t){case"shape":return["circle","square","cross","diamond","triangle-up","triangle-right","triangle-down","triangle-left","tick-up","tick-right","tick-down","tick-left"]}}function x1(t){if(!wl(t))throw new Error("Not a discrete channel: "+t);const e=new Map(Y5(t).map((n,r)=>[n,r]));return n=>{const r=e.get(n);if(r!==void 0)return r;throw new Error(`Invalid value for "${t}" channel: ${n}`)}}function fo(t,e,n){return t.fields=e||[],t.fname=n,t}function Q5(t){return t.length===1?Z5(t[0]):X5(t)}const Z5=t=>function(e){return e[t]},X5=t=>{const e=t.length;return function(n){for(let r=0;r<e;++r)n=n[t[r]];return n}};function lh(t){throw Error(t)}function K5(t){const e=[],n=t.length;let r=null,o=0,i="",s,a,c;t=t+"";function l(){e.push(i+t.substring(s,a)),i="",s=a+1}for(s=a=0;a<n;++a)if(c=t[a],c==="\\")i+=t.substring(s,a++),s=a;else if(c===r)l(),r=null,o=-1;else{if(r)continue;s===o&&c==='"'||s===o&&c==="'"?(s=a+1,r=c):c==="."&&!o?a>s?l():s=a+1:c==="["?(a>s&&l(),o=s=a+1):c==="]"&&(o||lh("Access path missing open bracket: "+t),o>0&&l(),o=0,s=a+1)}return o&&lh("Access path missing closing bracket: "+t),r&&lh("Access path missing closing quote: "+t),a>s&&(a++,l()),e}function J5(t,e,n){const r=K5(t);return t=r.length===1?r[0]:t,fo(Q5(r),[t],t)}J5("id"),fo(t=>t,[],"identity"),fo(()=>0,[],"zero"),fo(()=>1,[],"one"),fo(()=>!0,[],"true"),fo(()=>!1,[],"false"),[...Object.getOwnPropertyNames(Object.prototype).filter(t=>typeof Object.prototype[t]=="function")];var v1=Array.isArray;function A1(t){return t[t.length-1]}function $5(t){return t==null||t===""?null:+t}function eI(t){return t!=null?v1(t)?t:[t]:[]}function tI(t){const e={},n=t.length;for(let r=0;r<n;++r)e[t[r]]=!0;return e}function zn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Dr(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const uh=Symbol("implicit");function fh(){var t=new Yn,e=[],n=[],r=uh;function o(i){let s=t.get(i);if(s===void 0){if(r!==uh)return r;t.set(i,s=e.push(i)-1)}return n[s%n.length]}return o.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new Yn;for(const s of i)t.has(s)||t.set(s,e.push(s)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return fh(e,n).unknown(r)},zn.apply(o,arguments),o}function ho(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function aa(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Br(){}var yi=.7,po=1/yi,go="\\s*([+-]?\\d+)\\s*",ca="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Un="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nI=/^#([0-9a-f]{3,8})$/,rI=new RegExp(`^rgb\\(${go},${go},${go}\\)$`),iI=new RegExp(`^rgb\\(${Un},${Un},${Un}\\)$`),oI=new RegExp(`^rgba\\(${go},${go},${go},${ca}\\)$`),sI=new RegExp(`^rgba\\(${Un},${Un},${Un},${ca}\\)$`),aI=new RegExp(`^hsl\\(${ca},${Un},${Un}\\)$`),cI=new RegExp(`^hsla\\(${ca},${Un},${Un},${ca}\\)$`),E1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ho(Br,kr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:S1,formatHex:S1,formatHex8:lI,formatHsl:uI,formatRgb:C1,toString:C1});function S1(){return this.rgb().formatHex()}function lI(){return this.rgb().formatHex8()}function uI(){return k1(this).formatHsl()}function C1(){return this.rgb().formatRgb()}function kr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=nI.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?I1(e):n===3?new At(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?vl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?vl(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=rI.exec(t))?new At(e[1],e[2],e[3],1):(e=iI.exec(t))?new At(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=oI.exec(t))?vl(e[1],e[2],e[3],e[4]):(e=sI.exec(t))?vl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=aI.exec(t))?B1(e[1],e[2]/100,e[3]/100,1):(e=cI.exec(t))?B1(e[1],e[2]/100,e[3]/100,e[4]):E1.hasOwnProperty(t)?I1(E1[t]):t==="transparent"?new At(NaN,NaN,NaN,0):null}function I1(t){return new At(t>>16&255,t>>8&255,t&255,1)}function vl(t,e,n,r){return r<=0&&(t=e=n=NaN),new At(t,e,n,r)}function hh(t){return t instanceof Br||(t=kr(t)),t?(t=t.rgb(),new At(t.r,t.g,t.b,t.opacity)):new At}function Al(t,e,n,r){return arguments.length===1?hh(t):new At(t,e,n,r??1)}function At(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ho(At,Al,aa(Br,{brighter(t){return t=t==null?po:Math.pow(po,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?yi:Math.pow(yi,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new At(bi(this.r),bi(this.g),bi(this.b),El(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T1,formatHex:T1,formatHex8:fI,formatRgb:D1,toString:D1}));function T1(){return`#${wi(this.r)}${wi(this.g)}${wi(this.b)}`}function fI(){return`#${wi(this.r)}${wi(this.g)}${wi(this.b)}${wi((isNaN(this.opacity)?1:this.opacity)*255)}`}function D1(){const t=El(this.opacity);return`${t===1?"rgb(":"rgba("}${bi(this.r)}, ${bi(this.g)}, ${bi(this.b)}${t===1?")":`, ${t})`}`}function El(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function bi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function wi(t){return t=bi(t),(t<16?"0":"")+t.toString(16)}function B1(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new An(t,e,n,r)}function k1(t){if(t instanceof An)return new An(t.h,t.s,t.l,t.opacity);if(t instanceof Br||(t=kr(t)),!t)return new An;if(t instanceof An)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),s=NaN,a=i-o,c=(i+o)/2;return a?(e===i?s=(n-r)/a+(n<r)*6:n===i?s=(r-e)/a+2:s=(e-n)/a+4,a/=c<.5?i+o:2-i-o,s*=60):a=c>0&&c<1?0:s,new An(s,a,c,t.opacity)}function dh(t,e,n,r){return arguments.length===1?k1(t):new An(t,e,n,r??1)}function An(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ho(An,dh,aa(Br,{brighter(t){return t=t==null?po:Math.pow(po,t),new An(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?yi:Math.pow(yi,t),new An(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new At(ph(t>=240?t-240:t+120,o,r),ph(t,o,r),ph(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new An(_1(this.h),Sl(this.s),Sl(this.l),El(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=El(this.opacity);return`${t===1?"hsl(":"hsla("}${_1(this.h)}, ${Sl(this.s)*100}%, ${Sl(this.l)*100}%${t===1?")":`, ${t})`}`}}));function _1(t){return t=(t||0)%360,t<0?t+360:t}function Sl(t){return Math.max(0,Math.min(1,t||0))}function ph(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const R1=Math.PI/180,F1=180/Math.PI,Cl=18,M1=.96422,P1=1,L1=.82521,O1=4/29,mo=6/29,N1=3*mo*mo,hI=mo*mo*mo;function z1(t){if(t instanceof Gn)return new Gn(t.l,t.a,t.b,t.opacity);if(t instanceof tr)return U1(t);t instanceof At||(t=hh(t));var e=wh(t.r),n=wh(t.g),r=wh(t.b),o=mh((.2225045*e+.7168786*n+.0606169*r)/P1),i,s;return e===n&&n===r?i=s=o:(i=mh((.4360747*e+.3850649*n+.1430804*r)/M1),s=mh((.0139322*e+.0971045*n+.7141733*r)/L1)),new Gn(116*o-16,500*(i-o),200*(o-s),t.opacity)}function gh(t,e,n,r){return arguments.length===1?z1(t):new Gn(t,e,n,r??1)}function Gn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}ho(Gn,gh,aa(Br,{brighter(t){return new Gn(this.l+Cl*(t??1),this.a,this.b,this.opacity)},darker(t){return new Gn(this.l-Cl*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=M1*yh(e),t=P1*yh(t),n=L1*yh(n),new At(bh(3.1338561*e-1.6168667*t-.4906146*n),bh(-.9787684*e+1.9161415*t+.033454*n),bh(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function mh(t){return t>hI?Math.pow(t,1/3):t/N1+O1}function yh(t){return t>mo?t*t*t:N1*(t-O1)}function bh(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function wh(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function dI(t){if(t instanceof tr)return new tr(t.h,t.c,t.l,t.opacity);if(t instanceof Gn||(t=z1(t)),t.a===0&&t.b===0)return new tr(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*F1;return new tr(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function xh(t,e,n,r){return arguments.length===1?dI(t):new tr(t,e,n,r??1)}function tr(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function U1(t){if(isNaN(t.h))return new Gn(t.l,0,0,t.opacity);var e=t.h*R1;return new Gn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}ho(tr,xh,aa(Br,{brighter(t){return new tr(this.h,this.c,this.l+Cl*(t??1),this.opacity)},darker(t){return new tr(this.h,this.c,this.l-Cl*(t??1),this.opacity)},rgb(){return U1(this).rgb()}}));var G1=-.14861,vh=1.78277,Ah=-.29227,Il=-.90649,la=1.97294,H1=la*Il,V1=la*vh,j1=vh*Ah-Il*G1;function pI(t){if(t instanceof xi)return new xi(t.h,t.s,t.l,t.opacity);t instanceof At||(t=hh(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(j1*r+H1*e-V1*n)/(j1+H1-V1),i=r-o,s=(la*(n-o)-Ah*i)/Il,a=Math.sqrt(s*s+i*i)/(la*o*(1-o)),c=a?Math.atan2(s,i)*F1-120:NaN;return new xi(c<0?c+360:c,a,o,t.opacity)}function Eh(t,e,n,r){return arguments.length===1?pI(t):new xi(t,e,n,r??1)}function xi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ho(xi,Eh,aa(Br,{brighter(t){return t=t==null?po:Math.pow(po,t),new xi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?yi:Math.pow(yi,t),new xi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*R1,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new At(255*(e+n*(G1*r+vh*o)),255*(e+n*(Ah*r+Il*o)),255*(e+n*(la*r)),this.opacity)}}));function q1(t,e,n,r,o){var i=t*t,s=i*t;return((1-3*t+3*i-s)*e+(4-6*i+3*s)*n+(1+3*t+3*i-3*s)*r+s*o)/6}function W1(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[r],i=t[r+1],s=r>0?t[r-1]:2*o-i,a=r<e-1?t[r+2]:2*i-o;return q1((n-r/e)*e,s,o,i,a)}}function Y1(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),o=t[(r+e-1)%e],i=t[r%e],s=t[(r+1)%e],a=t[(r+2)%e];return q1((n-r/e)*e,o,i,s,a)}}const Tl=t=>()=>t;function Q1(t,e){return function(n){return t+n*e}}function gI(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Dl(t,e){var n=e-t;return n?Q1(t,n>180||n<-180?n-360*Math.round(n/360):n):Tl(isNaN(t)?e:t)}function mI(t){return(t=+t)==1?Et:function(e,n){return n-e?gI(e,n,t):Tl(isNaN(e)?n:e)}}function Et(t,e){var n=e-t;return n?Q1(t,n):Tl(isNaN(t)?e:t)}const Sh=function t(e){var n=mI(e);function r(o,i){var s=n((o=Al(o)).r,(i=Al(i)).r),a=n(o.g,i.g),c=n(o.b,i.b),l=Et(o.opacity,i.opacity);return function(u){return o.r=s(u),o.g=a(u),o.b=c(u),o.opacity=l(u),o+""}}return r.gamma=t,r}(1);function Z1(t){return function(e){var n=e.length,r=new Array(n),o=new Array(n),i=new Array(n),s,a;for(s=0;s<n;++s)a=Al(e[s]),r[s]=a.r||0,o[s]=a.g||0,i[s]=a.b||0;return r=t(r),o=t(o),i=t(i),a.opacity=1,function(c){return a.r=r(c),a.g=o(c),a.b=i(c),a+""}}}var yI=Z1(W1),bI=Z1(Y1);function Ch(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=t[o]*(1-i)+e[o]*i;return r}}function X1(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function wI(t,e){return(X1(e)?Ch:K1)(t,e)}function K1(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=_r(t[s],e[s]);for(;s<n;++s)i[s]=e[s];return function(a){for(s=0;s<r;++s)i[s]=o[s](a);return i}}function J1(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function En(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function $1(t,e){var n={},r={},o;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(o in e)o in t?n[o]=_r(t[o],e[o]):r[o]=e[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Ih=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Th=new RegExp(Ih.source,"g");function xI(t){return function(){return t}}function vI(t){return function(e){return t(e)+""}}function ey(t,e){var n=Ih.lastIndex=Th.lastIndex=0,r,o,i,s=-1,a=[],c=[];for(t=t+"",e=e+"";(r=Ih.exec(t))&&(o=Th.exec(e));)(i=o.index)>n&&(i=e.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(r=r[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,c.push({i:s,x:En(r,o)})),n=Th.lastIndex;return n<e.length&&(i=e.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?c[0]?vI(c[0].x):xI(e):(e=c.length,function(l){for(var u=0,f;u<e;++u)a[(f=c[u]).i]=f.x(l);return a.join("")})}function _r(t,e){var n=typeof e,r;return e==null||n==="boolean"?Tl(e):(n==="number"?En:n==="string"?(r=kr(e))?(e=r,Sh):ey:e instanceof kr?Sh:e instanceof Date?J1:X1(e)?Ch:Array.isArray(e)?K1:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?$1:En)(t,e)}function AI(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function EI(t,e){var n=Dl(+t,+e);return function(r){var o=n(r);return o-360*Math.floor(o/360)}}function ua(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var ty=180/Math.PI,Dh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ny(t,e,n,r,o,i){var s,a,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,c/=a),t*r<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*ty,skewX:Math.atan(c)*ty,scaleX:s,scaleY:a}}var Bl;function SI(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Dh:ny(e.a,e.b,e.c,e.d,e.e,e.f)}function CI(t){return t==null||(Bl||(Bl=document.createElementNS("http://www.w3.org/2000/svg","g")),Bl.setAttribute("transform",t),!(t=Bl.transform.baseVal.consolidate()))?Dh:(t=t.matrix,ny(t.a,t.b,t.c,t.d,t.e,t.f))}function ry(t,e,n,r){function o(l){return l.length?l.pop()+" ":""}function i(l,u,f,d,h,p){if(l!==f||u!==d){var y=h.push("translate(",null,e,null,n);p.push({i:y-4,x:En(l,f)},{i:y-2,x:En(u,d)})}else(f||d)&&h.push("translate("+f+e+d+n)}function s(l,u,f,d){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),d.push({i:f.push(o(f)+"rotate(",null,r)-2,x:En(l,u)})):u&&f.push(o(f)+"rotate("+u+r)}function a(l,u,f,d){l!==u?d.push({i:f.push(o(f)+"skewX(",null,r)-2,x:En(l,u)}):u&&f.push(o(f)+"skewX("+u+r)}function c(l,u,f,d,h,p){if(l!==f||u!==d){var y=h.push(o(h)+"scale(",null,",",null,")");p.push({i:y-4,x:En(l,f)},{i:y-2,x:En(u,d)})}else(f!==1||d!==1)&&h.push(o(h)+"scale("+f+","+d+")")}return function(l,u){var f=[],d=[];return l=t(l),u=t(u),i(l.translateX,l.translateY,u.translateX,u.translateY,f,d),s(l.rotate,u.rotate,f,d),a(l.skewX,u.skewX,f,d),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,f,d),l=u=null,function(h){for(var p=-1,y=d.length,v;++p<y;)f[(v=d[p]).i]=v.x(h);return f.join("")}}}var II=ry(SI,"px, ","px)","deg)"),TI=ry(CI,", ",")",")"),DI=1e-12;function iy(t){return((t=Math.exp(t))+1/t)/2}function BI(t){return((t=Math.exp(t))-1/t)/2}function kI(t){return((t=Math.exp(2*t))-1)/(t+1)}const _I=function t(e,n,r){function o(i,s){var a=i[0],c=i[1],l=i[2],u=s[0],f=s[1],d=s[2],h=u-a,p=f-c,y=h*h+p*p,v,b;if(y<DI)b=Math.log(d/l)/e,v=function(B){return[a+B*h,c+B*p,l*Math.exp(e*B*b)]};else{var A=Math.sqrt(y),S=(d*d-l*l+r*y)/(2*l*n*A),E=(d*d-l*l-r*y)/(2*d*n*A),I=Math.log(Math.sqrt(S*S+1)-S),_=Math.log(Math.sqrt(E*E+1)-E);b=(_-I)/e,v=function(B){var N=B*b,F=iy(I),M=l/(n*A)*(F*kI(e*N+I)-BI(I));return[a+M*h,c+M*p,l*F/iy(e*N+I)]}}return v.duration=b*1e3*e/Math.SQRT2,v}return o.rho=function(i){var s=Math.max(.001,+i),a=s*s,c=a*a;return t(s,a,c)},o}(Math.SQRT2,2,4);function oy(t){return function(e,n){var r=t((e=dh(e)).h,(n=dh(n)).h),o=Et(e.s,n.s),i=Et(e.l,n.l),s=Et(e.opacity,n.opacity);return function(a){return e.h=r(a),e.s=o(a),e.l=i(a),e.opacity=s(a),e+""}}}const RI=oy(Dl);var FI=oy(Et);function MI(t,e){var n=Et((t=gh(t)).l,(e=gh(e)).l),r=Et(t.a,e.a),o=Et(t.b,e.b),i=Et(t.opacity,e.opacity);return function(s){return t.l=n(s),t.a=r(s),t.b=o(s),t.opacity=i(s),t+""}}function sy(t){return function(e,n){var r=t((e=xh(e)).h,(n=xh(n)).h),o=Et(e.c,n.c),i=Et(e.l,n.l),s=Et(e.opacity,n.opacity);return function(a){return e.h=r(a),e.c=o(a),e.l=i(a),e.opacity=s(a),e+""}}}const PI=sy(Dl);var LI=sy(Et);function ay(t){return function e(n){n=+n;function r(o,i){var s=t((o=Eh(o)).h,(i=Eh(i)).h),a=Et(o.s,i.s),c=Et(o.l,i.l),l=Et(o.opacity,i.opacity);return function(u){return o.h=s(u),o.s=a(u),o.l=c(Math.pow(u,n)),o.opacity=l(u),o+""}}return r.gamma=e,r}(1)}const OI=ay(Dl);var NI=ay(Et);function Bh(t,e){e===void 0&&(e=t,t=_r);for(var n=0,r=e.length-1,o=e[0],i=new Array(r<0?0:r);n<r;)i[n]=t(o,o=e[++n]);return function(s){var a=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[a](s-a)}}function zI(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}const UI=Object.freeze(Object.defineProperty({__proto__:null,interpolate:_r,interpolateArray:wI,interpolateBasis:W1,interpolateBasisClosed:Y1,interpolateCubehelix:OI,interpolateCubehelixLong:NI,interpolateDate:J1,interpolateDiscrete:AI,interpolateHcl:PI,interpolateHclLong:LI,interpolateHsl:RI,interpolateHslLong:FI,interpolateHue:EI,interpolateLab:MI,interpolateNumber:En,interpolateNumberArray:Ch,interpolateObject:$1,interpolateRgb:Sh,interpolateRgbBasis:yI,interpolateRgbBasisClosed:bI,interpolateRound:ua,interpolateString:ey,interpolateTransformCss:II,interpolateTransformSvg:TI,interpolateZoom:_I,piecewise:Bh,quantize:zI},Symbol.toStringTag,{value:"Module"}));function GI(t){return function(){return t}}function kh(t){return+t}var cy=[0,1];function Zt(t){return t}function _h(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:GI(isNaN(e)?NaN:.5)}function HI(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function VI(t,e,n){var r=t[0],o=t[1],i=e[0],s=e[1];return o<r?(r=_h(o,r),i=n(s,i)):(r=_h(r,o),i=n(i,s)),function(a){return i(r(a))}}function jI(t,e,n){var r=Math.min(t.length,e.length)-1,o=new Array(r),i=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)o[s]=_h(t[s],t[s+1]),i[s]=n(e[s],e[s+1]);return function(a){var c=mr(t,a,1,r)-1;return i[c](o[c](a))}}function fa(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function kl(){var t=cy,e=cy,n=_r,r,o,i,s=Zt,a,c,l;function u(){var d=Math.min(t.length,e.length);return s!==Zt&&(s=HI(t[0],t[d-1])),a=d>2?jI:VI,c=l=null,f}function f(d){return d==null||isNaN(d=+d)?i:(c||(c=a(t.map(r),e,n)))(r(s(d)))}return f.invert=function(d){return s(o((l||(l=a(e,t.map(r),En)))(d)))},f.domain=function(d){return arguments.length?(t=Array.from(d,kh),u()):t.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),u()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),n=ua,u()},f.clamp=function(d){return arguments.length?(s=d?!0:Zt,u()):s!==Zt},f.interpolate=function(d){return arguments.length?(n=d,u()):n},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,h){return r=d,o=h,u()}}function ly(){return kl()(Zt,Zt)}function uy(t,e,n,r){var o=ri(t,e,n),i;switch(r=Qi(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(i=k3(o,s))&&(r.precision=i),qp(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=_3(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=B3(o))&&(r.precision=i-(r.type==="%")*2);break}}return Dt(r)}function vi(t){var e=t.domain;return t.ticks=function(n){var r=e();return Tc(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var o=e();return uy(o[0],o[o.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),o=0,i=r.length-1,s=r[o],a=r[i],c,l,u=10;for(a<s&&(l=s,s=a,a=l,l=o,o=i,i=l);u-- >0;){if(l=Yu(s,a,n),l===c)return r[o]=s,r[i]=a,e(r);if(l>0)s=Math.floor(s/l)*l,a=Math.ceil(a/l)*l;else if(l<0)s=Math.ceil(s*l)/l,a=Math.floor(a*l)/l;else break;c=l}return t},t}function fy(){var t=ly();return t.copy=function(){return fa(t,fy())},zn.apply(t,arguments),vi(t)}function hy(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,kh),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return hy(t).unknown(e)},t=arguments.length?Array.from(t,kh):[0,1],vi(n)}function dy(t,e){t=t.slice();var n=0,r=t.length-1,o=t[n],i=t[r],s;return i<o&&(s=n,n=r,r=s,s=o,o=i,i=s),t[n]=e.floor(o),t[r]=e.ceil(i),t}function py(t){return Math.log(t)}function gy(t){return Math.exp(t)}function qI(t){return-Math.log(-t)}function WI(t){return-Math.exp(-t)}function YI(t){return isFinite(t)?+("1e"+t):t<0?0:t}function QI(t){return t===10?YI:t===Math.E?Math.exp:e=>Math.pow(t,e)}function ZI(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function my(t){return(e,n)=>-t(-e,n)}function Rh(t){const e=t(py,gy),n=e.domain;let r=10,o,i;function s(){return o=ZI(r),i=QI(r),n()[0]<0?(o=my(o),i=my(i),t(qI,WI)):t(py,gy),e}return e.base=function(a){return arguments.length?(r=+a,s()):r},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const c=n();let l=c[0],u=c[c.length-1];const f=u<l;f&&([l,u]=[u,l]);let d=o(l),h=o(u),p,y;const v=a==null?10:+a;let b=[];if(!(r%1)&&h-d<v){if(d=Math.floor(d),h=Math.ceil(h),l>0){for(;d<=h;++d)for(p=1;p<r;++p)if(y=d<0?p/i(-d):p*i(d),!(y<l)){if(y>u)break;b.push(y)}}else for(;d<=h;++d)for(p=r-1;p>=1;--p)if(y=d>0?p/i(-d):p*i(d),!(y<l)){if(y>u)break;b.push(y)}b.length*2<v&&(b=Tc(l,u,v))}else b=Tc(d,h,Math.min(h-d,v)).map(i);return f?b.reverse():b},e.tickFormat=(a,c)=>{if(a==null&&(a=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Qi(c)).precision==null&&(c.trim=!0),c=Dt(c)),a===1/0)return c;const l=Math.max(1,r*a/e.ticks().length);return u=>{let f=u/i(Math.round(o(u)));return f*r<r-.5&&(f*=r),f<=l?c(u):""}},e.nice=()=>n(dy(n(),{floor:a=>i(Math.floor(o(a))),ceil:a=>i(Math.ceil(o(a)))})),e}function Fh(){const t=Rh(kl()).domain([1,10]);return t.copy=()=>fa(t,Fh()).base(t.base()),zn.apply(t,arguments),t}function yy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function by(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Mh(t){var e=1,n=t(yy(e),by(e));return n.constant=function(r){return arguments.length?t(yy(e=+r),by(e)):e},vi(n)}function wy(){var t=Mh(kl());return t.copy=function(){return fa(t,wy()).constant(t.constant())},zn.apply(t,arguments)}function xy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function XI(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function KI(t){return t<0?-t*t:t*t}function Ph(t){var e=t(Zt,Zt),n=1;function r(){return n===1?t(Zt,Zt):n===.5?t(XI,KI):t(xy(n),xy(1/n))}return e.exponent=function(o){return arguments.length?(n=+o,r()):n},vi(e)}function Lh(){var t=Ph(kl());return t.copy=function(){return fa(t,Lh()).exponent(t.exponent())},zn.apply(t,arguments),t}function JI(){return Lh.apply(null,arguments).exponent(.5)}function vy(){var t=[],e=[],n=[],r;function o(){var s=0,a=Math.max(1,e.length);for(n=new Array(a-1);++s<a;)n[s-1]=Np(t,s/a);return i}function i(s){return s==null||isNaN(s=+s)?r:e[mr(n,s)]}return i.invertExtent=function(s){var a=e.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},i.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let a of s)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(ti),o()},i.range=function(s){return arguments.length?(e=Array.from(s),o()):e.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return vy().domain(t).range(e).unknown(r)},zn.apply(i,arguments)}function Ay(){var t=0,e=1,n=1,r=[.5],o=[0,1],i;function s(c){return c!=null&&c<=c?o[mr(r,c,0,n)]:i}function a(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return s}return s.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,a()):[t,e]},s.range=function(c){return arguments.length?(n=(o=Array.from(c)).length-1,a()):o.slice()},s.invertExtent=function(c){var l=o.indexOf(c);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},s.unknown=function(c){return arguments.length&&(i=c),s},s.thresholds=function(){return r.slice()},s.copy=function(){return Ay().domain([t,e]).range(o).unknown(i)},zn.apply(vi(s),arguments)}function Ey(){var t=[.5],e=[0,1],n,r=1;function o(i){return i!=null&&i<=i?e[mr(t,i,0,r)]:n}return o.domain=function(i){return arguments.length?(t=Array.from(i),r=Math.min(t.length,e.length-1),o):t.slice()},o.range=function(i){return arguments.length?(e=Array.from(i),r=Math.min(t.length,e.length-1),o):e.slice()},o.invertExtent=function(i){var s=e.indexOf(i);return[t[s-1],t[s]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return Ey().domain(t).range(e).unknown(n)},zn.apply(o,arguments)}function $I(t){return new Date(t)}function eT(t){return t instanceof Date?+t:+new Date(+t)}function Oh(t,e,n,r,o,i,s,a,c,l){var u=ly(),f=u.invert,d=u.domain,h=l(".%L"),p=l(":%S"),y=l("%I:%M"),v=l("%I %p"),b=l("%a %d"),A=l("%b %d"),S=l("%B"),E=l("%Y");function I(_){return(c(_)<_?h:a(_)<_?p:s(_)<_?y:i(_)<_?v:r(_)<_?o(_)<_?b:A:n(_)<_?S:E)(_)}return u.invert=function(_){return new Date(f(_))},u.domain=function(_){return arguments.length?d(Array.from(_,eT)):d().map($I)},u.ticks=function(_){var B=d();return t(B[0],B[B.length-1],_??10)},u.tickFormat=function(_,B){return B==null?I:l(B)},u.nice=function(_){var B=d();return(!_||typeof _.range!="function")&&(_=e(B[0],B[B.length-1],_??10)),_?d(dy(B,_)):u},u.copy=function(){return fa(u,Oh(t,e,n,r,o,i,s,a,c,l))},u}function tT(){return zn.apply(Oh(H3,V3,Fn,Ji,Ds,yr,Rc,kc,Kn,of).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function nT(){return zn.apply(Oh(U3,G3,Mn,$i,Bs,ii,Fc,_c,Kn,sf).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function _l(){var t=0,e=1,n,r,o,i,s=Zt,a=!1,c;function l(f){return f==null||isNaN(f=+f)?c:s(o===0?.5:(f=(i(f)-n)*o,a?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([t,e]=f,n=i(t=+t),r=i(e=+e),o=n===r?0:1/(r-n),l):[t,e]},l.clamp=function(f){return arguments.length?(a=!!f,l):a},l.interpolator=function(f){return arguments.length?(s=f,l):s};function u(f){return function(d){var h,p;return arguments.length?([h,p]=d,s=f(h,p),l):[s(0),s(1)]}}return l.range=u(_r),l.rangeRound=u(ua),l.unknown=function(f){return arguments.length?(c=f,l):c},function(f){return i=f,n=f(t),r=f(e),o=n===r?0:1/(r-n),l}}function Rr(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Nh(){var t=vi(_l()(Zt));return t.copy=function(){return Rr(t,Nh())},Dr.apply(t,arguments)}function Sy(){var t=Rh(_l()).domain([1,10]);return t.copy=function(){return Rr(t,Sy()).base(t.base())},Dr.apply(t,arguments)}function Cy(){var t=Mh(_l());return t.copy=function(){return Rr(t,Cy()).constant(t.constant())},Dr.apply(t,arguments)}function zh(){var t=Ph(_l());return t.copy=function(){return Rr(t,zh()).exponent(t.exponent())},Dr.apply(t,arguments)}function rT(){return zh.apply(null,arguments).exponent(.5)}function Rl(){var t=0,e=.5,n=1,r=1,o,i,s,a,c,l=Zt,u,f=!1,d;function h(y){return isNaN(y=+y)?d:(y=.5+((y=+u(y))-i)*(r*y<r*i?a:c),l(f?Math.max(0,Math.min(1,y)):y))}h.domain=function(y){return arguments.length?([t,e,n]=y,o=u(t=+t),i=u(e=+e),s=u(n=+n),a=o===i?0:.5/(i-o),c=i===s?0:.5/(s-i),r=i<o?-1:1,h):[t,e,n]},h.clamp=function(y){return arguments.length?(f=!!y,h):f},h.interpolator=function(y){return arguments.length?(l=y,h):l};function p(y){return function(v){var b,A,S;return arguments.length?([b,A,S]=v,l=Bh(y,[b,A,S]),h):[l(0),l(.5),l(1)]}}return h.range=p(_r),h.rangeRound=p(ua),h.unknown=function(y){return arguments.length?(d=y,h):d},function(y){return u=y,o=y(t),i=y(e),s=y(n),a=o===i?0:.5/(i-o),c=i===s?0:.5/(s-i),r=i<o?-1:1,h}}function Iy(){var t=vi(Rl()(Zt));return t.copy=function(){return Rr(t,Iy())},Dr.apply(t,arguments)}function Ty(){var t=Rh(Rl()).domain([.1,1,10]);return t.copy=function(){return Rr(t,Ty()).base(t.base())},Dr.apply(t,arguments)}function Dy(){var t=Mh(Rl());return t.copy=function(){return Rr(t,Dy()).constant(t.constant())},Dr.apply(t,arguments)}function Uh(){var t=Ph(Rl());return t.copy=function(){return Rr(t,Uh()).exponent(t.exponent())},Dr.apply(t,arguments)}function iT(){return Uh.apply(null,arguments).exponent(.5)}function Hn(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const oT=Hn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),sT=Hn("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),aT=Hn("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),cT=Hn("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),lT=Hn("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),uT=Hn("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),fT=Hn("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),hT=Hn("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),dT=Hn("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),pT=Hn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),gT="year",Gh="quarter";[gT,Gh,"month","week","date","day","dayofyear","hours","minutes","seconds","milliseconds"].reduce((t,e,n)=>(t[e]=1+n,t),{}),Gh+"",Ji.every(3),Gh+"",$i.every(3);function Hh(t,e,n){const r=t-e+n*2;return t?r>0?r:1:0}const mT="identity",yo="linear",Fr="log",ha="pow",da="sqrt",Fl="symlog",By="time",ky="utc",Vn="sequential",bo="diverging",Vh="quantile",_y="quantize",Ry="threshold",jh="ordinal",qh="point",Fy="band",Wh="bin-ordinal",bt="continuous",pa="discrete",ga="discretizing",un="interpolating",My="temporal";function yT(t){return function(e){let n=e[0],r=e[1],o;return r<n&&(o=n,n=r,r=o),[t.invert(n),t.invert(r)]}}function bT(t){return function(e){const n=t.range();let r=e[0],o=e[1],i=-1,s,a,c,l;for(o<r&&(a=r,r=o,o=a),c=0,l=n.length;c<l;++c)n[c]>=r&&n[c]<=o&&(i<0&&(i=c),s=c);if(!(i<0))return r=t.invertExtent(n[i]),o=t.invertExtent(n[s]),[r[0]===void 0?r[1]:r[0],o[1]===void 0?o[0]:o[1]]}}function Yh(){const t=fh().unknown(void 0),e=t.domain,n=t.range;let r=[0,1],o,i,s=!1,a=0,c=0,l=.5;delete t.unknown;function u(){const f=e().length,d=r[1]<r[0],h=r[1-d],p=Hh(f,a,c);let y=r[d-0];o=(h-y)/(p||1),s&&(o=Math.floor(o)),y+=(h-y-o*(f-a))*l,i=o*(1-a),s&&(y=Math.round(y),i=Math.round(i));const v=Is(f).map(b=>y+o*b);return n(d?v.reverse():v)}return t.domain=function(f){return arguments.length?(e(f),u()):e()},t.range=function(f){return arguments.length?(r=[+f[0],+f[1]],u()):r.slice()},t.rangeRound=function(f){return r=[+f[0],+f[1]],s=!0,u()},t.bandwidth=function(){return i},t.step=function(){return o},t.round=function(f){return arguments.length?(s=!!f,u()):s},t.padding=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),a=c,u()):a},t.paddingInner=function(f){return arguments.length?(a=Math.max(0,Math.min(1,f)),u()):a},t.paddingOuter=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),u()):c},t.align=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),u()):l},t.invertRange=function(f){if(f[0]==null||f[1]==null)return;const d=r[1]<r[0],h=d?n().reverse():n(),p=h.length-1;let y=+f[0],v=+f[1],b,A,S;if(!(y!==y||v!==v)&&(v<y&&(S=y,y=v,v=S),!(v<h[0]||y>r[1-d])))return b=Math.max(0,mr(h,y)-1),A=y===v?b:mr(h,v)-1,y-h[b]>i+1e-10&&++b,d&&(S=b,b=p-A,A=p-S),b>A?void 0:e().slice(b,A+1)},t.invert=function(f){const d=t.invertRange([f,f]);return d&&d[0]},t.copy=function(){return Yh().domain(e()).range(r).round(s).paddingInner(a).paddingOuter(c).align(l)},u()}function Py(t){const e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return Py(e())},t}function wT(){return Py(Yh().paddingInner(1))}var xT=Array.prototype.map;function vT(t){return xT.call(t,$5)}const AT=Array.prototype.slice;function Ly(){let t=[],e=[];function n(r){return r==null||r!==r?void 0:e[(mr(t,r)-1)%e.length]}return n.domain=function(r){return arguments.length?(t=vT(r),n):t.slice()},n.range=function(r){return arguments.length?(e=AT.call(r),n):e.slice()},n.tickFormat=function(r,o){return uy(t[0],A1(t),r??10,o)},n.copy=function(){return Ly().domain(n.domain()).range(n.range())},n}const Ml=new Map,ET=Symbol("vega_scale");function ST(t){return t[ET]=!0,t}function CT(t,e,n){const r=function(){const i=e();return i.invertRange||(i.invertRange=i.invert?yT(i):i.invertExtent?bT(i):void 0),i.type=t,ST(i)};return r.metadata=tI(eI(n)),r}function Ze(t,e,n){return arguments.length>1?(Ml.set(t,CT(t,e,n)),this):IT(t)?Ml.get(t):void 0}Ze(mT,hy),Ze(yo,fy,bt),Ze(Fr,Fh,[bt,Fr]),Ze(ha,Lh,bt),Ze(da,JI,bt),Ze(Fl,wy,bt),Ze(By,tT,[bt,My]),Ze(ky,nT,[bt,My]),Ze(Vn,Nh,[bt,un]),Ze(`${Vn}-${yo}`,Nh,[bt,un]),Ze(`${Vn}-${Fr}`,Sy,[bt,un,Fr]),Ze(`${Vn}-${ha}`,zh,[bt,un]),Ze(`${Vn}-${da}`,rT,[bt,un]),Ze(`${Vn}-${Fl}`,Cy,[bt,un]),Ze(`${bo}-${yo}`,Iy,[bt,un]),Ze(`${bo}-${Fr}`,Ty,[bt,un,Fr]),Ze(`${bo}-${ha}`,Uh,[bt,un]),Ze(`${bo}-${da}`,iT,[bt,un]),Ze(`${bo}-${Fl}`,Dy,[bt,un]),Ze(Vh,vy,[ga,Vh]),Ze(_y,Ay,ga),Ze(Ry,Ey,ga),Ze(Wh,Ly,[pa,ga]),Ze(jh,fh,pa),Ze(Fy,Yh,pa),Ze(qh,wT,pa);function IT(t){return Ml.has(t)}function ma(t,e){const n=Ml.get(t);return n&&n.metadata[e]}function St(t){return ma(t,bt)}function Mr(t){return ma(t,pa)}function Ai(t){return ma(t,ga)}function Oy(t){return ma(t,Fr)}function Pl(t){return ma(t,un)}function TT(t,e){const n=e[0],r=A1(e)-n;return function(o){return t(n+o*r)}}function Ll(t,e,n){return Bh(Ny(e||"rgb",n),t)}function DT(t,e){const n=new Array(e),r=e+1;for(let o=0;o<e;)n[o]=t(++o/r);return n}function Ny(t,e){const n=UI[BT(t)];return e!=null&&n&&n.gamma?n.gamma(e):n}function BT(t){return"interpolate"+t.toLowerCase().split("-").map(e=>e[0].toUpperCase()+e.slice(1)).join("")}const kT={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},_T={accent:sT,category10:oT,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:aT,observable10:cT,paired:lT,pastel1:uT,pastel2:fT,set1:hT,set2:dT,set3:pT,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function zy(t){if(v1(t))return t;const e=t.length/6|0,n=new Array(e);for(let r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}function Uy(t,e){for(const n in t)Qh(n,e(t[n]))}const Gy={};Uy(_T,zy),Uy(kT,t=>Ll(zy(t)));function Qh(t,e){return t=t&&t.toLowerCase(),arguments.length>1?(Gy[t]=e,this):Gy[t]}function Zh(){const t=e=>e;return t.invert=e=>e,t.copy=Zh,t.invertRange=()=>{},t.type="null",t}class RT{constructor(e,n,r={}){this._container=e,this._sizeSource=n??(()=>({width:void 0,height:void 0})),this._shaderCache=new Map,this.rangeTextures=new WeakMap,this.selectionTextures=new WeakMap;const o=document.createElement("canvas");e.appendChild(o);const i=i8(o,{antialias:!0,depth:!1,premultipliedAlpha:!0,...r});if(!i)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!to(i))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");Fm(i);const s=i.getExtension("WEBGL_provoking_vertex");s&&s.provokingVertexWEBGL(s.FIRST_VERTEX_CONVENTION_WEBGL),i.blendFunc(i.ONE,i.ONE_MINUS_SRC_ALPHA),this.canvas=o,this.gl=i,this._pickingAttachmentOptions=[{format:i.RGBA,type:i.UNSIGNED_BYTE,minMag:i.LINEAR,wrap:i.CLAMP_TO_EDGE}],this._pickingBufferInfo=_m(i,this._pickingAttachmentOptions),i.bindFramebuffer(i.FRAMEBUFFER,null),this.adjustGl()}invalidateSize(){this._logicalCanvasSize=void 0,this.adjustGl()}compileShader(e,n){const r="#version 300 es",o="precision mediump float;";_t(n)&&(n=n.join(`
|
|
382
|
+
return datum[${JSON.stringify(n)}];
|
|
383
|
+
}`)(t);return ee(r,[n],e)}else return Ba(n)}function b8(n,e){throw new Error(`Invalid field "${e}". Available fields or properties: ${Object.keys(n).join(", ")}`)}function Gm(n,e,t){if(!n)return;function r(s){const o=s;return o.fields??(o.fields=[]),o.constant=o.fields.length===0,o.channelDef=e,o.channel=n,o.scaleChannel=((lt(e)&&e.resolutionChannel)??(Mc(n)&&n))||void 0,"param"in e?(o.predicate=Mm(!1),o.predicate.param=e.param,o.predicate.empty=e.empty??!0):(o.predicate=Mm(!0),o.predicate.empty=!1),o.asNumberAccessor=()=>o,o}function i(s){if(Qe(s)){const o=r(t.createExpression(s.expr));if(o.fields.length>0)throw new Error("Expression in DatumDef/ValueDef cannot access data fields: "+s.expr);return o}else{const o=s;return r(()=>o)}}if(Nn(e))try{return r(ue(e.field))}catch(s){throw new Error(`Invalid field definition: ${s.message}`)}else{if(xo(e))return r(t.createExpression(e.expr));if(bo(e))return i(e.datum);if(yt(e))return i(e.value);throw new Error(`Invalid channel definition: "${n}": ${JSON.stringify(e)}! The channel definition must contain one of the following properties: "field", "datum", "value" or "expr".`)}}function x8(n,e,t){const r=[];if(S8(e)||af(e)){const i=Array.isArray(e.condition)?e.condition:[e.condition];for(const s of i)r.push(Gm(n,s,t))}if(r.push(Gm(n,e,t)),r.filter(i=>!i.constant).length>1)throw new Error("Only one accessor can be non-constant. Channel: "+n);return r}function A8(n,e){const t={},r=i=>{var s;return(s=n.getScaleResolution(i))==null?void 0:s.scale};for(const[i,s]of Object.entries(e))s&&(t[i]=w8(x8(i,s,n.paramMediator),r));return t}function w8(n,e){if(n.length===1)return Hm(n[0],e);const t=n.map(s=>s.predicate),r=n.map(s=>Hm(s,e));return Object.assign(s=>{for(let o=0;o<r.length;o++)if(t[o](s))return r[o](s)},{constant:!1,accessors:r.map(s=>s.accessors[0]),dataAccessor:r.map(s=>s.dataAccessor).find(s=>s),scale:r.map(s=>s.scale).find(s=>s),channelDef:n.at(-1).channelDef})}function Hm(n,e){const{channel:t,scaleChannel:r,channelDef:i}=n,s=n.scaleChannel?e(r):void 0;if(r&&!s)throw new Error(`Missing scale! "${t}": ${JSON.stringify(i)}`);return Object.assign(s?o=>s(n(o)):o=>n(o),{scale:s,constant:n.constant,accessors:[n],dataAccessor:n.constant?void 0:n,channelDef:i})}function yt(n){return n&&"value"in n}function Nn(n){return n&&"field"in n}function bo(n){return n&&"datum"in n}function lt(n){return Nn(n)||bo(n)||xo(n)||_m(n)}function Vm(n){if(af(n)){const e=n.condition;if(!Array.isArray(e)&<(e))return e}else if(lt(n))return n}function v8(n,e){const t=n.mark.encoding[e];if(lt(t))return t;throw new Error("Not a channel def with scale!")}function _m(n){return n&&"chrom"in n}function xo(n){return n&&"expr"in n}function S8(n){return(Nn(n)||bo(n))&&"condition"in n}function af(n){return yt(n)&&"condition"in n}const Dr=["x","y"],E8=["x2","y2"],C8=[...Dr,...E8];function cf(n){return Dr.includes(n)}function Ao(n){return C8.includes(n)}const jm={x:"x2",y:"y2"},Qm=Object.fromEntries(Object.entries(jm).map(n=>[n[1],n[0]]));function uf(n){return n in Qm}function lf(n){const e=jm[n];if(e)return e;throw new Error(`${n} has no secondary channel!`)}function Ir(n){return Qm[n]??n}function Ln(n){return["color","fill","stroke"].includes(Ir(n))}function Pc(n){return["shape"].includes(n)}function Mc(n){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(n)}function D8(n){switch(n){case"shape":return["circle","square","cross","diamond","triangle-up","triangle-right","triangle-down","triangle-left","tick-up","tick-right","tick-down","tick-left"]}}function Wm(n){if(!Pc(n))throw new Error("Not a discrete channel: "+n);const e=new Map(D8(n).map((t,r)=>[t,r]));return t=>{const r=e.get(t);if(r!==void 0)return r;throw new Error(`Invalid value for "${n}" channel: ${t}`)}}function Ei(n,e,t){return n.fields=e||[],n.fname=t,n}function I8(n){return n.length===1?T8(n[0]):B8(n)}const T8=n=>function(e){return e[n]},B8=n=>{const e=n.length;return function(t){for(let r=0;r<e;++r)t=t[n[r]];return t}};function ff(n){throw Error(n)}function k8(n){const e=[],t=n.length;let r=null,i=0,s="",o,a,c;n=n+"";function u(){e.push(s+n.substring(o,a)),s="",o=a+1}for(o=a=0;a<t;++a)if(c=n[a],c==="\\")s+=n.substring(o,a++),o=a;else if(c===r)u(),r=null,i=-1;else{if(r)continue;o===i&&c==='"'||o===i&&c==="'"?(o=a+1,r=c):c==="."&&!i?a>o?u():o=a+1:c==="["?(a>o&&u(),i=o=a+1):c==="]"&&(i||ff("Access path missing open bracket: "+n),i>0&&u(),i=0,o=a+1)}return i&&ff("Access path missing closing bracket: "+n),r&&ff("Access path missing closing quote: "+n),a>o&&(a++,u()),e}function F8(n,e,t){const r=k8(n);return n=r.length===1?r[0]:n,Ei(I8(r),[n],n)}F8("id"),Ei(n=>n,[],"identity"),Ei(()=>0,[],"zero"),Ei(()=>1,[],"one"),Ei(()=>!0,[],"true"),Ei(()=>!1,[],"false"),[...Object.getOwnPropertyNames(Object.prototype).filter(n=>typeof Object.prototype[n]=="function")];var qm=Array.isArray;function Ym(n){return n[n.length-1]}function P8(n){return n==null||n===""?null:+n}function M8(n){return n!=null?qm(n)?n:[n]:[]}function R8(n){const e={},t=n.length;for(let r=0;r<t;++r)e[n[r]]=!0;return e}function _t(n,e){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(e).domain(n);break}return this}function zn(n,e){switch(arguments.length){case 0:break;case 1:{typeof n=="function"?this.interpolator(n):this.range(n);break}default:{this.domain(n),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const hf=Symbol("implicit");function df(){var n=new tn,e=[],t=[],r=hf;function i(s){let o=n.get(s);if(o===void 0){if(r!==hf)return r;n.set(s,o=e.push(s)-1)}return t[o%t.length]}return i.domain=function(s){if(!arguments.length)return e.slice();e=[],n=new tn;for(const o of s)n.has(o)||n.set(o,e.push(o)-1);return i},i.range=function(s){return arguments.length?(t=Array.from(s),i):t.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return df(e,t).unknown(r)},_t.apply(i,arguments),i}function Ci(n,e,t){n.prototype=e.prototype=t,t.constructor=n}function wo(n,e){var t=Object.create(n.prototype);for(var r in e)t[r]=e[r];return t}function Un(){}var Tr=.7,Di=1/Tr,Ii="\\s*([+-]?\\d+)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",O8=/^#([0-9a-f]{3,8})$/,N8=new RegExp(`^rgb\\(${Ii},${Ii},${Ii}\\)$`),L8=new RegExp(`^rgb\\(${jt},${jt},${jt}\\)$`),z8=new RegExp(`^rgba\\(${Ii},${Ii},${Ii},${vo}\\)$`),U8=new RegExp(`^rgba\\(${jt},${jt},${jt},${vo}\\)$`),G8=new RegExp(`^hsl\\(${vo},${jt},${jt}\\)$`),H8=new RegExp(`^hsla\\(${vo},${jt},${jt},${vo}\\)$`),Xm={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ci(Un,Gn,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:Zm,formatHex:Zm,formatHex8:V8,formatHsl:_8,formatRgb:Km,toString:Km});function Zm(){return this.rgb().formatHex()}function V8(){return this.rgb().formatHex8()}function _8(){return ng(this).formatHsl()}function Km(){return this.rgb().formatRgb()}function Gn(n){var e,t;return n=(n+"").trim().toLowerCase(),(e=O8.exec(n))?(t=e[1].length,e=parseInt(e[1],16),t===6?Jm(e):t===3?new Me(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?Rc(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?Rc(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=N8.exec(n))?new Me(e[1],e[2],e[3],1):(e=L8.exec(n))?new Me(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=z8.exec(n))?Rc(e[1],e[2],e[3],e[4]):(e=U8.exec(n))?Rc(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=G8.exec(n))?tg(e[1],e[2]/100,e[3]/100,1):(e=H8.exec(n))?tg(e[1],e[2]/100,e[3]/100,e[4]):Xm.hasOwnProperty(n)?Jm(Xm[n]):n==="transparent"?new Me(NaN,NaN,NaN,0):null}function Jm(n){return new Me(n>>16&255,n>>8&255,n&255,1)}function Rc(n,e,t,r){return r<=0&&(n=e=t=NaN),new Me(n,e,t,r)}function pf(n){return n instanceof Un||(n=Gn(n)),n?(n=n.rgb(),new Me(n.r,n.g,n.b,n.opacity)):new Me}function Oc(n,e,t,r){return arguments.length===1?pf(n):new Me(n,e,t,r??1)}function Me(n,e,t,r){this.r=+n,this.g=+e,this.b=+t,this.opacity=+r}Ci(Me,Oc,wo(Un,{brighter(n){return n=n==null?Di:Math.pow(Di,n),new Me(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?Tr:Math.pow(Tr,n),new Me(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new Me(Br(this.r),Br(this.g),Br(this.b),Nc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$m,formatHex:$m,formatHex8:j8,formatRgb:eg,toString:eg}));function $m(){return`#${kr(this.r)}${kr(this.g)}${kr(this.b)}`}function j8(){return`#${kr(this.r)}${kr(this.g)}${kr(this.b)}${kr((isNaN(this.opacity)?1:this.opacity)*255)}`}function eg(){const n=Nc(this.opacity);return`${n===1?"rgb(":"rgba("}${Br(this.r)}, ${Br(this.g)}, ${Br(this.b)}${n===1?")":`, ${n})`}`}function Nc(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function Br(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function kr(n){return n=Br(n),(n<16?"0":"")+n.toString(16)}function tg(n,e,t,r){return r<=0?n=e=t=NaN:t<=0||t>=1?n=e=NaN:e<=0&&(n=NaN),new Bt(n,e,t,r)}function ng(n){if(n instanceof Bt)return new Bt(n.h,n.s,n.l,n.opacity);if(n instanceof Un||(n=Gn(n)),!n)return new Bt;if(n instanceof Bt)return n;n=n.rgb();var e=n.r/255,t=n.g/255,r=n.b/255,i=Math.min(e,t,r),s=Math.max(e,t,r),o=NaN,a=s-i,c=(s+i)/2;return a?(e===s?o=(t-r)/a+(t<r)*6:t===s?o=(r-e)/a+2:o=(e-t)/a+4,a/=c<.5?s+i:2-s-i,o*=60):a=c>0&&c<1?0:o,new Bt(o,a,c,n.opacity)}function mf(n,e,t,r){return arguments.length===1?ng(n):new Bt(n,e,t,r??1)}function Bt(n,e,t,r){this.h=+n,this.s=+e,this.l=+t,this.opacity=+r}Ci(Bt,mf,wo(Un,{brighter(n){return n=n==null?Di:Math.pow(Di,n),new Bt(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?Tr:Math.pow(Tr,n),new Bt(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,e=isNaN(n)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*e,i=2*t-r;return new Me(gf(n>=240?n-240:n+120,i,r),gf(n,i,r),gf(n<120?n+240:n-120,i,r),this.opacity)},clamp(){return new Bt(rg(this.h),Lc(this.s),Lc(this.l),Nc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const n=Nc(this.opacity);return`${n===1?"hsl(":"hsla("}${rg(this.h)}, ${Lc(this.s)*100}%, ${Lc(this.l)*100}%${n===1?")":`, ${n})`}`}}));function rg(n){return n=(n||0)%360,n<0?n+360:n}function Lc(n){return Math.max(0,Math.min(1,n||0))}function gf(n,e,t){return(n<60?e+(t-e)*n/60:n<180?t:n<240?e+(t-e)*(240-n)/60:e)*255}const ig=Math.PI/180,sg=180/Math.PI,zc=18,og=.96422,ag=1,cg=.82521,ug=4/29,Ti=6/29,lg=3*Ti*Ti,Q8=Ti*Ti*Ti;function fg(n){if(n instanceof Qt)return new Qt(n.l,n.a,n.b,n.opacity);if(n instanceof ln)return hg(n);n instanceof Me||(n=pf(n));var e=wf(n.r),t=wf(n.g),r=wf(n.b),i=bf((.2225045*e+.7168786*t+.0606169*r)/ag),s,o;return e===t&&t===r?s=o=i:(s=bf((.4360747*e+.3850649*t+.1430804*r)/og),o=bf((.0139322*e+.0971045*t+.7141733*r)/cg)),new Qt(116*i-16,500*(s-i),200*(i-o),n.opacity)}function yf(n,e,t,r){return arguments.length===1?fg(n):new Qt(n,e,t,r??1)}function Qt(n,e,t,r){this.l=+n,this.a=+e,this.b=+t,this.opacity=+r}Ci(Qt,yf,wo(Un,{brighter(n){return new Qt(this.l+zc*(n??1),this.a,this.b,this.opacity)},darker(n){return new Qt(this.l-zc*(n??1),this.a,this.b,this.opacity)},rgb(){var n=(this.l+16)/116,e=isNaN(this.a)?n:n+this.a/500,t=isNaN(this.b)?n:n-this.b/200;return e=og*xf(e),n=ag*xf(n),t=cg*xf(t),new Me(Af(3.1338561*e-1.6168667*n-.4906146*t),Af(-.9787684*e+1.9161415*n+.033454*t),Af(.0719453*e-.2289914*n+1.4052427*t),this.opacity)}}));function bf(n){return n>Q8?Math.pow(n,1/3):n/lg+ug}function xf(n){return n>Ti?n*n*n:lg*(n-ug)}function Af(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function wf(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function W8(n){if(n instanceof ln)return new ln(n.h,n.c,n.l,n.opacity);if(n instanceof Qt||(n=fg(n)),n.a===0&&n.b===0)return new ln(NaN,0<n.l&&n.l<100?0:NaN,n.l,n.opacity);var e=Math.atan2(n.b,n.a)*sg;return new ln(e<0?e+360:e,Math.sqrt(n.a*n.a+n.b*n.b),n.l,n.opacity)}function vf(n,e,t,r){return arguments.length===1?W8(n):new ln(n,e,t,r??1)}function ln(n,e,t,r){this.h=+n,this.c=+e,this.l=+t,this.opacity=+r}function hg(n){if(isNaN(n.h))return new Qt(n.l,0,0,n.opacity);var e=n.h*ig;return new Qt(n.l,Math.cos(e)*n.c,Math.sin(e)*n.c,n.opacity)}Ci(ln,vf,wo(Un,{brighter(n){return new ln(this.h,this.c,this.l+zc*(n??1),this.opacity)},darker(n){return new ln(this.h,this.c,this.l-zc*(n??1),this.opacity)},rgb(){return hg(this).rgb()}}));var dg=-.14861,Sf=1.78277,Ef=-.29227,Uc=-.90649,So=1.97294,pg=So*Uc,mg=So*Sf,gg=Sf*Ef-Uc*dg;function q8(n){if(n instanceof Fr)return new Fr(n.h,n.s,n.l,n.opacity);n instanceof Me||(n=pf(n));var e=n.r/255,t=n.g/255,r=n.b/255,i=(gg*r+pg*e-mg*t)/(gg+pg-mg),s=r-i,o=(So*(t-i)-Ef*s)/Uc,a=Math.sqrt(o*o+s*s)/(So*i*(1-i)),c=a?Math.atan2(o,s)*sg-120:NaN;return new Fr(c<0?c+360:c,a,i,n.opacity)}function Cf(n,e,t,r){return arguments.length===1?q8(n):new Fr(n,e,t,r??1)}function Fr(n,e,t,r){this.h=+n,this.s=+e,this.l=+t,this.opacity=+r}Ci(Fr,Cf,wo(Un,{brighter(n){return n=n==null?Di:Math.pow(Di,n),new Fr(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?Tr:Math.pow(Tr,n),new Fr(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=isNaN(this.h)?0:(this.h+120)*ig,e=+this.l,t=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(n),i=Math.sin(n);return new Me(255*(e+t*(dg*r+Sf*i)),255*(e+t*(Ef*r+Uc*i)),255*(e+t*(So*r)),this.opacity)}}));function yg(n,e,t,r,i){var s=n*n,o=s*n;return((1-3*n+3*s-o)*e+(4-6*s+3*o)*t+(1+3*n+3*s-3*o)*r+o*i)/6}function bg(n){var e=n.length-1;return function(t){var r=t<=0?t=0:t>=1?(t=1,e-1):Math.floor(t*e),i=n[r],s=n[r+1],o=r>0?n[r-1]:2*i-s,a=r<e-1?n[r+2]:2*s-i;return yg((t-r/e)*e,o,i,s,a)}}function xg(n){var e=n.length;return function(t){var r=Math.floor(((t%=1)<0?++t:t)*e),i=n[(r+e-1)%e],s=n[r%e],o=n[(r+1)%e],a=n[(r+2)%e];return yg((t-r/e)*e,i,s,o,a)}}const Gc=n=>()=>n;function Ag(n,e){return function(t){return n+t*e}}function Y8(n,e,t){return n=Math.pow(n,t),e=Math.pow(e,t)-n,t=1/t,function(r){return Math.pow(n+r*e,t)}}function Hc(n,e){var t=e-n;return t?Ag(n,t>180||t<-180?t-360*Math.round(t/360):t):Gc(isNaN(n)?e:n)}function X8(n){return(n=+n)==1?Re:function(e,t){return t-e?Y8(e,t,n):Gc(isNaN(e)?t:e)}}function Re(n,e){var t=e-n;return t?Ag(n,t):Gc(isNaN(n)?e:n)}const Df=function n(e){var t=X8(e);function r(i,s){var o=t((i=Oc(i)).r,(s=Oc(s)).r),a=t(i.g,s.g),c=t(i.b,s.b),u=Re(i.opacity,s.opacity);return function(l){return i.r=o(l),i.g=a(l),i.b=c(l),i.opacity=u(l),i+""}}return r.gamma=n,r}(1);function wg(n){return function(e){var t=e.length,r=new Array(t),i=new Array(t),s=new Array(t),o,a;for(o=0;o<t;++o)a=Oc(e[o]),r[o]=a.r||0,i[o]=a.g||0,s[o]=a.b||0;return r=n(r),i=n(i),s=n(s),a.opacity=1,function(c){return a.r=r(c),a.g=i(c),a.b=s(c),a+""}}}var Z8=wg(bg),K8=wg(xg);function If(n,e){e||(e=[]);var t=n?Math.min(e.length,n.length):0,r=e.slice(),i;return function(s){for(i=0;i<t;++i)r[i]=n[i]*(1-s)+e[i]*s;return r}}function vg(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function J8(n,e){return(vg(e)?If:Sg)(n,e)}function Sg(n,e){var t=e?e.length:0,r=n?Math.min(t,n.length):0,i=new Array(r),s=new Array(t),o;for(o=0;o<r;++o)i[o]=Hn(n[o],e[o]);for(;o<t;++o)s[o]=e[o];return function(a){for(o=0;o<r;++o)s[o]=i[o](a);return s}}function Eg(n,e){var t=new Date;return n=+n,e=+e,function(r){return t.setTime(n*(1-r)+e*r),t}}function kt(n,e){return n=+n,e=+e,function(t){return n*(1-t)+e*t}}function Cg(n,e){var t={},r={},i;(n===null||typeof n!="object")&&(n={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in n?t[i]=Hn(n[i],e[i]):r[i]=e[i];return function(s){for(i in t)r[i]=t[i](s);return r}}var Tf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bf=new RegExp(Tf.source,"g");function $8(n){return function(){return n}}function e6(n){return function(e){return n(e)+""}}function Dg(n,e){var t=Tf.lastIndex=Bf.lastIndex=0,r,i,s,o=-1,a=[],c=[];for(n=n+"",e=e+"";(r=Tf.exec(n))&&(i=Bf.exec(e));)(s=i.index)>t&&(s=e.slice(t,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,c.push({i:o,x:kt(r,i)})),t=Bf.lastIndex;return t<e.length&&(s=e.slice(t),a[o]?a[o]+=s:a[++o]=s),a.length<2?c[0]?e6(c[0].x):$8(e):(e=c.length,function(u){for(var l=0,f;l<e;++l)a[(f=c[l]).i]=f.x(u);return a.join("")})}function Hn(n,e){var t=typeof e,r;return e==null||t==="boolean"?Gc(e):(t==="number"?kt:t==="string"?(r=Gn(e))?(e=r,Df):Dg:e instanceof Gn?Df:e instanceof Date?Eg:vg(e)?If:Array.isArray(e)?Sg:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Cg:kt)(n,e)}function t6(n){var e=n.length;return function(t){return n[Math.max(0,Math.min(e-1,Math.floor(t*e)))]}}function n6(n,e){var t=Hc(+n,+e);return function(r){var i=t(r);return i-360*Math.floor(i/360)}}function Eo(n,e){return n=+n,e=+e,function(t){return Math.round(n*(1-t)+e*t)}}var Ig=180/Math.PI,kf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Tg(n,e,t,r,i,s){var o,a,c;return(o=Math.sqrt(n*n+e*e))&&(n/=o,e/=o),(c=n*t+e*r)&&(t-=n*c,r-=e*c),(a=Math.sqrt(t*t+r*r))&&(t/=a,r/=a,c/=a),n*r<e*t&&(n=-n,e=-e,c=-c,o=-o),{translateX:i,translateY:s,rotate:Math.atan2(e,n)*Ig,skewX:Math.atan(c)*Ig,scaleX:o,scaleY:a}}var Vc;function r6(n){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return e.isIdentity?kf:Tg(e.a,e.b,e.c,e.d,e.e,e.f)}function i6(n){return n==null||(Vc||(Vc=document.createElementNS("http://www.w3.org/2000/svg","g")),Vc.setAttribute("transform",n),!(n=Vc.transform.baseVal.consolidate()))?kf:(n=n.matrix,Tg(n.a,n.b,n.c,n.d,n.e,n.f))}function Bg(n,e,t,r){function i(u){return u.length?u.pop()+" ":""}function s(u,l,f,d,h,p){if(u!==f||l!==d){var m=h.push("translate(",null,e,null,t);p.push({i:m-4,x:kt(u,f)},{i:m-2,x:kt(l,d)})}else(f||d)&&h.push("translate("+f+e+d+t)}function o(u,l,f,d){u!==l?(u-l>180?l+=360:l-u>180&&(u+=360),d.push({i:f.push(i(f)+"rotate(",null,r)-2,x:kt(u,l)})):l&&f.push(i(f)+"rotate("+l+r)}function a(u,l,f,d){u!==l?d.push({i:f.push(i(f)+"skewX(",null,r)-2,x:kt(u,l)}):l&&f.push(i(f)+"skewX("+l+r)}function c(u,l,f,d,h,p){if(u!==f||l!==d){var m=h.push(i(h)+"scale(",null,",",null,")");p.push({i:m-4,x:kt(u,f)},{i:m-2,x:kt(l,d)})}else(f!==1||d!==1)&&h.push(i(h)+"scale("+f+","+d+")")}return function(u,l){var f=[],d=[];return u=n(u),l=n(l),s(u.translateX,u.translateY,l.translateX,l.translateY,f,d),o(u.rotate,l.rotate,f,d),a(u.skewX,l.skewX,f,d),c(u.scaleX,u.scaleY,l.scaleX,l.scaleY,f,d),u=l=null,function(h){for(var p=-1,m=d.length,g;++p<m;)f[(g=d[p]).i]=g.x(h);return f.join("")}}}var s6=Bg(r6,"px, ","px)","deg)"),o6=Bg(i6,", ",")",")"),a6=1e-12;function kg(n){return((n=Math.exp(n))+1/n)/2}function c6(n){return((n=Math.exp(n))-1/n)/2}function u6(n){return((n=Math.exp(2*n))-1)/(n+1)}const l6=function n(e,t,r){function i(s,o){var a=s[0],c=s[1],u=s[2],l=o[0],f=o[1],d=o[2],h=l-a,p=f-c,m=h*h+p*p,g,y;if(m<a6)y=Math.log(d/u)/e,g=function(v){return[a+v*h,c+v*p,u*Math.exp(e*v*y)]};else{var x=Math.sqrt(m),A=(d*d-u*u+r*m)/(2*u*t*x),w=(d*d-u*u-r*m)/(2*d*t*x),S=Math.log(Math.sqrt(A*A+1)-A),C=Math.log(Math.sqrt(w*w+1)-w);y=(C-S)/e,g=function(v){var T=v*y,P=kg(S),F=u/(t*x)*(P*u6(e*T+S)-c6(S));return[a+F*h,c+F*p,u*P/kg(e*T+S)]}}return g.duration=y*1e3*e/Math.SQRT2,g}return i.rho=function(s){var o=Math.max(.001,+s),a=o*o,c=a*a;return n(o,a,c)},i}(Math.SQRT2,2,4);function Fg(n){return function(e,t){var r=n((e=mf(e)).h,(t=mf(t)).h),i=Re(e.s,t.s),s=Re(e.l,t.l),o=Re(e.opacity,t.opacity);return function(a){return e.h=r(a),e.s=i(a),e.l=s(a),e.opacity=o(a),e+""}}}const f6=Fg(Hc);var h6=Fg(Re);function d6(n,e){var t=Re((n=yf(n)).l,(e=yf(e)).l),r=Re(n.a,e.a),i=Re(n.b,e.b),s=Re(n.opacity,e.opacity);return function(o){return n.l=t(o),n.a=r(o),n.b=i(o),n.opacity=s(o),n+""}}function Pg(n){return function(e,t){var r=n((e=vf(e)).h,(t=vf(t)).h),i=Re(e.c,t.c),s=Re(e.l,t.l),o=Re(e.opacity,t.opacity);return function(a){return e.h=r(a),e.c=i(a),e.l=s(a),e.opacity=o(a),e+""}}}const p6=Pg(Hc);var m6=Pg(Re);function Mg(n){return function e(t){t=+t;function r(i,s){var o=n((i=Cf(i)).h,(s=Cf(s)).h),a=Re(i.s,s.s),c=Re(i.l,s.l),u=Re(i.opacity,s.opacity);return function(l){return i.h=o(l),i.s=a(l),i.l=c(Math.pow(l,t)),i.opacity=u(l),i+""}}return r.gamma=e,r}(1)}const g6=Mg(Hc);var y6=Mg(Re);function Ff(n,e){e===void 0&&(e=n,n=Hn);for(var t=0,r=e.length-1,i=e[0],s=new Array(r<0?0:r);t<r;)s[t]=n(i,i=e[++t]);return function(o){var a=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return s[a](o-a)}}function b6(n,e){for(var t=new Array(e),r=0;r<e;++r)t[r]=n(r/(e-1));return t}const x6=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Hn,interpolateArray:J8,interpolateBasis:bg,interpolateBasisClosed:xg,interpolateCubehelix:g6,interpolateCubehelixLong:y6,interpolateDate:Eg,interpolateDiscrete:t6,interpolateHcl:p6,interpolateHclLong:m6,interpolateHsl:f6,interpolateHslLong:h6,interpolateHue:n6,interpolateLab:d6,interpolateNumber:kt,interpolateNumberArray:If,interpolateObject:Cg,interpolateRgb:Df,interpolateRgbBasis:Z8,interpolateRgbBasisClosed:K8,interpolateRound:Eo,interpolateString:Dg,interpolateTransformCss:s6,interpolateTransformSvg:o6,interpolateZoom:l6,piecewise:Ff,quantize:b6},Symbol.toStringTag,{value:"Module"}));function A6(n){return function(){return n}}function Pf(n){return+n}var Rg=[0,1];function ot(n){return n}function Mf(n,e){return(e-=n=+n)?function(t){return(t-n)/e}:A6(isNaN(e)?NaN:.5)}function w6(n,e){var t;return n>e&&(t=n,n=e,e=t),function(r){return Math.max(n,Math.min(e,r))}}function v6(n,e,t){var r=n[0],i=n[1],s=e[0],o=e[1];return i<r?(r=Mf(i,r),s=t(o,s)):(r=Mf(r,i),s=t(s,o)),function(a){return s(r(a))}}function S6(n,e,t){var r=Math.min(n.length,e.length)-1,i=new Array(r),s=new Array(r),o=-1;for(n[r]<n[0]&&(n=n.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Mf(n[o],n[o+1]),s[o]=t(e[o],e[o+1]);return function(a){var c=Dn(n,a,1,r)-1;return s[c](i[c](a))}}function Co(n,e){return e.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function _c(){var n=Rg,e=Rg,t=Hn,r,i,s,o=ot,a,c,u;function l(){var d=Math.min(n.length,e.length);return o!==ot&&(o=w6(n[0],n[d-1])),a=d>2?S6:v6,c=u=null,f}function f(d){return d==null||isNaN(d=+d)?s:(c||(c=a(n.map(r),e,t)))(r(o(d)))}return f.invert=function(d){return o(i((u||(u=a(e,n.map(r),kt)))(d)))},f.domain=function(d){return arguments.length?(n=Array.from(d,Pf),l()):n.slice()},f.range=function(d){return arguments.length?(e=Array.from(d),l()):e.slice()},f.rangeRound=function(d){return e=Array.from(d),t=Eo,l()},f.clamp=function(d){return arguments.length?(o=d?!0:ot,l()):o!==ot},f.interpolate=function(d){return arguments.length?(t=d,l()):t},f.unknown=function(d){return arguments.length?(s=d,f):s},function(d,h){return r=d,i=h,l()}}function Og(){return _c()(ot,ot)}function Ng(n,e,t,r){var i=pr(n,e,t),s;switch(r=ai(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(n),Math.abs(e));return r.precision==null&&!isNaN(s=uw(i,o))&&(r.precision=s),y0(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=lw(i,Math.max(Math.abs(n),Math.abs(e))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=cw(i))&&(r.precision=s-(r.type==="%")*2);break}}return Le(r)}function Pr(n){var e=n.domain;return n.ticks=function(t){var r=e();return Ga(r[0],r[r.length-1],t??10)},n.tickFormat=function(t,r){var i=e();return Ng(i[0],i[i.length-1],t??10,r)},n.nice=function(t){t==null&&(t=10);var r=e(),i=0,s=r.length-1,o=r[i],a=r[s],c,u,l=10;for(a<o&&(u=o,o=a,a=u,u=i,i=s,s=u);l-- >0;){if(u=Xu(o,a,t),u===c)return r[i]=o,r[s]=a,e(r);if(u>0)o=Math.floor(o/u)*u,a=Math.ceil(a/u)*u;else if(u<0)o=Math.ceil(o*u)/u,a=Math.floor(a*u)/u;else break;c=u}return n},n}function Lg(){var n=Og();return n.copy=function(){return Co(n,Lg())},_t.apply(n,arguments),Pr(n)}function zg(n){var e;function t(r){return r==null||isNaN(r=+r)?e:r}return t.invert=t,t.domain=t.range=function(r){return arguments.length?(n=Array.from(r,Pf),t):n.slice()},t.unknown=function(r){return arguments.length?(e=r,t):e},t.copy=function(){return zg(n).unknown(e)},n=arguments.length?Array.from(n,Pf):[0,1],Pr(t)}function Ug(n,e){n=n.slice();var t=0,r=n.length-1,i=n[t],s=n[r],o;return s<i&&(o=t,t=r,r=o,o=i,i=s,s=o),n[t]=e.floor(i),n[r]=e.ceil(s),n}function Gg(n){return Math.log(n)}function Hg(n){return Math.exp(n)}function E6(n){return-Math.log(-n)}function C6(n){return-Math.exp(-n)}function D6(n){return isFinite(n)?+("1e"+n):n<0?0:n}function I6(n){return n===10?D6:n===Math.E?Math.exp:e=>Math.pow(n,e)}function T6(n){return n===Math.E?Math.log:n===10&&Math.log10||n===2&&Math.log2||(n=Math.log(n),e=>Math.log(e)/n)}function Vg(n){return(e,t)=>-n(-e,t)}function Rf(n){const e=n(Gg,Hg),t=e.domain;let r=10,i,s;function o(){return i=T6(r),s=I6(r),t()[0]<0?(i=Vg(i),s=Vg(s),n(E6,C6)):n(Gg,Hg),e}return e.base=function(a){return arguments.length?(r=+a,o()):r},e.domain=function(a){return arguments.length?(t(a),o()):t()},e.ticks=a=>{const c=t();let u=c[0],l=c[c.length-1];const f=l<u;f&&([u,l]=[l,u]);let d=i(u),h=i(l),p,m;const g=a==null?10:+a;let y=[];if(!(r%1)&&h-d<g){if(d=Math.floor(d),h=Math.ceil(h),u>0){for(;d<=h;++d)for(p=1;p<r;++p)if(m=d<0?p/s(-d):p*s(d),!(m<u)){if(m>l)break;y.push(m)}}else for(;d<=h;++d)for(p=r-1;p>=1;--p)if(m=d>0?p/s(-d):p*s(d),!(m<u)){if(m>l)break;y.push(m)}y.length*2<g&&(y=Ga(u,l,g))}else y=Ga(d,h,Math.min(h-d,g)).map(s);return f?y.reverse():y},e.tickFormat=(a,c)=>{if(a==null&&(a=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=ai(c)).precision==null&&(c.trim=!0),c=Le(c)),a===1/0)return c;const u=Math.max(1,r*a/e.ticks().length);return l=>{let f=l/s(Math.round(i(l)));return f*r<r-.5&&(f*=r),f<=u?c(l):""}},e.nice=()=>t(Ug(t(),{floor:a=>s(Math.floor(i(a))),ceil:a=>s(Math.ceil(i(a)))})),e}function Of(){const n=Rf(_c()).domain([1,10]);return n.copy=()=>Co(n,Of()).base(n.base()),_t.apply(n,arguments),n}function _g(n){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/n))}}function jg(n){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*n}}function Nf(n){var e=1,t=n(_g(e),jg(e));return t.constant=function(r){return arguments.length?n(_g(e=+r),jg(e)):e},Pr(t)}function Qg(){var n=Nf(_c());return n.copy=function(){return Co(n,Qg()).constant(n.constant())},_t.apply(n,arguments)}function Wg(n){return function(e){return e<0?-Math.pow(-e,n):Math.pow(e,n)}}function B6(n){return n<0?-Math.sqrt(-n):Math.sqrt(n)}function k6(n){return n<0?-n*n:n*n}function Lf(n){var e=n(ot,ot),t=1;function r(){return t===1?n(ot,ot):t===.5?n(B6,k6):n(Wg(t),Wg(1/t))}return e.exponent=function(i){return arguments.length?(t=+i,r()):t},Pr(e)}function zf(){var n=Lf(_c());return n.copy=function(){return Co(n,zf()).exponent(n.exponent())},_t.apply(n,arguments),n}function F6(){return zf.apply(null,arguments).exponent(.5)}function qg(){var n=[],e=[],t=[],r;function i(){var o=0,a=Math.max(1,e.length);for(t=new Array(a-1);++o<a;)t[o-1]=l0(n,o/a);return s}function s(o){return o==null||isNaN(o=+o)?r:e[Dn(t,o)]}return s.invertExtent=function(o){var a=e.indexOf(o);return a<0?[NaN,NaN]:[a>0?t[a-1]:n[0],a<t.length?t[a]:n[n.length-1]]},s.domain=function(o){if(!arguments.length)return n.slice();n=[];for(let a of o)a!=null&&!isNaN(a=+a)&&n.push(a);return n.sort(hr),i()},s.range=function(o){return arguments.length?(e=Array.from(o),i()):e.slice()},s.unknown=function(o){return arguments.length?(r=o,s):r},s.quantiles=function(){return t.slice()},s.copy=function(){return qg().domain(n).range(e).unknown(r)},_t.apply(s,arguments)}function Yg(){var n=0,e=1,t=1,r=[.5],i=[0,1],s;function o(c){return c!=null&&c<=c?i[Dn(r,c,0,t)]:s}function a(){var c=-1;for(r=new Array(t);++c<t;)r[c]=((c+1)*e-(c-t)*n)/(t+1);return o}return o.domain=function(c){return arguments.length?([n,e]=c,n=+n,e=+e,a()):[n,e]},o.range=function(c){return arguments.length?(t=(i=Array.from(c)).length-1,a()):i.slice()},o.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[n,r[0]]:u>=t?[r[t-1],e]:[r[u-1],r[u]]},o.unknown=function(c){return arguments.length&&(s=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Yg().domain([n,e]).range(i).unknown(s)},_t.apply(Pr(o),arguments)}function Xg(){var n=[.5],e=[0,1],t,r=1;function i(s){return s!=null&&s<=s?e[Dn(n,s,0,r)]:t}return i.domain=function(s){return arguments.length?(n=Array.from(s),r=Math.min(n.length,e.length-1),i):n.slice()},i.range=function(s){return arguments.length?(e=Array.from(s),r=Math.min(n.length,e.length-1),i):e.slice()},i.invertExtent=function(s){var o=e.indexOf(s);return[n[o-1],n[o]]},i.unknown=function(s){return arguments.length?(t=s,i):t},i.copy=function(){return Xg().domain(n).range(e).unknown(t)},_t.apply(i,arguments)}function P6(n){return new Date(n)}function M6(n){return n instanceof Date?+n:+new Date(+n)}function Uf(n,e,t,r,i,s,o,a,c,u){var l=Og(),f=l.invert,d=l.domain,h=u(".%L"),p=u(":%S"),m=u("%I:%M"),g=u("%I %p"),y=u("%a %d"),x=u("%b %d"),A=u("%B"),w=u("%Y");function S(C){return(c(C)<C?h:a(C)<C?p:o(C)<C?m:s(C)<C?g:r(C)<C?i(C)<C?y:x:t(C)<C?A:w)(C)}return l.invert=function(C){return new Date(f(C))},l.domain=function(C){return arguments.length?d(Array.from(C,M6)):d().map(P6)},l.ticks=function(C){var v=d();return n(v[0],v[v.length-1],C??10)},l.tickFormat=function(C,v){return v==null?S:u(v)},l.nice=function(C){var v=d();return(!C||typeof C.range!="function")&&(C=e(v[0],v[v.length-1],C??10)),C?d(Ug(v,C)):l},l.copy=function(){return Co(l,Uf(n,e,t,r,i,s,o,a,c,u))},l}function R6(){return _t.apply(Uf(ww,vw,Lt,fi,Hs,In,Qa,_a,on,ol).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function O6(){return _t.apply(Uf(xw,Aw,zt,hi,Vs,mr,Wa,ja,on,al).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function jc(){var n=0,e=1,t,r,i,s,o=ot,a=!1,c;function u(f){return f==null||isNaN(f=+f)?c:o(i===0?.5:(f=(s(f)-t)*i,a?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([n,e]=f,t=s(n=+n),r=s(e=+e),i=t===r?0:1/(r-t),u):[n,e]},u.clamp=function(f){return arguments.length?(a=!!f,u):a},u.interpolator=function(f){return arguments.length?(o=f,u):o};function l(f){return function(d){var h,p;return arguments.length?([h,p]=d,o=f(h,p),u):[o(0),o(1)]}}return u.range=l(Hn),u.rangeRound=l(Eo),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return s=f,t=f(n),r=f(e),i=t===r?0:1/(r-t),u}}function Vn(n,e){return e.domain(n.domain()).interpolator(n.interpolator()).clamp(n.clamp()).unknown(n.unknown())}function Gf(){var n=Pr(jc()(ot));return n.copy=function(){return Vn(n,Gf())},zn.apply(n,arguments)}function Zg(){var n=Rf(jc()).domain([1,10]);return n.copy=function(){return Vn(n,Zg()).base(n.base())},zn.apply(n,arguments)}function Kg(){var n=Nf(jc());return n.copy=function(){return Vn(n,Kg()).constant(n.constant())},zn.apply(n,arguments)}function Hf(){var n=Lf(jc());return n.copy=function(){return Vn(n,Hf()).exponent(n.exponent())},zn.apply(n,arguments)}function N6(){return Hf.apply(null,arguments).exponent(.5)}function Qc(){var n=0,e=.5,t=1,r=1,i,s,o,a,c,u=ot,l,f=!1,d;function h(m){return isNaN(m=+m)?d:(m=.5+((m=+l(m))-s)*(r*m<r*s?a:c),u(f?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([n,e,t]=m,i=l(n=+n),s=l(e=+e),o=l(t=+t),a=i===s?0:.5/(s-i),c=s===o?0:.5/(o-s),r=s<i?-1:1,h):[n,e,t]},h.clamp=function(m){return arguments.length?(f=!!m,h):f},h.interpolator=function(m){return arguments.length?(u=m,h):u};function p(m){return function(g){var y,x,A;return arguments.length?([y,x,A]=g,u=Ff(m,[y,x,A]),h):[u(0),u(.5),u(1)]}}return h.range=p(Hn),h.rangeRound=p(Eo),h.unknown=function(m){return arguments.length?(d=m,h):d},function(m){return l=m,i=m(n),s=m(e),o=m(t),a=i===s?0:.5/(s-i),c=s===o?0:.5/(o-s),r=s<i?-1:1,h}}function Jg(){var n=Pr(Qc()(ot));return n.copy=function(){return Vn(n,Jg())},zn.apply(n,arguments)}function $g(){var n=Rf(Qc()).domain([.1,1,10]);return n.copy=function(){return Vn(n,$g()).base(n.base())},zn.apply(n,arguments)}function e1(){var n=Nf(Qc());return n.copy=function(){return Vn(n,e1()).constant(n.constant())},zn.apply(n,arguments)}function Vf(){var n=Lf(Qc());return n.copy=function(){return Vn(n,Vf()).exponent(n.exponent())},zn.apply(n,arguments)}function L6(){return Vf.apply(null,arguments).exponent(.5)}function Wt(n){for(var e=n.length/6|0,t=new Array(e),r=0;r<e;)t[r]="#"+n.slice(r*6,++r*6);return t}const z6=Wt("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),U6=Wt("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),G6=Wt("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),H6=Wt("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),V6=Wt("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),_6=Wt("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),j6=Wt("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Q6=Wt("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),W6=Wt("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),q6=Wt("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Y6="year",_f="quarter";[Y6,_f,"month","week","date","day","dayofyear","hours","minutes","seconds","milliseconds"].reduce((n,e,t)=>(n[e]=1+t,n),{}),_f+"",fi.every(3),_f+"",hi.every(3);function jf(n,e,t){const r=n-e+t*2;return n?r>0?r:1:0}const X6="identity",Bi="linear",_n="log",Do="pow",Io="sqrt",Wc="symlog",t1="time",n1="utc",qt="sequential",ki="diverging",Qf="quantile",r1="quantize",i1="threshold",Wf="ordinal",qf="point",s1="band",Yf="bin-ordinal",Be="continuous",To="discrete",Bo="discretizing",bt="interpolating",o1="temporal";function Z6(n){return function(e){let t=e[0],r=e[1],i;return r<t&&(i=t,t=r,r=i),[n.invert(t),n.invert(r)]}}function K6(n){return function(e){const t=n.range();let r=e[0],i=e[1],s=-1,o,a,c,u;for(i<r&&(a=r,r=i,i=a),c=0,u=t.length;c<u;++c)t[c]>=r&&t[c]<=i&&(s<0&&(s=c),o=c);if(!(s<0))return r=n.invertExtent(t[s]),i=n.invertExtent(t[o]),[r[0]===void 0?r[1]:r[0],i[1]===void 0?i[0]:i[1]]}}function Xf(){const n=df().unknown(void 0),e=n.domain,t=n.range;let r=[0,1],i,s,o=!1,a=0,c=0,u=.5;delete n.unknown;function l(){const f=e().length,d=r[1]<r[0],h=r[1-d],p=jf(f,a,c);let m=r[d-0];i=(h-m)/(p||1),o&&(i=Math.floor(i)),m+=(h-m-i*(f-a))*u,s=i*(1-a),o&&(m=Math.round(m),s=Math.round(s));const g=Us(f).map(y=>m+i*y);return t(d?g.reverse():g)}return n.domain=function(f){return arguments.length?(e(f),l()):e()},n.range=function(f){return arguments.length?(r=[+f[0],+f[1]],l()):r.slice()},n.rangeRound=function(f){return r=[+f[0],+f[1]],o=!0,l()},n.bandwidth=function(){return s},n.step=function(){return i},n.round=function(f){return arguments.length?(o=!!f,l()):o},n.padding=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),a=c,l()):a},n.paddingInner=function(f){return arguments.length?(a=Math.max(0,Math.min(1,f)),l()):a},n.paddingOuter=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),l()):c},n.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),l()):u},n.invertRange=function(f){if(f[0]==null||f[1]==null)return;const d=r[1]<r[0],h=d?t().reverse():t(),p=h.length-1;let m=+f[0],g=+f[1],y,x,A;if(!(m!==m||g!==g)&&(g<m&&(A=m,m=g,g=A),!(g<h[0]||m>r[1-d])))return y=Math.max(0,Dn(h,m)-1),x=m===g?y:Dn(h,g)-1,m-h[y]>s+1e-10&&++y,d&&(A=y,y=p-x,x=p-A),y>x?void 0:e().slice(y,x+1)},n.invert=function(f){const d=n.invertRange([f,f]);return d&&d[0]},n.copy=function(){return Xf().domain(e()).range(r).round(o).paddingInner(a).paddingOuter(c).align(u)},l()}function a1(n){const e=n.copy;return n.padding=n.paddingOuter,delete n.paddingInner,n.copy=function(){return a1(e())},n}function J6(){return a1(Xf().paddingInner(1))}var $6=Array.prototype.map;function e5(n){return $6.call(n,P8)}const t5=Array.prototype.slice;function c1(){let n=[],e=[];function t(r){return r==null||r!==r?void 0:e[(Dn(n,r)-1)%e.length]}return t.domain=function(r){return arguments.length?(n=e5(r),t):n.slice()},t.range=function(r){return arguments.length?(e=t5.call(r),t):e.slice()},t.tickFormat=function(r,i){return Ng(n[0],Ym(n),r??10,i)},t.copy=function(){return c1().domain(t.domain()).range(t.range())},t}const qc=new Map,n5=Symbol("vega_scale");function r5(n){return n[n5]=!0,n}function i5(n,e,t){const r=function(){const s=e();return s.invertRange||(s.invertRange=s.invert?Z6(s):s.invertExtent?K6(s):void 0),s.type=n,r5(s)};return r.metadata=R8(M8(t)),r}function le(n,e,t){return arguments.length>1?(qc.set(n,i5(n,e,t)),this):s5(n)?qc.get(n):void 0}le(X6,zg),le(Bi,Lg,Be),le(_n,Of,[Be,_n]),le(Do,zf,Be),le(Io,F6,Be),le(Wc,Qg,Be),le(t1,R6,[Be,o1]),le(n1,O6,[Be,o1]),le(qt,Gf,[Be,bt]),le(`${qt}-${Bi}`,Gf,[Be,bt]),le(`${qt}-${_n}`,Zg,[Be,bt,_n]),le(`${qt}-${Do}`,Hf,[Be,bt]),le(`${qt}-${Io}`,N6,[Be,bt]),le(`${qt}-${Wc}`,Kg,[Be,bt]),le(`${ki}-${Bi}`,Jg,[Be,bt]),le(`${ki}-${_n}`,$g,[Be,bt,_n]),le(`${ki}-${Do}`,Vf,[Be,bt]),le(`${ki}-${Io}`,L6,[Be,bt]),le(`${ki}-${Wc}`,e1,[Be,bt]),le(Qf,qg,[Bo,Qf]),le(r1,Yg,Bo),le(i1,Xg,Bo),le(Yf,c1,[To,Bo]),le(Wf,df,To),le(s1,Xf,To),le(qf,J6,To);function s5(n){return qc.has(n)}function ko(n,e){const t=qc.get(n);return t&&t.metadata[e]}function Oe(n){return ko(n,Be)}function jn(n){return ko(n,To)}function Mr(n){return ko(n,Bo)}function u1(n){return ko(n,_n)}function Yc(n){return ko(n,bt)}function o5(n,e){const t=e[0],r=Ym(e)-t;return function(i){return n(t+i*r)}}function Xc(n,e,t){return Ff(l1(e||"rgb",t),n)}function a5(n,e){const t=new Array(e),r=e+1;for(let i=0;i<e;)t[i]=n(++i/r);return t}function l1(n,e){const t=x6[c5(n)];return e!=null&&t&&t.gamma?t.gamma(e):t}function c5(n){return"interpolate"+n.toLowerCase().split("-").map(e=>e[0].toUpperCase()+e.slice(1)).join("")}const u5={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},l5={accent:U6,category10:z6,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:G6,observable10:H6,paired:V6,pastel1:_6,pastel2:j6,set1:Q6,set2:W6,set3:q6,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function f1(n){if(qm(n))return n;const e=n.length/6|0,t=new Array(e);for(let r=0;r<e;)t[r]="#"+n.slice(r*6,++r*6);return t}function h1(n,e){for(const t in n)Zf(t,e(n[t]))}const d1={};h1(l5,f1),h1(u5,n=>Xc(f1(n)));function Zf(n,e){return n=n&&n.toLowerCase(),arguments.length>1?(d1[n]=e,this):d1[n]}function Kf(){const n=e=>e;return n.invert=e=>e,n.copy=Kf,n.invertRange=()=>{},n.type="null",n}class f5{constructor(e,t,r={}){this._container=e,this._sizeSource=t??(()=>({width:void 0,height:void 0})),this._shaderCache=new Map,this.rangeTextures=new WeakMap,this.selectionTextures=new WeakMap;const i=document.createElement("canvas");e.appendChild(i);const s=LC(i,{antialias:!0,depth:!1,premultipliedAlpha:!0,...r});if(!s)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!pi(s))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");sm(s);const o=s.getExtension("WEBGL_provoking_vertex");o&&o.provokingVertexWEBGL(o.FIRST_VERTEX_CONVENTION_WEBGL),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),this.canvas=i,this.gl=s,this._pickingAttachmentOptions=[{format:s.RGBA,type:s.UNSIGNED_BYTE,minMag:s.LINEAR,wrap:s.CLAMP_TO_EDGE}],this._pickingBufferInfo=rm(s,this._pickingAttachmentOptions),s.bindFramebuffer(s.FRAMEBUFFER,null),this.adjustGl()}invalidateSize(){this._logicalCanvasSize=void 0,this.adjustGl()}compileShader(e,t){const r="#version 300 es",i="precision mediump float;";Ue(t)&&(t=t.join(`
|
|
384
384
|
|
|
385
|
-
`));const
|
|
385
|
+
`));const s=this.gl,o=t.replaceAll(/ {2,}|^\s*\/\/.*$/gm,"");let a=this._shaderCache.get(o);if(!a){const c=[r,i,t].join(`
|
|
386
386
|
|
|
387
|
-
`);a=
|
|
388
|
-
`).map((
|
|
387
|
+
`);a=s.createShader(e),s.shaderSource(a,c),s.compileShader(a),this._shaderCache.set(o,a)}return a}adjustGl(){const e=this.getLogicalCanvasSize();this.canvas.style.width=`${e.width}px`,this.canvas.style.height=`${e.height}px`;const t=this.getPhysicalCanvasSize(e);this.canvas.width=t.width,this.canvas.height=t.height,PC(this.gl,this._pickingBufferInfo,this._pickingAttachmentOptions)}finalize(){this.canvas.remove()}getPhysicalCanvasSize(e){const t=window.devicePixelRatio??1;return e=e||this.getLogicalCanvasSize(),{width:e.width*t,height:e.height*t}}getLogicalCanvasSize(){if(this._logicalCanvasSize)return this._logicalCanvasSize;const e=this._sizeSource(),t=window.getComputedStyle(this._container,null),r=e.width??this._container.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight),i=e.height??this._container.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom);return this._logicalCanvasSize={width:r,height:i},this._logicalCanvasSize}createRangeTexture(e,t=!1){const r=this.rangeTextures.get(e.scale);if(!t&&r)return;function i(o,a){return jn(a.type)?a.domain().length:a.type=="threshold"?a.domain().length+1:a.type=="quantize"||a.type=="quantile"?o??4:o}const s=e.channel;if(Ln(s)){const o=e.scale,a=o.props,c=o.range();let u;if(a.scheme)if(o.type=="threshold"&&c)u=Jf(c,this.gl,o.domain().length,r);else{let l=me(a.scheme)?void 0:a.scheme.count;l=i(l,o),u=g5(a.scheme,this.gl,l,r)}else Yc(o.type)||Oe(o.type)&&c.length>1?u=y5(c,a.interpolate,this.gl,r):u=Jf(c,this.gl,o.domain().length,r);this.rangeTextures.set(o,u)}else{const o=e.scale;if(o.type==="ordinal"||Mr(o.type)){const a=Pc(s)?Wm(s):u=>u,c=o.range();this.rangeTextures.set(o,b5(c.map(a),this.gl,o.domain().length,r))}}}createSelectionTexture(e,t=!0){if(!of(e))throw new Error("Not a multi-point selection, cannot create texture");const r=Array.from(e.data.keys()),i=r.length>0?r.sort((c,u)=>c-u):[0],s=this.selectionTextures.get(e),o=this.gl,a=Fo(this.gl,{level:0,minMag:o.NEAREST,format:o.RED_INTEGER,internalFormat:o.R32UI,height:1,width:i.length},new Uint32Array(i),t?s:!1);this.selectionTextures.set(e,a)}}function h5(n,e="",t=0){const r=/ERROR:\s*\d+:(\d+)/gi,i=[...e.matchAll(r)],s=new Map(i.map((o,a)=>{const c=parseInt(o[1]),u=i[a+1],l=u?u.index:e.length,f=e.substring(o.index,l);return[c-1,f]}));return n.split(`
|
|
388
|
+
`).map((o,a)=>{const c=s.get(a);return`${a+1+t}: ${o}${c?`
|
|
389
389
|
|
|
390
390
|
^^^ ${c}`:""}`}).join(`
|
|
391
|
-
`)}function
|
|
392
|
-
Error compiling: ${
|
|
393
|
-
${r.type} ${
|
|
391
|
+
`)}function d5(n,e,t){const r=n.createProgram();n.attachShader(r,e),n.attachShader(r,t),n.linkProgram(r);function i(){let s,o;if(!n.getProgramParameter(r,n.LINK_STATUS)){s=n.getProgramInfoLog(r);for(const c of[e,t])n.getShaderParameter(c,n.COMPILE_STATUS)||(s=n.getShaderInfoLog(c),o=h5(n.getShaderSource(c),s,0)+`
|
|
392
|
+
Error compiling: ${s}`,n.deleteShader(c));n.deleteProgram(r)}if(s)return{message:s,detail:o}}return{program:r,getProgramErrors:i}}function Fo(n,e,t,r){return r?Ap(n,r,t,e):r=oo(n,{...e,src:t}),r}function p5(n,e,t,r){const{height:i,framebuffer:s}=e,o=new Uint8Array(4);return n.bindFramebuffer(n.FRAMEBUFFER,s),n.readPixels(t,i-r-1,1,1,n.RGBA,n.UNSIGNED_BYTE,o),n.bindFramebuffer(n.FRAMEBUFFER,null),o}function m5(n,e,t="image/png"){const{width:r,height:i}=e,s=new Uint8Array(r*i*4);n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer),n.readPixels(0,0,r,i,n.RGBA,n.UNSIGNED_BYTE,s),n.bindFramebuffer(n.FRAMEBUFFER,null);const o=document.createElement("canvas");o.width=r,o.height=i;const a=o.getContext("2d"),c=a.createImageData(r,i);for(let u=0;u<i;u++){const l=(i-1-u)*r*4,f=u*r*4;c.data.set(s.subarray(l,l+r*4),f)}return a.putImageData(c,0,0),o.toDataURL(t)}function g5(n,e,t,r){const i=me(n)?n:n.name,s=!me(n)&&n.extent||[0,1];if(t===void 0&&!me(n)&&(t=n.count),i){const o=Zf(i);if(Nt(o)){const a=p1(o,{extent:s,count:t});return Fo(e,{minMag:e.LINEAR,format:e.RGB,height:1,wrap:e.CLAMP_TO_EDGE},a,r)}else{if(Ue(o))return Jf(o,e);throw new Error("Unknown scheme: "+i)}}}function y5(n,e="rgb",t,r){const i=Xc(n,me(e)?e:e.type,me(e)?void 0:e.gamma),s=p1(i);return Fo(t,{minMag:t.LINEAR,format:t.RGB,height:1,wrap:t.CLAMP_TO_EDGE},s,r)}function b5(n,e,t,r){const i=Math.max(n.length,t||0),s=new Float32Array(i);for(let o=0;o<i;o++)s[o]=n[o%n.length];return Fo(e,{minMag:e.NEAREST,format:e.RED,internalFormat:e.R32F,height:1},s,r)}function Jf(n,e,t,r){const i=m1(n,t);return Fo(e,{minMag:e.NEAREST,format:e.RGB,height:1},i,r)}function p1(n,{extent:e=[0,1],reverse:t=!1,count:r=256}={}){const i=e[0],s=eo(e)-i,o=Us(r).map(a=>a/(r-1)).map(a=>i+a/s).map(n);return t&&o.reverse(),m1(o)}function m1(n,e){const t=Math.max(n.length,e||0),r=new Uint8Array(t*3);for(let i=0;i<t;i++){const s=n[i%n.length],o=Gn(s);if(!o)throw new Error(`Invalid color "${s}" in the scheme ${JSON.stringify(n)}!`);const a=o.rgb();r[i*3+0]=a.r,r[i*3+1]=a.g,r[i*3+2]=a.b}return r}function $f(n){const e=Gn(n).rgb();return[e.r,e.g,e.b].map(t=>t/255)}const x5="attr_",A5="uDomain_",w5="range_",v5="accessor_",g1="scale_",S5="getScaled_",eh="uRangeTexture_",Zc="uParam_",Po="checkSelection_",E5=3402823466e29;function C5(n){const e=n.match(/^(?:(\w+)-)?(\w+)$/);if(!e)throw new Error("Not a scale type: "+n);return{family:e[1]||"continuous",transform:e[2]}}function Mo(n,e){return`${v5}${n}_${e}`}function D5(n,e,t){let r;if(Pc(n))r=Rr(Wm(n)(t));else if(me(t))if(Ln(n))r=F5(t);else throw new Error(`String values are not supported on the "${n}" channel: ${t}`);else if(Is(t))r=Rr(t?1:0);else if(t===null)if(Ln(n))r=Rr([0,0,0]);else throw new Error(`null value is not supported on the "${n}" chanel.`);else r=Rr(t);const i=Mo(n,e),s=`
|
|
393
|
+
${r.type} ${i}() {
|
|
394
394
|
// Constant value
|
|
395
395
|
return ${r};
|
|
396
|
-
}`;return{channel:
|
|
397
|
-
uniform ${
|
|
398
|
-
${
|
|
396
|
+
}`;return{channel:n,accessorGlsl:s,accessorFunctionName:i}}function I5(n,e){let t="float",r=c=>c;Ln(n)&&(t="vec3",r=c=>$f(c));const i=`u${N5(n)}_${e}`,s=` // Dynamic value
|
|
397
|
+
uniform ${t} ${i};`,o=Mo(n,e);let a=`
|
|
398
|
+
${t} ${o}() {
|
|
399
399
|
// Dynamic value
|
|
400
|
-
return ${o};
|
|
401
|
-
}`;return{channel:t,uniformName:o,uniformGlsl:i,accessorGlsl:a,accessorFunctionName:s,adjuster:r}}function qy(t,e,n,r=[t]){const{attributeType:o}=wo(e,t),i=xo(r),s=`in highp ${o} ${i};`,a=wa(t,n),c=`
|
|
402
|
-
${o} ${a}() {
|
|
403
400
|
return ${i};
|
|
404
|
-
}`;return{channel:
|
|
405
|
-
${
|
|
406
|
-
return ${
|
|
407
|
-
}`;return{channel:
|
|
408
|
-
${
|
|
409
|
-
|
|
401
|
+
}`;return{channel:n,uniformName:i,uniformGlsl:s,accessorGlsl:a,accessorFunctionName:o,adjuster:r}}function y1(n,e,t,r=[n]){const{attributeType:i}=Fi(e,n),s=Pi(r),o=`in highp ${i} ${s};`,a=Mo(n,t),c=`
|
|
402
|
+
${i} ${a}() {
|
|
403
|
+
return ${s};
|
|
404
|
+
}`;return{channel:n,attributeName:s,attributeGlsl:o,accessorGlsl:c,accessorFunctionName:a}}function T5(n,e,t){const{attributeType:r}=Fi(e,n),i=Pi(n),s=` uniform highp ${r} ${i};`,o=Mo(n,t),a=`
|
|
405
|
+
${r} ${o}() {
|
|
406
|
+
return ${i};
|
|
407
|
+
}`;return{channel:n,uniformName:i,uniformGlsl:s,accessorGlsl:a,accessorFunctionName:o}}function B5(n,e,t){e??(e=Kf());const r=Ir(n),i=A5+r,s=w5+r,{hp:o,attributeType:a}=Fi(e,n),c=e.domain?e.domain().length:void 0;let u;const l=[];l.push(""),l.push("/".repeat(70)),l.push(`// Channel: ${n}`),l.push("");const{transform:f}=C5(e.type),d=(v,...T)=>P5.apply(null,[v,"value",...T]);let h;switch(f){case"linear":h=d("scaleLinear","domain",s);break;case"log":h=d("scaleLog","domain",s,e.base());break;case"symlog":h=d("scaleSymlog","domain",s,e.constant());break;case"pow":case"sqrt":h=d("scalePow","domain",s,e.exponent());break;case"index":case"locus":h=d("scaleBandHp","domain",s,e.paddingInner(),e.paddingOuter(),e.align(),t.band??.5);break;case"point":case"band":h=d("scaleBand","domain",s,e.paddingInner(),e.paddingOuter(),e.align(),t.band??.5);break;case"ordinal":case"null":case"identity":h=d("scaleIdentity");break;case"threshold":break;default:throw new Error(`Unsupported scale type: ${e.type}! ${n}: ${JSON.stringify(t)}`)}const p=C1(e,n);let m;if(p&&n==r){const v=e.props.range??[];if(Qe(v)||v.some(Qe)){if(p.length<1||p.length>4)throw new Error(`A range with ExprRefs must have 1-4 elements, not ${p.length}! Range: ${JSON.stringify(p)}`);m=` uniform ${x1(p.length)} ${s};`}else if(p.length&&p.every(Ze)){const T=w1(p);l.push(`const ${T.type} ${s} = ${T};`)}}const g=A1(n);let y;if(Ln(n)){const v=eh+r;if(n==r&&l.push(`uniform sampler2D ${v};`),Oe(e.type))y=`getInterpolatedColor(${v}, transformed)`;else if(jn(e.type)||Mr(e.type))y=`getDiscreteColor(${v}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(e.type==="ordinal"||Mr(e.type)){const v=eh+r;n==r&&l.push(`uniform sampler2D ${v};`),y=`getDiscreteColor(${v}, int(transformed)).r`}const x=[],A=Oe(e.type)&&c>2,w=Mr(e.type)||A;if(x.push("int slot = 0;"),w){const v=i;x.push(A?`while (slot < ${v}.length() - 2 && value >= ${v}[slot + 1]) { slot++; }`:`while (slot < ${v}.length() && value >= ${v}[slot]) { slot++; }`)}const S=Oe(e.type)||Mr(e.type)||["band","point"].includes(e.type);if(h){const v=i;S&&(o?x.push(`vec3 domain = ${v};`):x.push(`vec2 domain = vec2(${v}[slot], ${v}[slot + 1]);`)),x.push(`float transformed = ${h};`),A&&x.push(`transformed = (float(slot) + transformed) / (float(${v}.length() - 1));`)}else x.push("float transformed = float(slot);");"clamp"in e&&e.clamp()&&x.push(`transformed = clampToRange(transformed, ${w1(p)});`),x.push(`return ${y??"transformed"};`),l.push(`
|
|
408
|
+
${g} ${g1}${n}(${a} value) {
|
|
409
|
+
${x.map(v=>` ${v}
|
|
410
410
|
`).join("")}
|
|
411
|
-
}`);const
|
|
412
|
-
`);if(
|
|
413
|
-
${
|
|
411
|
+
}`);const C=l.join(`
|
|
412
|
+
`);if(S&&n==r){const v=Oe(e.type)||Mr(e.type)?c:2;u=o?` highp vec3 ${i};`:` mediump float ${i}[${v}];`}return{glsl:C,domainUniformName:i,domainUniform:u,rangeUniformName:s,rangeUniform:m}}function k5(n,e){const t=A1(n),r=[],i=[];for(let s=0;s<e.length;s++){const o=e[s],a=Mo(n,s),{param:c,empty:u}=o.predicate;r.push(c?`${Po}${c}(${!!u})`:null),i.push(o.scaleChannel?`return ${g1}${n}(${a}());`:`return ${a}();`)}return`${t} ${S5}${n}() {
|
|
413
|
+
${L5(r,i)}
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
#define ${
|
|
417
|
-
${e[
|
|
416
|
+
#define ${n}_DEFINED`}function b1(n){if(!Ze(n))throw new Error(`Not a number: ${n}`);if(n==1/0)return""+E5;if(n==-1/0)return""+-3402823466e29;{let e=`${n}`;return/^(-)?\d+$/.test(e)&&(e+=".0"),e}}function Rr(n){typeof n=="number"&&(n=[n]);const e=n.length;if(e<1||e>4)throw new Error("Invalid number of components: "+e);const t=x1(e),r=`${t}(${n.map(b1).join(", ")})`;return Object.assign(r,{type:t,numComponents:e})}function x1(n){switch(n){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error("Invalid number of components: "+n)}}function A1(n){return Ln(n)?"vec3":n=="uniqueId"?"uint":"float"}function F5(n){return Rr($f(n))}function w1(n){return Rr([n[0],eo(n)])}function P5(n,...e){const t=[];for(const r of e)Ze(r)?t.push(b1(r)):Ue(r)?t.push(Rr(r)):t.push(r);return`${n}(${t.join(", ")})`}function Fi(n,e){var o;const t=n&&jn(n.type),r=n&&v1(n.type),i=r&&M5(n.domain()),s=i?{attributeType:"uvec2",arrayConstructor:Uint32Array}:r?{attributeType:"uint",arrayConstructor:Uint32Array}:t?{attributeType:"uint",arrayConstructor:Uint16Array}:e=="uniqueId"?{attributeType:"uint",arrayConstructor:Uint32Array}:{attributeType:"float",arrayConstructor:Float32Array};return Object.assign(s,{numComponents:+(((o=s.attributeType.match(/^vec([234])$/))==null?void 0:o[1])??1),discrete:t,hp:r,largeHp:i})}function v1(n){return n=="index"||n=="locus"}function M5(n){return n[1]>2**32}const th=2**12;function S1(n,e=[]){const t=n%th,r=(n-t)/th;return e[0]=r,e[1]=t,e}function R5(n){const e=n%th;return[n-e,e]}function O5(n){return[...R5(n[0]),n[1]-n[0]]}function E1(n){const e=new tn([],JSON.stringify);for(const[t,r]of Object.entries(n)){const i=r.channelDef;if(Nn(i)){const o=[i.field,r.scale?(Oe(r.scale.type)||Mr(r.scale.type))??!1:!1];e.set(o,[...e.get(o)??[],t])}}return e}function Pi(n){return x5+He(n).toSorted().join("_")}function N5(n){return n[0].toUpperCase()+n.slice(1)}const C1=(n,e)=>Yc(n.type)||Oe(n.type)&&Ln(e)?[0,1]:n.range?n.range():void 0;function L5(n,e){if(n.length!=e.length)throw new Error("Unequal array lengths");const t=n.length;if(t==0)return"";if(t==1&&n[0]==null)return e[0];const r=[];for(let i=0;i<t;i++){const s=n[i],o=i==0?`if (${s})`:s==null&&i==t-1?"else":`else if (${s})`;r.push(` ${o} {
|
|
417
|
+
${e[i]}
|
|
418
418
|
}`)}return r.join(`
|
|
419
|
-
`)}function
|
|
419
|
+
`)}function z5(){let n=0,e,t=0;const r=new Map,i=s=>(s===e||(t=r.get(s),t===void 0&&(t=n++,r.set(s,t)),e=s),t);return i.addAll=s=>{for(const o of s)i(o)},i.invert=s=>{for(const o of r.entries())if(o[1]==s)return o[0]},i.domain=()=>[...r.keys()],i}class Ro{constructor({encoders:e,numVertices:t=void 0,attributes:r=[]}){this.encoders=e,this.variableEncoders=Object.fromEntries(Object.entries(e).filter(([s,o])=>r.includes(s)&&o&&!o.constant));const i=[...E1(e).entries()].filter(([s,o])=>s[1]&&o.length>1).map(([s,o])=>o);this.allocatedVertices=t,this.variableBuilder=new HC(t);for(const[s,o]of Object.entries(this.variableEncoders)){const a=o.dataAccessor;if(!a)continue;const c=i.find(A=>A.find(w=>w==s));if(c&&s!=c[0])continue;const u=a.asNumberAccessor(),l=o.scale,{largeHp:f,arrayConstructor:d,discrete:h,numComponents:p}=Fi(l,s),m=[0,0];let g;l&&h&&"domain"in l&&(g=z5(),g.addAll(l.domain()));const y=g?A=>g(a(A)):f?A=>S1(u(A),m):u,x=Pi(c??s);this.variableBuilder.addConverter(x,{f:y,numComponents:p,arrayReference:f?m:void 0,targetArrayType:d})}this.lastOffset=0,this.rangeMap=new tn([],JSON.stringify)}registerBatch(e){var s;const t=this.lastOffset,r=this.variableBuilder.vertexCount,i=r-t;i&&this.rangeMap.set(e,{offset:t,count:i,xIndex:(s=this.xIndexer)==null?void 0:s.getIndex()}),this.lastOffset=r}addBatches(e){for(const[t,r]of e)this.addBatch(t,r)}addBatch(e,t,r=0,i=t.length){this.prepareXIndexer(t,r,i);for(let s=r;s<i;s++){const o=t[s];this.variableBuilder.pushFromDatum(o),this.addToXIndex(o)}this.registerBatch(e)}prepareXIndexer(e,t=0,r=t+e.length){var u;const i=()=>{this.addToXIndex=l=>{},this.xIndexer=void 0},s=(u=this.encoders.x)==null?void 0:u.channelDef;if(!("buildIndex"in s)||!s.buildIndex||!e.length||r-t<0){i();return}const o=l=>{var f;return l&&Oe((f=l.scale)==null?void 0:f.type)&&l},a=o(this.variableEncoders.x),c=o(this.variableEncoders.x2);if(a&&!a.constant&&(!c||!c.constant)){const l=a.dataAccessor.asNumberAccessor(),f=c?c.dataAccessor.asNumberAccessor():l,d=[l(e[t]),f(e[r-1])];if(d[1]>d[0]){this.xIndexer=_C(50,d,l,f);let h=this.variableBuilder.vertexCount;this.addToXIndex=p=>{let m=this.variableBuilder.vertexCount;this.xIndexer(p,h,m),h=m}}else i()}else i()}addToXIndex(e){}toArrays(){return{arrays:this.variableBuilder.arrays,vertexCount:this.variableBuilder.vertexCount,allocatedVertices:this.allocatedVertices,rangeMap:this.rangeMap}}}class U5 extends Ro{constructor({encoders:e,attributes:t,numItems:r}){super({encoders:e,attributes:t,numVertices:r*6}),this.variableBuilder.configure();const i=this.variableBuilder.pushAll;this.pushAllSixTimes=r>500?new Function("pushAll",`return function unrolledPushAllSixTimes() {
|
|
420
420
|
pushAll(); pushAll(); pushAll(); pushAll(); pushAll(); pushAll();
|
|
421
|
-
};`)(
|
|
422
|
-
uniform View{mediump vec2 uViewOffset;mediump vec2 uViewScale;mediump vec2 uViewportSize;lowp float uDevicePixelRatio;lowp float uViewOpacity;bool uPickingEnabled;};/***Maps a coordinate on the unit scale to a normalized device coordinate.*(0,0)is at the bottom left corner.*/vec4 unitToNdc(vec2 coord){return vec4((coord*uViewScale+uViewOffset)*2.0-1.0,0.0,1.0);}vec4 unitToNdc(float x,float y){return unitToNdc(vec2(x,y));}vec4 pixelsToNdc(vec2 coord){return unitToNdc(coord/uViewportSize);}vec4 pixelsToNdc(float x,float y){return pixelsToNdc(vec2(x,y));}float linearstep(float edge0,float edge1,float x){return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}bool isEmptyBinarySearchTexture(highp usampler2D s){return textureSize(s,0).x==1&&texelFetch(s,ivec2(0,0),0).r==0u;}bool binarySearchTexture(highp usampler2D s,uint value){int texSize=textureSize(s,0).x;if(texSize==1&&texelFetch(s,ivec2(0,0),0).r==0u){return false;}int left=0;int right=texSize-1;while(left<=right){int mid=left+(right-left)/2;uint midValue=texelFetch(s,ivec2(mid,0),0).r;if(midValue==value){return true;}if(midValue<value){left=mid+1;}else{right=mid-1;}}return false;}/***Calculates a gamma for antialiasing opacity based on the color.*/float getGammaForColor(vec3 rgb){return mix(1.25,0.75,smoothstep(0.0,1.0,dot(rgb,vec3(0.299,0.587,0.114))));}/***Specialized linearstep for doing antialiasing*/float distanceToRatio(float d){return clamp(d*uDevicePixelRatio+0.5,0.0,1.0);}vec4 distanceToColor(float d,vec4 fill,vec4 stroke,vec4 background,float halfStrokeWidth){if(halfStrokeWidth>0.0){float sd=abs(d)-halfStrokeWidth;return mix(stroke,d<=0.0 ? fill : background,distanceToRatio(sd));}else{return mix(background,fill,distanceToRatio(-d));}}`,
|
|
421
|
+
};`)(i):function(){i(),i(),i(),i(),i(),i()}}addBatch(e,t,r=0,i=t.length){if(!(i<=r)){this.prepareXIndexer(t,r,i);for(let s=r;s<i;s++){const o=t[s];this.variableBuilder.updateFromDatum(o),this.pushAllSixTimes(),this.addToXIndex(o)}this.registerBatch(e)}}}class G5 extends Ro{constructor({encoders:e,attributes:t,tessellationThreshold:r=1/0,visibleRange:i=[-1/0,1/0],numItems:s}){super({encoders:e,attributes:t,numVertices:r==1/0?s*6:void 0}),this.visibleRange=i,this.tessellationThreshold=r||1/0,this.updateSide=this.variableBuilder.createUpdater("side",1),this.updatePos=this.variableBuilder.createUpdater("pos",1),this.variableBuilder.configure()}addBatch(e,t,r=0,i=t.length){this.prepareXIndexer(t,r,i);for(let s=r;s<i;s++){const o=t[s];this.variableBuilder.updateFromDatum(o),this.updateSide(-.5),this.updatePos(0),this.variableBuilder.pushAll();const a=1;for(let c=0;c<=a;c++)this.updatePos(c/a),this.updateSide(-.5),this.variableBuilder.pushAll(),this.updateSide(.5),this.variableBuilder.pushAll();this.variableBuilder.pushAll(),this.addToXIndex(o)}this.registerBatch(e)}}class H5 extends Ro{constructor({encoders:e,attributes:t,numItems:r=void 0}){super({encoders:e,attributes:t,numVertices:r}),this.variableBuilder.configure()}}class V5 extends Ro{constructor({encoders:e,attributes:t,numItems:r=void 0}){super({encoders:e,attributes:t,numVertices:r}),this.variableBuilder.configure()}toArrays(){const e=this.variableBuilder.arrays;for(let t of Object.values(e))t.divisor=1;return super.toArrays()}}class _5 extends Ro{constructor({encoders:e,attributes:t,fontMetrics:r,properties:i,numCharacters:s=void 0}){super({encoders:e,attributes:t,numVertices:s*6}),this.metadata=r,this.metrics=r,this.properties=i;const a=e.text.channelDef;this.numberFormat=!yt(a)&&"format"in a&&a.format?Le(a.format):c=>c,this.updateVertexCoord=this.variableBuilder.createUpdater("vertexCoord",2),this.updateTextureCoord=this.variableBuilder.createUpdater("textureCoord",2),this.updateWidth=this.variableBuilder.createUpdater("width",1),this.variableBuilder.configure()}addBatch(e,t,r=0,i=t.length){const s=this.properties.align||"left",o=this.properties.logoLetters??!1,a=this.metadata.common.base,c=this.metadata.common.scaleH;let u=-5;switch(this.properties.baseline){case"top":u+=this.metrics.capHeight;break;case"middle":u+=this.metrics.capHeight/2;break;case"bottom":u-=this.metrics.descent;break}const l=this.encoders.text,f=[0,0];this.updateVertexCoord(f);const d=[0,0];this.updateTextureCoord(d),this.prepareXIndexer(t,r,i);for(let h=r;h<i;h++){const p=t[h],m=this.numberFormat(l(p)),g=me(m)?m:m===null?"":""+m;if(g.length==0)continue;this.variableBuilder.updateFromDatum(p);const y=o?g.length:this.metrics.measureWidth(g);this.updateWidth(y);let x=s=="right"?-y:s=="center"?-y/2:0;if(!o){const C=this.metrics.getCharByCode(g.charCodeAt(0));x-=(C.width-C.xadvance)/a/2}let A=-.5,w=1,S=1;for(let C=0;C<g.length;C++){const v=this.metrics.getCharByCode(g.charCodeAt(C)),T=o?1:v.xadvance/a;if(v.id==32){x+=T;continue}o?(S=(v.width+co*2)/v.width,x=-S/2,w=(v.height+co*2)/v.height,A=-.5-co/v.height):(w=v.height/a,A=-(v.height+v.yoffset+u)/a,S=v.width/a);const P=v.x,F=v.y;f[0]=x,f[1]=A+w,d[0]=P/c,d[1]=F/c,this.variableBuilder.pushAll(),f[0]=x+S,f[1]=A+w,d[0]=(P+v.width)/c,d[1]=F/c,this.variableBuilder.pushAll(),f[0]=x,f[1]=A,d[0]=P/c,d[1]=(F+v.height)/c,this.variableBuilder.pushAll(),f[0]=x+S,f[1]=A+w,d[0]=(P+v.width)/c,d[1]=F/c,this.variableBuilder.pushAll(),f[0]=x,f[1]=A,d[0]=P/c,d[1]=(F+v.height)/c,this.variableBuilder.pushAll(),f[0]=x+S,f[1]=A,d[0]=(P+v.width)/c,d[1]=(F+v.height)/c,this.variableBuilder.pushAll(),x+=T}this.addToXIndex(p)}this.registerBatch(e)}}const D1=`#define PI 3.141593
|
|
422
|
+
uniform View{mediump vec2 uViewOffset;mediump vec2 uViewScale;mediump vec2 uViewportSize;lowp float uDevicePixelRatio;lowp float uViewOpacity;bool uPickingEnabled;};/***Maps a coordinate on the unit scale to a normalized device coordinate.*(0,0)is at the bottom left corner.*/vec4 unitToNdc(vec2 coord){return vec4((coord*uViewScale+uViewOffset)*2.0-1.0,0.0,1.0);}vec4 unitToNdc(float x,float y){return unitToNdc(vec2(x,y));}vec4 pixelsToNdc(vec2 coord){return unitToNdc(coord/uViewportSize);}vec4 pixelsToNdc(float x,float y){return pixelsToNdc(vec2(x,y));}float linearstep(float edge0,float edge1,float x){return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}bool isEmptyBinarySearchTexture(highp usampler2D s){return textureSize(s,0).x==1&&texelFetch(s,ivec2(0,0),0).r==0u;}bool binarySearchTexture(highp usampler2D s,uint value){int texSize=textureSize(s,0).x;if(texSize==1&&texelFetch(s,ivec2(0,0),0).r==0u){return false;}int left=0;int right=texSize-1;while(left<=right){int mid=left+(right-left)/2;uint midValue=texelFetch(s,ivec2(mid,0),0).r;if(midValue==value){return true;}if(midValue<value){left=mid+1;}else{right=mid-1;}}return false;}/***Calculates a gamma for antialiasing opacity based on the color.*/float getGammaForColor(vec3 rgb){return mix(1.25,0.75,smoothstep(0.0,1.0,dot(rgb,vec3(0.299,0.587,0.114))));}/***Specialized linearstep for doing antialiasing*/float distanceToRatio(float d){return clamp(d*uDevicePixelRatio+0.5,0.0,1.0);}vec4 distanceToColor(float d,vec4 fill,vec4 stroke,vec4 background,float halfStrokeWidth){if(halfStrokeWidth>0.0){float sd=abs(d)-halfStrokeWidth;return mix(stroke,d<=0.0 ? fill : background,distanceToRatio(sd));}else{return mix(background,fill,distanceToRatio(-d));}}`,j5="uniform highp float uZero;vec3 getDiscreteColor(sampler2D s,int index){return texelFetch(s,ivec2(index % textureSize(s,0).x,0),0).rgb;}vec3 getInterpolatedColor(sampler2D s,float unitValue){return texture(s,vec2(unitValue,0.0)).rgb;}float clampToRange(float value,vec2 range){return clamp(value,min(range[0],range[1]),max(range[0],range[1]));}float scaleIdentity(float value){return value;}float scaleIdentity(uint value){return float(value);}float scaleLinear(float value,vec2 domain,vec2 range){float domainSpan=domain[1]-domain[0];float rangeSpan=range[1]-range[0];return(value-domain[0])/domainSpan*rangeSpan+range[0];}float scaleLog(float value,vec2 domain,vec2 range,float base){return scaleLinear(log(value)/log(base),log(domain)/log(base),range);}float symlog(float value,float constant){return sign(value)*log(abs(value/constant)+1.0);}float scaleSymlog(float value,vec2 domain,vec2 range,float constant){return scaleLinear(symlog(value,constant),vec2(symlog(domain[0],constant),symlog(domain[1],constant)),range);}float scalePow(float value,vec2 domain,vec2 range,float exponent){return scaleLinear(pow(abs(value),exponent)*sign(value),pow(abs(domain),vec2(exponent))*sign(domain),range);}float scaleBand(uint value,vec2 domainExtent,vec2 range,float paddingInner,float paddingOuter,float align,float band){float start=range[0];float stop=range[1];float rangeSpan=stop-start;float n=domainExtent[1]-domainExtent[0];paddingInner=int(n)>1 ? paddingInner : 0.0;float step=rangeSpan/max(1.0,n-paddingInner+paddingOuter*2.0);start+=(rangeSpan-step*(n-paddingInner))*align;float bandwidth=step*(1.0-paddingInner);return start+(float(value)-domainExtent[0])*step+bandwidth*band;}const int lowBits=12;const float lowDivisor=pow(2.0,float(lowBits));const uint lowMask=uint(lowDivisor-1.0);vec2 splitUint(uint value){uint valueLo=value&lowMask;uint valueHi=value-valueLo;return vec2(float(valueHi),float(valueLo));}/***High precision variant of scaleBand for index/locus scales*/float scaleBandHp(uint value,vec3 domainExtent,vec2 range,float paddingInner,float paddingOuter,float align,float band){float start=range[0];float stop=range[1];float rangeSpan=stop-start;vec2 domainStart=domainExtent.xy;float n=domainExtent[2];float step=rangeSpan/max(1.0,n-paddingInner+paddingOuter*2.0);start+=(rangeSpan-step*(n-paddingInner))*align;float bandwidth=step*(1.0-paddingInner);vec2 splitValue=splitUint(value);float inf=1.0/uZero;float hi=max(splitValue[0]-domainStart[0],-inf);float lo=max(splitValue[1]-domainStart[1],-inf);return dot(vec4(start,hi,lo,bandwidth),vec4(1.0,step,step,band));}/***High precision variant of scaleBand for index/locus scales for large*domains where 32bit uints are not sufficient to represent the domain.*/float scaleBandHp(uvec2 value,vec3 domainExtent,vec2 range,float paddingInner,float paddingOuter,float align,float band){float start=range[0];float stop=range[1];float rangeSpan=stop-start;vec2 domainStart=domainExtent.xy;float n=domainExtent[2];float step=rangeSpan/max(1.0,n-paddingInner+paddingOuter*2.0);start+=(rangeSpan-step*(n-paddingInner))*align;float bandwidth=step*(1.0-paddingInner);vec2 splitValue=vec2(float(value[0])*lowDivisor,float(value[1]));float inf=1.0/uZero;float hi=max(splitValue[0]-domainStart[0],-inf);float lo=max(splitValue[1]-domainStart[1],-inf);return dot(vec4(start,hi,lo,bandwidth),vec4(1.0,step,step,band));}",Q5=`/***Describes where a sample facet should be shown. Interpolating between the*current and target positions/heights allows for transitioning between facet*configurations.*/struct SampleFacetPosition{float pos;float height;float targetPos;float targetHeight;};/***Trasition fraction[0,1]between the current and target configurations.*/uniform float uTransitionOffset;
|
|
423
423
|
#if !defined(SAMPLE_FACET_UNIFORM) && !defined(SAMPLE_FACET_TEXTURE)
|
|
424
424
|
SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1.0);}
|
|
425
425
|
#elif defined(SAMPLE_FACET_UNIFORM)
|
|
@@ -427,37 +427,37 @@ SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1
|
|
|
427
427
|
#elif defined(SAMPLE_FACET_TEXTURE)
|
|
428
428
|
uniform sampler2D uSampleFacetTexture;SampleFacetPosition getSampleFacetPos(){vec4 texel=texelFetch(uSampleFacetTexture,ivec2(int(attr_facetIndex),0),0);return SampleFacetPosition(1.0-texel.r-texel.g,texel.g,1.0-texel.r-texel.g,texel.g);}
|
|
429
429
|
#endif
|
|
430
|
-
bool isFacetedSamples(SampleFacetPosition facetPos){return facetPos!=SampleFacetPosition(0.0,1.0,0.0,1.0);}bool isFacetedSamples(){return isFacetedSamples(getSampleFacetPos());}bool isInTransit(){return uTransitionOffset>0.0;}float getTransitionFraction(float xPos){return smoothstep(0.0,0.7+uTransitionOffset,(xPos-uTransitionOffset)*2.0);}vec2 applySampleFacet(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return pos;}else if(isInTransit()){vec2 interpolated=mix(vec2(facetPos.pos,facetPos.height),vec2(facetPos.targetPos,facetPos.targetHeight),getTransitionFraction(pos.x));return vec2(pos.x,interpolated[0]+pos.y*interpolated[1]);}else{return vec2(pos.x,facetPos.pos+pos.y*facetPos.height);}}float getSampleFacetHeight(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return 1.0;}else if(isInTransit()){return mix(facetPos.height,facetPos.targetHeight,getTransitionFraction(pos.x));}else{return facetPos.height;}}`,
|
|
430
|
+
bool isFacetedSamples(SampleFacetPosition facetPos){return facetPos!=SampleFacetPosition(0.0,1.0,0.0,1.0);}bool isFacetedSamples(){return isFacetedSamples(getSampleFacetPos());}bool isInTransit(){return uTransitionOffset>0.0;}float getTransitionFraction(float xPos){return smoothstep(0.0,0.7+uTransitionOffset,(xPos-uTransitionOffset)*2.0);}vec2 applySampleFacet(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return pos;}else if(isInTransit()){vec2 interpolated=mix(vec2(facetPos.pos,facetPos.height),vec2(facetPos.targetPos,facetPos.targetHeight),getTransitionFraction(pos.x));return vec2(pos.x,interpolated[0]+pos.y*interpolated[1]);}else{return vec2(pos.x,facetPos.pos+pos.y*facetPos.height);}}float getSampleFacetHeight(vec2 pos){SampleFacetPosition facetPos=getSampleFacetPos();if(!isFacetedSamples(facetPos)){return 1.0;}else if(isInTransit()){return mix(facetPos.height,facetPos.targetHeight,getTransitionFraction(pos.x));}else{return facetPos.height;}}`,W5=`/**Based on concepts presented at:*https:*https:*/out highp vec4 vPickingColor;/***Passes the unique id to the fragment shader as a color if picking is enabled.*Returns true if picking is enabled.*/bool setupPicking(){if(uPickingEnabled){
|
|
431
431
|
#ifdef uniqueId_DEFINED
|
|
432
432
|
uint id=attr_uniqueId;vPickingColor=vec4(ivec4(id>>0,id>>8,id>>16,id>>24)&0xFF)/float(0xFF);
|
|
433
433
|
#else
|
|
434
434
|
vPickingColor=vec4(1.0);
|
|
435
435
|
#endif
|
|
436
|
-
return true;}return false;}`,
|
|
437
|
-
return ${
|
|
438
|
-
}`)}}else if(
|
|
439
|
-
uniform highp usampler2D ${
|
|
440
|
-
return binarySearchTexture(${
|
|
441
|
-
}`),
|
|
442
|
-
return ${
|
|
443
|
-
}`)}}const p=(
|
|
444
|
-
`+(this.encoders.uniqueId&&
|
|
445
|
-
}`);const
|
|
446
|
-
precision highp int;`,
|
|
447
|
-
`));r=r.map(
|
|
448
|
-
`),...c,hD,dD,e],S=[v,a,...r,eb,pD,n],E=this.gl;this.programStatus=MT(E,this.glHelper.compileShader(E.VERTEX_SHADER,A),this.glHelper.compileShader(E.FRAGMENT_SHADER,S))}finalizeGraphicsInitialization(){const e=this.programStatus.getProgramErrors();if(e){e.detail&&console.warn(e.detail);const n=new Error("Cannot create shader program: "+e.message);throw n.view=this.unitView,n}this.programInfo=P6(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=vm(this.gl,this.programInfo,"View"),this.markUniformInfo=vm(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),li(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of j(this,Tn))n();Ae(this,Tn,void 0)}createMarkUniformSetter(e){const n=this.markUniformInfo.setters[e];if(!n)throw new Error(`Uniform "${e}" not found int the Mark block!`);return r=>{n(r),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(e,n,r=o=>o){const o=this.createMarkUniformSetter(e),i=s=>{if(s==null)throw new Error(`Trying to set null/undefined value for uniform: ${e}${Ot(n)?`Expr: ${n.expr}`:""}`);o(s)};if(Ot(n)){const s=this.unitView.paramMediator.createExpression(n.expr),a=()=>i(r(s(null)));s.addListener(a),a()}else i(r(n))}deleteGraphicsData(){const e=this.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),e.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let n=0;n<8;n++)e.disableVertexAttribArray(n);Object.values(this.bufferInfo.attribs).forEach(n=>this.gl.deleteBuffer(n.buffer)),this.bufferInfo.indices&&this.gl.deleteBuffer(this.bufferInfo.indices),this.bufferInfo=void 0}}updateBufferInfo(e){if(this.gl.bindVertexArray(null),this.bufferInfo&&e.vertexCount<=this.bufferInfo.allocatedVertices)for(const[n,r]of Object.entries(e.arrays))r.data&&QS(this.gl,this.bufferInfo.attribs[n],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=KS(this.gl,e.arrays,{numElements:e.vertexCount}),this.bufferInfo.allocatedVertices=e.allocatedVertices;for(const[n,r]of Object.entries(e.arrays))this.bytesPerElement.set(n,r.data.BYTES_PER_ELEMENT)}}get glHelper(){return this.getContext().glHelper}get gl(){return this.glHelper.gl}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}isReady(){return this.bufferInfo&&this.programInfo}isPickingParticipant(){if(this.properties.tooltip===null&&!this.unitView.paramMediator.hasPointSelections())return!1;for(const e of this.unitView.getLayoutAncestors())if(!e.isPickingSupported())return!1;return!0}bindOrSetMarkUniformBlock(){this.markUniformsAltered?(Em(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):Am(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(e){const n=this.glHelper,r=this.gl,o=[];o.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=e8(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[s,a]of Object.entries(this.encoders)){const c=n.rangeTextures.get(a.scale);c&&o.push(()=>li(this.programInfo,{[Jh+s]:c}))}o.push(...this.selectionTextureOps),this.getSampleFacetMode()==rb&&o.push(()=>{let s;for(const a of this.unitView.getLayoutAncestors())if(s=a.getSampleFacetTexture(),s)break;if(!s)throw new Error("No facet texture available. This is bug.");li(this.programInfo,{uSampleFacetTexture:s})});const i=(e.picking??!1)&&this.isPickingParticipant();return o.push(()=>Qs(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:i})),this.opaque||e.picking?o.push(()=>r.disable(r.BLEND)):o.push(()=>r.enable(r.BLEND)),o}prepareSampleFacetRendering(e){const n=e.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(n&&r){const o=n.locSize?n.locSize.location:0,i=n.locSize?n.locSize.size:1;if(o>1||o+i<0)return!1;const s=n.targetLocSize?n.targetLocSize.location:o,a=n.targetLocSize?n.targetLocSize.size:i;this.gl.uniform4f(r.location,o,i,s,a)}return!0}render(e){}createRenderCallback(e,n){var f;if(!this.bufferInfo)return()=>{};const r=this;let o;const i=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,s=i&&St(i.type),a=["index","locus"].includes(i==null?void 0:i.type)?-1:0,c=[0,0];o=d=>{if(s&&d.xIndex){const h=i.domain(),p=d.xIndex(h[0]+a,h[1],c),y=p[0],v=p[1]-y;v>0&&e(y,v)}else e(d.offset,d.count)};const l=this.rangeMap.get(void 0).count==0?n.facetId:void 0,u=this.rangeMap.get(l);return n.sampleFacetRenderingOptions?function(){u.count&&r.prepareSampleFacetRendering(n)&&o(u)}:function(){u.count&&o(u)}}setViewport(e,n,r,o){r=r.flatten();const i=this.gl,s=this.properties,a=.5,c=(s.xOffset??0)+a,l=(s.yOffset??0)+a;let u,f=r;if(s.clip!=="never"&&(s.clip||o)){let d=0,h=0,p;if(o){if(f=r.intersect(o).flatten(),!f.isDefined())return!1;p=[r.width/f.width,r.height/f.height],h=Math.max(0,r.y2-o.y2),d=Math.min(0,r.x-o.x)}else p=[1,1];const y=[f.x,e.height-f.y2,f.width,f.height].map(S=>S*n),v=y.map(S=>Math.floor(S)),b=y[0]-v[0],A=y[1]-v[1];i.viewport(...v),i.scissor(...v),i.enable(i.SCISSOR_TEST),u={uViewOffset:[(c+d+b/n)/f.width,-(l+h-A/n)/f.height],uViewScale:p}}else{if(!r.isDefined())return!1;i.viewport(0,0,e.width*n,e.height*n),i.disable(i.SCISSOR_TEST),u={uViewOffset:[(r.x+c)/e.width,(e.height-r.y-l-r.height)/e.height],uViewScale:[r.width/e.width,r.height/e.height]}}return Qs(this.viewUniformInfo,{...u,uViewportSize:[r.width,r.height],uDevicePixelRatio:n}),Em(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(e,n){}}Tn=new WeakMap;class bD extends Yn{constructor(){super([],JSON.stringify)}get(e){let n=super.get(e);return n===void 0&&(n={offset:0,count:0,xIndex:void 0},super.set(e,n)),n}migrateEntries(e){for(const[n,r]of this.entries())e.has(n)||(r.offset=0,r.count=0,r.xIndex=void 0);for(const[n,r]of e.entries())Object.assign(this.get(n),r)}}function ed(t,e){const n=ch(e);let r=t[e]&&{...t[e]},o=t[n]&&{...t[n]};if(!(ln(r)||ln(o))){if(r){if(!$t(t[e]))return;if(o){if(r.type!="quantitative"){const i=(1-(r.band||1))/2;r.band=i,o.band=-i}}else if(r.type=="quantitative")o={datum:0,contributesToScaleDomain:!1};else{o={...r};const i=(1-(r.band??1))/2;r.band=0+i,o.band=1-i}}else r={value:0},o={value:1};t[e]=r,t[n]=o}}function Gl(t,e){const n=m1(t);n&&(n.resolutionChannel=e)}function ob(t,e){t.stroke||(e?t.stroke={value:null}:(t.stroke=structuredClone(t.color),Gl(t.stroke,"color"))),ln(t.stroke)&&t.stroke.value===null&&(t.strokeWidth={value:0}),t.strokeOpacity||(t.strokeOpacity=structuredClone(t.opacity),Gl(t.strokeOpacity,"opacity"))}function sb(t,e){ln(t.fill)&&t.fill.value===null?t.fillOpacity={value:0}:t.fill||(t.fill=structuredClone(t.color),Gl(t.fill,"color"),!e&&!t.fillOpacity&&(t.fillOpacity={value:0})),t.fillOpacity||(e?(t.fillOpacity=structuredClone(t.opacity),Gl(t.fillOpacity,"opacity")):t.fillOpacity={value:0})}const wD=["none","diagonal","antiDiagonal","cross","vertical","horizontal","grid","dots","rings","ringsLarge"];class xD extends Aa{constructor(n){super(n);he(this,Hr);this.augmentDefaultProperties({x2:void 0,y2:void 0,filled:!0,color:"#4c78a8",opacity:1,strokeWidth:3,cornerRadius:0,minWidth:.5,minHeight:.5,minOpacity:1})}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}get opaque(){return zl(this,"opaque",()=>!pe(this,Hr,L0).call(this)&&!pe(this,Hr,O0).call(this)&&!this.properties.shadowOpacity&&ln(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return ed(n,"x"),ed(n,"y"),ob(n,this.properties.filled),sb(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];pe(this,Hr,L0).call(this)&&n.push("ROUNDED_CORNERS"),pe(this,Hr,O0).call(this)&&n.push("STROKED"),this.properties.shadowOpacity&&n.push("SHADOW"),this.createAndLinkShaders(o8,s8,[a8,...n.map(r=>"#define "+r)])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uMinWidth",n.minWidth),this.registerMarkUniformValue("uMinHeight",n.minHeight),this.registerMarkUniformValue("uMinOpacity",n.minOpacity),this.registerMarkUniformValue("uCornerRadiusTopRight",n.cornerRadiusTopRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomRight",n.cornerRadiusBottomRight??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusTopLeft",n.cornerRadiusTopLeft??n.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomLeft",n.cornerRadiusBottomLeft??n.cornerRadius??0),this.registerMarkUniformValue("uHatchPattern",n.hatch,r=>Math.max(0,wD.indexOf(r??"none"))),this.registerMarkUniformValue("uShadowBlur",n.shadowBlur??0),this.registerMarkUniformValue("uShadowOpacity",n.shadowOpacity??0),this.registerMarkUniformValue("uShadowOffsetX",n.shadowOffsetX??0),this.registerMarkUniformValue("uShadowOffsetY",n.shadowOffsetY??0),this.registerMarkUniformValue("uShadowColor",n.shadowColor??"black",Kh)}updateGraphicsData(){const n=this.unitView.getCollector();if(!n){console.debug("No collector");return}const r=n.getItemCount(),o=new sD({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});o.addBatches(n.facetBatches);const i=o.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.updateBufferInfo(i)}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>ui(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((o,i)=>{al(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,i,o)},n)}findDatumAt(n,r){n=Ft(n);const o=this.unitView.getCollector().facetBatches.get(n);if(!o)return;const i=this.encoders,s=i.x.scale.type;if(Mr(s)){const a=i.x.dataAccessor;return o.find(c=>r==a(c))}else{const a=i.x.dataAccessor,c=i.x2.dataAccessor;return o.find(l=>r>=a(l)&&r<c(l))}}}Hr=new WeakSet,L0=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},O0=function(){const n=this.encoding.strokeWidth;return!(ln(n)&&!n.value)||"condition"in n};const vD=`flat out float vRadius;flat out float vRadiusWithPadding;flat out lowp vec4 vFillColor;flat out lowp vec4 vStrokeColor;flat out lowp float vShape;flat out lowp float vHalfStrokeWidth;flat out mat2 vRotationMatrix;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TRIANGLE_RIGHT=5.0;const float TRIANGLE_DOWN=6.0;const float TRIANGLE_LEFT=7.0;const float TICK_UP=8.0;const float TICK_RIGHT=9.0;const float TICK_DOWN=10.0;const float TICK_LEFT=11.0;float computeSemanticThresholdFactor(){return getScaled_semanticScore()>=uSemanticThreshold ? 1.0 : 0.0;}vec2 getDxDy(){
|
|
436
|
+
return true;}return false;}`,q5="in highp vec4 vPickingColor;",Kc=Symbol("cacheMap");function Jc(n,e,t){let r=Oo(n).get(e);return r===void 0&&(r=t(e),Oo(n).set(e,r)),r}function nh(n,e){Oo(n).delete(e)}function $c(n,e){const t=Oo(n);for(const r of t.keys())r.startsWith(e)&&t.delete(r);Oo(n).delete(e)}function I1(n){n[Kc]=new Map}function Oo(n){return n[Kc]||I1(n),n[Kc]}function T1(...n){const e={get(t,r,i){for(const s of n){const a=s()[r];if(a!==void 0)return a}},has(t,r,i){for(const s of n){const o=s();if(r in o)return!0}return!1}};return new Proxy({},e)}function Y5(n){return me(n)||Ze(n)||Is(n)}class Qn extends Error{constructor(e,t){super(e),this.name="ViewError",this.view=t}}const X5="SAMPLE_FACET_UNIFORM",B1="SAMPLE_FACET_TEXTURE",k1="uSelectionTexture_";class No{constructor(e){R(this,Pt,[]);R(this,ns,[]);this.unitView=e,this.encoders=void 0,this.bufferInfo=void 0,this.bytesPerElement=new Map,this.programInfo=void 0,this.vertexArrayInfo=void 0,this.viewUniformInfo=void 0,this.markUniformInfo=void 0,this.markUniformsAltered=!0,this.selectionTextureOps=[],this.rangeMap=new Z5,this.defaultProperties={get clip(){return["x","y"].map(t=>e.getScaleResolution(t)).some(t=>(t==null?void 0:t.isZoomable())??!1)},xOffset:0,yOffset:0,minBufferSize:0},this.properties=T1(typeof this.unitView.spec.mark=="object"?()=>this.unitView.spec.mark:()=>({}),()=>this.defaultProperties)}augmentDefaultProperties(e){Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors(e))}get opaque(){return!1}get defaultHitTestMode(){return"intersects"}getAttributes(){throw new Error("Not implemented!")}getSupportedChannels(){return["sample","facetIndex","x","y","color","opacity","search","uniqueId"]}getDefaultEncoding(){const e={sample:void 0,uniqueId:void 0};return this.isPickingParticipant()&&(e.uniqueId={field:pt}),e}fixEncoding(e){return e}setupExprRefsNeedingGraphicsUpdate(e){const t=this.getSupportedChannels(),r={};for(const s of e){const o=this.properties[s];if(o&&Qe(o)){const a=this.unitView.paramMediator.createExpression(o.expr);a.addListener(()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()}),t.includes(s)||Object.defineProperty(r,s,{get(){return a()}})}}const i=this.properties;this.properties=T1(()=>r,()=>i)}get encoding(){return Jc(this,"encoding",()=>{var o;const e=this.getDefaultEncoding(),t=this.unitView.getEncoding(),r=a=>{const c=this.properties[a];return Y5(c)||Qe(c)?{value:c}:void 0},i=Object.fromEntries(this.getSupportedChannels().map(a=>[a,r(a)]).filter(a=>yt(a[1]))),s=this.fixEncoding({...e,...i,...t});for(const a of Object.keys(s))this.getSupportedChannels().includes(a)||delete s[a];return s.x&&((o=s.x).buildIndex??(o.buildIndex=!0)),s})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=A8(this.unitView,this.encoding)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return B1;if(this.unitView.getLayoutAncestors().find(e=>"samples"in e.spec))return X5}createAndLinkShaders(e,t,r=[]){const i=this.getAttributes(),s=this.encoders,o=this.getSampleFacetMode();o&&r.push(`#define ${o}`);const a="// view: "+this.unitView.getPathString();let c=[];const u=new Set,l=E1(s),f=[],d=Object.values(s).flatMap(S=>S.accessors).map(S=>S.predicate).filter(S=>S.param),h=new Map;for(const S of d){const C=S.param,v=this.unitView.paramMediator,T=v.findValue(C);if(!T)throw new Error(`Cannot infer selection type as the parameter "${C}" has no value. Please ensure that the parameter is properly defined!`);const P=Pi("uniqueId");if(Nm(T)){if(!h.has(C)){h.set(C,"single");const F=Zc+yo(C);f.push(" // Selection parameter"),f.push(` uniform highp uint ${F};`),E(this,Pt).push(()=>{this.registerMarkUniformValue(F,{expr:C},k=>k.uniqueId??0)}),c.push(`bool ${Po}${C}(bool empty) {
|
|
437
|
+
return ${Zc}${C} == ${P} || (empty && ${Zc}${C} == 0u);
|
|
438
|
+
}`)}}else if(of(T)){if(!h.has(C)){h.set(C,"multi");const F=k1+yo(C);c.push(`// Selection texture
|
|
439
|
+
uniform highp usampler2D ${F};`);const k=this.getContext().glHelper,L=k.selectionTextures;this.selectionTextureOps.push(()=>{const K=v.getValue(C),_=L.get(K);if(!_)throw new Error(`Bug: no selection texture found for "${C}"!`);Ar(this.programInfo,{[F]:_})});const U=k1+C;c.push(`bool ${Po}${C}(bool empty) {
|
|
440
|
+
return binarySearchTexture(${U}, ${P}) || (empty && isEmptyBinarySearchTexture(${U}));
|
|
441
|
+
}`),k.createSelectionTexture(T);const j=v.createExpression(C);j.addListener(()=>{const K=j(null);k.createSelectionTexture(K),this.getContext().animator.requestRender()})}}else if(Om(T)&&!h.has(C)){h.set(C,"interval");const F=[],k=[];for(const L of Object.keys(T.intervals)){if(!["x","y"].includes(L))continue;const U=Zc+yo(C)+`_${L}`,{attributeType:j}=Fi(this.unitView.getScaleResolution(L).scale,L);f.push(" // Selection parameter"),f.push(` uniform highp ${j}[2] ${U};`),E(this,Pt).push(()=>{this.registerMarkUniformValue(U,{expr:C},Ne=>Ne.intervals[L]??[1,0])});const K=Ne=>{for(const[ve,Kt]of l.entries())if(ve[1]&&Kt.includes(Ne))return Pi(Kt);return Pi(Ne)},_=K(L),te=U+"[0]",ce=U+"[1]",ie=lf(L);if(this.encoding[ie]){const Ne=K(ie),ve=this.defaultHitTestMode;if(ve=="endpoints")F.push(`((${te} <= ${_} && ${_} <= ${ce}) || (${te} <= ${Ne} && ${Ne} <= ${ce}))`);else if(ve=="encloses")F.push(`(${te} <= ${_} && ${Ne} <= ${ce})`);else if(ve=="intersects")F.push(`(${te} <= ${Ne} && ${_} <= ${ce})`);else throw new Qn(`Unsupported hit test mode "${ve}" for interval selection!`,this.unitView)}else F.push(`(${te} <= ${_} && ${_} <= ${ce})`);k.push(`${te} > ${ce}`)}c.push(`bool ${Po}${C}(bool empty) {
|
|
442
|
+
return ${F.join(" && ")} || (empty && (${k.join(" || ")}));
|
|
443
|
+
}`)}}const p=(S,C,v,T)=>{const P=C.channelDef;if(yt(P))if(Qe(P.value)){const{uniformName:F,uniformGlsl:k,accessorGlsl:L,adjuster:U}=I5(S,v);c.push(L),f.push(k),E(this,Pt).push(()=>{this.registerMarkUniformValue(F,P.value,U)})}else c.push(D5(S,v,P.value).accessorGlsl);else if(bo(P)){const{uniformName:F,uniformGlsl:k,accessorGlsl:L}=T5(S,T,v);f.push(k),c.push(L);const{largeHp:U,discrete:j}=Fi(T,S),K=j&&"domain"in T?_=>T.domain().indexOf(_):U?S1:_=>+_;E(this,Pt).push(()=>{this.registerMarkUniformValue(F,P.datum,K)})}else if(Nn(P)){const F=l.get([P.field,!0]),{attributeGlsl:k,accessorGlsl:L}=y1(S,T,v,F!=null&&F.includes(S)?F:void 0);u.add(k),c.push(L)}else if(xo(P)){const{attributeGlsl:F,accessorGlsl:k}=y1(S,T,v);u.add(F),c.push(k)}else throw new Qn(`Unsupported channel definition: ${JSON.stringify(P)}`,this.unitView)};for(const[S,C]of Object.entries(s)){if(!i.includes(S))continue;const{channelDef:v,accessors:T,scale:P}=C;for(let F=0;F<T.length;F++)p(S,T[F],F,P);if(P){const F=Vm(v),k=F&&F.resolutionChannel||S,L=Mc(k)?this.unitView.getScaleResolution(k):null,{glsl:U,domainUniform:j,domainUniformName:K,rangeUniform:_,rangeUniformName:te}=B5(S,P,v);c.push(U),f.push(j),f.push(_),_&&E(this,Pt).push(()=>{const ce=this.createMarkUniformSetter(te),ie=()=>ce(C1(P,S));L.addEventListener("range",ie),ie()}),j&&E(this,Pt).push(()=>{const ce=this.createMarkUniformSetter(K),ie=()=>{const Ne=jn(P.type)?[0,P.domain().length]:P.domain();ce(v1(P.type)?O5(Ne):Ne)};L.addEventListener("domain",ie),ie()})}c.push(k5(S,T))}const m=[...h.keys()].map(S=>`${Po}${S}(false)`);c.push(`bool isPointSelected() {
|
|
444
|
+
`+(this.encoders.uniqueId&&m.length>0?` return ${m.join(" || ")};`:" return false;")+`
|
|
445
|
+
}`);const g=`precision highp float;
|
|
446
|
+
precision highp int;`,y=S=>S.replace("#pragma markUniforms",f.join(`
|
|
447
|
+
`));r=r.map(y),e=y(e),t=y(t);const x=[g,a,...r,D1,j5,[...u].join(`
|
|
448
|
+
`),...c,Q5,W5,e],A=[g,a,...r,D1,q5,t],w=this.gl;this.programStatus=d5(w,this.glHelper.compileShader(w.VERTEX_SHADER,x),this.glHelper.compileShader(w.FRAGMENT_SHADER,A))}finalizeGraphicsInitialization(){const e=this.programStatus.getProgramErrors();if(e){e.detail&&console.warn(e.detail);const t=new Error("Cannot create shader program: "+e.message);throw t.view=this.unitView,t}this.programInfo=pC(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=qp(this.gl,this.programInfo,"View"),this.markUniformInfo=qp(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),Ar(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const t of E(this,Pt))t();G(this,Pt,void 0)}createMarkUniformSetter(e){const t=this.markUniformInfo.setters[e];if(!t)throw new Error(`Uniform "${e}" not found int the Mark block!`);return r=>{t(r),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(e,t,r=i=>i){const i=this.createMarkUniformSetter(e),s=o=>{if(o==null)throw new Error(`Trying to set null/undefined value for uniform: ${e}${Qe(t)?`Expr: ${t.expr}`:""}`);i(o)};if(Qe(t)){const o=this.unitView.paramMediator.createExpression(t.expr),a=()=>s(r(o(null)));o.addListener(a),E(this,ns).push({expr:o,listener:a}),a()}else s(r(t))}deleteGraphicsData(){const e=this.glHelper;if(!e){this.vertexArrayInfo=void 0,this.bufferInfo=void 0;return}const t=e.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),t.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let r=0;r<8;r++)t.disableVertexAttribArray(r);Object.values(this.bufferInfo.attribs).forEach(r=>this.gl.deleteBuffer(r.buffer)),this.bufferInfo.indices&&this.gl.deleteBuffer(this.bufferInfo.indices),this.bufferInfo=void 0}}dispose(){for(const{expr:e,listener:t}of E(this,ns))e.removeListener(t);E(this,ns).length=0,this.deleteGraphicsData()}updateBufferInfo(e){if(this.gl.bindVertexArray(null),this.bufferInfo&&e.vertexCount<=this.bufferInfo.allocatedVertices)for(const[t,r]of Object.entries(e.arrays))r.data&&I3(this.gl,this.bufferInfo.attribs[t],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=k3(this.gl,e.arrays,{numElements:e.vertexCount}),this.bufferInfo.allocatedVertices=e.allocatedVertices;for(const[t,r]of Object.entries(e.arrays))this.bytesPerElement.set(t,r.data.BYTES_PER_ELEMENT)}}get glHelper(){return this.getContext().glHelper}get gl(){return this.glHelper.gl}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}isReady(){return this.bufferInfo&&this.programInfo}isPickingParticipant(){if(this.properties.tooltip===null&&!this.unitView.paramMediator.hasPointSelections())return!1;for(const e of this.unitView.getLayoutAncestors())if(!e.isPickingSupported())return!1;return!0}bindOrSetMarkUniformBlock(){this.markUniformsAltered?(Xp(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):Yp(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(e){const t=this.glHelper,r=this.gl,i=[];i.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=MC(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[o,a]of Object.entries(this.encoders)){const c=t.rangeTextures.get(a.scale);c&&i.push(()=>Ar(this.programInfo,{[eh+o]:c}))}i.push(...this.selectionTextureOps),this.getSampleFacetMode()==B1&&i.push(()=>{let o;for(const a of this.unitView.getLayoutAncestors())if(o=a.getSampleFacetTexture(),o)break;if(!o)throw new Error("No facet texture available. This is bug.");Ar(this.programInfo,{uSampleFacetTexture:o})});const s=(e.picking??!1)&&this.isPickingParticipant();return i.push(()=>ao(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:s})),this.opaque||e.picking?i.push(()=>r.disable(r.BLEND)):i.push(()=>r.enable(r.BLEND)),i}prepareSampleFacetRendering(e){const t=e.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(t&&r){const i=t.locSize?t.locSize.location:0,s=t.locSize?t.locSize.size:1;if(i>1||i+s<0)return!1;const o=t.targetLocSize?t.targetLocSize.location:i,a=t.targetLocSize?t.targetLocSize.size:s;this.gl.uniform4f(r.location,i,s,o,a)}return!0}render(e){}createRenderCallback(e,t){var f;if(!this.bufferInfo)return()=>{};const r=this;let i;const s=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,o=s&&Oe(s.type),a=["index","locus"].includes(s==null?void 0:s.type)?-1:0,c=[0,0];i=d=>{if(o&&d.xIndex){const h=s.domain(),p=d.xIndex(h[0]+a,h[1],c),m=p[0],g=p[1]-m;g>0&&e(m,g)}else e(d.offset,d.count)};const u=this.rangeMap.get(void 0).count==0?t.facetId:void 0,l=this.rangeMap.get(u);return t.sampleFacetRenderingOptions?function(){l.count&&r.prepareSampleFacetRendering(t)&&i(l)}:function(){l.count&&i(l)}}setViewport(e,t,r,i){r=r.flatten();const s=this.gl,o=this.properties,a=.5,c=(o.xOffset??0)+a,u=(o.yOffset??0)+a;let l,f=r;if(o.clip!=="never"&&(o.clip||i)){let d=0,h=0,p;if(i){if(f=r.intersect(i).flatten(),!f.isDefined())return!1;p=[r.width/f.width,r.height/f.height],h=Math.max(0,r.y2-i.y2),d=Math.min(0,r.x-i.x)}else p=[1,1];const m=[f.x,e.height-f.y2,f.width,f.height].map(A=>A*t),g=m.map(A=>Math.floor(A)),y=m[0]-g[0],x=m[1]-g[1];s.viewport(...g),s.scissor(...g),s.enable(s.SCISSOR_TEST),l={uViewOffset:[(c+d+y/t)/f.width,-(u+h-x/t)/f.height],uViewScale:p}}else{if(!r.isDefined())return!1;s.viewport(0,0,e.width*t,e.height*t),s.disable(s.SCISSOR_TEST),l={uViewOffset:[(r.x+c)/e.width,(e.height-r.y-u-r.height)/e.height],uViewScale:[r.width/e.width,r.height/e.height]}}return ao(this.viewUniformInfo,{...l,uViewportSize:[r.width,r.height],uDevicePixelRatio:t}),Xp(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(e,t){}}Pt=new WeakMap,ns=new WeakMap;class Z5 extends tn{constructor(){super([],JSON.stringify)}get(e){let t=super.get(e);return t===void 0&&(t={offset:0,count:0,xIndex:void 0},super.set(e,t)),t}migrateEntries(e){for(const[t,r]of this.entries())e.has(t)||(r.offset=0,r.count=0,r.xIndex=void 0);for(const[t,r]of e.entries())Object.assign(this.get(t),r)}}function rh(n,e){const t=lf(e);let r=n[e]&&{...n[e]},i=n[t]&&{...n[t]};if(!(yt(r)||yt(i))){if(r){if(!lt(n[e]))return;if(i){if(r.type!="quantitative"){const s=(1-(r.band||1))/2;r.band=s,i.band=-s}}else if(r.type=="quantitative")i={datum:0,contributesToScaleDomain:!1};else{i={...r};const s=(1-(r.band??1))/2;r.band=0+s,i.band=1-s}}else r={value:0},i={value:1};n[e]=r,n[t]=i}}function eu(n,e){const t=Vm(n);t&&(t.resolutionChannel=e)}function F1(n,e){n.stroke||(e?n.stroke={value:null}:(n.stroke=structuredClone(n.color),eu(n.stroke,"color"))),yt(n.stroke)&&n.stroke.value===null&&(n.strokeWidth={value:0}),n.strokeOpacity||(n.strokeOpacity=structuredClone(n.opacity),eu(n.strokeOpacity,"opacity"))}function P1(n,e){yt(n.fill)&&n.fill.value===null?n.fillOpacity={value:0}:n.fill||(n.fill=structuredClone(n.color),eu(n.fill,"color"),!e&&!n.fillOpacity&&(n.fillOpacity={value:0})),n.fillOpacity||(e?(n.fillOpacity=structuredClone(n.opacity),eu(n.fillOpacity,"opacity")):n.fillOpacity={value:0})}const K5=["none","diagonal","antiDiagonal","cross","vertical","horizontal","grid","dots","rings","ringsLarge"];class J5 extends No{constructor(t){super(t);R(this,Jn);this.augmentDefaultProperties({x2:void 0,y2:void 0,filled:!0,color:"#4c78a8",opacity:1,strokeWidth:3,cornerRadius:0,minWidth:.5,minHeight:.5,minOpacity:1})}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}get opaque(){return Jc(this,"opaque",()=>!O(this,Jn,ad).call(this)&&!O(this,Jn,cd).call(this)&&!this.properties.shadowOpacity&&yt(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(t){return rh(t,"x"),rh(t,"y"),F1(t,this.properties.filled),P1(t,this.properties.filled),delete t.color,delete t.opacity,t}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const t=[];O(this,Jn,ad).call(this)&&t.push("ROUNDED_CORNERS"),O(this,Jn,cd).call(this)&&t.push("STROKED"),this.properties.shadowOpacity&&t.push("SHADOW"),this.createAndLinkShaders(zC,UC,[GC,...t.map(r=>"#define "+r)])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uMinWidth",t.minWidth),this.registerMarkUniformValue("uMinHeight",t.minHeight),this.registerMarkUniformValue("uMinOpacity",t.minOpacity),this.registerMarkUniformValue("uCornerRadiusTopRight",t.cornerRadiusTopRight??t.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomRight",t.cornerRadiusBottomRight??t.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusTopLeft",t.cornerRadiusTopLeft??t.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomLeft",t.cornerRadiusBottomLeft??t.cornerRadius??0),this.registerMarkUniformValue("uHatchPattern",t.hatch,r=>Math.max(0,K5.indexOf(r??"none"))),this.registerMarkUniformValue("uShadowBlur",t.shadowBlur??0),this.registerMarkUniformValue("uShadowOpacity",t.shadowOpacity??0),this.registerMarkUniformValue("uShadowOffsetX",t.shadowOffsetX??0),this.registerMarkUniformValue("uShadowOffsetY",t.shadowOffsetY??0),this.registerMarkUniformValue("uShadowColor",t.shadowColor??"black",$f)}updateGraphicsData(){const t=this.unitView.getCollector();if(!t){console.debug("No collector");return}const r=t.getItemCount(),i=new U5({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});i.addBatches(t.facetBatches);const s=i.toArrays();this.rangeMap.migrateEntries(s.rangeMap),this.updateBufferInfo(s)}prepareRender(t){const r=super.prepareRender(t);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>wr(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(t){const r=this.gl;return this.createRenderCallback((i,s)=>{Ac(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,s,i)},t)}findDatumAt(t,r){t=He(t);const i=this.unitView.getCollector().facetBatches.get(t);if(!i)return;const s=this.encoders,o=s.x.scale.type;if(jn(o)){const a=s.x.dataAccessor;return i.find(c=>r==a(c))}else{const a=s.x.dataAccessor,c=s.x2.dataAccessor;return i.find(u=>r>=a(u)&&r<c(u))}}}Jn=new WeakSet,ad=function(){const t=this.properties;return t.cornerRadius||t.cornerRadiusBottomLeft||t.cornerRadiusBottomRight||t.cornerRadiusTopLeft||t.cornerRadiusTopRight},cd=function(){const t=this.encoding.strokeWidth;return!(yt(t)&&!t.value)||"condition"in t};const $5=`flat out float vRadius;flat out float vRadiusWithPadding;flat out lowp vec4 vFillColor;flat out lowp vec4 vStrokeColor;flat out lowp float vShape;flat out lowp float vHalfStrokeWidth;flat out mat2 vRotationMatrix;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TRIANGLE_RIGHT=5.0;const float TRIANGLE_DOWN=6.0;const float TRIANGLE_LEFT=7.0;const float TICK_UP=8.0;const float TICK_RIGHT=9.0;const float TICK_DOWN=10.0;const float TICK_LEFT=11.0;float computeSemanticThresholdFactor(){return getScaled_semanticScore()>=uSemanticThreshold ? 1.0 : 0.0;}vec2 getDxDy(){
|
|
449
449
|
#if defined(dx_DEFINED) || defined(dy_DEFINED)
|
|
450
450
|
return vec2(getScaled_dx(),getScaled_dy())/uViewportSize;
|
|
451
451
|
#else
|
|
452
452
|
return vec2(0.0,0.0);
|
|
453
453
|
#endif
|
|
454
|
-
}void main(void){float shapeAngle=0.0;float semanticThresholdFactor=isPointSelected()? 1.0: computeSemanticThresholdFactor();if(semanticThresholdFactor<=0.0){gl_PointSize=0.0;gl_Position=vec4(100.0,0.0,0.0,0.0);return;}float size=getScaled_size();vec2 pos=vec2(getScaled_x(),getScaled_y())+getDxDy();gl_Position=unitToNdc(applySampleFacet(pos));float strokeWidth=getScaled_strokeWidth();float diameter=sqrt(size)*uScaleFactor*semanticThresholdFactor;float opacity=uViewOpacity;if(strokeWidth<=0.0||uInwardStroke){float minDiameter=1.0/uDevicePixelRatio;if(diameter<minDiameter){opacity*=pow(diameter/minDiameter,2.5);diameter=minDiameter;}}float fillOpa=getScaled_fillOpacity()*opacity;float strokeOpa=getScaled_strokeOpacity()*opacity;vShape=getScaled_shape();bool circle=vShape==0.0;if(vShape>TICK_UP&&vShape<=TICK_LEFT){shapeAngle=(vShape-TICK_UP)*90.0;vShape=TICK_UP;}else if(vShape>TRIANGLE_UP&&vShape<=TRIANGLE_LEFT){shapeAngle=(vShape-TRIANGLE_UP)*90.0;vShape=TRIANGLE_UP;}float angleInDegrees=getScaled_angle();float angle=-(shapeAngle+angleInDegrees)*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);vRotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);float roomForRotation=circle ? 1.0 : sin(mod(angle,PI/2.0)+PI/4.0)/sin(PI/4.0);float aaPadding=1.0/uDevicePixelRatio;float rotationPadding=(diameter*roomForRotation)-diameter;float strokePadding=uInwardStroke ? 0.0 : strokeWidth*(circle ? 1.0 : sqrt(3.0));float padding=rotationPadding+strokePadding+aaPadding;gl_PointSize=max((diameter+padding),uPickingEnabled ? uMinPickingSize : 0.0)*uDevicePixelRatio;vRadius=diameter/2.0;vRadiusWithPadding=vRadius+padding/2.0;vHalfStrokeWidth=strokeWidth/2.0;vFillColor=vec4(getScaled_fill()*fillOpa,fillOpa);vStrokeColor=vec4(getScaled_stroke()*strokeOpa,strokeOpa);setupPicking();}`,
|
|
454
|
+
}void main(void){float shapeAngle=0.0;float semanticThresholdFactor=isPointSelected()? 1.0: computeSemanticThresholdFactor();if(semanticThresholdFactor<=0.0){gl_PointSize=0.0;gl_Position=vec4(100.0,0.0,0.0,0.0);return;}float size=getScaled_size();vec2 pos=vec2(getScaled_x(),getScaled_y())+getDxDy();gl_Position=unitToNdc(applySampleFacet(pos));float strokeWidth=getScaled_strokeWidth();float diameter=sqrt(size)*uScaleFactor*semanticThresholdFactor;float opacity=uViewOpacity;if(strokeWidth<=0.0||uInwardStroke){float minDiameter=1.0/uDevicePixelRatio;if(diameter<minDiameter){opacity*=pow(diameter/minDiameter,2.5);diameter=minDiameter;}}float fillOpa=getScaled_fillOpacity()*opacity;float strokeOpa=getScaled_strokeOpacity()*opacity;vShape=getScaled_shape();bool circle=vShape==0.0;if(vShape>TICK_UP&&vShape<=TICK_LEFT){shapeAngle=(vShape-TICK_UP)*90.0;vShape=TICK_UP;}else if(vShape>TRIANGLE_UP&&vShape<=TRIANGLE_LEFT){shapeAngle=(vShape-TRIANGLE_UP)*90.0;vShape=TRIANGLE_UP;}float angleInDegrees=getScaled_angle();float angle=-(shapeAngle+angleInDegrees)*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);vRotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);float roomForRotation=circle ? 1.0 : sin(mod(angle,PI/2.0)+PI/4.0)/sin(PI/4.0);float aaPadding=1.0/uDevicePixelRatio;float rotationPadding=(diameter*roomForRotation)-diameter;float strokePadding=uInwardStroke ? 0.0 : strokeWidth*(circle ? 1.0 : sqrt(3.0));float padding=rotationPadding+strokePadding+aaPadding;gl_PointSize=max((diameter+padding),uPickingEnabled ? uMinPickingSize : 0.0)*uDevicePixelRatio;vRadius=diameter/2.0;vRadiusWithPadding=vRadius+padding/2.0;vHalfStrokeWidth=strokeWidth/2.0;vFillColor=vec4(getScaled_fill()*fillOpa,fillOpa);vStrokeColor=vec4(getScaled_stroke()*strokeOpa,strokeOpa);setupPicking();}`,eD="const lowp vec4 white=vec4(1.0);const lowp vec4 black=vec4(0.0,0.0,0.0,1.0);flat in float vRadius;flat in float vRadiusWithPadding;flat in lowp vec4 vFillColor;flat in lowp vec4 vStrokeColor;flat in lowp float vShape;flat in lowp float vHalfStrokeWidth;flat in mat2 vRotationMatrix;out lowp vec4 fragColor;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TICK_UP=8.0;float circle(vec2 p,float r){return length(p)-r;}float square(vec2 p,float r){p=abs(p);return max(p.x,p.y)-r;}float tickUp(vec2 p,float r){float halfR=r*0.5;p.y+=halfR;p=abs(p);return max(p.x-r*0.15,p.y-halfR);}float equilateralTriangle(vec2 p,float r){p.y=-p.y;float k=sqrt(3.0);float kr=k*r;p.y-=kr/2.0;return max((abs(p.x)*k+p.y)/2.0,-p.y-kr);}float crossShape(vec2 p,float r){p=abs(p);vec2 b=vec2(0.4,1.0)*r;vec2 v=abs(p)-b.xy;vec2 h=abs(p)-b.yx;return min(max(v.x,v.y),max(h.x,h.y));}float diamond(vec2 p,float r){p=abs(p);return(max(abs(p.x-p.y),abs(p.x+p.y))-r)/sqrt(2.0);}void main(){float d;vec2 p=vRotationMatrix*(2.0*gl_PointCoord-1.0)*vRadiusWithPadding;float r=vRadius;if(vShape==CIRCLE){d=circle(p,r);}else if(vShape==SQUARE){d=square(p,r);}else if(vShape==CROSS){d=crossShape(p,r);}else if(vShape==DIAMOND){d=diamond(p,r);}else if(vShape==TRIANGLE_UP){d=equilateralTriangle(p,r);}else if(vShape==TICK_UP){d=tickUp(p,r);}else{d=0.0;}if(!uPickingEnabled){lowp vec4 fillColor=mix(vFillColor,white,-d*uGradientStrength/vRadius);fragColor=distanceToColor(d+(uInwardStroke ? vHalfStrokeWidth : 0.0),fillColor,vStrokeColor,vec4(0.0),vHalfStrokeWidth);}else if(d-vHalfStrokeWidth<=0.0){fragColor=vPickingColor;}else{discard;}}",tD=`layout(std140)uniform Mark{/***The stroke should only grow inwards,e.g,the diameter/outline is not affected by the stroke width.*Thus,a point that has a zero size has no visible stroke. This allows strokes to be used with*geometric zoom,etc.*/uniform bool uInwardStroke;uniform float uMinPickingSize;uniform mediump float uScaleFactor;uniform mediump float uZoomLevel;uniform highp float uSemanticThreshold;uniform mediump float uGradientStrength;
|
|
455
455
|
#pragma markUniforms
|
|
456
|
-
};`;class
|
|
456
|
+
};`;class M1 extends Te{constructor(e){super(e),this.params=e,this.k=e.size||500,this.reset()}reset(){super.reset(),this.reservoir=[],this.W=void 0,this.ingester=this._initialIngester}_initialIngester(e){this.reservoir.push(e),this.reservoir.length==this.k&&(this.W=Math.exp(Math.log(Math.random())/this.k),this.i=this.k,this.next=this.i,this.ingester=this._finalIngester,this._setNextStop())}_finalIngester(e){++this.i==this.next&&(this.reservoir[Math.floor(Math.random()*this.k)]=e,this.W*=Math.exp(Math.log(Math.random())/this.k),this._setNextStop())}_setNextStop(){this.next+=Math.floor(Math.log(Math.random())/Math.log(1-this.W))+1}handle(e){this.ingester(e)}complete(){for(const e of this.reservoir)this._propagate(e);super.complete()}}function nD(n,e,t){const r=new M1({type:"sample",size:n});for(const i of e)r.handle(t(i));return r.complete(),r.reservoir}const rD={};class iD extends No{constructor(t){super(t);R(this,Eu);R(this,rs,()=>0);this.augmentDefaultProperties({x:.5,y:.5,color:"#4c78a8",filled:!0,opacity:1,size:100,semanticScore:0,shape:"circle",strokeWidth:2,fillGradientStrength:0,dx:0,dy:0,angle:0,sampleFacetPadding:.1,semanticZoomFraction:.02,minPickingSize:2});const r=this.properties.semanticZoomFraction;if(r!=null)if(Qe(r)){const i=this.unitView.paramMediator.createExpression(r.expr);i.addListener(()=>this.getContext().animator.requestRender()),G(this,rs,i)}else G(this,rs,()=>r);"geometricZoomBound"in this.properties&&console.warn('geometricZoomBound is deprecated. Use something like the following instead: "size": { "expr": "min(0.5 * pow(zoomLevel, 2), 200)" }.')}getAttributes(){return["uniqueId","facetIndex","x","y","size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getDefaultEncoding(){return{...super.getDefaultEncoding(),...rD}}fixEncoding(t){return F1(t,this.properties.filled),P1(t,this.properties.filled),delete t.color,delete t.opacity,t}initializeData(){var r,i;super.initializeData();const t=(i=(r=this.encoders.semanticScore)==null?void 0:r.dataAccessor)==null?void 0:i.asNumberAccessor();t&&(this.sampledSemanticScores=Float32Array.from(nD(1e4,this.unitView.getCollector().getData(),t)),this.sampledSemanticScores.sort((s,o)=>s-o))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders($5,eD,[tD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const t=this.properties;this.registerMarkUniformValue("uInwardStroke",t.inwardStroke,r=>!!r),this.registerMarkUniformValue("uGradientStrength",t.fillGradientStrength),this.registerMarkUniformValue("uMinPickingSize",t.minPickingSize)}updateGraphicsData(){const t=this.unitView.getCollector();if(!t){console.debug("No collector");return}const r=t.getItemCount(),i=new H5({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(r,this.properties.minBufferSize||0)});i.addBatches(t.facetBatches);const s=i.toArrays();this.rangeMap.migrateEntries(s.rangeMap),this.updateBufferInfo(s)}getSemanticThreshold(){if(this.sampledSemanticScores){const t=Math.max(0,1-E(this,rs).call(this)*this.unitView.getZoomLevel());if(t<=0)return-1/0;if(t>=1)return 1/0;{const r=this.sampledSemanticScores;return l0(r,t)}}else return-1}prepareRender(t){const r=super.prepareRender(t);return r.push(()=>{ao(this.markUniformInfo,{uScaleFactor:O(this,Eu,xx).call(this),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>wr(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(t){const r=this.gl;return this.createRenderCallback((i,s)=>{s&&Ac(r,this.vertexArrayInfo,r.POINTS,s,i)},t)}}rs=new WeakMap,Eu=new WeakSet,xx=function(){const t=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/t),1/3)};const sD="const int BUTT=0;const int SQUARE=1;const int ROUND=2;in float pos;in float side;flat out vec4 vColor;flat out float vSize;out float vNormalLengthInPixels;out highp vec2 vPosInPixels;void main(void){float pixelSize=1.0/uDevicePixelRatio;float size=getScaled_size();float opacity=getScaled_opacity()*uViewOpacity;if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()));vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()));vec2 tangent=b-a;float offset=0.0;float relativeDiff=0.0;if(uMinLength>0.0||uStrokeCap!=BUTT){float len=length(tangent*uViewportSize);float diff=max(0.0,uMinLength-len);if(uStrokeCap!=BUTT){diff+=size;}relativeDiff=diff/len;offset=relativeDiff*(pos-0.5);}vec2 p=pos<1.0? a+tangent*(pos+offset): b+tangent*offset;float aaPadding=pixelSize;vec2 normal=normalize(vec2(-tangent.y,tangent.x)/uViewportSize);p+=normal*side*(size+aaPadding)/uViewportSize;gl_Position=unitToNdc(p);vColor=vec4(getScaled_color()*opacity,opacity);vSize=size;vNormalLengthInPixels=side*(size+aaPadding);vPosInPixels=vec2(pos,(1.0-pos))*(1.0+relativeDiff)*length(tangent*uViewportSize)-vec2(uStrokeCap!=BUTT ? size/2.0 : 0.0);setupPicking();}",oD="const int BUTT=0;const int SQUARE=1;const int ROUND=2;uniform sampler2D uDashTexture;flat in vec4 vColor;flat in float vSize;in vec2 vPosInPixels;in float vNormalLengthInPixels;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distanceFromEnd=-min(vPosInPixels[0],vPosInPixels[1]);float distance;if(distanceFromEnd>0.0&&uStrokeCap==ROUND){distance=length(vec2(distanceFromEnd,vNormalLengthInPixels));}else{distance=abs(vNormalLengthInPixels);}float opacity=clamp(((vSize/2.0-distance)*dpr),-0.5,0.5)+0.5;if(uDashTextureSize>0.0){float pos=(vPosInPixels[0]+uStrokeDashOffset)*dpr;float floored=floor(pos);vec2 texelPositions=(floored+vec2(0.5,1.5))/dpr/uDashTextureSize;opacity*=mix(texture(uDashTexture,vec2(texelPositions[0],0)).r,texture(uDashTexture,vec2(texelPositions[1],0)).r,clamp((pos-floored),0.0,1.0));}fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",aD=`layout(std140)uniform Mark{uniform mediump float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;uniform mediump float uStrokeDashOffset;
|
|
457
457
|
#pragma markUniforms
|
|
458
|
-
};`;class
|
|
458
|
+
};`;class cD extends No{constructor(e){super(e),this.dashTextureSize=0,this.augmentDefaultProperties({x2:void 0,y2:void 0,size:1,color:"black",opacity:1,minLength:0,strokeDash:null,strokeDashOffset:0,strokeCap:"butt"})}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(e){if(!(e.x&&e.y&&e.x2&&e.y2))if(e.x&&e.x2&&!e.y)e.y={value:.5},e.y2=e.y;else if(e.y&&e.y2&&!e.x)e.x={value:.5},e.x2=e.x;else if(e.x&&!e.y)e.y={value:0},e.y2={value:1},e.x2=e.x;else if(e.y&&!e.x)e.x={value:0},e.x2={value:1},e.y2=e.y;else if(e.x&&e.y&&e.y2)e.x2=e.x;else if(e.y&&e.x&&e.x2)e.y2=e.y;else if(e.y&&e.x)if(!e.x2&<(e.y)&&e.y.type=="quantitative")e.x2=e.x,e.y2={datum:0};else if(!e.y2&<(e.x)&&e.x.type=="quantitative")e.y2=e.y,e.x2={datum:0};else throw new Error("A bug!");else throw new Error("At a minimum, either the x or y channel must be defined in the rule mark's encoding: "+JSON.stringify(e));return e}async initializeGraphics(){await super.initializeGraphics();const e=this.gl,t=uD(this.properties.strokeDash);this.dashTexture=oo(e,{level:0,mag:e.NEAREST,min:e.NEAREST,internalFormat:e.R8,format:e.RED,src:t,height:1}),this.dashTextureSize=t.length,this.createAndLinkShaders(sD,oD,[aD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties;this.registerMarkUniformValue("uMinLength",e.minLength),this.registerMarkUniformValue("uStrokeCap",e.strokeCap??"butt",t=>["butt","square","round"].indexOf(t)),ao(this.markUniformInfo,{uDashTextureSize:+this.dashTextureSize}),this.markUniformsAltered=!0}updateGraphicsData(){const e=this.unitView.getCollector();if(!e){console.debug("No collector");return}const t=e.getItemCount(),r=new G5({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(t,this.properties.minBufferSize||0)});r.addBatches(e.facetBatches);const i=r.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.updateBufferInfo(i)}prepareRender(e){const t=super.prepareRender(e);return t.push(()=>this.bindOrSetMarkUniformBlock()),t.push(()=>Ar(this.programInfo,{uDashTexture:this.dashTexture})),t.push(()=>wr(this.gl,this.programInfo,this.vertexArrayInfo)),t}render(e){const t=this.gl;return this.createRenderCallback((r,i)=>Ac(t,this.vertexArrayInfo,t.TRIANGLE_STRIP,i,r),e)}}function uD(n){if(!n)return new Uint8Array(0);if(n.length==0||n.length%2||n.findIndex(s=>Math.round(s)!=s||s<1||s>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(n));const e=n.reduce((s,o)=>s+o),t=new Uint8Array(e);let r=!0,i=0;for(let s of n){for(;s;)t[i++]=r&&255||0,s--;r=!r}return t}const lD="flat out vec4 vColor;flat out float vSize;out float vNormalLengthInPixels;flat out float vGamma;const int SHAPE_ARC=0;const int SHAPE_DOME=1;const int SHAPE_DIAGONAL=2;const int SHAPE_LINE=3;const int ORIENT_VERTICAL=0;const int ORIENT_HORIZONTAL=1;float distanceFromLine(vec2 pointOnLine1,vec2 pointOnLine2,vec2 point){vec2 a=point-pointOnLine1;vec2 b=pointOnLine2-pointOnLine1;vec2 proj=dot(a,b)/dot(b,b)*b;return length(a-proj);}bool isInsideViewport(vec2 point,float marginFactor){vec2 margin=uViewportSize*vec2(marginFactor);return point.x>=-margin.x&&point.x<=uViewportSize.x+margin.x&&point.y>=-margin.y&&point.y<=uViewportSize.y+margin.y;}void main(void){float pixelSize=1.0/uDevicePixelRatio;float opacity=getScaled_opacity()*uViewOpacity;vec2 p1,p2,p3,p4;vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()))*uViewportSize;vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()))*uViewportSize;if(uShape<=SHAPE_DOME){if(uShape==SHAPE_DOME){vec2 height=vec2(0.0);if(uOrient==ORIENT_VERTICAL){p1=vec2(min(a.x,b.x),b.y);p4=vec2(max(a.x,b.x),b.y);height=vec2(0.0,a.y-b.y);if(uClampApex){if(p4.x>0.0){p1.x=max(p1.x,-p4.x);}if(p1.x<uViewportSize.x){p4.x=min(p4.x,2.0*uViewportSize.x-p1.x);}}}else{p1=vec2(b.x,min(a.y,b.y));p4=vec2(b.x,max(a.y,b.y));height=vec2(a.x-b.x,0.0);if(uClampApex){if(p4.y>0.0){p1.y=max(p1.y,-p4.y);}if(p1.y<uViewportSize.y){p4.y=min(p4.y,2.0*uViewportSize.y-p1.y);}}}vec2 controlOffset=height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}if(uShape==SHAPE_ARC){p1=a;p4=b;vec2 chordVector=p4-p1;vec2 unitChordVector=normalize(chordVector);vec2 chordNormal=vec2(-unitChordVector.y,unitChordVector.x);float chordLength=length(chordVector);if(chordLength>uMaxChordLength){if(isInsideViewport(p1,2.0)){chordLength=uMaxChordLength;p4=p1+unitChordVector*uMaxChordLength;}else if(isInsideViewport(p4,2.0)){chordLength=uMaxChordLength;p1=p4-unitChordVector*uMaxChordLength;}}float height=max(chordLength/2.0*uArcHeightFactor,uMinArcHeight);vec2 controlOffset=chordNormal*height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}}else if(uShape==SHAPE_DIAGONAL){if(uOrient==ORIENT_VERTICAL){p1=a;p2=vec2(a.x,(a.y+b.y)/2.0);p3=vec2(b.x,(a.y+b.y)/2.0);p4=b;}else{p1=a;p2=vec2((a.x+b.x)/2.0,a.y);p3=vec2((a.x+b.x)/2.0,b.y);p4=b;}}else if(uShape==SHAPE_LINE){p1=a;p2=(a+b)/2.0;p3=p2;p4=b;}vec2 strip=vec2(float(gl_VertexID/2)/float(uSegmentBreaks),float(gl_VertexID % 2)-0.5);float t=smoothstep(0.0,1.0,strip.x);vec2 C1=p4-3.0*p3+3.0*p2-p1;vec2 C2=3.0*p3-6.0*p2+3.0*p1;vec2 C3=3.0*p2-3.0*p1;vec2 C4=p1;vec2 p;if(t==0.0){p=p1;}else if(t==1.0){p=p4;}else{p=C1*t*t*t+C2*t*t+C3*t+C4;}vec2 tangent=normalize(3.0*C1*t*t+2.0*C2*t+C3);vec2 normal=vec2(-tangent.y,tangent.x);float size=getScaled_size();if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}float paddedSize=uPickingEnabled? max(size,uMinPickingSize): size+pixelSize;vNormalLengthInPixels=strip.y*paddedSize;if(uShape==SHAPE_ARC&&uArcFadingDistance[0]>0.0&&uArcFadingDistance[1]>0.0&&(!uNoFadingOnPointSelection||!isPointSelected())){float d=distanceFromLine(p1,p4,p);float distanceOpacity=smoothstep(uArcFadingDistance[1],uArcFadingDistance[0],d);opacity*=distanceOpacity;if(distanceOpacity<=0.0){vNormalLengthInPixels=0.0;}}p+=normal*vNormalLengthInPixels;gl_Position=pixelsToNdc(p);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vGamma=getGammaForColor(color);vSize=paddedSize;setupPicking();}",fD="flat in vec4 vColor;flat in float vSize;in float vNormalLengthInPixels;flat in float vGamma;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distance=abs(vNormalLengthInPixels);float opacity=clamp(((vSize/2.0-distance)*dpr),0.0,1.0);opacity=pow(opacity,vGamma);fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",hD=`layout(std140)uniform Mark{uniform float uArcHeightFactor;uniform float uMinArcHeight;uniform float uMinPickingSize;uniform int uShape;uniform int uOrient;uniform bool uClampApex;uniform float uMaxChordLength;uniform vec2 uArcFadingDistance;uniform bool uNoFadingOnPointSelection;uniform int uSegmentBreaks;
|
|
459
459
|
#pragma markUniforms
|
|
460
|
-
};`,
|
|
460
|
+
};`,dD=["arc","dome","diagonal","line"],pD=["vertical","horizontal"];class mD extends No{constructor(e){super(e),this.augmentDefaultProperties({x:0,x2:void 0,y:0,y2:void 0,size:1,color:"black",opacity:1,segments:101,arcHeightFactor:1,minArcHeight:1.5,minPickingSize:3,clampApex:!1,maxChordLength:5e4,arcFadingDistance:!1,noFadingOnPointSelection:!0,linkShape:"arc",orient:"vertical"}),this._baseInstanceExt=this.gl.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")}get defaultHitTestMode(){return"endpoints"}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","size","color","opacity"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size"]}fixEncoding(e){return e.x2||(lt(e.x)?e.x2={datum:0}:e.x2=e.x),e.y2||(lt(e.y)?e.y2={datum:0}:e.y2=e.y),e}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(lD,fD,[hD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties;this.registerMarkUniformValue("uArcFadingDistance",e.arcFadingDistance,t=>t||[0,0]),this.registerMarkUniformValue("uArcHeightFactor",e.arcHeightFactor),this.registerMarkUniformValue("uMinArcHeight",e.minArcHeight),this.registerMarkUniformValue("uMinPickingSize",e.minPickingSize),this.registerMarkUniformValue("uShape",e.linkShape,t=>dD.indexOf(t)),this.registerMarkUniformValue("uOrient",e.orient,t=>pD.indexOf(t)),this.registerMarkUniformValue("uClampApex",e.clampApex,t=>!!t),this.registerMarkUniformValue("uMaxChordLength",e.maxChordLength),this.registerMarkUniformValue("uSegmentBreaks",e.segments,t=>t),this.registerMarkUniformValue("uNoFadingOnPointSelection",e.noFadingOnPointSelection,t=>!!t)}updateGraphicsData(){const e=this.unitView.getCollector();if(!e){console.debug("No collector");return}const t=e.getItemCount(),r=new V5({encoders:this.encoders,attributes:this.getAttributes(),numItems:t});r.addBatches(e.facetBatches);const i=r.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.arrays=Object.fromEntries(Object.entries(i.arrays).map(([s,o])=>[s,{...o,data:void 0}])),this.updateBufferInfo(i)}prepareRender(e){const t=super.prepareRender(e);return t.push(()=>this.bindOrSetMarkUniformBlock()),this._baseInstanceExt?t.push(()=>wr(this.gl,this.programInfo,this.vertexArrayInfo)):t.push(()=>this.gl.bindVertexArray(null)),t}render(e){const t=this.gl,r=()=>(this.markUniformInfo.uniforms.uSegmentBreaks[0]+1)*2;return this._baseInstanceExt?this.createRenderCallback((i,s)=>{this._baseInstanceExt.drawArraysInstancedBaseInstanceWEBGL(t.TRIANGLE_STRIP,0,r(),s,i)},e):this.createRenderCallback((i,s)=>{for(const o of Object.entries(this.bufferInfo.attribs)){const[a,c]=o;c.buffer&&c.numComponents&&c.divisor&&(c.offset=i*this.arrays[a].numComponents*this.bytesPerElement.get(a))}wr(t,this.programInfo,this.bufferInfo),t.drawArraysInstanced(t.TRIANGLE_STRIP,0,r(),s)},e)}}const gD=`in mediump vec2 vertexCoord;in lowp vec2 textureCoord;in float width;out vec2 vTexCoord;out float vEdgeFadeOpacity;flat out vec4 vColor;flat out float vSlope;flat out float vGamma;struct RangeResult{float pos;float scale;};float minValue(vec4 v){return min(min(v.x,v.y),min(v.z,v.w));}float maxValue(vec4 v){return max(max(v.x,v.y),max(v.z,v.w));}/***All measures are in[0,1]*/RangeResult positionInsideRange(float a,float b,float width,float padding,int align,bool flush){float span=b-a;float paddedWidth=width+2.0*padding;if(a>1.0||b<0.0){return RangeResult(0.0,0.0);}float extra=max(0.0,span-paddedWidth);float pos;if(align==0){float centre=a+b;if(flush){float leftOver=max(0.0,paddedWidth-centre);centre+=min(leftOver,extra);float rightOver=max(0.0,paddedWidth+centre-2.0);centre-=min(rightOver,extra);}pos=centre/2.0;}else if(align<0){float edge=a;if(flush){float over=max(0.0,-edge);edge+=min(over,extra);}pos=edge+padding;}else{float edge=b;if(flush){float over=max(0.0,edge-1.0);edge-=min(over,extra);}pos=edge-padding;}float scale=clamp((span-padding)/paddedWidth,0.0,1.0);return RangeResult(pos,scale);}vec2 calculateRotatedDimensions(float width,mat2 rotationMatrix){vec2 a=abs(rotationMatrix*vec2(width/2.0,0.5));vec2 b=abs(rotationMatrix*vec2(width/2.0,-0.5));return vec2(max(a.x,b.x),max(a.y,b.y))*2.0;}ivec2 fixAlignForAngle(ivec2 align,float angleInDegrees){float a=mod(angleInDegrees+45.0,360.0);int x=align.x;int y=-align.y;if(a<90.0){return ivec2(x,y);}else if(a<180.0){return ivec2(y,-x);}else if(a<270.0){return ivec2(-x,y);}else{return ivec2(-y,x);}}void main(void){float opacity=getScaled_opacity()*uViewOpacity;vec2 size=vec2(getScaled_size());float x=getScaled_x();float y=getScaled_y();float scale=1.0;float angleInDegrees=getScaled_angle();float angle=-angleInDegrees*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);mat2 rotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);vec2 flushSize=calculateRotatedDimensions(width,rotationMatrix);
|
|
461
461
|
#if defined(x2_DEFINED) || defined(y2_DEFINED)
|
|
462
462
|
ivec2 align=fixAlignForAngle(uAlign,angleInDegrees);
|
|
463
463
|
#else
|
|
@@ -470,9 +470,9 @@ vec2 pos=applySampleFacet(vec2(x,y));
|
|
|
470
470
|
#ifdef y2_DEFINED
|
|
471
471
|
float y2=getScaled_y2();vec2 pos2=applySampleFacet(vec2(x,y2));if(uLogoLetter){size.y=(pos2.y-pos.y)*uViewportSize.y;pos.y+=(pos2.y-pos.y)/2.0;}else{RangeResult result=positionInsideRange(min(pos.y,pos2.y),max(pos.y,pos2.y),size.y*scale*flushSize.y/uViewportSize.y,uPaddingY/uViewportSize.y,align.y,uFlushY);pos.y=result.pos;scale*=result.scale;}
|
|
472
472
|
#endif
|
|
473
|
-
if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scaleFadeExtent[0]){gl_Position=vec4(0.0);return;}size*=scale;opacity*=linearstep(scaleFadeExtent[0],scaleFadeExtent[1],scale);}else if(scale<1.0){gl_Position=vec4(0.0);return;}}vec2 charPos=rotationMatrix*(vertexCoord*size+uD);vec2 unitPos=pos+charPos/uViewportSize;gl_Position=unitToNdc(unitPos);vSlope=max(1.0,min(size.x,size.y)/uSdfNumerator*uDevicePixelRatio);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vGamma=getGammaForColor(color);vTexCoord=textureCoord;if(maxValue(uViewportEdgeFadeDistance)>-pow(10.0,10.0)){vEdgeFadeOpacity=minValue(((vec4(1.0,1.0,0.0,0.0)+vec4(-1.0,-1.0,1.0,1.0)*unitPos.yxyx)*uViewportSize.yxyx-uViewportEdgeFadeDistance)/uViewportEdgeFadeWidth);}else{vEdgeFadeOpacity=1.0;}setupPicking();}`,
|
|
473
|
+
if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scaleFadeExtent[0]){gl_Position=vec4(0.0);return;}size*=scale;opacity*=linearstep(scaleFadeExtent[0],scaleFadeExtent[1],scale);}else if(scale<1.0){gl_Position=vec4(0.0);return;}}vec2 charPos=rotationMatrix*(vertexCoord*size+uD);vec2 unitPos=pos+charPos/uViewportSize;gl_Position=unitToNdc(unitPos);vSlope=max(1.0,min(size.x,size.y)/uSdfNumerator*uDevicePixelRatio);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vGamma=getGammaForColor(color);vTexCoord=textureCoord;if(maxValue(uViewportEdgeFadeDistance)>-pow(10.0,10.0)){vEdgeFadeOpacity=minValue(((vec4(1.0,1.0,0.0,0.0)+vec4(-1.0,-1.0,1.0,1.0)*unitPos.yxyx)*uViewportSize.yxyx-uViewportEdgeFadeDistance)/uViewportEdgeFadeWidth);}else{vEdgeFadeOpacity=1.0;}setupPicking();}`,yD="uniform sampler2D uTexture;in vec2 vTexCoord;in float vEdgeFadeOpacity;flat in vec4 vColor;flat in float vSlope;flat in float vGamma;out lowp vec4 fragColor;float median(float r,float g,float b){return max(min(r,g),min(max(r,g),b));}float getDist(vec2 uv){vec3 c=texture(uTexture,uv).rgb;return 1.0-median(c.r,c.g,c.b);}/***Calculates the super-sampled distance to the edge.*This is used to avoid aliasing when rendering small text,*as mip-mapping cannot be used here.*The distance is averaged over a grid of n x n samples.*/float getSuperDist(vec2 uv){vec2 dx=dFdx(uv);vec2 dy=dFdy(uv);float n=2.0;float sum=0.0;for(float x=0.5;x<n;x++){for(float y=0.5;y<n;y++){sum+=getDist(uv+x/n*dx+y/n*dy);}}return sum/(n*n);}void main(){float sigDist=getSuperDist(vTexCoord);float slope=vSlope;if(uLogoLetter){slope=0.7/length(vec2(dFdy(sigDist),dFdx(sigDist)));}float opa=clamp((sigDist-0.5)*slope+0.5,0.0,1.0);opa*=clamp(vEdgeFadeOpacity,0.0,1.0);opa=pow(opa,vGamma);fragColor=vColor*opa;if(uPickingEnabled){fragColor=vPickingColor;}}",bD=`layout(std140)uniform Mark{uniform mediump float uSdfNumerator;uniform mediump vec2 uD;uniform mediump vec4 uViewportEdgeFadeWidth;uniform mediump vec4 uViewportEdgeFadeDistance;uniform bool uSqueeze;uniform bool uLogoLetter;uniform lowp ivec2 uAlign;uniform mediump float uPaddingX;uniform bool uFlushX;uniform mediump float uPaddingY;uniform bool uFlushY;
|
|
474
474
|
#pragma markUniforms
|
|
475
|
-
};`,
|
|
475
|
+
};`,xD={left:-1,center:0,right:1},AD={top:-1,middle:0,bottom:1,alphabetic:1};class wD extends No{constructor(e){super(e),this.augmentDefaultProperties({x:.5,y:.5,x2:void 0,y2:void 0,text:"",size:11,color:"black",opacity:1,font:void 0,fontStyle:void 0,fontWeight:void 0,align:"center",baseline:"middle",dx:0,dy:0,angle:0,fitToBand:!1,squeeze:!0,paddingX:0,paddingY:0,flushX:!0,flushY:!0,logoLetters:!1,viewportEdgeFadeWidthTop:0,viewportEdgeFadeWidthRight:0,viewportEdgeFadeWidthBottom:0,viewportEdgeFadeWidthLeft:0,viewportEdgeFadeDistanceTop:-1/0,viewportEdgeFadeDistanceRight:-1/0,viewportEdgeFadeDistanceBottom:-1/0,viewportEdgeFadeDistanceLeft:-1/0}),this.font=this.properties.font?e.context.fontManager.getFont(this.properties.font,this.properties.fontStyle,this.properties.fontWeight):e.context.fontManager.getDefaultFont(),this.setupExprRefsNeedingGraphicsUpdate(["text","fitToBand","logoLetters"])}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","color","size","opacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","size","text","angle"]}fixEncoding(e){for(const t of Dr)this.properties.fitToBand&&rh(e,t);return e}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(gD,yD,[bD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties,t=this.font.metrics.common.base*.35*(this.properties.logoLetters?.5:1);this.registerMarkUniformValue("uPaddingX",e.paddingX),this.registerMarkUniformValue("uPaddingY",e.paddingY),this.registerMarkUniformValue("uFlushX",e.flushX,r=>!!r),this.registerMarkUniformValue("uFlushY",e.flushY,r=>!!r),this.registerMarkUniformValue("uSqueeze",e.squeeze,r=>!!r),ao(this.markUniformInfo,{uAlign:[xD[e.align],AD[e.baseline]],uD:[e.dx,-e.dy],uLogoLetter:!!e.logoLetters,uSdfNumerator:t,uViewportEdgeFadeWidth:[e.viewportEdgeFadeWidthTop,e.viewportEdgeFadeWidthRight,e.viewportEdgeFadeWidthBottom,e.viewportEdgeFadeWidthLeft],uViewportEdgeFadeDistance:[e.viewportEdgeFadeDistanceTop,e.viewportEdgeFadeDistanceRight,e.viewportEdgeFadeDistanceBottom,e.viewportEdgeFadeDistanceLeft]})}updateGraphicsData(){const e=this.unitView.getCollector();if(!e){console.debug("No collector");return}const t=e.getData(),r=this.encoding,i=this.encoders.text;let s=0;const o="format"in r.text?Le(r.text.format):u=>u;for(const u of t){const l=o(i(u)),f=me(l)?l:l===null?"":""+l;s+=f&&f.length||0}const a=new _5({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(s,this.properties.minBufferSize||1024)});a.addBatches(e.facetBatches);const c=a.toArrays();this.rangeMap.migrateEntries(c.rangeMap),this.updateBufferInfo(c)}prepareRender(e){const t=super.prepareRender(e);return t.push(()=>{Ar(this.programInfo,{uTexture:this.font.texture})}),t.push(()=>this.bindOrSetMarkUniformBlock()),t.push(()=>wr(this.gl,this.programInfo,this.vertexArrayInfo)),t}render(e){const t=this.gl;return this.createRenderCallback((r,i)=>Ac(t,this.vertexArrayInfo,t.TRIANGLES,i,r),e)}}const R1=1;function ih(){let n=[0,1],e=[0,1],t=1,r=1,i=0,s=0,o=.5,a=0;const u=l=>(l+o-n[0])/t*r+e[0];return u.invert=l=>(l-e[0])/r*t+n[0]-o,u.domain=function(l){if(arguments.length){n=VA(l),t=n[1]-n[0];const f=n[0]===0&&n[0]===0;if(t<R1&&!f){t=R1;const d=(n[0]+n[1])/2;n[0]=d-t/2,n[1]=d+t/2}return u}else return n.slice()},u.range=function(l){return arguments.length?(e=[...l],r=e[1]-e[0],u):e},u.numberingOffset=function(l){return arguments.length?(a=l,u):a},u.padding=function(l){return arguments.length?(s=l,i=Math.min(1,l),u):i},u.paddingInner=function(l){return arguments.length?(i=Math.min(1,l),u):i},u.paddingOuter=function(l){return arguments.length?(s=l,u):s},u.align=function(l){return arguments.length?(o=Math.max(0,Math.min(1,l)),u):o},u.step=()=>r/t,u.bandwidth=()=>u.step(),u.ticks=l=>{const f=u.align(),d=u.numberingOffset();return Ga(n[0]-f+d,n[1]-f+d,Math.min(l,Math.ceil(t))).filter(Number.isInteger).map(h=>h-a)},u.tickFormat=(l,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const h=pr(n[0],n[1],Math.min(l,Math.ceil(t)))<1e5?Le(","):Le(".3s");return p=>h(p+a)},u.copy=()=>ih().domain(n).range(e).paddingInner(i).paddingOuter(s).numberingOffset(a),u}function vD(){const n=ih().numberingOffset(1);let e;n.genome=function(r){return arguments.length?(e=r,n):e},n.ticks=r=>{if(!e)return[];const i=n.domain(),s=n.numberingOffset(),[o,a]=[Math.max(i[0],0),Math.min(i[1],e.totalSize-1)].map(l=>e.toChromosome(l)),c=Math.max(1,pr(i[0],i[1],r)),u=[];for(let l=o.index;l<=a.index;l++){const f=e.chromosomes[l],d=Math.max(f.continuousStart+c,i[0]-(i[0]-f.continuousStart)%c),h=Math.min(f.continuousEnd-c/4,i[1]+1);for(let p=d;p<=h;p+=c){const m=p-s;m>=i[0]&&m<i[1]&&u.push(m)}}return u},n.tickFormat=(r,i)=>{if(!e)return;if(i)throw new Error("Locus scale's tickFormat does not support a specifier!");const s=n.domain(),o=s[1]-s[0],a=n.numberingOffset(),u=pr(s[0],s[1],Math.min(r,Math.ceil(o)))<1e6?Le(","):Le(".3s"),l=f=>f-e.toChromosome(f).continuousStart;return f=>u(l(f)+a)};const t=n.copy;return n.copy=()=>t().genome(e),n}function SD(n){return n.type=="locus"}function tu(n,e,t){if(t=t||[],n.some(o=>o===null)){if(n.every(o=>o===null))return null;throw console.warn(n),new Error("Cannot merge objects with nulls!")}const r={},i=(o,a)=>o===a||Mi(o)&&Mi(a)||Mi(o)&&a===!0||o===!0&&Ge(a)||Array.isArray(o)&&Array.isArray(a)&&o.length===a.length&&o.every((c,u)=>c===a[u]),s=o=>{for(let a in o){const c=o[a];if(!t.includes(a)&&c!==void 0)if(r[a]!==void 0&&!i(r[a],c))console.warn(`Conflicting property ${a} of ${e}: (${JSON.stringify(r[a])} and ${JSON.stringify(o[a])}). Using ${JSON.stringify(r[a])}.`);else{const u=r[a];if(Mi(u))Mi(c)&&(r[a]=tu([u,c],a));else if(Mi(c)){if(!(u===!0||u===void 0))throw new Error("Bug in merge! Target is: "+u);r[a]=tu([{},c],a)}else r[a]=c}}};for(const o of n)s(o);return r}function Mi(n){return Ge(n)&&!Array.isArray(n)}/*!
|
|
476
476
|
* Adapted from vega-encode:
|
|
477
477
|
* https://github.com/vega/vega/blob/master/packages/vega-encode/src/ticks.js
|
|
478
478
|
*
|
|
@@ -480,7 +480,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
|
|
|
480
480
|
* All rights reserved.
|
|
481
481
|
*
|
|
482
482
|
* BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
|
|
483
|
-
*/function
|
|
483
|
+
*/function O1(n,e,t){return Ze(e)&&t!=null&&(e=Math.min(e,~~(Ts(n.domain())/t)||1)),Ge(e)&&(e.step,e=e.interval),e}function N1(n,e,t){var r=n.range(),i=Math.floor(r[0]),s=Math.ceil(en(r));if(i>s&&(r=s,s=i,i=r),e=e.filter(function(a){return a=n(a),i<=a&&a<=s}),t>0&&e.length>1){for(var o=[e[0],en(e)];e.length>t&&e.length>=3;)e=e.filter(function(a,c){return!(c%2)});e.length<3&&(e=o)}return e}function ED(n,e){return n.bins?N1(n,CD(n.bins,e)):n.ticks?n.ticks(e):n.domain()}function CD(n,e){var t=n.length,r=~~(t/(e||t));return r<2?n.slice():n.filter(function(i,s){return!(s%r)})}function DD(n,e,t){var r=n.tickFormat?n.tickFormat(e,t):t?Le(t):String;if(u1(n.type)){var i=TD(t);r=n.bins?i:ID(r,i)}return r}function ID(n,e){return function(t){return n(t)?e(t):""}}function TD(n){var e=ai(n||",");if(e.precision==null){switch(e.precision=12,e.type){case"%":e.precision-=2;break;case"e":e.precision-=1;break}return BD(Le(e),Le(".1f")(1)[1])}else return Le(e)}function BD(n,e){return function(t){var r=n(t),i=r.indexOf(e),s,o;if(i<0)return r;for(s=kD(r,i),o=s<r.length?r.slice(s):"";--s>i;)if(r[s]!=="0"){++s;break}return r.slice(0,s)+o}}function kD(n,e){var t=n.lastIndexOf("e"),r;if(t>0)return t;for(t=n.length;--t>e;)if(r=n.charCodeAt(t),r>=48&&r<=57)return t+1}/*!
|
|
484
484
|
* Adapted from vega-encode:
|
|
485
485
|
* https://github.com/vega/vega/blob/master/packages/vega-encode/src/Scale.js
|
|
486
486
|
*
|
|
@@ -488,7 +488,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
|
|
|
488
488
|
* All rights reserved.
|
|
489
489
|
*
|
|
490
490
|
* BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
|
|
491
|
-
*/const
|
|
491
|
+
*/const FD="locus",PD="index";var MD=5;function RD(n){const e=n.type;return!n.bins&&(e===Bi||e===Do||e===Io)}function L1(n){return Oe(n)&&![qt,PD,FD].includes(n)}function z1(n){return n||{warn:(e,...t)=>console.warn(e,...t)}}var OD=iA(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma","zoom","fp64","name"]);function U1(n,e,t){t=z1(t);for(const r in n)if(!OD[r]){if(r==="padding"&&L1(e.type))continue;Nt(e[r])?e[r](n[r]):t.warn("Unsupported scale property: "+r)}_D(e,n,VD(e,n,UD(e,n,t)))}function ND(n,e){const t=LD(n),r=le(t);if(!r)throw new Error("Unknown scale type: "+t);const i=r();return!n.domain&&Oe(i.type)&&(n.domain=[0,0]),U1(n,i,e),i}function LD(n){var e=n.type,t="",r;return e===qt?qt+"-"+Bi:(zD(n)&&(r=n.rawDomain?n.rawDomain.length:n.domain?n.domain.length+ +(n.domainMid!=null):0,t=r===2?qt+"-":r===3?ki+"-":""),(t+e||Bi).toLowerCase())}function zD(n){const e=n.type;return Oe(e)&&e!==t1&&e!==n1&&(n.scheme||n.range&&n.range.length&&n.range.every(me))}function UD(n,e,t){if(!n.domain)return 0;t=z1(t);var r=GD(n,e.domainRaw,t);if(r>-1)return r;var i=e.domain,s=n.type,o=e.zero||e.zero===void 0&&RD(n),a,c;return i?(L1(s)&&e.padding&&i[0]!==en(i)&&(i=HD(s,i,e.range,e.padding,e.exponent,e.constant)),(o||e.domainMin!=null||e.domainMax!=null||e.domainMid!=null)&&(a=(i=i.slice()).length-1||1,o&&(i[0]>0&&(i[0]=0),i[a]<0&&(i[a]=0)),e.domainMin!=null&&(i[0]=e.domainMin),e.domainMax!=null&&(i[a]=e.domainMax),e.domainMid!=null&&(c=e.domainMid,(c<i[0]||c>i[a])&&t.warn("Scale domainMid exceeds domain min or max.",c),i.splice(a,0,c))),n.domain(G1(s,i,t)),s===Wf&&n.unknown(e.domainImplicit?hf:void 0),e.nice&&n.nice&&n.nice(e.nice!==!0&&O1(n,e.nice)||null),i.length):0}function GD(n,e,t){return e?(n.domain(G1(n.type,e,t)),e.length):-1}function HD(n,e,t,r,i,s){t??(t=[0,1]);var o=Math.abs(en(t)-t[0]),a=o/(o-2*r),c=n===_n?kd(e,null,a):n===Io?Nu(e,null,a,.5):n===Do?Nu(e,null,a,i||1):n===Wc?jx(e,null,a,s||1):Bd(e,null,a);return e=e.slice(),e[0]=c[0],e[e.length-1]=c[1],e}function G1(n,e,t){if(u1(n)){var r=Math.abs(e.reduce(function(i,s){return i+(s<0?-1:s>0?1:0)},0));r!==e.length&&t.warn("Log scale domain includes zero: "+Lu(e))}return e}function VD(n,e,t){let r=e.bins;if(r&&!Ue(r)){const i=(r.start==null||r.stop==null)&&n.domain(),s=r.start==null?i[0]:r.start,o=r.stop==null?en(i):r.stop,a=r.step;a||Ct("Scale bins parameter missing step property."),r=Us(s,o+a,a)}return r?n.bins=r:n.bins&&delete n.bins,n.type===Yf&&(r?!e.domain&&!e.domainRaw&&(n.domain(r),t=r.length):n.bins=n.domain()),t}function _D(n,e,t){var r=n.type,i=e.round||!1,s=e.range;if(e.rangeStep!=null)s=jD(r,e,t);else if(e.scheme&&(s=QD(r,e,t),Nt(s))){if(n.interpolator)return n.interpolator(s);Ct(`Scale type ${r} does not support interpolating color schemes.`)}if(s&&Yc(r))return n.interpolator(Xc(sh(s,e.reverse),e.interpolate,e.interpolateGamma));s&&e.interpolate&&n.interpolate?n.interpolate(l1(e.interpolate,e.interpolateGamma)):Nt(n.round)?n.round(i):Nt(n.rangeRound)&&n.interpolate(i?Eo:Hn),s&&n.range(sh(s,e.reverse))}function jD(n,e,t){n!==s1&&n!==qf&&Ct("Only band and point scales support rangeStep.");var r=(e.paddingOuter!=null?e.paddingOuter:e.padding)||0,i=n===qf?1:(e.paddingInner!=null?e.paddingInner:e.padding)||0;return[0,e.rangeStep*jf(t,i,r)]}function QD(n,e,t){var r=e.schemeExtent,i,s;return Ue(e.scheme)?s=Xc(e.scheme,e.interpolate,e.interpolateGamma):(i=e.scheme.toLowerCase(),s=Zf(i),s||Ct(`Unrecognized scheme name: ${e.scheme}`)),t=n===i1?t+1:n===Yf?t-1:n===Qf||n===r1?+e.schemeCount||MD:t,Yc(n)?H1(s,r,e.reverse):Nt(s)?a5(H1(s,r),t):n===Wf?s:s.slice(0,t)}function H1(n,e,t){return Nt(n)&&(e||t)?o5(n,sh(e||[0,1],t)):n}function sh(n,e){return e?n.slice().reverse():n}const V1=Le(",d");function WD(n,e){return n.chrom+":"+V1(Math.floor(n.pos+1))+"-"+(n.chrom!=e.chrom?e.chrom+":":"")+V1(Math.ceil(e.pos))}const _1={dm6:`chr3R 32079331
|
|
492
492
|
chr3L 28110227
|
|
493
493
|
chr2R 25286936
|
|
494
494
|
chrX 23542271
|
|
@@ -609,12 +609,12 @@ chr18 90702639
|
|
|
609
609
|
chr19 61431566
|
|
610
610
|
chrX 171031299
|
|
611
611
|
chrY 91744698
|
|
612
|
-
chrM 16299`};function
|
|
613
|
-
`).map(e=>{const n=e.split(" ");return{name:n[0],size:parseInt(n[1])}})}const mB=/^([A-Za-z]+:)?\/\//;function Si(t,e){if(e&&mB.test(e))return e;const n=typeof t=="function"?t():t;if(!n)return e;if(!e)return n;if(/[#?]/.test(n))throw new Error(`Cannot append to a url with query or hash. Append: ${e}, base: ${n}`);return bb(n)+e}function bb(t){const e=t.replace(/[^/]*$/,"");return e===""?void 0:e.endsWith("://")?t+"/":e}class yB{constructor(e){if(this.config={name:"custom",...e},"baseUrl"in e)throw new Error("The `baseUrl` property in genome config has been removed in GenomeSpy v0.52.0. Use `url` instead. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.");if(!rd(e))throw new Error("Not a genome configuration: "+JSON.stringify(e));if(this.chromosomes=[],this.cumulativeChromPositions=new Map,this.chromosomesByName=new Map,this.startByIndex=[],this.totalSize=0,xb(this.config))this.setChromSizes(this.config.contigs);else if(!id(this.config)){const n=gB(this.config.name);if(n)this.setChromSizes(n);else throw new Error(`Unknown genome: ${this.config.name}. Please provide contigs or a URL. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.`)}}get name(){return this.config.name}async load(e){if(id(this.config))try{const n=Si(e,this.config.url),r=await fetch(n);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);this.setChromSizes(bB(await r.text()))}catch(n){throw new Error(`Could not load chrom sizes: ${this.config.url}. Reason: ${n.message}`)}}hasChrPrefix(){return this.chromosomes.some(e=>e.name.startsWith("chr"))}setChromSizes(e){let n=0;this.startByIndex=[0];for(let r=0;r<e.length;r++){this.startByIndex.push(n);const o=e[r].size,i={...e[r],continuousStart:n,continuousEnd:n+o,continuousInterval:[n,n+o],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(i);const s=i.name.replace(/^chr/i,"");for(const a of["chr"+s,"CHR"+s,"Chr"+s,i.number,""+i.number,s,i.name])this.cumulativeChromPositions.set(a,n),this.chromosomesByName.set(a,i);n+=i.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(e,n){let r=this.cumulativeChromPositions.get(e);if(r===void 0)throw new Error("Unknown chromosome/contig: "+e);return r+ +n}toChromosome(e){if(e>this.totalSize)return;e=Math.floor(e);const n=mr(this.startByIndex,e)-1;if(n>0&&n<=this.chromosomes.length)return this.chromosomes[n-1]}toChromosomal(e){const n=this.toChromosome(e);if(n)return{chrom:n.name,pos:Math.floor(e)-n.continuousStart}}getChromosome(e){return this.chromosomesByName.get(e)}formatInterval(e){return pB(...this.toChromosomalInterval(e))}toChromosomalInterval(e){const n=this.toChromosomal(e[0]+.5),r=this.toChromosomal(e[1]-.5);return r.pos+=1,[n,r]}toContinuousInterval(e){var o;let[n,r]=e;return r||(r=n),[this.toContinuous(n.chrom,n.pos??0),this.toContinuous(r.chrom,r.pos??((o=this.chromosomesByName.get(r.chrom))==null?void 0:o.size))]}toDiscreteChromosomeIntervals(e){const n=e[0],r=e[1],o=[];if(n.chrom===r.chrom)o.push({chrom:n.chrom,startPos:n.pos,endPos:r.pos});else{const i=this.chromosomes.findIndex(a=>a.name===n.chrom),s=this.chromosomes.findIndex(a=>a.name===r.chrom);o.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[i].size});for(let a=i+1;a<s;a++)o.push({chrom:this.chromosomes[a].name,startPos:0,endPos:this.chromosomes[a].size});o.push({chrom:r.chrom,startPos:0,endPos:r.pos})}return o}continuousToDiscreteChromosomeIntervals(e){return this.toDiscreteChromosomeIntervals([this.toChromosomal(e[0]),this.toChromosomal(e[1])])}parseInterval(e){const n=e.match(/^(chr[0-9A-Z]+)(?::([0-9,]+)(?:-(?:(chr[0-9A-Z]+):)?([0-9,]+))?)?$/);if(n){const r=n[1];if(n.slice(2).every(a=>a===void 0)){const a=this.getChromosome(r);return a?[a.continuousStart,a.continuousEnd]:void 0}const o=n[3]||r,i=parseInt(n[2].replace(/,/g,"")),s=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):i;return[this.toContinuous(r,i-1),this.toContinuous(o,s)]}}}function bB(t){return ZA(t).map(([e,n])=>({name:e,size:parseInt(n)}))}function wb(t){return Rt(t)&&"chrom"in t}function wB(t){return t.every(wb)}function rd(t){return Rt(t)&&("name"in t||id(t)||xb(t))}function id(t){return rd(t)&&"url"in t}function xb(t){return rd(t)&&"contigs"in t}class Ea extends Array{constructor(){super(),this.type=void 0}extend(e){return this}extendAll(e){if(e instanceof Ea&&e.type!=this.type)throw new Error(`Cannot combine different types of domains: ${this.type} and ${e.type}`);for(const n of e)this.extend(n);return this}extendAllWithAccessor(e,n){for(const r of e)this.extend(n(r));return this}}class od extends Ea{constructor(){super(),this.type="quantitative"}extend(e){return e==null||Number.isNaN(e)?this:(e=+e,this.length?e<this[0]?this[0]=e:e>this[1]&&(this[1]=e):(this.push(e),this.push(e)),this)}}class vb extends Ea{constructor(){super(),this.type="ordinal",this.uniqueValues=new Set}extend(e){return e==null||Number.isNaN(e)?this:(this.uniqueValues.has(e)||(this.uniqueValues.add(e),this.push(e)),this)}}class Ab extends vb{constructor(){super(),this.type="nominal"}}class xB extends Ea{constructor(e){super();let n=0;for(let r=1;r<e.length;r++)n+=Math.sign(e[r]-e[r-1]);if(Math.abs(n)!=e.length-1)throw new Error("Piecewise domain must be strictly increasing or decreasing: "+JSON.stringify(e));e.forEach(r=>this.push(r))}extend(e){if(this.includes(e))return this;throw new Error("Piecewise domains are immutable and cannot be unioned!")}}const Eb={quantitative:od,index:od,locus:od,nominal:Ab,ordinal:vb};function Sb(t,e){if(t=="quantitative"&&vB(e)){const n=new xB(e);return n.type=t,n}else if(Eb[t]){const n=new Eb[t];return n.type=t,e&&n.extendAll(e),n}throw new Error("Unknown type: "+t)}function vB(t){return t&&t.length>0&&t.length!=2&&t.every(e=>typeof e=="number")}function AB(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function EB(t,e,n){return t*Math.pow(e/t,n)}Ze("index",td,["continuous"]),Ze("locus",jD,["continuous"]),Ze("null",Zh,[]);const Cb="quantitative",Ib="ordinal",Tb="nominal",Db="locus",SB="index";class CB{constructor(e){he(this,Pe);he(this,Qo,{domain:new Set,range:new Set});he(this,Kt);he(this,Li);he(this,qa,new Set);this.channel=e,this.members=[],this.type=null,this.name=void 0}get zoomExtent(){return(j(this,Kt)&&St(j(this,Kt).type)&&pe(this,Pe,Vv).call(this))??[-1/0,1/0]}addEventListener(e,n){j(this,Qo)[e].add(n)}removeEventListener(e,n){j(this,Qo)[e].delete(n)}addMember(e){var a;const{channel:n,channelDef:r}=e,o=r.type==null&&this.type;if(n!="sample"&&!r.type&&!ah(n)&&!o)throw new Error(`The "type" property must be defined in channel definition: "${n}": ${JSON.stringify(r)}. Must be one of: "quantitative", "ordinal", "nominal", "locus", "index"`);const i=n=="sample"?"nominal":r.type,s=(a=r==null?void 0:r.scale)==null?void 0:a.name;if(s){if(this.name!==void 0&&s!=this.name)throw new Error(`Shared scales have conflicting names: "${s}" vs. "${this.name}"!`);this.name=s}if(!o){if(!this.type)this.type=i;else if(i!==this.type&&!ah(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${i}. Use "resolve: independent" for channel ${this.channel}`)}this.members.push(e)}getDataDomain(){return this.members.map(e=>{var n;return(n=e.dataDomainSource)==null?void 0:n.call(e,e.channel,this.type)}).filter(e=>!!e).reduce((e,n)=>e.extendAll(n))}reconfigure(){const e=j(this,Kt);if(!e||e.type=="null")return;const n=pe(this,Pe,Gv).call(this),r=e.domain(),o=pe(this,Pe,G0).call(this,!0);if(db({...o,range:void 0},e),e.props=o,pe(this,Pe,H0).call(this),!j(this,Li)&&St(e.type)){const s=e.domain();gs(s)>0&&Ae(this,Li,s)}if(!n){Ae(this,Li,e.domain()),pe(this,Pe,dr).call(this,"domain");return}const i=e.domain();Uc(i,r)||(this.isZoomable()?e.domain(r):pe(this,Pe,Hi).call(this)?(e.domain(r),this.zoomTo(i,500)):pe(this,Pe,dr).call(this,"domain"))}get scale(){if(j(this,Kt))return j(this,Kt);const e=pe(this,Pe,G0).call(this),n=iB({...e,range:void 0});n.props=e,"unknown"in n&&n.unknown(null),Ae(this,Kt,n),pe(this,Pe,H0).call(this),qD(n)&&n.genome(this.getGenome());const r=n.range;if(r){const o=()=>pe(this,Pe,dr).call(this,"range");n.range=function(i){if(arguments.length)r(i),o();else return r()},o()}return n}getDomain(){return this.scale.domain()}getComplexDomain(){var e;return((e=this.getGenome())==null?void 0:e.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return pe(this,Pe,Hi).call(this)&&Uc(pe(this,Pe,Bu).call(this),this.getDomain())}isZoomable(){return pe(this,Pe,Hi).call(this)&&!!this.scale.props.zoom}zoom(e,n,r){if(!pe(this,Pe,Hi).call(this))return!1;const o=this.scale,i=o.domain();let s=[...i],a=o.invert(n);switch(o.props.reverse&&(r=-r),"align"in o&&(a+=o.align()),o.type){case"linear":case"index":case"locus":s=cA(s,r||0),s=rp(s,a,e);break;case"log":s=lA(s,r||0),s=ip(s,a,e);break;case"pow":case"sqrt":{const l=o;s=uA(s,r||0,l.exponent()),s=Mu(s,a,e,l.exponent());break}default:throw new Error("Zooming is not implemented for: "+o.type)}const c=this.zoomExtent;return s=hA(s,c[0],c[1]),[0,1].some(l=>s[l]!=i[l])?(o.domain(s),pe(this,Pe,dr).call(this,"domain"),!0):!1}async zoomTo(e,n=!1){if(ps(n)&&(n=n?700:0),!pe(this,Pe,Hi).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(e),o=j(this,Pe,z0).animator,i=this.scale,s=i.domain();if(n>0&&s.length==2){const a=s[1]-s[0],c=r[1]-r[0],l=s[0]+a/2,u=r[0]+c/2,f=s[0]==r[0],d=s[1]==r[1];await o.transition({duration:n,easingFunction:AB,onUpdate:h=>{const p=EB(a,c,h),y=a==c?h:(a-p)/(a-c),v=y*u+(1-y)*l,b=[f?s[0]:v-p/2,d?s[1]:v+p/2];i.domain(b),pe(this,Pe,dr).call(this,"domain")}}),i.domain(r),pe(this,Pe,dr).call(this,"domain")}else i.domain(r),o==null||o.requestRender(),pe(this,Pe,dr).call(this,"domain")}resetZoom(){if(!pe(this,Pe,Hi).call(this))throw new Error("Not a zoomable scale!");const e=this.getDomain(),n=pe(this,Pe,Bu).call(this);return[0,1].some(r=>n[r]!=e[r])?(j(this,Kt).domain(n),pe(this,Pe,dr).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?gs(this.zoomExtent)/gs(this.scale.domain()):1}getAxisLength(){if(this.channel!=="x"&&this.channel!=="y")throw new Error("Axis length is only defined for x and y channels!");const e=this.members.map(n=>{var r;return(r=n.view.coords)==null?void 0:r[this.channel==="x"?"width":"height"]}).filter(n=>n>0);return e.length?e.reduce((n,r)=>Math.min(n,r),1e4):0}getGenome(){var n;if(this.type!=="locus")return;const e=(n=j(this,Pe,z0).genomeStore)==null?void 0:n.getGenome();if(!e)throw new Error("No genome has been defined!");return e}invertToComplex(e){const n=this.scale;if("invert"in n){const r=n.invert(e);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(e){const n=this.getGenome();return n?n.toChromosomal(e):e}fromComplex(e){return wb(e)?this.getGenome().toContinuous(e.chrom,e.pos):e}fromComplexInterval(e){return this.type==="locus"&&wB(e)?this.getGenome().toContinuousInterval(e):e}}Qo=new WeakMap,Kt=new WeakMap,Li=new WeakMap,qa=new WeakMap,Pe=new WeakSet,N0=function(){return this.members[0].view},z0=function(){return j(this,Pe,N0).context},dr=function(e){for(const n of j(this,Qo)[e].values())n({type:e,scaleResolution:this})},U0=function(){return!!pe(this,Pe,V0).call(this)},Gv=function(){const e=j(this,Kt);if(!e)return!1;const n=e.domain();return St(e.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},Hv=function(){const e=this.members.map(n=>n.channelDef.scale).filter(n=>n!==void 0);return Hl(e,"scale",["domain"])},G0=function(e=!1){const n=pe(this,Pe,Hv).call(this);if(n===null||n.type=="null")return{type:"null"};const r={...pe(this,Pe,jv).call(this,this.type),...n};r.type||(r.type=IB(this.channel,this.type));const o=pe(this,Pe,Bu).call(this,e);return o&&o.length>0?r.domain=o:Mr(r.type)&&(r.domain=new Ab),!r.domain&&r.domainMid!==void 0&&(r.domain=[r.domainMin??0,r.domainMax??1]),this.channel=="y"&&Mr(r.type)&&r.reverse==null&&(r.reverse=!0),r.range&&r.scheme&&delete r.scheme,!("zoom"in r)&&["index","locus"].includes(r.type)&&(r.zoom=!0),TB(r,this.channel),r},H0=function(){const e=j(this,Kt).props,n=e.range;if(j(this,qa).forEach(o=>o.invalidate()),!n||!_t(n))return;const r=(o,i)=>i?o.slice().reverse():o;if(n.some(Ot)){let o;const i=()=>{j(this,Kt).range(r(o.map(s=>s()),e.reverse))};o=n.map(s=>{if(Ot(s)){const a=j(this,Pe,N0).paramMediator.createExpression(s.expr);return a.addListener(i),j(this,qa).add(a),()=>a(null)}else return()=>s}),i()}else j(this,Kt).range(r(n,e.reverse))},Bu=function(e=!1){return pe(this,Pe,V0).call(this)??(this.type==Db?this.getGenome().getExtent():e?this.getDataDomain():[])},V0=function(){const e=this.members.map(n=>n.channelDef).filter(n=>{var r;return(r=n.scale)==null?void 0:r.domain}).map(n=>Sb(n.type,this.fromComplexInterval(n.scale.domain)));if(e.length>0)return e.reduce((n,r)=>n.extendAll(r))},Hi=function(){const e=this.scale.type;return St(e)},Vv=function(){const e=this.scale.props,n=e.zoom;return DB(n)&&_t(n.extent)?this.fromComplexInterval(n.extent):n&&e.type=="locus"?this.getGenome().getExtent():j(this,Li)},jv=function(e){const n=this.channel,r={};return pe(this,Pe,U0).call(this)&&(r.zero=!1),sa(n)?r.nice=!pe(this,Pe,U0).call(this):Tr(n)?r.scheme=e==Tb?"tableau10":e==Ib?"blues":"viridis":wl(n)?r.range=n=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:n=="size"?r.range=[0,400]:n=="angle"&&(r.range=[0,360]),r};function IB(t,e){if(e==SB||e==Db){if(sh(t))return e;throw new Error(`${t} does not support ${e} data type. Only positional channels do.`)}const n={x:["band","band","linear"],y:["band","band","linear"],size:[void 0,"point","linear"],opacity:[void 0,"point","linear"],fillOpacity:[void 0,"point","linear"],strokeOpacity:[void 0,"point","linear"],color:["ordinal","ordinal","linear"],fill:["ordinal","ordinal","linear"],stroke:["ordinal","ordinal","linear"],strokeWidth:[void 0,void 0,"linear"],shape:["ordinal","ordinal",void 0],dx:[void 0,void 0,"null"],dy:[void 0,void 0,"null"],angle:[void 0,void 0,"linear"],sample:["null",void 0,void 0]},o=["sample"].includes(t)?"null":n[t]?n[t][[Tb,Ib,Cb].indexOf(e)]:e==Cb?"linear":"ordinal";if(o===void 0)throw new Error(`Channel "${t}" is not compatible with "${e}" data type. Use of a proper scale may be needed.`);return o}function TB(t,e){sa(e)&&t.type!=="ordinal"&&(t.range=[0,1]),e=="opacity"&&St(t.type)&&(t.clamp=!0)}function DB(t){return Rt(t)}function sd(t){const e=new Set;function n(r){for(const o of Object.values(r.resolutions.scale))e.add(o)}for(const r of Ft(t)){r.visit(n);for(const o of r.getDataAncestors()){if(!o.options.contributesToScaleDomain)break;n(o)}}e.forEach(r=>r.reconfigure())}function ad(...t){for(const e of t)if(e!==void 0)return e}class BB{constructor(e){this.channel=e,this.members=[]}get scaleResolution(){var e;return(e=Gs(this.members))==null?void 0:e.view.getScaleResolution(this.channel)}addMember(e){const{view:n}=e,r=n.getScaleResolution(this.channel);if(!r)throw new Error("Cannot find a scale resolution!");if(this.scaleResolution&&r!==this.scaleResolution)throw new Error(`Shared axes must have a shared scale! Channel: ${this.channel}, existing views: [${this.members.map(o=>o.view.getPathString()).join(", ")}], new view: ${n.getPathString()}.`);this.members.push(e)}getAxisProps(){return zl(this,"axisProps",()=>{const e=this.members.map(n=>{const r=n.view.mark.encoding[n.channel];return"axis"in r&&r.axis});return e.length>0&&e.some(n=>n===null)?null:Hl(e.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const e=i=>{var a;const s=V5(i.view,i.channel);if(!ln(s))return{member:i,explicitTitle:ad("axis"in s?(a=s.axis)==null?void 0:a.title:void 0,s.title),implicitTitle:ad(Ir(s)?s.field:void 0,oa(s)?s.expr:void 0)}},n=this.members.map(e),r=n.filter(i=>{var s;if(ah(i.member.channel)&&!i.explicitTitle){const a=mi(i.member.channel);return((s=n.find(c=>c.member.view==i.member.view&&c.member.channel==a))==null?void 0:s.explicitTitle)===void 0}return!0}),o=new Set(r.map(i=>ad(i.explicitTitle,i.implicitTitle)).filter(rt));return o.size?[...o].join(", "):null}}function Bb(t,e,{spacing:n,devicePixelRatio:r,offset:o,reverse:i}={}){n=n||0,o=o||0;let s=0,a=0;for(const p of t)s+=Vl(p.px)+(cd(p)?0:n),a+=Vl(p.grow);s-=n;const c=Math.max(0,e-s),l=r!==void 0?p=>Math.round(p*r)/r:p=>p,u=[],f=[],d=p=>{const y=u.length;if(!y)return;const v=(p?n:0)*(i?-1:1);h-=v;for(let b=0;b<y;b++)f.push({location:h+(b+1)/(y+1)*v,size:0});h+=v,u.length=0};let h=i?Math.max(e,s):0+o;if(t.length==1&&cd(t[0]))return[{location:h,size:0}];for(let p=0;p<t.length;p++){const y=t[p];if(cd(y))u.push(y);else{d(f.length>0);const v=Vl(y.px)+(a?Vl(y.grow)/a*c:0);i&&(h-=v),f.push({location:l(h),size:l(v)}),i?h-=n:h+=v+n}}return h+=i?n:-n,d(!1),f}function kB(t){let e=0,n=0;for(const r of t)e=Math.max(e,r.px??0),n=Math.max(n,r.grow??0);return{px:e,grow:n}}const R0=class R0{constructor(e,n){he(this,Wa);this.width=e,this.height=n}addPadding(e){return pe(this,Wa,j0).call(this,e.width,e.height)}subtractPadding(e){return pe(this,Wa,j0).call(this,-e.width,-e.height)}isGrowing(){return!!(this.width.grow||this.height.grow)}};Wa=new WeakSet,j0=function(e,n){return new R0({px:(this.width.px??0)+e,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Lr=R0;const Sa=Object.freeze({px:0,grow:0}),kb=new Lr(Sa,Sa);function cd(t){return!t.px&&!t.grow}function Vl(t){return t||0}function _B(t){return t&&(Ht(t.px)||Ht(t.grow))}function _b(t){if(Mb(t))throw new Error("parseSizeDef does not accept step-based sizes.");if(_B(t))return t;if(Ht(t))return{px:t,grow:0};if(t==="container")return{px:0,grow:1};if(!t)return{px:0,grow:1};throw new Error(`Invalid sizeDef: ${t}`)}class Nt{constructor(e,n,r,o){this.top=e||0,this.right=n||0,this.bottom=r||0,this.left=o||0}get width(){return this.left+this.right}get height(){return this.top+this.bottom}expand(e){return e<=0?this:new Nt(this.top+e,this.right+e,this.bottom+e,this.left+e)}add(e){return new Nt(this.top+e.top,this.right+e.right,this.bottom+e.bottom,this.left+e.left)}subtract(e){return new Nt(this.top-e.top,this.right-e.right,this.bottom-e.bottom,this.left-e.left)}union(e){return new Nt(Math.max(this.top,e.top),Math.max(this.right,e.right),Math.max(this.bottom,e.bottom),Math.max(this.left,e.left))}getHorizontal(){return new Nt(0,this.right,0,this.left)}getVertical(){return new Nt(this.top,0,this.bottom,0)}get horizontalTotal(){return this.left+this.right}get verticalTotal(){return this.top+this.bottom}static createFromConfig(e){return typeof e=="number"?this.createUniformPadding(e):e?this.createFromRecord(e):ld}static createFromRecord(e){return new Nt(e.top,e.right,e.bottom,e.left)}static zero(){return ld}static createUniformPadding(e){return new Nt(e,e,e,e)}}const ld=Nt.createUniformPadding(0);Object.freeze(ld);function Ca(t,e){return!e||/^(data:|([A-Za-z]+:)?\/\/)/.test(t)||t.startsWith("/")?t:(e.endsWith("/")||(e+="/"),e+t)}function RB(t){if(!t)return t;if(/[?#]/.test(t))throw new Error(`Invalid base URL: ${t} - cannot contain query or hash.`);return t.endsWith("/")?t:t+"/"}const FB="VISIT_SKIP",Ia="VISIT_STOP",Rb=t=>t;class Fb{constructor(e,n,r,o,i,s={}){he(this,qn);he(this,Zo,{});he(this,Xo,{});he(this,Ko,{});he(this,Ya);he(this,Qa);Gt(this,"opacityFunction",Rb);Gt(this,"facetCoords",new Yn([],JSON.stringify));var a;if(!e)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=r,this.dataParent=o,this.name=e.name||i,this.spec=e,this.resolutions={scale:{},axis:{}},tb(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...s},this.needsAxes={x:!1,y:!1},this.paramMediator=new M5(()=>{var c;return(c=this.dataParent)==null?void 0:c.paramMediator}),e.params)for(const c of e.params)this.paramMediator.registerParam(c);if(!((a=this.layoutParent)!=null&&a.options.layeredChildren)){const c=l=>this.paramMediator.findMediatorForParam(l)?void 0:this.paramMediator.allocateSetter(l,0);Ae(this,Qa,c("height")),Ae(this,Ya,c("width"))}}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>Nt.createFromConfig(this.spec.padding))}getOverhang(){return Nt.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Lr(pe(this,qn,pc).call(this,"width"),pe(this,qn,pc).call(this,"height")):kb)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return kb;const e=this.getSize();return new Lr(pe(this,qn,pc).call(this,"viewportWidth")??e.width,pe(this,qn,pc).call(this,"viewportHeight")??e.height)}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(e=>e.isConfiguredVisible())}getEffectiveOpacity(){var e;return this.opacityFunction(((e=this.layoutParent)==null?void 0:e.getEffectiveOpacity())??1)}getPathString(){return this.getLayoutAncestors().map(e=>e.name).reverse().join("/")}getLayoutAncestors(){return pe(this,qn,q0).call(this,"layoutParent")}getDataAncestors(){return pe(this,qn,q0).call(this,"dataParent")}handleBroadcast(e){for(const n of j(this,Zo)[e.type]||[])n(e)}_addBroadcastHandler(e,n){let r=j(this,Zo)[e];r||(r=[],j(this,Zo)[e]=r),r.push(n)}handleInteractionEvent(e,n,r){const o=r?j(this,Xo):j(this,Ko);for(const i of o[n.type]||[])i(e,n)}addInteractionEventListener(e,n,r){const o=r?j(this,Xo):j(this,Ko);let i=o[e];i||(i=[],o[e]=i),i.push(n)}removeInteractionEventListener(e,n,r){const o=r?j(this,Xo):j(this,Ko);let i=o==null?void 0:o[e];if(i){const s=i.indexOf(n);s>=0&&i.splice(s,1)}}visit(e){try{const n=e(this);if(e.postOrder&&e.postOrder(this),n!==Ia)return n}catch(n){throw n.view=this,n}}getDescendants(){const e=[];return this.visit(n=>{e.push(n)}),e}configureViewOpacity(){(!this.opacityFunction||this.opacityFunction===Rb)&&(this.opacityFunction=PB(this))}onBeforeRender(){}render(e,n,r={}){var o,i;r.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(r.facetId,r.clipRect?n.intersect(r.clipRect):n),(o=j(this,Ya))==null||o.call(this,n.width),(i=j(this,Qa))==null||i.call(this,n.height)}getEncoding(){const e=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...e,...n};for(const[o,i]of Object.entries(r))i===null&&delete r[o];return r}getFacetAccessor(e){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(e){var r;const n=this.getEncoding().sample;return Ir(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(e){const n=mi(e);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(e){const n=mi(e);return this.getDataAncestors().map(r=>r.resolutions.axis[n]).find(r=>r)}getConfiguredResolution(e,n){var r,o;return(o=(r=this.spec.resolve)==null?void 0:r[n])==null?void 0:o[e]}getConfiguredOrDefaultResolution(e,n){return this.getConfiguredResolution(e,n)??this.getConfiguredResolution("default",n)??this.getDefaultResolution(e,n)}getDefaultResolution(e,n){return"independent"}getBaseUrl(){return Si(()=>{var e;return(e=this.dataParent)==null?void 0:e.getBaseUrl()},RB(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const e=this.spec.title;if(e)return rt(e)?e:Ot(e.text)?this.paramMediator.evaluateAndGet(e.text.expr):e.text}_cache(e,n){return zl(this,e,n)}_invalidateCacheByPrefix(e,n="self"){switch(n){case"self":Ul(this,e);break;case"ancestors":for(const r of this.getLayoutAncestors())Ul(r,e);break;case"progeny":this.visit(r=>Ul(r,e));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(e){}}Zo=new WeakMap,Xo=new WeakMap,Ko=new WeakMap,Ya=new WeakMap,Qa=new WeakMap,qn=new WeakSet,pc=function(e){var o;let n=this.spec[e];const r=e=="viewportWidth"||e=="viewportHeight";if(Mb(n)){if(r)throw new Pr(`Cannot use step-based size with "${e}"!`,this);const i=n.step,s=(o=this.getScaleResolution(e=="width"?"x":"y"))==null?void 0:o.scale;if(s){let a=0;if(Mr(s.type))a=s.domain().length;else if(["locus","index"].includes(s.type)){const l=s.domain();a=Gs(l)-l[0]}else throw new Pr(`Cannot use step-based size with "${s.type}" scale!`,this);const c=s;return a=Hh(a,c.paddingInner(),c.paddingOuter()),{px:a*i,grow:0}}else throw new Pr("Cannot use 'step' size with missing scale!",this)}else return(n&&_b(n))??(r?void 0:{px:0,grow:1})},q0=function(e){const n=[];let r=this;do n.push(r),r=r[e];while(r);return n};function MB(t){return"unitsPerPixel"in t}function PB(t){const e="opacity"in t.spec?t.spec.opacity:void 0;if(e!==void 0){if(Ht(e))return n=>n*e;if(MB(e)){const n=i=>{var a;const s=(a=t.getScaleResolution(i))==null?void 0:a.scale;if(["linear","index","locus"].includes(s==null?void 0:s.type))return s},r=e.channel?n(e.channel):n("x")??n("y");if(!r)throw new Pr("Cannot find a resolved quantitative scale for dynamic opacity!",t);const o=Fh().domain(e.unitsPerPixel).range(e.values).clamp(!0);return i=>{const a=gs(r.domain())/1e3;return o(a)*i}}else if(Ot(e)){const n=t.paramMediator.createExpression(e.expr);return n.addListener(()=>t.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const Mb=t=>!!(t!=null&&t.step),LB={point:ID,rect:xD,rule:kD,link:OD,text:VD};class en extends Fb{constructor(n,r,o,i,s,a){super(n,r,o,i,s,a);he(this,Su);he(this,Za);this.spec=n;const c=LB[this.getMarkType()];if(c)this.mark=new c(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),Ae(this,Za,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(l=>{var u;return(u=this.getScaleResolution(l))==null?void 0:u.addEventListener("domain",()=>j(this,Za).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0},pe(this,Su,qv).call(this)}render(n,r,o={}){super.render(n,r,o),this.isConfiguredVisible()&&(n.pushView(this,r),n.renderMark(this.mark,o),n.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}getEncoding(){const n=super.getEncoding(),r=this.mark.getSupportedChannels();for(const o of Object.keys(n))r.includes(o)||delete n[o];return n}resolve(n){if(!n){this.resolve("scale"),this.resolve("axis");return}const r=this.mark.encoding;for(const[o,i]of Object.entries(r)){if(!i)continue;let s;if($t(i))s=i;else if(oh(i)){const l=i.condition;if(!Array.isArray(l)&&$t(l))s=l;else continue}else continue;const a=mi(s.resolutionChannel??o);if(!xl(a)||n=="axis"&&!sa(a))continue;let c=this;for(;(c.getConfiguredOrDefaultResolution(a,n)=="forced"||c.dataParent&&["shared","excluded","forced"].includes(c.dataParent.getConfiguredOrDefaultResolution(a,n)))&&c.getConfiguredOrDefaultResolution(a,n)!="excluded";)c=c.dataParent;if(n=="axis"&&sa(o)&&sh(a))c.resolutions[n][a]||(c.resolutions[n][a]=new BB(a)),c.resolutions[n][a].addMember({view:this,channel:o,channelDef:s});else if(n=="scale"&&xl(o)){if(!c.resolutions[n][a]){const u=new CB(a);c.resolutions[n][a]=u,u.addEventListener("range",f=>{var d;(d=this.context.glHelper)==null||d.createRangeTexture(f.scaleResolution,!0)})}const l=this.getLayoutAncestors().some(u=>!u.options.contributesToScaleDomain)||$t(s)&&s.contributesToScaleDomain===!1?void 0:this.extractDataDomain.bind(this);c.resolutions[n][a].addMember({view:this,channel:o,channelDef:s,dataDomainSource:l})}}}getDataAccessor(n){var r;return(r=this.mark.encoders[n])==null?void 0:r.dataAccessor}getFacetAccessor(n){const r=this.getDataAccessor("sample");return r||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}extractDataDomain(n,r){var i;let o=Sb(r);return(((i=this.mark.encoders[n])==null?void 0:i.accessors)??[]).filter(s=>s.scaleChannel).forEach(s=>{if(s.constant)o.extend(s({}));else{const a=this.getCollector();a!=null&&a.completed&&a.visitData(c=>o.extend(s(c)))}}),o}getZoomLevel(){const n=r=>{var o;return((o=this.getScaleResolution(r))==null?void 0:o.getZoomLevel())??1};return gi.map(n).reduce((r,o)=>r*o,1)}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0),n.target=this,!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return n=="x"?"shared":"independent"}}Za=new WeakMap,Su=new WeakSet,qv=function(){for(const[n,r]of this.paramMediator.paramConfigs){if(!("select"in r))continue;const o=yl(r.select),i=o.on,s=o.clear;if(bl(o)){let c=0;const l=this.paramMediator.getSetter(n),u=()=>{var p;const h=this.context.getCurrentHover();return((p=h==null?void 0:h.mark)==null?void 0:p.unitView)===this?h.datum:null},f=i.filter?o1(i.filter):()=>!0,d=(h,p)=>{if(!f(p.proxiedMouseEvent))return;const y=u(),v=y?y[sn]:0;let b;if(o.toggle)if(p.mouseEvent.shiftKey){if(y){const S=this.paramMediator.getValue(n);b=L5(S,{toggle:[y]})}}else b=rh(y?[y]:null);else v!=c&&(c=v,b=nh(y));b!==void 0&&l(b)};if(this.addInteractionEventListener(["mouseover","pointerover"].includes(i.type)?"mousemove":i.type,d),s){const h=s.filter?o1(s.filter):()=>!0,p=(y,v)=>{if(!h(v.proxiedMouseEvent))return;c=0;const b=o.toggle?rh():nh(null);l(b)};this.addInteractionEventListener(s.type,p)}}}};function*ud(t,e=[]){for(const[n,r]of t.entries())if(r instanceof Map)for(const o of ud(r,[...e,n]))yield o;else yield[[...e,n],r]}const Pb=2147483647,OB=Lb([Pb]);function Lb(t){let e=0;for(let n=0,r=t.length;n<r;n++)e=Math.max(e,t[n]);return Math.floor(Math.log2(e)/4)+1}function NB(t){const e=Lb(t);let n=Array.from({length:t.length},(i,s)=>s),r=new Array(t.length);const o=new Array(16);for(let i=0;i<e;i++){o.fill(0);const s=i*4,a=Math.pow(16,i),c=l=>{const u=t[n[l]];return i>=OB?u>Pb?Math.floor(u/a)%16:0:u>>s&15};for(let l=0;l<t.length;l++)o[c(l)]++;for(let l=1;l<16;l++)o[l]+=o[l-1];for(let l=t.length-1;l>=0;l--)r[--o[c(l)]]=n[l];[n,r]=[r,n]}return n}class Ob extends Wf{constructor(n){var r;super();he(this,tn);he(this,ar,[]);he(this,Xa,Qe(sn));he(this,Vr,[]);he(this,Oi);he(this,Jo);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=new Yn([],JSON.stringify),Ae(this,Jo,UB((r=this.params)==null?void 0:r.sort)),pe(this,tn,W0).call(this)}get behavior(){return qf}get label(){return"collect"}reset(){super.reset(),pe(this,tn,W0).call(this)}handle(n){j(this,ar).push(n)}beginBatch(n){f8(n)&&(Ae(this,ar,[]),this.facetBatches.set(Ft(n.facetId),j(this,ar)))}complete(){var n;if(Ae(this,ar,[]),(n=this.params.groupby)!=null&&n.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const r=this.facetBatches.get(void 0),o=this.params.groupby.map(s=>Qe(s)),i=o.length>1?Cc(r,...o):zB(r,o[0]);this.facetBatches.clear();for(const[s,a]of ud(i))this.facetBatches.set(s,a)}if(j(this,Jo))for(const r of this.facetBatches.values())r.sort(j(this,Jo));pe(this,tn,Wv).call(this),pe(this,tn,Y0).call(this),super.complete();for(const r of this.observers)r(this)}repropagate(){for(const n of this.children)n.reset();pe(this,tn,Y0).call(this);for(const n of this.children)n.complete()}getData(){switch(pe(this,tn,Q0).call(this),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const n=this.facetBatches;return{[Symbol.iterator]:function*(){for(const o of n.values())yield*o}}}}}visitData(n){pe(this,tn,Q0).call(this);for(const r of this.facetBatches.values())for(let o=0;o<r.length;o++)n(r[o])}getItemCount(){let n=0;for(const r of this.facetBatches.values())n+=r.length;return n}findDatumByUniqueId(n){if(!j(this,Vr).length)return;const r=ni(c=>c.start).right,o=j(this,Xa),i=ni(c=>o(s(c))).left,s=c=>{const l=r(j(this,Oi),c),u=j(this,Oi)[l-1];return!u||c>=u.stop?void 0:this.facetBatches.get(u.facetId)[c-u.start]},a=i(j(this,Vr),n);if(a>=0){const c=s(j(this,Vr)[a]);if(c&&o(c)===n)return c}}}ar=new WeakMap,Xa=new WeakMap,Vr=new WeakMap,Oi=new WeakMap,Jo=new WeakMap,tn=new WeakSet,W0=function(){Ae(this,ar,[]),Ae(this,Vr,[]),this.facetBatches.clear(),this.facetBatches.set(void 0,j(this,ar))},Y0=function(){if(this.children.length)for(const[n,r]of this.facetBatches.entries()){if(n){const o={type:"facet",facetId:n};for(const i of this.children)i.beginBatch(o)}for(let o=0,i=r.length;o<i;o++)this._propagate(r[o])}},Q0=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},Wv=function(){var s;Ae(this,Oi,[]);const n=(s=this.facetBatches.values().next().value)==null?void 0:s[0];if(n==null||!(sn in n))return;let r=0;const o=[],i=j(this,Xa);for(const[a,c]of this.facetBatches){j(this,Oi).push({start:r,stop:r+c.length,facetId:a}),r+=c.length;for(let l=0,u=c.length;l<u;l++)o.push(i(c[l]))}Ae(this,Vr,NB(o))};function zB(t,e){const n=new Map;for(let r=0,o=t.length;r<o;r++){const i=t[r],s=e(i);let a=n.get(s);a||(a=[],n.set(s,a)),a.push(i)}return n}function UB(t){if(t!=null&&t.field){const e=Ft(t.field);if(e.length==1&&!e[0].includes(".")){const n=Ft(t.order)[0]??"ascending",r=JSON.stringify(e[0]);return new Function("a","b",`return a[${r}] ${n==="ascending"?"-":"+"} b[${r}];`)}return sp(t.field,t.order)}}class jl{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(e,n){let r=this.length++;for(;r>0;){const o=r-1>>1,i=this.values[o];if(n>=i)break;this.ids[r]=this.ids[o],this.values[r]=i,r=o}this.ids[r]=e,this.values[r]=n}pop(){if(this.length===0)return;const e=this.ids[0];if(this.length--,this.length>0){const n=this.ids[0]=this.ids[this.length],r=this.values[0]=this.values[this.length],o=this.length>>1;let i=0;for(;i<o;){let s=(i<<1)+1;const a=s+1;let c=this.ids[s],l=this.values[s];const u=this.values[a];if(a<this.length&&u<l&&(s=a,c=this.ids[a],l=u),l>=r)break;this.ids[i]=c,this.values[i]=l,i=s}this.ids[i]=n,this.values[i]=r}return e}peek(){if(this.length!==0)return this.ids[0]}peekValue(){if(this.length!==0)return this.values[0]}shrink(){this.ids.length=this.values.length=this.length}}class GB extends yt{get behavior(){return On}constructor(e){super(e),this.params=e,this.startAccessor=Qe(e.start),this.endAccessor=Qe(e.end),this.chromAccessor=e.chrom?Qe(e.chrom):n=>{},this.weightAccessor=e.weight?Qe(e.weight):n=>1,this.as={coverage:e.as??"coverage",start:e.asStart??e.start,end:e.asEnd??e.end,chrom:e.asChrom??e.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([n,r])=>r).map(([n,r])=>`${JSON.stringify(r)}: ${n}`).join(", ")+"};"),this.ends=new jl}reset(){super.reset(),this.initialize()}initialize(){const e=this.as.coverage,n=this.as.end,r=this.as.chrom,o=this.startAccessor,i=this.endAccessor,s=this.chromAccessor,a=this.weightAccessor;let c,l,u,f=0,d=NaN;const h=this.ends;h.clear();const p=b=>{this._propagate(b),c=null},y=(b,A,S)=>{if(b==A)return;let E=!1;c&&(c[e]===S?(c[n]=A,E=!0):c[e]!=0&&p(c)),E||(c=this.createSegment(b,A,S,u))},v=()=>{let b=0;for(;(b=h.peekValue())!==void 0;)y(d,b,f),d=b,f-=h.pop();d=NaN,c&&p(c)};this.handle=b=>{const A=o(b);let S=0;for(;(S=h.peekValue())!==void 0&&S<A;)y(d,S,f),d=S,f-=h.pop();if(r){let I=s(b);I!==l&&(v(),u=I,l=u)}isNaN(d)||y(d,A,f),d=A;const E=a(b);f+=E,h.push(E,i(b))},this.complete=()=>{v(),super.complete()},this.beginBatch=b=>{v(),l=null,super.beginBatch(b)}}}function HB(t,e,n=i=>+i,r=0,o=t.length){const i=new jl,s=o-r;let a;for(a=0;a<e&&a<s;a++)i.push(a,n(t[r+a]));for(;a<s;a++){const u=n(t[r+a]);u>=i.peekValue()&&(i.push(a,u),i.pop())}const c=[];let l;for(;(l=i.pop())!==void 0;)c.push(t[r+l]);return c.reverse()}class VB{constructor(e,n=-1/0,r=1/0){this.maxSize=e,this.lowerLimit=n,this.upperLimit=r;const o=this.maxSize*2+1;this.lowerLimits=new Float64Array(o),this.upperLimits=new Float64Array(o),this.lowerChildren=new Int32Array(o),this.upperChildren=new Int32Array(o),this.reset()}reset(){this.lowerLimits.fill(0),this.upperLimits.fill(0),this.lowerChildren.fill(0),this.upperChildren.fill(0),this.n=1,this.lowerLimits[0]=this.lowerLimit,this.upperLimits[0]=this.upperLimit}_findSlot(e,n,r=0){if(e>=this.lowerLimits[r]&&n<=this.upperLimits[r]){const o=this.lowerChildren[r];if(o){const i=this._findSlot(e,n,o);return i>=0?i:this._findSlot(e,n,this.upperChildren[r])}else return r}else return-1}reserve(e,n){if(n-e<=0)throw new Error("Cannot reserve an empty or negative-size slot!");if(this.n+1>this.lowerLimits.length)return!1;const r=this._findSlot(e,n);if(r<0)return!1;const o=this.n++,i=this.n++;return this.lowerLimits[o]=this.lowerLimits[r],this.upperLimits[o]=e,this.lowerLimits[i]=n,this.upperLimits[i]=this.upperLimits[r],this.lowerChildren[r]=o,this.upperChildren[r]=i,!0}}class jB extends yt{get behavior(){return qf}constructor(e,n){if(super(e),this.params=e,this._data=[],this.channel=e.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.startPosAccessor=Qe(this.params.pos),this.endPosAccessor=Qe(this.params.pos2??this.params.pos),this.startPosBisector=ni(this.startPosAccessor),this.endPosBisector=ni(this.endPosAccessor),this.scoreAccessor=Qe(this.params.score),this.widthAccessor=Qe(this.params.width),this.laneAccessor=this.params.lane?Qe(this.params.lane):o=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=n.getScaleResolution(this.channel);const r=()=>this._filterAndPropagate();this.schedule=()=>n.context.animator.requestTransition(r),this.resolution.addEventListener("domain",o=>this.schedule()),n._addBroadcastHandler("layoutComputed",()=>this.schedule())}complete(){const e=this.startPosAccessor;this._data.sort((n,r)=>e(n)-e(r));for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new VB(200));this.schedule(),super.complete()}_filterAndPropagate(){super.reset();const e=this.resolution.scale,n=this.resolution.getAxisLength();if(!n)return;for(const s of this.reservationMaps.values())s.reset();const r=e.domain(),i=HB(this._data,70,this.scoreAccessor,this.endPosBisector.left(this._data,r[0]),this.startPosBisector.right(this._data,r[1]));for(const s of i){let a=e(this.startPosAccessor(s))*n,c=e(this.endPosAccessor(s))*n;const l=c-a,u=this.widthAccessor(s)+this.padding*2;let f=(a+c)/2;const d=Math.max(0,(l-u)/2);if(d>0){const h=Math.max(0,u/2-f);f+=Math.min(h,d);const p=Math.max(0,u/2+f-n);f-=Math.min(p,d)}if(this.reservationMaps.get(this.laneAccessor(s)).reserve(f-u/2,f+u/2))if(this.params.asMidpoint){const h=Object.assign({},s);h[this.params.asMidpoint]=e.invert(f/n),this._propagate(h)}else this._propagate(s)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(e){this._data.push(e)}}class qB extends yt{constructor(e,n){super(e,n),this.params=e,this.predicate=void 0}initialize(){let e="";if(WB(this.params))e=this.params.expr;else if(YB(this.params)){const n=this.paramMediator.findValue(this.params.param);if(!n)throw new Error(`Cannot initialize filter transform. Selection parameter "${this.params.param}" not found!`);e=O5(this.params,n)}else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramMediator.createExpression(e),this.predicate.addListener(()=>this.repropagate())}handle(e){this.predicate(e)&&this._propagate(e)}}function WB(t){return"expr"in t}function YB(t){return"param"in t}class QB extends yt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=e.index;if(e.fields){const r=Ft(e.fields).map(i=>Qe(i)),o=Ft(e.as||e.fields);if(r.length!==o.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${o.length}) do not match!`);this.handle=i=>{const s=r.map((c,l)=>c(i)??[]),a=s[0].length;for(let c=0;c<a;c++){const l=Object.assign({},i);for(let u=0;u<r.length;u++)l[o[u]]=c<s[u].length?s[u][c]:null;n&&(l[n]=c),this._propagate(l)}}}else this.handle=r=>{for(let o=0;o<r.length;o++){const i=Object.assign({},r[o]);n&&(i[n]=o),this._propagate(i)}}}}const ZB=48;function*XB(t,e=","){const n=e.charCodeAt(0);let r=0;for(let o=0;o<t.length;o++){const i=t.charCodeAt(o);i==n?(yield r,r=0):r=r*10+i-ZB}yield r}class KB extends yt{get behavior(){return On}constructor(e){super(e);const n=Qe(e.exons??"exons"),r=Qe(e.start??"start"),[o,i]=e.as||["exonStart","exonEnd"];this.handle=s=>{let a=r(s),c=a,l=!0;const u=n(s);for(const f of XB(u)){if(l)c=a+f;else{a=c+f;const d=Object.assign({},s);d[o]=c,d[i]=a,this._propagate(d)}l=!l}}}}class JB extends yt{get behavior(){return On}constructor(e){super(e);const n=Ft(e.field).map(i=>Qe(i)),r=Ft(e.separator),o=Ft(e.as||e.field);if(n.length!==r.length||n.length!==o.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${n.length}), and "as" (${o.length}) do not match!`);this.handle=i=>{if(n.some(c=>!c(i)))return;const s=n.map((c,l)=>c(i).split(r[l]));$B(s,i);const a=s[0].length;for(let c=0;c<a;c++){const l=Object.assign({},i);for(let u=0;u<n.length;u++)l[o[u]]=s[u][c];this._propagate(l)}}}}function $B(t,e){const n=t.map(r=>r.length);if(!n.every(r=>r==n[0]))throw new Error("Mismatching number of elements in the fields to be split: "+JSON.stringify(e))}class ek extends yt{get behavior(){return Sr}constructor(e,n){super(e,n),this.params=e,this.as=e.as,this.fn=void 0}initialize(){this.fn=this.paramMediator.createExpression(this.params.expr),this.fn.addListener(()=>this.repropagate())}handle(e){e[this.as]=this.fn(e),this._propagate(e)}}class Nb extends yt{get behavior(){return Sr}constructor(e,n){e={channel:"x",...e},super(e),this.params=e;const r=e.channel;if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const o=n.getScaleResolution(r).getGenome();if(!o)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const i=Qe(e.chrom),s=Ft(e.pos).map(p=>Qe(p)),a=Ft(e.as);if(s.length!=a.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=Ft(e.offset);let l;if(c.length==0)l=new Array(s.length).fill(0);else if(c.length==1)l=new Array(s.length).fill(c[0]);else if(c.length==s.length)l=c;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(e.offset)}!`);const u=new Function("datum","chromOffset","posAccessors",a.map((p,y)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${y}](datum) - ${l[y]};`).join(`
|
|
614
|
-
`));let f,d=0;const h=p=>{if(p!==f){if(d=o.cumulativeChromPositions.get(p),d===void 0)return;f=p}return d};this.handle=p=>{const y=i(p),v=h(y);if(v===void 0)throw new Error(`Unknown chromosome/contig "${y}" in datum: ${JSON.stringify(p)}`);u(p,v,s),this._propagate(p)}}}const zb={chars:JSON.parse('[{"id":87,"width":53,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":43.491,"chnl":15,"x":0,"y":0,"page":0},{"id":124,"width":17,"height":50,"xoffset":0,"yoffset":-32.193000000000005,"xadvance":10.521,"chnl":15,"x":0,"y":42,"page":0},{"id":40,"width":20,"height":49,"xoffset":0,"yoffset":-32.571000000000005,"xadvance":11.214,"chnl":15,"x":0,"y":94,"page":0},{"id":41,"width":19,"height":49,"xoffset":0,"yoffset":-32.571000000000005,"xadvance":11.214,"chnl":15,"x":0,"y":145,"page":0},{"id":36,"width":32,"height":49,"xoffset":0,"yoffset":-34.419000000000004,"xadvance":24.360000000000003,"chnl":15,"x":0,"y":196,"page":0},{"id":125,"width":21,"height":48,"xoffset":0,"yoffset":-32.193000000000005,"xadvance":12.642000000000001,"chnl":15,"x":0,"y":247,"page":0},{"id":91,"width":22,"height":48,"xoffset":0,"yoffset":-32.193000000000005,"xadvance":12.852,"chnl":15,"x":0,"y":297,"page":0},{"id":93,"width":19,"height":48,"xoffset":0,"yoffset":-32.193000000000005,"xadvance":12.852,"chnl":15,"x":0,"y":347,"page":0},{"id":123,"width":21,"height":48,"xoffset":0,"yoffset":-32.193000000000005,"xadvance":12.642000000000001,"chnl":15,"x":0,"y":397,"page":0},{"id":106,"width":19,"height":48,"xoffset":0,"yoffset":-30.639000000000003,"xadvance":10.08,"chnl":15,"x":0,"y":447,"page":0},{"id":81,"width":43,"height":47,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":33.621,"chnl":15,"x":21,"y":447,"page":0},{"id":77,"width":45,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":38.997,"chnl":15,"x":66,"y":447,"page":0},{"id":64,"width":43,"height":44,"xoffset":0,"yoffset":-28.539,"xadvance":35.133,"chnl":15,"x":23,"y":397,"page":0},{"id":92,"width":28,"height":43,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":18.984,"chnl":15,"x":68,"y":397,"page":0},{"id":47,"width":28,"height":43,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":18.984,"chnl":15,"x":98,"y":397,"page":0},{"id":109,"width":42,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":34.545,"chnl":15,"x":113,"y":447,"page":0},{"id":119,"width":42,"height":31,"xoffset":0,"yoffset":-21.315,"xadvance":32.991,"chnl":15,"x":157,"y":447,"page":0},{"id":42,"width":25,"height":42,"xoffset":0,"yoffset":-31.626,"xadvance":17.85,"chnl":15,"x":128,"y":397,"page":0},{"id":37,"width":42,"height":41,"xoffset":0,"yoffset":-30.387,"xadvance":33.663000000000004,"chnl":15,"x":155,"y":397,"page":0},{"id":79,"width":42,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":33.621,"chnl":15,"x":199,"y":397,"page":0},{"id":102,"width":24,"height":41,"xoffset":0,"yoffset":-30.534000000000002,"xadvance":14.721,"chnl":15,"x":243,"y":397,"page":0},{"id":100,"width":31,"height":41,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":23.520000000000003,"chnl":15,"x":269,"y":397,"page":0},{"id":98,"width":32,"height":41,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":23.520000000000003,"chnl":15,"x":302,"y":397,"page":0},{"id":56,"width":32,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":24.360000000000003,"chnl":15,"x":336,"y":397,"page":0},{"id":38,"width":40,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":29.904000000000003,"chnl":15,"x":370,"y":397,"page":0},{"id":108,"width":17,"height":41,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":9.912,"chnl":15,"x":412,"y":397,"page":0},{"id":107,"width":31,"height":41,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":21.336000000000002,"chnl":15,"x":431,"y":397,"page":0},{"id":48,"width":33,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":24.360000000000003,"chnl":15,"x":464,"y":397,"page":0},{"id":71,"width":38,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":30.681,"chnl":15,"x":21,"y":347,"page":0},{"id":83,"width":31,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":22.785,"chnl":15,"x":61,"y":347,"page":0},{"id":63,"width":27,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":18.795,"chnl":15,"x":94,"y":347,"page":0},{"id":105,"width":18,"height":41,"xoffset":0,"yoffset":-30.639000000000003,"xadvance":10.08,"chnl":15,"x":123,"y":347,"page":0},{"id":51,"width":32,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":24.360000000000003,"chnl":15,"x":143,"y":347,"page":0},{"id":104,"width":31,"height":41,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":23.436,"chnl":15,"x":177,"y":347,"page":0},{"id":67,"width":37,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":28.056,"chnl":15,"x":210,"y":347,"page":0},{"id":88,"width":37,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":27.258000000000003,"chnl":15,"x":249,"y":347,"page":0},{"id":68,"width":40,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":31.941000000000003,"chnl":15,"x":288,"y":347,"page":0},{"id":70,"width":32,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":23.751,"chnl":15,"x":330,"y":347,"page":0},{"id":34,"width":23,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":15.561000000000002,"chnl":15,"x":364,"y":347,"page":0},{"id":72,"width":38,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":32.067,"chnl":15,"x":389,"y":347,"page":0},{"id":73,"width":18,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":11.760000000000002,"chnl":15,"x":429,"y":347,"page":0},{"id":74,"width":24,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":17.745,"chnl":15,"x":449,"y":347,"page":0},{"id":75,"width":38,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":27.825000000000003,"chnl":15,"x":24,"y":297,"page":0},{"id":76,"width":31,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":21.567,"chnl":15,"x":475,"y":347,"page":0},{"id":66,"width":35,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":27.153000000000002,"chnl":15,"x":64,"y":297,"page":0},{"id":78,"width":38,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":32.067,"chnl":15,"x":101,"y":297,"page":0},{"id":33,"width":18,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":11.298,"chnl":15,"x":141,"y":297,"page":0},{"id":80,"width":34,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":25.221,"chnl":15,"x":161,"y":297,"page":0},{"id":65,"width":38,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":28.434,"chnl":15,"x":197,"y":297,"page":0},{"id":82,"width":36,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":26.313000000000002,"chnl":15,"x":237,"y":297,"page":0},{"id":35,"width":33,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":275,"y":297,"page":0},{"id":84,"width":34,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.801000000000002,"chnl":15,"x":310,"y":297,"page":0},{"id":85,"width":37,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":30.891000000000002,"chnl":15,"x":346,"y":297,"page":0},{"id":86,"width":38,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":28.434,"chnl":15,"x":385,"y":297,"page":0},{"id":39,"width":16,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":8.568000000000001,"chnl":15,"x":425,"y":297,"page":0},{"id":69,"width":32,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.255000000000003,"chnl":15,"x":443,"y":297,"page":0},{"id":89,"width":36,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":26.208000000000002,"chnl":15,"x":23,"y":247,"page":0},{"id":90,"width":34,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":25.284000000000002,"chnl":15,"x":477,"y":297,"page":0},{"id":49,"width":31,"height":40,"xoffset":0,"yoffset":-30.156000000000002,"xadvance":24.360000000000003,"chnl":15,"x":61,"y":247,"page":0},{"id":50,"width":32,"height":40,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":24.360000000000003,"chnl":15,"x":94,"y":247,"page":0},{"id":57,"width":32,"height":40,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":24.360000000000003,"chnl":15,"x":128,"y":247,"page":0},{"id":94,"width":32,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":162,"y":247,"page":0},{"id":96,"width":21,"height":40,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":16.8,"chnl":15,"x":196,"y":247,"page":0},{"id":55,"width":33,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":219,"y":247,"page":0},{"id":54,"width":33,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":254,"y":247,"page":0},{"id":53,"width":32,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":289,"y":247,"page":0},{"id":52,"width":33,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":323,"y":247,"page":0},{"id":103,"width":31,"height":39,"xoffset":0,"yoffset":-21.630000000000003,"xadvance":21.84,"chnl":15,"x":358,"y":247,"page":0},{"id":112,"width":32,"height":39,"xoffset":0,"yoffset":-21.651,"xadvance":23.541,"chnl":15,"x":391,"y":247,"page":0},{"id":113,"width":31,"height":39,"xoffset":0,"yoffset":-21.651,"xadvance":23.520000000000003,"chnl":15,"x":425,"y":247,"page":0},{"id":116,"width":25,"height":39,"xoffset":0,"yoffset":-28.182000000000002,"xadvance":15.057,"chnl":15,"x":458,"y":247,"page":0},{"id":121,"width":31,"height":38,"xoffset":0,"yoffset":-21.273,"xadvance":21.651,"chnl":15,"x":34,"y":196,"page":0},{"id":59,"width":18,"height":36,"xoffset":0,"yoffset":-20.706,"xadvance":10.983,"chnl":15,"x":485,"y":247,"page":0},{"id":43,"width":32,"height":34,"xoffset":0,"yoffset":-24.486,"xadvance":24.360000000000003,"chnl":15,"x":67,"y":196,"page":0},{"id":60,"width":30,"height":33,"xoffset":0,"yoffset":-23.331000000000003,"xadvance":24.360000000000003,"chnl":15,"x":101,"y":196,"page":0},{"id":62,"width":31,"height":33,"xoffset":0,"yoffset":-23.331000000000003,"xadvance":24.360000000000003,"chnl":15,"x":133,"y":196,"page":0},{"id":117,"width":30,"height":32,"xoffset":0,"yoffset":-21.273,"xadvance":23.415000000000003,"chnl":15,"x":166,"y":196,"page":0},{"id":99,"width":29,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":20.055,"chnl":15,"x":198,"y":196,"page":0},{"id":110,"width":31,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":23.436,"chnl":15,"x":229,"y":196,"page":0},{"id":111,"width":32,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":23.814,"chnl":15,"x":262,"y":196,"page":0},{"id":126,"width":32,"height":26,"xoffset":0,"yoffset":-16.128,"xadvance":24.360000000000003,"chnl":15,"x":201,"y":447,"page":0},{"id":101,"width":31,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":22.176000000000002,"chnl":15,"x":296,"y":196,"page":0},{"id":114,"width":25,"height":32,"xoffset":0,"yoffset":-21.651,"xadvance":15.288,"chnl":15,"x":329,"y":196,"page":0},{"id":115,"width":27,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":18.186,"chnl":15,"x":356,"y":196,"page":0},{"id":97,"width":28,"height":32,"xoffset":0,"yoffset":-21.651,"xadvance":20.874000000000002,"chnl":15,"x":385,"y":196,"page":0},{"id":118,"width":31,"height":31,"xoffset":0,"yoffset":-21.273,"xadvance":21.672,"chnl":15,"x":415,"y":196,"page":0},{"id":61,"width":31,"height":29,"xoffset":0,"yoffset":-19.089000000000002,"xadvance":24.360000000000003,"chnl":15,"x":448,"y":196,"page":0},{"id":120,"width":30,"height":31,"xoffset":0,"yoffset":-21.273,"xadvance":20.916,"chnl":15,"x":21,"y":145,"page":0},{"id":58,"width":18,"height":31,"xoffset":0,"yoffset":-20.706,"xadvance":10.5,"chnl":15,"x":53,"y":145,"page":0},{"id":122,"width":28,"height":31,"xoffset":0,"yoffset":-21.273,"xadvance":18.984,"chnl":15,"x":73,"y":145,"page":0},{"id":95,"width":28,"height":16,"xoffset":0,"yoffset":0,"xadvance":19.278000000000002,"chnl":15,"x":235,"y":447,"page":0},{"id":45,"width":23,"height":24,"xoffset":0,"yoffset":-14.175,"xadvance":15.603000000000002,"chnl":15,"x":481,"y":196,"page":0},{"id":44,"width":17,"height":21,"xoffset":0,"yoffset":-4.956,"xadvance":9.534,"chnl":15,"x":103,"y":145,"page":0},{"id":46,"width":18,"height":15,"xoffset":0,"yoffset":-4.956,"xadvance":9.912,"chnl":15,"x":0,"y":497,"page":0},{"id":32,"width":0,"height":0,"xoffset":0,"yoffset":0,"xadvance":10.752,"chnl":15,"x":20,"y":497,"page":0}]'),common:{lineHeight:50.400000000000006,base:41.454,scaleW:512,scaleH:512,pages:1,packed:0,alphaChnl:0,redChnl:0,greenChnl:0,blueChnl:0}};class tk extends yt{get behavior(){return Sr}constructor(e,n){super(e),this.params=e;const r=jf(zb),o=Qe(e.field),i=e.as;let s=0;if(Ot(e.fontSize)){const a=n.paramMediator.createExpression(e.fontSize.expr);s=a(),a.addListener(()=>{s=a(),this.repropagate()})}else s=e.fontSize;this.handle=a=>{const c=o(a);c!==void 0?a[i]=r.measureWidth(c,s):a[i]=0,this._propagate(a)}}}const nk=65536;class rk extends yt{get behavior(){return Sr}constructor(e){super(e),this.params=e}reset(){super.reset(),this.initialize()}initialize(){const e=this.params,n=e.as||"lane",r=Ht(e.spacing)?e.spacing:1,o=Qe(e.start),i=Qe(e.end);if(!e.preference!=!e.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(e.preference){const s=new Float64Array(nk),a=Qe(e.preference),c=e.preferredOrder;let l=1/0;this.handle=u=>{const f=o(u);f<l&&s.fill(-1/0),l=f;const d=c.indexOf(a(u));let h=-1;if(d>=0&&s[d]<f)h=d;else{const p=o(u);for(h=0;h<s.length&&!(s[h]<p);h++);if(h>=s.length)throw new Error("Out of lanes!")}s[h]=i(u)+r,u[n]=h,this._propagate(u)}}else{const s=new jl,a=new jl;let c=-1/0,l=0;this.handle=u=>{const f=o(u);for(;s.length&&(s.peekValue()<=f||f<c);){const h=s.pop();a.push(h,h)}c=f;let d=a.pop();d===void 0&&(d=l++),u[n]=d,this._propagate(u),s.push(d,i(u)+r)}}}}class ik extends yt{get behavior(){return On}constructor(e){if(super(e),this.params=e,e.as&&e.as.length!=e.fields.length)throw new Error('"fields" and "as" have unequal lengths!');const n=e.fields.map(o=>Qe(o)),r=e.as?e.as:n.map(ji);this.handle=o=>{const i={};for(let s=0;s<n.length;s++)i[r[s]]=n[s](o);this._propagate(i)}}}class ok extends yt{get behavior(){return Sr}constructor(e){super(e),this.params=e;const n=new RegExp(e.regex),r=typeof e.as=="string"?[e.as]:e.as,o=Qe(e.field);this.handle=i=>{const s=o(i);if(rt(s)){const a=s.match(n);if(a){if(a.length-1!=r.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let c=0;c<r.length;c++)i[r[c]]=a[c+1]}else if(e.skipInvalidInput)for(let c=0;c<r.length;c++)i[r[c]]=void 0;else throw new Error(`"${s}" does not match the given regex: ${n.toString()}`)}else if(!e.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof s}, field content: "${s}".`);this._propagate(i)}}}class sk extends yt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=Ft(e.columnRegex).map(d=>new RegExp(d));for(const d of n)if(RegExp("|"+d.source).exec("").length-1!=1)throw new Error(`Regex ${d.toString()} must have exactly one capturing group!`);const r=Ft(e.asValue);if(n.length!=r.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const o=e.skipRegex?new RegExp(e.skipRegex):void 0,i=e.asKey||"sample";let s,a,c;const l=d=>{var v;const h=Object.keys(d);for(const b of n)if(!h.some(A=>b.test(A)))throw new Error(`No columns matching the regex ${b.toString()} found in the data!`);const p=new Map;for(const[b,A]of n.entries())for(const S of h){const E=(v=A.exec(S))==null?void 0:v[1];if(E!==void 0){let I=p.get(E);I||(I=[],p.set(E,I)),I[b]=S}}s=[...p.entries()],a=h.filter(b=>!n.some(A=>A.test(b))&&!(o&&o.test(b)));const y=[...a.map(b=>JSON.stringify(b)+": datum["+JSON.stringify(b)+"]"),JSON.stringify(i)+": sampleId",...r.map((b,A)=>JSON.stringify(b)+`: datum[attrs[${A}]]`)];c=new Function("datum","sampleId","attrs",`return {
|
|
615
|
-
`+
|
|
612
|
+
chrM 16299`};function qD(n){if(!(n in _1))throw new Error(`Unknown assembly: ${n}`);return _1[n].split(`
|
|
613
|
+
`).map(e=>{const t=e.split(" ");return{name:t[0],size:parseInt(t[1])}})}const YD=/^([A-Za-z]+:)?\/\//;function Or(n,e){if(e&&YD.test(e))return e;const t=typeof n=="function"?n():n;if(!t)return e;if(!e)return t;if(/[#?]/.test(t))throw new Error(`Cannot append to a url with query or hash. Append: ${e}, base: ${t}`);return j1(t)+e}function j1(n){const e=n.replace(/[^/]*$/,"");return e===""?void 0:e.endsWith("://")?n+"/":e}class XD{constructor(e){if(this.config={name:"custom",...e},"baseUrl"in e)throw new Error("The `baseUrl` property in genome config has been removed in GenomeSpy v0.52.0. Use `url` instead. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.");if(!oh(e))throw new Error("Not a genome configuration: "+JSON.stringify(e));if(this.chromosomes=[],this.cumulativeChromPositions=new Map,this.chromosomesByName=new Map,this.startByIndex=[],this.totalSize=0,W1(this.config))this.setChromSizes(this.config.contigs);else if(!ah(this.config)){const t=qD(this.config.name);if(t)this.setChromSizes(t);else throw new Error(`Unknown genome: ${this.config.name}. Please provide contigs or a URL. See https://genomespy.app/docs/genomic-data/genomic-coordinates/.`)}}get name(){return this.config.name}async load(e){if(ah(this.config))try{const t=Or(e,this.config.url),r=await fetch(t);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);this.setChromSizes(ZD(await r.text()))}catch(t){throw new Error(`Could not load chrom sizes: ${this.config.url}. Reason: ${t.message}`)}}hasChrPrefix(){return this.chromosomes.some(e=>e.name.startsWith("chr"))}setChromSizes(e){let t=0;this.startByIndex=[0];for(let r=0;r<e.length;r++){this.startByIndex.push(t);const i=e[r].size,s={...e[r],continuousStart:t,continuousEnd:t+i,continuousInterval:[t,t+i],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(s);const o=s.name.replace(/^chr/i,"");for(const a of["chr"+o,"CHR"+o,"Chr"+o,s.number,""+s.number,o,s.name])this.cumulativeChromPositions.set(a,t),this.chromosomesByName.set(a,s);t+=s.size}this.totalSize=t}getExtent(){return[0,this.totalSize]}toContinuous(e,t){let r=this.cumulativeChromPositions.get(e);if(r===void 0)throw new Error("Unknown chromosome/contig: "+e);return r+ +t}toChromosome(e){if(e>this.totalSize)return;e=Math.floor(e);const t=Dn(this.startByIndex,e)-1;if(t>0&&t<=this.chromosomes.length)return this.chromosomes[t-1]}toChromosomal(e){const t=this.toChromosome(e);if(t)return{chrom:t.name,pos:Math.floor(e)-t.continuousStart}}getChromosome(e){return this.chromosomesByName.get(e)}formatInterval(e){return WD(...this.toChromosomalInterval(e))}toChromosomalInterval(e){const t=this.toChromosomal(e[0]+.5),r=this.toChromosomal(e[1]-.5);return r.pos+=1,[t,r]}toContinuousInterval(e){var i;let[t,r]=e;return r||(r=t),[this.toContinuous(t.chrom,t.pos??0),this.toContinuous(r.chrom,r.pos??((i=this.chromosomesByName.get(r.chrom))==null?void 0:i.size))]}toDiscreteChromosomeIntervals(e){const t=e[0],r=e[1],i=[];if(t.chrom===r.chrom)i.push({chrom:t.chrom,startPos:t.pos,endPos:r.pos});else{const s=this.chromosomes.findIndex(a=>a.name===t.chrom),o=this.chromosomes.findIndex(a=>a.name===r.chrom);i.push({chrom:t.chrom,startPos:t.pos,endPos:this.chromosomes[s].size});for(let a=s+1;a<o;a++)i.push({chrom:this.chromosomes[a].name,startPos:0,endPos:this.chromosomes[a].size});i.push({chrom:r.chrom,startPos:0,endPos:r.pos})}return i}continuousToDiscreteChromosomeIntervals(e){return this.toDiscreteChromosomeIntervals([this.toChromosomal(e[0]),this.toChromosomal(e[1])])}parseInterval(e){const t=e.match(/^(chr[0-9A-Z]+)(?::([0-9,]+)(?:-(?:(chr[0-9A-Z]+):)?([0-9,]+))?)?$/);if(t){const r=t[1];if(t.slice(2).every(a=>a===void 0)){const a=this.getChromosome(r);return a?[a.continuousStart,a.continuousEnd]:void 0}const i=t[3]||r,s=parseInt(t[2].replace(/,/g,"")),o=t[4]!==void 0?parseInt(t[4].replace(/,/g,"")):s;return[this.toContinuous(r,s-1),this.toContinuous(i,o)]}}}function ZD(n){return TA(n).map(([e,t])=>({name:e,size:parseInt(t)}))}function Q1(n){return Ge(n)&&"chrom"in n}function KD(n){return n.every(Q1)}function oh(n){return Ge(n)&&("name"in n||ah(n)||W1(n))}function ah(n){return oh(n)&&"url"in n}function W1(n){return oh(n)&&"contigs"in n}class Lo extends Array{constructor(){super(),this.type=void 0}extend(e){return this}extendAll(e){if(e instanceof Lo&&e.type!=this.type)throw new Error(`Cannot combine different types of domains: ${this.type} and ${e.type}`);for(const t of e)this.extend(t);return this}extendAllWithAccessor(e,t){for(const r of e)this.extend(t(r));return this}}class ch extends Lo{constructor(){super(),this.type="quantitative"}extend(e){return e==null||Number.isNaN(e)?this:(e=+e,this.length?e<this[0]?this[0]=e:e>this[1]&&(this[1]=e):(this.push(e),this.push(e)),this)}}class q1 extends Lo{constructor(){super(),this.type="ordinal",this.uniqueValues=new Set}extend(e){return e==null||Number.isNaN(e)?this:(this.uniqueValues.has(e)||(this.uniqueValues.add(e),this.push(e)),this)}}class Y1 extends q1{constructor(){super(),this.type="nominal"}}class JD extends Lo{constructor(e){super();let t=0;for(let r=1;r<e.length;r++)t+=Math.sign(e[r]-e[r-1]);if(Math.abs(t)!=e.length-1)throw new Error("Piecewise domain must be strictly increasing or decreasing: "+JSON.stringify(e));e.forEach(r=>this.push(r))}extend(e){if(this.includes(e))return this;throw new Error("Piecewise domains are immutable and cannot be unioned!")}}const X1={quantitative:ch,index:ch,locus:ch,nominal:Y1,ordinal:q1};function Z1(n,e){if(n=="quantitative"&&$D(e)){const t=new JD(e);return t.type=n,t}else if(X1[n]){const t=new X1[n];return t.type=n,e&&t.extendAll(e),t}throw new Error("Unknown type: "+n)}function $D(n){return n&&n.length>0&&n.length!=2&&n.every(e=>typeof e=="number")}function eI(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}function tI(n,e,t){return n*Math.pow(e/n,t)}le("index",ih,["continuous"]),le("locus",vD,["continuous"]),le("null",Kf,[]);const K1="quantitative",J1="ordinal",$1="nominal",ey="locus",nI="index";class rI{constructor(e){R(this,q);R(this,is,{domain:new Set,range:new Set});R(this,ct);R(this,Yr);R(this,ra,new Set);this.channel=e,this.members=[],this.type=null,this.name=void 0}get zoomExtent(){return(E(this,ct)&&Oe(E(this,ct).type)&&O(this,q,vx).call(this))??[-1/0,1/0]}addEventListener(e,t){E(this,is)[e].add(t)}removeEventListener(e,t){E(this,is)[e].delete(t)}addMember(e){var a;const{channel:t,channelDef:r}=e,i=r.type==null&&this.type;if(t!="sample"&&!r.type&&!uf(t)&&!i)throw new Error(`The "type" property must be defined in channel definition: "${t}": ${JSON.stringify(r)}. Must be one of: "quantitative", "ordinal", "nominal", "locus", "index"`);const s=t=="sample"?"nominal":r.type,o=(a=r==null?void 0:r.scale)==null?void 0:a.name;if(o){if(this.name!==void 0&&o!=this.name)throw new Error(`Shared scales have conflicting names: "${o}" vs. "${this.name}"!`);this.name=o}if(!i){if(!this.type)this.type=s;else if(s!==this.type&&!uf(t))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${s}. Use "resolve: independent" for channel ${this.channel}`)}this.members.push(e)}removeMembersByView(e){const t=this.members.length;return this.members=this.members.filter(r=>r.view!==e),this.members.length!==t}getDataDomain(){return this.members.map(e=>{var t;return(t=e.dataDomainSource)==null?void 0:t.call(e,e.channel,this.type)}).filter(e=>!!e).reduce((e,t)=>e.extendAll(t))}reconfigure(){const e=E(this,ct);if(!e||e.type=="null")return;const t=O(this,q,Ax).call(this),r=e.domain(),i=O(this,q,hd).call(this,!0);if(U1({...i,range:void 0},e),e.props=i,O(this,q,dd).call(this),!E(this,Yr)&&Oe(e.type)){const o=e.domain();Ts(o)>0&&G(this,Yr,o)}if(!t){G(this,Yr,e.domain()),O(this,q,Sn).call(this,"domain");return}const s=e.domain();$a(s,r)||(this.isZoomable()?e.domain(r):O(this,q,ti).call(this)?(e.domain(r),this.zoomTo(s,500)):O(this,q,Sn).call(this,"domain"))}get scale(){if(E(this,ct))return E(this,ct);const e=O(this,q,hd).call(this),t=ND({...e,range:void 0});t.props=e,"unknown"in t&&t.unknown(null),G(this,ct,t),O(this,q,dd).call(this),SD(t)&&t.genome(this.getGenome());const r=t.range;if(r){const i=()=>O(this,q,Sn).call(this,"range");t.range=function(s){if(arguments.length)r(s),i();else return r()},i()}return t}getDomain(){return this.scale.domain()}getComplexDomain(){var e;return((e=this.getGenome())==null?void 0:e.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return O(this,q,ti).call(this)&&$a(O(this,q,Fu).call(this),this.getDomain())}isZoomable(){return O(this,q,ti).call(this)&&!!this.scale.props.zoom}zoom(e,t,r){if(!O(this,q,ti).call(this))return!1;const i=this.scale,s=i.domain();let o=[...s],a=i.invert(t);switch(i.props.reverse&&(r=-r),"align"in i&&(a+=i.align()),i.type){case"linear":case"index":case"locus":o=Hx(o,r||0),o=Bd(o,a,e);break;case"log":o=Vx(o,r||0),o=kd(o,a,e);break;case"pow":case"sqrt":{const u=i;o=_x(o,r||0,u.exponent()),o=Nu(o,a,e,u.exponent());break}default:throw new Error("Zooming is not implemented for: "+i.type)}const c=this.zoomExtent;return o=Qx(o,c[0],c[1]),[0,1].some(u=>o[u]!=s[u])?(i.domain(o),O(this,q,Sn).call(this,"domain"),!0):!1}async zoomTo(e,t=!1){if(Is(t)&&(t=t?700:0),!O(this,q,ti).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(e),i=E(this,q,ld).animator,s=this.scale,o=s.domain();if(t>0&&o.length==2){const a=o[1]-o[0],c=r[1]-r[0],u=o[0]+a/2,l=r[0]+c/2,f=o[0]==r[0],d=o[1]==r[1];await i.transition({duration:t,easingFunction:eI,onUpdate:h=>{const p=tI(a,c,h),m=a==c?h:(a-p)/(a-c),g=m*l+(1-m)*u,y=[f?o[0]:g-p/2,d?o[1]:g+p/2];s.domain(y),O(this,q,Sn).call(this,"domain")}}),s.domain(r),O(this,q,Sn).call(this,"domain")}else s.domain(r),i==null||i.requestRender(),O(this,q,Sn).call(this,"domain")}resetZoom(){if(!O(this,q,ti).call(this))throw new Error("Not a zoomable scale!");const e=this.getDomain(),t=O(this,q,Fu).call(this);return[0,1].some(r=>t[r]!=e[r])?(E(this,ct).domain(t),O(this,q,Sn).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?Ts(this.zoomExtent)/Ts(this.scale.domain()):1}getAxisLength(){if(this.channel!=="x"&&this.channel!=="y")throw new Error("Axis length is only defined for x and y channels!");const e=this.members.map(t=>{var r;return(r=t.view.coords)==null?void 0:r[this.channel==="x"?"width":"height"]}).filter(t=>t>0);return e.length?e.reduce((t,r)=>Math.min(t,r),1e4):0}getGenome(){var t;if(this.type!=="locus")return;const e=(t=E(this,q,ld).genomeStore)==null?void 0:t.getGenome();if(!e)throw new Error("No genome has been defined!");return e}invertToComplex(e){const t=this.scale;if("invert"in t){const r=t.invert(e);return this.toComplex(r)}else throw new Error("The scale does not support inverting!")}toComplex(e){const t=this.getGenome();return t?t.toChromosomal(e):e}fromComplex(e){return Q1(e)?this.getGenome().toContinuous(e.chrom,e.pos):e}fromComplexInterval(e){return this.type==="locus"&&KD(e)?this.getGenome().toContinuousInterval(e):e}}is=new WeakMap,ct=new WeakMap,Yr=new WeakMap,ra=new WeakMap,q=new WeakSet,ud=function(){return this.members[0].view},ld=function(){return E(this,q,ud).context},Sn=function(e){for(const t of E(this,is)[e].values())t({type:e,scaleResolution:this})},fd=function(){return!!O(this,q,pd).call(this)},Ax=function(){const e=E(this,ct);if(!e)return!1;const t=e.domain();return Oe(e.type)?t.length>2||t.length==2&&(t[0]!==0||t[1]!==0):t.length>0},wx=function(){const e=this.members.map(t=>t.channelDef.scale).filter(t=>t!==void 0);return tu(e,"scale",["domain"])},hd=function(e=!1){const t=O(this,q,wx).call(this);if(t===null||t.type=="null")return{type:"null"};const r={...O(this,q,Sx).call(this,this.type),...t};r.type||(r.type=iI(this.channel,this.type));const i=O(this,q,Fu).call(this,e);return i&&i.length>0?r.domain=i:jn(r.type)&&(r.domain=new Y1),!r.domain&&r.domainMid!==void 0&&(r.domain=[r.domainMin??0,r.domainMax??1]),this.channel=="y"&&jn(r.type)&&r.reverse==null&&(r.reverse=!0),r.range&&r.scheme&&delete r.scheme,!("zoom"in r)&&["index","locus"].includes(r.type)&&(r.zoom=!0),sI(r,this.channel),r},dd=function(){const e=E(this,ct).props,t=e.range;if(E(this,ra).forEach(i=>i.invalidate()),!t||!Ue(t))return;const r=(i,s)=>s?i.slice().reverse():i;if(t.some(Qe)){let i;const s=()=>{E(this,ct).range(r(i.map(o=>o()),e.reverse))};i=t.map(o=>{if(Qe(o)){const a=E(this,q,ud).paramMediator.createExpression(o.expr);return a.addListener(s),E(this,ra).add(a),()=>a(null)}else return()=>o}),s()}else E(this,ct).range(r(t,e.reverse))},Fu=function(e=!1){return O(this,q,pd).call(this)??(this.type==ey?this.getGenome().getExtent():e?this.getDataDomain():[])},pd=function(){const e=this.members.map(t=>t.channelDef).filter(t=>{var r;return(r=t.scale)==null?void 0:r.domain}).map(t=>Z1(t.type,this.fromComplexInterval(t.scale.domain)));if(e.length>0)return e.reduce((t,r)=>t.extendAll(r))},ti=function(){const e=this.scale.type;return Oe(e)},vx=function(){const e=this.scale.props,t=e.zoom;return oI(t)&&Ue(t.extent)?this.fromComplexInterval(t.extent):t&&e.type=="locus"?this.getGenome().getExtent():E(this,Yr)},Sx=function(e){const t=this.channel,r={};return O(this,q,fd).call(this)&&(r.zero=!1),Ao(t)?r.nice=!O(this,q,fd).call(this):Ln(t)?r.scheme=e==$1?"tableau10":e==J1?"blues":"viridis":Pc(t)?r.range=t=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:t=="size"?r.range=[0,400]:t=="angle"&&(r.range=[0,360]),r};function iI(n,e){if(e==nI||e==ey){if(cf(n))return e;throw new Error(`${n} does not support ${e} data type. Only positional channels do.`)}const t={x:["band","band","linear"],y:["band","band","linear"],size:[void 0,"point","linear"],opacity:[void 0,"point","linear"],fillOpacity:[void 0,"point","linear"],strokeOpacity:[void 0,"point","linear"],color:["ordinal","ordinal","linear"],fill:["ordinal","ordinal","linear"],stroke:["ordinal","ordinal","linear"],strokeWidth:[void 0,void 0,"linear"],shape:["ordinal","ordinal",void 0],dx:[void 0,void 0,"null"],dy:[void 0,void 0,"null"],angle:[void 0,void 0,"linear"],sample:["null",void 0,void 0]},i=["sample"].includes(n)?"null":t[n]?t[n][[$1,J1,K1].indexOf(e)]:e==K1?"linear":"ordinal";if(i===void 0)throw new Error(`Channel "${n}" is not compatible with "${e}" data type. Use of a proper scale may be needed.`);return i}function sI(n,e){Ao(e)&&n.type!=="ordinal"&&(n.range=[0,1]),e=="opacity"&&Oe(n.type)&&(n.clamp=!0)}function oI(n){return Ge(n)}function ty(n){const e=new Set;function t(r){for(const i of Object.values(r.resolutions.scale))e.add(i)}for(const r of He(n)){r.visit(t);for(const i of r.getDataAncestors()){if(!i.options.contributesToScaleDomain)break;t(i)}}e.forEach(r=>r.reconfigure())}function uh(...n){for(const e of n)if(e!==void 0)return e}class aI{constructor(e){this.channel=e,this.members=[]}get scaleResolution(){var e;return(e=eo(this.members))==null?void 0:e.view.getScaleResolution(this.channel)}addMember(e){const{view:t}=e,r=t.getScaleResolution(this.channel);if(!r)throw new Error("Cannot find a scale resolution!");if(this.scaleResolution&&r!==this.scaleResolution)throw new Error(`Shared axes must have a shared scale! Channel: ${this.channel}, existing views: [${this.members.map(i=>i.view.getPathString()).join(", ")}], new view: ${t.getPathString()}.`);this.members.push(e),nh(this,"axisProps")}removeMembersByView(e){const t=this.members.length;return this.members=this.members.filter(r=>r.view!==e),this.members.length!==t?(nh(this,"axisProps"),!0):!1}getAxisProps(){return Jc(this,"axisProps",()=>{const e=this.members.map(t=>{const r=t.view.mark.encoding[t.channel];return"axis"in r&&r.axis});return e.length>0&&e.some(t=>t===null)?null:tu(e.filter(t=>t!==void 0),"axis",["title"])})}getTitle(){const e=s=>{var a;const o=v8(s.view,s.channel);if(!yt(o))return{member:s,explicitTitle:uh("axis"in o?(a=o.axis)==null?void 0:a.title:void 0,o.title),implicitTitle:uh(Nn(o)?o.field:void 0,xo(o)?o.expr:void 0)}},t=this.members.map(e),r=t.filter(s=>{var o;if(uf(s.member.channel)&&!s.explicitTitle){const a=Ir(s.member.channel);return((o=t.find(c=>c.member.view==s.member.view&&c.member.channel==a))==null?void 0:o.explicitTitle)===void 0}return!0}),i=new Set(r.map(s=>uh(s.explicitTitle,s.implicitTitle)).filter(me));return i.size?[...i].join(", "):null}}function ny(n,e,{spacing:t,devicePixelRatio:r,offset:i,reverse:s}={}){t=t||0,i=i||0;let o=0,a=0;for(const p of n)o+=nu(p.px)+(lh(p)?0:t),a+=nu(p.grow);o-=t;const c=Math.max(0,e-o),u=r!==void 0?p=>Math.round(p*r)/r:p=>p,l=[],f=[],d=p=>{const m=l.length;if(!m)return;const g=(p?t:0)*(s?-1:1);h-=g;for(let y=0;y<m;y++)f.push({location:h+(y+1)/(m+1)*g,size:0});h+=g,l.length=0};let h=s?Math.max(e,o):0+i;if(n.length==1&&lh(n[0]))return[{location:h,size:0}];for(let p=0;p<n.length;p++){const m=n[p];if(lh(m))l.push(m);else{d(f.length>0);const g=nu(m.px)+(a?nu(m.grow)/a*c:0);s&&(h-=g),f.push({location:u(h),size:u(g)}),s?h-=t:h+=g+t}}return h+=s?t:-t,d(!1),f}function cI(n){let e=0,t=0;for(const r of n)e=Math.max(e,r.px??0),t=Math.max(t,r.grow??0);return{px:e,grow:t}}const nd=class nd{constructor(e,t){R(this,ia);this.width=e,this.height=t}addPadding(e){return O(this,ia,md).call(this,e.width,e.height)}subtractPadding(e){return O(this,ia,md).call(this,-e.width,-e.height)}isGrowing(){return!!(this.width.grow||this.height.grow)}};ia=new WeakSet,md=function(e,t){return new nd({px:(this.width.px??0)+e,grow:this.width.grow},{px:(this.height.px??0)+t,grow:this.height.grow})};let Wn=nd;const zo=Object.freeze({px:0,grow:0}),ry=new Wn(zo,zo);function lh(n){return!n.px&&!n.grow}function nu(n){return n||0}function uI(n){return n&&(Ze(n.px)||Ze(n.grow))}function iy(n){if(cy(n))throw new Error("parseSizeDef does not accept step-based sizes.");if(uI(n))return n;if(Ze(n))return{px:n,grow:0};if(n==="container")return{px:0,grow:1};if(!n)return{px:0,grow:1};throw new Error(`Invalid sizeDef: ${n}`)}class We{constructor(e,t,r,i){this.top=e||0,this.right=t||0,this.bottom=r||0,this.left=i||0}get width(){return this.left+this.right}get height(){return this.top+this.bottom}expand(e){return e<=0?this:new We(this.top+e,this.right+e,this.bottom+e,this.left+e)}add(e){return new We(this.top+e.top,this.right+e.right,this.bottom+e.bottom,this.left+e.left)}subtract(e){return new We(this.top-e.top,this.right-e.right,this.bottom-e.bottom,this.left-e.left)}union(e){return new We(Math.max(this.top,e.top),Math.max(this.right,e.right),Math.max(this.bottom,e.bottom),Math.max(this.left,e.left))}getHorizontal(){return new We(0,this.right,0,this.left)}getVertical(){return new We(this.top,0,this.bottom,0)}get horizontalTotal(){return this.left+this.right}get verticalTotal(){return this.top+this.bottom}static createFromConfig(e){return typeof e=="number"?this.createUniformPadding(e):e?this.createFromRecord(e):fh}static createFromRecord(e){return new We(e.top,e.right,e.bottom,e.left)}static zero(){return fh}static createUniformPadding(e){return new We(e,e,e,e)}}const fh=We.createUniformPadding(0);Object.freeze(fh);function Uo(n,e){return!e||/^(data:|([A-Za-z]+:)?\/\/)/.test(n)||n.startsWith("/")?n:(e.endsWith("/")||(e+="/"),e+n)}function lI(n){if(!n)return n;if(/[?#]/.test(n))throw new Error(`Invalid base URL: ${n} - cannot contain query or hash.`);return n.endsWith("/")?n:n+"/"}const sy="VISIT_SKIP",Go="VISIT_STOP",oy=n=>n;class ay{constructor(e,t,r,i,s,o={}){R(this,Zt);R(this,ss,{});R(this,os,{});R(this,as,{});R(this,sa);R(this,oa);Y(this,"opacityFunction",oy);R(this,cs,[]);Y(this,"facetCoords",new tn([],JSON.stringify));var a;if(!e)throw new Error("View spec must be defined!");if(this.context=t,this.layoutParent=r,this.dataParent=i,this.name=e.name||s,this.spec=e,this.resolutions={scale:{},axis:{}},I1(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...o},this.flowHandle=void 0,this.needsAxes={x:!1,y:!1},this.paramMediator=new d8(()=>{var c;return(c=this.dataParent)==null?void 0:c.paramMediator}),e.params)for(const c of e.params)this.paramMediator.registerParam(c);if(!((a=this.layoutParent)!=null&&a.options.layeredChildren)){const c=u=>this.paramMediator.findMediatorForParam(u)?void 0:this.paramMediator.allocateSetter(u,0);G(this,oa,c("height")),G(this,sa,c("width"))}}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>We.createFromConfig(this.spec.padding))}getOverhang(){return We.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Wn(O(this,Zt,Ia).call(this,"width"),O(this,Zt,Ia).call(this,"height")):ry)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return ry;const e=this.getSize();return new Wn(O(this,Zt,Ia).call(this,"viewportWidth")??e.width,O(this,Zt,Ia).call(this,"viewportHeight")??e.height)}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(e=>e.isConfiguredVisible())}getEffectiveOpacity(){var e;return this.opacityFunction(((e=this.layoutParent)==null?void 0:e.getEffectiveOpacity())??1)}getPathString(){return this.getLayoutAncestors().map(e=>e.name).reverse().join("/")}getLayoutAncestors(){return O(this,Zt,gd).call(this,"layoutParent")}getDataAncestors(){return O(this,Zt,gd).call(this,"dataParent")}handleBroadcast(e){for(const t of E(this,ss)[e.type]||[])t(e)}_addBroadcastHandler(e,t){let r=E(this,ss)[e];r||(r=[],E(this,ss)[e]=r),r.push(t)}handleInteractionEvent(e,t,r){const i=r?E(this,os):E(this,as);for(const s of i[t.type]||[])s(e,t)}addInteractionEventListener(e,t,r){const i=r?E(this,os):E(this,as);let s=i[e];s||(s=[],i[e]=s),s.push(t)}removeInteractionEventListener(e,t,r){const i=r?E(this,os):E(this,as);let s=i==null?void 0:i[e];if(s){const o=s.indexOf(t);o>=0&&s.splice(o,1)}}visit(e){try{const t=e(this);if(e.postOrder&&e.postOrder(this),t!==Go)return t}catch(t){throw t.view=this,t}}getDescendants(){const e=[];return this.visit(t=>{e.push(t)}),e}dispose(){for(const t of E(this,cs))t();E(this,cs).length=0;const e=this.flowHandle;e!=null&&e.collector&&(this.context.dataFlow.pruneCollectorBranch(e.collector),this.context.dataFlow.removeCollector(e.collector)),e!=null&&e.dataSource&&e.dataSource.view===this&&!e.dataSource.identifier&&this.context.dataFlow.removeDataSource(e.dataSource),this.flowHandle=void 0}registerDisposer(e){E(this,cs).push(e)}disposeSubtree(){const e=()=>{};e.postOrder=t=>{t.dispose()},this.visit(e)}configureViewOpacity(){(!this.opacityFunction||this.opacityFunction===oy)&&(this.opacityFunction=hI(this))}onBeforeRender(){}render(e,t,r={}){var i,s;r.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(r.facetId,r.clipRect?t.intersect(r.clipRect):t),(i=E(this,sa))==null||i.call(this,t.width),(s=E(this,oa))==null||s.call(this,t.height)}getEncoding(){const e=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},t=this.spec.encoding||{},r={...e,...t};for(const[i,s]of Object.entries(r))s===null&&delete r[i];return r}getFacetAccessor(e){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(e){var r;const t=this.getEncoding().sample;return Nn(t)?[t.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(e){const t=Ir(e);return this.getDataAncestors().map(r=>r.resolutions.scale[t]).find(r=>r)}getAxisResolution(e){const t=Ir(e);return this.getDataAncestors().map(r=>r.resolutions.axis[t]).find(r=>r)}getConfiguredResolution(e,t){var r,i;return(i=(r=this.spec.resolve)==null?void 0:r[t])==null?void 0:i[e]}getConfiguredOrDefaultResolution(e,t){return this.getConfiguredResolution(e,t)??this.getConfiguredResolution("default",t)??this.getDefaultResolution(e,t)}getDefaultResolution(e,t){return"independent"}getBaseUrl(){return Or(()=>{var e;return(e=this.dataParent)==null?void 0:e.getBaseUrl()},lI(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const e=this.spec.title;if(e)return me(e)?e:Qe(e.text)?this.paramMediator.evaluateAndGet(e.text.expr):e.text}_cache(e,t){return Jc(this,e,t)}_invalidateCacheByPrefix(e,t="self"){switch(t){case"self":$c(this,e);break;case"ancestors":for(const r of this.getLayoutAncestors())$c(r,e);break;case"progeny":this.visit(r=>$c(r,e));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(e){}}ss=new WeakMap,os=new WeakMap,as=new WeakMap,sa=new WeakMap,oa=new WeakMap,cs=new WeakMap,Zt=new WeakSet,Ia=function(e){var i;let t=this.spec[e];const r=e=="viewportWidth"||e=="viewportHeight";if(cy(t)){if(r)throw new Qn(`Cannot use step-based size with "${e}"!`,this);const s=t.step,o=(i=this.getScaleResolution(e=="width"?"x":"y"))==null?void 0:i.scale;if(o){let a=0;if(jn(o.type))a=o.domain().length;else if(["locus","index"].includes(o.type)){const u=o.domain();a=eo(u)-u[0]}else throw new Qn(`Cannot use step-based size with "${o.type}" scale!`,this);const c=o;return a=jf(a,c.paddingInner(),c.paddingOuter()),{px:a*s,grow:0}}else throw new Qn("Cannot use 'step' size with missing scale!",this)}else return(t&&iy(t))??(r?void 0:{px:0,grow:1})},gd=function(e){const t=[];let r=this;do t.push(r),r=r[e];while(r);return t};function fI(n){return"unitsPerPixel"in n}function hI(n){const e="opacity"in n.spec?n.spec.opacity:void 0;if(e!==void 0){if(Ze(e))return t=>t*e;if(fI(e)){const t=s=>{var a;const o=(a=n.getScaleResolution(s))==null?void 0:a.scale;if(["linear","index","locus"].includes(o==null?void 0:o.type))return o},r=e.channel?t(e.channel):t("x")??t("y");if(!r)throw new Qn("Cannot find a resolved quantitative scale for dynamic opacity!",n);const i=Of().domain(e.unitsPerPixel).range(e.values).clamp(!0);return s=>{const a=Ts(r.domain())/1e3;return i(a)*s}}else if(Qe(e)){const t=n.paramMediator.createExpression(e.expr);return t.addListener(()=>n.context.animator.requestRender()),r=>t(null)*r}}return t=>t}const cy=n=>!!(n!=null&&n.step),dI={point:iD,rect:J5,rule:cD,link:mD,text:wD};class ft extends ay{constructor(t,r,i,s,o,a){super(t,r,i,s,o,a);R(this,us);R(this,aa);this.spec=t;const c=dI[this.getMarkType()];if(c)this.mark=new c(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),G(this,aa,this.paramMediator.allocateSetter("zoomLevel",1));for(const u of["x","y"]){const l=this.getScaleResolution(u);if(l){const f=()=>{E(this,aa).call(this,Math.sqrt(this.getZoomLevel()))};l.addEventListener("domain",f),this.registerDisposer(()=>l.removeEventListener("domain",f))}}this.needsAxes={x:!0,y:!0},O(this,us,Ex).call(this)}render(t,r,i={}){super.render(t,r,i),this.isConfiguredVisible()&&(t.pushView(this,r),t.renderMark(this.mark,i),t.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}getEncoding(){const t=super.getEncoding(),r=this.mark.getSupportedChannels();for(const i of Object.keys(t))r.includes(i)||delete t[i];return t}resolve(t){if(!t){this.resolve("scale"),this.resolve("axis");return}const r=this.mark.encoding;for(const[i,s]of Object.entries(r)){if(!s)continue;let o;if(lt(s))o=s;else if(af(s)){const u=s.condition;if(!Array.isArray(u)&<(u))o=u;else continue}else continue;const a=Ir(o.resolutionChannel??i);if(!Mc(a)||t=="axis"&&!Ao(a))continue;let c=this;for(;(c.getConfiguredOrDefaultResolution(a,t)=="forced"||c.dataParent&&["shared","excluded","forced"].includes(c.dataParent.getConfiguredOrDefaultResolution(a,t)))&&c.getConfiguredOrDefaultResolution(a,t)!="excluded";)c=c.dataParent;if(t=="axis"&&Ao(i)&&cf(a))c.resolutions[t][a]||(c.resolutions[t][a]=new aI(a)),c.resolutions[t][a].addMember({view:this,channel:i,channelDef:o});else if(t=="scale"&&Mc(i)){if(!c.resolutions[t][a]){const l=new rI(a);c.resolutions[t][a]=l,l.addEventListener("range",f=>{var d;(d=this.context.glHelper)==null||d.createRangeTexture(f.scaleResolution,!0)})}const u=this.getLayoutAncestors().some(l=>!l.options.contributesToScaleDomain)||lt(o)&&o.contributesToScaleDomain===!1?void 0:this.extractDataDomain.bind(this);c.resolutions[t][a].addMember({view:this,channel:i,channelDef:o,dataDomainSource:u})}}}dispose(){super.dispose(),O(this,us,Cx).call(this),this.mark.dispose()}getDataAccessor(t){var i;const r=this.mark.encoders;if(r)return(i=r[t])==null?void 0:i.dataAccessor}getFacetAccessor(t){const r=this.getDataAccessor("sample");return r||super.getFacetAccessor(this)}getCollector(){var t;return(t=this.flowHandle)==null?void 0:t.collector}extractDataDomain(t,r){var s;let i=Z1(r);return(((s=this.mark.encoders[t])==null?void 0:s.accessors)??[]).filter(o=>o.scaleChannel).forEach(o=>{if(o.constant)i.extend(o({}));else{const a=this.getCollector();a!=null&&a.completed&&a.visitData(c=>i.extend(o(c)))}}),i}getZoomLevel(){const t=r=>{var i;return((i=this.getScaleResolution(r))==null?void 0:i.getZoomLevel())??1};return Dr.map(t).reduce((r,i)=>r*i,1)}propagateInteractionEvent(t){this.handleInteractionEvent(void 0,t,!0),t.target=this,!t.stopped&&this.handleInteractionEvent(void 0,t,!1)}getDefaultResolution(t,r){return t=="x"?"shared":"independent"}}aa=new WeakMap,us=new WeakSet,Ex=function(){for(const[t,r]of this.paramMediator.paramConfigs){if(!("select"in r))continue;const i=kc(r.select),s=i.on,o=i.clear;if(Fc(i)){let c=0;const u=this.paramMediator.getSetter(t),l=()=>{var p;const h=this.context.getCurrentHover();return((p=h==null?void 0:h.mark)==null?void 0:p.unitView)===this?h.datum:null},f=s.filter?Fm(s.filter):()=>!0,d=(h,p)=>{if(!f(p.proxiedMouseEvent))return;const m=l(),g=m?m[pt]:0;let y;if(i.toggle)if(p.mouseEvent.shiftKey){if(m){const A=this.paramMediator.getValue(t);y=m8(A,{toggle:[m]})}}else y=sf(m?[m]:null);else g!=c&&(c=g,y=rf(m));y!==void 0&&u(y)};if(this.addInteractionEventListener(["mouseover","pointerover"].includes(s.type)?"mousemove":s.type,d),o){const h=o.filter?Fm(o.filter):()=>!0,p=(m,g)=>{if(!h(g.proxiedMouseEvent))return;c=0;const y=i.toggle?sf():rf(null);u(y)};this.addInteractionEventListener(o.type,p)}}}},Cx=function(){for(const t of this.getDataAncestors()){for(const[r,i]of Object.entries(t.resolutions.scale))i&&i.removeMembersByView(this)&&i.members.length===0&&delete t.resolutions.scale[r];for(const[r,i]of Object.entries(t.resolutions.axis))i&&i.removeMembersByView(this)&&i.members.length===0&&delete t.resolutions.axis[r]}};function pI(n){const e=new Set;n.visit(t=>{for(const r of Object.values(t.resolutions.scale)){const i=r.name;if(i&&e.has(i))throw new Error(`The same scale name "${i}" occurs in multiple scale resolutions!`);e.add(i)}})}function mI(n){for(const e of Dr){const t=n.getScaleResolution(e);t&&!t.name&&t.isZoomable()&&(t.name=`${e}_at_root`)}}function gI(n,e=()=>!0){return Promise.allSettled(n).then(t=>{if(e())for(const r of t)"value"in r?r.value.finalizeGraphicsInitialization():"reason"in r&&console.error(r.reason)})}async function yI(n,e,t){const r=n.import;if(!("url"in r))throw new Error("Not an url import: "+JSON.stringify(r));const i=Or(e,r.url);let s;try{const o=await fetch(i);if(!o.ok)throw new Error(`${o.status} ${o.statusText}`);s=await o.json()}catch(o){throw new Error(`Could not load imported view spec: ${i}. Reason: ${o.message}`)}if(t.isViewSpec(s))return s.baseUrl=Or(j1(r.url),s.baseUrl),s;throw new Error(`The imported spec "${i}" is not a view spec: ${JSON.stringify(n)}`)}function bI(n){const e=n.getSize(),t=n.getPadding(),r=(i,s)=>i.grow>0?void 0:i.px+s;return{width:r(e.width,t.horizontalTotal),height:r(e.height,t.verticalTotal)}}function*hh(n,e=[]){for(const[t,r]of n.entries())if(r instanceof Map)for(const i of hh(r,[...e,t]))yield i;else yield[[...e,t],r]}const uy=2147483647,xI=ly([uy]);function ly(n){let e=0;for(let t=0,r=n.length;t<r;t++)e=Math.max(e,n[t]);return Math.floor(Math.log2(e)/4)+1}function AI(n){const e=ly(n);let t=Array.from({length:n.length},(s,o)=>o),r=new Array(n.length);const i=new Array(16);for(let s=0;s<e;s++){i.fill(0);const o=s*4,a=Math.pow(16,s),c=u=>{const l=n[t[u]];return s>=xI?l>uy?Math.floor(l/a)%16:0:l>>o&15};for(let u=0;u<n.length;u++)i[c(u)]++;for(let u=1;u<16;u++)i[u]+=i[u-1];for(let u=n.length-1;u>=0;u--)r[--i[c(u)]]=t[u];[t,r]=[r,t]}return t}class fy extends ql{constructor(t){var r;super();R(this,ht);R(this,gn,[]);R(this,ca,ue(pt));R(this,$n,[]);R(this,Xr);R(this,ls);this.params=t??{type:"collect"},this.observers=new Set,this.facetBatches=new tn([],JSON.stringify),G(this,ls,vI((r=this.params)==null?void 0:r.sort)),O(this,ht,yd).call(this)}get behavior(){return Wl}get label(){return"collect"}reset(){super.reset(),O(this,ht,yd).call(this)}handle(t){E(this,gn).push(t)}beginBatch(t){jC(t)&&(G(this,gn,[]),this.facetBatches.set(He(t.facetId),E(this,gn)))}complete(){var t;if(G(this,gn,[]),(t=this.params.groupby)!=null&&t.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const r=this.facetBatches.get(void 0),i=this.params.groupby.map(o=>ue(o)),s=i.length>1?za(r,...i):wI(r,i[0]);this.facetBatches.clear();for(const[o,a]of hh(s))this.facetBatches.set(o,a)}if(E(this,ls))for(const r of this.facetBatches.values())r.sort(E(this,ls));O(this,ht,Dx).call(this),O(this,ht,bd).call(this),super.complete();for(const r of this.observers)r(this)}observe(t){return this.observers.add(t),()=>{this.observers.delete(t)}}repropagate(){for(const t of this.children)t.reset();O(this,ht,bd).call(this);for(const t of this.children)t.complete()}getData(){switch(O(this,ht,xd).call(this),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const t=this.facetBatches;return{[Symbol.iterator]:function*(){for(const i of t.values())yield*i}}}}}visitData(t){O(this,ht,xd).call(this);for(const r of this.facetBatches.values())for(let i=0;i<r.length;i++)t(r[i])}getItemCount(){let t=0;for(const r of this.facetBatches.values())t+=r.length;return t}findDatumByUniqueId(t){if(!E(this,$n).length)return;const r=dr(c=>c.start).right,i=E(this,ca),s=dr(c=>i(o(c))).left,o=c=>{const u=r(E(this,Xr),c),l=E(this,Xr)[u-1];return!l||c>=l.stop?void 0:this.facetBatches.get(l.facetId)[c-l.start]},a=s(E(this,$n),t);if(a>=0){const c=o(E(this,$n)[a]);if(c&&i(c)===t)return c}}}gn=new WeakMap,ca=new WeakMap,$n=new WeakMap,Xr=new WeakMap,ls=new WeakMap,ht=new WeakSet,yd=function(){G(this,gn,[]),G(this,$n,[]),this.facetBatches.clear(),this.facetBatches.set(void 0,E(this,gn))},bd=function(){if(this.children.length)for(const[t,r]of this.facetBatches.entries()){if(t){const i={type:"facet",facetId:t};for(const s of this.children)s.beginBatch(i)}for(let i=0,s=r.length;i<s;i++)this._propagate(r[i])}},xd=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},Dx=function(){var o;G(this,Xr,[]);const t=(o=this.facetBatches.values().next().value)==null?void 0:o[0];if(t==null||!(pt in t))return;let r=0;const i=[],s=E(this,ca);for(const[a,c]of this.facetBatches){E(this,Xr).push({start:r,stop:r+c.length,facetId:a}),r+=c.length;for(let u=0,l=c.length;u<l;u++)i.push(s(c[u]))}G(this,$n,AI(i))};function wI(n,e){const t=new Map;for(let r=0,i=n.length;r<i;r++){const s=n[r],o=e(s);let a=t.get(o);a||(a=[],t.set(o,a)),a.push(s)}return t}function vI(n){if(n!=null&&n.field){const e=He(n.field);if(e.length==1&&!e[0].includes(".")){const t=He(n.order)[0]??"ascending",r=JSON.stringify(e[0]);return new Function("a","b",`return a[${r}] ${t==="ascending"?"-":"+"} b[${r}];`)}return Pd(n.field,n.order)}}class ru{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(e,t){let r=this.length++;for(;r>0;){const i=r-1>>1,s=this.values[i];if(t>=s)break;this.ids[r]=this.ids[i],this.values[r]=s,r=i}this.ids[r]=e,this.values[r]=t}pop(){if(this.length===0)return;const e=this.ids[0];if(this.length--,this.length>0){const t=this.ids[0]=this.ids[this.length],r=this.values[0]=this.values[this.length],i=this.length>>1;let s=0;for(;s<i;){let o=(s<<1)+1;const a=o+1;let c=this.ids[o],u=this.values[o];const l=this.values[a];if(a<this.length&&l<u&&(o=a,c=this.ids[a],u=l),u>=r)break;this.ids[s]=c,this.values[s]=u,s=o}this.ids[s]=t,this.values[s]=r}return e}peek(){if(this.length!==0)return this.ids[0]}peekValue(){if(this.length!==0)return this.values[0]}shrink(){this.ids.length=this.values.length=this.length}}class SI extends Te{get behavior(){return Ht}constructor(e){super(e),this.params=e,this.startAccessor=ue(e.start),this.endAccessor=ue(e.end),this.chromAccessor=e.chrom?ue(e.chrom):t=>{},this.weightAccessor=e.weight?ue(e.weight):t=>1,this.as={coverage:e.as??"coverage",start:e.asStart??e.start,end:e.asEnd??e.end,chrom:e.asChrom??e.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([t,r])=>r).map(([t,r])=>`${JSON.stringify(r)}: ${t}`).join(", ")+"};"),this.ends=new ru}reset(){super.reset(),this.initialize()}initialize(){const e=this.as.coverage,t=this.as.end,r=this.as.chrom,i=this.startAccessor,s=this.endAccessor,o=this.chromAccessor,a=this.weightAccessor;let c,u,l,f=0,d=NaN;const h=this.ends;h.clear();const p=y=>{this._propagate(y),c=null},m=(y,x,A)=>{if(y==x)return;let w=!1;c&&(c[e]===A?(c[t]=x,w=!0):c[e]!=0&&p(c)),w||(c=this.createSegment(y,x,A,l))},g=()=>{let y=0;for(;(y=h.peekValue())!==void 0;)m(d,y,f),d=y,f-=h.pop();d=NaN,c&&p(c)};this.handle=y=>{const x=i(y);let A=0;for(;(A=h.peekValue())!==void 0&&A<x;)m(d,A,f),d=A,f-=h.pop();if(r){let S=o(y);S!==u&&(g(),l=S,u=l)}isNaN(d)||m(d,x,f),d=x;const w=a(y);f+=w,h.push(w,s(y))},this.complete=()=>{g(),super.complete()},this.beginBatch=y=>{g(),u=null,super.beginBatch(y)}}}function EI(n,e,t=s=>+s,r=0,i=n.length){const s=new ru,o=i-r;let a;for(a=0;a<e&&a<o;a++)s.push(a,t(n[r+a]));for(;a<o;a++){const l=t(n[r+a]);l>=s.peekValue()&&(s.push(a,l),s.pop())}const c=[];let u;for(;(u=s.pop())!==void 0;)c.push(n[r+u]);return c.reverse()}class CI{constructor(e,t=-1/0,r=1/0){this.maxSize=e,this.lowerLimit=t,this.upperLimit=r;const i=this.maxSize*2+1;this.lowerLimits=new Float64Array(i),this.upperLimits=new Float64Array(i),this.lowerChildren=new Int32Array(i),this.upperChildren=new Int32Array(i),this.reset()}reset(){this.lowerLimits.fill(0),this.upperLimits.fill(0),this.lowerChildren.fill(0),this.upperChildren.fill(0),this.n=1,this.lowerLimits[0]=this.lowerLimit,this.upperLimits[0]=this.upperLimit}_findSlot(e,t,r=0){if(e>=this.lowerLimits[r]&&t<=this.upperLimits[r]){const i=this.lowerChildren[r];if(i){const s=this._findSlot(e,t,i);return s>=0?s:this._findSlot(e,t,this.upperChildren[r])}else return r}else return-1}reserve(e,t){if(t-e<=0)throw new Error("Cannot reserve an empty or negative-size slot!");if(this.n+1>this.lowerLimits.length)return!1;const r=this._findSlot(e,t);if(r<0)return!1;const i=this.n++,s=this.n++;return this.lowerLimits[i]=this.lowerLimits[r],this.upperLimits[i]=e,this.lowerLimits[s]=t,this.upperLimits[s]=this.upperLimits[r],this.lowerChildren[r]=i,this.upperChildren[r]=s,!0}}class DI extends Te{get behavior(){return Wl}constructor(e,t){if(super(e),this.params=e,this._data=[],this.channel=e.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.startPosAccessor=ue(this.params.pos),this.endPosAccessor=ue(this.params.pos2??this.params.pos),this.startPosBisector=dr(this.startPosAccessor),this.endPosBisector=dr(this.endPosAccessor),this.scoreAccessor=ue(this.params.score),this.widthAccessor=ue(this.params.width),this.laneAccessor=this.params.lane?ue(this.params.lane):i=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=t.getScaleResolution(this.channel);const r=()=>this._filterAndPropagate();this.schedule=()=>t.context.animator.requestTransition(r),this.resolution.addEventListener("domain",i=>this.schedule()),t._addBroadcastHandler("layoutComputed",()=>this.schedule())}complete(){const e=this.startPosAccessor;this._data.sort((t,r)=>e(t)-e(r));for(const t of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(t,new CI(200));this.schedule(),super.complete()}_filterAndPropagate(){super.reset();const e=this.resolution.scale,t=this.resolution.getAxisLength();if(!t)return;for(const o of this.reservationMaps.values())o.reset();const r=e.domain(),s=EI(this._data,70,this.scoreAccessor,this.endPosBisector.left(this._data,r[0]),this.startPosBisector.right(this._data,r[1]));for(const o of s){let a=e(this.startPosAccessor(o))*t,c=e(this.endPosAccessor(o))*t;const u=c-a,l=this.widthAccessor(o)+this.padding*2;let f=(a+c)/2;const d=Math.max(0,(u-l)/2);if(d>0){const h=Math.max(0,l/2-f);f+=Math.min(h,d);const p=Math.max(0,l/2+f-t);f-=Math.min(p,d)}if(this.reservationMaps.get(this.laneAccessor(o)).reserve(f-l/2,f+l/2))if(this.params.asMidpoint){const h=Object.assign({},o);h[this.params.asMidpoint]=e.invert(f/t),this._propagate(h)}else this._propagate(o)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(e){this._data.push(e)}}class II extends Te{constructor(e,t){super(e,t),this.params=e,this.predicate=void 0}initialize(){let e="";if(TI(this.params))e=this.params.expr;else if(BI(this.params)){const t=this.paramMediator.findValue(this.params.param);if(!t)throw new Error(`Cannot initialize filter transform. Selection parameter "${this.params.param}" not found!`);e=g8(this.params,t)}else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramMediator.createExpression(e),this.predicate.addListener(()=>this.repropagate())}handle(e){this.predicate(e)&&this._propagate(e)}}function TI(n){return"expr"in n}function BI(n){return"param"in n}class kI extends Te{get behavior(){return Ht}constructor(e){super(e),this.params=e;const t=e.index;if(e.fields){const r=He(e.fields).map(s=>ue(s)),i=He(e.as||e.fields);if(r.length!==i.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${i.length}) do not match!`);this.handle=s=>{const o=r.map((c,u)=>c(s)??[]),a=o[0].length;for(let c=0;c<a;c++){const u=Object.assign({},s);for(let l=0;l<r.length;l++)u[i[l]]=c<o[l].length?o[l][c]:null;t&&(u[t]=c),this._propagate(u)}}}else this.handle=r=>{for(let i=0;i<r.length;i++){const s=Object.assign({},r[i]);t&&(s[t]=i),this._propagate(s)}}}}const FI=48;function*PI(n,e=","){const t=e.charCodeAt(0);let r=0;for(let i=0;i<n.length;i++){const s=n.charCodeAt(i);s==t?(yield r,r=0):r=r*10+s-FI}yield r}class MI extends Te{get behavior(){return Ht}constructor(e){super(e);const t=ue(e.exons??"exons"),r=ue(e.start??"start"),[i,s]=e.as||["exonStart","exonEnd"];this.handle=o=>{let a=r(o),c=a,u=!0;const l=t(o);for(const f of PI(l)){if(u)c=a+f;else{a=c+f;const d=Object.assign({},o);d[i]=c,d[s]=a,this._propagate(d)}u=!u}}}}class RI extends Te{get behavior(){return Ht}constructor(e){super(e);const t=He(e.field).map(s=>ue(s)),r=He(e.separator),i=He(e.as||e.field);if(t.length!==r.length||t.length!==i.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${t.length}), and "as" (${i.length}) do not match!`);this.handle=s=>{if(t.some(c=>!c(s)))return;const o=t.map((c,u)=>c(s).split(r[u]));OI(o,s);const a=o[0].length;for(let c=0;c<a;c++){const u=Object.assign({},s);for(let l=0;l<t.length;l++)u[i[l]]=o[l][c];this._propagate(u)}}}}function OI(n,e){const t=n.map(r=>r.length);if(!t.every(r=>r==t[0]))throw new Error("Mismatching number of elements in the fields to be split: "+JSON.stringify(e))}class NI extends Te{get behavior(){return Rn}constructor(e,t){super(e,t),this.params=e,this.as=e.as,this.fn=void 0}initialize(){this.fn=this.paramMediator.createExpression(this.params.expr),this.fn.addListener(()=>this.repropagate())}handle(e){e[this.as]=this.fn(e),this._propagate(e)}}class hy extends Te{get behavior(){return Rn}constructor(e,t){e={channel:"x",...e},super(e),this.params=e;const r=e.channel;if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const i=t.getScaleResolution(r).getGenome();if(!i)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const s=ue(e.chrom),o=He(e.pos).map(p=>ue(p)),a=He(e.as);if(o.length!=a.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=He(e.offset);let u;if(c.length==0)u=new Array(o.length).fill(0);else if(c.length==1)u=new Array(o.length).fill(c[0]);else if(c.length==o.length)u=c;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(e.offset)}!`);const l=new Function("datum","chromOffset","posAccessors",a.map((p,m)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${m}](datum) - ${u[m]};`).join(`
|
|
614
|
+
`));let f,d=0;const h=p=>{if(p!==f){if(d=i.cumulativeChromPositions.get(p),d===void 0)return;f=p}return d};this.handle=p=>{const m=s(p),g=h(m);if(g===void 0)throw new Error(`Unknown chromosome/contig "${m}" in datum: ${JSON.stringify(p)}`);l(p,g,o),this._propagate(p)}}}const dy={chars:JSON.parse('[{"id":87,"width":53,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":43.491,"chnl":15,"x":0,"y":0,"page":0},{"id":124,"width":17,"height":50,"xoffset":0,"yoffset":-32.193000000000005,"xadvance":10.521,"chnl":15,"x":0,"y":42,"page":0},{"id":40,"width":20,"height":49,"xoffset":0,"yoffset":-32.571000000000005,"xadvance":11.214,"chnl":15,"x":0,"y":94,"page":0},{"id":41,"width":19,"height":49,"xoffset":0,"yoffset":-32.571000000000005,"xadvance":11.214,"chnl":15,"x":0,"y":145,"page":0},{"id":36,"width":32,"height":49,"xoffset":0,"yoffset":-34.419000000000004,"xadvance":24.360000000000003,"chnl":15,"x":0,"y":196,"page":0},{"id":125,"width":21,"height":48,"xoffset":0,"yoffset":-32.193000000000005,"xadvance":12.642000000000001,"chnl":15,"x":0,"y":247,"page":0},{"id":91,"width":22,"height":48,"xoffset":0,"yoffset":-32.193000000000005,"xadvance":12.852,"chnl":15,"x":0,"y":297,"page":0},{"id":93,"width":19,"height":48,"xoffset":0,"yoffset":-32.193000000000005,"xadvance":12.852,"chnl":15,"x":0,"y":347,"page":0},{"id":123,"width":21,"height":48,"xoffset":0,"yoffset":-32.193000000000005,"xadvance":12.642000000000001,"chnl":15,"x":0,"y":397,"page":0},{"id":106,"width":19,"height":48,"xoffset":0,"yoffset":-30.639000000000003,"xadvance":10.08,"chnl":15,"x":0,"y":447,"page":0},{"id":81,"width":43,"height":47,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":33.621,"chnl":15,"x":21,"y":447,"page":0},{"id":77,"width":45,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":38.997,"chnl":15,"x":66,"y":447,"page":0},{"id":64,"width":43,"height":44,"xoffset":0,"yoffset":-28.539,"xadvance":35.133,"chnl":15,"x":23,"y":397,"page":0},{"id":92,"width":28,"height":43,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":18.984,"chnl":15,"x":68,"y":397,"page":0},{"id":47,"width":28,"height":43,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":18.984,"chnl":15,"x":98,"y":397,"page":0},{"id":109,"width":42,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":34.545,"chnl":15,"x":113,"y":447,"page":0},{"id":119,"width":42,"height":31,"xoffset":0,"yoffset":-21.315,"xadvance":32.991,"chnl":15,"x":157,"y":447,"page":0},{"id":42,"width":25,"height":42,"xoffset":0,"yoffset":-31.626,"xadvance":17.85,"chnl":15,"x":128,"y":397,"page":0},{"id":37,"width":42,"height":41,"xoffset":0,"yoffset":-30.387,"xadvance":33.663000000000004,"chnl":15,"x":155,"y":397,"page":0},{"id":79,"width":42,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":33.621,"chnl":15,"x":199,"y":397,"page":0},{"id":102,"width":24,"height":41,"xoffset":0,"yoffset":-30.534000000000002,"xadvance":14.721,"chnl":15,"x":243,"y":397,"page":0},{"id":100,"width":31,"height":41,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":23.520000000000003,"chnl":15,"x":269,"y":397,"page":0},{"id":98,"width":32,"height":41,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":23.520000000000003,"chnl":15,"x":302,"y":397,"page":0},{"id":56,"width":32,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":24.360000000000003,"chnl":15,"x":336,"y":397,"page":0},{"id":38,"width":40,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":29.904000000000003,"chnl":15,"x":370,"y":397,"page":0},{"id":108,"width":17,"height":41,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":9.912,"chnl":15,"x":412,"y":397,"page":0},{"id":107,"width":31,"height":41,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":21.336000000000002,"chnl":15,"x":431,"y":397,"page":0},{"id":48,"width":33,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":24.360000000000003,"chnl":15,"x":464,"y":397,"page":0},{"id":71,"width":38,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":30.681,"chnl":15,"x":21,"y":347,"page":0},{"id":83,"width":31,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":22.785,"chnl":15,"x":61,"y":347,"page":0},{"id":63,"width":27,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":18.795,"chnl":15,"x":94,"y":347,"page":0},{"id":105,"width":18,"height":41,"xoffset":0,"yoffset":-30.639000000000003,"xadvance":10.08,"chnl":15,"x":123,"y":347,"page":0},{"id":51,"width":32,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":24.360000000000003,"chnl":15,"x":143,"y":347,"page":0},{"id":104,"width":31,"height":41,"xoffset":0,"yoffset":-30.933000000000003,"xadvance":23.436,"chnl":15,"x":177,"y":347,"page":0},{"id":67,"width":37,"height":41,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":28.056,"chnl":15,"x":210,"y":347,"page":0},{"id":88,"width":37,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":27.258000000000003,"chnl":15,"x":249,"y":347,"page":0},{"id":68,"width":40,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":31.941000000000003,"chnl":15,"x":288,"y":347,"page":0},{"id":70,"width":32,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":23.751,"chnl":15,"x":330,"y":347,"page":0},{"id":34,"width":23,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":15.561000000000002,"chnl":15,"x":364,"y":347,"page":0},{"id":72,"width":38,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":32.067,"chnl":15,"x":389,"y":347,"page":0},{"id":73,"width":18,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":11.760000000000002,"chnl":15,"x":429,"y":347,"page":0},{"id":74,"width":24,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":17.745,"chnl":15,"x":449,"y":347,"page":0},{"id":75,"width":38,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":27.825000000000003,"chnl":15,"x":24,"y":297,"page":0},{"id":76,"width":31,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":21.567,"chnl":15,"x":475,"y":347,"page":0},{"id":66,"width":35,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":27.153000000000002,"chnl":15,"x":64,"y":297,"page":0},{"id":78,"width":38,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":32.067,"chnl":15,"x":101,"y":297,"page":0},{"id":33,"width":18,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":11.298,"chnl":15,"x":141,"y":297,"page":0},{"id":80,"width":34,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":25.221,"chnl":15,"x":161,"y":297,"page":0},{"id":65,"width":38,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":28.434,"chnl":15,"x":197,"y":297,"page":0},{"id":82,"width":36,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":26.313000000000002,"chnl":15,"x":237,"y":297,"page":0},{"id":35,"width":33,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":275,"y":297,"page":0},{"id":84,"width":34,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.801000000000002,"chnl":15,"x":310,"y":297,"page":0},{"id":85,"width":37,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":30.891000000000002,"chnl":15,"x":346,"y":297,"page":0},{"id":86,"width":38,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":28.434,"chnl":15,"x":385,"y":297,"page":0},{"id":39,"width":16,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":8.568000000000001,"chnl":15,"x":425,"y":297,"page":0},{"id":69,"width":32,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.255000000000003,"chnl":15,"x":443,"y":297,"page":0},{"id":89,"width":36,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":26.208000000000002,"chnl":15,"x":23,"y":247,"page":0},{"id":90,"width":34,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":25.284000000000002,"chnl":15,"x":477,"y":297,"page":0},{"id":49,"width":31,"height":40,"xoffset":0,"yoffset":-30.156000000000002,"xadvance":24.360000000000003,"chnl":15,"x":61,"y":247,"page":0},{"id":50,"width":32,"height":40,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":24.360000000000003,"chnl":15,"x":94,"y":247,"page":0},{"id":57,"width":32,"height":40,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":24.360000000000003,"chnl":15,"x":128,"y":247,"page":0},{"id":94,"width":32,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":162,"y":247,"page":0},{"id":96,"width":21,"height":40,"xoffset":0,"yoffset":-30.429000000000002,"xadvance":16.8,"chnl":15,"x":196,"y":247,"page":0},{"id":55,"width":33,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":219,"y":247,"page":0},{"id":54,"width":33,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":254,"y":247,"page":0},{"id":53,"width":32,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":289,"y":247,"page":0},{"id":52,"width":33,"height":40,"xoffset":0,"yoffset":-30.093000000000004,"xadvance":24.360000000000003,"chnl":15,"x":323,"y":247,"page":0},{"id":103,"width":31,"height":39,"xoffset":0,"yoffset":-21.630000000000003,"xadvance":21.84,"chnl":15,"x":358,"y":247,"page":0},{"id":112,"width":32,"height":39,"xoffset":0,"yoffset":-21.651,"xadvance":23.541,"chnl":15,"x":391,"y":247,"page":0},{"id":113,"width":31,"height":39,"xoffset":0,"yoffset":-21.651,"xadvance":23.520000000000003,"chnl":15,"x":425,"y":247,"page":0},{"id":116,"width":25,"height":39,"xoffset":0,"yoffset":-28.182000000000002,"xadvance":15.057,"chnl":15,"x":458,"y":247,"page":0},{"id":121,"width":31,"height":38,"xoffset":0,"yoffset":-21.273,"xadvance":21.651,"chnl":15,"x":34,"y":196,"page":0},{"id":59,"width":18,"height":36,"xoffset":0,"yoffset":-20.706,"xadvance":10.983,"chnl":15,"x":485,"y":247,"page":0},{"id":43,"width":32,"height":34,"xoffset":0,"yoffset":-24.486,"xadvance":24.360000000000003,"chnl":15,"x":67,"y":196,"page":0},{"id":60,"width":30,"height":33,"xoffset":0,"yoffset":-23.331000000000003,"xadvance":24.360000000000003,"chnl":15,"x":101,"y":196,"page":0},{"id":62,"width":31,"height":33,"xoffset":0,"yoffset":-23.331000000000003,"xadvance":24.360000000000003,"chnl":15,"x":133,"y":196,"page":0},{"id":117,"width":30,"height":32,"xoffset":0,"yoffset":-21.273,"xadvance":23.415000000000003,"chnl":15,"x":166,"y":196,"page":0},{"id":99,"width":29,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":20.055,"chnl":15,"x":198,"y":196,"page":0},{"id":110,"width":31,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":23.436,"chnl":15,"x":229,"y":196,"page":0},{"id":111,"width":32,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":23.814,"chnl":15,"x":262,"y":196,"page":0},{"id":126,"width":32,"height":26,"xoffset":0,"yoffset":-16.128,"xadvance":24.360000000000003,"chnl":15,"x":201,"y":447,"page":0},{"id":101,"width":31,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":22.176000000000002,"chnl":15,"x":296,"y":196,"page":0},{"id":114,"width":25,"height":32,"xoffset":0,"yoffset":-21.651,"xadvance":15.288,"chnl":15,"x":329,"y":196,"page":0},{"id":115,"width":27,"height":32,"xoffset":0,"yoffset":-21.609,"xadvance":18.186,"chnl":15,"x":356,"y":196,"page":0},{"id":97,"width":28,"height":32,"xoffset":0,"yoffset":-21.651,"xadvance":20.874000000000002,"chnl":15,"x":385,"y":196,"page":0},{"id":118,"width":31,"height":31,"xoffset":0,"yoffset":-21.273,"xadvance":21.672,"chnl":15,"x":415,"y":196,"page":0},{"id":61,"width":31,"height":29,"xoffset":0,"yoffset":-19.089000000000002,"xadvance":24.360000000000003,"chnl":15,"x":448,"y":196,"page":0},{"id":120,"width":30,"height":31,"xoffset":0,"yoffset":-21.273,"xadvance":20.916,"chnl":15,"x":21,"y":145,"page":0},{"id":58,"width":18,"height":31,"xoffset":0,"yoffset":-20.706,"xadvance":10.5,"chnl":15,"x":53,"y":145,"page":0},{"id":122,"width":28,"height":31,"xoffset":0,"yoffset":-21.273,"xadvance":18.984,"chnl":15,"x":73,"y":145,"page":0},{"id":95,"width":28,"height":16,"xoffset":0,"yoffset":0,"xadvance":19.278000000000002,"chnl":15,"x":235,"y":447,"page":0},{"id":45,"width":23,"height":24,"xoffset":0,"yoffset":-14.175,"xadvance":15.603000000000002,"chnl":15,"x":481,"y":196,"page":0},{"id":44,"width":17,"height":21,"xoffset":0,"yoffset":-4.956,"xadvance":9.534,"chnl":15,"x":103,"y":145,"page":0},{"id":46,"width":18,"height":15,"xoffset":0,"yoffset":-4.956,"xadvance":9.912,"chnl":15,"x":0,"y":497,"page":0},{"id":32,"width":0,"height":0,"xoffset":0,"yoffset":0,"xadvance":10.752,"chnl":15,"x":20,"y":497,"page":0}]'),common:{lineHeight:50.400000000000006,base:41.454,scaleW:512,scaleH:512,pages:1,packed:0,alphaChnl:0,redChnl:0,greenChnl:0,blueChnl:0}};class LI extends Te{get behavior(){return Rn}constructor(e,t){super(e),this.params=e;const r=Ql(dy),i=ue(e.field),s=e.as;let o=0;if(Qe(e.fontSize)){const a=t.paramMediator.createExpression(e.fontSize.expr);o=a(),a.addListener(()=>{o=a(),this.repropagate()})}else o=e.fontSize;this.handle=a=>{const c=i(a);c!==void 0?a[s]=r.measureWidth(c,o):a[s]=0,this._propagate(a)}}}const zI=65536;class UI extends Te{get behavior(){return Rn}constructor(e){super(e),this.params=e}reset(){super.reset(),this.initialize()}initialize(){const e=this.params,t=e.as||"lane",r=Ze(e.spacing)?e.spacing:1,i=ue(e.start),s=ue(e.end);if(!e.preference!=!e.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(e.preference){const o=new Float64Array(zI),a=ue(e.preference),c=e.preferredOrder;let u=1/0;this.handle=l=>{const f=i(l);f<u&&o.fill(-1/0),u=f;const d=c.indexOf(a(l));let h=-1;if(d>=0&&o[d]<f)h=d;else{const p=i(l);for(h=0;h<o.length&&!(o[h]<p);h++);if(h>=o.length)throw new Error("Out of lanes!")}o[h]=s(l)+r,l[t]=h,this._propagate(l)}}else{const o=new ru,a=new ru;let c=-1/0,u=0;this.handle=l=>{const f=i(l);for(;o.length&&(o.peekValue()<=f||f<c);){const h=o.pop();a.push(h,h)}c=f;let d=a.pop();d===void 0&&(d=u++),l[t]=d,this._propagate(l),o.push(d,s(l)+r)}}}}class GI extends Te{get behavior(){return Ht}constructor(e){if(super(e),this.params=e,e.as&&e.as.length!=e.fields.length)throw new Error('"fields" and "as" have unequal lengths!');const t=e.fields.map(i=>ue(i)),r=e.as?e.as:t.map(Se);this.handle=i=>{const s={};for(let o=0;o<t.length;o++)s[r[o]]=t[o](i);this._propagate(s)}}}class HI extends Te{get behavior(){return Rn}constructor(e){super(e),this.params=e;const t=new RegExp(e.regex),r=typeof e.as=="string"?[e.as]:e.as,i=ue(e.field);this.handle=s=>{const o=i(s);if(me(o)){const a=o.match(t);if(a){if(a.length-1!=r.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let c=0;c<r.length;c++)s[r[c]]=a[c+1]}else if(e.skipInvalidInput)for(let c=0;c<r.length;c++)s[r[c]]=void 0;else throw new Error(`"${o}" does not match the given regex: ${t.toString()}`)}else if(!e.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof o}, field content: "${o}".`);this._propagate(s)}}}class VI extends Te{get behavior(){return Ht}constructor(e){super(e),this.params=e;const t=He(e.columnRegex).map(d=>new RegExp(d));for(const d of t)if(RegExp("|"+d.source).exec("").length-1!=1)throw new Error(`Regex ${d.toString()} must have exactly one capturing group!`);const r=He(e.asValue);if(t.length!=r.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const i=e.skipRegex?new RegExp(e.skipRegex):void 0,s=e.asKey||"sample";let o,a,c;const u=d=>{var g;const h=Object.keys(d);for(const y of t)if(!h.some(x=>y.test(x)))throw new Error(`No columns matching the regex ${y.toString()} found in the data!`);const p=new Map;for(const[y,x]of t.entries())for(const A of h){const w=(g=x.exec(A))==null?void 0:g[1];if(w!==void 0){let S=p.get(w);S||(S=[],p.set(w,S)),S[y]=A}}o=[...p.entries()],a=h.filter(y=>!t.some(x=>x.test(y))&&!(i&&i.test(y)));const m=[...a.map(y=>JSON.stringify(y)+": datum["+JSON.stringify(y)+"]"),JSON.stringify(s)+": sampleId",...r.map((y,x)=>JSON.stringify(y)+`: datum[attrs[${x}]]`)];c=new Function("datum","sampleId","attrs",`return {
|
|
615
|
+
`+m.join(`,
|
|
616
616
|
`)+`
|
|
617
|
-
};`)},u=d=>{s||l(d);for(let h=0;h<s.length;h++){const[p,y]=s[h],v=c(d,p,y);this._propagate(v)}},f=d=>{l(d),u(d),this.handle=u};this.handle=f,this.beginBatch=d=>{Lm(d)&&(this.handle=f),super.beginBatch(d)}}}class ak extends yt{get behavior(){return Sr}constructor(e){super(e),this.params=e,this.buffer=[]}reset(){this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const e=this.params,n=e.as||["y0","y1"],r=e.sort?sp(e.sort.field,e.sort.order):void 0,o=e.field?Qe(e.field):()=>1,i=e.groupby.map(u=>Qe(u)),s=d3(this.buffer,u=>i.map(f=>f(u)).join()).map(u=>u[1]);let a=u=>!0;if(e.baseField){const u=Qe(e.baseField);a=f=>u(f)!==null}let c,l;switch(e.offset){case"normalize":c=(u,f)=>u/f,l=(u,f)=>Ts(u,f);break;case"center":c=(u,f)=>u-f/2,l=(u,f)=>Ts(u,f);break;case"information":{const u=Math.log2(e.cardinality??4);c=(f,d)=>f/d,l=(f,d)=>{const p=Ts(f,A=>+!a(A)),y=Ts(f,d),v=y-p;let b=0;for(let A=0;A<f.length;A++){const S=f[A];if(a(S)){const E=d(S)/v;b-=E*Math.log2(E)}}return v/(u-(b+0))*(v/y)}}break;default:c=(u,f)=>u,l=(u,f)=>1}for(const u of s){r&&u.sort(r);const f=l(u,o);let d=0;for(const h of u){const p=d+o(h);a(h)&&(h[n[0]]=c(d,f),h[n[1]]=c(p,f),this._propagate(h),d=p)}}super.complete()}}class ck extends yt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=Qe(e.field??"sequence"),[r,o]=e.as??["pos","sequence"];this.handle=i=>{const s=Object.assign({},i,{[o]:"",[r]:0}),a=n(i);for(let c=0;c<a.length;c++){const l=Object.assign({},s);l[r]=c,l[o]=a.charAt(c),this._propagate(l)}}}}const Ub={count:t=>t.length,valid:a3,sum:Ts,min:Zu,max:Qu,mean:w3,median:x3,variance:c3};class lk extends yt{get behavior(){return On}constructor(e){if(super(e),this.params=e,this.buffer=[],this.ops=[],this.as=[],e.fields){if(e.fields.length!=e.ops.length)throw new Error("Fields and ops must have the same length!");if(e.as&&e.as.length!=e.ops.length)throw new Error('If "as" is defined, "fields" and "as" must have the same length!');e.fields.forEach((n,r)=>{const o=Qe(n),i=Ub[e.ops[r]];this.ops.push(s=>i(s,o)),this.as.push(e.as?e.as[r]:`${e.ops[r]}_${e.fields[r]}`)})}else this.ops.push(n=>Ub.count(n)),this.as.push("count")}reset(){super.reset(),this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const e=this.params,n=e==null?void 0:e.groupby;if((n==null?void 0:n.length)>0){const r=n.map(i=>Qe(i)),o=Cc(this.buffer,...r);for(const[i,s]of ud(o)){const a={};for(let c=0;c<n.length;c++)a[n[c]]=i[c];this.ops.forEach((c,l)=>{a[this.as[l]]=c(s)}),this._propagate(a)}}else{const r={};this.ops.forEach((o,i)=>{r[this.as[i]]=o(this.buffer)}),this._propagate(r)}super.complete()}}const uk={aggregate:lk,collect:Ob,coverage:GB,filterScoredLabels:jB,filter:qB,flatten:QB,flattenCompressedExons:KB,flattenDelimited:JB,flattenSequence:ck,formula:ek,identifier:Yf,linearizeGenomicCoordinate:Nb,measureText:tk,pileup:rk,project:ik,regexExtract:ok,regexFold:sk,sample:ab,stack:ak};function fk(t,e){const n=uk[t.type];if(n)return new n(t,e);throw new Error("Unknown transform: "+t.type)}function Gb(t,e=[]){if(!jb(t)&&!Vb(t))return;const n={...t.format};if(n.type??(n.type=Vb(t)&&dk(e)),n.parse??(n.parse="auto"),!n.type)throw new Error("Format for the data source was not defined and it could not be inferred: "+JSON.stringify(t));return n}function hk(t){var e;return((e=ff(t))==null?void 0:e.responseType)??"text"}function dk(t){var e;if(Array.isArray(t)&&(t=t[0]),t)return(e=t.match(/\.(csv|tsv|json)/))==null?void 0:e[1]}const Hb=t=>typeof t!="object"?pk:gk,pk=t=>({data:t}),gk=t=>t;function Vb(t){return"url"in t}class Ao extends Wf{constructor(n){super();Gt(this,"view");this.view=n}get identifier(){}setLoadingStatus(n,r){this.view.context.setDataLoadingStatus(this.view,n,r)}get paramMediator(){return this.view.paramMediator}handle(n){throw new Error("Source does not handle incoming data!")}async load(){}repropagate(){this.load()}}function jb(t){return"values"in t}class mk extends Ao{constructor(n,r){var o;super(r);he(this,Ka);if(this.params=n,typeof n.values=="string"&&!((o=n==null?void 0:n.format)!=null&&o.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}get label(){return"inlineSource"}isTrivial(){const n=this.params.values,r=Array.isArray(n)?n[0]:n;return!!(r&&Object.keys(r).length==0&&r.constructor===Object)}updateDynamicData(n){pe(this,Ka,Z0).call(this,n)}loadSynchronously(){pe(this,Ka,Z0).call(this,this.params.values)}async load(){this.loadSynchronously()}}Ka=new WeakSet,Z0=function(n){let r=[],o=i=>i;if(Array.isArray(n))n.length>0&&(r=n,o=Hb(n[0]));else if(typeof n=="object")r=[n];else if(typeof n=="string")r=hf(n,Gb(this.params));else throw new Error('"values" in data configuration is not an array, object, or a string!');this.reset(),this.beginBatch({type:"file"});for(const i of r)this._propagate(o(i));this.complete()};function yk(t){return"url"in t}class bk extends Ao{constructor(n,r){super(r);he(this,Cu);this.params=ml(r.paramMediator,n,()=>this.load()),this.baseUrl=r==null?void 0:r.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}get label(){return"urlSource"}async load(){const n=cn(this.params.url),r=typeof n=="object"&&"urlsFromFile"in n?await pe(this,Cu,Yv).call(this,n):(Array.isArray(n)?n:[n]).map(c=>Si(this.baseUrl,c)),o=Gb(this.params,r),i=hk(o.type);if(r.length===0||!r[0]){this.reset(),this.complete();return}const s=async c=>{try{const l=await fetch(c);if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return typeof l[i]=="function"?l[i]():l.text()}catch(l){throw new Error(`Could not load data: ${c}. Reason: ${l.message}`)}},a=(c,l)=>{try{const u=hf(c,o);this.beginBatch({type:"file",url:l});for(const f of u)this._propagate(f)}catch(u){throw new Error(`Cannot parse: ${l}: ${u.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(r.map(c=>s(c).then(a))),this.setLoadingStatus("complete")}catch(c){this.setLoadingStatus("error",c.message)}this.complete()}}Cu=new WeakSet,Yv=async function(n){const r=Si(this.baseUrl,n.urlsFromFile),o=await fetch(r);if(!o.ok)throw new Error(`Cannot load "${r}": ${o.status} ${o.statusText}`);const i=await o.text();return hf(i,{type:n.type??"tsv"}).map(a=>typeof a=="string"?a:a.url).map(a=>Si(r,a))};function wk(t){return"sequence"in t}class xk extends Ao{constructor(e,n){if(super(n),this.sequence=ml(n.paramMediator,e.sequence,()=>this.loadSynchronously()),!("start"in this.sequence))throw new Error("'start' is missing from sequence parameters!");if(!("stop"in this.sequence))throw new Error("'stop' is missing from sequence parameters!")}get label(){return"sequenceSource"}loadSynchronously(){const e=cn(this.sequence.as)??"data",n=cn(this.sequence.start)??0,r=cn(this.sequence.step)??1,o=cn(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let i=n;i<o;i+=r)this._propagate({[e]:i});this.complete()}async load(){this.loadSynchronously()}}class fd extends Ao{constructor(n,r){super(n);Gt(this,"initializedPromise",Promise.resolve());if(r){if(r!=="x"&&r!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${r}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the lazy data source. Must be either "x" or "y".');if(this.channel=r,this.scaleResolution=this.view.getScaleResolution(r),!this.scaleResolution){const i=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof en||i.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(i.join(" "))}const o=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",o),this.view.context.addBroadcastListener("layoutComputed",o)}get genome(){return this.scaleResolution.getGenome()}onDomainChanged(n,r){}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(n){this.reset(),this.beginBatch({type:"file"});for(const r of n)for(const o of r)this._propagate(o);this.complete(),sd(this.view)}}class vk extends fd{constructor(n,r){const o={...n};super(r,o.channel);Gt(this,"ticks",[]);this.params=n}get label(){return"axisTickSource"}async load(){this.ticks=null,this.onDomainChanged()}onDomainChanged(){const n=this.scaleResolution.scale,r=this.scaleResolution.getAxisLength(),o=this.params.axis,i=l=>25+60*r1(100,700,l),s=Ht(o.tickCount)?o.tickCount:Math.round(r/i(r)),a=lb(n,s,o.tickMinStep),c=o.values?ub(n,o.values,a):WD(n,a);if(this.ticks==null||!Uc(c,this.ticks)){this.ticks=c;const l=QD(n,s,o.format);this.publishData([c.map(u=>({value:u,label:l(u)}))])}}}class Ak extends fd{constructor(e,n){super(n,e.channel)}get label(){return"axisGenomeSource"}async load(){this.publishData([this.genome.chromosomes])}}function ql(t,e,n=!0){let r,o=s=>{};return function(...a){return new Promise((c,l)=>{const u=()=>{clearTimeout(r),o=f=>{},c(t(...a))};n&&o("debounced"),clearTimeout(r),o=l,r=window.setTimeout(u,typeof e=="function"?e():e)})}}class Ta extends fd{constructor(){super(...arguments);he(this,$o,new AbortController);he(this,es,[0,0]);he(this,ts,[0,0]);he(this,Ja,0);Gt(this,"params")}setupDebouncing(n){const r=()=>cn(n.debounce),o=n.debounceMode;if(o=="domain")this.onDomainChanged=ql(this.onDomainChanged.bind(this),r,!1);else if(o=="window")this.loadInterval=ql(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+o)}onDomainChanged(n){var o;Ae(this,ts,n);const r=cn((o=this.params)==null?void 0:o.windowSize)??-1;n[1]-n[0]>r||this.callIfWindowsChanged(n,r,async i=>{await this.initializedPromise,this.loadInterval(i)})}reloadLastDomain(){const n=j(this,ts);Ae(this,ts,[0,0]),Ae(this,es,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){j(this,$o).abort(),this.setLoadingStatus("loading"),Ae(this,$o,new AbortController);const o=j(this,$o).signal,i=this.genome.continuousToDiscreteChromosomeIntervals(n);try{const s=await Promise.all(i.map(async a=>r(a,o)));if(!o.aborted)return this.setLoadingStatus("complete"),s}catch(s){if(!o.aborted)throw this.setLoadingStatus("error",s.message),s}}callIfWindowsChanged(n,r,o){const i=[Math.max(Math.floor(n[0]/r)*r,0),Math.min(Math.ceil(n[1]/r)*r,this.genome.totalSize)],s=j(this,es);(r!==j(this,Ja)||i[0]<s[0]||i[1]>s[1])&&(Ae(this,es,i),Ae(this,Ja,r),o(i))}}$o=new WeakMap,es=new WeakMap,ts=new WeakMap,Ja=new WeakMap;class Ek extends Ta{constructor(e,n){const r={channel:"x",windowSize:7e3,debounce:200,debounceMode:"window",...e};if(super(n,r.channel),this.params=r,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(o=>{Promise.all([Promise.resolve().then(()=>hR),Promise.resolve().then(()=>RR),Promise.resolve().then(()=>_a)]).then(([{Buffer:i},{IndexedFasta:s},{RemoteFile:a}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=i));const c=l=>new a(Ca(l,this.view.getBaseUrl()));this.fasta=new s({fasta:c(this.params.url),fai:c(this.params.indexUrl??this.params.url+".fai")}),o()})})}get label(){return"bigWigSource"}async loadInterval(e){const n=await this.discretizeAndLoad(e,async(r,o)=>this.fasta.getSequence(r.chrom,r.startPos,r.endPos,{signal:o}).then(i=>({chrom:r.chrom,start:r.startPos,sequence:i})));n&&this.publishData([n])}}class Sk extends Ta{constructor(n,r){const o={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},i=ml(r.paramMediator,o,s=>{s.includes("url")?pe(this,$a,X0).call(this).then(()=>this.reloadLastDomain()):s.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,i.channel);he(this,$a);he(this,ns,[]);he(this,rs);if(this.params=i,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),pe(this,$a,X0).call(this)}get label(){return"bigWigSource"}async onDomainChanged(n){await this.initializedPromise;const r=this.scaleResolution.getAxisLength()||700,o=Ck(n,r,j(this,ns)),i=Math.max(o*r,5e3);this.callIfWindowsChanged(n,i,s=>this.loadInterval(s,o))}async loadInterval(n,r){const o=.5/r/cn(this.params.pixelsPerBin),i=await this.discretizeAndLoad(n,(s,a)=>j(this,rs).getFeatures(s.chrom,s.startPos,s.endPos,{scale:o,signal:a}).then(c=>c.map(l=>({chrom:s.chrom,start:l.start,end:l.end,score:l.score}))));i&&this.publishData(i)}}ns=new WeakMap,rs=new WeakMap,$a=new WeakSet,X0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>Ax),Promise.resolve().then(()=>_a)]).then(([{BigWig:o},{RemoteFile:i}])=>{Ae(this,rs,new o({filehandle:new i(Ca(cn(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),j(this,rs).getHeader().then(s=>{Ae(this,ns,s.zoomLevels.map(a=>a.reductionLevel).reverse()),j(this,ns).push(1),this.setLoadingStatus("complete"),n()}).catch(s=>{this.load(),this.setLoadingStatus("error",`${cn(this.params.url)}: ${s.message}`),r(s)})})}),this.initializedPromise};function Ck(t,e,n){const r=(t[1]-t[0])/e;return n.find(o=>o<r)??n.at(-1)}class Ik extends Ta{constructor(n,r){const o={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},i=ml(r.paramMediator,o,s=>{s.includes("url")?pe(this,ec,K0).call(this).then(()=>this.reloadLastDomain()):s.includes("windowSize")&&this.reloadLastDomain()});super(r,i.channel);he(this,ec);Gt(this,"parser");Gt(this,"bbi");Gt(this,"parseLine");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),pe(this,ec,K0).call(this)}get label(){return"bigBedSource"}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(o,i)=>this.bbi.getFeatures(o.chrom,o.startPos,o.endPos,{signal:i}).then(s=>s.map(a=>this.parseLine(o.chrom,a))));r&&this.publishData(r)}}ec=new WeakSet,K0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>W9),Promise.resolve().then(()=>Ax),Promise.resolve().then(()=>_a)]).then(([o,{BigBed:i},{RemoteFile:s}])=>{const a=o.default;this.bbi=new i({filehandle:new s(Ca(cn(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async c=>{this.parser=new a({autoSql:c.autoSql});try{const l=Tk(this.parser);this.parseLine=(u,f)=>l(u,f.start,f.end,f.rest)}catch{this.parseLine=(u,f)=>this.parser.parseLine(`${u} ${f.start} ${f.end} ${f.rest}`)}this.setLoadingStatus("complete"),n()}).catch(c=>{this.load(),this.setLoadingStatus("error",`${cn(this.params.url)}: ${c.message}`),r(c)})})}),this.initializedPromise};function Tk(t){const e=t.autoSql.fields.filter(A=>A.type).slice(3);let n=0,r="",o=0,i={};const s=" ",a=s.charCodeAt(0),c=48,l=45;function u(){let A=r.indexOf(s,n);A<0&&(A=o);const S=r.substring(n,A);return n=A+1,S}function f(){let A=0,S=r.charCodeAt(n),E=1;S===l&&(E=-1,n++,S=r.charCodeAt(n));do{if(S===a){n++;break}A=A*10+S-c,S=r.charCodeAt(++n)}while(n<o);return A*E}const d=e.map(A=>`${JSON.stringify(A.name)}: ${A.isNumeric?"0":"emptyString"}`),h=new Function(`
|
|
617
|
+
};`)},l=d=>{o||u(d);for(let h=0;h<o.length;h++){const[p,m]=o[h],g=c(d,p,m);this._propagate(g)}},f=d=>{u(d),l(d),this.handle=l};this.handle=f,this.beginBatch=d=>{cm(d)&&(this.handle=f),super.beginBatch(d)}}}class _I extends Te{get behavior(){return Rn}constructor(e){super(e),this.params=e,this.buffer=[]}reset(){this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const e=this.params,t=e.as||["y0","y1"],r=e.sort?Pd(e.sort.field,e.sort.order):void 0,i=e.field?ue(e.field):()=>1,s=e.groupby.map(l=>ue(l)),o=WA(this.buffer,l=>s.map(f=>f(l)).join()).map(l=>l[1]);let a=l=>!0;if(e.baseField){const l=ue(e.baseField);a=f=>l(f)!==null}let c,u;switch(e.offset){case"normalize":c=(l,f)=>l/f,u=(l,f)=>Gs(l,f);break;case"center":c=(l,f)=>l-f/2,u=(l,f)=>Gs(l,f);break;case"information":{const l=Math.log2(e.cardinality??4);c=(f,d)=>f/d,u=(f,d)=>{const p=Gs(f,x=>+!a(x)),m=Gs(f,d),g=m-p;let y=0;for(let x=0;x<f.length;x++){const A=f[x];if(a(A)){const w=d(A)/g;y-=w*Math.log2(w)}}return g/(l-(y+0))*(g/m)}}break;default:c=(l,f)=>l,u=(l,f)=>1}for(const l of o){r&&l.sort(r);const f=u(l,i);let d=0;for(const h of l){const p=d+i(h);a(h)&&(h[t[0]]=c(d,f),h[t[1]]=c(p,f),this._propagate(h),d=p)}}super.complete()}}class jI extends Te{get behavior(){return Ht}constructor(e){super(e),this.params=e;const t=ue(e.field??"sequence"),[r,i]=e.as??["pos","sequence"];this.handle=s=>{const o=Object.assign({},s,{[i]:"",[r]:0}),a=t(s);for(let c=0;c<a.length;c++){const u=Object.assign({},o);u[r]=c,u[i]=a.charAt(c),this._propagate(u)}}}}const py={count:n=>n.length,valid:GA,sum:Gs,min:Ku,max:Zu,mean:JA,median:$A,variance:HA};class QI extends Te{get behavior(){return Ht}constructor(e){if(super(e),this.params=e,this.buffer=[],this.ops=[],this.as=[],e.fields){if(e.fields.length!=e.ops.length)throw new Error("Fields and ops must have the same length!");if(e.as&&e.as.length!=e.ops.length)throw new Error('If "as" is defined, "fields" and "as" must have the same length!');e.fields.forEach((t,r)=>{const i=ue(t),s=py[e.ops[r]];this.ops.push(o=>s(o,i)),this.as.push(e.as?e.as[r]:`${e.ops[r]}_${e.fields[r]}`)})}else this.ops.push(t=>py.count(t)),this.as.push("count")}reset(){super.reset(),this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const e=this.params,t=e==null?void 0:e.groupby;if((t==null?void 0:t.length)>0){const r=t.map(s=>ue(s)),i=za(this.buffer,...r);for(const[s,o]of hh(i)){const a={};for(let c=0;c<t.length;c++)a[t[c]]=s[c];this.ops.forEach((c,u)=>{a[this.as[u]]=c(o)}),this._propagate(a)}}else{const r={};this.ops.forEach((i,s)=>{r[this.as[s]]=i(this.buffer)}),this._propagate(r)}super.complete()}}const WI={aggregate:QI,collect:fy,coverage:SI,filterScoredLabels:DI,filter:II,flatten:kI,flattenCompressedExons:MI,flattenDelimited:RI,flattenSequence:jI,formula:NI,identifier:Yl,linearizeGenomicCoordinate:hy,measureText:LI,pileup:UI,project:GI,regexExtract:HI,regexFold:VI,sample:M1,stack:_I};function qI(n,e){const t=WI[n.type];if(t)return new t(n,e);throw new Error("Unknown transform: "+n.type)}function my(n,e=[]){if(!by(n)&&!yy(n))return;const t={...n.format};if(t.type??(t.type=yy(n)&&XI(e)),t.parse??(t.parse="auto"),!t.type)throw new Error("Format for the data source was not defined and it could not be inferred: "+JSON.stringify(n));return t}function YI(n){var e;return((e=hl(n))==null?void 0:e.responseType)??"text"}function XI(n){var e;if(Array.isArray(n)&&(n=n[0]),n)return(e=n.match(/\.(csv|tsv|json)/))==null?void 0:e[1]}const gy=n=>typeof n!="object"?ZI:KI,ZI=n=>({data:n}),KI=n=>n;function yy(n){return"url"in n}class Nr extends ql{constructor(t){super();Y(this,"view");this.view=t}get identifier(){}setLoadingStatus(t,r){this.view.context.setDataLoadingStatus(this.view,t,r)}get paramMediator(){return this.view.paramMediator}handle(t){throw new Error("Source does not handle incoming data!")}async load(){}repropagate(){this.load()}}function by(n){return"values"in n}class JI extends Nr{constructor(t,r){var i;super(r);R(this,ua);if(this.params=t,typeof t.values=="string"&&!((i=t==null?void 0:t.format)!=null&&i.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}get label(){return"inlineSource"}isTrivial(){const t=this.params.values,r=Array.isArray(t)?t[0]:t;return!!(r&&Object.keys(r).length==0&&r.constructor===Object)}updateDynamicData(t){O(this,ua,Ad).call(this,t)}loadSynchronously(){O(this,ua,Ad).call(this,this.params.values)}async load(){this.loadSynchronously()}}ua=new WeakSet,Ad=function(t){let r=[],i=s=>s;if(Array.isArray(t))t.length>0&&(r=t,i=gy(t[0]));else if(typeof t=="object")r=[t];else if(typeof t=="string")r=dl(t,my(this.params));else throw new Error('"values" in data configuration is not an array, object, or a string!');this.reset(),this.beginBatch({type:"file"});for(const s of r)this._propagate(i(s));this.complete()};function $I(n){return"url"in n}class e9 extends Nr{constructor(t,r){super(r);R(this,Cu);this.params=Bc(r.paramMediator,t,()=>this.load()),this.baseUrl=r==null?void 0:r.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}get label(){return"urlSource"}async load(){const t=gt(this.params.url),r=typeof t=="object"&&"urlsFromFile"in t?await O(this,Cu,Ix).call(this,t):(Array.isArray(t)?t:[t]).map(c=>Or(this.baseUrl,c)),i=my(this.params,r),s=YI(i.type);if(r.length===0||!r[0]){this.reset(),this.complete();return}const o=async c=>{try{const u=await fetch(c);if(!u.ok)throw new Error(`${u.status} ${u.statusText}`);return typeof u[s]=="function"?u[s]():u.text()}catch(u){throw new Error(`Could not load data: ${c}. Reason: ${u.message}`)}},a=(c,u)=>{try{const l=dl(c,i);this.beginBatch({type:"file",url:u});for(const f of l)this._propagate(f)}catch(l){throw new Error(`Cannot parse: ${u}: ${l.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(r.map(c=>o(c).then(a))),this.setLoadingStatus("complete")}catch(c){this.setLoadingStatus("error",c.message)}this.complete()}}Cu=new WeakSet,Ix=async function(t){const r=Or(this.baseUrl,t.urlsFromFile),i=await fetch(r);if(!i.ok)throw new Error(`Cannot load "${r}": ${i.status} ${i.statusText}`);const s=await i.text();return dl(s,{type:t.type??"tsv"}).map(a=>typeof a=="string"?a:a.url).map(a=>Or(r,a))};function t9(n){return"sequence"in n}class n9 extends Nr{constructor(e,t){if(super(t),this.sequence=Bc(t.paramMediator,e.sequence,()=>this.loadSynchronously()),!("start"in this.sequence))throw new Error("'start' is missing from sequence parameters!");if(!("stop"in this.sequence))throw new Error("'stop' is missing from sequence parameters!")}get label(){return"sequenceSource"}loadSynchronously(){const e=gt(this.sequence.as)??"data",t=gt(this.sequence.start)??0,r=gt(this.sequence.step)??1,i=gt(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let s=t;s<i;s+=r)this._propagate({[e]:s});this.complete()}async load(){this.loadSynchronously()}}class dh extends Nr{constructor(t,r){super(t);Y(this,"initializedPromise",Promise.resolve());if(r){if(r!=="x"&&r!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${r}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the lazy data source. Must be either "x" or "y".');if(this.channel=r,this.scaleResolution=this.view.getScaleResolution(r),!this.scaleResolution){const s=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof ft||s.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(s.join(" "))}const i=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",i),this.view.context.addBroadcastListener("layoutComputed",i)}get genome(){return this.scaleResolution.getGenome()}onDomainChanged(t,r){}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(t){this.reset(),this.beginBatch({type:"file"});for(const r of t)for(const i of r)this._propagate(i);this.complete(),ty(this.view)}}class r9 extends dh{constructor(t,r){const i={...t};super(r,i.channel);Y(this,"ticks",[]);this.params=t}get label(){return"axisTickSource"}async load(){this.ticks=null,this.onDomainChanged()}onDomainChanged(){const t=this.scaleResolution.scale,r=this.scaleResolution.getAxisLength(),i=this.params.axis,s=u=>25+60*Bm(100,700,u),o=Ze(i.tickCount)?i.tickCount:Math.round(r/s(r)),a=O1(t,o,i.tickMinStep),c=i.values?N1(t,i.values,a):ED(t,a);if(this.ticks==null||!$a(c,this.ticks)){this.ticks=c;const u=DD(t,o,i.format);this.publishData([c.map(l=>({value:l,label:u(l)}))])}}}class i9 extends dh{constructor(e,t){super(t,e.channel)}get label(){return"axisGenomeSource"}async load(){this.publishData([this.genome.chromosomes])}}function iu(n,e,t=!0){let r,i=o=>{};return function(...a){return new Promise((c,u)=>{const l=()=>{clearTimeout(r),i=f=>{},c(n(...a))};t&&i("debounced"),clearTimeout(r),i=u,r=window.setTimeout(l,typeof e=="function"?e():e)})}}class Ho extends dh{constructor(){super(...arguments);R(this,fs,new AbortController);R(this,hs,[0,0]);R(this,ds,[0,0]);R(this,la,0);Y(this,"params")}setupDebouncing(t){const r=()=>gt(t.debounce),i=t.debounceMode;if(i=="domain")this.onDomainChanged=iu(this.onDomainChanged.bind(this),r,!1);else if(i=="window")this.loadInterval=iu(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+i)}onDomainChanged(t){var i;G(this,ds,t);const r=gt((i=this.params)==null?void 0:i.windowSize)??-1;t[1]-t[0]>r||this.callIfWindowsChanged(t,r,async s=>{await this.initializedPromise,this.loadInterval(s)})}reloadLastDomain(){const t=E(this,ds);G(this,ds,[0,0]),G(this,hs,[0,0]),this.onDomainChanged(t)}async loadInterval(t){}async discretizeAndLoad(t,r){E(this,fs).abort(),this.setLoadingStatus("loading"),G(this,fs,new AbortController);const i=E(this,fs).signal,s=this.genome.continuousToDiscreteChromosomeIntervals(t);try{const o=await Promise.all(s.map(async a=>r(a,i)));if(!i.aborted)return this.setLoadingStatus("complete"),o}catch(o){if(!i.aborted)throw this.setLoadingStatus("error",o.message),o}}callIfWindowsChanged(t,r,i){const s=[Math.max(Math.floor(t[0]/r)*r,0),Math.min(Math.ceil(t[1]/r)*r,this.genome.totalSize)],o=E(this,hs);(r!==E(this,la)||s[0]<o[0]||s[1]>o[1])&&(G(this,hs,s),G(this,la,r),i(s))}}fs=new WeakMap,hs=new WeakMap,ds=new WeakMap,la=new WeakMap;class s9 extends Ho{constructor(e,t){const r={channel:"x",windowSize:7e3,debounce:200,debounceMode:"window",...e};if(super(t,r.channel),this.params=r,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>LB),Promise.resolve().then(()=>_o)]).then(([{IndexedFasta:s},{RemoteFile:o}])=>{const a=c=>new o(Uo(c,this.view.getBaseUrl()));this.fasta=new s({fasta:a(this.params.url),fai:a(this.params.indexUrl??this.params.url+".fai")}),i()})})}get label(){return"bigWigSource"}async loadInterval(e){const t=await this.discretizeAndLoad(e,async(r,i)=>this.fasta.getSequence(r.chrom,r.startPos,r.endPos,{signal:i}).then(s=>{if(s!=null)return{chrom:r.chrom,start:r.startPos,sequence:s};console.log(`No sequence found for interval ${r.chrom}:${r.startPos}-${r.endPos}`)}));this.publishData([t.filter(r=>r!==void 0)])}}class o9 extends Ho{constructor(t,r){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...t},s=Bc(r.paramMediator,i,o=>{o.includes("url")?O(this,fa,wd).call(this).then(()=>this.reloadLastDomain()):o.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,s.channel);R(this,fa);R(this,ps,[]);R(this,ms);if(this.params=s,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),O(this,fa,wd).call(this)}get label(){return"bigWigSource"}async onDomainChanged(t){await this.initializedPromise;const r=this.scaleResolution.getAxisLength()||700,i=a9(t,r,E(this,ps)),s=Math.max(i*r,5e3);this.callIfWindowsChanged(t,s,o=>this.loadInterval(o,i))}async loadInterval(t,r){const i=.5/r/gt(this.params.pixelsPerBin),s=await this.discretizeAndLoad(t,(o,a)=>E(this,ms).getFeatures(o.chrom,o.startPos,o.endPos,{scale:i,signal:a}).then(c=>c.map(u=>({chrom:o.chrom,start:u.start,end:u.end,score:u.score}))));s&&this.publishData(s)}}ps=new WeakMap,ms=new WeakMap,fa=new WeakSet,wd=function(){return this.initializedPromise=new Promise((t,r)=>{Promise.all([Promise.resolve().then(()=>wb),Promise.resolve().then(()=>_o)]).then(([{BigWig:i},{RemoteFile:s}])=>{G(this,ms,new i({filehandle:new s(Uo(gt(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),E(this,ms).getHeader().then(o=>{G(this,ps,o.zoomLevels.map(a=>a.reductionLevel).reverse()),E(this,ps).push(1),this.setLoadingStatus("complete"),t()}).catch(o=>{this.load(),this.setLoadingStatus("error",`${gt(this.params.url)}: ${o.message}`),r(o)})})}),this.initializedPromise};function a9(n,e,t){const r=(n[1]-n[0])/e;return t.find(i=>i<r)??t.at(-1)}class c9 extends Ho{constructor(t,r){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...t},s=Bc(r.paramMediator,i,o=>{o.includes("url")?O(this,ha,vd).call(this).then(()=>this.reloadLastDomain()):o.includes("windowSize")&&this.reloadLastDomain()});super(r,s.channel);R(this,ha);Y(this,"parser");Y(this,"bbi");Y(this,"parseLine");if(this.params=s,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),O(this,ha,vd).call(this)}get label(){return"bigBedSource"}async loadInterval(t){const r=await this.discretizeAndLoad(t,async(i,s)=>this.bbi.getFeatures(i.chrom,i.startPos,i.endPos,{signal:s}).then(o=>o.map(a=>this.parseLine(i.chrom,a))));r&&this.publishData(r)}}ha=new WeakSet,vd=function(){return this.initializedPromise=new Promise((t,r)=>{Promise.all([Promise.resolve().then(()=>_k),Promise.resolve().then(()=>wb),Promise.resolve().then(()=>_o)]).then(([i,{BigBed:s},{RemoteFile:o}])=>{const a=i.default;this.bbi=new s({filehandle:new o(Uo(gt(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async c=>{this.parser=new a({autoSql:c.autoSql});try{const u=u9(this.parser);this.parseLine=(l,f)=>u(l,f.start,f.end,f.rest)}catch{this.parseLine=(l,f)=>this.parser.parseLine(`${l} ${f.start} ${f.end} ${f.rest}`)}this.setLoadingStatus("complete"),t()}).catch(c=>{this.load(),this.setLoadingStatus("error",`${gt(this.params.url)}: ${c.message}`),r(c)})})}),this.initializedPromise};function u9(n){const e=n.autoSql.fields.filter(x=>x.type).slice(3);let t=0,r="",i=0,s={};const o=" ",a=o.charCodeAt(0),c=48,u=45;function l(){let x=r.indexOf(o,t);x<0&&(x=i);const A=r.substring(t,x);return t=x+1,A}function f(){let x=0,A=r.charCodeAt(t),w=1;A===u&&(w=-1,t++,A=r.charCodeAt(t));do{if(A===a){t++;break}x=x*10+A-c,A=r.charCodeAt(++t)}while(t<i);return x*w}const d=e.map(x=>`${JSON.stringify(x.name)}: ${x.isNumeric?"0":"emptyString"}`),h=new Function(`
|
|
618
618
|
const emptyString = "";
|
|
619
619
|
return function makeTemplate(chrom, chromStart, chromEnd) {
|
|
620
620
|
return {
|
|
@@ -624,109 +624,103 @@ chrM 16299`};function gB(t){if(!(t in yb))throw new Error(`Unknown assembly: ${t
|
|
|
624
624
|
${d.join(`,
|
|
625
625
|
`)}
|
|
626
626
|
}
|
|
627
|
-
};`)(),p=e.map(
|
|
628
|
-
${
|
|
627
|
+
};`)(),p=e.map(x=>{const A=x.type,w=JSON.stringify(x.name);if(["ubyte","int","uint"].includes(A))return`d[${w}] = parseInt();`;if(x.isNumeric)return`d[${w}] = Number(parseString());`;if(["char","string","lstring"].includes(A))return`d[${w}] = parseString();`;throw new Error("Unsupported type: "+A)}),m=l9(p,50).map((x,A)=>Function("parseInt","parseString",`return function parseFieldChunk${A}(d) {
|
|
628
|
+
${x.join(`
|
|
629
629
|
`)}
|
|
630
|
-
}`)(f,
|
|
631
|
-
`),{parseSequences:!1})}}tc=new WeakMap;class _k extends qb{constructor(){super(...arguments);he(this,nc)}get label(){return"vcfSource"}async _handleHeader(n){const r=(await Promise.resolve().then(()=>VM)).default;Ae(this,nc,new r({header:n}))}_parseFeatures(n){return n.map(r=>{const o=j(this,nc).parseLine(r);return delete o.GENOTYPES,o.SAMPLES=o.SAMPLES(),o})}}nc=new WeakMap;function Rk(t,e){if(jb(t))return new mk(t,e);if(yk(t))return new bk(t,e);if(wk(t))return new xk(t,e);if(Fk(t))return Hk(t.lazy,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function Fk(t){return"lazy"in t}function Mk(t){return(t==null?void 0:t.type)=="axisTicks"}function Pk(t){return(t==null?void 0:t.type)=="axisGenome"}function Lk(t){return(t==null?void 0:t.type)=="indexedFasta"}function Ok(t){return(t==null?void 0:t.type)=="bigwig"}function Nk(t){return(t==null?void 0:t.type)=="bigbed"}function zk(t){return(t==null?void 0:t.type)=="bam"}function Uk(t){return(t==null?void 0:t.type)=="gff3"}function Gk(t){return(t==null?void 0:t.type)=="vcf"}function Hk(t,e){if(Mk(t))return new vk(t,e);if(Pk(t))return new Ak(t,e);if(Lk(t))return new Ek(t,e);if(Ok(t))return new Sk(t,e);if(Nk(t))return new Ik(t,e);if(zk(t))return new Bk(t,e);if(Uk(t))return new kk(t,e);if(Gk(t))return new _k(t,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function Vk(t){const e=Wb(t).filter(r=>typeof r=="string"),n=new Function("source","return { "+e.map(r=>JSON.stringify(r)).map(r=>`${r}: source[${r}]`).join(`,
|
|
632
|
-
`)+" };");return n.properties=e,n}function Wb(t){let e=[];do e=e.concat(Object.keys(t)),t=Object.getPrototypeOf(t);while(t&&t!==Object.prototype);return Array.from(new Set(e))}class Wl extends yt{constructor(){super({type:"clone"});he(this,os);he(this,rc,n=>n);const n=r=>{const o=Wb(r);(!j(this,os)||!Uc(o,j(this,os)))&&(Ae(this,os,o),Ae(this,rc,Vk(r)));const i=j(this,rc);this.handle=s=>this._propagate(i(s)),this.handle(r)};this.handle=n,this.beginBatch=r=>{Lm(r)&&(this.handle=n),super.beginBatch(r)}}get behavior(){return On}}os=new WeakMap,rc=new WeakMap;function jk(t){return"name"in t}class Yb extends Ao{constructor(n,r,o){super(r);he(this,ic);this.provider=o,this.params=n}get identifier(){return this.params.name}get label(){return"namedSource"}updateDynamicData(n){Ae(this,ic,n),this.loadSynchronously()}loadSynchronously(){const n=j(this,ic)??this.provider(this.params.name)??[];let r=o=>o;if(Array.isArray(n))n.length>0&&(r=Hb(n[0]));else throw new Error(`Named data "${this.params.name}" is not an array!`);this.reset(),this.beginBatch({type:"file"});for(const o of n)this._propagate(r(o));this.complete()}async load(){this.loadSynchronously()}}ic=new WeakMap;class Qb{constructor(){this._dataSourcesByHost=new Map,this._collectorsByHost=new Map,this._observers=new Map}get dataSources(){return[...new Set(this._dataSourcesByHost.values()).values()]}get collectors(){return[...this._collectorsByHost.values()]}addObserver(e,n){let r=this._observers.get(n);r||(r=[],this._observers.set(n,r)),r.push(e)}_relayObserverCallback(e,n){const r=this._observers.get(n);if(r)for(const o of r)o(e)}addDataSource(e,n){this._dataSourcesByHost.set(n,e)}findDataSourceByKey(e){return this._dataSourcesByHost.get(e)}findNamedDataSource(e){let n,r=[];for(const[o,i]of this._dataSourcesByHost.entries())if(i instanceof Yb&&e==i.identifier){if(n&&n!==i)throw new Error(`Found multiple instances of named data: ${e}. Data flow optimization is broken (it's a bug).`);n=i,r.push(o)}if(n)return{dataSource:n,hosts:r}}addCollector(e,n){this._collectorsByHost.set(n,e),e.observers.push(r=>this._relayObserverCallback(r,n))}findCollectorByKey(e){return this._collectorsByHost.get(e)}initialize(){for(const e of this.dataSources)e.visit(n=>n.initialize())}}function qk(t,e){const n=new Map,r=[];for(const o of t)n.set(o,{ref:o,children:[]});for(const o of n.values()){const i=n.get(e(o.ref));i?i.children.push(o):r.push(o)}return r}function Zb(t,e,n){var o,i;const r=(o=e.preOrder)==null?void 0:o.call(e,t);if(r)return r;for(const s of n(t)){const a=Zb(s,e,n);if(a==="stop")return a}return(i=e.postOrder)==null?void 0:i.call(e,t)}function Wk(t,e){return Zb(t,e,n=>n.children)}function Yk(t,e){const n=[],r=[];let o;const i=e??new Qb,s=[];function a(h,p=()=>{}){if(!o)throw p()||new Error("Cannot append data flow node, no parent exist!");return o.addChild(h),o=h,n.push(h),h}function c(h,p){return a(h,()=>new Error("Cannot append a transform because no (inherited) data are available! "))}function l(h,p){for(const y of h){let v;try{v=fk(y,p)}catch(b){throw console.warn(b),new Error(`Cannot initialize "${y.type}" transform: ${b}`)}v.behavior&Sr&&c(new Wl),c(v)}}function u(){return n.findLastIndex(h=>h instanceof Yf)>n.findLastIndex(h=>h instanceof Ao)}const f=h=>{if(h.spec.data){const p=jk(h.spec.data)?new Yb(h.spec.data,h,h.context.getNamedDataFromProvider):Rk(h.spec.data,h);o=p,n.push(p),i.addDataSource(p,h)}if(h.spec.transform&&l(h.spec.transform,h),h instanceof en){if(!o)throw new Error(`A unit view (${h.getPathString()}) has no (inherited) data source`);const p=Qk(h);if(p){s.push(p.rewrite);for(const v of p.transforms)c(v)}h.mark.isPickingParticipant()&&!u()&&(c(new Wl),c(new Yf({type:"identifier"})));const y=new Ob({type:"collect",groupby:h.getFacetFields(),sort:Zk(h,p==null?void 0:p.rewrittenEncoding)});a(y),i.addCollector(y,h)}},d=qk(t.getDescendants(),h=>h.dataParent);for(const h of d)Wk(h,{preOrder:p=>{r.push({view:p.ref,nodeStackDepth:n.length}),f(p.ref)},postOrder:()=>{const{nodeStackDepth:p}=r.pop();n.length=p,o=n.at(-1)}});return s.forEach(h=>h()),i}function Qk(t){var i;const e=[],n={},r=[];for(const[s,a]of Object.entries(t.getEncoding())){const c=s;sa(c)&&y1(a)&&r.push({channel:c,chromPosDef:a})}const o=Cc(r,s=>mi(s.channel),s=>s.chromPosDef.chrom);for(const[s,a]of o.entries())for(const[c,l]of a.entries()){const u=[],f=[],d=[];for(const{channel:h,chromPosDef:p}of l){const y=A=>A.replace(/[^A-Za-z0-9_]/g,""),v=["_linearized_",y(p.chrom),"_",y(p.pos)].join(""),b={...((i=t.spec.encoding)==null?void 0:i[h])??t.getEncoding()[h]??{},field:v};delete b.chrom,delete b.pos,!b.type&&p.type&&(b.type=p.type),n[h]=b,u.push(p.pos),d.push(p.offset??0),f.push(v)}e.push(new Wl),e.push(new Nb({type:"linearizeGenomicCoordinate",channel:s,chrom:c,pos:u,offset:d,as:f},t))}return e.length?{transforms:e,rewrittenEncoding:n,rewrite:()=>{t.spec.encoding={...t.spec.encoding,...n},gD(t.mark,"encoding")}}:void 0}function Zk(t,e){var r;const n={...t.getEncoding(),...e}.x;if($t(n)&&(r=t.getScaleResolution("x"))!=null&&r.isZoomable()){if(Ir(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!ia(n)){if(oa(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function Xb(t,e=void 0){if(t.parent!==e)return!1;for(const n of t.children)if(!Xb(n,t))return!1;return!0}function hd(t,e=!1){if(t.behavior&qf&&(e=!0),t instanceof Wl)if(e)e=!1;else{const n=t.children[0];t.excise(),n&&hd(n,e);return}t.behavior&On&&(e=!1);for(let n=0,r=t.children.length;n<r;n++)hd(t.children[n],e||r>1)}function Xk(t){const e=[...t._dataSourcesByHost.entries()],n=new Map;for(const r of e){const o=r[1];o.identifier&&!n.has(o.identifier)&&n.set(o.identifier,o)}t._dataSourcesByHost.clear();for(let[r,o]of e){const i=n.get(o.identifier);i&&(i.adoptChildrenOf(o),o=i),t.addDataSource(o,r)}}function Kk(t){if(hd(t),!Xb(t))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function Jk(t){Xk(t);for(const e of t.dataSources)Kk(e)}function $k(t){const e=new Set;t.visit(n=>{for(const r of Object.values(n.resolutions.scale)){const o=r.name;if(o&&e.has(o))throw new Error(`The same scale name "${o}" occurs in multiple scale resolutions!`);e.add(o)}})}function e_(t){for(const e of gi){const n=t.getScaleResolution(e);n&&!n.name&&n.isZoomable()&&(n.name=`${e}_at_root`)}}async function t_(t,e,n){const r=t.import;if(!("url"in r))throw new Error("Not an url import: "+JSON.stringify(r));const o=Si(e,r.url);let i;try{const s=await fetch(o);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);i=await s.json()}catch(s){throw new Error(`Could not load imported view spec: ${o}. Reason: ${s.message}`)}if(n.isViewSpec(i))return i.baseUrl=Si(bb(r.url),i.baseUrl),i;throw new Error(`The imported spec "${o}" is not a view spec: ${JSON.stringify(t)}`)}function n_(t){const e=t.getSize(),n=t.getPadding(),r=(o,i)=>o.grow>0?void 0:o.px+i;return{width:r(e.width,n.horizontalTotal),height:r(e.height,n.verticalTotal)}}function nr(t){return()=>t}const Dn=class Dn{static create(e,n,r,o){return new Dn(nr(e),nr(n),nr(r),nr(o))}_offset(e,n){const r=this["_"+e];if(n===0)return r;switch(typeof n){case"number":return()=>r()+n;case"function":return()=>r()+n();default:throw new Error("Not a number of function")}}_passThrough(e){return this._offset(e,0)}constructor(e,n,r,o){this._x=e,this._y=n,this._width=r,this._height=o}get x(){return this._x()}get y(){return this._y()}get width(){return this._width()}get height(){return this._height()}get x2(){return this._x()+this._width()}get y2(){return this._y()+this._height()}equals(e){return e?this===e||this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height:!1}modify(e){if(!Object.keys(e).length)return this;const n=r=>{const o=e[r];return typeof o=="number"?nr(o):typeof o=="function"?o:this._passThrough(r)};return new Dn(n("x"),n("y"),n("width"),n("height"))}translate(e,n){return e===0&&n===0?this:new Dn(this._offset("x",e),this._offset("y",n),this._passThrough("width"),this._passThrough("height"))}translateBy(e){return this.translate(e.x,e.y)}expand(e,n=1){return e.left==0&&e.top==0&&e.right==0&&e.bottom==0?this:new Dn(e.left?this._offset("x",-e.left*n):this._passThrough("x"),e.top?this._offset("y",-e.top*n):this._passThrough("y"),e.width?this._offset("width",e.width*n):this._passThrough("width"),e.height?this._offset("height",e.height*n):this._passThrough("height"))}shrink(e){return this.expand(e,-1)}intersect(e){return this===e||e==null?this:new Dn(()=>Math.max(this.x,e.x),()=>Math.max(this.y,e.y),()=>Math.min(this.x2,e.x2)-Math.max(this.x,e.x),()=>Math.min(this.y2,e.y2)-Math.max(this.y,e.y))}union(e){return this===e||e==null?this:new Dn(()=>Math.min(this.x,e.x),()=>Math.min(this.y,e.y),()=>Math.max(this.x2,e.x2)-Math.min(this.x,e.x),()=>Math.max(this.y2,e.y2)-Math.min(this.y,e.y))}isDefined(){return this.width>=0&&this.height>=0}flatten(){return new Dn(nr(this.x),nr(this.y),nr(this.width),nr(this.height))}containsPoint(e,n){return e>=this.x&&e<this.x2&&n>=this.y&&n<this.y2}normalizePoint(e,n,r=!1){const o={x:(e-this.x)/this.width,y:(n-this.y)/this.height};return r&&(o.y=1-o.y),o}denormalizePoint(e,n,r=!1){return r&&(n=1-n),{x:this.x+e*this.width,y:this.y+n*this.height}}toString(){return`Rectangle: x: ${this.x}, y: ${this.y}, width: ${this.width}, height: ${this.height}`}toRoundedString(){return`Rectangle: x: ${Math.round(this.x)}, y: ${Math.round(this.y)}, width: ${Math.round(this.width)}, height: ${Math.round(this.height)}`}};Gt(Dn,"ZERO",Dn.create(0,0,0,0));let Sn=Dn;class Kb{constructor(e){this.globalOptions=e}pushView(e,n){}popView(e){}renderMark(e,n){}getDevicePixelRatio(){return 1}}class dd extends Kb{constructor(n,r){super(n);he(this,Iu);he(this,oc,[0,0,0,0]);he(this,Bn);he(this,sc,[]);he(this,ss);he(this,ac);he(this,cc,new Set);he(this,lc);he(this,as,1);he(this,uc,{width:0,height:0});if(Ae(this,ac,r.webGLHelper),Ae(this,ss,r.framebufferInfo),Ae(this,as,r.devicePixelRatio),Ae(this,uc,r.canvasSize),r.clearColor){const o=kr(r.clearColor).rgb();Ae(this,oc,[o.r/255,o.g/255,o.b/255,o.opacity])}}getDevicePixelRatio(){return j(this,as)}pushView(n,r){j(this,cc).add(n),Ae(this,lc,r)}renderMark(n,r){if(this.globalOptions.picking&&!n.isPickingParticipant())return;const o=n.render(r);o&&j(this,sc).push({mark:n,callback:o,coords:j(this,lc),clipRect:r.clipRect})}render(){if(j(this,Bn)||pe(this,Iu,Qv).call(this),j(this,Bn).length==0)return;const n=j(this,ac).gl,r=j(this,ss);r?(n.bindFramebuffer(n.FRAMEBUFFER,r.framebuffer),n.viewport(0,0,r.width,r.height)):n.viewport(0,0,n.drawingBufferWidth,n.drawingBufferHeight),n.disable(n.SCISSOR_TEST),n.clearColor(...j(this,oc)),n.clear(n.COLOR_BUFFER_BIT);for(const o of j(this,cc))o.onBeforeRender();for(const o of j(this,Bn))o();j(this,ss)&&n.bindFramebuffer(n.FRAMEBUFFER,null)}}oc=new WeakMap,Bn=new WeakMap,sc=new WeakMap,ss=new WeakMap,ac=new WeakMap,cc=new WeakMap,lc=new WeakMap,as=new WeakMap,uc=new WeakMap,Iu=new WeakSet,Qv=function(){Ae(this,Bn,[]);let n=!0,r=!0;const o=a=>()=>{n&&a()},i=a=>()=>{n&&r&&a()},s=Cc(j(this,sc).reverse(),a=>a.mark);for(const[a,c]of[...s.entries()].reverse()){if(!a.isReady())continue;j(this,Bn).push(()=>{n=a.unitView.getEffectiveOpacity()>0}),j(this,Bn).push(...a.prepareRender(this.globalOptions).map(u=>o(u)));let l;for(const u of c){const f=u.coords;f.equals(l)||j(this,Bn).push(o(()=>{r=a.setViewport(j(this,uc),j(this,as),f,u.clipRect)})),j(this,Bn).push(i(u.callback)),l=u.coords}}};class r_ extends Kb{constructor(...e){super({}),this.contexts=e}pushView(e,n){for(const r of this.contexts)r.pushView(e,n)}popView(e){for(const n of this.contexts)n.popView(e)}renderMark(e,n){for(const r of this.contexts)r.renderMark(e,n)}}class i_{constructor(e,n){he(this,cs);this.point=e,this.uiEvent=n,this.stopped=!1,this.target=void 0}stopPropagation(){this.stopped=!0}get type(){return this.uiEvent.type}get proxiedMouseEvent(){return j(this,cs)||Ae(this,cs,o_(this.mouseEvent)),j(this,cs)}get mouseEvent(){if(this.uiEvent instanceof MouseEvent)return this.uiEvent;throw new Error("Not a MouseEvent!")}}cs=new WeakMap;function o_(t){const e=r=>r===null||typeof r!="object"&&typeof r!="function",n={get(r,o,i){const s=Reflect.get(r,o,r);if(!e(s))throw new Error(`Access to non-primitive property "${String(o)}" is not allowed.`);return s},getPrototypeOf(){return null},ownKeys(r){return Reflect.ownKeys(r).filter(i=>e(r[i])).map(i=>typeof i=="symbol"?i:String(i))},getOwnPropertyDescriptor(r,o){const i=Reflect.getOwnPropertyDescriptor(r,o);if(i&&!("get"in i||"set"in i)&&e(i.value))return{value:i.value,writable:!!i.writable,enumerable:!!i.enumerable,configurable:!!i.configurable}},has(r,o){return o in r?e(r[o]):!1}};return new Proxy(t,n)}class Xt{static fromMouseEvent(e){return new Xt(e.clientX,e.clientY)}constructor(e,n){this.x=e,this.y=n}subtract(e){return new Xt(this.x-e.x,this.y-e.y)}add(e){return new Xt(this.x-e.x,this.y-e.y)}multiply(e){return new Xt(this.x*e,this.y*e)}get length(){return Math.sqrt(this.x**2+this.y**2)}equals(e){return e?e===this||e.x===this.x&&e.y===this.y:!1}}const s_=t=>new Promise(e=>setTimeout(e,t));function a_(t){const e=t.requestAnimationFrame||window.requestAnimationFrame,n=t.signal,r=()=>new Promise((o,i)=>{if(n!=null&&n.aborted)return i("aborted");const s=performance.now(),a=s+(t.duration||1e3),c=typeof t.from=="number"?t.from:0,l=typeof t.to=="number"?t.to:1,u=t.easingFunction||(y=>y),f=y=>(y-s)/(a-s),d=y=>y*(l-c)+c,h=y=>Math.max(0,Math.min(1,y)),p=y=>{n!=null&&n.aborted?i("aborted"):(t.onUpdate(d(u(h(f(y))))),y<a?e(p):(t.onUpdate(d(u(1))),o()))};e(p)});return t.delay?n!=null&&n.aborted?Promise.reject("aborted"):s_(t.delay).then(r):r()}class c_{constructor(e){this._renderCallback=e,this._renderRequested=!1,this._warn=!1,this.transitions=[]}requestTransition(e){this.cancelTransition(e),this.transitions.push(e),this.requestRender()}cancelTransition(e){const n=this.transitions.indexOf(e);n>=0&&this.transitions.splice(n,1)}requestRender(){this._renderRequested?this._warn&&console.warn("Render already requested!"):(this._renderRequested=!0,window.requestAnimationFrame(e=>{this._renderRequested=!1;const n=this.transitions;this.transitions=[];let r;for(;r=n.shift();)r(e);this._renderCallback(e)}))}transition(e){return a_({requestAnimationFrame:n=>this.requestTransition(n),...e})}}function pd(t,e,n,r,o){let i=0,s=!0,a=structuredClone(o),c=a;function l(d,h,p,y){return h+(d-h)*Math.pow(2,-p/y)}function u(d){if(s)return;const h=d-i;i=d;for(const y of Object.keys(c))a[y]=l(a[y],c[y],h,n);e(a);let p=-1/0;for(const y of Object.keys(c))p=Math.max(p,Math.abs(c[y]-a[y]));p<r?(a=c,e(a),s=!0,p!=0&&t.requestRender()):t.requestTransition(y=>u(y))}function f(d){c=d,s&&(s=!1,i=+document.timeline.currentTime,u(i))}return f.stop=()=>{s=!0},f}class l_{constructor(e){this.genomes=new Map,this.baseUrl=e}async initialize(e){const n=new yB(e);return this.genomes.set(n.name,n),Promise.all([...this.genomes.values()].map(r=>r.load(this.baseUrl)))}getGenome(e){if(!this.genomes.size)throw new Error("No genomes have been configured!");if(e){const n=this.genomes.get(e);if(!n)throw new Error(`No genome with the name ${e} has been configured!`);return n}else{if(this.genomes.size>1)throw new Error("Cannot pick a default genome! More than one have been configured!");return this.genomes.values().next().value}}}const u_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMhERycB36XD+hX0/DuzSlsnw3OfyilcwAA/vn/yzQQMoUHg9r59hhn7Oz/njH9ncJAiAXNj9P2qTxdhARETufgDYNs4fsH/Cv2jL53nzm1lcZH2dngKCP/Gnn/LTEiXg+Tw/Q+btvJ1+/vlPfvYz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AC2b6ekhCeS88sCoOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",f_={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class h_{constructor(e){this._webGLHelper=e,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new Yn([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:jf(zb),texture:e?this._createTextureNow(u_):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(e,n="normal",r="regular"){if(rt(r)&&(r=f_[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const o={family:e,style:n,weight:r};let i=this._fonts.get(o);return i||(i={metrics:void 0,texture:void 0},this._fonts.set(o,i),this._promises.push(this._loadFontEntry(i,o))),i}async _loadFontEntry(e,n){try{const r=await this._loadMetadata(n.family),o=p_(r,n),i=this.fontRepository+Jb(n.family)+"/"+o.replace(/\.\w+/,""),s=this._createTexture(i+".png"),a=this._loadFont(i+".json");e.texture=await s,e.metrics=await a}catch{console.warn(`Cannot load font: "${n.family}". Using the embedded default font.`),e.metrics=this._defaultFontEntry.metrics,e.texture=this._defaultFontEntry.texture}}_loadFont(e){let n=this._fontPromises.get(e);return n||(n=fetch(e).then(r=>{if(!r.ok)throw new Error("Could not load font: "+r.status);return r}).then(r=>r.json()).then(r=>jf(r)),this._fontPromises.set(e,n)),n}_loadMetadata(e){const n=Jb(e);let r=this._metadataPromises.get(n);if(!r){const o=this.fontRepository+n+"/METADATA.pb";r=fetch(o).then(i=>{if(!i.ok)throw new Error("Could not load font metadata. Response status: "+i.status+", url: "+o);return i}).then(i=>i.text()).then(i=>d_(i)).catch(i=>{console.warn(i.message)}),this._metadataPromises.set(n,r)}return r}getDefaultFont(){return this._defaultFontEntry}_createTexture(e){const n=this._webGLHelper.gl;return new Promise((r,o)=>{Ys(n,{src:e,min:n.LINEAR},(i,s,a)=>{i?o(i):r(s)})})}_createTextureNow(e){const n=this._webGLHelper.gl;let r;const o=new Promise((i,s)=>{r=Ys(n,{src:e,min:n.LINEAR},(a,c,l)=>{a?s(a):i(c)})});return this._promises.push(o),r}}function Jb(t){return t.toLowerCase().replaceAll(/[^\w]/g,"")}function d_(t){const e=t.split(`
|
|
633
|
-
`)
|
|
634
|
-
`))if(o.startsWith(">"))r={identifier:o.match(/>(\S+)/)[1],sequence:""},n.push(r);else if(r)r.sequence+=o.trim();else throw new Error("Invalid fasta file!");return n}class m_{constructor(e,n){this.animator=e,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=pd(e,r=>{var i;const o=r.x-this.lastValue;this.lastValue=r.x,(i=this.callback)==null||i.call(this,o)},40,.1,{x:0})}cancel(){this.lastValue!==this.targetValue&&(this.targetValue=lp([this.lastValue,this.targetValue],.3),this.smoother({x:this.targetValue}))}setMomentum(e,n){if(this.disabled){n(e);return}this.callback=n;const r=lo(this.targetValue+e-this.lastValue,-this.maxDistance,this.maxDistance);this.targetValue=this.lastValue+r,this.smoother({x:this.targetValue})}}function y_(t){const e={},n=["string","number","boolean"],r=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const o in t){const i=o;!r.includes(o)&&n.includes(typeof t[i])&&(e[i]=t[i])}return e}const $b=new Map,b_={Organism:"Homo sapiens"};async function w_(t,e,n={}){const r=t.symbol,o={...b_,...n,GENE:r};let i=$b.get(r)??await A_(o);return i?($b.set(r,i),ot`
|
|
630
|
+
}`)(f,l));function g(x){r=x,i=x.length,t=0}function y(x,A,w,S){g(S),s=h(x,A,w);for(const C of m)C(s);return s}return y}function l9(n,e){return Array.from({length:Math.ceil(n.length/e)},(t,r)=>n.slice(r*e,r*e+e))}class f9 extends Ho{constructor(t,r){const i={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...t};super(r,i.channel);R(this,Zr);Y(this,"chrPrefixFixer",t=>t);if(this.params=i,!this.params.url)throw new Error("No URL provided for BamSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(s=>{Promise.all([Promise.resolve().then(()=>p7),Promise.resolve().then(()=>_o)]).then(([{BamFile:o},{RemoteFile:a}])=>{const c=u=>new a(Uo(u,this.view.getBaseUrl()));G(this,Zr,new o({bamFilehandle:c(this.params.url),baiFilehandle:c(this.params.indexUrl??this.params.url+".bai")})),E(this,Zr).getHeader().then(u=>{var d,h;const l=this.genome.hasChrPrefix(),f=(h=(d=E(this,Zr).indexToChr)==null?void 0:d[0])==null?void 0:h.refName.startsWith("chr");l&&!f?this.chrPrefixFixer=p=>p.replace("chr",""):!l&&f&&(this.chrPrefixFixer=p=>"chr"+p),s()})})})}get label(){return"bamSource"}async loadInterval(t){const r=await this.discretizeAndLoad(t,async(i,s)=>E(this,Zr).getRecordsForRange(this.chrPrefixFixer(i.chrom),i.startPos,i.endPos,{signal:s}).then(o=>o.map(a=>({chrom:i.chrom,start:a.start,end:a.end,name:a.name,cigar:a.CIGAR,mapq:a.mq,strand:a.strand===1?"+":"-"}))));r&&this.publishData(r)}}Zr=new WeakMap;class xy extends Ho{constructor(t,r){const i={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",addChrPrefix:!1,...t};super(r,i.channel);R(this,gs);if(this.params=i,!this.params.url)throw new Error("No URL provided for TabixSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(s=>{Promise.all([Promise.resolve().then(()=>I7),Promise.resolve().then(()=>_o)]).then(async([{TabixIndexedFile:o},{RemoteFile:a}])=>{const c=l=>new a(Uo(l,this.view.getBaseUrl()));G(this,gs,new o({filehandle:c(this.params.url),tbiFilehandle:c(this.params.indexUrl??this.params.url+".tbi"),renameRefSeqs:this.params.addChrPrefix===!0?l=>"chr"+l:this.params.addChrPrefix?l=>this.params.addChrPrefix+l:void 0}));const u=await E(this,gs).getHeader();await this._handleHeader(u),s()})})}async loadInterval(t){await this.initializedPromise;const r=await this.discretizeAndLoad(t,async(i,s)=>{const o=[];return await E(this,gs).getLines(i.chrom,i.startPos,i.endPos,{lineCallback:a=>{o.push(a)},signal:s}),this._parseFeatures(o)});r&&this.publishData(r)}async _handleHeader(t){}_parseFeatures(t){return[]}}gs=new WeakMap;class h9 extends xy{constructor(){super(...arguments);R(this,da)}get label(){return"gff3Source"}async _handleHeader(t){G(this,da,await Promise.resolve().then(()=>V7))}_parseFeatures(t){var i;return(i=E(this,da))==null?void 0:i.parseArraySync(t)}}da=new WeakMap;class d9 extends xy{constructor(){super(...arguments);R(this,pa)}get label(){return"vcfSource"}async _handleHeader(t){const r=(await Promise.resolve().then(()=>X7)).default;G(this,pa,new r({header:t}))}_parseFeatures(t){return t.map(r=>{const i=E(this,pa).parseLine(r);return delete i.GENOTYPES,i.SAMPLES=i.SAMPLES(),i})}}pa=new WeakMap;function p9(n,e){if(by(n))return new JI(n,e);if($I(n))return new e9(n,e);if(t9(n))return new n9(n,e);if(m9(n))return E9(n.lazy,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(n))}function m9(n){return"lazy"in n}function g9(n){return(n==null?void 0:n.type)=="axisTicks"}function y9(n){return(n==null?void 0:n.type)=="axisGenome"}function b9(n){return(n==null?void 0:n.type)=="indexedFasta"}function x9(n){return(n==null?void 0:n.type)=="bigwig"}function A9(n){return(n==null?void 0:n.type)=="bigbed"}function w9(n){return(n==null?void 0:n.type)=="bam"}function v9(n){return(n==null?void 0:n.type)=="gff3"}function S9(n){return(n==null?void 0:n.type)=="vcf"}function E9(n,e){if(g9(n))return new r9(n,e);if(y9(n))return new i9(n,e);if(b9(n))return new s9(n,e);if(x9(n))return new o9(n,e);if(A9(n))return new c9(n,e);if(w9(n))return new f9(n,e);if(v9(n))return new h9(n,e);if(S9(n))return new d9(n,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(n))}function C9(n){const e=Ay(n).filter(r=>typeof r=="string"),t=new Function("source","return { "+e.map(r=>JSON.stringify(r)).map(r=>`${r}: source[${r}]`).join(`,
|
|
631
|
+
`)+" };");return t.properties=e,t}function Ay(n){let e=[];do e=e.concat(Object.keys(n)),n=Object.getPrototypeOf(n);while(n&&n!==Object.prototype);return Array.from(new Set(e))}class su extends Te{constructor(){super({type:"clone"});R(this,ys);R(this,ma,t=>t);const t=r=>{const i=Ay(r);(!E(this,ys)||!$a(i,E(this,ys)))&&(G(this,ys,i),G(this,ma,C9(r)));const s=E(this,ma);this.handle=o=>this._propagate(s(o)),this.handle(r)};this.handle=t,this.beginBatch=r=>{cm(r)&&(this.handle=t),super.beginBatch(r)}}get behavior(){return Ht}}ys=new WeakMap,ma=new WeakMap;function D9(n){return"name"in n}class wy extends Nr{constructor(t,r,i){super(r);R(this,ga);this.provider=i,this.params=t}get identifier(){return this.params.name}get label(){return"namedSource"}updateDynamicData(t){G(this,ga,t),this.loadSynchronously()}loadSynchronously(){const t=E(this,ga)??this.provider(this.params.name)??[];let r=i=>i;if(Array.isArray(t))t.length>0&&(r=gy(t[0]));else throw new Error(`Named data "${this.params.name}" is not an array!`);this.reset(),this.beginBatch({type:"file"});for(const i of t)this._propagate(r(i));this.complete()}async load(){this.loadSynchronously()}}ga=new WeakMap;class vy{constructor(){R(this,yn);R(this,Kr);G(this,yn,new Set),G(this,Kr,new Set)}get dataSources(){return[...E(this,yn)]}get collectors(){return[...E(this,Kr)]}replaceDataSources(e){G(this,yn,new Set(e))}addDataSource(e){E(this,yn).add(e)}removeDataSource(e){E(this,yn).delete(e)}addCollector(e){E(this,Kr).add(e)}removeCollector(e){e.observers.clear(),E(this,Kr).delete(e)}pruneCollectorBranch(e){let t=e.parent;for(t&&t.removeChild(e);t&&t.children.length===0;){const r=t;t=r.parent,t?t.removeChild(r):r instanceof Nr&&this.removeDataSource(r)}}findNamedDataSource(e){let t;for(const r of E(this,yn).values())if(r instanceof wy&&e==r.identifier){if(t&&t!==r)throw new Error(`Found multiple instances of named data: ${e}. Data flow optimization is broken (it's a bug).`);t=r}if(t)return{dataSource:t}}}yn=new WeakMap,Kr=new WeakMap;function I9(n,e){const t=new Map,r=[];for(const i of n)t.set(i,{ref:i,children:[]});for(const i of t.values()){const s=t.get(e(i.ref));s?s.children.push(i):r.push(i)}return r}function Sy(n,e,t){var i,s;const r=(i=e.preOrder)==null?void 0:i.call(e,n);if(r)return r;for(const o of t(n)){const a=Sy(o,e,t);if(a==="stop")return a}return(s=e.postOrder)==null?void 0:s.call(e,n)}function T9(n,e){return Sy(n,e,t=>t.children)}function B9(n,e){const t=[],r=[];let i;const s=e??new vy,o=[];function a(h,p=()=>{}){if(!i)throw p()||new Error("Cannot append data flow node, no parent exist!");return i.addChild(h),i=h,t.push(h),h}function c(h,p){return a(h,()=>new Error("Cannot append a transform because no (inherited) data are available! "))}function u(h,p){for(const m of h){let g;try{g=qI(m,p)}catch(y){throw console.warn(y),new Error(`Cannot initialize "${m.type}" transform: ${y}`)}g.behavior&Rn&&c(new su),c(g)}}function l(){return t.findLastIndex(h=>h instanceof Yl)>t.findLastIndex(h=>h instanceof Nr)}const f=h=>{var p,m;if(h.spec.data){const g=(p=h.flowHandle)==null?void 0:p.dataSource;g&&g.view===h&&!g.identifier&&s.removeDataSource(g);const y=D9(h.spec.data)?new wy(h.spec.data,h,h.context.getNamedDataFromProvider):p9(h.spec.data,h);i=y,t.push(y),s.addDataSource(y),h.flowHandle??(h.flowHandle={}),h.flowHandle.dataSource=y}if(h.spec.transform&&u(h.spec.transform,h),h instanceof ft){if(!i)throw new Error(`A unit view (${h.getPathString()}) has no (inherited) data source`);const g=k9(h);if(g){o.push(g.rewrite);for(const A of g.transforms)c(A)}h.mark.isPickingParticipant()&&!l()&&(c(new su),c(new Yl({type:"identifier"})));const y=new fy({type:"collect",groupby:h.getFacetFields(),sort:F9(h,g==null?void 0:g.rewrittenEncoding)});a(y);const x=(m=h.flowHandle)==null?void 0:m.collector;x&&s.removeCollector(x),s.addCollector(y),h.flowHandle??(h.flowHandle={}),h.flowHandle.collector=y}},d=I9(n.getDescendants(),h=>h.dataParent);for(const h of d)T9(h,{preOrder:p=>{r.push({view:p.ref,nodeStackDepth:t.length}),f(p.ref)},postOrder:()=>{const{nodeStackDepth:p}=r.pop();t.length=p,i=t.at(-1)}});return o.forEach(h=>h()),s}function k9(n){var s;const e=[],t={},r=[];for(const[o,a]of Object.entries(n.getEncoding())){const c=o;Ao(c)&&_m(a)&&r.push({channel:c,chromPosDef:a})}const i=za(r,o=>Ir(o.channel),o=>o.chromPosDef.chrom);for(const[o,a]of i.entries())for(const[c,u]of a.entries()){const l=[],f=[],d=[];for(const{channel:h,chromPosDef:p}of u){const m=x=>x.replace(/[^A-Za-z0-9_]/g,""),g=["_linearized_",m(p.chrom),"_",m(p.pos)].join(""),y={...((s=n.spec.encoding)==null?void 0:s[h])??n.getEncoding()[h]??{},field:g};delete y.chrom,delete y.pos,!y.type&&p.type&&(y.type=p.type),t[h]=y,l.push(p.pos),d.push(p.offset??0),f.push(g)}e.push(new su),e.push(new hy({type:"linearizeGenomicCoordinate",channel:o,chrom:c,pos:l,offset:d,as:f},n))}return e.length?{transforms:e,rewrittenEncoding:t,rewrite:()=>{n.spec.encoding={...n.spec.encoding,...t},nh(n.mark,"encoding")}}:void 0}function F9(n,e){var r;const t={...n.getEncoding(),...e}.x;if(lt(t)&&(r=n.getScaleResolution("x"))!=null&&r.isZoomable()){if(Nn(t))return"buildIndex"in t&&t.buildIndex?{field:t.field}:null;if(!bo(t)){if(xo(t))throw new Error("A zoomable x channel must be mapped to a field.")}}}function Ey(n,e=void 0){if(n.parent!==e)return!1;for(const t of n.children)if(!Ey(t,n))return!1;return!0}function ph(n,e=!1){if(n.behavior&Wl&&(e=!0),n instanceof su)if(e)e=!1;else{const t=n.children[0];n.excise(),t&&ph(t,e);return}n.behavior&Ht&&(e=!1);for(let t=0,r=n.children.length;t<r;t++)ph(n.children[t],e||r>1)}function P9(n){const e=n.dataSources,t=new Map;for(const s of e)s.identifier&&!t.has(s.identifier)&&t.set(s.identifier,s);const r=new Set,i=new Map;for(const s of e)if(s.identifier){const o=t.get(s.identifier);o&&(o!==s&&o.adoptChildrenOf(s),r.add(o),i.set(s,o))}else r.add(s),i.set(s,s);return n.replaceDataSources(r),i}function M9(n){if(ph(n),!Ey(n))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function R9(n){const e=P9(n);for(const t of n.dataSources)M9(t);return e}const mh=new WeakMap;function O9(n){const e=mh.get(n);if(e)return e;const t=Promise.resolve().then(()=>n.load()).finally(()=>{mh.delete(n)});return mh.set(n,t),t}function N9(n,e){for(const t of n.getDescendants()){const r=t.flowHandle;if(!r)continue;const i=r.dataSource;i&&(r.dataSource=e.get(i)??i)}}function L9(n,e){const t=B9(n,e),r=R9(t);N9(n,r);const i=n.getDescendants(),s=z9(i);for(const u of s)u.visit(l=>l.initialize());const o=i.filter(u=>u instanceof ft),a=[],c=!!n.context.glHelper;for(const u of o){const l=u.mark;l.initializeEncoders(),c&&a.push(l.initializeGraphics().then(()=>l));const f=d=>{if(l.initializeData(),c)try{l.updateGraphicsData()}catch(h){throw h.view=u,h}u.context.animator.requestRender()};u.registerDisposer(u.flowHandle.collector.observe(f))}return{dataFlow:t,unitViews:o,dataSources:s,graphicsPromises:a}}function z9(n){var r,i;const e=Array.isArray(n)?n:n.getDescendants(),t=new Set;for(const s of e){let o=s;for(;o&&!((r=o.flowHandle)!=null&&r.dataSource);)o=o.dataParent;(i=o==null?void 0:o.flowHandle)!=null&&i.dataSource&&t.add(o.flowHandle.dataSource)}return t}function U9(n){const e=new Set;return n.visit(t=>{var r;if((r=t.flowHandle)!=null&&r.dataSource)return e.add(t.flowHandle.dataSource),sy}),e}function G9(n,e=U9(n)){return Promise.all(Array.from(e).map(t=>O9(t))).then(t=>(ty(n),H9(n),t))}function H9(n){const e={type:"subtreeDataReady",payload:{subtreeRoot:n}};n.visit(t=>t.handleBroadcast(e))}function fn(n){return()=>n}const Mt=class Mt{static create(e,t,r,i){return new Mt(fn(e),fn(t),fn(r),fn(i))}_offset(e,t){const r=this["_"+e];if(t===0)return r;switch(typeof t){case"number":return()=>r()+t;case"function":return()=>r()+t();default:throw new Error("Not a number of function")}}_passThrough(e){return this._offset(e,0)}constructor(e,t,r,i){this._x=e,this._y=t,this._width=r,this._height=i}get x(){return this._x()}get y(){return this._y()}get width(){return this._width()}get height(){return this._height()}get x2(){return this._x()+this._width()}get y2(){return this._y()+this._height()}equals(e){return e?this===e||this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height:!1}modify(e){if(!Object.keys(e).length)return this;const t=r=>{const i=e[r];return typeof i=="number"?fn(i):typeof i=="function"?i:this._passThrough(r)};return new Mt(t("x"),t("y"),t("width"),t("height"))}translate(e,t){return e===0&&t===0?this:new Mt(this._offset("x",e),this._offset("y",t),this._passThrough("width"),this._passThrough("height"))}translateBy(e){return this.translate(e.x,e.y)}expand(e,t=1){return e.left==0&&e.top==0&&e.right==0&&e.bottom==0?this:new Mt(e.left?this._offset("x",-e.left*t):this._passThrough("x"),e.top?this._offset("y",-e.top*t):this._passThrough("y"),e.width?this._offset("width",e.width*t):this._passThrough("width"),e.height?this._offset("height",e.height*t):this._passThrough("height"))}shrink(e){return this.expand(e,-1)}intersect(e){return this===e||e==null?this:new Mt(()=>Math.max(this.x,e.x),()=>Math.max(this.y,e.y),()=>Math.min(this.x2,e.x2)-Math.max(this.x,e.x),()=>Math.min(this.y2,e.y2)-Math.max(this.y,e.y))}union(e){return this===e||e==null?this:new Mt(()=>Math.min(this.x,e.x),()=>Math.min(this.y,e.y),()=>Math.max(this.x2,e.x2)-Math.min(this.x,e.x),()=>Math.max(this.y2,e.y2)-Math.min(this.y,e.y))}isDefined(){return this.width>=0&&this.height>=0}flatten(){return new Mt(fn(this.x),fn(this.y),fn(this.width),fn(this.height))}containsPoint(e,t){return e>=this.x&&e<this.x2&&t>=this.y&&t<this.y2}normalizePoint(e,t,r=!1){const i={x:(e-this.x)/this.width,y:(t-this.y)/this.height};return r&&(i.y=1-i.y),i}denormalizePoint(e,t,r=!1){return r&&(t=1-t),{x:this.x+e*this.width,y:this.y+t*this.height}}toString(){return`Rectangle: x: ${this.x}, y: ${this.y}, width: ${this.width}, height: ${this.height}`}toRoundedString(){return`Rectangle: x: ${Math.round(this.x)}, y: ${Math.round(this.y)}, width: ${Math.round(this.width)}, height: ${Math.round(this.height)}`}};Y(Mt,"ZERO",Mt.create(0,0,0,0));let Ft=Mt;class Cy{constructor(e){this.globalOptions=e}pushView(e,t){}popView(e){}renderMark(e,t){}getDevicePixelRatio(){return 1}}class gh extends Cy{constructor(t,r){super(t);R(this,Du);R(this,ya,[0,0,0,0]);R(this,Rt);R(this,ba,[]);R(this,bs);R(this,xa);R(this,Aa,new Set);R(this,wa);R(this,xs,1);R(this,va,{width:0,height:0});if(G(this,xa,r.webGLHelper),G(this,bs,r.framebufferInfo),G(this,xs,r.devicePixelRatio),G(this,va,r.canvasSize),r.clearColor){const i=Gn(r.clearColor).rgb();G(this,ya,[i.r/255,i.g/255,i.b/255,i.opacity])}}getDevicePixelRatio(){return E(this,xs)}pushView(t,r){E(this,Aa).add(t),G(this,wa,r)}renderMark(t,r){if(this.globalOptions.picking&&!t.isPickingParticipant())return;const i=t.render(r);i&&E(this,ba).push({mark:t,callback:i,coords:E(this,wa),clipRect:r.clipRect})}render(){if(E(this,Rt)||O(this,Du,Tx).call(this),E(this,Rt).length==0)return;const t=E(this,xa).gl,r=E(this,bs);r?(t.bindFramebuffer(t.FRAMEBUFFER,r.framebuffer),t.viewport(0,0,r.width,r.height)):t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight),t.disable(t.SCISSOR_TEST),t.clearColor(...E(this,ya)),t.clear(t.COLOR_BUFFER_BIT);for(const i of E(this,Aa))i.onBeforeRender();for(const i of E(this,Rt))i();E(this,bs)&&t.bindFramebuffer(t.FRAMEBUFFER,null)}}ya=new WeakMap,Rt=new WeakMap,ba=new WeakMap,bs=new WeakMap,xa=new WeakMap,Aa=new WeakMap,wa=new WeakMap,xs=new WeakMap,va=new WeakMap,Du=new WeakSet,Tx=function(){G(this,Rt,[]);let t=!0,r=!0;const i=a=>()=>{t&&a()},s=a=>()=>{t&&r&&a()},o=za(E(this,ba).reverse(),a=>a.mark);for(const[a,c]of[...o.entries()].reverse()){if(!a.isReady())continue;E(this,Rt).push(()=>{t=a.unitView.getEffectiveOpacity()>0}),E(this,Rt).push(...a.prepareRender(this.globalOptions).map(l=>i(l)));let u;for(const l of c){const f=l.coords;f.equals(u)||E(this,Rt).push(i(()=>{r=a.setViewport(E(this,va),E(this,xs),f,l.clipRect)})),E(this,Rt).push(s(l.callback)),u=l.coords}}};class V9 extends Cy{constructor(...e){super({}),this.contexts=e}pushView(e,t){for(const r of this.contexts)r.pushView(e,t)}popView(e){for(const t of this.contexts)t.popView(e)}renderMark(e,t){for(const r of this.contexts)r.renderMark(e,t)}}class _9{constructor(e,t){R(this,As);this.point=e,this.uiEvent=t,this.stopped=!1,this.target=void 0}stopPropagation(){this.stopped=!0}get type(){return this.uiEvent.type}get proxiedMouseEvent(){return E(this,As)||G(this,As,j9(this.mouseEvent)),E(this,As)}get mouseEvent(){if(this.uiEvent instanceof MouseEvent)return this.uiEvent;throw new Error("Not a MouseEvent!")}}As=new WeakMap;function j9(n){const e=r=>r===null||typeof r!="object"&&typeof r!="function",t={get(r,i,s){const o=Reflect.get(r,i,r);if(!e(o))throw new Error(`Access to non-primitive property "${String(i)}" is not allowed.`);return o},getPrototypeOf(){return null},ownKeys(r){return Reflect.ownKeys(r).filter(s=>e(r[s])).map(s=>typeof s=="symbol"?s:String(s))},getOwnPropertyDescriptor(r,i){const s=Reflect.getOwnPropertyDescriptor(r,i);if(s&&!("get"in s||"set"in s)&&e(s.value))return{value:s.value,writable:!!s.writable,enumerable:!!s.enumerable,configurable:!!s.configurable}},has(r,i){return i in r?e(r[i]):!1}};return new Proxy(n,t)}class at{static fromMouseEvent(e){return new at(e.clientX,e.clientY)}constructor(e,t){this.x=e,this.y=t}subtract(e){return new at(this.x-e.x,this.y-e.y)}add(e){return new at(this.x-e.x,this.y-e.y)}multiply(e){return new at(this.x*e,this.y*e)}get length(){return Math.sqrt(this.x**2+this.y**2)}equals(e){return e?e===this||e.x===this.x&&e.y===this.y:!1}}const Q9=n=>new Promise(e=>setTimeout(e,n));function W9(n){const e=n.requestAnimationFrame||window.requestAnimationFrame,t=n.signal,r=()=>new Promise((i,s)=>{if(t!=null&&t.aborted)return s("aborted");const o=performance.now(),a=o+(n.duration||1e3),c=typeof n.from=="number"?n.from:0,u=typeof n.to=="number"?n.to:1,l=n.easingFunction||(m=>m),f=m=>(m-o)/(a-o),d=m=>m*(u-c)+c,h=m=>Math.max(0,Math.min(1,m)),p=m=>{t!=null&&t.aborted?s("aborted"):(n.onUpdate(d(l(h(f(m))))),m<a?e(p):(n.onUpdate(d(l(1))),i()))};e(p)});return n.delay?t!=null&&t.aborted?Promise.reject("aborted"):Q9(n.delay).then(r):r()}class q9{constructor(e){this._renderCallback=e,this._renderRequested=!1,this._warn=!1,this.transitions=[]}requestTransition(e){this.cancelTransition(e),this.transitions.push(e),this.requestRender()}cancelTransition(e){const t=this.transitions.indexOf(e);t>=0&&this.transitions.splice(t,1)}requestRender(){this._renderRequested?this._warn&&console.warn("Render already requested!"):(this._renderRequested=!0,window.requestAnimationFrame(e=>{this._renderRequested=!1;const t=this.transitions;this.transitions=[];let r;for(;r=t.shift();)r(e);this._renderCallback(e)}))}transition(e){return W9({requestAnimationFrame:t=>this.requestTransition(t),...e})}}function yh(n,e,t,r,i){let s=0,o=!0,a=structuredClone(i),c=a;function u(d,h,p,m){return h+(d-h)*Math.pow(2,-p/m)}function l(d){if(o)return;const h=d-s;s=d;for(const m of Object.keys(c))a[m]=u(a[m],c[m],h,t);e(a);let p=-1/0;for(const m of Object.keys(c))p=Math.max(p,Math.abs(c[m]-a[m]));p<r?(a=c,e(a),o=!0,p!=0&&n.requestRender()):n.requestTransition(m=>l(m))}function f(d){c=d,o&&(o=!1,s=+document.timeline.currentTime,l(s))}return f.stop=()=>{o=!0},f}class Y9{constructor(e){this.genomes=new Map,this.baseUrl=e}async initialize(e){const t=new XD(e);return this.genomes.set(t.name,t),Promise.all([...this.genomes.values()].map(r=>r.load(this.baseUrl)))}getGenome(e){if(!this.genomes.size)throw new Error("No genomes have been configured!");if(e){const t=this.genomes.get(e);if(!t)throw new Error(`No genome with the name ${e} has been configured!`);return t}else{if(this.genomes.size>1)throw new Error("Cannot pick a default genome! More than one have been configured!");return this.genomes.values().next().value}}}const X9="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMhERycB36XD+hX0/DuzSlsnw3OfyilcwAA/vn/yzQQMoUHg9r59hhn7Oz/njH9ncJAiAXNj9P2qTxdhARETufgDYNs4fsH/Cv2jL53nzm1lcZH2dngKCP/Gnn/LTEiXg+Tw/Q+btvJ1+/vlPfvYz/v1vEwA26w4fs8lm4R4GgIiIAmB5GdvGnmbuh9Rq8MIXcuMGpVJ6AFhEXNwneOI//OfnSz8fL49/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p+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",Z9={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class K9{constructor(e){this._webGLHelper=e,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new tn([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:Ql(dy),texture:e?this._createTextureNow(X9):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(e,t="normal",r="regular"){if(me(r)&&(r=Z9[r.toLowerCase()],!r))throw new Error("Unknown font weight: "+r);const i={family:e,style:t,weight:r};let s=this._fonts.get(i);return s||(s={metrics:void 0,texture:void 0},this._fonts.set(i,s),this._promises.push(this._loadFontEntry(s,i))),s}async _loadFontEntry(e,t){try{const r=await this._loadMetadata(t.family),i=$9(r,t),s=this.fontRepository+Dy(t.family)+"/"+i.replace(/\.\w+/,""),o=this._createTexture(s+".png"),a=this._loadFont(s+".json");e.texture=await o,e.metrics=await a}catch{console.warn(`Cannot load font: "${t.family}". Using the embedded default font.`),e.metrics=this._defaultFontEntry.metrics,e.texture=this._defaultFontEntry.texture}}_loadFont(e){let t=this._fontPromises.get(e);return t||(t=fetch(e).then(r=>{if(!r.ok)throw new Error("Could not load font: "+r.status);return r}).then(r=>r.json()).then(r=>Ql(r)),this._fontPromises.set(e,t)),t}_loadMetadata(e){const t=Dy(e);let r=this._metadataPromises.get(t);if(!r){const i=this.fontRepository+t+"/METADATA.pb";r=fetch(i).then(s=>{if(!s.ok)throw new Error("Could not load font metadata. Response status: "+s.status+", url: "+i);return s}).then(s=>s.text()).then(s=>J9(s)).catch(s=>{console.warn(s.message)}),this._metadataPromises.set(t,r)}return r}getDefaultFont(){return this._defaultFontEntry}_createTexture(e){const t=this._webGLHelper.gl;return new Promise((r,i)=>{oo(t,{src:e,min:t.LINEAR},(s,o,a)=>{s?i(s):r(o)})})}_createTextureNow(e){const t=this._webGLHelper.gl;let r;const i=new Promise((s,o)=>{r=oo(t,{src:e,min:t.LINEAR},(a,c,u)=>{a?o(a):s(c)})});return this._promises.push(i),r}}function Dy(n){return n.toLowerCase().replaceAll(/[^\w]/g,"")}function J9(n){const e=n.split(`
|
|
632
|
+
`),t=[];let r;for(const i of e)if(i.startsWith("fonts {")&&(r={name:void 0,style:void 0,weight:void 0,filename:void 0,post_script_name:void 0,full_name:void 0,copyright:void 0}),i.startsWith("}")&&(t.push(r),r=void 0),r){let s=i.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(s){const o=s[1];r[o]=s[2]}if(s=i.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),s){const o=s[1];r[o]=+s[2]}}return t}function $9(n,e){let t,r=Number.POSITIVE_INFINITY;for(const i of n)if(e.family.localeCompare(i.name,void 0,{sensitivity:"accent"})==0&&e.style==i.style){const s=Math.abs(e.weight-i.weight);s<r&&(r=s,t=i)}return t==null?void 0:t.filename}function eT(n,e){const t=[];let r;for(const i of n.split(`
|
|
633
|
+
`))if(i.startsWith(">"))r={identifier:i.match(/>(\S+)/)[1],sequence:""},t.push(r);else if(r)r.sequence+=i.trim();else throw new Error("Invalid fasta file!");return t}class tT{constructor(e,t){this.animator=e,this.disabled=!!t,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=yh(e,r=>{var s;const i=r.x-this.lastValue;this.lastValue=r.x,(s=this.callback)==null||s.call(this,i)},40,.1,{x:0})}cancel(){this.lastValue!==this.targetValue&&(this.targetValue=Od([this.lastValue,this.targetValue],.3),this.smoother({x:this.targetValue}))}setMomentum(e,t){if(this.disabled){t(e);return}this.callback=t;const r=vi(this.targetValue+e-this.lastValue,-this.maxDistance,this.maxDistance);this.targetValue=this.lastValue+r,this.smoother({x:this.targetValue})}}function nT(n){const e={},t=["string","number","boolean"],r=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const i in n){const s=i;!r.includes(i)&&t.includes(typeof n[s])&&(e[s]=n[s])}return e}const Iy=new Map,rT={Organism:"Homo sapiens"};async function iT(n,e,t={}){const r=n.symbol,i={...rT,...t,GENE:r};let s=Iy.get(r)??await aT(i);return s?(Iy.set(r,s),ye`
|
|
635
634
|
<div class="title">
|
|
636
|
-
<strong>${
|
|
637
|
-
${
|
|
635
|
+
<strong>${s.name}</strong>
|
|
636
|
+
${s.description}
|
|
638
637
|
</div>
|
|
639
|
-
<p class="summary">${
|
|
638
|
+
<p class="summary">${s.summary}</p>
|
|
640
639
|
<p class="source">Source: NCBI RefSeq Gene</p>
|
|
641
|
-
`):null}async function
|
|
640
|
+
`):null}async function sT(n){const e={mode:"cors"},t=new URL("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi");t.search=new URLSearchParams({db:"gene",term:cT(n),sort:"relevance",retmax:"1",retmode:"json"}).toString();const i=(await fetch(t.toString(),e).then(s=>s.json())).esearchresult.idlist[0];if(i){const s=new URL("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi");return s.search=new URLSearchParams({db:"gene",id:i,retmode:"json"}).toString(),(await fetch(s.toString(),e).then(c=>c.json())).result[i]}else return null}const oT=iu(sT,500);function aT(n){return oT(n)}function cT(n){return Object.entries(n).filter(([e,t])=>t&&t.length>0).map(([e,t])=>`("${t}"[${e}])`).join(" AND ")}const uT=Le(".4~r"),lT=Le(".4~e");function Ty(n){return n==null?ye` <span class="na">NA</span> `:me(n)?n.substring(0,30):Number.isInteger(n)?""+n:Ze(n)?Math.abs(n)>Math.pow(10,8)||Math.abs(n)<Math.pow(10,-8)?lT(n):uT(n):Is(n)?n?"True":"False":Ue(n)?ye`${n.map((e,t)=>[Ty(e),t<n.length-1?", ":Ee])}`:"?"+typeof n+" "+n}async function fT(n,e,t){const r=(u,l)=>{var f;for(const[d,h]of Object.entries(e.encoders))if((f=h==null?void 0:h.dataAccessor)!=null&&f.fields.includes(u))switch(d){case"color":case"fill":case"stroke":return ye`
|
|
642
641
|
<span
|
|
643
642
|
class="color-legend"
|
|
644
|
-
style=${`background-color: ${h(
|
|
643
|
+
style=${`background-color: ${h(l)}`}
|
|
645
644
|
></span>
|
|
646
|
-
`}return""},
|
|
645
|
+
`}return""},i=(u,l)=>{const f=u.filter(([d,h])=>!d.startsWith("_"));if(f.length!==0)return f.map(([d,h])=>h!==null&&typeof h=="object"&&!Array.isArray(h)?ye`${i(Object.entries(h),(l||"")+d+".")}`:ye`
|
|
647
646
|
<tr>
|
|
648
|
-
<th>${
|
|
649
|
-
<td>${
|
|
647
|
+
<th>${l}${d}</th>
|
|
648
|
+
<td>${Ty(h)} ${r(d,n)}</td>
|
|
650
649
|
</tr>
|
|
651
|
-
`)},i
|
|
650
|
+
`)},s=i(Object.entries(n));if(!s)return;const o=ye`
|
|
652
651
|
<table class="attributes">
|
|
653
|
-
${
|
|
652
|
+
${s}
|
|
654
653
|
</table>
|
|
655
|
-
`,a=e.unitView.getTitleText(),c=a?
|
|
654
|
+
`,a=e.unitView.getTitleText(),c=a?ye`
|
|
656
655
|
<div class="title">
|
|
657
656
|
<strong>${a}</strong>
|
|
658
657
|
</div>
|
|
659
|
-
`:"";return ot`${c}${s}`}class Da extends Fb{constructor(e,n,r,o,i,s){super(e,n,r,o,i,s),this.spec=e}async initializeChildren(){}*[Symbol.iterator](){}replaceChild(e,n){throw new Error("Not implemented")}visit(e){let n;try{n=e(this)}catch(r){throw r.view=this,r}if(n===Ia)return n;if(n!==FB){e.beforeChildren&&e.beforeChildren(this);for(const r of this){const o=r.visit(e);if(o===Ia)return o}e.afterChildren&&e.afterChildren(this),e.postOrder&&e.postOrder(this)}}findDescendantByPath(e){for(const n of this)if(n.name===e[0]){if(e.length==1)return n;if(n instanceof Da)return n.findDescendantByPath(e.slice(1))}}findChildByName(e){for(const n of this)if(n.name===e)return n}findDescendantByName(e){let n;return this.visit(r=>{if(r.name==e)return n=r,Ia}),n}getDefaultResolution(e,n){return"shared"}}class Eo extends Da{constructor(n,r,o,i,s,a){super(n,r,o,i,s,{layersChildren:!0,...a});he(this,cr,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){Ae(this,cr,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,o=>{if(!xd(o)&&!wd(o))throw new Pr("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return j(this,cr).slice()}*[Symbol.iterator](){for(const n of j(this,cr))yield n}render(n,r,o={}){if(super.render(n,r,o),!!this.isConfiguredVisible()){n.pushView(this,r);for(const i of j(this,cr))i.render(n,r,o);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=j(this,cr).length-1;r>=0;r--)if(j(this,cr)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}cr=new WeakMap;class t2{constructor(e,n){this.n=e,this.maxCols=n??1/0}get nRows(){return this.maxCols==1/0?1:Math.ceil(this.n/this.maxCols)}get nCols(){return Math.min(this.n,this.maxCols)}get rowIndices(){const e=[],n=this.nCols,r=this.nRows;for(let o=0;o<r;o++){const i=[];e.push(i);for(let s=0;s<n;s++){const a=o*n+s;a<this.n&&i.push(a)}}return e}get colIndices(){const e=[],n=this.nCols,r=this.nRows;for(let o=0;o<n;o++){const i=[];e.push(i);for(let s=0;s<r;s++){const a=s*n+o;a<this.n&&i.push(a)}}return e}getCellIndex(e,n){let r=0;if(this.maxCols==1/0)r=n==0?e:void 0;else{if(e>=this.maxCols)return;r=n*this.nCols+e}return r<this.n?r:void 0}getCellCoords(e){if(!(e<0||e>=this.n))return[e%this.nCols,Math.floor(e/this.nCols)]}}const T_="chromosome_ticks_and_labels",D_={x:"width",y:"height"};function gd(t){return t=="x"?"y":"x"}const Yl={x:["bottom","top"],y:["left","right"]},md=Object.fromEntries(Object.entries(Yl).map(([t,e])=>e.map(n=>[n,t])).flat(1));function Or(t){return md[t]}class n2 extends Eo{constructor(e,n,r,o,i,s){const a=n=="locus",c={...a?k_:r2,...B_(n,e),...e};super(a?__(c,n):i2(c,n),r,o,i,`axis_${e.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...s}),this.axisProps=c}getSize(){const e={px:this.getPerpendicularSize()},n={grow:1};return md[this.axisProps.orient]=="x"?new Lr(n,e):new Lr(e,n)}getPerpendicularSize(){return yd(this.axisProps)}isPickingSupported(){return!1}}function yd(t){const e=Or(t.orient);let n=t.ticks&&t.tickSize||0;return t.labels&&(n+=t.labelPadding,e=="x"?n+=t.labelFontSize:n+=30),t.title&&(n+=t.titlePadding+t.titleFontSize),n=Math.min(t.maxExtent||1/0,Math.max(t.minExtent||0,n)),n}const r2={values:null,minExtent:20,maxExtent:1/0,offset:0,domain:!0,domainWidth:1,domainColor:"gray",domainDash:null,domainDashOffset:0,domainCap:"square",ticks:!0,tickSize:5,tickWidth:1,tickColor:"gray",tickDash:null,tickDashOffset:0,tickCap:"square",tickCount:null,tickMinStep:null,labels:!0,labelAlign:"center",labelBaseline:"middle",labelPadding:4,labelFontSize:10,labelLimit:180,labelColor:"black",format:null,titleColor:"black",titleFont:"sans-serif",titleFontSize:10,titlePadding:3};function B_(t,e){const n=e.orient,r=t=="nominal"||t=="ordinal";let o="center",i="middle",s=e.labelAngle??((n=="top"||n=="bottom")&&r?-90:0);switch(n){case"left":o="right";break;case"right":o="left";break;case"top":case"bottom":Math.abs(s)>30?(o=s>0==(n=="bottom")?"left":"right",i="middle"):i=n=="top"?"alphabetic":"top";break}return{labelAlign:o,labelAngle:s,labelBaseline:i}}function i2(t,e){const n={...t,extent:yd(t)},r=Or(n.orient),o=gd(r),i=n.orient=="bottom"||n.orient=="right"?1:-1,s=n.orient=="bottom"||n.orient=="left"?1:0,a=()=>({name:"domain",data:{values:[{}]},mark:{type:"rule",clip:!1,strokeDash:n.domainDash,strokeCap:n.domainCap,color:n.domainColor,[o]:s,size:n.domainWidth}}),c=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[o+"Offset"]:(n.tickSize+n.labelPadding)*i,[o]:s,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:e},text:{field:"label"}}}),l=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[o]:{value:s},[o+"2"]:{value:s-n.tickSize/n.extent*(s?1:-1)}}}),u=()=>({name:"title",data:{values:[{}]},mark:{type:"text",clip:!1,align:"center",baseline:n.orient=="bottom"?"bottom":"top",angle:[0,90,0,-90][["top","right","bottom","left"].indexOf(n.orient)],text:n.title,color:n.titleColor,[r]:.5,[o]:1-s}}),f=()=>{const h={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:e}},layer:[]};return n.ticks&&h.layer.push(l()),n.labels&&h.layer.push(c()),h},d={resolve:{scale:{[r]:"forced"}},[D_[gd(r)]]:n.extent,data:{lazy:{type:"axisTicks",channel:r,axis:t}},layer:[]};return n.domain&&d.layer.push(a()),(n.ticks||n.labels)&&d.layer.push(f()),n.title&&d.layer.push(u()),d}const k_={...r2,chromTicks:!0,chromTickSize:18,chromTickWidth:1,chromTickColor:"#989898",chromTickDash:[4,2],chromTickDashOffset:1,chromLabels:!0,chromLabelFontSize:13,chromLabelFontWeight:"normal",chromLabelFontStyle:"normal",chromLabelColor:"black",chromLabelAlign:"left",chromLabelPadding:7};function __(t,e){const n={...t,extent:yd(t)},r=Or(n.orient),o=gd(r),i=n.orient=="bottom"||n.orient=="left"?1:0,s=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:t.chromTickDash,strokeDashOffset:t.chromTickDashOffset,[o]:i,[o+"2"]:i-n.chromTickSize/n.extent*(i?1:-1),color:t.chromTickColor,size:n.chromTickWidth}}),a=()=>{let u;switch(n.orient){case"top":u={y:0,angle:0,paddingX:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":u={y:1,angle:0,paddingX:4,dy:n.chromLabelPadding+n.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":u={x:1,angle:-90,paddingY:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":u={x:0,angle:90,align:"right",paddingY:4,dy:-n.chromLabelPadding};break;default:u={}}return{name:"chromosome_labels",mark:{type:"text",size:n.chromLabelFontSize,font:n.chromLabelFont,fontWeight:n.chromLabelFontWeight,fontStyle:n.chromLabelFontStyle,color:n.chromLabelColor,align:t.chromLabelAlign,baseline:"alphabetic",clip:!1,...u},encoding:{[r+"2"]:{field:"continuousEnd",type:e},text:{field:"name"}}}};let c;switch(n.orient){case"bottom":case"top":c={};break;case"left":c={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":c={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:c={}}const l=i2({...t,...c},e);if(t.chromTicks||t.chromLabels){const u={name:T_,data:{lazy:{type:"axisGenome",channel:Or(n.orient)}},encoding:{[r]:{field:"continuousStart",type:e,band:0}},layer:[]};if(t.chromTicks&&u.layer.push(s()),t.chromLabels){u.layer.push(a());let f;l.layer.filter(d=>d.name=="ticks_and_labels").forEach(d=>d.layer.filter(h=>h.name=="labels").forEach(h=>{f=h.mark})),f&&(n.orient=="top"||n.orient=="bottom"?(f.viewportEdgeFadeWidthLeft=30,f.viewportEdgeFadeDistanceLeft=40):(f.viewportEdgeFadeWidthBottom=30,f.viewportEdgeFadeDistanceBottom=40))}l.layer.push(u)}return l}class R_{constructor(e){he(this,zi);he(this,jr,0);he(this,qr,0);Ae(this,zi,new Array(e))}push(e){j(this,zi)[j(this,jr)]=e,Ae(this,jr,(j(this,jr)+1)%this.size),Ae(this,qr,Math.min(j(this,qr)+1,this.size))}get(){const e=j(this,zi);return j(this,qr)<this.size?e.slice(0,j(this,qr)):e.slice(j(this,jr),this.size).concat(e.slice(0,j(this,jr)))}get size(){return j(this,zi).length}get length(){return j(this,qr)}}zi=new WeakMap,jr=new WeakMap,qr=new WeakMap;let Ci,o2=0;function s2(){return performance.now()-o2<50}function F_(t){return function(...e){o2=performance.now(),t(...e)}}function M_(t,e,n,r,o){if(n=F_(n),t.type=="wheel"){t.uiEvent.preventDefault();const i=t.uiEvent,s=i.deltaMode?120:1;if(!i.deltaX&&!i.deltaY)return;Ci==null||Ci.stop();let{x:a,y:c}=t.point;if(r){const l=r.mark.encoders;l.x&&!l.x2&&!l.x.constant&&(a=+l.x(r.datum)*e.width+e.x),l.y&&!l.y2&&!l.y.constant&&(c=(1-+l.y(r.datum))*e.height+e.y)}Math.abs(i.deltaX)<Math.abs(i.deltaY)?n({x:a,y:c,xDelta:0,yDelta:0,zDelta:i.deltaY*s/300}):n({x:a,y:c,xDelta:-i.deltaX*s,yDelta:0,zDelta:0})}else if(t.type=="mousedown"&&t.mouseEvent.button===0){Ci&&Ci.stop();const i=new R_(30),s=t.mouseEvent;s.preventDefault();let a=Xt.fromMouseEvent(s);const c=f=>{const d=Xt.fromMouseEvent(f);i.push({point:d,timestamp:performance.now()});const h=d.subtract(a);n({x:a.x,y:a.y,xDelta:h.x,yDelta:h.y,zDelta:0}),a=d},l=()=>{const d=performance.now(),h=i.get().filter(S=>d-S.timestamp<160);if(h.length<5||!o||P_(h))return;const p=h.at(-1),y=h[0],v=p.point.subtract(y.point).multiply(1/(p.timestamp-y.timestamp));let b=a.x,A=a.y;Ci=pd(o,S=>{n({x:S.x,y:S.y,xDelta:b-S.x,yDelta:A-S.y,zDelta:0}),b=S.x,A=S.y},150,.5,{x:b,y:A}),Ci({x:a.x-v.x*250,y:a.y-v.y*250})},u=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),l()};document.addEventListener("mouseup",u,!1),document.addEventListener("mousemove",c,!1)}}function P_(t){const e=t[Math.floor(t.length/2)],n=e.point.subtract(t[0].point).multiply(e.timestamp-t[0].timestamp),r=t.at(-1).point.subtract(e.point).multiply(t.at(-1).timestamp-e.timestamp),o=n.length;return r.length/o<.4}class L_ extends Eo{constructor(e,n,r,o,i,s){const c={...n=="locus"?O_:a2,...e};super(G_(c,n),r,o,i,`axisGrid_${e.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...s}),this.axisProps=c}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const a2={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},O_={...a2,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function N_(t,e){const n=t,r=Or(n.orient);return{name:"grid_lines",data:{lazy:{type:"axisTicks",channel:r,axis:t}},mark:{type:"rule",strokeDash:n.gridDash,strokeCap:n.gridCap,color:n.gridColor,size:n.gridWidth,opacity:n.gridOpacity,minBufferSize:300},encoding:{[r]:{field:"value",type:e}}}}function z_(t,e){const n=t,r=Or(n.orient);return{name:"chromosome_lines",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rule",strokeDash:n.chromGridDash,strokeCap:n.chromGridCap,color:n.chromGridColor,size:n.chromGridWidth,opacity:n.chromGridOpacity},encoding:{[r]:{field:"continuousStart",type:e,band:0}}}}function U_(t,e){const n=t,r=Or(n.orient);return{name:"chromosome_fill",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rect"},encoding:{[r]:{field:"continuousStart",type:e,band:0},[r+"2"]:{field:"continuousEnd",band:0},fill:{field:"odd",type:"nominal",scale:{domain:[!1,!0],range:[n.chromGridFillEven??"white",n.chromGridFillOdd??"white"]}},opacity:{field:"odd",type:"nominal",scale:{type:"ordinal",domain:[!1,!0],range:[n.chromGridFillEven?1:0,n.chromGridFillOdd?1:0]}}}}}function G_(t,e){const n={...t},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(U_(n,e)),n.chromGrid&&n.chromGridOpacity>0&&r.push(z_(n,e)),n.grid&&n.gridOpacity>0&&r.push(N_(n,e)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Or(t.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const c2={anchor:"middle",frame:"group",offset:10,orient:"top",align:void 0,angle:0,baseline:"alphabetic",dx:0,dy:0,color:void 0,font:void 0,fontSize:12,fontStyle:"normal",fontWeight:"normal"},H_={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},V_={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},j_={start:0,middle:.5,end:1},q_={start:"left",middle:"center",end:"right"};function W_(t){if(!t)return;const e=rt(t)?{text:t}:t;if(!e.text||e.orient=="none")return;const n={"track-title":H_,overlay:V_}[e.style]??{},r={...c2,...n,...e};let o={},i={x:0,y:0};const s=j_[r.anchor??"middle"];switch(r.orient){case"top":i={x:s,y:1},o={baseline:"alphabetic",angle:0};break;case"right":i={x:1,y:1-s},o={baseline:"alphabetic",angle:90};break;case"bottom":i={x:s,y:0},o={baseline:"top",angle:0};break;case"left":i={x:0,y:s},o={baseline:"alphabetic",angle:-90};break}const a={...c2,...o,...n,...e},c={xOffset:0,yOffset:0};switch(r.orient){case"top":c.yOffset=-a.offset;break;case"right":c.xOffset=a.offset;break;case"bottom":c.yOffset=a.offset;break;case"left":c.xOffset=-a.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...i,...c,text:a.text,align:a.align??q_[a.anchor],angle:a.angle,baseline:a.baseline,dx:a.dx,dy:a.dy,color:a.color,font:a.font,size:a.fontSize,fontStyle:a.fontStyle,fontWeight:a.fontWeight}}}class l2 extends en{constructor(n,r){const o={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},n.layoutParent.context,n.layoutParent,n.view,"scrollbar-"+r,{blockEncodingInheritance:!0});he(this,ls);he(this,fc,Sn.ZERO);he(this,Wr,0);he(this,Ui,0);Gt(this,"viewportOffset",0);this.config=o,Ae(this,ls,r),this.interpolateViewportOffset=pd(this.context.animator,i=>{this.viewportOffset=i.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(i,s)=>{if(s.stopPropagation(),j(this,Wr)<=0)return;const a=d=>r=="vertical"?d.clientY:d.clientX;s.mouseEvent.preventDefault();const c=this.scrollOffset,l=a(s.mouseEvent),u=d=>{const h=lo(a(d)-l+c,0,j(this,Wr));this.interpolateViewportOffset({x:h/j(this,Wr)*j(this,Ui)})},f=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f)};document.addEventListener("mouseup",f,!1),document.addEventListener("mousemove",u,!1)})}get scrollOffset(){return this.viewportOffset/j(this,Ui)*j(this,Wr)}render(n,r,o){super.render(n,j(this,fc),o)}updateScrollbar(n,r){const o=this.config.scrollbarPadding,i=this.config.scrollbarSize,s=j(this,ls)=="horizontal"?"width":"height",a=Math.min(1,n[s]/r[s]),c=n[s]-2*o,l=a*c;Ae(this,Wr,c-l),Ae(this,Ui,r[s]-n[s]),this.viewportOffset=lo(this.viewportOffset,0,j(this,Ui)),Ae(this,fc,j(this,ls)=="vertical"?new Sn(()=>n.x+n.width-i-o,()=>n.y+o+this.scrollOffset,()=>i,()=>l):new Sn(()=>n.x+o+this.scrollOffset,()=>n.y+n.height-i-o,()=>l,()=>i))}}ls=new WeakMap,fc=new WeakMap,Wr=new WeakMap,Ui=new WeakMap;class Y_ extends Eo{constructor(e,n,r={}){const o=n(),i=Object.keys(o.intervals);if(gi.every(l=>!i.includes(l)))throw new Error("SelectionRect requires at least one of the channels 'x' or 'y' to be present in the selection.");const s={name:"selectionRect",configurableVisibility:!1,resolve:{scale:{x:"forced",y:"forced"}},data:{values:u2(n())},encoding:{},layer:[]};i.includes("x")&&(s.encoding.x={field:"_x",type:null,title:null},s.encoding.x2={field:"_x2"}),i.includes("y")&&(s.encoding.y={field:"_y",type:null,title:null},s.encoding.y2={field:"_y2"}),s.layer.push({name:"selectionRectRect",mark:{type:"rect",clip:!0,fill:"#808080",fillOpacity:.05,stroke:"black",strokeWidth:1,strokeOpacity:.2,...r}});const a=l=>{const u=e.view.getScaleResolution(l);return`format(datum._${l}2 - datum._${l}, '.3s')`+(u.type==="locus"?" + 'b'":"")},c=r.measure=="inside"?9:r.measure=="outside"?-9:0;i.includes("x")&&c!=0&&s.layer.push({name:"selectionRectTextX",mark:{type:"text",align:"center",paddingX:5,dy:c,tooltip:null},encoding:{text:{expr:a("x")},y:i.includes("y")?{field:"_y2",type:null,title:null}:{value:1},y2:null}}),i.includes("y")&&c!=0&&s.layer.push({name:"selectionRectTextY",mark:{type:"text",align:"center",paddingY:5,dy:c,tooltip:null,angle:-90},encoding:{text:{expr:a("y")},x2:null}}),super(s,e.layoutParent.context,e.layoutParent,e.view,"selectionRect",{blockEncodingInheritance:!0,contributesToScaleDomain:!1}),n.addListener(()=>{const l=n();this.context.dataFlow.findDataSourceByKey(this).updateDynamicData(u2(l))})}}function u2(t){const e=t.intervals.x,n=t.intervals.y;return!e&&!n?[]:[{_x:e==null?void 0:e[0],_x2:e==null?void 0:e[1],_y:n==null?void 0:n[0],_y2:n==null?void 0:n[1]}]}class f2{constructor(e,n,r){he(this,Tu);if(this.layoutParent=n,this.view=e,this.serial=r,this.background=void 0,this.backgroundStroke=void 0,this.axes={},this.gridLines={},this.scrollbars={},this.selectionRect=void 0,this.title=void 0,this.coords=Sn.ZERO,e.needsAxes.x||e.needsAxes.y){const o=e.spec,i="view"in o?o==null?void 0:o.view:void 0,s=Q_(i);s&&(this.background=new en(s,n.context,n,e,"background"+r,{blockEncodingInheritance:!0}));const a=Z_(i);a&&(this.backgroundStroke=new en(a,n.context,n,e,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const c=W_(e.spec.title);if(c){const l=new en(c,n.context,n,e,"title"+r,{blockEncodingInheritance:!0});this.title=l}}e.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new l2(this,"horizontal")),e.spec.viewportHeight!=null&&(this.scrollbars.vertical=new l2(this,"vertical")),pe(this,Tu,Zv).call(this)}*getChildren(){this.background&&(yield this.background),this.backgroundStroke&&(yield this.backgroundStroke),this.title&&(yield this.title),yield*Object.values(this.axes),yield*Object.values(this.gridLines),yield this.view,yield*Object.values(this.scrollbars),this.selectionRect&&(yield this.selectionRect)}async createAxes(){const{view:e,axes:n,gridLines:r}=this,o=(a,c)=>{const l=a.getAxisProps();if(l===null)return;const u=l?{...l}:{};if(!u.orient){for(const f of Yl[c])if(!n[f]){u.orient=f;break}if(!u.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(u.title??(u.title=a.getTitle()),!Yl[c].includes(u.orient))throw new Error(`Invalid axis orientation "${u.orient}" on channel "${c}"!`);return u},i=async(a,c,l)=>{const u=o(a,c);if(u){if(n[u.orient])throw new Error(`An axis with the orient "${u.orient}" already exists!`);const f=new n2(u,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);n[u.orient]=f,await f.initializeChildren()}},s=async(a,c,l)=>{const u=o(a,c);if(u&&(u.grid||u.chromGrid)){const f=new L_(u,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[u.orient]=f,await f.initializeChildren()}};for(const a of["x","y"])if(e.needsAxes[a]){const c=e.resolutions.axis[a];if(!c)continue;await i(c,a,e)}for(const a of["x","y"])if(e.needsAxes[a]&&e.getConfiguredOrDefaultResolution(a,"axis")!="excluded"){const c=e.getAxisResolution(a);if(!c)continue;await s(c,a,e)}if(e instanceof Eo){for(const a of e)for(const[c,l]of Object.entries(a.resolutions.axis)){const u=l.getAxisProps();u&&u.orient&&await i(l,c,a)}for(const a of e)for(const[c,l]of Object.entries(a.resolutions.axis)){const u=l.getAxisProps();u&&!u.orient&&await i(l,c,a)}}[...Object.values(n),...Object.values(r)].forEach(a=>a.visit(c=>{c instanceof en&&c.resolve("scale")}))}getOverhang(){const e=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+(r.axisProps.offset??0),0):0};return new Nt(e("top"),e("right"),e("bottom"),e("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}Tu=new WeakSet,Zv=function(){const e=this.view,n=r=>{this.view.context.glHelper.canvas.style.cursor=r};for(const[r,o]of e.paramMediator.paramConfigs){if(!("select"in o))continue;const i=yl(o.select);if(!f1(i))continue;const s=i.encodings,a=Object.fromEntries(s.map(S=>{const E=this.view.getScaleResolution(S),I=E==null?void 0:E.scale;if(!I||!St(I.type))throw new Error(`No continuous scale found for interval selection param "${r}" on channel "${S}"! Scale type is "${(I==null?void 0:I.type)??"none"}".`);return[S,E]}));if(this.selectionRect)throw new Error("Only one interval selection per container is currently allowed!");let c=!1,l=!1,u=!1,f=null;const d=(S,E)=>Object.fromEntries(s.map(I=>[I,[Math.min(S[I],E[I]),Math.max(S[I],E[I])]])),h=e.paramMediator.createExpression(r),p=e.paramMediator.getSetter(r);o.value&&p({type:"interval",intervals:o.value});const y=()=>{p(c1(s)),n(null)};this.selectionRect=new Y_(this,h,i.mark),this.selectionRect.initializeChildren();const v=S=>{const E={x:0,y:0},I=e.coords.normalizePoint(S.x,S.y,!0);for(const _ of s){const B=a[_].scale,N=B.invert(_=="x"?I.x:I.y);E[_]=N+(["index","locus"].includes(B.type)?.5:0)}return E},b=S=>{var N,F,M,C;const{intervals:E}=S,I=(Y,Q,oe)=>{const se=(ye,de)=>de==null?null:a[ye].scale(de),ae=se("x",Y)??oe,ce=se("y",Q)??oe;return e.coords.denormalizePoint(ae,ce,!0)},_=I((N=E.x)==null?void 0:N[0],(F=E.y)==null?void 0:F[0],0),B=I((M=E.x)==null?void 0:M[1],(C=E.y)==null?void 0:C[1],1);return Sn.create(_.x,_.y,B.x-_.x,B.y-_.y)};e.addInteractionEventListener("mousedown",(S,E)=>{if(E.mouseEvent.button!=0)return;if(f=c?b(h()):null,f)n("grabbing"),l=!0;else{const F=E.point;if(h1(h())&&(l=!0),E.mouseEvent.shiftKey)y(),u=!0;else if(h1(h())){const C=(Y,Q)=>{e.removeInteractionEventListener("mouseup",C);const oe=Q.point;F.subtract(oe).length<2&&y()};e.addInteractionEventListener("mouseup",C);return}else return}E.stopPropagation();const I=E.point,_=Xt.fromMouseEvent(E.mouseEvent).subtract(I),B=F=>{const M=Xt.fromMouseEvent(F).subtract(_);let C;if(f){const Y=M.subtract(I),Q=f.translate(Y.x,Y.y);C=d(v(new Xt(Q.x,Q.y)),v(new Xt(Q.x2,Q.y2)))}else C=d(v(I),v(M));for(const Y of s){const Q=a[Y],{zoomExtent:oe,scale:se}=Q,ae=C[Y];if(["index","locus"].includes(se.type)&&(ae[0]=Math.ceil(ae[0]),ae[1]=Math.ceil(ae[1])),f){const ce=ae[1]-ae[0],ye=oe[0],de=oe[1];ae[0]<ye&&(ae[0]=ye,ae[1]=ye+ce),ae[1]>de&&(ae[1]=de,ae[0]=de-ce)}else ae[0]=Math.max(oe[0],ae[0]),ae[1]=Math.min(oe[1],ae[1]);ae[1]=Math.min(oe[1],ae[1])}p({type:"interval",intervals:C})},N=()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",N),u=!1,f&&(n("move"),f=null)};document.addEventListener("mousemove",B),document.addEventListener("mouseup",N)}),e.addInteractionEventListener("click",(S,E)=>{E.mouseEvent.button==0&&l&&(E.stopPropagation(),l=!1)},!0);const A=S=>N5(h(),v(S));e.addInteractionEventListener("dblclick",(S,E)=>{A(E.point)&&(y(),E.stopPropagation())},!0),e.addInteractionEventListener("mousemove",(S,E)=>{A(E.point)?u||(c=!0,f||n("move")):(c=!1,f||n(null))})}};function Q_(t){if(t!=null&&t.fill||t!=null&&t.fillOpacity||t!=null&&t.shadowOpacity)return{configurableVisibility:!1,data:{values:[{}]},mark:{color:t.fill,opacity:t.fillOpacity??(t.fill?1:0),type:"rect",clip:!1,tooltip:null,minHeight:1,minOpacity:0,shadowBlur:t.shadowBlur,shadowColor:t.shadowColor,shadowOffsetX:t.shadowOffsetX,shadowOffsetY:t.shadowOffsetY,shadowOpacity:t.shadowOpacity}}}function Z_(t){if(!(!t||!t.stroke||t.strokeWidth===0||t.strokeOpacity===0))return{configurableVisibility:!1,resolve:{scale:{x:"excluded",y:"excluded"},axis:{x:"excluded",y:"excluded"}},data:{values:[{x:0,y:0,x2:1,y2:0},{x:1,y:0,x2:1,y2:1},{x:1,y:1,x2:0,y2:1},{x:0,y:1,x2:0,y2:0}]},mark:{size:t.strokeWidth??1,color:t.stroke??"lightgray",strokeCap:"square",opacity:t.strokeOpacity??1,type:"rule",clip:!1,tooltip:null},encoding:{x:{field:"x",type:"quantitative",scale:null},y:{field:"y",type:"quantitative",scale:null},x2:{field:"x2"},y2:{field:"y2"}}}}class X_ extends Da{constructor(n,r,o,i,s,a,c){super(n,r,o,i,s,c);he(this,He);he(this,us,1/0);he(this,fs,10);he(this,nn,[]);he(this,Gi,{});he(this,hs,0);this.spec=n,Ae(this,fs,n.spacing??10),Ae(this,us,a),Ae(this,nn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),j(this,nn).push(new f2(n,this,j(this,hs))),Ov(this,hs)._++}setChildren(n){Ae(this,nn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const o=j(this,nn).findIndex(i=>i.view==n);if(o>=0)j(this,nn)[o]=new f2(r,this,j(this,hs));else throw new Error("Not my child view!")}get children(){return j(this,nn).map(n=>n.view)}get childCount(){return j(this,nn).length}async createAxes(){const n=[];for(const r of gi){const o=this.resolutions.axis[r];if(o){const i=o.getAxisProps();if(i){const s={title:o.getTitle(),orient:Yl[r][0],...i},a=new n2(s,o.scaleResolution.type,this.context,this,this);n.push(a.initializeChildren()),j(this,Gi)[r]=a}}}return Promise.all([...n,...j(this,nn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of j(this,nn))yield*n.getChildren();for(const n of Object.values(j(this,Gi)))yield n}getOverhang(){return pe(this,He,Kv).call(this).union(pe(this,He,ku).call(this))}getSize(){return this._cache("size",()=>new Lr(pe(this,He,$0).call(this,"column"),pe(this,He,$0).call(this,"row")).addPadding(pe(this,He,ku).call(this)))}render(n,r,o={}){if(super.render(n,r,o),!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(pe(this,He,ku).call(this)),n.pushView(this,r);const i={devicePixelRatio:n.getDevicePixelRatio()},s=Bb(pe(this,He,J0).call(this,"column"),r.width,i),a=Bb(pe(this,He,J0).call(this,"row"),r.height,i),c=new t2(j(this,He,Vi).length,j(this,us)??1/0),l=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,f]of j(this,He,Vi).entries()){const{view:d,axes:h,gridLines:p,background:y,backgroundStroke:v,title:b,selectionRect:A}=f,[S,E]=c.getCellCoords(u),I=s[pe(this,He,ep).call(this,"column",S)],_=a[pe(this,He,ep).call(this,"row",E)],B=d.getViewportSize(),N=d.getSize(),F=d.getOverhang(),M=I.location-F.left,C=_.location-F.top,Y=(q,W)=>(q[W].grow?(W=="width"?I:_).size:q[W].px)+F[W],Q=Y(B,"width"),oe=Y(B,"height"),se=Y(N,"width"),ae=Y(N,"height"),ce=f.scrollbars.horizontal,ye=f.scrollbars.vertical,de=ce?()=>l(ce.viewportOffset):()=>0,Ce=ye?()=>l(ye.viewportOffset):()=>0,me=new Sn(()=>r.x+M,()=>r.y+C,()=>Q,()=>oe),Ee=d.isScrollable(),De=Ee?new Sn(()=>r.x+M-de(),()=>r.y+C-Ce(),()=>se,()=>ae):me;f.coords=me;const Ge=o.clipRect?me.intersect(o.clipRect):me;y==null||y.render(n,Ge,{...o,clipRect:void 0});for(const q of Object.values(p))q.render(n,me,o);const Ve=J_(d)||Ee;Ve&&d.render(n,De,{...o,clipRect:Ge}),v==null||v.render(n,Ge,{...o,clipRect:void 0});for(const[q,W]of Object.entries(h)){const ee=q=="left"||q=="right"?"vertical":"horizontal",J=f.scrollbars[ee],fe=J?me.modify(ee=="vertical"?{y:()=>De.y,height:ae}:{x:()=>De.x,width:se}):me,L=h2(fe,q,W);let D=o.clipRect;J&&(D=L.intersect(D).intersect(J?me.modify(ee=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),W.render(n,L,{...o,clipRect:D})}for(const q of Object.values(j(this,Gi))){const ee=q.axisProps.orient;(ee=="left"&&S==0||ee=="right"&&S==c.nCols-1||ee=="top"&&E==0||ee=="bottom"&&E==c.nRows-1)&&q.render(n,h2(me.shrink(f.view.getOverhang()),ee,q),o)}Ve||d.render(n,De,o),A==null||A.render(n,De,o);for(const q of Object.values(f.scrollbars))q.updateScrollbar(me,De),q.render(n,r,o);b==null||b.render(n,me,o)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=j(this,He,Vi).find(i=>i.coords.containsPoint(n.point.x,n.point.y));for(const i of Object.values((r==null?void 0:r.scrollbars)??{}))if(i.coords.containsPoint(n.point.x,n.point.y)&&(i.propagateInteractionEvent(n),n.stopped))return;const o=r==null?void 0:r.view;if(o){if(o.propagateInteractionEvent(n),n.stopped)return;(o instanceof en||o instanceof Eo)&&M_(n,r.coords,i=>pe(this,He,Jv).call(this,r.coords,r.view,i),this.context.getCurrentHover(),this.context.animator)}n.stopped||this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return"independent"}}us=new WeakMap,fs=new WeakMap,nn=new WeakMap,Gi=new WeakMap,hs=new WeakMap,He=new WeakSet,Vi=function(){return j(this,nn).filter(n=>n.view.isConfiguredVisible())},Xv=function(){return new t2(j(this,He,Vi).length,j(this,us)??1/0)},gc=function(n){const r=n=="column"?"width":"height",o=(i,s)=>i.map(a=>{const l=j(this,He,Vi)[a].getOverhangAndPadding();return n=="column"?s?l.right:l.left:s?l.bottom:l.top}).reduce((a,c)=>Math.max(a,c),0);return this._cache(`size/directionSizes/${n}`,()=>j(this,He,Xv)[n=="column"?"colIndices":"rowIndices"].map(i=>({axisBefore:o(i,0),axisAfter:o(i,1),view:kB(i.map(s=>j(this,He,Vi)[s].view.getViewportSize()[r]))})))},J0=function(n){const r=pe(this,He,gc).call(this,n),o=[];o.push(Sa);for(const[i,s]of r.entries())i>0&&o.push({px:j(this,fs),grow:0}),(i==0||this.wrappingFacet)&&o.push(Sa),o.push({px:s.axisBefore,grow:0}),o.push(s.view),o.push({px:s.axisAfter,grow:0}),(i==r.length-1||this.wrappingFacet)&&o.push(Sa);return o},$0=function(n){let r=0,o=0;const i=n=="row"?this.spec.height:this.spec.width;if(i||i===0)return _b(i);const s=pe(this,He,gc).call(this,n);for(const[a,c]of s.entries())a>0&&(o+=j(this,fs)),(a==0||this.wrappingFacet)&&(o+=0),o+=c.axisBefore,o+=c.view.px??0,r+=c.view.grow??0,o+=c.axisAfter,(a==s.length-1||this.wrappingFacet)&&(o+=0);return{px:o,grow:r}},ep=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},Kv=function(){const n=pe(this,He,gc).call(this,"column"),r=pe(this,He,gc).call(this,"row");return!n.length||!r.length?Nt.zero():new Nt(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},ku=function(){const n=r=>{const o=md[r],i=j(this,Gi)[o];return(i==null?void 0:i.axisProps.orient)!==r?0:Math.max(i.getPerpendicularSize()+(i.axisProps.offset??0),0)};return new Nt(n("top"),n("right"),n("bottom"),n("left"))},Jv=function(n,r,o){for(const[i,s]of Object.entries(K_(r))){if(s.size<=0)continue;const a=n.normalizePoint(o.x,o.y),c=n.normalizePoint(o.x+o.xDelta,o.y+o.yDelta),l={x:c.x-a.x,y:c.y-a.y};for(const u of s)u.zoom(2**o.zDelta,i=="y"?1-a[i]:a[i],i=="x"?l.x:-l.y)}this.context.animator.requestRender()};function K_(t){const e={x:new Set,y:new Set};return t.visit(n=>{for(const[r,o]of Object.entries(e)){const i=n.getScaleResolution(r);i&&i.isZoomable()&&o.add(i)}}),e}function J_(t){let e=!0;return t.visit(n=>{n instanceof en&&e&&(e=n.mark.properties.clip===!0)}),e}function h2(t,e,n){const r=n.axisProps,o=n.getPerpendicularSize();if(e=="bottom")return t.translate(0,t.height+r.offset).modify({height:o});if(e=="top")return t.translate(0,-o-r.offset).modify({height:o});if(e=="left")return t.translate(-o-r.offset,0).modify({width:o});if(e=="right")return t.translate(t.width+r.offset,0).modify({width:o})}class bd extends X_{constructor(e,n,r,o,i){super(e,n,r,o,i,vd(e)?e.columns:Ql(e)?1:1/0),this.spec=e}async initializeChildren(){const e=this.spec,n=vd(e)?e.concat:Ql(e)?e.vconcat:e.hconcat;this.setChildren(await Promise.all(n.map((r,o)=>this.context.createOrImportView(r,this,this,"grid"+o)))),await this.createAxes()}getDefaultResolution(e,n){return n=="axis"?"independent":Ql(this.spec)&&e==="x"||g2(this.spec)&&e==="y"?"shared":"independent"}}const d2="viewRoot";class $_{constructor(e={}){he(this,ds,new Map);this.options={allowImport:!0,wrapRoot:!0,...e};const n=r=>(o,i,s,a,c)=>new r(o,i,s,a,o.name??c);this.addViewType(xd,n(Eo)),this.addViewType(wd,n(en)),this.addViewType(Ql,n(bd)),this.addViewType(g2,n(bd)),this.addViewType(vd,n(bd)),this.addViewType(nR,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(e,n){j(this,ds).set(e,n)}createView(e,n,r,o,i){for(const[s,a]of j(this,ds))if(s(e))return a(e,n,r,o,i);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(e)]))}isViewSpec(e){const n=[...j(this,ds).keys()].filter(r=>r(e));if(n.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return n.length==1}async createOrImportView(e,n,r,o,i,s){let a;if(tR(e)){let u;if("url"in e.import)if(this.options.allowImport)u=await t_(e,o.getBaseUrl(),n);else throw new Pr("Importing views is not allowed!",r);else if("template"in e.import)u=p2(e.import.template,o);else throw new Error("Invalid import: "+JSON.stringify(e));s==null||s(u),eR(u,e),a=u}else a=e;const c=u=>{var f;return(f=u==null?void 0:u.params)==null?void 0:f.some(d=>s1(d)&&yl(d.select).type=="interval")};!o&&this.options.wrapRoot&&(wd(a)||xd(a)||c(a))&&i===d2&&(a={name:"implicitRoot",vconcat:[a]});const l=this.createView(a,n,r,o,i);return l instanceof Da&&await l.initializeChildren(),l}}ds=new WeakMap;function p2(t,e){var r,o;const n=(o=(r=e.spec)==null?void 0:r.templates)==null?void 0:o[t];if(n)return structuredClone(n);if(e.dataParent)return p2(t,e.dataParent);throw new Error(`Cannot find template "${t}" in current view or its ancestors!`)}function eR(t,e){e.name!=null&&(t.name=e.name);const n=_t(e.params)?e.params:Rt(e.params)?Object.entries(e.params).map(([r,o])=>({name:r,value:o})):[];if(n.length){t.params??(t.params=[]);for(const r of n){const o=t.params.findIndex(i=>i.name==r.name);o>=0&&(t.params[o]=r)}for(const r of n)t.params.some(o=>o.name==r.name)||t.params.push(r)}}function wd(t){return"mark"in t&&(rt(t.mark)||Rt(t.mark))}function xd(t){return"layer"in t&&Rt(t.layer)}function tR(t){return"import"in t}function Ql(t){return"vconcat"in t&&_t(t.vconcat)}function g2(t){return"hconcat"in t&&_t(t.hconcat)}function vd(t){return"concat"in t&&_t(t.concat)}function nR(t){return"samples"in t&&Rt(t.samples)&&"spec"in t&&Rt(t.spec)}function rR(t){const e=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of t.paramConfigs.values()){if(!P5(r))continue;const o=r.bind;if(!o||!("input"in o))continue;const i=r.name,s=t.getSetter(i),a=t.getValue(i),c=o.name??i,l=o.debounce?ql(s,o.debounce,!1):s,u=`${e}-param-${i}`;if(o.input=="range")n.push(ot`<label for=${u}>${c}</label>
|
|
658
|
+
`:"";return ye`${c}${o}`}class Vo extends ay{constructor(e,t,r,i,s,o){super(e,t,r,i,s,o),this.spec=e}async initializeChildren(){}*[Symbol.iterator](){}replaceChild(e,t){throw new Error("Not implemented")}visit(e){let t;try{t=e(this)}catch(r){throw r.view=this,r}if(t===Go)return t;if(t!==sy){e.beforeChildren&&e.beforeChildren(this);for(const r of this){const i=r.visit(e);if(i===Go)return i}e.afterChildren&&e.afterChildren(this),e.postOrder&&e.postOrder(this)}}findDescendantByPath(e){for(const t of this)if(t.name===e[0]){if(e.length==1)return t;if(t instanceof Vo)return t.findDescendantByPath(e.slice(1))}}findChildByName(e){for(const t of this)if(t.name===e)return t}findDescendantByName(e){let t;return this.visit(r=>{if(r.name==e)return t=r,Go}),t}getDefaultResolution(e,t){return"shared"}}class Ri extends Vo{constructor(t,r,i,s,o,a){super(t,r,i,s,o,{layersChildren:!0,...a});R(this,bn,[]);this.spec=t,this.needsAxes={x:!0,y:!0}}async initializeChildren(){G(this,bn,await Promise.all(this.spec.layer.map((t,r)=>this.context.createOrImportView(t,this,this,"grid"+r,i=>{if(!Sh(i)&&!vh(i))throw new Qn("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return E(this,bn).slice()}*[Symbol.iterator](){for(const t of E(this,bn))yield t}render(t,r,i={}){if(super.render(t,r,i),!!this.isConfiguredVisible()){t.pushView(this,r);for(const s of E(this,bn))s.render(t,r,i);t.popView(this)}}propagateInteractionEvent(t){this.handleInteractionEvent(void 0,t,!0);for(let r=E(this,bn).length-1;r>=0;r--)if(E(this,bn)[r].propagateInteractionEvent(t),t.stopped)return;this.handleInteractionEvent(void 0,t,!1)}}bn=new WeakMap;class By{constructor(e,t){this.n=e,this.maxCols=t??1/0}get nRows(){return this.maxCols==1/0?1:Math.ceil(this.n/this.maxCols)}get nCols(){return Math.min(this.n,this.maxCols)}get rowIndices(){const e=[],t=this.nCols,r=this.nRows;for(let i=0;i<r;i++){const s=[];e.push(s);for(let o=0;o<t;o++){const a=i*t+o;a<this.n&&s.push(a)}}return e}get colIndices(){const e=[],t=this.nCols,r=this.nRows;for(let i=0;i<t;i++){const s=[];e.push(s);for(let o=0;o<r;o++){const a=o*t+i;a<this.n&&s.push(a)}}return e}getCellIndex(e,t){let r=0;if(this.maxCols==1/0)r=t==0?e:void 0;else{if(e>=this.maxCols)return;r=t*this.nCols+e}return r<this.n?r:void 0}getCellCoords(e){if(!(e<0||e>=this.n))return[e%this.nCols,Math.floor(e/this.nCols)]}}const hT="chromosome_ticks_and_labels",dT={x:"width",y:"height"};function bh(n){return n=="x"?"y":"x"}const ou={x:["bottom","top"],y:["left","right"]},xh=Object.fromEntries(Object.entries(ou).map(([n,e])=>e.map(t=>[t,n])).flat(1));function qn(n){return xh[n]}class ky extends Ri{constructor(e,t,r,i,s,o){const a=t=="locus",c={...a?mT:Fy,...pT(t,e),...e};super(a?gT(c,t):Py(c,t),r,i,s,`axis_${e.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=c}getSize(){const e={px:this.getPerpendicularSize()},t={grow:1};return xh[this.axisProps.orient]=="x"?new Wn(t,e):new Wn(e,t)}getPerpendicularSize(){return Ah(this.axisProps)}isPickingSupported(){return!1}}function Ah(n){const e=qn(n.orient);let t=n.ticks&&n.tickSize||0;return n.labels&&(t+=n.labelPadding,e=="x"?t+=n.labelFontSize:t+=30),n.title&&(t+=n.titlePadding+n.titleFontSize),t=Math.min(n.maxExtent||1/0,Math.max(n.minExtent||0,t)),t}const Fy={values:null,minExtent:20,maxExtent:1/0,offset:0,domain:!0,domainWidth:1,domainColor:"gray",domainDash:null,domainDashOffset:0,domainCap:"square",ticks:!0,tickSize:5,tickWidth:1,tickColor:"gray",tickDash:null,tickDashOffset:0,tickCap:"square",tickCount:null,tickMinStep:null,labels:!0,labelAlign:"center",labelBaseline:"middle",labelPadding:4,labelFontSize:10,labelLimit:180,labelColor:"black",format:null,titleColor:"black",titleFont:"sans-serif",titleFontSize:10,titlePadding:3};function pT(n,e){const t=e.orient,r=n=="nominal"||n=="ordinal";let i="center",s="middle",o=e.labelAngle??((t=="top"||t=="bottom")&&r?-90:0);switch(t){case"left":i="right";break;case"right":i="left";break;case"top":case"bottom":Math.abs(o)>30?(i=o>0==(t=="bottom")?"left":"right",s="middle"):s=t=="top"?"alphabetic":"top";break}return{labelAlign:i,labelAngle:o,labelBaseline:s}}function Py(n,e){const t={...n,extent:Ah(n)},r=qn(t.orient),i=bh(r),s=t.orient=="bottom"||t.orient=="right"?1:-1,o=t.orient=="bottom"||t.orient=="left"?1:0,a=()=>({name:"domain",data:{values:[{}]},mark:{type:"rule",clip:!1,strokeDash:t.domainDash,strokeCap:t.domainCap,color:t.domainColor,[i]:o,size:t.domainWidth}}),c=()=>({name:"labels",mark:{type:"text",clip:!1,align:t.labelAlign,angle:t.labelAngle,baseline:t.labelBaseline,[i+"Offset"]:(t.tickSize+t.labelPadding)*s,[i]:o,size:t.labelFontSize,color:t.labelColor,minBufferSize:1500},encoding:{[r]:{field:"value",type:e},text:{field:"label"}}}),u=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:t.tickDash,strokeCap:t.tickCap,color:t.tickColor,size:t.tickWidth,minBufferSize:300},encoding:{[i]:{value:o},[i+"2"]:{value:o-t.tickSize/t.extent*(o?1:-1)}}}),l=()=>({name:"title",data:{values:[{}]},mark:{type:"text",clip:!1,align:"center",baseline:t.orient=="bottom"?"bottom":"top",angle:[0,90,0,-90][["top","right","bottom","left"].indexOf(t.orient)],text:t.title,color:t.titleColor,[r]:.5,[i]:1-o}}),f=()=>{const h={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:e}},layer:[]};return t.ticks&&h.layer.push(u()),t.labels&&h.layer.push(c()),h},d={resolve:{scale:{[r]:"forced"}},[dT[bh(r)]]:t.extent,data:{lazy:{type:"axisTicks",channel:r,axis:n}},layer:[]};return t.domain&&d.layer.push(a()),(t.ticks||t.labels)&&d.layer.push(f()),t.title&&d.layer.push(l()),d}const mT={...Fy,chromTicks:!0,chromTickSize:18,chromTickWidth:1,chromTickColor:"#989898",chromTickDash:[4,2],chromTickDashOffset:1,chromLabels:!0,chromLabelFontSize:13,chromLabelFontWeight:"normal",chromLabelFontStyle:"normal",chromLabelColor:"black",chromLabelAlign:"left",chromLabelPadding:7};function gT(n,e){const t={...n,extent:Ah(n)},r=qn(t.orient),i=bh(r),s=t.orient=="bottom"||t.orient=="left"?1:0,o=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:n.chromTickDash,strokeDashOffset:n.chromTickDashOffset,[i]:s,[i+"2"]:s-t.chromTickSize/t.extent*(s?1:-1),color:n.chromTickColor,size:t.chromTickWidth}}),a=()=>{let l;switch(t.orient){case"top":l={y:0,angle:0,paddingX:4,dy:-t.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":l={y:1,angle:0,paddingX:4,dy:t.chromLabelPadding+t.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":l={x:1,angle:-90,paddingY:4,dy:-t.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":l={x:0,angle:90,align:"right",paddingY:4,dy:-t.chromLabelPadding};break;default:l={}}return{name:"chromosome_labels",mark:{type:"text",size:t.chromLabelFontSize,font:t.chromLabelFont,fontWeight:t.chromLabelFontWeight,fontStyle:t.chromLabelFontStyle,color:t.chromLabelColor,align:n.chromLabelAlign,baseline:"alphabetic",clip:!1,...l},encoding:{[r+"2"]:{field:"continuousEnd",type:e},text:{field:"name"}}}};let c;switch(t.orient){case"bottom":case"top":c={};break;case"left":c={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":c={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:c={}}const u=Py({...n,...c},e);if(n.chromTicks||n.chromLabels){const l={name:hT,data:{lazy:{type:"axisGenome",channel:qn(t.orient)}},encoding:{[r]:{field:"continuousStart",type:e,band:0}},layer:[]};if(n.chromTicks&&l.layer.push(o()),n.chromLabels){l.layer.push(a());let f;u.layer.filter(d=>d.name=="ticks_and_labels").forEach(d=>d.layer.filter(h=>h.name=="labels").forEach(h=>{f=h.mark})),f&&(t.orient=="top"||t.orient=="bottom"?(f.viewportEdgeFadeWidthLeft=30,f.viewportEdgeFadeDistanceLeft=40):(f.viewportEdgeFadeWidthBottom=30,f.viewportEdgeFadeDistanceBottom=40))}u.layer.push(l)}return u}class yT{constructor(e){R(this,Jr);R(this,er,0);R(this,tr,0);G(this,Jr,new Array(e))}push(e){E(this,Jr)[E(this,er)]=e,G(this,er,(E(this,er)+1)%this.size),G(this,tr,Math.min(E(this,tr)+1,this.size))}get(){const e=E(this,Jr);return E(this,tr)<this.size?e.slice(0,E(this,tr)):e.slice(E(this,er),this.size).concat(e.slice(0,E(this,er)))}get size(){return E(this,Jr).length}get length(){return E(this,tr)}}Jr=new WeakMap,er=new WeakMap,tr=new WeakMap;let Lr,My=0;function Ry(){return performance.now()-My<50}function bT(n){return function(...e){My=performance.now(),n(...e)}}function xT(n,e,t,r,i){if(t=bT(t),n.type=="wheel"){n.uiEvent.preventDefault();const s=n.uiEvent,o=s.deltaMode?120:1;if(!s.deltaX&&!s.deltaY)return;Lr==null||Lr.stop();let{x:a,y:c}=n.point;if(r){const u=r.mark.encoders;u.x&&!u.x2&&!u.x.constant&&(a=+u.x(r.datum)*e.width+e.x),u.y&&!u.y2&&!u.y.constant&&(c=(1-+u.y(r.datum))*e.height+e.y)}Math.abs(s.deltaX)<Math.abs(s.deltaY)?t({x:a,y:c,xDelta:0,yDelta:0,zDelta:s.deltaY*o/300}):t({x:a,y:c,xDelta:-s.deltaX*o,yDelta:0,zDelta:0})}else if(n.type=="mousedown"&&n.mouseEvent.button===0){Lr&&Lr.stop();const s=new yT(30),o=n.mouseEvent;o.preventDefault();let a=at.fromMouseEvent(o);const c=f=>{const d=at.fromMouseEvent(f);s.push({point:d,timestamp:performance.now()});const h=d.subtract(a);t({x:a.x,y:a.y,xDelta:h.x,yDelta:h.y,zDelta:0}),a=d},u=()=>{const d=performance.now(),h=s.get().filter(A=>d-A.timestamp<160);if(h.length<5||!i||AT(h))return;const p=h.at(-1),m=h[0],g=p.point.subtract(m.point).multiply(1/(p.timestamp-m.timestamp));let y=a.x,x=a.y;Lr=yh(i,A=>{t({x:A.x,y:A.y,xDelta:y-A.x,yDelta:x-A.y,zDelta:0}),y=A.x,x=A.y},150,.5,{x:y,y:x}),Lr({x:a.x-g.x*250,y:a.y-g.y*250})},l=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",l),u()};document.addEventListener("mouseup",l,!1),document.addEventListener("mousemove",c,!1)}}function AT(n){const e=n[Math.floor(n.length/2)],t=e.point.subtract(n[0].point).multiply(e.timestamp-n[0].timestamp),r=n.at(-1).point.subtract(e.point).multiply(n.at(-1).timestamp-e.timestamp),i=t.length;return r.length/i<.4}class wT extends Ri{constructor(e,t,r,i,s,o){const c={...t=="locus"?vT:Oy,...e};super(DT(c,t),r,i,s,`axisGrid_${e.orient}`,{blockEncodingInheritance:!0,contributesToScaleDomain:!1,...o}),this.axisProps=c}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const Oy={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},vT={...Oy,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function ST(n,e){const t=n,r=qn(t.orient);return{name:"grid_lines",data:{lazy:{type:"axisTicks",channel:r,axis:n}},mark:{type:"rule",strokeDash:t.gridDash,strokeCap:t.gridCap,color:t.gridColor,size:t.gridWidth,opacity:t.gridOpacity,minBufferSize:300},encoding:{[r]:{field:"value",type:e}}}}function ET(n,e){const t=n,r=qn(t.orient);return{name:"chromosome_lines",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rule",strokeDash:t.chromGridDash,strokeCap:t.chromGridCap,color:t.chromGridColor,size:t.chromGridWidth,opacity:t.chromGridOpacity},encoding:{[r]:{field:"continuousStart",type:e,band:0}}}}function CT(n,e){const t=n,r=qn(t.orient);return{name:"chromosome_fill",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rect"},encoding:{[r]:{field:"continuousStart",type:e,band:0},[r+"2"]:{field:"continuousEnd",band:0},fill:{field:"odd",type:"nominal",scale:{domain:[!1,!0],range:[t.chromGridFillEven??"white",t.chromGridFillOdd??"white"]}},opacity:{field:"odd",type:"nominal",scale:{type:"ordinal",domain:[!1,!0],range:[t.chromGridFillEven?1:0,t.chromGridFillOdd?1:0]}}}}}function DT(n,e){const t={...n},r=[];return t.chromGrid&&(t.chromGridFillOdd||t.chromGridFillEven)&&r.push(CT(t,e)),t.chromGrid&&t.chromGridOpacity>0&&r.push(ET(t,e)),t.grid&&t.gridOpacity>0&&r.push(ST(t,e)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[qn(n.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const Ny={anchor:"middle",frame:"group",offset:10,orient:"top",align:void 0,angle:0,baseline:"alphabetic",dx:0,dy:0,color:void 0,font:void 0,fontSize:12,fontStyle:"normal",fontWeight:"normal"},IT={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},TT={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},BT={start:0,middle:.5,end:1},kT={start:"left",middle:"center",end:"right"};function FT(n){if(!n)return;const e=me(n)?{text:n}:n;if(!e.text||e.orient=="none")return;const t={"track-title":IT,overlay:TT}[e.style]??{},r={...Ny,...t,...e};let i={},s={x:0,y:0};const o=BT[r.anchor??"middle"];switch(r.orient){case"top":s={x:o,y:1},i={baseline:"alphabetic",angle:0};break;case"right":s={x:1,y:1-o},i={baseline:"alphabetic",angle:90};break;case"bottom":s={x:o,y:0},i={baseline:"top",angle:0};break;case"left":s={x:0,y:o},i={baseline:"alphabetic",angle:-90};break}const a={...Ny,...i,...t,...e},c={xOffset:0,yOffset:0};switch(r.orient){case"top":c.yOffset=-a.offset;break;case"right":c.xOffset=a.offset;break;case"bottom":c.yOffset=a.offset;break;case"left":c.xOffset=-a.offset;break}return{configurableVisibility:!1,data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...s,...c,text:a.text,align:a.align??kT[a.anchor],angle:a.angle,baseline:a.baseline,dx:a.dx,dy:a.dy,color:a.color,font:a.font,size:a.fontSize,fontStyle:a.fontStyle,fontWeight:a.fontWeight}}}class Ly extends ft{constructor(t,r){const i={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},t.layoutParent.context,t.layoutParent,t.view,"scrollbar-"+r,{blockEncodingInheritance:!0});R(this,ws);R(this,Sa,Ft.ZERO);R(this,nr,0);R(this,$r,0);Y(this,"viewportOffset",0);this.config=i,G(this,ws,r),this.interpolateViewportOffset=yh(this.context.animator,s=>{this.viewportOffset=s.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(s,o)=>{if(o.stopPropagation(),E(this,nr)<=0)return;const a=d=>r=="vertical"?d.clientY:d.clientX;o.mouseEvent.preventDefault();const c=this.scrollOffset,u=a(o.mouseEvent),l=d=>{const h=vi(a(d)-u+c,0,E(this,nr));this.interpolateViewportOffset({x:h/E(this,nr)*E(this,$r)})},f=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",f)};document.addEventListener("mouseup",f,!1),document.addEventListener("mousemove",l,!1)})}get scrollOffset(){return this.viewportOffset/E(this,$r)*E(this,nr)}render(t,r,i){super.render(t,E(this,Sa),i)}updateScrollbar(t,r){const i=this.config.scrollbarPadding,s=this.config.scrollbarSize,o=E(this,ws)=="horizontal"?"width":"height",a=Math.min(1,t[o]/r[o]),c=t[o]-2*i,u=a*c;G(this,nr,c-u),G(this,$r,r[o]-t[o]),this.viewportOffset=vi(this.viewportOffset,0,E(this,$r)),G(this,Sa,E(this,ws)=="vertical"?new Ft(()=>t.x+t.width-s-i,()=>t.y+i+this.scrollOffset,()=>s,()=>u):new Ft(()=>t.x+i+this.scrollOffset,()=>t.y+t.height-s-i,()=>u,()=>s))}}ws=new WeakMap,Sa=new WeakMap,nr=new WeakMap,$r=new WeakMap;class PT extends Ri{constructor(t,r,i={}){const s=r(),o=Object.keys(s.intervals);if(Dr.every(l=>!o.includes(l)))throw new Error("SelectionRect requires at least one of the channels 'x' or 'y' to be present in the selection.");const a={name:"selectionRect",configurableVisibility:!1,resolve:{scale:{x:"forced",y:"forced"}},data:{values:zy(r())},encoding:{},layer:[]};o.includes("x")&&(a.encoding.x={field:"_x",type:null,title:null},a.encoding.x2={field:"_x2"}),o.includes("y")&&(a.encoding.y={field:"_y",type:null,title:null},a.encoding.y2={field:"_y2"}),a.layer.push({name:"selectionRectRect",mark:{type:"rect",clip:!0,fill:"#808080",fillOpacity:.05,stroke:"black",strokeWidth:1,strokeOpacity:.2,...i}});const c=l=>{const f=t.view.getScaleResolution(l);return`format(datum._${l}2 - datum._${l}, '.3s')`+(f.type==="locus"?" + 'b'":"")},u=i.measure=="inside"?9:i.measure=="outside"?-9:0;o.includes("x")&&u!=0&&a.layer.push({name:"selectionRectTextX",mark:{type:"text",align:"center",paddingX:5,dy:u,tooltip:null},encoding:{text:{expr:c("x")},y:o.includes("y")?{field:"_y2",type:null,title:null}:{value:1},y2:null}}),o.includes("y")&&u!=0&&a.layer.push({name:"selectionRectTextY",mark:{type:"text",align:"center",paddingY:5,dy:u,tooltip:null,angle:-90},encoding:{text:{expr:c("y")},x2:null}});super(a,t.layoutParent.context,t.layoutParent,t.view,"selectionRect",{blockEncodingInheritance:!0,contributesToScaleDomain:!1});Y(this,"_selectionExpr");Y(this,"_selectionListener");this._selectionExpr=r,this._selectionListener=()=>{var d;const l=r(),f=(d=this.flowHandle)==null?void 0:d.dataSource;if(!f)throw new Error("Cannot find selection rect data source handle!");f.updateDynamicData(zy(l))},r.addListener(this._selectionListener)}dispose(){this._selectionExpr.removeListener(this._selectionListener),super.dispose()}}function zy(n){const e=n.intervals.x,t=n.intervals.y;return!e&&!t?[]:[{_x:e==null?void 0:e[0],_x2:e==null?void 0:e[1],_y:t==null?void 0:t[0],_y2:t==null?void 0:t[1]}]}class Uy{constructor(e,t,r){R(this,Iu);if(this.layoutParent=t,this.view=e,this.serial=r,this.background=void 0,this.backgroundStroke=void 0,this.axes={},this.gridLines={},this.scrollbars={},this.selectionRect=void 0,this.title=void 0,this.coords=Ft.ZERO,e.needsAxes.x||e.needsAxes.y){const i=e.spec,s="view"in i?i==null?void 0:i.view:void 0,o=MT(s);o&&(this.background=new ft(o,t.context,t,e,"background"+r,{blockEncodingInheritance:!0}));const a=RT(s);a&&(this.backgroundStroke=new ft(a,t.context,t,e,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const c=FT(e.spec.title);if(c){const u=new ft(c,t.context,t,e,"title"+r,{blockEncodingInheritance:!0});this.title=u}}e.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new Ly(this,"horizontal")),e.spec.viewportHeight!=null&&(this.scrollbars.vertical=new Ly(this,"vertical")),O(this,Iu,Bx).call(this)}*getChildren(){this.background&&(yield this.background),this.backgroundStroke&&(yield this.backgroundStroke),this.title&&(yield this.title),yield*Object.values(this.axes),yield*Object.values(this.gridLines),yield this.view,yield*Object.values(this.scrollbars),this.selectionRect&&(yield this.selectionRect)}async createAxes(){const{view:e,axes:t,gridLines:r}=this,i=(a,c)=>{const u=a.getAxisProps();if(u===null)return;const l=u?{...u}:{};if(!l.orient){for(const f of ou[c])if(!t[f]){l.orient=f;break}if(!l.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(l.title??(l.title=a.getTitle()),!ou[c].includes(l.orient))throw new Error(`Invalid axis orientation "${l.orient}" on channel "${c}"!`);return l},s=async(a,c,u)=>{const l=i(a,c);if(l){if(t[l.orient])throw new Error(`An axis with the orient "${l.orient}" already exists!`);const f=new ky(l,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,u);t[l.orient]=f,await f.initializeChildren()}},o=async(a,c,u)=>{const l=i(a,c);if(l&&(l.grid||l.chromGrid)){const f=new wT(l,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,u);r[l.orient]=f,await f.initializeChildren()}};for(const a of["x","y"])if(e.needsAxes[a]){const c=e.resolutions.axis[a];if(!c)continue;await s(c,a,e)}for(const a of["x","y"])if(e.needsAxes[a]&&e.getConfiguredOrDefaultResolution(a,"axis")!="excluded"){const c=e.getAxisResolution(a);if(!c)continue;await o(c,a,e)}if(e instanceof Ri){for(const a of e)for(const[c,u]of Object.entries(a.resolutions.axis)){const l=u.getAxisProps();l&&l.orient&&await s(u,c,a)}for(const a of e)for(const[c,u]of Object.entries(a.resolutions.axis)){const l=u.getAxisProps();l&&!l.orient&&await s(u,c,a)}}[...Object.values(t),...Object.values(r)].forEach(a=>a.visit(c=>{c instanceof ft&&c.resolve("scale")}))}getOverhang(){const e=t=>{const r=this.axes[t];return r?Math.max(r.getPerpendicularSize()+(r.axisProps.offset??0),0):0};return new We(e("top"),e("right"),e("bottom"),e("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}Iu=new WeakSet,Bx=function(){const e=this.view,t=r=>{this.view.context.glHelper.canvas.style.cursor=r};for(const[r,i]of e.paramMediator.paramConfigs){if(!("select"in i))continue;const s=kc(i.select);if(!Lm(s))continue;const o=s.encodings,a=Object.fromEntries(o.map(A=>{const w=this.view.getScaleResolution(A),S=w==null?void 0:w.scale;if(!S||!Oe(S.type))throw new Error(`No continuous scale found for interval selection param "${r}" on channel "${A}"! Scale type is "${(S==null?void 0:S.type)??"none"}".`);return[A,w]}));if(this.selectionRect)throw new Error("Only one interval selection per container is currently allowed!");let c=!1,u=!1,l=!1,f=null;const d=(A,w)=>Object.fromEntries(o.map(S=>[S,[Math.min(A[S],w[S]),Math.max(A[S],w[S])]])),h=e.paramMediator.createExpression(r),p=e.paramMediator.getSetter(r);i.value&&p({type:"interval",intervals:i.value});const m=()=>{p(Rm(o)),t(null)};this.selectionRect=new PT(this,h,s.mark),this.selectionRect.initializeChildren();const g=A=>{const w={x:0,y:0},S=e.coords.normalizePoint(A.x,A.y,!0);for(const C of o){const v=a[C].scale,T=v.invert(C=="x"?S.x:S.y);w[C]=T+(["index","locus"].includes(v.type)?.5:0)}return w},y=A=>{var T,P,F,k;const{intervals:w}=A,S=(L,U,j)=>{const K=(ce,ie)=>ie==null?null:a[ce].scale(ie),_=K("x",L)??j,te=K("y",U)??j;return e.coords.denormalizePoint(_,te,!0)},C=S((T=w.x)==null?void 0:T[0],(P=w.y)==null?void 0:P[0],0),v=S((F=w.x)==null?void 0:F[1],(k=w.y)==null?void 0:k[1],1);return Ft.create(C.x,C.y,v.x-C.x,v.y-C.y)};e.addInteractionEventListener("mousedown",(A,w)=>{if(w.mouseEvent.button!=0)return;if(f=c?y(h()):null,f)t("grabbing"),u=!0;else{const P=w.point;if(zm(h())&&(u=!0),w.mouseEvent.shiftKey)m(),l=!0;else if(zm(h())){const k=(L,U)=>{e.removeInteractionEventListener("mouseup",k);const j=U.point;P.subtract(j).length<2&&m()};e.addInteractionEventListener("mouseup",k);return}else return}w.stopPropagation();const S=w.point,C=at.fromMouseEvent(w.mouseEvent).subtract(S),v=P=>{const F=at.fromMouseEvent(P).subtract(C);let k;if(f){const L=F.subtract(S),U=f.translate(L.x,L.y);k=d(g(new at(U.x,U.y)),g(new at(U.x2,U.y2)))}else k=d(g(S),g(F));for(const L of o){const U=a[L],{zoomExtent:j,scale:K}=U,_=k[L];if(["index","locus"].includes(K.type)&&(_[0]=Math.ceil(_[0]),_[1]=Math.ceil(_[1])),f){const te=_[1]-_[0],ce=j[0],ie=j[1];_[0]<ce&&(_[0]=ce,_[1]=ce+te),_[1]>ie&&(_[1]=ie,_[0]=ie-te)}else _[0]=Math.max(j[0],_[0]),_[1]=Math.min(j[1],_[1]);_[1]=Math.min(j[1],_[1])}p({type:"interval",intervals:k})},T=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",T),l=!1,f&&(t("move"),f=null)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",T)}),e.addInteractionEventListener("click",(A,w)=>{w.mouseEvent.button==0&&u&&(w.stopPropagation(),u=!1)},!0);const x=A=>y8(h(),g(A));e.addInteractionEventListener("dblclick",(A,w)=>{x(w.point)&&(m(),w.stopPropagation())},!0),e.addInteractionEventListener("mousemove",(A,w)=>{x(w.point)?l||(c=!0,f||t("move")):(c=!1,f||t(null))})}};function MT(n){if(n!=null&&n.fill||n!=null&&n.fillOpacity||n!=null&&n.shadowOpacity)return{configurableVisibility:!1,data:{values:[{}]},mark:{color:n.fill,opacity:n.fillOpacity??(n.fill?1:0),type:"rect",clip:!1,tooltip:null,minHeight:1,minOpacity:0,shadowBlur:n.shadowBlur,shadowColor:n.shadowColor,shadowOffsetX:n.shadowOffsetX,shadowOffsetY:n.shadowOffsetY,shadowOpacity:n.shadowOpacity}}}function RT(n){if(!(!n||!n.stroke||n.strokeWidth===0||n.strokeOpacity===0))return{configurableVisibility:!1,resolve:{scale:{x:"excluded",y:"excluded"},axis:{x:"excluded",y:"excluded"}},data:{values:[{x:0,y:0,x2:1,y2:0},{x:1,y:0,x2:1,y2:1},{x:1,y:1,x2:0,y2:1},{x:0,y:1,x2:0,y2:0}]},mark:{size:n.strokeWidth??1,color:n.stroke??"lightgray",strokeCap:"square",opacity:n.strokeOpacity??1,type:"rule",clip:!1,tooltip:null},encoding:{x:{field:"x",type:"quantitative",scale:null},y:{field:"y",type:"quantitative",scale:null},x2:{field:"x2"},y2:{field:"y2"}}}}class OT extends Vo{constructor(t,r,i,s,o,a,c){super(t,r,i,s,o,c);R(this,re);R(this,vs,1/0);R(this,Ss,10);R(this,et,[]);R(this,ei,{});R(this,Es,0);this.spec=t,G(this,Ss,t.spacing??10),G(this,vs,a),G(this,et,[]),this.wrappingFacet=!1}appendChild(t){t.layoutParent??(t.layoutParent=this),E(this,et).push(new Uy(t,this,E(this,Es))),gx(this,Es)._++}setChildren(t){for(const r of E(this,et))O(this,re,Sd).call(this,r);G(this,et,[]);for(const r of t)this.appendChild(r)}replaceChild(t,r){const i=E(this,et).findIndex(s=>s.view==t);if(i>=0)O(this,re,Sd).call(this,E(this,et)[i]),E(this,et)[i]=new Uy(r,this,E(this,Es));else throw new Error("Not my child view!")}get children(){return E(this,et).map(t=>t.view)}get childCount(){return E(this,et).length}async createAxes(){const t=[];for(const r of Dr){const i=this.resolutions.axis[r];if(i){const s=i.getAxisProps();if(s){const o={title:i.getTitle(),orient:ou[r][0],...s},a=new ky(o,i.scaleResolution.type,this.context,this,this);t.push(a.initializeChildren()),E(this,ei)[r]=a}}}return Promise.all([...t,...E(this,et).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const t of E(this,et))yield*t.getChildren();for(const t of Object.values(E(this,ei)))yield t}getOverhang(){return O(this,re,Fx).call(this).union(O(this,re,Pu).call(this))}getSize(){return this._cache("size",()=>new Wn(O(this,re,Cd).call(this,"column"),O(this,re,Cd).call(this,"row")).addPadding(O(this,re,Pu).call(this)))}render(t,r,i={}){if(super.render(t,r,i),!this.isConfiguredVisible())return;this.layoutParent||(r=r.shrink(this.getPadding())),r=r.shrink(O(this,re,Pu).call(this)),t.pushView(this,r);const s={devicePixelRatio:t.getDevicePixelRatio()},o=ny(O(this,re,Ed).call(this,"column"),r.width,s),a=ny(O(this,re,Ed).call(this,"row"),r.height,s),c=new By(E(this,re,ni).length,E(this,vs)??1/0),u=l=>Math.round(l*devicePixelRatio)/devicePixelRatio;for(const[l,f]of E(this,re,ni).entries()){const{view:d,axes:h,gridLines:p,background:m,backgroundStroke:g,title:y,selectionRect:x}=f,[A,w]=c.getCellCoords(l),S=o[O(this,re,Dd).call(this,"column",A)],C=a[O(this,re,Dd).call(this,"row",w)],v=d.getViewportSize(),T=d.getSize(),P=d.getOverhang(),F=S.location-P.left,k=C.location-P.top,L=(De,St)=>(De[St].grow?(St=="width"?S:C).size:De[St].px)+P[St],U=L(v,"width"),j=L(v,"height"),K=L(T,"width"),_=L(T,"height"),te=f.scrollbars.horizontal,ce=f.scrollbars.vertical,ie=te?()=>u(te.viewportOffset):()=>0,Ne=ce?()=>u(ce.viewportOffset):()=>0,ve=new Ft(()=>r.x+F,()=>r.y+k,()=>U,()=>j),Kt=d.isScrollable(),Jt=Kt?new Ft(()=>r.x+F-ie(),()=>r.y+k-Ne(),()=>K,()=>_):ve;f.coords=ve;const rr=i.clipRect?ve.intersect(i.clipRect):ve;m==null||m.render(t,rr,{...i,clipRect:void 0});for(const De of Object.values(p))De.render(t,ve,i);const Ds=LT(d)||Kt;Ds&&d.render(t,Jt,{...i,clipRect:rr}),g==null||g.render(t,rr,{...i,clipRect:void 0});for(const[De,St]of Object.entries(h)){const ut=De=="left"||De=="right"?"vertical":"horizontal",H=f.scrollbars[ut],J=H?ve.modify(ut=="vertical"?{y:()=>Jt.y,height:_}:{x:()=>Jt.x,width:K}):ve,ne=Gy(J,De,St);let M=i.clipRect;H&&(M=ne.intersect(M).intersect(H?ve.modify(ut=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),St.render(t,ne,{...i,clipRect:M})}for(const De of Object.values(E(this,ei))){const ut=De.axisProps.orient;(ut=="left"&&A==0||ut=="right"&&A==c.nCols-1||ut=="top"&&w==0||ut=="bottom"&&w==c.nRows-1)&&De.render(t,Gy(ve.shrink(f.view.getOverhang()),ut,De),i)}Ds||d.render(t,Jt,i),x==null||x.render(t,Jt,i);for(const De of Object.values(f.scrollbars))De.updateScrollbar(ve,Jt),De.render(t,r,i);y==null||y.render(t,ve,i)}t.popView(this)}propagateInteractionEvent(t){if(this.handleInteractionEvent(void 0,t,!0),t.stopped)return;const r=E(this,re,ni).find(s=>s.coords.containsPoint(t.point.x,t.point.y));for(const s of Object.values((r==null?void 0:r.scrollbars)??{}))if(s.coords.containsPoint(t.point.x,t.point.y)&&(s.propagateInteractionEvent(t),t.stopped))return;const i=r==null?void 0:r.view;if(i){if(i.propagateInteractionEvent(t),t.stopped)return;(i instanceof ft||i instanceof Ri)&&xT(t,r.coords,s=>O(this,re,Px).call(this,r.coords,r.view,s),this.context.getCurrentHover(),this.context.animator)}t.stopped||this.handleInteractionEvent(void 0,t,!1)}getDefaultResolution(t,r){return"independent"}}vs=new WeakMap,Ss=new WeakMap,et=new WeakMap,ei=new WeakMap,Es=new WeakMap,re=new WeakSet,ni=function(){return E(this,et).filter(t=>t.view.isConfiguredVisible())},kx=function(){return new By(E(this,re,ni).length,E(this,vs)??1/0)},Sd=function(t){for(const r of t.getChildren())r.disposeSubtree()},Ta=function(t){const r=t=="column"?"width":"height",i=(s,o)=>s.map(a=>{const u=E(this,re,ni)[a].getOverhangAndPadding();return t=="column"?o?u.right:u.left:o?u.bottom:u.top}).reduce((a,c)=>Math.max(a,c),0);return this._cache(`size/directionSizes/${t}`,()=>E(this,re,kx)[t=="column"?"colIndices":"rowIndices"].map(s=>({axisBefore:i(s,0),axisAfter:i(s,1),view:cI(s.map(o=>E(this,re,ni)[o].view.getViewportSize()[r]))})))},Ed=function(t){const r=O(this,re,Ta).call(this,t),i=[];i.push(zo);for(const[s,o]of r.entries())s>0&&i.push({px:E(this,Ss),grow:0}),(s==0||this.wrappingFacet)&&i.push(zo),i.push({px:o.axisBefore,grow:0}),i.push(o.view),i.push({px:o.axisAfter,grow:0}),(s==r.length-1||this.wrappingFacet)&&i.push(zo);return i},Cd=function(t){let r=0,i=0;const s=t=="row"?this.spec.height:this.spec.width;if(s||s===0)return iy(s);const o=O(this,re,Ta).call(this,t);for(const[a,c]of o.entries())a>0&&(i+=E(this,Ss)),(a==0||this.wrappingFacet)&&(i+=0),i+=c.axisBefore,i+=c.view.px??0,r+=c.view.grow??0,i+=c.axisAfter,(a==o.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:r}},Dd=function(t,r){return t=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},Fx=function(){const t=O(this,re,Ta).call(this,"column"),r=O(this,re,Ta).call(this,"row");return!t.length||!r.length?We.zero():new We(r.at(0).axisBefore,t.at(-1).axisAfter,r.at(-1).axisAfter,t.at(0).axisBefore)},Pu=function(){const t=r=>{const i=xh[r],s=E(this,ei)[i];return(s==null?void 0:s.axisProps.orient)!==r?0:Math.max(s.getPerpendicularSize()+(s.axisProps.offset??0),0)};return new We(t("top"),t("right"),t("bottom"),t("left"))},Px=function(t,r,i){for(const[s,o]of Object.entries(NT(r))){if(o.size<=0)continue;const a=t.normalizePoint(i.x,i.y),c=t.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),u={x:c.x-a.x,y:c.y-a.y};for(const l of o)l.zoom(2**i.zDelta,s=="y"?1-a[s]:a[s],s=="x"?u.x:-u.y)}this.context.animator.requestRender()};function NT(n){const e={x:new Set,y:new Set};return n.visit(t=>{for(const[r,i]of Object.entries(e)){const s=t.getScaleResolution(r);s&&s.isZoomable()&&i.add(s)}}),e}function LT(n){let e=!0;return n.visit(t=>{t instanceof ft&&e&&(e=t.mark.properties.clip===!0)}),e}function Gy(n,e,t){const r=t.axisProps,i=t.getPerpendicularSize();if(e=="bottom")return n.translate(0,n.height+r.offset).modify({height:i});if(e=="top")return n.translate(0,-i-r.offset).modify({height:i});if(e=="left")return n.translate(-i-r.offset,0).modify({width:i});if(e=="right")return n.translate(n.width+r.offset,0).modify({width:i})}class wh extends OT{constructor(e,t,r,i,s){super(e,t,r,i,s,Eh(e)?e.columns:au(e)?1:1/0),this.spec=e}async initializeChildren(){const e=this.spec,t=Eh(e)?e.concat:au(e)?e.vconcat:e.hconcat;this.setChildren(await Promise.all(t.map((r,i)=>this.context.createOrImportView(r,this,this,"grid"+i)))),await this.createAxes()}getDefaultResolution(e,t){return t=="axis"?"independent":au(this.spec)&&e==="x"||_y(this.spec)&&e==="y"?"shared":"independent"}}const Hy="viewRoot";class zT{constructor(e={}){R(this,Cs,new Map);this.options={allowImport:!0,wrapRoot:!0,...e};const t=r=>(i,s,o,a,c)=>new r(i,s,o,a,i.name??c);this.addViewType(Sh,t(Ri)),this.addViewType(vh,t(ft)),this.addViewType(au,t(wh)),this.addViewType(_y,t(wh)),this.addViewType(Eh,t(wh)),this.addViewType(HT,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(e,t){E(this,Cs).set(e,t)}createView(e,t,r,i,s){for(const[o,a]of E(this,Cs))if(o(e))return a(e,t,r,i,s);throw new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(e)]))}isViewSpec(e){const t=[...E(this,Cs).keys()].filter(r=>r(e));if(t.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return t.length==1}async createOrImportView(e,t,r,i,s,o){let a;if(GT(e)){let l;if("url"in e.import)if(this.options.allowImport)l=await yI(e,i.getBaseUrl(),t);else throw new Qn("Importing views is not allowed!",r);else if("template"in e.import)l=Vy(e.import.template,i);else throw new Error("Invalid import: "+JSON.stringify(e));o==null||o(l),UT(l,e),a=l}else a=e;const c=l=>{var f;return(f=l==null?void 0:l.params)==null?void 0:f.some(d=>Pm(d)&&kc(d.select).type=="interval")};!i&&this.options.wrapRoot&&(vh(a)||Sh(a)||c(a))&&s===Hy&&(a={name:"implicitRoot",vconcat:[a]});const u=this.createView(a,t,r,i,s);return u instanceof Vo&&await u.initializeChildren(),u}}Cs=new WeakMap;function Vy(n,e){var r,i;const t=(i=(r=e.spec)==null?void 0:r.templates)==null?void 0:i[n];if(t)return structuredClone(t);if(e.dataParent)return Vy(n,e.dataParent);throw new Error(`Cannot find template "${n}" in current view or its ancestors!`)}function UT(n,e){e.name!=null&&(n.name=e.name);const t=Ue(e.params)?e.params:Ge(e.params)?Object.entries(e.params).map(([r,i])=>({name:r,value:i})):[];if(t.length){n.params??(n.params=[]);for(const r of t){const i=n.params.findIndex(s=>s.name==r.name);i>=0&&(n.params[i]=r)}for(const r of t)n.params.some(i=>i.name==r.name)||n.params.push(r)}}function vh(n){return"mark"in n&&(me(n.mark)||Ge(n.mark))}function Sh(n){return"layer"in n&&Ge(n.layer)}function GT(n){return"import"in n}function au(n){return"vconcat"in n&&Ue(n.vconcat)}function _y(n){return"hconcat"in n&&Ue(n.hconcat)}function Eh(n){return"concat"in n&&Ue(n.concat)}function HT(n){return"samples"in n&&Ge(n.samples)&&"spec"in n&&Ge(n.spec)}function VT(n){const e=Math.floor(Math.random()*16777215).toString(16),t=[];for(const r of n.paramConfigs.values()){if(!p8(r))continue;const i=r.bind;if(!i||!("input"in i))continue;const s=r.name,o=n.getSetter(s),a=n.getValue(s),c=i.name??s,u=i.debounce?iu(o,i.debounce,!1):o,l=`${e}-param-${s}`;if(i.input=="range")t.push(ye`<label for=${l}>${c}</label>
|
|
660
659
|
<div>
|
|
661
660
|
<input
|
|
662
|
-
id=${
|
|
661
|
+
id=${l}
|
|
663
662
|
type="range"
|
|
664
|
-
min=${
|
|
665
|
-
max=${
|
|
666
|
-
step=${
|
|
663
|
+
min=${i.min??0}
|
|
664
|
+
max=${i.max??100}
|
|
665
|
+
step=${i.step??pr(i.min,i.max,100)}
|
|
667
666
|
.value=${a}
|
|
668
|
-
@input=${f=>{
|
|
667
|
+
@input=${f=>{u(f.target.valueAsNumber),f.target.nextElementSibling.textContent=f.target.valueAsNumber}}
|
|
669
668
|
/><span>${a}</span>
|
|
670
|
-
</div>`);else if(
|
|
669
|
+
</div>`);else if(i.input=="checkbox")t.push(ye`<label for=${l}>${c}</label>
|
|
671
670
|
<input
|
|
672
|
-
id=${
|
|
671
|
+
id=${l}
|
|
673
672
|
type="checkbox"
|
|
674
673
|
?checked=${a}
|
|
675
|
-
@input=${f=>
|
|
676
|
-
/>`);else if(
|
|
674
|
+
@input=${f=>u(f.target.checked)}
|
|
675
|
+
/>`);else if(i.input=="radio")t.push(ye`<span class="label">${c}</span>
|
|
677
676
|
<div class="radio-group">
|
|
678
|
-
${
|
|
677
|
+
${i.options.map((f,d)=>{var h;return ye`<label>
|
|
679
678
|
<input
|
|
680
679
|
type="radio"
|
|
681
|
-
name=${
|
|
680
|
+
name=${s}
|
|
682
681
|
value=${f}
|
|
683
682
|
.checked=${a==f}
|
|
684
|
-
@input=${p=>
|
|
685
|
-
/>${((h=
|
|
683
|
+
@input=${p=>u(p.target.value)}
|
|
684
|
+
/>${((h=i.labels)==null?void 0:h[d])??f}</label
|
|
686
685
|
>`})}
|
|
687
|
-
</div>`);else if(
|
|
686
|
+
</div>`);else if(i.input=="select")t.push(ye`<label for=${l}>${c}</label>
|
|
688
687
|
<select
|
|
689
|
-
id=${
|
|
690
|
-
@input=${f=>
|
|
688
|
+
id=${l}
|
|
689
|
+
@input=${f=>u(f.target.value)}
|
|
691
690
|
>
|
|
692
|
-
${
|
|
691
|
+
${i.options.map((f,d)=>{var h;return ye`<option
|
|
693
692
|
value=${f}
|
|
694
693
|
?selected=${a==f}
|
|
695
694
|
>
|
|
696
|
-
${((h=
|
|
695
|
+
${((h=i.labels)==null?void 0:h[d])??f}
|
|
697
696
|
</option>`})}
|
|
698
|
-
</select> `);else if(
|
|
697
|
+
</select> `);else if(i.input=="text"||i.input=="number"||i.input=="color")t.push(ye`<label for=${l}>${c}</label>
|
|
699
698
|
<div>
|
|
700
699
|
<input
|
|
701
|
-
id=${
|
|
702
|
-
type=${
|
|
703
|
-
placeholder=${
|
|
704
|
-
autocomplete=${
|
|
700
|
+
id=${l}
|
|
701
|
+
type=${i.input}
|
|
702
|
+
placeholder=${i.placeholder??""}
|
|
703
|
+
autocomplete=${i.autocomplete??"off"}
|
|
705
704
|
.value=${a}
|
|
706
705
|
@focus=${f=>f.target.select()}
|
|
707
|
-
@input=${f=>{
|
|
706
|
+
@input=${f=>{u(i.input=="number"?f.target.valueAsNumber:f.target.value)}}
|
|
708
707
|
/>
|
|
709
|
-
</div>`);else throw new Error("Unsupported input type: "+
|
|
710
|
-
<div class=${
|
|
711
|
-
${
|
|
708
|
+
</div>`);else throw new Error("Unsupported input type: "+i.input);i.description&&t.push(ye`<div class="description">${i.description}</div>`)}return t}hl("fasta",eT);class jy{constructor(e,t,r={}){R(this,vt);this.container=e,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=t,this.viewFactory=new zT,this.namedDataProviders=[],this.animator=new q9(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=i=>i.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new tT(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:fT,refseqgene:iT,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._loadingViews=new Map,this._inputBindingContainer=void 0,this._mouseDownCoords=void 0,this.dpr=window.devicePixelRatio}registerNamedDataProvider(e){this.namedDataProviders.unshift(e)}getNamedDataFromProvider(e){for(const t of this.namedDataProviders){const r=t(e);if(r)return r}}updateNamedData(e,t){const r=this.viewRoot.context.dataFlow.findNamedDataSource(e);if(!r)throw new Error("No such named data source: "+e);r.dataSource.updateDynamicData(t),this.animator.requestRender()}broadcast(e,t){var i;const r={type:e,payload:t};this.viewRoot.visit(s=>s.handleBroadcast(r)),(i=this._extraBroadcastListeners.get(e))==null||i.forEach(s=>s(r))}_updateLoadingIndicators(){const e=[],t=()=>[...this._loadingViews.values()].some(r=>r.status=="loading"||r.status=="error");for(const[r,i]of this._loadingViews){const s=r.coords;if(s){const o={left:`${s.x}px`,top:`${s.y}px`,width:`${s.width}px`,height:`${s.height}px`};e.push(ye`<div style=${Qv(o)}>
|
|
709
|
+
<div class=${i.status}>
|
|
710
|
+
${i.status=="error"?ye`<span
|
|
712
711
|
>Loading
|
|
713
|
-
failed${
|
|
714
|
-
>`:
|
|
715
|
-
<img src="${
|
|
712
|
+
failed${i.detail?ye`: ${i.detail}`:Ee}</span
|
|
713
|
+
>`:ye`
|
|
714
|
+
<img src="${Wv}" alt="" />
|
|
716
715
|
<span>Loading...</span>
|
|
717
716
|
`}
|
|
718
717
|
</div>
|
|
719
|
-
</div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),Es(e,this.loadingIndicatorsElement)}destroy(){var n;const e=j(this,gn,_u);this.container.classList.remove("genome-spy"),e.classList.remove("loading");for(const[r,o]of this._keyboardListeners)for(const i of o)document.removeEventListener(r,i);for(this._destructionCallbacks.forEach(r=>r()),this._glHelper.finalize(),(n=this._inputBindingContainer)==null||n.remove();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new l_(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const e=this,n={dataFlow:new Qb,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new h_(this._glHelper),requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(c,l,u)=>{this._loadingViews.set(c,{status:l,detail:u}),this._updateLoadingIndicators()},addKeyboardListener:(c,l)=>{document.addEventListener(c,l);let u=this._keyboardListeners.get(c);u||(u=[],this._keyboardListeners.set(c,u)),u.push(l)},addBroadcastListener(c,l){const u=e._extraBroadcastListeners;let f=u.get(c);f||(f=new Set,u.set(c,f)),f.add(l)},removeBroadcastListener(c,l){var f;(f=e._extraBroadcastListeners.get(c))==null||f.delete(l)},isViewConfiguredVisible:e.viewVisibilityPredicate,isViewSpec:c=>e.viewFactory.isViewSpec(c),createOrImportView:async function(c,l,u,f,d){return e.viewFactory.createOrImportView(c,n,l,u,f,d)},highlightView:c=>{var l;if((l=this.container.querySelector(".view-highlight"))==null||l.remove(),c){const u=c.coords;if(u){const f=document.createElement("div");f.className="view-highlight",f.style.position="absolute",f.style.left=u.x+"px",f.style.top=u.y+"px",f.style.width=u.width+"px",f.style.height=u.height+"px",f.style.border="1px solid green",f.style.backgroundColor="rgba(0, 255, 0, 0.1)",f.style.pointerEvents="none",this.container.appendChild(f)}}}},r=this.spec;r.datasets&&this.registerNamedDataProvider(c=>r.datasets[c]),this.viewRoot=await n.createOrImportView(r,null,null,d2),j(this,gn,_u).style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",pe(this,gn,$v).call(this),$k(this.viewRoot),e_(this.viewRoot);const o=this.viewRoot.getDescendants();o.forEach(c=>c.configureViewOpacity()),this._glHelper.invalidateSize(),pe(this,gn,eA).call(this);const i=o.filter(c=>c instanceof en),s=Yk(this.viewRoot,n.dataFlow);Jk(s),this.broadcast("dataFlowBuilt",s),i.forEach(c=>c.mark.initializeEncoders());const a=Promise.all(i.map(c=>c.mark.initializeGraphics()));for(const c of i)s.addObserver(l=>{c.mark.initializeData();try{c.mark.updateGraphicsData()}catch(u){throw u.view=c,u}n.animator.requestRender()},c);await n.fontManager.waitUntilReady(),s.initialize(),await Promise.all(s.dataSources.map(c=>c.load())),sd(this.viewRoot),this.broadcast("dataLoaded"),await a;for(const c of i)c.mark.finalizeGraphicsInitialization();n.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(c=>Ul(c,"size")),this._glHelper.invalidateSize()}async launch(){try{return pe(this,gn,tA).call(this),await this._prepareViewsAndData(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),!0}catch(e){const n=`${e.view?`At "${e.view.getPathString()}": `:""}${e.toString()}`;return console.error(e.stack),iR(this.container,n),!1}finally{j(this,gn,_u).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const e=this._glHelper.canvas;let n=performance.now(),r=!1;const o=i=>{var c,l;const s=performance.now(),a=s-n<200;if(i instanceof MouseEvent){const u=e.getBoundingClientRect(),f=new Xt(i.clientX-u.left-e.clientLeft,i.clientY-u.top-e.clientTop);i.type=="mousemove"&&!a&&(this.tooltip.handleMouseMove(i),this._tooltipUpdateRequested=!1,i.buttons==0&&!s2()&&(this.renderPickingFramebuffer(),this._handlePicking(f.x,f.y)));const d=h=>{this.viewRoot.propagateInteractionEvent(new i_(f,h)),this._tooltipUpdateRequested||this.tooltip.clear()};if(i.type!="wheel"&&this._wheelInertia.cancel(),(i.type=="mousedown"||i.type=="mouseup")&&!s2())this.renderPickingFramebuffer();else if(i.type=="wheel"){n=s,this._tooltipUpdateRequested=!1;const h=i;if(Math.abs(h.deltaX)>Math.abs(h.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const p=y_(h);this._wheelInertia.setMomentum(h.deltaY*(h.deltaMode?80:1),y=>{const v=new WheelEvent("wheel",{...p,deltaMode:0,deltaX:0,deltaY:y});d(v)}),h.preventDefault();return}}if(i.type=="click"){if(r)return;const h=this._currentHover?{type:i.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(p=>p.name).reverse(),datum:this._currentHover.datum}:{type:i.type,viewPath:null,datum:null};(c=this._eventListeners.get("click"))==null||c.forEach(p=>p(h))}(i.type!="click"||((l=this._mouseDownCoords)==null?void 0:l.subtract(Xt.fromMouseEvent(i)).length)<3)&&d(i)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu","dblclick"].forEach(i=>e.addEventListener(i,o)),e.addEventListener("mousedown",i=>{this._mouseDownCoords=Xt.fromMouseEvent(i),this.tooltip.sticky?(this.tooltip.sticky=!1,this.tooltip.clear(),r=!0):r=!1;const s=()=>{document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)};if(i.button==2||i.shiftKey||i.ctrlKey||i.metaKey)s();else if(this.tooltip.visible){const a=setTimeout(()=>{r=!0,this.tooltip.sticky=!0},400),c=()=>clearTimeout(a);document.addEventListener("mouseup",c,{once:!0}),document.addEventListener("mousemove",c,{once:!0})}}),e.addEventListener("dragstart",i=>i.stopPropagation())}_handlePicking(e,n){var s;const r=this.dpr,o=PT(this._glHelper.gl,this._glHelper._pickingBufferInfo,e*r,n*r),i=o[0]|o[1]<<8|o[2]<<16|o[3]<<24;if(i==0){this._currentHover=null;return}if(i!==((s=this._currentHover)==null?void 0:s.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(a=>{if(a instanceof en){if(a.mark.isPickingParticipant()&&[...a.facetCoords.values()].some(c=>c.containsPoint(e,n))){const c=a.getCollector().findDatumByUniqueId(i);c&&(this._currentHover={mark:a.mark,datum:c,uniqueId:i})}if(this._currentHover)return Ia}}),this._currentHover){const a=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async c=>{if(!a.isPickingParticipant())return;const l=a.properties.tooltip;if(l!==null){const u=(l==null?void 0:l.handler)??"default",f=this.tooltipHandlers[u];if(!f)throw new Error("No such tooltip handler: "+u);return f(c,a,l==null?void 0:l.params)}})}}updateTooltip(e,n){if(!this._tooltipUpdateRequested||!e)this.tooltip.updateWithDatum(e,n),this._tooltipUpdateRequested=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}exportCanvas(e,n,r,o="white"){const i=this._glHelper;e??(e=i.getLogicalCanvasSize().width),n??(n=i.getLogicalCanvasSize().height),r??(r=window.devicePixelRatio??1);const s=i.gl,a=Math.floor(e*r),c=Math.floor(n*r),l=_m(s,[{format:s.RGBA,type:s.UNSIGNED_BYTE,minMag:s.LINEAR,wrap:s.CLAMP_TO_EDGE}],a,c),u=new dd({picking:!1},{webGLHelper:this._glHelper,canvasSize:{width:e,height:n},devicePixelRatio:r,clearColor:o,framebufferInfo:l});this.viewRoot.render(u,Sn.create(0,0,e,n)),u.render();const f=LT(s,l,"image/png");return this.computeLayout(),this.renderAll(),f}computeLayout(){const e=this.viewRoot;if(!e)return;this.broadcast("layout");const n=this._glHelper.getLogicalCanvasSize();if(isNaN(n.width)||isNaN(n.height)){console.log(`NaN in canvas size: ${n.width}x${n.height}. Skipping computeLayout().`);return}const r={webGLHelper:this._glHelper,canvasSize:n,devicePixelRatio:window.devicePixelRatio??1};this._renderingContext=new dd({picking:!1},{...r,clearColor:this.spec.background}),this._pickingContext=new dd({picking:!0},{...r,framebufferInfo:this._glHelper._pickingBufferInfo}),e.render(new r_(this._renderingContext,this._pickingContext),Sn.create(0,0,n.width,n.height)),this._updateLoadingIndicators(),this.broadcast("layoutComputed")}renderAll(){var e;(e=this._renderingContext)==null||e.render(),this._dirtyPickingBuffer=!0}renderPickingFramebuffer(){this._dirtyPickingBuffer&&(this._pickingContext.render(),this._dirtyPickingBuffer=!1)}getSearchableViews(){const e=[];return this.viewRoot.visit(n=>{n instanceof en&&n.getDataAccessor("search")&&e.push(n)}),e}getNamedScaleResolutions(){const e=new Map;return this.viewRoot.visit(n=>{for(const r of Object.values(n.resolutions.scale))r.name&&e.set(r.name,r)}),e}}gn=new WeakSet,_u=function(){return this.container.querySelector(".canvas-wrapper")},$v=function(){const e=[];this.viewRoot.visit(r=>{const o=r.paramMediator;e.push(...rR(o))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!e.length)){if(this._inputBindingContainer=Zl("div",{className:"gs-input-bindings"}),n=="default")this.container.appendChild(this._inputBindingContainer);else if(n instanceof HTMLElement)n.appendChild(this._inputBindingContainer);else throw new Error("Invalid inputBindingContainer");e.length&&Es(ot`<div class="gs-input-binding">${e}</div>`,this._inputBindingContainer)}},eA=function(){const e=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",this.dpr),n=()=>{this._glHelper.invalidateSize(),this.dpr=window.devicePixelRatio,e(this.dpr),this.computeLayout(),this.renderAll()};if(this.viewRoot.getSize().isGrowing()){const i=new ResizeObserver(n);i.observe(this.container),this._destructionCallbacks.push(()=>i.disconnect())}let r=null;const o=()=>{r!=null&&(r(),n());const i=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);i.addEventListener("change",o),r=()=>{i.removeEventListener("change",o)}};o(),r&&this._destructionCallbacks.push(r)},tA=function(){this.container.classList.add("genome-spy");const e=document.createElement("style");e.innerHTML=pS,this.container.appendChild(e);const n=Zl("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new RT(n,()=>this.viewRoot?n_(this.viewRoot):{width:void 0,height:void 0},{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=Zl("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=Zl("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new mS(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function iR(t,e){const n=document.createElement("div");n.className="message-box";const r=document.createElement("div");r.textContent=e,n.appendChild(r),t.appendChild(n)}function Zl(t,e){const n=document.createElement(t);for(const[r,o]of Object.entries(e))["innerHTML","innerText","className"].includes(r)&&(n[r]=o),n.setAttribute(r,o);return n}const oR="data:image/svg+xml,%3csvg%20viewBox='0%200%2032%2032'%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20clip-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='1.5'%3e%3cpath%20d='M4.7%2021.2s.4%202.3%201.3%203.6C7%2026%209.8%2028%209.8%2028s3.4-2.6%206.4-8.5c0%200%201%20.1%201.9-.4.9-.6.8-.4%201-1.2%200%200%202.9.5%206.6%200%202.1-.3%204.3-1%206.2-2.5%200%200-1.1-1.7-2.5-5.1-.5-1.3-2-1.8-4.6-4.6l-8.2%208.6-11.9%206.9z'%20fill-opacity='.1'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='%237fbbdd'/%3e%3cpath%20d='M12.4%2015.5c-.7-.5-2.4-.8-4.4-.4-2%20.4-4%201.3-4.8%201.8-.5.3-1.2%201-1.2%201.4%200%20.7.3%201.8.8%202.4.3.3.7.5%201.4.6.8%200%202.5-1.4%203.5-2%201-.6%201.6-.8%202.7-1.2l-2.9%202.4c-1.3%201.2-2.2%201.5-2.4%202.3%200%20.5%200%201.4.5%201.8.4.5.6.8%201.6.8.6%200%201%200%202.6-1.5.9-.9%202.3-3%202.7-3.7.6-1.1%201-2.2.7-3-.2-1-.4-1.4-.8-1.7zM17.4%2014.2c-.3-.5-.9-1.2-.2-2.5l1.9-3c.5-.8%202-2.3%202.6-2.6.6-.4%201.5-.6%202-.2.6.4%201%201%201.3%201.5.4.6.7%201.3.2%202-.7%201-1.6.9-2.8%201.7-1.2.8-1.9%201.2-2.5%201.9l3.8-1.8c1.3-.6%202.7-1.1%203.4-.7.8.5.8.7%201%201.4.3%201-.2%201.9-.8%202.4-.5.6-1.5.9-2.6%201.2-1.4.4-4.5%201-5.8.5-1.3-.5-1.3-1.4-1.5-1.8z'%20fill='%23fff'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='%237fbbdd'/%3e%3cpath%20d='M13.8%2015.3c.9.8.6%202%201.4%201.8%201-.2%201.4-.8%201.3-1.5%200-.7%200-.8-.4-1.6-.3-.7-1-1.1-2-.5-.7.5-1.4%201.3-1.4%201.3s.2-.3%201.1.5z'%20fill='%23fff'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3c/svg%3e",sR="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5'%20viewBox='0%200%2064%2064'%3e%3cpath%20d='M208.6%20548.2s11.2%2046.2%2031.2%2071c20%2024.9%2079.3%2061.6%2079.3%2061.6S385.6%20623%20438%20498.3c0%200%2018.1%201%2036-11.9%2017.7-12.7%2016.3-7.9%2021-24.8%200%200%2057%206.3%20131-9.7%2041.7-9.1%2084.3-26.3%20121.5-58.8%200%200-25.4-32.9-58-101.7-12.4-26.1-41.9-34.3-98.7-88L438.1%20391.2%20208.6%20548.2Z'%20style='fill-opacity:.11'%20transform='matrix(.10221%20.00684%20-.00671%20.10035%20-8%20-13.2)'/%3e%3cg%20transform='rotate(-35.4%2034.2%2080.8)%20scale(.10057)'%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'%20style='fill:%237fbbdd'/%3e%3cclipPath%20id='a'%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23a)'%3e%3cpath%20d='M386.9%20397.2c-15.6-13.6-51.8-22.4-96.3-16.7-44.5%205.8-93.8%2021.8-111.8%2031.6-10.6%205.7-27.3%2017.3-28.1%2027.2-1.2%2014.2%202.9%2037.8%2015%2052%206%207.2%2014.2%2012.1%2028.1%2014.1%2017.9%202.6%2059-24.8%2081.6-36.2%2024-12%2038.6-14.6%2063-22.2%200%200-47%2031.6-68.2%2047.4-30.6%2022.9-51.6%2028-57.3%2045.5-3.1%209.4-.7%2027.9%207.5%2037.6%209%2011%2012.8%2017.6%2034.2%2020.1%2012.7%201.5%2022%201.2%2059.8-28.6%2021.7-17.2%2055.9-59.2%2067-74.4%2016.2-22%2023.8-43.1%2021.3-59.6-3.7-23.6-8.4-31.3-15.8-37.8Z'%20style='fill:%23fff'%20transform='scale(.88664)%20rotate(31.2%20485%20792.2)'/%3e%3cpath%20d='M484.7%20379c-5.4-11.1-17.6-28.5-.8-53.8a739%20739%200%200%201%2044.2-60.6c13.2-16.3%2046.7-46.2%2059.6-52%2013-6%2033.3-8.7%2044.2.2%2011%209.1%2016.5%2020.6%2023%2032.7%207.4%2013.8%2012.4%2029.3%201.6%2042.8-15.4%2019.2-34.3%2017-61.6%2031.5-27.7%2014.8-42.3%2023.1-55.7%2035.9%200%200%2052.2-21.6%2082-31.2%2029.8-9.7%2059.8-20%2074.8-8.5s14.6%2015.5%2018.4%2031.2c4.7%2019.4-7.2%2038-20.1%2048.6-13%2010.7-34.3%2016-57.4%2021-30.5%206.8-96.6%2015.1-124%202.6-27.5-12.6-24.4-32.8-28.2-40.5Z'%20style='fill:%23fff'%20transform='scale(.87906)%20rotate(31.2%20487.2%20893.5)'/%3e%3c/g%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'%20style='fill:none;stroke:%23000;stroke-width:16.57px'/%3e%3c/g%3e%3cg%20transform='rotate(-4.2%20-78%20211)%20scale(.10057)'%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'%20style='fill:%237fbbdd'/%3e%3cclipPath%20id='b'%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23b)'%3e%3cpath%20d='M413.3%20402.7c17.5%2018.9%2010%2045.7%2028.4%2043.4%2021.7-2.7%2030.9-15.7%2031.6-32.7.7-17-1-19.5-7.1-38-6.1-18.7-18.2-23.2-43.4-18.2-20.8%204.1-17.8%203-24%2010-6.4%207-14.5%2026-14.5%2026s8.4-12.7%2029%209.5Z'%20style='fill:%23fff'%20transform='matrix(.90907%200%200%20.85852%2037%2052.2)'/%3e%3c/g%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'%20style='fill:none;stroke:%23000;stroke-width:16.57px'/%3e%3c/g%3e%3c/svg%3e";async function aR(t,e,n={}){let r;if(rt(t)){if(r=document.querySelector(t),!r)throw new Error(`No such element: ${t}`)}else if(t instanceof HTMLElement)r=t;else throw new Error(`Invalid element: ${t}`);let o;try{const i=Rt(e)?e:await y2(e);if(i.baseUrl??(i.baseUrl=""),i.width??(i.width="container"),i.padding??(i.padding=10),r==document.body){const s=document.createElement("div");s.style.position="fixed",s.style.inset="0",s.style.overflow="hidden",r.appendChild(s),r=s}o=new m2(r,i,n),cR(o,n),await o.launch()}catch(i){r.innerText=i.toString(),console.error(i)}return{finalize(){for(o.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(i,s){const a=o._eventListeners;let c=a.get(i);c||(c=new Set,a.set(i,c)),c.add(s)},removeEventListener(i,s){var c;(c=o._eventListeners.get(i))==null||c.delete(s)},getScaleResolutionByName(i){return o.getNamedScaleResolutions().get(i)},updateNamedData:o.updateNamedData.bind(o),exportCanvas:o.exportCanvas.bind(o)}}function cR(t,e){e.namedDataProvider&&t.registerNamedDataProvider(e.namedDataProvider)}async function y2(t){let e;try{const n=await fetch(t);if(!n.ok)throw new Error(`${n.status} ${n.statusText}`);e=await n.json()}catch(n){throw new Error(`Could not load or parse configuration: ${t}, reason: ${n.message}`)}if(!e.baseUrl){const n=t.match(/^[^?#]*\//);e.baseUrl=n&&n[0]||"./"}return e}function Xl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function lR(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var Ad={},Ba={},b2;function uR(){if(b2)return Ba;b2=1,Ba.byteLength=a,Ba.toByteArray=l,Ba.fromByteArray=d;for(var t=[],e=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=r.length;o<i;++o)t[o]=r[o],e[r.charCodeAt(o)]=o;e[45]=62,e[95]=63;function s(h){var p=h.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=h.indexOf("=");y===-1&&(y=p);var v=y===p?0:4-y%4;return[y,v]}function a(h){var p=s(h),y=p[0],v=p[1];return(y+v)*3/4-v}function c(h,p,y){return(p+y)*3/4-y}function l(h){var p,y=s(h),v=y[0],b=y[1],A=new n(c(h,v,b)),S=0,E=b>0?v-4:v,I;for(I=0;I<E;I+=4)p=e[h.charCodeAt(I)]<<18|e[h.charCodeAt(I+1)]<<12|e[h.charCodeAt(I+2)]<<6|e[h.charCodeAt(I+3)],A[S++]=p>>16&255,A[S++]=p>>8&255,A[S++]=p&255;return b===2&&(p=e[h.charCodeAt(I)]<<2|e[h.charCodeAt(I+1)]>>4,A[S++]=p&255),b===1&&(p=e[h.charCodeAt(I)]<<10|e[h.charCodeAt(I+1)]<<4|e[h.charCodeAt(I+2)]>>2,A[S++]=p>>8&255,A[S++]=p&255),A}function u(h){return t[h>>18&63]+t[h>>12&63]+t[h>>6&63]+t[h&63]}function f(h,p,y){for(var v,b=[],A=p;A<y;A+=3)v=(h[A]<<16&16711680)+(h[A+1]<<8&65280)+(h[A+2]&255),b.push(u(v));return b.join("")}function d(h){for(var p,y=h.length,v=y%3,b=[],A=16383,S=0,E=y-v;S<E;S+=A)b.push(f(h,S,S+A>E?E:S+A));return v===1?(p=h[y-1],b.push(t[p>>2]+t[p<<4&63]+"==")):v===2&&(p=(h[y-2]<<8)+h[y-1],b.push(t[p>>10]+t[p>>4&63]+t[p<<2&63]+"=")),b.join("")}return Ba}var Kl={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var w2;function fR(){return w2||(w2=1,Kl.read=function(t,e,n,r,o){var i,s,a=o*8-r-1,c=(1<<a)-1,l=c>>1,u=-7,f=n?o-1:0,d=n?-1:1,h=t[e+f];for(f+=d,i=h&(1<<-u)-1,h>>=-u,u+=a;u>0;i=i*256+t[e+f],f+=d,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=r;u>0;s=s*256+t[e+f],f+=d,u-=8);if(i===0)i=1-l;else{if(i===c)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,r),i=i-l}return(h?-1:1)*s*Math.pow(2,i-r)},Kl.write=function(t,e,n,r,o,i){var s,a,c,l=i*8-o-1,u=(1<<l)-1,f=u>>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,y=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?e+=d/c:e+=d*Math.pow(2,1-f),e*c>=2&&(s++,c/=2),s+f>=u?(a=0,s=u):s+f>=1?(a=(e*c-1)*Math.pow(2,o),s=s+f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[n+h]=a&255,h+=p,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;t[n+h]=s&255,h+=p,s/=256,l-=8);t[n+h-p]|=y*128}),Kl}/*!
|
|
720
|
-
*
|
|
721
|
-
|
|
722
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
723
|
-
|
|
724
|
-
*/var x2;function ka(){return x2||(x2=1,function(t){const e=uR(),n=fR(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=A,t.INSPECT_MAX_BYTES=50;const o=2147483647;t.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=i(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const k=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(k,m),k.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(k){if(k>o)throw new RangeError('The value "'+k+'" is invalid for option "size"');const m=new Uint8Array(k);return Object.setPrototypeOf(m,a.prototype),m}function a(k,m,w){if(typeof k=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(k)}return c(k,m,w)}a.poolSize=8192;function c(k,m,w){if(typeof k=="string")return d(k,m);if(ArrayBuffer.isView(k))return p(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if($e(k,ArrayBuffer)||k&&$e(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($e(k,SharedArrayBuffer)||k&&$e(k.buffer,SharedArrayBuffer)))return y(k,m,w);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const O=k.valueOf&&k.valueOf();if(O!=null&&O!==k)return a.from(O,m,w);const x=v(k);if(x)return x;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return a.from(k[Symbol.toPrimitive]("string"),m,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}a.from=function(k,m,w){return c(k,m,w)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function u(k,m,w){return l(k),k<=0?s(k):m!==void 0?typeof w=="string"?s(k).fill(m,w):s(k).fill(m):s(k)}a.alloc=function(k,m,w){return u(k,m,w)};function f(k){return l(k),s(k<0?0:b(k)|0)}a.allocUnsafe=function(k){return f(k)},a.allocUnsafeSlow=function(k){return f(k)};function d(k,m){if((typeof m!="string"||m==="")&&(m="utf8"),!a.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const w=S(k,m)|0;let O=s(w);const x=O.write(k,m);return x!==w&&(O=O.slice(0,x)),O}function h(k){const m=k.length<0?0:b(k.length)|0,w=s(m);for(let O=0;O<m;O+=1)w[O]=k[O]&255;return w}function p(k){if($e(k,Uint8Array)){const m=new Uint8Array(k);return y(m.buffer,m.byteOffset,m.byteLength)}return h(k)}function y(k,m,w){if(m<0||k.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<m+(w||0))throw new RangeError('"length" is outside of buffer bounds');let O;return m===void 0&&w===void 0?O=new Uint8Array(k):w===void 0?O=new Uint8Array(k,m):O=new Uint8Array(k,m,w),Object.setPrototypeOf(O,a.prototype),O}function v(k){if(a.isBuffer(k)){const m=b(k.length)|0,w=s(m);return w.length===0||k.copy(w,0,0,m),w}if(k.length!==void 0)return typeof k.length!="number"||kt(k.length)?s(0):h(k);if(k.type==="Buffer"&&Array.isArray(k.data))return h(k.data)}function b(k){if(k>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return k|0}function A(k){return+k!=k&&(k=0),a.alloc(+k)}a.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==a.prototype},a.compare=function(m,w){if($e(m,Uint8Array)&&(m=a.from(m,m.offset,m.byteLength)),$e(w,Uint8Array)&&(w=a.from(w,w.offset,w.byteLength)),!a.isBuffer(m)||!a.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(m===w)return 0;let O=m.length,x=w.length;for(let z=0,V=Math.min(O,x);z<V;++z)if(m[z]!==w[z]){O=m[z],x=w[z];break}return O<x?-1:x<O?1:0},a.isEncoding=function(m){switch(String(m).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(m,w){if(!Array.isArray(m))throw new TypeError('"list" argument must be an Array of Buffers');if(m.length===0)return a.alloc(0);let O;if(w===void 0)for(w=0,O=0;O<m.length;++O)w+=m[O].length;const x=a.allocUnsafe(w);let z=0;for(O=0;O<m.length;++O){let V=m[O];if($e(V,Uint8Array))z+V.length>x.length?(a.isBuffer(V)||(V=a.from(V)),V.copy(x,z)):Uint8Array.prototype.set.call(x,V,z);else if(a.isBuffer(V))V.copy(x,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=V.length}return x};function S(k,m){if(a.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||$e(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const w=k.length,O=arguments.length>2&&arguments[2]===!0;if(!O&&w===0)return 0;let x=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return Se(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return Jt(k).length;default:if(x)return O?-1:Se(k).length;m=(""+m).toLowerCase(),x=!0}}a.byteLength=S;function E(k,m,w){let O=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,m>>>=0,w<=m))return"";for(k||(k="utf8");;)switch(k){case"hex":return de(this,m,w);case"utf8":case"utf-8":return oe(this,m,w);case"ascii":return ce(this,m,w);case"latin1":case"binary":return ye(this,m,w);case"base64":return Q(this,m,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ce(this,m,w);default:if(O)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),O=!0}}a.prototype._isBuffer=!0;function I(k,m,w){const O=k[m];k[m]=k[w],k[w]=O}a.prototype.swap16=function(){const m=this.length;if(m%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<m;w+=2)I(this,w,w+1);return this},a.prototype.swap32=function(){const m=this.length;if(m%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<m;w+=4)I(this,w,w+3),I(this,w+1,w+2);return this},a.prototype.swap64=function(){const m=this.length;if(m%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<m;w+=8)I(this,w,w+7),I(this,w+1,w+6),I(this,w+2,w+5),I(this,w+3,w+4);return this},a.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?oe(this,0,m):E.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(m){if(!a.isBuffer(m))throw new TypeError("Argument must be a Buffer");return this===m?!0:a.compare(this,m)===0},a.prototype.inspect=function(){let m="";const w=t.INSPECT_MAX_BYTES;return m=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(m+=" ... "),"<Buffer "+m+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(m,w,O,x,z){if($e(m,Uint8Array)&&(m=a.from(m,m.offset,m.byteLength)),!a.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(w===void 0&&(w=0),O===void 0&&(O=m?m.length:0),x===void 0&&(x=0),z===void 0&&(z=this.length),w<0||O>m.length||x<0||z>this.length)throw new RangeError("out of range index");if(x>=z&&w>=O)return 0;if(x>=z)return-1;if(w>=O)return 1;if(w>>>=0,O>>>=0,x>>>=0,z>>>=0,this===m)return 0;let V=z-x,ue=O-w;const G=Math.min(V,ue),X=this.slice(x,z),T=m.slice(w,O);for(let re=0;re<G;++re)if(X[re]!==T[re]){V=X[re],ue=T[re];break}return V<ue?-1:ue<V?1:0};function _(k,m,w,O,x){if(k.length===0)return-1;if(typeof w=="string"?(O=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,kt(w)&&(w=x?0:k.length-1),w<0&&(w=k.length+w),w>=k.length){if(x)return-1;w=k.length-1}else if(w<0)if(x)w=0;else return-1;if(typeof m=="string"&&(m=a.from(m,O)),a.isBuffer(m))return m.length===0?-1:B(k,m,w,O,x);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?x?Uint8Array.prototype.indexOf.call(k,m,w):Uint8Array.prototype.lastIndexOf.call(k,m,w):B(k,[m],w,O,x);throw new TypeError("val must be string, number or Buffer")}function B(k,m,w,O,x){let z=1,V=k.length,ue=m.length;if(O!==void 0&&(O=String(O).toLowerCase(),O==="ucs2"||O==="ucs-2"||O==="utf16le"||O==="utf-16le")){if(k.length<2||m.length<2)return-1;z=2,V/=2,ue/=2,w/=2}function G(T,re){return z===1?T[re]:T.readUInt16BE(re*z)}let X;if(x){let T=-1;for(X=w;X<V;X++)if(G(k,X)===G(m,T===-1?0:X-T)){if(T===-1&&(T=X),X-T+1===ue)return T*z}else T!==-1&&(X-=X-T),T=-1}else for(w+ue>V&&(w=V-ue),X=w;X>=0;X--){let T=!0;for(let re=0;re<ue;re++)if(G(k,X+re)!==G(m,re)){T=!1;break}if(T)return X}return-1}a.prototype.includes=function(m,w,O){return this.indexOf(m,w,O)!==-1},a.prototype.indexOf=function(m,w,O){return _(this,m,w,O,!0)},a.prototype.lastIndexOf=function(m,w,O){return _(this,m,w,O,!1)};function N(k,m,w,O){w=Number(w)||0;const x=k.length-w;O?(O=Number(O),O>x&&(O=x)):O=x;const z=m.length;O>z/2&&(O=z/2);let V;for(V=0;V<O;++V){const ue=parseInt(m.substr(V*2,2),16);if(kt(ue))return V;k[w+V]=ue}return V}function F(k,m,w,O){return It(Se(m,k.length-w),k,w,O)}function M(k,m,w,O){return It(Re(m),k,w,O)}function C(k,m,w,O){return It(Jt(m),k,w,O)}function Y(k,m,w,O){return It(dt(m,k.length-w),k,w,O)}a.prototype.write=function(m,w,O,x){if(w===void 0)x="utf8",O=this.length,w=0;else if(O===void 0&&typeof w=="string")x=w,O=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(O)?(O=O>>>0,x===void 0&&(x="utf8")):(x=O,O=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const z=this.length-w;if((O===void 0||O>z)&&(O=z),m.length>0&&(O<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");let V=!1;for(;;)switch(x){case"hex":return N(this,m,w,O);case"utf8":case"utf-8":return F(this,m,w,O);case"ascii":case"latin1":case"binary":return M(this,m,w,O);case"base64":return C(this,m,w,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,m,w,O);default:if(V)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),V=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(k,m,w){return m===0&&w===k.length?e.fromByteArray(k):e.fromByteArray(k.slice(m,w))}function oe(k,m,w){w=Math.min(k.length,w);const O=[];let x=m;for(;x<w;){const z=k[x];let V=null,ue=z>239?4:z>223?3:z>191?2:1;if(x+ue<=w){let G,X,T,re;switch(ue){case 1:z<128&&(V=z);break;case 2:G=k[x+1],(G&192)===128&&(re=(z&31)<<6|G&63,re>127&&(V=re));break;case 3:G=k[x+1],X=k[x+2],(G&192)===128&&(X&192)===128&&(re=(z&15)<<12|(G&63)<<6|X&63,re>2047&&(re<55296||re>57343)&&(V=re));break;case 4:G=k[x+1],X=k[x+2],T=k[x+3],(G&192)===128&&(X&192)===128&&(T&192)===128&&(re=(z&15)<<18|(G&63)<<12|(X&63)<<6|T&63,re>65535&&re<1114112&&(V=re))}}V===null?(V=65533,ue=1):V>65535&&(V-=65536,O.push(V>>>10&1023|55296),V=56320|V&1023),O.push(V),x+=ue}return ae(O)}const se=4096;function ae(k){const m=k.length;if(m<=se)return String.fromCharCode.apply(String,k);let w="",O=0;for(;O<m;)w+=String.fromCharCode.apply(String,k.slice(O,O+=se));return w}function ce(k,m,w){let O="";w=Math.min(k.length,w);for(let x=m;x<w;++x)O+=String.fromCharCode(k[x]&127);return O}function ye(k,m,w){let O="";w=Math.min(k.length,w);for(let x=m;x<w;++x)O+=String.fromCharCode(k[x]);return O}function de(k,m,w){const O=k.length;(!m||m<0)&&(m=0),(!w||w<0||w>O)&&(w=O);let x="";for(let z=m;z<w;++z)x+=zt[k[z]];return x}function Ce(k,m,w){const O=k.slice(m,w);let x="";for(let z=0;z<O.length-1;z+=2)x+=String.fromCharCode(O[z]+O[z+1]*256);return x}a.prototype.slice=function(m,w){const O=this.length;m=~~m,w=w===void 0?O:~~w,m<0?(m+=O,m<0&&(m=0)):m>O&&(m=O),w<0?(w+=O,w<0&&(w=0)):w>O&&(w=O),w<m&&(w=m);const x=this.subarray(m,w);return Object.setPrototypeOf(x,a.prototype),x};function me(k,m,w){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+m>w)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=this[m],z=1,V=0;for(;++V<w&&(z*=256);)x+=this[m+V]*z;return x},a.prototype.readUintBE=a.prototype.readUIntBE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=this[m+--w],z=1;for(;w>0&&(z*=256);)x+=this[m+--w]*z;return x},a.prototype.readUint8=a.prototype.readUInt8=function(m,w){return m=m>>>0,w||me(m,1,this.length),this[m]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(m,w){return m=m>>>0,w||me(m,2,this.length),this[m]|this[m+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(m,w){return m=m>>>0,w||me(m,2,this.length),this[m]<<8|this[m+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(m,w){return m=m>>>0,w||me(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+this[m+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(m,w){return m=m>>>0,w||me(m,4,this.length),this[m]*16777216+(this[m+1]<<16|this[m+2]<<8|this[m+3])},a.prototype.readBigUInt64LE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=w+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24,z=this[++m]+this[++m]*2**8+this[++m]*2**16+O*2**24;return BigInt(x)+(BigInt(z)<<BigInt(32))}),a.prototype.readBigUInt64BE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=w*2**24+this[++m]*2**16+this[++m]*2**8+this[++m],z=this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+O;return(BigInt(x)<<BigInt(32))+BigInt(z)}),a.prototype.readIntLE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=this[m],z=1,V=0;for(;++V<w&&(z*=256);)x+=this[m+V]*z;return z*=128,x>=z&&(x-=Math.pow(2,8*w)),x},a.prototype.readIntBE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=w,z=1,V=this[m+--x];for(;x>0&&(z*=256);)V+=this[m+--x]*z;return z*=128,V>=z&&(V-=Math.pow(2,8*w)),V},a.prototype.readInt8=function(m,w){return m=m>>>0,w||me(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},a.prototype.readInt16LE=function(m,w){m=m>>>0,w||me(m,2,this.length);const O=this[m]|this[m+1]<<8;return O&32768?O|4294901760:O},a.prototype.readInt16BE=function(m,w){m=m>>>0,w||me(m,2,this.length);const O=this[m+1]|this[m]<<8;return O&32768?O|4294901760:O},a.prototype.readInt32LE=function(m,w){return m=m>>>0,w||me(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},a.prototype.readInt32BE=function(m,w){return m=m>>>0,w||me(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},a.prototype.readBigInt64LE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(O<<24);return(BigInt(x)<<BigInt(32))+BigInt(w+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24)}),a.prototype.readBigInt64BE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=(w<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(x)<<BigInt(32))+BigInt(this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+O)}),a.prototype.readFloatLE=function(m,w){return m=m>>>0,w||me(m,4,this.length),n.read(this,m,!0,23,4)},a.prototype.readFloatBE=function(m,w){return m=m>>>0,w||me(m,4,this.length),n.read(this,m,!1,23,4)},a.prototype.readDoubleLE=function(m,w){return m=m>>>0,w||me(m,8,this.length),n.read(this,m,!0,52,8)},a.prototype.readDoubleBE=function(m,w){return m=m>>>0,w||me(m,8,this.length),n.read(this,m,!1,52,8)};function Ee(k,m,w,O,x,z){if(!a.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>x||m<z)throw new RangeError('"value" argument is out of bounds');if(w+O>k.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(m,w,O,x){if(m=+m,w=w>>>0,O=O>>>0,!x){const ue=Math.pow(2,8*O)-1;Ee(this,m,w,O,ue,0)}let z=1,V=0;for(this[w]=m&255;++V<O&&(z*=256);)this[w+V]=m/z&255;return w+O},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(m,w,O,x){if(m=+m,w=w>>>0,O=O>>>0,!x){const ue=Math.pow(2,8*O)-1;Ee(this,m,w,O,ue,0)}let z=O-1,V=1;for(this[w+z]=m&255;--z>=0&&(V*=256);)this[w+z]=m/V&255;return w+O},a.prototype.writeUint8=a.prototype.writeUInt8=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,1,255,0),this[w]=m&255,w+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,2,65535,0),this[w]=m&255,this[w+1]=m>>>8,w+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,2,65535,0),this[w]=m>>>8,this[w+1]=m&255,w+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,4,4294967295,0),this[w+3]=m>>>24,this[w+2]=m>>>16,this[w+1]=m>>>8,this[w]=m&255,w+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,4,4294967295,0),this[w]=m>>>24,this[w+1]=m>>>16,this[w+2]=m>>>8,this[w+3]=m&255,w+4};function De(k,m,w,O,x){D(m,O,x,k,w,7);let z=Number(m&BigInt(4294967295));k[w++]=z,z=z>>8,k[w++]=z,z=z>>8,k[w++]=z,z=z>>8,k[w++]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return k[w++]=V,V=V>>8,k[w++]=V,V=V>>8,k[w++]=V,V=V>>8,k[w++]=V,w}function Ge(k,m,w,O,x){D(m,O,x,k,w,7);let z=Number(m&BigInt(4294967295));k[w+7]=z,z=z>>8,k[w+6]=z,z=z>>8,k[w+5]=z,z=z>>8,k[w+4]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return k[w+3]=V,V=V>>8,k[w+2]=V,V=V>>8,k[w+1]=V,V=V>>8,k[w]=V,w+8}a.prototype.writeBigUInt64LE=et(function(m,w=0){return De(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=et(function(m,w=0){return Ge(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(m,w,O,x){if(m=+m,w=w>>>0,!x){const G=Math.pow(2,8*O-1);Ee(this,m,w,O,G-1,-G)}let z=0,V=1,ue=0;for(this[w]=m&255;++z<O&&(V*=256);)m<0&&ue===0&&this[w+z-1]!==0&&(ue=1),this[w+z]=(m/V>>0)-ue&255;return w+O},a.prototype.writeIntBE=function(m,w,O,x){if(m=+m,w=w>>>0,!x){const G=Math.pow(2,8*O-1);Ee(this,m,w,O,G-1,-G)}let z=O-1,V=1,ue=0;for(this[w+z]=m&255;--z>=0&&(V*=256);)m<0&&ue===0&&this[w+z+1]!==0&&(ue=1),this[w+z]=(m/V>>0)-ue&255;return w+O},a.prototype.writeInt8=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,1,127,-128),m<0&&(m=255+m+1),this[w]=m&255,w+1},a.prototype.writeInt16LE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,2,32767,-32768),this[w]=m&255,this[w+1]=m>>>8,w+2},a.prototype.writeInt16BE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,2,32767,-32768),this[w]=m>>>8,this[w+1]=m&255,w+2},a.prototype.writeInt32LE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,4,2147483647,-2147483648),this[w]=m&255,this[w+1]=m>>>8,this[w+2]=m>>>16,this[w+3]=m>>>24,w+4},a.prototype.writeInt32BE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[w]=m>>>24,this[w+1]=m>>>16,this[w+2]=m>>>8,this[w+3]=m&255,w+4},a.prototype.writeBigInt64LE=et(function(m,w=0){return De(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=et(function(m,w=0){return Ge(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ve(k,m,w,O,x,z){if(w+O>k.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function q(k,m,w,O,x){return m=+m,w=w>>>0,x||Ve(k,m,w,4),n.write(k,m,w,O,23,4),w+4}a.prototype.writeFloatLE=function(m,w,O){return q(this,m,w,!0,O)},a.prototype.writeFloatBE=function(m,w,O){return q(this,m,w,!1,O)};function W(k,m,w,O,x){return m=+m,w=w>>>0,x||Ve(k,m,w,8),n.write(k,m,w,O,52,8),w+8}a.prototype.writeDoubleLE=function(m,w,O){return W(this,m,w,!0,O)},a.prototype.writeDoubleBE=function(m,w,O){return W(this,m,w,!1,O)},a.prototype.copy=function(m,w,O,x){if(!a.isBuffer(m))throw new TypeError("argument should be a Buffer");if(O||(O=0),!x&&x!==0&&(x=this.length),w>=m.length&&(w=m.length),w||(w=0),x>0&&x<O&&(x=O),x===O||m.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(O<0||O>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),m.length-w<x-O&&(x=m.length-w+O);const z=x-O;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(w,O,x):Uint8Array.prototype.set.call(m,this.subarray(O,x),w),z},a.prototype.fill=function(m,w,O,x){if(typeof m=="string"){if(typeof w=="string"?(x=w,w=0,O=this.length):typeof O=="string"&&(x=O,O=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!a.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(m.length===1){const V=m.charCodeAt(0);(x==="utf8"&&V<128||x==="latin1")&&(m=V)}}else typeof m=="number"?m=m&255:typeof m=="boolean"&&(m=Number(m));if(w<0||this.length<w||this.length<O)throw new RangeError("Out of range index");if(O<=w)return this;w=w>>>0,O=O===void 0?this.length:O>>>0,m||(m=0);let z;if(typeof m=="number")for(z=w;z<O;++z)this[z]=m;else{const V=a.isBuffer(m)?m:a.from(m,x),ue=V.length;if(ue===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(z=0;z<O-w;++z)this[z+w]=V[z%ue]}return this};const ee={};function J(k,m,w){ee[k]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(x){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:x,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}J("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),J("ERR_INVALID_ARG_TYPE",function(k,m){return`The "${k}" argument must be of type number. Received type ${typeof m}`},TypeError),J("ERR_OUT_OF_RANGE",function(k,m,w){let O=`The value of "${k}" is out of range.`,x=w;return Number.isInteger(w)&&Math.abs(w)>2**32?x=fe(String(w)):typeof w=="bigint"&&(x=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(x=fe(x)),x+="n"),O+=` It must be ${m}. Received ${x}`,O},RangeError);function fe(k){let m="",w=k.length;const O=k[0]==="-"?1:0;for(;w>=O+4;w-=3)m=`_${k.slice(w-3,w)}${m}`;return`${k.slice(0,w)}${m}`}function L(k,m,w){te(m,"offset"),(k[m]===void 0||k[m+w]===void 0)&&le(m,k.length-(w+1))}function D(k,m,w,O,x,z){if(k>w||k<m){const V=typeof m=="bigint"?"n":"";let ue;throw m===0||m===BigInt(0)?ue=`>= 0${V} and < 2${V} ** ${(z+1)*8}${V}`:ue=`>= -(2${V} ** ${(z+1)*8-1}${V}) and < 2 ** ${(z+1)*8-1}${V}`,new ee.ERR_OUT_OF_RANGE("value",ue,k)}L(O,x,z)}function te(k,m){if(typeof k!="number")throw new ee.ERR_INVALID_ARG_TYPE(m,"number",k)}function le(k,m,w){throw Math.floor(k)!==k?(te(k,w),new ee.ERR_OUT_OF_RANGE("offset","an integer",k)):m<0?new ee.ERR_BUFFER_OUT_OF_BOUNDS:new ee.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${m}`,k)}const Be=/[^+/0-9A-Za-z-_]/g;function ve(k){if(k=k.split("=")[0],k=k.trim().replace(Be,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Se(k,m){m=m||1/0;let w;const O=k.length;let x=null;const z=[];for(let V=0;V<O;++V){if(w=k.charCodeAt(V),w>55295&&w<57344){if(!x){if(w>56319){(m-=3)>-1&&z.push(239,191,189);continue}else if(V+1===O){(m-=3)>-1&&z.push(239,191,189);continue}x=w;continue}if(w<56320){(m-=3)>-1&&z.push(239,191,189),x=w;continue}w=(x-55296<<10|w-56320)+65536}else x&&(m-=3)>-1&&z.push(239,191,189);if(x=null,w<128){if((m-=1)<0)break;z.push(w)}else if(w<2048){if((m-=2)<0)break;z.push(w>>6|192,w&63|128)}else if(w<65536){if((m-=3)<0)break;z.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((m-=4)<0)break;z.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return z}function Re(k){const m=[];for(let w=0;w<k.length;++w)m.push(k.charCodeAt(w)&255);return m}function dt(k,m){let w,O,x;const z=[];for(let V=0;V<k.length&&!((m-=2)<0);++V)w=k.charCodeAt(V),O=w>>8,x=w%256,z.push(x),z.push(O);return z}function Jt(k){return e.toByteArray(ve(k))}function It(k,m,w,O){let x;for(x=0;x<O&&!(x+w>=m.length||x>=k.length);++x)m[x+w]=k[x];return x}function $e(k,m){return k instanceof m||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===m.name}function kt(k){return k!==k}const zt=function(){const k="0123456789abcdef",m=new Array(256);for(let w=0;w<16;++w){const O=w*16;for(let x=0;x<16;++x)m[O+x]=k[w]+k[x]}return m}();function et(k){return typeof BigInt>"u"?Ut:k}function Ut(){throw new Error("BigInt not supported")}}(Ad)),Ad}var Ke=ka();const hR=Ye({__proto__:null,default:Xl(Ke)},[Ke]),Ct={},dR=Object.freeze(Object.defineProperty({__proto__:null,default:Ct},Symbol.toStringTag,{value:"Module"}));function v2(t){return(typeof t=="object"&&t!==null&&"message"in t?t.message:`${t}`).replace(/\.$/,"")}class Cn{async getBufferFromResponse(e){const n=await e.arrayBuffer();return Ke.Buffer.from(n)}constructor(e,n={}){this.baseOverrides={},this.url=e;const r=n.fetch||globalThis.fetch.bind(globalThis);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");n.overrides&&(this.baseOverrides=n.overrides),this.fetchImplementation=r}async fetch(e,n){let r;try{r=await this.fetchImplementation(e,n)}catch(o){if(`${o}`.includes("Failed to fetch")){console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);try{r=await this.fetchImplementation(e,{...n,cache:"reload"})}catch(i){throw new Error(`${v2(i)} fetching ${e}`,{cause:i})}}else throw new Error(`${v2(o)} fetching ${e}`,{cause:o})}return r}async read(e,n=0,r,o=0,i={}){const{headers:s={},signal:a,overrides:c={}}=i;r<1/0?s.range=`bytes=${o}-${o+r}`:r===1/0&&o!==0&&(s.range=`bytes=${o}-`);const l=await this.fetch(this.url,{...this.baseOverrides,...c,headers:{...s,...c.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:a});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${this.url}`);if(l.status===200&&o===0||l.status===206){const u=await this.getBufferFromResponse(l),f=u.copy(e,n,0,Math.min(r,u.length)),d=l.headers.get("content-range"),h=/\/(\d+)$/.exec(d||"");return h!=null&&h[1]&&(this._stat={size:parseInt(h[1],10)}),{bytesRead:f,buffer:e}}throw l.status===200?new Error(`${this.url} fetch returned status 200, expected 206`):new Error(`HTTP ${l.status} fetching ${this.url}`)}async readFile(e={}){let n,r;typeof e=="string"?(n=e,r={}):(n=e.encoding,r=e,delete r.encoding);const{headers:o={},signal:i,overrides:s={}}=r,a=await this.fetch(this.url,{headers:o,method:"GET",redirect:"follow",mode:"cors",signal:i,...this.baseOverrides,...s});if(a.status!==200)throw new Error(`HTTP ${a.status} fetching ${this.url}`);if(n==="utf8")return a.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.getBufferFromResponse(a)}async stat(){if(!this._stat){const e=Ke.Buffer.allocUnsafe(10);if(await this.read(e,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function A2(t){const e=new FileReader;return new Promise((n,r)=>{e.onerror=()=>{e.abort(),r(new Error("problem reading blob"))},e.onabort=()=>{r(new Error("blob reading was aborted"))},e.onload=()=>{e.result&&typeof e.result!="string"?n(e.result):r(new Error("unknown error reading blob"))},e.readAsArrayBuffer(t)})}function pR(t){const e=new FileReader;return new Promise((n,r)=>{e.onerror=()=>{e.abort(),r(new Error("problem reading blob"))},e.onabort=()=>{r(new Error("blob reading was aborted"))},e.onload=()=>{e.result&&typeof e.result=="string"?n(e.result):r(new Error("unknown error reading blob"))},e.readAsText(t)})}class gR{constructor(e){this.blob=e,this.size=e.size}async read(e,n=0,r,o=0){if(!r)return{bytesRead:0,buffer:e};const i=o,s=i+r,a=await A2(this.blob.slice(i,s)),c=Ke.Buffer.from(a);return{bytesRead:c.copy(e,n),buffer:c}}async readFile(e){const n=typeof e=="string"?e:e==null?void 0:e.encoding;if(n==="utf8")return pR(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await A2(this.blob);return Ke.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function E2(t,e={}){return new Cn(t,e)}function mR(t,e,n,r={}){if(n!==void 0)return n;if(t!==void 0)return E2(t,r);if(e!==void 0)return new Ct(e,r);throw new Error("no url, path, or filehandle provided, cannot open")}const _a=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:gR,LocalFile:Ct,RemoteFile:Cn,fromUrl:E2,open:mR},Symbol.toStringTag,{value:"Module"}));var Ed={},S2;function Nr(){return S2||(S2=1,function(t){var e=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(i,s){return Object.prototype.hasOwnProperty.call(i,s)}t.assign=function(i){for(var s=Array.prototype.slice.call(arguments,1);s.length;){var a=s.shift();if(a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(var c in a)n(a,c)&&(i[c]=a[c])}}return i},t.shrinkBuf=function(i,s){return i.length===s?i:i.subarray?i.subarray(0,s):(i.length=s,i)};var r={arraySet:function(i,s,a,c,l){if(s.subarray&&i.subarray){i.set(s.subarray(a,a+c),l);return}for(var u=0;u<c;u++)i[l+u]=s[a+u]},flattenChunks:function(i){var s,a,c,l,u,f;for(c=0,s=0,a=i.length;s<a;s++)c+=i[s].length;for(f=new Uint8Array(c),l=0,s=0,a=i.length;s<a;s++)u=i[s],f.set(u,l),l+=u.length;return f}},o={arraySet:function(i,s,a,c,l){for(var u=0;u<c;u++)i[l+u]=s[a+u]},flattenChunks:function(i){return[].concat.apply([],i)}};t.setTyped=function(i){i?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,r)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(e)}(Ed)),Ed}var So={},In={},Ii={},C2;function yR(){if(C2)return Ii;C2=1;var t=Nr(),e=4,n=0,r=1,o=2;function i(x){for(var z=x.length;--z>=0;)x[z]=0}var s=0,a=1,c=2,l=3,u=258,f=29,d=256,h=d+1+f,p=30,y=19,v=2*h+1,b=15,A=16,S=7,E=256,I=16,_=17,B=18,N=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],F=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=512,Q=new Array((h+2)*2);i(Q);var oe=new Array(p*2);i(oe);var se=new Array(Y);i(se);var ae=new Array(u-l+1);i(ae);var ce=new Array(f);i(ce);var ye=new Array(p);i(ye);function de(x,z,V,ue,G){this.static_tree=x,this.extra_bits=z,this.extra_base=V,this.elems=ue,this.max_length=G,this.has_stree=x&&x.length}var Ce,me,Ee;function De(x,z){this.dyn_tree=x,this.max_code=0,this.stat_desc=z}function Ge(x){return x<256?se[x]:se[256+(x>>>7)]}function Ve(x,z){x.pending_buf[x.pending++]=z&255,x.pending_buf[x.pending++]=z>>>8&255}function q(x,z,V){x.bi_valid>A-V?(x.bi_buf|=z<<x.bi_valid&65535,Ve(x,x.bi_buf),x.bi_buf=z>>A-x.bi_valid,x.bi_valid+=V-A):(x.bi_buf|=z<<x.bi_valid&65535,x.bi_valid+=V)}function W(x,z,V){q(x,V[z*2],V[z*2+1])}function ee(x,z){var V=0;do V|=x&1,x>>>=1,V<<=1;while(--z>0);return V>>>1}function J(x){x.bi_valid===16?(Ve(x,x.bi_buf),x.bi_buf=0,x.bi_valid=0):x.bi_valid>=8&&(x.pending_buf[x.pending++]=x.bi_buf&255,x.bi_buf>>=8,x.bi_valid-=8)}function fe(x,z){var V=z.dyn_tree,ue=z.max_code,G=z.stat_desc.static_tree,X=z.stat_desc.has_stree,T=z.stat_desc.extra_bits,re=z.stat_desc.extra_base,_e=z.stat_desc.max_length,g,K,$,R,H,Z,Te=0;for(R=0;R<=b;R++)x.bl_count[R]=0;for(V[x.heap[x.heap_max]*2+1]=0,g=x.heap_max+1;g<v;g++)K=x.heap[g],R=V[V[K*2+1]*2+1]+1,R>_e&&(R=_e,Te++),V[K*2+1]=R,!(K>ue)&&(x.bl_count[R]++,H=0,K>=re&&(H=T[K-re]),Z=V[K*2],x.opt_len+=Z*(R+H),X&&(x.static_len+=Z*(G[K*2+1]+H)));if(Te!==0){do{for(R=_e-1;x.bl_count[R]===0;)R--;x.bl_count[R]--,x.bl_count[R+1]+=2,x.bl_count[_e]--,Te-=2}while(Te>0);for(R=_e;R!==0;R--)for(K=x.bl_count[R];K!==0;)$=x.heap[--g],!($>ue)&&(V[$*2+1]!==R&&(x.opt_len+=(R-V[$*2+1])*V[$*2],V[$*2+1]=R),K--)}}function L(x,z,V){var ue=new Array(b+1),G=0,X,T;for(X=1;X<=b;X++)ue[X]=G=G+V[X-1]<<1;for(T=0;T<=z;T++){var re=x[T*2+1];re!==0&&(x[T*2]=ee(ue[re]++,re))}}function D(){var x,z,V,ue,G,X=new Array(b+1);for(V=0,ue=0;ue<f-1;ue++)for(ce[ue]=V,x=0;x<1<<N[ue];x++)ae[V++]=ue;for(ae[V-1]=ue,G=0,ue=0;ue<16;ue++)for(ye[ue]=G,x=0;x<1<<F[ue];x++)se[G++]=ue;for(G>>=7;ue<p;ue++)for(ye[ue]=G<<7,x=0;x<1<<F[ue]-7;x++)se[256+G++]=ue;for(z=0;z<=b;z++)X[z]=0;for(x=0;x<=143;)Q[x*2+1]=8,x++,X[8]++;for(;x<=255;)Q[x*2+1]=9,x++,X[9]++;for(;x<=279;)Q[x*2+1]=7,x++,X[7]++;for(;x<=287;)Q[x*2+1]=8,x++,X[8]++;for(L(Q,h+1,X),x=0;x<p;x++)oe[x*2+1]=5,oe[x*2]=ee(x,5);Ce=new de(Q,N,d+1,h,b),me=new de(oe,F,0,p,b),Ee=new de(new Array(0),M,0,y,S)}function te(x){var z;for(z=0;z<h;z++)x.dyn_ltree[z*2]=0;for(z=0;z<p;z++)x.dyn_dtree[z*2]=0;for(z=0;z<y;z++)x.bl_tree[z*2]=0;x.dyn_ltree[E*2]=1,x.opt_len=x.static_len=0,x.last_lit=x.matches=0}function le(x){x.bi_valid>8?Ve(x,x.bi_buf):x.bi_valid>0&&(x.pending_buf[x.pending++]=x.bi_buf),x.bi_buf=0,x.bi_valid=0}function Be(x,z,V,ue){le(x),Ve(x,V),Ve(x,~V),t.arraySet(x.pending_buf,x.window,z,V,x.pending),x.pending+=V}function ve(x,z,V,ue){var G=z*2,X=V*2;return x[G]<x[X]||x[G]===x[X]&&ue[z]<=ue[V]}function Se(x,z,V){for(var ue=x.heap[V],G=V<<1;G<=x.heap_len&&(G<x.heap_len&&ve(z,x.heap[G+1],x.heap[G],x.depth)&&G++,!ve(z,ue,x.heap[G],x.depth));)x.heap[V]=x.heap[G],V=G,G<<=1;x.heap[V]=ue}function Re(x,z,V){var ue,G,X=0,T,re;if(x.last_lit!==0)do ue=x.pending_buf[x.d_buf+X*2]<<8|x.pending_buf[x.d_buf+X*2+1],G=x.pending_buf[x.l_buf+X],X++,ue===0?W(x,G,z):(T=ae[G],W(x,T+d+1,z),re=N[T],re!==0&&(G-=ce[T],q(x,G,re)),ue--,T=Ge(ue),W(x,T,V),re=F[T],re!==0&&(ue-=ye[T],q(x,ue,re)));while(X<x.last_lit);W(x,E,z)}function dt(x,z){var V=z.dyn_tree,ue=z.stat_desc.static_tree,G=z.stat_desc.has_stree,X=z.stat_desc.elems,T,re,_e=-1,g;for(x.heap_len=0,x.heap_max=v,T=0;T<X;T++)V[T*2]!==0?(x.heap[++x.heap_len]=_e=T,x.depth[T]=0):V[T*2+1]=0;for(;x.heap_len<2;)g=x.heap[++x.heap_len]=_e<2?++_e:0,V[g*2]=1,x.depth[g]=0,x.opt_len--,G&&(x.static_len-=ue[g*2+1]);for(z.max_code=_e,T=x.heap_len>>1;T>=1;T--)Se(x,V,T);g=X;do T=x.heap[1],x.heap[1]=x.heap[x.heap_len--],Se(x,V,1),re=x.heap[1],x.heap[--x.heap_max]=T,x.heap[--x.heap_max]=re,V[g*2]=V[T*2]+V[re*2],x.depth[g]=(x.depth[T]>=x.depth[re]?x.depth[T]:x.depth[re])+1,V[T*2+1]=V[re*2+1]=g,x.heap[1]=g++,Se(x,V,1);while(x.heap_len>=2);x.heap[--x.heap_max]=x.heap[1],fe(x,z),L(V,_e,x.bl_count)}function Jt(x,z,V){var ue,G=-1,X,T=z[0*2+1],re=0,_e=7,g=4;for(T===0&&(_e=138,g=3),z[(V+1)*2+1]=65535,ue=0;ue<=V;ue++)X=T,T=z[(ue+1)*2+1],!(++re<_e&&X===T)&&(re<g?x.bl_tree[X*2]+=re:X!==0?(X!==G&&x.bl_tree[X*2]++,x.bl_tree[I*2]++):re<=10?x.bl_tree[_*2]++:x.bl_tree[B*2]++,re=0,G=X,T===0?(_e=138,g=3):X===T?(_e=6,g=3):(_e=7,g=4))}function It(x,z,V){var ue,G=-1,X,T=z[0*2+1],re=0,_e=7,g=4;for(T===0&&(_e=138,g=3),ue=0;ue<=V;ue++)if(X=T,T=z[(ue+1)*2+1],!(++re<_e&&X===T)){if(re<g)do W(x,X,x.bl_tree);while(--re!==0);else X!==0?(X!==G&&(W(x,X,x.bl_tree),re--),W(x,I,x.bl_tree),q(x,re-3,2)):re<=10?(W(x,_,x.bl_tree),q(x,re-3,3)):(W(x,B,x.bl_tree),q(x,re-11,7));re=0,G=X,T===0?(_e=138,g=3):X===T?(_e=6,g=3):(_e=7,g=4)}}function $e(x){var z;for(Jt(x,x.dyn_ltree,x.l_desc.max_code),Jt(x,x.dyn_dtree,x.d_desc.max_code),dt(x,x.bl_desc),z=y-1;z>=3&&x.bl_tree[C[z]*2+1]===0;z--);return x.opt_len+=3*(z+1)+5+5+4,z}function kt(x,z,V,ue){var G;for(q(x,z-257,5),q(x,V-1,5),q(x,ue-4,4),G=0;G<ue;G++)q(x,x.bl_tree[C[G]*2+1],3);It(x,x.dyn_ltree,z-1),It(x,x.dyn_dtree,V-1)}function zt(x){var z=4093624447,V;for(V=0;V<=31;V++,z>>>=1)if(z&1&&x.dyn_ltree[V*2]!==0)return n;if(x.dyn_ltree[9*2]!==0||x.dyn_ltree[10*2]!==0||x.dyn_ltree[13*2]!==0)return r;for(V=32;V<d;V++)if(x.dyn_ltree[V*2]!==0)return r;return n}var et=!1;function Ut(x){et||(D(),et=!0),x.l_desc=new De(x.dyn_ltree,Ce),x.d_desc=new De(x.dyn_dtree,me),x.bl_desc=new De(x.bl_tree,Ee),x.bi_buf=0,x.bi_valid=0,te(x)}function k(x,z,V,ue){q(x,(s<<1)+(ue?1:0),3),Be(x,z,V)}function m(x){q(x,a<<1,3),W(x,E,Q),J(x)}function w(x,z,V,ue){var G,X,T=0;x.level>0?(x.strm.data_type===o&&(x.strm.data_type=zt(x)),dt(x,x.l_desc),dt(x,x.d_desc),T=$e(x),G=x.opt_len+3+7>>>3,X=x.static_len+3+7>>>3,X<=G&&(G=X)):G=X=V+5,V+4<=G&&z!==-1?k(x,z,V,ue):x.strategy===e||X===G?(q(x,(a<<1)+(ue?1:0),3),Re(x,Q,oe)):(q(x,(c<<1)+(ue?1:0),3),kt(x,x.l_desc.max_code+1,x.d_desc.max_code+1,T+1),Re(x,x.dyn_ltree,x.dyn_dtree)),te(x),ue&&le(x)}function O(x,z,V){return x.pending_buf[x.d_buf+x.last_lit*2]=z>>>8&255,x.pending_buf[x.d_buf+x.last_lit*2+1]=z&255,x.pending_buf[x.l_buf+x.last_lit]=V&255,x.last_lit++,z===0?x.dyn_ltree[V*2]++:(x.matches++,z--,x.dyn_ltree[(ae[V]+d+1)*2]++,x.dyn_dtree[Ge(z)*2]++),x.last_lit===x.lit_bufsize-1}return Ii._tr_init=Ut,Ii._tr_stored_block=k,Ii._tr_flush_block=w,Ii._tr_tally=O,Ii._tr_align=m,Ii}var Sd,I2;function T2(){if(I2)return Sd;I2=1;function t(e,n,r,o){for(var i=e&65535|0,s=e>>>16&65535|0,a=0;r!==0;){a=r>2e3?2e3:r,r-=a;do i=i+n[o++]|0,s=s+i|0;while(--a);i%=65521,s%=65521}return i|s<<16|0}return Sd=t,Sd}var Cd,D2;function B2(){if(D2)return Cd;D2=1;function t(){for(var r,o=[],i=0;i<256;i++){r=i;for(var s=0;s<8;s++)r=r&1?3988292384^r>>>1:r>>>1;o[i]=r}return o}var e=t();function n(r,o,i,s){var a=e,c=s+i;r^=-1;for(var l=s;l<c;l++)r=r>>>8^a[(r^o[l])&255];return r^-1}return Cd=n,Cd}var Id,k2;function Td(){return k2||(k2=1,Id={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),Id}var _2;function bR(){if(_2)return In;_2=1;var t=Nr(),e=yR(),n=T2(),r=B2(),o=Td(),i=0,s=1,a=3,c=4,l=5,u=0,f=1,d=-2,h=-3,p=-5,y=-1,v=1,b=2,A=3,S=4,E=0,I=2,_=8,B=9,N=15,F=8,M=29,C=256,Y=C+1+M,Q=30,oe=19,se=2*Y+1,ae=15,ce=3,ye=258,de=ye+ce+1,Ce=32,me=42,Ee=69,De=73,Ge=91,Ve=103,q=113,W=666,ee=1,J=2,fe=3,L=4,D=3;function te(g,K){return g.msg=o[K],K}function le(g){return(g<<1)-(g>4?9:0)}function Be(g){for(var K=g.length;--K>=0;)g[K]=0}function ve(g){var K=g.state,$=K.pending;$>g.avail_out&&($=g.avail_out),$!==0&&(t.arraySet(g.output,K.pending_buf,K.pending_out,$,g.next_out),g.next_out+=$,K.pending_out+=$,g.total_out+=$,g.avail_out-=$,K.pending-=$,K.pending===0&&(K.pending_out=0))}function Se(g,K){e._tr_flush_block(g,g.block_start>=0?g.block_start:-1,g.strstart-g.block_start,K),g.block_start=g.strstart,ve(g.strm)}function Re(g,K){g.pending_buf[g.pending++]=K}function dt(g,K){g.pending_buf[g.pending++]=K>>>8&255,g.pending_buf[g.pending++]=K&255}function Jt(g,K,$,R){var H=g.avail_in;return H>R&&(H=R),H===0?0:(g.avail_in-=H,t.arraySet(K,g.input,g.next_in,H,$),g.state.wrap===1?g.adler=n(g.adler,K,H,$):g.state.wrap===2&&(g.adler=r(g.adler,K,H,$)),g.next_in+=H,g.total_in+=H,H)}function It(g,K){var $=g.max_chain_length,R=g.strstart,H,Z,Te=g.prev_length,be=g.nice_match,xe=g.strstart>g.w_size-de?g.strstart-(g.w_size-de):0,Ue=g.window,mn=g.w_mask,U=g.prev,Me=g.strstart+ye,lt=Ue[R+Te-1],tt=Ue[R+Te];g.prev_length>=g.good_match&&($>>=2),be>g.lookahead&&(be=g.lookahead);do if(H=K,!(Ue[H+Te]!==tt||Ue[H+Te-1]!==lt||Ue[H]!==Ue[R]||Ue[++H]!==Ue[R+1])){R+=2,H++;do;while(Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&R<Me);if(Z=ye-(Me-R),R=Me-ye,Z>Te){if(g.match_start=K,Te=Z,Z>=be)break;lt=Ue[R+Te-1],tt=Ue[R+Te]}}while((K=U[K&mn])>xe&&--$!==0);return Te<=g.lookahead?Te:g.lookahead}function $e(g){var K=g.w_size,$,R,H,Z,Te;do{if(Z=g.window_size-g.lookahead-g.strstart,g.strstart>=K+(K-de)){t.arraySet(g.window,g.window,K,K,0),g.match_start-=K,g.strstart-=K,g.block_start-=K,R=g.hash_size,$=R;do H=g.head[--$],g.head[$]=H>=K?H-K:0;while(--R);R=K,$=R;do H=g.prev[--$],g.prev[$]=H>=K?H-K:0;while(--R);Z+=K}if(g.strm.avail_in===0)break;if(R=Jt(g.strm,g.window,g.strstart+g.lookahead,Z),g.lookahead+=R,g.lookahead+g.insert>=ce)for(Te=g.strstart-g.insert,g.ins_h=g.window[Te],g.ins_h=(g.ins_h<<g.hash_shift^g.window[Te+1])&g.hash_mask;g.insert&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[Te+ce-1])&g.hash_mask,g.prev[Te&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=Te,Te++,g.insert--,!(g.lookahead+g.insert<ce)););}while(g.lookahead<de&&g.strm.avail_in!==0)}function kt(g,K){var $=65535;for($>g.pending_buf_size-5&&($=g.pending_buf_size-5);;){if(g.lookahead<=1){if($e(g),g.lookahead===0&&K===i)return ee;if(g.lookahead===0)break}g.strstart+=g.lookahead,g.lookahead=0;var R=g.block_start+$;if((g.strstart===0||g.strstart>=R)&&(g.lookahead=g.strstart-R,g.strstart=R,Se(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-de&&(Se(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Se(g,!0),g.strm.avail_out===0?fe:L):(g.strstart>g.block_start&&(Se(g,!1),g.strm.avail_out===0),ee)}function zt(g,K){for(var $,R;;){if(g.lookahead<de){if($e(g),g.lookahead<de&&K===i)return ee;if(g.lookahead===0)break}if($=0,g.lookahead>=ce&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+ce-1])&g.hash_mask,$=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),$!==0&&g.strstart-$<=g.w_size-de&&(g.match_length=It(g,$)),g.match_length>=ce)if(R=e._tr_tally(g,g.strstart-g.match_start,g.match_length-ce),g.lookahead-=g.match_length,g.match_length<=g.max_lazy_match&&g.lookahead>=ce){g.match_length--;do g.strstart++,g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+ce-1])&g.hash_mask,$=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart;while(--g.match_length!==0);g.strstart++}else g.strstart+=g.match_length,g.match_length=0,g.ins_h=g.window[g.strstart],g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+1])&g.hash_mask;else R=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++;if(R&&(Se(g,!1),g.strm.avail_out===0))return ee}return g.insert=g.strstart<ce-1?g.strstart:ce-1,K===c?(Se(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Se(g,!1),g.strm.avail_out===0)?ee:J}function et(g,K){for(var $,R,H;;){if(g.lookahead<de){if($e(g),g.lookahead<de&&K===i)return ee;if(g.lookahead===0)break}if($=0,g.lookahead>=ce&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+ce-1])&g.hash_mask,$=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),g.prev_length=g.match_length,g.prev_match=g.match_start,g.match_length=ce-1,$!==0&&g.prev_length<g.max_lazy_match&&g.strstart-$<=g.w_size-de&&(g.match_length=It(g,$),g.match_length<=5&&(g.strategy===v||g.match_length===ce&&g.strstart-g.match_start>4096)&&(g.match_length=ce-1)),g.prev_length>=ce&&g.match_length<=g.prev_length){H=g.strstart+g.lookahead-ce,R=e._tr_tally(g,g.strstart-1-g.prev_match,g.prev_length-ce),g.lookahead-=g.prev_length-1,g.prev_length-=2;do++g.strstart<=H&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+ce-1])&g.hash_mask,$=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart);while(--g.prev_length!==0);if(g.match_available=0,g.match_length=ce-1,g.strstart++,R&&(Se(g,!1),g.strm.avail_out===0))return ee}else if(g.match_available){if(R=e._tr_tally(g,0,g.window[g.strstart-1]),R&&Se(g,!1),g.strstart++,g.lookahead--,g.strm.avail_out===0)return ee}else g.match_available=1,g.strstart++,g.lookahead--}return g.match_available&&(R=e._tr_tally(g,0,g.window[g.strstart-1]),g.match_available=0),g.insert=g.strstart<ce-1?g.strstart:ce-1,K===c?(Se(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Se(g,!1),g.strm.avail_out===0)?ee:J}function Ut(g,K){for(var $,R,H,Z,Te=g.window;;){if(g.lookahead<=ye){if($e(g),g.lookahead<=ye&&K===i)return ee;if(g.lookahead===0)break}if(g.match_length=0,g.lookahead>=ce&&g.strstart>0&&(H=g.strstart-1,R=Te[H],R===Te[++H]&&R===Te[++H]&&R===Te[++H])){Z=g.strstart+ye;do;while(R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&H<Z);g.match_length=ye-(Z-H),g.match_length>g.lookahead&&(g.match_length=g.lookahead)}if(g.match_length>=ce?($=e._tr_tally(g,1,g.match_length-ce),g.lookahead-=g.match_length,g.strstart+=g.match_length,g.match_length=0):($=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++),$&&(Se(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Se(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Se(g,!1),g.strm.avail_out===0)?ee:J}function k(g,K){for(var $;;){if(g.lookahead===0&&($e(g),g.lookahead===0)){if(K===i)return ee;break}if(g.match_length=0,$=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++,$&&(Se(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Se(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Se(g,!1),g.strm.avail_out===0)?ee:J}function m(g,K,$,R,H){this.good_length=g,this.max_lazy=K,this.nice_length=$,this.max_chain=R,this.func=H}var w;w=[new m(0,0,0,0,kt),new m(4,4,8,4,zt),new m(4,5,16,8,zt),new m(4,6,32,32,zt),new m(4,4,16,16,et),new m(8,16,32,32,et),new m(8,16,128,128,et),new m(8,32,128,256,et),new m(32,128,258,1024,et),new m(32,258,258,4096,et)];function O(g){g.window_size=2*g.w_size,Be(g.head),g.max_lazy_match=w[g.level].max_lazy,g.good_match=w[g.level].good_length,g.nice_match=w[g.level].nice_length,g.max_chain_length=w[g.level].max_chain,g.strstart=0,g.block_start=0,g.lookahead=0,g.insert=0,g.match_length=g.prev_length=ce-1,g.match_available=0,g.ins_h=0}function x(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(se*2),this.dyn_dtree=new t.Buf16((2*Q+1)*2),this.bl_tree=new t.Buf16((2*oe+1)*2),Be(this.dyn_ltree),Be(this.dyn_dtree),Be(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(ae+1),this.heap=new t.Buf16(2*Y+1),Be(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*Y+1),Be(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function z(g){var K;return!g||!g.state?te(g,d):(g.total_in=g.total_out=0,g.data_type=I,K=g.state,K.pending=0,K.pending_out=0,K.wrap<0&&(K.wrap=-K.wrap),K.status=K.wrap?me:q,g.adler=K.wrap===2?0:1,K.last_flush=i,e._tr_init(K),u)}function V(g){var K=z(g);return K===u&&O(g.state),K}function ue(g,K){return!g||!g.state||g.state.wrap!==2?d:(g.state.gzhead=K,u)}function G(g,K,$,R,H,Z){if(!g)return d;var Te=1;if(K===y&&(K=6),R<0?(Te=0,R=-R):R>15&&(Te=2,R-=16),H<1||H>B||$!==_||R<8||R>15||K<0||K>9||Z<0||Z>S)return te(g,d);R===8&&(R=9);var be=new x;return g.state=be,be.strm=g,be.wrap=Te,be.gzhead=null,be.w_bits=R,be.w_size=1<<be.w_bits,be.w_mask=be.w_size-1,be.hash_bits=H+7,be.hash_size=1<<be.hash_bits,be.hash_mask=be.hash_size-1,be.hash_shift=~~((be.hash_bits+ce-1)/ce),be.window=new t.Buf8(be.w_size*2),be.head=new t.Buf16(be.hash_size),be.prev=new t.Buf16(be.w_size),be.lit_bufsize=1<<H+6,be.pending_buf_size=be.lit_bufsize*4,be.pending_buf=new t.Buf8(be.pending_buf_size),be.d_buf=1*be.lit_bufsize,be.l_buf=3*be.lit_bufsize,be.level=K,be.strategy=Z,be.method=$,V(g)}function X(g,K){return G(g,K,_,N,F,E)}function T(g,K){var $,R,H,Z;if(!g||!g.state||K>l||K<0)return g?te(g,d):d;if(R=g.state,!g.output||!g.input&&g.avail_in!==0||R.status===W&&K!==c)return te(g,g.avail_out===0?p:d);if(R.strm=g,$=R.last_flush,R.last_flush=K,R.status===me)if(R.wrap===2)g.adler=0,Re(R,31),Re(R,139),Re(R,8),R.gzhead?(Re(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),Re(R,R.gzhead.time&255),Re(R,R.gzhead.time>>8&255),Re(R,R.gzhead.time>>16&255),Re(R,R.gzhead.time>>24&255),Re(R,R.level===9?2:R.strategy>=b||R.level<2?4:0),Re(R,R.gzhead.os&255),R.gzhead.extra&&R.gzhead.extra.length&&(Re(R,R.gzhead.extra.length&255),Re(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(g.adler=r(g.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=Ee):(Re(R,0),Re(R,0),Re(R,0),Re(R,0),Re(R,0),Re(R,R.level===9?2:R.strategy>=b||R.level<2?4:0),Re(R,D),R.status=q);else{var Te=_+(R.w_bits-8<<4)<<8,be=-1;R.strategy>=b||R.level<2?be=0:R.level<6?be=1:R.level===6?be=2:be=3,Te|=be<<6,R.strstart!==0&&(Te|=Ce),Te+=31-Te%31,R.status=q,dt(R,Te),R.strstart!==0&&(dt(R,g.adler>>>16),dt(R,g.adler&65535)),g.adler=1}if(R.status===Ee)if(R.gzhead.extra){for(H=R.pending;R.gzindex<(R.gzhead.extra.length&65535)&&!(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),ve(g),H=R.pending,R.pending===R.pending_buf_size));)Re(R,R.gzhead.extra[R.gzindex]&255),R.gzindex++;R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=De)}else R.status=De;if(R.status===De)if(R.gzhead.name){H=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),ve(g),H=R.pending,R.pending===R.pending_buf_size)){Z=1;break}R.gzindex<R.gzhead.name.length?Z=R.gzhead.name.charCodeAt(R.gzindex++)&255:Z=0,Re(R,Z)}while(Z!==0);R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),Z===0&&(R.gzindex=0,R.status=Ge)}else R.status=Ge;if(R.status===Ge)if(R.gzhead.comment){H=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),ve(g),H=R.pending,R.pending===R.pending_buf_size)){Z=1;break}R.gzindex<R.gzhead.comment.length?Z=R.gzhead.comment.charCodeAt(R.gzindex++)&255:Z=0,Re(R,Z)}while(Z!==0);R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),Z===0&&(R.status=Ve)}else R.status=Ve;if(R.status===Ve&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&ve(g),R.pending+2<=R.pending_buf_size&&(Re(R,g.adler&255),Re(R,g.adler>>8&255),g.adler=0,R.status=q)):R.status=q),R.pending!==0){if(ve(g),g.avail_out===0)return R.last_flush=-1,u}else if(g.avail_in===0&&le(K)<=le($)&&K!==c)return te(g,p);if(R.status===W&&g.avail_in!==0)return te(g,p);if(g.avail_in!==0||R.lookahead!==0||K!==i&&R.status!==W){var xe=R.strategy===b?k(R,K):R.strategy===A?Ut(R,K):w[R.level].func(R,K);if((xe===fe||xe===L)&&(R.status=W),xe===ee||xe===fe)return g.avail_out===0&&(R.last_flush=-1),u;if(xe===J&&(K===s?e._tr_align(R):K!==l&&(e._tr_stored_block(R,0,0,!1),K===a&&(Be(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),ve(g),g.avail_out===0))return R.last_flush=-1,u}return K!==c?u:R.wrap<=0?f:(R.wrap===2?(Re(R,g.adler&255),Re(R,g.adler>>8&255),Re(R,g.adler>>16&255),Re(R,g.adler>>24&255),Re(R,g.total_in&255),Re(R,g.total_in>>8&255),Re(R,g.total_in>>16&255),Re(R,g.total_in>>24&255)):(dt(R,g.adler>>>16),dt(R,g.adler&65535)),ve(g),R.wrap>0&&(R.wrap=-R.wrap),R.pending!==0?u:f)}function re(g){var K;return!g||!g.state?d:(K=g.state.status,K!==me&&K!==Ee&&K!==De&&K!==Ge&&K!==Ve&&K!==q&&K!==W?te(g,d):(g.state=null,K===q?te(g,h):u))}function _e(g,K){var $=K.length,R,H,Z,Te,be,xe,Ue,mn;if(!g||!g.state||(R=g.state,Te=R.wrap,Te===2||Te===1&&R.status!==me||R.lookahead))return d;for(Te===1&&(g.adler=n(g.adler,K,$,0)),R.wrap=0,$>=R.w_size&&(Te===0&&(Be(R.head),R.strstart=0,R.block_start=0,R.insert=0),mn=new t.Buf8(R.w_size),t.arraySet(mn,K,$-R.w_size,R.w_size,0),K=mn,$=R.w_size),be=g.avail_in,xe=g.next_in,Ue=g.input,g.avail_in=$,g.next_in=0,g.input=K,$e(R);R.lookahead>=ce;){H=R.strstart,Z=R.lookahead-(ce-1);do R.ins_h=(R.ins_h<<R.hash_shift^R.window[H+ce-1])&R.hash_mask,R.prev[H&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=H,H++;while(--Z);R.strstart=H,R.lookahead=ce-1,$e(R)}return R.strstart+=R.lookahead,R.block_start=R.strstart,R.insert=R.lookahead,R.lookahead=0,R.match_length=R.prev_length=ce-1,R.match_available=0,g.next_in=xe,g.input=Ue,g.avail_in=be,R.wrap=Te,u}return In.deflateInit=X,In.deflateInit2=G,In.deflateReset=V,In.deflateResetKeep=z,In.deflateSetHeader=ue,In.deflate=T,In.deflateEnd=re,In.deflateSetDictionary=_e,In.deflateInfo="pako deflate (from Nodeca project)",In}var Ti={},R2;function F2(){if(R2)return Ti;R2=1;var t=Nr(),e=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{e=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var r=new t.Buf8(256),o=0;o<256;o++)r[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;r[254]=r[254]=1,Ti.string2buf=function(s){var a,c,l,u,f,d=s.length,h=0;for(u=0;u<d;u++)c=s.charCodeAt(u),(c&64512)===55296&&u+1<d&&(l=s.charCodeAt(u+1),(l&64512)===56320&&(c=65536+(c-55296<<10)+(l-56320),u++)),h+=c<128?1:c<2048?2:c<65536?3:4;for(a=new t.Buf8(h),f=0,u=0;f<h;u++)c=s.charCodeAt(u),(c&64512)===55296&&u+1<d&&(l=s.charCodeAt(u+1),(l&64512)===56320&&(c=65536+(c-55296<<10)+(l-56320),u++)),c<128?a[f++]=c:c<2048?(a[f++]=192|c>>>6,a[f++]=128|c&63):c<65536?(a[f++]=224|c>>>12,a[f++]=128|c>>>6&63,a[f++]=128|c&63):(a[f++]=240|c>>>18,a[f++]=128|c>>>12&63,a[f++]=128|c>>>6&63,a[f++]=128|c&63);return a};function i(s,a){if(a<65534&&(s.subarray&&n||!s.subarray&&e))return String.fromCharCode.apply(null,t.shrinkBuf(s,a));for(var c="",l=0;l<a;l++)c+=String.fromCharCode(s[l]);return c}return Ti.buf2binstring=function(s){return i(s,s.length)},Ti.binstring2buf=function(s){for(var a=new t.Buf8(s.length),c=0,l=a.length;c<l;c++)a[c]=s.charCodeAt(c);return a},Ti.buf2string=function(s,a){var c,l,u,f,d=a||s.length,h=new Array(d*2);for(l=0,c=0;c<d;){if(u=s[c++],u<128){h[l++]=u;continue}if(f=r[u],f>4){h[l++]=65533,c+=f-1;continue}for(u&=f===2?31:f===3?15:7;f>1&&c<d;)u=u<<6|s[c++]&63,f--;if(f>1){h[l++]=65533;continue}u<65536?h[l++]=u:(u-=65536,h[l++]=55296|u>>10&1023,h[l++]=56320|u&1023)}return i(h,l)},Ti.utf8border=function(s,a){var c;for(a=a||s.length,a>s.length&&(a=s.length),c=a-1;c>=0&&(s[c]&192)===128;)c--;return c<0||c===0?a:c+r[s[c]]>a?c:a},Ti}var Dd,M2;function P2(){if(M2)return Dd;M2=1;function t(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return Dd=t,Dd}var L2;function wR(){if(L2)return So;L2=1;var t=bR(),e=Nr(),n=F2(),r=Td(),o=P2(),i=Object.prototype.toString,s=0,a=4,c=0,l=1,u=2,f=-1,d=0,h=8;function p(A){if(!(this instanceof p))return new p(A);this.options=e.assign({level:f,method:h,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},A||{});var S=this.options;S.raw&&S.windowBits>0?S.windowBits=-S.windowBits:S.gzip&&S.windowBits>0&&S.windowBits<16&&(S.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var E=t.deflateInit2(this.strm,S.level,S.method,S.windowBits,S.memLevel,S.strategy);if(E!==c)throw new Error(r[E]);if(S.header&&t.deflateSetHeader(this.strm,S.header),S.dictionary){var I;if(typeof S.dictionary=="string"?I=n.string2buf(S.dictionary):i.call(S.dictionary)==="[object ArrayBuffer]"?I=new Uint8Array(S.dictionary):I=S.dictionary,E=t.deflateSetDictionary(this.strm,I),E!==c)throw new Error(r[E]);this._dict_set=!0}}p.prototype.push=function(A,S){var E=this.strm,I=this.options.chunkSize,_,B;if(this.ended)return!1;B=S===~~S?S:S===!0?a:s,typeof A=="string"?E.input=n.string2buf(A):i.call(A)==="[object ArrayBuffer]"?E.input=new Uint8Array(A):E.input=A,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new e.Buf8(I),E.next_out=0,E.avail_out=I),_=t.deflate(E,B),_!==l&&_!==c)return this.onEnd(_),this.ended=!0,!1;(E.avail_out===0||E.avail_in===0&&(B===a||B===u))&&(this.options.to==="string"?this.onData(n.buf2binstring(e.shrinkBuf(E.output,E.next_out))):this.onData(e.shrinkBuf(E.output,E.next_out)))}while((E.avail_in>0||E.avail_out===0)&&_!==l);return B===a?(_=t.deflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===c):(B===u&&(this.onEnd(c),E.avail_out=0),!0)},p.prototype.onData=function(A){this.chunks.push(A)},p.prototype.onEnd=function(A){A===c&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};function y(A,S){var E=new p(S);if(E.push(A,!0),E.err)throw E.msg||r[E.err];return E.result}function v(A,S){return S=S||{},S.raw=!0,y(A,S)}function b(A,S){return S=S||{},S.gzip=!0,y(A,S)}return So.Deflate=p,So.deflate=y,So.deflateRaw=v,So.gzip=b,So}var Co={},fn={},Bd,O2;function xR(){if(O2)return Bd;O2=1;var t=30,e=12;return Bd=function(r,o){var i,s,a,c,l,u,f,d,h,p,y,v,b,A,S,E,I,_,B,N,F,M,C,Y,Q;i=r.state,s=r.next_in,Y=r.input,a=s+(r.avail_in-5),c=r.next_out,Q=r.output,l=c-(o-r.avail_out),u=c+(r.avail_out-257),f=i.dmax,d=i.wsize,h=i.whave,p=i.wnext,y=i.window,v=i.hold,b=i.bits,A=i.lencode,S=i.distcode,E=(1<<i.lenbits)-1,I=(1<<i.distbits)-1;e:do{b<15&&(v+=Y[s++]<<b,b+=8,v+=Y[s++]<<b,b+=8),_=A[v&E];t:for(;;){if(B=_>>>24,v>>>=B,b-=B,B=_>>>16&255,B===0)Q[c++]=_&65535;else if(B&16){N=_&65535,B&=15,B&&(b<B&&(v+=Y[s++]<<b,b+=8),N+=v&(1<<B)-1,v>>>=B,b-=B),b<15&&(v+=Y[s++]<<b,b+=8,v+=Y[s++]<<b,b+=8),_=S[v&I];n:for(;;){if(B=_>>>24,v>>>=B,b-=B,B=_>>>16&255,B&16){if(F=_&65535,B&=15,b<B&&(v+=Y[s++]<<b,b+=8,b<B&&(v+=Y[s++]<<b,b+=8)),F+=v&(1<<B)-1,F>f){r.msg="invalid distance too far back",i.mode=t;break e}if(v>>>=B,b-=B,B=c-l,F>B){if(B=F-B,B>h&&i.sane){r.msg="invalid distance too far back",i.mode=t;break e}if(M=0,C=y,p===0){if(M+=d-B,B<N){N-=B;do Q[c++]=y[M++];while(--B);M=c-F,C=Q}}else if(p<B){if(M+=d+p-B,B-=p,B<N){N-=B;do Q[c++]=y[M++];while(--B);if(M=0,p<N){B=p,N-=B;do Q[c++]=y[M++];while(--B);M=c-F,C=Q}}}else if(M+=p-B,B<N){N-=B;do Q[c++]=y[M++];while(--B);M=c-F,C=Q}for(;N>2;)Q[c++]=C[M++],Q[c++]=C[M++],Q[c++]=C[M++],N-=3;N&&(Q[c++]=C[M++],N>1&&(Q[c++]=C[M++]))}else{M=c-F;do Q[c++]=Q[M++],Q[c++]=Q[M++],Q[c++]=Q[M++],N-=3;while(N>2);N&&(Q[c++]=Q[M++],N>1&&(Q[c++]=Q[M++]))}}else if(B&64){r.msg="invalid distance code",i.mode=t;break e}else{_=S[(_&65535)+(v&(1<<B)-1)];continue n}break}}else if(B&64)if(B&32){i.mode=e;break e}else{r.msg="invalid literal/length code",i.mode=t;break e}else{_=A[(_&65535)+(v&(1<<B)-1)];continue t}break}}while(s<a&&c<u);N=b>>3,s-=N,b-=N<<3,v&=(1<<b)-1,r.next_in=s,r.next_out=c,r.avail_in=s<a?5+(a-s):5-(s-a),r.avail_out=c<u?257+(u-c):257-(c-u),i.hold=v,i.bits=b},Bd}var kd,N2;function vR(){if(N2)return kd;N2=1;var t=Nr(),e=15,n=852,r=592,o=0,i=1,s=2,a=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],c=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];return kd=function(d,h,p,y,v,b,A,S){var E=S.bits,I=0,_=0,B=0,N=0,F=0,M=0,C=0,Y=0,Q=0,oe=0,se,ae,ce,ye,de,Ce=null,me=0,Ee,De=new t.Buf16(e+1),Ge=new t.Buf16(e+1),Ve=null,q=0,W,ee,J;for(I=0;I<=e;I++)De[I]=0;for(_=0;_<y;_++)De[h[p+_]]++;for(F=E,N=e;N>=1&&De[N]===0;N--);if(F>N&&(F=N),N===0)return v[b++]=1<<24|64<<16|0,v[b++]=1<<24|64<<16|0,S.bits=1,0;for(B=1;B<N&&De[B]===0;B++);for(F<B&&(F=B),Y=1,I=1;I<=e;I++)if(Y<<=1,Y-=De[I],Y<0)return-1;if(Y>0&&(d===o||N!==1))return-1;for(Ge[1]=0,I=1;I<e;I++)Ge[I+1]=Ge[I]+De[I];for(_=0;_<y;_++)h[p+_]!==0&&(A[Ge[h[p+_]]++]=_);if(d===o?(Ce=Ve=A,Ee=19):d===i?(Ce=a,me-=257,Ve=c,q-=257,Ee=256):(Ce=l,Ve=u,Ee=-1),oe=0,_=0,I=B,de=b,M=F,C=0,ce=-1,Q=1<<F,ye=Q-1,d===i&&Q>n||d===s&&Q>r)return 1;for(;;){W=I-C,A[_]<Ee?(ee=0,J=A[_]):A[_]>Ee?(ee=Ve[q+A[_]],J=Ce[me+A[_]]):(ee=96,J=0),se=1<<I-C,ae=1<<M,B=ae;do ae-=se,v[de+(oe>>C)+ae]=W<<24|ee<<16|J|0;while(ae!==0);for(se=1<<I-1;oe&se;)se>>=1;if(se!==0?(oe&=se-1,oe+=se):oe=0,_++,--De[I]===0){if(I===N)break;I=h[p+A[_]]}if(I>F&&(oe&ye)!==ce){for(C===0&&(C=F),de+=B,M=I-C,Y=1<<M;M+C<N&&(Y-=De[M+C],!(Y<=0));)M++,Y<<=1;if(Q+=1<<M,d===i&&Q>n||d===s&&Q>r)return 1;ce=oe&ye,v[ce]=F<<24|M<<16|de-b|0}}return oe!==0&&(v[de+oe]=I-C<<24|64<<16|0),S.bits=F,0},kd}var z2;function AR(){if(z2)return fn;z2=1;var t=Nr(),e=T2(),n=B2(),r=xR(),o=vR(),i=0,s=1,a=2,c=4,l=5,u=6,f=0,d=1,h=2,p=-2,y=-3,v=-4,b=-5,A=8,S=1,E=2,I=3,_=4,B=5,N=6,F=7,M=8,C=9,Y=10,Q=11,oe=12,se=13,ae=14,ce=15,ye=16,de=17,Ce=18,me=19,Ee=20,De=21,Ge=22,Ve=23,q=24,W=25,ee=26,J=27,fe=28,L=29,D=30,te=31,le=32,Be=852,ve=592,Se=15,Re=Se;function dt(G){return(G>>>24&255)+(G>>>8&65280)+((G&65280)<<8)+((G&255)<<24)}function Jt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function It(G){var X;return!G||!G.state?p:(X=G.state,G.total_in=G.total_out=X.total=0,G.msg="",X.wrap&&(G.adler=X.wrap&1),X.mode=S,X.last=0,X.havedict=0,X.dmax=32768,X.head=null,X.hold=0,X.bits=0,X.lencode=X.lendyn=new t.Buf32(Be),X.distcode=X.distdyn=new t.Buf32(ve),X.sane=1,X.back=-1,f)}function $e(G){var X;return!G||!G.state?p:(X=G.state,X.wsize=0,X.whave=0,X.wnext=0,It(G))}function kt(G,X){var T,re;return!G||!G.state||(re=G.state,X<0?(T=0,X=-X):(T=(X>>4)+1,X<48&&(X&=15)),X&&(X<8||X>15))?p:(re.window!==null&&re.wbits!==X&&(re.window=null),re.wrap=T,re.wbits=X,$e(G))}function zt(G,X){var T,re;return G?(re=new Jt,G.state=re,re.window=null,T=kt(G,X),T!==f&&(G.state=null),T):p}function et(G){return zt(G,Re)}var Ut=!0,k,m;function w(G){if(Ut){var X;for(k=new t.Buf32(512),m=new t.Buf32(32),X=0;X<144;)G.lens[X++]=8;for(;X<256;)G.lens[X++]=9;for(;X<280;)G.lens[X++]=7;for(;X<288;)G.lens[X++]=8;for(o(s,G.lens,0,288,k,0,G.work,{bits:9}),X=0;X<32;)G.lens[X++]=5;o(a,G.lens,0,32,m,0,G.work,{bits:5}),Ut=!1}G.lencode=k,G.lenbits=9,G.distcode=m,G.distbits=5}function O(G,X,T,re){var _e,g=G.state;return g.window===null&&(g.wsize=1<<g.wbits,g.wnext=0,g.whave=0,g.window=new t.Buf8(g.wsize)),re>=g.wsize?(t.arraySet(g.window,X,T-g.wsize,g.wsize,0),g.wnext=0,g.whave=g.wsize):(_e=g.wsize-g.wnext,_e>re&&(_e=re),t.arraySet(g.window,X,T-re,_e,g.wnext),re-=_e,re?(t.arraySet(g.window,X,T-re,re,0),g.wnext=re,g.whave=g.wsize):(g.wnext+=_e,g.wnext===g.wsize&&(g.wnext=0),g.whave<g.wsize&&(g.whave+=_e))),0}function x(G,X){var T,re,_e,g,K,$,R,H,Z,Te,be,xe,Ue,mn,U=0,Me,lt,tt,Tt,ke,lr,ft,Ne,ht=new t.Buf8(4),kn,rn,hc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!G||!G.state||!G.output||!G.input&&G.avail_in!==0)return p;T=G.state,T.mode===oe&&(T.mode=se),K=G.next_out,_e=G.output,R=G.avail_out,g=G.next_in,re=G.input,$=G.avail_in,H=T.hold,Z=T.bits,Te=$,be=R,Ne=f;e:for(;;)switch(T.mode){case S:if(T.wrap===0){T.mode=se;break}for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(T.wrap&2&&H===35615){T.check=0,ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0),H=0,Z=0,T.mode=E;break}if(T.flags=0,T.head&&(T.head.done=!1),!(T.wrap&1)||(((H&255)<<8)+(H>>8))%31){G.msg="incorrect header check",T.mode=D;break}if((H&15)!==A){G.msg="unknown compression method",T.mode=D;break}if(H>>>=4,Z-=4,ft=(H&15)+8,T.wbits===0)T.wbits=ft;else if(ft>T.wbits){G.msg="invalid window size",T.mode=D;break}T.dmax=1<<ft,G.adler=T.check=1,T.mode=H&512?Y:oe,H=0,Z=0;break;case E:for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(T.flags=H,(T.flags&255)!==A){G.msg="unknown compression method",T.mode=D;break}if(T.flags&57344){G.msg="unknown header flags set",T.mode=D;break}T.head&&(T.head.text=H>>8&1),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,Z=0,T.mode=I;case I:for(;Z<32;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.head&&(T.head.time=H),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,ht[2]=H>>>16&255,ht[3]=H>>>24&255,T.check=n(T.check,ht,4,0)),H=0,Z=0,T.mode=_;case _:for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.head&&(T.head.xflags=H&255,T.head.os=H>>8),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,Z=0,T.mode=B;case B:if(T.flags&1024){for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.length=H,T.head&&(T.head.extra_len=H),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,Z=0}else T.head&&(T.head.extra=null);T.mode=N;case N:if(T.flags&1024&&(xe=T.length,xe>$&&(xe=$),xe&&(T.head&&(ft=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),t.arraySet(T.head.extra,re,g,xe,ft)),T.flags&512&&(T.check=n(T.check,re,xe,g)),$-=xe,g+=xe,T.length-=xe),T.length))break e;T.length=0,T.mode=F;case F:if(T.flags&2048){if($===0)break e;xe=0;do ft=re[g+xe++],T.head&&ft&&T.length<65536&&(T.head.name+=String.fromCharCode(ft));while(ft&&xe<$);if(T.flags&512&&(T.check=n(T.check,re,xe,g)),$-=xe,g+=xe,ft)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=M;case M:if(T.flags&4096){if($===0)break e;xe=0;do ft=re[g+xe++],T.head&&ft&&T.length<65536&&(T.head.comment+=String.fromCharCode(ft));while(ft&&xe<$);if(T.flags&512&&(T.check=n(T.check,re,xe,g)),$-=xe,g+=xe,ft)break e}else T.head&&(T.head.comment=null);T.mode=C;case C:if(T.flags&512){for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(H!==(T.check&65535)){G.msg="header crc mismatch",T.mode=D;break}H=0,Z=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),G.adler=T.check=0,T.mode=oe;break;case Y:for(;Z<32;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}G.adler=T.check=dt(H),H=0,Z=0,T.mode=Q;case Q:if(T.havedict===0)return G.next_out=K,G.avail_out=R,G.next_in=g,G.avail_in=$,T.hold=H,T.bits=Z,h;G.adler=T.check=1,T.mode=oe;case oe:if(X===l||X===u)break e;case se:if(T.last){H>>>=Z&7,Z-=Z&7,T.mode=J;break}for(;Z<3;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}switch(T.last=H&1,H>>>=1,Z-=1,H&3){case 0:T.mode=ae;break;case 1:if(w(T),T.mode=Ee,X===u){H>>>=2,Z-=2;break e}break;case 2:T.mode=de;break;case 3:G.msg="invalid block type",T.mode=D}H>>>=2,Z-=2;break;case ae:for(H>>>=Z&7,Z-=Z&7;Z<32;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if((H&65535)!==(H>>>16^65535)){G.msg="invalid stored block lengths",T.mode=D;break}if(T.length=H&65535,H=0,Z=0,T.mode=ce,X===u)break e;case ce:T.mode=ye;case ye:if(xe=T.length,xe){if(xe>$&&(xe=$),xe>R&&(xe=R),xe===0)break e;t.arraySet(_e,re,g,xe,K),$-=xe,g+=xe,R-=xe,K+=xe,T.length-=xe;break}T.mode=oe;break;case de:for(;Z<14;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(T.nlen=(H&31)+257,H>>>=5,Z-=5,T.ndist=(H&31)+1,H>>>=5,Z-=5,T.ncode=(H&15)+4,H>>>=4,Z-=4,T.nlen>286||T.ndist>30){G.msg="too many length or distance symbols",T.mode=D;break}T.have=0,T.mode=Ce;case Ce:for(;T.have<T.ncode;){for(;Z<3;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.lens[hc[T.have++]]=H&7,H>>>=3,Z-=3}for(;T.have<19;)T.lens[hc[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,kn={bits:T.lenbits},Ne=o(i,T.lens,0,19,T.lencode,0,T.work,kn),T.lenbits=kn.bits,Ne){G.msg="invalid code lengths set",T.mode=D;break}T.have=0,T.mode=me;case me:for(;T.have<T.nlen+T.ndist;){for(;U=T.lencode[H&(1<<T.lenbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(tt<16)H>>>=Me,Z-=Me,T.lens[T.have++]=tt;else{if(tt===16){for(rn=Me+2;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(H>>>=Me,Z-=Me,T.have===0){G.msg="invalid bit length repeat",T.mode=D;break}ft=T.lens[T.have-1],xe=3+(H&3),H>>>=2,Z-=2}else if(tt===17){for(rn=Me+3;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Me,Z-=Me,ft=0,xe=3+(H&7),H>>>=3,Z-=3}else{for(rn=Me+7;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Me,Z-=Me,ft=0,xe=11+(H&127),H>>>=7,Z-=7}if(T.have+xe>T.nlen+T.ndist){G.msg="invalid bit length repeat",T.mode=D;break}for(;xe--;)T.lens[T.have++]=ft}}if(T.mode===D)break;if(T.lens[256]===0){G.msg="invalid code -- missing end-of-block",T.mode=D;break}if(T.lenbits=9,kn={bits:T.lenbits},Ne=o(s,T.lens,0,T.nlen,T.lencode,0,T.work,kn),T.lenbits=kn.bits,Ne){G.msg="invalid literal/lengths set",T.mode=D;break}if(T.distbits=6,T.distcode=T.distdyn,kn={bits:T.distbits},Ne=o(a,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,kn),T.distbits=kn.bits,Ne){G.msg="invalid distances set",T.mode=D;break}if(T.mode=Ee,X===u)break e;case Ee:T.mode=De;case De:if($>=6&&R>=258){G.next_out=K,G.avail_out=R,G.next_in=g,G.avail_in=$,T.hold=H,T.bits=Z,r(G,be),K=G.next_out,_e=G.output,R=G.avail_out,g=G.next_in,re=G.input,$=G.avail_in,H=T.hold,Z=T.bits,T.mode===oe&&(T.back=-1);break}for(T.back=0;U=T.lencode[H&(1<<T.lenbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(lt&&!(lt&240)){for(Tt=Me,ke=lt,lr=tt;U=T.lencode[lr+((H&(1<<Tt+ke)-1)>>Tt)],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Tt+Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Tt,Z-=Tt,T.back+=Tt}if(H>>>=Me,Z-=Me,T.back+=Me,T.length=tt,lt===0){T.mode=ee;break}if(lt&32){T.back=-1,T.mode=oe;break}if(lt&64){G.msg="invalid literal/length code",T.mode=D;break}T.extra=lt&15,T.mode=Ge;case Ge:if(T.extra){for(rn=T.extra;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.length+=H&(1<<T.extra)-1,H>>>=T.extra,Z-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=Ve;case Ve:for(;U=T.distcode[H&(1<<T.distbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(!(lt&240)){for(Tt=Me,ke=lt,lr=tt;U=T.distcode[lr+((H&(1<<Tt+ke)-1)>>Tt)],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Tt+Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Tt,Z-=Tt,T.back+=Tt}if(H>>>=Me,Z-=Me,T.back+=Me,lt&64){G.msg="invalid distance code",T.mode=D;break}T.offset=tt,T.extra=lt&15,T.mode=q;case q:if(T.extra){for(rn=T.extra;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.offset+=H&(1<<T.extra)-1,H>>>=T.extra,Z-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){G.msg="invalid distance too far back",T.mode=D;break}T.mode=W;case W:if(R===0)break e;if(xe=be-R,T.offset>xe){if(xe=T.offset-xe,xe>T.whave&&T.sane){G.msg="invalid distance too far back",T.mode=D;break}xe>T.wnext?(xe-=T.wnext,Ue=T.wsize-xe):Ue=T.wnext-xe,xe>T.length&&(xe=T.length),mn=T.window}else mn=_e,Ue=K-T.offset,xe=T.length;xe>R&&(xe=R),R-=xe,T.length-=xe;do _e[K++]=mn[Ue++];while(--xe);T.length===0&&(T.mode=De);break;case ee:if(R===0)break e;_e[K++]=T.length,R--,T.mode=De;break;case J:if(T.wrap){for(;Z<32;){if($===0)break e;$--,H|=re[g++]<<Z,Z+=8}if(be-=R,G.total_out+=be,T.total+=be,be&&(G.adler=T.check=T.flags?n(T.check,_e,be,K-be):e(T.check,_e,be,K-be)),be=R,(T.flags?H:dt(H))!==T.check){G.msg="incorrect data check",T.mode=D;break}H=0,Z=0}T.mode=fe;case fe:if(T.wrap&&T.flags){for(;Z<32;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(H!==(T.total&4294967295)){G.msg="incorrect length check",T.mode=D;break}H=0,Z=0}T.mode=L;case L:Ne=d;break e;case D:Ne=y;break e;case te:return v;case le:default:return p}return G.next_out=K,G.avail_out=R,G.next_in=g,G.avail_in=$,T.hold=H,T.bits=Z,(T.wsize||be!==G.avail_out&&T.mode<D&&(T.mode<J||X!==c))&&O(G,G.output,G.next_out,be-G.avail_out),Te-=G.avail_in,be-=G.avail_out,G.total_in+=Te,G.total_out+=be,T.total+=be,T.wrap&&be&&(G.adler=T.check=T.flags?n(T.check,_e,be,G.next_out-be):e(T.check,_e,be,G.next_out-be)),G.data_type=T.bits+(T.last?64:0)+(T.mode===oe?128:0)+(T.mode===Ee||T.mode===ce?256:0),(Te===0&&be===0||X===c)&&Ne===f&&(Ne=b),Ne}function z(G){if(!G||!G.state)return p;var X=G.state;return X.window&&(X.window=null),G.state=null,f}function V(G,X){var T;return!G||!G.state||(T=G.state,!(T.wrap&2))?p:(T.head=X,X.done=!1,f)}function ue(G,X){var T=X.length,re,_e,g;return!G||!G.state||(re=G.state,re.wrap!==0&&re.mode!==Q)?p:re.mode===Q&&(_e=1,_e=e(_e,X,T,0),_e!==re.check)?y:(g=O(G,X,T,T),g?(re.mode=te,v):(re.havedict=1,f))}return fn.inflateReset=$e,fn.inflateReset2=kt,fn.inflateResetKeep=It,fn.inflateInit=et,fn.inflateInit2=zt,fn.inflate=x,fn.inflateEnd=z,fn.inflateGetHeader=V,fn.inflateSetDictionary=ue,fn.inflateInfo="pako inflate (from Nodeca project)",fn}var _d,U2;function G2(){return U2||(U2=1,_d={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),_d}var Rd,H2;function ER(){if(H2)return Rd;H2=1;function t(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}return Rd=t,Rd}var V2;function SR(){if(V2)return Co;V2=1;var t=AR(),e=Nr(),n=F2(),r=G2(),o=Td(),i=P2(),s=ER(),a=Object.prototype.toString;function c(f){if(!(this instanceof c))return new c(f);this.options=e.assign({chunkSize:16384,windowBits:0,to:""},f||{});var d=this.options;d.raw&&d.windowBits>=0&&d.windowBits<16&&(d.windowBits=-d.windowBits,d.windowBits===0&&(d.windowBits=-15)),d.windowBits>=0&&d.windowBits<16&&!(f&&f.windowBits)&&(d.windowBits+=32),d.windowBits>15&&d.windowBits<48&&(d.windowBits&15||(d.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var h=t.inflateInit2(this.strm,d.windowBits);if(h!==r.Z_OK)throw new Error(o[h]);if(this.header=new s,t.inflateGetHeader(this.strm,this.header),d.dictionary&&(typeof d.dictionary=="string"?d.dictionary=n.string2buf(d.dictionary):a.call(d.dictionary)==="[object ArrayBuffer]"&&(d.dictionary=new Uint8Array(d.dictionary)),d.raw&&(h=t.inflateSetDictionary(this.strm,d.dictionary),h!==r.Z_OK)))throw new Error(o[h])}c.prototype.push=function(f,d){var h=this.strm,p=this.options.chunkSize,y=this.options.dictionary,v,b,A,S,E,I=!1;if(this.ended)return!1;b=d===~~d?d:d===!0?r.Z_FINISH:r.Z_NO_FLUSH,typeof f=="string"?h.input=n.binstring2buf(f):a.call(f)==="[object ArrayBuffer]"?h.input=new Uint8Array(f):h.input=f,h.next_in=0,h.avail_in=h.input.length;do{if(h.avail_out===0&&(h.output=new e.Buf8(p),h.next_out=0,h.avail_out=p),v=t.inflate(h,r.Z_NO_FLUSH),v===r.Z_NEED_DICT&&y&&(v=t.inflateSetDictionary(this.strm,y)),v===r.Z_BUF_ERROR&&I===!0&&(v=r.Z_OK,I=!1),v!==r.Z_STREAM_END&&v!==r.Z_OK)return this.onEnd(v),this.ended=!0,!1;h.next_out&&(h.avail_out===0||v===r.Z_STREAM_END||h.avail_in===0&&(b===r.Z_FINISH||b===r.Z_SYNC_FLUSH))&&(this.options.to==="string"?(A=n.utf8border(h.output,h.next_out),S=h.next_out-A,E=n.buf2string(h.output,A),h.next_out=S,h.avail_out=p-S,S&&e.arraySet(h.output,h.output,A,S,0),this.onData(E)):this.onData(e.shrinkBuf(h.output,h.next_out))),h.avail_in===0&&h.avail_out===0&&(I=!0)}while((h.avail_in>0||h.avail_out===0)&&v!==r.Z_STREAM_END);return v===r.Z_STREAM_END&&(b=r.Z_FINISH),b===r.Z_FINISH?(v=t.inflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===r.Z_OK):(b===r.Z_SYNC_FLUSH&&(this.onEnd(r.Z_OK),h.avail_out=0),!0)},c.prototype.onData=function(f){this.chunks.push(f)},c.prototype.onEnd=function(f){f===r.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg};function l(f,d){var h=new c(d);if(h.push(f,!0),h.err)throw h.msg||o[h.err];return h.result}function u(f,d){return d=d||{},d.raw=!0,l(f,d)}return Co.Inflate=c,Co.inflate=l,Co.inflateRaw=u,Co.ungzip=l,Co}var Fd,j2;function CR(){if(j2)return Fd;j2=1;var t=Nr().assign,e=wR(),n=SR(),r=G2(),o={};return t(o,e,n,r),Fd=o,Fd}var Jl=CR();async function zr(t){try{let e,n=0,r=0;const o=[];let i=0,s;do{const c=t.subarray(n);if(s=new Jl.Inflate,{strm:e}=s,s.push(c,Jl.Z_SYNC_FLUSH),s.err)throw new Error(s.msg);n+=e.next_in,o[r]=s.result,i+=o[r].length,r+=1}while(e.avail_in);const a=new Uint8Array(i);for(let c=0,l=0;c<o.length;c++)a.set(o[c],l),l+=o[c].length;return Ke.Buffer.from(a)}catch(e){throw/incorrect header check/.exec(`${e}`)?new Error("problem decompressing block: incorrect gzip header check"):e}}async function q2(t,e){try{let n;const{minv:r,maxv:o}=e;let i=r.blockPosition,s=r.dataPosition;const a=[],c=[],l=[];let u=0,f=0;do{const p=t.subarray(i-r.blockPosition),y=new Jl.Inflate;if({strm:n}=y,y.push(p,Jl.Z_SYNC_FLUSH),y.err)throw new Error(y.msg);const v=y.result;a.push(v);let b=v.length;c.push(i),l.push(s),a.length===1&&r.dataPosition&&(a[0]=a[0].subarray(r.dataPosition),b=a[0].length);const A=i;if(i+=n.next_in,s+=b,A>=o.blockPosition){a[f]=a[f].subarray(0,o.blockPosition===r.blockPosition?o.dataPosition-r.dataPosition+1:o.dataPosition+1),c.push(i),l.push(s),u+=a[f].length;break}u+=a[f].length,f++}while(n.avail_in);const d=new Uint8Array(u);for(let p=0,y=0;p<a.length;p++)d.set(a[p],y),y+=a[p].length;return{buffer:Ke.Buffer.from(d),cpositions:c,dpositions:l}}catch(n){throw/incorrect header check/.exec(`${n}`)?new Error("problem decompressing block: incorrect gzip header check"):n}}var Md,W2;function IR(){if(W2)return Md;W2=1,Md=e;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function e(M,C,Y){this.low=M|0,this.high=C|0,this.unsigned=!!Y}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0});function n(M){return(M&&M.__isLong__)===!0}e.isLong=n;var r={},o={};function i(M,C){var Y,Q,oe;return C?(M>>>=0,(oe=0<=M&&M<256)&&(Q=o[M],Q)?Q:(Y=a(M,(M|0)<0?-1:0,!0),oe&&(o[M]=Y),Y)):(M|=0,(oe=-128<=M&&M<128)&&(Q=r[M],Q)?Q:(Y=a(M,M<0?-1:0,!1),oe&&(r[M]=Y),Y))}e.fromInt=i;function s(M,C){if(isNaN(M))return C?A:b;if(C){if(M<0)return A;if(M>=p)return B}else{if(M<=-9223372036854776e3)return N;if(M+1>=y)return _}return M<0?s(-M,C).neg():a(M%h|0,M/h|0,C)}e.fromNumber=s;function a(M,C,Y){return new e(M,C,Y)}e.fromBits=a;var c=Math.pow;function l(M,C,Y){if(M.length===0)throw Error("empty string");if(M==="NaN"||M==="Infinity"||M==="+Infinity"||M==="-Infinity")return b;if(typeof C=="number"?(Y=C,C=!1):C=!!C,Y=Y||10,Y<2||36<Y)throw RangeError("radix");var Q;if((Q=M.indexOf("-"))>0)throw Error("interior hyphen");if(Q===0)return l(M.substring(1),C,Y).neg();for(var oe=s(c(Y,8)),se=b,ae=0;ae<M.length;ae+=8){var ce=Math.min(8,M.length-ae),ye=parseInt(M.substring(ae,ae+ce),Y);if(ce<8){var de=s(c(Y,ce));se=se.mul(de).add(s(ye))}else se=se.mul(oe),se=se.add(s(ye))}return se.unsigned=C,se}e.fromString=l;function u(M,C){return typeof M=="number"?s(M,C):typeof M=="string"?l(M,C):a(M.low,M.high,typeof C=="boolean"?C:M.unsigned)}e.fromValue=u;var f=65536,d=1<<24,h=f*f,p=h*h,y=p/2,v=i(d),b=i(0);e.ZERO=b;var A=i(0,!0);e.UZERO=A;var S=i(1);e.ONE=S;var E=i(1,!0);e.UONE=E;var I=i(-1);e.NEG_ONE=I;var _=a(-1,2147483647,!1);e.MAX_VALUE=_;var B=a(-1,-1,!0);e.MAX_UNSIGNED_VALUE=B;var N=a(0,-2147483648,!1);e.MIN_VALUE=N;var F=e.prototype;return F.toInt=function(){return this.unsigned?this.low>>>0:this.low},F.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},F.toString=function(C){if(C=C||10,C<2||36<C)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(N)){var Y=s(C),Q=this.div(Y),oe=Q.mul(Y).sub(this);return Q.toString(C)+oe.toInt().toString(C)}else return"-"+this.neg().toString(C);for(var se=s(c(C,6),this.unsigned),ae=this,ce="";;){var ye=ae.div(se),de=ae.sub(ye.mul(se)).toInt()>>>0,Ce=de.toString(C);if(ae=ye,ae.isZero())return Ce+ce;for(;Ce.length<6;)Ce="0"+Ce;ce=""+Ce+ce}},F.getHighBits=function(){return this.high},F.getHighBitsUnsigned=function(){return this.high>>>0},F.getLowBits=function(){return this.low},F.getLowBitsUnsigned=function(){return this.low>>>0},F.getNumBitsAbs=function(){if(this.isNegative())return this.eq(N)?64:this.neg().getNumBitsAbs();for(var C=this.high!=0?this.high:this.low,Y=31;Y>0&&!(C&1<<Y);Y--);return this.high!=0?Y+33:Y+1},F.isZero=function(){return this.high===0&&this.low===0},F.eqz=F.isZero,F.isNegative=function(){return!this.unsigned&&this.high<0},F.isPositive=function(){return this.unsigned||this.high>=0},F.isOdd=function(){return(this.low&1)===1},F.isEven=function(){return(this.low&1)===0},F.equals=function(C){return n(C)||(C=u(C)),this.unsigned!==C.unsigned&&this.high>>>31===1&&C.high>>>31===1?!1:this.high===C.high&&this.low===C.low},F.eq=F.equals,F.notEquals=function(C){return!this.eq(C)},F.neq=F.notEquals,F.ne=F.notEquals,F.lessThan=function(C){return this.comp(C)<0},F.lt=F.lessThan,F.lessThanOrEqual=function(C){return this.comp(C)<=0},F.lte=F.lessThanOrEqual,F.le=F.lessThanOrEqual,F.greaterThan=function(C){return this.comp(C)>0},F.gt=F.greaterThan,F.greaterThanOrEqual=function(C){return this.comp(C)>=0},F.gte=F.greaterThanOrEqual,F.ge=F.greaterThanOrEqual,F.compare=function(C){if(n(C)||(C=u(C)),this.eq(C))return 0;var Y=this.isNegative(),Q=C.isNegative();return Y&&!Q?-1:!Y&&Q?1:this.unsigned?C.high>>>0>this.high>>>0||C.high===this.high&&C.low>>>0>this.low>>>0?-1:1:this.sub(C).isNegative()?-1:1},F.comp=F.compare,F.negate=function(){return!this.unsigned&&this.eq(N)?N:this.not().add(S)},F.neg=F.negate,F.add=function(C){n(C)||(C=u(C));var Y=this.high>>>16,Q=this.high&65535,oe=this.low>>>16,se=this.low&65535,ae=C.high>>>16,ce=C.high&65535,ye=C.low>>>16,de=C.low&65535,Ce=0,me=0,Ee=0,De=0;return De+=se+de,Ee+=De>>>16,De&=65535,Ee+=oe+ye,me+=Ee>>>16,Ee&=65535,me+=Q+ce,Ce+=me>>>16,me&=65535,Ce+=Y+ae,Ce&=65535,a(Ee<<16|De,Ce<<16|me,this.unsigned)},F.subtract=function(C){return n(C)||(C=u(C)),this.add(C.neg())},F.sub=F.subtract,F.multiply=function(C){if(this.isZero())return b;if(n(C)||(C=u(C)),t){var Y=t.mul(this.low,this.high,C.low,C.high);return a(Y,t.get_high(),this.unsigned)}if(C.isZero())return b;if(this.eq(N))return C.isOdd()?N:b;if(C.eq(N))return this.isOdd()?N:b;if(this.isNegative())return C.isNegative()?this.neg().mul(C.neg()):this.neg().mul(C).neg();if(C.isNegative())return this.mul(C.neg()).neg();if(this.lt(v)&&C.lt(v))return s(this.toNumber()*C.toNumber(),this.unsigned);var Q=this.high>>>16,oe=this.high&65535,se=this.low>>>16,ae=this.low&65535,ce=C.high>>>16,ye=C.high&65535,de=C.low>>>16,Ce=C.low&65535,me=0,Ee=0,De=0,Ge=0;return Ge+=ae*Ce,De+=Ge>>>16,Ge&=65535,De+=se*Ce,Ee+=De>>>16,De&=65535,De+=ae*de,Ee+=De>>>16,De&=65535,Ee+=oe*Ce,me+=Ee>>>16,Ee&=65535,Ee+=se*de,me+=Ee>>>16,Ee&=65535,Ee+=ae*ye,me+=Ee>>>16,Ee&=65535,me+=Q*Ce+oe*de+se*ye+ae*ce,me&=65535,a(De<<16|Ge,me<<16|Ee,this.unsigned)},F.mul=F.multiply,F.divide=function(C){if(n(C)||(C=u(C)),C.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&C.low===-1&&C.high===-1)return this;var Y=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,C.low,C.high);return a(Y,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?A:b;var Q,oe,se;if(this.unsigned){if(C.unsigned||(C=C.toUnsigned()),C.gt(this))return A;if(C.gt(this.shru(1)))return E;se=A}else{if(this.eq(N)){if(C.eq(S)||C.eq(I))return N;if(C.eq(N))return S;var ae=this.shr(1);return Q=ae.div(C).shl(1),Q.eq(b)?C.isNegative()?S:I:(oe=this.sub(C.mul(Q)),se=Q.add(oe.div(C)),se)}else if(C.eq(N))return this.unsigned?A:b;if(this.isNegative())return C.isNegative()?this.neg().div(C.neg()):this.neg().div(C).neg();if(C.isNegative())return this.div(C.neg()).neg();se=b}for(oe=this;oe.gte(C);){Q=Math.max(1,Math.floor(oe.toNumber()/C.toNumber()));for(var ce=Math.ceil(Math.log(Q)/Math.LN2),ye=ce<=48?1:c(2,ce-48),de=s(Q),Ce=de.mul(C);Ce.isNegative()||Ce.gt(oe);)Q-=ye,de=s(Q,this.unsigned),Ce=de.mul(C);de.isZero()&&(de=S),se=se.add(de),oe=oe.sub(Ce)}return se},F.div=F.divide,F.modulo=function(C){if(n(C)||(C=u(C)),t){var Y=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,C.low,C.high);return a(Y,t.get_high(),this.unsigned)}return this.sub(this.div(C).mul(C))},F.mod=F.modulo,F.rem=F.modulo,F.not=function(){return a(~this.low,~this.high,this.unsigned)},F.and=function(C){return n(C)||(C=u(C)),a(this.low&C.low,this.high&C.high,this.unsigned)},F.or=function(C){return n(C)||(C=u(C)),a(this.low|C.low,this.high|C.high,this.unsigned)},F.xor=function(C){return n(C)||(C=u(C)),a(this.low^C.low,this.high^C.high,this.unsigned)},F.shiftLeft=function(C){return n(C)&&(C=C.toInt()),(C&=63)===0?this:C<32?a(this.low<<C,this.high<<C|this.low>>>32-C,this.unsigned):a(0,this.low<<C-32,this.unsigned)},F.shl=F.shiftLeft,F.shiftRight=function(C){return n(C)&&(C=C.toInt()),(C&=63)===0?this:C<32?a(this.low>>>C|this.high<<32-C,this.high>>C,this.unsigned):a(this.high>>C-32,this.high>=0?0:-1,this.unsigned)},F.shr=F.shiftRight,F.shiftRightUnsigned=function(C){if(n(C)&&(C=C.toInt()),C&=63,C===0)return this;var Y=this.high;if(C<32){var Q=this.low;return a(Q>>>C|Y<<32-C,Y>>>C,this.unsigned)}else return C===32?a(Y,0,this.unsigned):a(Y>>>C-32,0,this.unsigned)},F.shru=F.shiftRightUnsigned,F.shr_u=F.shiftRightUnsigned,F.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},F.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},F.toBytes=function(C){return C?this.toBytesLE():this.toBytesBE()},F.toBytesLE=function(){var C=this.high,Y=this.low;return[Y&255,Y>>>8&255,Y>>>16&255,Y>>>24,C&255,C>>>8&255,C>>>16&255,C>>>24]},F.toBytesBE=function(){var C=this.high,Y=this.low;return[C>>>24,C>>>16&255,C>>>8&255,C&255,Y>>>24,Y>>>16&255,Y>>>8&255,Y&255]},e.fromBytes=function(C,Y,Q){return Q?e.fromBytesLE(C,Y):e.fromBytesBE(C,Y)},e.fromBytesLE=function(C,Y){return new e(C[0]|C[1]<<8|C[2]<<16|C[3]<<24,C[4]|C[5]<<8|C[6]<<16|C[7]<<24,Y)},e.fromBytesBE=function(C,Y){return new e(C[4]<<24|C[5]<<16|C[6]<<8|C[7],C[0]<<24|C[1]<<16|C[2]<<8|C[3],Y)},Md}var TR=IR();const $l=Xl(TR),eu=1;class DR{constructor({filehandle:e,path:n}){if(e)this.filehandle=e;else if(n)this.filehandle=new Ct(n);else throw new TypeError("either filehandle or path must be defined")}_readLongWithOverflow(e,n=0,r=!0){const o=$l.fromBytesLE(e.slice(n,n+8),r);if(o.greaterThan(Number.MAX_SAFE_INTEGER)||o.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return o.toNumber()}_getIndex(){return this.index||(this.index=this._readIndex()),this.index}async _readIndex(){let e=Ke.Buffer.allocUnsafe(8);await this.filehandle.read(e,0,8,0);const n=this._readLongWithOverflow(e,0,!0);if(!n)return[[0,0]];const r=new Array(n+1);r[0]=[0,0];const o=8*2*n;if(o>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");e=Ke.Buffer.allocUnsafe(o),await this.filehandle.read(e,0,o,8);for(let i=0;i<n;i+=1){const s=this._readLongWithOverflow(e,i*16),a=this._readLongWithOverflow(e,i*16+8);r[i+1]=[s,a]}return r}async getLastBlock(){const e=await this._getIndex();if(e.length)return e[e.length-1]}async getRelevantBlocksForRead(e,n){const r=n+e;if(e===0)return[];const o=await this._getIndex(),i=[],s=(d,h)=>{const p=d[eu],y=h?h[eu]:1/0;return p<=n&&y>n?0:p<n?-1:1};let a=0,c=o.length-1,l=Math.floor(o.length/2),u=s(o[l],o[l+1]);for(;u!==0;)u>0?c=l-1:u<0&&(a=l+1),l=Math.ceil((c-a)/2)+a,u=s(o[l],o[l+1]);i.push(o[l]);let f=l+1;for(;f<o.length&&(i.push(o[f]),!(o[f][eu]>=r));f+=1);return i[i.length-1][eu]<r&&i.push([]),i}}class Y2{constructor({filehandle:e,path:n,gziFilehandle:r,gziPath:o}){if(e)this.filehandle=e;else if(n)this.filehandle=new Ct(n);else throw new TypeError("either filehandle or path must be defined");if(!r&&!o&&!n)throw new TypeError("either gziFilehandle or gziPath must be defined");this.gzi=new DR({filehandle:r,path:!r&&!o&&n?o:`${n}.gzi`})}async stat(){const e=await this.filehandle.stat();return Object.assign(e,{size:await this.getUncompressedFileSize(),blocks:void 0,blksize:void 0})}async getUncompressedFileSize(){const[,e]=await this.gzi.getLastBlock(),{size:n}=await this.filehandle.stat(),r=Ke.Buffer.allocUnsafe(4),{bytesRead:o}=await this.filehandle.read(r,0,4,n-28-4);if(o!==4)throw new Error("read error");const i=r.readUInt32LE(0);return e+i}async _readAndUncompressBlock(e,[n],[r]){let o=r;o||(o=(await this.filehandle.stat()).size);const i=o-n;return await this.filehandle.read(e,0,i,n),await zr(e.slice(0,i))}async read(e,n,r,o){const i=await this.gzi.getRelevantBlocksForRead(r,o),s=Ke.Buffer.allocUnsafe(32768*2);let a=n,c=0;for(let l=0;l<i.length-1;l+=1){const u=await this._readAndUncompressBlock(s,i[l],i[l+1]),[,f]=i[l],d=f>=o?0:o-f,h=Math.min(o+r,f+u.length)-f;d>=0&&d<u.length&&(u.copy(e,a,d,h),a+=h-d,c+=h-d)}return{bytesRead:c,buffer:e}}}function Q2(t,e){return t.offset+t.lineBytes*Math.floor(e/t.lineLength)+e%t.lineLength}async function BR(t,e){const n=await t.readFile(e);if(!(n!=null&&n.length))throw new Error("No data read from FASTA index (FAI) file");let r=0,o;const i=n.toString("utf8").split(/\r?\n/).filter(s=>/\S/.test(s)).map(s=>s.split(" ")).filter(s=>s[0]!=="").map(s=>((!o||o.name!==s[0])&&(o={name:s[0],id:r},r+=1),{id:o.id,name:s[0],length:+s[1],start:0,end:+s[1],offset:+s[2],lineLength:+s[3],lineBytes:+s[4]}));return{name:Object.fromEntries(i.map(s=>[s.name,s])),id:Object.fromEntries(i.map(s=>[s.id,s]))}}class Z2{constructor({fasta:e,fai:n,path:r,faiPath:o}){if(e)this.fasta=e;else if(r)this.fasta=new Ct(r);else throw new Error("Need to pass filehandle for fasta or path to localfile");if(n)this.fai=n;else if(o)this.fai=new Ct(o);else if(r)this.fai=new Ct(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile")}async _getIndexes(e){return this.indexes||(this.indexes=BR(this.fai,e)),this.indexes}async getSequenceNames(e){return Object.keys((await this._getIndexes(e)).name)}async getSequenceSizes(e){const n={},r=await this._getIndexes(e);for(const o of Object.values(r.id))n[o.name]=o.length;return n}async getSequenceSize(e,n){var r;return(r=(await this._getIndexes(n)).name[e])===null||r===void 0?void 0:r.length}async hasReferenceSequence(e,n){return!!(await this._getIndexes(n)).name[e]}async getResiduesById(e,n,r,o){const i=(await this._getIndexes(o)).id[e];if(i)return this._fetchFromIndexEntry(i,n,r,o)}async getResiduesByName(e,n,r,o){const i=(await this._getIndexes(o)).name[e];if(i)return this._fetchFromIndexEntry(i,n,r,o)}async getSequence(e,n,r,o){return this.getResiduesByName(e,n,r,o)}async _fetchFromIndexEntry(e,n=0,r,o){let i=r;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((i===void 0||i>e.length)&&(i=e.length),n>=i)return"";const s=Q2(e,n),a=Q2(e,i)-s,c=Ke.Buffer.allocUnsafe(a);return await this.fasta.read(c,0,a,s,o),c.toString("utf8").replace(/\s+/g,"")}}class kR extends Z2{constructor({fasta:e,path:n,fai:r,faiPath:o,gzi:i,gziPath:s}){super({fasta:e,path:n,fai:r,faiPath:o}),e&&i?this.fasta=new Y2({filehandle:e,gziFilehandle:i}):n&&s&&(this.fasta=new Y2({path:n,gziPath:s}))}}function X2(t){return t.split(">").filter(e=>/\S/.test(e)).map(e=>{const[n,...r]=e.split(`
|
|
725
|
-
`),[o,...i]=n.split(" "),s=r.join("").replace(/\s/g,"");return{id:o,description:i.join(" "),sequence:s}})}class _R{constructor({fasta:e,path:n}){if(e)this.fasta=e;else if(n)this.fasta=new Ct(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const o=r.toString("utf8");return X2(o)})}async fetch(e,n,r){const i=(await this.data).find(a=>a.id===e),s=r-n;if(!i)throw new Error(`no sequence with id ${e} exists`);return i.sequence.slice(n,s)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const RR=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:kR,FetchableSmallFasta:_R,IndexedFasta:Z2,parseSmallFasta:X2},Symbol.toStringTag,{value:"Module"})),K2=BigInt(32);function FR(t,e,n){const r=+!!n,o=+!n;return BigInt(t.getInt32(e,n)*o+t.getInt32(e+4,n)*r)<<K2|BigInt(t.getUint32(e,n)*r+t.getUint32(e+4,n)*o)}function MR(t,e,n){const r=t.getUint32(e,n),o=t.getUint32(e+4,n),i=+!!n,s=+!n;return BigInt(r*s+o*i)<<K2|BigInt(r*i+o*s)}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(t,e){return FR(this,t,e)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(t,e){return MR(this,t,e)});class PR{}class LR{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(e=new PR){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(e),e.aborted?this.handleAborted(e):typeof e.addEventListener=="function"&&e.addEventListener("abort",()=>{this.handleAborted(e)})}handleAborted(e){this.signals.delete(e),this.signals.size===0&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}class OR{constructor(){this.callbacks=new Set}addCallback(e=()=>{}){this.callbacks.add(e),e(this.currentMessage)}callback(e){this.currentMessage=e;for(const n of this.callbacks)n(e)}}class Di{constructor({fill:e,cache:n}){if(typeof e!="function")throw new TypeError("must pass a fill function");if(typeof n!="object")throw new TypeError("must pass a cache object");if(typeof n.get!="function"||typeof n.set!="function"||typeof n.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=n,this.fillCallback=e}static isAbortException(e){return e.name==="AbortError"||e.code==="ERR_ABORTED"||e.message==="AbortError: aborted"||e.message==="Error: aborted"}evict(e,n){this.cache.get(e)===n&&this.cache.delete(e)}fill(e,n,r,o){const i=new LR,s=new OR;s.addCallback(o);const a={aborter:i,promise:this.fillCallback(n,i.signal,c=>{s.callback(c)}),settled:!1,statusReporter:s,get aborted(){return this.aborter.signal.aborted}};a.aborter.addSignal(r),a.aborter.signal.addEventListener("abort",()=>{a.settled||this.evict(e,a)}),a.promise.then(()=>{a.settled=!0},()=>{a.settled=!0,this.evict(e,a)}).catch(c=>{throw console.error(c),c}),this.cache.set(e,a)}static checkSinglePromise(e,n){function r(){if(n!=null&&n.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return e.then(o=>(r(),o),o=>{throw r(),o})}has(e){return this.cache.has(e)}get(e,n,r,o){if(!r&&n instanceof AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const i=this.cache.get(e);return i?i.aborted&&!i.settled?(this.evict(e,i),this.get(e,n,r,o)):i.settled?i.promise:(i.aborter.addSignal(r),i.statusReporter.addCallback(o),Di.checkSinglePromise(i.promise,r)):(this.fill(e,n,r,o),Di.checkSinglePromise(this.cache.get(e).promise,r))}delete(e){const n=this.cache.get(e);n&&(n.settled||n.aborter.abort(),this.cache.delete(e))}clear(){const e=this.cache.keys();let n=0;for(let r=e.next();!r.done;r=e.next())this.delete(r.value),n+=1;return n}}var Pd,J2;function NR(){if(J2)return Pd;J2=1;class t{constructor(n={}){if(!(n.maxSize&&n.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=n.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(n,r){this.cache.set(n,r),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(n){if(this.cache.has(n))return this.cache.get(n);if(this.oldCache.has(n)){const r=this.oldCache.get(n);return this.oldCache.delete(n),this._set(n,r),r}}set(n,r){return this.cache.has(n)?this.cache.set(n,r):this._set(n,r),this}has(n){return this.cache.has(n)||this.oldCache.has(n)}peek(n){if(this.cache.has(n))return this.cache.get(n);if(this.oldCache.has(n))return this.oldCache.get(n)}delete(n){const r=this.cache.delete(n);return r&&this._size--,this.oldCache.delete(n)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[n]of this)yield n}*values(){for(const[,n]of this)yield n}*[Symbol.iterator](){for(const n of this.cache)yield n;for(const n of this.oldCache){const[r]=n;this.cache.has(r)||(yield n)}}get size(){let n=0;for(const r of this.oldCache.keys())this.cache.has(r)||n++;return this._size+n}}return Pd=t,Pd}var zR=NR();const tu=Xl(zR);class Io{constructor(e){this.ranges=e}get min(){return this.ranges[0].min}get max(){return this.ranges.at(-1).max}contains(e){for(const n of this.ranges)if(n.min<=e&&n.max>=e)return!0;return!1}isContiguous(){return this.ranges.length>1}getRanges(){return this.ranges.map(e=>new Io([{min:e.min,max:e.max}]))}toString(){return this.ranges.map(e=>`[${e.min}-${e.max}]`).join(",")}union(e){const n=[...this.getRanges(),...e.getRanges()].sort((i,s)=>i.min<s.min?-1:i.min>s.min?1:i.max<s.max?-1:s.max>i.max?1:0),r=[];let o=n[0];for(const i of n)i.min>o.max+1?(r.push(o),o=i):i.max>o.max&&(o=new Io([{min:o.min,max:i.max}]));return r.push(o),r.length===1?r[0]:new Io(r)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */function To(t){let e=t.length;for(;--e>=0;)t[e]=0}const UR=3,GR=258,$2=29,HR=256+1+$2,ew=30,VR=512,jR=new Array((HR+2)*2);To(jR);const qR=new Array(ew*2);To(qR);const WR=new Array(VR);To(WR);const YR=new Array(GR-UR+1);To(YR);const QR=new Array($2);To(QR);const ZR=new Array(ew);To(ZR);var Ld=(t,e,n,r)=>{let o=t&65535|0,i=t>>>16&65535|0,s=0;for(;n!==0;){s=n>2e3?2e3:n,n-=s;do o=o+e[r++]|0,i=i+o|0;while(--s);o%=65521,i%=65521}return o|i<<16|0};const XR=()=>{let t,e=[];for(var n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e},KR=new Uint32Array(XR());var jn=(t,e,n,r)=>{const o=KR,i=r+n;t^=-1;for(let s=r;s<i;s++)t=t>>>8^o[(t^e[s])&255];return t^-1},Od={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},tw={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const JR=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var $R=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)JR(n,r)&&(t[r]=n[r])}}return t},eF=t=>{let e=0;for(let r=0,o=t.length;r<o;r++)e+=t[r].length;const n=new Uint8Array(e);for(let r=0,o=0,i=t.length;r<i;r++){let s=t[r];n.set(s,o),o+=s.length}return n},nw={assign:$R,flattenChunks:eF};let rw=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{rw=!1}const Ra=new Uint8Array(256);for(let t=0;t<256;t++)Ra[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ra[254]=Ra[254]=1;var tF=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,n,r,o,i,s=t.length,a=0;for(o=0;o<s;o++)n=t.charCodeAt(o),(n&64512)===55296&&o+1<s&&(r=t.charCodeAt(o+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),o++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(a),i=0,o=0;i<a;o++)n=t.charCodeAt(o),(n&64512)===55296&&o+1<s&&(r=t.charCodeAt(o+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),o++)),n<128?e[i++]=n:n<2048?(e[i++]=192|n>>>6,e[i++]=128|n&63):n<65536?(e[i++]=224|n>>>12,e[i++]=128|n>>>6&63,e[i++]=128|n&63):(e[i++]=240|n>>>18,e[i++]=128|n>>>12&63,e[i++]=128|n>>>6&63,e[i++]=128|n&63);return e};const nF=(t,e)=>{if(e<65534&&t.subarray&&rw)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let n="";for(let r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n};var rF=(t,e)=>{const n=e||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let r,o;const i=new Array(n*2);for(o=0,r=0;r<n;){let s=t[r++];if(s<128){i[o++]=s;continue}let a=Ra[s];if(a>4){i[o++]=65533,r+=a-1;continue}for(s&=a===2?31:a===3?15:7;a>1&&r<n;)s=s<<6|t[r++]&63,a--;if(a>1){i[o++]=65533;continue}s<65536?i[o++]=s:(s-=65536,i[o++]=55296|s>>10&1023,i[o++]=56320|s&1023)}return nF(i,o)},iF=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let n=e-1;for(;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+Ra[t[n]]>e?n:e},Nd={string2buf:tF,buf2string:rF,utf8border:iF};function oF(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var sF=oF;const nu=16209,aF=16191;var cF=function(e,n){let r,o,i,s,a,c,l,u,f,d,h,p,y,v,b,A,S,E,I,_,B,N,F,M;const C=e.state;r=e.next_in,F=e.input,o=r+(e.avail_in-5),i=e.next_out,M=e.output,s=i-(n-e.avail_out),a=i+(e.avail_out-257),c=C.dmax,l=C.wsize,u=C.whave,f=C.wnext,d=C.window,h=C.hold,p=C.bits,y=C.lencode,v=C.distcode,b=(1<<C.lenbits)-1,A=(1<<C.distbits)-1;e:do{p<15&&(h+=F[r++]<<p,p+=8,h+=F[r++]<<p,p+=8),S=y[h&b];t:for(;;){if(E=S>>>24,h>>>=E,p-=E,E=S>>>16&255,E===0)M[i++]=S&65535;else if(E&16){I=S&65535,E&=15,E&&(p<E&&(h+=F[r++]<<p,p+=8),I+=h&(1<<E)-1,h>>>=E,p-=E),p<15&&(h+=F[r++]<<p,p+=8,h+=F[r++]<<p,p+=8),S=v[h&A];n:for(;;){if(E=S>>>24,h>>>=E,p-=E,E=S>>>16&255,E&16){if(_=S&65535,E&=15,p<E&&(h+=F[r++]<<p,p+=8,p<E&&(h+=F[r++]<<p,p+=8)),_+=h&(1<<E)-1,_>c){e.msg="invalid distance too far back",C.mode=nu;break e}if(h>>>=E,p-=E,E=i-s,_>E){if(E=_-E,E>u&&C.sane){e.msg="invalid distance too far back",C.mode=nu;break e}if(B=0,N=d,f===0){if(B+=l-E,E<I){I-=E;do M[i++]=d[B++];while(--E);B=i-_,N=M}}else if(f<E){if(B+=l+f-E,E-=f,E<I){I-=E;do M[i++]=d[B++];while(--E);if(B=0,f<I){E=f,I-=E;do M[i++]=d[B++];while(--E);B=i-_,N=M}}}else if(B+=f-E,E<I){I-=E;do M[i++]=d[B++];while(--E);B=i-_,N=M}for(;I>2;)M[i++]=N[B++],M[i++]=N[B++],M[i++]=N[B++],I-=3;I&&(M[i++]=N[B++],I>1&&(M[i++]=N[B++]))}else{B=i-_;do M[i++]=M[B++],M[i++]=M[B++],M[i++]=M[B++],I-=3;while(I>2);I&&(M[i++]=M[B++],I>1&&(M[i++]=M[B++]))}}else if(E&64){e.msg="invalid distance code",C.mode=nu;break e}else{S=v[(S&65535)+(h&(1<<E)-1)];continue n}break}}else if(E&64)if(E&32){C.mode=aF;break e}else{e.msg="invalid literal/length code",C.mode=nu;break e}else{S=y[(S&65535)+(h&(1<<E)-1)];continue t}break}}while(r<o&&i<a);I=p>>3,r-=I,p-=I<<3,h&=(1<<p)-1,e.next_in=r,e.next_out=i,e.avail_in=r<o?5+(o-r):5-(r-o),e.avail_out=i<a?257+(a-i):257-(i-a),C.hold=h,C.bits=p};const Do=15,iw=852,ow=592,sw=0,zd=1,aw=2,lF=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),uF=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),fF=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),hF=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Fa=(t,e,n,r,o,i,s,a)=>{const c=a.bits;let l=0,u=0,f=0,d=0,h=0,p=0,y=0,v=0,b=0,A=0,S,E,I,_,B,N=null,F;const M=new Uint16Array(Do+1),C=new Uint16Array(Do+1);let Y=null,Q,oe,se;for(l=0;l<=Do;l++)M[l]=0;for(u=0;u<r;u++)M[e[n+u]]++;for(h=c,d=Do;d>=1&&M[d]===0;d--);if(h>d&&(h=d),d===0)return o[i++]=1<<24|64<<16|0,o[i++]=1<<24|64<<16|0,a.bits=1,0;for(f=1;f<d&&M[f]===0;f++);for(h<f&&(h=f),v=1,l=1;l<=Do;l++)if(v<<=1,v-=M[l],v<0)return-1;if(v>0&&(t===sw||d!==1))return-1;for(C[1]=0,l=1;l<Do;l++)C[l+1]=C[l]+M[l];for(u=0;u<r;u++)e[n+u]!==0&&(s[C[e[n+u]]++]=u);if(t===sw?(N=Y=s,F=20):t===zd?(N=lF,Y=uF,F=257):(N=fF,Y=hF,F=0),A=0,u=0,l=f,B=i,p=h,y=0,I=-1,b=1<<h,_=b-1,t===zd&&b>iw||t===aw&&b>ow)return 1;for(;;){Q=l-y,s[u]+1<F?(oe=0,se=s[u]):s[u]>=F?(oe=Y[s[u]-F],se=N[s[u]-F]):(oe=96,se=0),S=1<<l-y,E=1<<p,f=E;do E-=S,o[B+(A>>y)+E]=Q<<24|oe<<16|se|0;while(E!==0);for(S=1<<l-1;A&S;)S>>=1;if(S!==0?(A&=S-1,A+=S):A=0,u++,--M[l]===0){if(l===d)break;l=e[n+s[u]]}if(l>h&&(A&_)!==I){for(y===0&&(y=h),B+=f,p=l-y,v=1<<p;p+y<d&&(v-=M[p+y],!(v<=0));)p++,v<<=1;if(b+=1<<p,t===zd&&b>iw||t===aw&&b>ow)return 1;I=A&_,o[I]=h<<24|p<<16|B-i|0}}return A!==0&&(o[B+A]=l-y<<24|64<<16|0),a.bits=h,0};const dF=0,cw=1,lw=2,{Z_FINISH:uw,Z_BLOCK:pF,Z_TREES:ru,Z_OK:Bi,Z_STREAM_END:gF,Z_NEED_DICT:mF,Z_STREAM_ERROR:hn,Z_DATA_ERROR:fw,Z_MEM_ERROR:hw,Z_BUF_ERROR:yF,Z_DEFLATED:dw}=tw,iu=16180,pw=16181,gw=16182,mw=16183,yw=16184,bw=16185,ww=16186,xw=16187,vw=16188,Aw=16189,ou=16190,rr=16191,Ud=16192,Ew=16193,Gd=16194,Sw=16195,Cw=16196,Iw=16197,Tw=16198,su=16199,au=16200,Dw=16201,Bw=16202,kw=16203,_w=16204,Rw=16205,Hd=16206,Fw=16207,Mw=16208,ct=16209,Pw=16210,Lw=16211,bF=852,wF=592,xF=15,Ow=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function vF(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ki=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<iu||e.mode>Lw?1:0},Nw=t=>{if(ki(t))return hn;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=iu,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(bF),e.distcode=e.distdyn=new Int32Array(wF),e.sane=1,e.back=-1,Bi},zw=t=>{if(ki(t))return hn;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Nw(t)},Uw=(t,e)=>{let n;if(ki(t))return hn;const r=t.state;return e<0?(n=0,e=-e):(n=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?hn:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,zw(t))},Gw=(t,e)=>{if(!t)return hn;const n=new vF;t.state=n,n.strm=t,n.window=null,n.mode=iu;const r=Uw(t,e);return r!==Bi&&(t.state=null),r},AF=t=>Gw(t,xF);let Hw=!0,Vd,jd;const EF=t=>{if(Hw){Vd=new Int32Array(512),jd=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Fa(cw,t.lens,0,288,Vd,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Fa(lw,t.lens,0,32,jd,0,t.work,{bits:5}),Hw=!1}t.lencode=Vd,t.lenbits=9,t.distcode=jd,t.distbits=5},Vw=(t,e,n,r)=>{let o;const i=t.state;return i.window===null&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),r>=i.wsize?(i.window.set(e.subarray(n-i.wsize,n),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>r&&(o=r),i.window.set(e.subarray(n-r,n-r+o),i.wnext),r-=o,r?(i.window.set(e.subarray(n-r,n),0),i.wnext=r,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0},SF=(t,e)=>{let n,r,o,i,s,a,c,l,u,f,d,h,p,y,v=0,b,A,S,E,I,_,B,N;const F=new Uint8Array(4);let M,C;const Y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ki(t)||!t.output||!t.input&&t.avail_in!==0)return hn;n=t.state,n.mode===rr&&(n.mode=Ud),s=t.next_out,o=t.output,c=t.avail_out,i=t.next_in,r=t.input,a=t.avail_in,l=n.hold,u=n.bits,f=a,d=c,N=Bi;e:for(;;)switch(n.mode){case iu:if(n.wrap===0){n.mode=Ud;break}for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,F[0]=l&255,F[1]=l>>>8&255,n.check=jn(n.check,F,2,0),l=0,u=0,n.mode=pw;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){t.msg="incorrect header check",n.mode=ct;break}if((l&15)!==dw){t.msg="unknown compression method",n.mode=ct;break}if(l>>>=4,u-=4,B=(l&15)+8,n.wbits===0&&(n.wbits=B),B>15||B>n.wbits){t.msg="invalid window size",n.mode=ct;break}n.dmax=1<<n.wbits,n.flags=0,t.adler=n.check=1,n.mode=l&512?Aw:rr,l=0,u=0;break;case pw:for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==dw){t.msg="unknown compression method",n.mode=ct;break}if(n.flags&57344){t.msg="unknown header flags set",n.mode=ct;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,n.check=jn(n.check,F,2,0)),l=0,u=0,n.mode=gw;case gw:for(;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,F[2]=l>>>16&255,F[3]=l>>>24&255,n.check=jn(n.check,F,4,0)),l=0,u=0,n.mode=mw;case mw:for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,n.check=jn(n.check,F,2,0)),l=0,u=0,n.mode=yw;case yw:if(n.flags&1024){for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(F[0]=l&255,F[1]=l>>>8&255,n.check=jn(n.check,F,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=bw;case bw:if(n.flags&1024&&(h=n.length,h>a&&(h=a),h&&(n.head&&(B=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(i,i+h),B)),n.flags&512&&n.wrap&4&&(n.check=jn(n.check,r,h,i)),a-=h,i+=h,n.length-=h),n.length))break e;n.length=0,n.mode=ww;case ww:if(n.flags&2048){if(a===0)break e;h=0;do B=r[i+h++],n.head&&B&&n.length<65536&&(n.head.name+=String.fromCharCode(B));while(B&&h<a);if(n.flags&512&&n.wrap&4&&(n.check=jn(n.check,r,h,i)),a-=h,i+=h,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=xw;case xw:if(n.flags&4096){if(a===0)break e;h=0;do B=r[i+h++],n.head&&B&&n.length<65536&&(n.head.comment+=String.fromCharCode(B));while(B&&h<a);if(n.flags&512&&n.wrap&4&&(n.check=jn(n.check,r,h,i)),a-=h,i+=h,B)break e}else n.head&&(n.head.comment=null);n.mode=vw;case vw:if(n.flags&512){for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){t.msg="header crc mismatch",n.mode=ct;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=rr;break;case Aw:for(;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}t.adler=n.check=Ow(l),l=0,u=0,n.mode=ou;case ou:if(n.havedict===0)return t.next_out=s,t.avail_out=c,t.next_in=i,t.avail_in=a,n.hold=l,n.bits=u,mF;t.adler=n.check=1,n.mode=rr;case rr:if(e===pF||e===ru)break e;case Ud:if(n.last){l>>>=u&7,u-=u&7,n.mode=Hd;break}for(;u<3;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}switch(n.last=l&1,l>>>=1,u-=1,l&3){case 0:n.mode=Ew;break;case 1:if(EF(n),n.mode=su,e===ru){l>>>=2,u-=2;break e}break;case 2:n.mode=Cw;break;case 3:t.msg="invalid block type",n.mode=ct}l>>>=2,u-=2;break;case Ew:for(l>>>=u&7,u-=u&7;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if((l&65535)!==(l>>>16^65535)){t.msg="invalid stored block lengths",n.mode=ct;break}if(n.length=l&65535,l=0,u=0,n.mode=Gd,e===ru)break e;case Gd:n.mode=Sw;case Sw:if(h=n.length,h){if(h>a&&(h=a),h>c&&(h=c),h===0)break e;o.set(r.subarray(i,i+h),s),a-=h,i+=h,c-=h,s+=h,n.length-=h;break}n.mode=rr;break;case Cw:for(;u<14;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=ct;break}n.have=0,n.mode=Iw;case Iw:for(;n.have<n.ncode;){for(;u<3;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.lens[Y[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[Y[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},N=Fa(dF,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,N){t.msg="invalid code lengths set",n.mode=ct;break}n.have=0,n.mode=Tw;case Tw:for(;n.have<n.nlen+n.ndist;){for(;v=n.lencode[l&(1<<n.lenbits)-1],b=v>>>24,A=v>>>16&255,S=v&65535,!(b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(S<16)l>>>=b,u-=b,n.lens[n.have++]=S;else{if(S===16){for(C=b+2;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(l>>>=b,u-=b,n.have===0){t.msg="invalid bit length repeat",n.mode=ct;break}B=n.lens[n.have-1],h=3+(l&3),l>>>=2,u-=2}else if(S===17){for(C=b+3;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=b,u-=b,B=0,h=3+(l&7),l>>>=3,u-=3}else{for(C=b+7;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=b,u-=b,B=0,h=11+(l&127),l>>>=7,u-=7}if(n.have+h>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=ct;break}for(;h--;)n.lens[n.have++]=B}}if(n.mode===ct)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=ct;break}if(n.lenbits=9,M={bits:n.lenbits},N=Fa(cw,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,N){t.msg="invalid literal/lengths set",n.mode=ct;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},N=Fa(lw,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,N){t.msg="invalid distances set",n.mode=ct;break}if(n.mode=su,e===ru)break e;case su:n.mode=au;case au:if(a>=6&&c>=258){t.next_out=s,t.avail_out=c,t.next_in=i,t.avail_in=a,n.hold=l,n.bits=u,cF(t,d),s=t.next_out,o=t.output,c=t.avail_out,i=t.next_in,r=t.input,a=t.avail_in,l=n.hold,u=n.bits,n.mode===rr&&(n.back=-1);break}for(n.back=0;v=n.lencode[l&(1<<n.lenbits)-1],b=v>>>24,A=v>>>16&255,S=v&65535,!(b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(A&&!(A&240)){for(E=b,I=A,_=S;v=n.lencode[_+((l&(1<<E+I)-1)>>E)],b=v>>>24,A=v>>>16&255,S=v&65535,!(E+b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=E,u-=E,n.back+=E}if(l>>>=b,u-=b,n.back+=b,n.length=S,A===0){n.mode=Rw;break}if(A&32){n.back=-1,n.mode=rr;break}if(A&64){t.msg="invalid literal/length code",n.mode=ct;break}n.extra=A&15,n.mode=Dw;case Dw:if(n.extra){for(C=n.extra;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Bw;case Bw:for(;v=n.distcode[l&(1<<n.distbits)-1],b=v>>>24,A=v>>>16&255,S=v&65535,!(b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(!(A&240)){for(E=b,I=A,_=S;v=n.distcode[_+((l&(1<<E+I)-1)>>E)],b=v>>>24,A=v>>>16&255,S=v&65535,!(E+b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=E,u-=E,n.back+=E}if(l>>>=b,u-=b,n.back+=b,A&64){t.msg="invalid distance code",n.mode=ct;break}n.offset=S,n.extra=A&15,n.mode=kw;case kw:if(n.extra){for(C=n.extra;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=ct;break}n.mode=_w;case _w:if(c===0)break e;if(h=d-c,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=ct;break}h>n.wnext?(h-=n.wnext,p=n.wsize-h):p=n.wnext-h,h>n.length&&(h=n.length),y=n.window}else y=o,p=s-n.offset,h=n.length;h>c&&(h=c),c-=h,n.length-=h;do o[s++]=y[p++];while(--h);n.length===0&&(n.mode=au);break;case Rw:if(c===0)break e;o[s++]=n.length,c--,n.mode=au;break;case Hd:if(n.wrap){for(;u<32;){if(a===0)break e;a--,l|=r[i++]<<u,u+=8}if(d-=c,t.total_out+=d,n.total+=d,n.wrap&4&&d&&(t.adler=n.check=n.flags?jn(n.check,o,d,s-d):Ld(n.check,o,d,s-d)),d=c,n.wrap&4&&(n.flags?l:Ow(l))!==n.check){t.msg="incorrect data check",n.mode=ct;break}l=0,u=0}n.mode=Fw;case Fw:if(n.wrap&&n.flags){for(;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){t.msg="incorrect length check",n.mode=ct;break}l=0,u=0}n.mode=Mw;case Mw:N=gF;break e;case ct:N=fw;break e;case Pw:return hw;case Lw:default:return hn}return t.next_out=s,t.avail_out=c,t.next_in=i,t.avail_in=a,n.hold=l,n.bits=u,(n.wsize||d!==t.avail_out&&n.mode<ct&&(n.mode<Hd||e!==uw))&&Vw(t,t.output,t.next_out,d-t.avail_out),f-=t.avail_in,d-=t.avail_out,t.total_in+=f,t.total_out+=d,n.total+=d,n.wrap&4&&d&&(t.adler=n.check=n.flags?jn(n.check,o,d,t.next_out-d):Ld(n.check,o,d,t.next_out-d)),t.data_type=n.bits+(n.last?64:0)+(n.mode===rr?128:0)+(n.mode===su||n.mode===Gd?256:0),(f===0&&d===0||e===uw)&&N===Bi&&(N=yF),N},CF=t=>{if(ki(t))return hn;let e=t.state;return e.window&&(e.window=null),t.state=null,Bi},IF=(t,e)=>{if(ki(t))return hn;const n=t.state;return n.wrap&2?(n.head=e,e.done=!1,Bi):hn},TF=(t,e)=>{const n=e.length;let r,o,i;return ki(t)||(r=t.state,r.wrap!==0&&r.mode!==ou)?hn:r.mode===ou&&(o=1,o=Ld(o,e,n,0),o!==r.check)?fw:(i=Vw(t,e,n,n),i?(r.mode=Pw,hw):(r.havedict=1,Bi))};var DF=zw,BF=Uw,kF=Nw,_F=AF,RF=Gw,FF=SF,MF=CF,PF=IF,LF=TF,OF="pako inflate (from Nodeca project)",ir={inflateReset:DF,inflateReset2:BF,inflateResetKeep:kF,inflateInit:_F,inflateInit2:RF,inflate:FF,inflateEnd:MF,inflateGetHeader:PF,inflateSetDictionary:LF,inflateInfo:OF};function NF(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var zF=NF;const jw=Object.prototype.toString,{Z_NO_FLUSH:UF,Z_FINISH:GF,Z_OK:Ma,Z_STREAM_END:qd,Z_NEED_DICT:Wd,Z_STREAM_ERROR:HF,Z_DATA_ERROR:qw,Z_MEM_ERROR:VF}=tw;function cu(t){this.options=nw.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new sF,this.strm.avail_out=0;let n=ir.inflateInit2(this.strm,e.windowBits);if(n!==Ma)throw new Error(Od[n]);if(this.header=new zF,ir.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Nd.string2buf(e.dictionary):jw.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=ir.inflateSetDictionary(this.strm,e.dictionary),n!==Ma)))throw new Error(Od[n])}cu.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize,o=this.options.dictionary;let i,s,a;if(this.ended)return!1;for(e===~~e?s=e:s=e===!0?GF:UF,jw.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),i=ir.inflate(n,s),i===Wd&&o&&(i=ir.inflateSetDictionary(n,o),i===Ma?i=ir.inflate(n,s):i===qw&&(i=Wd));n.avail_in>0&&i===qd&&n.state.wrap>0&&t[n.next_in]!==0;)ir.inflateReset(n),i=ir.inflate(n,s);switch(i){case HF:case qw:case Wd:case VF:return this.onEnd(i),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||i===qd))if(this.options.to==="string"){let c=Nd.utf8border(n.output,n.next_out),l=n.next_out-c,u=Nd.buf2string(n.output,c);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(c,c+l),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(i===Ma&&a===0)){if(i===qd)return i=ir.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},cu.prototype.onData=function(t){this.chunks.push(t)},cu.prototype.onEnd=function(t){t===Ma&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=nw.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function jF(t,e){const n=new cu(e);if(n.push(t),n.err)throw n.msg||Od[n.err];return n.result}function qF(t,e){return e=e||{},e.raw=!0,jF(t,e)}var WF=qF,YF={inflateRaw:WF};const{inflateRaw:QF}=YF;var ZF=QF;function XF(t){return ZF(t.subarray(2))}let KF=class extends Error{constructor(e){super(e),this.code="ERR_ABORTED"}};function JF(t){t.sort((o,i)=>o.offset-i.offset);const e=[];let n,r;for(const o of t)n&&r&&o.offset-r<=2e3?(n.length=n.length+o.length-r+o.offset,n.blocks.push(o)):e.push(n={blocks:[o],length:o.length,offset:o.offset}),r=n.offset+n.length;return e}function lu(t){if(t&&t.aborted)if(typeof DOMException>"u"){const e=new KF("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}const Yd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Qd(t,e,n,r){return t<r&&e>=n}class Ww{constructor(e,n,r,o,i,s){if(this.bbi=e,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=o,this.isCompressed=i,this.blockType=s,this.featureCache=new Di({cache:new tu({maxSize:1e3}),fill:async(a,c)=>{const l=a.length,u=a.offset,{buffer:f}=await this.bbi.read(Ke.Buffer.alloc(l),0,l,u,{signal:c});return f}}),!(r>=0))throw new Error("invalid cirTreeOffset!")}async readWigData(e,n,r,o,i){try{const{refsByName:s,bbi:a,cirTreeOffset:c,isBigEndian:l}=this,u=s[e];u===void 0&&o.complete();const f={chrId:u,start:n,end:r};this.cirTreePromise||(this.cirTreePromise=a.read(Ke.Buffer.alloc(48),0,48,c,i));const{buffer:d}=await this.cirTreePromise,h=l?d.readUInt32BE(4):d.readUInt32LE(4);let p=[],y=0;const v=!0,b=(I,_,B)=>{try{const F=I.subarray(_),M=new DataView(F.buffer,F.byteOffset,F.length);let C=0;const Y=M.getUint8(C);C+=2;const Q=M.getUint16(C,v);if(C+=2,Y===1){const oe=[];for(let se=0;se<Q;se++){const ae=M.getUint32(C,v);C+=4;const ce=M.getUint32(C,v);C+=4;const ye=M.getUint32(C,v);C+=4;const de=M.getUint32(C,v);C+=4;const Ce=Number(M.getBigUint64(C,v));C+=8;const me=Number(M.getBigUint64(C,v));C+=8,oe.push({startChrom:ae,startBase:ce,endBase:de,endChrom:ye,blockOffset:Ce,blockSize:me,offset:C})}p=p.concat(oe.filter(se=>A(se)).map(se=>({offset:se.blockOffset,length:se.blockSize})))}else if(Y===0){const oe=[];for(let ae=0;ae<Q;ae++){const ce=M.getUint32(C,v);C+=4;const ye=M.getUint32(C,v);C+=4;const de=M.getUint32(C,v);C+=4;const Ce=M.getUint32(C,v);C+=4;const me=Number(M.getBigUint64(C,v));C+=8,oe.push({startChrom:ce,startBase:ye,endChrom:de,endBase:Ce,blockOffset:me,offset:C})}const se=oe.filter(ae=>A(ae)).map(ae=>ae.blockOffset);se.length>0&&E(se,B+1)}}catch(N){o.error(N)}},A=I=>{const{startChrom:_,startBase:B,endChrom:N,endBase:F}=I;return(_<u||_===u&&B<=r)&&(N>u||N===u&&F>=n)},S=async(I,_,B)=>{try{const N=_.max-_.min,F=_.min,M=await this.featureCache.get(`${N}_${F}`,{length:N,offset:F},i==null?void 0:i.signal);for(const C of I)_.contains(C)&&(b(M,C-F,B),y-=1,y===0&&this.readFeatures(o,p,{...i,request:f}).catch(Y=>{o.error(Y)}))}catch(N){o.error(N)}},E=(I,_)=>{try{y+=I.length;const B=4+h*32;let N=new Io([{min:I[0],max:I[0]+B}]);for(let F=1;F<I.length;F+=1){const M=new Io([{min:I[F],max:I[F]+B}]);N=N.union(M)}N.getRanges().map(F=>S(I,F,_))}catch(B){o.error(B)}};E([Number(c)+48],1);return}catch(s){o.error(s)}}parseSummaryBlock(e,n,r){const o=[];let i=n;const s=new DataView(e.buffer,e.byteOffset,e.length);for(;i<e.byteLength;){const a=s.getUint32(i,!0);i+=4;const c=s.getUint32(i,!0);i+=4;const l=s.getUint32(i,!0);i+=4;const u=s.getUint32(i,!0);i+=4;const f=s.getFloat32(i,!0);i+=4;const d=s.getFloat32(i,!0);i+=4;const h=s.getFloat32(i,!0);i+=4,i+=4,(!r||a===r.chrId&&Qd(c,l,r.start,r.end))&&o.push({start:c,end:l,maxScore:d,minScore:f,summary:!0,score:h/(u||1)})}return o}parseBigBedBlock(e,n,r,o){var i;const s=[];let a=n;const c=!0,l=e,u=new DataView(l.buffer,l.byteOffset,l.length);for(;a<e.byteLength;){const f=a,d=u.getUint32(a,c);a+=4;const h=u.getInt32(a,c);a+=4;const p=u.getInt32(a,c);a+=4;let y=a;for(;y<e.length&&e[y]!==0;y++);const v=e.subarray(a,y),b=(i=Yd==null?void 0:Yd.decode(v))!==null&&i!==void 0?i:v.toString();a=y+1,s.push({chromId:d,start:h,end:p,rest:b,uniqueId:`bb-${r+f}`})}return o?s.filter(f=>Qd(f.start,f.end,o.start,o.end)):s}parseBigWigBlock(e,n,r){const o=e.subarray(n),i=new DataView(o.buffer,o.byteOffset,o.length);let s=0;s+=4;const a=i.getInt32(s,!0);s+=8;const c=i.getUint32(s,!0);s+=4;const l=i.getUint32(s,!0);s+=4;const u=i.getUint8(s);s+=2;const f=i.getUint16(s,!0);s+=2;const d=new Array(f);switch(u){case 1:{for(let h=0;h<f;h++){const p=i.getInt32(s,!0);s+=4;const y=i.getInt32(s,!0);s+=4;const v=i.getFloat32(s,!0);s+=4,d[h]={start:p,end:y,score:v}}break}case 2:{for(let h=0;h<f;h++){const p=i.getInt32(s,!0);s+=4;const y=i.getFloat32(s,!0);s+=4,d[h]={score:y,start:p,end:p+l}}break}case 3:{for(let h=0;h<f;h++){const p=i.getFloat32(s,!0);s+=4;const y=a+h*c;d[h]={score:p,start:y,end:y+l}}break}}return r?d.filter(h=>Qd(h.start,h.end,r.start,r.end)):d}async readFeatures(e,n,r={}){try{const{blockType:o,isCompressed:i}=this,{signal:s,request:a}=r,c=JF(n);lu(s),await Promise.all(c.map(async l=>{lu(s);const{length:u,offset:f}=l,d=await this.featureCache.get(`${u}_${f}`,l,s);for(const h of l.blocks){lu(s);let p=Number(h.offset)-Number(l.offset),y=d;switch(i&&(y=XF(d.subarray(p)),p=0),lu(s),o){case"summary":{e.next(this.parseSummaryBlock(y,p,a));break}case"bigwig":{e.next(this.parseBigWigBlock(y,p,a));break}case"bigbed":{e.next(this.parseBigBedBlock(y,p,Number(h.offset)*256,a));break}default:console.warn(`Don't know what to do with ${o}`)}}})),e.complete()}catch(o){e.error(o)}}}var Zd=function(t,e){return Zd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Zd(t,e)};function Xd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Zd(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function $F(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{l(r.next(u))}catch(f){s(f)}}function c(u){try{l(r.throw(u))}catch(f){s(f)}}function l(u){u.done?i(u.value):o(u.value).then(a,c)}l((r=r.apply(t,e||[])).next())})}function Yw(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Pa(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Kd(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function Jd(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function Bo(t){return this instanceof Bo?(this.v=t,this):new Bo(t)}function e9(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),o,i=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(h){return function(p){return Promise.resolve(p).then(h,f)}}function a(h,p){r[h]&&(o[h]=function(y){return new Promise(function(v,b){i.push([h,y,v,b])>1||c(h,y)})},p&&(o[h]=p(o[h])))}function c(h,p){try{l(r[h](p))}catch(y){d(i[0][3],y)}}function l(h){h.value instanceof Bo?Promise.resolve(h.value.v).then(u,f):d(i[0][2],h)}function u(h){c("next",h)}function f(h){c("throw",h)}function d(h,p){h(p),i.shift(),i.length&&c(i[0][0],i[0][1])}}function t9(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Pa=="function"?Pa(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=t[i]&&function(s){return new Promise(function(a,c){s=t[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}typeof SuppressedError=="function"&&SuppressedError;function wt(t){return typeof t=="function"}function Qw(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var $d=Qw(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
726
|
-
`+n.map(function(r,o){return o+1+") "+r.toString()}).join(`
|
|
727
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function Zw(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var e0=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,o,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Pa(s),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(y){e={error:y}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}else s.remove(this);var u=this.initialTeardown;if(wt(u))try{u()}catch(y){i=y instanceof $d?y.errors:[y]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var d=Pa(f),h=d.next();!h.done;h=d.next()){var p=h.value;try{Kw(p)}catch(y){i=i??[],y instanceof $d?i=Jd(Jd([],Kd(i)),Kd(y.errors)):i.push(y)}}}catch(y){r={error:y}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}}if(i)throw new $d(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Kw(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Zw(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Zw(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();e0.EMPTY;function Xw(t){return t instanceof e0||t&&"closed"in t&&wt(t.remove)&&wt(t.add)&&wt(t.unsubscribe)}function Kw(t){wt(t)?t():t.unsubscribe()}var n9={Promise:void 0},r9={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Jd([t,e],Kd(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Jw(t){r9.setTimeout(function(){throw t})}function $w(){}function i9(t){t()}var t0=function(t){Xd(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Xw(n)&&n.add(r)):r.destination=a9,r}return e.create=function(n,r,o){return new uu(n,r,o)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(e0),o9=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){fu(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){fu(r)}else fu(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){fu(n)}},t}(),uu=function(t){Xd(e,t);function e(n,r,o){var i=t.call(this)||this,s;return wt(n)||!n?s={next:n??void 0,error:r??void 0,complete:o??void 0}:s=n,i.destination=new o9(s),i}return e}(t0);function fu(t){Jw(t)}function s9(t){throw t}var a9={closed:!0,next:$w,error:s9,complete:$w},n0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ex(t){return t}function c9(t){return t.length===0?ex:t.length===1?t[0]:function(n){return t.reduce(function(r,o){return o(r)},n)}}var dn=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var o=this,i=u9(e)?e:new uu(e,n,r);return i9(function(){var s=o,a=s.operator,c=s.source;i.add(a?a.call(i,c):c?o._subscribe(i):o._trySubscribe(i))}),i},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=tx(n),new n(function(o,i){var s=new uu({next:function(a){try{e(a)}catch(c){i(c),s.unsubscribe()}},error:i,complete:o});r.subscribe(s)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[n0]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return c9(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=tx(e),new e(function(r,o){var i;n.subscribe(function(s){return i=s},function(s){return o(s)},function(){return r(i)})})},t.create=function(e){return new t(e)},t}();function tx(t){var e;return(e=t??n9.Promise)!==null&&e!==void 0?e:Promise}function l9(t){return t&&wt(t.next)&&wt(t.error)&&wt(t.complete)}function u9(t){return t&&t instanceof t0||l9(t)&&Xw(t)}function f9(t){return wt(t==null?void 0:t.lift)}function ko(t){return function(e){if(f9(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function La(t,e,n,r,o){return new h9(t,e,n,r,o)}var h9=function(t){Xd(e,t);function e(n,r,o,i,s,a){var c=t.call(this,n)||this;return c.onFinalize=s,c.shouldUnsubscribe=a,c._next=r?function(l){try{r(l)}catch(u){n.error(u)}}:t.prototype._next,c._error=i?function(l){try{i(l)}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=o?function(){try{o()}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(t0),d9=new dn(function(t){return t.complete()});function p9(t){return t&&wt(t.schedule)}function nx(t){return t[t.length-1]}function g9(t){return p9(nx(t))?t.pop():void 0}function m9(t,e){return typeof nx(t)=="number"?t.pop():e}var rx=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function ix(t){return wt(t==null?void 0:t.then)}function ox(t){return wt(t[n0])}function sx(t){return Symbol.asyncIterator&&wt(t==null?void 0:t[Symbol.asyncIterator])}function ax(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function y9(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var cx=y9();function lx(t){return wt(t==null?void 0:t[cx])}function ux(t){return e9(this,arguments,function(){var n,r,o,i;return Yw(this,function(s){switch(s.label){case 0:n=t.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,Bo(n.read())];case 3:return r=s.sent(),o=r.value,i=r.done,i?[4,Bo(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Bo(o)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function fx(t){return wt(t==null?void 0:t.getReader)}function _o(t){if(t instanceof dn)return t;if(t!=null){if(ox(t))return b9(t);if(rx(t))return w9(t);if(ix(t))return x9(t);if(sx(t))return hx(t);if(lx(t))return v9(t);if(fx(t))return A9(t)}throw ax(t)}function b9(t){return new dn(function(e){var n=t[n0]();if(wt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function w9(t){return new dn(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function x9(t){return new dn(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Jw)})}function v9(t){return new dn(function(e){var n,r;try{for(var o=Pa(t),i=o.next();!i.done;i=o.next()){var s=i.value;if(e.next(s),e.closed)return}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}e.complete()})}function hx(t){return new dn(function(e){E9(t,e).catch(function(n){return e.error(n)})})}function A9(t){return hx(ux(t))}function E9(t,e){var n,r,o,i;return $F(this,void 0,void 0,function(){var s,a;return Yw(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=t9(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(s=r.value,e.next(s),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),o={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(i=n.return)?[4,i.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function _i(t,e,n,r,o){r===void 0&&(r=0),o===void 0&&(o=!1);var i=e.schedule(function(){n(),o?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(i),!o)return i}function dx(t,e){return e===void 0&&(e=0),ko(function(n,r){n.subscribe(La(r,function(o){return _i(r,t,function(){return r.next(o)},e)},function(){return _i(r,t,function(){return r.complete()},e)},function(o){return _i(r,t,function(){return r.error(o)},e)}))})}function px(t,e){return e===void 0&&(e=0),ko(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function S9(t,e){return _o(t).pipe(px(e),dx(e))}function C9(t,e){return _o(t).pipe(px(e),dx(e))}function I9(t,e){return new dn(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function T9(t,e){return new dn(function(n){var r;return _i(n,e,function(){r=t[cx](),_i(n,e,function(){var o,i,s;try{o=r.next(),i=o.value,s=o.done}catch(a){n.error(a);return}s?n.complete():n.next(i)},0,!0)}),function(){return wt(r==null?void 0:r.return)&&r.return()}})}function gx(t,e){if(!t)throw new Error("Iterable cannot be null");return new dn(function(n){_i(n,e,function(){var r=t[Symbol.asyncIterator]();_i(n,e,function(){r.next().then(function(o){o.done?n.complete():n.next(o.value)})},0,!0)})})}function D9(t,e){return gx(ux(t),e)}function B9(t,e){if(t!=null){if(ox(t))return S9(t,e);if(rx(t))return I9(t,e);if(ix(t))return C9(t,e);if(sx(t))return gx(t,e);if(lx(t))return T9(t,e);if(fx(t))return D9(t,e)}throw ax(t)}function k9(t,e){return e?B9(t,e):_o(t)}var _9=Qw(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function mx(t,e){return new Promise(function(n,r){var o=new uu({next:function(i){n(i),o.unsubscribe()},error:r,complete:function(){r(new _9)}});t.subscribe(o)})}function yx(t,e){return ko(function(n,r){var o=0;n.subscribe(La(r,function(i){r.next(t.call(e,i,o++))}))})}function R9(t,e,n,r,o,i,s,a){var c=[],l=0,u=0,f=!1,d=function(){f&&!c.length&&!l&&e.complete()},h=function(y){return l<r?p(y):c.push(y)},p=function(y){l++;var v=!1;_o(n(y,u++)).subscribe(La(e,function(b){e.next(b)},function(){v=!0},void 0,function(){if(v)try{l--;for(var b=function(){var A=c.shift();s||p(A)};c.length&&l<r;)b();d()}catch(A){e.error(A)}}))};return t.subscribe(La(e,h,function(){f=!0,d()})),function(){}}function bx(t,e,n){return n===void 0&&(n=1/0),wt(e)?bx(function(r,o){return yx(function(i,s){return e(r,i,o,s)})(_o(t(r,o)))},n):(typeof e=="number"&&(n=e),ko(function(r,o){return R9(r,o,t,n)}))}function F9(t){return t===void 0&&(t=1/0),bx(ex,t)}function M9(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=g9(t),r=m9(t,1/0),o=t;return o.length?o.length===1?_o(o[0]):F9(r)(k9(o,n)):d9}function P9(t,e,n,r,o){return function(i,s){var a=n,c=e,l=0;i.subscribe(La(s,function(u){var f=l++;c=a?t(c,u,f):(a=!0,u)},function(){a&&s.next(c),s.complete()}))}}function wx(t,e){return ko(P9(t,e,arguments.length>=2,!1,!0))}var L9=function(t,e){return t.push(e),t};function O9(){return ko(function(t,e){wx(L9,[])(t).subscribe(e)})}const xx=-2003829722,r0=-2021002517;class vx{getHeader(e){return this.headerP||(this.headerP=this._getHeader(e).catch(n=>{throw this.headerP=void 0,n})),this.headerP}constructor(e){const{filehandle:n,renameRefSeqs:r=s=>s,path:o,url:i}=e;if(this.renameRefSeqs=r,n)this.bbi=n;else if(i)this.bbi=new Cn(i);else if(o)this.bbi=new Ct(o);else throw new Error("no file given")}async _getHeader(e){const n=await this._getMainHeader(e),r=await this._readChromTree(n,e);return{...n,...r}}async _getMainHeader(e,n=2e3){const{buffer:o}=await this.bbi.read(Ke.Buffer.alloc(n),0,n,0,e),i=this._isBigEndian(o),s=o,a=new DataView(s.buffer,s.byteOffset,s.length);let c=0;const l=a.getInt32(c,!0);c+=4;const u=a.getUint16(c,!0);c+=2;const f=a.getUint16(c,!0);c+=2;const d=Number(a.getBigUint64(c,!0));c+=8;const h=Number(a.getBigUint64(c,!0));c+=8;const p=Number(a.getBigUint64(c,!0));c+=8;const y=a.getUint16(c,!0);c+=2;const v=a.getUint16(c,!0);c+=2;const b=Number(a.getBigUint64(c,!0));c+=8;const A=Number(a.getBigUint64(c,!0));c+=8;const S=a.getUint32(c,!0);c+=4;const E=Number(a.getBigUint64(c,!0));c+=8;const I=[];for(let N=0;N<f;N++){const F=a.getUint32(c,!0);c+=4;const M=a.getUint32(c,!0);c+=4;const C=Number(a.getBigUint64(c,!0));c+=8;const Y=Number(a.getBigUint64(c,!0));c+=8,I.push({reductionLevel:F,reserved:M,dataOffset:C,indexOffset:Y})}const _=l===r0?"bigbed":"bigwig";if(b>n||A>n-8*5)return this._getMainHeader(e,n*2);let B;if(A){const N=o.subarray(Number(A));let F=0;const M=new DataView(N.buffer,N.byteOffset,N.length),C=Number(M.getBigUint64(F,!0));F+=8;const Y=M.getFloat64(F,!0);F+=8;const Q=M.getFloat64(F,!0);F+=8;const oe=M.getFloat64(F,!0);F+=8;const se=M.getFloat64(F,!0);F+=8,B={scoreMin:Y,scoreMax:Q,scoreSum:oe,scoreSumSquares:se,basesCovered:C}}else throw new Error("no stats");return{zoomLevels:I,magic:l,extHeaderOffset:E,numZoomLevels:f,fieldCount:y,totalSummary:B,definedFieldCount:v,uncompressBufSize:S,asOffset:b,chromTreeOffset:d,totalSummaryOffset:A,unzoomedDataOffset:h,unzoomedIndexOffset:p,fileType:_,version:u,isBigEndian:i,autoSql:b?o.subarray(b,o.indexOf(0,b)).toString():""}}_isBigEndian(e){let n=e.readInt32LE(0);if(n===xx||n===r0)return!1;if(n=e.readInt32BE(0),n===xx||n===r0)return!0;throw new Error("not a BigWig/BigBed file")}async _readChromTree(e,n){const o=!e.isBigEndian,i=[],s={};let a=e.unzoomedDataOffset;const c=e.chromTreeOffset;for(;a%4!==0;)a+=1;const l=a-c,{buffer:u}=await this.bbi.read(Ke.Buffer.alloc(l),0,l,Number(c),n),f=u,d=new DataView(f.buffer,f.byteOffset,f.length);let h=0;h+=4,h+=4;const p=d.getUint32(h,o);h+=4,h+=4,h+=8;const y=32,v=async b=>{let A=b;if(A>=u.length)throw new Error("reading beyond end of buffer");const S=d.getUint8(A);A+=2;const E=d.getUint16(A,o);if(A+=2,S)for(let I=0;I<E;I++){const _=u.subarray(A,A+p).toString().replaceAll("\0","");A+=p;const B=d.getUint32(A,o);A+=4;const N=d.getUint32(A,o);A+=4;const F={name:_,id:B,length:N};s[this.renameRefSeqs(_)]=B,i[B]=F}else{const I=[];for(let _=0;_<E;_++){A+=p;const B=Number(d.getBigUint64(A,o));A+=8,I.push(v(Number(B)-Number(c)))}await Promise.all(I)}};return await v(y),{refsByName:s,refsByNumber:i}}async getUnzoomedView(e){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:o,isBigEndian:i,fileType:s}=await this.getHeader(e);return new Ww(this.bbi,r,n,i,o>0,s)}async getFeatureStream(e,n,r,o){await this.getHeader(o);const i=this.renameRefSeqs(e);let s;const{basesPerSpan:a,scale:c}=o||{};return a?s=await this.getView(1/a,o):c?s=await this.getView(c,o):s=await this.getView(1,o),new dn(l=>{s.readWigData(i,n,r,l,o).catch(u=>{l.error(u)})})}async getFeatures(e,n,r,o){const i=await this.getFeatureStream(e,n,r,o);return(await mx(i.pipe(O9()))).flat()}}class N9 extends vx{async getView(e,n){const{zoomLevels:r,refsByName:o,isBigEndian:i,uncompressBufSize:s}=await this.getHeader(n),a=1/e,c=r.length-1;for(let l=c;l>=0;l-=1){const u=r[l];if(u&&u.reductionLevel<=2*a)return new Ww(this.bbi,o,u.indexOffset,i,s>0,"summary")}return this.getUnzoomedView(n)}}function z9(t){return t.filter(e=>!!e)}class U9 extends vx{constructor(){super(...arguments),this.readIndicesCache=new Di({cache:new tu({maxSize:1}),fill:(e,n)=>this._readIndices({...e,signal:n})})}readIndices(e={}){const{signal:n,...r}=e;return this.readIndicesCache.get(JSON.stringify(r),e,n)}async getView(e,n){return this.getUnzoomedView(n)}async _readIndices(e){const{extHeaderOffset:n,isBigEndian:r}=await this.getHeader(e),{buffer:o}=await this.bbi.read(Ke.Buffer.alloc(64),0,64,Number(n)),i=!r,s=o,a=new DataView(s.buffer,s.byteOffset,s.length);let c=0;c+=2;const l=a.getUint16(c,i);c+=2;const u=Number(a.getBigUint64(c,i));if(c+=8,l===0)return[];const f=20,d=f*l,{buffer:h}=await this.bbi.read(Ke.Buffer.alloc(d),0,d,Number(u)),p=[];for(let y=0;y<l;y+=1){const v=h.subarray(y*f),b=new DataView(v.buffer,v.byteOffset,v.length);let A=0;const S=b.getInt16(A,i);A+=2;const E=b.getInt16(A,i);A+=2;const I=Number(b.getBigUint64(A,i));A+=12;const _=b.getInt16(A,i);p.push({type:S,fieldcount:E,offset:Number(I),field:_})}return p}async searchExtraIndexBlocks(e,n={}){const{isBigEndian:r}=await this.getHeader(n),o=await this.readIndices(n);if(o.length===0)return[];const i=o.map(async s=>{const{offset:a,field:c}=s,{buffer:l}=await this.bbi.read(Ke.Buffer.alloc(32),0,32,a,n),u=!r,f=l,d=new DataView(f.buffer,f.byteOffset,f.length);let h=0;h+=4;const p=d.getInt32(h,u);h+=4;const y=d.getInt32(h,u);h+=4;const v=d.getInt32(h,u);h+=4,h+=8;const b=async S=>{const E=Number(S),I=4+p*(y+v),{buffer:_}=await this.bbi.read(Ke.Buffer.alloc(I),0,I,E,n),B=_,N=new DataView(B.buffer,B.byteOffset,B.length);let F=0;const M=N.getInt8(F);F+=2;const C=N.getInt16(F,u);F+=2;const Y=[];if(M===0){const Q=[];for(let se=0;se<C;se++){const ae=B.subarray(F,F+y).toString().replaceAll("\0","");F+=y;const ce=Number(N.getBigUint64(F,u));F+=8,Q.push({key:ae,offset:ce})}let oe=0;for(const{key:se,offset:ae}of Q){if(e.localeCompare(se)<0&&oe)return b(oe);oe=ae}return b(oe)}else if(M===1){for(let Q=0;Q<C;Q++){const oe=B.subarray(F,F+y).toString().replaceAll("\0","");F+=y;const se=Number(N.getBigUint64(F,u));F+=8;const ae=N.getUint32(F,u);F+=4;const ce=N.getUint32(F,u);F+=4,Y.push({key:oe,offset:se,length:ae,reserved:ce})}for(const Q of Y)if(Q.key===e)return{...Q,field:c};return}};return b(a+32)});return z9(await Promise.all(i))}async searchExtraIndex(e,n={}){const r=await this.searchExtraIndexBlocks(e,n);if(r.length===0)return[];const o=await this.getUnzoomedView(n),i=r.map(a=>new dn(c=>{o.readFeatures(c,[a],n).catch(l=>{c.error(l)})}).pipe(wx((c,l)=>c.concat(l)),yx(c=>{for(const l of c)l.field=a.field;return c})));return(await mx(M9(...i))).filter(a=>{var c;return((c=a.rest)===null||c===void 0?void 0:c.split(" ")[(a.field||0)-3])===e})}}const Ax=Object.freeze(Object.defineProperty({__proto__:null,BigBed:U9,BigWig:N9},Symbol.toStringTag,{value:"Module"}));var i0,Ex;function G9(){if(Ex)return i0;Ex=1;function t(r,o){function i(){this.constructor=r}i.prototype=o.prototype,r.prototype=new i}function e(r,o,i,s){this.message=r,this.expected=o,this.found=i,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,e)}t(e,Error),e.buildMessage=function(r,o){var i={literal:function(d){return'"'+a(d.text)+'"'},class:function(d){var h="",p;for(p=0;p<d.parts.length;p++)h+=d.parts[p]instanceof Array?c(d.parts[p][0])+"-"+c(d.parts[p][1]):c(d.parts[p]);return"["+(d.inverted?"^":"")+h+"]"},any:function(d){return"any character"},end:function(d){return"end of input"},other:function(d){return d.description}};function s(d){return d.charCodeAt(0).toString(16).toUpperCase()}function a(d){return d.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(h){return"\\x0"+s(h)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(h){return"\\x"+s(h)})}function c(d){return d.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(h){return"\\x0"+s(h)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(h){return"\\x"+s(h)})}function l(d){return i[d.type](d)}function u(d){var h=new Array(d.length),p,y;for(p=0;p<d.length;p++)h[p]=l(d[p]);if(h.sort(),h.length>0){for(p=1,y=1;p<h.length;p++)h[p-1]!==h[p]&&(h[y]=h[p],y++);h.length=y}switch(h.length){case 1:return h[0];case 2:return h[0]+" or "+h[1];default:return h.slice(0,-1).join(", ")+", or "+h[h.length-1]}}function f(d){return d?'"'+a(d)+'"':"end of input"}return"Expected "+u(r)+" but "+f(o)+" found."};function n(r,o){o=o!==void 0?o:{};var i={},s={declaration:_v},a=_v,c="(",l=Ne("(",!1),u=")",f=Ne(")",!1),d=function(P,ne,ge,we){return{type:P,name:ne,comment:ge,fields:we}},h="simple",p=Ne("simple",!1),y="object",v=Ne("object",!1),b="table",A=Ne("table",!1),S="auto",E=Ne("auto",!1),I="primary",_=Ne("primary",!1),B="index",N=Ne("index",!1),F="unique",M=Ne("unique",!1),C=function(P,ne){return ne},Y=function(P,ne){return P.name&&ne.unshift(P),ne},Q="#",oe=Ne("#",!1),se=";",ae=Ne(";",!1),ce=function(P,ne,ge){return{type:P,name:ne,comment:ge}},ye="[",de=Ne("[",!1),Ce="]",me=Ne("]",!1),Ee=function(P,ne,ge,we){return{type:P,size:ne,name:ge,comment:we}},De=function(P,ne,ge,we){return{type:P,vals:ne,name:ge,comment:we}},Ge=",",Ve=Ne(",",!1),q=function(P,ne){return ne.unshift(P),ne},W="int",ee=Ne("int",!1),J="uint",fe=Ne("uint",!1),L="short",D=Ne("short",!1),te="ushort",le=Ne("ushort",!1),Be="byte",ve=Ne("byte",!1),Se="ubyte",Re=Ne("ubyte",!1),dt="float",Jt=Ne("float",!1),It="char",$e=Ne("char",!1),kt="string",zt=Ne("string",!1),et="lstring",Ut=Ne("lstring",!1),k="enum",m=Ne("enum",!1),w="double",O=Ne("double",!1),x="bigint",z=Ne("bigint",!1),V="set",ue=Ne("set",!1),G=function(P,ne){return P+" "+ne},X=/^[a-zA-Z_]/,T=ht([["a","z"],["A","Z"],"_"],!1,!1),re=/^[a-zA-Z0-9_]/,_e=ht([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),g=function(P){return ft()},K=/^[^\n\r]/,$=ht([`
|
|
728
|
-
`,"\r"],!0,!1),R=function(P){return P.join("").replace(/^"/,"").replace(/"$/,"")},H=rn("integer"),Z=/^[0-9]/,Te=ht([["0","9"]],!1,!1),be=function(){return parseInt(ft(),10)},xe=rn("whitespace"),Ue=/^[ \t\n\r]/,mn=ht([" "," ",`
|
|
729
|
-
`,"\r"],!1,!1),U=0,Me=0,lt=[{line:1,column:1}],tt=0,Tt=[],ke=0,lr;if("startRule"in o){if(!(o.startRule in s))throw new Error(`Can't start parsing from rule "`+o.startRule+'".');a=s[o.startRule]}function ft(){return r.substring(Me,U)}function Ne(P,ne){return{type:"literal",text:P,ignoreCase:ne}}function ht(P,ne,ge){return{type:"class",parts:P,inverted:ne,ignoreCase:ge}}function kn(){return{type:"end"}}function rn(P){return{type:"other",description:P}}function hc(P){var ne=lt[P],ge;if(ne)return ne;for(ge=P-1;!lt[ge];)ge--;for(ne=lt[ge],ne={line:ne.line,column:ne.column};ge<P;)r.charCodeAt(ge)===10?(ne.line++,ne.column=1):ne.column++,ge++;return lt[P]=ne,ne}function kv(P,ne){var ge=hc(P),we=hc(ne);return{start:{offset:P,line:ge.line,column:ge.column},end:{offset:ne,line:we.line,column:we.column}}}function Le(P){U<tt||(U>tt&&(tt=U,Tt=[]),Tt.push(P))}function jM(P,ne,ge){return new e(e.buildMessage(P,ne),P,ne,ge)}function _v(){var P,ne,ge,we,Fe,nt,ut,yn,Yr,ur,Qr,fr,Zr,hr;return P=U,ne=je(),ne!==i?(ge=Rv(),ge!==i?(we=je(),we!==i?(Fe=Fv(),Fe!==i?(nt=je(),nt!==i?(ut=Du(),ut!==i?(yn=je(),yn!==i?(r.charCodeAt(U)===40?(Yr=c,U++):(Yr=i,ke===0&&Le(l)),Yr!==i?(ur=je(),ur!==i?(Qr=qM(),Qr!==i?(fr=je(),fr!==i?(r.charCodeAt(U)===41?(Zr=u,U++):(Zr=i,ke===0&&Le(f)),Zr!==i?(hr=je(),hr!==i?(Me=P,ne=d(ge,Fe,ut,Qr),P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i),P}function Rv(){var P;return r.substr(U,6)===h?(P=h,U+=6):(P=i,ke===0&&Le(p)),P===i&&(r.substr(U,6)===y?(P=y,U+=6):(P=i,ke===0&&Le(v)),P===i&&(r.substr(U,5)===b?(P=b,U+=5):(P=i,ke===0&&Le(A)))),P}function Fv(){var P,ne,ge,we;return P=_n(),P===i&&(P=U,ne=_n(),ne!==i?(ge=Mv(),ge!==i?(ne=[ne,ge],P=ne):(U=P,P=i)):(U=P,P=i),P===i&&(P=U,ne=_n(),ne!==i?(r.substr(U,4)===S?(ge=S,U+=4):(ge=i,ke===0&&Le(E)),ge!==i?(ne=[ne,ge],P=ne):(U=P,P=i)):(U=P,P=i),P===i&&(P=U,ne=_n(),ne!==i?(ge=Mv(),ge!==i?(r.substr(U,4)===S?(we=S,U+=4):(we=i,ke===0&&Le(E)),we!==i?(ne=[ne,ge,we],P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)))),P}function Mv(){var P;return r.substr(U,7)===I?(P=I,U+=7):(P=i,ke===0&&Le(_)),P===i&&(r.substr(U,5)===B?(P=B,U+=5):(P=i,ke===0&&Le(N)),P===i&&(r.substr(U,6)===F?(P=F,U+=6):(P=i,ke===0&&Le(M)))),P}function Du(){var P;return P=Pv(),P===i&&(P=je()),P}function qM(){var P,ne,ge,we,Fe,nt,ut;if(P=U,ne=F0(),ne!==i)if(ge=je(),ge!==i){for(we=[],Fe=U,nt=je(),nt!==i?(ut=F0(),ut!==i?(Me=Fe,nt=C(ne,ut),Fe=nt):(U=Fe,Fe=i)):(U=Fe,Fe=i);Fe!==i;)we.push(Fe),Fe=U,nt=je(),nt!==i?(ut=F0(),ut!==i?(Me=Fe,nt=C(ne,ut),Fe=nt):(U=Fe,Fe=i)):(U=Fe,Fe=i);we!==i?(Fe=je(),Fe!==i?(Me=P,ne=Y(ne,we),P=ne):(U=P,P=i)):(U=P,P=i)}else U=P,P=i;else U=P,P=i;return P}function WM(){var P;return r.charCodeAt(U)===35?(P=Q,U++):(P=i,ke===0&&Le(oe)),P}function YM(){var P,ne,ge,we,Fe;return P=U,ne=je(),ne!==i?(ge=WM(),ge!==i?(we=Pv(),we!==i?(Fe=je(),Fe!==i?(ne=[ne,ge,we,Fe],P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i),P}function F0(){var P,ne,ge,we,Fe,nt,ut,yn,Yr,ur,Qr,fr,Zr,hr;return P=U,ne=M0(),ne!==i?(ge=je(),ge!==i?(we=_n(),we!==i?(Fe=je(),Fe!==i?(r.charCodeAt(U)===59?(nt=se,U++):(nt=i,ke===0&&Le(ae)),nt!==i?(ut=je(),ut!==i?(yn=Du(),yn!==i?(Me=P,ne=ce(ne,we,yn),P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i),P===i&&(P=U,ne=M0(),ne!==i?(ge=je(),ge!==i?(r.charCodeAt(U)===91?(we=ye,U++):(we=i,ke===0&&Le(de)),we!==i?(Fe=je(),Fe!==i?(nt=ZM(),nt!==i?(ut=je(),ut!==i?(r.charCodeAt(U)===93?(yn=Ce,U++):(yn=i,ke===0&&Le(me)),yn!==i?(Yr=je(),Yr!==i?(ur=_n(),ur!==i?(Qr=je(),Qr!==i?(r.charCodeAt(U)===59?(fr=se,U++):(fr=i,ke===0&&Le(ae)),fr!==i?(Zr=je(),Zr!==i?(hr=Du(),hr!==i?(Me=P,ne=Ee(ne,nt,ur,hr),P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i),P===i&&(P=U,ne=M0(),ne!==i?(ge=je(),ge!==i?(r.charCodeAt(U)===40?(we=c,U++):(we=i,ke===0&&Le(l)),we!==i?(Fe=je(),Fe!==i?(nt=QM(),nt!==i?(ut=je(),ut!==i?(r.charCodeAt(U)===41?(yn=u,U++):(yn=i,ke===0&&Le(f)),yn!==i?(Yr=je(),Yr!==i?(ur=_n(),ur!==i?(Qr=je(),Qr!==i?(r.charCodeAt(U)===59?(fr=se,U++):(fr=i,ke===0&&Le(ae)),fr!==i?(Zr=je(),Zr!==i?(hr=Du(),hr!==i?(Me=P,ne=De(ne,nt,ur,hr),P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i),P===i&&(P=YM()))),P}function QM(){var P,ne,ge,we,Fe,nt,ut;if(P=U,ne=_n(),ne!==i){for(ge=[],we=U,r.charCodeAt(U)===44?(Fe=Ge,U++):(Fe=i,ke===0&&Le(Ve)),Fe!==i?(nt=je(),nt!==i?(ut=_n(),ut!==i?(Me=we,Fe=C(ne,ut),we=Fe):(U=we,we=i)):(U=we,we=i)):(U=we,we=i);we!==i;)ge.push(we),we=U,r.charCodeAt(U)===44?(Fe=Ge,U++):(Fe=i,ke===0&&Le(Ve)),Fe!==i?(nt=je(),nt!==i?(ut=_n(),ut!==i?(Me=we,Fe=C(ne,ut),we=Fe):(U=we,we=i)):(U=we,we=i)):(U=we,we=i);ge!==i?(Me=P,ne=q(ne,ge),P=ne):(U=P,P=i)}else U=P,P=i;return P}function M0(){var P,ne,ge,we;return r.substr(U,3)===W?(P=W,U+=3):(P=i,ke===0&&Le(ee)),P===i&&(r.substr(U,4)===J?(P=J,U+=4):(P=i,ke===0&&Le(fe)),P===i&&(r.substr(U,5)===L?(P=L,U+=5):(P=i,ke===0&&Le(D)),P===i&&(r.substr(U,6)===te?(P=te,U+=6):(P=i,ke===0&&Le(le)),P===i&&(r.substr(U,4)===Be?(P=Be,U+=4):(P=i,ke===0&&Le(ve)),P===i&&(r.substr(U,5)===Se?(P=Se,U+=5):(P=i,ke===0&&Le(Re)),P===i&&(r.substr(U,5)===dt?(P=dt,U+=5):(P=i,ke===0&&Le(Jt)),P===i&&(r.substr(U,4)===It?(P=It,U+=4):(P=i,ke===0&&Le($e)),P===i&&(r.substr(U,6)===kt?(P=kt,U+=6):(P=i,ke===0&&Le(zt)),P===i&&(r.substr(U,7)===et?(P=et,U+=7):(P=i,ke===0&&Le(Ut)),P===i&&(r.substr(U,4)===k?(P=k,U+=4):(P=i,ke===0&&Le(m)),P===i&&(r.substr(U,6)===w?(P=w,U+=6):(P=i,ke===0&&Le(O)),P===i&&(r.substr(U,6)===x?(P=x,U+=6):(P=i,ke===0&&Le(z)),P===i&&(r.substr(U,3)===V?(P=V,U+=3):(P=i,ke===0&&Le(ue)),P===i&&(P=U,ne=Rv(),ne!==i?(ge=je(),ge!==i?(we=Fv(),we!==i?(Me=P,ne=G(ne,we),P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i))))))))))))))),P}function ZM(){var P;return P=XM(),P===i&&(P=_n()),P}function _n(){var P,ne,ge,we,Fe;if(P=U,ne=U,X.test(r.charAt(U))?(ge=r.charAt(U),U++):(ge=i,ke===0&&Le(T)),ge!==i){for(we=[],re.test(r.charAt(U))?(Fe=r.charAt(U),U++):(Fe=i,ke===0&&Le(_e));Fe!==i;)we.push(Fe),re.test(r.charAt(U))?(Fe=r.charAt(U),U++):(Fe=i,ke===0&&Le(_e));we!==i?(ge=[ge,we],ne=ge):(U=ne,ne=i)}else U=ne,ne=i;return ne!==i&&(Me=P,ne=g()),P=ne,P}function Pv(){var P,ne,ge;for(P=U,ne=[],K.test(r.charAt(U))?(ge=r.charAt(U),U++):(ge=i,ke===0&&Le($));ge!==i;)ne.push(ge),K.test(r.charAt(U))?(ge=r.charAt(U),U++):(ge=i,ke===0&&Le($));return ne!==i&&(Me=P,ne=R(ne)),P=ne,P}function XM(){var P,ne,ge,we;if(ke++,P=U,ne=je(),ne!==i){if(ge=[],Z.test(r.charAt(U))?(we=r.charAt(U),U++):(we=i,ke===0&&Le(Te)),we!==i)for(;we!==i;)ge.push(we),Z.test(r.charAt(U))?(we=r.charAt(U),U++):(we=i,ke===0&&Le(Te));else ge=i;ge!==i?(Me=P,ne=be(),P=ne):(U=P,P=i)}else U=P,P=i;return ke--,P===i&&(ne=i,ke===0&&Le(H)),P}function je(){var P,ne;for(ke++,P=[],Ue.test(r.charAt(U))?(ne=r.charAt(U),U++):(ne=i,ke===0&&Le(mn));ne!==i;)P.push(ne),Ue.test(r.charAt(U))?(ne=r.charAt(U),U++):(ne=i,ke===0&&Le(mn));return ke--,P===i&&(ne=i,ke===0&&Le(xe)),P}if(lr=a(),lr!==i&&U===r.length)return lr;throw lr!==i&&U<r.length&&Le(kn()),jM(Tt,tt<r.length?r.charAt(tt):null,tt<r.length?kv(tt,tt+1):kv(tt,tt))}return i0={SyntaxError:e,parse:n},i0}var Sx=G9();const H9=Xl(Sx),o0=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
|
|
718
|
+
</div>`)}}t()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{t()||(this.loadingIndicatorsElement.style.display="none")},3e3),Ns(e,this.loadingIndicatorsElement)}destroy(){var t;const e=E(this,vt,Mu);this.container.classList.remove("genome-spy"),e.classList.remove("loading");for(const[r,i]of this._keyboardListeners)for(const s of i)document.removeEventListener(r,s);for(this._destructionCallbacks.forEach(r=>r()),this._glHelper.finalize(),(t=this._inputBindingContainer)==null||t.remove();this.container.firstChild;)this.container.firstChild.remove()}async _prepareViewsAndData(){this.spec.genome&&(this.genomeStore=new Y9(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const e=this,t={dataFlow:new vy,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new K9(this._glHelper),requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(a,c,u)=>{this._loadingViews.set(a,{status:c,detail:u}),this._updateLoadingIndicators()},addKeyboardListener:(a,c)=>{document.addEventListener(a,c);let u=this._keyboardListeners.get(a);u||(u=[],this._keyboardListeners.set(a,u)),u.push(c)},addBroadcastListener(a,c){const u=e._extraBroadcastListeners;let l=u.get(a);l||(l=new Set,u.set(a,l)),l.add(c)},removeBroadcastListener(a,c){var l;(l=e._extraBroadcastListeners.get(a))==null||l.delete(c)},isViewConfiguredVisible:e.viewVisibilityPredicate,isViewSpec:a=>e.viewFactory.isViewSpec(a),createOrImportView:async function(a,c,u,l,f){return e.viewFactory.createOrImportView(a,t,c,u,l,f)},highlightView:a=>{var c;if((c=this.container.querySelector(".view-highlight"))==null||c.remove(),a){if(!a.isConfiguredVisible())return;const u=a.coords;if(u){const l=document.createElement("div");l.className="view-highlight",l.style.position="absolute",l.style.left=u.x+"px",l.style.top=u.y+"px",l.style.width=u.width+"px",l.style.height=u.height+"px",l.style.border="1px solid green",l.style.backgroundColor="rgba(0, 255, 0, 0.1)",l.style.pointerEvents="none",this.container.appendChild(l)}}}},r=this.spec;r.datasets&&this.registerNamedDataProvider(a=>r.datasets[a]),this.viewRoot=await t.createOrImportView(r,null,null,Hy),E(this,vt,Mu).style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",O(this,vt,Mx).call(this),pI(this.viewRoot),mI(this.viewRoot),this.viewRoot.getDescendants().forEach(a=>a.configureViewOpacity()),this._glHelper.invalidateSize(),O(this,vt,Rx).call(this);const{dataFlow:s,graphicsPromises:o}=L9(this.viewRoot,t.dataFlow);this.broadcast("dataFlowBuilt",s),await t.fontManager.waitUntilReady(),await G9(this.viewRoot,new Set(s.dataSources)),await gI(o),t.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(a=>$c(a,"size")),this._glHelper.invalidateSize()}async launch(){try{return O(this,vt,Ox).call(this),await this._prepareViewsAndData(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),!0}catch(e){const t=`${e.view?`At "${e.view.getPathString()}": `:""}${e.toString()}`;return console.error(e.stack),_T(this.container,t),!1}finally{E(this,vt,Mu).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const e=this._glHelper.canvas;let t=performance.now(),r=!1;const i=s=>{var c,u;const o=performance.now(),a=o-t<200;if(s instanceof MouseEvent){const l=e.getBoundingClientRect(),f=new at(s.clientX-l.left-e.clientLeft,s.clientY-l.top-e.clientTop);s.type=="mousemove"&&!a&&(this.tooltip.handleMouseMove(s),this._tooltipUpdateRequested=!1,s.buttons==0&&!Ry()&&(this.renderPickingFramebuffer(),this._handlePicking(f.x,f.y)));const d=h=>{this.viewRoot.propagateInteractionEvent(new _9(f,h)),this._tooltipUpdateRequested||this.tooltip.clear()};if(s.type!="wheel"&&this._wheelInertia.cancel(),(s.type=="mousedown"||s.type=="mouseup")&&!Ry())this.renderPickingFramebuffer();else if(s.type=="wheel"){t=o,this._tooltipUpdateRequested=!1;const h=s;if(Math.abs(h.deltaX)>Math.abs(h.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const p=nT(h);this._wheelInertia.setMomentum(h.deltaY*(h.deltaMode?80:1),m=>{const g=new WheelEvent("wheel",{...p,deltaMode:0,deltaX:0,deltaY:m});d(g)}),h.preventDefault();return}}if(s.type=="click"){if(r)return;const h=this._currentHover?{type:s.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(p=>p.name).reverse(),datum:this._currentHover.datum}:{type:s.type,viewPath:null,datum:null};(c=this._eventListeners.get("click"))==null||c.forEach(p=>p(h))}(s.type!="click"||((u=this._mouseDownCoords)==null?void 0:u.subtract(at.fromMouseEvent(s)).length)<3)&&d(s)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu","dblclick"].forEach(s=>e.addEventListener(s,i)),e.addEventListener("mousedown",s=>{this._mouseDownCoords=at.fromMouseEvent(s),this.tooltip.sticky?(this.tooltip.sticky=!1,this.tooltip.clear(),r=!0):r=!1;const o=()=>{document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)};if(s.button==2||s.shiftKey||s.ctrlKey||s.metaKey)o();else if(this.tooltip.visible){const a=setTimeout(()=>{r=!0,this.tooltip.sticky=!0},400),c=()=>clearTimeout(a);document.addEventListener("mouseup",c,{once:!0}),document.addEventListener("mousemove",c,{once:!0})}}),e.addEventListener("dragstart",s=>s.stopPropagation()),e.addEventListener("mouseout",()=>{this.tooltip.clear(),this._currentHover=null})}_handlePicking(e,t){var o;const r=this.dpr,i=p5(this._glHelper.gl,this._glHelper._pickingBufferInfo,e*r,t*r),s=i[0]|i[1]<<8|i[2]<<16|i[3]<<24;if(s==0){this._currentHover=null;return}if(s!==((o=this._currentHover)==null?void 0:o.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(a=>{if(a instanceof ft){if(a.mark.isPickingParticipant()&&[...a.facetCoords.values()].some(c=>c.containsPoint(e,t))){const c=a.getCollector().findDatumByUniqueId(s);c&&(this._currentHover={mark:a.mark,datum:c,uniqueId:s})}if(this._currentHover)return Go}}),this._currentHover){const a=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async c=>{if(!a.isPickingParticipant())return;const u=a.properties.tooltip;if(u!==null){const l=(u==null?void 0:u.handler)??"default",f=this.tooltipHandlers[l];if(!f)throw new Error("No such tooltip handler: "+l);return f(c,a,u==null?void 0:u.params)}})}}updateTooltip(e,t){if(!this._tooltipUpdateRequested||!e)this.tooltip.updateWithDatum(e,t),this._tooltipUpdateRequested=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}exportCanvas(e,t,r,i="white"){const s=this._glHelper;e??(e=s.getLogicalCanvasSize().width),t??(t=s.getLogicalCanvasSize().height),r??(r=window.devicePixelRatio??1);const o=s.gl,a=Math.floor(e*r),c=Math.floor(t*r),u=rm(o,[{format:o.RGBA,type:o.UNSIGNED_BYTE,minMag:o.LINEAR,wrap:o.CLAMP_TO_EDGE}],a,c),l=new gh({picking:!1},{webGLHelper:this._glHelper,canvasSize:{width:e,height:t},devicePixelRatio:r,clearColor:i,framebufferInfo:u});this.viewRoot.render(l,Ft.create(0,0,e,t)),l.render();const f=m5(o,u,"image/png");return this.computeLayout(),this.renderAll(),f}computeLayout(){const e=this.viewRoot;if(!e)return;this.broadcast("layout");const t=this._glHelper.getLogicalCanvasSize();if(isNaN(t.width)||isNaN(t.height)){console.log(`NaN in canvas size: ${t.width}x${t.height}. Skipping computeLayout().`);return}const r={webGLHelper:this._glHelper,canvasSize:t,devicePixelRatio:window.devicePixelRatio??1};this._renderingContext=new gh({picking:!1},{...r,clearColor:this.spec.background}),this._pickingContext=new gh({picking:!0},{...r,framebufferInfo:this._glHelper._pickingBufferInfo}),e.render(new V9(this._renderingContext,this._pickingContext),Ft.create(0,0,t.width,t.height)),this._updateLoadingIndicators(),this.broadcast("layoutComputed")}renderAll(){var e;(e=this._renderingContext)==null||e.render(),this._dirtyPickingBuffer=!0}renderPickingFramebuffer(){this._dirtyPickingBuffer&&(this._pickingContext.render(),this._dirtyPickingBuffer=!1)}getSearchableViews(){const e=[];return this.viewRoot.visit(t=>{t instanceof ft&&t.getDataAccessor("search")&&e.push(t)}),e}getNamedScaleResolutions(){const e=new Map;return this.viewRoot.visit(t=>{for(const r of Object.values(t.resolutions.scale))r.name&&e.set(r.name,r)}),e}}vt=new WeakSet,Mu=function(){return this.container.querySelector(".canvas-wrapper")},Mx=function(){const e=[];this.viewRoot.visit(r=>{const i=r.paramMediator;e.push(...VT(i))});const t=this.options.inputBindingContainer;if(!(!t||t=="none"||!e.length)){if(this._inputBindingContainer=cu("div",{className:"gs-input-bindings"}),t=="default")this.container.appendChild(this._inputBindingContainer);else if(t instanceof HTMLElement)t.appendChild(this._inputBindingContainer);else throw new Error("Invalid inputBindingContainer");e.length&&Ns(ye`<div class="gs-input-binding">${e}</div>`,this._inputBindingContainer)}},Rx=function(){const e=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",this.dpr),t=()=>{this._glHelper.invalidateSize(),this.dpr=window.devicePixelRatio,e(this.dpr),this.computeLayout(),this.renderAll()};if(this.viewRoot.getSize().isGrowing()){const s=new ResizeObserver(t);s.observe(this.container),this._destructionCallbacks.push(()=>s.disconnect())}let r=null;const i=()=>{r!=null&&(r(),t());const s=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);s.addEventListener("change",i),r=()=>{s.removeEventListener("change",i)}};i(),r&&this._destructionCallbacks.push(r)},Ox=function(){this.container.classList.add("genome-spy");const e=document.createElement("style");e.innerHTML=qv,this.container.appendChild(e);const t=cu("div",{class:"canvas-wrapper"});this.container.appendChild(t),t.classList.add("loading"),this._glHelper=new f5(t,()=>this.viewRoot?bI(this.viewRoot):{width:void 0,height:void 0},{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=cu("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),t.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=cu("div",{class:"loading-indicators"}),t.appendChild(this.loadingIndicatorsElement),this.tooltip=new Xv(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function _T(n,e){const t=document.createElement("div");t.className="message-box";const r=document.createElement("div");r.textContent=e,t.appendChild(r),n.appendChild(t)}function cu(n,e){const t=document.createElement(n);for(const[r,i]of Object.entries(e))["innerHTML","innerText","className"].includes(r)&&(t[r]=i),t.setAttribute(r,i);return t}const jT="data:image/svg+xml,%3csvg%20viewBox='0%200%2032%2032'%20xmlns='http://www.w3.org/2000/svg'%20fill-rule='evenodd'%20clip-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='1.5'%3e%3cpath%20d='M4.7%2021.2s.4%202.3%201.3%203.6C7%2026%209.8%2028%209.8%2028s3.4-2.6%206.4-8.5c0%200%201%20.1%201.9-.4.9-.6.8-.4%201-1.2%200%200%202.9.5%206.6%200%202.1-.3%204.3-1%206.2-2.5%200%200-1.1-1.7-2.5-5.1-.5-1.3-2-1.8-4.6-4.6l-8.2%208.6-11.9%206.9z'%20fill-opacity='.1'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='%237fbbdd'/%3e%3cpath%20d='M12.4%2015.5c-.7-.5-2.4-.8-4.4-.4-2%20.4-4%201.3-4.8%201.8-.5.3-1.2%201-1.2%201.4%200%20.7.3%201.8.8%202.4.3.3.7.5%201.4.6.8%200%202.5-1.4%203.5-2%201-.6%201.6-.8%202.7-1.2l-2.9%202.4c-1.3%201.2-2.2%201.5-2.4%202.3%200%20.5%200%201.4.5%201.8.4.5.6.8%201.6.8.6%200%201%200%202.6-1.5.9-.9%202.3-3%202.7-3.7.6-1.1%201-2.2.7-3-.2-1-.4-1.4-.8-1.7zM17.4%2014.2c-.3-.5-.9-1.2-.2-2.5l1.9-3c.5-.8%202-2.3%202.6-2.6.6-.4%201.5-.6%202-.2.6.4%201%201%201.3%201.5.4.6.7%201.3.2%202-.7%201-1.6.9-2.8%201.7-1.2.8-1.9%201.2-2.5%201.9l3.8-1.8c1.3-.6%202.7-1.1%203.4-.7.8.5.8.7%201%201.4.3%201-.2%201.9-.8%202.4-.5.6-1.5.9-2.6%201.2-1.4.4-4.5%201-5.8.5-1.3-.5-1.3-1.4-1.5-1.8z'%20fill='%23fff'/%3e%3cpath%20d='M12.7%2014.8s-4-1.8-12%202.7c0%200%201%203.7%202.5%205.3%201.4%201.5%202.3%203.6%204.6%204.6%200%200%204.7-3%206.9-9.2l3-2s4.7%202.8%2012.6-1.6c0%200-.6-3.3-3-6-2.6-3-3.8-4.7-3.8-4.7s-4.1%202.3-7.5%209.3l-3.3%201.6z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='%237fbbdd'/%3e%3cpath%20d='M13.8%2015.3c.9.8.6%202%201.4%201.8%201-.2%201.4-.8%201.3-1.5%200-.7%200-.8-.4-1.6-.3-.7-1-1.1-2-.5-.7.5-1.4%201.3-1.4%201.3s.2-.3%201.1.5z'%20fill='%23fff'/%3e%3cpath%20d='M12.4%2014.9s2.1-2%203-2c1.1%200%202.3%202.7%202.3%203.5%200%20.8-2.1%202.4-3.1%202.3%200%200%200-1.2-.7-2.6-.8-1.3-1.5-1.2-1.5-1.2z'%20fill='none'%20stroke='%23000'%20stroke-width='.5'/%3e%3c/svg%3e",QT="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5'%20viewBox='0%200%2064%2064'%3e%3cpath%20d='M208.6%20548.2s11.2%2046.2%2031.2%2071c20%2024.9%2079.3%2061.6%2079.3%2061.6S385.6%20623%20438%20498.3c0%200%2018.1%201%2036-11.9%2017.7-12.7%2016.3-7.9%2021-24.8%200%200%2057%206.3%20131-9.7%2041.7-9.1%2084.3-26.3%20121.5-58.8%200%200-25.4-32.9-58-101.7-12.4-26.1-41.9-34.3-98.7-88L438.1%20391.2%20208.6%20548.2Z'%20style='fill-opacity:.11'%20transform='matrix(.10221%20.00684%20-.00671%20.10035%20-8%20-13.2)'/%3e%3cg%20transform='rotate(-35.4%2034.2%2080.8)%20scale(.10057)'%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'%20style='fill:%237fbbdd'/%3e%3cclipPath%20id='a'%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23a)'%3e%3cpath%20d='M386.9%20397.2c-15.6-13.6-51.8-22.4-96.3-16.7-44.5%205.8-93.8%2021.8-111.8%2031.6-10.6%205.7-27.3%2017.3-28.1%2027.2-1.2%2014.2%202.9%2037.8%2015%2052%206%207.2%2014.2%2012.1%2028.1%2014.1%2017.9%202.6%2059-24.8%2081.6-36.2%2024-12%2038.6-14.6%2063-22.2%200%200-47%2031.6-68.2%2047.4-30.6%2022.9-51.6%2028-57.3%2045.5-3.1%209.4-.7%2027.9%207.5%2037.6%209%2011%2012.8%2017.6%2034.2%2020.1%2012.7%201.5%2022%201.2%2059.8-28.6%2021.7-17.2%2055.9-59.2%2067-74.4%2016.2-22%2023.8-43.1%2021.3-59.6-3.7-23.6-8.4-31.3-15.8-37.8Z'%20style='fill:%23fff'%20transform='scale(.88664)%20rotate(31.2%20485%20792.2)'/%3e%3cpath%20d='M484.7%20379c-5.4-11.1-17.6-28.5-.8-53.8a739%20739%200%200%201%2044.2-60.6c13.2-16.3%2046.7-46.2%2059.6-52%2013-6%2033.3-8.7%2044.2.2%2011%209.1%2016.5%2020.6%2023%2032.7%207.4%2013.8%2012.4%2029.3%201.6%2042.8-15.4%2019.2-34.3%2017-61.6%2031.5-27.7%2014.8-42.3%2023.1-55.7%2035.9%200%200%2052.2-21.6%2082-31.2%2029.8-9.7%2059.8-20%2074.8-8.5s14.6%2015.5%2018.4%2031.2c4.7%2019.4-7.2%2038-20.1%2048.6-13%2010.7-34.3%2016-57.4%2021-30.5%206.8-96.6%2015.1-124%202.6-27.5-12.6-24.4-32.8-28.2-40.5Z'%20style='fill:%23fff'%20transform='scale(.87906)%20rotate(31.2%20487.2%20893.5)'/%3e%3c/g%3e%3cpath%20d='M561.6%20349.2s-45.3-77.9-232.8-97.2c0%200-26.5%2073.2-21.1%20116%205.3%2043-4.7%2088.1%2021.4%20133.2%200%200%20114%205.5%20225.5-72.7l74.6%203.6S673.8%20534.4%20857%20554.4c0%200%2029.7-62.6%2022.2-137-8-78.7-7.5-124-7.5-124s-96.2-9.5-236.3%2068.4l-73.8-12.6Z'%20style='fill:none;stroke:%23000;stroke-width:16.57px'/%3e%3c/g%3e%3cg%20transform='rotate(-4.2%20-78%20211)%20scale(.10057)'%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'%20style='fill:%237fbbdd'/%3e%3cclipPath%20id='b'%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23b)'%3e%3cpath%20d='M413.3%20402.7c17.5%2018.9%2010%2045.7%2028.4%2043.4%2021.7-2.7%2030.9-15.7%2031.6-32.7.7-17-1-19.5-7.1-38-6.1-18.7-18.2-23.2-43.4-18.2-20.8%204.1-17.8%203-24%2010-6.4%207-14.5%2026-14.5%2026s8.4-12.7%2029%209.5Z'%20style='fill:%23fff'%20transform='matrix(.90907%200%200%20.85852%2037%2052.2)'/%3e%3c/g%3e%3cpath%20d='M385%20385.5s45.8-37.6%2065-35.4c21.7%202.5%2040.5%2057.6%2040.2%2074.3-.3%2016.7-47.3%2045.5-67.7%2041.8%200%200%203-24-10.4-52.9-13.4-28.8-27.2-27.8-27.2-27.8Z'%20style='fill:none;stroke:%23000;stroke-width:16.57px'/%3e%3c/g%3e%3c/svg%3e";async function WT(n,e,t={}){let r;if(me(n)){if(r=document.querySelector(n),!r)throw new Error(`No such element: ${n}`)}else if(n instanceof HTMLElement)r=n;else throw new Error(`Invalid element: ${n}`);let i;try{const s=Ge(e)?e:await Qy(e);if(s.baseUrl??(s.baseUrl=""),s.width??(s.width="container"),s.padding??(s.padding=10),r==document.body){const o=document.createElement("div");o.style.position="fixed",o.style.inset="0",o.style.overflow="hidden",r.appendChild(o),r=o}i=new jy(r,s,t),qT(i,t),await i.launch()}catch(s){r.innerText=s.toString(),console.error(s)}return{finalize(){for(i.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(s,o){const a=i._eventListeners;let c=a.get(s);c||(c=new Set,a.set(s,c)),c.add(o)},removeEventListener(s,o){var c;(c=i._eventListeners.get(s))==null||c.delete(o)},getScaleResolutionByName(s){return i.getNamedScaleResolutions().get(s)},updateNamedData:i.updateNamedData.bind(i),exportCanvas:i.exportCanvas.bind(i)}}function qT(n,e){e.namedDataProvider&&n.registerNamedDataProvider(e.namedDataProvider)}async function Qy(n){let e;try{const t=await fetch(n);if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);e=await t.json()}catch(t){throw new Error(`Could not load or parse configuration: ${n}, reason: ${t.message}`)}if(!e.baseUrl){const t=n.match(/^[^?#]*\//);e.baseUrl=t&&t[0]||"./"}return e}class YT{constructor(e){this.blob=e,this.size=e.size}async read(e,t=0){if(!e)return new Uint8Array(0);const r=t,i=r+e;return new Uint8Array(await this.blob.slice(r,i).arrayBuffer())}async readFile(e){const t=typeof e=="string"?e:e==null?void 0:e.encoding;if(t==="utf8")return this.blob.text();if(t)throw new Error(`unsupported encoding: ${t}`);return new Uint8Array(await this.blob.arrayBuffer())}async stat(){return{size:this.size}}async close(){}}function Wy(n){return(typeof n=="object"&&n!==null&&"message"in n?n.message:`${n}`).replace(/\.$/,"")}class Yt{constructor(e,t={}){this.baseOverrides={},this.url=e;const r=t.fetch||globalThis.fetch.bind(globalThis);t.overrides&&(this.baseOverrides=t.overrides),this.fetchImplementation=r}async fetch(e,t){let r;try{r=await this.fetchImplementation(e,t)}catch(i){if(`${i}`.includes("Failed to fetch")){console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);try{r=await this.fetchImplementation(e,{...t,cache:"reload"})}catch(s){throw new Error(`${Wy(s)} fetching ${e}`,{cause:s})}}else throw new Error(`${Wy(i)} fetching ${e}`,{cause:i})}return r}async read(e,t,r={}){const{headers:i={},signal:s,overrides:o={}}=r;e<1/0?i.range=`bytes=${t}-${t+e}`:e===1/0&&t!==0&&(i.range=`bytes=${t}-`);const a=await this.fetch(this.url,{...this.baseOverrides,...o,headers:{...i,...o.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s});if(!a.ok)throw new Error(`HTTP ${a.status} fetching ${this.url}`);if(a.status===200&&t===0||a.status===206){const c=await a.arrayBuffer(),u=a.headers.get("content-range"),l=/\/(\d+)$/.exec(u||"");return l!=null&&l[1]&&(this._stat={size:parseInt(l[1],10)}),new Uint8Array(c.slice(0,e))}throw a.status===200?new Error(`${this.url} fetch returned status 200, expected 206`):new Error(`HTTP ${a.status} fetching ${this.url}`)}async readFile(e={}){let t,r;typeof e=="string"?(t=e,r={}):(t=e.encoding,r=e,delete r.encoding);const{headers:i={},signal:s,overrides:o={}}=r,a=await this.fetch(this.url,{headers:i,method:"GET",redirect:"follow",mode:"cors",signal:s,...this.baseOverrides,...o});if(a.status!==200)throw new Error(`HTTP ${a.status} fetching ${this.url}`);if(t==="utf8")return a.text();if(t)throw new Error(`unsupported encoding: ${t}`);return new Uint8Array(await a.arrayBuffer())}async stat(){if(!this._stat&&(await this.read(10,0),!this._stat))throw new Error(`unable to determine size of file at ${this.url}`);return this._stat}async close(){}}class qe{readFile(){throw new Error("unimplemented")}read(){throw new Error("unimplemented")}close(){throw new Error("unimplemented")}}const _o=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:YT,LocalFile:qe,RemoteFile:Yt},Symbol.toStringTag,{value:"Module"})),qy=65536,XT=qy*qy;function Ch(n,e=0){const t=n[e]|n[e+1]<<8|n[e+2]<<16|n[e+3]<<24;return((n[e+4]|n[e+5]<<8|n[e+6]<<16|n[e+7]<<24)>>>0)*XT+(t>>>0)}const uu=1;function Yy(n,e,t){const r=e[uu],i=t?t[uu]:1/0;return r<=n&&i>n?0:r<n?-1:1}class ZT{constructor({filehandle:e}){Y(this,"filehandle");Y(this,"index");this.filehandle=e}_getIndex(){return this.index||(this.index=this._readIndex().catch(e=>{throw this.index=void 0,e})),this.index}async _readIndex(){const e=await this.filehandle.read(8,0),t=Ch(e);if(!t)return[[0,0]];const r=new Array(t+1);r[0]=[0,0];const i=8*2*t;if(i>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");const s=await this.filehandle.read(i,8);for(let o=0;o<t;o+=1){const a=Ch(s,o*16),c=Ch(s,o*16+8);r[o+1]=[a,c]}return r}async getLastBlock(){return(await this._getIndex()).at(-1)}async getRelevantBlocksForRead(e,t){const r=t+e;if(e===0)return[];const i=await this._getIndex(),s=[];let o=0,a=i.length-1,c=Math.floor(i.length/2),u=Yy(t,i[c],i[c+1]);for(;u!==0;)u>0?a=c-1:u<0&&(o=c+1),c=Math.ceil((a-o)/2)+o,u=Yy(t,i[c],i[c+1]);s.push(i[c]);let l=c+1;for(;l<i.length&&(s.push(i[l]),!(i[l][uu]>=r));l+=1);return s[s.length-1][uu]<r&&s.push([]),s}}var Xy=0,zr=2,lu=4,Ur=0,fu=1,KT=2,JT=-5;function $T(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function eB(n){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(var r in t)$T(t,r)&&(n[r]=t[r])}}return n}function Zy(n,e){return n.length===e?n:n.subarray?n.subarray(0,e):(n.length=e,n)}var jo={arraySet:function(n,e,t,r,i){if(e.subarray&&n.subarray){n.set(e.subarray(t,t+r),i);return}for(var s=0;s<r;s++)n[i+s]=e[t+s]},flattenChunks:function(n){var e,t,r,i,s,o;for(r=0,e=0,t=n.length;e<t;e++)r+=n[e].length;for(o=new Uint8Array(r),i=0,e=0,t=n.length;e<t;e++)s=n[e],o.set(s,i),i+=s.length;return o},Buf8:function(n){return new Uint8Array(n)},Buf16:function(n){return new Uint16Array(n)},Buf32:function(n){return new Int32Array(n)}},Qo={arraySet:function(n,e,t,r,i){for(var s=0;s<r;s++)n[i+s]=e[t+s]},flattenChunks:function(n){return[].concat.apply([],n)},Buf8:function(n){return new Array(n)},Buf16:function(n){return new Array(n)},Buf32:function(n){return new Array(n)}};let Oi=()=>{const n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";return Oi=()=>n,n},Yn=(n,e,t,r,i)=>(Yn=Oi()?jo.arraySet:Qo.arraySet,Yn(n,e,t,r,i)),Dh=n=>(Dh=Oi()?jo.flattenChunks:Qo.flattenChunks,Dh(n)),Ni=n=>(Ni=Oi()?jo.Buf8:Qo.Buf8,Ni(n)),Li=n=>(Li=Oi()?jo.Buf16:Qo.Buf16,Li(n)),zi=n=>(zi=Oi()?jo.Buf32:Qo.Buf32,zi(n)),Ky=function(){let n=!0;try{String.fromCharCode.apply(null,[0])}catch{n=!1}return Ky=()=>n,n},Jy=function(){let n=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}return Jy=()=>n,n},Ih=function(n){for(var e=Ni(256),t=0;t<256;t++)e[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;return e[254]=e[254]=1,Ih=r=>e[r],e[n]};function $y(n){var e,t,r,i,s,o=n.length,a=0;for(i=0;i<o;i++)t=n.charCodeAt(i),(t&64512)===55296&&i+1<o&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(t=65536+(t-55296<<10)+(r-56320),i++)),a+=t<128?1:t<2048?2:t<65536?3:4;for(e=new Uint8Array(a),s=0,i=0;s<a;i++)t=n.charCodeAt(i),(t&64512)===55296&&i+1<o&&(r=n.charCodeAt(i+1),(r&64512)===56320&&(t=65536+(t-55296<<10)+(r-56320),i++)),t<128?e[s++]=t:t<2048?(e[s++]=192|t>>>6,e[s++]=128|t&63):t<65536?(e[s++]=224|t>>>12,e[s++]=128|t>>>6&63,e[s++]=128|t&63):(e[s++]=240|t>>>18,e[s++]=128|t>>>12&63,e[s++]=128|t>>>6&63,e[s++]=128|t&63);return e}function tB(n,e){if(e<65534&&(n.subarray&&Jy()||!n.subarray&&Ky()))return String.fromCharCode.apply(null,Zy(n,e));for(var t="",r=0;r<e;r++)t+=String.fromCharCode(n[r]);return t}function nB(n){for(var e=new Uint8Array(n.length),t=0,r=e.length;t<r;t++)e[t]=n.charCodeAt(t);return e}function rB(n,e){var t,r,i,s,o=e||n.length,a=new Array(o*2);for(r=0,t=0;t<o;){if(i=n[t++],i<128){a[r++]=i;continue}if(s=Ih(i),s>4){a[r++]=65533,t+=s-1;continue}for(i&=s===2?31:s===3?15:7;s>1&&t<o;)i=i<<6|n[t++]&63,s--;if(s>1){a[r++]=65533;continue}i<65536?a[r++]=i:(i-=65536,a[r++]=55296|i>>10&1023,a[r++]=56320|i&1023)}return tB(a,r)}function iB(n,e){var t;for(e=e||n.length,e>n.length&&(e=n.length),t=e-1;t>=0&&(n[t]&192)===128;)t--;return t<0||t===0?e:t+Ih(n[t])>e?t:e}function sB(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}function Th(n,e,t,r){for(var i=n&65535|0,s=n>>>16&65535|0,o=0;t!==0;){o=t>2e3?2e3:t,t-=o;do i=i+e[r++]|0,s=s+i|0;while(--o);i%=65521,s%=65521}return i|s<<16|0}function oB(){for(var n,e=[],t=0;t<256;t++){n=t;for(var r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;e[t]=n}return e}let e2=function(){const n=oB();return e2=()=>n,n};function Xt(n,e,t,r){var i=e2(),s=r+t;n^=-1;for(var o=r;o<s;o++)n=n>>>8^i[(n^e[o])&255];return n^-1}var hu=30,aB=12;function cB(n,e){var t,r,i,s,o,a,c,u,l,f,d,h,p,m,g,y,x,A,w,S,C,v,T,P,F;t=n.state,r=n.next_in,P=n.input,i=r+(n.avail_in-5),s=n.next_out,F=n.output,o=s-(e-n.avail_out),a=s+(n.avail_out-257),c=t.dmax,u=t.wsize,l=t.whave,f=t.wnext,d=t.window,h=t.hold,p=t.bits,m=t.lencode,g=t.distcode,y=(1<<t.lenbits)-1,x=(1<<t.distbits)-1;e:do{p<15&&(h+=P[r++]<<p,p+=8,h+=P[r++]<<p,p+=8),A=m[h&y];t:for(;;){if(w=A>>>24,h>>>=w,p-=w,w=A>>>16&255,w===0)F[s++]=A&65535;else if(w&16){S=A&65535,w&=15,w&&(p<w&&(h+=P[r++]<<p,p+=8),S+=h&(1<<w)-1,h>>>=w,p-=w),p<15&&(h+=P[r++]<<p,p+=8,h+=P[r++]<<p,p+=8),A=g[h&x];n:for(;;){if(w=A>>>24,h>>>=w,p-=w,w=A>>>16&255,w&16){if(C=A&65535,w&=15,p<w&&(h+=P[r++]<<p,p+=8,p<w&&(h+=P[r++]<<p,p+=8)),C+=h&(1<<w)-1,C>c){n.msg="invalid distance too far back",t.mode=hu;break e}if(h>>>=w,p-=w,w=s-o,C>w){if(w=C-w,w>l&&t.sane){n.msg="invalid distance too far back",t.mode=hu;break e}if(v=0,T=d,f===0){if(v+=u-w,w<S){S-=w;do F[s++]=d[v++];while(--w);v=s-C,T=F}}else if(f<w){if(v+=u+f-w,w-=f,w<S){S-=w;do F[s++]=d[v++];while(--w);if(v=0,f<S){w=f,S-=w;do F[s++]=d[v++];while(--w);v=s-C,T=F}}}else if(v+=f-w,w<S){S-=w;do F[s++]=d[v++];while(--w);v=s-C,T=F}for(;S>2;)F[s++]=T[v++],F[s++]=T[v++],F[s++]=T[v++],S-=3;S&&(F[s++]=T[v++],S>1&&(F[s++]=T[v++]))}else{v=s-C;do F[s++]=F[v++],F[s++]=F[v++],F[s++]=F[v++],S-=3;while(S>2);S&&(F[s++]=F[v++],S>1&&(F[s++]=F[v++]))}}else if(w&64){n.msg="invalid distance code",t.mode=hu;break e}else{A=g[(A&65535)+(h&(1<<w)-1)];continue n}break}}else if(w&64)if(w&32){t.mode=aB;break e}else{n.msg="invalid literal/length code",t.mode=hu;break e}else{A=m[(A&65535)+(h&(1<<w)-1)];continue t}break}}while(r<i&&s<a);S=p>>3,r-=S,p-=S<<3,h&=(1<<p)-1,n.next_in=r,n.next_out=s,n.avail_in=r<i?5+(i-r):5-(r-i),n.avail_out=s<a?257+(a-s):257-(s-a),t.hold=h,t.bits=p}var Ui=15,t2=852,n2=592,r2=0,Bh=1,i2=2,uB=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],lB=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],fB=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],hB=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function Wo(n,e,t,r,i,s,o,a){var c=a.bits,u=0,l=0,f=0,d=0,h=0,p=0,m=0,g=0,y=0,x=0,A,w,S,C,v,T=null,P=0,F,k=Li(Ui+1),L=Li(Ui+1),U=null,j=0,K,_,te;for(u=0;u<=Ui;u++)k[u]=0;for(l=0;l<r;l++)k[e[t+l]]++;for(h=c,d=Ui;d>=1&&k[d]===0;d--);if(h>d&&(h=d),d===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,a.bits=1,0;for(f=1;f<d&&k[f]===0;f++);for(h<f&&(h=f),g=1,u=1;u<=Ui;u++)if(g<<=1,g-=k[u],g<0)return-1;if(g>0&&(n===r2||d!==1))return-1;for(L[1]=0,u=1;u<Ui;u++)L[u+1]=L[u]+k[u];for(l=0;l<r;l++)e[t+l]!==0&&(o[L[e[t+l]]++]=l);if(n===r2?(T=U=o,F=19):n===Bh?(T=uB,P-=257,U=lB,j-=257,F=256):(T=fB,U=hB,F=-1),x=0,l=0,u=f,v=s,p=h,m=0,S=-1,y=1<<h,C=y-1,n===Bh&&y>t2||n===i2&&y>n2)return 1;for(;;){K=u-m,o[l]<F?(_=0,te=o[l]):o[l]>F?(_=U[j+o[l]],te=T[P+o[l]]):(_=96,te=0),A=1<<u-m,w=1<<p,f=w;do w-=A,i[v+(x>>m)+w]=K<<24|_<<16|te|0;while(w!==0);for(A=1<<u-1;x&A;)A>>=1;if(A!==0?(x&=A-1,x+=A):x=0,l++,--k[u]===0){if(u===d)break;u=e[t+o[l]]}if(u>h&&(x&C)!==S){for(m===0&&(m=h),v+=f,p=u-m,g=1<<p;p+m<d&&(g-=k[p+m],!(g<=0));)p++,g<<=1;if(y+=1<<p,n===Bh&&y>t2||n===i2&&y>n2)return 1;S=x&C,i[S]=h<<24|p<<16|v-s|0}}return x!==0&&(i[v+x]=u-m<<24|64<<16|0),a.bits=h,0}var dB=0,s2=1,o2=2,a2=4,Gr=0,pB=1,mB=2,xt=-2,c2=-3,u2=-4,gB=-5,l2=8,f2=1,h2=2,d2=3,p2=4,m2=5,g2=6,y2=7,b2=8,x2=9,A2=10,du=11,hn=12,kh=13,w2=14,Fh=15,v2=16,S2=17,E2=18,C2=19,pu=20,mu=21,D2=22,I2=23,T2=24,B2=25,k2=26,Ph=27,F2=28,P2=29,Ae=30,M2=31,yB=32,bB=852,xB=592;function R2(n){return(n>>>24&255)+(n>>>8&65280)+((n&65280)<<8)+((n&255)<<24)}function AB(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=Li(320),this.work=Li(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function wB(n){var e;return!n||!n.state?xt:(e=n.state,n.total_in=n.total_out=e.total=0,n.msg="",e.wrap&&(n.adler=e.wrap&1),e.mode=f2,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=zi(bB),e.distcode=e.distdyn=zi(xB),e.sane=1,e.back=-1,Gr)}function vB(n){var e;return!n||!n.state?xt:(e=n.state,e.wsize=0,e.whave=0,e.wnext=0,wB(n))}function SB(n,e){var t,r;return!n||!n.state||(r=n.state,e<0?(t=0,e=-e):(t=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?xt:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=t,r.wbits=e,vB(n))}function EB(n,e){var t,r;return n?(r=new AB,n.state=r,r.window=null,t=SB(n,e),t!==Gr&&(n.state=null),t):xt}var O2=!0,Mh,Rh;function CB(n){if(O2){var e;for(Mh=zi(512),Rh=zi(32),e=0;e<144;)n.lens[e++]=8;for(;e<256;)n.lens[e++]=9;for(;e<280;)n.lens[e++]=7;for(;e<288;)n.lens[e++]=8;for(Wo(s2,n.lens,0,288,Mh,0,n.work,{bits:9}),e=0;e<32;)n.lens[e++]=5;Wo(o2,n.lens,0,32,Rh,0,n.work,{bits:5}),O2=!1}n.lencode=Mh,n.lenbits=9,n.distcode=Rh,n.distbits=5}function N2(n,e,t,r){var i,s=n.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=Ni(s.wsize)),r>=s.wsize?(Yn(s.window,e,t-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),Yn(s.window,e,t-r,i,s.wnext),r-=i,r?(Yn(s.window,e,t-r,r,0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}function DB(n,e){var t,r,i,s,o,a,c,u,l,f,d,h,p,m,g=0,y,x,A,w,S,C,v,T,P=Ni(4),F,k,L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!n||!n.state||!n.output||!n.input&&n.avail_in!==0)return xt;t=n.state,t.mode===hn&&(t.mode=kh),o=n.next_out,i=n.output,c=n.avail_out,s=n.next_in,r=n.input,a=n.avail_in,u=t.hold,l=t.bits,f=a,d=c,T=Gr;e:for(;;)switch(t.mode){case f2:if(t.wrap===0){t.mode=kh;break}for(;l<16;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}if(t.wrap&2&&u===35615){t.check=0,P[0]=u&255,P[1]=u>>>8&255,t.check=Xt(t.check,P,2,0),u=0,l=0,t.mode=h2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(t.wrap&1)||(((u&255)<<8)+(u>>8))%31){n.msg="incorrect header check",t.mode=Ae;break}if((u&15)!==l2){n.msg="unknown compression method",t.mode=Ae;break}if(u>>>=4,l-=4,v=(u&15)+8,t.wbits===0)t.wbits=v;else if(v>t.wbits){n.msg="invalid window size",t.mode=Ae;break}t.dmax=1<<v,n.adler=t.check=1,t.mode=u&512?A2:hn,u=0,l=0;break;case h2:for(;l<16;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}if(t.flags=u,(t.flags&255)!==l2){n.msg="unknown compression method",t.mode=Ae;break}if(t.flags&57344){n.msg="unknown header flags set",t.mode=Ae;break}t.head&&(t.head.text=u>>8&1),t.flags&512&&(P[0]=u&255,P[1]=u>>>8&255,t.check=Xt(t.check,P,2,0)),u=0,l=0,t.mode=d2;case d2:for(;l<32;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}t.head&&(t.head.time=u),t.flags&512&&(P[0]=u&255,P[1]=u>>>8&255,P[2]=u>>>16&255,P[3]=u>>>24&255,t.check=Xt(t.check,P,4,0)),u=0,l=0,t.mode=p2;case p2:for(;l<16;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}t.head&&(t.head.xflags=u&255,t.head.os=u>>8),t.flags&512&&(P[0]=u&255,P[1]=u>>>8&255,t.check=Xt(t.check,P,2,0)),u=0,l=0,t.mode=m2;case m2:if(t.flags&1024){for(;l<16;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}t.length=u,t.head&&(t.head.extra_len=u),t.flags&512&&(P[0]=u&255,P[1]=u>>>8&255,t.check=Xt(t.check,P,2,0)),u=0,l=0}else t.head&&(t.head.extra=null);t.mode=g2;case g2:if(t.flags&1024&&(h=t.length,h>a&&(h=a),h&&(t.head&&(v=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),Yn(t.head.extra,r,s,h,v)),t.flags&512&&(t.check=Xt(t.check,r,h,s)),a-=h,s+=h,t.length-=h),t.length))break e;t.length=0,t.mode=y2;case y2:if(t.flags&2048){if(a===0)break e;h=0;do v=r[s+h++],t.head&&v&&t.length<65536&&(t.head.name+=String.fromCharCode(v));while(v&&h<a);if(t.flags&512&&(t.check=Xt(t.check,r,h,s)),a-=h,s+=h,v)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=b2;case b2:if(t.flags&4096){if(a===0)break e;h=0;do v=r[s+h++],t.head&&v&&t.length<65536&&(t.head.comment+=String.fromCharCode(v));while(v&&h<a);if(t.flags&512&&(t.check=Xt(t.check,r,h,s)),a-=h,s+=h,v)break e}else t.head&&(t.head.comment=null);t.mode=x2;case x2:if(t.flags&512){for(;l<16;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}if(u!==(t.check&65535)){n.msg="header crc mismatch",t.mode=Ae;break}u=0,l=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),n.adler=t.check=0,t.mode=hn;break;case A2:for(;l<32;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}n.adler=t.check=R2(u),u=0,l=0,t.mode=du;case du:if(t.havedict===0)return n.next_out=o,n.avail_out=c,n.next_in=s,n.avail_in=a,t.hold=u,t.bits=l,mB;n.adler=t.check=1,t.mode=hn;case hn:case kh:if(t.last){u>>>=l&7,l-=l&7,t.mode=Ph;break}for(;l<3;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}switch(t.last=u&1,u>>>=1,l-=1,u&3){case 0:t.mode=w2;break;case 1:CB(t),t.mode=pu;break;case 2:t.mode=S2;break;case 3:n.msg="invalid block type",t.mode=Ae}u>>>=2,l-=2;break;case w2:for(u>>>=l&7,l-=l&7;l<32;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}if((u&65535)!==(u>>>16^65535)){n.msg="invalid stored block lengths",t.mode=Ae;break}t.length=u&65535,u=0,l=0,t.mode=Fh;case Fh:t.mode=v2;case v2:if(h=t.length,h){if(h>a&&(h=a),h>c&&(h=c),h===0)break e;Yn(i,r,s,h,o),a-=h,s+=h,c-=h,o+=h,t.length-=h;break}t.mode=hn;break;case S2:for(;l<14;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}if(t.nlen=(u&31)+257,u>>>=5,l-=5,t.ndist=(u&31)+1,u>>>=5,l-=5,t.ncode=(u&15)+4,u>>>=4,l-=4,t.nlen>286||t.ndist>30){n.msg="too many length or distance symbols",t.mode=Ae;break}t.have=0,t.mode=E2;case E2:for(;t.have<t.ncode;){for(;l<3;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}t.lens[L[t.have++]]=u&7,u>>>=3,l-=3}for(;t.have<19;)t.lens[L[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,F={bits:t.lenbits},T=Wo(dB,t.lens,0,19,t.lencode,0,t.work,F),t.lenbits=F.bits,T){n.msg="invalid code lengths set",t.mode=Ae;break}t.have=0,t.mode=C2;case C2:for(;t.have<t.nlen+t.ndist;){for(;g=t.lencode[u&(1<<t.lenbits)-1],y=g>>>24,x=g>>>16&255,A=g&65535,!(y<=l);){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}if(A<16)u>>>=y,l-=y,t.lens[t.have++]=A;else{if(A===16){for(k=y+2;l<k;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}if(u>>>=y,l-=y,t.have===0){n.msg="invalid bit length repeat",t.mode=Ae;break}v=t.lens[t.have-1],h=3+(u&3),u>>>=2,l-=2}else if(A===17){for(k=y+3;l<k;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}u>>>=y,l-=y,v=0,h=3+(u&7),u>>>=3,l-=3}else{for(k=y+7;l<k;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}u>>>=y,l-=y,v=0,h=11+(u&127),u>>>=7,l-=7}if(t.have+h>t.nlen+t.ndist){n.msg="invalid bit length repeat",t.mode=Ae;break}for(;h--;)t.lens[t.have++]=v}}if(t.mode===Ae)break;if(t.lens[256]===0){n.msg="invalid code -- missing end-of-block",t.mode=Ae;break}if(t.lenbits=9,F={bits:t.lenbits},T=Wo(s2,t.lens,0,t.nlen,t.lencode,0,t.work,F),t.lenbits=F.bits,T){n.msg="invalid literal/lengths set",t.mode=Ae;break}if(t.distbits=6,t.distcode=t.distdyn,F={bits:t.distbits},T=Wo(o2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,F),t.distbits=F.bits,T){n.msg="invalid distances set",t.mode=Ae;break}t.mode=pu;case pu:t.mode=mu;case mu:if(a>=6&&c>=258){n.next_out=o,n.avail_out=c,n.next_in=s,n.avail_in=a,t.hold=u,t.bits=l,cB(n,d),o=n.next_out,i=n.output,c=n.avail_out,s=n.next_in,r=n.input,a=n.avail_in,u=t.hold,l=t.bits,t.mode===hn&&(t.back=-1);break}for(t.back=0;g=t.lencode[u&(1<<t.lenbits)-1],y=g>>>24,x=g>>>16&255,A=g&65535,!(y<=l);){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}if(x&&!(x&240)){for(w=y,S=x,C=A;g=t.lencode[C+((u&(1<<w+S)-1)>>w)],y=g>>>24,x=g>>>16&255,A=g&65535,!(w+y<=l);){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}u>>>=w,l-=w,t.back+=w}if(u>>>=y,l-=y,t.back+=y,t.length=A,x===0){t.mode=k2;break}if(x&32){t.back=-1,t.mode=hn;break}if(x&64){n.msg="invalid literal/length code",t.mode=Ae;break}t.extra=x&15,t.mode=D2;case D2:if(t.extra){for(k=t.extra;l<k;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}t.length+=u&(1<<t.extra)-1,u>>>=t.extra,l-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=I2;case I2:for(;g=t.distcode[u&(1<<t.distbits)-1],y=g>>>24,x=g>>>16&255,A=g&65535,!(y<=l);){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}if(!(x&240)){for(w=y,S=x,C=A;g=t.distcode[C+((u&(1<<w+S)-1)>>w)],y=g>>>24,x=g>>>16&255,A=g&65535,!(w+y<=l);){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}u>>>=w,l-=w,t.back+=w}if(u>>>=y,l-=y,t.back+=y,x&64){n.msg="invalid distance code",t.mode=Ae;break}t.offset=A,t.extra=x&15,t.mode=T2;case T2:if(t.extra){for(k=t.extra;l<k;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}t.offset+=u&(1<<t.extra)-1,u>>>=t.extra,l-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){n.msg="invalid distance too far back",t.mode=Ae;break}t.mode=B2;case B2:if(c===0)break e;if(h=d-c,t.offset>h){if(h=t.offset-h,h>t.whave&&t.sane){n.msg="invalid distance too far back",t.mode=Ae;break}h>t.wnext?(h-=t.wnext,p=t.wsize-h):p=t.wnext-h,h>t.length&&(h=t.length),m=t.window}else m=i,p=o-t.offset,h=t.length;h>c&&(h=c),c-=h,t.length-=h;do i[o++]=m[p++];while(--h);t.length===0&&(t.mode=mu);break;case k2:if(c===0)break e;i[o++]=t.length,c--,t.mode=mu;break;case Ph:if(t.wrap){for(;l<32;){if(a===0)break e;a--,u|=r[s++]<<l,l+=8}if(d-=c,n.total_out+=d,t.total+=d,d&&(n.adler=t.check=t.flags?Xt(t.check,i,d,o-d):Th(t.check,i,d,o-d)),d=c,(t.flags?u:R2(u))!==t.check){n.msg="incorrect data check",t.mode=Ae;break}u=0,l=0}t.mode=F2;case F2:if(t.wrap&&t.flags){for(;l<32;){if(a===0)break e;a--,u+=r[s++]<<l,l+=8}if(u!==(t.total&4294967295)){n.msg="incorrect length check",t.mode=Ae;break}u=0,l=0}t.mode=P2;case P2:T=pB;break e;case Ae:T=c2;break e;case M2:return u2;case yB:default:return xt}return n.next_out=o,n.avail_out=c,n.next_in=s,n.avail_in=a,t.hold=u,t.bits=l,(t.wsize||d!==n.avail_out&&t.mode<Ae&&(t.mode<Ph||e!==a2))&&N2(n,n.output,n.next_out,d-n.avail_out),f-=n.avail_in,d-=n.avail_out,n.total_in+=f,n.total_out+=d,t.total+=d,t.wrap&&d&&(n.adler=t.check=t.flags?Xt(t.check,i,d,n.next_out-d):Th(t.check,i,d,n.next_out-d)),n.data_type=t.bits+(t.last?64:0)+(t.mode===hn?128:0)+(t.mode===pu||t.mode===Fh?256:0),(f===0&&d===0||e===a2)&&T===Gr&&(T=gB),T}function IB(n){if(!n||!n.state)return xt;var e=n.state;return e.window&&(e.window=null),n.state=null,Gr}function TB(n,e){var t;return!n||!n.state||(t=n.state,!(t.wrap&2))?xt:(t.head=e,e.done=!1,Gr)}function L2(n,e){var t=e.length,r,i,s;return!n||!n.state||(r=n.state,r.wrap!==0&&r.mode!==du)?xt:r.mode===du&&(i=1,i=Th(i,e,t,0),i!==r.check)?c2:(s=N2(n,e,t,t),s?(r.mode=M2,u2):(r.havedict=1,Gr))}const Oh={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function BB(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Nh=Object.prototype.toString;class dn{constructor(e){if(!(this instanceof dn))return new dn(e);this.options=eB({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new BB,this.strm.avail_out=0;var r=EB(this.strm,t.windowBits);if(r!==Ur)throw new Error(Oh[r]);if(this.header=new sB,TB(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=$y(t.dictionary):Nh.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=L2(this.strm,t.dictionary),r!==Ur)))throw new Error(Oh[r])}push(e,t){var r=this.strm,i=this.options.chunkSize,s=this.options.dictionary,o,a,c,u,l,f,d=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?lu:Xy,typeof e=="string"?r.input=nB(e):Nh.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=Ni(i),r.next_out=0,r.avail_out=i),o=DB(r,Xy),o===KT&&s&&(typeof s=="string"?f=$y(s):Nh.call(s)==="[object ArrayBuffer]"?f=new Uint8Array(s):f=s,o=L2(this.strm,f)),o===JT&&d===!0&&(o=Ur,d=!1),o!==fu&&o!==Ur)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===fu||r.avail_in===0&&(a===lu||a===zr))&&(this.options.to==="string"?(c=iB(r.output,r.next_out),u=r.next_out-c,l=rB(r.output,c),r.next_out=u,r.avail_out=i-u,u&&Yn(r.output,r.output,c,u,0),this.onData(l)):this.onData(Zy(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(d=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==fu);return o===fu&&(a=lu),a===lu?(o=IB(this.strm),this.onEnd(o),this.ended=!0,o===Ur):(a===zr&&(this.onEnd(Ur),r.avail_out=0),!0)}onData(e){this.chunks.push(e)}onEnd(e){e===Ur&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Dh(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}}function kB(n,e){var t=new dn(e);if(t.push(n,!0),t.err)throw t.msg||Oh[t.err];return t.result}function FB(n,e){return e=e||{},e.raw=!0,kB(n,e)}function PB(n){let e=0;for(const t of n)e+=t.length;return e}function z2(n,e){const t=new Uint8Array(e??PB(n));let r=0;for(const i of n)t.set(i,r),r+=i.length;return t}async function MB(n){try{let e,t=0,r;const i=[];let s=0;do{const o=n.subarray(t);if(r=new dn(void 0),{strm:e}=r,r.push(o,zr),r.err)throw new Error(r.msg);t+=e.next_in;const a=r.result;i.push(a),s+=a.length}while(e.avail_in);return z2(i,s)}catch(e){throw/incorrect header check/.exec(`${e}`)?new Error("problem decompressing block: incorrect gzip header check"):e}}class U2{constructor({filehandle:e,gziFilehandle:t}){Y(this,"filehandle");Y(this,"gzi");this.filehandle=e,this.gzi=new ZT({filehandle:t})}async _readAndUncompressBlock(e,t){let r=t;r||(r=(await this.filehandle.stat()).size);const i=r-e,s=await this.filehandle.read(i,e);return MB(s)}async read(e,t){const r=await this.gzi.getRelevantBlocksForRead(e,t),i=[];for(let s=0;s<r.length-1;s+=1){const o=await this._readAndUncompressBlock(r[s][0],r[s+1][0]),[,a]=r[s],c=a>=t?0:t-a,u=Math.min(t+e,a+o.length)-a;c>=0&&c<o.length&&i.push(o.subarray(c,u))}return z2(i)}}function G2(n,e){return n.offset+n.lineBytes*Math.floor(e/n.lineLength)+e%n.lineLength}async function RB(n,e={}){const t=new TextDecoder("utf8");return Object.fromEntries(t.decode(await n.readFile(e)).split(/\r?\n/).map(r=>r.trim()).filter(r=>!!r).map(r=>r.split(" ")).map(r=>{var i;if((i=r[0])!=null&&i.startsWith(">"))throw new Error("found > in sequence name, might have supplied FASTA file for the FASTA index");return[r[0],{name:r[0],length:+r[1],start:0,end:+r[1],offset:+r[2],lineLength:+r[3],lineBytes:+r[4]}]}))}class H2{constructor({fasta:e,fai:t,path:r,faiPath:i}){if(e)this.fasta=e;else if(r)this.fasta=new qe(r);else throw new Error("Need to pass filehandle for fasta or path to localfile");if(t)this.fai=t;else if(i)this.fai=new qe(i);else if(r)this.fai=new qe(`${r}.fai`);else throw new Error("Need to pass filehandle for or path to localfile")}async _getIndexes(e){return this.indexes||(this.indexes=RB(this.fai,e).catch(t=>{throw this.indexes=void 0,t})),this.indexes}async getSequenceNames(e){return Object.keys(await this._getIndexes(e))}async getSequenceSizes(e){const t={},r=await this._getIndexes(e);for(const i of Object.values(r))t[i.name]=i.length;return t}async getSequenceSize(e,t){var i;return(i=(await this._getIndexes(t))[e])==null?void 0:i.length}async hasReferenceSequence(e,t){return!!(await this._getIndexes(t))[e]}async getResiduesByName(e,t,r,i){const s=(await this._getIndexes(i))[e];return s?this._fetchFromIndexEntry(s,t,r,i):void 0}async getSequence(e,t,r,i){return this.getResiduesByName(e,t,r,i)}async _fetchFromIndexEntry(e,t=0,r,i){let s=r;if(t<0)throw new TypeError("regionStart cannot be less than 0");if((s===void 0||s>e.length)&&(s=e.length),t>=s)return"";const o=G2(e,t),a=G2(e,s)-o;return new TextDecoder("utf8").decode(await this.fasta.read(a,o,i)).replace(/\s+/g,"")}}class OB extends H2{constructor({fasta:e,path:t,fai:r,faiPath:i,gzi:s,gziPath:o}){super({fasta:e,path:t,fai:r,faiPath:i}),e&&s?this.fasta=new U2({filehandle:e,gziFilehandle:s}):t&&o&&(this.fasta=new U2({filehandle:new qe(t),gziFilehandle:new qe(o)}))}}function V2(n){return n.split(">").filter(e=>/\S/.test(e)).map(e=>{const[t,...r]=e.split(`
|
|
719
|
+
`),[i,...s]=t.split(" "),o=r.join("").replace(/\s/g,"");return{id:i,description:s.join(" "),sequence:o}})}class NB{constructor({fasta:e,path:t}){if(e)this.fasta=e;else if(t)this.fasta=new qe(t);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(r=>{const s=new TextDecoder("utf8").decode(r);return V2(s)})}async fetch(e,t,r){const s=(await this.data).find(a=>a.id===e),o=r-t;if(!s)throw new Error(`no sequence with id ${e} exists`);return s.sequence.slice(t,o)}async getSequenceNames(){return(await this.data).map(t=>t.id)}}const LB=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:OB,FetchableSmallFasta:NB,IndexedFasta:H2,parseSmallFasta:V2},Symbol.toStringTag,{value:"Module"})),_2=BigInt(32);function zB(n,e,t){const r=+!!t,i=+!t;return BigInt(n.getInt32(e,t)*i+n.getInt32(e+4,t)*r)<<_2|BigInt(n.getUint32(e,t)*r+n.getUint32(e+4,t)*i)}function UB(n,e,t){const r=n.getUint32(e,t),i=n.getUint32(e+4,t),s=+!!t,o=+!t;return BigInt(r*o+i*s)<<_2|BigInt(r*s+i*o)}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(n,e){return zB(this,n,e)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(n,e){return UB(this,n,e)});var Lh=function(n,e){return Lh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},Lh(n,e)};function zh(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Lh(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function GB(n,e,t,r){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(l){try{u(r.next(l))}catch(f){o(f)}}function c(l){try{u(r.throw(l))}catch(f){o(f)}}function u(l){l.done?s(l.value):i(l.value).then(a,c)}u((r=r.apply(n,e||[])).next())})}function j2(n,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(l){return c([u,l])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(t=0)),t;)try{if(r=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){t.label=u[1];break}if(u[0]===6&&t.label<s[1]){t.label=s[1],s=u;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(u);break}s[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(n,t)}catch(l){u=[6,l],i=0}finally{r=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function qo(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],r=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Uh(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(o)throw o.error}}return s}function Gh(n,e,t){if(t||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return n.concat(s||Array.prototype.slice.call(e))}function Gi(n){return this instanceof Gi?(this.v=n,this):new Gi(n)}function HB(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t.apply(n,e||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(h){return function(p){return Promise.resolve(p).then(h,f)}}function a(h,p){r[h]&&(i[h]=function(m){return new Promise(function(g,y){s.push([h,m,g,y])>1||c(h,m)})},p&&(i[h]=p(i[h])))}function c(h,p){try{u(r[h](p))}catch(m){d(s[0][3],m)}}function u(h){h.value instanceof Gi?Promise.resolve(h.value.v).then(l,f):d(s[0][2],h)}function l(h){c("next",h)}function f(h){c("throw",h)}function d(h,p){h(p),s.shift(),s.length&&c(s[0][0],s[0][1])}}function VB(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof qo=="function"?qo(n):n[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(s){t[s]=n[s]&&function(o){return new Promise(function(a,c){o=n[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(u){s({value:u,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function ke(n){return typeof n=="function"}function Q2(n){var e=function(r){Error.call(r),r.stack=new Error().stack},t=n(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Hh=Q2(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
|
|
720
|
+
`+t.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
|
721
|
+
`):"",this.name="UnsubscriptionError",this.errors=t}});function W2(n,e){if(n){var t=n.indexOf(e);0<=t&&n.splice(t,1)}}var Vh=function(){function n(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var e,t,r,i,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=qo(o),c=a.next();!c.done;c=a.next()){var u=c.value;u.remove(this)}}catch(m){e={error:m}}finally{try{c&&!c.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var l=this.initialTeardown;if(ke(l))try{l()}catch(m){s=m instanceof Hh?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var d=qo(f),h=d.next();!h.done;h=d.next()){var p=h.value;try{Y2(p)}catch(m){s=s??[],m instanceof Hh?s=Gh(Gh([],Uh(s)),Uh(m.errors)):s.push(m)}}}catch(m){r={error:m}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}if(s)throw new Hh(s)}},n.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Y2(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},n.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},n.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},n.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&W2(t,e)},n.prototype.remove=function(e){var t=this._finalizers;t&&W2(t,e),e instanceof n&&e._removeParent(this)},n.EMPTY=function(){var e=new n;return e.closed=!0,e}(),n}();Vh.EMPTY;function q2(n){return n instanceof Vh||n&&"closed"in n&&ke(n.remove)&&ke(n.add)&&ke(n.unsubscribe)}function Y2(n){ke(n)?n():n.unsubscribe()}var _B={Promise:void 0},jB={setTimeout:function(n,e){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];return setTimeout.apply(void 0,Gh([n,e],Uh(t)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function X2(n){jB.setTimeout(function(){throw n})}function Z2(){}function QB(n){n()}var _h=function(n){zh(e,n);function e(t){var r=n.call(this)||this;return r.isStopped=!1,t?(r.destination=t,q2(t)&&t.add(r)):r.destination=YB,r}return e.create=function(t,r,i){return new gu(t,r,i)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Vh),WB=function(){function n(e){this.partialObserver=e}return n.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(r){yu(r)}},n.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(r){yu(r)}else yu(e)},n.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){yu(t)}},n}(),gu=function(n){zh(e,n);function e(t,r,i){var s=n.call(this)||this,o;return ke(t)||!t?o={next:t??void 0,error:r??void 0,complete:i??void 0}:o=t,s.destination=new WB(o),s}return e}(_h);function yu(n){X2(n)}function qB(n){throw n}var YB={closed:!0,next:Z2,error:qB,complete:Z2},jh=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function K2(n){return n}function XB(n){return n.length===0?K2:n.length===1?n[0]:function(t){return n.reduce(function(r,i){return i(r)},t)}}var At=function(){function n(e){e&&(this._subscribe=e)}return n.prototype.lift=function(e){var t=new n;return t.source=this,t.operator=e,t},n.prototype.subscribe=function(e,t,r){var i=this,s=KB(e)?e:new gu(e,t,r);return QB(function(){var o=i,a=o.operator,c=o.source;s.add(a?a.call(s,c):c?i._subscribe(s):i._trySubscribe(s))}),s},n.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},n.prototype.forEach=function(e,t){var r=this;return t=J2(t),new t(function(i,s){var o=new gu({next:function(a){try{e(a)}catch(c){s(c),o.unsubscribe()}},error:s,complete:i});r.subscribe(o)})},n.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},n.prototype[jh]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return XB(e)(this)},n.prototype.toPromise=function(e){var t=this;return e=J2(e),new e(function(r,i){var s;t.subscribe(function(o){return s=o},function(o){return i(o)},function(){return r(s)})})},n.create=function(e){return new n(e)},n}();function J2(n){var e;return(e=n??_B.Promise)!==null&&e!==void 0?e:Promise}function ZB(n){return n&&ke(n.next)&&ke(n.error)&&ke(n.complete)}function KB(n){return n&&n instanceof _h||ZB(n)&&q2(n)}function JB(n){return ke(n==null?void 0:n.lift)}function Hi(n){return function(e){if(JB(e))return e.lift(function(t){try{return n(t,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Yo(n,e,t,r,i){return new $B(n,e,t,r,i)}var $B=function(n){zh(e,n);function e(t,r,i,s,o,a){var c=n.call(this,t)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=r?function(u){try{r(u)}catch(l){t.error(l)}}:n.prototype._next,c._error=s?function(u){try{s(u)}catch(l){t.error(l)}finally{this.unsubscribe()}}:n.prototype._error,c._complete=i?function(){try{i()}catch(u){t.error(u)}finally{this.unsubscribe()}}:n.prototype._complete,c}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;n.prototype.unsubscribe.call(this),!r&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(_h),ek=new At(function(n){return n.complete()});function tk(n){return n&&ke(n.schedule)}function $2(n){return n[n.length-1]}function nk(n){return tk($2(n))?n.pop():void 0}function rk(n,e){return typeof $2(n)=="number"?n.pop():e}var eb=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function tb(n){return ke(n==null?void 0:n.then)}function nb(n){return ke(n[jh])}function rb(n){return Symbol.asyncIterator&&ke(n==null?void 0:n[Symbol.asyncIterator])}function ib(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function ik(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var sb=ik();function ob(n){return ke(n==null?void 0:n[sb])}function ab(n){return HB(this,arguments,function(){var t,r,i,s;return j2(this,function(o){switch(o.label){case 0:t=n.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Gi(t.read())];case 3:return r=o.sent(),i=r.value,s=r.done,s?[4,Gi(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Gi(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function cb(n){return ke(n==null?void 0:n.getReader)}function Vi(n){if(n instanceof At)return n;if(n!=null){if(nb(n))return sk(n);if(eb(n))return ok(n);if(tb(n))return ak(n);if(rb(n))return ub(n);if(ob(n))return ck(n);if(cb(n))return uk(n)}throw ib(n)}function sk(n){return new At(function(e){var t=n[jh]();if(ke(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ok(n){return new At(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function ak(n){return new At(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,X2)})}function ck(n){return new At(function(e){var t,r;try{for(var i=qo(n),s=i.next();!s.done;s=i.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}e.complete()})}function ub(n){return new At(function(e){lk(n,e).catch(function(t){return e.error(t)})})}function uk(n){return ub(ab(n))}function lk(n,e){var t,r,i,s;return GB(this,void 0,void 0,function(){var o,a;return j2(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),t=VB(n),c.label=1;case 1:return[4,t.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(o=r.value,e.next(o),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),i={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(s=t.return)?[4,s.call(t)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Hr(n,e,t,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var s=e.schedule(function(){t(),i?n.add(this.schedule(null,r)):this.unsubscribe()},r);if(n.add(s),!i)return s}function lb(n,e){return e===void 0&&(e=0),Hi(function(t,r){t.subscribe(Yo(r,function(i){return Hr(r,n,function(){return r.next(i)},e)},function(){return Hr(r,n,function(){return r.complete()},e)},function(i){return Hr(r,n,function(){return r.error(i)},e)}))})}function fb(n,e){return e===void 0&&(e=0),Hi(function(t,r){r.add(n.schedule(function(){return t.subscribe(r)},e))})}function fk(n,e){return Vi(n).pipe(fb(e),lb(e))}function hk(n,e){return Vi(n).pipe(fb(e),lb(e))}function dk(n,e){return new At(function(t){var r=0;return e.schedule(function(){r===n.length?t.complete():(t.next(n[r++]),t.closed||this.schedule())})})}function pk(n,e){return new At(function(t){var r;return Hr(t,e,function(){r=n[sb](),Hr(t,e,function(){var i,s,o;try{i=r.next(),s=i.value,o=i.done}catch(a){t.error(a);return}o?t.complete():t.next(s)},0,!0)}),function(){return ke(r==null?void 0:r.return)&&r.return()}})}function hb(n,e){if(!n)throw new Error("Iterable cannot be null");return new At(function(t){Hr(t,e,function(){var r=n[Symbol.asyncIterator]();Hr(t,e,function(){r.next().then(function(i){i.done?t.complete():t.next(i.value)})},0,!0)})})}function mk(n,e){return hb(ab(n),e)}function gk(n,e){if(n!=null){if(nb(n))return fk(n,e);if(eb(n))return dk(n,e);if(tb(n))return hk(n,e);if(rb(n))return hb(n,e);if(ob(n))return pk(n,e);if(cb(n))return mk(n,e)}throw ib(n)}function yk(n,e){return e?gk(n,e):Vi(n)}var bk=Q2(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}});function db(n,e){return new Promise(function(t,r){var i=new gu({next:function(s){t(s),i.unsubscribe()},error:r,complete:function(){r(new bk)}});n.subscribe(i)})}function pb(n,e){return Hi(function(t,r){var i=0;t.subscribe(Yo(r,function(s){r.next(n.call(e,s,i++))}))})}function xk(n,e,t,r,i,s,o,a){var c=[],u=0,l=0,f=!1,d=function(){f&&!c.length&&!u&&e.complete()},h=function(m){return u<r?p(m):c.push(m)},p=function(m){u++;var g=!1;Vi(t(m,l++)).subscribe(Yo(e,function(y){e.next(y)},function(){g=!0},void 0,function(){if(g)try{u--;for(var y=function(){var x=c.shift();o||p(x)};c.length&&u<r;)y();d()}catch(x){e.error(x)}}))};return n.subscribe(Yo(e,h,function(){f=!0,d()})),function(){}}function mb(n,e,t){return t===void 0&&(t=1/0),ke(e)?mb(function(r,i){return pb(function(s,o){return e(r,s,i,o)})(Vi(n(r,i)))},t):(typeof e=="number"&&(t=e),Hi(function(r,i){return xk(r,i,n,t)}))}function Ak(n){return n===void 0&&(n=1/0),mb(K2,n)}function wk(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=nk(n),r=rk(n,1/0),i=n;return i.length?i.length===1?Vi(i[0]):Ak(r)(yk(i,t)):ek}function vk(n,e,t,r,i){return function(s,o){var a=t,c=e,u=0;s.subscribe(Yo(o,function(l){var f=u++;c=a?n(c,l,f):(a=!0,l)},function(){a&&o.next(c),o.complete()}))}}function gb(n,e){return Hi(vk(n,e,arguments.length>=2,!1,!0))}var Sk=function(n,e){return n.push(e),n};function Ek(){return Hi(function(n,e){gb(Sk,[])(n).subscribe(e)})}class Ck{}class Dk{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(e=new Ck){if(this.signal.aborted)throw new Error("cannot add a signal, already aborted!");this.signals.add(e),e.aborted?this.handleAborted(e):typeof e.addEventListener=="function"&&e.addEventListener("abort",()=>{this.handleAborted(e)})}handleAborted(e){this.signals.delete(e),this.signals.size===0&&this.abortController.abort()}get signal(){return this.abortController.signal}abort(){this.abortController.abort()}}class Ik{constructor(){this.callbacks=new Set}addCallback(e=()=>{}){this.callbacks.add(e),this.currentMessage&&e(this.currentMessage)}callback(e){this.currentMessage=e;for(const t of this.callbacks)t(e)}}class _i{constructor({fill:e,cache:t}){if(typeof e!="function")throw new TypeError("must pass a fill function");if(typeof t!="object")throw new TypeError("must pass a cache object");if(typeof t.get!="function"||typeof t.set!="function"||typeof t.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=t,this.fillCallback=e}static isAbortException(e){return e.name==="AbortError"||e.code==="ERR_ABORTED"||e.message==="AbortError: aborted"||e.message==="Error: aborted"}evict(e,t){this.cache.get(e)===t&&this.cache.delete(e)}fill(e,t,r,i){const s=new Dk,o=new Ik;o.addCallback(i);const a={aborter:s,promise:this.fillCallback(t,s.signal,c=>{o.callback(c)}),settled:!1,statusReporter:o,get aborted(){return this.aborter.signal.aborted}};a.aborter.addSignal(r),a.aborter.signal.addEventListener("abort",()=>{a.settled||this.evict(e,a)}),a.promise.then(()=>{a.settled=!0},()=>{a.settled=!0,this.evict(e,a)}).catch(c=>{throw console.error(c),c}),this.cache.set(e,a)}static checkSinglePromise(e,t){function r(){if(t!=null&&t.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return e.then(i=>(r(),i),i=>{throw r(),i})}has(e){return this.cache.has(e)}get(e,t,r,i){if(!r&&t instanceof AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const s=this.cache.get(e);return s?s.aborted&&!s.settled?(this.evict(e,s),this.get(e,t,r,i)):s.settled?s.promise:(s.aborter.addSignal(r),s.statusReporter.addCallback(i),_i.checkSinglePromise(s.promise,r)):(this.fill(e,t,r,i),_i.checkSinglePromise(this.cache.get(e).promise,r))}delete(e){const t=this.cache.get(e);t&&(t.settled||t.aborter.abort(),this.cache.delete(e))}clear(){const e=this.cache.keys();let t=0;for(let r=e.next();!r.done;r=e.next())this.delete(r.value),t+=1;return t}}function Tk(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Qh,yb;function Bk(){if(yb)return Qh;yb=1;class n{constructor(t={}){if(!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=t.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(t,r){this.cache.set(t,r),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t)){const r=this.oldCache.get(t);return this.oldCache.delete(t),this._set(t,r),r}}set(t,r){return this.cache.has(t)?this.cache.set(t,r):this._set(t,r),this}has(t){return this.cache.has(t)||this.oldCache.has(t)}peek(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t))return this.oldCache.get(t)}delete(t){const r=this.cache.delete(t);return r&&this._size--,this.oldCache.delete(t)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache)yield t;for(const t of this.oldCache){const[r]=t;this.cache.has(r)||(yield t)}}get size(){let t=0;for(const r of this.oldCache.keys())this.cache.has(r)||t++;return this._size+t}}return Qh=n,Qh}var kk=Bk();const Vr=Tk(kk);class ji{constructor(e){Y(this,"ranges");this.ranges=e}get min(){return this.ranges[0].min}get max(){return this.ranges.at(-1).max}contains(e){for(const t of this.ranges)if(t.min<=e&&t.max>=e)return!0;return!1}isContiguous(){return this.ranges.length>1}getRanges(){return this.ranges.map(e=>new ji([{min:e.min,max:e.max}]))}toString(){return this.ranges.map(e=>`[${e.min}-${e.max}]`).join(",")}union(e){const t=[...this.getRanges(),...e.getRanges()].sort((s,o)=>s.min<o.min?-1:s.min>o.min?1:s.max<o.max?-1:o.max>s.max?1:0),r=[];let i=t[0];for(const s of t)s.min>i.max+1?(r.push(i),i=s):s.max>i.max&&(i=new ji([{min:i.min,max:s.max}]));return r.push(i),r.length===1?r[0]:new ji(r)}}function Fk(n){return FB(n.subarray(2),void 0)}let Pk=class extends Error{constructor(t){super(t);Y(this,"code");this.code="ERR_ABORTED"}};function Mk(n){n.sort((i,s)=>i.offset-s.offset);const e=[];let t,r;for(const i of n)t&&r&&i.offset-r<=2e3?(t.length=t.length+i.length-r+i.offset,t.blocks.push(i)):e.push(t={blocks:[i],length:i.length,offset:i.offset}),r=t.offset+t.length;return e}function bu(n){if(n&&n.aborted)if(typeof DOMException>"u"){const e=new Pk("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}const Wh=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function qh(n,e,t,r){return n<r&&e>=t}class bb{constructor(e,t,r,i,s){Y(this,"bbi");Y(this,"refsByName");Y(this,"cirTreeOffset");Y(this,"isCompressed");Y(this,"blockType");Y(this,"cirTreePromise");Y(this,"featureCache",new _i({cache:new Vr({maxSize:1e3}),fill:async({length:e,offset:t},r)=>this.bbi.read(e,t,{signal:r})}));if(this.bbi=e,this.refsByName=t,this.cirTreeOffset=r,this.isCompressed=i,this.blockType=s,!(r>=0))throw new Error("invalid cirTreeOffset!")}async readWigData(e,t,r,i,s){try{const o=this.refsByName[e];o===void 0&&i.complete();const a={chrId:o,start:t,end:r};this.cirTreePromise||(this.cirTreePromise=this.bbi.read(48,this.cirTreeOffset,s));const c=await this.cirTreePromise,l=new DataView(c.buffer).getUint32(4,!0);let f=[],d=0;const h=(y,x,A)=>{try{const S=y.subarray(x),C=new DataView(S.buffer,S.byteOffset,S.length);let v=0;const T=C.getUint8(v);v+=2;const P=C.getUint16(v,!0);if(v+=2,T===1){const F=[];for(let k=0;k<P;k++){const L=C.getUint32(v,!0);v+=4;const U=C.getUint32(v,!0);v+=4;const j=C.getUint32(v,!0);v+=4;const K=C.getUint32(v,!0);v+=4;const _=Number(C.getBigUint64(v,!0));v+=8;const te=Number(C.getBigUint64(v,!0));v+=8,F.push({startChrom:L,startBase:U,endBase:K,endChrom:j,blockOffset:_,blockSize:te,offset:v})}f=f.concat(F.filter(k=>p(k)).map(k=>({offset:k.blockOffset,length:k.blockSize})))}else if(T===0){const F=[];for(let L=0;L<P;L++){const U=C.getUint32(v,!0);v+=4;const j=C.getUint32(v,!0);v+=4;const K=C.getUint32(v,!0);v+=4;const _=C.getUint32(v,!0);v+=4;const te=Number(C.getBigUint64(v,!0));v+=8,F.push({startChrom:U,startBase:j,endChrom:K,endBase:_,blockOffset:te,offset:v})}const k=F.filter(L=>p(L)).map(L=>L.blockOffset);k.length>0&&g(k,A+1)}}catch(w){i.error(w)}},p=y=>{const{startChrom:x,startBase:A,endChrom:w,endBase:S}=y;return(x<o||x===o&&A<=r)&&(w>o||w===o&&S>=t)},m=async(y,x,A)=>{try{const w=x.max-x.min,S=x.min,C=await this.featureCache.get(`${w}_${S}`,{length:w,offset:S},s==null?void 0:s.signal);for(const v of y)x.contains(v)&&(h(C,v-S,A),d-=1,d===0&&this.readFeatures(i,f,{...s,request:a}).catch(T=>{i.error(T)}))}catch(w){i.error(w)}},g=(y,x)=>{try{d+=y.length;const A=4+l*32;let w=new ji([{min:y[0],max:y[0]+A}]);for(let S=1;S<y.length;S+=1){const C=new ji([{min:y[S],max:y[S]+A}]);w=w.union(C)}w.getRanges().map(S=>m(y,S,x))}catch(A){i.error(A)}};g([this.cirTreeOffset+48],1);return}catch(o){i.error(o)}}parseSummaryBlock(e,t,r){const i=[];let s=t;const o=new DataView(e.buffer,e.byteOffset,e.length);for(;s<e.byteLength;){const a=o.getUint32(s,!0);s+=4;const c=o.getUint32(s,!0);s+=4;const u=o.getUint32(s,!0);s+=4;const l=o.getUint32(s,!0);s+=4;const f=o.getFloat32(s,!0);s+=4;const d=o.getFloat32(s,!0);s+=4;const h=o.getFloat32(s,!0);s+=4,s+=4,(!r||a===r.chrId&&qh(c,u,r.start,r.end))&&i.push({start:c,end:u,maxScore:d,minScore:f,summary:!0,score:h/(l||1)})}return i}parseBigBedBlock(e,t,r,i){const s=[];let o=t;const a=e,c=new DataView(a.buffer,a.byteOffset,a.length);for(;o<e.byteLength;){const u=o,l=c.getUint32(o,!0);o+=4;const f=c.getInt32(o,!0);o+=4;const d=c.getInt32(o,!0);o+=4;let h=o;for(;h<e.length&&e[h]!==0;h++);const p=e.subarray(o,h),m=(Wh==null?void 0:Wh.decode(p))??p.toString();o=h+1,s.push({chromId:l,start:f,end:d,rest:m,uniqueId:`bb-${r+u}`})}return i?s.filter(u=>qh(u.start,u.end,i.start,i.end)):s}parseBigWigBlock(e,t,r){const i=e.subarray(t),s=new DataView(i.buffer,i.byteOffset,i.length);let o=0;o+=4;const a=s.getInt32(o,!0);o+=8;const c=s.getUint32(o,!0);o+=4;const u=s.getUint32(o,!0);o+=4;const l=s.getUint8(o);o+=2;const f=s.getUint16(o,!0);o+=2;const d=new Array(f);switch(l){case 1:{for(let h=0;h<f;h++){const p=s.getInt32(o,!0);o+=4;const m=s.getInt32(o,!0);o+=4;const g=s.getFloat32(o,!0);o+=4,d[h]={start:p,end:m,score:g}}break}case 2:{for(let h=0;h<f;h++){const p=s.getInt32(o,!0);o+=4;const m=s.getFloat32(o,!0);o+=4,d[h]={score:m,start:p,end:p+u}}break}case 3:{for(let h=0;h<f;h++){const p=s.getFloat32(o,!0);o+=4;const m=a+h*c;d[h]={score:p,start:m,end:m+u}}break}}return r?d.filter(h=>qh(h.start,h.end,r.start,r.end)):d}async readFeatures(e,t,r={}){try{const{blockType:i,isCompressed:s}=this,{signal:o,request:a}=r,c=Mk(t);bu(o),await Promise.all(c.map(async u=>{bu(o);const{length:l,offset:f}=u,d=await this.featureCache.get(`${l}_${f}`,u,o);for(const h of u.blocks){bu(o);let p=d.subarray(h.offset-u.offset);switch(s&&(p=Fk(p)),bu(o),i){case"summary":{e.next(this.parseSummaryBlock(p,0,a));break}case"bigwig":{e.next(this.parseBigWigBlock(p,0,a));break}case"bigbed":{e.next(this.parseBigBedBlock(p,0,h.offset*256,a));break}default:console.warn(`Don't know what to do with ${i}`)}}})),e.complete()}catch(i){e.error(i)}}}const Rk=-2003829722,xb=-2021002517;function Qi(n){return new DataView(n.buffer,n.byteOffset,n.length)}class Ab{constructor(e){Y(this,"bbi");Y(this,"headerP");Y(this,"renameRefSeqs");const{filehandle:t,renameRefSeqs:r=o=>o,path:i,url:s}=e;if(this.renameRefSeqs=r,t)this.bbi=t;else if(s)this.bbi=new Yt(s);else if(i)this.bbi=new qe(i);else throw new Error("no file given")}getHeader(e){return this.headerP||(this.headerP=this._getHeader(e).catch(t=>{throw this.headerP=void 0,t})),this.headerP}async _getHeader(e){const t=await this._getMainHeader(e),r=await this._readChromTree(t,e);return{...t,...r}}async _getMainHeader(e,t=2e3){const r=await this.bbi.read(t,0,e),i=Qi(r),s=i.getInt32(0,!0);if(s!==Rk&&s!==xb)throw new Error("not a BigWig/BigBed file");let o=0;const a=i.getInt32(o,!0);o+=4;const c=i.getUint16(o,!0);o+=2;const u=i.getUint16(o,!0);o+=2;const l=Number(i.getBigUint64(o,!0));o+=8;const f=Number(i.getBigUint64(o,!0));o+=8;const d=Number(i.getBigUint64(o,!0));o+=8;const h=i.getUint16(o,!0);o+=2;const p=i.getUint16(o,!0);o+=2;const m=Number(i.getBigUint64(o,!0));o+=8;const g=Number(i.getBigUint64(o,!0));o+=8;const y=i.getUint32(o,!0);o+=4;const x=Number(i.getBigUint64(o,!0));o+=8;const A=[];for(let v=0;v<u;v++){const T=i.getUint32(o,!0);o+=4;const P=i.getUint32(o,!0);o+=4;const F=Number(i.getBigUint64(o,!0));o+=8;const k=Number(i.getBigUint64(o,!0));o+=8,A.push({reductionLevel:T,reserved:P,dataOffset:F,indexOffset:k})}const w=a===xb?"bigbed":"bigwig";if(m>t||g>t-8*5)return this._getMainHeader(e,t*2);let S;if(g){const v=r.subarray(g);let T=0;const P=Qi(v),F=Number(P.getBigUint64(T,!0));T+=8;const k=P.getFloat64(T,!0);T+=8;const L=P.getFloat64(T,!0);T+=8;const U=P.getFloat64(T,!0);T+=8;const j=P.getFloat64(T,!0);T+=8,S={scoreMin:k,scoreMax:L,scoreSum:U,scoreSumSquares:j,basesCovered:F}}else throw new Error("no stats");const C=new TextDecoder("utf8");return{zoomLevels:A,magic:a,extHeaderOffset:x,numZoomLevels:u,fieldCount:h,totalSummary:S,definedFieldCount:p,uncompressBufSize:y,asOffset:m,chromTreeOffset:l,totalSummaryOffset:g,unzoomedDataOffset:f,unzoomedIndexOffset:d,fileType:w,version:c,autoSql:m?C.decode(r.subarray(m,r.indexOf(0,m))):""}}async _readChromTree(e,t){const r=[],i={},s=e.chromTreeOffset,o=Qi(await this.bbi.read(32,s,t));let a=0;a+=4,a+=4;const c=o.getUint32(a,!0);a+=4;const u=o.getUint32(a,!0);a+=4,a+=8;const l=new TextDecoder("utf8"),f=async d=>{const h=await this.bbi.read(4,d),p=Qi(h);let m=0;const g=p.getUint8(m);m+=1,m+=1;const y=p.getUint16(m,!0);if(m+=2,g){const x=await this.bbi.read(y*(c+u),d+m),A=Qi(x);m=0;for(let w=0;w<y;w++){const S=l.decode(x.subarray(m,m+c)).replaceAll("\0","");m+=c;const C=A.getUint32(m,!0);m+=4;const v=A.getUint32(m,!0);m+=4,i[this.renameRefSeqs(S)]=C,r[C]={name:S,id:C,length:v}}}else{const x=[],A=Qi(await this.bbi.read(y*(c+8),d+m));m=0;for(let w=0;w<y;w++){m+=c;const S=Number(A.getBigUint64(m,!0));m+=8,x.push(f(S))}await Promise.all(x)}};return await f(s+32),{refsByName:i,refsByNumber:r}}async getUnzoomedView(e){const{unzoomedIndexOffset:t,refsByName:r,uncompressBufSize:i,fileType:s}=await this.getHeader(e);return new bb(this.bbi,r,t,i>0,s)}async getFeatureStream(e,t,r,i){await this.getHeader(i);const s=this.renameRefSeqs(e);let o;const{basesPerSpan:a,scale:c}=i||{};return a?o=await this.getView(1/a,i):c?o=await this.getView(c,i):o=await this.getView(1,i),new At(u=>{o.readWigData(s,t,r,u,i).catch(l=>{u.error(l)})})}async getFeatures(e,t,r,i){const s=await this.getFeatureStream(e,t,r,i);return(await db(s.pipe(Ek()))).flat()}}class Ok extends Ab{async getView(e,t){const{zoomLevels:r,refsByName:i,uncompressBufSize:s}=await this.getHeader(t),o=1/e,a=r.length-1;for(let c=a;c>=0;c-=1){const u=r[c];if(u&&u.reductionLevel<=2*o)return new bb(this.bbi,i,u.indexOffset,s>0,"summary")}return this.getUnzoomedView(t)}}function Nk(n){return n.filter(e=>!!e)}class Lk extends Ab{constructor(){super(...arguments);Y(this,"readIndicesCache",new _i({cache:new Vr({maxSize:1}),fill:(t,r)=>this._readIndices({...t,signal:r})}))}readIndices(t={}){const{signal:r,...i}=t;return this.readIndicesCache.get(JSON.stringify(i),t,r)}async getView(t,r){return this.getUnzoomedView(r)}async _readIndices(t){const{extHeaderOffset:r}=await this.getHeader(t),i=await this.bbi.read(64,r),s=new DataView(i.buffer,i.byteOffset,i.length);let o=0;o+=2;const a=s.getUint16(o,!0);o+=2;const c=Number(s.getBigUint64(o,!0));if(o+=8,a===0)return[];const u=20,l=u*a,f=await this.bbi.read(l,c),d=[];for(let h=0;h<a;h+=1){const p=f.subarray(h*u),m=new DataView(p.buffer,p.byteOffset,p.length);let g=0;const y=m.getInt16(g,!0);g+=2;const x=m.getInt16(g,!0);g+=2;const A=Number(m.getBigUint64(g,!0));g+=12;const w=m.getInt16(g,!0);d.push({type:y,fieldcount:x,offset:A,field:w})}return d}async searchExtraIndexBlocks(t,r={}){const i=await this.readIndices(r);if(i.length===0)return[];const s=new TextDecoder("utf8"),o=i.map(async a=>{const{offset:c,field:u}=a,l=await this.bbi.read(32,c,r),f=new DataView(l.buffer,l.byteOffset,l.length);let d=0;d+=4;const h=f.getInt32(d,!0);d+=4;const p=f.getInt32(d,!0);d+=4;const m=f.getInt32(d,!0);d+=4,d+=8;const g=async y=>{const x=y,A=4+h*(p+m),S=await this.bbi.read(A,x,r),C=new DataView(S.buffer,S.byteOffset,S.length);let v=0;const T=C.getInt8(v);v+=2;const P=C.getInt16(v,!0);v+=2;const F=[];if(T===0){const k=[];for(let U=0;U<P;U++){const j=s.decode(S.subarray(v,v+p)).replaceAll("\0","");v+=p;const K=Number(C.getBigUint64(v,!0));v+=8,k.push({key:j,offset:K})}let L=0;for(const{key:U,offset:j}of k){if(t.localeCompare(U)<0&&L)return g(L);L=j}return g(L)}else if(T===1){for(let k=0;k<P;k++){const L=s.decode(S.subarray(v,v+p)).replaceAll("\0","");v+=p;const U=Number(C.getBigUint64(v,!0));v+=8;const j=C.getUint32(v,!0);v+=4;const K=C.getUint32(v,!0);v+=4,F.push({key:L,offset:U,length:j,reserved:K})}for(const k of F)if(k.key===t)return{...k,field:u};return}};return g(c+32)});return Nk(await Promise.all(o))}async searchExtraIndex(t,r={}){const i=await this.searchExtraIndexBlocks(t,r);if(i.length===0)return[];const s=await this.getUnzoomedView(r),o=i.map(c=>new At(u=>{s.readFeatures(u,[c],r).catch(l=>{u.error(l)})}).pipe(gb((u,l)=>u.concat(l)),pb(u=>{for(const l of u)l.field=c.field;return u})));return(await db(wk(...o))).filter(c=>{var u;return((u=c.rest)==null?void 0:u.split(" ")[(c.field||0)-3])===t})}}const wb=Object.freeze(Object.defineProperty({__proto__:null,BigBed:Lk,BigWig:Ok},Symbol.toStringTag,{value:"Module"}));function zk(n,e){function t(){this.constructor=n}t.prototype=e.prototype,n.prototype=new t}function Wi(n,e,t,r){this.message=n,this.expected=e,this.found=t,this.location=r,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Wi)}zk(Wi,Error),Wi.buildMessage=function(n,e){var t={literal:function(u){return'"'+i(u.text)+'"'},class:function(u){var l="",f;for(f=0;f<u.parts.length;f++)l+=u.parts[f]instanceof Array?s(u.parts[f][0])+"-"+s(u.parts[f][1]):s(u.parts[f]);return"["+(u.inverted?"^":"")+l+"]"},any:function(u){return"any character"},end:function(u){return"end of input"},other:function(u){return u.description}};function r(u){return u.charCodeAt(0).toString(16).toUpperCase()}function i(u){return u.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+r(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+r(l)})}function s(u){return u.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+r(l)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(l){return"\\x"+r(l)})}function o(u){return t[u.type](u)}function a(u){var l=new Array(u.length),f,d;for(f=0;f<u.length;f++)l[f]=o(u[f]);if(l.sort(),l.length>0){for(f=1,d=1;f<l.length;f++)l[f-1]!==l[f]&&(l[d]=l[f],d++);l.length=d}switch(l.length){case 1:return l[0];case 2:return l[0]+" or "+l[1];default:return l.slice(0,-1).join(", ")+", or "+l[l.length-1]}}function c(u){return u?'"'+i(u)+'"':"end of input"}return"Expected "+a(n)+" but "+c(e)+" found."};function Uk(n,e){e=e!==void 0?e:{};var t={},r={declaration:lx},i=lx,s="(",o=de("(",!1),a=")",c=de(")",!1),u=function(b,I,N,z){return{type:b,name:I,comment:N,fields:z}},l="simple",f=de("simple",!1),d="object",h=de("object",!1),p="table",m=de("table",!1),g="auto",y=de("auto",!1),x="primary",A=de("primary",!1),w="index",S=de("index",!1),C="unique",v=de("unique",!1),T=function(b,I){return I},P=function(b,I){return b.name&&I.unshift(b),I},F="#",k=de("#",!1),L=";",U=de(";",!1),j=function(b,I,N){return{type:b,name:I,comment:N}},K="[",_=de("[",!1),te="]",ce=de("]",!1),ie=function(b,I,N,z){return{type:b,size:I,name:N,comment:z}},Ne=function(b,I,N,z){return{type:b,vals:I,name:N,comment:z}},ve=",",Kt=de(",",!1),Jt=function(b,I){return I.unshift(b),I},rr="int",Ds=de("int",!1),De="uint",St=de("uint",!1),ut="short",H=de("short",!1),J="ushort",ne=de("ushort",!1),M="byte",Ye=de("byte",!1),he="ubyte",tt=de("ubyte",!1),Xe="float",xn=de("float",!1),Ea="char",Z7=de("char",!1),Wb="string",K7=de("string",!1),qb="lstring",J7=de("lstring",!1),Yb="enum",$7=de("enum",!1),Xb="double",eF=de("double",!1),Zb="bigint",tF=de("bigint",!1),Kb="set",nF=de("set",!1),rF=function(b,I){return b+" "+I},iF=/^[a-zA-Z_]/,sF=Ca([["a","z"],["A","Z"],"_"],!1,!1),Jb=/^[a-zA-Z0-9_]/,$b=Ca([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),oF=function(b){return ox()},ex=/^[^\n\r]/,tx=Ca([`
|
|
722
|
+
`,"\r"],!0,!1),aF=function(b){return b.join("").replace(/^"/,"").replace(/"$/,"")},cF=ax("integer"),nx=/^[0-9]/,rx=Ca([["0","9"]],!1,!1),uF=function(){return parseInt(ox(),10)},lF=ax("whitespace"),ix=/^[ \t\n\r]/,sx=Ca([" "," ",`
|
|
723
|
+
`,"\r"],!1,!1),D=0,nt=0,Tu=[{line:1,column:1}],$t=0,rd=[],W=0,Bu;if("startRule"in e){if(!(e.startRule in r))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');i=r[e.startRule]}function ox(){return n.substring(nt,D)}function de(b,I){return{type:"literal",text:b,ignoreCase:I}}function Ca(b,I,N){return{type:"class",parts:b,inverted:I,ignoreCase:N}}function fF(){return{type:"end"}}function ax(b){return{type:"other",description:b}}function cx(b){var I=Tu[b],N;if(I)return I;for(N=b-1;!Tu[N];)N--;for(I=Tu[N],I={line:I.line,column:I.column};N<b;)n.charCodeAt(N)===10?(I.line++,I.column=1):I.column++,N++;return Tu[b]=I,I}function ux(b,I){var N=cx(b),z=cx(I);return{start:{offset:b,line:N.line,column:N.column},end:{offset:I,line:z.line,column:z.column}}}function X(b){D<$t||(D>$t&&($t=D,rd=[]),rd.push(b))}function hF(b,I,N){return new Wi(Wi.buildMessage(b,I),b,I,N)}function lx(){var b,I,N,z,Q,pe,we,Et,ir,An,sr,wn,or,vn;return b=D,I=se(),I!==t?(N=fx(),N!==t?(z=se(),z!==t?(Q=hx(),Q!==t?(pe=se(),pe!==t?(we=ku(),we!==t?(Et=se(),Et!==t?(n.charCodeAt(D)===40?(ir=s,D++):(ir=t,W===0&&X(o)),ir!==t?(An=se(),An!==t?(sr=dF(),sr!==t?(wn=se(),wn!==t?(n.charCodeAt(D)===41?(or=a,D++):(or=t,W===0&&X(c)),or!==t?(vn=se(),vn!==t?(nt=b,I=u(N,Q,we,sr),b=I):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t),b}function fx(){var b;return n.substr(D,6)===l?(b=l,D+=6):(b=t,W===0&&X(f)),b===t&&(n.substr(D,6)===d?(b=d,D+=6):(b=t,W===0&&X(h)),b===t&&(n.substr(D,5)===p?(b=p,D+=5):(b=t,W===0&&X(m)))),b}function hx(){var b,I,N,z;return b=Ot(),b===t&&(b=D,I=Ot(),I!==t?(N=dx(),N!==t?(I=[I,N],b=I):(D=b,b=t)):(D=b,b=t),b===t&&(b=D,I=Ot(),I!==t?(n.substr(D,4)===g?(N=g,D+=4):(N=t,W===0&&X(y)),N!==t?(I=[I,N],b=I):(D=b,b=t)):(D=b,b=t),b===t&&(b=D,I=Ot(),I!==t?(N=dx(),N!==t?(n.substr(D,4)===g?(z=g,D+=4):(z=t,W===0&&X(y)),z!==t?(I=[I,N,z],b=I):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)))),b}function dx(){var b;return n.substr(D,7)===x?(b=x,D+=7):(b=t,W===0&&X(A)),b===t&&(n.substr(D,5)===w?(b=w,D+=5):(b=t,W===0&&X(S)),b===t&&(n.substr(D,6)===C?(b=C,D+=6):(b=t,W===0&&X(v)))),b}function ku(){var b;return b=px(),b===t&&(b=se()),b}function dF(){var b,I,N,z,Q,pe,we;if(b=D,I=id(),I!==t)if(N=se(),N!==t){for(z=[],Q=D,pe=se(),pe!==t?(we=id(),we!==t?(nt=Q,pe=T(I,we),Q=pe):(D=Q,Q=t)):(D=Q,Q=t);Q!==t;)z.push(Q),Q=D,pe=se(),pe!==t?(we=id(),we!==t?(nt=Q,pe=T(I,we),Q=pe):(D=Q,Q=t)):(D=Q,Q=t);z!==t?(Q=se(),Q!==t?(nt=b,I=P(I,z),b=I):(D=b,b=t)):(D=b,b=t)}else D=b,b=t;else D=b,b=t;return b}function pF(){var b;return n.charCodeAt(D)===35?(b=F,D++):(b=t,W===0&&X(k)),b}function mF(){var b,I,N,z,Q;return b=D,I=se(),I!==t?(N=pF(),N!==t?(z=px(),z!==t?(Q=se(),Q!==t?(I=[I,N,z,Q],b=I):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t),b}function id(){var b,I,N,z,Q,pe,we,Et,ir,An,sr,wn,or,vn;return b=D,I=sd(),I!==t?(N=se(),N!==t?(z=Ot(),z!==t?(Q=se(),Q!==t?(n.charCodeAt(D)===59?(pe=L,D++):(pe=t,W===0&&X(U)),pe!==t?(we=se(),we!==t?(Et=ku(),Et!==t?(nt=b,I=j(I,z,Et),b=I):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t),b===t&&(b=D,I=sd(),I!==t?(N=se(),N!==t?(n.charCodeAt(D)===91?(z=K,D++):(z=t,W===0&&X(_)),z!==t?(Q=se(),Q!==t?(pe=yF(),pe!==t?(we=se(),we!==t?(n.charCodeAt(D)===93?(Et=te,D++):(Et=t,W===0&&X(ce)),Et!==t?(ir=se(),ir!==t?(An=Ot(),An!==t?(sr=se(),sr!==t?(n.charCodeAt(D)===59?(wn=L,D++):(wn=t,W===0&&X(U)),wn!==t?(or=se(),or!==t?(vn=ku(),vn!==t?(nt=b,I=ie(I,pe,An,vn),b=I):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t),b===t&&(b=D,I=sd(),I!==t?(N=se(),N!==t?(n.charCodeAt(D)===40?(z=s,D++):(z=t,W===0&&X(o)),z!==t?(Q=se(),Q!==t?(pe=gF(),pe!==t?(we=se(),we!==t?(n.charCodeAt(D)===41?(Et=a,D++):(Et=t,W===0&&X(c)),Et!==t?(ir=se(),ir!==t?(An=Ot(),An!==t?(sr=se(),sr!==t?(n.charCodeAt(D)===59?(wn=L,D++):(wn=t,W===0&&X(U)),wn!==t?(or=se(),or!==t?(vn=ku(),vn!==t?(nt=b,I=Ne(I,pe,An,vn),b=I):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t)):(D=b,b=t),b===t&&(b=mF()))),b}function gF(){var b,I,N,z,Q,pe,we;if(b=D,I=Ot(),I!==t){for(N=[],z=D,n.charCodeAt(D)===44?(Q=ve,D++):(Q=t,W===0&&X(Kt)),Q!==t?(pe=se(),pe!==t?(we=Ot(),we!==t?(nt=z,Q=T(I,we),z=Q):(D=z,z=t)):(D=z,z=t)):(D=z,z=t);z!==t;)N.push(z),z=D,n.charCodeAt(D)===44?(Q=ve,D++):(Q=t,W===0&&X(Kt)),Q!==t?(pe=se(),pe!==t?(we=Ot(),we!==t?(nt=z,Q=T(I,we),z=Q):(D=z,z=t)):(D=z,z=t)):(D=z,z=t);N!==t?(nt=b,I=Jt(I,N),b=I):(D=b,b=t)}else D=b,b=t;return b}function sd(){var b,I,N,z;return n.substr(D,3)===rr?(b=rr,D+=3):(b=t,W===0&&X(Ds)),b===t&&(n.substr(D,4)===De?(b=De,D+=4):(b=t,W===0&&X(St)),b===t&&(n.substr(D,5)===ut?(b=ut,D+=5):(b=t,W===0&&X(H)),b===t&&(n.substr(D,6)===J?(b=J,D+=6):(b=t,W===0&&X(ne)),b===t&&(n.substr(D,4)===M?(b=M,D+=4):(b=t,W===0&&X(Ye)),b===t&&(n.substr(D,5)===he?(b=he,D+=5):(b=t,W===0&&X(tt)),b===t&&(n.substr(D,5)===Xe?(b=Xe,D+=5):(b=t,W===0&&X(xn)),b===t&&(n.substr(D,4)===Ea?(b=Ea,D+=4):(b=t,W===0&&X(Z7)),b===t&&(n.substr(D,6)===Wb?(b=Wb,D+=6):(b=t,W===0&&X(K7)),b===t&&(n.substr(D,7)===qb?(b=qb,D+=7):(b=t,W===0&&X(J7)),b===t&&(n.substr(D,4)===Yb?(b=Yb,D+=4):(b=t,W===0&&X($7)),b===t&&(n.substr(D,6)===Xb?(b=Xb,D+=6):(b=t,W===0&&X(eF)),b===t&&(n.substr(D,6)===Zb?(b=Zb,D+=6):(b=t,W===0&&X(tF)),b===t&&(n.substr(D,3)===Kb?(b=Kb,D+=3):(b=t,W===0&&X(nF)),b===t&&(b=D,I=fx(),I!==t?(N=se(),N!==t?(z=hx(),z!==t?(nt=b,I=rF(I,z),b=I):(D=b,b=t)):(D=b,b=t)):(D=b,b=t))))))))))))))),b}function yF(){var b;return b=bF(),b===t&&(b=Ot()),b}function Ot(){var b,I,N,z,Q;if(b=D,I=D,iF.test(n.charAt(D))?(N=n.charAt(D),D++):(N=t,W===0&&X(sF)),N!==t){for(z=[],Jb.test(n.charAt(D))?(Q=n.charAt(D),D++):(Q=t,W===0&&X($b));Q!==t;)z.push(Q),Jb.test(n.charAt(D))?(Q=n.charAt(D),D++):(Q=t,W===0&&X($b));z!==t?(N=[N,z],I=N):(D=I,I=t)}else D=I,I=t;return I!==t&&(nt=b,I=oF()),b=I,b}function px(){var b,I,N;for(b=D,I=[],ex.test(n.charAt(D))?(N=n.charAt(D),D++):(N=t,W===0&&X(tx));N!==t;)I.push(N),ex.test(n.charAt(D))?(N=n.charAt(D),D++):(N=t,W===0&&X(tx));return I!==t&&(nt=b,I=aF(I)),b=I,b}function bF(){var b,I,N,z;if(W++,b=D,I=se(),I!==t){if(N=[],nx.test(n.charAt(D))?(z=n.charAt(D),D++):(z=t,W===0&&X(rx)),z!==t)for(;z!==t;)N.push(z),nx.test(n.charAt(D))?(z=n.charAt(D),D++):(z=t,W===0&&X(rx));else N=t;N!==t?(nt=b,I=uF(),b=I):(D=b,b=t)}else D=b,b=t;return W--,b===t&&(I=t,W===0&&X(cF)),b}function se(){var b,I;for(W++,b=[],ix.test(n.charAt(D))?(I=n.charAt(D),D++):(I=t,W===0&&X(sx));I!==t;)b.push(I),ix.test(n.charAt(D))?(I=n.charAt(D),D++):(I=t,W===0&&X(sx));return W--,b===t&&(I=t,W===0&&X(lF)),b}if(Bu=i(),Bu!==t&&D===n.length)return Bu;throw Bu!==t&&D<n.length&&X(fF()),hF(rd,$t<n.length?n.charAt($t):null,$t<n.length?ux($t,$t+1):ux($t,$t))}const vb={SyntaxError:Wi,parse:Uk},Yh=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
|
|
730
724
|
"bigChain pairwise alignment"
|
|
731
725
|
(
|
|
732
726
|
string chrom; "Reference sequence chromosome or scaffold"
|
|
@@ -885,20 +879,10 @@ chrM 16299`};function gB(t){if(!(t in yb))throw new Error(`Unknown assembly: ${t
|
|
|
885
879
|
float score; "Floating point score."
|
|
886
880
|
char[1] leftStatus; "Gap/break annotation for preceding block"
|
|
887
881
|
char[1] rightStatus; "Gap/break annotation for following block"
|
|
888
|
-
)`},Symbol.toStringTag,{value:"Module"}))).map(([t,e])=>[t,Sx.parse(e.trim())]));function s0(t){const e=new Set(["uint","int","float","long"]);return{...t,fields:t.fields.map(n=>({...n,isArray:n.size&&n.type!=="char",arrayIsNumeric:n.size&&e.has(n.type),isNumeric:!n.size&&e.has(n.type)})).filter(n=>!!n.name)}}const V9={".":0,"-":-1,"+":1};function j9(t){var e;return t.length>=12&&!Number.isNaN(parseInt(t[9],10))&&((e=t[10])===null||e===void 0?void 0:e.split(",").filter(n=>!!n).length)===parseInt(t[9],10)}class q9{constructor(e={}){if(e.autoSql)this.autoSql=s0(H9.parse(e.autoSql));else if(e.type){if(!o0[e.type])throw new Error("Type not found");this.autoSql=s0(o0[e.type])}else this.autoSql=s0(o0.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(e,n={}){const{autoSql:r}=this,{uniqueId:o}=n,i=Array.isArray(e)?e:e.split(" ");let s={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&j9(i))for(let a=0;a<r.fields.length;a++){const c=r.fields[a];let l=i[a];const{isNumeric:u,isArray:f,arrayIsNumeric:d,name:h}=c;if(l==null)break;if(l!=="."){if(u){const p=Number(l);l=Number.isNaN(p)?l:p}else f&&(l=l.split(","),l[l.length-1]===""&&l.pop(),d&&(l=l.map(Number)));s[h]=l}}else{const a=["chrom","chromStart","chromEnd","name"];s=Object.fromEntries(i.map((c,l)=>[a[l]||"field"+l,c])),s.chromStart=+s.chromStart,s.chromEnd=+s.chromEnd,Number.isNaN(Number.parseFloat(s.field4))||(s.score=+s.field4,delete s.field4),(s.field5==="+"||s.field5==="-")&&(s.strand=s.field5,delete s.field5)}return o&&(s.uniqueId=o),s.strand=V9[s.strand]||0,s.chrom=decodeURIComponent(s.chrom),s}}const W9=Object.freeze(Object.defineProperty({__proto__:null,default:q9},Symbol.toStringTag,{value:"Module"}));let Cx=class{constructor(e,n){this.blockPosition=e,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}static min(...e){let n,r=0;for(;!n;r+=1)n=e[r];for(;r<e.length;r+=1)n.compareTo(e[r])>0&&(n=e[r]);return n}};function Ro(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Cx(t[e+7]*1099511627776+t[e+6]*4294967296+t[e+5]*16777216+t[e+4]*65536+t[e+3]*256+t[e+2],t[e+1]<<8|t[e])}let a0=class{constructor(e,n,r,o){this.minv=e,this.maxv=n,this.bin=r,this._fetchedSize=o}toUniqueString(){return`${this.minv.toString()}..${this.maxv.toString()} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(e){return this.minv.compareTo(e.minv)||this.maxv.compareTo(e.maxv)||this.bin-e.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}};function Y9(t){return new Promise(e=>setTimeout(e,t))}function Q9(t){if(t&&t.aborted)if(typeof DOMException>"u"){const e=new Error("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}function Z9(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function X9(t={}){return"aborted"in t?{signal:t}:t}function Ix(t,e){const n=[];let r;if(t.length===0)return t;t.sort((o,i)=>{const s=o.minv.blockPosition-i.minv.blockPosition;return s===0?o.minv.dataPosition-i.minv.dataPosition:s});for(const o of t)(!e||o.maxv.compareTo(e)>0)&&(r===void 0?(n.push(o),r=o):Z9(r,o)?o.maxv.compareTo(r.maxv)>0&&(r.maxv=o.maxv):(n.push(o),r=o));return n}function Tx(t,e){return{lineCount:$l.fromBytesLE(Array.prototype.slice.call(t,e,e+8),!0).toNumber()}}function hu(t,e){return t?t.compareTo(e)>0?e:t:e}function K9(t,e=n=>n){let n=0,r=0;const o=[],i={};for(let s=0;s<t.length;s+=1)if(!t[s]){if(r<s){let a=t.toString("utf8",r,s);a=e(a),o[n]=a,i[a]=n}r=s+1,n+=1}return{refNameToId:i,refIdToName:o}}let Dx=class{constructor({filehandle:e,renameRefSeq:n=r=>r}){this.filehandle=e,this.renameRefSeq=n}};const J9=21578050;function $9(t,e){return t-t%e}function eM(t,e){return t-t%e+e}function tM(t,e){return e-=1,[[0,0],[1+(t>>26),1+(e>>26)],[9+(t>>23),9+(e>>23)],[73+(t>>20),73+(e>>20)],[585+(t>>17),585+(e>>17)],[4681+(t>>14),4681+(e>>14)]]}class Fo extends Dx{async lineCount(e,n){var r,o;return((o=(r=(await this.parse(n)).indices[e])===null||r===void 0?void 0:r.stats)===null||o===void 0?void 0:o.lineCount)||0}async _parse(e){const n=await this.filehandle.readFile(e);if(n.readUInt32LE(0)!==J9)throw new Error("Not a BAI file");const r=n.readInt32LE(4),i=((1<<(5+1)*3)-1)/7;let s=8,a;const c=new Array(r);for(let l=0;l<r;l++){const u=n.readInt32LE(s);let f;s+=4;const d={};for(let y=0;y<u;y+=1){const v=n.readUInt32LE(s);if(s+=4,v===i+1)s+=4,f=Tx(n,s+16),s+=32;else{if(v>i+1)throw new Error("bai index contains too many bins, please use CSI");{const b=n.readInt32LE(s);s+=4;const A=new Array(b);for(let S=0;S<b;S++){const E=Ro(n,s);s+=8;const I=Ro(n,s);s+=8,a=hu(a,E),A[S]=new a0(E,I,v)}d[v]=A}}}const h=n.readInt32LE(s);s+=4;const p=new Array(h);for(let y=0;y<h;y++){const v=Ro(n,s);s+=8,a=hu(a,v),p[y]=v}c[l]={binIndex:d,linearIndex:p,stats:f}}return{bai:!0,firstDataLine:a,maxBlockSize:65536,indices:c,refCount:r}}async indexCov(e,n,r,o={}){const s=n!==void 0,c=(await this.parse(o)).indices[e];if(!c)return[];const{linearIndex:l=[],stats:u}=c;if(l.length===0)return[];const f=r===void 0?(l.length-1)*16384:eM(r,16384),d=n===void 0?0:$9(n,16384),h=s?new Array((f-d)/16384):new Array(l.length-1),p=l[l.length-1].blockPosition;if(f>(l.length-1)*16384)throw new Error("query outside of range of linear index");let y=l[d/16384].blockPosition;for(let v=d/16384,b=0;v<f/16384;v++,b++)h[b]={score:l[v+1].blockPosition-y,start:v*16384,end:v*16384+16384},y=l[v+1].blockPosition;return h.map(v=>({...v,score:v.score*((u==null?void 0:u.lineCount)||0)/p}))}async blocksForRange(e,n,r,o={}){n<0&&(n=0);const i=await this.parse(o);if(!i)return[];const s=i.indices[e];if(!s)return[];const a=tM(n,r),c=[];for(const[h,p]of a)for(let y=h;y<=p;y++)if(s.binIndex[y]){const v=s.binIndex[y];for(const b of v)c.push(new a0(b.minv,b.maxv,y))}const l=s.linearIndex.length;let u;const f=Math.min(n>>14,l-1),d=Math.min(r>>14,l-1);for(let h=f;h<=d;++h){const p=s.linearIndex[h];p&&(!u||p.compareTo(u)<0)&&(u=p)}return Ix(c,u)}async parse(e={}){return this.setupP||(this.setupP=this._parse(e).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(e,n={}){var r;return!!(!((r=(await this.parse(n)).indices[e])===null||r===void 0)&&r.binIndex)}}let c0=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(c0=new Int32Array(c0));const nM=(t,e)=>{let n=e===0?0:~~e^-1;for(let r=0;r<t.length;r++)n=c0[(n^t[r])&255]^n>>>8;return n^-1},Bx=(t,e)=>Ke.Buffer.from(t,e);function rM(t,e){const n=(r,o)=>e(Bx(r),o)>>>0;return n.signed=(r,o)=>e(Bx(r),o),n.unsigned=n,n.model=t,n}const iM=rM("crc-32",nM),oM=21582659,sM=38359875;function aM(t,e){return t*2**e}function kx(t,e){return Math.floor(t/2**e)}let du=class extends Dx{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(e,n){var r,o;return((o=(r=(await this.parse(n)).indices[e])===null||r===void 0?void 0:r.stats)===null||o===void 0?void 0:o.lineCount)||0}async indexCov(){return[]}parseAuxData(e,n){const r=e.readInt32LE(n),o=r&65536?"zero-based-half-open":"1-based-closed",i={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!i)throw new Error(`invalid Tabix preset format flags ${r}`);const s={ref:e.readInt32LE(n+4),start:e.readInt32LE(n+8),end:e.readInt32LE(n+12)},a=e.readInt32LE(n+16),c=a?String.fromCharCode(a):"",l=e.readInt32LE(n+20),u=e.readInt32LE(n+24);return{columnNumbers:s,coordinateType:o,metaValue:a,metaChar:c,skipLines:l,format:i,formatFlags:r,...K9(e.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(e){const n=await this.filehandle.readFile(e),r=await zr(n);let o;if(r.readUInt32LE(0)===oM)o=1;else if(r.readUInt32LE(0)===sM)o=2;else throw new Error("Not a CSI file");this.minShift=r.readInt32LE(4),this.depth=r.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const i=r.readInt32LE(12),s=i>=30?this.parseAuxData(r,16):void 0,a=r.readInt32LE(16+i);let c=16+i+4,l;const u=new Array(a);for(let f=0;f<a;f++){const d=r.readInt32LE(c);c+=4;const h={};let p;for(let y=0;y<d;y++){const v=r.readUInt32LE(c);if(c+=4,v>this.maxBinNumber)p=Tx(r,c+28),c+=44;else{l=hu(l,Ro(r,c)),c+=8;const b=r.readInt32LE(c);c+=4;const A=new Array(b);for(let S=0;S<b;S+=1){const E=Ro(r,c);c+=8;const I=Ro(r,c);c+=8,l=hu(l,E),A[S]=new a0(E,I,v)}h[v]=A}}u[f]={binIndex:h,stats:p}}return{csiVersion:o,firstDataLine:l,indices:u,refCount:a,csi:!0,maxBlockSize:65536,...s}}async blocksForRange(e,n,r,o={}){n<0&&(n=0);const s=(await this.parse(o)).indices[e];if(!s)return[];const a=this.reg2bins(n,r);if(a.length===0)return[];const c=[];for(const[l,u]of a)for(let f=l;f<=u;f++)if(s.binIndex[f]){const d=s.binIndex[f];for(const h of d)c.push(h)}return Ix(c,new Cx(0,0))}reg2bins(e,n){e-=1,e<1&&(e=1),n>2**50&&(n=2**34),n-=1;let r=0,o=0,i=this.minShift+this.depth*3;const s=[];for(;r<=this.depth;i-=3,o+=aM(1,r*3),r+=1){const a=o+kx(e,i),c=o+kx(n,i);if(c-a+s.length>this.maxBinNumber)throw new Error(`query ${e}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);s.push([a,c])}return s}async parse(e={}){return this.setupP||(this.setupP=this._parse(e).catch(n=>{throw this.setupP=void 0,n})),this.setupP}async hasRefSeq(e,n={}){var r;return!!(!((r=(await this.parse(n)).indices[e])===null||r===void 0)&&r.binIndex)}};const pn={BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048},_x="=ACMGRSVTWYHKDBN".split(""),Oa="MIDNSHP=X???????".split("");class Mo{constructor(e){this.bytes=e.bytes,this.fileOffset=e.fileOffset}get byteArray(){return this.bytes.byteArray}get flags(){return(this.byteArray.readInt32LE(this.bytes.start+16)&4294901760)>>16}get ref_id(){return this.byteArray.readInt32LE(this.bytes.start+4)}get start(){return this.byteArray.readInt32LE(this.bytes.start+8)}get end(){return this.start+this.length_on_ref}get id(){return this.fileOffset}get mq(){const e=(this.bin_mq_nl&65280)>>8;return e===255?void 0:e}get score(){return this.mq}get qual(){if(this.isSegmentUnmapped())return;const e=this.b0+this.read_name_length+this.num_cigar_ops*4+this.num_seq_bytes;return this.byteArray.subarray(e,e+this.seq_length)}get strand(){return this.isReverseComplemented()?-1:1}get b0(){return this.bytes.start+36}get name(){return this.byteArray.toString("ascii",this.b0,this.b0+this.read_name_length-1)}get tags(){const{byteArray:e}=this.bytes;let n=this.b0+this.read_name_length+this.num_cigar_ops*4+this.num_seq_bytes+this.seq_length;const r=this.bytes.end,o={};for(;n<r;){const i=String.fromCharCode(e[n],e[n+1]),s=String.fromCharCode(e[n+2]);if(n+=3,s==="A")o[i]=String.fromCharCode(e[n]),n+=1;else if(s==="i")o[i]=e.readInt32LE(n),n+=4;else if(s==="I")o[i]=e.readUInt32LE(n),n+=4;else if(s==="c")o[i]=e.readInt8(n),n+=1;else if(s==="C")o[i]=e.readUInt8(n),n+=1;else if(s==="s")o[i]=e.readInt16LE(n),n+=2;else if(s==="S")o[i]=e.readUInt16LE(n),n+=2;else if(s==="f")o[i]=e.readFloatLE(n),n+=4;else if(s==="Z"||s==="H"){const a=[];for(;n<=r;){const c=e[n++];if(c!==0)a.push(String.fromCharCode(c));else break}o[i]=a.join("")}else if(s==="B"){const a=e[n++],c=String.fromCharCode(a),l=e.readInt32LE(n);if(n+=4,c==="i")if(i==="CG"){const u=[];for(let f=0;f<l;f++){const d=e.readInt32LE(n),h=d>>4,p=Oa[d&15];u.push(h+p),n+=4}o[i]=u.join("")}else{const u=[];for(let f=0;f<l;f++)u.push(e.readInt32LE(n)),n+=4;o[i]=u}else if(c==="I")if(i==="CG"){const u=[];for(let f=0;f<l;f++){const d=e.readUInt32LE(n),h=d>>4,p=Oa[d&15];u.push(h+p),n+=4}o[i]=u.join("")}else{const u=[];for(let f=0;f<l;f++)u.push(e.readUInt32LE(n)),n+=4;o[i]=u}else if(c==="s"){const u=[];for(let f=0;f<l;f++)u.push(e.readInt16LE(n)),n+=2;o[i]=u}else if(c==="S"){const u=[];for(let f=0;f<l;f++)u.push(e.readUInt16LE(n)),n+=2;o[i]=u}else if(c==="c"){const u=[];for(let f=0;f<l;f++)u.push(e.readInt8(n)),n+=1;o[i]=u}else if(c==="C"){const u=[];for(let f=0;f<l;f++)u.push(e.readUInt8(n)),n+=1;o[i]=u}else if(c==="f"){const u=[];for(let f=0;f<l;f++)u.push(e.readFloatLE(n)),n+=4;o[i]=u}}else{console.error("Unknown BAM tag type",s);break}}return o}isPaired(){return!!(this.flags&pn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&pn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&pn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&pn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&pn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&pn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&pn.BAM_FREAD1)}isRead2(){return!!(this.flags&pn.BAM_FREAD2)}isSecondary(){return!!(this.flags&pn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&pn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&pn.BAM_FDUP)}isSupplementary(){return!!(this.flags&pn.BAM_FSUPPLEMENTARY)}get cigarAndLength(){if(this.isSegmentUnmapped())return{length_on_ref:0,CIGAR:""};const e=this.num_cigar_ops;let n=this.b0+this.read_name_length;const r=[];let o=this.byteArray.readInt32LE(n),i=o>>4,s=Oa[o&15];if(s==="S"&&i===this.seq_length)return n+=4,o=this.byteArray.readInt32LE(n),i=o>>4,s=Oa[o&15],s!=="N"&&console.warn("CG tag with no N tag"),{CIGAR:this.tags.CG,length_on_ref:i};{let a=0;for(let c=0;c<e;++c)o=this.byteArray.readInt32LE(n),i=o>>4,s=Oa[o&15],r.push(i+s),s!=="H"&&s!=="S"&&s!=="I"&&(a+=i),n+=4;return{CIGAR:r.join(""),length_on_ref:a}}}get length_on_ref(){return this.cigarAndLength.length_on_ref}get CIGAR(){return this.cigarAndLength.CIGAR}get num_cigar_ops(){return this.flag_nc&65535}get read_name_length(){return this.bin_mq_nl&255}get num_seq_bytes(){return this.seq_length+1>>1}get seq(){const{byteArray:e}=this.bytes,n=this.b0+this.read_name_length+this.num_cigar_ops*4,r=this.num_seq_bytes,o=this.seq_length,i=[];let s=0;for(let a=0;a<r;++a){const c=e[n+a];i.push(_x[(c&240)>>4]),s++,s<o&&(i.push(_x[c&15]),s++)}return i.join("")}get pair_orientation(){if(!this.isSegmentUnmapped()&&!this.isMateUnmapped()&&this.ref_id===this.next_refid){const e=this.isReverseComplemented()?"R":"F",n=this.isMateReverseComplemented()?"R":"F";let r=" ",o=" ";this.isRead1()?(r="1",o="2"):this.isRead2()&&(r="2",o="1");const i=[];return this.template_length>0?(i[0]=e,i[1]=r,i[2]=n,i[3]=o):(i[2]=e,i[3]=r,i[0]=n,i[1]=o),i.join("")}}get bin_mq_nl(){return this.byteArray.readInt32LE(this.bytes.start+12)}get flag_nc(){return this.byteArray.readInt32LE(this.bytes.start+16)}get seq_length(){return this.byteArray.readInt32LE(this.bytes.start+20)}get next_refid(){return this.byteArray.readInt32LE(this.bytes.start+24)}get next_pos(){return this.byteArray.readInt32LE(this.bytes.start+28)}get template_length(){return this.byteArray.readInt32LE(this.bytes.start+32)}toJSON(){const e={};for(const n of Object.keys(this))n.startsWith("_")||n==="bytes"||(e[n]=this[n]);return e}}function pu(t,e){const n=Object.getOwnPropertyDescriptor(t.prototype,e);if(!n)throw new Error("OH NO, NO PROPERTY DESCRIPTOR");const r=n.get;if(!r)throw new Error("OH NO, NOT A GETTER");Object.defineProperty(t.prototype,e,{get(){const o=r.call(this);return Object.defineProperty(this,e,{value:o}),o}})}pu(Mo,"tags"),pu(Mo,"cigarAndLength"),pu(Mo,"seq"),pu(Mo,"qual");function Rx(t){const e=t.split(/\r?\n/),n=[];for(const r of e){const[o,...i]=r.split(/\t/);o&&n.push({tag:o.slice(1),data:i.map(s=>{const a=s.indexOf(":"),c=s.slice(0,a),l=s.slice(a+1);return{tag:c,value:l}})})}return n}const Fx=21840194,Mx=65536;async function cM(t){let e=[];for await(const n of t)e=e.concat(n);return e}class lM{read(){throw new Error("never called")}stat(){throw new Error("never called")}readFile(){throw new Error("never called")}close(){throw new Error("never called")}}class Px{constructor({bamFilehandle:e,bamPath:n,bamUrl:r,baiPath:o,baiFilehandle:i,baiUrl:s,csiPath:a,csiFilehandle:c,csiUrl:l,htsget:u,yieldThreadTime:f=100,renameRefSeqs:d=h=>h}){if(this.htsget=!1,this.featureCache=new Di({cache:new tu({maxSize:50}),fill:async(h,p)=>{const{chunk:y,opts:v}=h,{data:b,cpositions:A,dpositions:S}=await this._readChunk({chunk:y,opts:{...v,signal:p}});return this.readBamFeatures(b,A,S,y)}}),this.renameRefSeq=d,e)this.bam=e;else if(n)this.bam=new Ct(n);else if(r)this.bam=new Cn(r);else if(u)this.htsget=!0,this.bam=new lM;else throw new Error("unable to initialize bam");if(c)this.index=new du({filehandle:c});else if(a)this.index=new du({filehandle:new Ct(a)});else if(l)this.index=new du({filehandle:new Cn(l)});else if(i)this.index=new Fo({filehandle:i});else if(o)this.index=new Fo({filehandle:new Ct(o)});else if(s)this.index=new Fo({filehandle:new Cn(s)});else if(n)this.index=new Fo({filehandle:new Ct(`${n}.bai`)});else if(r)this.index=new Fo({filehandle:new Cn(`${r}.bai`)});else if(u)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=f}async getHeaderPre(e){const n=X9(e);if(!this.index)return;const r=await this.index.parse(n),o=r.firstDataLine?r.firstDataLine.blockPosition+65535:void 0;let i;if(o){const u=o+Mx,f=await this.bam.read(Ke.Buffer.alloc(u),0,u,0,n);if(!f.bytesRead)throw new Error("Error reading header");i=f.buffer.subarray(0,Math.min(f.bytesRead,o))}else i=await this.bam.readFile(n);const s=await zr(i);if(s.readInt32LE(0)!==Fx)throw new Error("Not a BAM file");const a=s.readInt32LE(4);this.header=s.toString("utf8",8,8+a);const{chrToIndex:c,indexToChr:l}=await this._readRefSeqs(a+8,65535,n);return this.chrToIndex=c,this.indexToChr=l,Rx(this.header)}getHeader(e){return this.headerP||(this.headerP=this.getHeaderPre(e).catch(n=>{throw this.headerP=void 0,n})),this.headerP}async getHeaderText(e={}){return await this.getHeader(e),this.header}async _readRefSeqs(e,n,r){if(e>n)return this._readRefSeqs(e,n*2,r);const o=n+Mx,{bytesRead:i,buffer:s}=await this.bam.read(Ke.Buffer.alloc(o),0,n,0,r);if(!i)throw new Error("Error reading refseqs from header");const a=await zr(s.subarray(0,Math.min(i,n))),c=a.readInt32LE(e);let l=e+4;const u={},f=[];for(let d=0;d<c;d+=1){const h=a.readInt32LE(l),p=this.renameRefSeq(a.toString("utf8",l+4,l+4+h-1)),y=a.readInt32LE(l+h+4);if(u[p]=d,f.push({refName:p,length:y}),l=l+8+h,l>a.length)return console.warn(`BAM header is very big. Re-fetching ${n} bytes.`),this._readRefSeqs(e,n*2,r)}return{chrToIndex:u,indexToChr:f}}async getRecordsForRange(e,n,r,o){return cM(this.streamRecordsForRange(e,n,r,o))}async*streamRecordsForRange(e,n,r,o){var i;await this.getHeader(o);const s=(i=this.chrToIndex)===null||i===void 0?void 0:i[e];if(s===void 0||!this.index)yield[];else{const a=await this.index.blocksForRange(s,n-1,r,o);yield*this._fetchChunkFeatures(a,s,n,r,o)}}async*_fetchChunkFeatures(e,n,r,o,i={}){const{viewAsPairs:s}=i,a=[];let c=!1;for(const l of e){const u=await this.featureCache.get(l.toString(),{chunk:l,opts:i},i.signal),f=[];for(const d of u)if(d.ref_id===n)if(d.start>=o){c=!0;break}else d.end>=r&&f.push(d);if(a.push(f),yield f,c)break}Q9(i.signal),s&&(yield this.fetchPairs(n,a,i))}async fetchPairs(e,n,r){const{pairAcrossChr:o,maxInsertSize:i=2e5}=r,s={},a={};n.map(d=>{const h={};for(const p of d){const y=p.name,v=p.id;h[y]||(h[y]=0),h[y]++,a[v]=1}for(const[p,y]of Object.entries(h))y===1&&(s[p]=!0)});const c=[];n.map(d=>{for(const h of d){const p=h.name,y=h.start,v=h.next_pos,b=h.next_refid;this.index&&s[p]&&(o||b===e&&Math.abs(y-v)<i)&&c.push(this.index.blocksForRange(b,v,v+1,r))}});const l=new Map,u=await Promise.all(c);for(const d of u.flat())l.has(d.toString())||l.set(d.toString(),d);return(await Promise.all([...l.values()].map(async d=>{const{data:h,cpositions:p,dpositions:y,chunk:v}=await this._readChunk({chunk:d,opts:r}),b=[];for(const A of await this.readBamFeatures(h,p,y,v))s[A.name]&&!a[A.id]&&b.push(A);return b}))).flat()}async _readRegion(e,n,r={}){const{bytesRead:o,buffer:i}=await this.bam.read(Ke.Buffer.alloc(n),0,n,e,r);return i.subarray(0,Math.min(o,n))}async _readChunk({chunk:e,opts:n}){const r=await this._readRegion(e.minv.blockPosition,e.fetchedSize(),n),{buffer:o,cpositions:i,dpositions:s}=await q2(r,e);return{data:o,cpositions:i,dpositions:s,chunk:e}}async readBamFeatures(e,n,r,o){let i=0;const s=[];let a=0,c=+Date.now();for(;i+4<e.length;){const l=e.readInt32LE(i),u=i+4+l-1;if(r){for(;i+o.minv.dataPosition>=r[a++];);a--}if(u<e.length){const f=new Mo({bytes:{byteArray:e,start:i,end:u},fileOffset:n.length>0?n[a]*256+(i-r[a])+o.minv.dataPosition+1:iM.signed(e.slice(i,u))});s.push(f),this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime&&(await Y9(1),c=+Date.now())}i=u+1}return s}async hasRefSeq(e){var n,r;const o=(n=this.chrToIndex)===null||n===void 0?void 0:n[e];return o===void 0?!1:(r=this.index)===null||r===void 0?void 0:r.hasRefSeq(o)}async lineCount(e){var n;const r=(n=this.chrToIndex)===null||n===void 0?void 0:n[e];return r===void 0||!this.index?0:this.index.lineCount(r)}async indexCov(e,n,r){var o;if(!this.index)return[];await this.index.parse();const i=(o=this.chrToIndex)===null||o===void 0?void 0:o[e];return i===void 0?[]:this.index.indexCov(i,n,r)}async blocksForRange(e,n,r,o){var i;if(!this.index)return[];await this.index.parse();const s=(i=this.chrToIndex)===null||i===void 0?void 0:i[e];return s===void 0?[]:this.index.blocksForRange(s,n,r,o)}}async function Lx(t,e){const n=await Promise.all(t.map(async r=>{const{url:o,headers:i}=r;if(o.startsWith("data:"))return Ke.Buffer.from(o.split(",")[1],"base64");{const{referer:s,...a}=i,c=await fetch(o,{...e,headers:{...e==null?void 0:e.headers,...a}});if(!c.ok)throw new Error(`HTTP ${c.status} fetching ${o}: ${await c.text()}`);return Ke.Buffer.from(await c.arrayBuffer())}}));return Ke.Buffer.concat(await Promise.all(n.map(r=>zr(r))))}class uM extends Px{constructor(e){super({htsget:!0}),this.baseUrl=e.baseUrl,this.trackId=e.trackId}async*streamRecordsForRange(e,n,r,o){var i;const a=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${e}&start=${n}&end=${r}&format=BAM`,c=(i=this.chrToIndex)===null||i===void 0?void 0:i[e];if(c===void 0)yield[];else{const l=await fetch(a,{...o});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${a}: ${await l.text()}`);const u=await l.json(),f=await Lx(u.htsget.urls.slice(1),o);yield*this._fetchChunkFeatures([{buffer:f,_fetchedSize:void 0,bin:0,compareTo(){return 0},toUniqueString(){return`${e}_${n}_${r}`},fetchedSize(){return 0},minv:{dataPosition:0,blockPosition:0,compareTo:()=>0},maxv:{dataPosition:Number.MAX_SAFE_INTEGER,blockPosition:0,compareTo:()=>0},toString(){return`${e}_${n}_${r}`}}],c,n,r,o)}}async _readChunk({chunk:e}){if(!e.buffer)throw new Error("expected chunk.buffer in htsget");return{data:e.buffer,cpositions:[],dpositions:[],chunk:e}}async getHeader(e={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,r=await fetch(n,e);if(!r.ok)throw new Error(`HTTP ${r.status} fetching ${n}: ${await r.text()}`);const o=await r.json(),i=await Lx(o.htsget.urls,e);if(i.readInt32LE(0)!==Fx)throw new Error("Not a BAM file");const s=i.readInt32LE(4),a=i.toString("utf8",8,8+s),c=Rx(a),l=[],u={},f=c.filter(d=>d.tag==="SQ");for(const[d,h]of f.entries()){let p="",y=0;for(const v of h.data)v.tag==="SN"?p=v.value:v.tag==="LN"&&(y=+v.value);u[p]=d,l[d]={refName:p,length:y}}return this.chrToIndex=u,this.indexToChr=l,c}}const fM=Object.freeze(Object.defineProperty({__proto__:null,BAI:Fo,BamFile:Px,BamRecord:Mo,CSI:du,HtsgetFile:uM},Symbol.toStringTag,{value:"Module"}));function Ox(t){if(t.greaterThan(Number.MAX_SAFE_INTEGER)||t.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return t.toNumber()}class hM extends Error{}function Na(t){if(t&&t.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const e=new hM("aborted");throw e.code="ERR_ABORTED",e}}}function dM(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function Nx(t,e){const n=[];let r=null;return t.length===0?t:(t.sort(function(o,i){const s=o.minv.blockPosition-i.minv.blockPosition;return s!==0?s:o.minv.dataPosition-i.minv.dataPosition}),t.forEach(o=>{(!e||o.maxv.compareTo(e)>0)&&(r===null?(n.push(o),r=o):dM(r,o)?o.maxv.compareTo(r.maxv)>0&&(r.maxv=o.maxv):(n.push(o),r=o))}),n)}class l0{constructor(e,n){this.blockPosition=e,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}}function Po(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new l0(t[e+7]*1099511627776+t[e+6]*4294967296+t[e+5]*16777216+t[e+4]*65536+t[e+3]*256+t[e+2],t[e+1]<<8|t[e])}class gu{constructor(e,n,r,o=void 0){this.minv=e,this.maxv=n,this.bin=r,this._fetchedSize=o}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(e){return this.minv.compareTo(e.minv)||this.maxv.compareTo(e.maxv)||this.bin-e.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}class zx{constructor({filehandle:e,renameRefSeqs:n=r=>r}){this.filehandle=e,this.renameRefSeq=n}async getMetadata(e={}){const{indices:n,...r}=await this.parse(e);return r}_findFirstData(e,n){return e?e.compareTo(n)>0?n:e:n}async parse(e={}){return this.parseP||(this.parseP=this._parse(e).catch(n=>{throw this.parseP=void 0,n})),this.parseP}async hasRefSeq(e,n={}){var r;return!!(!((r=(await this.parse(n)).indices[e])===null||r===void 0)&&r.binIndex)}}const pM=21578324,Ux=14;function gM(t,e){return t+=1,e-=1,[[0,0],[1+(t>>26),1+(e>>26)],[9+(t>>23),9+(e>>23)],[73+(t>>20),73+(e>>20)],[585+(t>>17),585+(e>>17)],[4681+(t>>14),4681+(e>>14)]]}class Lo extends zx{async lineCount(e,n={}){const r=await this.parse(n),o=r.refNameToId[e];if(o===void 0||!r.indices[o])return-1;const{stats:s}=r.indices[o];return s?s.lineCount:-1}async _parse(e={}){const n=await this.filehandle.readFile(e),r=await zr(n);if(Na(e.signal),r.readUInt32LE(0)!==pM)throw new Error("Not a TBI file");const o=r.readInt32LE(4),i=r.readInt32LE(8),s=i&65536?"zero-based-half-open":"1-based-closed",c={0:"generic",1:"SAM",2:"VCF"}[i&15];if(!c)throw new Error(`invalid Tabix preset format flags ${i}`);const l={ref:r.readInt32LE(12),start:r.readInt32LE(16),end:r.readInt32LE(20)},u=r.readInt32LE(24),f=5,d=((1<<(f+1)*3)-1)/7,h=2**(14+f*3),p=u?String.fromCharCode(u):null,y=r.readInt32LE(28),v=r.readInt32LE(32),{refNameToId:b,refIdToName:A}=this._parseNameBytes(r.slice(36,36+v));let S=36+v,E;return{indices:new Array(o).fill(0).map(()=>{const _=r.readInt32LE(S);S+=4;const B={};let N;for(let C=0;C<_;C+=1){const Y=r.readUInt32LE(S);if(S+=4,Y>d+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(Y===d+1){const Q=r.readInt32LE(S);S+=4,Q===2&&(N=this.parsePseudoBin(r,S)),S+=16*Q}else{const Q=r.readInt32LE(S);S+=4;const oe=new Array(Q);for(let se=0;se<Q;se+=1){const ae=Po(r,S),ce=Po(r,S+8);S+=16,E=this._findFirstData(E,ae),oe[se]=new gu(ae,ce,Y)}B[Y]=oe}}const F=r.readInt32LE(S);S+=4;const M=new Array(F);for(let C=0;C<F;C+=1)M[C]=Po(r,S),S+=8,E=this._findFirstData(E,M[C]);return{binIndex:B,linearIndex:M,stats:N}}),metaChar:p,maxBinNumber:d,maxRefLength:h,skipLines:y,firstDataLine:E,columnNumbers:l,coordinateType:s,format:c,refIdToName:A,refNameToId:b,maxBlockSize:65536}}parsePseudoBin(e,n){return{lineCount:Ox($l.fromBytesLE(e.slice(n+16,n+24),!0))}}_parseNameBytes(e){let n=0,r=0;const o=[],i={};for(let s=0;s<e.length;s+=1)if(!e[s]){if(r<s){let a=e.toString("utf8",r,s);a=this.renameRefSeq(a),o[n]=a,i[a]=n}r=s+1,n+=1}return{refNameToId:i,refIdToName:o}}async blocksForRange(e,n,r,o={}){n<0&&(n=0);const i=await this.parse(o),s=i.refNameToId[e];if(s===void 0)return[];const a=i.indices[s];if(!a)return[];(a.linearIndex.length?a.linearIndex[n>>Ux>=a.linearIndex.length?a.linearIndex.length-1:n>>Ux]:new l0(0,0))||console.warn("querying outside of possible tabix range");const l=gM(n,r),u=[];for(const[y,v]of l)for(let b=y;b<=v;b++)if(a.binIndex[b])for(const A of a.binIndex[b])u.push(new gu(A.minv,A.maxv,b));const f=a.linearIndex.length;let d=null;const h=Math.min(n>>14,f-1),p=Math.min(r>>14,f-1);for(let y=h;y<=p;++y){const v=a.linearIndex[y];v&&(!d||v.compareTo(d)<0)&&(d=v)}return Nx(u,d)}}const mM=21582659,yM=38359875;function bM(t,e){return t*2**e}function Gx(t,e){return Math.floor(t/2**e)}class mu extends zx{constructor(e){super(e),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(e,n={}){const r=await this.parse(n),o=r.refNameToId[e];if(o===void 0||!r.indices[o])return-1;const{stats:s}=r.indices[o];return s?s.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(e,n){const r=e.readInt32LE(n),o=r&65536?"zero-based-half-open":"1-based-closed",i={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!i)throw new Error(`invalid Tabix preset format flags ${r}`);const s={ref:e.readInt32LE(n+4),start:e.readInt32LE(n+8),end:e.readInt32LE(n+12)},a=e.readInt32LE(n+16),c=a?String.fromCharCode(a):null,l=e.readInt32LE(n+20),u=e.readInt32LE(n+24),{refIdToName:f,refNameToId:d}=this._parseNameBytes(e.slice(n+28,n+28+u));return{refIdToName:f,refNameToId:d,skipLines:l,metaChar:c,columnNumbers:s,format:i,coordinateType:o}}_parseNameBytes(e){let n=0,r=0;const o=[],i={};for(let s=0;s<e.length;s+=1)if(!e[s]){if(r<s){let a=e.toString("utf8",r,s);a=this.renameRefSeq(a),o[n]=a,i[a]=n}r=s+1,n+=1}return{refNameToId:i,refIdToName:o}}async _parse(e={}){const n=await zr(await this.filehandle.readFile(e));let r;if(n.readUInt32LE(0)===mM)r=1;else if(n.readUInt32LE(0)===yM)r=2;else throw new Error("Not a CSI file");this.minShift=n.readInt32LE(4),this.depth=n.readInt32LE(8),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const o=2**(this.minShift+this.depth*3),i=n.readInt32LE(12),s=i&&i>=30?this.parseAuxData(n,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},a=n.readInt32LE(16+i);let c,l=16+i+4;const u=new Array(a).fill(0).map(()=>{const f=n.readInt32LE(l);l+=4;const d={};let h;for(let p=0;p<f;p+=1){const y=n.readUInt32LE(l);if(y>this.maxBinNumber)h=this.parsePseudoBin(n,l+4),l+=48;else{const v=Po(n,l+4);c=this._findFirstData(c,v);const b=n.readInt32LE(l+12);l+=16;const A=new Array(b);for(let S=0;S<b;S+=1){const E=Po(n,l),I=Po(n,l+8);l+=16,A[S]=new gu(E,I,y)}d[y]=A}}return{binIndex:d,stats:h}});return{...s,csi:!0,refCount:a,maxBlockSize:65536,firstDataLine:c,csiVersion:r,indices:u,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:o}}parsePseudoBin(e,n){return{lineCount:Ox($l.fromBytesLE(e.slice(n+28,n+36),!0))}}async blocksForRange(e,n,r,o={}){n<0&&(n=0);const i=await this.parse(o),s=i.refNameToId[e];if(s===void 0)return[];const a=i.indices[s];if(!a)return[];const c=this.reg2bins(n,r),l=[];for(const[u,f]of c)for(let d=u;d<=f;d++)if(a.binIndex[d])for(const h of a.binIndex[d])l.push(new gu(h.minv,h.maxv,d));return Nx(l,new l0(0,0))}reg2bins(e,n){e-=1,e<1&&(e=1),n>2**50&&(n=2**34),n-=1;let r=0,o=0,i=this.minShift+this.depth*3;const s=[];for(;r<=this.depth;i-=3,o+=bM(1,r*3),r+=1){const a=o+Gx(e,i),c=o+Gx(n,i);if(c-a+s.length>this.maxBinNumber)throw new Error(`query ${e}-${n} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);s.push([a,c])}return s}}function wM(t){return/^[\u0000-\u007F]*$/.test(t)}const Oo=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;class xM{constructor({path:e,filehandle:n,url:r,tbiPath:o,tbiUrl:i,tbiFilehandle:s,csiPath:a,csiUrl:c,csiFilehandle:l,renameRefSeqs:u=d=>d,chunkCacheSize:f=5*2**20}){if(n)this.filehandle=n;else if(e)this.filehandle=new Ct(e);else if(r)this.filehandle=new Cn(r);else throw new TypeError("must provide either filehandle or path");if(s)this.index=new Lo({filehandle:s,renameRefSeqs:u});else if(l)this.index=new mu({filehandle:l,renameRefSeqs:u});else if(o)this.index=new Lo({filehandle:new Ct(o),renameRefSeqs:u});else if(a)this.index=new mu({filehandle:new Ct(a),renameRefSeqs:u});else if(e)this.index=new Lo({filehandle:new Ct(`${e}.tbi`),renameRefSeqs:u});else if(c)this.index=new mu({filehandle:new Cn(c)});else if(i)this.index=new Lo({filehandle:new Cn(i)});else if(r)this.index=new Lo({filehandle:new Cn(`${r}.tbi`)});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.renameRefSeq=u,this.chunkCache=new Di({cache:new tu({maxSize:Math.floor(f/65536)}),fill:(d,h)=>this.readChunk(d,{signal:h})})}async getLines(e,n,r,o){var i,s;let a,c={},l;typeof o=="function"?l=o:(c=o,l=o.lineCallback,a=o.signal);const u=await this.index.getMetadata(c);Na(a);const f=n??0,d=r??u.maxRefLength;if(!(f<=d))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(f===d)return;const h=await this.index.blocksForRange(e,f,d,c);Na(a);for(const p of h){const{buffer:y,cpositions:v,dpositions:b}=await this.chunkCache.get(p.toString(),p,a);Na(a);let A=0,S=0;const E=(i=Oo==null?void 0:Oo.decode(y))!==null&&i!==void 0?i:y.toString(),I=y.length<5e8&&wM(E);for(;A<E.length;){let _,B;if(I){if(B=E.indexOf(`
|
|
889
|
-
`,A),
|
|
890
|
-
`,A),B===-1)break;const M=y.slice(A,B);_=(s=Oo==null?void 0:Oo.decode(M))!==null&&s!==void 0?s:M.toString()}if(b){for(;A+p.minv.dataPosition>=b[S++];);S--}const{startCoordinate:N,overlaps:F}=this.checkLine(u,e,f,d,_);if(F)l(_,v[S]*256+(A-b[S])+p.minv.dataPosition+1);else if(N!==void 0&&N>=d)return;A=B+1}}}async getMetadata(e={}){return this.index.getMetadata(e)}async getHeaderBuffer(e={}){const{firstDataLine:n,metaChar:r,maxBlockSize:o}=await this.getMetadata(e);Na(e.signal);const i=((n==null?void 0:n.blockPosition)||0)+o,s=await this._readRegion(0,i,e),a=await zr(s);if(r){let c=-1;const l=10,u=r.charCodeAt(0);for(let f=0;f<a.length&&!(f===c+1&&a[f]!==u);f+=1)a[f]===l&&(c=f);return a.subarray(0,c+1)}return a}async getHeader(e={}){return(await this.getHeaderBuffer(e)).toString("utf8")}async getReferenceSequenceNames(e={}){return(await this.getMetadata(e)).refIdToName}checkLine(e,n,r,o,i){const{columnNumbers:s,metaChar:a,coordinateType:c,format:l}=e;if(a&&i.startsWith(a))return{overlaps:!1};let{ref:u,start:f,end:d}=s;u||(u=0),f||(f=0),d||(d=0),l==="VCF"&&(d=8);const h=Math.max(u,f,d);let p=1,y=0,v="",b=-1/0;const A=i.length;for(let S=0;S<A+1;S++)if(i[S]===" "||S===A){if(p===u){if(this.renameRefSeq(i.slice(y,S))!==n)return{overlaps:!1}}else if(p===f){if(b=parseInt(i.slice(y,S),10),c==="1-based-closed"&&(b-=1),b>=o)return{startCoordinate:b,overlaps:!1};if((d===0||d===f)&&b+1<=r)return{startCoordinate:b,overlaps:!1}}else if(l==="VCF"&&p===4)v=i.slice(y,S);else if(p===d&&(l==="VCF"?this._getVcfEnd(b,v,i.slice(y,S)):Number.parseInt(i.slice(y,S),10))<=r)return{overlaps:!1};if(y=S+1,p+=1,p>h)break}return{startCoordinate:b,overlaps:!0}}_getVcfEnd(e,n,r){let o=e+n.length;const i=r.includes("SVTYPE=TRA");if(r[0]!=="."&&!i){let s=";";for(let a=0;a<r.length;a+=1){if(s===";"&&r.slice(a,a+4)==="END="){let c=r.indexOf(";",a);c===-1&&(c=r.length),o=parseInt(r.slice(a+4,c),10);break}s=r[a]}}else if(i)return e+1;return o}async lineCount(e,n={}){return this.index.lineCount(e,n)}async _readRegion(e,n,r={}){const o=Ke.Buffer.alloc(n),{bytesRead:i,buffer:s}=await this.filehandle.read(o,0,n,e,r);return s.subarray(0,i)}async readChunk(e,n={}){const r=await this._readRegion(e.minv.blockPosition,e.fetchedSize(),n);return q2(r,e)}}const vM=Object.freeze(Object.defineProperty({__proto__:null,CSI:mu,TBI:Lo,TabixIndexedFile:xM},Symbol.toStringTag,{value:"Module"}));var yu={exports:{}},Hx;function u0(){if(Hx)return yu.exports;Hx=1;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(I,_,B){return Function.prototype.apply.call(I,_,B)},n;t&&typeof t.ownKeys=="function"?n=t.ownKeys:Object.getOwnPropertySymbols?n=function(I){return Object.getOwnPropertyNames(I).concat(Object.getOwnPropertySymbols(I))}:n=function(I){return Object.getOwnPropertyNames(I)};function r(E){console&&console.warn&&console.warn(E)}var o=Number.isNaN||function(I){return I!==I};function i(){i.init.call(this)}yu.exports=i,yu.exports.once=b,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(E){if(typeof E!="number"||E<0||o(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");s=E}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(I){if(typeof I!="number"||I<0||o(I))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+I+".");return this._maxListeners=I,this};function c(E){return E._maxListeners===void 0?i.defaultMaxListeners:E._maxListeners}i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(I){for(var _=[],B=1;B<arguments.length;B++)_.push(arguments[B]);var N=I==="error",F=this._events;if(F!==void 0)N=N&&F.error===void 0;else if(!N)return!1;if(N){var M;if(_.length>0&&(M=_[0]),M instanceof Error)throw M;var C=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw C.context=M,C}var Y=F[I];if(Y===void 0)return!1;if(typeof Y=="function")e(Y,this,_);else for(var Q=Y.length,oe=p(Y,Q),B=0;B<Q;++B)e(oe[B],this,_);return!0};function l(E,I,_,B){var N,F,M;if(a(_),F=E._events,F===void 0?(F=E._events=Object.create(null),E._eventsCount=0):(F.newListener!==void 0&&(E.emit("newListener",I,_.listener?_.listener:_),F=E._events),M=F[I]),M===void 0)M=F[I]=_,++E._eventsCount;else if(typeof M=="function"?M=F[I]=B?[_,M]:[M,_]:B?M.unshift(_):M.push(_),N=c(E),N>0&&M.length>N&&!M.warned){M.warned=!0;var C=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(I)+" listeners added. Use emitter.setMaxListeners() to increase limit");C.name="MaxListenersExceededWarning",C.emitter=E,C.type=I,C.count=M.length,r(C)}return E}i.prototype.addListener=function(I,_){return l(this,I,_,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(I,_){return l(this,I,_,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(E,I,_){var B={fired:!1,wrapFn:void 0,target:E,type:I,listener:_},N=u.bind(B);return N.listener=_,B.wrapFn=N,N}i.prototype.once=function(I,_){return a(_),this.on(I,f(this,I,_)),this},i.prototype.prependOnceListener=function(I,_){return a(_),this.prependListener(I,f(this,I,_)),this},i.prototype.removeListener=function(I,_){var B,N,F,M,C;if(a(_),N=this._events,N===void 0)return this;if(B=N[I],B===void 0)return this;if(B===_||B.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete N[I],N.removeListener&&this.emit("removeListener",I,B.listener||_));else if(typeof B!="function"){for(F=-1,M=B.length-1;M>=0;M--)if(B[M]===_||B[M].listener===_){C=B[M].listener,F=M;break}if(F<0)return this;F===0?B.shift():y(B,F),B.length===1&&(N[I]=B[0]),N.removeListener!==void 0&&this.emit("removeListener",I,C||_)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(I){var _,B,N;if(B=this._events,B===void 0)return this;if(B.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):B[I]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete B[I]),this;if(arguments.length===0){var F=Object.keys(B),M;for(N=0;N<F.length;++N)M=F[N],M!=="removeListener"&&this.removeAllListeners(M);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_=B[I],typeof _=="function")this.removeListener(I,_);else if(_!==void 0)for(N=_.length-1;N>=0;N--)this.removeListener(I,_[N]);return this};function d(E,I,_){var B=E._events;if(B===void 0)return[];var N=B[I];return N===void 0?[]:typeof N=="function"?_?[N.listener||N]:[N]:_?v(N):p(N,N.length)}i.prototype.listeners=function(I){return d(this,I,!0)},i.prototype.rawListeners=function(I){return d(this,I,!1)},i.listenerCount=function(E,I){return typeof E.listenerCount=="function"?E.listenerCount(I):h.call(E,I)},i.prototype.listenerCount=h;function h(E){var I=this._events;if(I!==void 0){var _=I[E];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function p(E,I){for(var _=new Array(I),B=0;B<I;++B)_[B]=E[B];return _}function y(E,I){for(;I+1<E.length;I++)E[I]=E[I+1];E.pop()}function v(E){for(var I=new Array(E.length),_=0;_<I.length;++_)I[_]=E[_].listener||E[_];return I}function b(E,I){return new Promise(function(_,B){function N(M){E.removeListener(I,F),B(M)}function F(){typeof E.removeListener=="function"&&E.removeListener("error",N),_([].slice.call(arguments))}S(E,I,F,{once:!0}),I!=="error"&&A(E,N,{once:!0})})}function A(E,I,_){typeof E.on=="function"&&S(E,"error",I,_)}function S(E,I,_,B){if(typeof E.on=="function")B.once?E.once(I,_):E.on(I,_);else if(typeof E.addEventListener=="function")E.addEventListener(I,function N(F){B.once&&E.removeEventListener(I,N),_(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E)}return yu.exports}var bu={exports:{}},Vx;function No(){return Vx||(Vx=1,typeof Object.create=="function"?bu.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:bu.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}}),bu.exports}var f0,jx;function qx(){return jx||(jx=1,f0=u0().EventEmitter),f0}const Wx=lR(dR);var h0,Yx;function AM(){if(Yx)return h0;Yx=1;function t(p,y){var v=Object.keys(p);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(p);y&&(b=b.filter(function(A){return Object.getOwnPropertyDescriptor(p,A).enumerable})),v.push.apply(v,b)}return v}function e(p){for(var y=1;y<arguments.length;y++){var v=arguments[y]!=null?arguments[y]:{};y%2?t(Object(v),!0).forEach(function(b){n(p,b,v[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(v)):t(Object(v)).forEach(function(b){Object.defineProperty(p,b,Object.getOwnPropertyDescriptor(v,b))})}return p}function n(p,y,v){return y=s(y),y in p?Object.defineProperty(p,y,{value:v,enumerable:!0,configurable:!0,writable:!0}):p[y]=v,p}function r(p,y){if(!(p instanceof y))throw new TypeError("Cannot call a class as a function")}function o(p,y){for(var v=0;v<y.length;v++){var b=y[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,s(b.key),b)}}function i(p,y,v){return y&&o(p.prototype,y),Object.defineProperty(p,"prototype",{writable:!1}),p}function s(p){var y=a(p,"string");return typeof y=="symbol"?y:String(y)}function a(p,y){if(typeof p!="object"||p===null)return p;var v=p[Symbol.toPrimitive];if(v!==void 0){var b=v.call(p,y);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}var c=ka(),l=c.Buffer,u=Wx,f=u.inspect,d=f&&f.custom||"inspect";function h(p,y,v){l.prototype.copy.call(p,y,v)}return h0=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return i(p,[{key:"push",value:function(v){var b={data:v,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length}},{key:"unshift",value:function(v){var b={data:v,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var b=this.head,A=""+b.data;b=b.next;)A+=v+b.data;return A}},{key:"concat",value:function(v){if(this.length===0)return l.alloc(0);for(var b=l.allocUnsafe(v>>>0),A=this.head,S=0;A;)h(A.data,b,S),S+=A.data.length,A=A.next;return b}},{key:"consume",value:function(v,b){var A;return v<this.head.data.length?(A=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):v===this.head.data.length?A=this.shift():A=b?this._getString(v):this._getBuffer(v),A}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var b=this.head,A=1,S=b.data;for(v-=S.length;b=b.next;){var E=b.data,I=v>E.length?E.length:v;if(I===E.length?S+=E:S+=E.slice(0,v),v-=I,v===0){I===E.length?(++A,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=E.slice(I));break}++A}return this.length-=A,S}},{key:"_getBuffer",value:function(v){var b=l.allocUnsafe(v),A=this.head,S=1;for(A.data.copy(b),v-=A.data.length;A=A.next;){var E=A.data,I=v>E.length?E.length:v;if(E.copy(b,b.length-v,0,I),v-=I,v===0){I===E.length?(++S,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=E.slice(I));break}++S}return this.length-=S,b}},{key:d,value:function(v,b){return f(this,e(e({},b),{},{depth:0,customInspect:!1}))}}]),p}(),h0}var d0,Qx;function Zx(){if(Qx)return d0;Qx=1;function t(s,a){var c=this,l=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return l||u?(a?a(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(o,this,s)):process.nextTick(o,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(f){!a&&f?c._writableState?c._writableState.errorEmitted?process.nextTick(n,c):(c._writableState.errorEmitted=!0,process.nextTick(e,c,f)):process.nextTick(e,c,f):a?(process.nextTick(n,c),a(f)):process.nextTick(n,c)}),this)}function e(s,a){o(s,a),n(s)}function n(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(s,a){s.emit("error",a)}function i(s,a){var c=s._readableState,l=s._writableState;c&&c.autoDestroy||l&&l.autoDestroy?s.destroy(a):s.emit("error",a)}return d0={destroy:t,undestroy:r,errorOrDestroy:i},d0}var p0={},Xx;function zo(){if(Xx)return p0;Xx=1;function t(a,c){a.prototype=Object.create(c.prototype),a.prototype.constructor=a,a.__proto__=c}var e={};function n(a,c,l){l||(l=Error);function u(d,h,p){return typeof c=="string"?c:c(d,h,p)}var f=function(d){t(h,d);function h(p,y,v){return d.call(this,u(p,y,v))||this}return h}(l);f.prototype.name=l.name,f.prototype.code=a,e[a]=f}function r(a,c){if(Array.isArray(a)){var l=a.length;return a=a.map(function(u){return String(u)}),l>2?"one of ".concat(c," ").concat(a.slice(0,l-1).join(", "),", or ")+a[l-1]:l===2?"one of ".concat(c," ").concat(a[0]," or ").concat(a[1]):"of ".concat(c," ").concat(a[0])}else return"of ".concat(c," ").concat(String(a))}function o(a,c,l){return a.substr(0,c.length)===c}function i(a,c,l){return(l===void 0||l>a.length)&&(l=a.length),a.substring(l-c.length,l)===c}function s(a,c,l){return typeof l!="number"&&(l=0),l+c.length>a.length?!1:a.indexOf(c,l)!==-1}return n("ERR_INVALID_OPT_VALUE",function(a,c){return'The value "'+c+'" is invalid for option "'+a+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(a,c,l){var u;typeof c=="string"&&o(c,"not ")?(u="must not be",c=c.replace(/^not /,"")):u="must be";var f;if(i(a," argument"))f="The ".concat(a," ").concat(u," ").concat(r(c,"type"));else{var d=s(a,".")?"property":"argument";f='The "'.concat(a,'" ').concat(d," ").concat(u," ").concat(r(c,"type"))}return f+=". Received type ".concat(typeof l),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),p0.codes=e,p0}var g0,Kx;function Jx(){if(Kx)return g0;Kx=1;var t=zo().codes.ERR_INVALID_OPT_VALUE;function e(r,o,i){return r.highWaterMark!=null?r.highWaterMark:o?r[i]:null}function n(r,o,i,s){var a=e(o,s,i);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var c=s?i:"highWaterMark";throw new t(c,a)}return Math.floor(a)}return r.objectMode?16:16*1024}return g0={getHighWaterMark:n},g0}var m0,$x;function EM(){if($x)return m0;$x=1,m0=t;function t(n,r){if(e("noDeprecation"))return n;var o=!1;function i(){if(!o){if(e("throwDeprecation"))throw new Error(r);e("traceDeprecation")?console.trace(r):console.warn(r),o=!0}return n.apply(this,arguments)}return i}function e(n){try{if(!globalThis.localStorage)return!1}catch{return!1}var r=globalThis.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return m0}var y0,ev;function tv(){if(ev)return y0;ev=1,y0=N;function t(q){var W=this;this.next=null,this.entry=null,this.finish=function(){Ve(W,q)}}var e;N.WritableState=_;var n={deprecate:EM()},r=qx(),o=ka().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(q){return o.from(q)}function a(q){return o.isBuffer(q)||q instanceof i}var c=Zx(),l=Jx(),u=l.getHighWaterMark,f=zo().codes,d=f.ERR_INVALID_ARG_TYPE,h=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,y=f.ERR_STREAM_CANNOT_PIPE,v=f.ERR_STREAM_DESTROYED,b=f.ERR_STREAM_NULL_VALUES,A=f.ERR_STREAM_WRITE_AFTER_END,S=f.ERR_UNKNOWN_ENCODING,E=c.errorOrDestroy;No()(N,r);function I(){}function _(q,W,ee){e=e||Uo(),q=q||{},typeof ee!="boolean"&&(ee=W instanceof e),this.objectMode=!!q.objectMode,ee&&(this.objectMode=this.objectMode||!!q.writableObjectMode),this.highWaterMark=u(this,q,"writableHighWaterMark",ee),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var J=q.decodeStrings===!1;this.decodeStrings=!J,this.defaultEncoding=q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(fe){ae(W,fe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=q.emitClose!==!1,this.autoDestroy=!!q.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}_.prototype.getBuffer=function(){for(var W=this.bufferedRequest,ee=[];W;)ee.push(W),W=W.next;return ee},function(){try{Object.defineProperty(_.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var B;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(N,Symbol.hasInstance,{value:function(W){return B.call(this,W)?!0:this!==N?!1:W&&W._writableState instanceof _}})):B=function(W){return W instanceof this};function N(q){e=e||Uo();var W=this instanceof e;if(!W&&!B.call(N,this))return new N(q);this._writableState=new _(q,this,W),this.writable=!0,q&&(typeof q.write=="function"&&(this._write=q.write),typeof q.writev=="function"&&(this._writev=q.writev),typeof q.destroy=="function"&&(this._destroy=q.destroy),typeof q.final=="function"&&(this._final=q.final)),r.call(this)}N.prototype.pipe=function(){E(this,new y)};function F(q,W){var ee=new A;E(q,ee),process.nextTick(W,ee)}function M(q,W,ee,J){var fe;return ee===null?fe=new b:typeof ee!="string"&&!W.objectMode&&(fe=new d("chunk",["string","Buffer"],ee)),fe?(E(q,fe),process.nextTick(J,fe),!1):!0}N.prototype.write=function(q,W,ee){var J=this._writableState,fe=!1,L=!J.objectMode&&a(q);return L&&!o.isBuffer(q)&&(q=s(q)),typeof W=="function"&&(ee=W,W=null),L?W="buffer":W||(W=J.defaultEncoding),typeof ee!="function"&&(ee=I),J.ending?F(this,ee):(L||M(this,J,q,ee))&&(J.pendingcb++,fe=Y(this,J,L,q,W,ee)),fe},N.prototype.cork=function(){this._writableState.corked++},N.prototype.uncork=function(){var q=this._writableState;q.corked&&(q.corked--,!q.writing&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&de(this,q))},N.prototype.setDefaultEncoding=function(W){if(typeof W=="string"&&(W=W.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((W+"").toLowerCase())>-1))throw new S(W);return this._writableState.defaultEncoding=W,this},Object.defineProperty(N.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function C(q,W,ee){return!q.objectMode&&q.decodeStrings!==!1&&typeof W=="string"&&(W=o.from(W,ee)),W}Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Y(q,W,ee,J,fe,L){if(!ee){var D=C(W,J,fe);J!==D&&(ee=!0,fe="buffer",J=D)}var te=W.objectMode?1:J.length;W.length+=te;var le=W.length<W.highWaterMark;if(le||(W.needDrain=!0),W.writing||W.corked){var Be=W.lastBufferedRequest;W.lastBufferedRequest={chunk:J,encoding:fe,isBuf:ee,callback:L,next:null},Be?Be.next=W.lastBufferedRequest:W.bufferedRequest=W.lastBufferedRequest,W.bufferedRequestCount+=1}else Q(q,W,!1,te,J,fe,L);return le}function Q(q,W,ee,J,fe,L,D){W.writelen=J,W.writecb=D,W.writing=!0,W.sync=!0,W.destroyed?W.onwrite(new v("write")):ee?q._writev(fe,W.onwrite):q._write(fe,L,W.onwrite),W.sync=!1}function oe(q,W,ee,J,fe){--W.pendingcb,ee?(process.nextTick(fe,J),process.nextTick(De,q,W),q._writableState.errorEmitted=!0,E(q,J)):(fe(J),q._writableState.errorEmitted=!0,E(q,J),De(q,W))}function se(q){q.writing=!1,q.writecb=null,q.length-=q.writelen,q.writelen=0}function ae(q,W){var ee=q._writableState,J=ee.sync,fe=ee.writecb;if(typeof fe!="function")throw new p;if(se(ee),W)oe(q,ee,J,W,fe);else{var L=Ce(ee)||q.destroyed;!L&&!ee.corked&&!ee.bufferProcessing&&ee.bufferedRequest&&de(q,ee),J?process.nextTick(ce,q,ee,L,fe):ce(q,ee,L,fe)}}function ce(q,W,ee,J){ee||ye(q,W),W.pendingcb--,J(),De(q,W)}function ye(q,W){W.length===0&&W.needDrain&&(W.needDrain=!1,q.emit("drain"))}function de(q,W){W.bufferProcessing=!0;var ee=W.bufferedRequest;if(q._writev&&ee&&ee.next){var J=W.bufferedRequestCount,fe=new Array(J),L=W.corkedRequestsFree;L.entry=ee;for(var D=0,te=!0;ee;)fe[D]=ee,ee.isBuf||(te=!1),ee=ee.next,D+=1;fe.allBuffers=te,Q(q,W,!0,W.length,fe,"",L.finish),W.pendingcb++,W.lastBufferedRequest=null,L.next?(W.corkedRequestsFree=L.next,L.next=null):W.corkedRequestsFree=new t(W),W.bufferedRequestCount=0}else{for(;ee;){var le=ee.chunk,Be=ee.encoding,ve=ee.callback,Se=W.objectMode?1:le.length;if(Q(q,W,!1,Se,le,Be,ve),ee=ee.next,W.bufferedRequestCount--,W.writing)break}ee===null&&(W.lastBufferedRequest=null)}W.bufferedRequest=ee,W.bufferProcessing=!1}N.prototype._write=function(q,W,ee){ee(new h("_write()"))},N.prototype._writev=null,N.prototype.end=function(q,W,ee){var J=this._writableState;return typeof q=="function"?(ee=q,q=null,W=null):typeof W=="function"&&(ee=W,W=null),q!=null&&this.write(q,W),J.corked&&(J.corked=1,this.uncork()),J.ending||Ge(this,J,ee),this},Object.defineProperty(N.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ce(q){return q.ending&&q.length===0&&q.bufferedRequest===null&&!q.finished&&!q.writing}function me(q,W){q._final(function(ee){W.pendingcb--,ee&&E(q,ee),W.prefinished=!0,q.emit("prefinish"),De(q,W)})}function Ee(q,W){!W.prefinished&&!W.finalCalled&&(typeof q._final=="function"&&!W.destroyed?(W.pendingcb++,W.finalCalled=!0,process.nextTick(me,q,W)):(W.prefinished=!0,q.emit("prefinish")))}function De(q,W){var ee=Ce(W);if(ee&&(Ee(q,W),W.pendingcb===0&&(W.finished=!0,q.emit("finish"),W.autoDestroy))){var J=q._readableState;(!J||J.autoDestroy&&J.endEmitted)&&q.destroy()}return ee}function Ge(q,W,ee){W.ending=!0,De(q,W),ee&&(W.finished?process.nextTick(ee):q.once("finish",ee)),W.ended=!0,q.writable=!1}function Ve(q,W,ee){var J=q.entry;for(q.entry=null;J;){var fe=J.callback;W.pendingcb--,fe(ee),J=J.next}W.corkedRequestsFree.next=q}return Object.defineProperty(N.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(W){this._writableState&&(this._writableState.destroyed=W)}}),N.prototype.destroy=c.destroy,N.prototype._undestroy=c.undestroy,N.prototype._destroy=function(q,W){W(q)},y0}var b0,nv;function Uo(){if(nv)return b0;nv=1;var t=Object.keys||function(l){var u=[];for(var f in l)u.push(f);return u};b0=s;var e=lv(),n=tv();No()(s,e);for(var r=t(n.prototype),o=0;o<r.length;o++){var i=r[o];s.prototype[i]||(s.prototype[i]=n.prototype[i])}function s(l){if(!(this instanceof s))return new s(l);e.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",a)))}Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a(){this._writableState.ended||process.nextTick(c,this)}function c(l){l.end()}return Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),b0}var w0={},wu={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var rv;function SM(){return rv||(rv=1,function(t,e){var n=ka(),r=n.Buffer;function o(s,a){for(var c in s)a[c]=s[c]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=i);function i(s,a,c){return r(s,a,c)}i.prototype=Object.create(r.prototype),o(r,i),i.from=function(s,a,c){if(typeof s=="number")throw new TypeError("Argument must not be a number");return r(s,a,c)},i.alloc=function(s,a,c){if(typeof s!="number")throw new TypeError("Argument must be a number");var l=r(s);return a!==void 0?typeof c=="string"?l.fill(a,c):l.fill(a):l.fill(0),l},i.allocUnsafe=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return r(s)},i.allocUnsafeSlow=function(s){if(typeof s!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(s)}}(wu,wu.exports)),wu.exports}var iv;function x0(){if(iv)return w0;iv=1;var t=SM().Buffer,e=t.isEncoding||function(b){switch(b=""+b,b&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(b){if(!b)return"utf8";for(var A;;)switch(b){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return b;default:if(A)return;b=(""+b).toLowerCase(),A=!0}}function r(b){var A=n(b);if(typeof A!="string"&&(t.isEncoding===e||!e(b)))throw new Error("Unknown encoding: "+b);return A||b}w0.StringDecoder=o;function o(b){this.encoding=r(b);var A;switch(this.encoding){case"utf16le":this.text=f,this.end=d,A=4;break;case"utf8":this.fillLast=c,A=4;break;case"base64":this.text=h,this.end=p,A=3;break;default:this.write=y,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(A)}o.prototype.write=function(b){if(b.length===0)return"";var A,S;if(this.lastNeed){if(A=this.fillLast(b),A===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S<b.length?A?A+this.text(b,S):this.text(b,S):A||""},o.prototype.end=u,o.prototype.text=l,o.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length};function i(b){return b<=127?0:b>>5===6?2:b>>4===14?3:b>>3===30?4:b>>6===2?-1:-2}function s(b,A,S){var E=A.length-1;if(E<S)return 0;var I=i(A[E]);return I>=0?(I>0&&(b.lastNeed=I-1),I):--E<S||I===-2?0:(I=i(A[E]),I>=0?(I>0&&(b.lastNeed=I-2),I):--E<S||I===-2?0:(I=i(A[E]),I>=0?(I>0&&(I===2?I=0:b.lastNeed=I-3),I):0))}function a(b,A,S){if((A[0]&192)!==128)return b.lastNeed=0,"�";if(b.lastNeed>1&&A.length>1){if((A[1]&192)!==128)return b.lastNeed=1,"�";if(b.lastNeed>2&&A.length>2&&(A[2]&192)!==128)return b.lastNeed=2,"�"}}function c(b){var A=this.lastTotal-this.lastNeed,S=a(this,b);if(S!==void 0)return S;if(this.lastNeed<=b.length)return b.copy(this.lastChar,A,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,A,0,b.length),this.lastNeed-=b.length}function l(b,A){var S=s(this,b,A);if(!this.lastNeed)return b.toString("utf8",A);this.lastTotal=S;var E=b.length-(S-this.lastNeed);return b.copy(this.lastChar,0,E),b.toString("utf8",A,E)}function u(b){var A=b&&b.length?this.write(b):"";return this.lastNeed?A+"�":A}function f(b,A){if((b.length-A)%2===0){var S=b.toString("utf16le",A);if(S){var E=S.charCodeAt(S.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",A,b.length-1)}function d(b){var A=b&&b.length?this.write(b):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return A+this.lastChar.toString("utf16le",0,S)}return A}function h(b,A){var S=(b.length-A)%3;return S===0?b.toString("base64",A):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",A,b.length-S))}function p(b){var A=b&&b.length?this.write(b):"";return this.lastNeed?A+this.lastChar.toString("base64",0,3-this.lastNeed):A}function y(b){return b.toString(this.encoding)}function v(b){return b&&b.length?this.write(b):""}return w0}var v0,ov;function A0(){if(ov)return v0;ov=1;var t=zo().codes.ERR_STREAM_PREMATURE_CLOSE;function e(i){var s=!1;return function(){if(!s){s=!0;for(var a=arguments.length,c=new Array(a),l=0;l<a;l++)c[l]=arguments[l];i.apply(this,c)}}}function n(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function o(i,s,a){if(typeof s=="function")return o(i,null,s);s||(s={}),a=e(a||n);var c=s.readable||s.readable!==!1&&i.readable,l=s.writable||s.writable!==!1&&i.writable,u=function(){i.writable||d()},f=i._writableState&&i._writableState.finished,d=function(){l=!1,f=!0,c||a.call(i)},h=i._readableState&&i._readableState.endEmitted,p=function(){c=!1,h=!0,l||a.call(i)},y=function(S){a.call(i,S)},v=function(){var S;if(c&&!h)return(!i._readableState||!i._readableState.ended)&&(S=new t),a.call(i,S);if(l&&!f)return(!i._writableState||!i._writableState.ended)&&(S=new t),a.call(i,S)},b=function(){i.req.on("finish",d)};return r(i)?(i.on("complete",d),i.on("abort",v),i.req?b():i.on("request",b)):l&&!i._writableState&&(i.on("end",u),i.on("close",u)),i.on("end",p),i.on("finish",d),s.error!==!1&&i.on("error",y),i.on("close",v),function(){i.removeListener("complete",d),i.removeListener("abort",v),i.removeListener("request",b),i.req&&i.req.removeListener("finish",d),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",d),i.removeListener("end",p),i.removeListener("error",y),i.removeListener("close",v)}}return v0=o,v0}var E0,sv;function CM(){if(sv)return E0;sv=1;var t;function e(S,E,I){return E=n(E),E in S?Object.defineProperty(S,E,{value:I,enumerable:!0,configurable:!0,writable:!0}):S[E]=I,S}function n(S){var E=r(S,"string");return typeof E=="symbol"?E:String(E)}function r(S,E){if(typeof S!="object"||S===null)return S;var I=S[Symbol.toPrimitive];if(I!==void 0){var _=I.call(S,E);if(typeof _!="object")return _;throw new TypeError("@@toPrimitive must return a primitive value.")}return(E==="string"?String:Number)(S)}var o=A0(),i=Symbol("lastResolve"),s=Symbol("lastReject"),a=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function d(S,E){return{value:S,done:E}}function h(S){var E=S[i];if(E!==null){var I=S[f].read();I!==null&&(S[l]=null,S[i]=null,S[s]=null,E(d(I,!1)))}}function p(S){process.nextTick(h,S)}function y(S,E){return function(I,_){S.then(function(){if(E[c]){I(d(void 0,!0));return}E[u](I,_)},_)}}var v=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((t={get stream(){return this[f]},next:function(){var E=this,I=this[a];if(I!==null)return Promise.reject(I);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise(function(F,M){process.nextTick(function(){E[a]?M(E[a]):F(d(void 0,!0))})});var _=this[l],B;if(_)B=new Promise(y(_,this));else{var N=this[f].read();if(N!==null)return Promise.resolve(d(N,!1));B=new Promise(this[u])}return this[l]=B,B}},e(t,Symbol.asyncIterator,function(){return this}),e(t,"return",function(){var E=this;return new Promise(function(I,_){E[f].destroy(null,function(B){if(B){_(B);return}I(d(void 0,!0))})})}),t),v),A=function(E){var I,_=Object.create(b,(I={},e(I,f,{value:E,writable:!0}),e(I,i,{value:null,writable:!0}),e(I,s,{value:null,writable:!0}),e(I,a,{value:null,writable:!0}),e(I,c,{value:E._readableState.endEmitted,writable:!0}),e(I,u,{value:function(N,F){var M=_[f].read();M?(_[l]=null,_[i]=null,_[s]=null,N(d(M,!1))):(_[i]=N,_[s]=F)},writable:!0}),I));return _[l]=null,o(E,function(B){if(B&&B.code!=="ERR_STREAM_PREMATURE_CLOSE"){var N=_[s];N!==null&&(_[l]=null,_[i]=null,_[s]=null,N(B)),_[a]=B;return}var F=_[i];F!==null&&(_[l]=null,_[i]=null,_[s]=null,F(d(void 0,!0))),_[c]=!0}),E.on("readable",p.bind(null,_)),_};return E0=A,E0}var S0,av;function IM(){return av||(av=1,S0=function(){throw new Error("Readable.from is not available in the browser")}),S0}var C0,cv;function lv(){if(cv)return C0;cv=1,C0=F;var t;F.ReadableState=N,u0().EventEmitter;var e=function(D,te){return D.listeners(te).length},n=qx(),r=ka().Buffer,o=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function i(L){return r.from(L)}function s(L){return r.isBuffer(L)||L instanceof o}var a=Wx,c;a&&a.debuglog?c=a.debuglog("stream"):c=function(){};var l=AM(),u=Zx(),f=Jx(),d=f.getHighWaterMark,h=zo().codes,p=h.ERR_INVALID_ARG_TYPE,y=h.ERR_STREAM_PUSH_AFTER_EOF,v=h.ERR_METHOD_NOT_IMPLEMENTED,b=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A,S,E;No()(F,n);var I=u.errorOrDestroy,_=["error","close","destroy","pause","resume"];function B(L,D,te){if(typeof L.prependListener=="function")return L.prependListener(D,te);!L._events||!L._events[D]?L.on(D,te):Array.isArray(L._events[D])?L._events[D].unshift(te):L._events[D]=[te,L._events[D]]}function N(L,D,te){t=t||Uo(),L=L||{},typeof te!="boolean"&&(te=D instanceof t),this.objectMode=!!L.objectMode,te&&(this.objectMode=this.objectMode||!!L.readableObjectMode),this.highWaterMark=d(this,L,"readableHighWaterMark",te),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.destroyed=!1,this.defaultEncoding=L.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,L.encoding&&(A||(A=x0().StringDecoder),this.decoder=new A(L.encoding),this.encoding=L.encoding)}function F(L){if(t=t||Uo(),!(this instanceof F))return new F(L);var D=this instanceof t;this._readableState=new N(L,this,D),this.readable=!0,L&&(typeof L.read=="function"&&(this._read=L.read),typeof L.destroy=="function"&&(this._destroy=L.destroy)),n.call(this)}Object.defineProperty(F.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(D){this._readableState&&(this._readableState.destroyed=D)}}),F.prototype.destroy=u.destroy,F.prototype._undestroy=u.undestroy,F.prototype._destroy=function(L,D){D(L)},F.prototype.push=function(L,D){var te=this._readableState,le;return te.objectMode?le=!0:typeof L=="string"&&(D=D||te.defaultEncoding,D!==te.encoding&&(L=r.from(L,D),D=""),le=!0),M(this,L,D,!1,le)},F.prototype.unshift=function(L){return M(this,L,null,!0,!1)};function M(L,D,te,le,Be){c("readableAddChunk",D);var ve=L._readableState;if(D===null)ve.reading=!1,ae(L,ve);else{var Se;if(Be||(Se=Y(ve,D)),Se)I(L,Se);else if(ve.objectMode||D&&D.length>0)if(typeof D!="string"&&!ve.objectMode&&Object.getPrototypeOf(D)!==r.prototype&&(D=i(D)),le)ve.endEmitted?I(L,new b):C(L,ve,D,!0);else if(ve.ended)I(L,new y);else{if(ve.destroyed)return!1;ve.reading=!1,ve.decoder&&!te?(D=ve.decoder.write(D),ve.objectMode||D.length!==0?C(L,ve,D,!1):de(L,ve)):C(L,ve,D,!1)}else le||(ve.reading=!1,de(L,ve))}return!ve.ended&&(ve.length<ve.highWaterMark||ve.length===0)}function C(L,D,te,le){D.flowing&&D.length===0&&!D.sync?(D.awaitDrain=0,L.emit("data",te)):(D.length+=D.objectMode?1:te.length,le?D.buffer.unshift(te):D.buffer.push(te),D.needReadable&&ce(L)),de(L,D)}function Y(L,D){var te;return!s(D)&&typeof D!="string"&&D!==void 0&&!L.objectMode&&(te=new p("chunk",["string","Buffer","Uint8Array"],D)),te}F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(L){A||(A=x0().StringDecoder);var D=new A(L);this._readableState.decoder=D,this._readableState.encoding=this._readableState.decoder.encoding;for(var te=this._readableState.buffer.head,le="";te!==null;)le+=D.write(te.data),te=te.next;return this._readableState.buffer.clear(),le!==""&&this._readableState.buffer.push(le),this._readableState.length=le.length,this};var Q=1073741824;function oe(L){return L>=Q?L=Q:(L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++),L}function se(L,D){return L<=0||D.length===0&&D.ended?0:D.objectMode?1:L!==L?D.flowing&&D.length?D.buffer.head.data.length:D.length:(L>D.highWaterMark&&(D.highWaterMark=oe(L)),L<=D.length?L:D.ended?D.length:(D.needReadable=!0,0))}F.prototype.read=function(L){c("read",L),L=parseInt(L,10);var D=this._readableState,te=L;if(L!==0&&(D.emittedReadable=!1),L===0&&D.needReadable&&((D.highWaterMark!==0?D.length>=D.highWaterMark:D.length>0)||D.ended))return c("read: emitReadable",D.length,D.ended),D.length===0&&D.ended?ee(this):ce(this),null;if(L=se(L,D),L===0&&D.ended)return D.length===0&&ee(this),null;var le=D.needReadable;c("need readable",le),(D.length===0||D.length-L<D.highWaterMark)&&(le=!0,c("length less than watermark",le)),D.ended||D.reading?(le=!1,c("reading or ended",le)):le&&(c("do read"),D.reading=!0,D.sync=!0,D.length===0&&(D.needReadable=!0),this._read(D.highWaterMark),D.sync=!1,D.reading||(L=se(te,D)));var Be;return L>0?Be=W(L,D):Be=null,Be===null?(D.needReadable=D.length<=D.highWaterMark,L=0):(D.length-=L,D.awaitDrain=0),D.length===0&&(D.ended||(D.needReadable=!0),te!==L&&D.ended&&ee(this)),Be!==null&&this.emit("data",Be),Be};function ae(L,D){if(c("onEofChunk"),!D.ended){if(D.decoder){var te=D.decoder.end();te&&te.length&&(D.buffer.push(te),D.length+=D.objectMode?1:te.length)}D.ended=!0,D.sync?ce(L):(D.needReadable=!1,D.emittedReadable||(D.emittedReadable=!0,ye(L)))}}function ce(L){var D=L._readableState;c("emitReadable",D.needReadable,D.emittedReadable),D.needReadable=!1,D.emittedReadable||(c("emitReadable",D.flowing),D.emittedReadable=!0,process.nextTick(ye,L))}function ye(L){var D=L._readableState;c("emitReadable_",D.destroyed,D.length,D.ended),!D.destroyed&&(D.length||D.ended)&&(L.emit("readable"),D.emittedReadable=!1),D.needReadable=!D.flowing&&!D.ended&&D.length<=D.highWaterMark,q(L)}function de(L,D){D.readingMore||(D.readingMore=!0,process.nextTick(Ce,L,D))}function Ce(L,D){for(;!D.reading&&!D.ended&&(D.length<D.highWaterMark||D.flowing&&D.length===0);){var te=D.length;if(c("maybeReadMore read 0"),L.read(0),te===D.length)break}D.readingMore=!1}F.prototype._read=function(L){I(this,new v("_read()"))},F.prototype.pipe=function(L,D){var te=this,le=this._readableState;switch(le.pipesCount){case 0:le.pipes=L;break;case 1:le.pipes=[le.pipes,L];break;default:le.pipes.push(L);break}le.pipesCount+=1,c("pipe count=%d opts=%j",le.pipesCount,D);var Be=(!D||D.end!==!1)&&L!==process.stdout&&L!==process.stderr,ve=Be?Re:Ut;le.endEmitted?process.nextTick(ve):te.once("end",ve),L.on("unpipe",Se);function Se(k,m){c("onunpipe"),k===te&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,It())}function Re(){c("onend"),L.end()}var dt=me(te);L.on("drain",dt);var Jt=!1;function It(){c("cleanup"),L.removeListener("close",zt),L.removeListener("finish",et),L.removeListener("drain",dt),L.removeListener("error",kt),L.removeListener("unpipe",Se),te.removeListener("end",Re),te.removeListener("end",Ut),te.removeListener("data",$e),Jt=!0,le.awaitDrain&&(!L._writableState||L._writableState.needDrain)&&dt()}te.on("data",$e);function $e(k){c("ondata");var m=L.write(k);c("dest.write",m),m===!1&&((le.pipesCount===1&&le.pipes===L||le.pipesCount>1&&fe(le.pipes,L)!==-1)&&!Jt&&(c("false write response, pause",le.awaitDrain),le.awaitDrain++),te.pause())}function kt(k){c("onerror",k),Ut(),L.removeListener("error",kt),e(L,"error")===0&&I(L,k)}B(L,"error",kt);function zt(){L.removeListener("finish",et),Ut()}L.once("close",zt);function et(){c("onfinish"),L.removeListener("close",zt),Ut()}L.once("finish",et);function Ut(){c("unpipe"),te.unpipe(L)}return L.emit("pipe",te),le.flowing||(c("pipe resume"),te.resume()),L};function me(L){return function(){var te=L._readableState;c("pipeOnDrain",te.awaitDrain),te.awaitDrain&&te.awaitDrain--,te.awaitDrain===0&&e(L,"data")&&(te.flowing=!0,q(L))}}F.prototype.unpipe=function(L){var D=this._readableState,te={hasUnpiped:!1};if(D.pipesCount===0)return this;if(D.pipesCount===1)return L&&L!==D.pipes?this:(L||(L=D.pipes),D.pipes=null,D.pipesCount=0,D.flowing=!1,L&&L.emit("unpipe",this,te),this);if(!L){var le=D.pipes,Be=D.pipesCount;D.pipes=null,D.pipesCount=0,D.flowing=!1;for(var ve=0;ve<Be;ve++)le[ve].emit("unpipe",this,{hasUnpiped:!1});return this}var Se=fe(D.pipes,L);return Se===-1?this:(D.pipes.splice(Se,1),D.pipesCount-=1,D.pipesCount===1&&(D.pipes=D.pipes[0]),L.emit("unpipe",this,te),this)},F.prototype.on=function(L,D){var te=n.prototype.on.call(this,L,D),le=this._readableState;return L==="data"?(le.readableListening=this.listenerCount("readable")>0,le.flowing!==!1&&this.resume()):L==="readable"&&!le.endEmitted&&!le.readableListening&&(le.readableListening=le.needReadable=!0,le.flowing=!1,le.emittedReadable=!1,c("on readable",le.length,le.reading),le.length?ce(this):le.reading||process.nextTick(De,this)),te},F.prototype.addListener=F.prototype.on,F.prototype.removeListener=function(L,D){var te=n.prototype.removeListener.call(this,L,D);return L==="readable"&&process.nextTick(Ee,this),te},F.prototype.removeAllListeners=function(L){var D=n.prototype.removeAllListeners.apply(this,arguments);return(L==="readable"||L===void 0)&&process.nextTick(Ee,this),D};function Ee(L){var D=L._readableState;D.readableListening=L.listenerCount("readable")>0,D.resumeScheduled&&!D.paused?D.flowing=!0:L.listenerCount("data")>0&&L.resume()}function De(L){c("readable nexttick read 0"),L.read(0)}F.prototype.resume=function(){var L=this._readableState;return L.flowing||(c("resume"),L.flowing=!L.readableListening,Ge(this,L)),L.paused=!1,this};function Ge(L,D){D.resumeScheduled||(D.resumeScheduled=!0,process.nextTick(Ve,L,D))}function Ve(L,D){c("resume",D.reading),D.reading||L.read(0),D.resumeScheduled=!1,L.emit("resume"),q(L),D.flowing&&!D.reading&&L.read(0)}F.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function q(L){var D=L._readableState;for(c("flow",D.flowing);D.flowing&&L.read()!==null;);}F.prototype.wrap=function(L){var D=this,te=this._readableState,le=!1;L.on("end",function(){if(c("wrapped end"),te.decoder&&!te.ended){var Se=te.decoder.end();Se&&Se.length&&D.push(Se)}D.push(null)}),L.on("data",function(Se){if(c("wrapped data"),te.decoder&&(Se=te.decoder.write(Se)),!(te.objectMode&&Se==null)&&!(!te.objectMode&&(!Se||!Se.length))){var Re=D.push(Se);Re||(le=!0,L.pause())}});for(var Be in L)this[Be]===void 0&&typeof L[Be]=="function"&&(this[Be]=function(Re){return function(){return L[Re].apply(L,arguments)}}(Be));for(var ve=0;ve<_.length;ve++)L.on(_[ve],this.emit.bind(this,_[ve]));return this._read=function(Se){c("wrapped _read",Se),le&&(le=!1,L.resume())},this},typeof Symbol=="function"&&(F.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=CM()),S(this)}),Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(F.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(F.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(D){this._readableState&&(this._readableState.flowing=D)}}),F._fromList=W,Object.defineProperty(F.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function W(L,D){if(D.length===0)return null;var te;return D.objectMode?te=D.buffer.shift():!L||L>=D.length?(D.decoder?te=D.buffer.join(""):D.buffer.length===1?te=D.buffer.first():te=D.buffer.concat(D.length),D.buffer.clear()):te=D.buffer.consume(L,D.decoder),te}function ee(L){var D=L._readableState;c("endReadable",D.endEmitted),D.endEmitted||(D.ended=!0,process.nextTick(J,D,L))}function J(L,D){if(c("endReadableNT",L.endEmitted,L.length),!L.endEmitted&&L.length===0&&(L.endEmitted=!0,D.readable=!1,D.emit("end"),L.autoDestroy)){var te=D._writableState;(!te||te.autoDestroy&&te.finished)&&D.destroy()}}typeof Symbol=="function"&&(F.from=function(L,D){return E===void 0&&(E=IM()),E(F,L,D)});function fe(L,D){for(var te=0,le=L.length;te<le;te++)if(L[te]===D)return te;return-1}return C0}var I0,uv;function fv(){if(uv)return I0;uv=1,I0=a;var t=zo().codes,e=t.ERR_METHOD_NOT_IMPLEMENTED,n=t.ERR_MULTIPLE_CALLBACK,r=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=t.ERR_TRANSFORM_WITH_LENGTH_0,i=Uo();No()(a,i);function s(u,f){var d=this._transformState;d.transforming=!1;var h=d.writecb;if(h===null)return this.emit("error",new n);d.writechunk=null,d.writecb=null,f!=null&&this.push(f),h(u);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function a(u){if(!(this instanceof a))return new a(u);i.call(this,u),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",c)}function c(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,d){l(u,f,d)}):l(this,null,null)}a.prototype.push=function(u,f){return this._transformState.needTransform=!1,i.prototype.push.call(this,u,f)},a.prototype._transform=function(u,f,d){d(new e("_transform()"))},a.prototype._write=function(u,f,d){var h=this._transformState;if(h.writecb=d,h.writechunk=u,h.writeencoding=f,!h.transforming){var p=this._readableState;(h.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},a.prototype._read=function(u){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},a.prototype._destroy=function(u,f){i.prototype._destroy.call(this,u,function(d){f(d)})};function l(u,f,d){if(f)return u.emit("error",f);if(d!=null&&u.push(d),u._writableState.length)throw new o;if(u._transformState.transforming)throw new r;return u.push(null)}return I0}var T0,hv;function TM(){if(hv)return T0;hv=1,T0=e;var t=fv();No()(e,t);function e(n){if(!(this instanceof e))return new e(n);t.call(this,n)}return e.prototype._transform=function(n,r,o){o(null,n)},T0}var D0,dv;function DM(){if(dv)return D0;dv=1;var t;function e(d){var h=!1;return function(){h||(h=!0,d.apply(void 0,arguments))}}var n=zo().codes,r=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function i(d){if(d)throw d}function s(d){return d.setHeader&&typeof d.abort=="function"}function a(d,h,p,y){y=e(y);var v=!1;d.on("close",function(){v=!0}),t===void 0&&(t=A0()),t(d,{readable:h,writable:p},function(A){if(A)return y(A);v=!0,y()});var b=!1;return function(A){if(!v&&!b){if(b=!0,s(d))return d.abort();if(typeof d.destroy=="function")return d.destroy();y(A||new o("pipe"))}}}function c(d){d()}function l(d,h){return d.pipe(h)}function u(d){return!d.length||typeof d[d.length-1]!="function"?i:d.pop()}function f(){for(var d=arguments.length,h=new Array(d),p=0;p<d;p++)h[p]=arguments[p];var y=u(h);if(Array.isArray(h[0])&&(h=h[0]),h.length<2)throw new r("streams");var v,b=h.map(function(A,S){var E=S<h.length-1,I=S>0;return a(A,E,I,function(_){v||(v=_),_&&b.forEach(c),!E&&(b.forEach(c),y(v))})});return h.reduce(l)}return D0=f,D0}var B0,pv;function BM(){if(pv)return B0;pv=1,B0=n;var t=u0().EventEmitter,e=No();e(n,t),n.Readable=lv(),n.Writable=tv(),n.Duplex=Uo(),n.Transform=fv(),n.PassThrough=TM(),n.finished=A0(),n.pipeline=DM(),n.Stream=n;function n(){t.call(this)}return n.prototype.pipe=function(r,o){var i=this;function s(h){r.writable&&r.write(h)===!1&&i.pause&&i.pause()}i.on("data",s);function a(){i.readable&&i.resume&&i.resume()}r.on("drain",a),!r._isStdio&&(!o||o.end!==!1)&&(i.on("end",l),i.on("close",u));var c=!1;function l(){c||(c=!0,r.end())}function u(){c||(c=!0,typeof r.destroy=="function"&&r.destroy())}function f(h){if(d(),t.listenerCount(this,"error")===0)throw h}i.on("error",f),r.on("error",f);function d(){i.removeListener("data",s),r.removeListener("drain",a),i.removeListener("end",l),i.removeListener("close",u),i.removeListener("error",f),r.removeListener("error",f),i.removeListener("end",d),i.removeListener("close",d),r.removeListener("close",d)}return i.on("end",d),i.on("close",d),r.on("close",d),r.emit("pipe",i),r},B0}var gv=BM(),kM=x0();function za(t){return t.replace(/%([0-9A-Fa-f]{2})/g,(e,n)=>String.fromCharCode(parseInt(n,16)))}function mv(t,e){return String(e).replace(t,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function Ua(t){return mv(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,t)}function or(t){return mv(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,t)}function yv(t){if(!(t&&t.length)||t===".")return{};const e={};return t.replace(/\r?\n$/,"").split(";").forEach(n=>{const r=n.split("=",2);if(!(r[1]&&r[1].length))return;r[0]=r[0].trim();let o=e[r[0].trim()];o||(o=[],e[r[0]]=o),o.push(...r[1].split(",").map(i=>i.trim()).map(za))}),e}function bv(t){const e=t.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:e[0]&&za(e[0]),source:e[1]&&za(e[1]),type:e[2]&&za(e[2]),start:e[3]===null?null:parseInt(e[3],10),end:e[4]===null?null:parseInt(e[4],10),score:e[5]===null?null:parseFloat(e[5]),strand:e[6],phase:e[7],attributes:e[8]===null?null:yv(e[8])}}function wv(t){const e=/^\s*##\s*(\S+)\s*(.*)/.exec(t);if(!e)return null;const[,n]=e;let[,,r]=e;const o={directive:n};if(r.length&&(r=r.replace(/\r?\n$/,""),o.value=r),n==="sequence-region"){const i=r.split(/\s+/,3);return{...o,seq_id:i[0],start:i[1]&&i[1].replace(/\D/g,""),end:i[2]&&i[2].replace(/\D/g,"")}}else if(n==="genome-build"){const[i,s]=r.split(/\s+/,2);return{...o,source:i,buildName:s}}return o}function xv(t){const e=[];return Object.entries(t).forEach(([n,r])=>{if(!r)return;let o;r.hasOwnProperty("toString")?o=Ua(r.toString()):Array.isArray(r)?o=r.map(Ua).join(","):o=Ua(r),e.push(`${Ua(n)}=${o}`)}),e.length?e.join(";"):"."}function _M(t,e){const n=t.attributes===null||t.attributes===void 0?".":xv(t.attributes),o=`${[t.seq_id===null?".":or(t.seq_id),t.source===null?".":or(t.source),t.type===null?".":or(t.type),t.start===null?".":or(t.start),t.end===null?".":or(t.end),t.score===null?".":or(t.score),t.strand===null?".":or(t.strand),t.phase===null?".":or(t.phase),n].join(" ")}
|
|
891
|
-
`;return e[o]?"":(e[o]=!0,o)}function xu(t,e){if(Array.isArray(t))return t.map(r=>xu(r,e)).join("");const n=[_M(t,e)];return RM(t)&&n.push(...t.child_features.map(r=>xu(r,e)),...t.derived_features.map(r=>xu(r,e))),n.join("")}function vv(t){return xu(t,{})}function Av(t){let e=`##${t.directive}`;return t.value&&(e+=` ${t.value}`),e+=`
|
|
892
|
-
|
|
893
|
-
`
|
|
894
|
-
${t.
|
|
895
|
-
`}function vu(t){function e(n){return"attributes"in n?vv(n):"directive"in n?Av(n):"sequence"in n?k0(n):"comment"in n?Ev(n):`# (invalid item found during format)
|
|
896
|
-
`}return Array.isArray(t)?t.map(e):e(t)}function RM(t){return t.child_features!==void 0&&t.derived_features!==void 0}const FM=Object.freeze(Object.defineProperty({__proto__:null,escape:Ua,escapeColumn:or,formatAttributes:xv,formatComment:Ev,formatDirective:Av,formatFeature:vv,formatItem:vu,formatSequence:k0,parseAttributes:yv,parseDirective:wv,parseFeature:bv,unescape:za},Symbol.toStringTag,{value:"Module"})),Sv={Parent:"child_features",Derives_from:"derived_features"};class Cv{constructor(e){this.seqCallback=e,this.currentSequence=void 0}addLine(e){const n=/^>\s*(\S+)\s*(.*)/.exec(e);n?(this._flush(),this.currentSequence={id:n[1],sequence:""},n[2]&&(this.currentSequence.description=n[2].trim())):this.currentSequence&&/\S/.test(e)&&(this.currentSequence.sequence+=e.replace(/\s/g,""))}_flush(){this.currentSequence&&this.seqCallback(this.currentSequence)}finish(){this._flush()}}class Iv{constructor(e){this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};const n=()=>{};this.featureCallback=e.featureCallback||n,this.endCallback=e.endCallback||n,this.commentCallback=e.commentCallback||n,this.errorCallback=e.errorCallback||n,this.directiveCallback=e.directiveCallback||n,this.sequenceCallback=e.sequenceCallback||n,this.disableDerivesFromReferences=e.disableDerivesFromReferences||!1,this.bufferSize=e.bufferSize===void 0?1e3:e.bufferSize}addLine(e){if(this.fastaParser){this.fastaParser.addLine(e);return}if(this.eof)return;if(this.lineNumber+=1,/^\s*[^#\s>]/.test(e)){this._bufferLine(e);return}const n=/^\s*(#+)(.*)/.exec(e);if(n){const[,r]=n;let[,,o]=n;if(r.length===3)this._emitAllUnderConstructionFeatures();else if(r.length===2){const i=wv(e);i&&(i.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new Cv(this.sequenceCallback)):this._emitItem(i))}else o=o.replace(/\s*/,""),this._emitItem({comment:o})}else if(!/^\s*$/.test(e))if(/^\s*>/.test(e))this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new Cv(this.sequenceCallback),this.fastaParser.addLine(e);else{const r=e.replace(/\r?\n?$/g,"");throw new Error(`GFF3 parse error. Cannot parse '${r}'.`)}}finish(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}_emitItem(e){Array.isArray(e)?this.featureCallback(e):"directive"in e?this.directiveCallback(e):"comment"in e&&this.commentCallback(e)}_enforceBufferSizeLimit(e=0){const n=r=>{r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach(i=>{delete this._underConstructionById[i],delete this._completedReferences[i]}),r.forEach(i=>{i.child_features&&i.child_features.forEach(s=>n(s)),i.derived_features&&i.derived_features.forEach(s=>n(s))}))};for(;this._underConstructionTopLevel.length+e>this.bufferSize;){const r=this._underConstructionTopLevel.shift();r&&(this._emitItem(r),n(r))}}_emitAllUnderConstructionFeatures(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${Object.keys(this._underConstructionOrphans)}`)}_bufferLine(e){var n,r,o;const s={...bv(e),child_features:[],derived_features:[]},a=((n=s.attributes)===null||n===void 0?void 0:n.ID)||[],c=((r=s.attributes)===null||r===void 0?void 0:r.Parent)||[],l=this.disableDerivesFromReferences?[]:((o=s.attributes)===null||o===void 0?void 0:o.Derives_from)||[];if(!a.length&&!c.length&&!l.length){this._emitItem([s]);return}let u;a.forEach(f=>{const d=this._underConstructionById[f];d?(d[d.length-1].type!==s.type&&this._parseError(`multi-line feature "${f}" has inconsistent types: "${s.type}", "${d[d.length-1].type}"`),d.push(s),u=d):(u=[s],this._enforceBufferSizeLimit(1),!c.length&&!l.length&&this._underConstructionTopLevel.push(u),this._underConstructionById[f]=u,this._resolveReferencesTo(u,f))}),this._resolveReferencesFrom(u||[s],{Parent:c,Derives_from:l},a)}_resolveReferencesTo(e,n){const r=this._underConstructionOrphans[n];r&&(e.forEach(o=>{o.child_features.push(...r.Parent)}),e.forEach(o=>{o.derived_features.push(...r.Derives_from)}),delete this._underConstructionOrphans[n])}_parseError(e){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${e}`)}_resolveReferencesFrom(e,n,r){function o(i,s,a){let c=i[s];c||(c={},i[s]=c);const l=c[a]||!1;return c[a]=!0,l}n.Parent.forEach(i=>{const s=this._underConstructionById[i];if(s){const a=Sv.Parent;r.filter(c=>o(this._completedReferences,c,`Parent,${i}`)).length||s.forEach(c=>{c[a].push(e)})}else{let a=this._underConstructionOrphans[i];a||(a={Parent:[],Derives_from:[]},this._underConstructionOrphans[i]=a),a.Parent.push(e)}}),n.Derives_from.forEach(i=>{const s=this._underConstructionById[i];if(s){const a=Sv.Derives_from;r.filter(c=>o(this._completedReferences,c,`Derives_from,${i}`)).length||s.forEach(c=>{c[a].push(e)})}else{let a=this._underConstructionOrphans[i];a||(a={Parent:[],Derives_from:[]},this._underConstructionOrphans[i]=a),a.Derives_from.push(e)}})}}function _0(t){process&&process.nextTick?process.nextTick(t):t()}function Tv(t){const e={encoding:"utf8",parseFeatures:!0,parseDirectives:!1,parseSequences:!0,parseComments:!1,bufferSize:1e3,disableDerivesFromReferences:!1,...t};return t.parseAll&&(e.parseFeatures=!0,e.parseDirectives=!0,e.parseComments=!0,e.parseSequences=!0),e}class MM extends gv.Transform{constructor(e={}){super({objectMode:!0}),this.textBuffer="";const n=Tv(e);this.encoding=e.encoding||"utf8",this.decoder=new kM.StringDecoder;const r=this.push.bind(this);this.parser=new Iv({featureCallback:n.parseFeatures?r:void 0,directiveCallback:n.parseDirectives?r:void 0,commentCallback:n.parseComments?r:void 0,sequenceCallback:n.parseSequences?r:void 0,errorCallback:o=>this.emit("error",o),bufferSize:n.bufferSize,disableDerivesFromReferences:n.disableDerivesFromReferences})}_addLine(e){e&&this.parser.addLine(e)}_nextText(e){const n=(this.textBuffer+e).split(/\r?\n/);this.textBuffer=n.pop()||"",n.forEach(r=>this._addLine(r))}_transform(e,n,r){this._nextText(this.decoder.write(e)),_0(r)}_flush(e){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),_0(e)}}function PM(t={}){return new MM(t)}function LM(t,e={}){if(!t)return[];const n=Tv(e),r=[],o=r.push.bind(r),i=new Iv({featureCallback:n.parseFeatures?o:void 0,directiveCallback:n.parseDirectives?o:void 0,commentCallback:n.parseComments?o:void 0,sequenceCallback:n.parseSequences?o:void 0,disableDerivesFromReferences:n.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:s=>{throw s}});return t.split(/\r?\n/).forEach(i.addLine.bind(i)),i.finish(),r}function OM(t){const e=[],n=[];t.forEach(o=>{"sequence"in o?n.push(o):e.push(o)});let r=e.map(vu).join("");return n.length&&(r+=`##FASTA
|
|
897
|
-
`,r+=n.map(k0).join("")),r}class Dv extends gv.Transform{constructor(e={}){super(Object.assign(e,{objectMode:!0})),this.linesSinceLastSyncMark=0,this.haveWeEmittedData=!1,this.fastaMode=!1,this.minLinesBetweenSyncMarks=e.minSyncLines||100,this.insertVersionDirective=e.insertVersionDirective||!1}_transform(e,n,r){let o;if(!this.haveWeEmittedData&&this.insertVersionDirective){const i=Array.isArray(e)?e[0]:e;"directive"in i&&i.directive!=="gff-version"&&this.push(`##gff-version 3
|
|
898
|
-
`)}if("sequence"in e&&!this.fastaMode&&(this.push(`##FASTA
|
|
899
|
-
`),this.fastaMode=!0),Array.isArray(e)?o=e.map(vu).join(""):o=vu(e),this.push(o),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
|
|
900
|
-
`),this.linesSinceLastSyncMark=0;else{let i=0;for(let s=0;s<o.length;s+=1)o[s]===`
|
|
901
|
-
`&&(i+=1);this.linesSinceLastSyncMark+=i}this.haveWeEmittedData=!0,_0(r)}}function NM(t={}){return new Dv(t)}function zM(t,e,n={}){const r={insertVersionDirective:!0,...n};return new Promise((o,i)=>{t.pipe(new Dv(r)).on("end",()=>o(null)).on("error",i).pipe(e)})}const UM=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:PM,parseStringSync:LM,formatSync:OM,formatStream:NM,formatFile:zM,util:FM}},Symbol.toStringTag,{value:"Module"})),Au={InfoFields:{AA:{Number:1,Type:"String",Description:"Ancestral allele"},AC:{Number:"A",Type:"Integer",Description:"Allele count in genotypes, for each ALT allele, in the same order as listed"},AD:{Number:"R",Type:"Integer",Description:"Total read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},AF:{Number:"A",Type:"Float",Description:"Allele frequency for each ALT allele in the same order as listed (estimated from primary data, not called genotypes)"},AN:{Number:1,Type:"Integer",Description:"Total number of alleles in called genotypes"},BQ:{Number:1,Type:"Float",Description:"RMS base quality"},CIGAR:{Number:1,Type:"Float",Description:"Cigar string describing how to align an alternate allele to the reference allele"},DB:{Number:0,Type:"Flag",Description:"dbSNP membership"},DP:{Number:1,Type:"Integer",Description:"combined depth across samples"},END:{Number:1,Type:"Integer",Description:"End position (for use with symbolic alleles)"},H2:{Number:0,Type:"Flag",Description:"HapMap2 membership"},H3:{Number:0,Type:"Flag",Description:"HapMap3 membership"},MQ:{Number:1,Type:null,Description:"RMS mapping quality"},MQ0:{Number:1,Type:"Integer",Description:"Number of MAPQ == 0 reads"},NS:{Number:1,Type:"Integer",Description:"Number of samples with data"},SB:{Number:4,Type:"Integer",Description:"Strand bias"},SOMATIC:{Number:0,Type:"Flag",Description:"Somatic mutation (for cancer genomics)"},VALIDATED:{Number:0,Type:"Flag",Description:"Validated by follow-up experiment"},"1000G":{Number:0,Type:"Flag",Description:"1000 Genomes membership"},IMPRECISE:{Number:0,Type:"Flag",Description:"Imprecise structural variation"},NOVEL:{Number:0,Type:"Flag",Description:"Indicates a novel structural variation"},SVTYPE:{Number:1,Type:"String",Description:"Type of structural variant"},SVLEN:{Number:null,Type:"Integer",Description:"Difference in length between REF and ALT alleles"},CIPOS:{Number:2,Type:"Integer",Description:"Confidence interval around POS for imprecise variants"},CIEND:{Number:2,Type:"Integer",Description:"Confidence interval around END for imprecise variants"},HOMLEN:{Type:"Integer",Description:"Length of base pair identical micro-homology at event breakpoints"},HOMSEQ:{Type:"String",Description:"Sequence of base pair identical micro-homology at event breakpoints"},BKPTID:{Type:"String",Description:"ID of the assembled alternate allele in the assembly file"},MEINFO:{Number:4,Type:"String",Description:"Mobile element info of the form NAME,START,END,POLARITY"},METRANS:{Number:4,Type:"String",Description:"Mobile element transduction info of the form CHR,START,END,POLARITY"},DGVID:{Number:1,Type:"String",Description:"ID of this element in Database of Genomic Variation"},DBVARID:{Number:1,Type:"String",Description:"ID of this element in DBVAR"},DBRIPID:{Number:1,Type:"String",Description:"ID of this element in DBRIP"},MATEID:{Number:null,Type:"String",Description:"ID of mate breakends"},PARID:{Number:1,Type:"String",Description:"ID of partner breakend"},EVENT:{Number:1,Type:"String",Description:"ID of event associated to breakend"},CILEN:{Number:2,Type:"Integer",Description:"Confidence interval around the inserted material between breakend"},DPADJ:{Type:"Integer",Description:"Read Depth of adjacency"},CN:{Number:1,Type:"Integer",Description:"Copy number of segment containing breakend"},CNADJ:{Number:null,Type:"Integer",Description:"Copy number of adjacency"},CICN:{Number:2,Type:"Integer",Description:"Confidence interval around copy number for the segment"},CICNADJ:{Number:null,Type:"Integer",Description:"Confidence interval around copy number for the adjacency"}},GenotypeFields:{AD:{Number:"R",Type:"Integer",Description:"Read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},DP:{Number:1,Type:"Integer",Description:"Read depth"},EC:{Number:"A",Type:"Integer",Description:"Expected alternate allele counts"},FT:{Number:1,Type:"String",Description:'Filter indicating if this genotype was "called"'},GL:{Number:"G",Type:"Float",Description:"Genotype likelihoods"},GP:{Number:"G",Type:"Float",Description:"Genotype posterior probabilities"},GQ:{Number:1,Type:"Integer",Description:"Conditional genotype quality"},GT:{Number:1,Type:"String",Description:"Genotype"},HQ:{Number:2,Type:"Integer",Description:"Haplotype quality"},MQ:{Number:1,Type:"Integer",Description:"RMS mapping quality"},PL:{Number:"G",Type:"Integer",Description:"Phred-scaled genotype likelihoods rounded to the closest integer"},PQ:{Number:1,Type:"Integer",Description:"Phasing quality"},PS:{Number:1,Type:"Integer",Description:"Phase set"}},AltTypes:{DEL:{Description:"Deletion relative to the reference"},INS:{Description:"Insertion of novel sequence relative to the reference"},DUP:{Description:"Region of elevated copy number relative to the reference"},INV:{Description:"Inversion of reference sequence"},CNV:{Description:"Copy number variable region (may be both deletion and duplication)"},"DUP:TANDEM":{Description:"Tandem duplication"},"DEL:ME":{Description:"Deletion of mobile element relative to the reference"},"INS:ME":{Description:"Insertion of a mobile element relative to the reference"},NON_REF:{Description:"Represents any possible alternative allele at this location"},"*":{Description:"Represents any possible alternative allele at this location"}},FilterTypes:{PASS:{Description:"Passed all filters"}}};function GM(t){try{return decodeURIComponent(t)}catch{return t}}class HM{constructor({header:e="",strict:n=!0}){if(!e.length)throw new Error("empty header received");const r=e.split(/[\r\n]+/).filter(c=>c);if(!r.length)throw new Error("no non-empty header lines specified");this.strict=n,this.metadata=JSON.parse(JSON.stringify({INFO:Au.InfoFields,FORMAT:Au.GenotypeFields,ALT:Au.AltTypes,FILTER:Au.FilterTypes}));let o;if(r.forEach(c=>{if(c.startsWith("#"))c.startsWith("##")?this.parseMetadata(c):o=c;else throw new Error(`Bad line in header:
|
|
902
|
-
${c}`)}),!o)throw new Error("No format line found in header");const i=o.trim().split(" "),s=i.slice(0,8),a=["#CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO"];if(i.length<8)throw new Error(`VCF header missing columns:
|
|
903
|
-
${o}`);if(s.length!==a.length||!s.every((c,l)=>c===a[l]))throw new Error(`VCF column headers not correct:
|
|
904
|
-
${o}`);this.samples=i.slice(9)}parseSamples(e,n){const r={};if(e){const o=n.split(" "),i=e.split(":"),s=i.map(a=>{const c=this.getMetadata("FORMAT",a,"Type");return c==="Integer"||c==="Float"});for(let a=0;a<this.samples.length;a++){const c=this.samples[a];r[c]={};const l=o[a].split(":");for(let u=0;u<l.length;u++){const f=l[u];r[c][i[u]]=f===""||f==="."?void 0:f.split(",").map(d=>d==="."?void 0:s[u]?+d:d)}}}return r}parseGenotypesOnly(e,n){const r=n.split(" "),o={};let i=0;const s=e.split(":");if(s.length===1)for(const a of this.samples)o[a]=r[i++];else{const a=s.findIndex(c=>c==="GT");if(a===0)for(const c of this.samples){const l=r[i++],u=l.indexOf(":");u!==-1?o[c]=l.slice(0,u):console.warn("unknown")}else for(const c of this.samples){const l=r[i++].split(":");o[c]=l[a]}}return o}parseMetadata(e){const n=/^##(.+?)=(.*)/.exec(e.trim());if(!n)throw new Error(`Line is not a valid metadata line: ${e}`);const[r,o]=n.slice(1,3),i=r;if(o!=null&&o.startsWith("<")){i in this.metadata||(this.metadata[i]={});const[s,a]=this.parseStructuredMetaVal(o);this.metadata[i][s]=a}else this.metadata[i]=o}parseStructuredMetaVal(e){const n=this.parseKeyValue(e.replace(/^<|>$/g,""),","),r=n.ID;return delete n.ID,"Number"in n&&(Number.isNaN(Number(n.Number))||(n.Number=Number(n.Number))),[r,n]}getMetadata(...e){let n=this.metadata;for(const r of e)if(n=n[r],!n)return n;return n}parseKeyValue(e,n=";"){const r={};let o="",i="",s=1;for(const a of e)s===1?a==="="?s=2:a!==n?o+=a:i===""&&(r[o]=void 0,o=""):s===2?a===n?(r[o]=i,o="",i="",s=1):a==='"'?s=3:i+=a:s===3&&(a!=='"'?i+=a:s=2);return s===2||s===3?r[o]=i:s===1&&(r[o]=void 0),r}parseLine(e){var n,r;let o=0;for(let B=0;o<e.length&&(e[o]===" "&&(B+=1),B!==9);o+=1);const i=e.slice(0,o).split(" "),s=e.slice(o+1),[a,c,l,u,f,d,h]=i,p=a,y=+c,v=l==="."?void 0:l.split(";"),b=u,A=f==="."?void 0:f.split(","),S=d==="."?void 0:+d,E=h==="."?void 0:h.split(";");if(this.strict&&!i[7])throw new Error("no INFO field specified, must contain at least a '.' (turn off strict mode to allow)");const I=(n=i[7])===null||n===void 0?void 0:n.includes("%"),_=i[7]===void 0||i[7]==="."?{}:this.parseKeyValue(i[7]);for(const B of Object.keys(_)){const N=(r=_[B])===null||r===void 0?void 0:r.split(",").map(M=>M==="."?void 0:M).map(M=>M&&I?GM(M):M),F=this.getMetadata("INFO",B,"Type");F==="Integer"||F==="Float"?_[B]=N==null?void 0:N.map(M=>M===void 0?void 0:Number(M)):F==="Flag"?_[B]=!0:_[B]=N}return{CHROM:p,POS:y,ALT:A,INFO:_,REF:b,FILTER:E&&E.length===1&&E[0]==="PASS"?"PASS":E,ID:v,QUAL:S,SAMPLES:()=>{var B;return this.parseSamples((B=i[8])!==null&&B!==void 0?B:"",s)},GENOTYPES:()=>{var B;return this.parseGenotypesOnly((B=i[8])!==null&&B!==void 0?B:"",s)}}}}const VM=Object.freeze(Object.defineProperty({__proto__:null,default:HM},Symbol.toStringTag,{value:"Module"}));ze.GenomeSpy=m2,ze.embed=aR,ze.favIcon=sR,ze.html=ot,ze.icon=oR,ze.loadSpec=y2,Object.defineProperty(ze,Symbol.toStringTag,{value:"Module"})});
|
|
882
|
+
)`},Symbol.toStringTag,{value:"Module"}))).map(([n,e])=>[n,vb.parse(e.trim())]));function Xh(n){const e=new Set(["uint","int","float","long"]);return{...n,fields:n.fields.map(t=>({...t,isArray:t.size&&t.type!=="char",arrayIsNumeric:t.size&&e.has(t.type),isNumeric:!t.size&&e.has(t.type)})).filter(t=>!!t.name)}}const Gk={".":0,"-":-1,"+":1};function Hk(n){var e;return n.length>=12&&!Number.isNaN(Number.parseInt(n[9],10))&&((e=n[10])==null?void 0:e.split(",").filter(t=>!!t).length)===Number.parseInt(n[9],10)}class Vk{constructor(e={}){if(e.autoSql)this.autoSql=Xh(vb.parse(e.autoSql));else if(e.type){if(!Yh[e.type])throw new Error("Type not found");this.autoSql=Xh(Yh[e.type])}else this.autoSql=Xh(Yh.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(e,t={}){const{autoSql:r}=this,{uniqueId:i}=t,s=Array.isArray(e)?e:e.split(" ");let o={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&Hk(s))for(let a=0;a<r.fields.length;a++){const c=r.fields[a];let u=s[a];const{isNumeric:l,isArray:f,arrayIsNumeric:d,name:h}=c;if(u==null)break;if(u!=="."){if(l){const p=Number(u);u=Number.isNaN(p)?u:p}else f&&(u=u.split(","),u.at(-1)===""&&u.pop(),d&&(u=u.map(Number)));o[h]=u}}else{const a=["chrom","chromStart","chromEnd","name"];o=Object.fromEntries(s.map((c,u)=>[a[u]||"field"+u,c])),o.chromStart=+o.chromStart,o.chromEnd=+o.chromEnd,Number.isNaN(Number.parseFloat(o.field4))||(o.score=+o.field4,delete o.field4),(o.field5==="+"||o.field5==="-")&&(o.strand=o.field5,delete o.field5)}return i&&(o.uniqueId=i),o.strand=Gk[o.strand]||0,o.chrom=decodeURIComponent(o.chrom),o}}const _k=Object.freeze(Object.defineProperty({__proto__:null,default:Vk},Symbol.toStringTag,{value:"Module"}));let Zh=class{constructor(e,t,r,i){this.minv=e,this.maxv=t,this.bin=r,this._fetchedSize=i}toUniqueString(){return`${this.minv.toString()}..${this.maxv.toString()} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(e){return this.minv.compareTo(e.minv)||this.maxv.compareTo(e.maxv)||this.bin-e.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}},Sb=class{constructor({filehandle:e,renameRefSeq:t=r=>r}){this.filehandle=e,this.renameRefSeq=t}};const Eb=65536,jk=Eb*Eb;function Qk(n,e=0){const t=n[e]|n[e+1]<<8|n[e+2]<<16|n[e+3]<<24;return((n[e+4]|n[e+5]<<8|n[e+6]<<16|n[e+7]<<24)>>>0)*jk+(t>>>0)}function Wk(n,e){return e.minv.blockPosition-n.maxv.blockPosition<65e3&&e.maxv.blockPosition-n.minv.blockPosition<5e6}function qk(n={}){return"aborted"in n?{signal:n}:n}function Cb(n,e){const t=[];let r;if(n.length===0)return n;n.sort((i,s)=>{const o=i.minv.blockPosition-s.minv.blockPosition;return o===0?i.minv.dataPosition-s.minv.dataPosition:o});for(const i of n)(!e||i.maxv.compareTo(e)>0)&&(r===void 0?(t.push(i),r=i):Wk(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(t.push(i),r=i));return t}function Db(n,e){return{lineCount:Qk(n,e)}}function Xo(n,e){return n?n.compareTo(e)>0?e:n:e}function Yk(n,e=t=>t){let t=0,r=0;const i=[],s={};for(let o=0;o<n.length;o+=1)if(!n[o]){if(r<o){let a="";for(let c=r;c<o;c++)a+=String.fromCharCode(n[c]);a=e(a),i[t]=a,s[a]=t}r=o+1,t+=1}return{refNameToId:s,refIdToName:i}}function Xk(n){let e=0;for(const i of n)e+=i.length;const t=new Uint8Array(e);let r=0;for(const i of n)t.set(i,r),r+=i.length;return t}async function Zk(n){const e=[];for await(const t of n)for(const r of t)e.push(r);return e}let Ib=class{constructor(e,t){this.blockPosition=e,this.dataPosition=t}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}};function Xn(n,e=0,t=!1){if(t)throw new Error("big-endian virtual file offsets not implemented");return new Ib(n[e+7]*1099511627776+n[e+6]*4294967296+n[e+5]*16777216+n[e+4]*65536+n[e+3]*256+n[e+2],n[e+1]<<8|n[e])}const Kk=21578050;function Jk(n,e){return n-n%e}function $k(n,e){return n-n%e+e}function e7(n,e){return e-=1,[[0,0],[1+(n>>26),1+(e>>26)],[9+(n>>23),9+(e>>23)],[73+(n>>20),73+(e>>20)],[585+(n>>17),585+(e>>17)],[4681+(n>>14),4681+(e>>14)]]}class qi extends Sb{async lineCount(e,t){var i,s;return((s=(i=(await this.parse(t)).indices(e))==null?void 0:i.stats)==null?void 0:s.lineCount)||0}async _parse(e){const t=await this.filehandle.readFile(),r=new DataView(t.buffer);if(r.getUint32(0,!0)!==Kk)throw new Error("Not a BAI file");const i=r.getInt32(4,!0),o=((1<<(5+1)*3)-1)/7;let a=8,c;const u=[];for(let d=0;d<i;d++){u.push(a);const h=r.getInt32(a,!0);a+=4;for(let g=0;g<h;g+=1){const y=r.getUint32(a,!0);if(a+=4,y===o+1)a+=4,a+=32;else{if(y>o+1)throw new Error("bai index contains too many bins, please use CSI");{const x=r.getInt32(a,!0);a+=4;for(let A=0;A<x;A++)a+=8,a+=8}}}const p=r.getInt32(a,!0);a+=4;const m=new Array(p);for(let g=0;g<p;g++){const y=Xn(t,a);a+=8,c=Xo(c,y),m[g]=y}}const l=new Vr({maxSize:5});function f(d){let h=u[d];if(h===void 0)return;const p=r.getInt32(h,!0);let m;h+=4;const g={};for(let A=0;A<p;A+=1){const w=r.getUint32(h,!0);if(h+=4,w===o+1)h+=4,m=Db(t,h+16),h+=32;else{if(w>o+1)throw new Error("bai index contains too many bins, please use CSI");{const S=r.getInt32(h,!0);h+=4;const C=new Array(S);for(let v=0;v<S;v++){const T=Xn(t,h);h+=8;const P=Xn(t,h);h+=8,c=Xo(c,T),C[v]=new Zh(T,P,w)}g[w]=C}}}const y=r.getInt32(h,!0);h+=4;const x=new Array(y);for(let A=0;A<y;A++){const w=Xn(t,h);h+=8,c=Xo(c,w),x[A]=w}return{binIndex:g,linearIndex:x,stats:m}}return{bai:!0,firstDataLine:c,maxBlockSize:65536,indices:d=>{if(!l.has(d)){const h=f(d);return h&&l.set(d,h),h}return l.get(d)},refCount:i}}async indexCov(e,t,r,i){const o=t!==void 0,c=(await this.parse(i)).indices(e);if(!c)return[];const{linearIndex:u=[],stats:l}=c;if(u.length===0)return[];const f=r===void 0?(u.length-1)*16384:$k(r,16384),d=t===void 0?0:Jk(t,16384),h=o?new Array((f-d)/16384):new Array(u.length-1),p=u[u.length-1].blockPosition;if(f>(u.length-1)*16384)throw new Error("query outside of range of linear index");let m=u[d/16384].blockPosition;for(let g=d/16384,y=0;g<f/16384;g++,y++)h[y]={score:u[g+1].blockPosition-m,start:g*16384,end:g*16384+16384},m=u[g+1].blockPosition;return h.map(g=>({...g,score:g.score*((l==null?void 0:l.lineCount)||0)/p}))}async blocksForRange(e,t,r,i={}){t<0&&(t=0);const s=await this.parse(i);if(!s)return[];const o=s.indices(e);if(!o)return[];const a=e7(t,r),c=[];for(const[h,p]of a)for(let m=h;m<=p;m++)if(o.binIndex[m]){const g=o.binIndex[m];for(const y of g)c.push(new Zh(y.minv,y.maxv,m))}const u=o.linearIndex.length;let l;const f=Math.min(t>>14,u-1),d=Math.min(r>>14,u-1);for(let h=f;h<=d;++h){const p=o.linearIndex[h];p&&(!l||p.compareTo(l)<0)&&(l=p)}return Cb(c,l)}async parse(e={}){return this.setupP||(this.setupP=this._parse(e).catch(t=>{throw this.setupP=void 0,t})),this.setupP}async hasRefSeq(e,t={}){var i;return!!((i=(await this.parse(t)).indices(e))!=null&&i.binIndex)}}function t7(n){let e=0;for(const t of n)e+=t.length;return e}function Tb(n,e){const t=new Uint8Array(e??t7(n));let r=0;for(const i of n)t.set(i,r),r+=i.length;return t}async function Kh(n){try{let e,t=0,r;const i=[];let s=0;do{const o=n.subarray(t);if(r=new dn(void 0),{strm:e}=r,r.push(o,zr),r.err)throw new Error(r.msg);t+=e.next_in;const a=r.result;i.push(a),s+=a.length}while(e.avail_in);return Tb(i,s)}catch(e){throw/incorrect header check/.exec(`${e}`)?new Error("problem decompressing block: incorrect gzip header check"):e}}async function n7(n,e,t){try{let r;const{minv:i,maxv:s}=e;let o=i.blockPosition,a=i.dataPosition;const c=[],u=[],l=[];let f=0,d=!1,h=0;do{const p=n.subarray(o-i.blockPosition),m=o.toString();let g,y;const x=t==null?void 0:t.get(m);if(x)g=x.buffer,y=x.nextIn,d=!0;else{const S=new dn(void 0);if({strm:r}=S,S.push(p,zr),S.err)throw new Error(S.msg);g=S.result,y=r.next_in,d=!1,t==null||t.set(m,{buffer:g,nextIn:y})}c.push(g);let A=g.length;u.push(o),l.push(a),c.length===1&&i.dataPosition&&(c[0]=c[0].subarray(i.dataPosition),A=c[0].length);const w=o;if(o+=y,a+=A,w>=s.blockPosition){c[f]=c[f].subarray(0,s.blockPosition===i.blockPosition?s.dataPosition-i.dataPosition+1:s.dataPosition+1),h+=c[f].length,u.push(o),l.push(a);break}h+=A,f++}while(d?o<n.length+i.blockPosition:r.avail_in);return{buffer:Tb(c,h),cpositions:u,dpositions:l}}catch(r){throw/incorrect header check/.exec(`${r}`)?new Error("problem decompressing block: incorrect gzip header check"):r}}let Jh=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(Jh=new Int32Array(Jh));const r7=(n,e)=>{let t=-1;for(let r=0;r<n.length;r++)t=Jh[(t^n[r])&255]^t>>>8;return t^-1},i7=21582659,s7=38359875;function o7(n,e){return n*2**e}function Bb(n,e){return Math.floor(n/2**e)}let xu=class extends Sb{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(e,t){var i,s;return((s=(i=(await this.parse(t)).indices(e))==null?void 0:i.stats)==null?void 0:s.lineCount)||0}async indexCov(){return[]}parseAuxData(e,t){const r=new DataView(e.buffer),i=r.getUint32(t,!0),s=i&65536?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[i&15];if(!o)throw new Error(`invalid Tabix preset format flags ${i}`);const a={ref:r.getInt32(t+4,!0),start:r.getInt32(t+8,!0),end:r.getInt32(t+12,!0)},c=r.getInt32(t+16,!0),u=c?String.fromCharCode(c):"",l=r.getInt32(t+20,!0),f=r.getInt32(t+24,!0);return{columnNumbers:a,coordinateType:s,metaValue:c,metaChar:u,skipLines:l,format:o,formatFlags:i,...Yk(e.subarray(t+28,t+28+f),this.renameRefSeq)}}async _parse(e){const t=await this.filehandle.readFile(e),r=await Kh(t),i=new DataView(r.buffer);let s;const o=i.getUint32(0,!0);if(o===i7)s=1;else if(o===s7)s=2;else throw new Error(`Not a CSI file ${o}`);this.minShift=i.getInt32(4,!0),this.depth=i.getInt32(8,!0),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const a=this.maxBinNumber,c=i.getInt32(12,!0),u=c>=30?this.parseAuxData(r,16):void 0,l=i.getInt32(16+c,!0);let f=16+c+4,d;const h=[];for(let g=0;g<l;g++){h.push(f);const y=i.getInt32(f,!0);f+=4;for(let x=0;x<y;x++){const A=i.getUint32(f,!0);if(f+=4,A>this.maxBinNumber)f+=44;else{f+=8;const w=i.getInt32(f,!0);f+=4;for(let S=0;S<w;S+=1){const C=Xn(r,f);f+=8,f+=8,d=Xo(d,C)}}}}const p=new Vr({maxSize:5});function m(g){let y=h[g];if(y===void 0)return;const x=i.getInt32(y,!0);y+=4;const A={};let w;for(let S=0;S<x;S++){const C=i.getUint32(y,!0);if(y+=4,C>a)w=Db(r,y+28),y+=44;else{d=Xo(d,Xn(r,y)),y+=8;const v=i.getInt32(y,!0);y+=4;const T=new Array(v);for(let P=0;P<v;P+=1){const F=Xn(r,y);y+=8;const k=Xn(r,y);y+=8,T[P]=new Zh(F,k,C)}A[C]=T}}return{binIndex:A,stats:w}}return{csiVersion:s,firstDataLine:d,indices:g=>{if(!p.has(g)){const y=m(g);return y&&p.set(g,y),y}return p.get(g)},refCount:l,csi:!0,maxBlockSize:65536,...u}}async blocksForRange(e,t,r,i={}){t<0&&(t=0);const o=(await this.parse(i)).indices(e);if(!o)return[];const a=this.reg2bins(t,r);if(a.length===0)return[];const c=[];for(const[u,l]of a)for(let f=u;f<=l;f++)if(o.binIndex[f]){const d=o.binIndex[f];for(const h of d)c.push(h)}return Cb(c,new Ib(0,0))}reg2bins(e,t){e-=1,e<1&&(e=1),t>2**50&&(t=2**34),t-=1;let r=0,i=0,s=this.minShift+this.depth*3;const o=[];for(;r<=this.depth;s-=3,i+=o7(1,r*3),r+=1){const a=i+Bb(e,s),c=i+Bb(t,s);if(c-a+o.length>this.maxBinNumber)throw new Error(`query ${e}-${t} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);o.push([a,c])}return o}async parse(e={}){return this.setupP||(this.setupP=this._parse(e).catch(t=>{throw this.setupP=void 0,t})),this.setupP}async hasRefSeq(e,t={}){var i;return!!((i=(await this.parse(t)).indices(e))!=null&&i.binIndex)}};class a7{read(){throw new Error("never called")}stat(){throw new Error("never called")}readFile(){throw new Error("never called")}close(){throw new Error("never called")}}const wt={BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048},Zo="=ACMGRSVTWYHKDBN".split(""),c7=[77,73,68,78,83,72,80,61,88,63,63,63,63,63,63,63],u7=1,l7=3,kb=4,f7=1<<u7|1<<kb|1<<5;class _r{constructor(e){this.bytes=e.bytes,this.fileOffset=e.fileOffset,this._dataView=new DataView(this.bytes.byteArray.buffer)}get byteArray(){return this.bytes.byteArray}get flags(){return(this._dataView.getInt32(this.bytes.start+16,!0)&4294901760)>>16}get ref_id(){return this._dataView.getInt32(this.bytes.start+4,!0)}get start(){return this._dataView.getInt32(this.bytes.start+8,!0)}get end(){return this.start+this.length_on_ref}get id(){return this.fileOffset}get mq(){const e=(this.bin_mq_nl&65280)>>8;return e===255?void 0:e}get score(){return this.mq}get qual(){if(this.isSegmentUnmapped())return;const e=this.b0+this.read_name_length+this.num_cigar_bytes+this.num_seq_bytes;return this.byteArray.subarray(e,e+this.seq_length)}get strand(){return this.isReverseComplemented()?-1:1}get b0(){return this.bytes.start+36}get name(){let e="";for(let t=0;t<this.read_name_length-1;t++)e+=String.fromCharCode(this.byteArray[this.b0+t]);return e}get tags(){let e=this.b0+this.read_name_length+this.num_cigar_bytes+this.num_seq_bytes+this.seq_length;const t=this.bytes.end,r={};for(;e<t;){const i=String.fromCharCode(this.byteArray[e])+String.fromCharCode(this.byteArray[e+1]),s=String.fromCharCode(this.byteArray[e+2]);switch(e+=3,s){case"A":r[i]=String.fromCharCode(this.byteArray[e]),e+=1;break;case"i":r[i]=this._dataView.getInt32(e,!0),e+=4;break;case"I":r[i]=this._dataView.getUint32(e,!0),e+=4;break;case"c":r[i]=this._dataView.getInt8(e),e+=1;break;case"C":r[i]=this._dataView.getUint8(e),e+=1;break;case"s":r[i]=this._dataView.getInt16(e,!0),e+=2;break;case"S":r[i]=this._dataView.getUint16(e,!0),e+=2;break;case"f":r[i]=this._dataView.getFloat32(e,!0),e+=4;break;case"Z":case"H":{const o=[];for(;e<=t;){const a=this.byteArray[e++];if(a!==0)o.push(String.fromCharCode(a));else break}r[i]=o.join("");break}case"B":{const o=this.byteArray[e++],a=String.fromCharCode(o),c=this._dataView.getInt32(e,!0);e+=4;const u=this.byteArray.byteOffset+e;if(a==="i"){if(u%4===0)r[i]=new Int32Array(this.byteArray.buffer,u,c);else{const l=this.byteArray.slice(e,e+(c<<2));r[i]=new Int32Array(l.buffer,l.byteOffset,c)}e+=c<<2}else if(a==="I"){if(u%4===0)r[i]=new Uint32Array(this.byteArray.buffer,u,c);else{const l=this.byteArray.slice(e,e+(c<<2));r[i]=new Uint32Array(l.buffer,l.byteOffset,c)}e+=c<<2}else if(a==="s"){if(u%2===0)r[i]=new Int16Array(this.byteArray.buffer,u,c);else{const l=this.byteArray.slice(e,e+(c<<1));r[i]=new Int16Array(l.buffer,l.byteOffset,c)}e+=c<<1}else if(a==="S"){if(u%2===0)r[i]=new Uint16Array(this.byteArray.buffer,u,c);else{const l=this.byteArray.slice(e,e+(c<<1));r[i]=new Uint16Array(l.buffer,l.byteOffset,c)}e+=c<<1}else if(a==="c")r[i]=new Int8Array(this.byteArray.buffer,u,c),e+=c;else if(a==="C")r[i]=new Uint8Array(this.byteArray.buffer,u,c),e+=c;else if(a==="f"){if(u%4===0)r[i]=new Float32Array(this.byteArray.buffer,u,c);else{const l=this.byteArray.slice(e,e+(c<<2));r[i]=new Float32Array(l.buffer,l.byteOffset,c)}e+=c<<2}break}default:console.error("Unknown BAM tag type",s);break}}return r}isPaired(){return!!(this.flags&wt.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&wt.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&wt.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&wt.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&wt.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&wt.BAM_FMREVERSE)}isRead1(){return!!(this.flags&wt.BAM_FREAD1)}isRead2(){return!!(this.flags&wt.BAM_FREAD2)}isSecondary(){return!!(this.flags&wt.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&wt.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&wt.BAM_FDUP)}isSupplementary(){return!!(this.flags&wt.BAM_FSUPPLEMENTARY)}get cigarAndLength(){if(this.isSegmentUnmapped())return{length_on_ref:0,NUMERIC_CIGAR:new Uint32Array(0)};const e=this.num_cigar_ops;let t=this.b0+this.read_name_length;const r=this._dataView.getInt32(t,!0),i=r>>4;if((r&15)===kb&&i===this.seq_length){t+=4;const o=this._dataView.getInt32(t,!0),a=o>>4;return(o&15)!==l7&&console.warn("CG tag with no N tag"),{NUMERIC_CIGAR:this.tags.CG,length_on_ref:a}}else{const o=this.byteArray.byteOffset+t,a=o%4===0?new Uint32Array(this.byteArray.buffer,o,e):new Uint32Array(this.byteArray.slice(t,t+(e<<2)).buffer,0,e);let c=0;for(let u=0;u<e;++u){const l=a[u];1<<(l&15)&f7||(c+=l>>4)}return{NUMERIC_CIGAR:a,length_on_ref:c}}}get length_on_ref(){return this.cigarAndLength.length_on_ref}get NUMERIC_CIGAR(){return this.cigarAndLength.NUMERIC_CIGAR}get CIGAR(){const e=this.NUMERIC_CIGAR;let t="";for(let r=0,i=e.length;r<i;r++){const s=e[r],o=s>>4,a=c7[s&15];t+=o+String.fromCharCode(a)}return t}get num_cigar_ops(){return this.flag_nc&65535}get num_cigar_bytes(){return this.num_cigar_ops<<2}get read_name_length(){return this.bin_mq_nl&255}get num_seq_bytes(){return this.seq_length+1>>1}get NUMERIC_SEQ(){const e=this.b0+this.read_name_length+this.num_cigar_bytes,t=this.byteArray.subarray(e,e+this.num_seq_bytes);return new Uint8Array(t.buffer,t.byteOffset,this.num_seq_bytes)}get seq(){const e=this.NUMERIC_SEQ,t=this.seq_length,r=new Array(t);let i=0;const s=t>>1;for(let o=0;o<s;++o){const a=e[o];r[i++]=Zo[(a&240)>>4],r[i++]=Zo[a&15]}if(i<t){const o=e[s];r[i]=Zo[(o&240)>>4]}return r.join("")}get pair_orientation(){if(!this.isSegmentUnmapped()&&!this.isMateUnmapped()&&this.ref_id===this.next_refid){const e=this.isReverseComplemented()?"R":"F",t=this.isMateReverseComplemented()?"R":"F";let r=" ",i=" ";this.isRead1()?(r="1",i="2"):this.isRead2()&&(r="2",i="1");const s=[];return this.template_length>0?(s[0]=e,s[1]=r,s[2]=t,s[3]=i):(s[2]=e,s[3]=r,s[0]=t,s[1]=i),s.join("")}}get bin_mq_nl(){return this._dataView.getInt32(this.bytes.start+12,!0)}get flag_nc(){return this._dataView.getInt32(this.bytes.start+16,!0)}get seq_length(){return this._dataView.getInt32(this.bytes.start+20,!0)}get next_refid(){return this._dataView.getInt32(this.bytes.start+24,!0)}get next_pos(){return this._dataView.getInt32(this.bytes.start+28,!0)}get template_length(){return this._dataView.getInt32(this.bytes.start+32,!0)}seqAt(e){if(e<this.seq_length){const t=e>>1,r=this.byteArray[this.b0+this.read_name_length+this.num_cigar_bytes+t];return e%2===0?Zo[(r&240)>>4]:Zo[r&15]}else return}toJSON(){const e={};for(const t of Object.keys(this))t.startsWith("_")||t==="bytes"||(e[t]=this[t]);return e}}function Ko(n,e){const t=Object.getOwnPropertyDescriptor(n.prototype,e);if(!t)throw new Error("OH NO, NO PROPERTY DESCRIPTOR");const r=t.get;if(!r)throw new Error("OH NO, NOT A GETTER");Object.defineProperty(n.prototype,e,{get(){const i=r.call(this);return Object.defineProperty(this,e,{value:i}),i}})}Ko(_r,"tags"),Ko(_r,"cigarAndLength"),Ko(_r,"seq"),Ko(_r,"qual"),Ko(_r,"end");function Fb(n){const e=n.split(/\r?\n/),t=[];for(const r of e){const[i,...s]=r.split(/\t/);i&&t.push({tag:i.slice(1),data:s.map(o=>{const a=o.indexOf(":"),c=o.slice(0,a),u=o.slice(a+1);return{tag:c,value:u}})})}return t}const Pb=21840194,h7=65536;class Mb{constructor({bamFilehandle:e,bamPath:t,bamUrl:r,baiPath:i,baiFilehandle:s,baiUrl:o,csiPath:a,csiFilehandle:c,csiUrl:u,htsget:l,renameRefSeqs:f=d=>d}){if(this.htsget=!1,this.cache=new Vr({maxSize:1e3}),this.renameRefSeq=f,e)this.bam=e;else if(t)this.bam=new qe(t);else if(r)this.bam=new Yt(r);else if(l)this.htsget=!0,this.bam=new a7;else throw new Error("unable to initialize bam");if(c)this.index=new xu({filehandle:c});else if(a)this.index=new xu({filehandle:new qe(a)});else if(u)this.index=new xu({filehandle:new Yt(u)});else if(s)this.index=new qi({filehandle:s});else if(i)this.index=new qi({filehandle:new qe(i)});else if(o)this.index=new qi({filehandle:new Yt(o)});else if(t)this.index=new qi({filehandle:new qe(`${t}.bai`)});else if(r)this.index=new qi({filehandle:new Yt(`${r}.bai`)});else if(l)this.htsget=!0;else throw new Error("unable to infer index format")}async getHeaderPre(e){const t=qk(e);if(!this.index)return;const r=await this.index.parse(t),i=r.firstDataLine===void 0?await this.bam.readFile():await this.bam.read(r.firstDataLine.blockPosition+h7,0),s=await Kh(i),o=new DataView(s.buffer);if(o.getInt32(0,!0)!==Pb)throw new Error("Not a BAM file");const a=o.getInt32(4,!0),c=new TextDecoder("utf8");this.header=c.decode(s.subarray(8,8+a));const{chrToIndex:u,indexToChr:l}=this._parseRefSeqs(s,a+8);return this.chrToIndex=u,this.indexToChr=l,Fb(this.header)}getHeader(e){return this.headerP||(this.headerP=this.getHeaderPre(e).catch(t=>{throw this.headerP=void 0,t})),this.headerP}async getHeaderText(e={}){return await this.getHeader(e),this.header}_parseRefSeqs(e,t){const r=new DataView(e.buffer),i=r.getInt32(t,!0);let s=t+4;const o={},a=[],c=new TextDecoder("utf8");for(let u=0;u<i;u+=1){if(s+8>e.length)throw new Error(`Insufficient data for reference sequences: need more than ${e.length} bytes`);const l=r.getInt32(s,!0),f=this.renameRefSeq(c.decode(e.subarray(s+4,s+4+l-1))),d=r.getInt32(s+l+4,!0);o[f]=u,a.push({refName:f,length:d}),s=s+8+l}return{chrToIndex:o,indexToChr:a}}async getRecordsForRange(e,t,r,i){return Zk(this.streamRecordsForRange(e,t,r,i))}async*streamRecordsForRange(e,t,r,i){var a;await this.getHeader(i);const s=(a=this.chrToIndex)==null?void 0:a[e];if(s===void 0||!this.index)return;const o=await this.index.blocksForRange(s,t-1,r,i);yield*this._fetchChunkFeatures(o,s,t,r,i)}async*_fetchChunkFeatures(e,t,r,i,s={}){const{viewAsPairs:o}=s,a=[];let c=!1;for(const u of e){const{data:l,cpositions:f,dpositions:d}=await this._readChunk({chunk:u,opts:s}),h=await this.readBamFeatures(l,f,d,u,t,r,i),p=[];for(const m of h)if(m.ref_id===t)if(m.start>=i){c=!0;break}else m.end>=r&&p.push(m);if(a.push(p),yield p,c)break}o&&(yield this.fetchPairs(t,a,s))}async fetchPairs(e,t,r){const{pairAcrossChr:i,maxInsertSize:s=2e5}=r,o={},a={};for(const d of t){const h={};for(const p of d){const m=p.name,g=p.id;h[m]||(h[m]=0),h[m]++,a[g]=1}for(const[p,m]of Object.entries(h))m===1&&(o[p]=!0)}const c=[];for(const d of t)for(const h of d){const p=h.name,m=h.start,g=h.next_pos,y=h.next_refid;this.index&&o[p]&&(i||y===e&&Math.abs(m-g)<s)&&c.push(this.index.blocksForRange(y,g,g+1,r))}const u=new Map,l=await Promise.all(c);for(const d of l.flat())u.has(d.toString())||u.set(d.toString(),d);return(await Promise.all([...u.values()].map(async d=>{const{data:h,cpositions:p,dpositions:m,chunk:g}=await this._readChunk({chunk:d,opts:r}),y=[];for(const x of await this.readBamFeatures(h,p,m,g))o[x.name]&&!a[x.id]&&y.push(x);return y}))).flat()}async _readChunk({chunk:e,opts:t}){const r=await this.bam.read(e.fetchedSize(),e.minv.blockPosition,t),{buffer:i,cpositions:s,dpositions:o}=await n7(r,e,this.cache);return{data:i,cpositions:s,dpositions:o,chunk:e}}async readBamFeatures(e,t,r,i,s,o,a){let c=0;const u=[];let l=0;const f=new DataView(e.buffer),d=r.length>0,h=t.length>0,p=s!==void 0&&o!==void 0&&a!==void 0;for(;c+4<e.length;){const m=f.getInt32(c,!0),g=c+4+m-1;if(d){for(;c+i.minv.dataPosition>=r[l++];);l--}if(g<e.length){if(p&&c+12<e.length&&!this._shouldIncludeFeature(f,c,s,a)){c=g+1;continue}const y=new _r({bytes:{byteArray:e,start:c,end:g},fileOffset:h?t[l]*256+(c-r[l])+i.minv.dataPosition+1:r7(e.subarray(c,g))>>>0});u.push(y)}c=g+1}return u}_shouldIncludeFeature(e,t,r,i){const s=e.getInt32(t+4,!0),o=e.getInt32(t+8,!0);return s===r&&o<i}async hasRefSeq(e){var r,i;const t=(r=this.chrToIndex)==null?void 0:r[e];return t===void 0?!1:(i=this.index)==null?void 0:i.hasRefSeq(t)}async lineCount(e){var r;const t=(r=this.chrToIndex)==null?void 0:r[e];return t===void 0||!this.index?0:this.index.lineCount(t)}async indexCov(e,t,r){var s;if(!this.index)return[];await this.index.parse();const i=(s=this.chrToIndex)==null?void 0:s[e];return i===void 0?[]:this.index.indexCov(i,t,r)}async blocksForRange(e,t,r,i){var o;if(!this.index)return[];await this.index.parse();const s=(o=this.chrToIndex)==null?void 0:o[e];return s===void 0?[]:this.index.blocksForRange(s,t,r,i)}}async function Rb(n,e){const t=await Promise.all(n.map(async r=>{const{url:i,headers:s}=r;if(i.startsWith("data:")){const o=await fetch(i);if(!o.ok)throw new Error("failed to decode base64");const a=await o.arrayBuffer();return new Uint8Array(a)}else{const{referer:o,...a}=s,c=await fetch(i,{...e,headers:{...e==null?void 0:e.headers,...a}});if(!c.ok)throw new Error(`HTTP ${c.status} fetching ${i}: ${await c.text()}`);return new Uint8Array(await c.arrayBuffer())}}));return Xk(await Promise.all(t.map(r=>Kh(r))))}class d7 extends Mb{constructor(e){super({htsget:!0}),this.baseUrl=e.baseUrl,this.trackId=e.trackId}async*streamRecordsForRange(e,t,r,i){var c;const o=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${e}&start=${t}&end=${r}&format=BAM`,a=(c=this.chrToIndex)==null?void 0:c[e];if(a===void 0)yield[];else{const u=await fetch(o,{...i});if(!u.ok)throw new Error(`HTTP ${u.status} fetching ${o}: ${await u.text()}`);const l=await u.json(),f=await Rb(l.htsget.urls.slice(1),i);yield*this._fetchChunkFeatures([{buffer:f,_fetchedSize:void 0,bin:0,compareTo(){return 0},toUniqueString(){return`${e}_${t}_${r}`},fetchedSize(){return 0},minv:{dataPosition:0,blockPosition:0,compareTo:()=>0},maxv:{dataPosition:Number.MAX_SAFE_INTEGER,blockPosition:0,compareTo:()=>0},toString(){return`${e}_${t}_${r}`}}],a,t,r,i)}}async _readChunk({chunk:e}){if(!e.buffer)throw new Error("expected chunk.buffer in htsget");return{data:e.buffer,cpositions:[],dpositions:[],chunk:e}}async getHeader(e={}){const t=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,r=await fetch(t,e);if(!r.ok)throw new Error(`HTTP ${r.status} fetching ${t}: ${await r.text()}`);const i=await r.json(),s=await Rb(i.htsget.urls,e),o=new DataView(s.buffer);if(o.getInt32(0,!0)!==Pb)throw new Error("Not a BAM file");const a=o.getInt32(4,!0),u=new TextDecoder("utf8").decode(s.subarray(8,8+a)),l=Fb(u),f=[],d={},h=l.filter(p=>p.tag==="SQ");for(const[p,m]of h.entries()){let g="",y=0;for(const x of m.data)x.tag==="SN"?g=x.value:x.tag==="LN"&&(y=+x.value);d[g]=p,f[p]={refName:g,length:y}}return this.chrToIndex=d,this.indexToChr=f,l}}const p7=Object.freeze(Object.defineProperty({__proto__:null,BAI:qi,BamFile:Mb,BamRecord:_r,CSI:xu,HtsgetFile:d7},Symbol.toStringTag,{value:"Module"}));function m7(n){let e=0;for(const t of n)e+=t.length;return e}function Ob(n,e){const t=new Uint8Array(e??m7(n));let r=0;for(const i of n)t.set(i,r),r+=i.length;return t}async function $h(n){try{let e,t=0,r;const i=[];let s=0;do{const o=n.subarray(t);if(r=new dn(void 0),{strm:e}=r,r.push(o,zr),r.err)throw new Error(r.msg);t+=e.next_in;const a=r.result;i.push(a),s+=a.length}while(e.avail_in);return Ob(i,s)}catch(e){throw/incorrect header check/.exec(`${e}`)?new Error("problem decompressing block: incorrect gzip header check"):e}}async function g7(n,e,t){try{let r;const{minv:i,maxv:s}=e;let o=i.blockPosition,a=i.dataPosition;const c=[],u=[],l=[];let f=0,d=!1,h=0;do{const p=n.subarray(o-i.blockPosition),m=o.toString();let g,y;const x=t==null?void 0:t.get(m);if(x)g=x.buffer,y=x.nextIn,d=!0;else{const S=new dn(void 0);if({strm:r}=S,S.push(p,zr),S.err)throw new Error(S.msg);g=S.result,y=r.next_in,d=!1,t==null||t.set(m,{buffer:g,nextIn:y})}c.push(g);let A=g.length;u.push(o),l.push(a),c.length===1&&i.dataPosition&&(c[0]=c[0].subarray(i.dataPosition),A=c[0].length);const w=o;if(o+=y,a+=A,w>=s.blockPosition){c[f]=c[f].subarray(0,s.blockPosition===i.blockPosition?s.dataPosition-i.dataPosition+1:s.dataPosition+1),h+=c[f].length,u.push(o),l.push(a);break}h+=A,f++}while(d?o<n.length+i.blockPosition:r.avail_in);return{buffer:Ob(c,h),cpositions:u,dpositions:l}}catch(r){throw/incorrect header check/.exec(`${r}`)?new Error("problem decompressing block: incorrect gzip header check"):r}}class Au{constructor(e,t,r,i){this.minv=e,this.maxv=t,this.bin=r,this._fetchedSize=i}toUniqueString(){return`${this.minv}..${this.maxv} (bin ${this.bin}, fetchedSize ${this.fetchedSize()})`}toString(){return this.toUniqueString()}compareTo(e){return this.minv.compareTo(e.minv)||this.maxv.compareTo(e.maxv)||this.bin-e.bin}fetchedSize(){return this._fetchedSize!==void 0?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}class Nb{constructor({filehandle:e,renameRefSeqs:t=r=>r}){this.filehandle=e,this.renameRefSeq=t}async getMetadata(e={}){const{indices:t,...r}=await this.parse(e);return r}_findFirstData(e,t){return e?e.compareTo(t)>0?t:e:t}async parse(e={}){return this.parseP||(this.parseP=this._parse(e).catch(t=>{throw this.parseP=void 0,t})),this.parseP}async hasRefSeq(e,t={}){var i;return!!((i=(await this.parse(t)).indices[e])!=null&&i.binIndex)}_parseNameBytes(e){let t=0,r=0;const i=[],s={},o=new TextDecoder("utf8");for(let a=0;a<e.length;a+=1)if(!e[a]){if(r<a){const c=this.renameRefSeq(o.decode(e.subarray(r,a)));i[t]=c,s[c]=t}r=a+1,t+=1}return{refNameToId:s,refIdToName:i}}}const Lb=65536,y7=Lb*Lb;function zb(n,e=0){const t=n[e]|n[e+1]<<8|n[e+2]<<16|n[e+3]<<24;return((n[e+4]|n[e+5]<<8|n[e+6]<<16|n[e+7]<<24)>>>0)*y7+(t>>>0)}class b7 extends Error{}function Jo(n){if(n&&n.aborted)if(typeof DOMException>"u"){const e=new b7("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}function x7(n,e){return e.minv.blockPosition-n.maxv.blockPosition<65e3&&e.maxv.blockPosition-n.minv.blockPosition<5e6}function Ub(n,e){const t=[];let r;if(n.length===0)return n;n.sort(function(i,s){const o=i.minv.blockPosition-s.minv.blockPosition;return o===0?i.minv.dataPosition-s.minv.dataPosition:o});for(const i of n)(!e||i.maxv.compareTo(e)>0)&&(r===void 0?(t.push(i),r=i):x7(r,i)?i.maxv.compareTo(r.maxv)>0&&(r.maxv=i.maxv):(t.push(i),r=i));return t}class ed{constructor(e,t){this.blockPosition=e,this.dataPosition=t}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}}function Yi(n,e=0){return new ed(n[e+7]*1099511627776+n[e+6]*4294967296+n[e+5]*16777216+n[e+4]*65536+n[e+3]*256+n[e+2],n[e+1]<<8|n[e])}const A7=21582659,w7=38359875,v7={0:"generic",1:"SAM",2:"VCF"};function S7(n,e){return n*2**e}function Gb(n,e){return Math.floor(n/2**e)}class wu extends Nb{constructor(e){super(e),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(e,t={}){const r=await this.parse(t),i=r.refNameToId[e];if(i===void 0||!r.indices[i])return-1;const{stats:o}=r.indices[i];return o?o.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(e,t){const r=new DataView(e.buffer),i=r.getInt32(t,!0),s=i&65536?"zero-based-half-open":"1-based-closed",o=v7[i&15];if(!o)throw new Error(`invalid Tabix preset format flags ${i}`);const a={ref:r.getInt32(t+4,!0),start:r.getInt32(t+8,!0),end:r.getInt32(t+12,!0)},c=r.getInt32(t+16,!0),u=c?String.fromCharCode(c):void 0,l=r.getInt32(t+20,!0),f=r.getInt32(t+24,!0),{refIdToName:d,refNameToId:h}=this._parseNameBytes(e.subarray(t+28,t+28+f));return{refIdToName:d,refNameToId:h,skipLines:l,metaChar:u,columnNumbers:a,format:o,coordinateType:s}}async _parse(e={}){const t=await $h(await this.filehandle.readFile(e)),r=new DataView(t.buffer);let i;if(r.getUint32(0,!0)===A7)i=1;else if(r.getUint32(0,!0)===w7)i=2;else throw new Error("Not a CSI file");this.minShift=r.getInt32(4,!0),this.depth=r.getInt32(8,!0),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const s=2**(this.minShift+this.depth*3),o=r.getInt32(12,!0),a=o&&o>=30?this.parseAuxData(t,16):{refIdToName:[],refNameToId:{},metaChar:void 0,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},c=r.getInt32(16+o,!0);let u,l=16+o+4;const f=new Array(c).fill(0).map(()=>{const d=r.getInt32(l,!0);l+=4;const h={};let p;for(let m=0;m<d;m+=1){const g=r.getUint32(l,!0);if(g>this.maxBinNumber)p=this.parsePseudoBin(t,l+4),l+=48;else{const y=Yi(t,l+4);u=this._findFirstData(u,y);const x=r.getInt32(l+12,!0);l+=16;const A=new Array(x);for(let w=0;w<x;w+=1){const S=Yi(t,l),C=Yi(t,l+8);l+=16,A[w]=new Au(S,C,g)}h[g]=A}}return{binIndex:h,stats:p}});return{...a,csi:!0,refCount:c,maxBlockSize:65536,firstDataLine:u,csiVersion:i,indices:f,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:s}}parsePseudoBin(e,t){return{lineCount:zb(e,t+28)}}async blocksForRange(e,t,r,i={}){t<0&&(t=0);const s=await this.parse(i),o=s.refNameToId[e];if(o===void 0)return[];const a=s.indices[o];if(!a)return[];const c=this.reg2bins(t,r),u=[];for(const[l,f]of c)for(let d=l;d<=f;d++)if(a.binIndex[d])for(const h of a.binIndex[d])u.push(new Au(h.minv,h.maxv,d));return Ub(u,new ed(0,0))}reg2bins(e,t){e-=1,e<1&&(e=1),t>2**50&&(t=2**34),t-=1;let r=0,i=0,s=this.minShift+this.depth*3;const o=[];for(;r<=this.depth;s-=3,i+=S7(1,r*3),r+=1){const a=i+Gb(e,s),c=i+Gb(t,s);if(c-a+o.length>this.maxBinNumber)throw new Error(`query ${e}-${t} is too large for current binning scheme (shift ${this.minShift}, depth ${this.depth}), try a smaller query or a coarser index binning scheme`);o.push([a,c])}return o}}const E7=21578324,Hb=14;function C7(n,e){return n+=1,e-=1,[[0,0],[1+(n>>26),1+(e>>26)],[9+(n>>23),9+(e>>23)],[73+(n>>20),73+(e>>20)],[585+(n>>17),585+(e>>17)],[4681+(n>>14),4681+(e>>14)]]}class Xi extends Nb{async lineCount(e,t={}){var o;const r=await this.parse(t),i=r.refNameToId[e];return i===void 0||!r.indices[i]?-1:((o=r.indices[i].stats)==null?void 0:o.lineCount)??-1}async _parse(e={}){const t=await this.filehandle.readFile(e),r=await $h(t);Jo(e.signal);const i=new DataView(r.buffer);if(i.getUint32(0,!0)!==E7)throw new Error("Not a TBI file");const o=i.getUint32(4,!0),a=i.getUint32(8,!0),c=a&65536?"zero-based-half-open":"1-based-closed",l={0:"generic",1:"SAM",2:"VCF"}[a&15];if(!l)throw new Error(`invalid Tabix preset format flags ${a}`);const f={ref:i.getInt32(12,!0),start:i.getInt32(16,!0),end:i.getInt32(20,!0)},d=i.getInt32(24,!0),h=5,p=((1<<(h+1)*3)-1)/7,m=2**(14+h*3),g=d?String.fromCharCode(d):void 0,y=i.getInt32(28,!0),x=i.getInt32(32,!0),{refNameToId:A,refIdToName:w}=this._parseNameBytes(r.slice(36,36+x));let S=36+x,C;return{indices:new Array(o).fill(0).map(()=>{const T=i.getInt32(S,!0);S+=4;const P={};let F;for(let U=0;U<T;U+=1){const j=i.getUint32(S,!0);if(S+=4,j>p+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(j===p+1){const K=i.getInt32(S,!0);S+=4,K===2&&(F=this.parsePseudoBin(r,S)),S+=16*K}else{const K=i.getInt32(S,!0);S+=4;const _=new Array(K);for(let te=0;te<K;te+=1){const ce=Yi(r,S),ie=Yi(r,S+8);S+=16,C=this._findFirstData(C,ce),_[te]=new Au(ce,ie,j)}P[j]=_}}const k=i.getInt32(S,!0);S+=4;const L=new Array(k);for(let U=0;U<k;U+=1)L[U]=Yi(r,S),S+=8,C=this._findFirstData(C,L[U]);return{binIndex:P,linearIndex:L,stats:F}}),metaChar:g,maxBinNumber:p,maxRefLength:m,skipLines:y,firstDataLine:C,columnNumbers:f,coordinateType:c,format:l,refIdToName:w,refNameToId:A,maxBlockSize:65536}}parsePseudoBin(e,t){return{lineCount:zb(e,t+16)}}async blocksForRange(e,t,r,i={}){t<0&&(t=0);const s=await this.parse(i),o=s.refNameToId[e];if(o===void 0)return[];const a=s.indices[o];if(!a)return[];(a.linearIndex.length>0?a.linearIndex[t>>Hb>=a.linearIndex.length?a.linearIndex.length-1:t>>Hb]:new ed(0,0))||console.warn("querying outside of possible tabix range");const u=C7(t,r),l=[];for(const[m,g]of u)for(let y=m;y<=g;y++)if(a.binIndex[y])for(const x of a.binIndex[y])l.push(new Au(x.minv,x.maxv,y));const f=a.linearIndex.length;let d;const h=Math.min(t>>14,f-1),p=Math.min(r>>14,f-1);for(let m=h;m<=p;++m){const g=a.linearIndex[m];g&&(!d||g.compareTo(d)<0)&&(d=g)}return Ub(l,d)}}class D7{constructor({path:e,filehandle:t,url:r,tbiPath:i,tbiUrl:s,tbiFilehandle:o,csiPath:a,csiUrl:c,csiFilehandle:u,renameRefSeqs:l=d=>d,chunkCacheSize:f=5*2**20}){if(this.cache=new Vr({maxSize:1e3}),t)this.filehandle=t;else if(e)this.filehandle=new qe(e);else if(r)this.filehandle=new Yt(r);else throw new TypeError("must provide either filehandle or path");if(o)this.index=new Xi({filehandle:o,renameRefSeqs:l});else if(u)this.index=new wu({filehandle:u,renameRefSeqs:l});else if(i)this.index=new Xi({filehandle:new qe(i),renameRefSeqs:l});else if(a)this.index=new wu({filehandle:new qe(a),renameRefSeqs:l});else if(e)this.index=new Xi({filehandle:new qe(`${e}.tbi`),renameRefSeqs:l});else if(c)this.index=new wu({filehandle:new Yt(c)});else if(s)this.index=new Xi({filehandle:new Yt(s)});else if(r)this.index=new Xi({filehandle:new Yt(`${r}.tbi`)});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.renameRefSeq=l,this.chunkCache=new _i({cache:new Vr({maxSize:Math.floor(f/65536)}),fill:(d,h)=>this.readChunk(d,{signal:h})})}calculateFileOffset(e,t,r,i,s){return e[r]*256+(i-t[r])+s+1}async getLines(e,t,r,i){let s,o={},a;typeof i=="function"?a=i:(o=i,a=i.lineCallback,s=i.signal);const c=await this.index.getMetadata(o);Jo(s);const u=t??0,l=r??c.maxRefLength;if(!(u<=l))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(u===l)return;const f=await this.index.blocksForRange(e,u,l,o);Jo(s);const d=new TextDecoder("utf8");for(const h of f){const{buffer:p,cpositions:m,dpositions:g}=await this.chunkCache.get(h.toString(),h,s);Jo(s);let y=0,x=0;const A=d.decode(p);if(p.length==A.length)for(;y<A.length;){const S=A.indexOf(`
|
|
883
|
+
`,y);if(S===-1)break;const C=A.slice(y,S);if(g){const P=y+h.minv.dataPosition;for(;x<g.length&&P>=g[x];)x++}const{startCoordinate:v,overlaps:T}=this.checkLine(c,e,u,l,C);if(T)a(C,this.calculateFileOffset(m,g,x,y,h.minv.dataPosition));else if(v!==void 0&&v>=l)return;y=S+1}else for(;y<p.length;){const S=p.indexOf(10,y);if(S===-1)break;const C=p.slice(y,S),v=d.decode(C);if(g){const F=y+h.minv.dataPosition;for(;x<g.length&&F>=g[x];)x++}const{startCoordinate:T,overlaps:P}=this.checkLine(c,e,u,l,v);if(P)a(v,this.calculateFileOffset(m,g,x,y,h.minv.dataPosition));else if(T!==void 0&&T>=l)return;y=S+1}}}async getMetadata(e={}){return this.index.getMetadata(e)}async getHeaderBuffer(e={}){const{firstDataLine:t,metaChar:r,maxBlockSize:i}=await this.getMetadata(e);Jo(e.signal);const s=((t==null?void 0:t.blockPosition)||0)+i,o=await this.filehandle.read(s,0,e),a=await $h(o);if(r){let c=-1;const u=10,l=r.charCodeAt(0);for(let f=0,d=a.length;f<d;f++){const h=a[f];if(f===c+1&&h!==l)break;h===u&&(c=f)}return a.subarray(0,c+1)}return a}async getHeader(e={}){const t=new TextDecoder("utf8"),r=await this.getHeaderBuffer(e);return t.decode(r)}async getReferenceSequenceNames(e={}){return(await this.getMetadata(e)).refIdToName}checkLine(e,t,r,i,s){const{columnNumbers:o,metaChar:a,coordinateType:c,format:u}=e;if(a&&s.startsWith(a))return{overlaps:!1};let{ref:l,start:f,end:d}=o;l||(l=0),f||(f=0),d||(d=0),u==="VCF"&&(d=8);const h=Math.max(l,f,d);let p=1,m=0,g="",y=-1/0;const x=s.length;for(let A=0;A<x+1;A++)if(s[A]===" "||A===x){if(p===l){if(this.renameRefSeq(s.slice(m,A))!==t)return{overlaps:!1}}else if(p===f){if(y=Number.parseInt(s.slice(m,A),10),c==="1-based-closed"&&(y-=1),y>=i)return{startCoordinate:y,overlaps:!1};if((d===0||d===f)&&y+1<=r)return{startCoordinate:y,overlaps:!1}}else if(u==="VCF"&&p===4)g=s.slice(m,A);else if(p===d&&(u==="VCF"?this._getVcfEnd(y,g,s.slice(m,A)):Number.parseInt(s.slice(m,A),10))<=r)return{overlaps:!1};if(p===h)break;m=A+1,p+=1}return{startCoordinate:y,overlaps:!0}}_getVcfEnd(e,t,r){let i=e+t.length;const s=r.includes("SVTYPE=TRA");if(r[0]!=="."&&!s){const a=/(?:^|;)END=([^;]+)/.exec(r);a&&(i=Number.parseInt(a[1],10))}else if(s)return e+1;return i}async lineCount(e,t={}){return this.index.lineCount(e,t)}async readChunk(e,t={}){const r=await this.filehandle.read(e.fetchedSize(),e.minv.blockPosition,t);return g7(r,e,this.cache)}}const I7=Object.freeze(Object.defineProperty({__proto__:null,CSI:wu,TBI:Xi,TabixIndexedFile:D7},Symbol.toStringTag,{value:"Module"})),T7=/%([0-9A-Fa-f]{2})/g,B7=/^\s*##\s*(\S+)\s*(.*)/,k7=/\r?\n$/,Vb=/\s+/,_b=/\D/g;function vu(n){return n.includes("%")?n.replaceAll(T7,(e,t)=>String.fromCharCode(parseInt(t,16))):n}function F7(n){if(!n.length||n===".")return{};const e={};let t=n;t.endsWith(`
|
|
884
|
+
`)&&(t=t.slice(0,t.endsWith(`\r
|
|
885
|
+
`)?-2:-1));for(const r of t.split(";")){const i=r.indexOf("=");if(i===-1)continue;const s=r.slice(i+1);if(!s.length)continue;const o=r.slice(0,i).trim();let a=e[o];a||(a=[],e[o]=a);for(const c of s.split(","))a.push(vu(c.trim()))}return e}function P7(n){return jb(n.split(" "))}function pn(n){return n==="."||n===""||n===void 0?null:n}function jb(n){const e=pn(n[0]),t=pn(n[1]),r=pn(n[2]),i=pn(n[3]),s=pn(n[4]),o=pn(n[5]),a=pn(n[6]),c=pn(n[7]),u=pn(n[8]);return{seq_id:e?vu(e):null,source:t?vu(t):null,type:r?vu(r):null,start:i===null?null:parseInt(i,10),end:s===null?null:parseInt(s,10),score:o===null?null:parseFloat(o),strand:a,phase:c,attributes:u===null?null:F7(u)}}function M7(n){var s,o;const e=B7.exec(n);if(!e)return null;const[,t]=e;let[,,r]=e;const i={directive:t};if(r.length&&(r=r.replace(k7,""),i.value=r),t==="sequence-region"){const a=r.split(Vb,3);return{...i,seq_id:a[0],start:(s=a[1])==null?void 0:s.replaceAll(_b,""),end:(o=a[2])==null?void 0:o.replaceAll(_b,"")}}else if(t==="genome-build"){const[a,c]=r.split(Vb,2);return{...i,source:a,buildName:c}}return i}const R7=/^\s*[^#\s>]/,O7=/^\s*(#+)(.*)/,N7=/^\s*$/,L7=/^\s*>/,z7=/\r?\n?$/g;class td{constructor(e){Y(this,"featureCallback");Y(this,"endCallback");Y(this,"commentCallback");Y(this,"errorCallback");Y(this,"disableDerivesFromReferences");Y(this,"directiveCallback");Y(this,"bufferSize");Y(this,"eof",!1);Y(this,"lineNumber",0);Y(this,"_underConstructionTopLevel",[]);Y(this,"_underConstructionById",{});Y(this,"_completedReferences",{});Y(this,"_underConstructionOrphans",{});const t=()=>{};this.featureCallback=e.featureCallback||t,this.endCallback=e.endCallback||t,this.commentCallback=e.commentCallback||t,this.errorCallback=e.errorCallback||t,this.directiveCallback=e.directiveCallback||t,this.disableDerivesFromReferences=e.disableDerivesFromReferences||!1,this.bufferSize=e.bufferSize===void 0?1/0:e.bufferSize}addLine(e){if(this.eof)return;if(this.lineNumber+=1,R7.test(e)){this._bufferLine(e);return}const t=O7.exec(e);if(t){const[,r]=t;let[,,i]=t;if(r.length===3)this._emitAllUnderConstructionFeatures();else if(r.length===2){const s=M7(e);s&&(s.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0):this._emitItem(s))}else this._emitItem({comment:i.trimStart()})}else if(!N7.test(e))if(L7.test(e))this._emitAllUnderConstructionFeatures(),this.eof=!0;else{const r=e.replaceAll(z7,"");throw new Error(`GFF3 parse error. Cannot parse '${r}'.`)}}addParsedFeatureLine(e){this.eof||(this.lineNumber+=1,this._bufferParsedLine(e))}finish(){this._emitAllUnderConstructionFeatures(),this.endCallback()}_emitItem(e){Array.isArray(e)?this.featureCallback(e):"directive"in e?this.directiveCallback(e):"comment"in e&&this.commentCallback(e)}_enforceBufferSizeLimit(e=0){const t=r=>{var i,s;r&&Array.isArray(r)&&((s=(i=r[0].attributes)==null?void 0:i.ID)!=null&&s[0])&&(r[0].attributes.ID.forEach(a=>{delete this._underConstructionById[a],delete this._completedReferences[a]}),r.forEach(a=>{a.child_features&&a.child_features.forEach(c=>{t(c)}),a.derived_features&&a.derived_features.forEach(c=>{t(c)})}))};for(;this._underConstructionTopLevel.length+e>this.bufferSize;){const r=this._underConstructionTopLevel.shift();r&&(this._emitItem(r),t(r))}}_emitAllUnderConstructionFeatures(){this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={};const e=Object.keys(this._underConstructionOrphans);if(e.length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${e.join(",")}`)}_bufferLine(e){this._bufferParsedLine(P7(e))}_bufferParsedLine(e){var a,c,u;const t=e;t.child_features=[],t.derived_features=[];const r=((a=t.attributes)==null?void 0:a.ID)||[],i=((c=t.attributes)==null?void 0:c.Parent)||[],s=this.disableDerivesFromReferences?[]:((u=t.attributes)==null?void 0:u.Derives_from)||[];if(!r.length&&!i.length&&!s.length){this._emitItem([t]);return}let o;r.forEach(l=>{const f=this._underConstructionById[l];f?(f[f.length-1].type!==t.type&&this._parseError(`multi-line feature "${l}" has inconsistent types: "${t.type}", "${f[f.length-1].type}"`),f.push(t),o=f):(o=[t],this._enforceBufferSizeLimit(1),!i.length&&!s.length&&this._underConstructionTopLevel.push(o),this._underConstructionById[l]=o,this._resolveReferencesTo(o,l))}),this._resolveReferencesFrom(o||[t],{Parent:i,Derives_from:s},r)}_resolveReferencesTo(e,t){const r=this._underConstructionOrphans[t];if(r){for(const i of e)i.child_features.push(...r.Parent),i.derived_features.push(...r.Derives_from);delete this._underConstructionOrphans[t]}}_parseError(e){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${e}`)}_resolveReferencesFrom(e,t,r){for(const i of t.Parent){const s=this._underConstructionById[i];if(s){let o=!1;for(const a of r){const c=`Parent,${i}`,u=this._completedReferences[a]||(this._completedReferences[a]={});u[c]&&(o=!0),u[c]=!0}if(!o)for(const a of s)a.child_features.push(e)}else{let o=this._underConstructionOrphans[i];o||(o={Parent:[],Derives_from:[]},this._underConstructionOrphans[i]=o),o.Parent.push(e)}}for(const i of t.Derives_from){const s=this._underConstructionById[i];if(s){let o=!1;for(const a of r){const c=`Derives_from,${i}`,u=this._completedReferences[a]||(this._completedReferences[a]={});u[c]&&(o=!0),u[c]=!0}if(!o)for(const a of s)a.derived_features.push(e)}else{let o=this._underConstructionOrphans[i];o||(o={Parent:[],Derives_from:[]},this._underConstructionOrphans[i]=o),o.Derives_from.push(e)}}}}function U7(n){const e=[],t=new td({featureCallback:r=>e.push(r),disableDerivesFromReferences:!0,errorCallback:r=>{throw new Error(r)}});for(const r of n.split(/\r?\n/))t.addLine(r);return t.finish(),e}function G7(n){const e=[],t=new td({featureCallback:r=>e.push(r),disableDerivesFromReferences:!0,errorCallback:r=>{throw new Error(r)}});for(const r of n)t.addLine(r);return t.finish(),e}function H7(n){const e=[],t=new td({featureCallback:r=>e.push(r),disableDerivesFromReferences:!0,errorCallback:r=>{throw new Error(r)}});for(const r of n){const i=jb(r.fields);r.lineHash!==void 0&&(i.attributes||(i.attributes={}),i.attributes._lineHash=[String(r.lineHash)]),t.addParsedFeatureLine(i)}return t.finish(),e}const V7=Object.freeze(Object.defineProperty({__proto__:null,parseArraySync:G7,parseRecordsSync:H7,parseStringSync:U7},Symbol.toStringTag,{value:"Module"}));function _7(n,e,t){const r=Object.create(null),i=t.length,s=e.length,o=9,a=58;let c=0;if(n==="GT"){for(let f=0;f<i;f++){const d=c;for(;c<s&&e.charCodeAt(c)!==o;)c++;r[t[f]]=e.slice(d,c),c++}return r}const u=n.indexOf("GT");if(u===-1)return r;if(u===0){for(let f=0;f<i;f++){const d=c;for(;c<s&&e.charCodeAt(c)!==a&&e.charCodeAt(c)!==o;)c++;for(r[t[f]]=e.slice(d,c);c<s&&e.charCodeAt(c)!==o;)c++;c++}return r}let l=0;for(let f=0;f<u;f++)n.charCodeAt(f)===a&&l++;for(let f=0;f<i;f++){const d=c;let h=c;for(;h<s&&e.charCodeAt(h)!==o;)h++;let p=0,m=d;for(let g=d;g<=h;g++)if(g===h||e.charCodeAt(g)===a){if(p===l){r[t[f]]=e.slice(m,g);break}p++,m=g+1}c=h+1}return r}function j7(n){const e=[],t=[];let r=!1,i=!1;const s=n.length;for(let o=0;o<s;o++){const a=n[o];a==='"'?(r=!r,t.push(a)):a==="["?(i=!0,t.push(a)):a==="]"?(i=!1,t.push(a)):a===","&&!r&&!i?(e.push(t.join("").trim()),t.length=0):t.push(a)}return t.length>0&&e.push(t.join("").trim()),e}function Q7(n,e){const t=n.indexOf(e);return[n.slice(0,t),n.slice(t+1)]}function W7(n){const e=n.slice(1,-1),t=j7(e),r=[];for(let i=0;i<t.length;i++){const s=t[i],[o,a]=Q7(s,"=");if(a&&a.startsWith("[")&&a.endsWith("]")){const c=a.slice(1,-1).split(",");for(let u=0;u<c.length;u++)c[u]=c[u].trim();r.push([o,c])}else a&&a.startsWith('"')&&a.endsWith('"')?r.push([o,a.slice(1,-1)]):r.push([o,a])}return Object.fromEntries(r)}const Su={InfoFields:{AA:{Number:1,Type:"String",Description:"Ancestral allele"},AC:{Number:"A",Type:"Integer",Description:"Allele count in genotypes, for each ALT allele, in the same order as listed"},AD:{Number:"R",Type:"Integer",Description:"Total read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},AF:{Number:"A",Type:"Float",Description:"Allele frequency for each ALT allele in the same order as listed (estimated from primary data, not called genotypes)"},AN:{Number:1,Type:"Integer",Description:"Total number of alleles in called genotypes"},BQ:{Number:1,Type:"Float",Description:"RMS base quality"},CIGAR:{Number:1,Type:"Float",Description:"Cigar string describing how to align an alternate allele to the reference allele"},DB:{Number:0,Type:"Flag",Description:"dbSNP membership"},DP:{Number:1,Type:"Integer",Description:"combined depth across samples"},END:{Number:1,Type:"Integer",Description:"End position (for use with symbolic alleles)"},H2:{Number:0,Type:"Flag",Description:"HapMap2 membership"},H3:{Number:0,Type:"Flag",Description:"HapMap3 membership"},MQ:{Number:1,Type:null,Description:"RMS mapping quality"},MQ0:{Number:1,Type:"Integer",Description:"Number of MAPQ == 0 reads"},NS:{Number:1,Type:"Integer",Description:"Number of samples with data"},SB:{Number:4,Type:"Integer",Description:"Strand bias"},SOMATIC:{Number:0,Type:"Flag",Description:"Somatic mutation (for cancer genomics)"},VALIDATED:{Number:0,Type:"Flag",Description:"Validated by follow-up experiment"},"1000G":{Number:0,Type:"Flag",Description:"1000 Genomes membership"},IMPRECISE:{Number:0,Type:"Flag",Description:"Imprecise structural variation"},NOVEL:{Number:0,Type:"Flag",Description:"Indicates a novel structural variation"},SVTYPE:{Number:1,Type:"String",Description:"Type of structural variant"},SVLEN:{Number:null,Type:"Integer",Description:"Difference in length between REF and ALT alleles"},CIPOS:{Number:2,Type:"Integer",Description:"Confidence interval around POS for imprecise variants"},CIEND:{Number:2,Type:"Integer",Description:"Confidence interval around END for imprecise variants"},HOMLEN:{Type:"Integer",Description:"Length of base pair identical micro-homology at event breakpoints"},HOMSEQ:{Type:"String",Description:"Sequence of base pair identical micro-homology at event breakpoints"},BKPTID:{Type:"String",Description:"ID of the assembled alternate allele in the assembly file"},MEINFO:{Number:4,Type:"String",Description:"Mobile element info of the form NAME,START,END,POLARITY"},METRANS:{Number:4,Type:"String",Description:"Mobile element transduction info of the form CHR,START,END,POLARITY"},DGVID:{Number:1,Type:"String",Description:"ID of this element in Database of Genomic Variation"},DBVARID:{Number:1,Type:"String",Description:"ID of this element in DBVAR"},DBRIPID:{Number:1,Type:"String",Description:"ID of this element in DBRIP"},MATEID:{Number:null,Type:"String",Description:"ID of mate breakends"},PARID:{Number:1,Type:"String",Description:"ID of partner breakend"},EVENT:{Number:1,Type:"String",Description:"ID of event associated to breakend"},CILEN:{Number:2,Type:"Integer",Description:"Confidence interval around the inserted material between breakend"},DPADJ:{Type:"Integer",Description:"Read Depth of adjacency"},CN:{Number:1,Type:"Integer",Description:"Copy number of segment containing breakend"},CNADJ:{Number:null,Type:"Integer",Description:"Copy number of adjacency"},CICN:{Number:2,Type:"Integer",Description:"Confidence interval around copy number for the segment"},CICNADJ:{Number:null,Type:"Integer",Description:"Confidence interval around copy number for the adjacency"}},GenotypeFields:{AD:{Number:"R",Type:"Integer",Description:"Read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},DP:{Number:1,Type:"Integer",Description:"Read depth"},EC:{Number:"A",Type:"Integer",Description:"Expected alternate allele counts"},FT:{Number:1,Type:"String",Description:'Filter indicating if this genotype was "called"'},GL:{Number:"G",Type:"Float",Description:"Genotype likelihoods"},GP:{Number:"G",Type:"Float",Description:"Genotype posterior probabilities"},GQ:{Number:1,Type:"Integer",Description:"Conditional genotype quality"},GT:{Number:1,Type:"String",Description:"Genotype"},HQ:{Number:2,Type:"Integer",Description:"Haplotype quality"},MQ:{Number:1,Type:"Integer",Description:"RMS mapping quality"},PL:{Number:"G",Type:"Integer",Description:"Phred-scaled genotype likelihoods rounded to the closest integer"},PQ:{Number:1,Type:"Integer",Description:"Phasing quality"},PS:{Number:1,Type:"Integer",Description:"Phase set"}},AltTypes:{DEL:{Description:"Deletion relative to the reference"},INS:{Description:"Insertion of novel sequence relative to the reference"},DUP:{Description:"Region of elevated copy number relative to the reference"},INV:{Description:"Inversion of reference sequence"},CNV:{Description:"Copy number variable region (may be both deletion and duplication)"},"DUP:TANDEM":{Description:"Tandem duplication"},"DEL:ME":{Description:"Deletion of mobile element relative to the reference"},"INS:ME":{Description:"Insertion of a mobile element relative to the reference"},NON_REF:{Description:"Represents any possible alternative allele at this location"},"*":{Description:"Represents any possible alternative allele at this location"}},FilterTypes:{PASS:{Description:"Passed all filters"}}};function q7(n){try{return decodeURIComponent(n)}catch{return n}}class Y7{constructor({header:e="",strict:t=!0}){if(!e.length)throw new Error("empty header received");const r=e.split(/[\r\n]+/).filter(Boolean);if(!r.length)throw new Error("no non-empty header lines specified");this.strict=t,this.metadata={INFO:{...Su.InfoFields},FORMAT:{...Su.GenotypeFields},ALT:{...Su.AltTypes},FILTER:{...Su.FilterTypes}};let i;for(let c=0;c<r.length;c++){const u=r[c];if(u.startsWith("#"))u.startsWith("##")?this.parseMetadata(u):i=u;else throw new Error(`Bad line in header:
|
|
886
|
+
${u}`)}if(!i)throw new Error("No format line found in header");const s=i.trim().split(" "),o=s.slice(0,8),a=["#CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO"];if(s.length<8)throw new Error(`VCF header missing columns:
|
|
887
|
+
${i}`);if(o.length!==a.length||!o.every((c,u)=>c===a[u]))throw new Error(`VCF column headers not correct:
|
|
888
|
+
${i}`);this.samples=s.slice(9)}parseInfo(e){var a;const t={},r=e.includes("%"),i=e.split(";"),s=this.metadata.INFO,o=i.length;for(let c=0;c<o;c++){const u=i[c],l=u.indexOf("="),f=l===-1?u:u.slice(0,l),d=l===-1?void 0:u.slice(l+1),h=(a=s[f])==null?void 0:a.Type;if(h==="Flag")t[f]=!0;else if(!d)t[f]=!0;else{const p=h==="Integer"||h==="Float",m=d.split(","),g=m.length;if(r){const y=[];for(let x=0;x<g;x++){const A=m[x];if(A===".")y.push(void 0);else{const w=q7(A);y.push(p?Number(w):w)}}t[f]=y}else{const y=[];for(let x=0;x<g;x++){const A=m[x];A==="."?y.push(void 0):y.push(p?Number(A):A)}t[f]=y}}}return t}parseSamples(e,t){var i;const r={};if(e){const s=t.split(" "),o=e.split(":"),a=this.metadata.FORMAT,c=[];for(let f=0;f<o.length;f++){const d=(i=a[o[f]])==null?void 0:i.Type;c.push(d==="Integer"||d==="Float")}const u=o.length,l=this.samples.length;for(let f=0;f<l;f++){const d=this.samples[f],h={},p=s[f],m=p.length;let g=0,y=0;for(let x=0;x<=m;x++)if(x===m||p[x]===":"){const A=p.slice(g,x);if(A===""||A===".")h[o[y]]=void 0;else{const w=A.split(","),S=[];if(c[y])for(let C=0;C<w.length;C++){const v=w[C];S.push(v==="."?void 0:+v)}else for(let C=0;C<w.length;C++){const v=w[C];S.push(v==="."?void 0:v)}h[o[y]]=S}if(g=x+1,y+=1,y>=u)break}r[d]=h}}return r}parseMetadata(e){const t=/^##(.+?)=(.*)/.exec(e.trim());if(!t)throw new Error(`Line is not a valid metadata line: ${e}`);const[r,i]=t.slice(1,3),s=r;if(i!=null&&i.startsWith("<")){s in this.metadata||(this.metadata[s]={});const[o,a]=this.parseStructuredMetaVal(i);o?this.metadata[s][o]=a:this.metadata[s]=a}else this.metadata[s]=i}parseStructuredMetaVal(e){const t=W7(e),r=t.ID;return delete t.ID,"Number"in t&&(Number.isNaN(Number(t.Number))||(t.Number=Number(t.Number))),[r,t]}getMetadata(...e){let t=this.metadata;const r=e.length;for(let i=0;i<r;i++)if(t=t[e[i]],!t)return t;return t}parseLine(e){let t=0,r=0;for(;t<e.length&&r<9;)e[t]===" "&&(r+=1),t+=1;const i=r===9?t-1:t,s=e.slice(0,i).split(" "),o=e.slice(i+1),[a,c,u,l,f,d,h]=s,p=a,m=+c,g=u==="."?void 0:u.split(";"),y=l,x=f==="."?void 0:f.split(","),A=d==="."?void 0:+d,w=h==="."?void 0:h.split(";"),S=s[8];if(this.strict&&!s[7])throw new Error("no INFO field specified, must contain at least a '.' (turn off strict mode to allow)");const C=s[7]===void 0||s[7]==="."?{}:this.parseInfo(s[7]);return{CHROM:p,POS:m,ALT:x,INFO:C,REF:y,FILTER:(w==null?void 0:w.length)===1&&w[0]==="PASS"?"PASS":w,ID:g,QUAL:A,FORMAT:S,SAMPLES:()=>this.parseSamples(s[8]??"",o),GENOTYPES:()=>_7(s[8]??"",o,this.samples)}}}const X7=Object.freeze(Object.defineProperty({__proto__:null,default:Y7},Symbol.toStringTag,{value:"Module"}));$.GenomeSpy=jy,$.embed=WT,$.favIcon=QT,$.html=ye,$.icon=jT,$.loadSpec=Qy,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})});
|