@genome-spy/core 0.59.0 → 0.60.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.es.js +6170 -5616
- package/dist/bundle/index.js +144 -119
- package/dist/schema.json +304 -22
- package/dist/src/data/collector.d.ts.map +1 -1
- package/dist/src/data/collector.js +1 -0
- package/dist/src/data/sources/dataUtils.d.ts +2 -1
- package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
- package/dist/src/data/sources/dataUtils.js +3 -4
- package/dist/src/data/sources/inlineSource.d.ts +8 -0
- package/dist/src/data/sources/inlineSource.d.ts.map +1 -1
- package/dist/src/data/sources/inlineSource.js +17 -1
- package/dist/src/data/sources/urlSource.d.ts +1 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +33 -4
- package/dist/src/encoder/encoder.d.ts +1 -1
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +39 -6
- package/dist/src/gl/colorUtils.d.ts +4 -0
- package/dist/src/gl/colorUtils.d.ts.map +1 -1
- package/dist/src/gl/colorUtils.js +8 -0
- package/dist/src/gl/glslScaleGenerator.d.ts +1 -1
- package/dist/src/gl/glslScaleGenerator.d.ts.map +1 -1
- package/dist/src/gl/glslScaleGenerator.js +1 -9
- package/dist/src/gl/includes/common.glsl.js +1 -1
- package/dist/src/marks/link.d.ts.map +1 -1
- package/dist/src/marks/link.js +8 -0
- package/dist/src/marks/mark.d.ts +8 -0
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +101 -3
- package/dist/src/marks/point.fragment.glsl.js +1 -1
- package/dist/src/marks/point.vertex.glsl.js +1 -1
- package/dist/src/marks/rect.common.glsl.js +1 -1
- package/dist/src/marks/rect.d.ts.map +1 -1
- package/dist/src/marks/rect.fragment.glsl.js +1 -1
- package/dist/src/marks/rect.js +41 -0
- package/dist/src/marks/rect.vertex.glsl.js +1 -1
- package/dist/src/selection/selection.d.ts +27 -2
- package/dist/src/selection/selection.d.ts.map +1 -1
- package/dist/src/selection/selection.js +53 -3
- package/dist/src/spec/data.d.ts +18 -1
- package/dist/src/spec/mark.d.ts +58 -1
- package/dist/src/spec/parameter.d.ts +71 -31
- package/dist/src/spec/view.d.ts +9 -2
- package/dist/src/styles/genome-spy.css.d.ts +1 -1
- package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
- package/dist/src/styles/genome-spy.css.js +12 -1
- package/dist/src/styles/genome-spy.scss +19 -1
- package/dist/src/types/selectionTypes.d.ts +4 -7
- package/dist/src/utils/expression.d.ts.map +1 -1
- package/dist/src/utils/expression.js +4 -0
- package/dist/src/utils/ui/tooltip.d.ts +6 -10
- package/dist/src/utils/ui/tooltip.d.ts.map +1 -1
- package/dist/src/utils/ui/tooltip.js +74 -42
- package/dist/src/view/concatView.d.ts +1 -1
- package/dist/src/view/concatView.d.ts.map +1 -1
- package/dist/src/view/concatView.js +1 -1
- package/dist/src/view/gridView/gridChild.d.ts +53 -0
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -0
- package/dist/src/view/gridView/gridChild.js +753 -0
- package/dist/src/view/gridView/gridView.d.ts +64 -0
- package/dist/src/view/gridView/gridView.d.ts.map +1 -0
- package/dist/src/view/{gridView.js → gridView/gridView.js} +40 -595
- package/dist/src/view/gridView/scrollbar.d.ts +32 -0
- package/dist/src/view/gridView/scrollbar.d.ts.map +1 -0
- package/dist/src/view/gridView/scrollbar.js +186 -0
- package/dist/src/view/gridView/selectionRect.d.ts +10 -0
- package/dist/src/view/gridView/selectionRect.d.ts.map +1 -0
- package/dist/src/view/gridView/selectionRect.js +182 -0
- package/dist/src/view/layout/rectangle.d.ts +11 -1
- package/dist/src/view/layout/rectangle.d.ts.map +1 -1
- package/dist/src/view/layout/rectangle.js +22 -2
- package/dist/src/view/layout/rectangle.test.js +12 -0
- package/dist/src/view/paramMediator.d.ts.map +1 -1
- package/dist/src/view/paramMediator.js +9 -0
- package/dist/src/view/scaleResolution.d.ts +1 -0
- package/dist/src/view/scaleResolution.d.ts.map +1 -1
- package/dist/src/view/scaleResolution.js +43 -33
- package/dist/src/view/view.d.ts +6 -0
- package/dist/src/view/view.d.ts.map +1 -1
- package/dist/src/view/view.js +19 -0
- package/dist/src/view/viewFactory.d.ts.map +1 -1
- package/dist/src/view/viewFactory.js +13 -1
- package/package.json +2 -2
- package/dist/src/view/gridView.d.ts +0 -135
- package/dist/src/view/gridView.d.ts.map +0 -1
package/dist/bundle/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ze,Ye){typeof exports=="object"&&typeof module<"u"?Ye(exports):typeof define=="function"&&define.amd?define(["exports"],Ye):(ze=typeof globalThis<"u"?globalThis:ze||self,Ye(ze.genomeSpyEmbed={}))})(this,function(ze){"use strict";var nM=Object.defineProperty;var av=ze=>{throw TypeError(ze)};var rM=(ze,Ye,Je)=>Ye in ze?nM(ze,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ze[Ye]=Je;var Ut=(ze,Ye,Je)=>rM(ze,typeof Ye!="symbol"?Ye+"":Ye,Je),d0=(ze,Ye,Je)=>Ye.has(ze)||av("Cannot "+Je);var W=(ze,Ye,Je)=>(d0(ze,Ye,"read from private field"),Je?Je.call(ze):Ye.get(ze)),ge=(ze,Ye,Je)=>Ye.has(ze)?av("Cannot add the same private member more than once"):Ye instanceof WeakSet?Ye.add(ze):Ye.set(ze,Je),Te=(ze,Ye,Je,Ni)=>(d0(ze,Ye,"write to private field"),Ni?Ni.call(ze,Je):Ye.set(ze,Je),Je),de=(ze,Ye,Je)=>(d0(ze,Ye,"access private method"),Je);var cv=(ze,Ye,Je,Ni)=>({set _(gu){Te(ze,Ye,gu,Je)},get _(){return W(ze,Ye,Ni)}});var ev,ir,Mo,Ti,Di,Po,Fa,jt,Nr,Lo,Bi,ec,Ma,zr,ki,Oo,No,Pa,La,zo,lv,uv,Tn,Ur,p0,g0,Uo,au,fv,Go,Jt,Oa,Na,Pe,m0,b0,fr,y0,hv,dv,w0,x0,hu,v0,Li,pv,gv,za,A0,Ho,Vo,qo,Ua,Ga,qn,tc,E0,Ha,cu,mv,or,Va,Gr,_i,nn,S0,C0,I0,bv,qa,T0,lu,yv,jo,Wo,Yo,ja,Qo,Zo,Wa,D0,Ya,B0,Ri,Xo,Qa,Za,Ko,Xa,Ka,sr,Fi,Hr,Vr,Jo,Ja,qr,Mi,uu,wv,$o,es,rn,Pi,ts,He,Oi,xv,nc,k0,_0,R0,vv,du,Av,ns,mn,pu,Ev,Sv,Cv;function Ye(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Je(t,e,n){return t.fields=e||[],t.fname=n,t}function Ni(t){return t==null?null:t.fname}function gu(t){return t==null?null:t.fields}function Iv(t){return t.length===1?Tv(t[0]):Dv(t)}const Tv=t=>function(e){return e[t]},Dv=t=>{const e=t.length;return function(n){for(let r=0;r<e;++r)n=n[t[r]];return n}};function mt(t){throw Error(t)}function Bv(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||mt("Access path missing open bracket: "+t),o>0&&l(),o=0,s=a+1)}return o&&mt("Access path missing closing bracket: "+t),r&&mt("Access path missing closing quote: "+t),a>s&&(a++,l()),e}function rc(t,e,n){const r=Bv(t);return t=r.length===1?r[0]:t,Je((n&&n.get||Iv)(r),[t],e||t)}rc("id");const ic=Je(t=>t,[],"identity");Je(()=>0,[],"zero"),Je(()=>1,[],"one"),Je(()=>!0,[],"true"),Je(()=>!1,[],"false");var Dt=Array.isArray;function Ft(t){return t===Object(t)}function wn(t){return t[t.length-1]}function rs(t){return t==null||t===""?null:+t}const F0=t=>e=>t*Math.exp(e),M0=t=>e=>Math.log(t*e),kv=t=>e=>Math.sign(e)*Math.log1p(Math.abs(e/t)),_v=t=>e=>Math.sign(e)*Math.expm1(Math.abs(e))*t,oc=t=>e=>e<0?-Math.pow(-e,t):Math.pow(e,t);function mu(t,e,n,r){const o=n(t[0]),i=n(wn(t)),s=(i-o)*e;return[r(o-s),r(i-s)]}function Rv(t,e){return mu(t,e,rs,ic)}function Fv(t,e){var n=Math.sign(t[0]);return mu(t,e,M0(n),F0(n))}function Mv(t,e,n){return mu(t,e,oc(n),oc(1/n))}function sc(t,e,n,r,o){const i=r(t[0]),s=r(wn(t)),a=e!=null?r(e):(i+s)/2;return[o(a+(i-a)*n),o(a+(s-a)*n)]}function P0(t,e,n){return sc(t,e,n,rs,ic)}function L0(t,e,n){const r=Math.sign(t[0]);return sc(t,e,n,M0(r),F0(r))}function bu(t,e,n,r){return sc(t,e,n,oc(r),oc(1/r))}function Pv(t,e,n,r){return sc(t,e,n,kv(r),_v(r))}function yu(t){return t!=null?Dt(t)?t:[t]:[]}function Lv(t,e,n){let r=t[0],o=t[1],i;return o<r&&(i=o,o=r,r=i),i=o-r,i>=n-e?[e,n]:[r=Math.min(Math.max(r,e),n-i),r+i]}function sn(t){return typeof t=="function"}const Ov="descending";function O0(t,e,n){n=n||{},e=yu(e)||[];const r=[],o=[],i={},s=n.comparator||Nv;return yu(t).forEach((a,c)=>{a!=null&&(r.push(e[c]===Ov?-1:1),o.push(a=sn(a)?a:rc(a,null,n)),(gu(a)||[]).forEach(l=>i[l]=1))}),o.length===0?null:Je(s(o,r),Object.keys(i))}const N0=(t,e)=>(t<e||t==null)&&e!=null?-1:(t>e||e==null)&&t!=null?1:(e=e instanceof Date?+e:e,(t=t instanceof Date?+t:t)!==t&&e===e?-1:e!==e&&t===t?1:0),Nv=(t,e)=>t.length===1?zv(t[0],e[0]):Uv(t,e,t.length),zv=(t,e)=>function(n,r){return N0(t(n),t(r))*e},Uv=(t,e,n)=>(e.push(0),function(r,o){let i,s=0,a=-1;for(;s===0&&++a<n;)i=t[a],s=N0(i(r),i(o));return s*e[a]});function Gv(t){for(let e,n,r=1,o=arguments.length;r<o;++r){e=arguments[r];for(n in e)t[n]=e[n]}return t}const Hv=Object.prototype.hasOwnProperty;function zi(t,e){return Hv.call(t,e)}function is(t){return typeof t=="boolean"}function Vv(t){return Object.prototype.toString.call(t)==="[object Date]"}function qv(t){return t&&sn(t[Symbol.iterator])}function Gt(t){return typeof t=="number"}function jv(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function nt(t){return typeof t=="string"}function z0(t,e){const n=t[0],r=wn(t),o=+e;return o?o===1?r:n+o*(r-n):n}function ac(t){return t&&wn(t)-t[0]||0}function wu(t){return Dt(t)?"["+t.map(wu)+"]":Ft(t)||nt(t)?JSON.stringify(t).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):t}function Wv(t){return t==null||t===""?null:!t||t==="false"||t==="0"?!1:!!t}const Yv=t=>Gt(t)||Vv(t)?t:Date.parse(t);function Qv(t,e){return e=e||Yv,t==null||t===""?null:e(t)}function Zv(t){return t==null||t===""?null:t+""}function cc(t){const e={},n=t.length;for(let r=0;r<n;++r)e[t[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 lc=globalThis,xu=lc.ShadowRoot&&(lc.ShadyCSS===void 0||lc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,U0=Symbol(),G0=new WeakMap;let Xv=class{constructor(e,n,r){if(this._$cssResult$=!0,r!==U0)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(xu&&e===void 0){const r=n!==void 0&&n.length===1;r&&(e=G0.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&G0.set(n,e))}return e}toString(){return this.cssText}};const Kv=t=>new Xv(typeof t=="string"?t:t+"",void 0,U0),Jv=(t,e)=>{if(xu)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const r=document.createElement("style"),o=lc.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=n.cssText,t.appendChild(r)}},H0=xu?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const r of e.cssRules)n+=r.cssText;return Kv(n)})(t):t;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is
|
|
9
|
+
*/const{is:$v,defineProperty:eA,getOwnPropertyDescriptor:tA,getOwnPropertyNames:nA,getOwnPropertySymbols:rA,getPrototypeOf:iA}=Object,hr=globalThis,V0=hr.trustedTypes,oA=V0?V0.emptyScript:"",vu=hr.reactiveElementPolyfillSupport,os=(t,e)=>t,Au={toAttribute(t,e){switch(e){case Boolean:t=t?oA:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},q0=(t,e)=>!$v(t,e),j0={attribute:!0,type:String,converter:Au,reflect:!1,hasChanged:q0};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),hr.litPropertyMetadata??(hr.litPropertyMetadata=new WeakMap);class Ui 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,n=j0){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(e,n),!n.noAccessor){const r=Symbol(),o=this.getPropertyDescriptor(e,r,n);o!==void 0&&eA(this.prototype,e,o)}}static getPropertyDescriptor(e,n,r){const{get:o,set:i}=tA(this.prototype,e)??{get(){return this[n]},set(s){this[n]=s}};return{get(){return o==null?void 0:o.call(this)},set(s){const a=o==null?void 0:o.call(this);i.call(this,s),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??j0}static _$Ei(){if(this.hasOwnProperty(os("elementProperties")))return;const e=iA(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(os("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(os("properties"))){const n=this.properties,r=[...nA(n),...rA(n)];for(const o of r)this.createProperty(o,n[o])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[r,o]of n)this.elementProperties.set(r,o)}this._$Eh=new Map;for(const[n,r]of this.elementProperties){const o=this._$Eu(n,r);o!==void 0&&this._$Eh.set(o,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const o of r)n.unshift(H0(o))}else e!==void 0&&n.push(H0(e));return n}static _$Eu(e,n){const r=n.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(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(n=>n(this))}addController(e){var n;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)==null||n.call(e))}removeController(e){var n;(n=this._$EO)==null||n.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const r of n.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 Jv(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(n=>{var r;return(r=n.hostConnected)==null?void 0:r.call(n)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(n=>{var r;return(r=n.hostDisconnected)==null?void 0:r.call(n)})}attributeChangedCallback(e,n,r){this._$AK(e,r)}_$EC(e,n){var i;const r=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,r);if(o!==void 0&&r.reflect===!0){const s=(((i=r.converter)==null?void 0:i.toAttribute)!==void 0?r.converter:Au).toAttribute(n,r.type);this._$Em=e,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(e,n){var i;const r=this.constructor,o=r._$Eh.get(e);if(o!==void 0&&this._$Em!==o){const s=r.getPropertyOptions(o),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((i=s.converter)==null?void 0:i.fromAttribute)!==void 0?s.converter:Au;this._$Em=o,this[o]=a.fromAttribute(n,s.type),this._$Em=null}}requestUpdate(e,n,r){if(e!==void 0){if(r??(r=this.constructor.getPropertyOptions(e)),!(r.hasChanged??q0)(this[e],n))return;this.P(e,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,n,r){this._$AL.has(e)||this._$AL.set(e,n),r.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}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[i,s]of this._$Ep)this[i]=s;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[i,s]of o)s.wrapped!==!0||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],s)}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(o=>{var i;return(i=o.hostUpdate)==null?void 0:i.call(o)}),this.update(n)):this._$EU()}catch(o){throw e=!1,this._$EU(),o}e&&this._$AE(n)}willUpdate(e){}_$AE(e){var n;(n=this._$EO)==null||n.forEach(r=>{var o;return(o=r.hostUpdated)==null?void 0:o.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(e){}firstUpdated(e){}}Ui.elementStyles=[],Ui.shadowRootOptions={mode:"open"},Ui[os("elementProperties")]=new Map,Ui[os("finalized")]=new Map,vu==null||vu({ReactiveElement:Ui}),(hr.reactiveElementVersions??(hr.reactiveElementVersions=[])).push("2.0.4");/**
|
|
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 ss=globalThis,uc=ss.trustedTypes,W0=uc?uc.createPolicy("lit-html",{createHTML:t=>t}):void 0,Y0="$lit$",dr=`lit$${Math.random().toFixed(9).slice(2)}$`,Q0="?"+dr,sA=`<${Q0}>`,Qr=document,as=()=>Qr.createComment(""),cs=t=>t===null||typeof t!="object"&&typeof t!="function",Eu=Array.isArray,aA=t=>Eu(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Su=`[
|
|
14
|
+
\f\r]`,ls=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z0=/-->/g,X0=/>/g,Zr=RegExp(`>|${Su}(?:([^\\s"'>=/]+)(${Su}*=${Su}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),K0=/'/g,J0=/"/g,$0=/^(?:script|style|textarea|title)$/i,cA=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),ot=cA(1),Xr=Symbol.for("lit-noChange"),pt=Symbol.for("lit-nothing"),ep=new WeakMap,Kr=Qr.createTreeWalker(Qr,129);function tp(t,e){if(!Eu(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return W0!==void 0?W0.createHTML(e):e}const lA=(t,e)=>{const n=t.length-1,r=[];let o,i=e===2?"<svg>":e===3?"<math>":"",s=ls;for(let a=0;a<n;a++){const c=t[a];let l,u,f=-1,d=0;for(;d<c.length&&(s.lastIndex=d,u=s.exec(c),u!==null);)d=s.lastIndex,s===ls?u[1]==="!--"?s=Z0:u[1]!==void 0?s=X0:u[2]!==void 0?($0.test(u[2])&&(o=RegExp("</"+u[2],"g")),s=Zr):u[3]!==void 0&&(s=Zr):s===Zr?u[0]===">"?(s=o??ls,f=-1):u[1]===void 0?f=-2:(f=s.lastIndex-u[2].length,l=u[1],s=u[3]===void 0?Zr:u[3]==='"'?J0:K0):s===J0||s===K0?s=Zr:s===Z0||s===X0?s=ls:(s=Zr,o=void 0);const h=s===Zr&&t[a+1].startsWith("/>")?" ":"";i+=s===ls?c+sA:f>=0?(r.push(l),c.slice(0,f)+Y0+c.slice(f)+dr+h):c+dr+(f===-2?a:h)}return[tp(t,i+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class us{constructor({strings:e,_$litType$:n},r){let o;this.parts=[];let i=0,s=0;const a=e.length-1,c=this.parts,[l,u]=lA(e,n);if(this.el=us.createElement(l,r),Kr.currentNode=this.el.content,n===2||n===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(o=Kr.nextNode())!==null&&c.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const f of o.getAttributeNames())if(f.endsWith(Y0)){const d=u[s++],h=o.getAttribute(f).split(dr),p=/([.?@])?(.*)/.exec(d);c.push({type:1,index:i,name:p[2],strings:h,ctor:p[1]==="."?fA:p[1]==="?"?hA:p[1]==="@"?dA:fc}),o.removeAttribute(f)}else f.startsWith(dr)&&(c.push({type:6,index:i}),o.removeAttribute(f));if($0.test(o.tagName)){const f=o.textContent.split(dr),d=f.length-1;if(d>0){o.textContent=uc?uc.emptyScript:"";for(let h=0;h<d;h++)o.append(f[h],as()),Kr.nextNode(),c.push({type:2,index:++i});o.append(f[d],as())}}}else if(o.nodeType===8)if(o.data===Q0)c.push({type:2,index:i});else{let f=-1;for(;(f=o.data.indexOf(dr,f+1))!==-1;)c.push({type:7,index:i}),f+=dr.length-1}i++}}static createElement(e,n){const r=Qr.createElement("template");return r.innerHTML=e,r}}function Gi(t,e,n=t,r){var s,a;if(e===Xr)return e;let o=r!==void 0?(s=n._$Co)==null?void 0:s[r]:n._$Cl;const i=cs(e)?void 0:e._$litDirective$;return(o==null?void 0:o.constructor)!==i&&((a=o==null?void 0:o._$AO)==null||a.call(o,!1),i===void 0?o=void 0:(o=new i(t),o._$AT(t,n,r)),r!==void 0?(n._$Co??(n._$Co=[]))[r]=o:n._$Cl=o),o!==void 0&&(e=Gi(t,o._$AS(t,e.values),o,r)),e}class uA{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:n},parts:r}=this._$AD,o=((e==null?void 0:e.creationScope)??Qr).importNode(n,!0);Kr.currentNode=o;let i=Kr.nextNode(),s=0,a=0,c=r[0];for(;c!==void 0;){if(s===c.index){let l;c.type===2?l=new fs(i,i.nextSibling,this,e):c.type===1?l=new c.ctor(i,c.name,c.strings,this,e):c.type===6&&(l=new pA(i,this,e)),this._$AV.push(l),c=r[++a]}s!==(c==null?void 0:c.index)&&(i=Kr.nextNode(),s++)}return Kr.currentNode=Qr,o}p(e){let n=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,n),n+=r.strings.length-2):r._$AI(e[n])),n++}}class fs{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,n,r,o){this.type=2,this._$AH=pt,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=r,this.options=o,this._$Cv=(o==null?void 0:o.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Gi(this,e,n),cs(e)?e===pt||e==null||e===""?(this._$AH!==pt&&this._$AR(),this._$AH=pt):e!==this._$AH&&e!==Xr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):aA(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!==pt&&cs(this._$AH)?this._$AA.nextSibling.data=e:this.T(Qr.createTextNode(e)),this._$AH=e}$(e){var i;const{values:n,_$litType$:r}=e,o=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=us.createElement(tp(r.h,r.h[0]),this.options)),r);if(((i=this._$AH)==null?void 0:i._$AD)===o)this._$AH.p(n);else{const s=new uA(o,this),a=s.u(this.options);s.p(n),this.T(a),this._$AH=s}}_$AC(e){let n=ep.get(e.strings);return n===void 0&&ep.set(e.strings,n=new us(e)),n}k(e){Eu(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let r,o=0;for(const i of e)o===n.length?n.push(r=new fs(this.O(as()),this.O(as()),this,this.options)):r=n[o],r._$AI(i),o++;o<n.length&&(this._$AR(r&&r._$AB.nextSibling,o),n.length=o)}_$AR(e=this._$AA.nextSibling,n){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,n);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var n;this._$AM===void 0&&(this._$Cv=e,(n=this._$AP)==null||n.call(this,e))}}class fc{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,r,o,i){this.type=1,this._$AH=pt,this._$AN=void 0,this.element=e,this.name=n,this._$AM=o,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=pt}_$AI(e,n=this,r,o){const i=this.strings;let s=!1;if(i===void 0)e=Gi(this,e,n,0),s=!cs(e)||e!==this._$AH&&e!==Xr,s&&(this._$AH=e);else{const a=e;let c,l;for(e=i[0],c=0;c<i.length-1;c++)l=Gi(this,a[r+c],n,c),l===Xr&&(l=this._$AH[c]),s||(s=!cs(l)||l!==this._$AH[c]),l===pt?e=pt:e!==pt&&(e+=(l??"")+i[c+1]),this._$AH[c]=l}s&&!o&&this.j(e)}j(e){e===pt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class fA extends fc{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===pt?void 0:e}}class hA extends fc{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==pt)}}class dA extends fc{constructor(e,n,r,o,i){super(e,n,r,o,i),this.type=5}_$AI(e,n=this){if((e=Gi(this,e,n,0)??pt)===Xr)return;const r=this._$AH,o=e===pt&&r!==pt||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,i=e!==pt&&(r===pt||o);o&&this.element.removeEventListener(this.name,this,r),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n;typeof this._$AH=="function"?this._$AH.call(((n=this.options)==null?void 0:n.host)??this.element,e):this._$AH.handleEvent(e)}}let pA=class{constructor(e,n,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Gi(this,e)}};const Cu=ss.litHtmlPolyfillSupport;Cu==null||Cu(us,fs),(ss.litHtmlVersions??(ss.litHtmlVersions=[])).push("3.2.1");const hs=(t,e,n)=>{const r=(n==null?void 0:n.renderBefore)??e;let o=r._$litPart$;if(o===void 0){const i=(n==null?void 0:n.renderBefore)??null;r._$litPart$=o=new fs(e.insertBefore(as(),i),i,void 0,n??{})}return o._$AI(t),o};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/class
|
|
20
|
-
\r]`),n=t.charCodeAt(0);function r(f,
|
|
21
|
-
`)}function a(f,
|
|
19
|
+
*/class hc extends Ui{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;const e=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=e.firstChild),e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=hs(n,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 Xr}}hc._$litElement$=!0,hc.finalized=!0,(ev=globalThis.litElementHydrateSupport)==null||ev.call(globalThis,{LitElement:hc});const Iu=globalThis.litElementPolyfillSupport;Iu==null||Iu({LitElement:hc}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");var np={},Tu={},Du=34,ds=10,Bu=13;function rp(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function gA(t,e){var n=rp(t);return function(r,o){return e(n(r),o,t)}}function ip(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var o in r)o in e||n.push(e[o]=o)}),n}function Wt(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function mA(t){return t<0?"-"+Wt(-t,6):t>9999?"+"+Wt(t,6):Wt(t,4)}function bA(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":mA(t.getUTCFullYear())+"-"+Wt(t.getUTCMonth()+1,2)+"-"+Wt(t.getUTCDate(),2)+(o?"T"+Wt(e,2)+":"+Wt(n,2)+":"+Wt(r,2)+"."+Wt(o,3)+"Z":r?"T"+Wt(e,2)+":"+Wt(n,2)+":"+Wt(r,2)+"Z":n||e?"T"+Wt(e,2)+":"+Wt(n,2)+"Z":"")}function op(t){var e=new RegExp('["'+t+`
|
|
20
|
+
\r]`),n=t.charCodeAt(0);function r(f,d){var h,p,b=o(f,function(v,y){if(h)return h(v,y-1);p=v,h=d?gA(v,d):rp(v)});return b.columns=p||[],b}function o(f,d){var h=[],p=f.length,b=0,v=0,y,A=p<=0,S=!1;f.charCodeAt(p-1)===ds&&--p,f.charCodeAt(p-1)===Bu&&--p;function E(){if(A)return Tu;if(S)return S=!1,np;var _,B=b,N;if(f.charCodeAt(B)===Du){for(;b++<p&&f.charCodeAt(b)!==Du||f.charCodeAt(++b)===Du;);return(_=b)>=p?A=!0:(N=f.charCodeAt(b++))===ds?S=!0:N===Bu&&(S=!0,f.charCodeAt(b)===ds&&++b),f.slice(B+1,_-1).replace(/""/g,'"')}for(;b<p;){if((N=f.charCodeAt(_=b++))===ds)S=!0;else if(N===Bu)S=!0,f.charCodeAt(b)===ds&&++b;else if(N!==n)continue;return f.slice(B,_)}return A=!0,f.slice(B,p)}for(;(y=E())!==Tu;){for(var I=[];y!==np&&y!==Tu;)I.push(y),y=E();d&&(I=d(I,v++))==null||h.push(I)}return h}function i(f,d){return f.map(function(h){return d.map(function(p){return u(h[p])}).join(t)})}function s(f,d){return d==null&&(d=ip(f)),[d.map(u).join(t)].concat(i(f,d)).join(`
|
|
21
|
+
`)}function a(f,d){return d==null&&(d=ip(f)),i(f,d).join(`
|
|
22
22
|
`)}function c(f){return f.map(l).join(`
|
|
23
|
-
`)}function l(f){return f.map(u).join(t)}function u(f){return f==null?"":f instanceof Date?Zv(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:o,format:s,formatBody:a,formatRows:c,formatRow:l,formatValue:u}}var Xv=q0(" "),Kv=Xv.parseRows;function Jv(t){return t}function $v(t){if(t==null)return Jv;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 eA(t,e){for(var n,r=t.length,o=r-e;o<--r;)n=t[o],t[o++]=t[r],t[r]=n}function tA(t,e){return typeof e=="string"&&(e=t.objects[e]),e.type==="GeometryCollection"?{type:"FeatureCollection",features:e.geometries.map(function(n){return j0(t,n)})}:j0(t,e)}function j0(t,e){var n=e.id,r=e.bbox,o=e.properties==null?{}:e.properties,i=W0(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 W0(t,e){var n=$v(t.transform),r=t.arcs;function o(u,f){f.length&&f.pop();for(var h=r[u<0?~u:u],d=0,p=h.length;d<p;++d)f.push(n(h[d],d));u<0&&eA(f,p)}function i(u){return n(u)}function s(u){for(var f=[],h=0,d=u.length;h<d;++h)o(u[h],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,h;switch(f){case"GeometryCollection":return{type:f,geometries:u.geometries.map(l)};case"Point":h=i(u.coordinates);break;case"MultiPoint":h=u.coordinates.map(i);break;case"LineString":h=s(u.arcs);break;case"MultiLineString":h=u.arcs.map(s);break;case"Polygon":h=c(u.arcs);break;case"MultiPolygon":h=u.arcs.map(c);break;default:return null}return{type:f,coordinates:h}}return l(e)}function nA(t,e){var n={},r={},o={},i=[],s=-1;e.forEach(function(l,u){var f=t.arcs[l<0?~l:l],h;f.length<3&&!f[1][0]&&!f[1][1]&&(h=e[++s],e[s]=l,e[u]=h)}),e.forEach(function(l){var u=a(l),f=u[0],h=u[1],d,p;if(d=o[f])if(delete o[d.end],d.push(l),d.end=h,p=r[h]){delete r[p.start];var y=p===d?d:d.concat(p);r[y.start=d.start]=o[y.end=p.end]=y}else r[d.start]=o[d.end]=d;else if(d=r[h])if(delete r[d.start],d.unshift(l),d.start=f,p=o[f]){delete o[p.end];var v=p===d?d:p.concat(d);r[v.start=p.start]=o[v.end=d.end]=v}else r[d.start]=o[d.end]=d;else d=[l],r[d.start=f]=o[d.end=h]=d});function a(l){var u=t.arcs[l<0?~l:l],f=u[0],h;return t.transform?(h=[0,0],u.forEach(function(d){h[0]+=d[0],h[1]+=d[1]})):h=u[u.length-1],l<0?[h,f]:[f,h]}function c(l,u){for(var f in l){var h=l[f];delete u[h.start],delete h.start,delete h.end,h.forEach(function(d){n[d<0?~d:d]=1}),i.push(h)}}return c(o,r),c(r,o),e.forEach(function(l){n[l<0?~l:l]||i.push([l])}),i}function rA(t){return W0(t,iA.apply(this,arguments))}function iA(t,e,n){var r,o,i;if(arguments.length>1)r=oA(t,e,n);else for(o=0,r=new Array(i=t.arcs.length);o<i;++o)r[o]=o;return{type:"MultiLineString",arcs:nA(t,r)}}function oA(t,e,n){var r=[],o=[],i;function s(f){var h=f<0?~f:f;(o[h]||(o[h]=[])).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 Yr(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function sA(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=Yr,n=(a,c)=>Yr(t(a),c),r=(a,c)=>t(a)-c):(e=t===Yr||t===sA?t:aA,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 aA(){return 0}function Q0(t){return t===null?NaN:+t}function*cA(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 Y0=Ni(Yr),dr=Y0.right;Y0.left,Ni(Q0).center;function lA(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 uA(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 fA(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 Vn extends Map{constructor(e,n=pA){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(Z0(this,e))}has(e){return super.has(Z0(this,e))}set(e,n){return super.set(hA(this,e),n)}delete(e){return super.delete(dA(this,e))}}function Z0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function hA({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function dA({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function pA(t){return t!==null&&typeof t=="object"?t.valueOf():t}function mu(t){return t}function ec(t,...e){return X0(t,mu,mu,e)}function gA(t,...e){return X0(t,Array.from,mu,e)}function X0(t,e,n,r){return function o(i,s){if(s>=r.length)return n(i);const a=new Vn,c=r[s++];let l=-1;for(const u of i){const f=c(u,++l,i),h=a.get(f);h?h.push(u):a.set(f,[u])}for(const[u,f]of a)a.set(u,o(f,s));return e(a)}(t,0)}function mA(t=Yr){if(t===Yr)return K0;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 K0(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const bA=Math.sqrt(50),yA=Math.sqrt(10),wA=Math.sqrt(2);function tc(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>=bA?10:i>=yA?5:i>=wA?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?tc(t,e,n*2):[a,c,l]}function nc(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?tc(e,t,n):tc(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 bu(t,e,n){return e=+e,t=+t,n=+n,tc(t,e,n)[2]}function Zr(t,e,n){e=+e,t=+t,n=+n;const r=e<t,o=r?bu(e,t,n):bu(t,e,n);return(r?-1:1)*(o<0?1/-o:o)}function yu(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 wu(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 J0(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?K0:mA(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),h=.5*Math.sqrt(u*f*(c-f)/c)*(l-c/2<0?-1:1),d=Math.max(n,Math.floor(e-l*f/c+h)),p=Math.min(r,Math.floor(e+(c-l)*f/c+h));J0(t,e,d,p,o)}const i=t[e];let s=n,a=r;for(ts(t,n,e),o(t[r],i)>0&&ts(t,n,r);s<a;){for(ts(t,s,a),++s,--a;o(t[s],i)<0;)++s;for(;o(t[a],i)>0;)--a}o(t[n],i)===0?ts(t,n,a):(++a,ts(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function ts(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function xA(t,e,n){if(t=Float64Array.from(cA(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return wu(t);if(e>=1)return yu(t);var r,o=(r-1)*e,i=Math.floor(o),s=yu(J0(t,i).subarray(0,i+1)),a=wu(t.subarray(i+1));return s+(a-s)*(o-i)}}function $0(t,e,n=Q0){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 vA(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 AA(t,e){return xA(t,.5,e)}function ns(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 rs(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 EA(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function rc(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 Oi(t){return t=rc(Math.abs(t)),t?t[1]:NaN}function SA(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 CA(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var IA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function zi(t){if(!(e=IA.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]})}zi.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 TA(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 ep;function DA(t,e){var n=rc(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(ep=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")+rc(t,Math.max(0,e+i-1))[0]}function tp(t,e){var n=rc(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 np={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:EA,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)=>tp(t*100,e),r:tp,s:DA,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function rp(t){return t}var ip=Array.prototype.map,op=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function BA(t){var e=t.grouping===void 0||t.thousands===void 0?rp:SA(ip.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?rp:CA(ip.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=zi(f);var h=f.fill,d=f.align,p=f.sign,y=f.symbol,v=f.zero,b=f.width,A=f.comma,C=f.precision,E=f.trim,I=f.type;I==="n"?(A=!0,I="g"):np[I]||(C===void 0&&(C=12),E=!0,I="g"),(v||h==="0"&&d==="=")&&(v=!0,h="0",d="=");var R=y==="$"?n:y==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",B=y==="$"?r:/[%p]/.test(I)?s:"",O=np[I],F=/[defgprs%]/.test(I);C=C===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function P(S){var Q=R,Z=B,ae,ce,fe;if(I==="c")Z=O(S)+Z,S="";else{S=+S;var le=S<0||1/S<0;if(S=isNaN(S)?c:O(Math.abs(S),C),E&&(S=TA(S)),le&&+S==0&&p!=="+"&&(le=!1),Q=(le?p==="("?p:a:p==="-"||p==="("?"":p)+Q,Z=(I==="s"?op[8+ep/3]:"")+Z+(le&&p==="("?")":""),F){for(ae=-1,ce=S.length;++ae<ce;)if(fe=S.charCodeAt(ae),48>fe||fe>57){Z=(fe===46?o+S.slice(ae+1):S.slice(ae))+Z,S=S.slice(0,ae);break}}}A&&!v&&(S=e(S,1/0));var Ee=Q.length+S.length+Z.length,pe=Ee<b?new Array(b-Ee+1).join(h):"";switch(A&&v&&(S=e(pe+S,pe.length?b-Z.length:1/0),pe=""),d){case"<":S=Q+S+Z+pe;break;case"=":S=Q+pe+S+Z;break;case"^":S=pe.slice(0,Ee=pe.length>>1)+Q+S+Z+pe.slice(Ee);break;default:S=pe+Q+S+Z;break}return i(S)}return P.toString=function(){return f+""},P}function u(f,h){var d=l((f=zi(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Oi(h)/3)))*3,y=Math.pow(10,-p),v=op[8+p/3];return function(b){return d(y*b)+v}}return{format:l,formatPrefix:u}}var ic,Ft,sp;_A({thousands:",",grouping:[3],currency:["$",""]});function _A(t){return ic=BA(t),Ft=ic.format,sp=ic.formatPrefix,ic}function kA(t){return Math.max(0,-Oi(Math.abs(t)))}function RA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Oi(e)/3)))*3-Oi(Math.abs(t)))}function FA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Oi(e)-Oi(t))+1}const vu=new Date,Au=new Date;function bt(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=>bt(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)=>(vu.setTime(+i),Au.setTime(+s),t(vu),t(Au),Math.floor(n(vu,Au))),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 Ui=bt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ui.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?bt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ui),Ui.range;const qn=1e3,sn=qn*60,jn=sn*60,Wn=jn*24,Eu=Wn*7,ap=Wn*30,Su=Wn*365,Qn=bt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*qn)},(t,e)=>(e-t)/qn,t=>t.getUTCSeconds());Qn.range;const oc=bt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*qn)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getMinutes());oc.range;const sc=bt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*sn)},(t,e)=>(e-t)/sn,t=>t.getUTCMinutes());sc.range;const ac=bt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*qn-t.getMinutes()*sn)},(t,e)=>{t.setTime(+t+e*jn)},(t,e)=>(e-t)/jn,t=>t.getHours());ac.range;const cc=bt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*jn)},(t,e)=>(e-t)/jn,t=>t.getUTCHours());cc.range;const pr=bt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*sn)/Wn,t=>t.getDate()-1);pr.range;const Xr=bt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Wn,t=>t.getUTCDate()-1);Xr.range;const cp=bt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Wn,t=>Math.floor(t/Wn));cp.range;function Kr(t){return bt(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())*sn)/Eu)}const is=Kr(0),lc=Kr(1),MA=Kr(2),PA=Kr(3),Gi=Kr(4),LA=Kr(5),NA=Kr(6);is.range,lc.range,MA.range,PA.range,Gi.range,LA.range,NA.range;function Jr(t){return bt(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)/Eu)}const os=Jr(0),uc=Jr(1),OA=Jr(2),zA=Jr(3),Hi=Jr(4),UA=Jr(5),GA=Jr(6);os.range,uc.range,OA.range,zA.range,Hi.range,UA.range,GA.range;const ss=bt(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());ss.range;const as=bt(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());as.range;const Dn=bt(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());Dn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:bt(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)}),Dn.range;const Bn=bt(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());Bn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:bt(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)}),Bn.range;function lp(t,e,n,r,o,i){const s=[[Qn,1,qn],[Qn,5,5*qn],[Qn,15,15*qn],[Qn,30,30*qn],[i,1,sn],[i,5,5*sn],[i,15,15*sn],[i,30,30*sn],[o,1,jn],[o,3,3*jn],[o,6,6*jn],[o,12,12*jn],[r,1,Wn],[r,2,2*Wn],[n,1,Eu],[e,1,ap],[e,3,3*ap],[t,1,Su]];function a(l,u,f){const h=u<l;h&&([l,u]=[u,l]);const d=f&&typeof f.range=="function"?f:c(l,u,f),p=d?d.range(l,+u+1):[];return h?p.reverse():p}function c(l,u,f){const h=Math.abs(u-l)/f,d=Ni(([,,v])=>v).right(s,h);if(d===s.length)return t.every(Zr(l/Su,u/Su,f));if(d===0)return Ui.every(Math.max(Zr(l,u,f),1));const[p,y]=s[h/s[d-1][2]<s[d][2]/h?d-1:d];return p.every(y)}return[a,c]}const[HA,VA]=lp(Bn,as,os,cp,cc,sc),[qA,jA]=lp(Dn,ss,is,pr,ac,oc),cs="year",ls="quarter",us="month",fs="week",hs="date",fc="day",Cu="dayofyear",ds="hours",ps="minutes",gs="seconds",hc="milliseconds";[cs,ls,us,fs,hs,fc,Cu,ds,ps,gs,hc].reduce((t,e,n)=>(t[e]=1+n,t),{});const WA={[cs]:Dn,[ls]:ss.every(3),[us]:ss,[fs]:is,[hs]:pr,[fc]:pr,[Cu]:pr,[ds]:ac,[ps]:oc,[gs]:Qn,[hc]:Ui},QA={[cs]:Bn,[ls]:as.every(3),[us]:as,[fs]:os,[hs]:Xr,[fc]:Xr,[Cu]:Xr,[ds]:cc,[ps]:sc,[gs]:Qn,[hc]:Ui};function YA(t){return WA[t]}function ZA(t){return QA[t]}function Iu(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 Tu(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 ms(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function up(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=bs(o),u=ys(o),f=bs(i),h=ys(i),d=bs(s),p=ys(s),y=bs(a),v=ys(a),b=bs(c),A=ys(c),C={a:le,A:Ee,b:pe,B:Ce,c:null,d:mp,e:mp,f:y3,g:D3,G:_3,H:g3,I:m3,j:b3,L:bp,m:w3,M:x3,p:Ie,q:we,Q:Ep,s:Sp,S:v3,u:A3,U:E3,V:S3,w:C3,W:I3,x:null,X:null,y:T3,Y:B3,Z:k3,"%":Ap},E={a:Te,A:He,b:Le,B:j,c:null,d:wp,e:wp,f:P3,g:j3,G:Q3,H:R3,I:F3,j:M3,L:xp,m:L3,M:N3,p:q,q:re,Q:Ep,s:Sp,S:O3,u:z3,U:U3,V:G3,w:H3,W:V3,x:null,X:null,y:q3,Y:W3,Z:Y3,"%":Ap},I={a:P,A:S,b:Q,B:Z,c:ae,d:pp,e:pp,f:f3,g:dp,G:hp,H:gp,I:gp,j:a3,L:u3,m:s3,M:c3,p:F,q:o3,Q:d3,s:p3,S:l3,u:e3,U:t3,V:n3,w:$A,W:r3,x:ce,X:fe,y:dp,Y:hp,Z:i3,"%":h3};C.x=R(n,C),C.X=R(r,C),C.c=R(e,C),E.x=R(n,E),E.X=R(r,E),E.c=R(e,E);function R($,ue){return function(L){var D=[],ee=-1,oe=0,De=$.length,ye,xe,ke;for(L instanceof Date||(L=new Date(+L));++ee<De;)$.charCodeAt(ee)===37&&(D.push($.slice(oe,ee)),(xe=fp[ye=$.charAt(++ee)])!=null?ye=$.charAt(++ee):xe=ye==="e"?" ":"0",(ke=ue[ye])&&(ye=ke(L,xe)),D.push(ye),oe=ee+1);return D.push($.slice(oe,ee)),D.join("")}}function B($,ue){return function(L){var D=ms(1900,void 0,1),ee=O(D,$,L+="",0),oe,De;if(ee!=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(ue&&!("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?(oe=Tu(ms(D.y,0,1)),De=oe.getUTCDay(),oe=De>4||De===0?uc.ceil(oe):uc(oe),oe=Xr.offset(oe,(D.V-1)*7),D.y=oe.getUTCFullYear(),D.m=oe.getUTCMonth(),D.d=oe.getUTCDate()+(D.w+6)%7):(oe=Iu(ms(D.y,0,1)),De=oe.getDay(),oe=De>4||De===0?lc.ceil(oe):lc(oe),oe=pr.offset(oe,(D.V-1)*7),D.y=oe.getFullYear(),D.m=oe.getMonth(),D.d=oe.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),De="Z"in D?Tu(ms(D.y,0,1)).getUTCDay():Iu(ms(D.y,0,1)).getDay(),D.m=0,D.d="W"in D?(D.w+6)%7+D.W*7-(De+5)%7:D.w+D.U*7-(De+6)%7);return"Z"in D?(D.H+=D.Z/100|0,D.M+=D.Z%100,Tu(D)):Iu(D)}}function O($,ue,L,D){for(var ee=0,oe=ue.length,De=L.length,ye,xe;ee<oe;){if(D>=De)return-1;if(ye=ue.charCodeAt(ee++),ye===37){if(ye=ue.charAt(ee++),xe=I[ye in fp?ue.charAt(ee++):ye],!xe||(D=xe($,L,D))<0)return-1}else if(ye!=L.charCodeAt(D++))return-1}return D}function F($,ue,L){var D=l.exec(ue.slice(L));return D?($.p=u.get(D[0].toLowerCase()),L+D[0].length):-1}function P($,ue,L){var D=d.exec(ue.slice(L));return D?($.w=p.get(D[0].toLowerCase()),L+D[0].length):-1}function S($,ue,L){var D=f.exec(ue.slice(L));return D?($.w=h.get(D[0].toLowerCase()),L+D[0].length):-1}function Q($,ue,L){var D=b.exec(ue.slice(L));return D?($.m=A.get(D[0].toLowerCase()),L+D[0].length):-1}function Z($,ue,L){var D=y.exec(ue.slice(L));return D?($.m=v.get(D[0].toLowerCase()),L+D[0].length):-1}function ae($,ue,L){return O($,e,ue,L)}function ce($,ue,L){return O($,n,ue,L)}function fe($,ue,L){return O($,r,ue,L)}function le($){return s[$.getDay()]}function Ee($){return i[$.getDay()]}function pe($){return c[$.getMonth()]}function Ce($){return a[$.getMonth()]}function Ie($){return o[+($.getHours()>=12)]}function we($){return 1+~~($.getMonth()/3)}function Te($){return s[$.getUTCDay()]}function He($){return i[$.getUTCDay()]}function Le($){return c[$.getUTCMonth()]}function j($){return a[$.getUTCMonth()]}function q($){return o[+($.getUTCHours()>=12)]}function re($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var ue=R($+="",C);return ue.toString=function(){return $},ue},parse:function($){var ue=B($+="",!1);return ue.toString=function(){return $},ue},utcFormat:function($){var ue=R($+="",E);return ue.toString=function(){return $},ue},utcParse:function($){var ue=B($+="",!0);return ue.toString=function(){return $},ue}}}var fp={"-":"",_:" ",0:"0"},vt=/^\s*\d+/,XA=/^%/,KA=/[\\^$*+?|[\]().{}]/g;function je(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 JA(t){return t.replace(KA,"\\$&")}function bs(t){return new RegExp("^(?:"+t.map(JA).join("|")+")","i")}function ys(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function $A(t,e,n){var r=vt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function e3(t,e,n){var r=vt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function t3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function n3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function r3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function hp(t,e,n){var r=vt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function dp(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function i3(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 o3(t,e,n){var r=vt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function s3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function pp(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function a3(t,e,n){var r=vt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function gp(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function c3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function l3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function u3(t,e,n){var r=vt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function f3(t,e,n){var r=vt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function h3(t,e,n){var r=XA.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function d3(t,e,n){var r=vt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function p3(t,e,n){var r=vt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function mp(t,e){return je(t.getDate(),e,2)}function g3(t,e){return je(t.getHours(),e,2)}function m3(t,e){return je(t.getHours()%12||12,e,2)}function b3(t,e){return je(1+pr.count(Dn(t),t),e,3)}function bp(t,e){return je(t.getMilliseconds(),e,3)}function y3(t,e){return bp(t,e)+"000"}function w3(t,e){return je(t.getMonth()+1,e,2)}function x3(t,e){return je(t.getMinutes(),e,2)}function v3(t,e){return je(t.getSeconds(),e,2)}function A3(t){var e=t.getDay();return e===0?7:e}function E3(t,e){return je(is.count(Dn(t)-1,t),e,2)}function yp(t){var e=t.getDay();return e>=4||e===0?Gi(t):Gi.ceil(t)}function S3(t,e){return t=yp(t),je(Gi.count(Dn(t),t)+(Dn(t).getDay()===4),e,2)}function C3(t){return t.getDay()}function I3(t,e){return je(lc.count(Dn(t)-1,t),e,2)}function T3(t,e){return je(t.getFullYear()%100,e,2)}function D3(t,e){return t=yp(t),je(t.getFullYear()%100,e,2)}function B3(t,e){return je(t.getFullYear()%1e4,e,4)}function _3(t,e){var n=t.getDay();return t=n>=4||n===0?Gi(t):Gi.ceil(t),je(t.getFullYear()%1e4,e,4)}function k3(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+je(e/60|0,"0",2)+je(e%60,"0",2)}function wp(t,e){return je(t.getUTCDate(),e,2)}function R3(t,e){return je(t.getUTCHours(),e,2)}function F3(t,e){return je(t.getUTCHours()%12||12,e,2)}function M3(t,e){return je(1+Xr.count(Bn(t),t),e,3)}function xp(t,e){return je(t.getUTCMilliseconds(),e,3)}function P3(t,e){return xp(t,e)+"000"}function L3(t,e){return je(t.getUTCMonth()+1,e,2)}function N3(t,e){return je(t.getUTCMinutes(),e,2)}function O3(t,e){return je(t.getUTCSeconds(),e,2)}function z3(t){var e=t.getUTCDay();return e===0?7:e}function U3(t,e){return je(os.count(Bn(t)-1,t),e,2)}function vp(t){var e=t.getUTCDay();return e>=4||e===0?Hi(t):Hi.ceil(t)}function G3(t,e){return t=vp(t),je(Hi.count(Bn(t),t)+(Bn(t).getUTCDay()===4),e,2)}function H3(t){return t.getUTCDay()}function V3(t,e){return je(uc.count(Bn(t)-1,t),e,2)}function q3(t,e){return je(t.getUTCFullYear()%100,e,2)}function j3(t,e){return t=vp(t),je(t.getUTCFullYear()%100,e,2)}function W3(t,e){return je(t.getUTCFullYear()%1e4,e,4)}function Q3(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Hi(t):Hi.ceil(t),je(t.getUTCFullYear()%1e4,e,4)}function Y3(){return"+0000"}function Ap(){return"%"}function Ep(t){return+t}function Sp(t){return Math.floor(+t/1e3)}var Vi,Du,Cp,Bu,Ip;Z3({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 Z3(t){return Vi=up(t),Du=Vi.format,Cp=Vi.parse,Bu=Vi.utcFormat,Ip=Vi.utcParse,Vi}function dc(t){const e={};return n=>e[n]||(e[n]=t(n))}function Tp(t,e,n){n=n||{},Rt(n)||mt(`Invalid time multi-format specifier: ${n}`);const r=e(gs),o=e(ps),i=e(ds),s=e(hs),a=e(fs),c=e(us),l=e(ls),u=e(cs),f=t(n[hc]||".%L"),h=t(n[gs]||":%S"),d=t(n[ps]||"%I:%M"),p=t(n[ds]||"%I %p"),y=t(n[hs]||n[fc]||"%a %d"),v=t(n[fs]||"%b %d"),b=t(n[us]||"%B"),A=t(n[ls]||"%B"),C=t(n[cs]||"%Y");return E=>(r(E)<E?f:o(E)<E?h:i(E)<E?d:s(E)<E?p:c(E)<E?a(E)<E?y:v:u(E)<E?l(E)<E?b:A:C)(E)}function Dp(t){const e=dc(t.format),n=dc(t.utcFormat);return{timeFormat:r=>nt(r)?e(r):Tp(e,YA,r),utcFormat:r=>nt(r)?n(r):Tp(n,ZA,r),timeParse:dc(t.parse),utcParse:dc(t.utcParse)}}let _u;X3();function X3(){return _u=Dp({format:Du,parse:Cp,utcFormat:Bu,utcParse:Ip})}function K3(t){return Dp(up(t))}function J3(t){return arguments.length?_u=K3(t):_u}const $3=t=>t!=null&&t===t,eE=t=>t==="true"||t==="false"||t===!0||t===!1,tE=t=>!Number.isNaN(Date.parse(t)),Bp=t=>!Number.isNaN(+t)&&!(t instanceof Date),nE=t=>Bp(t)&&Number.isInteger(+t),_p={boolean:Sv,integer:qo,number:qo,date:Iv,string:Tv,unknown:ja},pc=[eE,nE,Bp,tE],rE=["boolean","integer","number","date"];function iE(t,e){if(!t||!t.length)return"unknown";const n=t.length,r=pc.length,o=pc.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]&&$3(c)&&!pc[a](c)&&(o[a]=0,++s,s===pc.length))return"string";return rE[o.reduce((i,s)=>i===0?s:i,0)-1]}function oE(t,e){return e.reduce((n,r)=>(n[r]=iE(t,r),n),{})}function kp(t){const e=function(n,r){const o={delimiter:t};return ku(n,r?wv(r,o):o)};return e.responseType="text",e}function ku(t,e){return e.header&&(t=e.header.map(ou).join(e.delimiter)+`
|
|
24
|
-
`+t),
|
|
23
|
+
`)}function l(f){return f.map(u).join(t)}function u(f){return f==null?"":f instanceof Date?bA(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:o,format:s,formatBody:a,formatRows:c,formatRow:l,formatValue:u}}var yA=op(" "),wA=yA.parseRows;function xA(t){return t}function vA(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 AA(t,e){for(var n,r=t.length,o=r-e;o<--r;)n=t[o],t[o++]=t[r],t[r]=n}function EA(t,e){return typeof e=="string"&&(e=t.objects[e]),e.type==="GeometryCollection"?{type:"FeatureCollection",features:e.geometries.map(function(n){return sp(t,n)})}:sp(t,e)}function sp(t,e){var n=e.id,r=e.bbox,o=e.properties==null?{}:e.properties,i=ap(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 ap(t,e){var n=vA(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&&AA(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 SA(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 b=p===h?h:h.concat(p);r[b.start=h.start]=o[b.end=p.end]=b}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 CA(t){return ap(t,IA.apply(this,arguments))}function IA(t,e,n){var r,o,i;if(arguments.length>1)r=TA(t,e,n);else for(o=0,r=new Array(i=t.arcs.length);o<i;++o)r[o]=o;return{type:"MultiLineString",arcs:SA(t,r)}}function TA(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 Jr(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function DA(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Hi(t){let e,n,r;t.length!==2?(e=Jr,n=(a,c)=>Jr(t(a),c),r=(a,c)=>t(a)-c):(e=t===Jr||t===DA?t:BA,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 BA(){return 0}function cp(t){return t===null?NaN:+t}function*kA(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 lp=Hi(Jr),pr=lp.right;lp.left,Hi(cp).center;function _A(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 RA(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 FA(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 jn extends Map{constructor(e,n=LA){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(up(this,e))}has(e){return super.has(up(this,e))}set(e,n){return super.set(MA(this,e),n)}delete(e){return super.delete(PA(this,e))}}function up({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function MA({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function PA({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function LA(t){return t!==null&&typeof t=="object"?t.valueOf():t}function ku(t){return t}function dc(t,...e){return fp(t,ku,ku,e)}function OA(t,...e){return fp(t,Array.from,ku,e)}function fp(t,e,n,r){return function o(i,s){if(s>=r.length)return n(i);const a=new jn,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 NA(t=Jr){if(t===Jr)return hp;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 hp(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const zA=Math.sqrt(50),UA=Math.sqrt(10),GA=Math.sqrt(2);function pc(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>=zA?10:i>=UA?5:i>=GA?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?pc(t,e,n*2):[a,c,l]}function gc(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?pc(e,t,n):pc(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 _u(t,e,n){return e=+e,t=+t,n=+n,pc(t,e,n)[2]}function $r(t,e,n){e=+e,t=+t,n=+n;const r=e<t,o=r?_u(e,t,n):_u(t,e,n);return(r?-1:1)*(o<0?1/-o:o)}function Ru(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 Fu(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 dp(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?hp:NA(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));dp(t,e,h,p,o)}const i=t[e];let s=n,a=r;for(ps(t,n,e),o(t[r],i)>0&&ps(t,n,r);s<a;){for(ps(t,s,a),++s,--a;o(t[s],i)<0;)++s;for(;o(t[a],i)>0;)--a}o(t[n],i)===0?ps(t,n,a):(++a,ps(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function ps(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function HA(t,e,n){if(t=Float64Array.from(kA(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Fu(t);if(e>=1)return Ru(t);var r,o=(r-1)*e,i=Math.floor(o),s=Ru(dp(t,i).subarray(0,i+1)),a=Fu(t.subarray(i+1));return s+(a-s)*(o-i)}}function pp(t,e,n=cp){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 VA(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 qA(t,e){return HA(t,.5,e)}function gs(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 ms(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 jA(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function mc(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 Vi(t){return t=mc(Math.abs(t)),t?t[1]:NaN}function WA(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 YA(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var QA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function qi(t){if(!(e=QA.exec(t)))throw new Error("invalid format: "+t);var e;return new Mu({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=Mu.prototype;function Mu(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+""}Mu.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 ZA(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 gp;function XA(t,e){var n=mc(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(gp=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")+mc(t,Math.max(0,e+i-1))[0]}function mp(t,e){var n=mc(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 bp={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:jA,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)=>mp(t*100,e),r:mp,s:XA,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function yp(t){return t}var wp=Array.prototype.map,xp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function KA(t){var e=t.grouping===void 0||t.thousands===void 0?yp:WA(wp.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?yp:YA(wp.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,b=f.symbol,v=f.zero,y=f.width,A=f.comma,S=f.precision,E=f.trim,I=f.type;I==="n"?(A=!0,I="g"):bp[I]||(S===void 0&&(S=12),E=!0,I="g"),(v||d==="0"&&h==="=")&&(v=!0,d="0",h="=");var _=b==="$"?n:b==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",B=b==="$"?r:/[%p]/.test(I)?s:"",N=bp[I],M=/[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 F(C){var Y=_,Q=B,se,oe,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=ZA(C)),ce&&+C==0&&p!=="+"&&(ce=!1),Y=(ce?p==="("?p:a:p==="-"||p==="("?"":p)+Y,Q=(I==="s"?xp[8+gp/3]:"")+Q+(ce&&p==="("?")":""),M){for(se=-1,oe=C.length;++se<oe;)if(ae=C.charCodeAt(se),48>ae||ae>57){Q=(ae===46?o+C.slice(se+1):C.slice(se))+Q,C=C.slice(0,se);break}}}A&&!v&&(C=e(C,1/0));var ye=Y.length+C.length+Q.length,he=ye<y?new Array(y-ye+1).join(d):"";switch(A&&v&&(C=e(he+C,he.length?y-Q.length:1/0),he=""),h){case"<":C=Y+C+Q+he;break;case"=":C=Y+he+C+Q;break;case"^":C=he.slice(0,ye=he.length>>1)+Y+C+Q+he.slice(ye);break;default:C=he+Y+C+Q;break}return i(C)}return F.toString=function(){return f+""},F}function u(f,d){var h=l((f=qi(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Vi(d)/3)))*3,b=Math.pow(10,-p),v=xp[8+p/3];return function(y){return h(b*y)+v}}return{format:l,formatPrefix:u}}var bc,Bt,vp;JA({thousands:",",grouping:[3],currency:["$",""]});function JA(t){return bc=KA(t),Bt=bc.format,vp=bc.formatPrefix,bc}function $A(t){return Math.max(0,-Vi(Math.abs(t)))}function e3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Vi(e)/3)))*3-Vi(Math.abs(t)))}function t3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Vi(e)-Vi(t))+1}const Pu=new Date,Lu=new Date;function bt(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=>bt(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)=>(Pu.setTime(+i),Lu.setTime(+s),t(Pu),t(Lu),Math.floor(n(Pu,Lu))),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 ji=bt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ji.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?bt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):ji),ji.range;const Wn=1e3,an=Wn*60,Yn=an*60,Qn=Yn*24,Ou=Qn*7,Ap=Qn*30,Nu=Qn*365,Zn=bt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Wn)},(t,e)=>(e-t)/Wn,t=>t.getUTCSeconds());Zn.range;const yc=bt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Wn)},(t,e)=>{t.setTime(+t+e*an)},(t,e)=>(e-t)/an,t=>t.getMinutes());yc.range;const wc=bt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*an)},(t,e)=>(e-t)/an,t=>t.getUTCMinutes());wc.range;const xc=bt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Wn-t.getMinutes()*an)},(t,e)=>{t.setTime(+t+e*Yn)},(t,e)=>(e-t)/Yn,t=>t.getHours());xc.range;const vc=bt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Yn)},(t,e)=>(e-t)/Yn,t=>t.getUTCHours());vc.range;const gr=bt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*an)/Qn,t=>t.getDate()-1);gr.range;const ei=bt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Qn,t=>t.getUTCDate()-1);ei.range;const Ep=bt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Qn,t=>Math.floor(t/Qn));Ep.range;function ti(t){return bt(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())*an)/Ou)}const bs=ti(0),Ac=ti(1),n3=ti(2),r3=ti(3),Wi=ti(4),i3=ti(5),o3=ti(6);bs.range,Ac.range,n3.range,r3.range,Wi.range,i3.range,o3.range;function ni(t){return bt(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)/Ou)}const ys=ni(0),Ec=ni(1),s3=ni(2),a3=ni(3),Yi=ni(4),c3=ni(5),l3=ni(6);ys.range,Ec.range,s3.range,a3.range,Yi.range,c3.range,l3.range;const ws=bt(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());ws.range;const xs=bt(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());xs.range;const _n=bt(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());_n.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:bt(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)}),_n.range;const Rn=bt(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());Rn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:bt(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)}),Rn.range;function Sp(t,e,n,r,o,i){const s=[[Zn,1,Wn],[Zn,5,5*Wn],[Zn,15,15*Wn],[Zn,30,30*Wn],[i,1,an],[i,5,5*an],[i,15,15*an],[i,30,30*an],[o,1,Yn],[o,3,3*Yn],[o,6,6*Yn],[o,12,12*Yn],[r,1,Qn],[r,2,2*Qn],[n,1,Ou],[e,1,Ap],[e,3,3*Ap],[t,1,Nu]];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=Hi(([,,v])=>v).right(s,d);if(h===s.length)return t.every($r(l/Nu,u/Nu,f));if(h===0)return ji.every(Math.max($r(l,u,f),1));const[p,b]=s[d/s[h-1][2]<s[h][2]/d?h-1:h];return p.every(b)}return[a,c]}const[u3,f3]=Sp(Rn,xs,ys,Ep,vc,wc),[h3,d3]=Sp(_n,ws,bs,gr,xc,yc),vs="year",As="quarter",Es="month",Ss="week",Cs="date",Sc="day",zu="dayofyear",Is="hours",Ts="minutes",Ds="seconds",Cc="milliseconds";[vs,As,Es,Ss,Cs,Sc,zu,Is,Ts,Ds,Cc].reduce((t,e,n)=>(t[e]=1+n,t),{});const p3={[vs]:_n,[As]:ws.every(3),[Es]:ws,[Ss]:bs,[Cs]:gr,[Sc]:gr,[zu]:gr,[Is]:xc,[Ts]:yc,[Ds]:Zn,[Cc]:ji},g3={[vs]:Rn,[As]:xs.every(3),[Es]:xs,[Ss]:ys,[Cs]:ei,[Sc]:ei,[zu]:ei,[Is]:vc,[Ts]:wc,[Ds]:Zn,[Cc]:ji};function m3(t){return p3[t]}function b3(t){return g3[t]}function Uu(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 Gu(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 Bs(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Cp(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=ks(o),u=_s(o),f=ks(i),d=_s(i),h=ks(s),p=_s(s),b=ks(a),v=_s(a),y=ks(c),A=_s(c),S={a:ce,A:ye,b:he,B:De,c:null,d:_p,e:_p,f:U3,g:X3,G:J3,H:O3,I:N3,j:z3,L:Rp,m:G3,M:H3,p:we,q:Ee,Q:Np,s:zp,S:V3,u:q3,U:j3,V:W3,w:Y3,W:Q3,x:null,X:null,y:Z3,Y:K3,Z:$3,"%":Op},E={a:Ie,A:Ge,b:Ve,B:q,c:null,d:Mp,e:Mp,f:rE,g:dE,G:gE,H:eE,I:tE,j:nE,L:Pp,m:iE,M:oE,p:j,q:ee,Q:Np,s:zp,S:sE,u:aE,U:cE,V:lE,w:uE,W:fE,x:null,X:null,y:hE,Y:pE,Z:mE,"%":Op},I={a:F,A:C,b:Y,B:Q,c:se,d:Bp,e:Bp,f:F3,g:Dp,G:Tp,H:kp,I:kp,j:B3,L:R3,m:D3,M:k3,p:M,q:T3,Q:P3,s:L3,S:_3,u:A3,U:E3,V:S3,w:v3,W:C3,x:oe,X:ae,y:Dp,Y:Tp,Z:I3,"%":M3};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,Ae,Re;for(L instanceof Date||(L=new Date(+L));++te<Be;)J.charCodeAt(te)===37&&(D.push(J.slice(le,te)),(Ae=Ip[ve=J.charAt(++te)])!=null?ve=J.charAt(++te):Ae=ve==="e"?" ":"0",(Re=fe[ve])&&(ve=Re(L,Ae)),D.push(ve),le=te+1);return D.push(J.slice(le,te)),D.join("")}}function B(J,fe){return function(L){var D=Bs(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=Gu(Bs(D.y,0,1)),Be=le.getUTCDay(),le=Be>4||Be===0?Ec.ceil(le):Ec(le),le=ei.offset(le,(D.V-1)*7),D.y=le.getUTCFullYear(),D.m=le.getUTCMonth(),D.d=le.getUTCDate()+(D.w+6)%7):(le=Uu(Bs(D.y,0,1)),Be=le.getDay(),le=Be>4||Be===0?Ac.ceil(le):Ac(le),le=gr.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?Gu(Bs(D.y,0,1)).getUTCDay():Uu(Bs(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,Gu(D)):Uu(D)}}function N(J,fe,L,D){for(var te=0,le=fe.length,Be=L.length,ve,Ae;te<le;){if(D>=Be)return-1;if(ve=fe.charCodeAt(te++),ve===37){if(ve=fe.charAt(te++),Ae=I[ve in Ip?fe.charAt(te++):ve],!Ae||(D=Ae(J,L,D))<0)return-1}else if(ve!=L.charCodeAt(D++))return-1}return D}function M(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 F(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=y.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=b.exec(fe.slice(L));return D?(J.m=v.get(D[0].toLowerCase()),L+D[0].length):-1}function se(J,fe,L){return N(J,e,fe,L)}function oe(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 he(J){return c[J.getMonth()]}function De(J){return a[J.getMonth()]}function we(J){return o[+(J.getHours()>=12)]}function Ee(J){return 1+~~(J.getMonth()/3)}function Ie(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 j(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 Ip={"-":"",_:" ",0:"0"},vt=/^\s*\d+/,y3=/^%/,w3=/[\\^$*+?|[\]().{}]/g;function je(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(w3,"\\$&")}function ks(t){return new RegExp("^(?:"+t.map(x3).join("|")+")","i")}function _s(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function v3(t,e,n){var r=vt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function A3(t,e,n){var r=vt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function E3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function S3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function C3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Tp(t,e,n){var r=vt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Dp(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function I3(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 T3(t,e,n){var r=vt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function D3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Bp(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function B3(t,e,n){var r=vt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function kp(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function k3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function _3(t,e,n){var r=vt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function R3(t,e,n){var r=vt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function F3(t,e,n){var r=vt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function M3(t,e,n){var r=y3.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function P3(t,e,n){var r=vt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function L3(t,e,n){var r=vt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function _p(t,e){return je(t.getDate(),e,2)}function O3(t,e){return je(t.getHours(),e,2)}function N3(t,e){return je(t.getHours()%12||12,e,2)}function z3(t,e){return je(1+gr.count(_n(t),t),e,3)}function Rp(t,e){return je(t.getMilliseconds(),e,3)}function U3(t,e){return Rp(t,e)+"000"}function G3(t,e){return je(t.getMonth()+1,e,2)}function H3(t,e){return je(t.getMinutes(),e,2)}function V3(t,e){return je(t.getSeconds(),e,2)}function q3(t){var e=t.getDay();return e===0?7:e}function j3(t,e){return je(bs.count(_n(t)-1,t),e,2)}function Fp(t){var e=t.getDay();return e>=4||e===0?Wi(t):Wi.ceil(t)}function W3(t,e){return t=Fp(t),je(Wi.count(_n(t),t)+(_n(t).getDay()===4),e,2)}function Y3(t){return t.getDay()}function Q3(t,e){return je(Ac.count(_n(t)-1,t),e,2)}function Z3(t,e){return je(t.getFullYear()%100,e,2)}function X3(t,e){return t=Fp(t),je(t.getFullYear()%100,e,2)}function K3(t,e){return je(t.getFullYear()%1e4,e,4)}function J3(t,e){var n=t.getDay();return t=n>=4||n===0?Wi(t):Wi.ceil(t),je(t.getFullYear()%1e4,e,4)}function $3(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+je(e/60|0,"0",2)+je(e%60,"0",2)}function Mp(t,e){return je(t.getUTCDate(),e,2)}function eE(t,e){return je(t.getUTCHours(),e,2)}function tE(t,e){return je(t.getUTCHours()%12||12,e,2)}function nE(t,e){return je(1+ei.count(Rn(t),t),e,3)}function Pp(t,e){return je(t.getUTCMilliseconds(),e,3)}function rE(t,e){return Pp(t,e)+"000"}function iE(t,e){return je(t.getUTCMonth()+1,e,2)}function oE(t,e){return je(t.getUTCMinutes(),e,2)}function sE(t,e){return je(t.getUTCSeconds(),e,2)}function aE(t){var e=t.getUTCDay();return e===0?7:e}function cE(t,e){return je(ys.count(Rn(t)-1,t),e,2)}function Lp(t){var e=t.getUTCDay();return e>=4||e===0?Yi(t):Yi.ceil(t)}function lE(t,e){return t=Lp(t),je(Yi.count(Rn(t),t)+(Rn(t).getUTCDay()===4),e,2)}function uE(t){return t.getUTCDay()}function fE(t,e){return je(Ec.count(Rn(t)-1,t),e,2)}function hE(t,e){return je(t.getUTCFullYear()%100,e,2)}function dE(t,e){return t=Lp(t),je(t.getUTCFullYear()%100,e,2)}function pE(t,e){return je(t.getUTCFullYear()%1e4,e,4)}function gE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Yi(t):Yi.ceil(t),je(t.getUTCFullYear()%1e4,e,4)}function mE(){return"+0000"}function Op(){return"%"}function Np(t){return+t}function zp(t){return Math.floor(+t/1e3)}var Qi,Hu,Up,Vu,Gp;bE({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 bE(t){return Qi=Cp(t),Hu=Qi.format,Up=Qi.parse,Vu=Qi.utcFormat,Gp=Qi.utcParse,Qi}function Ic(t){const e={};return n=>e[n]||(e[n]=t(n))}function Hp(t,e,n){n=n||{},Ft(n)||mt(`Invalid time multi-format specifier: ${n}`);const r=e(Ds),o=e(Ts),i=e(Is),s=e(Cs),a=e(Ss),c=e(Es),l=e(As),u=e(vs),f=t(n[Cc]||".%L"),d=t(n[Ds]||":%S"),h=t(n[Ts]||"%I:%M"),p=t(n[Is]||"%I %p"),b=t(n[Cs]||n[Sc]||"%a %d"),v=t(n[Ss]||"%b %d"),y=t(n[Es]||"%B"),A=t(n[As]||"%B"),S=t(n[vs]||"%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?b:v:u(E)<E?l(E)<E?y:A:S)(E)}function Vp(t){const e=Ic(t.format),n=Ic(t.utcFormat);return{timeFormat:r=>nt(r)?e(r):Hp(e,m3,r),utcFormat:r=>nt(r)?n(r):Hp(n,b3,r),timeParse:Ic(t.parse),utcParse:Ic(t.utcParse)}}let qu;yE();function yE(){return qu=Vp({format:Hu,parse:Up,utcFormat:Vu,utcParse:Gp})}function wE(t){return Vp(Cp(t))}function xE(t){return arguments.length?qu=wE(t):qu}const vE=t=>t!=null&&t===t,AE=t=>t==="true"||t==="false"||t===!0||t===!1,EE=t=>!Number.isNaN(Date.parse(t)),qp=t=>!Number.isNaN(+t)&&!(t instanceof Date),SE=t=>qp(t)&&Number.isInteger(+t),jp={boolean:Wv,integer:rs,number:rs,date:Qv,string:Zv,unknown:ic},Tc=[AE,SE,qp,EE],CE=["boolean","integer","number","date"];function IE(t,e){if(!t||!t.length)return"unknown";const n=t.length,r=Tc.length,o=Tc.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]&&vE(c)&&!Tc[a](c)&&(o[a]=0,++s,s===Tc.length))return"string";return CE[o.reduce((i,s)=>i===0?s:i,0)-1]}function TE(t,e){return e.reduce((n,r)=>(n[r]=IE(t,r),n),{})}function Wp(t){const e=function(n,r){const o={delimiter:t};return ju(n,r?Gv(r,o):o)};return e.responseType="text",e}function ju(t,e){return e.header&&(t=e.header.map(wu).join(e.delimiter)+`
|
|
24
|
+
`+t),op(e.delimiter).parse(t+"")}ju.responseType="text";function DE(t){return typeof Buffer=="function"&&sn(Buffer.isBuffer)?Buffer.isBuffer(t):!1}function Wu(t,e){const n=e&&e.property?rc(e.property):ic;return Ft(t)&&!DE(t)?BE(n(t),e):n(JSON.parse(t))}Wu.responseType="json";function BE(t,e){return!Dt(t)&&qv(t)&&(t=[...t]),e&&e.copy?JSON.parse(JSON.stringify(t)):t}const kE={interior:(t,e)=>t!==e,exterior:(t,e)=>t===e};function Yp(t,e){let n,r,o,i;return t=Wu(t,e),e&&e.feature?(n=EA,o=e.feature):e&&e.mesh?(n=CA,o=e.mesh,i=kE[e.filter]):mt("Missing TopoJSON feature or mesh parameter."),r=(r=t.objects[o])?n(t,r,i):mt("Invalid TopoJSON object: "+o),r&&r.features||[r]}Yp.responseType="json";const Yu={dsv:ju,csv:Wp(","),tsv:Wp(" "),json:Wu,topojson:Yp};function Qu(t,e){return arguments.length>1?(Yu[t]=e,this):zi(Yu,t)?Yu[t]:null}function Zu(t,e,n,r){e=e||{};const o=Qu(e.type||"json");return o||mt("Unknown data format type: "+e.type),t=o(t,e),e.parse&&_E(t,e.parse,n,r),zi(t,"columns")&&delete t.columns,t}function _E(t,e,n,r){if(!t.length)return;const o=xE();n=n||o.timeParse,r=r||o.utcParse;let i=t.columns||Object.keys(t[0]),s,a,c,l,u,f;e==="auto"&&(e=TE(t,i)),i=Object.keys(e);const d=i.map(h=>{const p=e[h];let b,v;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return b=p.split(/:(.+)?/,2),v=b[1],(v[0]==="'"&&v[v.length-1]==="'"||v[0]==='"'&&v[v.length-1]==='"')&&(v=v.slice(1,-1)),(b[0]==="utc"?r:n)(v);if(!jp[p])throw Error("Illegal format pattern: "+h+":"+p);return jp[p]});for(c=0,u=t.length,f=i.length;c<u;++c)for(s=t[c],l=0;l<f;++l)a=i[l],s[a]=d[l](s[a])}/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/const
|
|
28
|
+
*/const RE={ATTRIBUTE:1},FE=t=>(...e)=>({_$litDirective$:t,values:e});let ME=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,r){this._$Ct=e,this._$AM=n,this._$Ci=r}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}};/**
|
|
29
29
|
* @license
|
|
30
30
|
* Copyright 2018 Google LLC
|
|
31
31
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
-
*/const
|
|
32
|
+
*/const Qp="important",PE=" !"+Qp,LE=FE(class extends ME{constructor(t){var e;if(super(t),t.type!==RE.ATTRIBUTE||t.name!=="style"||((e=t.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(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return r==null?e:e+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(t,[e]){const{style:n}=t.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("-")?n.removeProperty(r):n[r]=null);for(const r in e){const o=e[r];if(o!=null){this.ft.add(r);const i=typeof o=="string"&&o.endsWith(PE);r.includes("-")||i?n.setProperty(r,i?o.slice(0,-11):o,i?Qp:""):n[r]=o}}return Xr}}),OE="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",NE=`
|
|
33
33
|
.genome-spy {
|
|
34
34
|
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
35
35
|
position: relative;
|
|
@@ -47,6 +47,9 @@
|
|
|
47
47
|
opacity: 1;
|
|
48
48
|
transition: transform 0.6s, opacity 0.6s;
|
|
49
49
|
}
|
|
50
|
+
.genome-spy canvas:focus, .genome-spy canvas:focus-visible {
|
|
51
|
+
outline: none;
|
|
52
|
+
}
|
|
50
53
|
.genome-spy .loading-message {
|
|
51
54
|
position: absolute;
|
|
52
55
|
inset: 0;
|
|
@@ -118,9 +121,17 @@
|
|
|
118
121
|
padding: 10px;
|
|
119
122
|
font-size: 12px;
|
|
120
123
|
box-shadow: 0px 3px 15px 0px rgba(0, 0, 0, 0.21);
|
|
121
|
-
|
|
124
|
+
transition: outline-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
|
|
125
|
+
outline: 0px solid transparent;
|
|
122
126
|
z-index: 100;
|
|
123
127
|
}
|
|
128
|
+
.genome-spy .tooltip:not(.sticky) {
|
|
129
|
+
pointer-events: none;
|
|
130
|
+
}
|
|
131
|
+
.genome-spy .tooltip.sticky {
|
|
132
|
+
outline: 2px solid black;
|
|
133
|
+
box-shadow: 0px 3px 18px 0px rgba(0, 0, 0, 0.3);
|
|
134
|
+
}
|
|
124
135
|
.genome-spy .tooltip > :last-child {
|
|
125
136
|
margin-bottom: 0;
|
|
126
137
|
}
|
|
@@ -222,33 +233,45 @@
|
|
|
222
233
|
font-size: 14px;
|
|
223
234
|
padding: 10px;
|
|
224
235
|
}
|
|
225
|
-
`;function
|
|
236
|
+
`;function zE(t,e){var n=t.getBoundingClientRect();return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}function Dc(t,e){return t.length==e.length&&t.every((n,r)=>t[r]===e[r])}function Yt(t){return Array.isArray(t)?t:typeof t<"u"?[t]:[]}function Rs(t){return t[t.length-1]}class UE{constructor(e){ge(this,ir,!1);ge(this,Mo,!0);ge(this,Ti);ge(this,Di,0);ge(this,Po);ge(this,Fa,0);ge(this,jt);ge(this,Nr);ge(this,Lo,[!0]);Te(this,Nr,e),Te(this,jt,document.createElement("div")),W(this,jt).className="tooltip",W(this,Nr).appendChild(W(this,jt)),this.clear()}set sticky(e){!e&&W(this,ir)&&this.clear(),Te(this,ir,e),W(this,jt).classList.toggle("sticky",W(this,ir))}get sticky(){return W(this,ir)}set visible(e){e!=W(this,Mo)&&(W(this,jt).style.display=e?null:"none",Te(this,Mo,e))}get visible(){return W(this,Mo)}get enabled(){return Rs(W(this,Lo))??!0}pushEnabledState(e){W(this,Lo).push(e),e||(this.visible=!1)}popEnabledState(){W(this,Lo).pop()}handleMouseMove(e){if(W(this,ir))return;this.mouseCoords=zE(W(this,Nr),e);const n=performance.now();!this.visible&&!this._isPenalty()&&n-W(this,Fa)>500&&Te(this,Di,n+70),W(this,Po)&&GE(this.mouseCoords,W(this,Po))>20&&Te(this,Di,n+400),Te(this,Po,this.mouseCoords),this.visible&&this.updatePlacement(),Te(this,Fa,n)}updatePlacement(){const[n,r]=this.mouseCoords;let o=n+20;o>W(this,Nr).clientWidth-W(this,jt).offsetWidth&&(o=n-20-W(this,jt).offsetWidth),W(this,jt).style.left=o+"px",W(this,jt).style.top=Math.min(r+20,W(this,Nr).clientHeight-W(this,jt).offsetHeight)+"px"}setContent(e){if(!W(this,ir)){if(!e||!this.enabled||this._isPenalty()){this.visible&&(hs("",W(this,jt)),this.visible=!1),Te(this,Ti,void 0);return}hs(e,W(this,jt)),this.visible=!0,this.updatePlacement()}}clear(){Te(this,Ti,void 0),this.setContent(void 0)}updateWithDatum(e,n){e!==W(this,Ti)&&(Te(this,Ti,e),n||(n=r=>Promise.resolve(ot` ${JSON.stringify(r)} `)),n(e).then(r=>this.setContent(r)).catch(r=>{if(r!=="debounced")throw r}))}_isPenalty(){return W(this,Di)&&W(this,Di)>performance.now()}}ir=new WeakMap,Mo=new WeakMap,Ti=new WeakMap,Di=new WeakMap,Po=new WeakMap,Fa=new WeakMap,jt=new WeakMap,Nr=new WeakMap,Lo=new WeakMap;function GE(t,e){let n=0;for(let r=0;r<t.length;r++)n+=(t[r]-e[r])**2;return Math.sqrt(n)}/* @license twgl.js 4.24.0 Copyright (c) 2015, Gregg Tavares All Rights Reserved.
|
|
226
237
|
Available via the MIT license.
|
|
227
|
-
see: http://github.com/greggman/twgl.js for details */const Pu=5120,xs=5121,Lu=5122,Nu=5123,Ou=5124,zu=5125,Uu=5126,xE=32819,vE=32820,AE=33635,EE=5131,SE=33640,CE=35899,IE=35902,TE=36269,DE=34042,Pp={};{const t=Pp;t[Pu]=Int8Array,t[xs]=Uint8Array,t[Lu]=Int16Array,t[Nu]=Uint16Array,t[Ou]=Int32Array,t[zu]=Uint32Array,t[Uu]=Float32Array,t[xE]=Uint16Array,t[vE]=Uint16Array,t[AE]=Uint16Array,t[EE]=Uint16Array,t[SE]=Uint32Array,t[CE]=Uint32Array,t[IE]=Uint32Array,t[TE]=Uint32Array,t[DE]=Uint32Array}function Gu(t){if(t instanceof Int8Array)return Pu;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)return xs;if(t instanceof Int16Array)return Lu;if(t instanceof Uint16Array)return Nu;if(t instanceof Int32Array)return Ou;if(t instanceof Uint32Array)return zu;if(t instanceof Float32Array)return Uu;throw new Error("unsupported typed array type")}function BE(t){if(t===Int8Array)return Pu;if(t===Uint8Array||t===Uint8ClampedArray)return xs;if(t===Int16Array)return Lu;if(t===Uint16Array)return Nu;if(t===Int32Array)return Ou;if(t===Uint32Array)return zu;if(t===Float32Array)return Uu;throw new Error("unsupported typed array type")}function _E(t){const e=Pp[t];if(!e)throw new Error("unknown gl type");return e}const mc=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 kE(...t){console.error(...t)}function Lp(...t){console.warn(...t)}function RE(t,e){return typeof WebGLBuffer<"u"&&e instanceof WebGLBuffer}function Np(t,e){return typeof WebGLRenderbuffer<"u"&&e instanceof WebGLRenderbuffer}function bc(t,e){return typeof WebGLTexture<"u"&&e instanceof WebGLTexture}function FE(t,e){return typeof WebGLSampler<"u"&&e instanceof WebGLSampler}const Op=35044,_n=34962,ME=34963,PE=34660,LE=5120,NE=5121,OE=5122,zE=5123,UE=5124,GE=5125,HE=5126,zp={attribPrefix:""};function Up(t,e,n,r,o){t.bindBuffer(e,n),t.bufferData(e,r,o||Op)}function Gp(t,e,n,r){if(RE(t,e))return e;n=n||_n;const o=t.createBuffer();return Up(t,n,o,e,r),o}function Hp(t){return t==="indices"}function VE(t){return t instanceof Int8Array||t instanceof Uint8Array}function qE(t){return t===Int8Array||t===Uint8Array}function jE(t){return t.length?t:t.data}const WE=/coord|texture/i,QE=/color|colour/i;function Vp(t,e){let n;if(WE.test(t)?n=2:QE.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 YE(t,e){return t.numComponents||t.size||Vp(e,jE(t).length)}function Hu(t,e){if(mc(t))return t;if(mc(t.data))return t.data;Array.isArray(t)&&(t={data:t});let n=t.type;return n||(Hp(e)?n=Uint16Array:n=Float32Array),new n(t.data)}function ZE(t,e){const n={};return Object.keys(e).forEach(function(r){if(!Hp(r)){const o=e[r],i=o.attrib||o.name||o.attribName||zp.attribPrefix+r;if(o.value){if(!Array.isArray(o.value)&&!mc(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,h=u*f.BYTES_PER_ELEMENT;a=BE(f),c=o.normalize!==void 0?o.normalize:qE(f),l=o.numComponents||o.size||Vp(r,u),s=t.createBuffer(),t.bindBuffer(_n,s),t.bufferData(_n,h,o.drawType||Op)}else{const u=Hu(o,r);s=Gp(t,u,void 0,o.drawType),a=Gu(u),c=o.normalize!==void 0?o.normalize:VE(u),l=YE(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(_n,null),n}function XE(t,e,n,r){n=Hu(n),r!==void 0?(t.bindBuffer(_n,e.buffer),t.bufferSubData(_n,r,n)):Up(t,_n,e.buffer,n,e.drawType)}function KE(t,e){return e===LE||e===NE?1:e===OE||e===zE?2:e===UE||e===GE||e===HE?4:0}const Vu=["position","positions","a_position"];function JE(t,e){let n,r;for(r=0;r<Vu.length&&(n=Vu[r],!(n in e||(n=zp.attribPrefix+n,n in e)));++r);r===Vu.length&&(n=Object.keys(e)[0]);const o=e[n];if(!o.buffer)return 1;t.bindBuffer(_n,o.buffer);const i=t.getBufferParameter(_n,PE);t.bindBuffer(_n,null);const s=KE(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 $E(t,e,n){const r=ZE(t,e),o=Object.assign({},n||{});o.attribs=Object.assign({},n?n.attribs:{},r);const i=e.indices;if(i){const s=Hu(i,"indices");o.indices=Gp(t,s,ME),o.numElements=s.length,o.elementType=Gu(s)}else o.numElements||(o.numElements=JE(t,o.attribs));return o}function qi(t){return!!t.texStorage2D}const qu=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)}}(),gr={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},ji=mc,qp=function(){let t;return function(){return t=t||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),t}}(),jp=6406,kn=6407,st=6408,Wp=6409,Qp=6410,vs=6402,Yp=34041,yc=33071,eS=9728,tS=9729,Yn=3553,Zn=34067,mr=32879,br=35866,wc=34069,nS=34070,rS=34071,iS=34072,oS=34073,sS=34074,ju=10241,Wu=10240,xc=10242,vc=10243,Zp=32882,aS=33082,cS=33083,lS=33084,uS=33085,Qu=3317,Xp=3314,Kp=32878,Jp=3316,$p=3315,eg=32877,fS=37443,hS=37441,dS=37440,pS=33321,gS=36756,mS=33325,bS=33326,yS=33330,wS=33329,xS=33338,vS=33337,AS=33340,ES=33339,SS=33323,CS=36757,IS=33327,TS=33328,DS=33336,BS=33335,_S=33332,kS=33331,RS=33334,FS=33333,MS=32849,PS=35905,LS=36194,NS=36758,OS=35898,zS=35901,US=34843,GS=34837,HS=36221,VS=36239,qS=36215,jS=36233,WS=36209,QS=36227,YS=32856,ZS=35907,XS=36759,KS=32855,JS=32854,$S=32857,e4=34842,t4=34836,n4=36220,r4=36238,i4=36975,o4=36214,s4=36232,a4=36226,c4=36208,l4=33189,u4=33190,f4=36012,h4=36013,d4=35056,yr=5120,at=5121,Ac=5122,Wi=5123,Ec=5124,$r=5125,Mt=5126,tg=32819,ng=32820,rg=33635,yn=5131,As=36193,Yu=33640,p4=35899,g4=35902,m4=36269,b4=34042,Sc=33319,Qi=33320,Cc=6403,Yi=36244,Zi=36248,ei=36249;let Zu;function Ic(t){if(!Zu){const e={};e[jp]={textureFormat:jp,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,yn,As,Mt]},e[Wp]={textureFormat:Wp,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,yn,As,Mt]},e[Qp]={textureFormat:Qp,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[at,yn,As,Mt]},e[kn]={textureFormat:kn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[at,yn,As,Mt,rg]},e[st]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[at,yn,As,Mt,tg,ng]},e[vs]={textureFormat:vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[$r,Wi]},e[pS]={textureFormat:Cc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[at]},e[gS]={textureFormat:Cc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[yr]},e[mS]={textureFormat:Cc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Mt,yn]},e[bS]={textureFormat:Cc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[yS]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[at]},e[wS]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[yr]},e[_S]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Wi]},e[kS]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Ac]},e[RS]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[$r]},e[FS]={textureFormat:Yi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ec]},e[SS]={textureFormat:Sc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[at]},e[CS]={textureFormat:Sc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[yr]},e[IS]={textureFormat:Sc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Mt,yn]},e[TS]={textureFormat:Sc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Mt]},e[DS]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[at]},e[BS]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[yr]},e[xS]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Wi]},e[vS]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ac]},e[AS]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[$r]},e[ES]={textureFormat:Qi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Ec]},e[MS]={textureFormat:kn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[PS]={textureFormat:kn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[LS]={textureFormat:kn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[at,rg]},e[NS]={textureFormat:kn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[yr]},e[OS]={textureFormat:kn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,yn,p4]},e[zS]={textureFormat:kn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,yn,g4]},e[US]={textureFormat:kn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Mt,yn]},e[GS]={textureFormat:kn,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Mt]},e[HS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[at]},e[VS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[yr]},e[qS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Wi]},e[jS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Ac]},e[WS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[$r]},e[QS]={textureFormat:Zi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Ec]},e[YS]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[ZS]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[XS]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[yr]},e[KS]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[at,ng,Yu]},e[JS]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[at,tg]},e[$S]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Yu]},e[e4]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Mt,yn]},e[t4]={textureFormat:st,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Mt]},e[n4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[at]},e[r4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[yr]},e[i4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Yu]},e[o4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Wi]},e[s4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Ac]},e[a4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Ec]},e[c4]={textureFormat:ei,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[$r]},e[l4]={textureFormat:vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Wi,$r]},e[u4]={textureFormat:vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[$r]},e[f4]={textureFormat:vs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[d4]={textureFormat:Yp,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[b4]},e[h4]={textureFormat:Yp,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[m4]},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})}),Zu=e}return Zu[t]}function y4(t,e){const n=Ic(t);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[e];if(r===void 0)throw"unknown internal format";return r}function Xi(t){const e=Ic(t);if(!e)throw"unknown internal format";return{format:e.textureFormat,type:e.type[0]}}function ig(t){return(t&t-1)===0}function w4(t,e,n,r){if(!qi(t))return ig(e)&&ig(n);const o=Ic(r);if(!o)throw"unknown internal format";return o.colorRenderable&&o.textureFilterable}function x4(t){const e=Ic(t);if(!e)throw"unknown internal format";return e.textureFilterable}function og(t,e,n){return ji(e)?Gu(e):n||at}function Tc(t,e,n,r,o){if(o%1!==0)throw"can't guess dimensions";if(!n&&!r){const i=Math.sqrt(o/(e===Zn?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 Ki(t,e){e.colorspaceConversion!==void 0&&t.pixelStorei(fS,e.colorspaceConversion),e.premultiplyAlpha!==void 0&&t.pixelStorei(hS,e.premultiplyAlpha),e.flipY!==void 0&&t.pixelStorei(dS,e.flipY)}function sg(t){t.pixelStorei(Qu,4),qi(t)&&(t.pixelStorei(Xp,0),t.pixelStorei(Kp,0),t.pixelStorei(Jp,0),t.pixelStorei($p,0),t.pixelStorei(eg,0))}function v4(t,e,n,r){r.minMag&&(n.call(t,e,ju,r.minMag),n.call(t,e,Wu,r.minMag)),r.min&&n.call(t,e,ju,r.min),r.mag&&n.call(t,e,Wu,r.mag),r.wrap&&(n.call(t,e,xc,r.wrap),n.call(t,e,vc,r.wrap),(e===mr||FE(t,e))&&n.call(t,e,Zp,r.wrap)),r.wrapR&&n.call(t,e,Zp,r.wrapR),r.wrapS&&n.call(t,e,xc,r.wrapS),r.wrapT&&n.call(t,e,vc,r.wrapT),r.minLod&&n.call(t,e,aS,r.minLod),r.maxLod&&n.call(t,e,cS,r.maxLod),r.baseLevel&&n.call(t,e,lS,r.baseLevel),r.maxLevel&&n.call(t,e,uS,r.maxLevel)}function ag(t,e,n){const r=n.target||Yn;t.bindTexture(r,e),v4(t,r,t.texParameteri,n)}function A4(t){return t=t||gr.textureColor,ji(t)?t:new Uint8Array([t[0]*255,t[1]*255,t[2]*255,t[3]*255])}function Xu(t,e,n,r,o,i){n=n||gr.textureOptions,i=i||st;const s=n.target||Yn;if(r=r||n.width,o=o||n.height,t.bindTexture(s,e),w4(t,r,o,i))t.generateMipmap(s);else{const a=x4(i)?tS:eS;t.texParameteri(s,ju,a),t.texParameteri(s,Wu,a),t.texParameteri(s,xc,yc),t.texParameteri(s,vc,yc)}}function Es(t){return t.auto===!0||t.auto===void 0&&t.level===void 0}function Ku(t,e){return e=e||{},e.cubeFaceOrder||[wc,nS,rS,iS,oS,sS]}function Ju(t,e){const r=Ku(t,e).map(function(o,i){return{face:o,ndx:i}});return r.sort(function(o,i){return o.face-i.face}),r}function cg(t,e,n,r){r=r||gr.textureOptions;const o=r.target||Yn,i=r.level||0;let s=n.width,a=n.height;const c=r.internalFormat||r.format||st,l=Xi(c),u=r.format||l.format,f=r.type||l.type;if(Ki(t,r),t.bindTexture(o,e),o===Zn){const h=n.width,d=n.height;let p,y;if(h/6===d)p=d,y=[0,0,1,0,2,0,3,0,4,0,5,0];else if(d/6===h)p=h,y=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===d/2)p=h/3,y=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===d/3)p=h/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=qp();v?(v.canvas.width=p,v.canvas.height=p,s=p,a=p,Ju(t,r).forEach(function(b){const A=y[b.ndx*2+0]*p,C=y[b.ndx*2+1]*p;v.drawImage(n,A,C,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,Ju(t,r).forEach(function(b){const A=y[b.ndx*2+0]*p,C=y[b.ndx*2+1]*p;t.texImage2D(b.face,i,c,p,p,0,u,f,null),createImageBitmap(n,A,C,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(E){Ki(t,r),t.bindTexture(o,e),t.texImage2D(b.face,i,c,u,f,E),Es(r)&&Xu(t,e,r,s,a,c)})}))}else if(o===mr||o===br){const h=Math.min(n.width,n.height),d=Math.max(n.width,n.height),p=d/h;if(p%1!==0)throw"can not compute 3D dimensions of element";const y=n.width===d?1:0,v=n.height===d?1:0;t.pixelStorei(Qu,1),t.pixelStorei(Xp,n.width),t.pixelStorei(Kp,0),t.pixelStorei(eg,0),t.texImage3D(o,i,c,h,h,h,0,u,f,null);for(let b=0;b<p;++b){const A=b*h*y,C=b*h*v;t.pixelStorei(Jp,A),t.pixelStorei($p,C),t.texSubImage3D(o,i,0,0,b,h,h,1,u,f,n)}sg(t)}else t.texImage2D(o,i,c,u,f,n);Es(r)&&Xu(t,e,r,s,a,c),ag(t,e,r)}function Ss(){}function E4(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 S4(t,e){return e===void 0&&!E4(t)?"anonymous":e}function C4(t,e,n){n=n||Ss;let r;if(e=e!==void 0?e:gr.crossOrigin,e=S4(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;kE(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 lg(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof ImageData<"u"&&t instanceof ImageData||typeof HTMLElement<"u"&&t instanceof HTMLElement}function $u(t,e,n){return lg(t)?(setTimeout(function(){n(null,t)}),t):C4(t,e,n)}function ef(t,e,n){n=n||gr.textureOptions;const r=n.target||Yn;if(t.bindTexture(r,e),n.color===!1)return;const o=A4(n.color);if(r===Zn)for(let i=0;i<6;++i)t.texImage2D(wc+i,0,st,1,1,0,st,at,o);else r===mr||r===br?t.texImage3D(r,0,st,1,1,1,0,st,at,o):t.texImage2D(r,0,st,1,1,0,st,at,o)}function I4(t,e,n,r){return r=r||Ss,n=n||gr.textureOptions,ef(t,e,n),n=Object.assign({},n),$u(n.src,n.crossOrigin,function(i,s){i?r(i,e,s):(cg(t,e,s,n),r(null,e,s))})}function T4(t,e,n,r){r=r||Ss;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=Xi(s),c=n.format||a.format,l=n.type||at,u=n.target||Yn;if(u!==Zn)throw"target must be TEXTURE_CUBE_MAP";ef(t,e,n),n=Object.assign({},n);let f=6;const h=[],d=Ku(t,n);let p;function y(v){return function(b,A){--f,b?h.push(b):A.width!==A.height?h.push("cubemap face img is not a square: "+A.src):(Ki(t,n),t.bindTexture(u,e),f===5?Ku().forEach(function(C){t.texImage2D(C,i,s,c,l,A)}):t.texImage2D(v,i,s,c,l,A),Es(n)&&t.generateMipmap(u)),f===0&&r(h.length?h:void 0,e,p)}}p=o.map(function(v,b){return $u(v,n.crossOrigin,y(d[b]))})}function D4(t,e,n,r){r=r||Ss;const o=n.src,i=n.internalFormat||n.format||st,s=Xi(i),a=n.format||s.format,c=n.type||at,l=n.target||br;if(l!==mr&&l!==br)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";ef(t,e,n),n=Object.assign({},n);let u=o.length;const f=[];let h;const d=n.level||0;let p=n.width,y=n.height;const v=o.length;let b=!0;function A(C){return function(E,I){if(--u,E)f.push(E);else{if(Ki(t,n),t.bindTexture(l,e),b){b=!1,p=n.width||I.width,y=n.height||I.height,t.texImage3D(l,d,i,p,y,v,0,a,c,null);for(let R=0;R<v;++R)t.texSubImage3D(l,d,0,0,R,p,y,1,a,c,I)}else{let R=I,B;(I.width!==p||I.height!==y)&&(B=qp(),R=B.canvas,B.canvas.width=p,B.canvas.height=y,B.drawImage(I,0,0,p,y)),t.texSubImage3D(l,d,0,0,C,p,y,1,a,c,R),B&&R===B.canvas&&(B.canvas.width=0,B.canvas.height=0)}Es(n)&&t.generateMipmap(l)}u===0&&r(f.length?f:void 0,e,h)}}h=o.map(function(C,E){return $u(C,n.crossOrigin,A(E))})}function ug(t,e,n,r){r=r||gr.textureOptions;const o=r.target||Yn;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=Xi(l),f=r.format||u.format,h=r.type||og(t,n,u.type);if(ji(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const v=_E(h);n=new v(n)}const d=y4(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+qu(t,f);let y;if(o===mr||o===br)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=Tc(t,o,s,a,p/i),s=y.width,a=y.height):s&&(!i||!a)?(y=Tc(t,o,i,a,p/s),i=y.width,a=y.height):(y=Tc(t,o,i,s,p/a),i=y.width,s=y.height);else y=Tc(t,o,i,s,p),i=y.width,s=y.height;if(sg(t),t.pixelStorei(Qu,r.unpackAlignment||1),Ki(t,r),o===Zn){const v=d/n.BYTES_PER_ELEMENT,b=p/6*v;Ju(t,r).forEach(A=>{const C=b*A.ndx,E=n.subarray(C,C+b);t.texImage2D(A.face,c,l,i,s,0,f,h,E)})}else o===mr||o===br?t.texImage3D(o,c,l,i,s,a,0,f,h,n):t.texImage2D(o,c,l,i,s,0,f,h,n);return{width:i,height:s,depth:a,type:h}}function B4(t,e,n){const r=n.target||Yn;t.bindTexture(r,e);const o=n.level||0,i=n.internalFormat||n.format||st,s=Xi(i),a=n.format||s.format,c=n.type||s.type;if(Ki(t,n),r===Zn)for(let l=0;l<6;++l)t.texImage2D(wc+l,o,i,n.width,n.height,0,a,c,null);else r===mr||r===br?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 Cs(t,e,n){n=n||Ss,e=e||gr.textureOptions;const r=t.createTexture(),o=e.target||Yn;let i=e.width||1,s=e.height||1;const a=e.internalFormat||st;t.bindTexture(o,r),o===Zn&&(t.texParameteri(o,xc,yc),t.texParameteri(o,vc,yc));let c=e.src;if(c)if(typeof c=="function"&&(c=c(t,e)),typeof c=="string")I4(t,r,e,n);else if(ji(c)||Array.isArray(c)&&(typeof c[0]=="number"||Array.isArray(c[0])||ji(c[0]))){const l=ug(t,r,c,e);i=l.width,s=l.height}else Array.isArray(c)&&(typeof c[0]=="string"||lg(c[0]))?o===Zn?T4(t,r,e,n):D4(t,r,e,n):(cg(t,r,c,e),i=c.width,s=c.height);else B4(t,r,e);return Es(e)&&Xu(t,r,e,i,s,a),ag(t,r,e),r}function _4(t,e,n,r,o,i){r=r||n.width,o=o||n.height,i=i||n.depth;const s=n.target||Yn;t.bindTexture(s,e);const a=n.level||0,c=n.internalFormat||n.format||st,l=Xi(c),u=n.format||l.format;let f;const h=n.src;if(h&&(ji(h)||Array.isArray(h)&&typeof h[0]=="number")?f=n.type||og(t,h,l.type):f=n.type||l.type,s===Zn)for(let d=0;d<6;++d)t.texImage2D(wc+d,a,c,r,o,0,u,f,null);else s===mr||s===br?t.texImage3D(s,a,c,r,o,i,0,u,f,null):t.texImage2D(s,a,c,r,o,0,u,f,null)}const k4=Lp,Dc=33984,R4=35048,Bc=34962,F4=34963,tf=35345,fg=35718,M4=35721,P4=35971,L4=35382,N4=35396,O4=35398,z4=35392,U4=35395,_c=5126,hg=35664,dg=35665,pg=35666,nf=5124,gg=35667,mg=35668,bg=35669,yg=35670,wg=35671,xg=35672,vg=35673,Ag=35674,Eg=35675,Sg=35676,G4=35678,H4=35680,V4=35679,q4=35682,j4=35685,W4=35686,Q4=35687,Y4=35688,Z4=35689,X4=35690,K4=36289,J4=36292,$4=36293,rf=5125,Cg=36294,Ig=36295,Tg=36296,eC=36298,tC=36299,nC=36300,rC=36303,iC=36306,oC=36307,sC=36308,aC=36311,kc=3553,Rc=34067,of=32879,Fc=35866,Oe={};function Dg(t,e){return Oe[e].bindPoint}function cC(t,e){return function(n){t.uniform1f(e,n)}}function lC(t,e){return function(n){t.uniform1fv(e,n)}}function uC(t,e){return function(n){t.uniform2fv(e,n)}}function fC(t,e){return function(n){t.uniform3fv(e,n)}}function hC(t,e){return function(n){t.uniform4fv(e,n)}}function Bg(t,e){return function(n){t.uniform1i(e,n)}}function _g(t,e){return function(n){t.uniform1iv(e,n)}}function kg(t,e){return function(n){t.uniform2iv(e,n)}}function Rg(t,e){return function(n){t.uniform3iv(e,n)}}function Fg(t,e){return function(n){t.uniform4iv(e,n)}}function dC(t,e){return function(n){t.uniform1ui(e,n)}}function pC(t,e){return function(n){t.uniform1uiv(e,n)}}function gC(t,e){return function(n){t.uniform2uiv(e,n)}}function mC(t,e){return function(n){t.uniform3uiv(e,n)}}function bC(t,e){return function(n){t.uniform4uiv(e,n)}}function yC(t,e){return function(n){t.uniformMatrix2fv(e,!1,n)}}function wC(t,e){return function(n){t.uniformMatrix3fv(e,!1,n)}}function xC(t,e){return function(n){t.uniformMatrix4fv(e,!1,n)}}function vC(t,e){return function(n){t.uniformMatrix2x3fv(e,!1,n)}}function AC(t,e){return function(n){t.uniformMatrix3x2fv(e,!1,n)}}function EC(t,e){return function(n){t.uniformMatrix2x4fv(e,!1,n)}}function SC(t,e){return function(n){t.uniformMatrix4x2fv(e,!1,n)}}function CC(t,e){return function(n){t.uniformMatrix3x4fv(e,!1,n)}}function IC(t,e){return function(n){t.uniformMatrix4x3fv(e,!1,n)}}function Ht(t,e,n,r){const o=Dg(t,e);return qi(t)?function(i){let s,a;bc(t,i)?(s=i,a=null):(s=i.texture,a=i.sampler),t.uniform1i(r,n),t.activeTexture(Dc+n),t.bindTexture(o,s),t.bindSampler(n,a)}:function(i){t.uniform1i(r,n),t.activeTexture(Dc+n),t.bindTexture(o,i)}}function Vt(t,e,n,r,o){const i=Dg(t,e),s=new Int32Array(o);for(let a=0;a<o;++a)s[a]=n+a;return qi(t)?function(a){t.uniform1iv(r,s),a.forEach(function(c,l){t.activeTexture(Dc+s[l]);let u,f;bc(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(Dc+s[l]),t.bindTexture(i,c)})}}Oe[_c]={Type:Float32Array,size:4,setter:cC,arraySetter:lC},Oe[hg]={Type:Float32Array,size:8,setter:uC,cols:2},Oe[dg]={Type:Float32Array,size:12,setter:fC,cols:3},Oe[pg]={Type:Float32Array,size:16,setter:hC,cols:4},Oe[nf]={Type:Int32Array,size:4,setter:Bg,arraySetter:_g},Oe[gg]={Type:Int32Array,size:8,setter:kg,cols:2},Oe[mg]={Type:Int32Array,size:12,setter:Rg,cols:3},Oe[bg]={Type:Int32Array,size:16,setter:Fg,cols:4},Oe[rf]={Type:Uint32Array,size:4,setter:dC,arraySetter:pC},Oe[Cg]={Type:Uint32Array,size:8,setter:gC,cols:2},Oe[Ig]={Type:Uint32Array,size:12,setter:mC,cols:3},Oe[Tg]={Type:Uint32Array,size:16,setter:bC,cols:4},Oe[yg]={Type:Uint32Array,size:4,setter:Bg,arraySetter:_g},Oe[wg]={Type:Uint32Array,size:8,setter:kg,cols:2},Oe[xg]={Type:Uint32Array,size:12,setter:Rg,cols:3},Oe[vg]={Type:Uint32Array,size:16,setter:Fg,cols:4},Oe[Ag]={Type:Float32Array,size:32,setter:yC,rows:2,cols:2},Oe[Eg]={Type:Float32Array,size:48,setter:wC,rows:3,cols:3},Oe[Sg]={Type:Float32Array,size:64,setter:xC,rows:4,cols:4},Oe[j4]={Type:Float32Array,size:32,setter:vC,rows:2,cols:3},Oe[W4]={Type:Float32Array,size:32,setter:EC,rows:2,cols:4},Oe[Q4]={Type:Float32Array,size:48,setter:AC,rows:3,cols:2},Oe[Y4]={Type:Float32Array,size:48,setter:CC,rows:3,cols:4},Oe[Z4]={Type:Float32Array,size:64,setter:SC,rows:4,cols:2},Oe[X4]={Type:Float32Array,size:64,setter:IC,rows:4,cols:3},Oe[G4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:kc},Oe[H4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Rc},Oe[V4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:of},Oe[q4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:kc},Oe[K4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Fc},Oe[J4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Fc},Oe[$4]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Rc},Oe[eC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:kc},Oe[tC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:of},Oe[nC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Rc},Oe[rC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Fc},Oe[iC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:kc},Oe[oC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:of},Oe[sC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Rc},Oe[aC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Fc};function Mc(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(Bc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribPointer(e,n.numComponents||n.size,n.type||_c,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function wr(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(Bc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||nf,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function Pc(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(Bc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||rf,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function sf(t,e,n){const r=n.size,o=n.count;return function(i){t.bindBuffer(Bc,i.buffer);const s=i.size||i.numComponents||r,a=s/o,c=i.type||_c,u=Oe[c].size*s,f=i.normalize||!1,h=i.offset||0,d=u/o;for(let p=0;p<o;++p)t.enableVertexAttribArray(e+p),t.vertexAttribPointer(e+p,a,c,f,u,h+d*p),i.divisor!==void 0&&t.vertexAttribDivisor(e+p,i.divisor)}}const gt={};gt[_c]={size:4,setter:Mc},gt[hg]={size:8,setter:Mc},gt[dg]={size:12,setter:Mc},gt[pg]={size:16,setter:Mc},gt[nf]={size:4,setter:wr},gt[gg]={size:8,setter:wr},gt[mg]={size:12,setter:wr},gt[bg]={size:16,setter:wr},gt[rf]={size:4,setter:Pc},gt[Cg]={size:8,setter:Pc},gt[Ig]={size:12,setter:Pc},gt[Tg]={size:16,setter:Pc},gt[yg]={size:4,setter:wr},gt[wg]={size:8,setter:wr},gt[xg]={size:12,setter:wr},gt[vg]={size:16,setter:wr},gt[Ag]={size:4,setter:sf,count:2},gt[Eg]={size:9,setter:sf,count:3},gt[Sg]={size:16,setter:sf,count:4};function Mg(t){const e=t.name;return e.startsWith("gl_")||e.startsWith("webgl_")}const TC=/(\.|\[|]|\w+)/g,DC=t=>t>="0"&&t<="9";function Pg(t,e,n,r){const o=t.split(TC).filter(a=>a!=="");let i=0,s="";for(;;){const a=o[i++];s+=a;const c=DC(a[0]),l=c?parseInt(a):a;if(c&&(s+=o[i++]),i===o.length){n[l]=e;break}else{const f=o[i++],h=f==="[",d=n[l]||(h?[]:{});n[l]=d,n=d,r[s]=r[s]||function(p){return function(y){Ug(p,y)}}(d),s+=f}}}function BC(t,e){let n=0;function r(a,c,l){const u=c.name.endsWith("[0]"),f=c.type,h=Oe[f];if(!h)throw new Error(`unknown type: 0x${f.toString(16)}`);let d;if(h.bindPoint){const p=n;n+=c.size,u?d=h.arraySetter(t,f,p,l,c.size):d=h.setter(t,f,p,l,c.size)}else h.arraySetter&&u?d=h.arraySetter(t,l):d=h.setter(t,l);return d.location=l,d}const o={},i={},s=t.getProgramParameter(e,fg);for(let a=0;a<s;++a){const c=t.getActiveUniform(e,a);if(Mg(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,Pg(l,f,i,o)}}return o}function _C(t,e){const n={},r=t.getProgramParameter(e,P4);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 kC(t,e){const n=t.getProgramParameter(e,fg),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,L4);for(let a=0;a<s;++a){const c=t.getActiveUniformBlockName(e,a),l={index:t.getUniformBlockIndex(e,c),usedByVertexShader:t.getActiveUniformBlockParameter(e,a,N4),usedByFragmentShader:t.getActiveUniformBlockParameter(e,a,O4),size:t.getActiveUniformBlockParameter(e,a,z4),uniformIndices:t.getActiveUniformBlockParameter(e,a,U4)};l.used=l.usedByVertexShader||l.usedByFragmentShader,i[c]=l}return{blockSpecs:i,uniformData:r}}const Lg=/\[\d+\]\.$/,RC=(t,e)=>((t+(e-1))/e|0)*e;function FC(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 MC(t,e,n,r){const o=n.blockSpecs,i=n.uniformData,s=o[r];if(!s)return k4("no uniform block object named:",r),{name:r,uniforms:{}};const a=new ArrayBuffer(s.size),c=t.createBuffer(),l=s.index;t.bindBuffer(tf,c),t.uniformBlockBinding(e,s.index,l);let u=r+".";Lg.test(u)&&(u=u.replace(Lg,"."));const f={},h={},d={};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],C=A.Type,E=b?RC(A.size,16)*y.size:A.size*y.size,I=new C(a,y.offset,E/C.BYTES_PER_ELEMENT);f[v]=I;const R=FC(I,b,A.rows,A.cols);h[v]=R,Pg(v,R,d,h)}),{name:r,array:a,asFloat:new Float32Array(a),buffer:c,uniforms:f,setters:h}}function Ng(t,e,n){return MC(t,e.program,e.uniformBlockSpec,n)}function Og(t,e,n){const o=(e.uniformBlockSpec||e).blockSpecs[n.name];if(o){const i=o.index;return t.bindBufferRange(tf,i,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function zg(t,e,n){Og(t,e,n)&&t.bufferData(tf,n.array,R4)}function Is(t,e){const n=t.setters;for(const r in e){const o=n[r];if(o){const i=e[r];o(i)}}}function Ug(t,e){for(const n in e){const r=t[n];typeof r=="function"?r(e[n]):Ug(t[n],e[n])}}function ti(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)ti(n,i[a])}else for(const s in i){const a=n[s];a&&a(i[s])}}}function PC(t,e){const n={},r=t.getProgramParameter(e,M4);for(let o=0;o<r;++o){const i=t.getActiveAttrib(e,o);if(Mg(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 LC(t,e){for(const n in e){const r=t[n];r&&r(e[n])}}function ni(t,e,n){n.vertexArrayObject?t.bindVertexArray(n.vertexArrayObject):(LC(e.attribSetters||e,n.attribs),n.indices&&t.bindBuffer(F4,n.indices))}function NC(t,e){const n=BC(t,e),r=PC(t,e),o={program:e,uniformSetters:n,attribSetters:r};return qi(t)&&(o.uniformBlockSpec=kC(t,e),o.transformFeedbackInfo=_C(t,e)),o}const OC=4,Gg=5123;function Lc(t,e,n,r,o,i){n=n===void 0?OC: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?Gg:e.elementType,o,i):t.drawElements(n,c,a===void 0?Gg:e.elementType,o):i!==void 0?t.drawArraysInstanced(n,o,c,i):t.drawArrays(n,o,c)}const zC=36160,ri=36161,UC=3553,GC=5121,HC=6402,VC=6408,qC=33190,jC=36012,WC=35056,QC=36013,YC=32854,ZC=32855,XC=36194,Hg=33189,Vg=6401,qg=36168,af=34041,cf=36064,Nc=36096,jg=36128,lf=33306,uf=33071,ff=9729,Wg=[{format:VC,type:GC,min:ff,wrap:uf},{format:af}],wn={};wn[af]=lf,wn[Vg]=jg,wn[qg]=jg,wn[HC]=Nc,wn[Hg]=Nc,wn[qC]=Nc,wn[jC]=Nc,wn[WC]=lf,wn[QC]=lf;function KC(t,e){return wn[t]||wn[e]}const xr={};xr[YC]=!0,xr[ZC]=!0,xr[XC]=!0,xr[af]=!0,xr[Hg]=!0,xr[Vg]=!0,xr[qg]=!0;function JC(t){return xr[t]}const $C=32;function e6(t){return t>=cf&&t<cf+$C}function t6(t,e,n,r){const o=zC,i=t.createFramebuffer();t.bindFramebuffer(o,i),n=n||t.drawingBufferWidth,r=r||t.drawingBufferHeight,e=e||Wg;const s=[],a={framebuffer:i,attachments:[],width:n,height:r};return e.forEach(function(c,l){let u=c.attachment;const f=c.samples,h=c.format;let d=c.attachmentPoint||KC(h,c.internalFormat);if(d||(d=cf+l),e6(d)&&s.push(d),!u)if(f!==void 0||JC(h))u=t.createRenderbuffer(),t.bindRenderbuffer(ri,u),f>1?t.renderbufferStorageMultisample(ri,f,h,n,r):t.renderbufferStorage(ri,h,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||ff,p.mag=p.mag||p.minMag||ff,p.wrapS=p.wrapS||p.wrap||uf,p.wrapT=p.wrapT||p.wrap||uf),u=Cs(t,p)}if(Np(t,u))t.framebufferRenderbuffer(o,d,ri,u);else if(bc(t,u))c.layer!==void 0?t.framebufferTextureLayer(o,d,u,c.level||0,c.layer):t.framebufferTexture2D(o,d,c.target||UC,u,c.level||0);else throw new Error("unknown attachment type");a.attachments.push(u)}),t.drawBuffers&&t.drawBuffers(s),a}function n6(t,e,n,r,o){r=r||t.drawingBufferWidth,o=o||t.drawingBufferHeight,e.width=r,e.height=o,n=n||Wg,n.forEach(function(i,s){const a=e.attachments[s],c=i.format,l=i.samples;if(l!==void 0||Np(t,a))t.bindRenderbuffer(ri,a),l>1?t.renderbufferStorageMultisample(ri,l,c,r,o):t.renderbufferStorage(ri,c,r,o);else if(bc(t,a))_4(t,a,i,r,o);else throw new Error("unknown attachment type")})}function r6(t,e,n){const r=t.createVertexArray();return t.bindVertexArray(r),e.length||(e=[e]),e.forEach(function(o){ni(t,o,n)}),t.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const i6=/^(.*?)_/;function o6(t,e){qu(t,0);const n=t.getExtension(e);if(n){const r={},o=i6.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&&Lp(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},qu(r,0)}return n}const Qg=["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 Yg(t){for(let e=0;e<Qg.length;++e)o6(t,Qg[e])}function s6(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){Yg(r);break}return r}function a6(t,e){return s6(t,e)}const c6=`out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
|
|
228
|
-
#if defined(ROUNDED_CORNERS) || defined(STROKED)
|
|
238
|
+
see: http://github.com/greggman/twgl.js for details */const Xu=5120,Fs=5121,Ku=5122,Ju=5123,$u=5124,ef=5125,tf=5126,HE=32819,VE=32820,qE=33635,jE=5131,WE=33640,YE=35899,QE=35902,ZE=36269,XE=34042,Zp={};{const t=Zp;t[Xu]=Int8Array,t[Fs]=Uint8Array,t[Ku]=Int16Array,t[Ju]=Uint16Array,t[$u]=Int32Array,t[ef]=Uint32Array,t[tf]=Float32Array,t[HE]=Uint16Array,t[VE]=Uint16Array,t[qE]=Uint16Array,t[jE]=Uint16Array,t[WE]=Uint32Array,t[YE]=Uint32Array,t[QE]=Uint32Array,t[ZE]=Uint32Array,t[XE]=Uint32Array}function nf(t){if(t instanceof Int8Array)return Xu;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)return Fs;if(t instanceof Int16Array)return Ku;if(t instanceof Uint16Array)return Ju;if(t instanceof Int32Array)return $u;if(t instanceof Uint32Array)return ef;if(t instanceof Float32Array)return tf;throw new Error("unsupported typed array type")}function KE(t){if(t===Int8Array)return Xu;if(t===Uint8Array||t===Uint8ClampedArray)return Fs;if(t===Int16Array)return Ku;if(t===Uint16Array)return Ju;if(t===Int32Array)return $u;if(t===Uint32Array)return ef;if(t===Float32Array)return tf;throw new Error("unsupported typed array type")}function JE(t){const e=Zp[t];if(!e)throw new Error("unknown gl type");return e}const Bc=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 $E(...t){console.error(...t)}function Xp(...t){console.warn(...t)}function eS(t,e){return typeof WebGLBuffer<"u"&&e instanceof WebGLBuffer}function Kp(t,e){return typeof WebGLRenderbuffer<"u"&&e instanceof WebGLRenderbuffer}function kc(t,e){return typeof WebGLTexture<"u"&&e instanceof WebGLTexture}function tS(t,e){return typeof WebGLSampler<"u"&&e instanceof WebGLSampler}const Jp=35044,Fn=34962,nS=34963,rS=34660,iS=5120,oS=5121,sS=5122,aS=5123,cS=5124,lS=5125,uS=5126,$p={attribPrefix:""};function eg(t,e,n,r,o){t.bindBuffer(e,n),t.bufferData(e,r,o||Jp)}function tg(t,e,n,r){if(eS(t,e))return e;n=n||Fn;const o=t.createBuffer();return eg(t,n,o,e,r),o}function ng(t){return t==="indices"}function fS(t){return t instanceof Int8Array||t instanceof Uint8Array}function hS(t){return t===Int8Array||t===Uint8Array}function dS(t){return t.length?t:t.data}const pS=/coord|texture/i,gS=/color|colour/i;function rg(t,e){let n;if(pS.test(t)?n=2:gS.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 mS(t,e){return t.numComponents||t.size||rg(e,dS(t).length)}function rf(t,e){if(Bc(t))return t;if(Bc(t.data))return t.data;Array.isArray(t)&&(t={data:t});let n=t.type;return n||(ng(e)?n=Uint16Array:n=Float32Array),new n(t.data)}function bS(t,e){const n={};return Object.keys(e).forEach(function(r){if(!ng(r)){const o=e[r],i=o.attrib||o.name||o.attribName||$p.attribPrefix+r;if(o.value){if(!Array.isArray(o.value)&&!Bc(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=KE(f),c=o.normalize!==void 0?o.normalize:hS(f),l=o.numComponents||o.size||rg(r,u),s=t.createBuffer(),t.bindBuffer(Fn,s),t.bufferData(Fn,d,o.drawType||Jp)}else{const u=rf(o,r);s=tg(t,u,void 0,o.drawType),a=nf(u),c=o.normalize!==void 0?o.normalize:fS(u),l=mS(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(Fn,null),n}function yS(t,e,n,r){n=rf(n),r!==void 0?(t.bindBuffer(Fn,e.buffer),t.bufferSubData(Fn,r,n)):eg(t,Fn,e.buffer,n,e.drawType)}function wS(t,e){return e===iS||e===oS?1:e===sS||e===aS?2:e===cS||e===lS||e===uS?4:0}const of=["position","positions","a_position"];function xS(t,e){let n,r;for(r=0;r<of.length&&(n=of[r],!(n in e||(n=$p.attribPrefix+n,n in e)));++r);r===of.length&&(n=Object.keys(e)[0]);const o=e[n];if(!o.buffer)return 1;t.bindBuffer(Fn,o.buffer);const i=t.getBufferParameter(Fn,rS);t.bindBuffer(Fn,null);const s=wS(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 vS(t,e,n){const r=bS(t,e),o=Object.assign({},n||{});o.attribs=Object.assign({},n?n.attribs:{},r);const i=e.indices;if(i){const s=rf(i,"indices");o.indices=tg(t,s,nS),o.numElements=s.length,o.elementType=nf(s)}else o.numElements||(o.numElements=xS(t,o.attribs));return o}function Zi(t){return!!t.texStorage2D}const sf=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)}}(),mr={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},Xi=Bc,ig=function(){let t;return function(){return t=t||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),t}}(),og=6406,Mn=6407,st=6408,sg=6409,ag=6410,Ms=6402,cg=34041,_c=33071,AS=9728,ES=9729,Xn=3553,Kn=34067,br=32879,yr=35866,Rc=34069,SS=34070,CS=34071,IS=34072,TS=34073,DS=34074,af=10241,cf=10240,Fc=10242,Mc=10243,lg=32882,BS=33082,kS=33083,_S=33084,RS=33085,lf=3317,ug=3314,fg=32878,hg=3316,dg=3315,pg=32877,FS=37443,MS=37441,PS=37440,LS=33321,OS=36756,NS=33325,zS=33326,US=33330,GS=33329,HS=33338,VS=33337,qS=33340,jS=33339,WS=33323,YS=36757,QS=33327,ZS=33328,XS=33336,KS=33335,JS=33332,$S=33331,e4=33334,t4=33333,n4=32849,r4=35905,i4=36194,o4=36758,s4=35898,a4=35901,c4=34843,l4=34837,u4=36221,f4=36239,h4=36215,d4=36233,p4=36209,g4=36227,m4=32856,b4=35907,y4=36759,w4=32855,x4=32854,v4=32857,A4=34842,E4=34836,S4=36220,C4=36238,I4=36975,T4=36214,D4=36232,B4=36226,k4=36208,_4=33189,R4=33190,F4=36012,M4=36013,P4=35056,wr=5120,at=5121,Pc=5122,Ki=5123,Lc=5124,ri=5125,Mt=5126,gg=32819,mg=32820,bg=33635,xn=5131,Ps=36193,uf=33640,L4=35899,O4=35902,N4=36269,z4=34042,Oc=33319,Ji=33320,Nc=6403,$i=36244,eo=36248,ii=36249;let ff;function zc(t){if(!ff){const e={};e[og]={textureFormat:og,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,xn,Ps,Mt]},e[sg]={textureFormat:sg,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,xn,Ps,Mt]},e[ag]={textureFormat:ag,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[at,xn,Ps,Mt]},e[Mn]={textureFormat:Mn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[at,xn,Ps,Mt,bg]},e[st]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[at,xn,Ps,Mt,gg,mg]},e[Ms]={textureFormat:Ms,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[ri,Ki]},e[LS]={textureFormat:Nc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[at]},e[OS]={textureFormat:Nc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[wr]},e[NS]={textureFormat:Nc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Mt,xn]},e[zS]={textureFormat:Nc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[US]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[at]},e[GS]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[wr]},e[JS]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Ki]},e[$S]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Pc]},e[e4]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ri]},e[t4]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Lc]},e[WS]={textureFormat:Oc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[at]},e[YS]={textureFormat:Oc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[wr]},e[QS]={textureFormat:Oc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Mt,xn]},e[ZS]={textureFormat:Oc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Mt]},e[XS]={textureFormat:Ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[at]},e[KS]={textureFormat:Ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[wr]},e[HS]={textureFormat:Ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ki]},e[VS]={textureFormat:Ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Pc]},e[qS]={textureFormat:Ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[ri]},e[jS]={textureFormat:Ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Lc]},e[n4]={textureFormat:Mn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[r4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[i4]={textureFormat:Mn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[at,bg]},e[o4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[wr]},e[s4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,xn,L4]},e[a4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,xn,O4]},e[c4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Mt,xn]},e[l4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Mt]},e[u4]={textureFormat:eo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[at]},e[f4]={textureFormat:eo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[wr]},e[h4]={textureFormat:eo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Ki]},e[d4]={textureFormat:eo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Pc]},e[p4]={textureFormat:eo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[ri]},e[g4]={textureFormat:eo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Lc]},e[m4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[b4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[y4]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[wr]},e[w4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[at,mg,uf]},e[x4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[at,gg]},e[v4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[uf]},e[A4]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Mt,xn]},e[E4]={textureFormat:st,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Mt]},e[S4]={textureFormat:ii,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[at]},e[C4]={textureFormat:ii,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[wr]},e[I4]={textureFormat:ii,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[uf]},e[T4]={textureFormat:ii,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Ki]},e[D4]={textureFormat:ii,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Pc]},e[B4]={textureFormat:ii,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Lc]},e[k4]={textureFormat:ii,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[ri]},e[_4]={textureFormat:Ms,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Ki,ri]},e[R4]={textureFormat:Ms,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ri]},e[F4]={textureFormat:Ms,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[P4]={textureFormat:cg,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[z4]},e[M4]={textureFormat:cg,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[N4]},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})}),ff=e}return ff[t]}function U4(t,e){const n=zc(t);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[e];if(r===void 0)throw"unknown internal format";return r}function to(t){const e=zc(t);if(!e)throw"unknown internal format";return{format:e.textureFormat,type:e.type[0]}}function yg(t){return(t&t-1)===0}function G4(t,e,n,r){if(!Zi(t))return yg(e)&&yg(n);const o=zc(r);if(!o)throw"unknown internal format";return o.colorRenderable&&o.textureFilterable}function H4(t){const e=zc(t);if(!e)throw"unknown internal format";return e.textureFilterable}function wg(t,e,n){return Xi(e)?nf(e):n||at}function Uc(t,e,n,r,o){if(o%1!==0)throw"can't guess dimensions";if(!n&&!r){const i=Math.sqrt(o/(e===Kn?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 no(t,e){e.colorspaceConversion!==void 0&&t.pixelStorei(FS,e.colorspaceConversion),e.premultiplyAlpha!==void 0&&t.pixelStorei(MS,e.premultiplyAlpha),e.flipY!==void 0&&t.pixelStorei(PS,e.flipY)}function xg(t){t.pixelStorei(lf,4),Zi(t)&&(t.pixelStorei(ug,0),t.pixelStorei(fg,0),t.pixelStorei(hg,0),t.pixelStorei(dg,0),t.pixelStorei(pg,0))}function V4(t,e,n,r){r.minMag&&(n.call(t,e,af,r.minMag),n.call(t,e,cf,r.minMag)),r.min&&n.call(t,e,af,r.min),r.mag&&n.call(t,e,cf,r.mag),r.wrap&&(n.call(t,e,Fc,r.wrap),n.call(t,e,Mc,r.wrap),(e===br||tS(t,e))&&n.call(t,e,lg,r.wrap)),r.wrapR&&n.call(t,e,lg,r.wrapR),r.wrapS&&n.call(t,e,Fc,r.wrapS),r.wrapT&&n.call(t,e,Mc,r.wrapT),r.minLod&&n.call(t,e,BS,r.minLod),r.maxLod&&n.call(t,e,kS,r.maxLod),r.baseLevel&&n.call(t,e,_S,r.baseLevel),r.maxLevel&&n.call(t,e,RS,r.maxLevel)}function vg(t,e,n){const r=n.target||Xn;t.bindTexture(r,e),V4(t,r,t.texParameteri,n)}function q4(t){return t=t||mr.textureColor,Xi(t)?t:new Uint8Array([t[0]*255,t[1]*255,t[2]*255,t[3]*255])}function hf(t,e,n,r,o,i){n=n||mr.textureOptions,i=i||st;const s=n.target||Xn;if(r=r||n.width,o=o||n.height,t.bindTexture(s,e),G4(t,r,o,i))t.generateMipmap(s);else{const a=H4(i)?ES:AS;t.texParameteri(s,af,a),t.texParameteri(s,cf,a),t.texParameteri(s,Fc,_c),t.texParameteri(s,Mc,_c)}}function Ls(t){return t.auto===!0||t.auto===void 0&&t.level===void 0}function df(t,e){return e=e||{},e.cubeFaceOrder||[Rc,SS,CS,IS,TS,DS]}function pf(t,e){const r=df(t,e).map(function(o,i){return{face:o,ndx:i}});return r.sort(function(o,i){return o.face-i.face}),r}function Ag(t,e,n,r){r=r||mr.textureOptions;const o=r.target||Xn,i=r.level||0;let s=n.width,a=n.height;const c=r.internalFormat||r.format||st,l=to(c),u=r.format||l.format,f=r.type||l.type;if(no(t,r),t.bindTexture(o,e),o===Kn){const d=n.width,h=n.height;let p,b;if(d/6===h)p=h,b=[0,0,1,0,2,0,3,0,4,0,5,0];else if(h/6===d)p=d,b=[0,0,0,1,0,2,0,3,0,4,0,5];else if(d/3===h/2)p=d/3,b=[0,0,1,0,2,0,0,1,1,1,2,1];else if(d/2===h/3)p=d/2,b=[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=ig();v?(v.canvas.width=p,v.canvas.height=p,s=p,a=p,pf(t,r).forEach(function(y){const A=b[y.ndx*2+0]*p,S=b[y.ndx*2+1]*p;v.drawImage(n,A,S,p,p,0,0,p,p),t.texImage2D(y.face,i,c,u,f,v.canvas)}),v.canvas.width=1,v.canvas.height=1):typeof createImageBitmap<"u"&&(s=p,a=p,pf(t,r).forEach(function(y){const A=b[y.ndx*2+0]*p,S=b[y.ndx*2+1]*p;t.texImage2D(y.face,i,c,p,p,0,u,f,null),createImageBitmap(n,A,S,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(E){no(t,r),t.bindTexture(o,e),t.texImage2D(y.face,i,c,u,f,E),Ls(r)&&hf(t,e,r,s,a,c)})}))}else if(o===br||o===yr){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 b=n.width===h?1:0,v=n.height===h?1:0;t.pixelStorei(lf,1),t.pixelStorei(ug,n.width),t.pixelStorei(fg,0),t.pixelStorei(pg,0),t.texImage3D(o,i,c,d,d,d,0,u,f,null);for(let y=0;y<p;++y){const A=y*d*b,S=y*d*v;t.pixelStorei(hg,A),t.pixelStorei(dg,S),t.texSubImage3D(o,i,0,0,y,d,d,1,u,f,n)}xg(t)}else t.texImage2D(o,i,c,u,f,n);Ls(r)&&hf(t,e,r,s,a,c),vg(t,e,r)}function Os(){}function j4(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 W4(t,e){return e===void 0&&!j4(t)?"anonymous":e}function Y4(t,e,n){n=n||Os;let r;if(e=e!==void 0?e:mr.crossOrigin,e=W4(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;$E(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 Eg(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof ImageData<"u"&&t instanceof ImageData||typeof HTMLElement<"u"&&t instanceof HTMLElement}function gf(t,e,n){return Eg(t)?(setTimeout(function(){n(null,t)}),t):Y4(t,e,n)}function mf(t,e,n){n=n||mr.textureOptions;const r=n.target||Xn;if(t.bindTexture(r,e),n.color===!1)return;const o=q4(n.color);if(r===Kn)for(let i=0;i<6;++i)t.texImage2D(Rc+i,0,st,1,1,0,st,at,o);else r===br||r===yr?t.texImage3D(r,0,st,1,1,1,0,st,at,o):t.texImage2D(r,0,st,1,1,0,st,at,o)}function Q4(t,e,n,r){return r=r||Os,n=n||mr.textureOptions,mf(t,e,n),n=Object.assign({},n),gf(n.src,n.crossOrigin,function(i,s){i?r(i,e,s):(Ag(t,e,s,n),r(null,e,s))})}function Z4(t,e,n,r){r=r||Os;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=to(s),c=n.format||a.format,l=n.type||at,u=n.target||Xn;if(u!==Kn)throw"target must be TEXTURE_CUBE_MAP";mf(t,e,n),n=Object.assign({},n);let f=6;const d=[],h=df(t,n);let p;function b(v){return function(y,A){--f,y?d.push(y):A.width!==A.height?d.push("cubemap face img is not a square: "+A.src):(no(t,n),t.bindTexture(u,e),f===5?df().forEach(function(S){t.texImage2D(S,i,s,c,l,A)}):t.texImage2D(v,i,s,c,l,A),Ls(n)&&t.generateMipmap(u)),f===0&&r(d.length?d:void 0,e,p)}}p=o.map(function(v,y){return gf(v,n.crossOrigin,b(h[y]))})}function X4(t,e,n,r){r=r||Os;const o=n.src,i=n.internalFormat||n.format||st,s=to(i),a=n.format||s.format,c=n.type||at,l=n.target||yr;if(l!==br&&l!==yr)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";mf(t,e,n),n=Object.assign({},n);let u=o.length;const f=[];let d;const h=n.level||0;let p=n.width,b=n.height;const v=o.length;let y=!0;function A(S){return function(E,I){if(--u,E)f.push(E);else{if(no(t,n),t.bindTexture(l,e),y){y=!1,p=n.width||I.width,b=n.height||I.height,t.texImage3D(l,h,i,p,b,v,0,a,c,null);for(let _=0;_<v;++_)t.texSubImage3D(l,h,0,0,_,p,b,1,a,c,I)}else{let _=I,B;(I.width!==p||I.height!==b)&&(B=ig(),_=B.canvas,B.canvas.width=p,B.canvas.height=b,B.drawImage(I,0,0,p,b)),t.texSubImage3D(l,h,0,0,S,p,b,1,a,c,_),B&&_===B.canvas&&(B.canvas.width=0,B.canvas.height=0)}Ls(n)&&t.generateMipmap(l)}u===0&&r(f.length?f:void 0,e,d)}}d=o.map(function(S,E){return gf(S,n.crossOrigin,A(E))})}function Sg(t,e,n,r){r=r||mr.textureOptions;const o=r.target||Xn;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=to(l),f=r.format||u.format,d=r.type||wg(t,n,u.type);if(Xi(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const v=JE(d);n=new v(n)}const h=U4(l,d),p=n.byteLength/h;if(p%1)throw"length wrong size for format: "+sf(t,f);let b;if(o===br||o===yr)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)?(b=Uc(t,o,s,a,p/i),s=b.width,a=b.height):s&&(!i||!a)?(b=Uc(t,o,i,a,p/s),i=b.width,a=b.height):(b=Uc(t,o,i,s,p/a),i=b.width,s=b.height);else b=Uc(t,o,i,s,p),i=b.width,s=b.height;if(xg(t),t.pixelStorei(lf,r.unpackAlignment||1),no(t,r),o===Kn){const v=h/n.BYTES_PER_ELEMENT,y=p/6*v;pf(t,r).forEach(A=>{const S=y*A.ndx,E=n.subarray(S,S+y);t.texImage2D(A.face,c,l,i,s,0,f,d,E)})}else o===br||o===yr?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 K4(t,e,n){const r=n.target||Xn;t.bindTexture(r,e);const o=n.level||0,i=n.internalFormat||n.format||st,s=to(i),a=n.format||s.format,c=n.type||s.type;if(no(t,n),r===Kn)for(let l=0;l<6;++l)t.texImage2D(Rc+l,o,i,n.width,n.height,0,a,c,null);else r===br||r===yr?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 Ns(t,e,n){n=n||Os,e=e||mr.textureOptions;const r=t.createTexture(),o=e.target||Xn;let i=e.width||1,s=e.height||1;const a=e.internalFormat||st;t.bindTexture(o,r),o===Kn&&(t.texParameteri(o,Fc,_c),t.texParameteri(o,Mc,_c));let c=e.src;if(c)if(typeof c=="function"&&(c=c(t,e)),typeof c=="string")Q4(t,r,e,n);else if(Xi(c)||Array.isArray(c)&&(typeof c[0]=="number"||Array.isArray(c[0])||Xi(c[0]))){const l=Sg(t,r,c,e);i=l.width,s=l.height}else Array.isArray(c)&&(typeof c[0]=="string"||Eg(c[0]))?o===Kn?Z4(t,r,e,n):X4(t,r,e,n):(Ag(t,r,c,e),i=c.width,s=c.height);else K4(t,r,e);return Ls(e)&&hf(t,r,e,i,s,a),vg(t,r,e),r}function J4(t,e,n,r,o,i){r=r||n.width,o=o||n.height,i=i||n.depth;const s=n.target||Xn;t.bindTexture(s,e);const a=n.level||0,c=n.internalFormat||n.format||st,l=to(c),u=n.format||l.format;let f;const d=n.src;if(d&&(Xi(d)||Array.isArray(d)&&typeof d[0]=="number")?f=n.type||wg(t,d,l.type):f=n.type||l.type,s===Kn)for(let h=0;h<6;++h)t.texImage2D(Rc+h,a,c,r,o,0,u,f,null);else s===br||s===yr?t.texImage3D(s,a,c,r,o,i,0,u,f,null):t.texImage2D(s,a,c,r,o,0,u,f,null)}const $4=Xp,Gc=33984,eC=35048,Hc=34962,tC=34963,bf=35345,Cg=35718,nC=35721,rC=35971,iC=35382,oC=35396,sC=35398,aC=35392,cC=35395,Vc=5126,Ig=35664,Tg=35665,Dg=35666,yf=5124,Bg=35667,kg=35668,_g=35669,Rg=35670,Fg=35671,Mg=35672,Pg=35673,Lg=35674,Og=35675,Ng=35676,lC=35678,uC=35680,fC=35679,hC=35682,dC=35685,pC=35686,gC=35687,mC=35688,bC=35689,yC=35690,wC=36289,xC=36292,vC=36293,wf=5125,zg=36294,Ug=36295,Gg=36296,AC=36298,EC=36299,SC=36300,CC=36303,IC=36306,TC=36307,DC=36308,BC=36311,qc=3553,jc=34067,xf=32879,Wc=35866,Oe={};function Hg(t,e){return Oe[e].bindPoint}function kC(t,e){return function(n){t.uniform1f(e,n)}}function _C(t,e){return function(n){t.uniform1fv(e,n)}}function RC(t,e){return function(n){t.uniform2fv(e,n)}}function FC(t,e){return function(n){t.uniform3fv(e,n)}}function MC(t,e){return function(n){t.uniform4fv(e,n)}}function Vg(t,e){return function(n){t.uniform1i(e,n)}}function qg(t,e){return function(n){t.uniform1iv(e,n)}}function jg(t,e){return function(n){t.uniform2iv(e,n)}}function Wg(t,e){return function(n){t.uniform3iv(e,n)}}function Yg(t,e){return function(n){t.uniform4iv(e,n)}}function PC(t,e){return function(n){t.uniform1ui(e,n)}}function LC(t,e){return function(n){t.uniform1uiv(e,n)}}function OC(t,e){return function(n){t.uniform2uiv(e,n)}}function NC(t,e){return function(n){t.uniform3uiv(e,n)}}function zC(t,e){return function(n){t.uniform4uiv(e,n)}}function UC(t,e){return function(n){t.uniformMatrix2fv(e,!1,n)}}function GC(t,e){return function(n){t.uniformMatrix3fv(e,!1,n)}}function HC(t,e){return function(n){t.uniformMatrix4fv(e,!1,n)}}function VC(t,e){return function(n){t.uniformMatrix2x3fv(e,!1,n)}}function qC(t,e){return function(n){t.uniformMatrix3x2fv(e,!1,n)}}function jC(t,e){return function(n){t.uniformMatrix2x4fv(e,!1,n)}}function WC(t,e){return function(n){t.uniformMatrix4x2fv(e,!1,n)}}function YC(t,e){return function(n){t.uniformMatrix3x4fv(e,!1,n)}}function QC(t,e){return function(n){t.uniformMatrix4x3fv(e,!1,n)}}function Ht(t,e,n,r){const o=Hg(t,e);return Zi(t)?function(i){let s,a;kc(t,i)?(s=i,a=null):(s=i.texture,a=i.sampler),t.uniform1i(r,n),t.activeTexture(Gc+n),t.bindTexture(o,s),t.bindSampler(n,a)}:function(i){t.uniform1i(r,n),t.activeTexture(Gc+n),t.bindTexture(o,i)}}function Vt(t,e,n,r,o){const i=Hg(t,e),s=new Int32Array(o);for(let a=0;a<o;++a)s[a]=n+a;return Zi(t)?function(a){t.uniform1iv(r,s),a.forEach(function(c,l){t.activeTexture(Gc+s[l]);let u,f;kc(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(Gc+s[l]),t.bindTexture(i,c)})}}Oe[Vc]={Type:Float32Array,size:4,setter:kC,arraySetter:_C},Oe[Ig]={Type:Float32Array,size:8,setter:RC,cols:2},Oe[Tg]={Type:Float32Array,size:12,setter:FC,cols:3},Oe[Dg]={Type:Float32Array,size:16,setter:MC,cols:4},Oe[yf]={Type:Int32Array,size:4,setter:Vg,arraySetter:qg},Oe[Bg]={Type:Int32Array,size:8,setter:jg,cols:2},Oe[kg]={Type:Int32Array,size:12,setter:Wg,cols:3},Oe[_g]={Type:Int32Array,size:16,setter:Yg,cols:4},Oe[wf]={Type:Uint32Array,size:4,setter:PC,arraySetter:LC},Oe[zg]={Type:Uint32Array,size:8,setter:OC,cols:2},Oe[Ug]={Type:Uint32Array,size:12,setter:NC,cols:3},Oe[Gg]={Type:Uint32Array,size:16,setter:zC,cols:4},Oe[Rg]={Type:Uint32Array,size:4,setter:Vg,arraySetter:qg},Oe[Fg]={Type:Uint32Array,size:8,setter:jg,cols:2},Oe[Mg]={Type:Uint32Array,size:12,setter:Wg,cols:3},Oe[Pg]={Type:Uint32Array,size:16,setter:Yg,cols:4},Oe[Lg]={Type:Float32Array,size:32,setter:UC,rows:2,cols:2},Oe[Og]={Type:Float32Array,size:48,setter:GC,rows:3,cols:3},Oe[Ng]={Type:Float32Array,size:64,setter:HC,rows:4,cols:4},Oe[dC]={Type:Float32Array,size:32,setter:VC,rows:2,cols:3},Oe[pC]={Type:Float32Array,size:32,setter:jC,rows:2,cols:4},Oe[gC]={Type:Float32Array,size:48,setter:qC,rows:3,cols:2},Oe[mC]={Type:Float32Array,size:48,setter:YC,rows:3,cols:4},Oe[bC]={Type:Float32Array,size:64,setter:WC,rows:4,cols:2},Oe[yC]={Type:Float32Array,size:64,setter:QC,rows:4,cols:3},Oe[lC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:qc},Oe[uC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:jc},Oe[fC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:xf},Oe[hC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:qc},Oe[wC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Wc},Oe[xC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Wc},Oe[vC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:jc},Oe[AC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:qc},Oe[EC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:xf},Oe[SC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:jc},Oe[CC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Wc},Oe[IC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:qc},Oe[TC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:xf},Oe[DC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:jc},Oe[BC]={Type:null,size:0,setter:Ht,arraySetter:Vt,bindPoint:Wc};function Yc(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(Hc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribPointer(e,n.numComponents||n.size,n.type||Vc,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function xr(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(Hc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||yf,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function Qc(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(Hc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||wf,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function vf(t,e,n){const r=n.size,o=n.count;return function(i){t.bindBuffer(Hc,i.buffer);const s=i.size||i.numComponents||r,a=s/o,c=i.type||Vc,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[Vc]={size:4,setter:Yc},gt[Ig]={size:8,setter:Yc},gt[Tg]={size:12,setter:Yc},gt[Dg]={size:16,setter:Yc},gt[yf]={size:4,setter:xr},gt[Bg]={size:8,setter:xr},gt[kg]={size:12,setter:xr},gt[_g]={size:16,setter:xr},gt[wf]={size:4,setter:Qc},gt[zg]={size:8,setter:Qc},gt[Ug]={size:12,setter:Qc},gt[Gg]={size:16,setter:Qc},gt[Rg]={size:4,setter:xr},gt[Fg]={size:8,setter:xr},gt[Mg]={size:12,setter:xr},gt[Pg]={size:16,setter:xr},gt[Lg]={size:4,setter:vf,count:2},gt[Og]={size:9,setter:vf,count:3},gt[Ng]={size:16,setter:vf,count:4};function Qg(t){const e=t.name;return e.startsWith("gl_")||e.startsWith("webgl_")}const ZC=/(\.|\[|]|\w+)/g,XC=t=>t>="0"&&t<="9";function Zg(t,e,n,r){const o=t.split(ZC).filter(a=>a!=="");let i=0,s="";for(;;){const a=o[i++];s+=a;const c=XC(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(b){em(p,b)}}(h),s+=f}}}function KC(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,Cg);for(let a=0;a<s;++a){const c=t.getActiveUniform(e,a);if(Qg(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,Zg(l,f,i,o)}}return o}function JC(t,e){const n={},r=t.getProgramParameter(e,rC);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 $C(t,e){const n=t.getProgramParameter(e,Cg),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,iC);for(let a=0;a<s;++a){const c=t.getActiveUniformBlockName(e,a),l={index:t.getUniformBlockIndex(e,c),usedByVertexShader:t.getActiveUniformBlockParameter(e,a,oC),usedByFragmentShader:t.getActiveUniformBlockParameter(e,a,sC),size:t.getActiveUniformBlockParameter(e,a,aC),uniformIndices:t.getActiveUniformBlockParameter(e,a,cC)};l.used=l.usedByVertexShader||l.usedByFragmentShader,i[c]=l}return{blockSpecs:i,uniformData:r}}const Xg=/\[\d+\]\.$/,e6=(t,e)=>((t+(e-1))/e|0)*e;function t6(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 n6(t,e,n,r){const o=n.blockSpecs,i=n.uniformData,s=o[r];if(!s)return $4("no uniform block object named:",r),{name:r,uniforms:{}};const a=new ArrayBuffer(s.size),c=t.createBuffer(),l=s.index;t.bindBuffer(bf,c),t.uniformBlockBinding(e,s.index,l);let u=r+".";Xg.test(u)&&(u=u.replace(Xg,"."));const f={},d={},h={};return s.uniformIndices.forEach(function(p){const b=i[p];let v=b.name;v.startsWith(u)&&(v=v.substr(u.length));const y=v.endsWith("[0]");y&&(v=v.substr(0,v.length-3));const A=Oe[b.type],S=A.Type,E=y?e6(A.size,16)*b.size:A.size*b.size,I=new S(a,b.offset,E/S.BYTES_PER_ELEMENT);f[v]=I;const _=t6(I,y,A.rows,A.cols);d[v]=_,Zg(v,_,h,d)}),{name:r,array:a,asFloat:new Float32Array(a),buffer:c,uniforms:f,setters:d}}function Kg(t,e,n){return n6(t,e.program,e.uniformBlockSpec,n)}function Jg(t,e,n){const o=(e.uniformBlockSpec||e).blockSpecs[n.name];if(o){const i=o.index;return t.bindBufferRange(bf,i,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function $g(t,e,n){Jg(t,e,n)&&t.bufferData(bf,n.array,eC)}function zs(t,e){const n=t.setters;for(const r in e){const o=n[r];if(o){const i=e[r];o(i)}}}function em(t,e){for(const n in e){const r=t[n];typeof r=="function"?r(e[n]):em(t[n],e[n])}}function oi(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)oi(n,i[a])}else for(const s in i){const a=n[s];a&&a(i[s])}}}function r6(t,e){const n={},r=t.getProgramParameter(e,nC);for(let o=0;o<r;++o){const i=t.getActiveAttrib(e,o);if(Qg(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 i6(t,e){for(const n in e){const r=t[n];r&&r(e[n])}}function si(t,e,n){n.vertexArrayObject?t.bindVertexArray(n.vertexArrayObject):(i6(e.attribSetters||e,n.attribs),n.indices&&t.bindBuffer(tC,n.indices))}function o6(t,e){const n=KC(t,e),r=r6(t,e),o={program:e,uniformSetters:n,attribSetters:r};return Zi(t)&&(o.uniformBlockSpec=$C(t,e),o.transformFeedbackInfo=JC(t,e)),o}const s6=4,tm=5123;function Zc(t,e,n,r,o,i){n=n===void 0?s6: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?tm:e.elementType,o,i):t.drawElements(n,c,a===void 0?tm:e.elementType,o):i!==void 0?t.drawArraysInstanced(n,o,c,i):t.drawArrays(n,o,c)}const a6=36160,ai=36161,c6=3553,l6=5121,u6=6402,f6=6408,h6=33190,d6=36012,p6=35056,g6=36013,m6=32854,b6=32855,y6=36194,nm=33189,rm=6401,im=36168,Af=34041,Ef=36064,Xc=36096,om=36128,Sf=33306,Cf=33071,If=9729,sm=[{format:f6,type:l6,min:If,wrap:Cf},{format:Af}],vn={};vn[Af]=Sf,vn[rm]=om,vn[im]=om,vn[u6]=Xc,vn[nm]=Xc,vn[h6]=Xc,vn[d6]=Xc,vn[p6]=Sf,vn[g6]=Sf;function w6(t,e){return vn[t]||vn[e]}const vr={};vr[m6]=!0,vr[b6]=!0,vr[y6]=!0,vr[Af]=!0,vr[nm]=!0,vr[rm]=!0,vr[im]=!0;function x6(t){return vr[t]}const v6=32;function A6(t){return t>=Ef&&t<Ef+v6}function E6(t,e,n,r){const o=a6,i=t.createFramebuffer();t.bindFramebuffer(o,i),n=n||t.drawingBufferWidth,r=r||t.drawingBufferHeight,e=e||sm;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||w6(d,c.internalFormat);if(h||(h=Ef+l),A6(h)&&s.push(h),!u)if(f!==void 0||x6(d))u=t.createRenderbuffer(),t.bindRenderbuffer(ai,u),f>1?t.renderbufferStorageMultisample(ai,f,d,n,r):t.renderbufferStorage(ai,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||If,p.mag=p.mag||p.minMag||If,p.wrapS=p.wrapS||p.wrap||Cf,p.wrapT=p.wrapT||p.wrap||Cf),u=Ns(t,p)}if(Kp(t,u))t.framebufferRenderbuffer(o,h,ai,u);else if(kc(t,u))c.layer!==void 0?t.framebufferTextureLayer(o,h,u,c.level||0,c.layer):t.framebufferTexture2D(o,h,c.target||c6,u,c.level||0);else throw new Error("unknown attachment type");a.attachments.push(u)}),t.drawBuffers&&t.drawBuffers(s),a}function S6(t,e,n,r,o){r=r||t.drawingBufferWidth,o=o||t.drawingBufferHeight,e.width=r,e.height=o,n=n||sm,n.forEach(function(i,s){const a=e.attachments[s],c=i.format,l=i.samples;if(l!==void 0||Kp(t,a))t.bindRenderbuffer(ai,a),l>1?t.renderbufferStorageMultisample(ai,l,c,r,o):t.renderbufferStorage(ai,c,r,o);else if(kc(t,a))J4(t,a,i,r,o);else throw new Error("unknown attachment type")})}function C6(t,e,n){const r=t.createVertexArray();return t.bindVertexArray(r),e.length||(e=[e]),e.forEach(function(o){si(t,o,n)}),t.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const I6=/^(.*?)_/;function T6(t,e){sf(t,0);const n=t.getExtension(e);if(n){const r={},o=I6.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&&Xp(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},sf(r,0)}return n}const am=["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 cm(t){for(let e=0;e<am.length;++e)T6(t,am[e])}function D6(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){cm(r);break}return r}function B6(t,e){return D6(t,e)}const k6=`out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
|
|
239
|
+
#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
|
|
229
240
|
out vec2 vPosInPixels;
|
|
230
241
|
#endif
|
|
231
242
|
out vec2 vHalfSizeInPixels;/***Clamps the minimumSize and returns an opacity that reflects the amount of clamping.*/float clampMinSize(inout float pos,float frac,float size,float minSize){if(minSize>0.0&&abs(size)<minSize){pos+=(frac-0.5)*(minSize*sign(size)-size);return abs(size)/minSize;}return 1.0;}void sort(inout float a,inout float b){if(a>b){float tmp=b;b=a;a=tmp;}}/***The vertex position wrt the rectangle specified by(x,x2,y,y2).*[0,0]=[x,y],[1,1]=[x2,y2].*The x or y component may contain fractional values if the rectangle*have been tessellated.*/vec2 getVertexPos(){int index=gl_VertexID % 6;return vec2(index==0||index==1||index==3 ? 0.0 : 1.0,index==0||index==1||index==2 ? 0.0 : 1.0);}void main(void){vec2 frac=getVertexPos();vec2 normalizedMinSize=vec2(uMinWidth,uMinHeight)/uViewportSize;vec4 cornerRadii=vec4(uCornerRadiusTopRight,uCornerRadiusBottomRight,uCornerRadiusTopLeft,uCornerRadiusBottomLeft);float x=getScaled_x();float x2=getScaled_x2();float y=getScaled_y();float y2=getScaled_y2();sort(x,x2);sort(y,y2);float clampMargin=1.0;vec2 pos1=vec2(clamp(x,0.0-clampMargin,1.0+clampMargin),y);vec2 pos2=vec2(clamp(x2,0.0-clampMargin,1.0+clampMargin),y2);vec2 size=pos2-pos1;if(size.x<=0.0||size.y<=0.0){gl_Position=vec4(0.0,0.0,0.0,1.0);return;}vec2 pos=pos1+frac*size;size.y*=getSampleFacetHeight(pos);float opaFactor=uViewOpacity*max(uMinOpacity,clampMinSize(pos.x,frac.x,size.x,normalizedMinSize.x)*clampMinSize(pos.y,frac.y,size.y,normalizedMinSize.y));pos=applySampleFacet(pos);
|
|
232
|
-
#if defined(ROUNDED_CORNERS) || defined(STROKED)
|
|
233
|
-
float aaPadding=1.0/uDevicePixelRatio;float strokeWidth=getScaled_strokeWidth();float strokeOpacity=getScaled_strokeOpacity()*opaFactor;vec2 centeredFrac=frac-0.5;vec2 expand=centeredFrac*(strokeWidth+aaPadding)/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);
|
|
243
|
+
#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
|
|
244
|
+
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);
|
|
234
245
|
#endif
|
|
235
|
-
gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,
|
|
246
|
+
gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,_6=`#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
|
|
236
247
|
in vec2 vPosInPixels;
|
|
237
248
|
#endif
|
|
238
|
-
in vec2 vHalfSizeInPixels;in lowp vec4 vFillColor;in lowp vec4 vStrokeColor;in float vHalfStrokeWidth;in vec4 vCornerRadii;out lowp vec4 fragColor;
|
|
239
|
-
#
|
|
249
|
+
in vec2 vHalfSizeInPixels;in lowp vec4 vFillColor;in lowp vec4 vStrokeColor;in float vHalfStrokeWidth;in vec4 vCornerRadii;out lowp vec4 fragColor;
|
|
250
|
+
#ifdef SHADOW
|
|
251
|
+
float gaussian(float x,float sigma){const float pi=3.141592653589793;return exp(-(x*x)/(2.0*sigma*sigma))/(sqrt(2.0*pi)*sigma);}vec2 erf(vec2 x){vec2 s=sign(x),a=abs(x);x=1.0+(0.278393+(0.230389+0.078108*(a*a))*a)*a;x*=x;return s-s/(x*x);}float roundedBoxShadowX(float x,float y,float sigma,float corner,vec2 halfSize){float delta=min(halfSize.y-corner-abs(y),0.0);float curved=halfSize.x-corner+sqrt(max(0.0,corner*corner-delta*delta));vec2 integral=0.5+0.5*erf((x+vec2(-curved,curved))*(sqrt(0.5)/sigma));return integral.y-integral.x;}float roundedBoxShadow(vec2 lower,vec2 upper,vec2 point,float sigma,float corner){vec2 center=(lower+upper)*0.5;vec2 halfSize=(upper-lower)*0.5;point-=center;float low=point.y-halfSize.y;float high=point.y+halfSize.y;float start=clamp(-3.0*sigma,low,high);float end=clamp(3.0*sigma,low,high);float step=(end-start)/4.0;float y=start+step*0.5;float value=0.0;for(int i=0;i<4;i++){value+=roundedBoxShadowX(point.x,point.y-y,sigma,corner,halfSize)*gaussian(y,sigma)*step;y+=step;}return value;}
|
|
252
|
+
#endif
|
|
253
|
+
float sdRoundedBox(vec2 p,vec2 b,vec4 r){r.xy=p.x>0.0 ? r.xy : r.zw;r.x=p.y>0.0 ? r.x : r.y;vec2 q=abs(p)-b+r.x;return min(max(q.x,q.y),0.0)+length(max(q,0.0))-r.x;}float sdSharpBox(vec2 p,vec2 b){vec2 q=abs(p)-b;return max(q.x,q.y);}float diagonalPattern(vec2 uv,float spacing){float divisor=spacing*vHalfStrokeWidth*2.0*1.5;return abs(mod(uv.x-uv.y,divisor)-0.5*divisor)/1.5;}float verticalPattern(float x,float spacing){float divisor=spacing*vHalfStrokeWidth*2.0;return abs(mod(x,divisor))/2.0;}float circle(vec2 p,float r){return length(p)-r;}float masonryCirclePattern(vec2 uv,float spacing,float radius){float halfSpacing=0.5*spacing;float row=floor(uv.y/spacing);float shift=mod(row,2.0)*halfSpacing;vec2 shifted=vec2(uv.x+shift,uv.y+halfSpacing);vec2 cell=mod(shifted+0.5*spacing,spacing)-halfSpacing;return abs(circle(cell,radius));}/***Patterns:*0 none*1 diagonal(/)*2 antiDiagonal(\\)*3 cross(X)*4 vertical(|)*5 horizontal(-)*6 grid(+)*7 dots(.)*8 rings(o)*9 ringsLarge(O)*/float pattern(){
|
|
254
|
+
#ifdef STROKED
|
|
255
|
+
int patternType=uHatchPattern;vec2 uv=vPosInPixels;float spacing=4.0;switch(patternType){case 1:return diagonalPattern(vec2(uv.x,-uv.y),spacing);case 2:return diagonalPattern(uv,spacing);case 3:return min(diagonalPattern(uv,spacing),diagonalPattern(vec2(uv.x,-uv.y),spacing));case 4:return verticalPattern(uv.x,spacing);case 5:return verticalPattern(uv.y,spacing);case 6:return min(verticalPattern(uv.x,spacing),verticalPattern(uv.y,spacing));case 7:case 8:case 9:{float spacing=vHalfStrokeWidth*14.0;float radius=spacing*(patternType==8 ? 0.2 :patternType==9 ? 0.35 :0.07);return masonryCirclePattern(uv,spacing,radius);}default:break;}
|
|
256
|
+
#endif
|
|
257
|
+
return 1.0/0.0;}void main(void){
|
|
258
|
+
#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
|
|
240
259
|
#ifdef ROUNDED_CORNERS
|
|
241
260
|
float d=sdRoundedBox(vPosInPixels,vHalfSizeInPixels,vCornerRadii);
|
|
242
261
|
#else
|
|
243
262
|
float d=sdSharpBox(vPosInPixels,vHalfSizeInPixels);
|
|
244
263
|
#endif
|
|
245
|
-
|
|
264
|
+
vec4 backgroundColor=vec4(0.0,0.0,0.0,0.0);
|
|
265
|
+
#ifdef SHADOW
|
|
266
|
+
float maxCornerRadius=max(vCornerRadii.x,max(vCornerRadii.y,max(vCornerRadii.z,vCornerRadii.w)));float shadow=0.0;if(d>=vHalfStrokeWidth-1.0&&uShadowOpacity>0.0){shadow=roundedBoxShadow(-vHalfSizeInPixels-vHalfStrokeWidth,vHalfSizeInPixels+vHalfStrokeWidth,vPosInPixels-vec2(uShadowOffsetX,-uShadowOffsetY),max(uShadowBlur/2.5,0.25),maxCornerRadius+vHalfStrokeWidth)*uShadowOpacity*uViewOpacity;}backgroundColor=vec4(uShadowColor*shadow,shadow);
|
|
267
|
+
#endif
|
|
268
|
+
if(vHalfStrokeWidth>0.0&&uHatchPattern>0){d=max(d,-pattern());}fragColor=distanceToColor(d,vFillColor,vStrokeColor,backgroundColor,vHalfStrokeWidth);if(uPickingEnabled){if(d<vHalfStrokeWidth){fragColor=vPickingColor;}}else if(fragColor.a==0.0){discard;}
|
|
246
269
|
#else
|
|
247
|
-
fragColor=vFillColor;
|
|
270
|
+
fragColor=vFillColor;if(uPickingEnabled){fragColor=vPickingColor;}
|
|
248
271
|
#endif
|
|
249
|
-
|
|
272
|
+
}`,R6=`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;
|
|
250
273
|
#pragma markUniforms
|
|
251
|
-
};`;function Rn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function vr(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 hf=Symbol("implicit");function df(){var t=new Vn,e=[],n=[],r=hf;function o(i){let s=t.get(i);if(s===void 0){if(r!==hf)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 Vn;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 df(e,n).unknown(r)},Rn.apply(o,arguments),o}function Ji(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ts(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ar(){}var ii=.7,$i=1/ii,eo="\\s*([+-]?\\d+)\\s*",Ds="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f6=/^#([0-9a-f]{3,8})$/,h6=new RegExp(`^rgb\\(${eo},${eo},${eo}\\)$`),d6=new RegExp(`^rgb\\(${Fn},${Fn},${Fn}\\)$`),p6=new RegExp(`^rgba\\(${eo},${eo},${eo},${Ds}\\)$`),g6=new RegExp(`^rgba\\(${Fn},${Fn},${Fn},${Ds}\\)$`),m6=new RegExp(`^hsl\\(${Ds},${Fn},${Fn}\\)$`),b6=new RegExp(`^hsla\\(${Ds},${Fn},${Fn},${Ds}\\)$`),Zg={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};Ji(Ar,Er,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Xg,formatHex:Xg,formatHex8:y6,formatHsl:w6,formatRgb:Kg,toString:Kg});function Xg(){return this.rgb().formatHex()}function y6(){return this.rgb().formatHex8()}function w6(){return nm(this).formatHsl()}function Kg(){return this.rgb().formatRgb()}function Er(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=f6.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Jg(e):n===3?new At(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Oc(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Oc(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=h6.exec(t))?new At(e[1],e[2],e[3],1):(e=d6.exec(t))?new At(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=p6.exec(t))?Oc(e[1],e[2],e[3],e[4]):(e=g6.exec(t))?Oc(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=m6.exec(t))?tm(e[1],e[2]/100,e[3]/100,1):(e=b6.exec(t))?tm(e[1],e[2]/100,e[3]/100,e[4]):Zg.hasOwnProperty(t)?Jg(Zg[t]):t==="transparent"?new At(NaN,NaN,NaN,0):null}function Jg(t){return new At(t>>16&255,t>>8&255,t&255,1)}function Oc(t,e,n,r){return r<=0&&(t=e=n=NaN),new At(t,e,n,r)}function pf(t){return t instanceof Ar||(t=Er(t)),t?(t=t.rgb(),new At(t.r,t.g,t.b,t.opacity)):new At}function zc(t,e,n,r){return arguments.length===1?pf(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}Ji(At,zc,Ts(Ar,{brighter(t){return t=t==null?$i:Math.pow($i,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ii:Math.pow(ii,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new At(oi(this.r),oi(this.g),oi(this.b),Uc(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:$g,formatHex:$g,formatHex8:x6,formatRgb:em,toString:em}));function $g(){return`#${si(this.r)}${si(this.g)}${si(this.b)}`}function x6(){return`#${si(this.r)}${si(this.g)}${si(this.b)}${si((isNaN(this.opacity)?1:this.opacity)*255)}`}function em(){const t=Uc(this.opacity);return`${t===1?"rgb(":"rgba("}${oi(this.r)}, ${oi(this.g)}, ${oi(this.b)}${t===1?")":`, ${t})`}`}function Uc(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function oi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function si(t){return t=oi(t),(t<16?"0":"")+t.toString(16)}function tm(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xn(t,e,n,r)}function nm(t){if(t instanceof xn)return new xn(t.h,t.s,t.l,t.opacity);if(t instanceof Ar||(t=Er(t)),!t)return new xn;if(t instanceof xn)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 xn(s,a,c,t.opacity)}function gf(t,e,n,r){return arguments.length===1?nm(t):new xn(t,e,n,r??1)}function xn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ji(xn,gf,Ts(Ar,{brighter(t){return t=t==null?$i:Math.pow($i,t),new xn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ii:Math.pow(ii,t),new xn(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(mf(t>=240?t-240:t+120,o,r),mf(t,o,r),mf(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new xn(rm(this.h),Gc(this.s),Gc(this.l),Uc(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=Uc(this.opacity);return`${t===1?"hsl(":"hsla("}${rm(this.h)}, ${Gc(this.s)*100}%, ${Gc(this.l)*100}%${t===1?")":`, ${t})`}`}}));function rm(t){return t=(t||0)%360,t<0?t+360:t}function Gc(t){return Math.max(0,Math.min(1,t||0))}function mf(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 im=Math.PI/180,om=180/Math.PI,Hc=18,sm=.96422,am=1,cm=.82521,lm=4/29,to=6/29,um=3*to*to,v6=to*to*to;function fm(t){if(t instanceof Mn)return new Mn(t.l,t.a,t.b,t.opacity);if(t instanceof Xn)return hm(t);t instanceof At||(t=pf(t));var e=vf(t.r),n=vf(t.g),r=vf(t.b),o=yf((.2225045*e+.7168786*n+.0606169*r)/am),i,s;return e===n&&n===r?i=s=o:(i=yf((.4360747*e+.3850649*n+.1430804*r)/sm),s=yf((.0139322*e+.0971045*n+.7141733*r)/cm)),new Mn(116*o-16,500*(i-o),200*(o-s),t.opacity)}function bf(t,e,n,r){return arguments.length===1?fm(t):new Mn(t,e,n,r??1)}function Mn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Ji(Mn,bf,Ts(Ar,{brighter(t){return new Mn(this.l+Hc*(t??1),this.a,this.b,this.opacity)},darker(t){return new Mn(this.l-Hc*(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=sm*wf(e),t=am*wf(t),n=cm*wf(n),new At(xf(3.1338561*e-1.6168667*t-.4906146*n),xf(-.9787684*e+1.9161415*t+.033454*n),xf(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function yf(t){return t>v6?Math.pow(t,1/3):t/um+lm}function wf(t){return t>to?t*t*t:um*(t-lm)}function xf(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function vf(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function A6(t){if(t instanceof Xn)return new Xn(t.h,t.c,t.l,t.opacity);if(t instanceof Mn||(t=fm(t)),t.a===0&&t.b===0)return new Xn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*om;return new Xn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Af(t,e,n,r){return arguments.length===1?A6(t):new Xn(t,e,n,r??1)}function Xn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function hm(t){if(isNaN(t.h))return new Mn(t.l,0,0,t.opacity);var e=t.h*im;return new Mn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Ji(Xn,Af,Ts(Ar,{brighter(t){return new Xn(this.h,this.c,this.l+Hc*(t??1),this.opacity)},darker(t){return new Xn(this.h,this.c,this.l-Hc*(t??1),this.opacity)},rgb(){return hm(this).rgb()}}));var dm=-.14861,Ef=1.78277,Sf=-.29227,Vc=-.90649,Bs=1.97294,pm=Bs*Vc,gm=Bs*Ef,mm=Ef*Sf-Vc*dm;function E6(t){if(t instanceof ai)return new ai(t.h,t.s,t.l,t.opacity);t instanceof At||(t=pf(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(mm*r+pm*e-gm*n)/(mm+pm-gm),i=r-o,s=(Bs*(n-o)-Sf*i)/Vc,a=Math.sqrt(s*s+i*i)/(Bs*o*(1-o)),c=a?Math.atan2(s,i)*om-120:NaN;return new ai(c<0?c+360:c,a,o,t.opacity)}function Cf(t,e,n,r){return arguments.length===1?E6(t):new ai(t,e,n,r??1)}function ai(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ji(ai,Cf,Ts(Ar,{brighter(t){return t=t==null?$i:Math.pow($i,t),new ai(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ii:Math.pow(ii,t),new ai(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*im,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*(dm*r+Ef*o)),255*(e+n*(Sf*r+Vc*o)),255*(e+n*(Bs*r)),this.opacity)}}));function bm(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 ym(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 bm((n-r/e)*e,s,o,i,a)}}function wm(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 bm((n-r/e)*e,o,i,s,a)}}const qc=t=>()=>t;function xm(t,e){return function(n){return t+n*e}}function S6(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 jc(t,e){var n=e-t;return n?xm(t,n>180||n<-180?n-360*Math.round(n/360):n):qc(isNaN(t)?e:t)}function C6(t){return(t=+t)==1?Et:function(e,n){return n-e?S6(e,n,t):qc(isNaN(e)?n:e)}}function Et(t,e){var n=e-t;return n?xm(t,n):qc(isNaN(t)?e:t)}const If=function t(e){var n=C6(e);function r(o,i){var s=n((o=zc(o)).r,(i=zc(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 vm(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=zc(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 I6=vm(ym),T6=vm(wm);function Tf(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 Am(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function D6(t,e){return(Am(e)?Tf:Em)(t,e)}function Em(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]=Sr(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 Sm(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function vn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Cm(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]=Sr(t[o],e[o]):r[o]=e[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Df=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bf=new RegExp(Df.source,"g");function B6(t){return function(){return t}}function _6(t){return function(e){return t(e)+""}}function Im(t,e){var n=Df.lastIndex=Bf.lastIndex=0,r,o,i,s=-1,a=[],c=[];for(t=t+"",e=e+"";(r=Df.exec(t))&&(o=Bf.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:vn(r,o)})),n=Bf.lastIndex;return n<e.length&&(i=e.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?c[0]?_6(c[0].x):B6(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 Sr(t,e){var n=typeof e,r;return e==null||n==="boolean"?qc(e):(n==="number"?vn:n==="string"?(r=Er(e))?(e=r,If):Im:e instanceof Er?If:e instanceof Date?Sm:Am(e)?Tf:Array.isArray(e)?Em:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Cm:vn)(t,e)}function k6(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function R6(t,e){var n=jc(+t,+e);return function(r){var o=n(r);return o-360*Math.floor(o/360)}}function _s(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Tm=180/Math.PI,_f={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Dm(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)*Tm,skewX:Math.atan(c)*Tm,scaleX:s,scaleY:a}}var Wc;function F6(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?_f:Dm(e.a,e.b,e.c,e.d,e.e,e.f)}function M6(t){return t==null||(Wc||(Wc=document.createElementNS("http://www.w3.org/2000/svg","g")),Wc.setAttribute("transform",t),!(t=Wc.transform.baseVal.consolidate()))?_f:(t=t.matrix,Dm(t.a,t.b,t.c,t.d,t.e,t.f))}function Bm(t,e,n,r){function o(l){return l.length?l.pop()+" ":""}function i(l,u,f,h,d,p){if(l!==f||u!==h){var y=d.push("translate(",null,e,null,n);p.push({i:y-4,x:vn(l,f)},{i:y-2,x:vn(u,h)})}else(f||h)&&d.push("translate("+f+e+h+n)}function s(l,u,f,h){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),h.push({i:f.push(o(f)+"rotate(",null,r)-2,x:vn(l,u)})):u&&f.push(o(f)+"rotate("+u+r)}function a(l,u,f,h){l!==u?h.push({i:f.push(o(f)+"skewX(",null,r)-2,x:vn(l,u)}):u&&f.push(o(f)+"skewX("+u+r)}function c(l,u,f,h,d,p){if(l!==f||u!==h){var y=d.push(o(d)+"scale(",null,",",null,")");p.push({i:y-4,x:vn(l,f)},{i:y-2,x:vn(u,h)})}else(f!==1||h!==1)&&d.push(o(d)+"scale("+f+","+h+")")}return function(l,u){var f=[],h=[];return l=t(l),u=t(u),i(l.translateX,l.translateY,u.translateX,u.translateY,f,h),s(l.rotate,u.rotate,f,h),a(l.skewX,u.skewX,f,h),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,f,h),l=u=null,function(d){for(var p=-1,y=h.length,v;++p<y;)f[(v=h[p]).i]=v.x(d);return f.join("")}}}var P6=Bm(F6,"px, ","px)","deg)"),L6=Bm(M6,", ",")",")"),N6=1e-12;function _m(t){return((t=Math.exp(t))+1/t)/2}function O6(t){return((t=Math.exp(t))-1/t)/2}function z6(t){return((t=Math.exp(2*t))-1)/(t+1)}const U6=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],h=s[2],d=u-a,p=f-c,y=d*d+p*p,v,b;if(y<N6)b=Math.log(h/l)/e,v=function(B){return[a+B*d,c+B*p,l*Math.exp(e*B*b)]};else{var A=Math.sqrt(y),C=(h*h-l*l+r*y)/(2*l*n*A),E=(h*h-l*l-r*y)/(2*h*n*A),I=Math.log(Math.sqrt(C*C+1)-C),R=Math.log(Math.sqrt(E*E+1)-E);b=(R-I)/e,v=function(B){var O=B*b,F=_m(I),P=l/(n*A)*(F*z6(e*O+I)-O6(I));return[a+P*d,c+P*p,l*F/_m(e*O+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 km(t){return function(e,n){var r=t((e=gf(e)).h,(n=gf(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 G6=km(jc);var H6=km(Et);function V6(t,e){var n=Et((t=bf(t)).l,(e=bf(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 Rm(t){return function(e,n){var r=t((e=Af(e)).h,(n=Af(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 q6=Rm(jc);var j6=Rm(Et);function Fm(t){return function e(n){n=+n;function r(o,i){var s=t((o=Cf(o)).h,(i=Cf(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 W6=Fm(jc);var Q6=Fm(Et);function kf(t,e){e===void 0&&(e=t,t=Sr);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 Y6(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}const Z6=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Sr,interpolateArray:D6,interpolateBasis:ym,interpolateBasisClosed:wm,interpolateCubehelix:W6,interpolateCubehelixLong:Q6,interpolateDate:Sm,interpolateDiscrete:k6,interpolateHcl:q6,interpolateHclLong:j6,interpolateHsl:G6,interpolateHslLong:H6,interpolateHue:R6,interpolateLab:V6,interpolateNumber:vn,interpolateNumberArray:Tf,interpolateObject:Cm,interpolateRgb:If,interpolateRgbBasis:I6,interpolateRgbBasisClosed:T6,interpolateRound:_s,interpolateString:Im,interpolateTransformCss:P6,interpolateTransformSvg:L6,interpolateZoom:U6,piecewise:kf,quantize:Y6},Symbol.toStringTag,{value:"Module"}));function X6(t){return function(){return t}}function Rf(t){return+t}var Mm=[0,1];function Qt(t){return t}function Ff(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:X6(isNaN(e)?NaN:.5)}function K6(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function J6(t,e,n){var r=t[0],o=t[1],i=e[0],s=e[1];return o<r?(r=Ff(o,r),i=n(s,i)):(r=Ff(r,o),i=n(i,s)),function(a){return i(r(a))}}function $6(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]=Ff(t[s],t[s+1]),i[s]=n(e[s],e[s+1]);return function(a){var c=dr(t,a,1,r)-1;return i[c](o[c](a))}}function ks(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Qc(){var t=Mm,e=Mm,n=Sr,r,o,i,s=Qt,a,c,l;function u(){var h=Math.min(t.length,e.length);return s!==Qt&&(s=K6(t[0],t[h-1])),a=h>2?$6:J6,c=l=null,f}function f(h){return h==null||isNaN(h=+h)?i:(c||(c=a(t.map(r),e,n)))(r(s(h)))}return f.invert=function(h){return s(o((l||(l=a(e,t.map(r),vn)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Rf),u()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),u()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=_s,u()},f.clamp=function(h){return arguments.length?(s=h?!0:Qt,u()):s!==Qt},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,d){return r=h,o=d,u()}}function Pm(){return Qc()(Qt,Qt)}function Lm(t,e,n,r){var o=Zr(t,e,n),i;switch(r=zi(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(i=RA(o,s))&&(r.precision=i),sp(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=FA(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=kA(o))&&(r.precision=i-(r.type==="%")*2);break}}return Ft(r)}function ci(t){var e=t.domain;return t.ticks=function(n){var r=e();return nc(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var o=e();return Lm(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=bu(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 Nm(){var t=Pm();return t.copy=function(){return ks(t,Nm())},Rn.apply(t,arguments),ci(t)}function Om(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,Rf),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Om(t).unknown(e)},t=arguments.length?Array.from(t,Rf):[0,1],ci(n)}function zm(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 Um(t){return Math.log(t)}function Gm(t){return Math.exp(t)}function e8(t){return-Math.log(-t)}function t8(t){return-Math.exp(-t)}function n8(t){return isFinite(t)?+("1e"+t):t<0?0:t}function r8(t){return t===10?n8:t===Math.E?Math.exp:e=>Math.pow(t,e)}function i8(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 Hm(t){return(e,n)=>-t(-e,n)}function Mf(t){const e=t(Um,Gm),n=e.domain;let r=10,o,i;function s(){return o=i8(r),i=r8(r),n()[0]<0?(o=Hm(o),i=Hm(i),t(e8,t8)):t(Um,Gm),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 h=o(l),d=o(u),p,y;const v=a==null?10:+a;let b=[];if(!(r%1)&&d-h<v){if(h=Math.floor(h),d=Math.ceil(d),l>0){for(;h<=d;++h)for(p=1;p<r;++p)if(y=h<0?p/i(-h):p*i(h),!(y<l)){if(y>u)break;b.push(y)}}else for(;h<=d;++h)for(p=r-1;p>=1;--p)if(y=h>0?p/i(-h):p*i(h),!(y<l)){if(y>u)break;b.push(y)}b.length*2<v&&(b=nc(l,u,v))}else b=nc(h,d,Math.min(d-h,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=zi(c)).precision==null&&(c.trim=!0),c=Ft(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(zm(n(),{floor:a=>i(Math.floor(o(a))),ceil:a=>i(Math.ceil(o(a)))})),e}function Pf(){const t=Mf(Qc()).domain([1,10]);return t.copy=()=>ks(t,Pf()).base(t.base()),Rn.apply(t,arguments),t}function Vm(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function qm(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Lf(t){var e=1,n=t(Vm(e),qm(e));return n.constant=function(r){return arguments.length?t(Vm(e=+r),qm(e)):e},ci(n)}function jm(){var t=Lf(Qc());return t.copy=function(){return ks(t,jm()).constant(t.constant())},Rn.apply(t,arguments)}function Wm(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function o8(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function s8(t){return t<0?-t*t:t*t}function Nf(t){var e=t(Qt,Qt),n=1;function r(){return n===1?t(Qt,Qt):n===.5?t(o8,s8):t(Wm(n),Wm(1/n))}return e.exponent=function(o){return arguments.length?(n=+o,r()):n},ci(e)}function Of(){var t=Nf(Qc());return t.copy=function(){return ks(t,Of()).exponent(t.exponent())},Rn.apply(t,arguments),t}function a8(){return Of.apply(null,arguments).exponent(.5)}function Qm(){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]=$0(t,s/a);return i}function i(s){return s==null||isNaN(s=+s)?r:e[dr(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(Yr),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 Qm().domain(t).range(e).unknown(r)},Rn.apply(i,arguments)}function Ym(){var t=0,e=1,n=1,r=[.5],o=[0,1],i;function s(c){return c!=null&&c<=c?o[dr(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 Ym().domain([t,e]).range(o).unknown(i)},Rn.apply(ci(s),arguments)}function Zm(){var t=[.5],e=[0,1],n,r=1;function o(i){return i!=null&&i<=i?e[dr(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 Zm().domain(t).range(e).unknown(n)},Rn.apply(o,arguments)}function c8(t){return new Date(t)}function l8(t){return t instanceof Date?+t:+new Date(+t)}function zf(t,e,n,r,o,i,s,a,c,l){var u=Pm(),f=u.invert,h=u.domain,d=l(".%L"),p=l(":%S"),y=l("%I:%M"),v=l("%I %p"),b=l("%a %d"),A=l("%b %d"),C=l("%B"),E=l("%Y");function I(R){return(c(R)<R?d:a(R)<R?p:s(R)<R?y:i(R)<R?v:r(R)<R?o(R)<R?b:A:n(R)<R?C:E)(R)}return u.invert=function(R){return new Date(f(R))},u.domain=function(R){return arguments.length?h(Array.from(R,l8)):h().map(c8)},u.ticks=function(R){var B=h();return t(B[0],B[B.length-1],R??10)},u.tickFormat=function(R,B){return B==null?I:l(B)},u.nice=function(R){var B=h();return(!R||typeof R.range!="function")&&(R=e(B[0],B[B.length-1],R??10)),R?h(zm(B,R)):u},u.copy=function(){return ks(u,zf(t,e,n,r,o,i,s,a,c,l))},u}function u8(){return Rn.apply(zf(qA,jA,Dn,ss,is,pr,ac,oc,Qn,Du).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function f8(){return Rn.apply(zf(HA,VA,Bn,as,os,Xr,cc,sc,Qn,Bu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Yc(){var t=0,e=1,n,r,o,i,s=Qt,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(h){var d,p;return arguments.length?([d,p]=h,s=f(d,p),l):[s(0),s(1)]}}return l.range=u(Sr),l.rangeRound=u(_s),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 Cr(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Uf(){var t=ci(Yc()(Qt));return t.copy=function(){return Cr(t,Uf())},vr.apply(t,arguments)}function Xm(){var t=Mf(Yc()).domain([1,10]);return t.copy=function(){return Cr(t,Xm()).base(t.base())},vr.apply(t,arguments)}function Km(){var t=Lf(Yc());return t.copy=function(){return Cr(t,Km()).constant(t.constant())},vr.apply(t,arguments)}function Gf(){var t=Nf(Yc());return t.copy=function(){return Cr(t,Gf()).exponent(t.exponent())},vr.apply(t,arguments)}function h8(){return Gf.apply(null,arguments).exponent(.5)}function Zc(){var t=0,e=.5,n=1,r=1,o,i,s,a,c,l=Qt,u,f=!1,h;function d(y){return isNaN(y=+y)?h:(y=.5+((y=+u(y))-i)*(r*y<r*i?a:c),l(f?Math.max(0,Math.min(1,y)):y))}d.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,d):[t,e,n]},d.clamp=function(y){return arguments.length?(f=!!y,d):f},d.interpolator=function(y){return arguments.length?(l=y,d):l};function p(y){return function(v){var b,A,C;return arguments.length?([b,A,C]=v,l=kf(y,[b,A,C]),d):[l(0),l(.5),l(1)]}}return d.range=p(Sr),d.rangeRound=p(_s),d.unknown=function(y){return arguments.length?(h=y,d):h},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,d}}function Jm(){var t=ci(Zc()(Qt));return t.copy=function(){return Cr(t,Jm())},vr.apply(t,arguments)}function $m(){var t=Mf(Zc()).domain([.1,1,10]);return t.copy=function(){return Cr(t,$m()).base(t.base())},vr.apply(t,arguments)}function e1(){var t=Lf(Zc());return t.copy=function(){return Cr(t,e1()).constant(t.constant())},vr.apply(t,arguments)}function Hf(){var t=Nf(Zc());return t.copy=function(){return Cr(t,Hf()).exponent(t.exponent())},vr.apply(t,arguments)}function d8(){return Hf.apply(null,arguments).exponent(.5)}function Pn(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 p8=Pn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),g8=Pn("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),m8=Pn("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),b8=Pn("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),y8=Pn("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),w8=Pn("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),x8=Pn("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),v8=Pn("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),A8=Pn("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),E8=Pn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function Vf(t,e,n){const r=t-e+n*2;return t?r>0?r:1:0}const S8="identity",no="linear",Ir="log",Rs="pow",Fs="sqrt",Xc="symlog",t1="time",n1="utc",Ln="sequential",ro="diverging",qf="quantile",r1="quantize",i1="threshold",jf="ordinal",Wf="point",o1="band",Qf="bin-ordinal",yt="continuous",Ms="discrete",Ps="discretizing",an="interpolating",s1="temporal";function C8(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 I8(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 Yf(){const t=df().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,h=r[1]<r[0],d=r[1-h],p=Vf(f,a,c);let y=r[h-0];o=(d-y)/(p||1),s&&(o=Math.floor(o)),y+=(d-y-o*(f-a))*l,i=o*(1-a),s&&(y=Math.round(y),i=Math.round(i));const v=ns(f).map(b=>y+o*b);return n(h?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 h=r[1]<r[0],d=h?n().reverse():n(),p=d.length-1;let y=+f[0],v=+f[1],b,A,C;if(!(y!==y||v!==v)&&(v<y&&(C=y,y=v,v=C),!(v<d[0]||y>r[1-h])))return b=Math.max(0,dr(d,y)-1),A=y===v?b:dr(d,v)-1,y-d[b]>i+1e-10&&++b,h&&(C=b,b=p-A,A=p-C),b>A?void 0:e().slice(b,A+1)},t.invert=function(f){const h=t.invertRange([f,f]);return h&&h[0]},t.copy=function(){return Yf().domain(e()).range(r).round(s).paddingInner(a).paddingOuter(c).align(l)},u()}function a1(t){const e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return a1(e())},t}function T8(){return a1(Yf().paddingInner(1))}var D8=Array.prototype.map;function B8(t){return D8.call(t,qo)}const _8=Array.prototype.slice;function c1(){let t=[],e=[];function n(r){return r==null||r!==r?void 0:e[(dr(t,r)-1)%e.length]}return n.domain=function(r){return arguments.length?(t=B8(r),n):t.slice()},n.range=function(r){return arguments.length?(e=_8.call(r),n):e.slice()},n.tickFormat=function(r,o){return Lm(t[0],bn(t),r??10,o)},n.copy=function(){return c1().domain(n.domain()).range(n.range())},n}const Kc=new Map,k8=Symbol("vega_scale");function R8(t){return t[k8]=!0,t}function F8(t,e,n){const r=function(){const i=e();return i.invertRange||(i.invertRange=i.invert?C8(i):i.invertExtent?I8(i):void 0),i.type=t,R8(i)};return r.metadata=Za(iu(n)),r}function Ye(t,e,n){return arguments.length>1?(Kc.set(t,F8(t,e,n)),this):M8(t)?Kc.get(t):void 0}Ye(S8,Om),Ye(no,Nm,yt),Ye(Ir,Pf,[yt,Ir]),Ye(Rs,Of,yt),Ye(Fs,a8,yt),Ye(Xc,jm,yt),Ye(t1,u8,[yt,s1]),Ye(n1,f8,[yt,s1]),Ye(Ln,Uf,[yt,an]),Ye(`${Ln}-${no}`,Uf,[yt,an]),Ye(`${Ln}-${Ir}`,Xm,[yt,an,Ir]),Ye(`${Ln}-${Rs}`,Gf,[yt,an]),Ye(`${Ln}-${Fs}`,h8,[yt,an]),Ye(`${Ln}-${Xc}`,Km,[yt,an]),Ye(`${ro}-${no}`,Jm,[yt,an]),Ye(`${ro}-${Ir}`,$m,[yt,an,Ir]),Ye(`${ro}-${Rs}`,Hf,[yt,an]),Ye(`${ro}-${Fs}`,d8,[yt,an]),Ye(`${ro}-${Xc}`,e1,[yt,an]),Ye(qf,Qm,[Ps,qf]),Ye(r1,Ym,Ps),Ye(i1,Zm,Ps),Ye(Qf,c1,[Ms,Ps]),Ye(jf,df,Ms),Ye(o1,Yf,Ms),Ye(Wf,T8,Ms);function M8(t){return Kc.has(t)}function Ls(t,e){const n=Kc.get(t);return n&&n.metadata[e]}function Bt(t){return Ls(t,yt)}function Tr(t){return Ls(t,Ms)}function li(t){return Ls(t,Ps)}function l1(t){return Ls(t,Ir)}function Jc(t){return Ls(t,an)}function P8(t,e){const n=e[0],r=bn(e)-n;return function(o){return t(n+o*r)}}function $c(t,e,n){return kf(u1(e||"rgb",n),t)}function L8(t,e){const n=new Array(e),r=e+1;for(let o=0;o<e;)n[o]=t(++o/r);return n}function u1(t,e){const n=Z6[N8(t)];return e!=null&&n&&n.gamma?n.gamma(e):n}function N8(t){return"interpolate"+t.toLowerCase().split("-").map(e=>e[0].toUpperCase()+e.slice(1)).join("")}const O8={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"},z8={accent:g8,category10:p8,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:m8,observable10:b8,paired:y8,pastel1:w8,pastel2:x8,set1:v8,set2:A8,set3:E8,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function f1(t){if(Dt(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 h1(t,e){for(const n in t)Zf(n,e(t[n]))}const d1={};h1(z8,f1),h1(O8,t=>$c(f1(t)));function Zf(t,e){return t=t&&t.toLowerCase(),arguments.length>1?(d1[t]=e,this):d1[t]}function Ze(t,e=t){if(/^[A-Za-z0-9_]+$/.test(t)){const n=function(o){t in o||U8(o,t)},r=new Function("validator",`
|
|
274
|
+
};`;function Pn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Ar(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 Tf=Symbol("implicit");function Df(){var t=new jn,e=[],n=[],r=Tf;function o(i){let s=t.get(i);if(s===void 0){if(r!==Tf)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 jn;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 Df(e,n).unknown(r)},Pn.apply(o,arguments),o}function ro(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Us(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Er(){}var ci=.7,io=1/ci,oo="\\s*([+-]?\\d+)\\s*",Gs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ln="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",F6=/^#([0-9a-f]{3,8})$/,M6=new RegExp(`^rgb\\(${oo},${oo},${oo}\\)$`),P6=new RegExp(`^rgb\\(${Ln},${Ln},${Ln}\\)$`),L6=new RegExp(`^rgba\\(${oo},${oo},${oo},${Gs}\\)$`),O6=new RegExp(`^rgba\\(${Ln},${Ln},${Ln},${Gs}\\)$`),N6=new RegExp(`^hsl\\(${Gs},${Ln},${Ln}\\)$`),z6=new RegExp(`^hsla\\(${Gs},${Ln},${Ln},${Gs}\\)$`),lm={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};ro(Er,Sr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:um,formatHex:um,formatHex8:U6,formatHsl:G6,formatRgb:fm,toString:fm});function um(){return this.rgb().formatHex()}function U6(){return this.rgb().formatHex8()}function G6(){return mm(this).formatHsl()}function fm(){return this.rgb().formatRgb()}function Sr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=F6.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?hm(e):n===3?new At(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Kc(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Kc(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=M6.exec(t))?new At(e[1],e[2],e[3],1):(e=P6.exec(t))?new At(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=L6.exec(t))?Kc(e[1],e[2],e[3],e[4]):(e=O6.exec(t))?Kc(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=N6.exec(t))?gm(e[1],e[2]/100,e[3]/100,1):(e=z6.exec(t))?gm(e[1],e[2]/100,e[3]/100,e[4]):lm.hasOwnProperty(t)?hm(lm[t]):t==="transparent"?new At(NaN,NaN,NaN,0):null}function hm(t){return new At(t>>16&255,t>>8&255,t&255,1)}function Kc(t,e,n,r){return r<=0&&(t=e=n=NaN),new At(t,e,n,r)}function Bf(t){return t instanceof Er||(t=Sr(t)),t?(t=t.rgb(),new At(t.r,t.g,t.b,t.opacity)):new At}function Jc(t,e,n,r){return arguments.length===1?Bf(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}ro(At,Jc,Us(Er,{brighter(t){return t=t==null?io:Math.pow(io,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ci:Math.pow(ci,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new At(li(this.r),li(this.g),li(this.b),$c(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:dm,formatHex:dm,formatHex8:H6,formatRgb:pm,toString:pm}));function dm(){return`#${ui(this.r)}${ui(this.g)}${ui(this.b)}`}function H6(){return`#${ui(this.r)}${ui(this.g)}${ui(this.b)}${ui((isNaN(this.opacity)?1:this.opacity)*255)}`}function pm(){const t=$c(this.opacity);return`${t===1?"rgb(":"rgba("}${li(this.r)}, ${li(this.g)}, ${li(this.b)}${t===1?")":`, ${t})`}`}function $c(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function li(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ui(t){return t=li(t),(t<16?"0":"")+t.toString(16)}function gm(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 mm(t){if(t instanceof An)return new An(t.h,t.s,t.l,t.opacity);if(t instanceof Er||(t=Sr(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 kf(t,e,n,r){return arguments.length===1?mm(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}ro(An,kf,Us(Er,{brighter(t){return t=t==null?io:Math.pow(io,t),new An(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ci:Math.pow(ci,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(_f(t>=240?t-240:t+120,o,r),_f(t,o,r),_f(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new An(bm(this.h),el(this.s),el(this.l),$c(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=$c(this.opacity);return`${t===1?"hsl(":"hsla("}${bm(this.h)}, ${el(this.s)*100}%, ${el(this.l)*100}%${t===1?")":`, ${t})`}`}}));function bm(t){return t=(t||0)%360,t<0?t+360:t}function el(t){return Math.max(0,Math.min(1,t||0))}function _f(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 ym=Math.PI/180,wm=180/Math.PI,tl=18,xm=.96422,vm=1,Am=.82521,Em=4/29,so=6/29,Sm=3*so*so,V6=so*so*so;function Cm(t){if(t instanceof On)return new On(t.l,t.a,t.b,t.opacity);if(t instanceof Jn)return Im(t);t instanceof At||(t=Bf(t));var e=Lf(t.r),n=Lf(t.g),r=Lf(t.b),o=Ff((.2225045*e+.7168786*n+.0606169*r)/vm),i,s;return e===n&&n===r?i=s=o:(i=Ff((.4360747*e+.3850649*n+.1430804*r)/xm),s=Ff((.0139322*e+.0971045*n+.7141733*r)/Am)),new On(116*o-16,500*(i-o),200*(o-s),t.opacity)}function Rf(t,e,n,r){return arguments.length===1?Cm(t):new On(t,e,n,r??1)}function On(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}ro(On,Rf,Us(Er,{brighter(t){return new On(this.l+tl*(t??1),this.a,this.b,this.opacity)},darker(t){return new On(this.l-tl*(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=xm*Mf(e),t=vm*Mf(t),n=Am*Mf(n),new At(Pf(3.1338561*e-1.6168667*t-.4906146*n),Pf(-.9787684*e+1.9161415*t+.033454*n),Pf(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Ff(t){return t>V6?Math.pow(t,1/3):t/Sm+Em}function Mf(t){return t>so?t*t*t:Sm*(t-Em)}function Pf(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Lf(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function q6(t){if(t instanceof Jn)return new Jn(t.h,t.c,t.l,t.opacity);if(t instanceof On||(t=Cm(t)),t.a===0&&t.b===0)return new Jn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*wm;return new Jn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Of(t,e,n,r){return arguments.length===1?q6(t):new Jn(t,e,n,r??1)}function Jn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Im(t){if(isNaN(t.h))return new On(t.l,0,0,t.opacity);var e=t.h*ym;return new On(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}ro(Jn,Of,Us(Er,{brighter(t){return new Jn(this.h,this.c,this.l+tl*(t??1),this.opacity)},darker(t){return new Jn(this.h,this.c,this.l-tl*(t??1),this.opacity)},rgb(){return Im(this).rgb()}}));var Tm=-.14861,Nf=1.78277,zf=-.29227,nl=-.90649,Hs=1.97294,Dm=Hs*nl,Bm=Hs*Nf,km=Nf*zf-nl*Tm;function j6(t){if(t instanceof fi)return new fi(t.h,t.s,t.l,t.opacity);t instanceof At||(t=Bf(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(km*r+Dm*e-Bm*n)/(km+Dm-Bm),i=r-o,s=(Hs*(n-o)-zf*i)/nl,a=Math.sqrt(s*s+i*i)/(Hs*o*(1-o)),c=a?Math.atan2(s,i)*wm-120:NaN;return new fi(c<0?c+360:c,a,o,t.opacity)}function Uf(t,e,n,r){return arguments.length===1?j6(t):new fi(t,e,n,r??1)}function fi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ro(fi,Uf,Us(Er,{brighter(t){return t=t==null?io:Math.pow(io,t),new fi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ci:Math.pow(ci,t),new fi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*ym,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*(Tm*r+Nf*o)),255*(e+n*(zf*r+nl*o)),255*(e+n*(Hs*r)),this.opacity)}}));function _m(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 Rm(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 _m((n-r/e)*e,s,o,i,a)}}function Fm(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 _m((n-r/e)*e,o,i,s,a)}}const rl=t=>()=>t;function Mm(t,e){return function(n){return t+n*e}}function W6(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 il(t,e){var n=e-t;return n?Mm(t,n>180||n<-180?n-360*Math.round(n/360):n):rl(isNaN(t)?e:t)}function Y6(t){return(t=+t)==1?Et:function(e,n){return n-e?W6(e,n,t):rl(isNaN(e)?n:e)}}function Et(t,e){var n=e-t;return n?Mm(t,n):rl(isNaN(t)?e:t)}const Gf=function t(e){var n=Y6(e);function r(o,i){var s=n((o=Jc(o)).r,(i=Jc(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 Pm(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=Jc(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 Q6=Pm(Rm),Z6=Pm(Fm);function Hf(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 Lm(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function X6(t,e){return(Lm(e)?Hf:Om)(t,e)}function Om(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]=Cr(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 Nm(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 zm(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]=Cr(t[o],e[o]):r[o]=e[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Vf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qf=new RegExp(Vf.source,"g");function K6(t){return function(){return t}}function J6(t){return function(e){return t(e)+""}}function Um(t,e){var n=Vf.lastIndex=qf.lastIndex=0,r,o,i,s=-1,a=[],c=[];for(t=t+"",e=e+"";(r=Vf.exec(t))&&(o=qf.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=qf.lastIndex;return n<e.length&&(i=e.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?c[0]?J6(c[0].x):K6(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 Cr(t,e){var n=typeof e,r;return e==null||n==="boolean"?rl(e):(n==="number"?En:n==="string"?(r=Sr(e))?(e=r,Gf):Um:e instanceof Sr?Gf:e instanceof Date?Nm:Lm(e)?Hf:Array.isArray(e)?Om:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?zm:En)(t,e)}function $6(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function e8(t,e){var n=il(+t,+e);return function(r){var o=n(r);return o-360*Math.floor(o/360)}}function Vs(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Gm=180/Math.PI,jf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Hm(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)*Gm,skewX:Math.atan(c)*Gm,scaleX:s,scaleY:a}}var ol;function t8(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?jf:Hm(e.a,e.b,e.c,e.d,e.e,e.f)}function n8(t){return t==null||(ol||(ol=document.createElementNS("http://www.w3.org/2000/svg","g")),ol.setAttribute("transform",t),!(t=ol.transform.baseVal.consolidate()))?jf:(t=t.matrix,Hm(t.a,t.b,t.c,t.d,t.e,t.f))}function Vm(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 b=h.push("translate(",null,e,null,n);p.push({i:b-4,x:En(l,f)},{i:b-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 b=h.push(o(h)+"scale(",null,",",null,")");p.push({i:b-4,x:En(l,f)},{i:b-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,b=d.length,v;++p<b;)f[(v=d[p]).i]=v.x(h);return f.join("")}}}var r8=Vm(t8,"px, ","px)","deg)"),i8=Vm(n8,", ",")",")"),o8=1e-12;function qm(t){return((t=Math.exp(t))+1/t)/2}function s8(t){return((t=Math.exp(t))-1/t)/2}function a8(t){return((t=Math.exp(2*t))-1)/(t+1)}const c8=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,b=h*h+p*p,v,y;if(b<o8)y=Math.log(d/l)/e,v=function(B){return[a+B*h,c+B*p,l*Math.exp(e*B*y)]};else{var A=Math.sqrt(b),S=(d*d-l*l+r*b)/(2*l*n*A),E=(d*d-l*l-r*b)/(2*d*n*A),I=Math.log(Math.sqrt(S*S+1)-S),_=Math.log(Math.sqrt(E*E+1)-E);y=(_-I)/e,v=function(B){var N=B*y,M=qm(I),F=l/(n*A)*(M*a8(e*N+I)-s8(I));return[a+F*h,c+F*p,l*M/qm(e*N+I)]}}return v.duration=y*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 jm(t){return function(e,n){var r=t((e=kf(e)).h,(n=kf(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 l8=jm(il);var u8=jm(Et);function f8(t,e){var n=Et((t=Rf(t)).l,(e=Rf(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 Wm(t){return function(e,n){var r=t((e=Of(e)).h,(n=Of(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 h8=Wm(il);var d8=Wm(Et);function Ym(t){return function e(n){n=+n;function r(o,i){var s=t((o=Uf(o)).h,(i=Uf(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 p8=Ym(il);var g8=Ym(Et);function Wf(t,e){e===void 0&&(e=t,t=Cr);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 m8(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}const b8=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Cr,interpolateArray:X6,interpolateBasis:Rm,interpolateBasisClosed:Fm,interpolateCubehelix:p8,interpolateCubehelixLong:g8,interpolateDate:Nm,interpolateDiscrete:$6,interpolateHcl:h8,interpolateHclLong:d8,interpolateHsl:l8,interpolateHslLong:u8,interpolateHue:e8,interpolateLab:f8,interpolateNumber:En,interpolateNumberArray:Hf,interpolateObject:zm,interpolateRgb:Gf,interpolateRgbBasis:Q6,interpolateRgbBasisClosed:Z6,interpolateRound:Vs,interpolateString:Um,interpolateTransformCss:r8,interpolateTransformSvg:i8,interpolateZoom:c8,piecewise:Wf,quantize:m8},Symbol.toStringTag,{value:"Module"}));function y8(t){return function(){return t}}function Yf(t){return+t}var Qm=[0,1];function Qt(t){return t}function Qf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:y8(isNaN(e)?NaN:.5)}function w8(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function x8(t,e,n){var r=t[0],o=t[1],i=e[0],s=e[1];return o<r?(r=Qf(o,r),i=n(s,i)):(r=Qf(r,o),i=n(i,s)),function(a){return i(r(a))}}function v8(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]=Qf(t[s],t[s+1]),i[s]=n(e[s],e[s+1]);return function(a){var c=pr(t,a,1,r)-1;return i[c](o[c](a))}}function qs(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function sl(){var t=Qm,e=Qm,n=Cr,r,o,i,s=Qt,a,c,l;function u(){var d=Math.min(t.length,e.length);return s!==Qt&&(s=w8(t[0],t[d-1])),a=d>2?v8:x8,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,Yf),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=Vs,u()},f.clamp=function(d){return arguments.length?(s=d?!0:Qt,u()):s!==Qt},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 Zm(){return sl()(Qt,Qt)}function Xm(t,e,n,r){var o=$r(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=e3(o,s))&&(r.precision=i),vp(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=t3(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=$A(o))&&(r.precision=i-(r.type==="%")*2);break}}return Bt(r)}function hi(t){var e=t.domain;return t.ticks=function(n){var r=e();return gc(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var o=e();return Xm(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=_u(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 Km(){var t=Zm();return t.copy=function(){return qs(t,Km())},Pn.apply(t,arguments),hi(t)}function Jm(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,Yf),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Jm(t).unknown(e)},t=arguments.length?Array.from(t,Yf):[0,1],hi(n)}function $m(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 e1(t){return Math.log(t)}function t1(t){return Math.exp(t)}function A8(t){return-Math.log(-t)}function E8(t){return-Math.exp(-t)}function S8(t){return isFinite(t)?+("1e"+t):t<0?0:t}function C8(t){return t===10?S8:t===Math.E?Math.exp:e=>Math.pow(t,e)}function I8(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 n1(t){return(e,n)=>-t(-e,n)}function Zf(t){const e=t(e1,t1),n=e.domain;let r=10,o,i;function s(){return o=I8(r),i=C8(r),n()[0]<0?(o=n1(o),i=n1(i),t(A8,E8)):t(e1,t1),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,b;const v=a==null?10:+a;let y=[];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(b=d<0?p/i(-d):p*i(d),!(b<l)){if(b>u)break;y.push(b)}}else for(;d<=h;++d)for(p=r-1;p>=1;--p)if(b=d>0?p/i(-d):p*i(d),!(b<l)){if(b>u)break;y.push(b)}y.length*2<v&&(y=gc(l,u,v))}else y=gc(d,h,Math.min(h-d,v)).map(i);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=qi(c)).precision==null&&(c.trim=!0),c=Bt(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($m(n(),{floor:a=>i(Math.floor(o(a))),ceil:a=>i(Math.ceil(o(a)))})),e}function Xf(){const t=Zf(sl()).domain([1,10]);return t.copy=()=>qs(t,Xf()).base(t.base()),Pn.apply(t,arguments),t}function r1(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function i1(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Kf(t){var e=1,n=t(r1(e),i1(e));return n.constant=function(r){return arguments.length?t(r1(e=+r),i1(e)):e},hi(n)}function o1(){var t=Kf(sl());return t.copy=function(){return qs(t,o1()).constant(t.constant())},Pn.apply(t,arguments)}function s1(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function T8(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function D8(t){return t<0?-t*t:t*t}function Jf(t){var e=t(Qt,Qt),n=1;function r(){return n===1?t(Qt,Qt):n===.5?t(T8,D8):t(s1(n),s1(1/n))}return e.exponent=function(o){return arguments.length?(n=+o,r()):n},hi(e)}function $f(){var t=Jf(sl());return t.copy=function(){return qs(t,$f()).exponent(t.exponent())},Pn.apply(t,arguments),t}function B8(){return $f.apply(null,arguments).exponent(.5)}function a1(){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]=pp(t,s/a);return i}function i(s){return s==null||isNaN(s=+s)?r:e[pr(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(Jr),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 a1().domain(t).range(e).unknown(r)},Pn.apply(i,arguments)}function c1(){var t=0,e=1,n=1,r=[.5],o=[0,1],i;function s(c){return c!=null&&c<=c?o[pr(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 c1().domain([t,e]).range(o).unknown(i)},Pn.apply(hi(s),arguments)}function l1(){var t=[.5],e=[0,1],n,r=1;function o(i){return i!=null&&i<=i?e[pr(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 l1().domain(t).range(e).unknown(n)},Pn.apply(o,arguments)}function k8(t){return new Date(t)}function _8(t){return t instanceof Date?+t:+new Date(+t)}function eh(t,e,n,r,o,i,s,a,c,l){var u=Zm(),f=u.invert,d=u.domain,h=l(".%L"),p=l(":%S"),b=l("%I:%M"),v=l("%I %p"),y=l("%a %d"),A=l("%b %d"),S=l("%B"),E=l("%Y");function I(_){return(c(_)<_?h:a(_)<_?p:s(_)<_?b:i(_)<_?v:r(_)<_?o(_)<_?y:A:n(_)<_?S:E)(_)}return u.invert=function(_){return new Date(f(_))},u.domain=function(_){return arguments.length?d(Array.from(_,_8)):d().map(k8)},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($m(B,_)):u},u.copy=function(){return qs(u,eh(t,e,n,r,o,i,s,a,c,l))},u}function R8(){return Pn.apply(eh(h3,d3,_n,ws,bs,gr,xc,yc,Zn,Hu).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function F8(){return Pn.apply(eh(u3,f3,Rn,xs,ys,ei,vc,wc,Zn,Vu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function al(){var t=0,e=1,n,r,o,i,s=Qt,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(Cr),l.rangeRound=u(Vs),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 Ir(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function th(){var t=hi(al()(Qt));return t.copy=function(){return Ir(t,th())},Ar.apply(t,arguments)}function u1(){var t=Zf(al()).domain([1,10]);return t.copy=function(){return Ir(t,u1()).base(t.base())},Ar.apply(t,arguments)}function f1(){var t=Kf(al());return t.copy=function(){return Ir(t,f1()).constant(t.constant())},Ar.apply(t,arguments)}function nh(){var t=Jf(al());return t.copy=function(){return Ir(t,nh()).exponent(t.exponent())},Ar.apply(t,arguments)}function M8(){return nh.apply(null,arguments).exponent(.5)}function cl(){var t=0,e=.5,n=1,r=1,o,i,s,a,c,l=Qt,u,f=!1,d;function h(b){return isNaN(b=+b)?d:(b=.5+((b=+u(b))-i)*(r*b<r*i?a:c),l(f?Math.max(0,Math.min(1,b)):b))}h.domain=function(b){return arguments.length?([t,e,n]=b,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(b){return arguments.length?(f=!!b,h):f},h.interpolator=function(b){return arguments.length?(l=b,h):l};function p(b){return function(v){var y,A,S;return arguments.length?([y,A,S]=v,l=Wf(b,[y,A,S]),h):[l(0),l(.5),l(1)]}}return h.range=p(Cr),h.rangeRound=p(Vs),h.unknown=function(b){return arguments.length?(d=b,h):d},function(b){return u=b,o=b(t),i=b(e),s=b(n),a=o===i?0:.5/(i-o),c=i===s?0:.5/(s-i),r=i<o?-1:1,h}}function h1(){var t=hi(cl()(Qt));return t.copy=function(){return Ir(t,h1())},Ar.apply(t,arguments)}function d1(){var t=Zf(cl()).domain([.1,1,10]);return t.copy=function(){return Ir(t,d1()).base(t.base())},Ar.apply(t,arguments)}function p1(){var t=Kf(cl());return t.copy=function(){return Ir(t,p1()).constant(t.constant())},Ar.apply(t,arguments)}function rh(){var t=Jf(cl());return t.copy=function(){return Ir(t,rh()).exponent(t.exponent())},Ar.apply(t,arguments)}function P8(){return rh.apply(null,arguments).exponent(.5)}function Nn(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 L8=Nn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),O8=Nn("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),N8=Nn("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),z8=Nn("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),U8=Nn("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),G8=Nn("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),H8=Nn("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),V8=Nn("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),q8=Nn("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),j8=Nn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function ih(t,e,n){const r=t-e+n*2;return t?r>0?r:1:0}const W8="identity",ao="linear",Tr="log",js="pow",Ws="sqrt",ll="symlog",g1="time",m1="utc",zn="sequential",co="diverging",oh="quantile",b1="quantize",y1="threshold",sh="ordinal",ah="point",w1="band",ch="bin-ordinal",yt="continuous",Ys="discrete",Qs="discretizing",cn="interpolating",x1="temporal";function Y8(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 Q8(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 lh(){const t=Df().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=ih(f,a,c);let b=r[d-0];o=(h-b)/(p||1),s&&(o=Math.floor(o)),b+=(h-b-o*(f-a))*l,i=o*(1-a),s&&(b=Math.round(b),i=Math.round(i));const v=gs(f).map(y=>b+o*y);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 b=+f[0],v=+f[1],y,A,S;if(!(b!==b||v!==v)&&(v<b&&(S=b,b=v,v=S),!(v<h[0]||b>r[1-d])))return y=Math.max(0,pr(h,b)-1),A=b===v?y:pr(h,v)-1,b-h[y]>i+1e-10&&++y,d&&(S=y,y=p-A,A=p-S),y>A?void 0:e().slice(y,A+1)},t.invert=function(f){const d=t.invertRange([f,f]);return d&&d[0]},t.copy=function(){return lh().domain(e()).range(r).round(s).paddingInner(a).paddingOuter(c).align(l)},u()}function v1(t){const e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return v1(e())},t}function Z8(){return v1(lh().paddingInner(1))}var X8=Array.prototype.map;function K8(t){return X8.call(t,rs)}const J8=Array.prototype.slice;function A1(){let t=[],e=[];function n(r){return r==null||r!==r?void 0:e[(pr(t,r)-1)%e.length]}return n.domain=function(r){return arguments.length?(t=K8(r),n):t.slice()},n.range=function(r){return arguments.length?(e=J8.call(r),n):e.slice()},n.tickFormat=function(r,o){return Xm(t[0],wn(t),r??10,o)},n.copy=function(){return A1().domain(n.domain()).range(n.range())},n}const ul=new Map,$8=Symbol("vega_scale");function e5(t){return t[$8]=!0,t}function t5(t,e,n){const r=function(){const i=e();return i.invertRange||(i.invertRange=i.invert?Y8(i):i.invertExtent?Q8(i):void 0),i.type=t,e5(i)};return r.metadata=cc(yu(n)),r}function Qe(t,e,n){return arguments.length>1?(ul.set(t,t5(t,e,n)),this):n5(t)?ul.get(t):void 0}Qe(W8,Jm),Qe(ao,Km,yt),Qe(Tr,Xf,[yt,Tr]),Qe(js,$f,yt),Qe(Ws,B8,yt),Qe(ll,o1,yt),Qe(g1,R8,[yt,x1]),Qe(m1,F8,[yt,x1]),Qe(zn,th,[yt,cn]),Qe(`${zn}-${ao}`,th,[yt,cn]),Qe(`${zn}-${Tr}`,u1,[yt,cn,Tr]),Qe(`${zn}-${js}`,nh,[yt,cn]),Qe(`${zn}-${Ws}`,M8,[yt,cn]),Qe(`${zn}-${ll}`,f1,[yt,cn]),Qe(`${co}-${ao}`,h1,[yt,cn]),Qe(`${co}-${Tr}`,d1,[yt,cn,Tr]),Qe(`${co}-${js}`,rh,[yt,cn]),Qe(`${co}-${Ws}`,P8,[yt,cn]),Qe(`${co}-${ll}`,p1,[yt,cn]),Qe(oh,a1,[Qs,oh]),Qe(b1,c1,Qs),Qe(y1,l1,Qs),Qe(ch,A1,[Ys,Qs]),Qe(sh,Df,Ys),Qe(w1,lh,Ys),Qe(ah,Z8,Ys);function n5(t){return ul.has(t)}function Zs(t,e){const n=ul.get(t);return n&&n.metadata[e]}function kt(t){return Zs(t,yt)}function Dr(t){return Zs(t,Ys)}function di(t){return Zs(t,Qs)}function E1(t){return Zs(t,Tr)}function fl(t){return Zs(t,cn)}function r5(t,e){const n=e[0],r=wn(e)-n;return function(o){return t(n+o*r)}}function hl(t,e,n){return Wf(S1(e||"rgb",n),t)}function i5(t,e){const n=new Array(e),r=e+1;for(let o=0;o<e;)n[o]=t(++o/r);return n}function S1(t,e){const n=b8[o5(t)];return e!=null&&n&&n.gamma?n.gamma(e):n}function o5(t){return"interpolate"+t.toLowerCase().split("-").map(e=>e[0].toUpperCase()+e.slice(1)).join("")}const s5={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"},a5={accent:O8,category10:L8,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:N8,observable10:z8,paired:U8,pastel1:G8,pastel2:H8,set1:V8,set2:q8,set3:j8,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function C1(t){if(Dt(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 I1(t,e){for(const n in t)uh(n,e(t[n]))}const T1={};I1(a5,C1),I1(s5,t=>hl(C1(t)));function uh(t,e){return t=t&&t.toLowerCase(),arguments.length>1?(T1[t]=e,this):T1[t]}function Ze(t,e=t){if(/^[A-Za-z0-9_]+$/.test(t)){const n=function(o){t in o||c5(o,t)},r=new Function("validator",`
|
|
252
275
|
let validated = !validator;
|
|
253
276
|
return function accessField(datum) {
|
|
254
277
|
if (!validated) {
|
|
@@ -256,64 +279,73 @@ if(uPickingEnabled){fragColor=vPickingColor;}}`,u6=`layout(std140)uniform Mark{u
|
|
|
256
279
|
validated = true;
|
|
257
280
|
}
|
|
258
281
|
return datum[${JSON.stringify(t)}];
|
|
259
|
-
}`)(n);return Je(r,[t],e)}else return qa(t)}function U8(t,e){throw new Error(`Invalid field "${e}". Available fields or properties: ${Object.keys(t).join(", ")}`)}const G8="RawCode",H8="Literal",V8="Property",q8="Identifier",j8="ArrayExpression",W8="BinaryExpression",Q8="CallExpression",Y8="ConditionalExpression",Z8="LogicalExpression",X8="MemberExpression",K8="ObjectExpression",J8="UnaryExpression";function An(t){this.type=t}An.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 j8:return t.elements;case W8:case Z8:return[t.left,t.right];case Q8:return[t.callee].concat(t.arguments);case Y8:return[t.test,t.consequent,t.alternate];case X8:return[t.object,t.property];case K8:return t.properties;case V8:return[t.key,t.value];case J8:return[t.argument];case q8:case H8:case G8:default:return[]}}var Nn,Ae,ie,Pt,Xe,el=1,Ns=2,ui=3,Dr=4,tl=5,fi=6,Yt=7,Os=8,e5=9;Nn={},Nn[el]="Boolean",Nn[Ns]="<end>",Nn[ui]="Identifier",Nn[Dr]="Keyword",Nn[tl]="Null",Nn[fi]="Numeric",Nn[Yt]="Punctuator",Nn[Os]="String",Nn[e5]="RegularExpression";var t5="ArrayExpression",n5="BinaryExpression",r5="CallExpression",i5="ConditionalExpression",p1="Identifier",o5="Literal",s5="LogicalExpression",a5="MemberExpression",c5="ObjectExpression",l5="Property",u5="UnaryExpression",St="Unexpected token %0",f5="Unexpected number",h5="Unexpected string",d5="Unexpected identifier",p5="Unexpected reserved word",g5="Unexpected end of input",Xf="Invalid regular expression",Kf="Invalid regular expression: missing /",g1="Octal literals are not allowed in strict mode.",m5="Duplicate data property in object literal not allowed in strict mode",_t="ILLEGAL",zs="Disabled.",b5=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]"),y5=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\\u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D\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\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 nl(t,e){if(!t)throw new Error("ASSERT: "+e)}function Kn(t){return t>=48&&t<=57}function Jf(t){return"0123456789abcdefABCDEF".includes(t)}function Us(t){return"01234567".includes(t)}function w5(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 Gs(t){return t===10||t===13||t===8232||t===8233}function Hs(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&b5.test(String.fromCharCode(t))}function rl(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===92||t>=128&&y5.test(String.fromCharCode(t))}const x5={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 m1(){for(;ie<Pt;){const t=Ae.charCodeAt(ie);if(w5(t)||Gs(t))++ie;else break}}function $f(t){var e,n,r,o=0;for(n=t==="u"?4:2,e=0;e<n;++e)ie<Pt&&Jf(Ae[ie])?(r=Ae[ie++],o=o*16+"0123456789abcdef".indexOf(r.toLowerCase())):We({},St,_t);return String.fromCharCode(o)}function v5(){var t,e,n,r;for(t=Ae[ie],e=0,t==="}"&&We({},St,_t);ie<Pt&&(t=Ae[ie++],!!Jf(t));)e=e*16+"0123456789abcdef".indexOf(t.toLowerCase());return(e>1114111||t!=="}")&&We({},St,_t),e<=65535?String.fromCharCode(e):(n=(e-65536>>10)+55296,r=(e-65536&1023)+56320,String.fromCharCode(n,r))}function b1(){var t,e;for(t=Ae.charCodeAt(ie++),e=String.fromCharCode(t),t===92&&(Ae.charCodeAt(ie)!==117&&We({},St,_t),++ie,t=$f("u"),(!t||t==="\\"||!Hs(t.charCodeAt(0)))&&We({},St,_t),e=t);ie<Pt&&(t=Ae.charCodeAt(ie),!!rl(t));)++ie,e+=String.fromCharCode(t),t===92&&(e=e.substr(0,e.length-1),Ae.charCodeAt(ie)!==117&&We({},St,_t),++ie,t=$f("u"),(!t||t==="\\"||!rl(t.charCodeAt(0)))&&We({},St,_t),e+=t);return e}function A5(){var t,e;for(t=ie++;ie<Pt;){if(e=Ae.charCodeAt(ie),e===92)return ie=t,b1();if(rl(e))++ie;else break}return Ae.slice(t,ie)}function E5(){var t,e,n;return t=ie,e=Ae.charCodeAt(ie)===92?b1():A5(),e.length===1?n=ui:x5.hasOwnProperty(e)?n=Dr:e==="null"?n=tl:e==="true"||e==="false"?n=el:n=ui,{type:n,value:e,start:t,end:ie}}function eh(){var t=ie,e=Ae.charCodeAt(ie),n,r=Ae[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=Ae.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,Ae.charCodeAt(ie)===61&&++ie,{type:Yt,value:Ae.slice(t,ie),start:t,end:ie}}}if(s=Ae.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({},St,_t),"<>=!+-*%&|^/".includes(r))return++ie,{type:Yt,value:r,start:t,end:ie};We({},St,_t)}function S5(t){let e="";for(;ie<Pt&&Jf(Ae[ie]);)e+=Ae[ie++];return e.length===0&&We({},St,_t),Hs(Ae.charCodeAt(ie))&&We({},St,_t),{type:fi,value:parseInt("0x"+e,16),start:t,end:ie}}function C5(t){let e="0"+Ae[ie++];for(;ie<Pt&&Us(Ae[ie]);)e+=Ae[ie++];return(Hs(Ae.charCodeAt(ie))||Kn(Ae.charCodeAt(ie)))&&We({},St,_t),{type:fi,value:parseInt(e,8),octal:!0,start:t,end:ie}}function y1(){var t,e,n;if(n=Ae[ie],nl(Kn(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),e=ie,t="",n!=="."){if(t=Ae[ie++],n=Ae[ie],t==="0"){if(n==="x"||n==="X")return++ie,S5(e);if(Us(n))return C5(e);n&&Kn(n.charCodeAt(0))&&We({},St,_t)}for(;Kn(Ae.charCodeAt(ie));)t+=Ae[ie++];n=Ae[ie]}if(n==="."){for(t+=Ae[ie++];Kn(Ae.charCodeAt(ie));)t+=Ae[ie++];n=Ae[ie]}if(n==="e"||n==="E")if(t+=Ae[ie++],n=Ae[ie],(n==="+"||n==="-")&&(t+=Ae[ie++]),Kn(Ae.charCodeAt(ie)))for(;Kn(Ae.charCodeAt(ie));)t+=Ae[ie++];else We({},St,_t);return Hs(Ae.charCodeAt(ie))&&We({},St,_t),{type:fi,value:parseFloat(t),start:e,end:ie}}function I5(){var t="",e,n,r,o,i=!1;for(e=Ae[ie],nl(e==="'"||e==='"',"String literal must starts with a quote"),n=ie,++ie;ie<Pt;)if(r=Ae[ie++],r===e){e="";break}else if(r==="\\")if(r=Ae[ie++],!r||!Gs(r.charCodeAt(0)))switch(r){case"u":case"x":Ae[ie]==="{"?(++ie,t+=v5()):t+=$f(r);break;case"n":t+=`
|
|
260
|
-
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default
|
|
261
|
-
`&&++ie;else{if(Gs(r.charCodeAt(0)))break;t+=r}return e!==""&&We({},St,_t),{type:Os,value:t,octal:i,start:n,end:ie}}function T5(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({},Xf)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{We({},Xf)}try{return new RegExp(t,e)}catch{return null}}function D5(){var t,e,n,r,o;for(t=Ae[ie],nl(t==="/","Regular expression literal must start with a slash"),e=Ae[ie++],n=!1,r=!1;ie<Pt;)if(t=Ae[ie++],e+=t,t==="\\")t=Ae[ie++],Gs(t.charCodeAt(0))&&We({},Kf),e+=t;else if(Gs(t.charCodeAt(0)))We({},Kf);else if(n)t==="]"&&(n=!1);else if(t==="/"){r=!0;break}else t==="["&&(n=!0);return r||We({},Kf),o=e.substr(1,e.length-2),{value:o,literal:e}}function B5(){var t,e,n;for(e="",n="";ie<Pt&&(t=Ae[ie],!!rl(t.charCodeAt(0)));)++ie,t==="\\"&&ie<Pt?We({},St,_t):(n+=t,e+=t);return n.search(/[^gimuy]/g)>=0&&We({},Xf,n),{value:n,literal:e}}function _5(){var t,e,n,r;return Xe=null,m1(),t=ie,e=D5(),n=B5(),r=T5(e.value,n.value),{literal:e.literal+n.literal,value:r,regex:{pattern:e.value,flags:n.value},start:t,end:ie}}function k5(t){return t.type===ui||t.type===Dr||t.type===el||t.type===tl}function w1(){if(m1(),ie>=Pt)return{type:Ns,start:ie,end:ie};const t=Ae.charCodeAt(ie);return Hs(t)?E5():t===40||t===41||t===59?eh():t===39||t===34?I5():t===46?Kn(Ae.charCodeAt(ie+1))?y1():eh():Kn(t)?y1():eh()}function Zt(){const t=Xe;return ie=t.end,Xe=w1(),ie=t.end,t}function x1(){const t=ie;Xe=w1(),ie=t}function R5(t){const e=new An(t5);return e.elements=t,e}function v1(t,e,n){const r=new An(t==="||"||t==="&&"?s5:n5);return r.operator=t,r.left=e,r.right=n,r}function F5(t,e){const n=new An(r5);return n.callee=t,n.arguments=e,n}function M5(t,e,n){const r=new An(i5);return r.test=t,r.consequent=e,r.alternate=n,r}function th(t){const e=new An(p1);return e.name=t,e}function Vs(t){const e=new An(o5);return e.value=t.value,e.raw=Ae.slice(t.start,t.end),t.regex&&(e.raw==="//"&&(e.raw="/(?:)/"),e.regex=t.regex),e}function A1(t,e,n){const r=new An(a5);return r.computed=t==="[",r.object=e,r.property=n,r.computed||(n.member=!0),r}function P5(t){const e=new An(c5);return e.properties=t,e}function E1(t,e,n){const r=new An(l5);return r.key=e,r.value=n,r.kind=t,r}function L5(t,e){const n=new An(u5);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)=>(nl(s<r.length,"Message reference must be in range"),r[s]));throw n=new Error(o),n.index=ie,n.description=o,n}function il(t){t.type===Ns&&We(t,g5),t.type===fi&&We(t,f5),t.type===Os&&We(t,h5),t.type===ui&&We(t,d5),t.type===Dr&&We(t,p5),We(t,St,t.value)}function Lt(t){const e=Zt();(e.type!==Yt||e.value!==t)&&il(e)}function it(t){return Xe.type===Yt&&Xe.value===t}function nh(t){return Xe.type===Dr&&Xe.value===t}function N5(){const t=[];for(ie=Xe.start,Lt("[");!it("]");)it(",")?(Zt(),t.push(null)):(t.push(hi()),it("]")||Lt(","));return Zt(),R5(t)}function S1(){ie=Xe.start;const t=Zt();return t.type===Os||t.type===fi?(t.octal&&We(t,g1),Vs(t)):th(t.value)}function O5(){var t,e,n,r;if(ie=Xe.start,t=Xe,t.type===ui)return n=S1(),Lt(":"),r=hi(),E1("init",n,r);if(t.type===Ns||t.type===Yt)il(t);else return e=S1(),Lt(":"),r=hi(),E1("init",e,r)}function z5(){var t=[],e,n,r,o={},i=String;for(ie=Xe.start,Lt("{");!it("}");)e=O5(),e.key.type===p1?n=e.key.name:n=i(e.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(o,r)?We({},m5):o[r]=!0,t.push(e),it("}")||Lt(",");return Lt("}"),P5(t)}function U5(){Lt("(");const t=rh();return Lt(")"),t}const G5={if:1};function H5(){var t,e,n;if(it("("))return U5();if(it("["))return N5();if(it("{"))return z5();if(t=Xe.type,ie=Xe.start,t===ui||G5[Xe.value])n=th(Zt().value);else if(t===Os||t===fi)Xe.octal&&We(Xe,g1),n=Vs(Zt());else{if(t===Dr)throw new Error(zs);t===el?(e=Zt(),e.value=e.value==="true",n=Vs(e)):t===tl?(e=Zt(),e.value=null,n=Vs(e)):it("/")||it("/=")?(n=Vs(_5()),x1()):il(Zt())}return n}function V5(){const t=[];if(Lt("("),!it(")"))for(;ie<Pt&&(t.push(hi()),!it(")"));)Lt(",");return Lt(")"),t}function q5(){ie=Xe.start;const t=Zt();return k5(t)||il(t),th(t.value)}function j5(){return Lt("."),q5()}function W5(){Lt("[");const t=rh();return Lt("]"),t}function Q5(){var t,e,n;for(t=H5();;)if(it("."))n=j5(),t=A1(".",t,n);else if(it("("))e=V5(),t=F5(t,e);else if(it("["))n=W5(),t=A1("[",t,n);else break;return t}function C1(){const t=Q5();if(Xe.type===Yt&&(it("++")||it("--")))throw new Error(zs);return t}function ol(){var t,e;if(Xe.type!==Yt&&Xe.type!==Dr)e=C1();else{if(it("++")||it("--"))throw new Error(zs);if(it("+")||it("-")||it("~")||it("!"))t=Zt(),e=ol(),e=L5(t.value,e);else{if(nh("delete")||nh("void")||nh("typeof"))throw new Error(zs);e=C1()}}return e}function I1(t){let e=0;if(t.type!==Yt&&t.type!==Dr)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 Y5(){var t,e,n,r,o,i,s,a,c,l;if(t=Xe,c=ol(),r=Xe,o=I1(r),o===0)return c;for(r.prec=o,Zt(),e=[t,Xe],s=ol(),i=[c,r,s];(o=I1(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=v1(a,c,s),i.push(n);r=Zt(),r.prec=o,i.push(r),e.push(Xe),n=ol(),i.push(n)}for(l=i.length-1,n=i[l],e.pop();l>1;)e.pop(),n=v1(i[l-1].value,i[l-2],n),l-=2;return n}function hi(){var t,e,n;return t=Y5(),it("?")&&(Zt(),e=hi(),Lt(":"),n=hi(),t=M5(t,e,n)),t}function rh(){const t=hi();if(it(","))throw new Error(zs);return t}function Z5(t){Ae=t,ie=0,Pt=Ae.length,Xe=null,x1();const e=rh();if(Xe.type!==Ns)throw new Error("Unexpect token after expression.");return e}var X5={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&&mt("Missing arguments to clamp function."),s.length>3&&mt("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),regexp:i,test:n("test",i),if:function(s){s.length<3&&mt("Missing arguments to if function."),s.length>3&&mt("Too many arguments to if function.");const a=s.map(t);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function K5(t){const e=t&&t.length-1;return e&&(t[0]==='"'&&t[e]==='"'||t[0]==="'"&&t[e]==="'")?t.slice(1,-1):t}function J5(t){t=t||{};const e=t.allowed?Za(t.allowed):{},n=t.forbidden?Za(t.forbidden):{},r=t.constants||X5,o=(t.functions||T1)(f),i=t.globalvar,s=t.fieldvar,a=on(i)?i:p=>`${i}["${p}"]`;let c={},l={},u=0;function f(p){if(nt(p))return p;const y=h[p.type];return y==null&&mt("Unsupported type: "+p.type),y(p)}const h={Literal:p=>p.raw,Identifier:p=>{const y=p.name;return u>0?y:Mi(n,y)?mt("Illegal identifier: "+y):Mi(r,y)?r[y]:Mi(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[K5(b)]=1),y&&(u-=1),v+(y?"."+b:"["+b+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&mt("Illegal callee type: "+p.callee.type);const y=p.callee.name,v=p.arguments,b=Mi(o,y)&&o[y];return b||mt("Unrecognized function: "+y),on(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=>"{"+p.properties.map(f).join(",")+"}",Property:p=>{u+=1;const y=f(p.key);return u-=1,y+":"+f(p.value)}};function d(p){const y={code:f(p),globals:Object.keys(c),fields:Object.keys(l)};return c={},l={},y}return d.functions=o,d.constants=r,d}function D1(t,e,n){return n=(n-t)/(e-t),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function io(t,e=0,n=1){return Math.max(e,Math.min(n,t))}function $5(t,e,n){return io((n-t)/(e-t),0,1)}const On=1,Br=2,ih=4;class oh{constructor(e){ve(this,Ei);Ut(this,"stats",{count:0,first:null});Ut(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),he(this,Ei,Ga).call(this),this}adopt(e){e.parent&&e.parent.removeChild(e),this.addChild(e)}adoptChildrenOf(e){for(const n of e.children)this.adopt(n)}insertAsParent(e){var n;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,he(n=this.parent,Ei,Ga).call(n),this.parent=void 0,e.addChild(this)}removeChild(e){const n=this.children.indexOf(e);if(n>-1)this.children.splice(n,1),e.parent=void 0,he(this,Ei,Ga).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 n=this.children[0];n.setParent(this.parent),this.parent.children[this.parent.children.indexOf(this)]=n,he(e=this.parent,Ei,Ga).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 n of this.children)n.visit(e);e.afterChildren&&e.afterChildren(this)}subtreeToString(e=0){const n=this.children.map(r=>r.subtreeToString(e+1)).join("");return`${" ".repeat(e*2)}* ${this.label}${"identifier"in this&&this.identifier?": "+this.identifier:""}
|
|
262
|
-
${n}`}handle(e){this._propagate(e)}complete(){this.completed=!0;for(const e of this.children)e.complete()}beginBatch(e){for(const n of this.children)n.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){}}
|
|
282
|
+
}`)(n);return Je(r,[t],e)}else return rc(t)}function c5(t,e){throw new Error(`Invalid field "${e}". Available fields or properties: ${Object.keys(t).join(", ")}`)}const l5="RawCode",u5="Literal",f5="Property",h5="Identifier",d5="ArrayExpression",p5="BinaryExpression",g5="CallExpression",m5="ConditionalExpression",b5="LogicalExpression",y5="MemberExpression",w5="ObjectExpression",x5="UnaryExpression";function Sn(t){this.type=t}Sn.prototype.visit=function(t){let e,n,r;if(t(this))return 1;for(e=v5(this),n=0,r=e.length;n<r;++n)if(e[n].visit(t))return 1};function v5(t){switch(t.type){case d5:return t.elements;case p5:case b5:return[t.left,t.right];case g5:return[t.callee].concat(t.arguments);case m5:return[t.test,t.consequent,t.alternate];case y5:return[t.object,t.property];case w5:return t.properties;case f5:return[t.key,t.value];case x5:return[t.argument];case h5:case u5:case l5:default:return[]}}var Un,Se,ie,Pt,Xe,dl=1,Xs=2,pi=3,Br=4,pl=5,gi=6,Zt=7,Ks=8,A5=9;Un={},Un[dl]="Boolean",Un[Xs]="<end>",Un[pi]="Identifier",Un[Br]="Keyword",Un[pl]="Null",Un[gi]="Numeric",Un[Zt]="Punctuator",Un[Ks]="String",Un[A5]="RegularExpression";var E5="ArrayExpression",S5="BinaryExpression",C5="CallExpression",I5="ConditionalExpression",D1="Identifier",T5="Literal",D5="LogicalExpression",B5="MemberExpression",k5="ObjectExpression",_5="Property",R5="UnaryExpression",St="Unexpected token %0",F5="Unexpected number",M5="Unexpected string",P5="Unexpected identifier",L5="Unexpected reserved word",O5="Unexpected end of input",fh="Invalid regular expression",hh="Invalid regular expression: missing /",B1="Octal literals are not allowed in strict mode.",N5="Duplicate data property in object literal not allowed in strict mode",_t="ILLEGAL",Js="Disabled.",z5=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\\u0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E84\\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]"),U5=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\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\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-\\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 gl(t,e){if(!t)throw new Error("ASSERT: "+e)}function $n(t){return t>=48&&t<=57}function dh(t){return"0123456789abcdefABCDEF".includes(t)}function $s(t){return"01234567".includes(t)}function G5(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&&z5.test(String.fromCharCode(t))}function ml(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===92||t>=128&&U5.test(String.fromCharCode(t))}const H5={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 k1(){for(;ie<Pt;){const t=Se.charCodeAt(ie);if(G5(t)||ea(t))++ie;else break}}function ph(t){var e,n,r,o=0;for(n=t==="u"?4:2,e=0;e<n;++e)ie<Pt&&dh(Se[ie])?(r=Se[ie++],o=o*16+"0123456789abcdef".indexOf(r.toLowerCase())):We({},St,_t);return String.fromCharCode(o)}function V5(){var t,e,n,r;for(t=Se[ie],e=0,t==="}"&&We({},St,_t);ie<Pt&&(t=Se[ie++],!!dh(t));)e=e*16+"0123456789abcdef".indexOf(t.toLowerCase());return(e>1114111||t!=="}")&&We({},St,_t),e<=65535?String.fromCharCode(e):(n=(e-65536>>10)+55296,r=(e-65536&1023)+56320,String.fromCharCode(n,r))}function _1(){var t,e;for(t=Se.charCodeAt(ie++),e=String.fromCharCode(t),t===92&&(Se.charCodeAt(ie)!==117&&We({},St,_t),++ie,t=ph("u"),(!t||t==="\\"||!ta(t.charCodeAt(0)))&&We({},St,_t),e=t);ie<Pt&&(t=Se.charCodeAt(ie),!!ml(t));)++ie,e+=String.fromCharCode(t),t===92&&(e=e.substr(0,e.length-1),Se.charCodeAt(ie)!==117&&We({},St,_t),++ie,t=ph("u"),(!t||t==="\\"||!ml(t.charCodeAt(0)))&&We({},St,_t),e+=t);return e}function q5(){var t,e;for(t=ie++;ie<Pt;){if(e=Se.charCodeAt(ie),e===92)return ie=t,_1();if(ml(e))++ie;else break}return Se.slice(t,ie)}function j5(){var t,e,n;return t=ie,e=Se.charCodeAt(ie)===92?_1():q5(),e.length===1?n=pi:H5.hasOwnProperty(e)?n=Br:e==="null"?n=pl:e==="true"||e==="false"?n=dl:n=pi,{type:n,value:e,start:t,end:ie}}function gh(){var t=ie,e=Se.charCodeAt(ie),n,r=Se[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:Zt,value:String.fromCharCode(e),start:t,end:ie};default:if(n=Se.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:Zt,value:String.fromCharCode(e)+String.fromCharCode(n),start:t,end:ie};case 33:case 61:return ie+=2,Se.charCodeAt(ie)===61&&++ie,{type:Zt,value:Se.slice(t,ie),start:t,end:ie}}}if(s=Se.substr(ie,4),s===">>>=")return ie+=4,{type:Zt,value:s,start:t,end:ie};if(i=s.substr(0,3),i===">>>"||i==="<<="||i===">>=")return ie+=3,{type:Zt,value:i,start:t,end:ie};if(o=i.substr(0,2),r===o[1]&&"+-<>&|".includes(r)||o==="=>")return ie+=2,{type:Zt,value:o,start:t,end:ie};if(o==="//"&&We({},St,_t),"<>=!+-*%&|^/".includes(r))return++ie,{type:Zt,value:r,start:t,end:ie};We({},St,_t)}function W5(t){let e="";for(;ie<Pt&&dh(Se[ie]);)e+=Se[ie++];return e.length===0&&We({},St,_t),ta(Se.charCodeAt(ie))&&We({},St,_t),{type:gi,value:parseInt("0x"+e,16),start:t,end:ie}}function Y5(t){let e="0"+Se[ie++];for(;ie<Pt&&$s(Se[ie]);)e+=Se[ie++];return(ta(Se.charCodeAt(ie))||$n(Se.charCodeAt(ie)))&&We({},St,_t),{type:gi,value:parseInt(e,8),octal:!0,start:t,end:ie}}function R1(){var t,e,n;if(n=Se[ie],gl($n(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),e=ie,t="",n!=="."){if(t=Se[ie++],n=Se[ie],t==="0"){if(n==="x"||n==="X")return++ie,W5(e);if($s(n))return Y5(e);n&&$n(n.charCodeAt(0))&&We({},St,_t)}for(;$n(Se.charCodeAt(ie));)t+=Se[ie++];n=Se[ie]}if(n==="."){for(t+=Se[ie++];$n(Se.charCodeAt(ie));)t+=Se[ie++];n=Se[ie]}if(n==="e"||n==="E")if(t+=Se[ie++],n=Se[ie],(n==="+"||n==="-")&&(t+=Se[ie++]),$n(Se.charCodeAt(ie)))for(;$n(Se.charCodeAt(ie));)t+=Se[ie++];else We({},St,_t);return ta(Se.charCodeAt(ie))&&We({},St,_t),{type:gi,value:parseFloat(t),start:e,end:ie}}function Q5(){var t="",e,n,r,o,i=!1;for(e=Se[ie],gl(e==="'"||e==='"',"String literal must starts with a quote"),n=ie,++ie;ie<Pt;)if(r=Se[ie++],r===e){e="";break}else if(r==="\\")if(r=Se[ie++],!r||!ea(r.charCodeAt(0)))switch(r){case"u":case"x":Se[ie]==="{"?(++ie,t+=V5()):t+=ph(r);break;case"n":t+=`
|
|
283
|
+
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:$s(r)?(o="01234567".indexOf(r),o!==0&&(i=!0),ie<Pt&&$s(Se[ie])&&(i=!0,o=o*8+"01234567".indexOf(Se[ie++]),"0123".includes(r)&&ie<Pt&&$s(Se[ie])&&(o=o*8+"01234567".indexOf(Se[ie++]))),t+=String.fromCharCode(o)):t+=r;break}else r==="\r"&&Se[ie]===`
|
|
284
|
+
`&&++ie;else{if(ea(r.charCodeAt(0)))break;t+=r}return e!==""&&We({},St,_t),{type:Ks,value:t,octal:i,start:n,end:ie}}function Z5(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({},fh)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{We({},fh)}try{return new RegExp(t,e)}catch{return null}}function X5(){var t,e,n,r,o;for(t=Se[ie],gl(t==="/","Regular expression literal must start with a slash"),e=Se[ie++],n=!1,r=!1;ie<Pt;)if(t=Se[ie++],e+=t,t==="\\")t=Se[ie++],ea(t.charCodeAt(0))&&We({},hh),e+=t;else if(ea(t.charCodeAt(0)))We({},hh);else if(n)t==="]"&&(n=!1);else if(t==="/"){r=!0;break}else t==="["&&(n=!0);return r||We({},hh),o=e.substr(1,e.length-2),{value:o,literal:e}}function K5(){var t,e,n;for(e="",n="";ie<Pt&&(t=Se[ie],!!ml(t.charCodeAt(0)));)++ie,t==="\\"&&ie<Pt?We({},St,_t):(n+=t,e+=t);return n.search(/[^gimuy]/g)>=0&&We({},fh,n),{value:n,literal:e}}function J5(){var t,e,n,r;return Xe=null,k1(),t=ie,e=X5(),n=K5(),r=Z5(e.value,n.value),{literal:e.literal+n.literal,value:r,regex:{pattern:e.value,flags:n.value},start:t,end:ie}}function $5(t){return t.type===pi||t.type===Br||t.type===dl||t.type===pl}function F1(){if(k1(),ie>=Pt)return{type:Xs,start:ie,end:ie};const t=Se.charCodeAt(ie);return ta(t)?j5():t===40||t===41||t===59?gh():t===39||t===34?Q5():t===46?$n(Se.charCodeAt(ie+1))?R1():gh():$n(t)?R1():gh()}function Xt(){const t=Xe;return ie=t.end,Xe=F1(),ie=t.end,t}function M1(){const t=ie;Xe=F1(),ie=t}function eI(t){const e=new Sn(E5);return e.elements=t,e}function P1(t,e,n){const r=new Sn(t==="||"||t==="&&"?D5:S5);return r.operator=t,r.left=e,r.right=n,r}function tI(t,e){const n=new Sn(C5);return n.callee=t,n.arguments=e,n}function nI(t,e,n){const r=new Sn(I5);return r.test=t,r.consequent=e,r.alternate=n,r}function mh(t){const e=new Sn(D1);return e.name=t,e}function na(t){const e=new Sn(T5);return e.value=t.value,e.raw=Se.slice(t.start,t.end),t.regex&&(e.raw==="//"&&(e.raw="/(?:)/"),e.regex=t.regex),e}function L1(t,e,n){const r=new Sn(B5);return r.computed=t==="[",r.object=e,r.property=n,r.computed||(n.member=!0),r}function rI(t){const e=new Sn(k5);return e.properties=t,e}function O1(t,e,n){const r=new Sn(_5);return r.key=e,r.value=n,r.kind=t,r}function iI(t,e){const n=new Sn(R5);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)=>(gl(s<r.length,"Message reference must be in range"),r[s]));throw n=new Error(o),n.index=ie,n.description=o,n}function bl(t){t.type===Xs&&We(t,O5),t.type===gi&&We(t,F5),t.type===Ks&&We(t,M5),t.type===pi&&We(t,P5),t.type===Br&&We(t,L5),We(t,St,t.value)}function Lt(t){const e=Xt();(e.type!==Zt||e.value!==t)&&bl(e)}function it(t){return Xe.type===Zt&&Xe.value===t}function bh(t){return Xe.type===Br&&Xe.value===t}function oI(){const t=[];for(ie=Xe.start,Lt("[");!it("]");)it(",")?(Xt(),t.push(null)):(t.push(mi()),it("]")||Lt(","));return Xt(),eI(t)}function N1(){ie=Xe.start;const t=Xt();return t.type===Ks||t.type===gi?(t.octal&&We(t,B1),na(t)):mh(t.value)}function sI(){var t,e,n,r;if(ie=Xe.start,t=Xe,t.type===pi)return n=N1(),Lt(":"),r=mi(),O1("init",n,r);if(t.type===Xs||t.type===Zt)bl(t);else return e=N1(),Lt(":"),r=mi(),O1("init",e,r)}function aI(){var t=[],e,n,r,o={},i=String;for(ie=Xe.start,Lt("{");!it("}");)e=sI(),e.key.type===D1?n=e.key.name:n=i(e.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(o,r)?We({},N5):o[r]=!0,t.push(e),it("}")||Lt(",");return Lt("}"),rI(t)}function cI(){Lt("(");const t=yh();return Lt(")"),t}const lI={if:1};function uI(){var t,e,n;if(it("("))return cI();if(it("["))return oI();if(it("{"))return aI();if(t=Xe.type,ie=Xe.start,t===pi||lI[Xe.value])n=mh(Xt().value);else if(t===Ks||t===gi)Xe.octal&&We(Xe,B1),n=na(Xt());else{if(t===Br)throw new Error(Js);t===dl?(e=Xt(),e.value=e.value==="true",n=na(e)):t===pl?(e=Xt(),e.value=null,n=na(e)):it("/")||it("/=")?(n=na(J5()),M1()):bl(Xt())}return n}function fI(){const t=[];if(Lt("("),!it(")"))for(;ie<Pt&&(t.push(mi()),!it(")"));)Lt(",");return Lt(")"),t}function hI(){ie=Xe.start;const t=Xt();return $5(t)||bl(t),mh(t.value)}function dI(){return Lt("."),hI()}function pI(){Lt("[");const t=yh();return Lt("]"),t}function gI(){var t,e,n;for(t=uI();;)if(it("."))n=dI(),t=L1(".",t,n);else if(it("("))e=fI(),t=tI(t,e);else if(it("["))n=pI(),t=L1("[",t,n);else break;return t}function z1(){const t=gI();if(Xe.type===Zt&&(it("++")||it("--")))throw new Error(Js);return t}function yl(){var t,e;if(Xe.type!==Zt&&Xe.type!==Br)e=z1();else{if(it("++")||it("--"))throw new Error(Js);if(it("+")||it("-")||it("~")||it("!"))t=Xt(),e=yl(),e=iI(t.value,e);else{if(bh("delete")||bh("void")||bh("typeof"))throw new Error(Js);e=z1()}}return e}function U1(t){let e=0;if(t.type!==Zt&&t.type!==Br)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 mI(){var t,e,n,r,o,i,s,a,c,l;if(t=Xe,c=yl(),r=Xe,o=U1(r),o===0)return c;for(r.prec=o,Xt(),e=[t,Xe],s=yl(),i=[c,r,s];(o=U1(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=P1(a,c,s),i.push(n);r=Xt(),r.prec=o,i.push(r),e.push(Xe),n=yl(),i.push(n)}for(l=i.length-1,n=i[l],e.pop();l>1;)e.pop(),n=P1(i[l-1].value,i[l-2],n),l-=2;return n}function mi(){var t,e,n;return t=mI(),it("?")&&(Xt(),e=mi(),Lt(":"),n=mi(),t=nI(t,e,n)),t}function yh(){const t=mi();if(it(","))throw new Error(Js);return t}function bI(t){Se=t,ie=0,Pt=Se.length,Xe=null,M1();const e=yh();if(Xe.type!==Xs)throw new Error("Unexpect token after expression.");return e}var yI={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 G1(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&&mt("Missing arguments to clamp function."),s.length>3&&mt("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),regexp:i,test:n("test",i),if:function(s){s.length<3&&mt("Missing arguments to if function."),s.length>3&&mt("Too many arguments to if function.");const a=s.map(t);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function wI(t){const e=t&&t.length-1;return e&&(t[0]==='"'&&t[e]==='"'||t[0]==="'"&&t[e]==="'")?t.slice(1,-1):t}function xI(t){t=t||{};const e=t.allowed?cc(t.allowed):{},n=t.forbidden?cc(t.forbidden):{},r=t.constants||yI,o=(t.functions||G1)(f),i=t.globalvar,s=t.fieldvar,a=sn(i)?i:p=>`${i}["${p}"]`;let c={},l={},u=0;function f(p){if(nt(p))return p;const b=d[p.type];return b==null&&mt("Unsupported type: "+p.type),b(p)}const d={Literal:p=>p.raw,Identifier:p=>{const b=p.name;return u>0?b:zi(n,b)?mt("Illegal identifier: "+b):zi(r,b)?r[b]:zi(e,b)?b:(c[b]=1,a(b))},MemberExpression:p=>{const b=!p.computed,v=f(p.object);b&&(u+=1);const y=f(p.property);return v===s&&(l[wI(y)]=1),b&&(u-=1),v+(b?"."+y:"["+y+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&mt("Illegal callee type: "+p.callee.type);const b=p.callee.name,v=p.arguments,y=zi(o,b)&&o[b];return y||mt("Unrecognized function: "+b),sn(y)?y(v):y+"("+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=>"{"+p.properties.map(f).join(",")+"}",Property:p=>{u+=1;const b=f(p.key);return u-=1,b+":"+f(p.value)}};function h(p){const b={code:f(p),globals:Object.keys(c),fields:Object.keys(l)};return c={},l={},b}return h.functions=o,h.constants=r,h}function H1(t,e,n){return n=(n-t)/(e-t),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function lo(t,e=0,n=1){return Math.max(e,Math.min(n,t))}function vI(t,e,n){return lo((n-t)/(e-t),0,1)}const Gn=1,kr=2,wh=4;class xh{constructor(e){ge(this,Bi);Ut(this,"stats",{count:0,first:null});Ut(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),de(this,Bi,ec).call(this),this}adopt(e){e.parent&&e.parent.removeChild(e),this.addChild(e)}adoptChildrenOf(e){for(const n of e.children)this.adopt(n)}insertAsParent(e){var n;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,de(n=this.parent,Bi,ec).call(n),this.parent=void 0,e.addChild(this)}removeChild(e){const n=this.children.indexOf(e);if(n>-1)this.children.splice(n,1),e.parent=void 0,de(this,Bi,ec).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 n=this.children[0];n.setParent(this.parent),this.parent.children[this.parent.children.indexOf(this)]=n,de(e=this.parent,Bi,ec).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 n of this.children)n.visit(e);e.afterChildren&&e.afterChildren(this)}subtreeToString(e=0){const n=this.children.map(r=>r.subtreeToString(e+1)).join("");return`${" ".repeat(e*2)}* ${this.label}${"identifier"in this&&this.identifier?": "+this.identifier:""}
|
|
285
|
+
${n}`}handle(e){this._propagate(e)}complete(){this.completed=!0;for(const e of this.children)e.complete()}beginBatch(e){for(const n of this.children)n.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){}}Bi=new WeakSet,ec=function(){this._propagate=Function("children","stats",gs(this.children.length).map(e=>`const child${e} = children[${e}];`).join(`
|
|
263
286
|
`)+`return function propagate(datum) {
|
|
264
287
|
if (stats.count === 0) {
|
|
265
288
|
stats.first = structuredClone(datum);
|
|
266
289
|
}
|
|
267
290
|
stats.count++;
|
|
268
|
-
${
|
|
291
|
+
${gs(this.children.length).map(e=>`child${e}.handle(datum);`).join(`
|
|
269
292
|
`)}
|
|
270
|
-
};`)(this.children,this.stats)};function
|
|
293
|
+
};`)(this.children,this.stats)};function V1(t){return t.type=="file"}function AI(t){return t.type=="facet"}class wt extends xh{constructor(n,r){super(r);ge(this,Ma);Te(this,Ma,n.type)}get label(){return W(this,Ma)}}Ma=new WeakMap;const ln="_uniqueId",q1=1e4,j1=[null];class vh extends wt{get behavior(){return kr}constructor(e){super(e),this.params=e,this.as=e.as??ln,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%q1==0&&(this._id=this._getBlock()*q1),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const e=j1.length;return j1[e]=this,this._blocks.push(e),this._usedBlocks++,e}}function W1(t){return{type:"single",datum:t,uniqueId:t==null?void 0:t[ln]}}function Y1(t){return t??(t=[]),{type:"multi",data:new Map(t.map(e=>[e[ln],e]))}}function Q1(t){return{type:"interval",intervals:Object.fromEntries(t.map(e=>[e,null]))}}function EI(t,{add:e,remove:n,toggle:r}){const o=t.data;for(const i of e??[])o.set(i[ln],i);for(const i of n??[])o.delete(i[ln]);for(const i of r??[]){const s=i[ln];o.has(s)?o.delete(s):o.set(s,i)}return{type:"multi",data:o}}function SI(t,e,n=!0){if(!t||!e)return!1;if(K1(t))return t.uniqueId==null?n:t.uniqueId===e[ln];if(Ah(t))return t.data.size==0?n:t.data.has(e[ln]);throw X1(t)?new Error("TODO: Implement interval selection test"):new Error("Not a selection: "+JSON.stringify(t))}function Z1(t){return`selectionTest(${ra(t.param)}, datum, ${!!(t.empty??!0)})`}function X1(t){return t.type==="interval"}function K1(t){return t.type==="single"}function Ah(t){return t.type==="multi"}function wl(t){const e=typeof t=="string"?{type:t}:t;return Eh(e)&&(e.on??(e.on="click"),e.on==="click"&&(e.toggle=!0)),e}function Eh(t){return t&&t.type=="point"}function J1(t){return t&&t.type=="interval"}function $1(t){return Object.values(t.intervals).some(e=>e&&e.length===2)}function CI(t,e){return Object.entries(t.intervals).every(([n,r])=>(n=="x"||n=="y")&&r&&r[0]<=e[n]&&r[1]>=e[n])}const eb={clamp:lo,format(t,e){return Bt(e)(t)},isArray:Dt,isBoolean:is,isDefined(t){return t!==void 0},isNumber:Gt,isObject:Ft,isRegExp:jv,isString:nt,isValid(t){return t!=null&&t===t},lerp:z0,linearstep:vI,replace(t,e,n){return String(t).replace(e,n)},smoothstep:H1,selectionTest:SI};function II(t){const e=G1(t);for(const n in eb)e[n]=`this.${n}`;return e}const TI=xI({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:II});function DI(t,e={}){try{const n=bI(t),r=TI(n),o=Function("datum","globalObject",`"use strict";
|
|
271
294
|
try {
|
|
272
295
|
return (${r.code});
|
|
273
296
|
} catch (e) {
|
|
274
297
|
throw new Error("Error evaluating expression: " + ${JSON.stringify(t)} + ", " + e.message, e);
|
|
275
|
-
}`).bind(
|
|
298
|
+
}`).bind(eb),i=s=>o(s,e);return i.fields=r.fields,i.globals=r.globals,i.code=r.code,i}catch(n){throw new Error(`Invalid expression: ${t}, ${n.message}`)}}class BI{constructor(e){ge(this,zr);Ut(this,"paramListeners");ge(this,ki,new Map);ge(this,Oo,new Map);ge(this,No,new Map);ge(this,Pa);Te(this,Pa,e??(()=>{})),Te(this,zr,new Map),this.paramListeners=new Map}registerParam(e){const n=e.name;if("value"in e&&"expr"in e)throw new Error(`The parameter "${n}" must not have both value and expr properties!`);let r;if(e.push=="outer"){const o=this.findMediatorForParam(n);if(!o)throw new Error(`Parameter "${n}" not found in outer scope!`);const i=o.paramConfigs.get(n);if("expr"in i||"select"in i)throw new Error(`The outer parameter "${n}" must not have expr or select properties!`);r=o.getSetter(n),W(this,ki).set(n,r)}else if("value"in e)r=this.allocateSetter(n,e.value);else if("expr"in e){const o=this.createExpression(e.expr),i=this.allocateSetter(n,o(null));o.addListener(()=>i(o(null))),r=s=>{}}else r=this.allocateSetter(n,null);if("select"in e){const o=wl(e.select);if(Eh(o))r(o.toggle?Y1():W1(null));else if(J1(o)){if(!o.encodings)throw new Error(`Interval selection "${n}" must have encodings defined!`);r(Q1(o.encodings))}}return W(this,No).set(n,e),r}allocateSetter(e,n,r=!1){if(ra(e),W(this,ki).has(e))throw new Error("Setter already allocated for parameter: "+e);const o=i=>{const s=W(this,zr).get(e);if(i!==s){W(this,zr).set(e,i);const a=this.paramListeners.get(e);if(a&&!r)for(const c of a)c()}};return o(n),W(this,ki).set(e,o),o}getSetter(e){const n=W(this,ki).get(e);if(!n)throw new Error("Setter not found for parameter: "+e);return n}getValue(e){return W(this,zr).get(e)}findValue(e){const n=this.findMediatorForParam(e);return n==null?void 0:n.getValue(e)}get paramConfigs(){return W(this,No)}findMediatorForParam(e){var n;return W(this,zr).has(e)?this:(n=W(this,Pa).call(this))==null?void 0:n.findMediatorForParam(e)}createExpression(e){if(W(this,Oo).has(e))return W(this,Oo).get(e);const n={},r=DI(e,n),o=new Map;for(const s of r.globals){const a=this.findMediatorForParam(s);if(!a)throw new Error(`Unknown variable "${s}" in expression: ${e}`);o.set(s,a),Object.defineProperty(n,s,{enumerable:!0,get(){return a.getValue(s)}})}const i=new Set;return r.addListener=s=>{for(const[a,c]of o){const l=c.paramListeners.get(a)??new Set;c.paramListeners.set(a,l),l.add(s),i.add(s)}},r.invalidate=()=>{var s;for(const[a,c]of o)for(const l of i)(s=c.paramListeners.get(a))==null||s.delete(l)},r.identifier=()=>r.code,W(this,Oo).set(e,r),r}evaluateAndGet(e){return this.createExpression(e)()}hasPointSelections(){for(const e of W(this,No).values())if(tb(e)){const n=e.select;if(nt(n)){if(n=="point")return!0}else if(n.type=="point")return!0}return!1}}zr=new WeakMap,ki=new WeakMap,Oo=new WeakMap,No=new WeakMap,Pa=new WeakMap;function qt(t){return typeof t=="object"&&t!=null&&"expr"in t&&nt(t.expr)}function un(t){if(qt(t))throw new Error(`ExprRef ${JSON.stringify(t)} not allowed here. Expected a scalar value.`);return t}function kI(t){return("expr"in t||"bind"in t)&&!("select"in t)}function tb(t){return!("expr"in t||"bind"in t)&&"select"in t}function xl(t,e,n){const r={...e},o=[],i=s=>{o.push(s),o.length===1&&queueMicrotask(()=>{n(o.slice()),o.length=0})};for(const[s,a]of Object.entries(e))if(qt(a)){const c=t.createExpression(a.expr);n&&c.addListener(()=>i(s)),Object.defineProperty(r,s,{enumerable:!0,get(){return c()}})}else r[s]=a;return r}function ra(t){if(!/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t))throw new Error(`Invalid parameter name: ${t}. Must be a valid JavaScript identifier.`);return t}function _I(t){return Object.assign(()=>t,{addListener:()=>{},invalidate:()=>{},identifier:()=>"constant",fields:[],globals:[],code:JSON.stringify(t)})}function nb(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=((en(e)&&e.resolutionChannel)??(aa(t)&&t))||void 0,"param"in e?(s.predicate=n.createExpression(Z1(e)),s.predicate.param=e.param,s.predicate.empty=e.empty??!0):(s.predicate=_I(!0),s.predicate.empty=!1),s.asNumberAccessor=()=>s,s}function o(i){if(qt(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(_r(e))try{return r(Ze(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(fn(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 RI(t,e,n){const r=[];if(LI(e)||OI(e)){const o=Array.isArray(e.condition)?e.condition:[e.condition];for(const i of o)r.push(nb(t,i,n))}if(r.push(nb(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 FI(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]=MI(RI(o,i,t.paramMediator),r));return n}function MI(t,e){if(t.length===1)return rb(t[0],e);const n=t.map(i=>i.predicate),r=t.map(i=>rb(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 rb(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 fn(t){return t&&"value"in t}function _r(t){return t&&"field"in t}function ia(t){return t&&"datum"in t}function en(t){return _r(t)||ia(t)||oa(t)||ib(t)}function PI(t,e){const n=t.mark.encoding[e];if(en(n))return n;throw new Error("Not a channel def with scale!")}function ib(t){return t&&"chrom"in t}function oa(t){return t&&"expr"in t}function LI(t){return(_r(t)||ia(t))&&"condition"in t}function OI(t){return fn(t)&&"condition"in t}const uo=["x","y"],NI=["x2","y2"],zI=[...uo,...NI];function ob(t){return uo.includes(t)}function sa(t){return zI.includes(t)}const sb={x:"x2",y:"y2"},ab=Object.fromEntries(Object.entries(sb).map(t=>[t[1],t[0]]));function Sh(t){return t in ab}function cb(t){const e=sb[t];if(e)return e;throw new Error(`${t} has no secondary channel!`)}function bi(t){return ab[t]??t}function Rr(t){return["color","fill","stroke"].includes(bi(t))}function vl(t){return["shape"].includes(t)}function aa(t){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(t)}function UI(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 lb(t){if(!vl(t))throw new Error("Not a discrete channel: "+t);const e=new Map(UI(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 Ch(){const t=e=>e;return t.invert=e=>e,t.copy=Ch,t.invertRange=()=>{},t.type="null",t}class GI{constructor(e,n,r,o={}){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 i=document.createElement("canvas");e.appendChild(i);const s=B6(i,{antialias:!0,depth:!1,premultipliedAlpha:!0,...o});if(!s)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!Zi(s))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");if(cm(s),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=E6(s,this._pickingAttachmentOptions),s.bindFramebuffer(s.FRAMEBUFFER,null),this.adjustGl(),this._updateDpr(),this._clearColor=[0,0,0,0],r){const a=Sr(r).rgb();this._clearColor=[a.r/255,a.g/255,a.b/255,a.opacity]}}invalidateSize(){this._logicalCanvasSize=void 0,this._updateDpr(),this.adjustGl()}_updateDpr(){this.dpr=window.devicePixelRatio}compileShader(e,n){const r="#version 300 es",o="precision mediump float;";Dt(n)&&(n=n.join(`
|
|
299
|
+
|
|
300
|
+
`));const i=this.gl,s=n.replaceAll(/ {2,}|^\s*\/\/.*$/gm,"");let a=this._shaderCache.get(s);if(!a){const c=[r,o,n].join(`
|
|
301
|
+
|
|
302
|
+
`);a=i.createShader(e),i.shaderSource(a,c),i.compileShader(a),this._shaderCache.set(s,a)}return a}adjustGl(){const e=this.getLogicalCanvasSize();this.canvas.style.width=`${e.width}px`,this.canvas.style.height=`${e.height}px`;const n=this.getPhysicalCanvasSize(e);this.canvas.width=n.width,this.canvas.height=n.height,S6(this.gl,this._pickingBufferInfo,this._pickingAttachmentOptions)}finalize(){this.canvas.remove()}getPhysicalCanvasSize(e){return e=e||this.getLogicalCanvasSize(),{width:e.width*this.dpr,height:e.height*this.dpr}}getLogicalCanvasSize(){if(this._logicalCanvasSize)return this._logicalCanvasSize;const e=this._sizeSource(),n=window.getComputedStyle(this._container,null),r=e.width??this._container.clientWidth-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight),o=e.height??this._container.clientHeight-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom);return this._logicalCanvasSize={width:r,height:o},this._logicalCanvasSize}readPickingPixel(e,n){const r=this.gl;e*=this.dpr,n*=this.dpr;const o=this.getPhysicalCanvasSize().height,i=new Uint8Array(4);return r.bindFramebuffer(r.FRAMEBUFFER,this._pickingBufferInfo.framebuffer),r.readPixels(e,o-n-1,1,1,r.RGBA,r.UNSIGNED_BYTE,i),r.bindFramebuffer(r.FRAMEBUFFER,null),i}clearAll(){const e=this.gl,{width:n,height:r}=this.getPhysicalCanvasSize();e.viewport(0,0,n,r),e.disable(e.SCISSOR_TEST),e.clearColor(...this._clearColor),e.clear(e.COLOR_BUFFER_BIT)}createRangeTexture(e,n=!1){const r=this.rangeTextures.get(e);if(!n&&r)return;function o(s,a){return Dr(a.type)?a.domain().length:a.type=="threshold"?a.domain().length+1:a.type=="quantize"||a.type=="quantile"?s??4:s}const i=e.channel;if(Rr(i)){const s=e.scale,a=s.props,c=s.range();let l;if(a.scheme)if(s.type=="threshold"&&c)l=Ih(c,this.gl,s.domain().length,r);else{let u=nt(a.scheme)?void 0:a.scheme.count;u=o(u,s),l=qI(a.scheme,this.gl,u,r)}else fl(s.type)||kt(s.type)&&c.length>1?l=jI(c,a.interpolate,this.gl,r):l=Ih(c,this.gl,s.domain().length,r);this.rangeTextures.set(e,l)}else{const s=e.scale;if(s.type==="ordinal"||di(s.type)){const a=vl(i)?lb(i):l=>l,c=s.range();this.rangeTextures.set(e,WI(c.map(a),this.gl,s.domain().length,r))}}}createSelectionTexture(e,n=!0){if(!Ah(e))throw new Error("Not a multi-point selection, cannot create texture");const r=Array.from(e.data.keys()),o=r.length>0?r.sort((c,l)=>c-l):[0],i=this.selectionTextures.get(e),s=this.gl,a=ca(this.gl,{level:0,minMag:s.NEAREST,format:s.RED_INTEGER,internalFormat:s.R32UI,height:1,width:o.length},new Uint32Array(o),n?i:!1);this.selectionTextures.set(e,a)}}function HI(t,e="",n=0){const r=/ERROR:\s*\d+:(\d+)/gi,o=[...e.matchAll(r)],i=new Map(o.map((s,a)=>{const c=parseInt(s[1]),l=o[a+1],u=l?l.index:e.length,f=e.substring(s.index,u);return[c-1,f]}));return t.split(`
|
|
303
|
+
`).map((s,a)=>{const c=i.get(a);return`${a+1+n}: ${s}${c?`
|
|
304
|
+
|
|
305
|
+
^^^ ${c}`:""}`}).join(`
|
|
306
|
+
`)}function VI(t,e,n){const r=t.createProgram();t.attachShader(r,e),t.attachShader(r,n),t.linkProgram(r);function o(){let i,s;if(!t.getProgramParameter(r,t.LINK_STATUS)){i=t.getProgramInfoLog(r);for(const c of[e,n])t.getShaderParameter(c,t.COMPILE_STATUS)||(i=t.getShaderInfoLog(c),s=HI(t.getShaderSource(c),i,0)+`
|
|
307
|
+
Error compiling: ${i}`,t.deleteShader(c));t.deleteProgram(r)}if(i)return{message:i,detail:s}}return{program:r,getProgramErrors:o}}function ca(t,e,n,r){return r?Sg(t,r,n,e):r=Ns(t,{...e,src:n}),r}function qI(t,e,n,r){const o=nt(t)?t:t.name,i=!nt(t)&&t.extent||[0,1];if(n===void 0&&!nt(t)&&(n=t.count),o){const s=uh(o);if(sn(s)){const a=ub(s,{extent:i,count:n});return ca(e,{minMag:e.LINEAR,format:e.RGB,height:1,wrap:e.CLAMP_TO_EDGE},a,r)}else{if(Dt(s))return Ih(s,e);throw new Error("Unknown scheme: "+o)}}}function jI(t,e="rgb",n,r){const o=hl(t,nt(e)?e:e.type,nt(e)?void 0:e.gamma),i=ub(o);return ca(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},i,r)}function WI(t,e,n,r){const o=Math.max(t.length,n||0),i=new Float32Array(o);for(let s=0;s<o;s++)i[s]=t[s%t.length];return ca(e,{minMag:e.NEAREST,format:e.RED,internalFormat:e.R32F,height:1},i,r)}function Ih(t,e,n,r){const o=fb(t,n);return ca(e,{minMag:e.NEAREST,format:e.RGB,height:1},o,r)}function ub(t,{extent:e=[0,1],reverse:n=!1,count:r=256}={}){const o=e[0],i=Rs(e)-o,s=gs(r).map(a=>a/(r-1)).map(a=>o+a/i).map(t);return n&&s.reverse(),fb(s)}function fb(t,e){const n=Math.max(t.length,e||0),r=new Uint8Array(n*3);for(let o=0;o<n;o++){const i=t[o%t.length],s=Sr(i);if(!s)throw new Error(`Invalid color "${i}" in the scheme ${JSON.stringify(t)}!`);const a=s.rgb();r[o*3+0]=a.r,r[o*3+1]=a.g,r[o*3+2]=a.b}return r}function Th(t){const e=Sr(t).rgb();return[e.r,e.g,e.b].map(n=>n/255)}const fo="attr_",YI="uDomain_",QI="range_",ZI="accessor_",hb="scale_",XI="getScaled_",Dh="uRangeTexture_",Al="uParam_",la="checkSelection_",KI=3402823466e29;function JI(t){const e=t.match(/^(?:(\w+)-)?(\w+)$/);if(!e)throw new Error("Not a scale type: "+t);return{family:e[1]||"continuous",transform:e[2]}}function ua(t,e){return`${ZI}${t}_${e}`}function $I(t,e,n){let r;if(vl(t))r=yi(lb(t)(n));else if(nt(n))if(Rr(t))r=iT(n);else throw new Error(`String values are not supported on the "${t}" channel: ${n}`);else if(is(n))r=yi(n?1:0);else if(n===null)if(Rr(t))r=yi([0,0,0]);else throw new Error(`null value is not supported on the "${t}" chanel.`);else r=yi(n);const o=ua(t,e),i=`
|
|
276
308
|
${r.type} ${o}() {
|
|
277
309
|
// Constant value
|
|
278
310
|
return ${r};
|
|
279
|
-
}`;return{channel:t,accessorGlsl:i,accessorFunctionName:o}}function
|
|
280
|
-
uniform ${n} ${o};`,s=
|
|
311
|
+
}`;return{channel:t,accessorGlsl:i,accessorFunctionName:o}}function eT(t,e){let n="float",r=c=>c;Rr(t)&&(n="vec3",r=c=>Th(c));const o=`u${lT(t)}_${e}`,i=` // Dynamic value
|
|
312
|
+
uniform ${n} ${o};`,s=ua(t,e);let a=`
|
|
281
313
|
${n} ${s}() {
|
|
282
314
|
// Dynamic value
|
|
283
315
|
return ${o};
|
|
284
|
-
}`;return{channel:t,uniformName:o,uniformGlsl:i,accessorGlsl:a,accessorFunctionName:s,adjuster:r}}function
|
|
316
|
+
}`;return{channel:t,uniformName:o,uniformGlsl:i,accessorGlsl:a,accessorFunctionName:s,adjuster:r}}function db(t,e,n,r=[t]){const{attributeType:o}=ho(e,t),i=fo+kh(r),s=`in highp ${o} ${i};`,a=ua(t,n),c=`
|
|
285
317
|
${o} ${a}() {
|
|
286
318
|
return ${i};
|
|
287
|
-
}`;return{channel:t,attributeName:i,attributeGlsl:s,accessorGlsl:c,accessorFunctionName:a}}function
|
|
319
|
+
}`;return{channel:t,attributeName:i,attributeGlsl:s,accessorGlsl:c,accessorFunctionName:a}}function tT(t,e,n){const{attributeType:r}=ho(e,t),o=fo+kh(t),i=` uniform highp ${r} ${o};`,s=ua(t,n),a=`
|
|
288
320
|
${r} ${s}() {
|
|
289
321
|
return ${o};
|
|
290
|
-
}`;return{channel:t,uniformName:o,uniformGlsl:i,accessorGlsl:a,accessorFunctionName:s}}function
|
|
291
|
-
${v} ${
|
|
322
|
+
}`;return{channel:t,uniformName:o,uniformGlsl:i,accessorGlsl:a,accessorFunctionName:s}}function nT(t,e,n){e??(e=Ch());const r=bi(t),o=YI+r,i=QI+r,{hp:s,attributeType:a}=ho(e,t),c=e.domain?e.domain().length:void 0;let l;const u=[];u.push(""),u.push("/".repeat(70)),u.push(`// Channel: ${t}`),u.push("");const{transform:f}=JI(e.type),d=(B,...N)=>oT.apply(null,[B,"value",...N]);let h;switch(f){case"linear":h=d("scaleLinear","domain",i);break;case"log":h=d("scaleLog","domain",i,e.base());break;case"symlog":h=d("scaleSymlog","domain",i,e.constant());break;case"pow":case"sqrt":h=d("scalePow","domain",i,e.exponent());break;case"index":case"locus":h=d("scaleBandHp","domain",i,e.paddingInner(),e.paddingOuter(),e.align(),n.band??.5);break;case"point":case"band":h=d("scaleBand","domain",i,e.paddingInner(),e.paddingOuter(),e.align(),n.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}! ${t}: ${JSON.stringify(n)}`)}const p=vb(e,t);let b;if(p&&t==r){const B=e.props.range??[];if(qt(B)||B.some(qt)){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)}`);b=` uniform ${gb(p.length)} ${i};`}else if(p.length&&p.every(Gt)){const N=bb(p);u.push(`const ${N.type} ${i} = ${N};`)}}const v=mb(t);let y;if(Rr(t)){const B=Dh+r;if(t==r&&u.push(`uniform sampler2D ${B};`),kt(e.type))y=`getInterpolatedColor(${B}, transformed)`;else if(Dr(e.type)||di(e.type))y=`getDiscreteColor(${B}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(e.type==="ordinal"||di(e.type)){const B=Dh+r;t==r&&u.push(`uniform sampler2D ${B};`),y=`getDiscreteColor(${B}, int(transformed)).r`}const A=[],S=kt(e.type)&&c>2,E=di(e.type)||S;if(A.push("int slot = 0;"),E){const B=o;A.push(S?`while (slot < ${B}.length() - 2 && value >= ${B}[slot + 1]) { slot++; }`:`while (slot < ${B}.length() && value >= ${B}[slot]) { slot++; }`)}const I=kt(e.type)||di(e.type)||["band","point"].includes(e.type);if(h){const B=o;I&&(s?A.push(`vec3 domain = ${B};`):A.push(`vec2 domain = vec2(${B}[slot], ${B}[slot + 1]);`)),A.push(`float transformed = ${h};`),S&&A.push(`transformed = (float(slot) + transformed) / (float(${B}.length() - 1));`)}else A.push("float transformed = float(slot);");"clamp"in e&&e.clamp()&&A.push(`transformed = clampToRange(transformed, ${bb(p)});`),A.push(`return ${y??"transformed"};`),u.push(`
|
|
323
|
+
${v} ${hb}${t}(${a} value) {
|
|
292
324
|
${A.map(B=>` ${B}
|
|
293
325
|
`).join("")}
|
|
294
|
-
}`);const
|
|
295
|
-
`);if(I&&t==r){const B=
|
|
296
|
-
${
|
|
326
|
+
}`);const _=u.join(`
|
|
327
|
+
`);if(I&&t==r){const B=kt(e.type)||di(e.type)?c:2;l=s?` highp vec3 ${o};`:` mediump float ${o}[${B}];`}return{glsl:_,domainUniformName:o,domainUniform:l,rangeUniformName:i,rangeUniform:b}}function rT(t,e){const n=mb(t),r=[],o=[];for(let i=0;i<e.length;i++){const s=e[i],a=ua(t,i),{param:c,empty:l}=s.predicate;r.push(c?`${la}${c}(${!!l})`:null),o.push(s.scaleChannel?`return ${hb}${t}(${a}());`:`return ${a}();`)}return`${n} ${XI}${t}() {
|
|
328
|
+
${uT(r,o)}
|
|
297
329
|
}
|
|
298
330
|
|
|
299
|
-
#define ${t}_DEFINED`}function
|
|
331
|
+
#define ${t}_DEFINED`}function pb(t){if(!Gt(t))throw new Error(`Not a number: ${t}`);if(t==1/0)return""+KI;if(t==-1/0)return""+-3402823466e29;{let e=`${t}`;return/^(-)?\d+$/.test(e)&&(e+=".0"),e}}function yi(t){typeof t=="number"&&(t=[t]);const e=t.length;if(e<1||e>4)throw new Error("Invalid number of components: "+e);const n=gb(e),r=`${n}(${t.map(pb).join(", ")})`;return Object.assign(r,{type:n,numComponents:e})}function gb(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error("Invalid number of components: "+t)}}function mb(t){return Rr(t)?"vec3":t=="uniqueId"?"uint":"float"}function iT(t){return yi(Th(t))}function bb(t){return yi([t[0],Rs(t)])}function oT(t,...e){const n=[];for(const r of e)Gt(r)?n.push(pb(r)):Dt(r)?n.push(yi(r)):n.push(r);return`${t}(${n.join(", ")})`}function ho(t,e){var s;const n=t&&Dr(t.type),r=t&&yb(t.type),o=r&&sT(t.domain()),i=o?{attributeType:"uvec2",arrayConstructor:Uint32Array}:r?{attributeType:"uint",arrayConstructor:Uint32Array}:n?{attributeType:"uint",arrayConstructor:Uint16Array}:e=="uniqueId"?{attributeType:"uint",arrayConstructor:Uint32Array}:{attributeType:"float",arrayConstructor:Float32Array};return Object.assign(i,{numComponents:+(((s=i.attributeType.match(/^vec([234])$/))==null?void 0:s[1])??1),discrete:n,hp:r,largeHp:o})}function yb(t){return t=="index"||t=="locus"}function sT(t){return t[1]>2**32}const Bh=2**12;function wb(t,e=[]){const n=t%Bh,r=(t-n)/Bh;return e[0]=r,e[1]=n,e}function aT(t){const e=t%Bh;return[t-e,e]}function cT(t){return[...aT(t[0]),t[1]-t[0]]}function xb(t){const e=new jn([],JSON.stringify);for(const[n,r]of Object.entries(t)){const o=r.channelDef;if(_r(o)){const s=[o.field,r.scale?(kt(r.scale.type)||di(r.scale.type))??!1:!1];e.set(s,[...e.get(s)??[],n])}}return e}function kh(t){return Yt(t).join("_")}function lT(t){return t[0].toUpperCase()+t.slice(1)}const vb=(t,e)=>fl(t.type)||kt(t.type)&&Rr(e)?[0,1]:t.range?t.range():void 0;function uT(t,e){if(t.length!=e.length)throw new Error("Unequal array lengths");const n=t.length;if(n==0)return"";if(n==1&&t[0]==null)return e[0];const r=[];for(let o=0;o<n;o++){const i=t[o],s=o==0?`if (${i})`:i==null&&o==n-1?"else":`else if (${i})`;r.push(` ${s} {
|
|
300
332
|
${e[o]}
|
|
301
333
|
}`)}return r.join(`
|
|
302
|
-
`)}const
|
|
334
|
+
`)}const Ab=1e4;class fT{constructor(e){ge(this,zo);ge(this,La,!1);this.size=e,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}configure(){if(W(this,La))throw new Error("Already configured!");de(this,zo,lv).call(this),de(this,zo,uv).call(this),Te(this,La,!0)}addConverter(e,n){const r=this.createUpdater(fo+e,n.numComponents||1,n.targetArrayType??Float32Array,n.arrayReference),o=n.f;this.dataUpdaters.push(n.arrayReference?i=>r(o(i)):i=>r(o(i)))}createUpdater(e,n,r=Float32Array,o=void 0){if(!Gt(this.size))throw new Error("The number of vertices must be defined!");let i,s,a=0;const c=new r(this.size*n);if(this.arrays[e]={data:c,numComponents:n},n==1){let l=0;const u=f=>{l=+f};i=()=>{c[a++]=l},s=u}else{let l=o??[0];const u=o?f=>{}:f=>{l=f};switch(n){case 1:break;case 2:i=()=>{c[a++]=l[0],c[a++]=l[1]},s=u;break;case 3:i=()=>{c[a++]=l[0],c[a++]=l[1],c[a++]=l[2]},s=u;break;case 4:i=()=>{c[a++]=l[0],c[a++]=l[1],c[a++]=l[2],c[a++]=l[3]},s=u;break;default:throw new Error("Invalid numComponents: "+n)}}return this.pushers.push(i),s}pushAll(){throw new Error("Call configure() first!")}updateFromDatum(e){throw new Error("Call configure() first!")}pushFromDatum(e){this.updateFromDatum(e),this.pushAll()}}La=new WeakMap,zo=new WeakSet,lv=function(){if(this.size>Ab){const e=this.pushers.map((r,o)=>`const p${o} = that.pushers[${o}];`).join(`
|
|
303
335
|
`),n=this.pushers.map((r,o)=>` p${o}();`).join(`
|
|
304
336
|
`);this.pushAll=new Function("that",`${e}
|
|
305
337
|
return function unrolledPushAll() {
|
|
306
338
|
${n}
|
|
307
339
|
that.vertexCount++;
|
|
308
|
-
};`)(this)}else this.pushAll=()=>{for(let e=0;e<this.pushers.length;e++)this.pushers[e]();this.vertexCount++}},
|
|
340
|
+
};`)(this)}else this.pushAll=()=>{for(let e=0;e<this.pushers.length;e++)this.pushers[e]();this.vertexCount++}},uv=function(){if(this.size>Ab){const e=this.dataUpdaters.map((r,o)=>`const u${o} = that.dataUpdaters[${o}];`).join(`
|
|
309
341
|
`),n=this.dataUpdaters.map((r,o)=>` u${o}(datum);`).join(`
|
|
310
342
|
`);this.updateFromDatum=new Function("that","datum",`${e}
|
|
311
343
|
return function unrolledUpdateFromDatum(datum) {
|
|
312
344
|
${n}
|
|
313
|
-
};`)(this)}else this.updateFromDatum=e=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](e)}};const
|
|
345
|
+
};`)(this)}else this.updateFromDatum=e=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](e)}};const fa=5,_h=127;function Rh(t){const e=[];for(let p=0;p<=_h;p++)e.push(void 0);const n=new Map;for(const p of t.chars)p.id<=_h?e[p.id]=p:n.set(p.id,p);const r=8722;n.has(r)||n.set(r,e[45]);function o(p){return(p<=_h?e[p]:n.get(p))||e[63]}function i(p){return o(p.charCodeAt(0))}const s=t.common.base,a=i("x"),c=i("X"),l=i("q"),u=a.height-fa*2,f=c.height-fa*2,d=l.height-a.height+l.yoffset-a.yoffset;function h(p,b=1){let v=0;for(let y=0;y<p.length;y++)v+=o(p.charCodeAt(y)).xadvance;return v/s*b}return{measureWidth:h,getCharByCode:o,getChar:i,xHeight:u,capHeight:f,descent:d,common:t.common}}const Eb=2**31-1,hT=-2147483648;function dT(t,e,n,r=n){const o=new Array(t);o.fill(Eb);let i=hT,s=-1/0,a=!1;const c=new Array(t);c.fill(0);const l=e[0],f=(e[1]-e[0])/t,d=(y,A)=>{const S=(y-l)/f,E=Math.floor(S);return lo(A&&E==S?E-1:E,0,t-1)};function h(y,A,S){if(a)return;if(A>i)i=A;else{a=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}const E=n(y);if(E<s){a=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}s=E;const I=d(E,!1);o[I]>A&&(o[I]=A),c[I]<S&&(c[I]=S)}function p(y,A,S){if(a)return;if(A>i)i=A;else{a=!0,console.debug("Items (vertices) are not ordered properly. Disabling binned index.");return}const E=n(y),I=r(y);if(E<s){a=!0,console.debug("Items are not ordered properly. Disabling binned index.");return}else if(I<E){a=!0,console.debug("End index is less than start index. Disabling binned index. Datum: ",y);return}s=E;const _=d(E,!1),B=d(I,!0);for(let N=_;N<=B;N++)o[N]>A&&(o[N]=A),c[N]<S&&(c[N]=S)}const b=(y,A,S=[0,0])=>{const E=d(y,!1),I=d(A,!0),_=o[E],B=Math.max(c[I],_);return S[0]=_,S[1]=B,S},v=()=>{if(a)return;for(let A=1;A<c.length;A++)c[A]<c[A-1]&&(c[A]=c[A-1]);let y=!0;for(let A=o.length-1;A>0;A--)y&&o[A]==Eb?(o[A]=c[A],y=!1):o[A-1]>o[A]&&(o[A-1]=o[A]);return b};return h.getIndex=v,p.getIndex=v,n==r?h:p}function pT(){let t=0,e,n=0;const r=new Map,o=i=>(i===e||(n=r.get(i),n===void 0&&(n=t++,r.set(i,n)),e=i),n);return o.addAll=i=>{for(const s of i)o(s)},o.invert=i=>{for(const s of r.entries())if(s[1]==i)return s[0]},o.domain=()=>[...r.keys()],o}class ha{constructor({encoders:e,numVertices:n=void 0,attributes:r=[]}){this.encoders=e,this.variableEncoders=Object.fromEntries(Object.entries(e).filter(([i,s])=>r.includes(i)&&s&&!s.constant));const o=[...xb(e).entries()].filter(([i,s])=>i[1]&&s.length>1).map(([i,s])=>s);this.allocatedVertices=n,this.variableBuilder=new fT(n);for(const[i,s]of Object.entries(this.variableEncoders)){const a=s.dataAccessor;if(!a)continue;const c=o.find(S=>S.find(E=>E==i));if(c&&i!=c[0])continue;const l=a.asNumberAccessor(),u=s.scale,{largeHp:f,arrayConstructor:d,discrete:h,numComponents:p}=ho(u,i),b=[0,0];let v;u&&h&&"domain"in u&&(v=pT(),v.addAll(u.domain()));const y=v?S=>v(a(S)):f?S=>wb(l(S),b):l,A=c?kh(c):i;this.variableBuilder.addConverter(A,{f:y,numComponents:p,arrayReference:f?b:void 0,targetArrayType:d})}this.lastOffset=0,this.rangeMap=new jn([],JSON.stringify)}registerBatch(e){var i;const n=this.lastOffset,r=this.variableBuilder.vertexCount,o=r-n;o&&this.rangeMap.set(e,{offset:n,count:o,xIndex:(i=this.xIndexer)==null?void 0:i.getIndex()}),this.lastOffset=r}addBatches(e){for(const[n,r]of e)this.addBatch(n,r)}addBatch(e,n,r=0,o=n.length){this.prepareXIndexer(n,r,o);for(let i=r;i<o;i++){const s=n[i];this.variableBuilder.pushFromDatum(s),this.addToXIndex(s)}this.registerBatch(e)}prepareXIndexer(e,n=0,r=n+e.length){var l;const o=()=>{this.addToXIndex=u=>{},this.xIndexer=void 0},i=(l=this.encoders.x)==null?void 0:l.channelDef;if(!("buildIndex"in i)||!i.buildIndex||!e.length||r-n<0){o();return}const s=u=>{var f;return u&&kt((f=u.scale)==null?void 0:f.type)&&u},a=s(this.variableEncoders.x),c=s(this.variableEncoders.x2);if(a&&!a.constant&&(!c||!c.constant)){const u=a.dataAccessor.asNumberAccessor(),f=c?c.dataAccessor.asNumberAccessor():u,d=[u(e[n]),f(e[r-1])];if(d[1]>d[0]){this.xIndexer=dT(50,d,u,f);let h=this.variableBuilder.vertexCount;this.addToXIndex=p=>{let b=this.variableBuilder.vertexCount;this.xIndexer(p,h,b),h=b}}else o()}else o()}addToXIndex(e){}toArrays(){return{arrays:this.variableBuilder.arrays,vertexCount:this.variableBuilder.vertexCount,allocatedVertices:this.allocatedVertices,rangeMap:this.rangeMap}}}class gT extends ha{constructor({encoders:e,attributes:n,numItems:r}){super({encoders:e,attributes:n,numVertices:r*6}),this.variableBuilder.configure();const o=this.variableBuilder.pushAll;this.pushAllSixTimes=r>500?new Function("pushAll",`return function unrolledPushAllSixTimes() {
|
|
314
346
|
pushAll(); pushAll(); pushAll(); pushAll(); pushAll(); pushAll();
|
|
315
|
-
};`)(o):function(){o(),o(),o(),o(),o(),o()}}addBatch(e,n,r=0,o=n.length){if(!(o<=r)){this.prepareXIndexer(n,r,o);for(let i=r;i<o;i++){const s=n[i];this.variableBuilder.updateFromDatum(s),this.pushAllSixTimes(),this.addToXIndex(s)}this.registerBatch(e)}}}class
|
|
316
|
-
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;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,float halfStrokeWidth){if(halfStrokeWidth>0.0){float sd=abs(d)-halfStrokeWidth;return mix(stroke,d<=0.0 ? fill :
|
|
347
|
+
};`)(o):function(){o(),o(),o(),o(),o(),o()}}addBatch(e,n,r=0,o=n.length){if(!(o<=r)){this.prepareXIndexer(n,r,o);for(let i=r;i<o;i++){const s=n[i];this.variableBuilder.updateFromDatum(s),this.pushAllSixTimes(),this.addToXIndex(s)}this.registerBatch(e)}}}class mT extends ha{constructor({encoders:e,attributes:n,tessellationThreshold:r=1/0,visibleRange:o=[-1/0,1/0],numItems:i}){super({encoders:e,attributes:n,numVertices:r==1/0?i*6:void 0}),this.visibleRange=o,this.tessellationThreshold=r||1/0,this.updateSide=this.variableBuilder.createUpdater("side",1),this.updatePos=this.variableBuilder.createUpdater("pos",1),this.variableBuilder.configure()}addBatch(e,n,r=0,o=n.length){this.prepareXIndexer(n,r,o);for(let i=r;i<o;i++){const s=n[i];this.variableBuilder.updateFromDatum(s),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(s)}this.registerBatch(e)}}class bT extends ha{constructor({encoders:e,attributes:n,numItems:r=void 0}){super({encoders:e,attributes:n,numVertices:r}),this.variableBuilder.configure()}}class yT extends ha{constructor({encoders:e,attributes:n,numItems:r=void 0}){super({encoders:e,attributes:n,numVertices:r}),this.variableBuilder.configure()}toArrays(){const e=this.variableBuilder.arrays;for(let n of Object.values(e))n.divisor=1;return super.toArrays()}}class wT extends ha{constructor({encoders:e,attributes:n,fontMetrics:r,properties:o,numCharacters:i=void 0}){super({encoders:e,attributes:n,numVertices:i*6}),this.metadata=r,this.metrics=r,this.properties=o;const a=e.text.channelDef;this.numberFormat=!fn(a)&&"format"in a&&a.format?Bt(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,n,r=0,o=n.length){const i=this.properties.align||"left",s=this.properties.logoLetters??!1,a=this.metadata.common.base,c=this.metadata.common.scaleH;let l=-5;switch(this.properties.baseline){case"top":l+=this.metrics.capHeight;break;case"middle":l+=this.metrics.capHeight/2;break;case"bottom":l-=this.metrics.descent;break}const u=this.encoders.text,f=[0,0];this.updateVertexCoord(f);const d=[0,0];this.updateTextureCoord(d),this.prepareXIndexer(n,r,o);for(let h=r;h<o;h++){const p=n[h],b=this.numberFormat(u(p)),v=nt(b)?b:b===null?"":""+b;if(v.length==0)continue;this.variableBuilder.updateFromDatum(p);const y=s?v.length:this.metrics.measureWidth(v);this.updateWidth(y);let A=i=="right"?-y:i=="center"?-y/2:0;if(!s){const _=this.metrics.getCharByCode(v.charCodeAt(0));A-=(_.width-_.xadvance)/a/2}let S=-.5,E=1,I=1;for(let _=0;_<v.length;_++){const B=this.metrics.getCharByCode(v.charCodeAt(_)),N=s?1:B.xadvance/a;if(B.id==32){A+=N;continue}s?(I=(B.width+fa*2)/B.width,A=-I/2,E=(B.height+fa*2)/B.height,S=-.5-fa/B.height):(E=B.height/a,S=-(B.height+B.yoffset+l)/a,I=B.width/a);const M=B.x,F=B.y;f[0]=A,f[1]=S+E,d[0]=M/c,d[1]=F/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=S+E,d[0]=(M+B.width)/c,d[1]=F/c,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,d[0]=M/c,d[1]=(F+B.height)/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=S+E,d[0]=(M+B.width)/c,d[1]=F/c,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,d[0]=M/c,d[1]=(F+B.height)/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=S,d[0]=(M+B.width)/c,d[1]=(F+B.height)/c,this.variableBuilder.pushAll(),A+=N}this.addToXIndex(p)}this.registerBatch(e)}}const Sb=`#define PI 3.141593
|
|
348
|
+
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;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));}}`,xT="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));}",vT=`/***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;
|
|
317
349
|
#if !defined(SAMPLE_FACET_UNIFORM) && !defined(SAMPLE_FACET_TEXTURE)
|
|
318
350
|
SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1.0);}
|
|
319
351
|
#elif defined(SAMPLE_FACET_UNIFORM)
|
|
@@ -321,44 +353,37 @@ SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1
|
|
|
321
353
|
#elif defined(SAMPLE_FACET_TEXTURE)
|
|
322
354
|
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);}
|
|
323
355
|
#endif
|
|
324
|
-
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;}}`,
|
|
356
|
+
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;}}`,AT=`/**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){
|
|
325
357
|
#ifdef uniqueId_DEFINED
|
|
326
358
|
uint id=attr_uniqueId;vPickingColor=vec4(ivec4(id>>0,id>>8,id>>16,id>>24)&0xFF)/float(0xFF);
|
|
327
359
|
#else
|
|
328
360
|
vPickingColor=vec4(1.0);
|
|
329
361
|
#endif
|
|
330
|
-
return true;}return false;}`,
|
|
331
|
-
|
|
332
|
-
`))
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
`).
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
Error compiling: ${i}`,t.deleteShader(c));t.deleteProgram(r)}if(i)return{message:i,detail:s}}return{program:r,getProgramErrors:o}}function $s(t,e,n,r){return r?ug(t,r,n,e):r=Cs(t,{...e,src:n}),r}function cb(...t){const e={get(n,r,o){for(const i of t){const a=i()[r];if(a!==void 0)return a}},has(n,r,o){for(const i of t){const s=i();if(r in s)return!0}return!1}};return new Proxy({},e)}function iT(t){return nt(t)||Gt(t)||jo(t)}class gi extends Error{constructor(e,n){super(e),this.name="ViewError",this.view=n}}const oT="SAMPLE_FACET_UNIFORM",lb="SAMPLE_FACET_TEXTURE",ub="uSelectionTexture_";class ea{constructor(e){ve(this,Gn,[]);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 sT,this.defaultProperties={get clip(){return["x","y"].map(n=>e.getScaleResolution(n)).some(n=>(n==null?void 0:n.isZoomable())??!1)},xOffset:0,yOffset:0,minBufferSize:0},this.properties=cb(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}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:cn}),e}fixEncoding(e){return e}setupExprRefsNeedingGraphicsUpdate(e){const n=this.getSupportedChannels(),r={};for(const i of e){const s=this.properties[i];if(s&&qt(s)){const a=this.unitView.paramMediator.createExpression(s.expr);a.addListener(()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()}),n.includes(i)||Object.defineProperty(r,i,{get(){return a()}})}}const o=this.properties;this.properties=cb(()=>r,()=>o)}get encoding(){return hl(this,"encoding",()=>{var s;const e=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=a=>{const c=this.properties[a];return iT(c)||qt(c)?{value:c}:void 0},o=Object.fromEntries(this.getSupportedChannels().map(a=>[a,r(a)]).filter(a=>ln(a[1]))),i=this.fixEncoding({...e,...o,...n});for(const a of Object.keys(i))this.getSupportedChannels().includes(a)||delete i[a];return i.x&&((s=i.x).buildIndex??(s.buildIndex=!0)),i})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=fI(this.unitView,this.encoding)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return lb;if(this.unitView.getLayoutAncestors().find(e=>"samples"in e.spec))return oT}createAndLinkShaders(e,n,r=[]){const o=this.getAttributes(),i=this.encoders,s=this.getSampleFacetMode();s&&r.push(`#define ${s}`);const a="// view: "+this.unitView.getPathString();let c=[];const l=new Set,u=eb(i),f=[],h=Object.values(i).flatMap(I=>I.accessors).map(I=>I.predicate).filter(I=>I.param),d=new Map;for(const I of h){const R=I.param,B=this.unitView.paramMediator,O=B.getValue(R);if(!O)throw new Error(`Cannot infer selection type as the parameter "${R}" has no value. Please ensure that the parameter is properly defined!`);const F=ll+"uniqueId";if(P1(O)){if(!d.has(R)){const P=hh+al(R);d.set(R,"single"),f.push(" // Selection parameter"),f.push(` uniform highp uint ${P};`),X(this,Gn).push(()=>{this.registerMarkUniformValue(P,{expr:R},S=>S.uniqueId??0)}),c.push(`bool ${ul}${R}(bool empty) {
|
|
340
|
-
return ${hh}${R} == ${F} || (empty && ${hh}${R} == 0u);
|
|
341
|
-
}`)}}else if(ah(O)&&!d.has(R)){d.set(R,"multi");const P=ub+al(R);c.push(`// Selection texture
|
|
342
|
-
uniform highp usampler2D ${P};`);const S=this.getContext().glHelper,Q=S.selectionTextures;this.selectionTextureOps.push(()=>{const ce=B.getValue(R),fe=Q.get(ce);if(!fe)throw new Error(`Bug: no selection texture found for "${R}"!`);ti(this.programInfo,{[P]:fe})});const Z=ub+R;c.push(`bool ${ul}${R}(bool empty) {
|
|
343
|
-
return binarySearchTexture(${Z}, ${F}) || (empty && isEmptyBinarySearchTexture(${Z}));
|
|
344
|
-
}`),S.createSelectionTexture(O);const ae=B.createExpression(R);ae.addListener(()=>{const ce=ae(null);S.createSelectionTexture(ce),this.getContext().animator.requestRender()})}}const p=(I,R,B,O)=>{const F=R.channelDef;if(ln(F))if(qt(F.value)){const{uniformName:P,uniformGlsl:S,accessorGlsl:Q,adjuster:Z}=TI(I,B);c.push(Q),f.push(S),X(this,Gn).push(()=>{this.registerMarkUniformValue(P,F.value,Z)})}else c.push(II(I,B,F.value).accessorGlsl);else if(qs(F)){const{uniformName:P,uniformGlsl:S,accessorGlsl:Q}=DI(I,O,B);f.push(S),c.push(Q);const{largeHp:Z,discrete:ae}=Zs(O,I),ce=ae&&"domain"in O?fe=>O.domain().indexOf(fe):Z?$1:fe=>+fe;X(this,Gn).push(()=>{this.registerMarkUniformValue(P,F.datum,ce)})}else if(_r(F)){const P=u.get([F.field,!0]),{attributeGlsl:S,accessorGlsl:Q}=W1(I,O,B,P!=null&&P.includes(I)?P:void 0);l.add(S),c.push(Q)}else if(js(F)){const{attributeGlsl:P,accessorGlsl:S}=W1(I,O,B);l.add(P),c.push(S)}else throw new gi(`Unsupported channel definition: ${JSON.stringify(F)}`,this.unitView)};for(const[I,R]of Object.entries(i)){if(!o.includes(I))continue;const{channelDef:B,accessors:O,scale:F}=R;for(let P=0;P<O.length;P++)p(I,O[P],P,F);if(F){const P=Jt(B)&&B.resolutionChannel||I,S=Qs(P)?this.unitView.getScaleResolution(P):null,{glsl:Q,domainUniform:Z,domainUniformName:ae,rangeUniform:ce,rangeUniformName:fe}=BI(I,F,B);c.push(Q),f.push(Z),f.push(ce),ce&&X(this,Gn).push(()=>{const le=this.createMarkUniformSetter(fe),Ee=()=>le(tb(F,I));S.addEventListener("range",Ee),Ee()}),Z&&X(this,Gn).push(()=>{const le=this.createMarkUniformSetter(ae),Ee=()=>{const pe=Tr(F.type)?[0,F.domain().length]:F.domain();le(J1(F.type)?PI(pe):pe)};S.addEventListener("domain",Ee),Ee()})}c.push(_I(I,O))}const y=[...d.keys()].map(I=>`${ul}${I}(false)`);c.push(`bool isPointSelected() {
|
|
345
|
-
`+(this.encoders.uniqueId&&y.length>0?` return ${y.join(" || ")};`:" return false;")+`
|
|
362
|
+
return true;}return false;}`,ET="in highp vec4 vPickingColor;",El=Symbol("cacheMap");function Sl(t,e,n){let r=da(t).get(e);return r===void 0&&(r=n(e),da(t).set(e,r)),r}function ST(t,e){da(t).delete(e)}function Cl(t,e){const n=da(t);for(const r of n.keys())r.startsWith(e)&&n.delete(r);da(t).delete(e)}function Cb(t){t[El]=new Map}function da(t){return t[El]||Cb(t),t[El]}function Ib(...t){const e={get(n,r,o){for(const i of t){const a=i()[r];if(a!==void 0)return a}},has(n,r,o){for(const i of t){const s=i();if(r in s)return!0}return!1}};return new Proxy({},e)}function CT(t){return nt(t)||Gt(t)||is(t)}class Fr extends Error{constructor(e,n){super(e),this.name="ViewError",this.view=n}}const IT="SAMPLE_FACET_UNIFORM",Tb="SAMPLE_FACET_TEXTURE",Db="uSelectionTexture_";class pa{constructor(e){ge(this,Tn,[]);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 TT,this.defaultProperties={get clip(){return["x","y"].map(n=>e.getScaleResolution(n)).some(n=>(n==null?void 0:n.isZoomable())??!1)},xOffset:0,yOffset:0,minBufferSize:0},this.properties=Ib(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:ln}),e}fixEncoding(e){return e}setupExprRefsNeedingGraphicsUpdate(e){const n=this.getSupportedChannels(),r={};for(const i of e){const s=this.properties[i];if(s&&qt(s)){const a=this.unitView.paramMediator.createExpression(s.expr);a.addListener(()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()}),n.includes(i)||Object.defineProperty(r,i,{get(){return a()}})}}const o=this.properties;this.properties=Ib(()=>r,()=>o)}get encoding(){return Sl(this,"encoding",()=>{var s;const e=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=a=>{const c=this.properties[a];return CT(c)||qt(c)?{value:c}:void 0},o=Object.fromEntries(this.getSupportedChannels().map(a=>[a,r(a)]).filter(a=>fn(a[1]))),i=this.fixEncoding({...e,...o,...n});for(const a of Object.keys(i))this.getSupportedChannels().includes(a)||delete i[a];return i.x&&((s=i.x).buildIndex??(s.buildIndex=!0)),i})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=FI(this.unitView,this.encoding)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return Tb;if(this.unitView.getLayoutAncestors().find(e=>"samples"in e.spec))return IT}createAndLinkShaders(e,n,r=[]){const o=this.getAttributes(),i=this.encoders,s=this.getSampleFacetMode();s&&r.push(`#define ${s}`);const a="// view: "+this.unitView.getPathString();let c=[];const l=new Set,u=xb(i),f=[],d=Object.values(i).flatMap(I=>I.accessors).map(I=>I.predicate).filter(I=>I.param),h=new Map;for(const I of d){const _=I.param,B=this.unitView.paramMediator,N=B.findValue(_);if(!N)throw new Error(`Cannot infer selection type as the parameter "${_}" has no value. Please ensure that the parameter is properly defined!`);const M=fo+"uniqueId";if(K1(N)){if(!h.has(_)){h.set(_,"single");const F=Al+ra(_);f.push(" // Selection parameter"),f.push(` uniform highp uint ${F};`),W(this,Tn).push(()=>{this.registerMarkUniformValue(F,{expr:_},C=>C.uniqueId??0)}),c.push(`bool ${la}${_}(bool empty) {
|
|
363
|
+
return ${Al}${_} == ${M} || (empty && ${Al}${_} == 0u);
|
|
364
|
+
}`)}}else if(Ah(N)){if(!h.has(_)){h.set(_,"multi");const F=Db+ra(_);c.push(`// Selection texture
|
|
365
|
+
uniform highp usampler2D ${F};`);const C=this.getContext().glHelper,Y=C.selectionTextures;this.selectionTextureOps.push(()=>{const oe=B.getValue(_),ae=Y.get(oe);if(!ae)throw new Error(`Bug: no selection texture found for "${_}"!`);oi(this.programInfo,{[F]:ae})});const Q=Db+_;c.push(`bool ${la}${_}(bool empty) {
|
|
366
|
+
return binarySearchTexture(${Q}, ${M}) || (empty && isEmptyBinarySearchTexture(${Q}));
|
|
367
|
+
}`),C.createSelectionTexture(N);const se=B.createExpression(_);se.addListener(()=>{const oe=se(null);C.createSelectionTexture(oe),this.getContext().animator.requestRender()})}}else if(X1(N)&&!h.has(_)){h.set(_,"interval");const F=[],C=[];for(const Y of Object.keys(N.intervals)){if(!["x","y"].includes(Y))continue;const Q=Al+ra(_)+`_${Y}`,{attributeType:se}=ho(this.unitView.getScaleResolution(Y).scale,Y);f.push(" // Selection parameter"),f.push(` uniform highp ${se}[2] ${Q};`),W(this,Tn).push(()=>{this.registerMarkUniformValue(Q,{expr:_},he=>he.intervals[Y]??[1/0,-1/0])});const oe=fo+Y,ae=Q+"[0]",ce=Q+"[1]",ye=cb(Y);if(this.encoding[ye]){const he=fo+ye,De=this.defaultHitTestMode;if(De=="endpoints")F.push(`((${ae} <= ${oe} && ${oe} <= ${ce}) || (${ae} <= ${he} && ${he} <= ${ce}))`);else if(De=="encloses")F.push(`(${ae} <= ${oe} && ${he} <= ${ce})`);else if(De=="intersects")F.push(`(${ae} <= ${he} && ${oe} <= ${ce})`);else throw new Fr(`Unsupported hit test mode "${De}" for interval selection!`,this.unitView)}else F.push(`(${ae} <= ${oe} && ${oe} <= ${ce})`);C.push(`${ae} > ${ce}`)}c.push(`bool ${la}${_}(bool empty) {
|
|
368
|
+
return ${F.join(" && ")} || (empty && (${C.join(" || ")}));
|
|
369
|
+
}`)}}const p=(I,_,B,N)=>{const M=_.channelDef;if(fn(M))if(qt(M.value)){const{uniformName:F,uniformGlsl:C,accessorGlsl:Y,adjuster:Q}=eT(I,B);c.push(Y),f.push(C),W(this,Tn).push(()=>{this.registerMarkUniformValue(F,M.value,Q)})}else c.push($I(I,B,M.value).accessorGlsl);else if(ia(M)){const{uniformName:F,uniformGlsl:C,accessorGlsl:Y}=tT(I,N,B);f.push(C),c.push(Y);const{largeHp:Q,discrete:se}=ho(N,I),oe=se&&"domain"in N?ae=>N.domain().indexOf(ae):Q?wb:ae=>+ae;W(this,Tn).push(()=>{this.registerMarkUniformValue(F,M.datum,oe)})}else if(_r(M)){const F=u.get([M.field,!0]),{attributeGlsl:C,accessorGlsl:Y}=db(I,N,B,F!=null&&F.includes(I)?F:void 0);l.add(C),c.push(Y)}else if(oa(M)){const{attributeGlsl:F,accessorGlsl:C}=db(I,N,B);l.add(F),c.push(C)}else throw new Fr(`Unsupported channel definition: ${JSON.stringify(M)}`,this.unitView)};for(const[I,_]of Object.entries(i)){if(!o.includes(I))continue;const{channelDef:B,accessors:N,scale:M}=_;for(let F=0;F<N.length;F++)p(I,N[F],F,M);if(M){const F=en(B)&&B.resolutionChannel||I,C=aa(F)?this.unitView.getScaleResolution(F):null,{glsl:Y,domainUniform:Q,domainUniformName:se,rangeUniform:oe,rangeUniformName:ae}=nT(I,M,B);c.push(Y),f.push(Q),f.push(oe),oe&&W(this,Tn).push(()=>{const ce=this.createMarkUniformSetter(ae),ye=()=>ce(vb(M,I));C.addEventListener("range",ye),ye()}),Q&&W(this,Tn).push(()=>{const ce=this.createMarkUniformSetter(se),ye=()=>{const he=Dr(M.type)?[0,M.domain().length]:M.domain();ce(yb(M.type)?cT(he):he)};C.addEventListener("domain",ye),ye()})}c.push(rT(I,N))}const b=[...h.keys()].map(I=>`${la}${I}(false)`);c.push(`bool isPointSelected() {
|
|
370
|
+
`+(this.encoders.uniqueId&&b.length>0?` return ${b.join(" || ")};`:" return false;")+`
|
|
346
371
|
}`);const v=`precision highp float;
|
|
347
|
-
precision highp int;`,
|
|
348
|
-
`));r=r.map(
|
|
349
|
-
`),...c,YI,ZI,e],C=[v,a,...r,ib,XI,n],E=this.gl;this.programStatus=rT(E,this.glHelper.compileShader(E.VERTEX_SHADER,A),this.glHelper.compileShader(E.FRAGMENT_SHADER,C))}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=NC(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=Ng(this.gl,this.programInfo,"View"),this.markUniformInfo=Ng(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),ti(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of X(this,Gn))n();Pe(this,Gn,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}${qt(n)?`Expr: ${n.expr}`:""}`);o(s)};if(qt(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&&XE(this.gl,this.bufferInfo.attribs[n],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=$E(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?(zg(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):Og(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(e){const n=this.glHelper,r=this.gl,o=[];o.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=r6(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[s,a]of Object.entries(this.encoding))if(Jt(a)){const c=Jt(a)&&a.resolutionChannel||s;if(Qs(c)){const l=this.unitView.getScaleResolution(c),u=n.rangeTextures.get(l);u&&o.push(()=>ti(this.programInfo,{[fh+s]:u}))}}o.push(...this.selectionTextureOps),this.getSampleFacetMode()==lb&&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.");ti(this.programInfo,{uSampleFacetTexture:s})});const i=(e.picking??!1)&&this.isPickingParticipant();return o.push(()=>Is(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&&Bt(i.type),a=["index","locus"].includes(i==null?void 0:i.type)?-1:0,c=[0,0];o=h=>{if(s&&h.xIndex){const d=i.domain(),p=h.xIndex(d[0]+a,d[1],c),y=p[0],v=p[1]-y;v>0&&e(y,v)}else e(h.offset,h.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){e=e.flatten();const r=this.unitView.context.devicePixelRatio,o=this.gl,i=this.properties,s=this.glHelper.getLogicalCanvasSize(),a=.5,c=(i.xOffset??0)+a,l=(i.yOffset??0)+a;let u,f=e;if(i.clip!=="never"&&(i.clip||n)){let h=0,d=0,p;if(n){if(f=e.intersect(n).flatten(),!f.isDefined())return!1;p=[e.width/f.width,e.height/f.height],d=Math.max(0,e.y2-n.y2),h=Math.min(0,e.x-n.x)}else p=[1,1];const y=[f.x,s.height-f.y2,f.width,f.height].map(C=>C*r),v=y.map(C=>Math.floor(C)),b=y[0]-v[0],A=y[1]-v[1];o.viewport(...v),o.scissor(...v),o.enable(o.SCISSOR_TEST),u={uViewOffset:[(c+h+b/r)/f.width,-(l+d-A/r)/f.height],uViewScale:p}}else{if(!e.isDefined())return!1;o.viewport(0,0,s.width*r,s.height*r),o.disable(o.SCISSOR_TEST),u={uViewOffset:[(e.x+c)/s.width,(s.height-e.y-l-e.height)/s.height],uViewScale:[e.width/s.width,e.height/s.height]}}return Is(this.viewUniformInfo,{...u,uViewportSize:[e.width,e.height],uDevicePixelRatio:r}),zg(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(e,n){}}Gn=new WeakMap;class sT extends Vn{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 yh(t,e){const n=yI(e);let r=t[e]&&{...t[e]},o=t[n]&&{...t[n]};if(!(ln(r)||ln(o))){if(r){if(!Jt(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 fb(t,e){t.stroke||(e?t.stroke={value:null}:t.stroke={resolutionChannel:"color",...t.color}),ln(t.stroke)&&t.stroke.value===null&&(t.strokeWidth={value:0}),t.strokeOpacity||(t.strokeOpacity={resolutionChannel:"opacity",...t.opacity})}function hb(t,e){ln(t.fill)&&t.fill.value===null?t.fillOpacity={value:0}:t.fill||(t.fill={resolutionChannel:"color",...t.color},!e&&!t.fillOpacity&&(t.fillOpacity={value:0})),t.fillOpacity||(e?t.fillOpacity={resolutionChannel:"opacity",...t.opacity}:t.fillOpacity={value:0})}class aT extends ea{constructor(n){super(n);ve(this,Nr);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 hl(this,"opaque",()=>!he(this,Nr,$d).call(this)&&!he(this,Nr,e0).call(this)&&ln(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return yh(n,"x"),yh(n,"y"),fb(n,this.properties.filled),hb(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];he(this,Nr,$d).call(this)&&n.push("ROUNDED_CORNERS"),he(this,Nr,e0).call(this)&&n.push("STROKED"),this.createAndLinkShaders(c6,l6,[u6,...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)}updateGraphicsData(){const n=this.unitView.getCollector();if(!n){console.debug("No collector");return}const r=n.getItemCount(),o=new HI({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(()=>ni(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((o,i)=>{Lc(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,i,o)},n)}findDatumAt(n,r){n=Wt(n);const o=this.unitView.getCollector().facetBatches.get(n);if(!o)return;const i=this.encoders,s=i.x.scale.type;if(Tr(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))}}}Nr=new WeakSet,$d=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},e0=function(){const n=this.encoding.strokeWidth;return!(ln(n)&&!n.value)||"condition"in n};const cT=`out float vRadius;out float vRadiusWithPadding;out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out lowp float vShape;out lowp float vHalfStrokeWidth;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(){
|
|
372
|
+
precision highp int;`,y=I=>I.replace("#pragma markUniforms",f.join(`
|
|
373
|
+
`));r=r.map(y),e=y(e),n=y(n);const A=[v,a,...r,Sb,xT,[...l].join(`
|
|
374
|
+
`),...c,vT,AT,e],S=[v,a,...r,Sb,ET,n],E=this.gl;this.programStatus=VI(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=o6(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=Kg(this.gl,this.programInfo,"View"),this.markUniformInfo=Kg(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),oi(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of W(this,Tn))n();Te(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}${qt(n)?`Expr: ${n.expr}`:""}`);o(s)};if(qt(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&&yS(this.gl,this.bufferInfo.attribs[n],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=vS(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?($g(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):Jg(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(e){const n=this.glHelper,r=this.gl,o=[];o.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=C6(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[s,a]of Object.entries(this.encoding))if(en(a)){const c=en(a)&&a.resolutionChannel||s;if(aa(c)){const l=this.unitView.getScaleResolution(c),u=n.rangeTextures.get(l);u&&o.push(()=>oi(this.programInfo,{[Dh+s]:u}))}}o.push(...this.selectionTextureOps),this.getSampleFacetMode()==Tb&&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.");oi(this.programInfo,{uSampleFacetTexture:s})});const i=(e.picking??!1)&&this.isPickingParticipant();return o.push(()=>zs(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&&kt(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),b=p[0],v=p[1]-b;v>0&&e(b,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){e=e.flatten();const r=this.unitView.context.devicePixelRatio,o=this.gl,i=this.properties,s=this.glHelper.getLogicalCanvasSize(),a=.5,c=(i.xOffset??0)+a,l=(i.yOffset??0)+a;let u,f=e;if(i.clip!=="never"&&(i.clip||n)){let d=0,h=0,p;if(n){if(f=e.intersect(n).flatten(),!f.isDefined())return!1;p=[e.width/f.width,e.height/f.height],h=Math.max(0,e.y2-n.y2),d=Math.min(0,e.x-n.x)}else p=[1,1];const b=[f.x,s.height-f.y2,f.width,f.height].map(S=>S*r),v=b.map(S=>Math.floor(S)),y=b[0]-v[0],A=b[1]-v[1];o.viewport(...v),o.scissor(...v),o.enable(o.SCISSOR_TEST),u={uViewOffset:[(c+d+y/r)/f.width,-(l+h-A/r)/f.height],uViewScale:p}}else{if(!e.isDefined())return!1;o.viewport(0,0,s.width*r,s.height*r),o.disable(o.SCISSOR_TEST),u={uViewOffset:[(e.x+c)/s.width,(s.height-e.y-l-e.height)/s.height],uViewScale:[e.width/s.width,e.height/s.height]}}return zs(this.viewUniformInfo,{...u,uViewportSize:[e.width,e.height],uDevicePixelRatio:r}),$g(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(e,n){}}Tn=new WeakMap;class TT extends jn{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 Fh(t,e){const n=cb(e);let r=t[e]&&{...t[e]},o=t[n]&&{...t[n]};if(!(fn(r)||fn(o))){if(r){if(!en(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 Bb(t,e){t.stroke||(e?t.stroke={value:null}:t.stroke={resolutionChannel:"color",...t.color}),fn(t.stroke)&&t.stroke.value===null&&(t.strokeWidth={value:0}),t.strokeOpacity||(t.strokeOpacity={resolutionChannel:"opacity",...t.opacity})}function kb(t,e){fn(t.fill)&&t.fill.value===null?t.fillOpacity={value:0}:t.fill||(t.fill={resolutionChannel:"color",...t.color},!e&&!t.fillOpacity&&(t.fillOpacity={value:0})),t.fillOpacity||(e?t.fillOpacity={resolutionChannel:"opacity",...t.opacity}:t.fillOpacity={value:0})}const DT=["none","diagonal","antiDiagonal","cross","vertical","horizontal","grid","dots","rings","ringsLarge"];class BT extends pa{constructor(n){super(n);ge(this,Ur);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 Sl(this,"opaque",()=>!de(this,Ur,p0).call(this)&&!de(this,Ur,g0).call(this)&&!this.properties.shadowOpacity&&fn(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return Fh(n,"x"),Fh(n,"y"),Bb(n,this.properties.filled),kb(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];de(this,Ur,p0).call(this)&&n.push("ROUNDED_CORNERS"),de(this,Ur,g0).call(this)&&n.push("STROKED"),this.properties.shadowOpacity&&n.push("SHADOW"),this.createAndLinkShaders(k6,_6,[R6,...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,DT.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",Th)}updateGraphicsData(){const n=this.unitView.getCollector();if(!n){console.debug("No collector");return}const r=n.getItemCount(),o=new gT({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(()=>si(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((o,i)=>{Zc(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,i,o)},n)}findDatumAt(n,r){n=Yt(n);const o=this.unitView.getCollector().facetBatches.get(n);if(!o)return;const i=this.encoders,s=i.x.scale.type;if(Dr(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))}}}Ur=new WeakSet,p0=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},g0=function(){const n=this.encoding.strokeWidth;return!(fn(n)&&!n.value)||"condition"in n};const kT=`out float vRadius;out float vRadiusWithPadding;out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out lowp float vShape;out lowp float vHalfStrokeWidth;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(){
|
|
350
375
|
#if defined(dx_DEFINED) || defined(dy_DEFINED)
|
|
351
376
|
return vec2(getScaled_dx(),getScaled_dy())/uViewportSize;
|
|
352
377
|
#else
|
|
353
378
|
return vec2(0.0,0.0);
|
|
354
379
|
#endif
|
|
355
|
-
}void main(void){float shapeAngle=0.0;float semanticThresholdFactor=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();}`,
|
|
380
|
+
}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();}`,_T="const lowp vec4 white=vec4(1.0);const lowp vec4 black=vec4(0.0,0.0,0.0,1.0);in float vRadius;in float vRadiusWithPadding;in lowp vec4 vFillColor;in lowp vec4 vStrokeColor;in lowp float vShape;in lowp float vHalfStrokeWidth;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;}}",RT=`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;
|
|
356
381
|
#pragma markUniforms
|
|
357
|
-
};`;class
|
|
382
|
+
};`;class _b extends wt{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 FT(t,e,n){const r=new _b({type:"sample",size:t});for(const o of e)r.handle(n(o));return r.complete(),r.reservoir}const MT={};class PT extends pa{constructor(n){super(n);ge(this,au);ge(this,Uo,()=>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(qt(r)){const o=this.unitView.paramMediator.createExpression(r.expr);o.addListener(()=>this.getContext().animator.requestRender()),Te(this,Uo,o)}else Te(this,Uo,()=>r)}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(),...MT}}fixEncoding(n){return Bb(n,this.properties.filled),kb(n,this.properties.filled),delete n.color,delete n.opacity,n}initializeData(){var r,o;super.initializeData();const n=(o=(r=this.encoders.semanticScore)==null?void 0:r.dataAccessor)==null?void 0:o.asNumberAccessor();n&&(this.sampledSemanticScores=Float32Array.from(FT(1e4,this.unitView.getCollector().getData(),n)),this.sampledSemanticScores.sort((i,s)=>i-s))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(kT,_T,[RT])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const n=this.properties;this.registerMarkUniformValue("uInwardStroke",n.inwardStroke,r=>!!r),this.registerMarkUniformValue("uGradientStrength",n.fillGradientStrength),this.registerMarkUniformValue("uMinPickingSize",n.minPickingSize)}updateGraphicsData(){const n=this.unitView.getCollector();if(!n){console.debug("No collector");return}const r=n.getItemCount(),o=new bT({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(r,this.properties.minBufferSize||0)});o.addBatches(n.facetBatches);const i=o.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.updateBufferInfo(i)}getSemanticThreshold(){if(this.sampledSemanticScores){const n=Math.max(0,1-W(this,Uo).call(this)*this.unitView.getZoomLevel());if(n<=0)return-1/0;if(n>=1)return 1/0;{const r=this.sampledSemanticScores;return pp(r,n)}}else return-1}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>{zs(this.markUniformInfo,{uScaleFactor:de(this,au,fv).call(this),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>si(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((o,i)=>{i&&Zc(r,this.vertexArrayInfo,r.POINTS,i,o)},n)}}Uo=new WeakMap,au=new WeakSet,fv=function(){const n=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/n),1/3)};const LT="const int BUTT=0;const int SQUARE=1;const int ROUND=2;in float pos;in float side;out vec4 vColor;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();}",OT="const int BUTT=0;const int SQUARE=1;const int ROUND=2;uniform sampler2D uDashTexture;in vec4 vColor;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;}}",NT=`layout(std140)uniform Mark{uniform mediump float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;uniform mediump float uStrokeDashOffset;
|
|
358
383
|
#pragma markUniforms
|
|
359
|
-
};`;class
|
|
384
|
+
};`;class zT extends pa{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&&en(e.y)&&e.y.type=="quantitative")e.x2=e.x,e.y2={datum:0};else if(!e.y2&&en(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,n=UT(this.properties.strokeDash);this.dashTexture=Ns(e,{level:0,mag:e.NEAREST,min:e.NEAREST,internalFormat:e.R8,format:e.RED,src:n,height:1}),this.dashTextureSize=n.length,this.createAndLinkShaders(LT,OT,[NT])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties;this.registerMarkUniformValue("uMinLength",e.minLength),this.registerMarkUniformValue("uStrokeCap",e.strokeCap??"butt",n=>["butt","square","round"].indexOf(n)),zs(this.markUniformInfo,{uDashTextureSize:+this.dashTextureSize}),this.markUniformsAltered=!0}updateGraphicsData(){const e=this.unitView.getCollector();if(!e){console.debug("No collector");return}const n=e.getItemCount(),r=new mT({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(n,this.properties.minBufferSize||0)});r.addBatches(e.facetBatches);const o=r.toArrays();this.rangeMap.migrateEntries(o.rangeMap),this.updateBufferInfo(o)}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>oi(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>si(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((r,o)=>Zc(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,o,r),e)}}function UT(t){if(!t)return new Uint8Array(0);if(t.length==0||t.length%2||t.findIndex(i=>Math.round(i)!=i||i<1||i>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(t));const e=t.reduce((i,s)=>i+s),n=new Uint8Array(e);let r=!0,o=0;for(let i of t){for(;i;)n[o++]=r&&255||0,i--;r=!r}return n}const GT="out vec4 vColor;out float vSize;out float vNormalLengthInPixels;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();}",HT="in vec4 vColor;in float vSize;in float vNormalLengthInPixels;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;}}",VT=`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;
|
|
360
385
|
#pragma markUniforms
|
|
361
|
-
};`,
|
|
386
|
+
};`,qT=["arc","dome","diagonal","line"],jT=["vertical","horizontal"];class WT extends pa{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||(en(e.x)?e.x2={datum:0}:e.x2=e.x),e.y2||(en(e.y)?e.y2={datum:0}:e.y2=e.y),e}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(GT,HT,[VT])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties;this.registerMarkUniformValue("uArcFadingDistance",e.arcFadingDistance,n=>n||[0,0]),this.registerMarkUniformValue("uArcHeightFactor",e.arcHeightFactor),this.registerMarkUniformValue("uMinArcHeight",e.minArcHeight),this.registerMarkUniformValue("uMinPickingSize",e.minPickingSize),this.registerMarkUniformValue("uShape",e.linkShape,n=>qT.indexOf(n)),this.registerMarkUniformValue("uOrient",e.orient,n=>jT.indexOf(n)),this.registerMarkUniformValue("uClampApex",e.clampApex,n=>!!n),this.registerMarkUniformValue("uMaxChordLength",e.maxChordLength),this.registerMarkUniformValue("uSegmentBreaks",e.segments,n=>n),this.registerMarkUniformValue("uNoFadingOnPointSelection",e.noFadingOnPointSelection,n=>!!n)}updateGraphicsData(){const e=this.unitView.getCollector();if(!e){console.debug("No collector");return}const n=e.getItemCount(),r=new yT({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});r.addBatches(e.facetBatches);const o=r.toArrays();this.rangeMap.migrateEntries(o.rangeMap),this.arrays=Object.fromEntries(Object.entries(o.arrays).map(([i,s])=>[i,{...s,data:void 0}])),this.updateBufferInfo(o)}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>this.bindOrSetMarkUniformBlock()),this._baseInstanceExt?n.push(()=>si(this.gl,this.programInfo,this.vertexArrayInfo)):n.push(()=>this.gl.bindVertexArray(null)),n}render(e){const n=this.gl,r=()=>(this.markUniformInfo.uniforms.uSegmentBreaks[0]+1)*2;return this._baseInstanceExt?this.createRenderCallback((o,i)=>{this._baseInstanceExt.drawArraysInstancedBaseInstanceWEBGL(n.TRIANGLE_STRIP,0,r(),i,o)},e):this.createRenderCallback((o,i)=>{for(const s of Object.entries(this.bufferInfo.attribs)){const[a,c]=s;c.buffer&&c.numComponents&&c.divisor&&(c.offset=o*this.arrays[a].numComponents*this.bytesPerElement.get(a))}si(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,r(),i)},e)}}const YT=`in mediump vec2 vertexCoord;in lowp vec2 textureCoord;in float width;out vec2 vTexCoord;out vec4 vColor;out float vSlope;out float vEdgeFadeOpacity;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);
|
|
362
387
|
#if defined(x2_DEFINED) || defined(y2_DEFINED)
|
|
363
388
|
ivec2 align=fixAlignForAngle(uAlign,angleInDegrees);
|
|
364
389
|
#else
|
|
@@ -371,9 +396,9 @@ vec2 pos=applySampleFacet(vec2(x,y));
|
|
|
371
396
|
#ifdef y2_DEFINED
|
|
372
397
|
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;}
|
|
373
398
|
#endif
|
|
374
|
-
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);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();}`,
|
|
399
|
+
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);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();}`,QT="uniform sampler2D uTexture;in vec2 vTexCoord;in float vEdgeFadeOpacity;in vec4 vColor;in float vSlope;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));}void main(){vec3 c=texture(uTexture,vTexCoord).rgb;float sigDist=1.0-median(c.r,c.g,c.b);float slope=uLogoLetter? 0.7/length(vec2(dFdy(sigDist),dFdx(sigDist))): vSlope;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;}}",ZT=`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;
|
|
375
400
|
#pragma markUniforms
|
|
376
|
-
};`,
|
|
401
|
+
};`,XT={left:-1,center:0,right:1},KT={top:-1,middle:0,bottom:1,alphabetic:1};class JT extends pa{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 n of uo)this.properties.fitToBand&&Fh(e,n);return e}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(YT,QT,[ZT])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties;this.registerMarkUniformValue("uSdfNumerator",{expr:"devicePixelRatio"},n=>{let r=.35;return this.properties.logoLetters&&(r/=2),this.font.metrics.common.base/(n/r)}),this.registerMarkUniformValue("uPaddingX",e.paddingX),this.registerMarkUniformValue("uPaddingY",e.paddingY),this.registerMarkUniformValue("uFlushX",e.flushX,n=>!!n),this.registerMarkUniformValue("uFlushY",e.flushY,n=>!!n),this.registerMarkUniformValue("uSqueeze",e.squeeze,n=>!!n),zs(this.markUniformInfo,{uAlign:[XT[e.align],KT[e.baseline]],uD:[e.dx,-e.dy],uLogoLetter:!!e.logoLetters,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 n=e.getData(),r=this.encoding,o=this.encoders.text;let i=0;const s="format"in r.text?Bt(r.text.format):l=>l;for(const l of n){const u=s(o(l)),f=nt(u)?u:u===null?"":""+u;i+=f&&f.length||0}const a=new wT({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(i,this.properties.minBufferSize||1024)});a.addBatches(e.facetBatches);const c=a.toArrays();this.rangeMap.migrateEntries(c.rangeMap),this.updateBufferInfo(c)}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>{oi(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>si(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((r,o)=>Zc(n,this.vertexArrayInfo,n.TRIANGLES,o,r),e)}}const Rb=1;function Mh(){let t=[0,1],e=[0,1],n=1,r=1,o=0,i=0,s=.5,a=0;const l=u=>(u+s-t[0])/n*r+e[0];return l.invert=u=>(u-e[0])/r*n+t[0]-s,l.domain=function(u){if(arguments.length){t=FA(u),n=t[1]-t[0];const f=t[0]===0&&t[0]===0;if(n<Rb&&!f){n=Rb;const d=(t[0]+t[1])/2;t[0]=d-n/2,t[1]=d+n/2}return l}else return t.slice()},l.range=function(u){return arguments.length?(e=[...u],r=e[1]-e[0],l):e},l.numberingOffset=function(u){return arguments.length?(a=u,l):a},l.padding=function(u){return arguments.length?(i=u,o=Math.min(1,u),l):o},l.paddingInner=function(u){return arguments.length?(o=Math.min(1,u),l):o},l.paddingOuter=function(u){return arguments.length?(i=u,l):i},l.align=function(u){return arguments.length?(s=Math.max(0,Math.min(1,u)),l):s},l.step=()=>r/n,l.bandwidth=()=>l.step(),l.ticks=u=>{const f=l.align(),d=l.numberingOffset();return gc(t[0]-f+d,t[1]-f+d,Math.min(u,Math.ceil(n))).filter(Number.isInteger).map(h=>h-a)},l.tickFormat=(u,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const h=$r(t[0],t[1],Math.min(u,Math.ceil(n)))<1e5?Bt(","):Bt(".3s");return p=>h(p+a)},l.copy=()=>Mh().domain(t).range(e).paddingInner(o).paddingOuter(i).numberingOffset(a),l}function $T(){const t=Mh().numberingOffset(1);let e;t.genome=function(r){return arguments.length?(e=r,t):e},t.ticks=r=>{if(!e)return[];const o=t.domain(),i=t.numberingOffset(),[s,a]=[Math.max(o[0],0),Math.min(o[1],e.totalSize-1)].map(u=>e.toChromosome(u)),c=Math.max(1,$r(o[0],o[1],r)),l=[];for(let u=s.index;u<=a.index;u++){const f=e.chromosomes[u],d=Math.max(f.continuousStart+c,o[0]-(o[0]-f.continuousStart)%c),h=Math.min(f.continuousEnd-c/4,o[1]+1);for(let p=d;p<=h;p+=c){const b=p-i;b>=o[0]&&b<o[1]&&l.push(b)}}return l},t.tickFormat=(r,o)=>{if(!e)return;if(o)throw new Error("Locus scale's tickFormat does not support a specifier!");const i=t.domain(),s=i[1]-i[0],a=t.numberingOffset(),l=$r(i[0],i[1],Math.min(r,Math.ceil(s)))<1e6?Bt(","):Bt(".3s"),u=f=>f-e.toChromosome(f).continuousStart;return f=>l(u(f)+a)};const n=t.copy;return t.copy=()=>n().genome(e),t}function eD(t){return t.type=="locus"}function Il(t,e,n){if(n=n||[],t.some(s=>s===null)){if(t.every(s=>s===null))return null;throw console.warn(t),new Error("Cannot merge objects with nulls!")}const r={},o=(s,a)=>s===a||po(s)&&po(a)||po(s)&&a===!0||s===!0&&Ft(a),i=s=>{for(let a in s){const c=s[a];if(!n.includes(a)&&c!==void 0)if(r[a]!==void 0&&!o(r[a],c))console.warn(`Conflicting property ${a} of ${e}: (${JSON.stringify(r[a])} and ${JSON.stringify(s[a])}). Using ${JSON.stringify(r[a])}.`);else{const l=r[a];if(po(l))po(c)&&(r[a]=Il([l,c],a));else if(po(c)){if(!(l===!0||l===void 0))throw new Error("Bug in merge! Target is: "+l);r[a]=Il([{},c],a)}else r[a]=c}}};for(const s of t)i(s);return r}function po(t){return Ft(t)&&!Array.isArray(t)}/*!
|
|
377
402
|
* Adapted from vega-encode:
|
|
378
403
|
* https://github.com/vega/vega/blob/master/packages/vega-encode/src/ticks.js
|
|
379
404
|
*
|
|
@@ -381,7 +406,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
|
|
|
381
406
|
* All rights reserved.
|
|
382
407
|
*
|
|
383
408
|
* BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
|
|
384
|
-
*/function
|
|
409
|
+
*/function Fb(t,e,n){return Gt(e)&&n!=null&&(e=Math.min(e,~~(ac(t.domain())/n)||1)),Ft(e)&&(e.step,e=e.interval),e}function Mb(t,e,n){var r=t.range(),o=Math.floor(r[0]),i=Math.ceil(wn(r));if(o>i&&(r=i,i=o,o=r),e=e.filter(function(a){return a=t(a),o<=a&&a<=i}),n>0&&e.length>1){for(var s=[e[0],wn(e)];e.length>n&&e.length>=3;)e=e.filter(function(a,c){return!(c%2)});e.length<3&&(e=s)}return e}function tD(t,e){return t.bins?Mb(t,nD(t.bins,e)):t.ticks?t.ticks(e):t.domain()}function nD(t,e){var n=t.length,r=~~(n/(e||n));return r<2?t.slice():t.filter(function(o,i){return!(i%r)})}function rD(t,e,n){var r=t.tickFormat?t.tickFormat(e,n):n?Bt(n):String;if(E1(t.type)){var o=oD(n);r=t.bins?o:iD(r,o)}return r}function iD(t,e){return function(n){return t(n)?e(n):""}}function oD(t){var e=qi(t||",");if(e.precision==null){switch(e.precision=12,e.type){case"%":e.precision-=2;break;case"e":e.precision-=1;break}return sD(Bt(e),Bt(".1f")(1)[1])}else return Bt(e)}function sD(t,e){return function(n){var r=t(n),o=r.indexOf(e),i,s;if(o<0)return r;for(i=aD(r,o),s=i<r.length?r.slice(i):"";--i>o;)if(r[i]!=="0"){++i;break}return r.slice(0,i)+s}}function aD(t,e){var n=t.lastIndexOf("e"),r;if(n>0)return n;for(n=t.length;--n>e;)if(r=t.charCodeAt(n),r>=48&&r<=57)return n+1}/*!
|
|
385
410
|
* Adapted from vega-encode:
|
|
386
411
|
* https://github.com/vega/vega/blob/master/packages/vega-encode/src/Scale.js
|
|
387
412
|
*
|
|
@@ -389,7 +414,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
|
|
|
389
414
|
* All rights reserved.
|
|
390
415
|
*
|
|
391
416
|
* BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
|
|
392
|
-
*/const
|
|
417
|
+
*/const cD="locus",lD="index";var uD=5;function fD(t){const e=t.type;return!t.bins&&(e===ao||e===js||e===Ws)}function Pb(t){return kt(t)&&![zn,lD,cD].includes(t)}function Lb(t){return t||{warn:(e,...n)=>console.warn(e,...n)}}var hD=cc(["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 Ob(t,e,n){n=Lb(n);for(const r in t)if(!hD[r]){if(r==="padding"&&Pb(e.type))continue;sn(e[r])?e[r](t[r]):n.warn("Unsupported scale property: "+r)}xD(e,t,wD(e,t,mD(e,t,n)))}function dD(t,e){const n=pD(t),r=Qe(n);if(!r)throw new Error("Unknown scale type: "+n);const o=r();return!t.domain&&kt(o.type)&&(t.domain=[0,0]),Ob(t,o,e),o}function pD(t){var e=t.type,n="",r;return e===zn?zn+"-"+ao:(gD(t)&&(r=t.rawDomain?t.rawDomain.length:t.domain?t.domain.length+ +(t.domainMid!=null):0,n=r===2?zn+"-":r===3?co+"-":""),(n+e||ao).toLowerCase())}function gD(t){const e=t.type;return kt(e)&&e!==g1&&e!==m1&&(t.scheme||t.range&&t.range.length&&t.range.every(nt))}function mD(t,e,n){if(!t.domain)return 0;n=Lb(n);var r=bD(t,e.domainRaw,n);if(r>-1)return r;var o=e.domain,i=t.type,s=e.zero||e.zero===void 0&&fD(t),a,c;return o?(Pb(i)&&e.padding&&o[0]!==wn(o)&&(o=yD(i,o,e.range,e.padding,e.exponent,e.constant)),(s||e.domainMin!=null||e.domainMax!=null||e.domainMid!=null)&&(a=(o=o.slice()).length-1||1,s&&(o[0]>0&&(o[0]=0),o[a]<0&&(o[a]=0)),e.domainMin!=null&&(o[0]=e.domainMin),e.domainMax!=null&&(o[a]=e.domainMax),e.domainMid!=null&&(c=e.domainMid,(c<o[0]||c>o[a])&&n.warn("Scale domainMid exceeds domain min or max.",c),o.splice(a,0,c))),t.domain(Nb(i,o,n)),i===sh&&t.unknown(e.domainImplicit?Tf:void 0),e.nice&&t.nice&&t.nice(e.nice!==!0&&Fb(t,e.nice)||null),o.length):0}function bD(t,e,n){return e?(t.domain(Nb(t.type,e,n)),e.length):-1}function yD(t,e,n,r,o,i){n??(n=[0,1]);var s=Math.abs(wn(n)-n[0]),a=s/(s-2*r),c=t===Tr?L0(e,null,a):t===Ws?bu(e,null,a,.5):t===js?bu(e,null,a,o||1):t===ll?Pv(e,null,a,i||1):P0(e,null,a);return e=e.slice(),e[0]=c[0],e[e.length-1]=c[1],e}function Nb(t,e,n){if(E1(t)){var r=Math.abs(e.reduce(function(o,i){return o+(i<0?-1:i>0?1:0)},0));r!==e.length&&n.warn("Log scale domain includes zero: "+wu(e))}return e}function wD(t,e,n){let r=e.bins;if(r&&!Dt(r)){const o=(r.start==null||r.stop==null)&&t.domain(),i=r.start==null?o[0]:r.start,s=r.stop==null?wn(o):r.stop,a=r.step;a||mt("Scale bins parameter missing step property."),r=gs(i,s+a,a)}return r?t.bins=r:t.bins&&delete t.bins,t.type===ch&&(r?!e.domain&&!e.domainRaw&&(t.domain(r),n=r.length):t.bins=t.domain()),n}function xD(t,e,n){var r=t.type,o=e.round||!1,i=e.range;if(e.rangeStep!=null)i=vD(r,e,n);else if(e.scheme&&(i=AD(r,e,n),sn(i))){if(t.interpolator)return t.interpolator(i);mt(`Scale type ${r} does not support interpolating color schemes.`)}if(i&&fl(r))return t.interpolator(hl(Ph(i,e.reverse),e.interpolate,e.interpolateGamma));i&&e.interpolate&&t.interpolate?t.interpolate(S1(e.interpolate,e.interpolateGamma)):sn(t.round)?t.round(o):sn(t.rangeRound)&&t.interpolate(o?Vs:Cr),i&&t.range(Ph(i,e.reverse))}function vD(t,e,n){t!==w1&&t!==ah&&mt("Only band and point scales support rangeStep.");var r=(e.paddingOuter!=null?e.paddingOuter:e.padding)||0,o=t===ah?1:(e.paddingInner!=null?e.paddingInner:e.padding)||0;return[0,e.rangeStep*ih(n,o,r)]}function AD(t,e,n){var r=e.schemeExtent,o,i;return Dt(e.scheme)?i=hl(e.scheme,e.interpolate,e.interpolateGamma):(o=e.scheme.toLowerCase(),i=uh(o),i||mt(`Unrecognized scheme name: ${e.scheme}`)),n=t===y1?n+1:t===ch?n-1:t===oh||t===b1?+e.schemeCount||uD:n,fl(t)?zb(i,r,e.reverse):sn(i)?i5(zb(i,r),n):t===sh?i:i.slice(0,n)}function zb(t,e,n){return sn(t)&&(e||n)?r5(t,Ph(e||[0,1],n)):t}function Ph(t,e){return e?t.slice().reverse():t}const Ub=Bt(",d");function ED(t,e){return t.chrom+":"+Ub(Math.floor(t.pos+1))+"-"+(t.chrom!=e.chrom?e.chrom+":":"")+Ub(Math.ceil(e.pos))}const Gb={dm6:`chr3R 32079331
|
|
393
418
|
chr3L 28110227
|
|
394
419
|
chr2R 25286936
|
|
395
420
|
chrX 23542271
|
|
@@ -510,44 +535,44 @@ chr18 90702639
|
|
|
510
535
|
chr19 61431566
|
|
511
536
|
chrX 171031299
|
|
512
537
|
chrY 91744698
|
|
513
|
-
chrM 16299`};function
|
|
514
|
-
`).map(e=>{const n=e.split(" ");return{name:n[0],size:parseInt(n[1])}})}const rD=/^([A-Za-z]+:)?\/\//;function ta(t,e){if(e&&rD.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 Sb(n)+e}function Sb(t){const e=t.replace(/[^/]*$/,"");return e===""?void 0:e.endsWith("://")?t+"/":e}class iD{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(!vh(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,Ib(this.config))this.setChromSizes(this.config.contigs);else if(!Ah(this.config)){const n=nD(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(Ah(this.config))try{const n=ta(e,this.config.url),r=await fetch(n);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);this.setChromSizes(oD(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=dr(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 tD(...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 oD(t){return Kv(t).map(([e,n])=>({name:e,size:parseInt(n)}))}function Cb(t){return Rt(t)&&"chrom"in t}function sD(t){return t.every(Cb)}function vh(t){return Rt(t)&&("name"in t||Ah(t)||Ib(t))}function Ah(t){return vh(t)&&"url"in t}function Ib(t){return vh(t)&&"contigs"in t}class na extends Array{constructor(){super(),this.type=void 0}extend(e){return this}extendAll(e){if(e instanceof na&&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 Eh extends na{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 Tb extends na{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 Db extends Tb{constructor(){super(),this.type="nominal"}}class aD extends na{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 Bb={quantitative:Eh,index:Eh,locus:Eh,nominal:Db,ordinal:Tb};function _b(t,e){if(t=="quantitative"&&cD(e)){const n=new aD(e);return n.type=t,n}else if(Bb[t]){const n=new Bb[t];return n.type=t,e&&n.extendAll(e),n}throw new Error("Unknown type: "+t)}function cD(t){return t&&t.length>0&&t.length!=2&&t.every(e=>typeof e=="number")}function lD(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function uD(t,e,n){return t*Math.pow(e/t,n)}Ye("index",wh,["continuous"]),Ye("locus",kT,["continuous"]),Ye("null",uh,[]);const kb="quantitative",Rb="ordinal",Fb="nominal",Mb="locus",fD="index";class hD{constructor(e){ve(this,Fe);ve(this,rr);ve(this,_o,{domain:new Set,range:new Set});ve(this,en);ve(this,Sa,new Set);this.channel=e,this.members=[],this.type=null,this.name=void 0}addEventListener(e,n){X(this,_o)[e].add(n)}removeEventListener(e,n){X(this,_o)[e].delete(n)}addMember(e){var s;const{channel:n,channelDef:r}=e;if(n!="sample"&&!r.type&&!lh(n))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 o=n=="sample"?"nominal":r.type,i=(s=r==null?void 0:r.scale)==null?void 0:s.name;if(i){if(this.name!==void 0&&i!=this.name)throw new Error(`Shared scales have conflicting names: "${i}" vs. "${this.name}"!`);this.name=i}if(!this.type)this.type=o;else if(o!==this.type&&!lh(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${o}. 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=X(this,en);if(!e||e.type=="null")return;const n=he(this,Fe,Qx).call(this),r=e.domain(),o=he(this,Fe,i0).call(this,!0);if(wb({...o,range:void 0},e),e.props=o,he(this,Fe,o0).call(this),Bt(e.type)&&Pe(this,rr,he(this,Fe,a0).call(this)),!n){he(this,Fe,ur).call(this,"domain");return}const i=e.domain();gc(i,r)||(this.isZoomable()?e.domain(r):he(this,Fe,ki).call(this)?(e.domain(r),this.zoomTo(i,500)):he(this,Fe,ur).call(this,"domain"))}get scale(){if(X(this,en))return X(this,en);const e=he(this,Fe,i0).call(this),n=jT({...e,range:void 0});n.props=e,"unknown"in n&&n.unknown(null),Pe(this,en,n),he(this,Fe,o0).call(this),RT(n)&&n.genome(this.getGenome()),Bt(n.type)&&Pe(this,rr,he(this,Fe,a0).call(this));const r=n.range;if(r){const o=()=>he(this,Fe,ur).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 he(this,Fe,ki).call(this)&&gc(he(this,Fe,Jl).call(this),this.getDomain())}isZoomable(){return he(this,Fe,ki).call(this)&&!!this.scale.props.zoom}zoom(e,n,r){if(!he(this,Fe,ki).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=uv(s,r||0),s=x0(s,a,e);break;case"log":s=fv(s,r||0),s=v0(s,a,e);break;case"pow":case"sqrt":{const c=o;s=hv(s,r||0,c.exponent()),s=ru(s,a,e,c.exponent());break}default:throw new Error("Zooming is not implemented for: "+o.type)}return X(this,rr)&&(s=pv(s,X(this,rr)[0],X(this,rr)[1])),[0,1].some(c=>s[c]!=i[c])?(o.domain(s),he(this,Fe,ur).call(this,"domain"),!0):!1}async zoomTo(e,n=!1){if(jo(n)&&(n=n?700:0),!he(this,Fe,ki).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(e),o=X(this,Fe,n0).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],h=s[1]==r[1];await o.transition({duration:n,easingFunction:lD,onUpdate:d=>{const p=uD(a,c,d),y=a==c?d:(a-p)/(a-c),v=y*u+(1-y)*l,b=[f?s[0]:v-p/2,h?s[1]:v+p/2];i.domain(b),he(this,Fe,ur).call(this,"domain")}}),i.domain(r),he(this,Fe,ur).call(this,"domain")}else i.domain(r),o==null||o.requestRender(),he(this,Fe,ur).call(this,"domain")}resetZoom(){if(!he(this,Fe,ki).call(this))throw new Error("Not a zoomable scale!");const e=this.getDomain(),n=he(this,Fe,Jl).call(this);return[0,1].some(r=>n[r]!=e[r])?(X(this,en).domain(n),he(this,Fe,ur).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?Ya(X(this,rr))/Ya(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=X(this,Fe,n0).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 Cb(e)?this.getGenome().toContinuous(e.chrom,e.pos):e}fromComplexInterval(e){return this.type==="locus"&&sD(e)?this.getGenome().toContinuousInterval(e):e}}rr=new WeakMap,_o=new WeakMap,en=new WeakMap,Sa=new WeakMap,Fe=new WeakSet,t0=function(){return this.members[0].view},n0=function(){return X(this,Fe,t0).context},ur=function(e){for(const n of X(this,_o)[e].values())n({type:e,scaleResolution:this})},r0=function(){return!!he(this,Fe,s0).call(this)},Qx=function(){const e=X(this,en);if(!e)return!1;const n=e.domain();return Bt(e.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},Yx=function(){const e=this.members.map(n=>n.channelDef.scale).filter(n=>n!==void 0);return pl(e,"scale",["domain"])},i0=function(e=!1){const n=he(this,Fe,Yx).call(this);if(n===null||n.type=="null")return{type:"null"};const r={...he(this,Fe,Zx).call(this,this.type),...n};r.type||(r.type=dD(this.channel,this.type));const o=he(this,Fe,Jl).call(this,e);return o&&o.length>0?r.domain=o:Tr(r.type)&&(r.domain=new Db),!r.domain&&r.domainMid!==void 0&&(r.domain=[r.domainMin??0,r.domainMax??1]),this.channel=="y"&&Tr(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),pD(r,this.channel),r},o0=function(){const e=X(this,en).props,n=e.range;if(X(this,Sa).forEach(o=>o.invalidate()),!n||!Dt(n))return;const r=(o,i)=>i?o.slice().reverse():o;if(n.some(qt)){let o;const i=()=>{X(this,en).range(r(o.map(s=>s()),e.reverse))};o=n.map(s=>{if(qt(s)){const a=X(this,Fe,t0).paramMediator.createExpression(s.expr);return a.addListener(i),X(this,Sa).add(a),()=>a(null)}else return()=>s}),i()}else X(this,en).range(r(n,e.reverse))},Jl=function(e=!1){return he(this,Fe,s0).call(this)??(this.type==Mb?this.getGenome().getExtent():e?this.getDataDomain():[])},s0=function(){const e=this.members.map(n=>n.channelDef).filter(n=>{var r;return(r=n.scale)==null?void 0:r.domain}).map(n=>_b(n.type,this.fromComplexInterval(n.scale.domain)));if(e.length>0)return e.reduce((n,r)=>n.extendAll(r))},ki=function(){const e=this.scale.type;return Bt(e)},a0=function(){const e=this.scale.props,n=e.zoom;if(gD(n)&&Dt(n.extent))return this.fromComplexInterval(n.extent);if(n)return e.type=="locus"?this.getGenome().getExtent():X(this,en).domain()},Zx=function(e){const n=this.channel,r={};return he(this,Fe,r0).call(this)&&(r.zero=!1),Ws(n)?r.nice=!he(this,Fe,r0).call(this):kr(n)?r.scheme=e==Fb?"tableau10":e==Rb?"blues":"viridis":cl(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 dD(t,e){if(e==fD||e==Mb){if(G1(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][[Fb,Rb,kb].indexOf(e)]:e==kb?"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 pD(t,e){Ws(e)&&t.type!=="ordinal"&&(t.range=[0,1]),e=="opacity"&&Bt(t.type)&&(t.clamp=!0)}function gD(t){return Rt(t)}function Sh(t){const e=new Set;function n(r){for(const o of Object.values(r.resolutions.scale))e.add(o)}for(const r of Wt(t)){r.visit(n);for(const o of r.getDataAncestors()){if(!o.options.contributesToScaleDomain)break;n(o)}}e.forEach(r=>r.reconfigure())}function Ch(...t){for(const e of t)if(e!==void 0)return e}class mD{constructor(e){this.channel=e,this.members=[]}get scaleResolution(){var e;return(e=ws(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 hl(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:pl(e.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const e=i=>{var a;const s=dI(i.view,i.channel);if(!ln(s))return{member:i,explicitTitle:Ch("axis"in s?(a=s.axis)==null?void 0:a.title:void 0,s.title),implicitTitle:Ch(_r(s)?s.field:void 0,js(s)?s.expr:void 0)}},n=this.members.map(e),r=n.filter(i=>{var s;if(lh(i.member.channel)&&!i.explicitTitle){const a=di(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=>Ch(i.explicitTitle,i.implicitTitle)).filter(nt));return o.size?[...o].join(", "):null}}function Pb(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+=gl(p.px)+(Ih(p)?0:n),a+=gl(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=[],h=p=>{const y=u.length;if(!y)return;const v=(p?n:0)*(i?-1:1);d-=v;for(let b=0;b<y;b++)f.push({location:d+(b+1)/(y+1)*v,size:0});d+=v,u.length=0};let d=i?Math.max(e,s):0+o;if(t.length==1&&Ih(t[0]))return[{location:d,size:0}];for(let p=0;p<t.length;p++){const y=t[p];if(Ih(y))u.push(y);else{h(f.length>0);const v=gl(y.px)+(a?gl(y.grow)/a*c:0);i&&(d-=v),f.push({location:l(d),size:l(v)}),i?d-=n:d+=v+n}}return d+=i?n:-n,h(!1),f}function bD(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 Zd=class Zd{constructor(e,n){ve(this,Ca);this.width=e,this.height=n}addPadding(e){return he(this,Ca,c0).call(this,e.width,e.height)}subtractPadding(e){return he(this,Ca,c0).call(this,-e.width,-e.height)}isGrowing(){return!!(this.width.grow||this.height.grow)}};Ca=new WeakSet,c0=function(e,n){return new Zd({px:(this.width.px??0)+e,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Rr=Zd;const ra=Object.freeze({px:0,grow:0}),Lb=new Rr(ra,ra);function Ih(t){return!t.px&&!t.grow}function gl(t){return t||0}function yD(t){return t&&(Gt(t.px)||Gt(t.grow))}function Nb(t){if(Ub(t))throw new Error("parseSizeDef does not accept step-based sizes.");if(yD(t))return t;if(Gt(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):Th}static createFromRecord(e){return new Nt(e.top,e.right,e.bottom,e.left)}static zero(){return Th}static createUniformPadding(e){return new Nt(e,e,e,e)}}const Th=Nt.createUniformPadding(0);Object.freeze(Th);function ia(t,e){return!e||/^(data:|([A-Za-z]+:)?\/\/)/.test(t)||t.startsWith("/")?t:(e.endsWith("/")||(e+="/"),e+t)}function wD(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 xD="VISIT_SKIP",oa="VISIT_STOP",Ob=t=>t;class zb{constructor(e,n,r,o,i,s={}){ve(this,Hn);ve(this,ko,{});ve(this,Ia,{});ve(this,Ta,{});ve(this,Da);ve(this,Ba);Ut(this,"opacityFunction",Ob);Ut(this,"facetCoords",new Vn([],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:{}},ob(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...s},this.needsAxes={x:!1,y:!1},this.paramMediator=new sI(()=>{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);Pe(this,Ba,c("height")),Pe(this,Da,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 Rr(he(this,Hn,Ha).call(this,"width"),he(this,Hn,Ha).call(this,"height")):Lb)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return Lb;const e=this.getSize();return new Rr(he(this,Hn,Ha).call(this,"viewportWidth")??e.width,he(this,Hn,Ha).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 he(this,Hn,l0).call(this,"layoutParent")}getDataAncestors(){return he(this,Hn,l0).call(this,"dataParent")}handleBroadcast(e){for(const n of X(this,ko)[e.type]||[])n(e)}_addBroadcastHandler(e,n){let r=X(this,ko)[e];r||(r=[],X(this,ko)[e]=r),r.push(n)}handleInteractionEvent(e,n,r){const o=r?X(this,Ia):X(this,Ta);for(const i of o[n.type]||[])i(e,n)}addInteractionEventListener(e,n,r){const o=r?X(this,Ia):X(this,Ta);let i=o[e];i||(i=[],o[e]=i),i.push(n)}visit(e){try{const n=e(this);if(e.postOrder&&e.postOrder(this),n!==oa)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===Ob)&&(this.opacityFunction=AD(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=X(this,Da))==null||o.call(this,n.width),(i=X(this,Ba))==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 _r(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(e){const n=di(e);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(e){const n=di(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 ta(()=>{var e;return(e=this.dataParent)==null?void 0:e.getBaseUrl()},wD(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const e=this.spec.title;if(e)return nt(e)?e:qt(e.text)?this.paramMediator.evaluateAndGet(e.text.expr):e.text}_cache(e,n){return hl(this,e,n)}_invalidateCacheByPrefix(e,n="self"){switch(n){case"self":dl(this,e);break;case"ancestors":for(const r of this.getLayoutAncestors())dl(r,e);break;case"progeny":this.visit(r=>dl(r,e));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(e){}}ko=new WeakMap,Ia=new WeakMap,Ta=new WeakMap,Da=new WeakMap,Ba=new WeakMap,Hn=new WeakSet,Ha=function(e){var o;let n=this.spec[e];const r=e=="viewportWidth"||e=="viewportHeight";if(Ub(n)){if(r)throw new gi(`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(Tr(s.type))a=s.domain().length;else if(["locus","index"].includes(s.type)){const l=s.domain();a=ws(l)-l[0]}else throw new gi(`Cannot use step-based size with "${s.type}" scale!`,this);const c=s;return a=Vf(a,c.paddingInner(),c.paddingOuter()),{px:a*i,grow:0}}else throw new gi("Cannot use 'step' size with missing scale!",this)}else return(n&&Nb(n))??(r?void 0:{px:0,grow:1})},l0=function(e){const n=[];let r=this;do n.push(r),r=r[e];while(r);return n};function vD(t){return"unitsPerPixel"in t}function AD(t){const e="opacity"in t.spec?t.spec.opacity:void 0;if(e!==void 0){if(Gt(e))return n=>n*e;if(vD(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 gi("Cannot find a resolved quantitative scale for dynamic opacity!",t);const o=Pf().domain(e.unitsPerPixel).range(e.values).clamp(!0);return i=>{const a=Ya(r.domain())/1e3;return o(a)*i}}else if(qt(e)){const n=t.paramMediator.createExpression(e.expr);return n.addListener(()=>t.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const Ub=t=>!!(t!=null&&t.step),ED={point:dT,rect:aT,rule:bT,link:ST,text:_T};class $t extends zb{constructor(n,r,o,i,s,a){super(n,r,o,i,s,a);ve(this,Xl);ve(this,_a);this.spec=n;const c=ED[this.getMarkType()];if(c)this.mark=new c(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),Pe(this,_a,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(l=>{var u;return(u=this.getScaleResolution(l))==null?void 0:u.addEventListener("domain",()=>X(this,_a).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0},he(this,Xl,Xx).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){n||(this.resolve("scale"),this.resolve("axis"));const r=this.mark.encoding;for(const[o,i]of Object.entries(r)){if(!Jt(i))continue;const s=di(i.resolutionChannel??o);if(!Qs(s)||n=="axis"&&!Ws(s))continue;let a=this;for(;(a.getConfiguredOrDefaultResolution(s,n)=="forced"||a.dataParent&&["shared","excluded","forced"].includes(a.dataParent.getConfiguredOrDefaultResolution(s,n)))&&a.getConfiguredOrDefaultResolution(s,n)!="excluded";)a=a.dataParent;if(n=="axis"&&Ws(o)&&G1(s))a.resolutions[n][s]||(a.resolutions[n][s]=new mD(s)),a.resolutions[n][s].addMember({view:this,channel:o,channelDef:i});else if(n=="scale"&&Qs(o)){if(!a.resolutions[n][s]){const l=new hD(s);a.resolutions[n][s]=l,l.addEventListener("range",u=>{var f;(f=this.context.glHelper)==null||f.createRangeTexture(u.scaleResolution,!0)})}const c=this.getLayoutAncestors().some(l=>!l.options.contributesToScaleDomain)||Jt(i)&&i.contributesToScaleDomain===!1?void 0:this.extractDataDomain.bind(this);a.resolutions[n][s].addMember({view:this,channel:o,channelDef:i,dataDomainSource:c})}}}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=_b(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 oo.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"}}_a=new WeakMap,Xl=new WeakSet,Xx=function(){for(const[n,r]of this.paramMediator.paramConfigs){if(!("select"in r))continue;const o=L1(r.select);if(ch(o)){let s=0;const a=this.paramMediator.getSetter(n),c=()=>{var f;const u=this.context.getCurrentHover();return((f=u==null?void 0:u.mark)==null?void 0:f.unitView)===this?u.datum:null},l=(u,f)=>{const h=f.uiEvent,d=c(),p=d?d[cn]:0;let y;if(o.toggle)if(h.shiftKey){if(d){const b=this.paramMediator.getValue(n);y=tI(b,{toggle:[d]})}}else y=F1(d?[d]:null);else p!=s&&(s=p,y=R1(d));y!==void 0&&a(y)};this.addInteractionEventListener(["mouseover","pointerover"].includes(o.on)?"mousemove":"click",l)}}};function*Dh(t,e=[]){for(const[n,r]of t.entries())if(r instanceof Map)for(const o of Dh(r,[...e,n]))yield o;else yield[[...e,n],r]}const Gb=2147483647,SD=Hb([Gb]);function Hb(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 CD(t){const e=Hb(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>=SD?u>Gb?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 Vb extends oh{constructor(n){super();ve(this,tn);ve(this,ir,[]);ve(this,ka,Ze(cn));ve(this,Ci,[]);ve(this,Ii);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=new Vn([],JSON.stringify),he(this,tn,u0).call(this)}get behavior(){return ih}get label(){return"collect"}reset(){super.reset(),he(this,tn,u0).call(this)}handle(n){X(this,ir).push(n)}beginBatch(n){eI(n)&&(Pe(this,ir,[]),this.facetBatches.set(Wt(n.facetId),X(this,ir)))}complete(){var i,s;Pe(this,ir,[]);const n=(i=this.params)==null?void 0:i.sort,r=n?A0(n.field,n.order):void 0,o=a=>{r&&a.sort(r)};if((s=this.params.groupby)!=null&&s.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const a=this.facetBatches.get(void 0),c=this.params.groupby.map(u=>Ze(u)),l=c.length>1?ec(a,...c):ID(a,c[0]);this.facetBatches.clear();for(const[u,f]of Dh(l))this.facetBatches.set(u,f)}for(const a of this.facetBatches.values())o(a);he(this,tn,Kx).call(this),he(this,tn,f0).call(this),super.complete();for(const a of this.observers)a(this)}repropagate(){for(const n of this.children)n.reset();he(this,tn,f0).call(this);for(const n of this.children)n.complete()}getData(){switch(he(this,tn,h0).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){he(this,tn,h0).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(!X(this,Ci).length)return;const r=Ni(c=>c.start).right,o=X(this,ka),i=Ni(c=>o(s(c))).left,s=c=>{const l=r(X(this,Ii),c),u=X(this,Ii)[l-1];return!u||c>=u.stop?void 0:this.facetBatches.get(u.facetId)[c-u.start]},a=i(X(this,Ci),n);if(a>=0){const c=s(X(this,Ci)[a]);if(c&&o(c)===n)return c}}}ir=new WeakMap,ka=new WeakMap,Ci=new WeakMap,Ii=new WeakMap,tn=new WeakSet,u0=function(){Pe(this,ir,[]),this.facetBatches.clear(),this.facetBatches.set(void 0,X(this,ir))},f0=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])}},h0=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},Kx=function(){var s;Pe(this,Ii,[]);const n=(s=this.facetBatches.values().next().value)==null?void 0:s[0];if(n==null||!(cn in n))return;let r=0;const o=[],i=X(this,ka);for(const[a,c]of this.facetBatches){X(this,Ii).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]))}Pe(this,Ci,CD(o))};function ID(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}class ml{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 TD extends wt{get behavior(){return On}constructor(e){super(e),this.params=e,this.startAccessor=Ze(e.start),this.endAccessor=Ze(e.end),this.chromAccessor=e.chrom?Ze(e.chrom):n=>{},this.weightAccessor=e.weight?Ze(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 ml}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,h=NaN;const d=this.ends;d.clear();const p=b=>{this._propagate(b),c=null},y=(b,A,C)=>{if(b==A)return;let E=!1;c&&(c[e]===C?(c[n]=A,E=!0):c[e]!=0&&p(c)),E||(c=this.createSegment(b,A,C,u))},v=()=>{let b=0;for(;(b=d.peekValue())!==void 0;)y(h,b,f),h=b,f-=d.pop();h=NaN,c&&p(c)};this.handle=b=>{const A=o(b);let C=0;for(;(C=d.peekValue())!==void 0&&C<A;)y(h,C,f),h=C,f-=d.pop();if(r){let I=s(b);I!==l&&(v(),u=I,l=u)}isNaN(h)||y(h,A,f),h=A;const E=a(b);f+=E,d.push(E,i(b))},this.complete=()=>{v(),super.complete()},this.beginBatch=b=>{v(),l=null,super.beginBatch(b)}}}function DD(t,e,n=0,r=t.length){const o=new ml,i=r-n;let s;for(s=0;s<e&&s<i;s++)o.push(s,t[n+s]);for(;s<i;s++){const l=t[n+s];l>=o.peekValue()&&(o.push(s,l),o.pop())}const a=[];let c;for(;(c=o.pop())!==void 0;)a.push(n+c);return a.reverse()}class BD{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 _D extends wt{get behavior(){return ih}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.posAccessor=Ze(this.params.pos),this.posBisector=Ni(this.posAccessor),this.scoreAccessor=Ze(this.params.score),this.widthAccessor=Ze(this.params.width),this.laneAccessor=this.params.lane?Ze(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.posAccessor;this._data.sort((n,r)=>e(n)-e(r)),this._scores=this._data.map(this.scoreAccessor);for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new BD(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=DD(this._scores,70,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of i){const a=this._data[s],c=e(this.posAccessor(a))*n,l=this.widthAccessor(a)/2+this.padding;this.reservationMaps.get(this.laneAccessor(a)).reserve(c-l,c+l)&&this._propagate(a)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(e){this._data.push(e)}}class kD extends wt{constructor(e,n){super(e,n),this.params=e,this.predicate=void 0}initialize(){let e="";if(RD(this.params))e=this.params.expr;else if(FD(this.params))e=M1(this.params);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 RD(t){return"expr"in t}function FD(t){return"param"in t}class MD extends wt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=e.index;if(e.fields){const r=Wt(e.fields).map(i=>Ze(i)),o=Wt(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 PD=48;function*LD(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-PD}yield r}class ND extends wt{get behavior(){return On}constructor(e){super(e);const n=Ze(e.exons??"exons"),r=Ze(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 LD(u)){if(l)c=a+f;else{a=c+f;const h=Object.assign({},s);h[o]=c,h[i]=a,this._propagate(h)}l=!l}}}}class OD extends wt{get behavior(){return On}constructor(e){super(e);const n=Wt(e.field).map(i=>Ze(i)),r=Wt(e.separator),o=Wt(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]));zD(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 zD(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 UD extends wt{get behavior(){return Br}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 qb extends wt{get behavior(){return Br}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=Ze(e.chrom),s=Wt(e.pos).map(p=>Ze(p)),a=Wt(e.as);if(s.length!=a.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=Wt(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(`
|
|
515
|
-
`));let f,h=0;const d=p=>{if(p!==f){if(h=o.cumulativeChromPositions.get(p),h===void 0)return;f=p}return h};this.handle=p=>{const y=i(p),v=d(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 jb={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 GD extends wt{get behavior(){return Br}constructor(e){super(e),this.params=e;const n=mh(jb),r=Ze(e.field),o=e.as,i=e.fontSize;this.handle=s=>{const a=r(s);a!==void 0?s[o]=n.measureWidth(a,i):s[o]=0,this._propagate(s)}}}const HD=65536;class VD extends wt{get behavior(){return Br}constructor(e){super(e),this.params=e}reset(){super.reset(),this.initialize()}initialize(){const e=this.params,n=e.as||"lane",r=Gt(e.spacing)?e.spacing:1,o=Ze(e.start),i=Ze(e.end);if(!e.preference!=!e.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(e.preference){const s=new Float64Array(HD),a=Ze(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 h=c.indexOf(a(u));let d=-1;if(h>=0&&s[h]<f)d=h;else{const p=o(u);for(d=0;d<s.length&&!(s[d]<p);d++);if(d>=s.length)throw new Error("Out of lanes!")}s[d]=i(u)+r,u[n]=d,this._propagate(u)}}else{const s=new ml,a=new ml;let c=-1/0,l=0;this.handle=u=>{const f=o(u);for(;s.length&&(s.peekValue()<=f||f<c);){const d=s.pop();a.push(d,d)}c=f;let h=a.pop();h===void 0&&(h=l++),u[n]=h,this._propagate(u),s.push(h,i(u)+r)}}}}class qD extends wt{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=>Ze(o)),r=e.as?e.as:n.map(Fi);this.handle=o=>{const i={};for(let s=0;s<n.length;s++)i[r[s]]=n[s](o);this._propagate(i)}}}class jD extends wt{get behavior(){return Br}constructor(e){super(e),this.params=e;const n=new RegExp(e.regex),r=typeof e.as=="string"?[e.as]:e.as,o=Ze(e.field);this.handle=i=>{const s=o(i);if(nt(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 WD extends wt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=Wt(e.columnRegex).map(h=>new RegExp(h));for(const h of n)if(RegExp("|"+h.source).exec("").length-1!=1)throw new Error(`Regex ${h.toString()} must have exactly one capturing group!`);const r=Wt(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=h=>{var v;const d=Object.keys(h);for(const b of n)if(!d.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 C of d){const E=(v=A.exec(C))==null?void 0:v[1];if(E!==void 0){let I=p.get(E);I||(I=[],p.set(E,I)),I[b]=C}}s=[...p.entries()],a=d.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 {
|
|
516
|
-
`+
|
|
538
|
+
chrM 16299`};function SD(t){if(!(t in Gb))throw new Error(`Unknown assembly: ${t}`);return Gb[t].split(`
|
|
539
|
+
`).map(e=>{const n=e.split(" ");return{name:n[0],size:parseInt(n[1])}})}const CD=/^([A-Za-z]+:)?\/\//;function wi(t,e){if(e&&CD.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 Hb(n)+e}function Hb(t){const e=t.replace(/[^/]*$/,"");return e===""?void 0:e.endsWith("://")?t+"/":e}class ID{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(!Lh(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,qb(this.config))this.setChromSizes(this.config.contigs);else if(!Oh(this.config)){const n=SD(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(Oh(this.config))try{const n=wi(e,this.config.url),r=await fetch(n);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);this.setChromSizes(TD(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=pr(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 ED(...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 TD(t){return wA(t).map(([e,n])=>({name:e,size:parseInt(n)}))}function Vb(t){return Ft(t)&&"chrom"in t}function DD(t){return t.every(Vb)}function Lh(t){return Ft(t)&&("name"in t||Oh(t)||qb(t))}function Oh(t){return Lh(t)&&"url"in t}function qb(t){return Lh(t)&&"contigs"in t}class ga extends Array{constructor(){super(),this.type=void 0}extend(e){return this}extendAll(e){if(e instanceof ga&&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 Nh extends ga{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 jb extends ga{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 Wb extends jb{constructor(){super(),this.type="nominal"}}class BD extends ga{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 Yb={quantitative:Nh,index:Nh,locus:Nh,nominal:Wb,ordinal:jb};function Qb(t,e){if(t=="quantitative"&&kD(e)){const n=new BD(e);return n.type=t,n}else if(Yb[t]){const n=new Yb[t];return n.type=t,e&&n.extendAll(e),n}throw new Error("Unknown type: "+t)}function kD(t){return t&&t.length>0&&t.length!=2&&t.every(e=>typeof e=="number")}function _D(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function RD(t,e,n){return t*Math.pow(e/t,n)}Qe("index",Mh,["continuous"]),Qe("locus",$T,["continuous"]),Qe("null",Ch,[]);const Zb="quantitative",Xb="ordinal",Kb="nominal",Jb="locus",FD="index";class MD{constructor(e){ge(this,Pe);ge(this,Go,{domain:new Set,range:new Set});ge(this,Jt);ge(this,Oa);ge(this,Na,new Set);this.channel=e,this.members=[],this.type=null,this.name=void 0}get zoomExtent(){return(W(this,Jt)&&kt(W(this,Jt).type)&&de(this,Pe,pv).call(this))??[-1/0,1/0]}addEventListener(e,n){W(this,Go)[e].add(n)}removeEventListener(e,n){W(this,Go)[e].delete(n)}addMember(e){var a;const{channel:n,channelDef:r}=e,o=r.type==null&&this.type;if(n!="sample"&&!r.type&&!Sh(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&&!Sh(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=W(this,Jt);if(!e||e.type=="null")return;const n=de(this,Pe,hv).call(this),r=e.domain(),o=de(this,Pe,w0).call(this,!0);if(Ob({...o,range:void 0},e),e.props=o,de(this,Pe,x0).call(this),!n){Te(this,Oa,e.domain()),de(this,Pe,fr).call(this,"domain");return}const i=e.domain();Dc(i,r)||(this.isZoomable()?e.domain(r):de(this,Pe,Li).call(this)?(e.domain(r),this.zoomTo(i,500)):de(this,Pe,fr).call(this,"domain"))}get scale(){if(W(this,Jt))return W(this,Jt);const e=de(this,Pe,w0).call(this),n=dD({...e,range:void 0});n.props=e,"unknown"in n&&n.unknown(null),Te(this,Jt,n),de(this,Pe,x0).call(this),eD(n)&&n.genome(this.getGenome());const r=n.range;if(r){const o=()=>de(this,Pe,fr).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 de(this,Pe,Li).call(this)&&Dc(de(this,Pe,hu).call(this),this.getDomain())}isZoomable(){return de(this,Pe,Li).call(this)&&!!this.scale.props.zoom}zoom(e,n,r){if(!de(this,Pe,Li).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=Rv(s,r||0),s=P0(s,a,e);break;case"log":s=Fv(s,r||0),s=L0(s,a,e);break;case"pow":case"sqrt":{const l=o;s=Mv(s,r||0,l.exponent()),s=bu(s,a,e,l.exponent());break}default:throw new Error("Zooming is not implemented for: "+o.type)}const c=this.zoomExtent;return s=Lv(s,c[0],c[1]),[0,1].some(l=>s[l]!=i[l])?(o.domain(s),de(this,Pe,fr).call(this,"domain"),!0):!1}async zoomTo(e,n=!1){if(is(n)&&(n=n?700:0),!de(this,Pe,Li).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(e),o=W(this,Pe,b0).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:_D,onUpdate:h=>{const p=RD(a,c,h),b=a==c?h:(a-p)/(a-c),v=b*u+(1-b)*l,y=[f?s[0]:v-p/2,d?s[1]:v+p/2];i.domain(y),de(this,Pe,fr).call(this,"domain")}}),i.domain(r),de(this,Pe,fr).call(this,"domain")}else i.domain(r),o==null||o.requestRender(),de(this,Pe,fr).call(this,"domain")}resetZoom(){if(!de(this,Pe,Li).call(this))throw new Error("Not a zoomable scale!");const e=this.getDomain(),n=de(this,Pe,hu).call(this);return[0,1].some(r=>n[r]!=e[r])?(W(this,Jt).domain(n),de(this,Pe,fr).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?ac(this.zoomExtent)/ac(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=W(this,Pe,b0).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 Vb(e)?this.getGenome().toContinuous(e.chrom,e.pos):e}fromComplexInterval(e){return this.type==="locus"&&DD(e)?this.getGenome().toContinuousInterval(e):e}}Go=new WeakMap,Jt=new WeakMap,Oa=new WeakMap,Na=new WeakMap,Pe=new WeakSet,m0=function(){return this.members[0].view},b0=function(){return W(this,Pe,m0).context},fr=function(e){for(const n of W(this,Go)[e].values())n({type:e,scaleResolution:this})},y0=function(){return!!de(this,Pe,v0).call(this)},hv=function(){const e=W(this,Jt);if(!e)return!1;const n=e.domain();return kt(e.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},dv=function(){const e=this.members.map(n=>n.channelDef.scale).filter(n=>n!==void 0);return Il(e,"scale",["domain"])},w0=function(e=!1){const n=de(this,Pe,dv).call(this);if(n===null||n.type=="null")return{type:"null"};const r={...de(this,Pe,gv).call(this,this.type),...n};r.type||(r.type=PD(this.channel,this.type));const o=de(this,Pe,hu).call(this,e);return o&&o.length>0?r.domain=o:Dr(r.type)&&(r.domain=new Wb),!r.domain&&r.domainMid!==void 0&&(r.domain=[r.domainMin??0,r.domainMax??1]),this.channel=="y"&&Dr(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),LD(r,this.channel),r},x0=function(){const e=W(this,Jt).props,n=e.range;if(W(this,Na).forEach(o=>o.invalidate()),!n||!Dt(n))return;const r=(o,i)=>i?o.slice().reverse():o;if(n.some(qt)){let o;const i=()=>{W(this,Jt).range(r(o.map(s=>s()),e.reverse))};o=n.map(s=>{if(qt(s)){const a=W(this,Pe,m0).paramMediator.createExpression(s.expr);return a.addListener(i),W(this,Na).add(a),()=>a(null)}else return()=>s}),i()}else W(this,Jt).range(r(n,e.reverse))},hu=function(e=!1){return de(this,Pe,v0).call(this)??(this.type==Jb?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=>Qb(n.type,this.fromComplexInterval(n.scale.domain)));if(e.length>0)return e.reduce((n,r)=>n.extendAll(r))},Li=function(){const e=this.scale.type;return kt(e)},pv=function(){const e=this.scale.props,n=e.zoom;return OD(n)&&Dt(n.extent)?this.fromComplexInterval(n.extent):n&&e.type=="locus"?this.getGenome().getExtent():W(this,Oa)},gv=function(e){const n=this.channel,r={};return de(this,Pe,y0).call(this)&&(r.zero=!1),sa(n)?r.nice=!de(this,Pe,y0).call(this):Rr(n)?r.scheme=e==Kb?"tableau10":e==Xb?"blues":"viridis":vl(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 PD(t,e){if(e==FD||e==Jb){if(ob(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][[Kb,Xb,Zb].indexOf(e)]:e==Zb?"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 LD(t,e){sa(e)&&t.type!=="ordinal"&&(t.range=[0,1]),e=="opacity"&&kt(t.type)&&(t.clamp=!0)}function OD(t){return Ft(t)}function zh(t){const e=new Set;function n(r){for(const o of Object.values(r.resolutions.scale))e.add(o)}for(const r of Yt(t)){r.visit(n);for(const o of r.getDataAncestors()){if(!o.options.contributesToScaleDomain)break;n(o)}}e.forEach(r=>r.reconfigure())}function Uh(...t){for(const e of t)if(e!==void 0)return e}class ND{constructor(e){this.channel=e,this.members=[]}get scaleResolution(){var e;return(e=Rs(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 Sl(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:Il(e.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const e=i=>{var a;const s=PI(i.view,i.channel);if(!fn(s))return{member:i,explicitTitle:Uh("axis"in s?(a=s.axis)==null?void 0:a.title:void 0,s.title),implicitTitle:Uh(_r(s)?s.field:void 0,oa(s)?s.expr:void 0)}},n=this.members.map(e),r=n.filter(i=>{var s;if(Sh(i.member.channel)&&!i.explicitTitle){const a=bi(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=>Uh(i.explicitTitle,i.implicitTitle)).filter(nt));return o.size?[...o].join(", "):null}}function $b(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+=Tl(p.px)+(Gh(p)?0:n),a+=Tl(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 b=u.length;if(!b)return;const v=(p?n:0)*(i?-1:1);h-=v;for(let y=0;y<b;y++)f.push({location:h+(y+1)/(b+1)*v,size:0});h+=v,u.length=0};let h=i?Math.max(e,s):0+o;if(t.length==1&&Gh(t[0]))return[{location:h,size:0}];for(let p=0;p<t.length;p++){const b=t[p];if(Gh(b))u.push(b);else{d(f.length>0);const v=Tl(b.px)+(a?Tl(b.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 zD(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 u0=class u0{constructor(e,n){ge(this,za);this.width=e,this.height=n}addPadding(e){return de(this,za,A0).call(this,e.width,e.height)}subtractPadding(e){return de(this,za,A0).call(this,-e.width,-e.height)}isGrowing(){return!!(this.width.grow||this.height.grow)}};za=new WeakSet,A0=function(e,n){return new u0({px:(this.width.px??0)+e,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Mr=u0;const ma=Object.freeze({px:0,grow:0}),ey=new Mr(ma,ma);function Gh(t){return!t.px&&!t.grow}function Tl(t){return t||0}function UD(t){return t&&(Gt(t.px)||Gt(t.grow))}function ty(t){if(iy(t))throw new Error("parseSizeDef does not accept step-based sizes.");if(UD(t))return t;if(Gt(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 Ot{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 Ot(this.top+e,this.right+e,this.bottom+e,this.left+e)}add(e){return new Ot(this.top+e.top,this.right+e.right,this.bottom+e.bottom,this.left+e.left)}subtract(e){return new Ot(this.top-e.top,this.right-e.right,this.bottom-e.bottom,this.left-e.left)}union(e){return new Ot(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 Ot(0,this.right,0,this.left)}getVertical(){return new Ot(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):Hh}static createFromRecord(e){return new Ot(e.top,e.right,e.bottom,e.left)}static zero(){return Hh}static createUniformPadding(e){return new Ot(e,e,e,e)}}const Hh=Ot.createUniformPadding(0);Object.freeze(Hh);function ba(t,e){return!e||/^(data:|([A-Za-z]+:)?\/\/)/.test(t)||t.startsWith("/")?t:(e.endsWith("/")||(e+="/"),e+t)}function GD(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 HD="VISIT_SKIP",ya="VISIT_STOP",ny=t=>t;class ry{constructor(e,n,r,o,i,s={}){ge(this,qn);ge(this,Ho,{});ge(this,Vo,{});ge(this,qo,{});ge(this,Ua);ge(this,Ga);Ut(this,"opacityFunction",ny);Ut(this,"facetCoords",new jn([],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:{}},Cb(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...s},this.needsAxes={x:!1,y:!1},this.paramMediator=new BI(()=>{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);Te(this,Ga,c("height")),Te(this,Ua,c("width"))}}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>Ot.createFromConfig(this.spec.padding))}getOverhang(){return Ot.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Mr(de(this,qn,tc).call(this,"width"),de(this,qn,tc).call(this,"height")):ey)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return ey;const e=this.getSize();return new Mr(de(this,qn,tc).call(this,"viewportWidth")??e.width,de(this,qn,tc).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 de(this,qn,E0).call(this,"layoutParent")}getDataAncestors(){return de(this,qn,E0).call(this,"dataParent")}handleBroadcast(e){for(const n of W(this,Ho)[e.type]||[])n(e)}_addBroadcastHandler(e,n){let r=W(this,Ho)[e];r||(r=[],W(this,Ho)[e]=r),r.push(n)}handleInteractionEvent(e,n,r){const o=r?W(this,Vo):W(this,qo);for(const i of o[n.type]||[])i(e,n)}addInteractionEventListener(e,n,r){const o=r?W(this,Vo):W(this,qo);let i=o[e];i||(i=[],o[e]=i),i.push(n)}removeInteractionEventListener(e,n,r){const o=r?W(this,Vo):W(this,qo);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!==ya)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===ny)&&(this.opacityFunction=qD(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=W(this,Ua))==null||o.call(this,n.width),(i=W(this,Ga))==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 _r(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(e){const n=bi(e);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(e){const n=bi(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 wi(()=>{var e;return(e=this.dataParent)==null?void 0:e.getBaseUrl()},GD(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const e=this.spec.title;if(e)return nt(e)?e:qt(e.text)?this.paramMediator.evaluateAndGet(e.text.expr):e.text}_cache(e,n){return Sl(this,e,n)}_invalidateCacheByPrefix(e,n="self"){switch(n){case"self":Cl(this,e);break;case"ancestors":for(const r of this.getLayoutAncestors())Cl(r,e);break;case"progeny":this.visit(r=>Cl(r,e));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(e){}}Ho=new WeakMap,Vo=new WeakMap,qo=new WeakMap,Ua=new WeakMap,Ga=new WeakMap,qn=new WeakSet,tc=function(e){var o;let n=this.spec[e];const r=e=="viewportWidth"||e=="viewportHeight";if(iy(n)){if(r)throw new Fr(`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(Dr(s.type))a=s.domain().length;else if(["locus","index"].includes(s.type)){const l=s.domain();a=Rs(l)-l[0]}else throw new Fr(`Cannot use step-based size with "${s.type}" scale!`,this);const c=s;return a=ih(a,c.paddingInner(),c.paddingOuter()),{px:a*i,grow:0}}else throw new Fr("Cannot use 'step' size with missing scale!",this)}else return(n&&ty(n))??(r?void 0:{px:0,grow:1})},E0=function(e){const n=[];let r=this;do n.push(r),r=r[e];while(r);return n};function VD(t){return"unitsPerPixel"in t}function qD(t){const e="opacity"in t.spec?t.spec.opacity:void 0;if(e!==void 0){if(Gt(e))return n=>n*e;if(VD(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 Fr("Cannot find a resolved quantitative scale for dynamic opacity!",t);const o=Xf().domain(e.unitsPerPixel).range(e.values).clamp(!0);return i=>{const a=ac(r.domain())/1e3;return o(a)*i}}else if(qt(e)){const n=t.paramMediator.createExpression(e.expr);return n.addListener(()=>t.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const iy=t=>!!(t!=null&&t.step),jD={point:PT,rect:BT,rule:zT,link:WT,text:JT};class tn extends ry{constructor(n,r,o,i,s,a){super(n,r,o,i,s,a);ge(this,cu);ge(this,Ha);this.spec=n;const c=jD[this.getMarkType()];if(c)this.mark=new c(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),Te(this,Ha,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(l=>{var u;return(u=this.getScaleResolution(l))==null?void 0:u.addEventListener("domain",()=>W(this,Ha).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0},de(this,cu,mv).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){n||(this.resolve("scale"),this.resolve("axis"));const r=this.mark.encoding;for(const[o,i]of Object.entries(r)){if(!en(i))continue;const s=bi(i.resolutionChannel??o);if(!aa(s)||n=="axis"&&!sa(s))continue;let a=this;for(;(a.getConfiguredOrDefaultResolution(s,n)=="forced"||a.dataParent&&["shared","excluded","forced"].includes(a.dataParent.getConfiguredOrDefaultResolution(s,n)))&&a.getConfiguredOrDefaultResolution(s,n)!="excluded";)a=a.dataParent;if(n=="axis"&&sa(o)&&ob(s))a.resolutions[n][s]||(a.resolutions[n][s]=new ND(s)),a.resolutions[n][s].addMember({view:this,channel:o,channelDef:i});else if(n=="scale"&&aa(o)){if(!a.resolutions[n][s]){const l=new MD(s);a.resolutions[n][s]=l,l.addEventListener("range",u=>{var f;(f=this.context.glHelper)==null||f.createRangeTexture(u.scaleResolution,!0)})}const c=this.getLayoutAncestors().some(l=>!l.options.contributesToScaleDomain)||en(i)&&i.contributesToScaleDomain===!1?void 0:this.extractDataDomain.bind(this);a.resolutions[n][s].addMember({view:this,channel:o,channelDef:i,dataDomainSource:c})}}}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=Qb(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 uo.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"}}Ha=new WeakMap,cu=new WeakSet,mv=function(){for(const[n,r]of this.paramMediator.paramConfigs){if(!("select"in r))continue;const o=wl(r.select);if(Eh(o)){let s=0;const a=this.paramMediator.getSetter(n),c=()=>{var f;const u=this.context.getCurrentHover();return((f=u==null?void 0:u.mark)==null?void 0:f.unitView)===this?u.datum:null},l=(u,f)=>{const d=f.uiEvent,h=c(),p=h?h[ln]:0;let b;if(o.toggle)if(d.shiftKey){if(h){const y=this.paramMediator.getValue(n);b=EI(y,{toggle:[h]})}}else b=Y1(h?[h]:null);else p!=s&&(s=p,b=W1(h));b!==void 0&&a(b)};this.addInteractionEventListener(["mouseover","pointerover"].includes(o.on)?"mousemove":"click",l)}}};function*Vh(t,e=[]){for(const[n,r]of t.entries())if(r instanceof Map)for(const o of Vh(r,[...e,n]))yield o;else yield[[...e,n],r]}const oy=2147483647,WD=sy([oy]);function sy(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 YD(t){const e=sy(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>=WD?u>oy?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 ay extends xh{constructor(n){super();ge(this,nn);ge(this,or,[]);ge(this,Va,Ze(ln));ge(this,Gr,[]);ge(this,_i);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=new jn([],JSON.stringify),de(this,nn,S0).call(this)}get behavior(){return wh}get label(){return"collect"}reset(){super.reset(),de(this,nn,S0).call(this)}handle(n){W(this,or).push(n)}beginBatch(n){AI(n)&&(Te(this,or,[]),this.facetBatches.set(Yt(n.facetId),W(this,or)))}complete(){var i,s;Te(this,or,[]);const n=(i=this.params)==null?void 0:i.sort,r=n?O0(n.field,n.order):void 0,o=a=>{r&&a.sort(r)};if((s=this.params.groupby)!=null&&s.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const a=this.facetBatches.get(void 0),c=this.params.groupby.map(u=>Ze(u)),l=c.length>1?dc(a,...c):QD(a,c[0]);this.facetBatches.clear();for(const[u,f]of Vh(l))this.facetBatches.set(u,f)}for(const a of this.facetBatches.values())o(a);de(this,nn,bv).call(this),de(this,nn,C0).call(this),super.complete();for(const a of this.observers)a(this)}repropagate(){for(const n of this.children)n.reset();de(this,nn,C0).call(this);for(const n of this.children)n.complete()}getData(){switch(de(this,nn,I0).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){de(this,nn,I0).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(!W(this,Gr).length)return;const r=Hi(c=>c.start).right,o=W(this,Va),i=Hi(c=>o(s(c))).left,s=c=>{const l=r(W(this,_i),c),u=W(this,_i)[l-1];return!u||c>=u.stop?void 0:this.facetBatches.get(u.facetId)[c-u.start]},a=i(W(this,Gr),n);if(a>=0){const c=s(W(this,Gr)[a]);if(c&&o(c)===n)return c}}}or=new WeakMap,Va=new WeakMap,Gr=new WeakMap,_i=new WeakMap,nn=new WeakSet,S0=function(){Te(this,or,[]),Te(this,Gr,[]),this.facetBatches.clear(),this.facetBatches.set(void 0,W(this,or))},C0=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])}},I0=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},bv=function(){var s;Te(this,_i,[]);const n=(s=this.facetBatches.values().next().value)==null?void 0:s[0];if(n==null||!(ln in n))return;let r=0;const o=[],i=W(this,Va);for(const[a,c]of this.facetBatches){W(this,_i).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]))}Te(this,Gr,YD(o))};function QD(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}class Dl{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 ZD extends wt{get behavior(){return Gn}constructor(e){super(e),this.params=e,this.startAccessor=Ze(e.start),this.endAccessor=Ze(e.end),this.chromAccessor=e.chrom?Ze(e.chrom):n=>{},this.weightAccessor=e.weight?Ze(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 Dl}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=y=>{this._propagate(y),c=null},b=(y,A,S)=>{if(y==A)return;let E=!1;c&&(c[e]===S?(c[n]=A,E=!0):c[e]!=0&&p(c)),E||(c=this.createSegment(y,A,S,u))},v=()=>{let y=0;for(;(y=h.peekValue())!==void 0;)b(d,y,f),d=y,f-=h.pop();d=NaN,c&&p(c)};this.handle=y=>{const A=o(y);let S=0;for(;(S=h.peekValue())!==void 0&&S<A;)b(d,S,f),d=S,f-=h.pop();if(r){let I=s(y);I!==l&&(v(),u=I,l=u)}isNaN(d)||b(d,A,f),d=A;const E=a(y);f+=E,h.push(E,i(y))},this.complete=()=>{v(),super.complete()},this.beginBatch=y=>{v(),l=null,super.beginBatch(y)}}}function XD(t,e,n=0,r=t.length){const o=new Dl,i=r-n;let s;for(s=0;s<e&&s<i;s++)o.push(s,t[n+s]);for(;s<i;s++){const l=t[n+s];l>=o.peekValue()&&(o.push(s,l),o.pop())}const a=[];let c;for(;(c=o.pop())!==void 0;)a.push(n+c);return a.reverse()}class KD{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 JD extends wt{get behavior(){return wh}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.posAccessor=Ze(this.params.pos),this.posBisector=Hi(this.posAccessor),this.scoreAccessor=Ze(this.params.score),this.widthAccessor=Ze(this.params.width),this.laneAccessor=this.params.lane?Ze(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.posAccessor;this._data.sort((n,r)=>e(n)-e(r)),this._scores=this._data.map(this.scoreAccessor);for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new KD(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=XD(this._scores,70,this.posBisector.left(this._data,r[0]),this.posBisector.right(this._data,r[1]));for(const s of i){const a=this._data[s],c=e(this.posAccessor(a))*n,l=this.widthAccessor(a)/2+this.padding;this.reservationMaps.get(this.laneAccessor(a)).reserve(c-l,c+l)&&this._propagate(a)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(e){this._data.push(e)}}class $D extends wt{constructor(e,n){super(e,n),this.params=e,this.predicate=void 0}initialize(){let e="";if(eB(this.params))e=this.params.expr;else if(tB(this.params))e=Z1(this.params);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 eB(t){return"expr"in t}function tB(t){return"param"in t}class nB extends wt{get behavior(){return Gn}constructor(e){super(e),this.params=e;const n=e.index;if(e.fields){const r=Yt(e.fields).map(i=>Ze(i)),o=Yt(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 rB=48;function*iB(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-rB}yield r}class oB extends wt{get behavior(){return Gn}constructor(e){super(e);const n=Ze(e.exons??"exons"),r=Ze(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 iB(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 sB extends wt{get behavior(){return Gn}constructor(e){super(e);const n=Yt(e.field).map(i=>Ze(i)),r=Yt(e.separator),o=Yt(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]));aB(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 aB(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 cB extends wt{get behavior(){return kr}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 cy extends wt{get behavior(){return kr}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=Ze(e.chrom),s=Yt(e.pos).map(p=>Ze(p)),a=Yt(e.as);if(s.length!=a.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=Yt(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,b)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${b}](datum) - ${l[b]};`).join(`
|
|
540
|
+
`));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 b=i(p),v=h(b);if(v===void 0)throw new Error(`Unknown chromosome/contig "${b}" in datum: ${JSON.stringify(p)}`);u(p,v,s),this._propagate(p)}}}const ly={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 lB extends wt{get behavior(){return kr}constructor(e){super(e),this.params=e;const n=Rh(ly),r=Ze(e.field),o=e.as,i=e.fontSize;this.handle=s=>{const a=r(s);a!==void 0?s[o]=n.measureWidth(a,i):s[o]=0,this._propagate(s)}}}const uB=65536;class fB extends wt{get behavior(){return kr}constructor(e){super(e),this.params=e}reset(){super.reset(),this.initialize()}initialize(){const e=this.params,n=e.as||"lane",r=Gt(e.spacing)?e.spacing:1,o=Ze(e.start),i=Ze(e.end);if(!e.preference!=!e.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(e.preference){const s=new Float64Array(uB),a=Ze(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 Dl,a=new Dl;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 hB extends wt{get behavior(){return Gn}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=>Ze(o)),r=e.as?e.as:n.map(Ni);this.handle=o=>{const i={};for(let s=0;s<n.length;s++)i[r[s]]=n[s](o);this._propagate(i)}}}class dB extends wt{get behavior(){return kr}constructor(e){super(e),this.params=e;const n=new RegExp(e.regex),r=typeof e.as=="string"?[e.as]:e.as,o=Ze(e.field);this.handle=i=>{const s=o(i);if(nt(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 pB extends wt{get behavior(){return Gn}constructor(e){super(e),this.params=e;const n=Yt(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=Yt(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 y of n)if(!h.some(A=>y.test(A)))throw new Error(`No columns matching the regex ${y.toString()} found in the data!`);const p=new Map;for(const[y,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[y]=S}}s=[...p.entries()],a=h.filter(y=>!n.some(A=>A.test(y))&&!(o&&o.test(y)));const b=[...a.map(y=>JSON.stringify(y)+": datum["+JSON.stringify(y)+"]"),JSON.stringify(i)+": sampleId",...r.map((y,A)=>JSON.stringify(y)+`: datum[attrs[${A}]]`)];c=new Function("datum","sampleId","attrs",`return {
|
|
541
|
+
`+b.join(`,
|
|
517
542
|
`)+`
|
|
518
|
-
};`)},u=h=>{s||l(h);for(let d=0;d<s.length;d++){const[p,y]=s[d],v=c(h,p,y);this._propagate(v)}},f=h=>{l(h),u(h),this.handle=u};this.handle=f,this.beginBatch=h=>{B1(h)&&(this.handle=f),super.beginBatch(h)}}}class QD extends wt{get behavior(){return Br}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?A0(e.sort.field,e.sort.order):void 0,o=e.field?Ze(e.field):()=>1,i=e.groupby.map(u=>Ze(u)),s=gA(this.buffer,u=>i.map(f=>f(u)).join()).map(u=>u[1]);let a=u=>!0;if(e.baseField){const u=Ze(e.baseField);a=f=>u(f)!==null}let c,l;switch(e.offset){case"normalize":c=(u,f)=>u/f,l=(u,f)=>rs(u,f);break;case"center":c=(u,f)=>u-f/2,l=(u,f)=>rs(u,f);break;case"information":{const u=Math.log2(e.cardinality??4);c=(f,h)=>f/h,l=(f,h)=>{const p=rs(f,A=>+!a(A)),y=rs(f,h),v=y-p;let b=0;for(let A=0;A<f.length;A++){const C=f[A];if(a(C)){const E=h(C)/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 h=0;for(const d of u){const p=h+o(d);a(d)&&(d[n[0]]=c(h,f),d[n[1]]=c(p,f),this._propagate(d),h=p)}}super.complete()}}class YD extends wt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=Ze(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 Wb={count:t=>t.length,valid:lA,sum:rs,min:wu,max:yu,mean:vA,median:AA,variance:uA};class ZD extends wt{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=Ze(n),i=Wb[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=>Wb.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=>Ze(i)),o=ec(this.buffer,...r);for(const[i,s]of Dh(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 XD={aggregate:ZD,collect:Vb,coverage:TD,filterScoredLabels:_D,filter:kD,flatten:MD,flattenCompressedExons:ND,flattenDelimited:OD,flattenSequence:YD,formula:UD,identifier:sh,linearizeGenomicCoordinate:qb,measureText:GD,pileup:VD,project:qD,regexExtract:jD,regexFold:WD,sample:db,stack:QD};function KD(t,e){const n=XD[t.type];if(n)return new n(t,e);throw new Error("Unknown transform: "+t.type)}function Qb(t){if(!Xb(t)&&!Zb(t))return;const e={...t.format};if(e.type??(e.type=Zb(t)&&$D(Kt(t.url))),e.parse??(e.parse="auto"),!e.type)throw new Error("Format for the data source was not defined and it could not be inferred: "+JSON.stringify(t));return e}function JD(t){var e;return((e=Mu(t))==null?void 0:e.responseType)??"text"}function $D(t){var e;if(Array.isArray(t)&&(t=t[0]),t)return(e=t.match(/\.(csv|tsv|json)/))==null?void 0:e[1]}const Yb=t=>typeof t!="object"?eB:tB,eB=t=>({data:t}),tB=t=>t;function Zb(t){return"url"in t}class ao extends oh{constructor(n){super();Ut(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 Xb(t){return"values"in t}class nB extends ao{constructor(e,n){var r;if(super(n),this.params=e,typeof e.values=="string"&&!((r=e==null?void 0:e.format)!=null&&r.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}get label(){return"inlineSource"}isTrivial(){const e=this.params.values,n=Array.isArray(e)?e[0]:e;return!!(n&&Object.keys(n).length==0&&n.constructor===Object)}loadSynchronously(){const e=this.params.values;let n=[],r=o=>o;if(Array.isArray(e))e.length>0&&(n=e,r=Yb(e[0]));else if(typeof e=="object")n=[e];else if(typeof e=="string")n=Fp(e,Qb(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 o of n)this._propagate(r(o));this.complete()}async load(){this.loadSynchronously()}}function rB(t){return"url"in t}class iB extends ao{constructor(e,n){super(n),this.params=sl(n.paramMediator,e,()=>this.load()),this.baseUrl=n==null?void 0:n.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}get label(){return"urlSource"}async load(){const e=Kt(this.params.url),n=Array.isArray(e)?e:[e],r=Qb(this.params),o=JD(r.type);if(n.length===0||!n[0]){this.reset(),this.complete();return}const i=async a=>{try{const c=ta(this.baseUrl,a),l=await fetch(c);if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return typeof l[o]=="function"?l[o]():l.text()}catch(c){throw new Error(`Could not load data: ${a}. Reason: ${c.message}`)}},s=(a,c)=>{try{const l=Fp(a,r);this.beginBatch({type:"file",url:c});for(const u of l)this._propagate(u)}catch(l){throw new Error(`Cannot parse: ${c}: ${l.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(n.map(a=>i(a).then(s))),this.setLoadingStatus("complete")}catch(a){this.setLoadingStatus("error",a.message)}this.complete()}}function oB(t){return"sequence"in t}class sB extends ao{constructor(e,n){if(super(n),this.sequence=sl(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=Kt(this.sequence.as)??"data",n=Kt(this.sequence.start)??0,r=Kt(this.sequence.step)??1,o=Kt(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 Bh extends ao{constructor(n,r){super(n);Ut(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 $t||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(),Sh(this.view)}}class aB extends Bh{constructor(n,r){const o={...n};super(r,o.channel);Ut(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*D1(100,700,l),s=Gt(o.tickCount)?o.tickCount:Math.round(r/i(r)),a=gb(n,s,o.tickMinStep),c=o.values?mb(n,o.values,a):FT(n,a);if(this.ticks==null||!gc(c,this.ticks)){this.ticks=c;const l=PT(n,s,o.format);this.publishData([c.map(u=>({value:u,label:l(u)}))])}}}class cB extends Bh{constructor(e,n){super(n,e.channel)}get label(){return"axisGenomeSource"}async load(){this.publishData([this.genome.chromosomes])}}function bl(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 sa extends Bh{constructor(){super(...arguments);ve(this,Ro,new AbortController);ve(this,Fo,[0,0]);ve(this,Mo,[0,0]);ve(this,Ra,0);Ut(this,"params")}setupDebouncing(n){const r=()=>Kt(n.debounce),o=n.debounceMode;if(o=="domain")this.onDomainChanged=bl(this.onDomainChanged.bind(this),r,!1);else if(o=="window")this.loadInterval=bl(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+o)}onDomainChanged(n){var o;Pe(this,Mo,n);const r=Kt((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=X(this,Mo);Pe(this,Mo,[0,0]),Pe(this,Fo,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){X(this,Ro).abort(),this.setLoadingStatus("loading"),Pe(this,Ro,new AbortController);const o=X(this,Ro).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=X(this,Fo);(r!==X(this,Ra)||i[0]<s[0]||i[1]>s[1])&&(Pe(this,Fo,i),Pe(this,Ra,r),o(i))}}Ro=new WeakMap,Fo=new WeakMap,Mo=new WeakMap,Ra=new WeakMap;class lB extends sa{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(()=>Y_),Promise.resolve().then(()=>pk),Promise.resolve().then(()=>fa)]).then(([{Buffer:i},{IndexedFasta:s},{RemoteFile:a}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=i));const c=l=>new a(ia(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 uB extends sa{constructor(n,r){const o={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},i=sl(r.paramMediator,o,s=>{s.includes("url")?he(this,Fa,d0).call(this).then(()=>this.reloadLastDomain()):s.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,i.channel);ve(this,Fa);ve(this,Po,[]);ve(this,Lo);if(this.params=i,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),he(this,Fa,d0).call(this)}get label(){return"bigWigSource"}async onDomainChanged(n){await this.initializedPromise;const r=this.scaleResolution.getAxisLength()||700,o=fB(n,r,X(this,Po)),i=Math.max(o*r,5e3);this.callIfWindowsChanged(n,i,s=>this.loadInterval(s,o))}async loadInterval(n,r){const o=.5/r/Kt(this.params.pixelsPerBin),i=await this.discretizeAndLoad(n,(s,a)=>X(this,Lo).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)}}Po=new WeakMap,Lo=new WeakMap,Fa=new WeakSet,d0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>Dw),Promise.resolve().then(()=>fa)]).then(([{BigWig:o},{RemoteFile:i}])=>{Pe(this,Lo,new o({filehandle:new i(ia(Kt(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),X(this,Lo).getHeader().then(s=>{Pe(this,Po,s.zoomLevels.map(a=>a.reductionLevel).reverse()),X(this,Po).push(1),this.setLoadingStatus("complete"),n()}).catch(s=>{this.load(),this.setLoadingStatus("error",`${Kt(this.params.url)}: ${s.message}`),r(s)})})}),this.initializedPromise};function fB(t,e,n){const r=(t[1]-t[0])/e;return n.find(o=>o<r)??n.at(-1)}class hB extends sa{constructor(n,r){const o={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},i=sl(r.paramMediator,o,s=>{s.includes("url")?he(this,Ma,p0).call(this).then(()=>this.reloadLastDomain()):s.includes("windowSize")&&this.reloadLastDomain()});super(r,i.channel);ve(this,Ma);Ut(this,"parser");Ut(this,"bbi");Ut(this,"parseLine");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),he(this,Ma,p0).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)}}Ma=new WeakSet,p0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>DF),Promise.resolve().then(()=>Dw),Promise.resolve().then(()=>fa)]).then(([o,{BigBed:i},{RemoteFile:s}])=>{const a=o.default;this.bbi=new i({filehandle:new s(ia(Kt(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=dB(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",`${Kt(this.params.url)}: ${c.message}`),r(c)})})}),this.initializedPromise};function dB(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 C=r.substring(n,A);return n=A+1,C}function f(){let A=0,C=r.charCodeAt(n),E=1;C===l&&(E=-1,n++,C=r.charCodeAt(n));do{if(C===a){n++;break}A=A*10+C-c,C=r.charCodeAt(++n)}while(n<o);return A*E}const h=e.map(A=>`${JSON.stringify(A.name)}: ${A.isNumeric?"0":"emptyString"}`),d=new Function(`
|
|
543
|
+
};`)},u=d=>{s||l(d);for(let h=0;h<s.length;h++){const[p,b]=s[h],v=c(d,p,b);this._propagate(v)}},f=d=>{l(d),u(d),this.handle=u};this.handle=f,this.beginBatch=d=>{V1(d)&&(this.handle=f),super.beginBatch(d)}}}class gB extends wt{get behavior(){return kr}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?O0(e.sort.field,e.sort.order):void 0,o=e.field?Ze(e.field):()=>1,i=e.groupby.map(u=>Ze(u)),s=OA(this.buffer,u=>i.map(f=>f(u)).join()).map(u=>u[1]);let a=u=>!0;if(e.baseField){const u=Ze(e.baseField);a=f=>u(f)!==null}let c,l;switch(e.offset){case"normalize":c=(u,f)=>u/f,l=(u,f)=>ms(u,f);break;case"center":c=(u,f)=>u-f/2,l=(u,f)=>ms(u,f);break;case"information":{const u=Math.log2(e.cardinality??4);c=(f,d)=>f/d,l=(f,d)=>{const p=ms(f,A=>+!a(A)),b=ms(f,d),v=b-p;let y=0;for(let A=0;A<f.length;A++){const S=f[A];if(a(S)){const E=d(S)/v;y-=E*Math.log2(E)}}return v/(u-(y+0))*(v/b)}}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 mB extends wt{get behavior(){return Gn}constructor(e){super(e),this.params=e;const n=Ze(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 uy={count:t=>t.length,valid:_A,sum:ms,min:Fu,max:Ru,mean:VA,median:qA,variance:RA};class bB extends wt{get behavior(){return Gn}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=Ze(n),i=uy[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=>uy.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=>Ze(i)),o=dc(this.buffer,...r);for(const[i,s]of Vh(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 yB={aggregate:bB,collect:ay,coverage:ZD,filterScoredLabels:JD,filter:$D,flatten:nB,flattenCompressedExons:oB,flattenDelimited:sB,flattenSequence:mB,formula:cB,identifier:vh,linearizeGenomicCoordinate:cy,measureText:lB,pileup:fB,project:hB,regexExtract:dB,regexFold:pB,sample:_b,stack:gB};function wB(t,e){const n=yB[t.type];if(n)return new n(t,e);throw new Error("Unknown transform: "+t.type)}function fy(t,e=[]){if(!py(t)&&!dy(t))return;const n={...t.format};if(n.type??(n.type=dy(t)&&vB(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 xB(t){var e;return((e=Qu(t))==null?void 0:e.responseType)??"text"}function vB(t){var e;if(Array.isArray(t)&&(t=t[0]),t)return(e=t.match(/\.(csv|tsv|json)/))==null?void 0:e[1]}const hy=t=>typeof t!="object"?AB:EB,AB=t=>({data:t}),EB=t=>t;function dy(t){return"url"in t}class go extends xh{constructor(n){super();Ut(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 py(t){return"values"in t}class SB extends go{constructor(n,r){var o;super(r);ge(this,qa);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){de(this,qa,T0).call(this,n)}loadSynchronously(){de(this,qa,T0).call(this,this.params.values)}async load(){this.loadSynchronously()}}qa=new WeakSet,T0=function(n){let r=[],o=i=>i;if(Array.isArray(n))n.length>0&&(r=n,o=hy(n[0]));else if(typeof n=="object")r=[n];else if(typeof n=="string")r=Zu(n,fy(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 CB(t){return"url"in t}class IB extends go{constructor(n,r){super(r);ge(this,lu);this.params=xl(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=un(this.params.url),r=typeof n=="object"&&"urlsFromFile"in n?await de(this,lu,yv).call(this,n):(Array.isArray(n)?n:[n]).map(c=>wi(this.baseUrl,c)),o=fy(this.params,r),i=xB(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=Zu(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()}}lu=new WeakSet,yv=async function(n){const r=wi(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 Zu(i,{type:n.type??"tsv"}).map(a=>typeof a=="string"?a:a.url).map(a=>wi(r,a))};function TB(t){return"sequence"in t}class DB extends go{constructor(e,n){if(super(n),this.sequence=xl(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=un(this.sequence.as)??"data",n=un(this.sequence.start)??0,r=un(this.sequence.step)??1,o=un(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 qh extends go{constructor(n,r){super(n);Ut(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 tn||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(),zh(this.view)}}class BB extends qh{constructor(n,r){const o={...n};super(r,o.channel);Ut(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*H1(100,700,l),s=Gt(o.tickCount)?o.tickCount:Math.round(r/i(r)),a=Fb(n,s,o.tickMinStep),c=o.values?Mb(n,o.values,a):tD(n,a);if(this.ticks==null||!Dc(c,this.ticks)){this.ticks=c;const l=rD(n,s,o.format);this.publishData([c.map(u=>({value:u,label:l(u)}))])}}}class kB extends qh{constructor(e,n){super(n,e.channel)}get label(){return"axisGenomeSource"}async load(){this.publishData([this.genome.chromosomes])}}function Bl(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 wa extends qh{constructor(){super(...arguments);ge(this,jo,new AbortController);ge(this,Wo,[0,0]);ge(this,Yo,[0,0]);ge(this,ja,0);Ut(this,"params")}setupDebouncing(n){const r=()=>un(n.debounce),o=n.debounceMode;if(o=="domain")this.onDomainChanged=Bl(this.onDomainChanged.bind(this),r,!1);else if(o=="window")this.loadInterval=Bl(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+o)}onDomainChanged(n){var o;Te(this,Yo,n);const r=un((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=W(this,Yo);Te(this,Yo,[0,0]),Te(this,Wo,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){W(this,jo).abort(),this.setLoadingStatus("loading"),Te(this,jo,new AbortController);const o=W(this,jo).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=W(this,Wo);(r!==W(this,ja)||i[0]<s[0]||i[1]>s[1])&&(Te(this,Wo,i),Te(this,ja,r),o(i))}}jo=new WeakMap,Wo=new WeakMap,Yo=new WeakMap,ja=new WeakMap;class _B extends wa{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(()=>b_),Promise.resolve().then(()=>O_),Promise.resolve().then(()=>Ea)]).then(([{Buffer:i},{IndexedFasta:s},{RemoteFile:a}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=i));const c=l=>new a(ba(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 RB extends wa{constructor(n,r){const o={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},i=xl(r.paramMediator,o,s=>{s.includes("url")?de(this,Wa,D0).call(this).then(()=>this.reloadLastDomain()):s.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,i.channel);ge(this,Wa);ge(this,Qo,[]);ge(this,Zo);if(this.params=i,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),de(this,Wa,D0).call(this)}get label(){return"bigWigSource"}async onDomainChanged(n){await this.initializedPromise;const r=this.scaleResolution.getAxisLength()||700,o=FB(n,r,W(this,Qo)),i=Math.max(o*r,5e3);this.callIfWindowsChanged(n,i,s=>this.loadInterval(s,o))}async loadInterval(n,r){const o=.5/r/un(this.params.pixelsPerBin),i=await this.discretizeAndLoad(n,(s,a)=>W(this,Zo).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)}}Qo=new WeakMap,Zo=new WeakMap,Wa=new WeakSet,D0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>Yw),Promise.resolve().then(()=>Ea)]).then(([{BigWig:o},{RemoteFile:i}])=>{Te(this,Zo,new o({filehandle:new i(ba(un(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),W(this,Zo).getHeader().then(s=>{Te(this,Qo,s.zoomLevels.map(a=>a.reductionLevel).reverse()),W(this,Qo).push(1),this.setLoadingStatus("complete"),n()}).catch(s=>{this.load(),this.setLoadingStatus("error",`${un(this.params.url)}: ${s.message}`),r(s)})})}),this.initializedPromise};function FB(t,e,n){const r=(t[1]-t[0])/e;return n.find(o=>o<r)??n.at(-1)}class MB extends wa{constructor(n,r){const o={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},i=xl(r.paramMediator,o,s=>{s.includes("url")?de(this,Ya,B0).call(this).then(()=>this.reloadLastDomain()):s.includes("windowSize")&&this.reloadLastDomain()});super(r,i.channel);ge(this,Ya);Ut(this,"parser");Ut(this,"bbi");Ut(this,"parseLine");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),de(this,Ya,B0).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)}}Ya=new WeakSet,B0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>KF),Promise.resolve().then(()=>Yw),Promise.resolve().then(()=>Ea)]).then(([o,{BigBed:i},{RemoteFile:s}])=>{const a=o.default;this.bbi=new i({filehandle:new s(ba(un(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=PB(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",`${un(this.params.url)}: ${c.message}`),r(c)})})}),this.initializedPromise};function PB(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(`
|
|
519
544
|
const emptyString = "";
|
|
520
545
|
return function makeTemplate(chrom, chromStart, chromEnd) {
|
|
521
546
|
return {
|
|
522
547
|
chrom,
|
|
523
548
|
chromStart,
|
|
524
549
|
chromEnd,
|
|
525
|
-
${
|
|
550
|
+
${d.join(`,
|
|
526
551
|
`)}
|
|
527
552
|
}
|
|
528
|
-
};`)(),p=e.map(A=>{const
|
|
553
|
+
};`)(),p=e.map(A=>{const S=A.type,E=JSON.stringify(A.name);if(["ubyte","int","uint"].includes(S))return`d[${E}] = parseInt();`;if(A.isNumeric)return`d[${E}] = Number(parseString());`;if(["char","string","lstring"].includes(S))return`d[${E}] = parseString();`;throw new Error("Unsupported type: "+S)}),b=LB(p,50).map((A,S)=>Function("parseInt","parseString",`return function parseFieldChunk${S}(d) {
|
|
529
554
|
${A.join(`
|
|
530
555
|
`)}
|
|
531
|
-
}`)(f,u));function v(A){r=A,o=A.length,n=0}function
|
|
532
|
-
`),{parseSequences:!1})}}
|
|
533
|
-
`)+" };");return n.properties=e,n}function Jb(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 yl extends wt{constructor(){super({type:"clone"});ve(this,Oo);ve(this,Na,n=>n);const n=r=>{const o=Jb(r);(!X(this,Oo)||!gc(o,X(this,Oo)))&&(Pe(this,Oo,o),Pe(this,Na,BB(r)));const i=X(this,Na);this.handle=s=>this._propagate(i(s)),this.handle(r)};this.handle=n,this.beginBatch=r=>{B1(r)&&(this.handle=n),super.beginBatch(r)}}get behavior(){return On}}Oo=new WeakMap,Na=new WeakMap;function _B(t){return"name"in t}class $b extends ao{constructor(n,r,o){super(r);ve(this,Oa);this.provider=o,this.params=n}get identifier(){return this.params.name}get label(){return"namedSource"}updateDynamicData(n){Pe(this,Oa,n),this.loadSynchronously()}loadSynchronously(){const n=X(this,Oa)??this.provider(this.params.name)??[];let r=o=>o;if(Array.isArray(n))n.length>0&&(r=Yb(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()}}Oa=new WeakMap;class e2{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 $b&&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 kB(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 t2(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=t2(s,e,n);if(a==="stop")return a}return(i=e.postOrder)==null?void 0:i.call(e,t)}function RB(t,e){return t2(t,e,n=>n.children)}function FB(t,e){const n=[],r=[];let o;const i=e??new e2,s=[];function a(d,p=()=>{}){if(!o)throw p()||new Error("Cannot append data flow node, no parent exist!");return o.addChild(d),o=d,n.push(d),d}function c(d,p){return a(d,()=>new Error("Cannot append a transform because no (inherited) data are available! "))}function l(d,p){for(const y of d){let v;try{v=KD(y,p)}catch(b){throw console.warn(b),new Error(`Cannot initialize "${y.type}" transform: ${b}`)}v.behavior&Br&&c(new yl),c(v)}}function u(){return n.findLastIndex(d=>d instanceof sh)>n.findLastIndex(d=>d instanceof ao)}const f=d=>{if(d.spec.data){const p=_B(d.spec.data)?new $b(d.spec.data,d,d.context.getNamedDataFromProvider):yB(d.spec.data,d);o=p,n.push(p),i.addDataSource(p,d)}if(d.spec.transform&&l(d.spec.transform,d),d instanceof $t){if(!o)throw new Error(`A unit view (${d.getPathString()}) has no (inherited) data source`);const p=MB(d);if(p){s.push(p.rewrite);for(const v of p.transforms)c(v)}d.mark.isPickingParticipant()&&!u()&&(c(new yl),c(new sh({type:"identifier"})));const y=new Vb({type:"collect",groupby:d.getFacetFields(),sort:PB(d,p==null?void 0:p.rewrittenEncoding)});a(y),i.addCollector(y,d)}},h=kB(t.getDescendants(),d=>d.dataParent);for(const d of h)RB(d,{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(d=>d()),i}function MB(t){var i;const e=[],n={},r=[];for(const[s,a]of Object.entries(t.getEncoding())){const c=s;Ws(c)&&U1(a)&&r.push({channel:c,chromPosDef:a})}const o=ec(r,s=>di(s.channel),s=>s.chromPosDef.chrom);for(const[s,a]of o.entries())for(const[c,l]of a.entries()){const u=[],f=[],h=[];for(const{channel:d,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[d])??t.getEncoding()[d]??{},field:v};delete b.chrom,delete b.pos,!b.type&&p.type&&(b.type=p.type),n[d]=b,u.push(p.pos),h.push(p.offset??0),f.push(v)}e.push(new yl),e.push(new qb({type:"linearizeGenomicCoordinate",channel:s,chrom:c,pos:u,offset:h,as:f},t))}return e.length?{transforms:e,rewrittenEncoding:n,rewrite:()=>{t.spec.encoding={...t.spec.encoding,...n},KI(t.mark,"encoding")}}:void 0}function PB(t,e){var r;const n={...t.getEncoding(),...e}.x;if(Jt(n)&&(r=t.getScaleResolution("x"))!=null&&r.isZoomable()){if(_r(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!qs(n)){if(js(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function n2(t,e=void 0){if(t.parent!==e)return!1;for(const n of t.children)if(!n2(n,t))return!1;return!0}function _h(t,e=!1){if(t.behavior&ih&&(e=!0),t instanceof yl)if(e)e=!1;else{const n=t.children[0];t.excise(),n&&_h(n,e);return}t.behavior&On&&(e=!1);for(let n=0,r=t.children.length;n<r;n++)_h(t.children[n],e||r>1)}function LB(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 NB(t){if(_h(t),!n2(t))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function OB(t){LB(t);for(const e of t.dataSources)NB(e)}function zB(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 UB(t){for(const e of oo){const n=t.getScaleResolution(e);n&&!n.name&&n.isZoomable()&&(n.name=`${e}_at_root`)}}async function GB(t,e,n){const r=t.import;if(!("url"in r))throw new Error("Not an url import: "+JSON.stringify(r));const o=ta(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=ta(Sb(r.url),i.baseUrl),i;throw new Error(`The imported spec "${o}" is not a view spec: ${JSON.stringify(t)}`)}function HB(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 Jn(t){return()=>t}const Cn=class Cn{static create(e,n,r,o){return new Cn(Jn(e),Jn(n),Jn(r),Jn(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"?Jn(o):typeof o=="function"?o:this._passThrough(r)};return new Cn(n("x"),n("y"),n("width"),n("height"))}translate(e,n){return e===0&&n===0?this:new Cn(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 Cn(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 Cn(()=>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 Cn(()=>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 Cn(Jn(this.x),Jn(this.y),Jn(this.width),Jn(this.height))}containsPoint(e,n){return e>=this.x&&e<this.x2&&n>=this.y&&n<this.y2}normalizePoint(e,n){return{x:(e-this.x)/this.width,y:(n-this.y)/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)}`}};Ut(Cn,"ZERO",Cn.create(0,0,0,0));let $n=Cn;class r2{constructor(e){this.globalOptions=e}pushView(e,n){}popView(e){}renderMark(e,n){}}class i2 extends r2{constructor(e,n){super(e),this.webGLHelper=n,this.buffer=[],this.coords=void 0,this.views=new Set}pushView(e,n){this.views.add(e),this.coords=n}renderMark(e,n){if(this.globalOptions.picking&&!e.isPickingParticipant())return;const r=e.render(n);r&&this.buffer.push({mark:e,callback:r,coords:this.coords,clipRect:n.clipRect})}render(){if(this.batch||this._buildBatch(),this.batch.length==0)return;const e=this.webGLHelper.gl,n=this.globalOptions.picking;e.bindFramebuffer(e.FRAMEBUFFER,n?this.webGLHelper._pickingBufferInfo.framebuffer:null),this.webGLHelper.clearAll();for(const r of this.views)r.onBeforeRender();for(const r of this.batch)r();n&&e.bindFramebuffer(e.FRAMEBUFFER,null)}_buildBatch(){this.batch=[];let e=!0,n=!0;const r=s=>()=>{e&&s()},o=s=>()=>{e&&n&&s()},i=ec(this.buffer.reverse(),s=>s.mark);for(const[s,a]of[...i.entries()].reverse()){if(!s.isReady())continue;this.batch.push(()=>{e=s.unitView.getEffectiveOpacity()>0}),this.batch.push(...s.prepareRender(this.globalOptions).map(l=>r(l)));let c;for(const l of a){const u=l.coords;u.equals(c)||this.batch.push(r(()=>{n=s.setViewport(u,l.clipRect)})),this.batch.push(o(l.callback)),c=l.coords}}}}class VB extends r2{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 qB{constructor(e,n){this.point=e,this.uiEvent=n,this.stopped=!1,this.target=void 0}stopPropagation(){this.stopped=!0}get type(){return this.uiEvent.type}}class zn{static fromMouseEvent(e){return new zn(e.clientX,e.clientY)}constructor(e,n){this.x=e,this.y=n}subtract(e){return new zn(this.x-e.x,this.y-e.y)}add(e){return new zn(this.x-e.x,this.y-e.y)}multiply(e){return new zn(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 jB=t=>new Promise(e=>setTimeout(e,t));function WB(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),h=y=>y*(l-c)+c,d=y=>Math.max(0,Math.min(1,y)),p=y=>{n!=null&&n.aborted?i("aborted"):(t.onUpdate(h(u(d(f(y))))),y<a?e(p):(t.onUpdate(h(u(1))),o()))};e(p)});return t.delay?n!=null&&n.aborted?Promise.reject("aborted"):jB(t.delay).then(r):r()}class QB{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 WB({requestAnimationFrame:n=>this.requestTransition(n),...e})}}function kh(t,e,n,r,o){let i=0,s=!0,a=structuredClone(o),c=a;function l(h,d,p,y){return d+(h-d)*Math.pow(2,-p/y)}function u(h){if(s)return;const d=h-i;i=h;for(const y of Object.keys(c))a[y]=l(a[y],c[y],d,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(h){c=h,s&&(s=!1,i=+document.timeline.currentTime,u(i))}return f.stop=()=>{s=!0},f}class YB{constructor(e){this.genomes=new Map,this.baseUrl=e}async initialize(e){const n=new iD(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 ZB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMhERycB36XD+hX0/DuzSlsnw3OfyilcwAA/vn/yzQQMoUHg9r59hhn7Oz/njH9ncJAiAXNj9P2qTxdhARETufgDYNs4fsH/Cv2jL53nzm1lcZH2dngKCP/Gnn/LTEiXg+Tw/Q+btvJ1+/vlPfvYz/v1vEwA26w4fs8lm4R4GgIiIAmB5GdvGnmbuh9Rq8MIXcuMGpVJ6AFhEXNwneOI//OfnSz8fL49/jI+9lJcecjjJJD15Ho8+yo9/TKUCb7J5vY1tcw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XgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",XB={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class KB{constructor(e){this._webGLHelper=e,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new Vn([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:mh(jb),texture:e?this._createTextureNow(ZB):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(e,n="normal",r="regular"){if(nt(r)&&(r=XB[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=$B(r,n),i=this.fontRepository+o2(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=>mh(r)),this._fontPromises.set(e,n)),n}_loadMetadata(e){const n=o2(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=>JB(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)=>{Cs(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=Cs(n,{src:e,min:n.LINEAR},(a,c,l)=>{a?s(a):i(c)})});return this._promises.push(o),r}}function o2(t){return t.toLowerCase().replaceAll(/[^\w]/g,"")}function JB(t){const e=t.split(`
|
|
534
|
-
`),n=[];let r;for(const o of e)if(o.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}),o.startsWith("}")&&(n.push(r),r=void 0),r){let i=o.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(i){const s=i[1];r[s]=i[2]}if(i=o.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),i){const s=i[1];r[s]=+i[2]}}return n}function
|
|
535
|
-
`))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
|
|
556
|
+
}`)(f,u));function v(A){r=A,o=A.length,n=0}function y(A,S,E,I){v(I),i=h(A,S,E);for(const _ of b)_(i);return i}return y}function LB(t,e){return Array.from({length:Math.ceil(t.length/e)},(n,r)=>t.slice(r*e,r*e+e))}class OB extends wa{constructor(n,r){const o={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,o.channel);ge(this,Ri);Ut(this,"chrPrefixFixer",n=>n);if(this.params=o,!this.params.url)throw new Error("No URL provided for BamSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>m9),Promise.resolve().then(()=>Ea)]).then(([{BamFile:s},{RemoteFile:a}])=>{const c=l=>new a(ba(l,this.view.getBaseUrl()));Te(this,Ri,new s({bamFilehandle:c(this.params.url),baiFilehandle:c(this.params.indexUrl??this.params.url+".bai")})),W(this,Ri).getHeader().then(l=>{var d,h;const u=this.genome.hasChrPrefix(),f=(h=(d=W(this,Ri).indexToChr)==null?void 0:d[0])==null?void 0:h.refName.startsWith("chr");u&&!f?this.chrPrefixFixer=p=>p.replace("chr",""):!u&&f&&(this.chrPrefixFixer=p=>"chr"+p),i()})})})}get label(){return"bamSource"}async loadInterval(n){const r=await this.discretizeAndLoad(n,async(o,i)=>W(this,Ri).getRecordsForRange(this.chrPrefixFixer(o.chrom),o.startPos,o.endPos,{signal:i}).then(s=>s.map(a=>({chrom:o.chrom,start:a.start,end:a.end,name:a.name,cigar:a.CIGAR,mapq:a.mq,strand:a.strand===1?"+":"-"}))));r&&this.publishData(r)}}Ri=new WeakMap;class gy extends wa{constructor(n,r){const o={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",addChrPrefix:!1,...n};super(r,o.channel);ge(this,Xo);if(this.params=o,!this.params.url)throw new Error("No URL provided for TabixSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(i=>{Promise.all([Promise.resolve().then(()=>I9),Promise.resolve().then(()=>Ea)]).then(async([{TabixIndexedFile:s},{RemoteFile:a}])=>{const c=u=>new a(ba(u,this.view.getBaseUrl()));Te(this,Xo,new s({filehandle:c(this.params.url),tbiFilehandle:c(this.params.indexUrl??this.params.url+".tbi"),renameRefSeqs:this.params.addChrPrefix===!0?u=>"chr"+u:this.params.addChrPrefix?u=>this.params.addChrPrefix+u:void 0}));const l=await W(this,Xo).getHeader();await this._handleHeader(l),i()})})}async loadInterval(n){await this.initializedPromise;const r=await this.discretizeAndLoad(n,async(o,i)=>{const s=[];return await W(this,Xo).getLines(o.chrom,o.startPos,o.endPos,{lineCallback:a=>{s.push(a)},signal:i}),this._parseFeatures(s)});r&&this.publishData(r)}async _handleHeader(n){}_parseFeatures(n){return[]}}Xo=new WeakMap;class NB extends gy{constructor(){super(...arguments);ge(this,Qa)}get label(){return"gff3Source"}async _handleHeader(n){Te(this,Qa,(await Promise.resolve().then(()=>j9)).default)}_parseFeatures(n){var o;return(o=W(this,Qa))==null?void 0:o.parseStringSync(n.join(`
|
|
557
|
+
`),{parseSequences:!1})}}Qa=new WeakMap;class zB extends gy{constructor(){super(...arguments);ge(this,Za)}get label(){return"vcfSource"}async _handleHeader(n){const r=(await Promise.resolve().then(()=>Q9)).default;Te(this,Za,new r({header:n}))}_parseFeatures(n){return n.map(r=>{const o=W(this,Za).parseLine(r);return delete o.GENOTYPES,o.SAMPLES=o.SAMPLES(),o})}}Za=new WeakMap;function UB(t,e){if(py(t))return new SB(t,e);if(CB(t))return new IB(t,e);if(TB(t))return new DB(t,e);if(GB(t))return XB(t.lazy,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function GB(t){return"lazy"in t}function HB(t){return(t==null?void 0:t.type)=="axisTicks"}function VB(t){return(t==null?void 0:t.type)=="axisGenome"}function qB(t){return(t==null?void 0:t.type)=="indexedFasta"}function jB(t){return(t==null?void 0:t.type)=="bigwig"}function WB(t){return(t==null?void 0:t.type)=="bigbed"}function YB(t){return(t==null?void 0:t.type)=="bam"}function QB(t){return(t==null?void 0:t.type)=="gff3"}function ZB(t){return(t==null?void 0:t.type)=="vcf"}function XB(t,e){if(HB(t))return new BB(t,e);if(VB(t))return new kB(t,e);if(qB(t))return new _B(t,e);if(jB(t))return new RB(t,e);if(WB(t))return new MB(t,e);if(YB(t))return new OB(t,e);if(QB(t))return new NB(t,e);if(ZB(t))return new zB(t,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function KB(t){const e=my(t).filter(r=>typeof r=="string"),n=new Function("source","return { "+e.map(r=>JSON.stringify(r)).map(r=>`${r}: source[${r}]`).join(`,
|
|
558
|
+
`)+" };");return n.properties=e,n}function my(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 kl extends wt{constructor(){super({type:"clone"});ge(this,Ko);ge(this,Xa,n=>n);const n=r=>{const o=my(r);(!W(this,Ko)||!Dc(o,W(this,Ko)))&&(Te(this,Ko,o),Te(this,Xa,KB(r)));const i=W(this,Xa);this.handle=s=>this._propagate(i(s)),this.handle(r)};this.handle=n,this.beginBatch=r=>{V1(r)&&(this.handle=n),super.beginBatch(r)}}get behavior(){return Gn}}Ko=new WeakMap,Xa=new WeakMap;function JB(t){return"name"in t}class by extends go{constructor(n,r,o){super(r);ge(this,Ka);this.provider=o,this.params=n}get identifier(){return this.params.name}get label(){return"namedSource"}updateDynamicData(n){Te(this,Ka,n),this.loadSynchronously()}loadSynchronously(){const n=W(this,Ka)??this.provider(this.params.name)??[];let r=o=>o;if(Array.isArray(n))n.length>0&&(r=hy(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()}}Ka=new WeakMap;class yy{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 by&&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 $B(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 wy(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=wy(s,e,n);if(a==="stop")return a}return(i=e.postOrder)==null?void 0:i.call(e,t)}function ek(t,e){return wy(t,e,n=>n.children)}function tk(t,e){const n=[],r=[];let o;const i=e??new yy,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 b of h){let v;try{v=wB(b,p)}catch(y){throw console.warn(y),new Error(`Cannot initialize "${b.type}" transform: ${y}`)}v.behavior&kr&&c(new kl),c(v)}}function u(){return n.findLastIndex(h=>h instanceof vh)>n.findLastIndex(h=>h instanceof go)}const f=h=>{if(h.spec.data){const p=JB(h.spec.data)?new by(h.spec.data,h,h.context.getNamedDataFromProvider):UB(h.spec.data,h);o=p,n.push(p),i.addDataSource(p,h)}if(h.spec.transform&&l(h.spec.transform,h),h instanceof tn){if(!o)throw new Error(`A unit view (${h.getPathString()}) has no (inherited) data source`);const p=nk(h);if(p){s.push(p.rewrite);for(const v of p.transforms)c(v)}h.mark.isPickingParticipant()&&!u()&&(c(new kl),c(new vh({type:"identifier"})));const b=new ay({type:"collect",groupby:h.getFacetFields(),sort:rk(h,p==null?void 0:p.rewrittenEncoding)});a(b),i.addCollector(b,h)}},d=$B(t.getDescendants(),h=>h.dataParent);for(const h of d)ek(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 nk(t){var i;const e=[],n={},r=[];for(const[s,a]of Object.entries(t.getEncoding())){const c=s;sa(c)&&ib(a)&&r.push({channel:c,chromPosDef:a})}const o=dc(r,s=>bi(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 b=A=>A.replace(/[^A-Za-z0-9_]/g,""),v=["_linearized_",b(p.chrom),"_",b(p.pos)].join(""),y={...((i=t.spec.encoding)==null?void 0:i[h])??t.getEncoding()[h]??{},field:v};delete y.chrom,delete y.pos,!y.type&&p.type&&(y.type=p.type),n[h]=y,u.push(p.pos),d.push(p.offset??0),f.push(v)}e.push(new kl),e.push(new cy({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},ST(t.mark,"encoding")}}:void 0}function rk(t,e){var r;const n={...t.getEncoding(),...e}.x;if(en(n)&&(r=t.getScaleResolution("x"))!=null&&r.isZoomable()){if(_r(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 xy(t,e=void 0){if(t.parent!==e)return!1;for(const n of t.children)if(!xy(n,t))return!1;return!0}function jh(t,e=!1){if(t.behavior&wh&&(e=!0),t instanceof kl)if(e)e=!1;else{const n=t.children[0];t.excise(),n&&jh(n,e);return}t.behavior&Gn&&(e=!1);for(let n=0,r=t.children.length;n<r;n++)jh(t.children[n],e||r>1)}function ik(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 ok(t){if(jh(t),!xy(t))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function sk(t){ik(t);for(const e of t.dataSources)ok(e)}function ak(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 ck(t){for(const e of uo){const n=t.getScaleResolution(e);n&&!n.name&&n.isZoomable()&&(n.name=`${e}_at_root`)}}async function lk(t,e,n){const r=t.import;if(!("url"in r))throw new Error("Not an url import: "+JSON.stringify(r));const o=wi(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=wi(Hb(r.url),i.baseUrl),i;throw new Error(`The imported spec "${o}" is not a view spec: ${JSON.stringify(t)}`)}function uk(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 er(t){return()=>t}const Dn=class Dn{static create(e,n,r,o){return new Dn(er(e),er(n),er(r),er(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"?er(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(er(this.x),er(this.y),er(this.width),er(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)}`}};Ut(Dn,"ZERO",Dn.create(0,0,0,0));let Hn=Dn;class vy{constructor(e){this.globalOptions=e}pushView(e,n){}popView(e){}renderMark(e,n){}}class Ay extends vy{constructor(e,n){super(e),this.webGLHelper=n,this.buffer=[],this.coords=void 0,this.views=new Set}pushView(e,n){this.views.add(e),this.coords=n}renderMark(e,n){if(this.globalOptions.picking&&!e.isPickingParticipant())return;const r=e.render(n);r&&this.buffer.push({mark:e,callback:r,coords:this.coords,clipRect:n.clipRect})}render(){if(this.batch||this._buildBatch(),this.batch.length==0)return;const e=this.webGLHelper.gl,n=this.globalOptions.picking;e.bindFramebuffer(e.FRAMEBUFFER,n?this.webGLHelper._pickingBufferInfo.framebuffer:null),this.webGLHelper.clearAll();for(const r of this.views)r.onBeforeRender();for(const r of this.batch)r();n&&e.bindFramebuffer(e.FRAMEBUFFER,null)}_buildBatch(){this.batch=[];let e=!0,n=!0;const r=s=>()=>{e&&s()},o=s=>()=>{e&&n&&s()},i=dc(this.buffer.reverse(),s=>s.mark);for(const[s,a]of[...i.entries()].reverse()){if(!s.isReady())continue;this.batch.push(()=>{e=s.unitView.getEffectiveOpacity()>0}),this.batch.push(...s.prepareRender(this.globalOptions).map(l=>r(l)));let c;for(const l of a){const u=l.coords;u.equals(c)||this.batch.push(r(()=>{n=s.setViewport(u,l.clipRect)})),this.batch.push(o(l.callback)),c=l.coords}}}}class fk extends vy{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 hk{constructor(e,n){this.point=e,this.uiEvent=n,this.stopped=!1,this.target=void 0}stopPropagation(){this.stopped=!0}get type(){return this.uiEvent.type}}class Kt{static fromMouseEvent(e){return new Kt(e.clientX,e.clientY)}constructor(e,n){this.x=e,this.y=n}subtract(e){return new Kt(this.x-e.x,this.y-e.y)}add(e){return new Kt(this.x-e.x,this.y-e.y)}multiply(e){return new Kt(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 dk=t=>new Promise(e=>setTimeout(e,t));function pk(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||(b=>b),f=b=>(b-s)/(a-s),d=b=>b*(l-c)+c,h=b=>Math.max(0,Math.min(1,b)),p=b=>{n!=null&&n.aborted?i("aborted"):(t.onUpdate(d(u(h(f(b))))),b<a?e(p):(t.onUpdate(d(u(1))),o()))};e(p)});return t.delay?n!=null&&n.aborted?Promise.reject("aborted"):dk(t.delay).then(r):r()}class gk{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 pk({requestAnimationFrame:n=>this.requestTransition(n),...e})}}function Wh(t,e,n,r,o){let i=0,s=!0,a=structuredClone(o),c=a;function l(d,h,p,b){return h+(d-h)*Math.pow(2,-p/b)}function u(d){if(s)return;const h=d-i;i=d;for(const b of Object.keys(c))a[b]=l(a[b],c[b],h,n);e(a);let p=-1/0;for(const b of Object.keys(c))p=Math.max(p,Math.abs(c[b]-a[b]));p<r?(a=c,e(a),s=!0,p!=0&&t.requestRender()):t.requestTransition(b=>u(b))}function f(d){c=d,s&&(s=!1,i=+document.timeline.currentTime,u(i))}return f.stop=()=>{s=!0},f}class mk{constructor(e){this.genomes=new Map,this.baseUrl=e}async initialize(e){const n=new ID(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 bk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAA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5cYNgkEQCnvFSXs7OnZvodNMpK5MG6OUdG+nrkwa49YB9+9gwzJ0/BoPBCMDwcOLllxOBQAKYnOTmTS5cgPx8mpupq8Pn4xHj9bq5IHn9QDicmguqryczSuAfIdtAGuG/IDMYDFsEIwCz44noaOLPv5GYgOlpgkGorKSzjWPHlHbZLAGwH9a0RBpgWehBNNoPebK+pAbU1LAeDAaDwZDLKzBEYiiRCCTiTZU3pjsRh4upqmL/fo4epaODR4vFMs88Q1kZgQCxGLZ9DXIdGbhDZy579mAwGAyGrMnloxAhPhSPBw4n7lYjV2tZFBWhCKC+Xsv/x5xuLy1FtsxlRwAgF05BBevBYDAYTAqojETZc4m25xLRKDMzSAC2b6ekhCeS88sCoOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",yk={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class wk{constructor(e){this._webGLHelper=e,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new jn([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:Rh(ly),texture:e?this._createTextureNow(bk):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(e,n="normal",r="regular"){if(nt(r)&&(r=yk[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=vk(r,n),i=this.fontRepository+Ey(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=>Rh(r)),this._fontPromises.set(e,n)),n}_loadMetadata(e){const n=Ey(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=>xk(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)=>{Ns(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=Ns(n,{src:e,min:n.LINEAR},(a,c,l)=>{a?s(a):i(c)})});return this._promises.push(o),r}}function Ey(t){return t.toLowerCase().replaceAll(/[^\w]/g,"")}function xk(t){const e=t.split(`
|
|
559
|
+
`),n=[];let r;for(const o of e)if(o.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}),o.startsWith("}")&&(n.push(r),r=void 0),r){let i=o.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(i){const s=i[1];r[s]=i[2]}if(i=o.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),i){const s=i[1];r[s]=+i[2]}}return n}function vk(t,e){let n,r=Number.POSITIVE_INFINITY;for(const o of t)if(e.family.localeCompare(o.name,void 0,{sensitivity:"accent"})==0&&e.style==o.style){const i=Math.abs(e.weight-o.weight);i<r&&(r=i,n=o)}return n==null?void 0:n.filename}function Ak(t,e){const n=[];let r;for(const o of t.split(`
|
|
560
|
+
`))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 Ek{constructor(e,n){this.animator=e,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=Wh(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=z0([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 Sk(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 Sy=new Map;async function Ck(t,e,n){const r=t.symbol;let o=Sy.get(r)??await Dk(t.symbol);return o?(Sy.set(r,o),ot`
|
|
536
561
|
<div class="title">
|
|
537
562
|
<strong>${o.name}</strong>
|
|
538
563
|
${o.description}
|
|
539
564
|
</div>
|
|
540
565
|
<p class="summary">${o.summary}</p>
|
|
541
566
|
<p class="source">Source: NCBI RefSeq Gene</p>
|
|
542
|
-
`):null}async function
|
|
567
|
+
`):null}async function Ik(t){console.log("Searching: "+t);const e={mode:"cors"},r=(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&term=${t}[GENE]&sort=relevance&retmode=json`,e).then(o=>o.json())).esearchresult.idlist[0];return r?(await fetch(`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id=${r}&retmode=json`,e).then(s=>s.json())).result[r]:null}const Tk=Bl(Ik,500);function Dk(t){return Tk(t)}const Bk=Bt(".4~r"),kk=Bt(".4~e");function Cy(t){return t==null?ot` <span class="na">NA</span> `:nt(t)?t.substring(0,30):Number.isInteger(t)?""+t:Gt(t)?Math.abs(t)>Math.pow(10,8)||Math.abs(t)<Math.pow(10,-8)?kk(t):Bk(t):is(t)?t?"True":"False":Dt(t)?ot`${t.map((e,n)=>[Cy(e),n<t.length-1?", ":pt])}`:"?"+typeof t+" "+t}async function _k(t,e,n){const r=(l,u)=>{var f;for(const[d,h]of Object.entries(e.encoders))if((f=h==null?void 0:h.dataAccessor)!=null&&f.fields.includes(l))switch(d){case"color":case"fill":case"stroke":return ot`
|
|
543
568
|
<span
|
|
544
569
|
class="color-legend"
|
|
545
|
-
style=${`background-color: ${
|
|
570
|
+
style=${`background-color: ${h(u)}`}
|
|
546
571
|
></span>
|
|
547
|
-
`}return""},o=(l,u)=>{const f=l.filter(([h
|
|
572
|
+
`}return""},o=(l,u)=>{const f=l.filter(([d,h])=>!d.startsWith("_"));if(f.length!==0)return f.map(([d,h])=>h!==null&&typeof h=="object"&&!Array.isArray(h)?ot`${o(Object.entries(h),(u||"")+d+".")}`:ot`
|
|
548
573
|
<tr>
|
|
549
|
-
<th>${u}${
|
|
550
|
-
<td>${
|
|
574
|
+
<th>${u}${d}</th>
|
|
575
|
+
<td>${Cy(h)} ${r(d,t)}</td>
|
|
551
576
|
</tr>
|
|
552
577
|
`)},i=o(Object.entries(t));if(!i)return;const s=ot`
|
|
553
578
|
<table class="attributes">
|
|
@@ -557,14 +582,14 @@ chrM 16299`};function nD(t){if(!(t in Eb))throw new Error(`Unknown assembly: ${t
|
|
|
557
582
|
<div class="title">
|
|
558
583
|
<strong>${a}</strong>
|
|
559
584
|
</div>
|
|
560
|
-
`:"";return ot`${c}${s}`}class aa extends zb{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===oa)return n;if(n!==xD){e.beforeChildren&&e.beforeChildren(this);for(const r of this){const o=r.visit(e);if(o===oa)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 aa)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,oa}),n}getDefaultResolution(e,n){return"shared"}}class ca extends aa{constructor(n,r,o,i,s,a){super(n,r,o,i,s,{layersChildren:!0,...a});ve(this,or,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){Pe(this,or,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,o=>{if(!Nh(o)&&!Lh(o))throw new gi("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return X(this,or).slice()}*[Symbol.iterator](){for(const n of X(this,or))yield n}render(n,r,o={}){if(super.render(n,r,o),!!this.isConfiguredVisible()){n.pushView(this,r);for(const i of X(this,or))i.render(n,r,o);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=X(this,or).length-1;r>=0;r--)if(X(this,or)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}or=new WeakMap;class c2{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 u_="chromosome_ticks_and_labels",f_={x:"width",y:"height"};function Rh(t){return t=="x"?"y":"x"}const wl={x:["bottom","top"],y:["left","right"]},Fh=Object.fromEntries(Object.entries(wl).map(([t,e])=>e.map(n=>[n,t])).flat(1));function Fr(t){return Fh[t]}class l2 extends ca{constructor(e,n,r,o,i,s){const a=n=="locus",c={...a?d_:u2,...h_(n,e),...e};super(a?p_(c,n):f2(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 Fh[this.axisProps.orient]=="x"?new Rr(n,e):new Rr(e,n)}getPerpendicularSize(){return Mh(this.axisProps)}isPickingSupported(){return!1}}function Mh(t){const e=Fr(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 u2={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 h_(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 f2(t,e){const n={...t,extent:Mh(t)},r=Fr(n.orient),o=Rh(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 d={name:"ticks_and_labels",encoding:{[r]:{field:"value",type:e}},layer:[]};return n.ticks&&d.layer.push(l()),n.labels&&d.layer.push(c()),d},h={resolve:{scale:{[r]:"forced"}},[f_[Rh(r)]]:n.extent,data:{lazy:{type:"axisTicks",channel:r,axis:t}},layer:[]};return n.domain&&h.layer.push(a()),(n.ticks||n.labels)&&h.layer.push(f()),n.title&&h.layer.push(u()),h}const d_={...u2,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 p_(t,e){const n={...t,extent:Mh(t)},r=Fr(n.orient),o=Rh(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=f2({...t,...c},e);if(t.chromTicks||t.chromLabels){const u={name:u_,data:{lazy:{type:"axisGenome",channel:Fr(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(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(d=>d.name=="labels").forEach(d=>{f=d.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 g_ extends ca{constructor(e,n,r,o,i,s){const c={...n=="locus"?m_:h2,...e};super(x_(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 h2={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},m_={...h2,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function b_(t,e){const n=t,r=Fr(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 y_(t,e){const n=t,r=Fr(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 w_(t,e){const n=t,r=Fr(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 x_(t,e){const n={...t},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(w_(n,e)),n.chromGrid&&n.chromGridOpacity>0&&r.push(y_(n,e)),n.grid&&n.gridOpacity>0&&r.push(b_(n,e)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Fr(t.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const d2={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"},v_={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},A_={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},E_={start:0,middle:.5,end:1},S_={start:"left",middle:"center",end:"right"};function C_(t){if(!t)return;const e=nt(t)?{text:t}:t;if(!e.text||e.orient=="none")return;const n={"track-title":v_,overlay:A_}[e.style]??{},r={...d2,...n,...e};let o={},i={x:0,y:0};const s=E_[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={...d2,...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??S_[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 I_{constructor(e){ve(this,Di);ve(this,Or,0);ve(this,zr,0);Pe(this,Di,new Array(e))}push(e){X(this,Di)[X(this,Or)]=e,Pe(this,Or,(X(this,Or)+1)%this.size),Pe(this,zr,Math.min(X(this,zr)+1,this.size))}get(){const e=X(this,Di);return X(this,zr)<this.size?e.slice(0,X(this,zr)):e.slice(X(this,Or),this.size).concat(e.slice(0,X(this,Or)))}get size(){return X(this,Di).length}get length(){return X(this,zr)}}Di=new WeakMap,Or=new WeakMap,zr=new WeakMap;let mi,p2=0;function g2(){return performance.now()-p2<50}function T_(t){return function(...e){p2=performance.now(),t(...e)}}function D_(t,e,n,r,o){if(n=T_(n),t.type=="wheel"){t.uiEvent.preventDefault();const i=t.uiEvent,s=i.deltaMode?120:1;if(!i.deltaX&&!i.deltaY)return;mi==null||mi.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.uiEvent.button===0){mi&&mi.stop();const i=new I_(30),s=t.uiEvent;s.preventDefault();let a=zn.fromMouseEvent(s);const c=f=>{const h=zn.fromMouseEvent(f);i.push({point:h,timestamp:performance.now()});const d=h.subtract(a);n({x:a.x,y:a.y,xDelta:d.x,yDelta:d.y,zDelta:0}),a=h},l=()=>{const h=performance.now(),d=i.get().filter(C=>h-C.timestamp<160);if(d.length<5||!o||B_(d))return;const p=d.at(-1),y=d[0],v=p.point.subtract(y.point).multiply(1/(p.timestamp-y.timestamp));let b=a.x,A=a.y;mi=kh(o,C=>{n({x:C.x,y:C.y,xDelta:b-C.x,yDelta:A-C.y,zDelta:0}),b=C.x,A=C.y},150,.5,{x:b,y:A}),mi({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 B_(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 __ extends aa{constructor(n,r,o,i,s,a,c){super(n,r,o,i,s,c);ve(this,Ve);ve(this,zo,1/0);ve(this,Uo,10);ve(this,nn,[]);ve(this,Bi,{});ve(this,Go,0);this.spec=n,Pe(this,Uo,n.spacing??10),Pe(this,zo,a),Pe(this,nn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),X(this,nn).push(new b2(n,this,X(this,Go))),Vx(this,Go)._++}setChildren(n){Pe(this,nn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const o=X(this,nn).findIndex(i=>i.view==n);if(o>=0)X(this,nn)[o]=new b2(r,this,X(this,Go));else throw new Error("Not my child view!")}get children(){return X(this,nn).map(n=>n.view)}get childCount(){return X(this,nn).length}async createAxes(){const n=[];for(const r of oo){const o=this.resolutions.axis[r];if(o){const i=o.getAxisProps();if(i){const s={title:o.getTitle(),orient:wl[r][0],...i},a=new l2(s,o.scaleResolution.type,this.context,this,this);n.push(a.initializeChildren()),X(this,Bi)[r]=a}}}return Promise.all([...n,...X(this,nn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of X(this,nn))yield*n.getChildren();for(const n of Object.values(X(this,Bi)))yield n}getOverhang(){return he(this,Ve,$x).call(this).union(he(this,Ve,$l).call(this))}getSize(){return this._cache("size",()=>new Rr(he(this,Ve,m0).call(this,"column"),he(this,Ve,m0).call(this,"row")).addPadding(he(this,Ve,$l).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(he(this,Ve,$l).call(this)),n.pushView(this,r);const i={devicePixelRatio:this.context.devicePixelRatio},s=Pb(he(this,Ve,g0).call(this,"column"),r.width,i),a=Pb(he(this,Ve,g0).call(this,"row"),r.height,i),c=new c2(X(this,Ve,Ri).length,X(this,zo)??1/0),l=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,f]of X(this,Ve,Ri).entries()){const{view:h,axes:d,gridLines:p,background:y,backgroundStroke:v,title:b}=f,[A,C]=c.getCellCoords(u),E=s[he(this,Ve,b0).call(this,"column",A)],I=a[he(this,Ve,b0).call(this,"row",C)],R=h.getViewportSize(),B=h.getSize(),O=h.getOverhang(),F=E.location-O.left,P=I.location-O.top,S=(Le,j)=>(Le[j].grow?(j=="width"?E:I).size:Le[j].px)+O[j],Q=S(R,"width"),Z=S(R,"height"),ae=S(B,"width"),ce=S(B,"height"),fe=f.scrollbars.horizontal,le=f.scrollbars.vertical,Ee=fe?()=>l(fe.viewportOffset):()=>0,pe=le?()=>l(le.viewportOffset):()=>0,Ce=new $n(()=>r.x+F,()=>r.y+P,()=>Q,()=>Z),Ie=h.isScrollable(),we=Ie?new $n(()=>r.x+F-Ee(),()=>r.y+P-pe(),()=>ae,()=>ce):Ce;f.coords=Ce;const Te=o.clipRect?Ce.intersect(o.clipRect):Ce;y==null||y.render(n,Te,{...o,clipRect:void 0});for(const Le of Object.values(p))Le.render(n,Ce,o);const He=M_(h)||Ie;He&&h.render(n,we,{...o,clipRect:Te}),v==null||v.render(n,Te,{...o,clipRect:void 0});for(const[Le,j]of Object.entries(d)){const q=Le=="left"||Le=="right"?"vertical":"horizontal",re=f.scrollbars[q],$=re?Ce.modify(q=="vertical"?{y:()=>we.y,height:ce}:{x:()=>we.x,width:ae}):Ce,ue=m2($,Le,j);let L=o.clipRect;re&&(L=ue.intersect(L).intersect(re?Ce.modify(q=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),j.render(n,ue,{...o,clipRect:L})}for(const Le of Object.values(X(this,Bi))){const q=Le.axisProps.orient;(q=="left"&&A==0||q=="right"&&A==c.nCols-1||q=="top"&&C==0||q=="bottom"&&C==c.nRows-1)&&Le.render(n,m2(Ce.shrink(f.view.getOverhang()),q,Le),o)}He||h.render(n,we,o);for(const Le of Object.values(f.scrollbars))Le.updateScrollbar(Ce,we),Le.render(n,r,o);b==null||b.render(n,Ce,o)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=X(this,Ve,Ri).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;o&&(o.propagateInteractionEvent(n),(o instanceof $t||o instanceof ca)&&D_(n,r.coords,i=>he(this,Ve,ev).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"}}zo=new WeakMap,Uo=new WeakMap,nn=new WeakMap,Bi=new WeakMap,Go=new WeakMap,Ve=new WeakSet,Ri=function(){return X(this,nn).filter(n=>n.view.isConfiguredVisible())},Jx=function(){return new c2(X(this,Ve,Ri).length,X(this,zo)??1/0)},Va=function(n){const r=n=="column"?"width":"height",o=(i,s)=>i.map(a=>{const l=X(this,Ve,Ri)[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}`,()=>X(this,Ve,Jx)[n=="column"?"colIndices":"rowIndices"].map(i=>({axisBefore:o(i,0),axisAfter:o(i,1),view:bD(i.map(s=>X(this,Ve,Ri)[s].view.getViewportSize()[r]))})))},g0=function(n){const r=he(this,Ve,Va).call(this,n),o=[];o.push(ra);for(const[i,s]of r.entries())i>0&&o.push({px:X(this,Uo),grow:0}),(i==0||this.wrappingFacet)&&o.push(ra),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(ra);return o},m0=function(n){let r=0,o=0;const i=n=="row"?this.spec.height:this.spec.width;if(i||i===0)return Nb(i);const s=he(this,Ve,Va).call(this,n);for(const[a,c]of s.entries())a>0&&(o+=X(this,Uo)),(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}},b0=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},$x=function(){const n=he(this,Ve,Va).call(this,"column"),r=he(this,Ve,Va).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)},$l=function(){const n=r=>{const o=Fh[r],i=X(this,Bi)[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"))},ev=function(n,r,o){for(const[i,s]of Object.entries(F_(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){if(!(!t||!t.fill||t.fillOpacity===0))return{configurableVisibility:!1,data:{values:[{}]},mark:{color:t.fill,opacity:t.fillOpacity??1,type:"rect",clip:!1,tooltip:null,minHeight:1,minOpacity:0}}}function R_(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"}}}}function F_(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 M_(t){let e=!0;return t.visit(n=>{n instanceof $t&&e&&(e=n.mark.properties.clip===!0)}),e}function m2(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 b2{constructor(e,n,r){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.title=void 0,this.coords=$n.ZERO,e.needsAxes.x||e.needsAxes.y){const o=e.spec,i="view"in o?o==null?void 0:o.view:void 0,s=k_(i);s&&(this.background=new $t(s,n.context,n,e,"background"+r,{blockEncodingInheritance:!0}));const a=R_(i);a&&(this.backgroundStroke=new $t(a,n.context,n,e,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const c=C_(e.spec.title);if(c){const l=new $t(c,n.context,n,e,"title"+r,{blockEncodingInheritance:!0});this.title=l}}e.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new y2(this,"horizontal")),e.spec.viewportHeight!=null&&(this.scrollbars.vertical=new y2(this,"vertical"))}*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)}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 wl[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()),!wl[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 l2(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 g_(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 ca){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 $t&&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())}}class y2 extends $t{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});ve(this,Ho);ve(this,za,$n.ZERO);ve(this,Ur,0);ve(this,_i,0);Ut(this,"viewportOffset",0);this.config=o,Pe(this,Ho,r),this.interpolateViewportOffset=kh(this.context.animator,i=>{this.viewportOffset=i.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(i,s)=>{if(s.stopPropagation(),X(this,Ur)<=0)return;const a=d=>r=="vertical"?d.clientY:d.clientX,c=s.uiEvent;c.preventDefault();const l=this.scrollOffset,u=a(c),f=d=>{const p=io(a(d)-u+l,0,X(this,Ur));this.interpolateViewportOffset({x:p/X(this,Ur)*X(this,_i)})},h=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h)};document.addEventListener("mouseup",h,!1),document.addEventListener("mousemove",f,!1)})}get scrollOffset(){return this.viewportOffset/X(this,_i)*X(this,Ur)}render(n,r,o){super.render(n,X(this,za),o)}updateScrollbar(n,r){const o=this.config.scrollbarPadding,i=this.config.scrollbarSize,s=X(this,Ho)=="horizontal"?"width":"height",a=Math.min(1,n[s]/r[s]),c=n[s]-2*o,l=a*c;Pe(this,Ur,c-l),Pe(this,_i,r[s]-n[s]),this.viewportOffset=io(this.viewportOffset,0,X(this,_i)),Pe(this,za,X(this,Ho)=="vertical"?new $n(()=>n.x+n.width-i-o,()=>n.y+o+this.scrollOffset,()=>i,()=>l):new $n(()=>n.x+o+this.scrollOffset,()=>n.y+n.height-i-o,()=>l,()=>i))}}Ho=new WeakMap,za=new WeakMap,Ur=new WeakMap,_i=new WeakMap;class Ph extends __{constructor(e,n,r,o,i){super(e,n,r,o,i,Oh(e)?e.columns:xl(e)?1:1/0),this.spec=e}async initializeChildren(){const e=this.spec,n=Oh(e)?e.concat:xl(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":xl(this.spec)&&e==="x"||v2(this.spec)&&e==="y"?"shared":"independent"}}const w2="viewRoot";class P_{constructor(e={}){ve(this,Vo,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(Nh,n(ca)),this.addViewType(Lh,n($t)),this.addViewType(xl,n(Ph)),this.addViewType(v2,n(Ph)),this.addViewType(Oh,n(Ph)),this.addViewType(O_,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(e,n){X(this,Vo).set(e,n)}createView(e,n,r,o,i){for(const[s,a]of X(this,Vo))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=[...X(this,Vo).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(N_(e)){let l;if("url"in e.import)if(this.options.allowImport)l=await GB(e,o.getBaseUrl(),n);else throw new gi("Importing views is not allowed!",r);else if("template"in e.import)l=x2(e.import.template,o);else throw new Error("Invalid import: "+JSON.stringify(e));s==null||s(l),L_(l,e),a=l}else a=e;!o&&this.options.wrapRoot&&(Lh(a)||Nh(a))&&i===w2&&(a={name:"implicitRoot",vconcat:[a]});const c=this.createView(a,n,r,o,i);return c instanceof aa&&await c.initializeChildren(),c}}Vo=new WeakMap;function x2(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 x2(t,e.dataParent);throw new Error(`Cannot find template "${t}" in current view or its ancestors!`)}function L_(t,e){e.name!=null&&(t.name=e.name);const n=Dt(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 Lh(t){return"mark"in t&&(nt(t.mark)||Rt(t.mark))}function Nh(t){return"layer"in t&&Rt(t.layer)}function N_(t){return"import"in t}function xl(t){return"vconcat"in t&&Dt(t.vconcat)}function v2(t){return"hconcat"in t&&Dt(t.hconcat)}function Oh(t){return"concat"in t&&Dt(t.concat)}function O_(t){return"samples"in t&&Rt(t.samples)&&"spec"in t&&Rt(t.spec)}function z_(t){const e=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of t.paramConfigs.values()){if(!aI(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?bl(s,o.debounce,!1):s,u=`${e}-param-${i}`;if(o.input=="range")n.push(ot`<label for=${u}>${c}</label>
|
|
585
|
+
`:"";return ot`${c}${s}`}class xa extends ry{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===ya)return n;if(n!==HD){e.beforeChildren&&e.beforeChildren(this);for(const r of this){const o=r.visit(e);if(o===ya)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 xa)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,ya}),n}getDefaultResolution(e,n){return"shared"}}class mo extends xa{constructor(n,r,o,i,s,a){super(n,r,o,i,s,{layersChildren:!0,...a});ge(this,sr,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){Te(this,sr,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,o=>{if(!Jh(o)&&!Kh(o))throw new Fr("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return W(this,sr).slice()}*[Symbol.iterator](){for(const n of W(this,sr))yield n}render(n,r,o={}){if(super.render(n,r,o),!!this.isConfiguredVisible()){n.pushView(this,r);for(const i of W(this,sr))i.render(n,r,o);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=W(this,sr).length-1;r>=0;r--)if(W(this,sr)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}sr=new WeakMap;class Iy{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 Rk="chromosome_ticks_and_labels",Fk={x:"width",y:"height"};function Yh(t){return t=="x"?"y":"x"}const _l={x:["bottom","top"],y:["left","right"]},Qh=Object.fromEntries(Object.entries(_l).map(([t,e])=>e.map(n=>[n,t])).flat(1));function Pr(t){return Qh[t]}class Ty extends mo{constructor(e,n,r,o,i,s){const a=n=="locus",c={...a?Pk:Dy,...Mk(n,e),...e};super(a?Lk(c,n):By(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 Qh[this.axisProps.orient]=="x"?new Mr(n,e):new Mr(e,n)}getPerpendicularSize(){return Zh(this.axisProps)}isPickingSupported(){return!1}}function Zh(t){const e=Pr(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 Dy={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 Mk(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 By(t,e){const n={...t,extent:Zh(t)},r=Pr(n.orient),o=Yh(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"}},[Fk[Yh(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 Pk={...Dy,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 Lk(t,e){const n={...t,extent:Zh(t)},r=Pr(n.orient),o=Yh(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=By({...t,...c},e);if(t.chromTicks||t.chromLabels){const u={name:Rk,data:{lazy:{type:"axisGenome",channel:Pr(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 Ok{constructor(e){ge(this,Fi);ge(this,Hr,0);ge(this,Vr,0);Te(this,Fi,new Array(e))}push(e){W(this,Fi)[W(this,Hr)]=e,Te(this,Hr,(W(this,Hr)+1)%this.size),Te(this,Vr,Math.min(W(this,Vr)+1,this.size))}get(){const e=W(this,Fi);return W(this,Vr)<this.size?e.slice(0,W(this,Vr)):e.slice(W(this,Hr),this.size).concat(e.slice(0,W(this,Hr)))}get size(){return W(this,Fi).length}get length(){return W(this,Vr)}}Fi=new WeakMap,Hr=new WeakMap,Vr=new WeakMap;let xi,ky=0;function _y(){return performance.now()-ky<50}function Nk(t){return function(...e){ky=performance.now(),t(...e)}}function zk(t,e,n,r,o){if(n=Nk(n),t.type=="wheel"){t.uiEvent.preventDefault();const i=t.uiEvent,s=i.deltaMode?120:1;if(!i.deltaX&&!i.deltaY)return;xi==null||xi.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.uiEvent.button===0){xi&&xi.stop();const i=new Ok(30),s=t.uiEvent;s.preventDefault();let a=Kt.fromMouseEvent(s);const c=f=>{const d=Kt.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||Uk(h))return;const p=h.at(-1),b=h[0],v=p.point.subtract(b.point).multiply(1/(p.timestamp-b.timestamp));let y=a.x,A=a.y;xi=Wh(o,S=>{n({x:S.x,y:S.y,xDelta:y-S.x,yDelta:A-S.y,zDelta:0}),y=S.x,A=S.y},150,.5,{x:y,y:A}),xi({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 Uk(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 Gk extends mo{constructor(e,n,r,o,i,s){const c={...n=="locus"?Hk:Ry,...e};super(Wk(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 Ry={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},Hk={...Ry,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function Vk(t,e){const n=t,r=Pr(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 qk(t,e){const n=t,r=Pr(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 jk(t,e){const n=t,r=Pr(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 Wk(t,e){const n={...t},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(jk(n,e)),n.chromGrid&&n.chromGridOpacity>0&&r.push(qk(n,e)),n.grid&&n.gridOpacity>0&&r.push(Vk(n,e)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Pr(t.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const Fy={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"},Yk={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},Qk={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},Zk={start:0,middle:.5,end:1},Xk={start:"left",middle:"center",end:"right"};function Kk(t){if(!t)return;const e=nt(t)?{text:t}:t;if(!e.text||e.orient=="none")return;const n={"track-title":Yk,overlay:Qk}[e.style]??{},r={...Fy,...n,...e};let o={},i={x:0,y:0};const s=Zk[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={...Fy,...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??Xk[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 My extends tn{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});ge(this,Jo);ge(this,Ja,Hn.ZERO);ge(this,qr,0);ge(this,Mi,0);Ut(this,"viewportOffset",0);this.config=o,Te(this,Jo,r),this.interpolateViewportOffset=Wh(this.context.animator,i=>{this.viewportOffset=i.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(i,s)=>{if(s.stopPropagation(),W(this,qr)<=0)return;const a=h=>r=="vertical"?h.clientY:h.clientX,c=s.uiEvent;c.preventDefault();const l=this.scrollOffset,u=a(c),f=h=>{const p=lo(a(h)-u+l,0,W(this,qr));this.interpolateViewportOffset({x:p/W(this,qr)*W(this,Mi)})},d=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",d)};document.addEventListener("mouseup",d,!1),document.addEventListener("mousemove",f,!1)})}get scrollOffset(){return this.viewportOffset/W(this,Mi)*W(this,qr)}render(n,r,o){super.render(n,W(this,Ja),o)}updateScrollbar(n,r){const o=this.config.scrollbarPadding,i=this.config.scrollbarSize,s=W(this,Jo)=="horizontal"?"width":"height",a=Math.min(1,n[s]/r[s]),c=n[s]-2*o,l=a*c;Te(this,qr,c-l),Te(this,Mi,r[s]-n[s]),this.viewportOffset=lo(this.viewportOffset,0,W(this,Mi)),Te(this,Ja,W(this,Jo)=="vertical"?new Hn(()=>n.x+n.width-i-o,()=>n.y+o+this.scrollOffset,()=>i,()=>l):new Hn(()=>n.x+o+this.scrollOffset,()=>n.y+n.height-i-o,()=>l,()=>i))}}Jo=new WeakMap,Ja=new WeakMap,qr=new WeakMap,Mi=new WeakMap;class Jk extends mo{constructor(e,n,r={}){const o=n(),i=Object.keys(o.intervals);if(["x","y"].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:Py(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(Py(l))})}}function Py(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 Ly{constructor(e,n,r){ge(this,uu);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=Hn.ZERO,e.needsAxes.x||e.needsAxes.y){const o=e.spec,i="view"in o?o==null?void 0:o.view:void 0,s=$k(i);s&&(this.background=new tn(s,n.context,n,e,"background"+r,{blockEncodingInheritance:!0}));const a=e_(i);a&&(this.backgroundStroke=new tn(a,n.context,n,e,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const c=Kk(e.spec.title);if(c){const l=new tn(c,n.context,n,e,"title"+r,{blockEncodingInheritance:!0});this.title=l}}e.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new My(this,"horizontal")),e.spec.viewportHeight!=null&&(this.scrollbars.vertical=new My(this,"vertical")),de(this,uu,wv).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 _l[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()),!_l[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 Ty(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 Gk(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 mo){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 tn&&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 Ot(e("top"),e("right"),e("bottom"),e("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}uu=new WeakSet,wv=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=wl(o.select);if(!J1(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||!kt(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 b=()=>{p(Q1(s)),n(null)};this.selectionRect=new Jk(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},y=S=>{var N,M,F,C;const{intervals:E}=S,I=(Y,Q,se)=>{const oe=(ye,he)=>he==null?null:a[ye].scale(he),ae=oe("x",Y)??se,ce=oe("y",Q)??se;return e.coords.denormalizePoint(ae,ce,!0)},_=I((N=E.x)==null?void 0:N[0],(M=E.y)==null?void 0:M[0],0),B=I((F=E.x)==null?void 0:F[1],(C=E.y)==null?void 0:C[1],1);return Hn.create(_.x,_.y,B.x-_.x,B.y-_.y)};e.addInteractionEventListener("mousedown",(S,E)=>{if(E.uiEvent.button!=0)return;if(f=c?y(h()):null,f)n("grabbing"),l=!0;else{const M=E.point;if($1(h())&&(l=!0),E.uiEvent.shiftKey)b(),u=!0;else if($1(h())){const F=(C,Y)=>{e.removeInteractionEventListener("mouseup",F);const Q=Y.point;M.subtract(Q).length<2&&b()};e.addInteractionEventListener("mouseup",F);return}}E.stopPropagation();const I=E.point,_=Kt.fromMouseEvent(E.uiEvent).subtract(I),B=M=>{const F=Kt.fromMouseEvent(M).subtract(_);let C;if(f){const Y=F.subtract(I),Q=f.translate(Y.x,Y.y);C=d(v(new Kt(Q.x,Q.y)),v(new Kt(Q.x2,Q.y2)))}else C=d(v(I),v(F));for(const Y of s){const Q=a[Y],{zoomExtent:se,scale:oe}=Q,ae=C[Y];if(["index","locus"].includes(oe.type)&&(ae[0]=Math.ceil(ae[0]),ae[1]=Math.ceil(ae[1])),f){const ce=ae[1]-ae[0],ye=se[0],he=se[1];ae[0]<ye&&(ae[0]=ye,ae[1]=ye+ce),ae[1]>he&&(ae[1]=he,ae[0]=he-ce)}else ae[0]=Math.max(se[0],ae[0]),ae[1]=Math.min(se[1],ae[1]);ae[1]=Math.min(se[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.uiEvent.button==0&&l&&(E.stopPropagation(),l=!1)},!0);const A=S=>CI(h(),v(S));e.addInteractionEventListener("dblclick",(S,E)=>{A(E.point)&&(b(),E.stopPropagation())},!0),e.addInteractionEventListener("mousemove",(S,E)=>{A(E.point)?u||(c=!0,f||n("move")):(c=!1,f||n(null))})}};function $k(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 e_(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 t_ extends xa{constructor(n,r,o,i,s,a,c){super(n,r,o,i,s,c);ge(this,He);ge(this,$o,1/0);ge(this,es,10);ge(this,rn,[]);ge(this,Pi,{});ge(this,ts,0);this.spec=n,Te(this,es,n.spacing??10),Te(this,$o,a),Te(this,rn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),W(this,rn).push(new Ly(n,this,W(this,ts))),cv(this,ts)._++}setChildren(n){Te(this,rn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const o=W(this,rn).findIndex(i=>i.view==n);if(o>=0)W(this,rn)[o]=new Ly(r,this,W(this,ts));else throw new Error("Not my child view!")}get children(){return W(this,rn).map(n=>n.view)}get childCount(){return W(this,rn).length}async createAxes(){const n=[];for(const r of uo){const o=this.resolutions.axis[r];if(o){const i=o.getAxisProps();if(i){const s={title:o.getTitle(),orient:_l[r][0],...i},a=new Ty(s,o.scaleResolution.type,this.context,this,this);n.push(a.initializeChildren()),W(this,Pi)[r]=a}}}return Promise.all([...n,...W(this,rn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of W(this,rn))yield*n.getChildren();for(const n of Object.values(W(this,Pi)))yield n}getOverhang(){return de(this,He,vv).call(this).union(de(this,He,du).call(this))}getSize(){return this._cache("size",()=>new Mr(de(this,He,_0).call(this,"column"),de(this,He,_0).call(this,"row")).addPadding(de(this,He,du).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(de(this,He,du).call(this)),n.pushView(this,r);const i={devicePixelRatio:this.context.devicePixelRatio},s=$b(de(this,He,k0).call(this,"column"),r.width,i),a=$b(de(this,He,k0).call(this,"row"),r.height,i),c=new Iy(W(this,He,Oi).length,W(this,$o)??1/0),l=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,f]of W(this,He,Oi).entries()){const{view:d,axes:h,gridLines:p,background:b,backgroundStroke:v,title:y,selectionRect:A}=f,[S,E]=c.getCellCoords(u),I=s[de(this,He,R0).call(this,"column",S)],_=a[de(this,He,R0).call(this,"row",E)],B=d.getViewportSize(),N=d.getSize(),M=d.getOverhang(),F=I.location-M.left,C=_.location-M.top,Y=(q,j)=>(q[j].grow?(j=="width"?I:_).size:q[j].px)+M[j],Q=Y(B,"width"),se=Y(B,"height"),oe=Y(N,"width"),ae=Y(N,"height"),ce=f.scrollbars.horizontal,ye=f.scrollbars.vertical,he=ce?()=>l(ce.viewportOffset):()=>0,De=ye?()=>l(ye.viewportOffset):()=>0,we=new Hn(()=>r.x+F,()=>r.y+C,()=>Q,()=>se),Ee=d.isScrollable(),Ie=Ee?new Hn(()=>r.x+F-he(),()=>r.y+C-De(),()=>oe,()=>ae):we;f.coords=we;const Ge=o.clipRect?we.intersect(o.clipRect):we;b==null||b.render(n,Ge,{...o,clipRect:void 0});for(const q of Object.values(p))q.render(n,we,o);const Ve=r_(d)||Ee;Ve&&d.render(n,Ie,{...o,clipRect:Ge}),v==null||v.render(n,Ge,{...o,clipRect:void 0});for(const[q,j]of Object.entries(h)){const ee=q=="left"||q=="right"?"vertical":"horizontal",J=f.scrollbars[ee],fe=J?we.modify(ee=="vertical"?{y:()=>Ie.y,height:ae}:{x:()=>Ie.x,width:oe}):we,L=Oy(fe,q,j);let D=o.clipRect;J&&(D=L.intersect(D).intersect(J?we.modify(ee=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),j.render(n,L,{...o,clipRect:D})}for(const q of Object.values(W(this,Pi))){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,Oy(we.shrink(f.view.getOverhang()),ee,q),o)}Ve||d.render(n,Ie,o),A==null||A.render(n,Ie,o);for(const q of Object.values(f.scrollbars))q.updateScrollbar(we,Ie),q.render(n,r,o);y==null||y.render(n,we,o)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=W(this,He,Oi).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 tn||o instanceof mo)&&zk(n,r.coords,i=>de(this,He,Av).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"}}$o=new WeakMap,es=new WeakMap,rn=new WeakMap,Pi=new WeakMap,ts=new WeakMap,He=new WeakSet,Oi=function(){return W(this,rn).filter(n=>n.view.isConfiguredVisible())},xv=function(){return new Iy(W(this,He,Oi).length,W(this,$o)??1/0)},nc=function(n){const r=n=="column"?"width":"height",o=(i,s)=>i.map(a=>{const l=W(this,He,Oi)[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}`,()=>W(this,He,xv)[n=="column"?"colIndices":"rowIndices"].map(i=>({axisBefore:o(i,0),axisAfter:o(i,1),view:zD(i.map(s=>W(this,He,Oi)[s].view.getViewportSize()[r]))})))},k0=function(n){const r=de(this,He,nc).call(this,n),o=[];o.push(ma);for(const[i,s]of r.entries())i>0&&o.push({px:W(this,es),grow:0}),(i==0||this.wrappingFacet)&&o.push(ma),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(ma);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 ty(i);const s=de(this,He,nc).call(this,n);for(const[a,c]of s.entries())a>0&&(o+=W(this,es)),(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}},R0=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},vv=function(){const n=de(this,He,nc).call(this,"column"),r=de(this,He,nc).call(this,"row");return!n.length||!r.length?Ot.zero():new Ot(r.at(0).axisBefore,n.at(-1).axisAfter,r.at(-1).axisAfter,n.at(0).axisBefore)},du=function(){const n=r=>{const o=Qh[r],i=W(this,Pi)[o];return(i==null?void 0:i.axisProps.orient)!==r?0:Math.max(i.getPerpendicularSize()+(i.axisProps.offset??0),0)};return new Ot(n("top"),n("right"),n("bottom"),n("left"))},Av=function(n,r,o){for(const[i,s]of Object.entries(n_(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 n_(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 r_(t){let e=!0;return t.visit(n=>{n instanceof tn&&e&&(e=n.mark.properties.clip===!0)}),e}function Oy(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 Xh extends t_{constructor(e,n,r,o,i){super(e,n,r,o,i,$h(e)?e.columns:Rl(e)?1:1/0),this.spec=e}async initializeChildren(){const e=this.spec,n=$h(e)?e.concat:Rl(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":Rl(this.spec)&&e==="x"||Uy(this.spec)&&e==="y"?"shared":"independent"}}const Ny="viewRoot";class i_{constructor(e={}){ge(this,ns,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(Jh,n(mo)),this.addViewType(Kh,n(tn)),this.addViewType(Rl,n(Xh)),this.addViewType(Uy,n(Xh)),this.addViewType($h,n(Xh)),this.addViewType(a_,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(e,n){W(this,ns).set(e,n)}createView(e,n,r,o,i){for(const[s,a]of W(this,ns))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=[...W(this,ns).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(s_(e)){let u;if("url"in e.import)if(this.options.allowImport)u=await lk(e,o.getBaseUrl(),n);else throw new Fr("Importing views is not allowed!",r);else if("template"in e.import)u=zy(e.import.template,o);else throw new Error("Invalid import: "+JSON.stringify(e));s==null||s(u),o_(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=>tb(d)&&wl(d.select).type=="interval")};!o&&this.options.wrapRoot&&(Kh(a)||Jh(a)||c(a))&&i===Ny&&(a={name:"implicitRoot",vconcat:[a]});const l=this.createView(a,n,r,o,i);return l instanceof xa&&await l.initializeChildren(),l}}ns=new WeakMap;function zy(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 zy(t,e.dataParent);throw new Error(`Cannot find template "${t}" in current view or its ancestors!`)}function o_(t,e){e.name!=null&&(t.name=e.name);const n=Dt(e.params)?e.params:Ft(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 Kh(t){return"mark"in t&&(nt(t.mark)||Ft(t.mark))}function Jh(t){return"layer"in t&&Ft(t.layer)}function s_(t){return"import"in t}function Rl(t){return"vconcat"in t&&Dt(t.vconcat)}function Uy(t){return"hconcat"in t&&Dt(t.hconcat)}function $h(t){return"concat"in t&&Dt(t.concat)}function a_(t){return"samples"in t&&Ft(t.samples)&&"spec"in t&&Ft(t.spec)}function c_(t){const e=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of t.paramConfigs.values()){if(!kI(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?Bl(s,o.debounce,!1):s,u=`${e}-param-${i}`;if(o.input=="range")n.push(ot`<label for=${u}>${c}</label>
|
|
561
586
|
<div>
|
|
562
587
|
<input
|
|
563
588
|
id=${u}
|
|
564
589
|
type="range"
|
|
565
590
|
min=${o.min??0}
|
|
566
591
|
max=${o.max??100}
|
|
567
|
-
step=${o.step
|
|
592
|
+
step=${o.step??$r(o.min,o.max,100)}
|
|
568
593
|
.value=${a}
|
|
569
594
|
@input=${f=>{l(f.target.valueAsNumber),f.target.nextElementSibling.textContent=f.target.valueAsNumber}}
|
|
570
595
|
/><span>${a}</span>
|
|
@@ -576,25 +601,25 @@ chrM 16299`};function nD(t){if(!(t in Eb))throw new Error(`Unknown assembly: ${t
|
|
|
576
601
|
@input=${f=>l(f.target.checked)}
|
|
577
602
|
/>`);else if(o.input=="radio")n.push(ot`<span class="label">${c}</span>
|
|
578
603
|
<div class="radio-group">
|
|
579
|
-
${o.options.map((f,
|
|
604
|
+
${o.options.map((f,d)=>{var h;return ot`<label>
|
|
580
605
|
<input
|
|
581
606
|
type="radio"
|
|
582
607
|
name=${i}
|
|
583
608
|
value=${f}
|
|
584
609
|
.checked=${a==f}
|
|
585
610
|
@input=${p=>l(p.target.value)}
|
|
586
|
-
/>${((
|
|
611
|
+
/>${((h=o.labels)==null?void 0:h[d])??f}</label
|
|
587
612
|
>`})}
|
|
588
613
|
</div>`);else if(o.input=="select")n.push(ot`<label for=${u}>${c}</label>
|
|
589
614
|
<select
|
|
590
615
|
id=${u}
|
|
591
616
|
@input=${f=>l(f.target.value)}
|
|
592
617
|
>
|
|
593
|
-
${o.options.map((f,
|
|
618
|
+
${o.options.map((f,d)=>{var h;return ot`<option
|
|
594
619
|
value=${f}
|
|
595
620
|
?selected=${a==f}
|
|
596
621
|
>
|
|
597
|
-
${((
|
|
622
|
+
${((h=o.labels)==null?void 0:h[d])??f}
|
|
598
623
|
</option>`})}
|
|
599
624
|
</select> `);else if(o.input=="text"||o.input=="number"||o.input=="color")n.push(ot`<label for=${u}>${c}</label>
|
|
600
625
|
<div>
|
|
@@ -607,27 +632,27 @@ chrM 16299`};function nD(t){if(!(t in Eb))throw new Error(`Unknown assembly: ${t
|
|
|
607
632
|
@focus=${f=>f.target.select()}
|
|
608
633
|
@input=${f=>{l(o.input=="number"?f.target.valueAsNumber:f.target.value)}}
|
|
609
634
|
/>
|
|
610
|
-
</div>`);else throw new Error("Unsupported input type: "+o.input);o.description&&n.push(ot`<div class="description">${o.description}</div>`)}return n}
|
|
635
|
+
</div>`);else throw new Error("Unsupported input type: "+o.input);o.description&&n.push(ot`<div class="description">${o.description}</div>`)}return n}Qu("fasta",Ak);class Gy{constructor(e,n,r={}){ge(this,mn);this.container=e,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=n,this.viewFactory=new i_,this.namedDataProviders=[],this.animator=new gk(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=o=>o.isVisibleInSpec(),this._renderingContext=void 0,this._pickingContext=void 0,this._dirtyPickingBuffer=!1,this._currentHover=void 0,this._wheelInertia=new Ek(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:_k,refseqgene:Ck,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._loadingViews=new Map,this._inputBindingContainer=void 0,this._mouseDownCoords=void 0}registerNamedDataProvider(e){this.namedDataProviders.unshift(e)}getNamedDataFromProvider(e){for(const n of this.namedDataProviders){const r=n(e);if(r)return r}}updateNamedData(e,n){const r=this.viewRoot.context.dataFlow.findNamedDataSource(e);if(!r)throw new Error("No such named data source: "+e);r.dataSource.updateDynamicData(n),zh(r.hosts),this.animator.requestRender()}broadcast(e,n){var o;const r={type:e,payload:n};this.viewRoot.visit(i=>i.handleBroadcast(r)),(o=this._extraBroadcastListeners.get(e))==null||o.forEach(i=>i(r))}_updateLoadingIndicators(){const e=[],n=()=>[...this._loadingViews.values()].some(r=>r.status=="loading"||r.status=="error");for(const[r,o]of this._loadingViews){const i=r.coords;if(i){const s={left:`${i.x}px`,top:`${i.y}px`,width:`${i.width}px`,height:`${i.height}px`};e.push(ot`<div style=${LE(s)}>
|
|
611
636
|
<div class=${o.status}>
|
|
612
637
|
${o.status=="error"?ot`<span
|
|
613
638
|
>Loading
|
|
614
639
|
failed${o.detail?ot`: ${o.detail}`:pt}</span
|
|
615
640
|
>`:ot`
|
|
616
|
-
<img src="${
|
|
641
|
+
<img src="${OE}" alt="" />
|
|
617
642
|
<span>Loading...</span>
|
|
618
643
|
`}
|
|
619
644
|
</div>
|
|
620
|
-
</div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),$o(e,this.loadingIndicatorsElement)}destroy(){var n;const e=X(this,pn,eu);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 YB(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const e=this,n={dataFlow:new e2,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new KB(this._glHelper),get devicePixelRatio(){return e._glHelper.dpr},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,h){return e.viewFactory.createOrImportView(c,n,l,u,f,h)},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,w2),X(this,pn,eu).style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",he(this,pn,tv).call(this),zB(this.viewRoot),UB(this.viewRoot);const o=this.viewRoot.getDescendants();o.forEach(c=>c.configureViewOpacity()),this._glHelper.invalidateSize(),he(this,pn,nv).call(this);const i=o.filter(c=>c instanceof $t),s=FB(this.viewRoot,n.dataFlow);OB(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())),Sh(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=>dl(c,"size")),this._glHelper.invalidateSize()}async launch(){try{return he(this,pn,rv).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),U_(this.container,n),!1}finally{X(this,pn,eu).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const e=this._glHelper.canvas;let n=performance.now();const r=o=>{var a,c;const i=performance.now(),s=i-n<200;if(o instanceof MouseEvent){const l=e.getBoundingClientRect(),u=new zn(o.clientX-l.left-e.clientLeft,o.clientY-l.top-e.clientTop);o.type=="mousemove"&&!s&&(this.tooltip.handleMouseMove(o),this._tooltipUpdateRequested=!1,o.buttons==0&&!g2()&&(this.renderPickingFramebuffer(),this._handlePicking(u.x,u.y)));const f=h=>{this.viewRoot.propagateInteractionEvent(new qB(u,h)),this._tooltipUpdateRequested||this.tooltip.clear()};if(o.type!="wheel"&&this._wheelInertia.cancel(),(o.type=="mousedown"||o.type=="mouseup")&&!g2())this.renderPickingFramebuffer();else if(o.type=="wheel"){n=i,this._tooltipUpdateRequested=!1;const h=o;if(Math.abs(h.deltaX)>Math.abs(h.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const d=n_(h);this._wheelInertia.setMomentum(h.deltaY*(h.deltaMode?80:1),p=>{const y=new WheelEvent("wheel",{...d,deltaMode:0,deltaX:0,deltaY:p});f(y)}),h.preventDefault();return}}if(o.type=="click"){const h=this._currentHover?{type:o.type,viewPath:this._currentHover.mark.unitView.getLayoutAncestors().map(d=>d.name).reverse(),datum:this._currentHover.datum}:{type:o.type,viewPath:null,datum:null};(a=this._eventListeners.get("click"))==null||a.forEach(d=>d(h))}(o.type!="click"||((c=this._mouseDownCoords)==null?void 0:c.subtract(zn.fromMouseEvent(o)).length)<3)&&f(o)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu"].forEach(o=>e.addEventListener(o,r)),e.addEventListener("mousedown",o=>{this._mouseDownCoords=zn.fromMouseEvent(o),document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)}),e.addEventListener("dragstart",o=>o.stopPropagation())}_handlePicking(e,n){var i;const r=this._glHelper.readPickingPixel(e,n),o=r[0]|r[1]<<8|r[2]<<16|r[3]<<24;if(o==0){this._currentHover=null;return}if(o!==((i=this._currentHover)==null?void 0:i.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(s=>{if(s instanceof $t){if(s.mark.isPickingParticipant()&&[...s.facetCoords.values()].some(a=>a.containsPoint(e,n))){const a=s.getCollector().findDatumByUniqueId(o);a&&(this._currentHover={mark:s.mark,datum:a,uniqueId:o})}if(this._currentHover)return oa}}),this._currentHover){const s=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async a=>{if(!s.isPickingParticipant())return;const c=s.properties.tooltip;if(c!==null){const l=(c==null?void 0:c.handler)??"default",u=this.tooltipHandlers[l];if(!u)throw new Error("No such tooltip handler: "+l);return u(a,s,c==null?void 0:c.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?")}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}this._renderingContext=new i2({picking:!1},this._glHelper),this._pickingContext=new i2({picking:!0},this._glHelper),e.render(new VB(this._renderingContext,this._pickingContext),$n.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 $t&&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}}pn=new WeakSet,eu=function(){return this.container.querySelector(".canvas-wrapper")},tv=function(){const e=[];this.viewRoot.visit(r=>{const o=r.paramMediator;e.push(...z_(o))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!e.length)){if(this._inputBindingContainer=vl("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&&$o(ot`<div class="gs-input-binding">${e}</div>`,this._inputBindingContainer)}},nv=function(){const e=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",window.devicePixelRatio),n=()=>{this._glHelper.invalidateSize(),e(window.devicePixelRatio),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)},rv=function(){this.container.classList.add("genome-spy");const e=document.createElement("style");e.innerHTML=mE,this.container.appendChild(e);const n=vl("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new tT(n,()=>this.viewRoot?HB(this.viewRoot):{width:void 0,height:void 0},this.spec.background,{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=vl("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=vl("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new yE(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function U_(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 vl(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 G_="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",H_="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 V_(t,e,n={}){let r;if(nt(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 E2(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 A2(r,i,n),q_(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)}}function q_(t,e){e.namedDataProvider&&t.registerNamedDataProvider(e.namedDataProvider)}async function E2(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 Al(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function j_(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 zh={},la={},S2;function W_(){if(S2)return la;S2=1,la.byteLength=a,la.toByteArray=l,la.fromByteArray=h;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(d){var p=d.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=d.indexOf("=");y===-1&&(y=p);var v=y===p?0:4-y%4;return[y,v]}function a(d){var p=s(d),y=p[0],v=p[1];return(y+v)*3/4-v}function c(d,p,y){return(p+y)*3/4-y}function l(d){var p,y=s(d),v=y[0],b=y[1],A=new n(c(d,v,b)),C=0,E=b>0?v-4:v,I;for(I=0;I<E;I+=4)p=e[d.charCodeAt(I)]<<18|e[d.charCodeAt(I+1)]<<12|e[d.charCodeAt(I+2)]<<6|e[d.charCodeAt(I+3)],A[C++]=p>>16&255,A[C++]=p>>8&255,A[C++]=p&255;return b===2&&(p=e[d.charCodeAt(I)]<<2|e[d.charCodeAt(I+1)]>>4,A[C++]=p&255),b===1&&(p=e[d.charCodeAt(I)]<<10|e[d.charCodeAt(I+1)]<<4|e[d.charCodeAt(I+2)]>>2,A[C++]=p>>8&255,A[C++]=p&255),A}function u(d){return t[d>>18&63]+t[d>>12&63]+t[d>>6&63]+t[d&63]}function f(d,p,y){for(var v,b=[],A=p;A<y;A+=3)v=(d[A]<<16&16711680)+(d[A+1]<<8&65280)+(d[A+2]&255),b.push(u(v));return b.join("")}function h(d){for(var p,y=d.length,v=y%3,b=[],A=16383,C=0,E=y-v;C<E;C+=A)b.push(f(d,C,C+A>E?E:C+A));return v===1?(p=d[y-1],b.push(t[p>>2]+t[p<<4&63]+"==")):v===2&&(p=(d[y-2]<<8)+d[y-1],b.push(t[p>>10]+t[p>>4&63]+t[p<<2&63]+"=")),b.join("")}return la}var El={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var C2;function Q_(){return C2||(C2=1,El.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,h=n?-1:1,d=t[e+f];for(f+=h,i=d&(1<<-u)-1,d>>=-u,u+=a;u>0;i=i*256+t[e+f],f+=h,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=r;u>0;s=s*256+t[e+f],f+=h,u-=8);if(i===0)i=1-l;else{if(i===c)return s?NaN:(d?-1:1)*(1/0);s=s+Math.pow(2,r),i=i-l}return(d?-1:1)*s*Math.pow(2,i-r)},El.write=function(t,e,n,r,o,i){var s,a,c,l=i*8-o-1,u=(1<<l)-1,f=u>>1,h=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=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+=h/c:e+=h*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+d]=a&255,d+=p,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;t[n+d]=s&255,d+=p,s/=256,l-=8);t[n+d-p]|=y*128}),El}/*!
|
|
645
|
+
</div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),hs(e,this.loadingIndicatorsElement)}destroy(){var n;const e=W(this,mn,pu);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 mk(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const e=this,n={dataFlow:new yy,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new wk(this._glHelper),get devicePixelRatio(){return e._glHelper.dpr},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,Ny),W(this,mn,pu).style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",de(this,mn,Ev).call(this),ak(this.viewRoot),ck(this.viewRoot);const o=this.viewRoot.getDescendants();o.forEach(c=>c.configureViewOpacity()),this._glHelper.invalidateSize(),de(this,mn,Sv).call(this);const i=o.filter(c=>c instanceof tn),s=tk(this.viewRoot,n.dataFlow);sk(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())),zh(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=>Cl(c,"size")),this._glHelper.invalidateSize()}async launch(){try{return de(this,mn,Cv).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),l_(this.container,n),!1}finally{W(this,mn,pu).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 Kt(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&&!_y()&&(this.renderPickingFramebuffer(),this._handlePicking(f.x,f.y)));const d=h=>{this.viewRoot.propagateInteractionEvent(new hk(f,h)),this._tooltipUpdateRequested||this.tooltip.clear()};if(i.type!="wheel"&&this._wheelInertia.cancel(),(i.type=="mousedown"||i.type=="mouseup")&&!_y())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=Sk(h);this._wheelInertia.setMomentum(h.deltaY*(h.deltaMode?80:1),b=>{const v=new WheelEvent("wheel",{...p,deltaMode:0,deltaX:0,deltaY:b});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(Kt.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=Kt.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 i;const r=this._glHelper.readPickingPixel(e,n),o=r[0]|r[1]<<8|r[2]<<16|r[3]<<24;if(o==0){this._currentHover=null;return}if(o!==((i=this._currentHover)==null?void 0:i.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(s=>{if(s instanceof tn){if(s.mark.isPickingParticipant()&&[...s.facetCoords.values()].some(a=>a.containsPoint(e,n))){const a=s.getCollector().findDatumByUniqueId(o);a&&(this._currentHover={mark:s.mark,datum:a,uniqueId:o})}if(this._currentHover)return ya}}),this._currentHover){const s=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async a=>{if(!s.isPickingParticipant())return;const c=s.properties.tooltip;if(c!==null){const l=(c==null?void 0:c.handler)??"default",u=this.tooltipHandlers[l];if(!u)throw new Error("No such tooltip handler: "+l);return u(a,s,c==null?void 0:c.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?")}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}this._renderingContext=new Ay({picking:!1},this._glHelper),this._pickingContext=new Ay({picking:!0},this._glHelper),e.render(new fk(this._renderingContext,this._pickingContext),Hn.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 tn&&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}}mn=new WeakSet,pu=function(){return this.container.querySelector(".canvas-wrapper")},Ev=function(){const e=[];this.viewRoot.visit(r=>{const o=r.paramMediator;e.push(...c_(o))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!e.length)){if(this._inputBindingContainer=Fl("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&&hs(ot`<div class="gs-input-binding">${e}</div>`,this._inputBindingContainer)}},Sv=function(){const e=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",window.devicePixelRatio),n=()=>{this._glHelper.invalidateSize(),e(window.devicePixelRatio),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)},Cv=function(){this.container.classList.add("genome-spy");const e=document.createElement("style");e.innerHTML=NE,this.container.appendChild(e);const n=Fl("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new GI(n,()=>this.viewRoot?uk(this.viewRoot):{width:void 0,height:void 0},this.spec.background,{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=Fl("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=Fl("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new UE(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function l_(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 Fl(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 u_="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",f_="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 h_(t,e,n={}){let r;if(nt(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=Ft(e)?e:await Hy(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 Gy(r,i,n),d_(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)}}function d_(t,e){e.namedDataProvider&&t.registerNamedDataProvider(e.namedDataProvider)}async function Hy(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 Ml(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function p_(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 ed={},va={},Vy;function g_(){if(Vy)return va;Vy=1,va.byteLength=a,va.toByteArray=l,va.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 b=h.indexOf("=");b===-1&&(b=p);var v=b===p?0:4-b%4;return[b,v]}function a(h){var p=s(h),b=p[0],v=p[1];return(b+v)*3/4-v}function c(h,p,b){return(p+b)*3/4-b}function l(h){var p,b=s(h),v=b[0],y=b[1],A=new n(c(h,v,y)),S=0,E=y>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 y===2&&(p=e[h.charCodeAt(I)]<<2|e[h.charCodeAt(I+1)]>>4,A[S++]=p&255),y===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,b){for(var v,y=[],A=p;A<b;A+=3)v=(h[A]<<16&16711680)+(h[A+1]<<8&65280)+(h[A+2]&255),y.push(u(v));return y.join("")}function d(h){for(var p,b=h.length,v=b%3,y=[],A=16383,S=0,E=b-v;S<E;S+=A)y.push(f(h,S,S+A>E?E:S+A));return v===1?(p=h[b-1],y.push(t[p>>2]+t[p<<4&63]+"==")):v===2&&(p=(h[b-2]<<8)+h[b-1],y.push(t[p>>10]+t[p>>4&63]+t[p<<2&63]+"=")),y.join("")}return va}var Pl={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var qy;function m_(){return qy||(qy=1,Pl.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)},Pl.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,b=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]|=b*128}),Pl}/*!
|
|
621
646
|
* The buffer module from node.js, for the browser.
|
|
622
647
|
*
|
|
623
648
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
624
649
|
* @license MIT
|
|
625
|
-
*/var I2;function ua(){return I2||(I2=1,function(t){const e=W_(),n=Q_(),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 _=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(_,m),_.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(_){if(_>o)throw new RangeError('The value "'+_+'" is invalid for option "size"');const m=new Uint8Array(_);return Object.setPrototypeOf(m,a.prototype),m}function a(_,m,w){if(typeof _=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(_)}return c(_,m,w)}a.poolSize=8192;function c(_,m,w){if(typeof _=="string")return h(_,m);if(ArrayBuffer.isView(_))return p(_);if(_==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _);if($e(_,ArrayBuffer)||_&&$e(_.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($e(_,SharedArrayBuffer)||_&&$e(_.buffer,SharedArrayBuffer)))return y(_,m,w);if(typeof _=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const N=_.valueOf&&_.valueOf();if(N!=null&&N!==_)return a.from(N,m,w);const x=v(_);if(x)return x;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _[Symbol.toPrimitive]=="function")return a.from(_[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 _)}a.from=function(_,m,w){return c(_,m,w)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(_){if(typeof _!="number")throw new TypeError('"size" argument must be of type number');if(_<0)throw new RangeError('The value "'+_+'" is invalid for option "size"')}function u(_,m,w){return l(_),_<=0?s(_):m!==void 0?typeof w=="string"?s(_).fill(m,w):s(_).fill(m):s(_)}a.alloc=function(_,m,w){return u(_,m,w)};function f(_){return l(_),s(_<0?0:b(_)|0)}a.allocUnsafe=function(_){return f(_)},a.allocUnsafeSlow=function(_){return f(_)};function h(_,m){if((typeof m!="string"||m==="")&&(m="utf8"),!a.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const w=C(_,m)|0;let N=s(w);const x=N.write(_,m);return x!==w&&(N=N.slice(0,x)),N}function d(_){const m=_.length<0?0:b(_.length)|0,w=s(m);for(let N=0;N<m;N+=1)w[N]=_[N]&255;return w}function p(_){if($e(_,Uint8Array)){const m=new Uint8Array(_);return y(m.buffer,m.byteOffset,m.byteLength)}return d(_)}function y(_,m,w){if(m<0||_.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(_.byteLength<m+(w||0))throw new RangeError('"length" is outside of buffer bounds');let N;return m===void 0&&w===void 0?N=new Uint8Array(_):w===void 0?N=new Uint8Array(_,m):N=new Uint8Array(_,m,w),Object.setPrototypeOf(N,a.prototype),N}function v(_){if(a.isBuffer(_)){const m=b(_.length)|0,w=s(m);return w.length===0||_.copy(w,0,0,m),w}if(_.length!==void 0)return typeof _.length!="number"||kt(_.length)?s(0):d(_);if(_.type==="Buffer"&&Array.isArray(_.data))return d(_.data)}function b(_){if(_>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return _|0}function A(_){return+_!=_&&(_=0),a.alloc(+_)}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 N=m.length,x=w.length;for(let z=0,V=Math.min(N,x);z<V;++z)if(m[z]!==w[z]){N=m[z],x=w[z];break}return N<x?-1:x<N?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 N;if(w===void 0)for(w=0,N=0;N<m.length;++N)w+=m[N].length;const x=a.allocUnsafe(w);let z=0;for(N=0;N<m.length;++N){let V=m[N];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 C(_,m){if(a.isBuffer(_))return _.length;if(ArrayBuffer.isView(_)||$e(_,ArrayBuffer))return _.byteLength;if(typeof _!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _);const w=_.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&w===0)return 0;let x=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return xe(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return Xt(_).length;default:if(x)return N?-1:xe(_).length;m=(""+m).toLowerCase(),x=!0}}a.byteLength=C;function E(_,m,w){let N=!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(_||(_="utf8");;)switch(_){case"hex":return pe(this,m,w);case"utf8":case"utf-8":return ae(this,m,w);case"ascii":return le(this,m,w);case"latin1":case"binary":return Ee(this,m,w);case"base64":return Z(this,m,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ce(this,m,w);default:if(N)throw new TypeError("Unknown encoding: "+_);_=(_+"").toLowerCase(),N=!0}}a.prototype._isBuffer=!0;function I(_,m,w){const N=_[m];_[m]=_[w],_[w]=N}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?ae(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,N,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),N===void 0&&(N=m?m.length:0),x===void 0&&(x=0),z===void 0&&(z=this.length),w<0||N>m.length||x<0||z>this.length)throw new RangeError("out of range index");if(x>=z&&w>=N)return 0;if(x>=z)return-1;if(w>=N)return 1;if(w>>>=0,N>>>=0,x>>>=0,z>>>=0,this===m)return 0;let V=z-x,se=N-w;const G=Math.min(V,se),Y=this.slice(x,z),T=m.slice(w,N);for(let ne=0;ne<G;++ne)if(Y[ne]!==T[ne]){V=Y[ne],se=T[ne];break}return V<se?-1:se<V?1:0};function R(_,m,w,N,x){if(_.length===0)return-1;if(typeof w=="string"?(N=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,kt(w)&&(w=x?0:_.length-1),w<0&&(w=_.length+w),w>=_.length){if(x)return-1;w=_.length-1}else if(w<0)if(x)w=0;else return-1;if(typeof m=="string"&&(m=a.from(m,N)),a.isBuffer(m))return m.length===0?-1:B(_,m,w,N,x);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?x?Uint8Array.prototype.indexOf.call(_,m,w):Uint8Array.prototype.lastIndexOf.call(_,m,w):B(_,[m],w,N,x);throw new TypeError("val must be string, number or Buffer")}function B(_,m,w,N,x){let z=1,V=_.length,se=m.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(_.length<2||m.length<2)return-1;z=2,V/=2,se/=2,w/=2}function G(T,ne){return z===1?T[ne]:T.readUInt16BE(ne*z)}let Y;if(x){let T=-1;for(Y=w;Y<V;Y++)if(G(_,Y)===G(m,T===-1?0:Y-T)){if(T===-1&&(T=Y),Y-T+1===se)return T*z}else T!==-1&&(Y-=Y-T),T=-1}else for(w+se>V&&(w=V-se),Y=w;Y>=0;Y--){let T=!0;for(let ne=0;ne<se;ne++)if(G(_,Y+ne)!==G(m,ne)){T=!1;break}if(T)return Y}return-1}a.prototype.includes=function(m,w,N){return this.indexOf(m,w,N)!==-1},a.prototype.indexOf=function(m,w,N){return R(this,m,w,N,!0)},a.prototype.lastIndexOf=function(m,w,N){return R(this,m,w,N,!1)};function O(_,m,w,N){w=Number(w)||0;const x=_.length-w;N?(N=Number(N),N>x&&(N=x)):N=x;const z=m.length;N>z/2&&(N=z/2);let V;for(V=0;V<N;++V){const se=parseInt(m.substr(V*2,2),16);if(kt(se))return V;_[w+V]=se}return V}function F(_,m,w,N){return It(xe(m,_.length-w),_,w,N)}function P(_,m,w,N){return It(ke(m),_,w,N)}function S(_,m,w,N){return It(Xt(m),_,w,N)}function Q(_,m,w,N){return It(dt(m,_.length-w),_,w,N)}a.prototype.write=function(m,w,N,x){if(w===void 0)x="utf8",N=this.length,w=0;else if(N===void 0&&typeof w=="string")x=w,N=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(N)?(N=N>>>0,x===void 0&&(x="utf8")):(x=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const z=this.length-w;if((N===void 0||N>z)&&(N=z),m.length>0&&(N<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 O(this,m,w,N);case"utf8":case"utf-8":return F(this,m,w,N);case"ascii":case"latin1":case"binary":return P(this,m,w,N);case"base64":return S(this,m,w,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,m,w,N);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 Z(_,m,w){return m===0&&w===_.length?e.fromByteArray(_):e.fromByteArray(_.slice(m,w))}function ae(_,m,w){w=Math.min(_.length,w);const N=[];let x=m;for(;x<w;){const z=_[x];let V=null,se=z>239?4:z>223?3:z>191?2:1;if(x+se<=w){let G,Y,T,ne;switch(se){case 1:z<128&&(V=z);break;case 2:G=_[x+1],(G&192)===128&&(ne=(z&31)<<6|G&63,ne>127&&(V=ne));break;case 3:G=_[x+1],Y=_[x+2],(G&192)===128&&(Y&192)===128&&(ne=(z&15)<<12|(G&63)<<6|Y&63,ne>2047&&(ne<55296||ne>57343)&&(V=ne));break;case 4:G=_[x+1],Y=_[x+2],T=_[x+3],(G&192)===128&&(Y&192)===128&&(T&192)===128&&(ne=(z&15)<<18|(G&63)<<12|(Y&63)<<6|T&63,ne>65535&&ne<1114112&&(V=ne))}}V===null?(V=65533,se=1):V>65535&&(V-=65536,N.push(V>>>10&1023|55296),V=56320|V&1023),N.push(V),x+=se}return fe(N)}const ce=4096;function fe(_){const m=_.length;if(m<=ce)return String.fromCharCode.apply(String,_);let w="",N=0;for(;N<m;)w+=String.fromCharCode.apply(String,_.slice(N,N+=ce));return w}function le(_,m,w){let N="";w=Math.min(_.length,w);for(let x=m;x<w;++x)N+=String.fromCharCode(_[x]&127);return N}function Ee(_,m,w){let N="";w=Math.min(_.length,w);for(let x=m;x<w;++x)N+=String.fromCharCode(_[x]);return N}function pe(_,m,w){const N=_.length;(!m||m<0)&&(m=0),(!w||w<0||w>N)&&(w=N);let x="";for(let z=m;z<w;++z)x+=Ot[_[z]];return x}function Ce(_,m,w){const N=_.slice(m,w);let x="";for(let z=0;z<N.length-1;z+=2)x+=String.fromCharCode(N[z]+N[z+1]*256);return x}a.prototype.slice=function(m,w){const N=this.length;m=~~m,w=w===void 0?N:~~w,m<0?(m+=N,m<0&&(m=0)):m>N&&(m=N),w<0?(w+=N,w<0&&(w=0)):w>N&&(w=N),w<m&&(w=m);const x=this.subarray(m,w);return Object.setPrototypeOf(x,a.prototype),x};function Ie(_,m,w){if(_%1!==0||_<0)throw new RangeError("offset is not uint");if(_+m>w)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(m,w,N){m=m>>>0,w=w>>>0,N||Ie(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,N){m=m>>>0,w=w>>>0,N||Ie(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||Ie(m,1,this.length),this[m]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(m,w){return m=m>>>0,w||Ie(m,2,this.length),this[m]|this[m+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(m,w){return m=m>>>0,w||Ie(m,2,this.length),this[m]<<8|this[m+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(m,w){return m=m>>>0,w||Ie(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||Ie(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,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(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+N*2**24;return BigInt(x)+(BigInt(z)<<BigInt(32))}),a.prototype.readBigUInt64BE=et(function(m){m=m>>>0,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(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+N;return(BigInt(x)<<BigInt(32))+BigInt(z)}),a.prototype.readIntLE=function(m,w,N){m=m>>>0,w=w>>>0,N||Ie(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,N){m=m>>>0,w=w>>>0,N||Ie(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||Ie(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},a.prototype.readInt16LE=function(m,w){m=m>>>0,w||Ie(m,2,this.length);const N=this[m]|this[m+1]<<8;return N&32768?N|4294901760:N},a.prototype.readInt16BE=function(m,w){m=m>>>0,w||Ie(m,2,this.length);const N=this[m+1]|this[m]<<8;return N&32768?N|4294901760:N},a.prototype.readInt32LE=function(m,w){return m=m>>>0,w||Ie(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||Ie(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,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(m,this.length-8);const x=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(N<<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,ee(m,"offset");const w=this[m],N=this[m+7];(w===void 0||N===void 0)&&oe(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+N)}),a.prototype.readFloatLE=function(m,w){return m=m>>>0,w||Ie(m,4,this.length),n.read(this,m,!0,23,4)},a.prototype.readFloatBE=function(m,w){return m=m>>>0,w||Ie(m,4,this.length),n.read(this,m,!1,23,4)},a.prototype.readDoubleLE=function(m,w){return m=m>>>0,w||Ie(m,8,this.length),n.read(this,m,!0,52,8)},a.prototype.readDoubleBE=function(m,w){return m=m>>>0,w||Ie(m,8,this.length),n.read(this,m,!1,52,8)};function we(_,m,w,N,x,z){if(!a.isBuffer(_))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+N>_.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(m,w,N,x){if(m=+m,w=w>>>0,N=N>>>0,!x){const se=Math.pow(2,8*N)-1;we(this,m,w,N,se,0)}let z=1,V=0;for(this[w]=m&255;++V<N&&(z*=256);)this[w+V]=m/z&255;return w+N},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(m,w,N,x){if(m=+m,w=w>>>0,N=N>>>0,!x){const se=Math.pow(2,8*N)-1;we(this,m,w,N,se,0)}let z=N-1,V=1;for(this[w+z]=m&255;--z>=0&&(V*=256);)this[w+z]=m/V&255;return w+N},a.prototype.writeUint8=a.prototype.writeUInt8=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,1,255,0),this[w]=m&255,w+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(m,w,N){return m=+m,w=w>>>0,N||we(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,N){return m=+m,w=w>>>0,N||we(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,N){return m=+m,w=w>>>0,N||we(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,N){return m=+m,w=w>>>0,N||we(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 Te(_,m,w,N,x){D(m,N,x,_,w,7);let z=Number(m&BigInt(4294967295));_[w++]=z,z=z>>8,_[w++]=z,z=z>>8,_[w++]=z,z=z>>8,_[w++]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return _[w++]=V,V=V>>8,_[w++]=V,V=V>>8,_[w++]=V,V=V>>8,_[w++]=V,w}function He(_,m,w,N,x){D(m,N,x,_,w,7);let z=Number(m&BigInt(4294967295));_[w+7]=z,z=z>>8,_[w+6]=z,z=z>>8,_[w+5]=z,z=z>>8,_[w+4]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return _[w+3]=V,V=V>>8,_[w+2]=V,V=V>>8,_[w+1]=V,V=V>>8,_[w]=V,w+8}a.prototype.writeBigUInt64LE=et(function(m,w=0){return Te(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=et(function(m,w=0){return He(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(m,w,N,x){if(m=+m,w=w>>>0,!x){const G=Math.pow(2,8*N-1);we(this,m,w,N,G-1,-G)}let z=0,V=1,se=0;for(this[w]=m&255;++z<N&&(V*=256);)m<0&&se===0&&this[w+z-1]!==0&&(se=1),this[w+z]=(m/V>>0)-se&255;return w+N},a.prototype.writeIntBE=function(m,w,N,x){if(m=+m,w=w>>>0,!x){const G=Math.pow(2,8*N-1);we(this,m,w,N,G-1,-G)}let z=N-1,V=1,se=0;for(this[w+z]=m&255;--z>=0&&(V*=256);)m<0&&se===0&&this[w+z+1]!==0&&(se=1),this[w+z]=(m/V>>0)-se&255;return w+N},a.prototype.writeInt8=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,1,127,-128),m<0&&(m=255+m+1),this[w]=m&255,w+1},a.prototype.writeInt16LE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,2,32767,-32768),this[w]=m&255,this[w+1]=m>>>8,w+2},a.prototype.writeInt16BE=function(m,w,N){return m=+m,w=w>>>0,N||we(this,m,w,2,32767,-32768),this[w]=m>>>8,this[w+1]=m&255,w+2},a.prototype.writeInt32LE=function(m,w,N){return m=+m,w=w>>>0,N||we(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,N){return m=+m,w=w>>>0,N||we(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 Te(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=et(function(m,w=0){return He(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Le(_,m,w,N,x,z){if(w+N>_.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function j(_,m,w,N,x){return m=+m,w=w>>>0,x||Le(_,m,w,4),n.write(_,m,w,N,23,4),w+4}a.prototype.writeFloatLE=function(m,w,N){return j(this,m,w,!0,N)},a.prototype.writeFloatBE=function(m,w,N){return j(this,m,w,!1,N)};function q(_,m,w,N,x){return m=+m,w=w>>>0,x||Le(_,m,w,8),n.write(_,m,w,N,52,8),w+8}a.prototype.writeDoubleLE=function(m,w,N){return q(this,m,w,!0,N)},a.prototype.writeDoubleBE=function(m,w,N){return q(this,m,w,!1,N)},a.prototype.copy=function(m,w,N,x){if(!a.isBuffer(m))throw new TypeError("argument should be a Buffer");if(N||(N=0),!x&&x!==0&&(x=this.length),w>=m.length&&(w=m.length),w||(w=0),x>0&&x<N&&(x=N),x===N||m.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=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-N&&(x=m.length-w+N);const z=x-N;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(w,N,x):Uint8Array.prototype.set.call(m,this.subarray(N,x),w),z},a.prototype.fill=function(m,w,N,x){if(typeof m=="string"){if(typeof w=="string"?(x=w,w=0,N=this.length):typeof N=="string"&&(x=N,N=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<N)throw new RangeError("Out of range index");if(N<=w)return this;w=w>>>0,N=N===void 0?this.length:N>>>0,m||(m=0);let z;if(typeof m=="number")for(z=w;z<N;++z)this[z]=m;else{const V=a.isBuffer(m)?m:a.from(m,x),se=V.length;if(se===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(z=0;z<N-w;++z)this[z+w]=V[z%se]}return this};const re={};function $(_,m,w){re[_]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${_}]`,this.stack,delete this.name}get code(){return _}set code(x){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:x,writable:!0})}toString(){return`${this.name} [${_}]: ${this.message}`}}}$("ERR_BUFFER_OUT_OF_BOUNDS",function(_){return _?`${_} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$("ERR_INVALID_ARG_TYPE",function(_,m){return`The "${_}" argument must be of type number. Received type ${typeof m}`},TypeError),$("ERR_OUT_OF_RANGE",function(_,m,w){let N=`The value of "${_}" is out of range.`,x=w;return Number.isInteger(w)&&Math.abs(w)>2**32?x=ue(String(w)):typeof w=="bigint"&&(x=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(x=ue(x)),x+="n"),N+=` It must be ${m}. Received ${x}`,N},RangeError);function ue(_){let m="",w=_.length;const N=_[0]==="-"?1:0;for(;w>=N+4;w-=3)m=`_${_.slice(w-3,w)}${m}`;return`${_.slice(0,w)}${m}`}function L(_,m,w){ee(m,"offset"),(_[m]===void 0||_[m+w]===void 0)&&oe(m,_.length-(w+1))}function D(_,m,w,N,x,z){if(_>w||_<m){const V=typeof m=="bigint"?"n":"";let se;throw m===0||m===BigInt(0)?se=`>= 0${V} and < 2${V} ** ${(z+1)*8}${V}`:se=`>= -(2${V} ** ${(z+1)*8-1}${V}) and < 2 ** ${(z+1)*8-1}${V}`,new re.ERR_OUT_OF_RANGE("value",se,_)}L(N,x,z)}function ee(_,m){if(typeof _!="number")throw new re.ERR_INVALID_ARG_TYPE(m,"number",_)}function oe(_,m,w){throw Math.floor(_)!==_?(ee(_,w),new re.ERR_OUT_OF_RANGE("offset","an integer",_)):m<0?new re.ERR_BUFFER_OUT_OF_BOUNDS:new re.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${m}`,_)}const De=/[^+/0-9A-Za-z-_]/g;function ye(_){if(_=_.split("=")[0],_=_.trim().replace(De,""),_.length<2)return"";for(;_.length%4!==0;)_=_+"=";return _}function xe(_,m){m=m||1/0;let w;const N=_.length;let x=null;const z=[];for(let V=0;V<N;++V){if(w=_.charCodeAt(V),w>55295&&w<57344){if(!x){if(w>56319){(m-=3)>-1&&z.push(239,191,189);continue}else if(V+1===N){(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 ke(_){const m=[];for(let w=0;w<_.length;++w)m.push(_.charCodeAt(w)&255);return m}function dt(_,m){let w,N,x;const z=[];for(let V=0;V<_.length&&!((m-=2)<0);++V)w=_.charCodeAt(V),N=w>>8,x=w%256,z.push(x),z.push(N);return z}function Xt(_){return e.toByteArray(ye(_))}function It(_,m,w,N){let x;for(x=0;x<N&&!(x+w>=m.length||x>=_.length);++x)m[x+w]=_[x];return x}function $e(_,m){return _ instanceof m||_!=null&&_.constructor!=null&&_.constructor.name!=null&&_.constructor.name===m.name}function kt(_){return _!==_}const Ot=function(){const _="0123456789abcdef",m=new Array(256);for(let w=0;w<16;++w){const N=w*16;for(let x=0;x<16;++x)m[N+x]=_[w]+_[x]}return m}();function et(_){return typeof BigInt>"u"?zt:_}function zt(){throw new Error("BigInt not supported")}}(zh)),zh}var Ke=ua();const Y_=Qe({__proto__:null,default:Al(Ke)},[Ke]),Ct={},Z_=Object.freeze(Object.defineProperty({__proto__:null,default:Ct},Symbol.toStringTag,{value:"Module"}));function T2(t){return(typeof t=="object"&&t!==null&&"message"in t?t.message:`${t}`).replace(/\.$/,"")}class En{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(`${T2(i)} fetching ${e}`,{cause:i})}}else throw new Error(`${T2(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)),h=l.headers.get("content-range"),d=/\/(\d+)$/.exec(h||"");return d!=null&&d[1]&&(this._stat={size:parseInt(d[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 D2(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 X_(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 K_{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 D2(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 X_(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await D2(this.blob);return Ke.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function B2(t,e={}){return new En(t,e)}function J_(t,e,n,r={}){if(n!==void 0)return n;if(t!==void 0)return B2(t,r);if(e!==void 0)return new Ct(e,r);throw new Error("no url, path, or filehandle provided, cannot open")}const fa=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:K_,LocalFile:Ct,RemoteFile:En,fromUrl:B2,open:J_},Symbol.toStringTag,{value:"Module"}));var Uh={},_2;function Mr(){return _2||(_2=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)}(Uh)),Uh}var co={},Sn={},bi={},k2;function $_(){if(k2)return bi;k2=1;var t=Mr(),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,h=256,d=h+1+f,p=30,y=19,v=2*d+1,b=15,A=16,C=7,E=256,I=16,R=17,B=18,O=[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],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Q=512,Z=new Array((d+2)*2);i(Z);var ae=new Array(p*2);i(ae);var ce=new Array(Q);i(ce);var fe=new Array(u-l+1);i(fe);var le=new Array(f);i(le);var Ee=new Array(p);i(Ee);function pe(x,z,V,se,G){this.static_tree=x,this.extra_bits=z,this.extra_base=V,this.elems=se,this.max_length=G,this.has_stree=x&&x.length}var Ce,Ie,we;function Te(x,z){this.dyn_tree=x,this.max_code=0,this.stat_desc=z}function He(x){return x<256?ce[x]:ce[256+(x>>>7)]}function Le(x,z){x.pending_buf[x.pending++]=z&255,x.pending_buf[x.pending++]=z>>>8&255}function j(x,z,V){x.bi_valid>A-V?(x.bi_buf|=z<<x.bi_valid&65535,Le(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 q(x,z,V){j(x,V[z*2],V[z*2+1])}function re(x,z){var V=0;do V|=x&1,x>>>=1,V<<=1;while(--z>0);return V>>>1}function $(x){x.bi_valid===16?(Le(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 ue(x,z){var V=z.dyn_tree,se=z.max_code,G=z.stat_desc.static_tree,Y=z.stat_desc.has_stree,T=z.stat_desc.extra_bits,ne=z.stat_desc.extra_base,_e=z.stat_desc.max_length,g,K,J,k,H,W,Se=0;for(k=0;k<=b;k++)x.bl_count[k]=0;for(V[x.heap[x.heap_max]*2+1]=0,g=x.heap_max+1;g<v;g++)K=x.heap[g],k=V[V[K*2+1]*2+1]+1,k>_e&&(k=_e,Se++),V[K*2+1]=k,!(K>se)&&(x.bl_count[k]++,H=0,K>=ne&&(H=T[K-ne]),W=V[K*2],x.opt_len+=W*(k+H),Y&&(x.static_len+=W*(G[K*2+1]+H)));if(Se!==0){do{for(k=_e-1;x.bl_count[k]===0;)k--;x.bl_count[k]--,x.bl_count[k+1]+=2,x.bl_count[_e]--,Se-=2}while(Se>0);for(k=_e;k!==0;k--)for(K=x.bl_count[k];K!==0;)J=x.heap[--g],!(J>se)&&(V[J*2+1]!==k&&(x.opt_len+=(k-V[J*2+1])*V[J*2],V[J*2+1]=k),K--)}}function L(x,z,V){var se=new Array(b+1),G=0,Y,T;for(Y=1;Y<=b;Y++)se[Y]=G=G+V[Y-1]<<1;for(T=0;T<=z;T++){var ne=x[T*2+1];ne!==0&&(x[T*2]=re(se[ne]++,ne))}}function D(){var x,z,V,se,G,Y=new Array(b+1);for(V=0,se=0;se<f-1;se++)for(le[se]=V,x=0;x<1<<O[se];x++)fe[V++]=se;for(fe[V-1]=se,G=0,se=0;se<16;se++)for(Ee[se]=G,x=0;x<1<<F[se];x++)ce[G++]=se;for(G>>=7;se<p;se++)for(Ee[se]=G<<7,x=0;x<1<<F[se]-7;x++)ce[256+G++]=se;for(z=0;z<=b;z++)Y[z]=0;for(x=0;x<=143;)Z[x*2+1]=8,x++,Y[8]++;for(;x<=255;)Z[x*2+1]=9,x++,Y[9]++;for(;x<=279;)Z[x*2+1]=7,x++,Y[7]++;for(;x<=287;)Z[x*2+1]=8,x++,Y[8]++;for(L(Z,d+1,Y),x=0;x<p;x++)ae[x*2+1]=5,ae[x*2]=re(x,5);Ce=new pe(Z,O,h+1,d,b),Ie=new pe(ae,F,0,p,b),we=new pe(new Array(0),P,0,y,C)}function ee(x){var z;for(z=0;z<d;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 oe(x){x.bi_valid>8?Le(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 De(x,z,V,se){oe(x),Le(x,V),Le(x,~V),t.arraySet(x.pending_buf,x.window,z,V,x.pending),x.pending+=V}function ye(x,z,V,se){var G=z*2,Y=V*2;return x[G]<x[Y]||x[G]===x[Y]&&se[z]<=se[V]}function xe(x,z,V){for(var se=x.heap[V],G=V<<1;G<=x.heap_len&&(G<x.heap_len&&ye(z,x.heap[G+1],x.heap[G],x.depth)&&G++,!ye(z,se,x.heap[G],x.depth));)x.heap[V]=x.heap[G],V=G,G<<=1;x.heap[V]=se}function ke(x,z,V){var se,G,Y=0,T,ne;if(x.last_lit!==0)do se=x.pending_buf[x.d_buf+Y*2]<<8|x.pending_buf[x.d_buf+Y*2+1],G=x.pending_buf[x.l_buf+Y],Y++,se===0?q(x,G,z):(T=fe[G],q(x,T+h+1,z),ne=O[T],ne!==0&&(G-=le[T],j(x,G,ne)),se--,T=He(se),q(x,T,V),ne=F[T],ne!==0&&(se-=Ee[T],j(x,se,ne)));while(Y<x.last_lit);q(x,E,z)}function dt(x,z){var V=z.dyn_tree,se=z.stat_desc.static_tree,G=z.stat_desc.has_stree,Y=z.stat_desc.elems,T,ne,_e=-1,g;for(x.heap_len=0,x.heap_max=v,T=0;T<Y;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-=se[g*2+1]);for(z.max_code=_e,T=x.heap_len>>1;T>=1;T--)xe(x,V,T);g=Y;do T=x.heap[1],x.heap[1]=x.heap[x.heap_len--],xe(x,V,1),ne=x.heap[1],x.heap[--x.heap_max]=T,x.heap[--x.heap_max]=ne,V[g*2]=V[T*2]+V[ne*2],x.depth[g]=(x.depth[T]>=x.depth[ne]?x.depth[T]:x.depth[ne])+1,V[T*2+1]=V[ne*2+1]=g,x.heap[1]=g++,xe(x,V,1);while(x.heap_len>=2);x.heap[--x.heap_max]=x.heap[1],ue(x,z),L(V,_e,x.bl_count)}function Xt(x,z,V){var se,G=-1,Y,T=z[0*2+1],ne=0,_e=7,g=4;for(T===0&&(_e=138,g=3),z[(V+1)*2+1]=65535,se=0;se<=V;se++)Y=T,T=z[(se+1)*2+1],!(++ne<_e&&Y===T)&&(ne<g?x.bl_tree[Y*2]+=ne:Y!==0?(Y!==G&&x.bl_tree[Y*2]++,x.bl_tree[I*2]++):ne<=10?x.bl_tree[R*2]++:x.bl_tree[B*2]++,ne=0,G=Y,T===0?(_e=138,g=3):Y===T?(_e=6,g=3):(_e=7,g=4))}function It(x,z,V){var se,G=-1,Y,T=z[0*2+1],ne=0,_e=7,g=4;for(T===0&&(_e=138,g=3),se=0;se<=V;se++)if(Y=T,T=z[(se+1)*2+1],!(++ne<_e&&Y===T)){if(ne<g)do q(x,Y,x.bl_tree);while(--ne!==0);else Y!==0?(Y!==G&&(q(x,Y,x.bl_tree),ne--),q(x,I,x.bl_tree),j(x,ne-3,2)):ne<=10?(q(x,R,x.bl_tree),j(x,ne-3,3)):(q(x,B,x.bl_tree),j(x,ne-11,7));ne=0,G=Y,T===0?(_e=138,g=3):Y===T?(_e=6,g=3):(_e=7,g=4)}}function $e(x){var z;for(Xt(x,x.dyn_ltree,x.l_desc.max_code),Xt(x,x.dyn_dtree,x.d_desc.max_code),dt(x,x.bl_desc),z=y-1;z>=3&&x.bl_tree[S[z]*2+1]===0;z--);return x.opt_len+=3*(z+1)+5+5+4,z}function kt(x,z,V,se){var G;for(j(x,z-257,5),j(x,V-1,5),j(x,se-4,4),G=0;G<se;G++)j(x,x.bl_tree[S[G]*2+1],3);It(x,x.dyn_ltree,z-1),It(x,x.dyn_dtree,V-1)}function Ot(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<h;V++)if(x.dyn_ltree[V*2]!==0)return r;return n}var et=!1;function zt(x){et||(D(),et=!0),x.l_desc=new Te(x.dyn_ltree,Ce),x.d_desc=new Te(x.dyn_dtree,Ie),x.bl_desc=new Te(x.bl_tree,we),x.bi_buf=0,x.bi_valid=0,ee(x)}function _(x,z,V,se){j(x,(s<<1)+(se?1:0),3),De(x,z,V)}function m(x){j(x,a<<1,3),q(x,E,Z),$(x)}function w(x,z,V,se){var G,Y,T=0;x.level>0?(x.strm.data_type===o&&(x.strm.data_type=Ot(x)),dt(x,x.l_desc),dt(x,x.d_desc),T=$e(x),G=x.opt_len+3+7>>>3,Y=x.static_len+3+7>>>3,Y<=G&&(G=Y)):G=Y=V+5,V+4<=G&&z!==-1?_(x,z,V,se):x.strategy===e||Y===G?(j(x,(a<<1)+(se?1:0),3),ke(x,Z,ae)):(j(x,(c<<1)+(se?1:0),3),kt(x,x.l_desc.max_code+1,x.d_desc.max_code+1,T+1),ke(x,x.dyn_ltree,x.dyn_dtree)),ee(x),se&&oe(x)}function N(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[(fe[V]+h+1)*2]++,x.dyn_dtree[He(z)*2]++),x.last_lit===x.lit_bufsize-1}return bi._tr_init=zt,bi._tr_stored_block=_,bi._tr_flush_block=w,bi._tr_tally=N,bi._tr_align=m,bi}var Gh,R2;function F2(){if(R2)return Gh;R2=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 Gh=t,Gh}var Hh,M2;function P2(){if(M2)return Hh;M2=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 Hh=n,Hh}var Vh,L2;function qh(){return L2||(L2=1,Vh={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"}),Vh}var N2;function ek(){if(N2)return Sn;N2=1;var t=Mr(),e=$_(),n=F2(),r=P2(),o=qh(),i=0,s=1,a=3,c=4,l=5,u=0,f=1,h=-2,d=-3,p=-5,y=-1,v=1,b=2,A=3,C=4,E=0,I=2,R=8,B=9,O=15,F=8,P=29,S=256,Q=S+1+P,Z=30,ae=19,ce=2*Q+1,fe=15,le=3,Ee=258,pe=Ee+le+1,Ce=32,Ie=42,we=69,Te=73,He=91,Le=103,j=113,q=666,re=1,$=2,ue=3,L=4,D=3;function ee(g,K){return g.msg=o[K],K}function oe(g){return(g<<1)-(g>4?9:0)}function De(g){for(var K=g.length;--K>=0;)g[K]=0}function ye(g){var K=g.state,J=K.pending;J>g.avail_out&&(J=g.avail_out),J!==0&&(t.arraySet(g.output,K.pending_buf,K.pending_out,J,g.next_out),g.next_out+=J,K.pending_out+=J,g.total_out+=J,g.avail_out-=J,K.pending-=J,K.pending===0&&(K.pending_out=0))}function xe(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,ye(g.strm)}function ke(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 Xt(g,K,J,k){var H=g.avail_in;return H>k&&(H=k),H===0?0:(g.avail_in-=H,t.arraySet(K,g.input,g.next_in,H,J),g.state.wrap===1?g.adler=n(g.adler,K,H,J):g.state.wrap===2&&(g.adler=r(g.adler,K,H,J)),g.next_in+=H,g.total_in+=H,H)}function It(g,K){var J=g.max_chain_length,k=g.strstart,H,W,Se=g.prev_length,ge=g.nice_match,be=g.strstart>g.w_size-pe?g.strstart-(g.w_size-pe):0,Ge=g.window,gn=g.w_mask,U=g.prev,Me=g.strstart+Ee,lt=Ge[k+Se-1],tt=Ge[k+Se];g.prev_length>=g.good_match&&(J>>=2),ge>g.lookahead&&(ge=g.lookahead);do if(H=K,!(Ge[H+Se]!==tt||Ge[H+Se-1]!==lt||Ge[H]!==Ge[k]||Ge[++H]!==Ge[k+1])){k+=2,H++;do;while(Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&Ge[++k]===Ge[++H]&&k<Me);if(W=Ee-(Me-k),k=Me-Ee,W>Se){if(g.match_start=K,Se=W,W>=ge)break;lt=Ge[k+Se-1],tt=Ge[k+Se]}}while((K=U[K&gn])>be&&--J!==0);return Se<=g.lookahead?Se:g.lookahead}function $e(g){var K=g.w_size,J,k,H,W,Se;do{if(W=g.window_size-g.lookahead-g.strstart,g.strstart>=K+(K-pe)){t.arraySet(g.window,g.window,K,K,0),g.match_start-=K,g.strstart-=K,g.block_start-=K,k=g.hash_size,J=k;do H=g.head[--J],g.head[J]=H>=K?H-K:0;while(--k);k=K,J=k;do H=g.prev[--J],g.prev[J]=H>=K?H-K:0;while(--k);W+=K}if(g.strm.avail_in===0)break;if(k=Xt(g.strm,g.window,g.strstart+g.lookahead,W),g.lookahead+=k,g.lookahead+g.insert>=le)for(Se=g.strstart-g.insert,g.ins_h=g.window[Se],g.ins_h=(g.ins_h<<g.hash_shift^g.window[Se+1])&g.hash_mask;g.insert&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[Se+le-1])&g.hash_mask,g.prev[Se&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=Se,Se++,g.insert--,!(g.lookahead+g.insert<le)););}while(g.lookahead<pe&&g.strm.avail_in!==0)}function kt(g,K){var J=65535;for(J>g.pending_buf_size-5&&(J=g.pending_buf_size-5);;){if(g.lookahead<=1){if($e(g),g.lookahead===0&&K===i)return re;if(g.lookahead===0)break}g.strstart+=g.lookahead,g.lookahead=0;var k=g.block_start+J;if((g.strstart===0||g.strstart>=k)&&(g.lookahead=g.strstart-k,g.strstart=k,xe(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-pe&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=0,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):(g.strstart>g.block_start&&(xe(g,!1),g.strm.avail_out===0),re)}function Ot(g,K){for(var J,k;;){if(g.lookahead<pe){if($e(g),g.lookahead<pe&&K===i)return re;if(g.lookahead===0)break}if(J=0,g.lookahead>=le&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+le-1])&g.hash_mask,J=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),J!==0&&g.strstart-J<=g.w_size-pe&&(g.match_length=It(g,J)),g.match_length>=le)if(k=e._tr_tally(g,g.strstart-g.match_start,g.match_length-le),g.lookahead-=g.match_length,g.match_length<=g.max_lazy_match&&g.lookahead>=le){g.match_length--;do g.strstart++,g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+le-1])&g.hash_mask,J=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 k=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++;if(k&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=g.strstart<le-1?g.strstart:le-1,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function et(g,K){for(var J,k,H;;){if(g.lookahead<pe){if($e(g),g.lookahead<pe&&K===i)return re;if(g.lookahead===0)break}if(J=0,g.lookahead>=le&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+le-1])&g.hash_mask,J=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=le-1,J!==0&&g.prev_length<g.max_lazy_match&&g.strstart-J<=g.w_size-pe&&(g.match_length=It(g,J),g.match_length<=5&&(g.strategy===v||g.match_length===le&&g.strstart-g.match_start>4096)&&(g.match_length=le-1)),g.prev_length>=le&&g.match_length<=g.prev_length){H=g.strstart+g.lookahead-le,k=e._tr_tally(g,g.strstart-1-g.prev_match,g.prev_length-le),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+le-1])&g.hash_mask,J=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=le-1,g.strstart++,k&&(xe(g,!1),g.strm.avail_out===0))return re}else if(g.match_available){if(k=e._tr_tally(g,0,g.window[g.strstart-1]),k&&xe(g,!1),g.strstart++,g.lookahead--,g.strm.avail_out===0)return re}else g.match_available=1,g.strstart++,g.lookahead--}return g.match_available&&(k=e._tr_tally(g,0,g.window[g.strstart-1]),g.match_available=0),g.insert=g.strstart<le-1?g.strstart:le-1,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function zt(g,K){for(var J,k,H,W,Se=g.window;;){if(g.lookahead<=Ee){if($e(g),g.lookahead<=Ee&&K===i)return re;if(g.lookahead===0)break}if(g.match_length=0,g.lookahead>=le&&g.strstart>0&&(H=g.strstart-1,k=Se[H],k===Se[++H]&&k===Se[++H]&&k===Se[++H])){W=g.strstart+Ee;do;while(k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&k===Se[++H]&&H<W);g.match_length=Ee-(W-H),g.match_length>g.lookahead&&(g.match_length=g.lookahead)}if(g.match_length>=le?(J=e._tr_tally(g,1,g.match_length-le),g.lookahead-=g.match_length,g.strstart+=g.match_length,g.match_length=0):(J=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++),J&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=0,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function _(g,K){for(var J;;){if(g.lookahead===0&&($e(g),g.lookahead===0)){if(K===i)return re;break}if(g.match_length=0,J=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++,J&&(xe(g,!1),g.strm.avail_out===0))return re}return g.insert=0,K===c?(xe(g,!0),g.strm.avail_out===0?ue:L):g.last_lit&&(xe(g,!1),g.strm.avail_out===0)?re:$}function m(g,K,J,k,H){this.good_length=g,this.max_lazy=K,this.nice_length=J,this.max_chain=k,this.func=H}var w;w=[new m(0,0,0,0,kt),new m(4,4,8,4,Ot),new m(4,5,16,8,Ot),new m(4,6,32,32,Ot),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 N(g){g.window_size=2*g.w_size,De(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=le-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=R,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(ce*2),this.dyn_dtree=new t.Buf16((2*Z+1)*2),this.bl_tree=new t.Buf16((2*ae+1)*2),De(this.dyn_ltree),De(this.dyn_dtree),De(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(fe+1),this.heap=new t.Buf16(2*Q+1),De(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*Q+1),De(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?ee(g,h):(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?Ie:j,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&&N(g.state),K}function se(g,K){return!g||!g.state||g.state.wrap!==2?h:(g.state.gzhead=K,u)}function G(g,K,J,k,H,W){if(!g)return h;var Se=1;if(K===y&&(K=6),k<0?(Se=0,k=-k):k>15&&(Se=2,k-=16),H<1||H>B||J!==R||k<8||k>15||K<0||K>9||W<0||W>C)return ee(g,h);k===8&&(k=9);var ge=new x;return g.state=ge,ge.strm=g,ge.wrap=Se,ge.gzhead=null,ge.w_bits=k,ge.w_size=1<<ge.w_bits,ge.w_mask=ge.w_size-1,ge.hash_bits=H+7,ge.hash_size=1<<ge.hash_bits,ge.hash_mask=ge.hash_size-1,ge.hash_shift=~~((ge.hash_bits+le-1)/le),ge.window=new t.Buf8(ge.w_size*2),ge.head=new t.Buf16(ge.hash_size),ge.prev=new t.Buf16(ge.w_size),ge.lit_bufsize=1<<H+6,ge.pending_buf_size=ge.lit_bufsize*4,ge.pending_buf=new t.Buf8(ge.pending_buf_size),ge.d_buf=1*ge.lit_bufsize,ge.l_buf=3*ge.lit_bufsize,ge.level=K,ge.strategy=W,ge.method=J,V(g)}function Y(g,K){return G(g,K,R,O,F,E)}function T(g,K){var J,k,H,W;if(!g||!g.state||K>l||K<0)return g?ee(g,h):h;if(k=g.state,!g.output||!g.input&&g.avail_in!==0||k.status===q&&K!==c)return ee(g,g.avail_out===0?p:h);if(k.strm=g,J=k.last_flush,k.last_flush=K,k.status===Ie)if(k.wrap===2)g.adler=0,ke(k,31),ke(k,139),ke(k,8),k.gzhead?(ke(k,(k.gzhead.text?1:0)+(k.gzhead.hcrc?2:0)+(k.gzhead.extra?4:0)+(k.gzhead.name?8:0)+(k.gzhead.comment?16:0)),ke(k,k.gzhead.time&255),ke(k,k.gzhead.time>>8&255),ke(k,k.gzhead.time>>16&255),ke(k,k.gzhead.time>>24&255),ke(k,k.level===9?2:k.strategy>=b||k.level<2?4:0),ke(k,k.gzhead.os&255),k.gzhead.extra&&k.gzhead.extra.length&&(ke(k,k.gzhead.extra.length&255),ke(k,k.gzhead.extra.length>>8&255)),k.gzhead.hcrc&&(g.adler=r(g.adler,k.pending_buf,k.pending,0)),k.gzindex=0,k.status=we):(ke(k,0),ke(k,0),ke(k,0),ke(k,0),ke(k,0),ke(k,k.level===9?2:k.strategy>=b||k.level<2?4:0),ke(k,D),k.status=j);else{var Se=R+(k.w_bits-8<<4)<<8,ge=-1;k.strategy>=b||k.level<2?ge=0:k.level<6?ge=1:k.level===6?ge=2:ge=3,Se|=ge<<6,k.strstart!==0&&(Se|=Ce),Se+=31-Se%31,k.status=j,dt(k,Se),k.strstart!==0&&(dt(k,g.adler>>>16),dt(k,g.adler&65535)),g.adler=1}if(k.status===we)if(k.gzhead.extra){for(H=k.pending;k.gzindex<(k.gzhead.extra.length&65535)&&!(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),ye(g),H=k.pending,k.pending===k.pending_buf_size));)ke(k,k.gzhead.extra[k.gzindex]&255),k.gzindex++;k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),k.gzindex===k.gzhead.extra.length&&(k.gzindex=0,k.status=Te)}else k.status=Te;if(k.status===Te)if(k.gzhead.name){H=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),ye(g),H=k.pending,k.pending===k.pending_buf_size)){W=1;break}k.gzindex<k.gzhead.name.length?W=k.gzhead.name.charCodeAt(k.gzindex++)&255:W=0,ke(k,W)}while(W!==0);k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),W===0&&(k.gzindex=0,k.status=He)}else k.status=He;if(k.status===He)if(k.gzhead.comment){H=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),ye(g),H=k.pending,k.pending===k.pending_buf_size)){W=1;break}k.gzindex<k.gzhead.comment.length?W=k.gzhead.comment.charCodeAt(k.gzindex++)&255:W=0,ke(k,W)}while(W!==0);k.gzhead.hcrc&&k.pending>H&&(g.adler=r(g.adler,k.pending_buf,k.pending-H,H)),W===0&&(k.status=Le)}else k.status=Le;if(k.status===Le&&(k.gzhead.hcrc?(k.pending+2>k.pending_buf_size&&ye(g),k.pending+2<=k.pending_buf_size&&(ke(k,g.adler&255),ke(k,g.adler>>8&255),g.adler=0,k.status=j)):k.status=j),k.pending!==0){if(ye(g),g.avail_out===0)return k.last_flush=-1,u}else if(g.avail_in===0&&oe(K)<=oe(J)&&K!==c)return ee(g,p);if(k.status===q&&g.avail_in!==0)return ee(g,p);if(g.avail_in!==0||k.lookahead!==0||K!==i&&k.status!==q){var be=k.strategy===b?_(k,K):k.strategy===A?zt(k,K):w[k.level].func(k,K);if((be===ue||be===L)&&(k.status=q),be===re||be===ue)return g.avail_out===0&&(k.last_flush=-1),u;if(be===$&&(K===s?e._tr_align(k):K!==l&&(e._tr_stored_block(k,0,0,!1),K===a&&(De(k.head),k.lookahead===0&&(k.strstart=0,k.block_start=0,k.insert=0))),ye(g),g.avail_out===0))return k.last_flush=-1,u}return K!==c?u:k.wrap<=0?f:(k.wrap===2?(ke(k,g.adler&255),ke(k,g.adler>>8&255),ke(k,g.adler>>16&255),ke(k,g.adler>>24&255),ke(k,g.total_in&255),ke(k,g.total_in>>8&255),ke(k,g.total_in>>16&255),ke(k,g.total_in>>24&255)):(dt(k,g.adler>>>16),dt(k,g.adler&65535)),ye(g),k.wrap>0&&(k.wrap=-k.wrap),k.pending!==0?u:f)}function ne(g){var K;return!g||!g.state?h:(K=g.state.status,K!==Ie&&K!==we&&K!==Te&&K!==He&&K!==Le&&K!==j&&K!==q?ee(g,h):(g.state=null,K===j?ee(g,d):u))}function _e(g,K){var J=K.length,k,H,W,Se,ge,be,Ge,gn;if(!g||!g.state||(k=g.state,Se=k.wrap,Se===2||Se===1&&k.status!==Ie||k.lookahead))return h;for(Se===1&&(g.adler=n(g.adler,K,J,0)),k.wrap=0,J>=k.w_size&&(Se===0&&(De(k.head),k.strstart=0,k.block_start=0,k.insert=0),gn=new t.Buf8(k.w_size),t.arraySet(gn,K,J-k.w_size,k.w_size,0),K=gn,J=k.w_size),ge=g.avail_in,be=g.next_in,Ge=g.input,g.avail_in=J,g.next_in=0,g.input=K,$e(k);k.lookahead>=le;){H=k.strstart,W=k.lookahead-(le-1);do k.ins_h=(k.ins_h<<k.hash_shift^k.window[H+le-1])&k.hash_mask,k.prev[H&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=H,H++;while(--W);k.strstart=H,k.lookahead=le-1,$e(k)}return k.strstart+=k.lookahead,k.block_start=k.strstart,k.insert=k.lookahead,k.lookahead=0,k.match_length=k.prev_length=le-1,k.match_available=0,g.next_in=be,g.input=Ge,g.avail_in=ge,k.wrap=Se,u}return Sn.deflateInit=Y,Sn.deflateInit2=G,Sn.deflateReset=V,Sn.deflateResetKeep=z,Sn.deflateSetHeader=se,Sn.deflate=T,Sn.deflateEnd=ne,Sn.deflateSetDictionary=_e,Sn.deflateInfo="pako deflate (from Nodeca project)",Sn}var yi={},O2;function z2(){if(O2)return yi;O2=1;var t=Mr(),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,yi.string2buf=function(s){var a,c,l,u,f,h=s.length,d=0;for(u=0;u<h;u++)c=s.charCodeAt(u),(c&64512)===55296&&u+1<h&&(l=s.charCodeAt(u+1),(l&64512)===56320&&(c=65536+(c-55296<<10)+(l-56320),u++)),d+=c<128?1:c<2048?2:c<65536?3:4;for(a=new t.Buf8(d),f=0,u=0;f<d;u++)c=s.charCodeAt(u),(c&64512)===55296&&u+1<h&&(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 yi.buf2binstring=function(s){return i(s,s.length)},yi.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},yi.buf2string=function(s,a){var c,l,u,f,h=a||s.length,d=new Array(h*2);for(l=0,c=0;c<h;){if(u=s[c++],u<128){d[l++]=u;continue}if(f=r[u],f>4){d[l++]=65533,c+=f-1;continue}for(u&=f===2?31:f===3?15:7;f>1&&c<h;)u=u<<6|s[c++]&63,f--;if(f>1){d[l++]=65533;continue}u<65536?d[l++]=u:(u-=65536,d[l++]=55296|u>>10&1023,d[l++]=56320|u&1023)}return i(d,l)},yi.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},yi}var jh,U2;function G2(){if(U2)return jh;U2=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 jh=t,jh}var H2;function tk(){if(H2)return co;H2=1;var t=ek(),e=Mr(),n=z2(),r=qh(),o=G2(),i=Object.prototype.toString,s=0,a=4,c=0,l=1,u=2,f=-1,h=0,d=8;function p(A){if(!(this instanceof p))return new p(A);this.options=e.assign({level:f,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},A||{});var C=this.options;C.raw&&C.windowBits>0?C.windowBits=-C.windowBits:C.gzip&&C.windowBits>0&&C.windowBits<16&&(C.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,C.level,C.method,C.windowBits,C.memLevel,C.strategy);if(E!==c)throw new Error(r[E]);if(C.header&&t.deflateSetHeader(this.strm,C.header),C.dictionary){var I;if(typeof C.dictionary=="string"?I=n.string2buf(C.dictionary):i.call(C.dictionary)==="[object ArrayBuffer]"?I=new Uint8Array(C.dictionary):I=C.dictionary,E=t.deflateSetDictionary(this.strm,I),E!==c)throw new Error(r[E]);this._dict_set=!0}}p.prototype.push=function(A,C){var E=this.strm,I=this.options.chunkSize,R,B;if(this.ended)return!1;B=C===~~C?C:C===!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),R=t.deflate(E,B),R!==l&&R!==c)return this.onEnd(R),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)&&R!==l);return B===a?(R=t.deflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===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,C){var E=new p(C);if(E.push(A,!0),E.err)throw E.msg||r[E.err];return E.result}function v(A,C){return C=C||{},C.raw=!0,y(A,C)}function b(A,C){return C=C||{},C.gzip=!0,y(A,C)}return co.Deflate=p,co.deflate=y,co.deflateRaw=v,co.gzip=b,co}var lo={},un={},Wh,V2;function nk(){if(V2)return Wh;V2=1;var t=30,e=12;return Wh=function(r,o){var i,s,a,c,l,u,f,h,d,p,y,v,b,A,C,E,I,R,B,O,F,P,S,Q,Z;i=r.state,s=r.next_in,Q=r.input,a=s+(r.avail_in-5),c=r.next_out,Z=r.output,l=c-(o-r.avail_out),u=c+(r.avail_out-257),f=i.dmax,h=i.wsize,d=i.whave,p=i.wnext,y=i.window,v=i.hold,b=i.bits,A=i.lencode,C=i.distcode,E=(1<<i.lenbits)-1,I=(1<<i.distbits)-1;e:do{b<15&&(v+=Q[s++]<<b,b+=8,v+=Q[s++]<<b,b+=8),R=A[v&E];t:for(;;){if(B=R>>>24,v>>>=B,b-=B,B=R>>>16&255,B===0)Z[c++]=R&65535;else if(B&16){O=R&65535,B&=15,B&&(b<B&&(v+=Q[s++]<<b,b+=8),O+=v&(1<<B)-1,v>>>=B,b-=B),b<15&&(v+=Q[s++]<<b,b+=8,v+=Q[s++]<<b,b+=8),R=C[v&I];n:for(;;){if(B=R>>>24,v>>>=B,b-=B,B=R>>>16&255,B&16){if(F=R&65535,B&=15,b<B&&(v+=Q[s++]<<b,b+=8,b<B&&(v+=Q[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>d&&i.sane){r.msg="invalid distance too far back",i.mode=t;break e}if(P=0,S=y,p===0){if(P+=h-B,B<O){O-=B;do Z[c++]=y[P++];while(--B);P=c-F,S=Z}}else if(p<B){if(P+=h+p-B,B-=p,B<O){O-=B;do Z[c++]=y[P++];while(--B);if(P=0,p<O){B=p,O-=B;do Z[c++]=y[P++];while(--B);P=c-F,S=Z}}}else if(P+=p-B,B<O){O-=B;do Z[c++]=y[P++];while(--B);P=c-F,S=Z}for(;O>2;)Z[c++]=S[P++],Z[c++]=S[P++],Z[c++]=S[P++],O-=3;O&&(Z[c++]=S[P++],O>1&&(Z[c++]=S[P++]))}else{P=c-F;do Z[c++]=Z[P++],Z[c++]=Z[P++],Z[c++]=Z[P++],O-=3;while(O>2);O&&(Z[c++]=Z[P++],O>1&&(Z[c++]=Z[P++]))}}else if(B&64){r.msg="invalid distance code",i.mode=t;break e}else{R=C[(R&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{R=A[(R&65535)+(v&(1<<B)-1)];continue t}break}}while(s<a&&c<u);O=b>>3,s-=O,b-=O<<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},Wh}var Qh,q2;function rk(){if(q2)return Qh;q2=1;var t=Mr(),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 Qh=function(h,d,p,y,v,b,A,C){var E=C.bits,I=0,R=0,B=0,O=0,F=0,P=0,S=0,Q=0,Z=0,ae=0,ce,fe,le,Ee,pe,Ce=null,Ie=0,we,Te=new t.Buf16(e+1),He=new t.Buf16(e+1),Le=null,j=0,q,re,$;for(I=0;I<=e;I++)Te[I]=0;for(R=0;R<y;R++)Te[d[p+R]]++;for(F=E,O=e;O>=1&&Te[O]===0;O--);if(F>O&&(F=O),O===0)return v[b++]=1<<24|64<<16|0,v[b++]=1<<24|64<<16|0,C.bits=1,0;for(B=1;B<O&&Te[B]===0;B++);for(F<B&&(F=B),Q=1,I=1;I<=e;I++)if(Q<<=1,Q-=Te[I],Q<0)return-1;if(Q>0&&(h===o||O!==1))return-1;for(He[1]=0,I=1;I<e;I++)He[I+1]=He[I]+Te[I];for(R=0;R<y;R++)d[p+R]!==0&&(A[He[d[p+R]]++]=R);if(h===o?(Ce=Le=A,we=19):h===i?(Ce=a,Ie-=257,Le=c,j-=257,we=256):(Ce=l,Le=u,we=-1),ae=0,R=0,I=B,pe=b,P=F,S=0,le=-1,Z=1<<F,Ee=Z-1,h===i&&Z>n||h===s&&Z>r)return 1;for(;;){q=I-S,A[R]<we?(re=0,$=A[R]):A[R]>we?(re=Le[j+A[R]],$=Ce[Ie+A[R]]):(re=96,$=0),ce=1<<I-S,fe=1<<P,B=fe;do fe-=ce,v[pe+(ae>>S)+fe]=q<<24|re<<16|$|0;while(fe!==0);for(ce=1<<I-1;ae&ce;)ce>>=1;if(ce!==0?(ae&=ce-1,ae+=ce):ae=0,R++,--Te[I]===0){if(I===O)break;I=d[p+A[R]]}if(I>F&&(ae&Ee)!==le){for(S===0&&(S=F),pe+=B,P=I-S,Q=1<<P;P+S<O&&(Q-=Te[P+S],!(Q<=0));)P++,Q<<=1;if(Z+=1<<P,h===i&&Z>n||h===s&&Z>r)return 1;le=ae&Ee,v[le]=F<<24|P<<16|pe-b|0}}return ae!==0&&(v[pe+ae]=I-S<<24|64<<16|0),C.bits=F,0},Qh}var j2;function ik(){if(j2)return un;j2=1;var t=Mr(),e=F2(),n=P2(),r=nk(),o=rk(),i=0,s=1,a=2,c=4,l=5,u=6,f=0,h=1,d=2,p=-2,y=-3,v=-4,b=-5,A=8,C=1,E=2,I=3,R=4,B=5,O=6,F=7,P=8,S=9,Q=10,Z=11,ae=12,ce=13,fe=14,le=15,Ee=16,pe=17,Ce=18,Ie=19,we=20,Te=21,He=22,Le=23,j=24,q=25,re=26,$=27,ue=28,L=29,D=30,ee=31,oe=32,De=852,ye=592,xe=15,ke=xe;function dt(G){return(G>>>24&255)+(G>>>8&65280)+((G&65280)<<8)+((G&255)<<24)}function Xt(){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 Y;return!G||!G.state?p:(Y=G.state,G.total_in=G.total_out=Y.total=0,G.msg="",Y.wrap&&(G.adler=Y.wrap&1),Y.mode=C,Y.last=0,Y.havedict=0,Y.dmax=32768,Y.head=null,Y.hold=0,Y.bits=0,Y.lencode=Y.lendyn=new t.Buf32(De),Y.distcode=Y.distdyn=new t.Buf32(ye),Y.sane=1,Y.back=-1,f)}function $e(G){var Y;return!G||!G.state?p:(Y=G.state,Y.wsize=0,Y.whave=0,Y.wnext=0,It(G))}function kt(G,Y){var T,ne;return!G||!G.state||(ne=G.state,Y<0?(T=0,Y=-Y):(T=(Y>>4)+1,Y<48&&(Y&=15)),Y&&(Y<8||Y>15))?p:(ne.window!==null&&ne.wbits!==Y&&(ne.window=null),ne.wrap=T,ne.wbits=Y,$e(G))}function Ot(G,Y){var T,ne;return G?(ne=new Xt,G.state=ne,ne.window=null,T=kt(G,Y),T!==f&&(G.state=null),T):p}function et(G){return Ot(G,ke)}var zt=!0,_,m;function w(G){if(zt){var Y;for(_=new t.Buf32(512),m=new t.Buf32(32),Y=0;Y<144;)G.lens[Y++]=8;for(;Y<256;)G.lens[Y++]=9;for(;Y<280;)G.lens[Y++]=7;for(;Y<288;)G.lens[Y++]=8;for(o(s,G.lens,0,288,_,0,G.work,{bits:9}),Y=0;Y<32;)G.lens[Y++]=5;o(a,G.lens,0,32,m,0,G.work,{bits:5}),zt=!1}G.lencode=_,G.lenbits=9,G.distcode=m,G.distbits=5}function N(G,Y,T,ne){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)),ne>=g.wsize?(t.arraySet(g.window,Y,T-g.wsize,g.wsize,0),g.wnext=0,g.whave=g.wsize):(_e=g.wsize-g.wnext,_e>ne&&(_e=ne),t.arraySet(g.window,Y,T-ne,_e,g.wnext),ne-=_e,ne?(t.arraySet(g.window,Y,T-ne,ne,0),g.wnext=ne,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,Y){var T,ne,_e,g,K,J,k,H,W,Se,ge,be,Ge,gn,U=0,Me,lt,tt,Tt,Be,sr,ft,ze,ht=new t.Buf8(4),In,rn,Ua=[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===ae&&(T.mode=ce),K=G.next_out,_e=G.output,k=G.avail_out,g=G.next_in,ne=G.input,J=G.avail_in,H=T.hold,W=T.bits,Se=J,ge=k,ze=f;e:for(;;)switch(T.mode){case C:if(T.wrap===0){T.mode=ce;break}for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=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,W=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,W-=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?Q:ae,H=0,W=0;break;case E:for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=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,W=0,T.mode=I;case I:for(;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=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,W=0,T.mode=R;case R:for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=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,W=0,T.mode=B;case B:if(T.flags&1024){for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=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,W=0}else T.head&&(T.head.extra=null);T.mode=O;case O:if(T.flags&1024&&(be=T.length,be>J&&(be=J),be&&(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,ne,g,be,ft)),T.flags&512&&(T.check=n(T.check,ne,be,g)),J-=be,g+=be,T.length-=be),T.length))break e;T.length=0,T.mode=F;case F:if(T.flags&2048){if(J===0)break e;be=0;do ft=ne[g+be++],T.head&&ft&&T.length<65536&&(T.head.name+=String.fromCharCode(ft));while(ft&&be<J);if(T.flags&512&&(T.check=n(T.check,ne,be,g)),J-=be,g+=be,ft)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=P;case P:if(T.flags&4096){if(J===0)break e;be=0;do ft=ne[g+be++],T.head&&ft&&T.length<65536&&(T.head.comment+=String.fromCharCode(ft));while(ft&&be<J);if(T.flags&512&&(T.check=n(T.check,ne,be,g)),J-=be,g+=be,ft)break e}else T.head&&(T.head.comment=null);T.mode=S;case S:if(T.flags&512){for(;W<16;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(H!==(T.check&65535)){G.msg="header crc mismatch",T.mode=D;break}H=0,W=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),G.adler=T.check=0,T.mode=ae;break;case Q:for(;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}G.adler=T.check=dt(H),H=0,W=0,T.mode=Z;case Z:if(T.havedict===0)return G.next_out=K,G.avail_out=k,G.next_in=g,G.avail_in=J,T.hold=H,T.bits=W,d;G.adler=T.check=1,T.mode=ae;case ae:if(Y===l||Y===u)break e;case ce:if(T.last){H>>>=W&7,W-=W&7,T.mode=$;break}for(;W<3;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}switch(T.last=H&1,H>>>=1,W-=1,H&3){case 0:T.mode=fe;break;case 1:if(w(T),T.mode=we,Y===u){H>>>=2,W-=2;break e}break;case 2:T.mode=pe;break;case 3:G.msg="invalid block type",T.mode=D}H>>>=2,W-=2;break;case fe:for(H>>>=W&7,W-=W&7;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if((H&65535)!==(H>>>16^65535)){G.msg="invalid stored block lengths",T.mode=D;break}if(T.length=H&65535,H=0,W=0,T.mode=le,Y===u)break e;case le:T.mode=Ee;case Ee:if(be=T.length,be){if(be>J&&(be=J),be>k&&(be=k),be===0)break e;t.arraySet(_e,ne,g,be,K),J-=be,g+=be,k-=be,K+=be,T.length-=be;break}T.mode=ae;break;case pe:for(;W<14;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(T.nlen=(H&31)+257,H>>>=5,W-=5,T.ndist=(H&31)+1,H>>>=5,W-=5,T.ncode=(H&15)+4,H>>>=4,W-=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(;W<3;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.lens[Ua[T.have++]]=H&7,H>>>=3,W-=3}for(;T.have<19;)T.lens[Ua[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,In={bits:T.lenbits},ze=o(i,T.lens,0,19,T.lencode,0,T.work,In),T.lenbits=In.bits,ze){G.msg="invalid code lengths set",T.mode=D;break}T.have=0,T.mode=Ie;case Ie: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<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(tt<16)H>>>=Me,W-=Me,T.lens[T.have++]=tt;else{if(tt===16){for(rn=Me+2;W<rn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(H>>>=Me,W-=Me,T.have===0){G.msg="invalid bit length repeat",T.mode=D;break}ft=T.lens[T.have-1],be=3+(H&3),H>>>=2,W-=2}else if(tt===17){for(rn=Me+3;W<rn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=Me,W-=Me,ft=0,be=3+(H&7),H>>>=3,W-=3}else{for(rn=Me+7;W<rn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=Me,W-=Me,ft=0,be=11+(H&127),H>>>=7,W-=7}if(T.have+be>T.nlen+T.ndist){G.msg="invalid bit length repeat",T.mode=D;break}for(;be--;)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,In={bits:T.lenbits},ze=o(s,T.lens,0,T.nlen,T.lencode,0,T.work,In),T.lenbits=In.bits,ze){G.msg="invalid literal/lengths set",T.mode=D;break}if(T.distbits=6,T.distcode=T.distdyn,In={bits:T.distbits},ze=o(a,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,In),T.distbits=In.bits,ze){G.msg="invalid distances set",T.mode=D;break}if(T.mode=we,Y===u)break e;case we:T.mode=Te;case Te:if(J>=6&&k>=258){G.next_out=K,G.avail_out=k,G.next_in=g,G.avail_in=J,T.hold=H,T.bits=W,r(G,ge),K=G.next_out,_e=G.output,k=G.avail_out,g=G.next_in,ne=G.input,J=G.avail_in,H=T.hold,W=T.bits,T.mode===ae&&(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<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(lt&&!(lt&240)){for(Tt=Me,Be=lt,sr=tt;U=T.lencode[sr+((H&(1<<Tt+Be)-1)>>Tt)],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Tt+Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=Tt,W-=Tt,T.back+=Tt}if(H>>>=Me,W-=Me,T.back+=Me,T.length=tt,lt===0){T.mode=re;break}if(lt&32){T.back=-1,T.mode=ae;break}if(lt&64){G.msg="invalid literal/length code",T.mode=D;break}T.extra=lt&15,T.mode=He;case He:if(T.extra){for(rn=T.extra;W<rn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.length+=H&(1<<T.extra)-1,H>>>=T.extra,W-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=Le;case Le:for(;U=T.distcode[H&(1<<T.distbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(!(lt&240)){for(Tt=Me,Be=lt,sr=tt;U=T.distcode[sr+((H&(1<<Tt+Be)-1)>>Tt)],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Tt+Me<=W);){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}H>>>=Tt,W-=Tt,T.back+=Tt}if(H>>>=Me,W-=Me,T.back+=Me,lt&64){G.msg="invalid distance code",T.mode=D;break}T.offset=tt,T.extra=lt&15,T.mode=j;case j:if(T.extra){for(rn=T.extra;W<rn;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}T.offset+=H&(1<<T.extra)-1,H>>>=T.extra,W-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){G.msg="invalid distance too far back",T.mode=D;break}T.mode=q;case q:if(k===0)break e;if(be=ge-k,T.offset>be){if(be=T.offset-be,be>T.whave&&T.sane){G.msg="invalid distance too far back",T.mode=D;break}be>T.wnext?(be-=T.wnext,Ge=T.wsize-be):Ge=T.wnext-be,be>T.length&&(be=T.length),gn=T.window}else gn=_e,Ge=K-T.offset,be=T.length;be>k&&(be=k),k-=be,T.length-=be;do _e[K++]=gn[Ge++];while(--be);T.length===0&&(T.mode=Te);break;case re:if(k===0)break e;_e[K++]=T.length,k--,T.mode=Te;break;case $:if(T.wrap){for(;W<32;){if(J===0)break e;J--,H|=ne[g++]<<W,W+=8}if(ge-=k,G.total_out+=ge,T.total+=ge,ge&&(G.adler=T.check=T.flags?n(T.check,_e,ge,K-ge):e(T.check,_e,ge,K-ge)),ge=k,(T.flags?H:dt(H))!==T.check){G.msg="incorrect data check",T.mode=D;break}H=0,W=0}T.mode=ue;case ue:if(T.wrap&&T.flags){for(;W<32;){if(J===0)break e;J--,H+=ne[g++]<<W,W+=8}if(H!==(T.total&4294967295)){G.msg="incorrect length check",T.mode=D;break}H=0,W=0}T.mode=L;case L:ze=h;break e;case D:ze=y;break e;case ee:return v;case oe:default:return p}return G.next_out=K,G.avail_out=k,G.next_in=g,G.avail_in=J,T.hold=H,T.bits=W,(T.wsize||ge!==G.avail_out&&T.mode<D&&(T.mode<$||Y!==c))&&N(G,G.output,G.next_out,ge-G.avail_out),Se-=G.avail_in,ge-=G.avail_out,G.total_in+=Se,G.total_out+=ge,T.total+=ge,T.wrap&&ge&&(G.adler=T.check=T.flags?n(T.check,_e,ge,G.next_out-ge):e(T.check,_e,ge,G.next_out-ge)),G.data_type=T.bits+(T.last?64:0)+(T.mode===ae?128:0)+(T.mode===we||T.mode===le?256:0),(Se===0&&ge===0||Y===c)&&ze===f&&(ze=b),ze}function z(G){if(!G||!G.state)return p;var Y=G.state;return Y.window&&(Y.window=null),G.state=null,f}function V(G,Y){var T;return!G||!G.state||(T=G.state,!(T.wrap&2))?p:(T.head=Y,Y.done=!1,f)}function se(G,Y){var T=Y.length,ne,_e,g;return!G||!G.state||(ne=G.state,ne.wrap!==0&&ne.mode!==Z)?p:ne.mode===Z&&(_e=1,_e=e(_e,Y,T,0),_e!==ne.check)?y:(g=N(G,Y,T,T),g?(ne.mode=ee,v):(ne.havedict=1,f))}return un.inflateReset=$e,un.inflateReset2=kt,un.inflateResetKeep=It,un.inflateInit=et,un.inflateInit2=Ot,un.inflate=x,un.inflateEnd=z,un.inflateGetHeader=V,un.inflateSetDictionary=se,un.inflateInfo="pako inflate (from Nodeca project)",un}var Yh,W2;function Q2(){return W2||(W2=1,Yh={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}),Yh}var Zh,Y2;function ok(){if(Y2)return Zh;Y2=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 Zh=t,Zh}var Z2;function sk(){if(Z2)return lo;Z2=1;var t=ik(),e=Mr(),n=z2(),r=Q2(),o=qh(),i=G2(),s=ok(),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 h=this.options;h.raw&&h.windowBits>=0&&h.windowBits<16&&(h.windowBits=-h.windowBits,h.windowBits===0&&(h.windowBits=-15)),h.windowBits>=0&&h.windowBits<16&&!(f&&f.windowBits)&&(h.windowBits+=32),h.windowBits>15&&h.windowBits<48&&(h.windowBits&15||(h.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var d=t.inflateInit2(this.strm,h.windowBits);if(d!==r.Z_OK)throw new Error(o[d]);if(this.header=new s,t.inflateGetHeader(this.strm,this.header),h.dictionary&&(typeof h.dictionary=="string"?h.dictionary=n.string2buf(h.dictionary):a.call(h.dictionary)==="[object ArrayBuffer]"&&(h.dictionary=new Uint8Array(h.dictionary)),h.raw&&(d=t.inflateSetDictionary(this.strm,h.dictionary),d!==r.Z_OK)))throw new Error(o[d])}c.prototype.push=function(f,h){var d=this.strm,p=this.options.chunkSize,y=this.options.dictionary,v,b,A,C,E,I=!1;if(this.ended)return!1;b=h===~~h?h:h===!0?r.Z_FINISH:r.Z_NO_FLUSH,typeof f=="string"?d.input=n.binstring2buf(f):a.call(f)==="[object ArrayBuffer]"?d.input=new Uint8Array(f):d.input=f,d.next_in=0,d.avail_in=d.input.length;do{if(d.avail_out===0&&(d.output=new e.Buf8(p),d.next_out=0,d.avail_out=p),v=t.inflate(d,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;d.next_out&&(d.avail_out===0||v===r.Z_STREAM_END||d.avail_in===0&&(b===r.Z_FINISH||b===r.Z_SYNC_FLUSH))&&(this.options.to==="string"?(A=n.utf8border(d.output,d.next_out),C=d.next_out-A,E=n.buf2string(d.output,A),d.next_out=C,d.avail_out=p-C,C&&e.arraySet(d.output,d.output,A,C,0),this.onData(E)):this.onData(e.shrinkBuf(d.output,d.next_out))),d.avail_in===0&&d.avail_out===0&&(I=!0)}while((d.avail_in>0||d.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),d.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,h){var d=new c(h);if(d.push(f,!0),d.err)throw d.msg||o[d.err];return d.result}function u(f,h){return h=h||{},h.raw=!0,l(f,h)}return lo.Inflate=c,lo.inflate=l,lo.inflateRaw=u,lo.ungzip=l,lo}var Xh,X2;function ak(){if(X2)return Xh;X2=1;var t=Mr().assign,e=tk(),n=sk(),r=Q2(),o={};return t(o,e,n,r),Xh=o,Xh}var Sl=ak();async function Pr(t){try{let e,n=0,r=0;const o=[];let i=0,s;do{const c=t.subarray(n);if(s=new Sl.Inflate,{strm:e}=s,s.push(c,Sl.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 K2(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 Sl.Inflate;if({strm:n}=y,y.push(p,Sl.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 h=new Uint8Array(u);for(let p=0,y=0;p<a.length;p++)h.set(a[p],y),y+=a[p].length;return{buffer:Ke.Buffer.from(h),cpositions:c,dpositions:l}}catch(n){throw/incorrect header check/.exec(`${n}`)?new Error("problem decompressing block: incorrect gzip header check"):n}}var Kh,J2;function ck(){if(J2)return Kh;J2=1,Kh=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(P,S,Q){this.low=P|0,this.high=S|0,this.unsigned=!!Q}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0});function n(P){return(P&&P.__isLong__)===!0}e.isLong=n;var r={},o={};function i(P,S){var Q,Z,ae;return S?(P>>>=0,(ae=0<=P&&P<256)&&(Z=o[P],Z)?Z:(Q=a(P,(P|0)<0?-1:0,!0),ae&&(o[P]=Q),Q)):(P|=0,(ae=-128<=P&&P<128)&&(Z=r[P],Z)?Z:(Q=a(P,P<0?-1:0,!1),ae&&(r[P]=Q),Q))}e.fromInt=i;function s(P,S){if(isNaN(P))return S?A:b;if(S){if(P<0)return A;if(P>=p)return B}else{if(P<=-9223372036854776e3)return O;if(P+1>=y)return R}return P<0?s(-P,S).neg():a(P%d|0,P/d|0,S)}e.fromNumber=s;function a(P,S,Q){return new e(P,S,Q)}e.fromBits=a;var c=Math.pow;function l(P,S,Q){if(P.length===0)throw Error("empty string");if(P==="NaN"||P==="Infinity"||P==="+Infinity"||P==="-Infinity")return b;if(typeof S=="number"?(Q=S,S=!1):S=!!S,Q=Q||10,Q<2||36<Q)throw RangeError("radix");var Z;if((Z=P.indexOf("-"))>0)throw Error("interior hyphen");if(Z===0)return l(P.substring(1),S,Q).neg();for(var ae=s(c(Q,8)),ce=b,fe=0;fe<P.length;fe+=8){var le=Math.min(8,P.length-fe),Ee=parseInt(P.substring(fe,fe+le),Q);if(le<8){var pe=s(c(Q,le));ce=ce.mul(pe).add(s(Ee))}else ce=ce.mul(ae),ce=ce.add(s(Ee))}return ce.unsigned=S,ce}e.fromString=l;function u(P,S){return typeof P=="number"?s(P,S):typeof P=="string"?l(P,S):a(P.low,P.high,typeof S=="boolean"?S:P.unsigned)}e.fromValue=u;var f=65536,h=1<<24,d=f*f,p=d*d,y=p/2,v=i(h),b=i(0);e.ZERO=b;var A=i(0,!0);e.UZERO=A;var C=i(1);e.ONE=C;var E=i(1,!0);e.UONE=E;var I=i(-1);e.NEG_ONE=I;var R=a(-1,2147483647,!1);e.MAX_VALUE=R;var B=a(-1,-1,!0);e.MAX_UNSIGNED_VALUE=B;var O=a(0,-2147483648,!1);e.MIN_VALUE=O;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)*d+(this.low>>>0):this.high*d+(this.low>>>0)},F.toString=function(S){if(S=S||10,S<2||36<S)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(O)){var Q=s(S),Z=this.div(Q),ae=Z.mul(Q).sub(this);return Z.toString(S)+ae.toInt().toString(S)}else return"-"+this.neg().toString(S);for(var ce=s(c(S,6),this.unsigned),fe=this,le="";;){var Ee=fe.div(ce),pe=fe.sub(Ee.mul(ce)).toInt()>>>0,Ce=pe.toString(S);if(fe=Ee,fe.isZero())return Ce+le;for(;Ce.length<6;)Ce="0"+Ce;le=""+Ce+le}},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(O)?64:this.neg().getNumBitsAbs();for(var S=this.high!=0?this.high:this.low,Q=31;Q>0&&!(S&1<<Q);Q--);return this.high!=0?Q+33:Q+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(S){return n(S)||(S=u(S)),this.unsigned!==S.unsigned&&this.high>>>31===1&&S.high>>>31===1?!1:this.high===S.high&&this.low===S.low},F.eq=F.equals,F.notEquals=function(S){return!this.eq(S)},F.neq=F.notEquals,F.ne=F.notEquals,F.lessThan=function(S){return this.comp(S)<0},F.lt=F.lessThan,F.lessThanOrEqual=function(S){return this.comp(S)<=0},F.lte=F.lessThanOrEqual,F.le=F.lessThanOrEqual,F.greaterThan=function(S){return this.comp(S)>0},F.gt=F.greaterThan,F.greaterThanOrEqual=function(S){return this.comp(S)>=0},F.gte=F.greaterThanOrEqual,F.ge=F.greaterThanOrEqual,F.compare=function(S){if(n(S)||(S=u(S)),this.eq(S))return 0;var Q=this.isNegative(),Z=S.isNegative();return Q&&!Z?-1:!Q&&Z?1:this.unsigned?S.high>>>0>this.high>>>0||S.high===this.high&&S.low>>>0>this.low>>>0?-1:1:this.sub(S).isNegative()?-1:1},F.comp=F.compare,F.negate=function(){return!this.unsigned&&this.eq(O)?O:this.not().add(C)},F.neg=F.negate,F.add=function(S){n(S)||(S=u(S));var Q=this.high>>>16,Z=this.high&65535,ae=this.low>>>16,ce=this.low&65535,fe=S.high>>>16,le=S.high&65535,Ee=S.low>>>16,pe=S.low&65535,Ce=0,Ie=0,we=0,Te=0;return Te+=ce+pe,we+=Te>>>16,Te&=65535,we+=ae+Ee,Ie+=we>>>16,we&=65535,Ie+=Z+le,Ce+=Ie>>>16,Ie&=65535,Ce+=Q+fe,Ce&=65535,a(we<<16|Te,Ce<<16|Ie,this.unsigned)},F.subtract=function(S){return n(S)||(S=u(S)),this.add(S.neg())},F.sub=F.subtract,F.multiply=function(S){if(this.isZero())return b;if(n(S)||(S=u(S)),t){var Q=t.mul(this.low,this.high,S.low,S.high);return a(Q,t.get_high(),this.unsigned)}if(S.isZero())return b;if(this.eq(O))return S.isOdd()?O:b;if(S.eq(O))return this.isOdd()?O:b;if(this.isNegative())return S.isNegative()?this.neg().mul(S.neg()):this.neg().mul(S).neg();if(S.isNegative())return this.mul(S.neg()).neg();if(this.lt(v)&&S.lt(v))return s(this.toNumber()*S.toNumber(),this.unsigned);var Z=this.high>>>16,ae=this.high&65535,ce=this.low>>>16,fe=this.low&65535,le=S.high>>>16,Ee=S.high&65535,pe=S.low>>>16,Ce=S.low&65535,Ie=0,we=0,Te=0,He=0;return He+=fe*Ce,Te+=He>>>16,He&=65535,Te+=ce*Ce,we+=Te>>>16,Te&=65535,Te+=fe*pe,we+=Te>>>16,Te&=65535,we+=ae*Ce,Ie+=we>>>16,we&=65535,we+=ce*pe,Ie+=we>>>16,we&=65535,we+=fe*Ee,Ie+=we>>>16,we&=65535,Ie+=Z*Ce+ae*pe+ce*Ee+fe*le,Ie&=65535,a(Te<<16|He,Ie<<16|we,this.unsigned)},F.mul=F.multiply,F.divide=function(S){if(n(S)||(S=u(S)),S.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&S.low===-1&&S.high===-1)return this;var Q=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,S.low,S.high);return a(Q,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?A:b;var Z,ae,ce;if(this.unsigned){if(S.unsigned||(S=S.toUnsigned()),S.gt(this))return A;if(S.gt(this.shru(1)))return E;ce=A}else{if(this.eq(O)){if(S.eq(C)||S.eq(I))return O;if(S.eq(O))return C;var fe=this.shr(1);return Z=fe.div(S).shl(1),Z.eq(b)?S.isNegative()?C:I:(ae=this.sub(S.mul(Z)),ce=Z.add(ae.div(S)),ce)}else if(S.eq(O))return this.unsigned?A:b;if(this.isNegative())return S.isNegative()?this.neg().div(S.neg()):this.neg().div(S).neg();if(S.isNegative())return this.div(S.neg()).neg();ce=b}for(ae=this;ae.gte(S);){Z=Math.max(1,Math.floor(ae.toNumber()/S.toNumber()));for(var le=Math.ceil(Math.log(Z)/Math.LN2),Ee=le<=48?1:c(2,le-48),pe=s(Z),Ce=pe.mul(S);Ce.isNegative()||Ce.gt(ae);)Z-=Ee,pe=s(Z,this.unsigned),Ce=pe.mul(S);pe.isZero()&&(pe=C),ce=ce.add(pe),ae=ae.sub(Ce)}return ce},F.div=F.divide,F.modulo=function(S){if(n(S)||(S=u(S)),t){var Q=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,S.low,S.high);return a(Q,t.get_high(),this.unsigned)}return this.sub(this.div(S).mul(S))},F.mod=F.modulo,F.rem=F.modulo,F.not=function(){return a(~this.low,~this.high,this.unsigned)},F.and=function(S){return n(S)||(S=u(S)),a(this.low&S.low,this.high&S.high,this.unsigned)},F.or=function(S){return n(S)||(S=u(S)),a(this.low|S.low,this.high|S.high,this.unsigned)},F.xor=function(S){return n(S)||(S=u(S)),a(this.low^S.low,this.high^S.high,this.unsigned)},F.shiftLeft=function(S){return n(S)&&(S=S.toInt()),(S&=63)===0?this:S<32?a(this.low<<S,this.high<<S|this.low>>>32-S,this.unsigned):a(0,this.low<<S-32,this.unsigned)},F.shl=F.shiftLeft,F.shiftRight=function(S){return n(S)&&(S=S.toInt()),(S&=63)===0?this:S<32?a(this.low>>>S|this.high<<32-S,this.high>>S,this.unsigned):a(this.high>>S-32,this.high>=0?0:-1,this.unsigned)},F.shr=F.shiftRight,F.shiftRightUnsigned=function(S){if(n(S)&&(S=S.toInt()),S&=63,S===0)return this;var Q=this.high;if(S<32){var Z=this.low;return a(Z>>>S|Q<<32-S,Q>>>S,this.unsigned)}else return S===32?a(Q,0,this.unsigned):a(Q>>>S-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(S){return S?this.toBytesLE():this.toBytesBE()},F.toBytesLE=function(){var S=this.high,Q=this.low;return[Q&255,Q>>>8&255,Q>>>16&255,Q>>>24,S&255,S>>>8&255,S>>>16&255,S>>>24]},F.toBytesBE=function(){var S=this.high,Q=this.low;return[S>>>24,S>>>16&255,S>>>8&255,S&255,Q>>>24,Q>>>16&255,Q>>>8&255,Q&255]},e.fromBytes=function(S,Q,Z){return Z?e.fromBytesLE(S,Q):e.fromBytesBE(S,Q)},e.fromBytesLE=function(S,Q){return new e(S[0]|S[1]<<8|S[2]<<16|S[3]<<24,S[4]|S[5]<<8|S[6]<<16|S[7]<<24,Q)},e.fromBytesBE=function(S,Q){return new e(S[4]<<24|S[5]<<16|S[6]<<8|S[7],S[0]<<24|S[1]<<16|S[2]<<8|S[3],Q)},Kh}var lk=ck();const Cl=Al(lk),Il=1;class uk{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=Cl.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=(h,d)=>{const p=h[Il],y=d?d[Il]: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][Il]>=r));f+=1);return i[i.length-1][Il]<r&&i.push([]),i}}class $2{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 uk({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 Pr(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],h=f>=o?0:o-f,d=Math.min(o+r,f+u.length)-f;h>=0&&h<u.length&&(u.copy(e,a,h,d),a+=d-h,c+=d-h)}return{bytesRead:c,buffer:e}}}function ey(t,e){return t.offset+t.lineBytes*Math.floor(e/t.lineLength)+e%t.lineLength}async function fk(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 ty{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=fk(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=ey(e,n),a=ey(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 hk extends ty{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 $2({filehandle:e,gziFilehandle:i}):n&&s&&(this.fasta=new $2({path:n,gziPath:s}))}}function ny(t){return t.split(">").filter(e=>/\S/.test(e)).map(e=>{const[n,...r]=e.split(`
|
|
626
|
-
`),[o,...i]=n.split(" "),s=r.join("").replace(/\s/g,"");return{id:o,description:i.join(" "),sequence:s}})}class dk{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 ny(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 pk=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:hk,FetchableSmallFasta:dk,IndexedFasta:ty,parseSmallFasta:ny},Symbol.toStringTag,{value:"Module"})),ry=BigInt(32);function gk(t,e,n){const r=+!!n,o=+!n;return BigInt(t.getInt32(e,n)*o+t.getInt32(e+4,n)*r)<<ry|BigInt(t.getUint32(e,n)*r+t.getUint32(e+4,n)*o)}function mk(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)<<ry|BigInt(r*i+o*s)}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(t,e){return gk(this,t,e)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(t,e){return mk(this,t,e)});class bk{}class yk{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(e=new bk){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 wk{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 wi{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 yk,s=new wk;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),wi.checkSinglePromise(i.promise,r)):(this.fill(e,n,r,o),wi.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 Jh,iy;function xk(){if(iy)return Jh;iy=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 Jh=t,Jh}var vk=xk();const Tl=Al(vk);class uo{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 uo([{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 uo([{min:o.min,max:i.max}]));return r.push(o),r.length===1?r[0]:new uo(r)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */function fo(t){let e=t.length;for(;--e>=0;)t[e]=0}const Ak=3,Ek=258,oy=29,Sk=256+1+oy,sy=30,Ck=512,Ik=new Array((Sk+2)*2);fo(Ik);const Tk=new Array(sy*2);fo(Tk);const Dk=new Array(Ck);fo(Dk);const Bk=new Array(Ek-Ak+1);fo(Bk);const _k=new Array(oy);fo(_k);const kk=new Array(sy);fo(kk);var $h=(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 Rk=()=>{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},Fk=new Uint32Array(Rk());var Un=(t,e,n,r)=>{const o=Fk,i=r+n;t^=-1;for(let s=r;s<i;s++)t=t>>>8^o[(t^e[s])&255];return t^-1},ed={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"},ay={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 Mk=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Pk=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)Mk(n,r)&&(t[r]=n[r])}}return t},Lk=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},cy={assign:Pk,flattenChunks:Lk};let ly=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{ly=!1}const ha=new Uint8Array(256);for(let t=0;t<256;t++)ha[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;ha[254]=ha[254]=1;var Nk=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 Ok=(t,e)=>{if(e<65534&&t.subarray&&ly)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 zk=(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=ha[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 Ok(i,o)},Uk=(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+ha[t[n]]>e?n:e},td={string2buf:Nk,buf2string:zk,utf8border:Uk};function Gk(){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 Hk=Gk;const Dl=16209,Vk=16191;var qk=function(e,n){let r,o,i,s,a,c,l,u,f,h,d,p,y,v,b,A,C,E,I,R,B,O,F,P;const S=e.state;r=e.next_in,F=e.input,o=r+(e.avail_in-5),i=e.next_out,P=e.output,s=i-(n-e.avail_out),a=i+(e.avail_out-257),c=S.dmax,l=S.wsize,u=S.whave,f=S.wnext,h=S.window,d=S.hold,p=S.bits,y=S.lencode,v=S.distcode,b=(1<<S.lenbits)-1,A=(1<<S.distbits)-1;e:do{p<15&&(d+=F[r++]<<p,p+=8,d+=F[r++]<<p,p+=8),C=y[d&b];t:for(;;){if(E=C>>>24,d>>>=E,p-=E,E=C>>>16&255,E===0)P[i++]=C&65535;else if(E&16){I=C&65535,E&=15,E&&(p<E&&(d+=F[r++]<<p,p+=8),I+=d&(1<<E)-1,d>>>=E,p-=E),p<15&&(d+=F[r++]<<p,p+=8,d+=F[r++]<<p,p+=8),C=v[d&A];n:for(;;){if(E=C>>>24,d>>>=E,p-=E,E=C>>>16&255,E&16){if(R=C&65535,E&=15,p<E&&(d+=F[r++]<<p,p+=8,p<E&&(d+=F[r++]<<p,p+=8)),R+=d&(1<<E)-1,R>c){e.msg="invalid distance too far back",S.mode=Dl;break e}if(d>>>=E,p-=E,E=i-s,R>E){if(E=R-E,E>u&&S.sane){e.msg="invalid distance too far back",S.mode=Dl;break e}if(B=0,O=h,f===0){if(B+=l-E,E<I){I-=E;do P[i++]=h[B++];while(--E);B=i-R,O=P}}else if(f<E){if(B+=l+f-E,E-=f,E<I){I-=E;do P[i++]=h[B++];while(--E);if(B=0,f<I){E=f,I-=E;do P[i++]=h[B++];while(--E);B=i-R,O=P}}}else if(B+=f-E,E<I){I-=E;do P[i++]=h[B++];while(--E);B=i-R,O=P}for(;I>2;)P[i++]=O[B++],P[i++]=O[B++],P[i++]=O[B++],I-=3;I&&(P[i++]=O[B++],I>1&&(P[i++]=O[B++]))}else{B=i-R;do P[i++]=P[B++],P[i++]=P[B++],P[i++]=P[B++],I-=3;while(I>2);I&&(P[i++]=P[B++],I>1&&(P[i++]=P[B++]))}}else if(E&64){e.msg="invalid distance code",S.mode=Dl;break e}else{C=v[(C&65535)+(d&(1<<E)-1)];continue n}break}}else if(E&64)if(E&32){S.mode=Vk;break e}else{e.msg="invalid literal/length code",S.mode=Dl;break e}else{C=y[(C&65535)+(d&(1<<E)-1)];continue t}break}}while(r<o&&i<a);I=p>>3,r-=I,p-=I<<3,d&=(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),S.hold=d,S.bits=p};const ho=15,uy=852,fy=592,hy=0,nd=1,dy=2,jk=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]),Wk=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]),Qk=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]),Yk=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 da=(t,e,n,r,o,i,s,a)=>{const c=a.bits;let l=0,u=0,f=0,h=0,d=0,p=0,y=0,v=0,b=0,A=0,C,E,I,R,B,O=null,F;const P=new Uint16Array(ho+1),S=new Uint16Array(ho+1);let Q=null,Z,ae,ce;for(l=0;l<=ho;l++)P[l]=0;for(u=0;u<r;u++)P[e[n+u]]++;for(d=c,h=ho;h>=1&&P[h]===0;h--);if(d>h&&(d=h),h===0)return o[i++]=1<<24|64<<16|0,o[i++]=1<<24|64<<16|0,a.bits=1,0;for(f=1;f<h&&P[f]===0;f++);for(d<f&&(d=f),v=1,l=1;l<=ho;l++)if(v<<=1,v-=P[l],v<0)return-1;if(v>0&&(t===hy||h!==1))return-1;for(S[1]=0,l=1;l<ho;l++)S[l+1]=S[l]+P[l];for(u=0;u<r;u++)e[n+u]!==0&&(s[S[e[n+u]]++]=u);if(t===hy?(O=Q=s,F=20):t===nd?(O=jk,Q=Wk,F=257):(O=Qk,Q=Yk,F=0),A=0,u=0,l=f,B=i,p=d,y=0,I=-1,b=1<<d,R=b-1,t===nd&&b>uy||t===dy&&b>fy)return 1;for(;;){Z=l-y,s[u]+1<F?(ae=0,ce=s[u]):s[u]>=F?(ae=Q[s[u]-F],ce=O[s[u]-F]):(ae=96,ce=0),C=1<<l-y,E=1<<p,f=E;do E-=C,o[B+(A>>y)+E]=Z<<24|ae<<16|ce|0;while(E!==0);for(C=1<<l-1;A&C;)C>>=1;if(C!==0?(A&=C-1,A+=C):A=0,u++,--P[l]===0){if(l===h)break;l=e[n+s[u]]}if(l>d&&(A&R)!==I){for(y===0&&(y=d),B+=f,p=l-y,v=1<<p;p+y<h&&(v-=P[p+y],!(v<=0));)p++,v<<=1;if(b+=1<<p,t===nd&&b>uy||t===dy&&b>fy)return 1;I=A&R,o[I]=d<<24|p<<16|B-i|0}}return A!==0&&(o[B+A]=l-y<<24|64<<16|0),a.bits=d,0};const Zk=0,py=1,gy=2,{Z_FINISH:my,Z_BLOCK:Xk,Z_TREES:Bl,Z_OK:xi,Z_STREAM_END:Kk,Z_NEED_DICT:Jk,Z_STREAM_ERROR:fn,Z_DATA_ERROR:by,Z_MEM_ERROR:yy,Z_BUF_ERROR:$k,Z_DEFLATED:wy}=ay,_l=16180,xy=16181,vy=16182,Ay=16183,Ey=16184,Sy=16185,Cy=16186,Iy=16187,Ty=16188,Dy=16189,kl=16190,er=16191,rd=16192,By=16193,id=16194,_y=16195,ky=16196,Ry=16197,Fy=16198,Rl=16199,Fl=16200,My=16201,Py=16202,Ly=16203,Ny=16204,Oy=16205,od=16206,zy=16207,Uy=16208,ct=16209,Gy=16210,Hy=16211,eR=852,tR=592,nR=15,Vy=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function rR(){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 vi=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<_l||e.mode>Hy?1:0},qy=t=>{if(vi(t))return fn;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=_l,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(eR),e.distcode=e.distdyn=new Int32Array(tR),e.sane=1,e.back=-1,xi},jy=t=>{if(vi(t))return fn;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,qy(t)},Wy=(t,e)=>{let n;if(vi(t))return fn;const r=t.state;return e<0?(n=0,e=-e):(n=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?fn:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,jy(t))},Qy=(t,e)=>{if(!t)return fn;const n=new rR;t.state=n,n.strm=t,n.window=null,n.mode=_l;const r=Wy(t,e);return r!==xi&&(t.state=null),r},iR=t=>Qy(t,nR);let Yy=!0,sd,ad;const oR=t=>{if(Yy){sd=new Int32Array(512),ad=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(da(py,t.lens,0,288,sd,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;da(gy,t.lens,0,32,ad,0,t.work,{bits:5}),Yy=!1}t.lencode=sd,t.lenbits=9,t.distcode=ad,t.distbits=5},Zy=(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},sR=(t,e)=>{let n,r,o,i,s,a,c,l,u,f,h,d,p,y,v=0,b,A,C,E,I,R,B,O;const F=new Uint8Array(4);let P,S;const Q=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(vi(t)||!t.output||!t.input&&t.avail_in!==0)return fn;n=t.state,n.mode===er&&(n.mode=rd),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,h=c,O=xi;e:for(;;)switch(n.mode){case _l:if(n.wrap===0){n.mode=rd;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=Un(n.check,F,2,0),l=0,u=0,n.mode=xy;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)!==wy){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?Dy:er,l=0,u=0;break;case xy:for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==wy){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=Un(n.check,F,2,0)),l=0,u=0,n.mode=vy;case vy: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=Un(n.check,F,4,0)),l=0,u=0,n.mode=Ay;case Ay: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=Un(n.check,F,2,0)),l=0,u=0,n.mode=Ey;case Ey: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=Un(n.check,F,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=Sy;case Sy:if(n.flags&1024&&(d=n.length,d>a&&(d=a),d&&(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+d),B)),n.flags&512&&n.wrap&4&&(n.check=Un(n.check,r,d,i)),a-=d,i+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Cy;case Cy:if(n.flags&2048){if(a===0)break e;d=0;do B=r[i+d++],n.head&&B&&n.length<65536&&(n.head.name+=String.fromCharCode(B));while(B&&d<a);if(n.flags&512&&n.wrap&4&&(n.check=Un(n.check,r,d,i)),a-=d,i+=d,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Iy;case Iy:if(n.flags&4096){if(a===0)break e;d=0;do B=r[i+d++],n.head&&B&&n.length<65536&&(n.head.comment+=String.fromCharCode(B));while(B&&d<a);if(n.flags&512&&n.wrap&4&&(n.check=Un(n.check,r,d,i)),a-=d,i+=d,B)break e}else n.head&&(n.head.comment=null);n.mode=Ty;case Ty: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=er;break;case Dy:for(;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}t.adler=n.check=Vy(l),l=0,u=0,n.mode=kl;case kl: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,Jk;t.adler=n.check=1,n.mode=er;case er:if(e===Xk||e===Bl)break e;case rd:if(n.last){l>>>=u&7,u-=u&7,n.mode=od;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=By;break;case 1:if(oR(n),n.mode=Rl,e===Bl){l>>>=2,u-=2;break e}break;case 2:n.mode=ky;break;case 3:t.msg="invalid block type",n.mode=ct}l>>>=2,u-=2;break;case By: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=id,e===Bl)break e;case id:n.mode=_y;case _y:if(d=n.length,d){if(d>a&&(d=a),d>c&&(d=c),d===0)break e;o.set(r.subarray(i,i+d),s),a-=d,i+=d,c-=d,s+=d,n.length-=d;break}n.mode=er;break;case ky: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=Ry;case Ry:for(;n.have<n.ncode;){for(;u<3;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.lens[Q[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[Q[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,P={bits:n.lenbits},O=da(Zk,n.lens,0,19,n.lencode,0,n.work,P),n.lenbits=P.bits,O){t.msg="invalid code lengths set",n.mode=ct;break}n.have=0,n.mode=Fy;case Fy:for(;n.have<n.nlen+n.ndist;){for(;v=n.lencode[l&(1<<n.lenbits)-1],b=v>>>24,A=v>>>16&255,C=v&65535,!(b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(C<16)l>>>=b,u-=b,n.lens[n.have++]=C;else{if(C===16){for(S=b+2;u<S;){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],d=3+(l&3),l>>>=2,u-=2}else if(C===17){for(S=b+3;u<S;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=b,u-=b,B=0,d=3+(l&7),l>>>=3,u-=3}else{for(S=b+7;u<S;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=b,u-=b,B=0,d=11+(l&127),l>>>=7,u-=7}if(n.have+d>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=ct;break}for(;d--;)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,P={bits:n.lenbits},O=da(py,n.lens,0,n.nlen,n.lencode,0,n.work,P),n.lenbits=P.bits,O){t.msg="invalid literal/lengths set",n.mode=ct;break}if(n.distbits=6,n.distcode=n.distdyn,P={bits:n.distbits},O=da(gy,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,P),n.distbits=P.bits,O){t.msg="invalid distances set",n.mode=ct;break}if(n.mode=Rl,e===Bl)break e;case Rl:n.mode=Fl;case Fl: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,qk(t,h),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===er&&(n.back=-1);break}for(n.back=0;v=n.lencode[l&(1<<n.lenbits)-1],b=v>>>24,A=v>>>16&255,C=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,R=C;v=n.lencode[R+((l&(1<<E+I)-1)>>E)],b=v>>>24,A=v>>>16&255,C=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=C,A===0){n.mode=Oy;break}if(A&32){n.back=-1,n.mode=er;break}if(A&64){t.msg="invalid literal/length code",n.mode=ct;break}n.extra=A&15,n.mode=My;case My:if(n.extra){for(S=n.extra;u<S;){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=Py;case Py:for(;v=n.distcode[l&(1<<n.distbits)-1],b=v>>>24,A=v>>>16&255,C=v&65535,!(b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(!(A&240)){for(E=b,I=A,R=C;v=n.distcode[R+((l&(1<<E+I)-1)>>E)],b=v>>>24,A=v>>>16&255,C=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=C,n.extra=A&15,n.mode=Ly;case Ly:if(n.extra){for(S=n.extra;u<S;){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=Ny;case Ny:if(c===0)break e;if(d=h-c,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=ct;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),y=n.window}else y=o,p=s-n.offset,d=n.length;d>c&&(d=c),c-=d,n.length-=d;do o[s++]=y[p++];while(--d);n.length===0&&(n.mode=Fl);break;case Oy:if(c===0)break e;o[s++]=n.length,c--,n.mode=Fl;break;case od:if(n.wrap){for(;u<32;){if(a===0)break e;a--,l|=r[i++]<<u,u+=8}if(h-=c,t.total_out+=h,n.total+=h,n.wrap&4&&h&&(t.adler=n.check=n.flags?Un(n.check,o,h,s-h):$h(n.check,o,h,s-h)),h=c,n.wrap&4&&(n.flags?l:Vy(l))!==n.check){t.msg="incorrect data check",n.mode=ct;break}l=0,u=0}n.mode=zy;case zy: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=Uy;case Uy:O=Kk;break e;case ct:O=by;break e;case Gy:return yy;case Hy:default:return fn}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||h!==t.avail_out&&n.mode<ct&&(n.mode<od||e!==my))&&Zy(t,t.output,t.next_out,h-t.avail_out),f-=t.avail_in,h-=t.avail_out,t.total_in+=f,t.total_out+=h,n.total+=h,n.wrap&4&&h&&(t.adler=n.check=n.flags?Un(n.check,o,h,t.next_out-h):$h(n.check,o,h,t.next_out-h)),t.data_type=n.bits+(n.last?64:0)+(n.mode===er?128:0)+(n.mode===Rl||n.mode===id?256:0),(f===0&&h===0||e===my)&&O===xi&&(O=$k),O},aR=t=>{if(vi(t))return fn;let e=t.state;return e.window&&(e.window=null),t.state=null,xi},cR=(t,e)=>{if(vi(t))return fn;const n=t.state;return n.wrap&2?(n.head=e,e.done=!1,xi):fn},lR=(t,e)=>{const n=e.length;let r,o,i;return vi(t)||(r=t.state,r.wrap!==0&&r.mode!==kl)?fn:r.mode===kl&&(o=1,o=$h(o,e,n,0),o!==r.check)?by:(i=Zy(t,e,n,n),i?(r.mode=Gy,yy):(r.havedict=1,xi))};var uR=jy,fR=Wy,hR=qy,dR=iR,pR=Qy,gR=sR,mR=aR,bR=cR,yR=lR,wR="pako inflate (from Nodeca project)",tr={inflateReset:uR,inflateReset2:fR,inflateResetKeep:hR,inflateInit:dR,inflateInit2:pR,inflate:gR,inflateEnd:mR,inflateGetHeader:bR,inflateSetDictionary:yR,inflateInfo:wR};function xR(){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 vR=xR;const Xy=Object.prototype.toString,{Z_NO_FLUSH:AR,Z_FINISH:ER,Z_OK:pa,Z_STREAM_END:cd,Z_NEED_DICT:ld,Z_STREAM_ERROR:SR,Z_DATA_ERROR:Ky,Z_MEM_ERROR:CR}=ay;function Ml(t){this.options=cy.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 Hk,this.strm.avail_out=0;let n=tr.inflateInit2(this.strm,e.windowBits);if(n!==pa)throw new Error(ed[n]);if(this.header=new vR,tr.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=td.string2buf(e.dictionary):Xy.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=tr.inflateSetDictionary(this.strm,e.dictionary),n!==pa)))throw new Error(ed[n])}Ml.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?ER:AR,Xy.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=tr.inflate(n,s),i===ld&&o&&(i=tr.inflateSetDictionary(n,o),i===pa?i=tr.inflate(n,s):i===Ky&&(i=ld));n.avail_in>0&&i===cd&&n.state.wrap>0&&t[n.next_in]!==0;)tr.inflateReset(n),i=tr.inflate(n,s);switch(i){case SR:case Ky:case ld:case CR:return this.onEnd(i),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||i===cd))if(this.options.to==="string"){let c=td.utf8border(n.output,n.next_out),l=n.next_out-c,u=td.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===pa&&a===0)){if(i===cd)return i=tr.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},Ml.prototype.onData=function(t){this.chunks.push(t)},Ml.prototype.onEnd=function(t){t===pa&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=cy.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function IR(t,e){const n=new Ml(e);if(n.push(t),n.err)throw n.msg||ed[n.err];return n.result}function TR(t,e){return e=e||{},e.raw=!0,IR(t,e)}var DR=TR,BR={inflateRaw:DR};const{inflateRaw:_R}=BR;var kR=_R;function RR(t){return kR(t.subarray(2))}let FR=class extends Error{constructor(e){super(e),this.code="ERR_ABORTED"}};function MR(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 Pl(t){if(t&&t.aborted)if(typeof DOMException>"u"){const e=new FR("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}const ud=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function fd(t,e,n,r){return t<r&&e>=n}class Jy{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 wi({cache:new Tl({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:h}=await this.cirTreePromise,d=l?h.readUInt32BE(4):h.readUInt32LE(4);let p=[],y=0;const v=!0,b=(I,R,B)=>{try{const F=I.subarray(R),P=new DataView(F.buffer,F.byteOffset,F.length);let S=0;const Q=P.getUint8(S);S+=2;const Z=P.getUint16(S,v);if(S+=2,Q===1){const ae=[];for(let ce=0;ce<Z;ce++){const fe=P.getUint32(S,v);S+=4;const le=P.getUint32(S,v);S+=4;const Ee=P.getUint32(S,v);S+=4;const pe=P.getUint32(S,v);S+=4;const Ce=Number(P.getBigUint64(S,v));S+=8;const Ie=Number(P.getBigUint64(S,v));S+=8,ae.push({startChrom:fe,startBase:le,endBase:pe,endChrom:Ee,blockOffset:Ce,blockSize:Ie,offset:S})}p=p.concat(ae.filter(ce=>A(ce)).map(ce=>({offset:ce.blockOffset,length:ce.blockSize})))}else if(Q===0){const ae=[];for(let fe=0;fe<Z;fe++){const le=P.getUint32(S,v);S+=4;const Ee=P.getUint32(S,v);S+=4;const pe=P.getUint32(S,v);S+=4;const Ce=P.getUint32(S,v);S+=4;const Ie=Number(P.getBigUint64(S,v));S+=8,ae.push({startChrom:le,startBase:Ee,endChrom:pe,endBase:Ce,blockOffset:Ie,offset:S})}const ce=ae.filter(fe=>A(fe)).map(fe=>fe.blockOffset);ce.length>0&&E(ce,B+1)}}catch(O){o.error(O)}},A=I=>{const{startChrom:R,startBase:B,endChrom:O,endBase:F}=I;return(R<u||R===u&&B<=r)&&(O>u||O===u&&F>=n)},C=async(I,R,B)=>{try{const O=R.max-R.min,F=R.min,P=await this.featureCache.get(`${O}_${F}`,{length:O,offset:F},i==null?void 0:i.signal);for(const S of I)R.contains(S)&&(b(P,S-F,B),y-=1,y===0&&this.readFeatures(o,p,{...i,request:f}).catch(Q=>{o.error(Q)}))}catch(O){o.error(O)}},E=(I,R)=>{try{y+=I.length;const B=4+d*32;let O=new uo([{min:I[0],max:I[0]+B}]);for(let F=1;F<I.length;F+=1){const P=new uo([{min:I[F],max:I[F]+B}]);O=O.union(P)}O.getRanges().map(F=>C(I,F,R))}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 h=s.getFloat32(i,!0);i+=4;const d=s.getFloat32(i,!0);i+=4,i+=4,(!r||a===r.chrId&&fd(c,l,r.start,r.end))&&o.push({start:c,end:l,maxScore:h,minScore:f,summary:!0,score:d/(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,h=u.getUint32(a,c);a+=4;const d=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=ud==null?void 0:ud.decode(v))!==null&&i!==void 0?i:v.toString();a=y+1,s.push({chromId:h,start:d,end:p,rest:b,uniqueId:`bb-${r+f}`})}return o?s.filter(f=>fd(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 h=new Array(f);switch(u){case 1:{for(let d=0;d<f;d++){const p=i.getInt32(s,!0);s+=4;const y=i.getInt32(s,!0);s+=4;const v=i.getFloat32(s,!0);s+=4,h[d]={start:p,end:y,score:v}}break}case 2:{for(let d=0;d<f;d++){const p=i.getInt32(s,!0);s+=4;const y=i.getFloat32(s,!0);s+=4,h[d]={score:y,start:p,end:p+l}}break}case 3:{for(let d=0;d<f;d++){const p=i.getFloat32(s,!0);s+=4;const y=a+d*c;h[d]={score:p,start:y,end:y+l}}break}}return r?h.filter(d=>fd(d.start,d.end,r.start,r.end)):h}async readFeatures(e,n,r={}){try{const{blockType:o,isCompressed:i}=this,{signal:s,request:a}=r,c=MR(n);Pl(s),await Promise.all(c.map(async l=>{Pl(s);const{length:u,offset:f}=l,h=await this.featureCache.get(`${u}_${f}`,l,s);for(const d of l.blocks){Pl(s);let p=Number(d.offset)-Number(l.offset),y=h;switch(i&&(y=RR(h.subarray(p)),p=0),Pl(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(d.offset)*256,a));break}default:console.warn(`Don't know what to do with ${o}`)}}})),e.complete()}catch(o){e.error(o)}}}var hd=function(t,e){return hd=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])},hd(t,e)};function dd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");hd(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function PR(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 $y(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 ga(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 pd(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 gd(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 po(t){return this instanceof po?(this.v=t,this):new po(t)}function LR(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(d){return function(p){return Promise.resolve(p).then(d,f)}}function a(d,p){r[d]&&(o[d]=function(y){return new Promise(function(v,b){i.push([d,y,v,b])>1||c(d,y)})},p&&(o[d]=p(o[d])))}function c(d,p){try{l(r[d](p))}catch(y){h(i[0][3],y)}}function l(d){d.value instanceof po?Promise.resolve(d.value.v).then(u,f):h(i[0][2],d)}function u(d){c("next",d)}function f(d){c("throw",d)}function h(d,p){d(p),i.shift(),i.length&&c(i[0][0],i[0][1])}}function NR(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 ga=="function"?ga(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 xt(t){return typeof t=="function"}function ew(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 md=ew(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
650
|
+
*/var jy;function Aa(){return jy||(jy=1,function(t){const e=g_(),n=m_(),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 b(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:y(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:y(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 b(m.buffer,m.byteOffset,m.byteLength)}return h(k)}function b(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=y(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"||Rt(k.length)?s(0):h(k);if(k.type==="Buffer"&&Array.isArray(k.data))return h(k.data)}function y(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 Ae(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return $t(k).length;default:if(x)return O?-1:Ae(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 he(this,m,w);case"utf8":case"utf-8":return se(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 De(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?se(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,Rt(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(Rt(ue))return V;k[w+V]=ue}return V}function M(k,m,w,O){return It(Ae(m,k.length-w),k,w,O)}function F(k,m,w,O){return It(Re(m),k,w,O)}function C(k,m,w,O){return It($t(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 M(this,m,w,O);case"ascii":case"latin1":case"binary":return F(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 se(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 oe=4096;function ae(k){const m=k.length;if(m<=oe)return String.fromCharCode.apply(String,k);let w="",O=0;for(;O<m;)w+=String.fromCharCode.apply(String,k.slice(O,O+=oe));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 he(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+=Nt[k[z]];return x}function De(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 we(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||we(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||we(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||we(m,1,this.length),this[m]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(m,w){return m=m>>>0,w||we(m,2,this.length),this[m]|this[m+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(m,w){return m=m>>>0,w||we(m,2,this.length),this[m]<<8|this[m+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(m,w){return m=m>>>0,w||we(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||we(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||we(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||we(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||we(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},a.prototype.readInt16LE=function(m,w){m=m>>>0,w||we(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||we(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||we(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||we(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||we(m,4,this.length),n.read(this,m,!0,23,4)},a.prototype.readFloatBE=function(m,w){return m=m>>>0,w||we(m,4,this.length),n.read(this,m,!1,23,4)},a.prototype.readDoubleLE=function(m,w){return m=m>>>0,w||we(m,8,this.length),n.read(this,m,!0,52,8)},a.prototype.readDoubleBE=function(m,w){return m=m>>>0,w||we(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 Ie(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 Ie(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 Ie(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 j(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 j(this,m,w,!0,O)},a.prototype.writeDoubleBE=function(m,w,O){return j(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 Ae(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 $t(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 Rt(k){return k!==k}const Nt=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"?zt:k}function zt(){throw new Error("BigInt not supported")}}(ed)),ed}var Ke=Aa();const b_=Ye({__proto__:null,default:Ml(Ke)},[Ke]),Ct={},y_=Object.freeze(Object.defineProperty({__proto__:null,default:Ct},Symbol.toStringTag,{value:"Module"}));function Wy(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(`${Wy(i)} fetching ${e}`,{cause:i})}}else throw new Error(`${Wy(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 Yy(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 w_(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 x_{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 Yy(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 w_(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await Yy(this.blob);return Ke.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function Qy(t,e={}){return new Cn(t,e)}function v_(t,e,n,r={}){if(n!==void 0)return n;if(t!==void 0)return Qy(t,r);if(e!==void 0)return new Ct(e,r);throw new Error("no url, path, or filehandle provided, cannot open")}const Ea=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:x_,LocalFile:Ct,RemoteFile:Cn,fromUrl:Qy,open:v_},Symbol.toStringTag,{value:"Module"}));var td={},Zy;function Lr(){return Zy||(Zy=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)}(td)),td}var bo={},In={},vi={},Xy;function A_(){if(Xy)return vi;Xy=1;var t=Lr(),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,b=19,v=2*h+1,y=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],M=[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],F=[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 se=new Array(p*2);i(se);var oe=new Array(Y);i(oe);var ae=new Array(u-l+1);i(ae);var ce=new Array(f);i(ce);var ye=new Array(p);i(ye);function he(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 De,we,Ee;function Ie(x,z){this.dyn_tree=x,this.max_code=0,this.stat_desc=z}function Ge(x){return x<256?oe[x]:oe[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 j(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,Ce=0;for(R=0;R<=y;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,Ce++),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(Ce!==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]--,Ce-=2}while(Ce>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(y+1),G=0,X,T;for(X=1;X<=y;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(y+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<<M[ue];x++)oe[G++]=ue;for(G>>=7;ue<p;ue++)for(ye[ue]=G<<7,x=0;x<1<<M[ue]-7;x++)oe[256+G++]=ue;for(z=0;z<=y;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++)se[x*2+1]=5,se[x*2]=ee(x,5);De=new he(Q,N,d+1,h,y),we=new he(se,M,0,p,y),Ee=new he(new Array(0),F,0,b,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<b;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 Ae(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?j(x,G,z):(T=ae[G],j(x,T+d+1,z),re=N[T],re!==0&&(G-=ce[T],q(x,G,re)),ue--,T=Ge(ue),j(x,T,V),re=M[T],re!==0&&(ue-=ye[T],q(x,ue,re)));while(X<x.last_lit);j(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--)Ae(x,V,T);g=X;do T=x.heap[1],x.heap[1]=x.heap[x.heap_len--],Ae(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++,Ae(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 $t(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 j(x,X,x.bl_tree);while(--re!==0);else X!==0?(X!==G&&(j(x,X,x.bl_tree),re--),j(x,I,x.bl_tree),q(x,re-3,2)):re<=10?(j(x,_,x.bl_tree),q(x,re-3,3)):(j(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($t(x,x.dyn_ltree,x.l_desc.max_code),$t(x,x.dyn_dtree,x.d_desc.max_code),dt(x,x.bl_desc),z=b-1;z>=3&&x.bl_tree[C[z]*2+1]===0;z--);return x.opt_len+=3*(z+1)+5+5+4,z}function Rt(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 Nt(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 zt(x){et||(D(),et=!0),x.l_desc=new Ie(x.dyn_ltree,De),x.d_desc=new Ie(x.dyn_dtree,we),x.bl_desc=new Ie(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),j(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=Nt(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,se)):(q(x,(c<<1)+(ue?1:0),3),Rt(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 vi._tr_init=zt,vi._tr_stored_block=k,vi._tr_flush_block=w,vi._tr_tally=O,vi._tr_align=m,vi}var nd,Ky;function Jy(){if(Ky)return nd;Ky=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 nd=t,nd}var rd,$y;function e2(){if($y)return rd;$y=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 rd=n,rd}var id,t2;function od(){return t2||(t2=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 n2;function E_(){if(n2)return In;n2=1;var t=Lr(),e=A_(),n=Jy(),r=e2(),o=od(),i=0,s=1,a=3,c=4,l=5,u=0,f=1,d=-2,h=-3,p=-5,b=-1,v=1,y=2,A=3,S=4,E=0,I=2,_=8,B=9,N=15,M=8,F=29,C=256,Y=C+1+F,Q=30,se=19,oe=2*Y+1,ae=15,ce=3,ye=258,he=ye+ce+1,De=32,we=42,Ee=69,Ie=73,Ge=91,Ve=103,q=113,j=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 Ae(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 $t(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,Ce=g.prev_length,me=g.nice_match,xe=g.strstart>g.w_size-he?g.strstart-(g.w_size-he):0,Ue=g.window,bn=g.w_mask,U=g.prev,Me=g.strstart+ye,lt=Ue[R+Ce-1],tt=Ue[R+Ce];g.prev_length>=g.good_match&&($>>=2),me>g.lookahead&&(me=g.lookahead);do if(H=K,!(Ue[H+Ce]!==tt||Ue[H+Ce-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>Ce){if(g.match_start=K,Ce=Z,Z>=me)break;lt=Ue[R+Ce-1],tt=Ue[R+Ce]}}while((K=U[K&bn])>xe&&--$!==0);return Ce<=g.lookahead?Ce:g.lookahead}function $e(g){var K=g.w_size,$,R,H,Z,Ce;do{if(Z=g.window_size-g.lookahead-g.strstart,g.strstart>=K+(K-he)){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=$t(g.strm,g.window,g.strstart+g.lookahead,Z),g.lookahead+=R,g.lookahead+g.insert>=ce)for(Ce=g.strstart-g.insert,g.ins_h=g.window[Ce],g.ins_h=(g.ins_h<<g.hash_shift^g.window[Ce+1])&g.hash_mask;g.insert&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[Ce+ce-1])&g.hash_mask,g.prev[Ce&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=Ce,Ce++,g.insert--,!(g.lookahead+g.insert<ce)););}while(g.lookahead<he&&g.strm.avail_in!==0)}function Rt(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,Ae(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-he&&(Ae(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Ae(g,!0),g.strm.avail_out===0?fe:L):(g.strstart>g.block_start&&(Ae(g,!1),g.strm.avail_out===0),ee)}function Nt(g,K){for(var $,R;;){if(g.lookahead<he){if($e(g),g.lookahead<he&&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-he&&(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&&(Ae(g,!1),g.strm.avail_out===0))return ee}return g.insert=g.strstart<ce-1?g.strstart:ce-1,K===c?(Ae(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Ae(g,!1),g.strm.avail_out===0)?ee:J}function et(g,K){for(var $,R,H;;){if(g.lookahead<he){if($e(g),g.lookahead<he&&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-he&&(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&&(Ae(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&&Ae(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?(Ae(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Ae(g,!1),g.strm.avail_out===0)?ee:J}function zt(g,K){for(var $,R,H,Z,Ce=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=Ce[H],R===Ce[++H]&&R===Ce[++H]&&R===Ce[++H])){Z=g.strstart+ye;do;while(R===Ce[++H]&&R===Ce[++H]&&R===Ce[++H]&&R===Ce[++H]&&R===Ce[++H]&&R===Ce[++H]&&R===Ce[++H]&&R===Ce[++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++),$&&(Ae(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Ae(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Ae(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++,$&&(Ae(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Ae(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Ae(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,Rt),new m(4,4,8,4,Nt),new m(4,5,16,8,Nt),new m(4,6,32,32,Nt),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(oe*2),this.dyn_dtree=new t.Buf16((2*Q+1)*2),this.bl_tree=new t.Buf16((2*se+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?we: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 Ce=1;if(K===b&&(K=6),R<0?(Ce=0,R=-R):R>15&&(Ce=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 me=new x;return g.state=me,me.strm=g,me.wrap=Ce,me.gzhead=null,me.w_bits=R,me.w_size=1<<me.w_bits,me.w_mask=me.w_size-1,me.hash_bits=H+7,me.hash_size=1<<me.hash_bits,me.hash_mask=me.hash_size-1,me.hash_shift=~~((me.hash_bits+ce-1)/ce),me.window=new t.Buf8(me.w_size*2),me.head=new t.Buf16(me.hash_size),me.prev=new t.Buf16(me.w_size),me.lit_bufsize=1<<H+6,me.pending_buf_size=me.lit_bufsize*4,me.pending_buf=new t.Buf8(me.pending_buf_size),me.d_buf=1*me.lit_bufsize,me.l_buf=3*me.lit_bufsize,me.level=K,me.strategy=Z,me.method=$,V(g)}function X(g,K){return G(g,K,_,N,M,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===j&&K!==c)return te(g,g.avail_out===0?p:d);if(R.strm=g,$=R.last_flush,R.last_flush=K,R.status===we)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>=y||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>=y||R.level<2?4:0),Re(R,D),R.status=q);else{var Ce=_+(R.w_bits-8<<4)<<8,me=-1;R.strategy>=y||R.level<2?me=0:R.level<6?me=1:R.level===6?me=2:me=3,Ce|=me<<6,R.strstart!==0&&(Ce|=De),Ce+=31-Ce%31,R.status=q,dt(R,Ce),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=Ie)}else R.status=Ie;if(R.status===Ie)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===j&&g.avail_in!==0)return te(g,p);if(g.avail_in!==0||R.lookahead!==0||K!==i&&R.status!==j){var xe=R.strategy===y?k(R,K):R.strategy===A?zt(R,K):w[R.level].func(R,K);if((xe===fe||xe===L)&&(R.status=j),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!==we&&K!==Ee&&K!==Ie&&K!==Ge&&K!==Ve&&K!==q&&K!==j?te(g,d):(g.state=null,K===q?te(g,h):u))}function _e(g,K){var $=K.length,R,H,Z,Ce,me,xe,Ue,bn;if(!g||!g.state||(R=g.state,Ce=R.wrap,Ce===2||Ce===1&&R.status!==we||R.lookahead))return d;for(Ce===1&&(g.adler=n(g.adler,K,$,0)),R.wrap=0,$>=R.w_size&&(Ce===0&&(Be(R.head),R.strstart=0,R.block_start=0,R.insert=0),bn=new t.Buf8(R.w_size),t.arraySet(bn,K,$-R.w_size,R.w_size,0),K=bn,$=R.w_size),me=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=me,R.wrap=Ce,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 Ai={},r2;function i2(){if(r2)return Ai;r2=1;var t=Lr(),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,Ai.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 Ai.buf2binstring=function(s){return i(s,s.length)},Ai.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},Ai.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)},Ai.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},Ai}var sd,o2;function s2(){if(o2)return sd;o2=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 sd=t,sd}var a2;function S_(){if(a2)return bo;a2=1;var t=E_(),e=Lr(),n=i2(),r=od(),o=s2(),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 b(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,b(A,S)}function y(A,S){return S=S||{},S.gzip=!0,b(A,S)}return bo.Deflate=p,bo.deflate=b,bo.deflateRaw=v,bo.gzip=y,bo}var yo={},hn={},ad,c2;function C_(){if(c2)return ad;c2=1;var t=30,e=12;return ad=function(r,o){var i,s,a,c,l,u,f,d,h,p,b,v,y,A,S,E,I,_,B,N,M,F,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,b=i.window,v=i.hold,y=i.bits,A=i.lencode,S=i.distcode,E=(1<<i.lenbits)-1,I=(1<<i.distbits)-1;e:do{y<15&&(v+=Y[s++]<<y,y+=8,v+=Y[s++]<<y,y+=8),_=A[v&E];t:for(;;){if(B=_>>>24,v>>>=B,y-=B,B=_>>>16&255,B===0)Q[c++]=_&65535;else if(B&16){N=_&65535,B&=15,B&&(y<B&&(v+=Y[s++]<<y,y+=8),N+=v&(1<<B)-1,v>>>=B,y-=B),y<15&&(v+=Y[s++]<<y,y+=8,v+=Y[s++]<<y,y+=8),_=S[v&I];n:for(;;){if(B=_>>>24,v>>>=B,y-=B,B=_>>>16&255,B&16){if(M=_&65535,B&=15,y<B&&(v+=Y[s++]<<y,y+=8,y<B&&(v+=Y[s++]<<y,y+=8)),M+=v&(1<<B)-1,M>f){r.msg="invalid distance too far back",i.mode=t;break e}if(v>>>=B,y-=B,B=c-l,M>B){if(B=M-B,B>h&&i.sane){r.msg="invalid distance too far back",i.mode=t;break e}if(F=0,C=b,p===0){if(F+=d-B,B<N){N-=B;do Q[c++]=b[F++];while(--B);F=c-M,C=Q}}else if(p<B){if(F+=d+p-B,B-=p,B<N){N-=B;do Q[c++]=b[F++];while(--B);if(F=0,p<N){B=p,N-=B;do Q[c++]=b[F++];while(--B);F=c-M,C=Q}}}else if(F+=p-B,B<N){N-=B;do Q[c++]=b[F++];while(--B);F=c-M,C=Q}for(;N>2;)Q[c++]=C[F++],Q[c++]=C[F++],Q[c++]=C[F++],N-=3;N&&(Q[c++]=C[F++],N>1&&(Q[c++]=C[F++]))}else{F=c-M;do Q[c++]=Q[F++],Q[c++]=Q[F++],Q[c++]=Q[F++],N-=3;while(N>2);N&&(Q[c++]=Q[F++],N>1&&(Q[c++]=Q[F++]))}}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=y>>3,s-=N,y-=N<<3,v&=(1<<y)-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=y},ad}var cd,l2;function I_(){if(l2)return cd;l2=1;var t=Lr(),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 cd=function(d,h,p,b,v,y,A,S){var E=S.bits,I=0,_=0,B=0,N=0,M=0,F=0,C=0,Y=0,Q=0,se=0,oe,ae,ce,ye,he,De=null,we=0,Ee,Ie=new t.Buf16(e+1),Ge=new t.Buf16(e+1),Ve=null,q=0,j,ee,J;for(I=0;I<=e;I++)Ie[I]=0;for(_=0;_<b;_++)Ie[h[p+_]]++;for(M=E,N=e;N>=1&&Ie[N]===0;N--);if(M>N&&(M=N),N===0)return v[y++]=1<<24|64<<16|0,v[y++]=1<<24|64<<16|0,S.bits=1,0;for(B=1;B<N&&Ie[B]===0;B++);for(M<B&&(M=B),Y=1,I=1;I<=e;I++)if(Y<<=1,Y-=Ie[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]+Ie[I];for(_=0;_<b;_++)h[p+_]!==0&&(A[Ge[h[p+_]]++]=_);if(d===o?(De=Ve=A,Ee=19):d===i?(De=a,we-=257,Ve=c,q-=257,Ee=256):(De=l,Ve=u,Ee=-1),se=0,_=0,I=B,he=y,F=M,C=0,ce=-1,Q=1<<M,ye=Q-1,d===i&&Q>n||d===s&&Q>r)return 1;for(;;){j=I-C,A[_]<Ee?(ee=0,J=A[_]):A[_]>Ee?(ee=Ve[q+A[_]],J=De[we+A[_]]):(ee=96,J=0),oe=1<<I-C,ae=1<<F,B=ae;do ae-=oe,v[he+(se>>C)+ae]=j<<24|ee<<16|J|0;while(ae!==0);for(oe=1<<I-1;se&oe;)oe>>=1;if(oe!==0?(se&=oe-1,se+=oe):se=0,_++,--Ie[I]===0){if(I===N)break;I=h[p+A[_]]}if(I>M&&(se&ye)!==ce){for(C===0&&(C=M),he+=B,F=I-C,Y=1<<F;F+C<N&&(Y-=Ie[F+C],!(Y<=0));)F++,Y<<=1;if(Q+=1<<F,d===i&&Q>n||d===s&&Q>r)return 1;ce=se&ye,v[ce]=M<<24|F<<16|he-y|0}}return se!==0&&(v[he+se]=I-C<<24|64<<16|0),S.bits=M,0},cd}var u2;function T_(){if(u2)return hn;u2=1;var t=Lr(),e=Jy(),n=e2(),r=C_(),o=I_(),i=0,s=1,a=2,c=4,l=5,u=6,f=0,d=1,h=2,p=-2,b=-3,v=-4,y=-5,A=8,S=1,E=2,I=3,_=4,B=5,N=6,M=7,F=8,C=9,Y=10,Q=11,se=12,oe=13,ae=14,ce=15,ye=16,he=17,De=18,we=19,Ee=20,Ie=21,Ge=22,Ve=23,q=24,j=25,ee=26,J=27,fe=28,L=29,D=30,te=31,le=32,Be=852,ve=592,Ae=15,Re=Ae;function dt(G){return(G>>>24&255)+(G>>>8&65280)+((G&65280)<<8)+((G&255)<<24)}function $t(){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 Rt(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 Nt(G,X){var T,re;return G?(re=new $t,G.state=re,re.window=null,T=Rt(G,X),T!==f&&(G.state=null),T):p}function et(G){return Nt(G,Re)}var zt=!0,k,m;function w(G){if(zt){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}),zt=!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,Ce,me,xe,Ue,bn,U=0,Me,lt,tt,Tt,ke,ar,ft,Ne,ht=new t.Buf8(4),Bn,on,$a=[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===se&&(T.mode=oe),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,Ce=$,me=R,Ne=f;e:for(;;)switch(T.mode){case S:if(T.wrap===0){T.mode=oe;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:se,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=M;case M: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=F;case F: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=se;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=se;case se:if(X===l||X===u)break e;case oe: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=he;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=se;break;case he: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=De;case De:for(;T.have<T.ncode;){for(;Z<3;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.lens[$a[T.have++]]=H&7,H>>>=3,Z-=3}for(;T.have<19;)T.lens[$a[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,Bn={bits:T.lenbits},Ne=o(i,T.lens,0,19,T.lencode,0,T.work,Bn),T.lenbits=Bn.bits,Ne){G.msg="invalid code lengths set",T.mode=D;break}T.have=0,T.mode=we;case we: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(on=Me+2;Z<on;){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(on=Me+3;Z<on;){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(on=Me+7;Z<on;){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,Bn={bits:T.lenbits},Ne=o(s,T.lens,0,T.nlen,T.lencode,0,T.work,Bn),T.lenbits=Bn.bits,Ne){G.msg="invalid literal/lengths set",T.mode=D;break}if(T.distbits=6,T.distcode=T.distdyn,Bn={bits:T.distbits},Ne=o(a,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,Bn),T.distbits=Bn.bits,Ne){G.msg="invalid distances set",T.mode=D;break}if(T.mode=Ee,X===u)break e;case Ee:T.mode=Ie;case Ie: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,me),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===se&&(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,ar=tt;U=T.lencode[ar+((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=se;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(on=T.extra;Z<on;){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,ar=tt;U=T.distcode[ar+((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(on=T.extra;Z<on;){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=j;case j:if(R===0)break e;if(xe=me-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),bn=T.window}else bn=_e,Ue=K-T.offset,xe=T.length;xe>R&&(xe=R),R-=xe,T.length-=xe;do _e[K++]=bn[Ue++];while(--xe);T.length===0&&(T.mode=Ie);break;case ee:if(R===0)break e;_e[K++]=T.length,R--,T.mode=Ie;break;case J:if(T.wrap){for(;Z<32;){if($===0)break e;$--,H|=re[g++]<<Z,Z+=8}if(me-=R,G.total_out+=me,T.total+=me,me&&(G.adler=T.check=T.flags?n(T.check,_e,me,K-me):e(T.check,_e,me,K-me)),me=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=b;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||me!==G.avail_out&&T.mode<D&&(T.mode<J||X!==c))&&O(G,G.output,G.next_out,me-G.avail_out),Ce-=G.avail_in,me-=G.avail_out,G.total_in+=Ce,G.total_out+=me,T.total+=me,T.wrap&&me&&(G.adler=T.check=T.flags?n(T.check,_e,me,G.next_out-me):e(T.check,_e,me,G.next_out-me)),G.data_type=T.bits+(T.last?64:0)+(T.mode===se?128:0)+(T.mode===Ee||T.mode===ce?256:0),(Ce===0&&me===0||X===c)&&Ne===f&&(Ne=y),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)?b:(g=O(G,X,T,T),g?(re.mode=te,v):(re.havedict=1,f))}return hn.inflateReset=$e,hn.inflateReset2=Rt,hn.inflateResetKeep=It,hn.inflateInit=et,hn.inflateInit2=Nt,hn.inflate=x,hn.inflateEnd=z,hn.inflateGetHeader=V,hn.inflateSetDictionary=ue,hn.inflateInfo="pako inflate (from Nodeca project)",hn}var ld,f2;function h2(){return f2||(f2=1,ld={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}),ld}var ud,d2;function D_(){if(d2)return ud;d2=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 ud=t,ud}var p2;function B_(){if(p2)return yo;p2=1;var t=T_(),e=Lr(),n=i2(),r=h2(),o=od(),i=s2(),s=D_(),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,b=this.options.dictionary,v,y,A,S,E,I=!1;if(this.ended)return!1;y=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&&b&&(v=t.inflateSetDictionary(this.strm,b)),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&&(y===r.Z_FINISH||y===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&&(y=r.Z_FINISH),y===r.Z_FINISH?(v=t.inflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===r.Z_OK):(y===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 yo.Inflate=c,yo.inflate=l,yo.inflateRaw=u,yo.ungzip=l,yo}var fd,g2;function k_(){if(g2)return fd;g2=1;var t=Lr().assign,e=S_(),n=B_(),r=h2(),o={};return t(o,e,n,r),fd=o,fd}var Ll=k_();async function Or(t){try{let e,n=0,r=0;const o=[];let i=0,s;do{const c=t.subarray(n);if(s=new Ll.Inflate,{strm:e}=s,s.push(c,Ll.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 m2(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),b=new Ll.Inflate;if({strm:n}=b,b.push(p,Ll.Z_SYNC_FLUSH),b.err)throw new Error(b.msg);const v=b.result;a.push(v);let y=v.length;c.push(i),l.push(s),a.length===1&&r.dataPosition&&(a[0]=a[0].subarray(r.dataPosition),y=a[0].length);const A=i;if(i+=n.next_in,s+=y,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,b=0;p<a.length;p++)d.set(a[p],b),b+=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 hd,b2;function __(){if(b2)return hd;b2=1,hd=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(F,C,Y){this.low=F|0,this.high=C|0,this.unsigned=!!Y}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0});function n(F){return(F&&F.__isLong__)===!0}e.isLong=n;var r={},o={};function i(F,C){var Y,Q,se;return C?(F>>>=0,(se=0<=F&&F<256)&&(Q=o[F],Q)?Q:(Y=a(F,(F|0)<0?-1:0,!0),se&&(o[F]=Y),Y)):(F|=0,(se=-128<=F&&F<128)&&(Q=r[F],Q)?Q:(Y=a(F,F<0?-1:0,!1),se&&(r[F]=Y),Y))}e.fromInt=i;function s(F,C){if(isNaN(F))return C?A:y;if(C){if(F<0)return A;if(F>=p)return B}else{if(F<=-9223372036854776e3)return N;if(F+1>=b)return _}return F<0?s(-F,C).neg():a(F%h|0,F/h|0,C)}e.fromNumber=s;function a(F,C,Y){return new e(F,C,Y)}e.fromBits=a;var c=Math.pow;function l(F,C,Y){if(F.length===0)throw Error("empty string");if(F==="NaN"||F==="Infinity"||F==="+Infinity"||F==="-Infinity")return y;if(typeof C=="number"?(Y=C,C=!1):C=!!C,Y=Y||10,Y<2||36<Y)throw RangeError("radix");var Q;if((Q=F.indexOf("-"))>0)throw Error("interior hyphen");if(Q===0)return l(F.substring(1),C,Y).neg();for(var se=s(c(Y,8)),oe=y,ae=0;ae<F.length;ae+=8){var ce=Math.min(8,F.length-ae),ye=parseInt(F.substring(ae,ae+ce),Y);if(ce<8){var he=s(c(Y,ce));oe=oe.mul(he).add(s(ye))}else oe=oe.mul(se),oe=oe.add(s(ye))}return oe.unsigned=C,oe}e.fromString=l;function u(F,C){return typeof F=="number"?s(F,C):typeof F=="string"?l(F,C):a(F.low,F.high,typeof C=="boolean"?C:F.unsigned)}e.fromValue=u;var f=65536,d=1<<24,h=f*f,p=h*h,b=p/2,v=i(d),y=i(0);e.ZERO=y;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 M=e.prototype;return M.toInt=function(){return this.unsigned?this.low>>>0:this.low},M.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},M.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),se=Q.mul(Y).sub(this);return Q.toString(C)+se.toInt().toString(C)}else return"-"+this.neg().toString(C);for(var oe=s(c(C,6),this.unsigned),ae=this,ce="";;){var ye=ae.div(oe),he=ae.sub(ye.mul(oe)).toInt()>>>0,De=he.toString(C);if(ae=ye,ae.isZero())return De+ce;for(;De.length<6;)De="0"+De;ce=""+De+ce}},M.getHighBits=function(){return this.high},M.getHighBitsUnsigned=function(){return this.high>>>0},M.getLowBits=function(){return this.low},M.getLowBitsUnsigned=function(){return this.low>>>0},M.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},M.isZero=function(){return this.high===0&&this.low===0},M.eqz=M.isZero,M.isNegative=function(){return!this.unsigned&&this.high<0},M.isPositive=function(){return this.unsigned||this.high>=0},M.isOdd=function(){return(this.low&1)===1},M.isEven=function(){return(this.low&1)===0},M.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},M.eq=M.equals,M.notEquals=function(C){return!this.eq(C)},M.neq=M.notEquals,M.ne=M.notEquals,M.lessThan=function(C){return this.comp(C)<0},M.lt=M.lessThan,M.lessThanOrEqual=function(C){return this.comp(C)<=0},M.lte=M.lessThanOrEqual,M.le=M.lessThanOrEqual,M.greaterThan=function(C){return this.comp(C)>0},M.gt=M.greaterThan,M.greaterThanOrEqual=function(C){return this.comp(C)>=0},M.gte=M.greaterThanOrEqual,M.ge=M.greaterThanOrEqual,M.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},M.comp=M.compare,M.negate=function(){return!this.unsigned&&this.eq(N)?N:this.not().add(S)},M.neg=M.negate,M.add=function(C){n(C)||(C=u(C));var Y=this.high>>>16,Q=this.high&65535,se=this.low>>>16,oe=this.low&65535,ae=C.high>>>16,ce=C.high&65535,ye=C.low>>>16,he=C.low&65535,De=0,we=0,Ee=0,Ie=0;return Ie+=oe+he,Ee+=Ie>>>16,Ie&=65535,Ee+=se+ye,we+=Ee>>>16,Ee&=65535,we+=Q+ce,De+=we>>>16,we&=65535,De+=Y+ae,De&=65535,a(Ee<<16|Ie,De<<16|we,this.unsigned)},M.subtract=function(C){return n(C)||(C=u(C)),this.add(C.neg())},M.sub=M.subtract,M.multiply=function(C){if(this.isZero())return y;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 y;if(this.eq(N))return C.isOdd()?N:y;if(C.eq(N))return this.isOdd()?N:y;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,se=this.high&65535,oe=this.low>>>16,ae=this.low&65535,ce=C.high>>>16,ye=C.high&65535,he=C.low>>>16,De=C.low&65535,we=0,Ee=0,Ie=0,Ge=0;return Ge+=ae*De,Ie+=Ge>>>16,Ge&=65535,Ie+=oe*De,Ee+=Ie>>>16,Ie&=65535,Ie+=ae*he,Ee+=Ie>>>16,Ie&=65535,Ee+=se*De,we+=Ee>>>16,Ee&=65535,Ee+=oe*he,we+=Ee>>>16,Ee&=65535,Ee+=ae*ye,we+=Ee>>>16,Ee&=65535,we+=Q*De+se*he+oe*ye+ae*ce,we&=65535,a(Ie<<16|Ge,we<<16|Ee,this.unsigned)},M.mul=M.multiply,M.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:y;var Q,se,oe;if(this.unsigned){if(C.unsigned||(C=C.toUnsigned()),C.gt(this))return A;if(C.gt(this.shru(1)))return E;oe=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(y)?C.isNegative()?S:I:(se=this.sub(C.mul(Q)),oe=Q.add(se.div(C)),oe)}else if(C.eq(N))return this.unsigned?A:y;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();oe=y}for(se=this;se.gte(C);){Q=Math.max(1,Math.floor(se.toNumber()/C.toNumber()));for(var ce=Math.ceil(Math.log(Q)/Math.LN2),ye=ce<=48?1:c(2,ce-48),he=s(Q),De=he.mul(C);De.isNegative()||De.gt(se);)Q-=ye,he=s(Q,this.unsigned),De=he.mul(C);he.isZero()&&(he=S),oe=oe.add(he),se=se.sub(De)}return oe},M.div=M.divide,M.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))},M.mod=M.modulo,M.rem=M.modulo,M.not=function(){return a(~this.low,~this.high,this.unsigned)},M.and=function(C){return n(C)||(C=u(C)),a(this.low&C.low,this.high&C.high,this.unsigned)},M.or=function(C){return n(C)||(C=u(C)),a(this.low|C.low,this.high|C.high,this.unsigned)},M.xor=function(C){return n(C)||(C=u(C)),a(this.low^C.low,this.high^C.high,this.unsigned)},M.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)},M.shl=M.shiftLeft,M.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)},M.shr=M.shiftRight,M.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)},M.shru=M.shiftRightUnsigned,M.shr_u=M.shiftRightUnsigned,M.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},M.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},M.toBytes=function(C){return C?this.toBytesLE():this.toBytesBE()},M.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]},M.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)},hd}var R_=__();const Ol=Ml(R_),Nl=1;class F_{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=Ol.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[Nl],b=h?h[Nl]:1/0;return p<=n&&b>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][Nl]>=r));f+=1);return i[i.length-1][Nl]<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 F_({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 Or(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 w2(t,e){return t.offset+t.lineBytes*Math.floor(e/t.lineLength)+e%t.lineLength}async function M_(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 x2{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=M_(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=w2(e,n),a=w2(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 P_ extends x2{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 v2(t){return t.split(">").filter(e=>/\S/.test(e)).map(e=>{const[n,...r]=e.split(`
|
|
651
|
+
`),[o,...i]=n.split(" "),s=r.join("").replace(/\s/g,"");return{id:o,description:i.join(" "),sequence:s}})}class L_{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 v2(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 O_=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:P_,FetchableSmallFasta:L_,IndexedFasta:x2,parseSmallFasta:v2},Symbol.toStringTag,{value:"Module"})),A2=BigInt(32);function N_(t,e,n){const r=+!!n,o=+!n;return BigInt(t.getInt32(e,n)*o+t.getInt32(e+4,n)*r)<<A2|BigInt(t.getUint32(e,n)*r+t.getUint32(e+4,n)*o)}function z_(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)<<A2|BigInt(r*i+o*s)}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(t,e){return N_(this,t,e)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(t,e){return z_(this,t,e)});class U_{}class G_{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(e=new U_){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 H_{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 Ei{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 G_,s=new H_;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),Ei.checkSinglePromise(i.promise,r)):(this.fill(e,n,r,o),Ei.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 dd,E2;function V_(){if(E2)return dd;E2=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 dd=t,dd}var q_=V_();const zl=Ml(q_);class wo{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 wo([{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 wo([{min:o.min,max:i.max}]));return r.push(o),r.length===1?r[0]:new wo(r)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */function xo(t){let e=t.length;for(;--e>=0;)t[e]=0}const j_=3,W_=258,S2=29,Y_=256+1+S2,C2=30,Q_=512,Z_=new Array((Y_+2)*2);xo(Z_);const X_=new Array(C2*2);xo(X_);const K_=new Array(Q_);xo(K_);const J_=new Array(W_-j_+1);xo(J_);const $_=new Array(S2);xo($_);const eR=new Array(C2);xo(eR);var pd=(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 tR=()=>{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},nR=new Uint32Array(tR());var Vn=(t,e,n,r)=>{const o=nR,i=r+n;t^=-1;for(let s=r;s<i;s++)t=t>>>8^o[(t^e[s])&255];return t^-1},gd={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"},I2={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 rR=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var iR=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)rR(n,r)&&(t[r]=n[r])}}return t},oR=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},T2={assign:iR,flattenChunks:oR};let D2=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{D2=!1}const Sa=new Uint8Array(256);for(let t=0;t<256;t++)Sa[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Sa[254]=Sa[254]=1;var sR=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 aR=(t,e)=>{if(e<65534&&t.subarray&&D2)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 cR=(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=Sa[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 aR(i,o)},lR=(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+Sa[t[n]]>e?n:e},md={string2buf:sR,buf2string:cR,utf8border:lR};function uR(){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 fR=uR;const Ul=16209,hR=16191;var dR=function(e,n){let r,o,i,s,a,c,l,u,f,d,h,p,b,v,y,A,S,E,I,_,B,N,M,F;const C=e.state;r=e.next_in,M=e.input,o=r+(e.avail_in-5),i=e.next_out,F=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,b=C.lencode,v=C.distcode,y=(1<<C.lenbits)-1,A=(1<<C.distbits)-1;e:do{p<15&&(h+=M[r++]<<p,p+=8,h+=M[r++]<<p,p+=8),S=b[h&y];t:for(;;){if(E=S>>>24,h>>>=E,p-=E,E=S>>>16&255,E===0)F[i++]=S&65535;else if(E&16){I=S&65535,E&=15,E&&(p<E&&(h+=M[r++]<<p,p+=8),I+=h&(1<<E)-1,h>>>=E,p-=E),p<15&&(h+=M[r++]<<p,p+=8,h+=M[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+=M[r++]<<p,p+=8,p<E&&(h+=M[r++]<<p,p+=8)),_+=h&(1<<E)-1,_>c){e.msg="invalid distance too far back",C.mode=Ul;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=Ul;break e}if(B=0,N=d,f===0){if(B+=l-E,E<I){I-=E;do F[i++]=d[B++];while(--E);B=i-_,N=F}}else if(f<E){if(B+=l+f-E,E-=f,E<I){I-=E;do F[i++]=d[B++];while(--E);if(B=0,f<I){E=f,I-=E;do F[i++]=d[B++];while(--E);B=i-_,N=F}}}else if(B+=f-E,E<I){I-=E;do F[i++]=d[B++];while(--E);B=i-_,N=F}for(;I>2;)F[i++]=N[B++],F[i++]=N[B++],F[i++]=N[B++],I-=3;I&&(F[i++]=N[B++],I>1&&(F[i++]=N[B++]))}else{B=i-_;do F[i++]=F[B++],F[i++]=F[B++],F[i++]=F[B++],I-=3;while(I>2);I&&(F[i++]=F[B++],I>1&&(F[i++]=F[B++]))}}else if(E&64){e.msg="invalid distance code",C.mode=Ul;break e}else{S=v[(S&65535)+(h&(1<<E)-1)];continue n}break}}else if(E&64)if(E&32){C.mode=hR;break e}else{e.msg="invalid literal/length code",C.mode=Ul;break e}else{S=b[(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 vo=15,B2=852,k2=592,_2=0,bd=1,R2=2,pR=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]),gR=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]),mR=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]),bR=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 Ca=(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,b=0,v=0,y=0,A=0,S,E,I,_,B,N=null,M;const F=new Uint16Array(vo+1),C=new Uint16Array(vo+1);let Y=null,Q,se,oe;for(l=0;l<=vo;l++)F[l]=0;for(u=0;u<r;u++)F[e[n+u]]++;for(h=c,d=vo;d>=1&&F[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&&F[f]===0;f++);for(h<f&&(h=f),v=1,l=1;l<=vo;l++)if(v<<=1,v-=F[l],v<0)return-1;if(v>0&&(t===_2||d!==1))return-1;for(C[1]=0,l=1;l<vo;l++)C[l+1]=C[l]+F[l];for(u=0;u<r;u++)e[n+u]!==0&&(s[C[e[n+u]]++]=u);if(t===_2?(N=Y=s,M=20):t===bd?(N=pR,Y=gR,M=257):(N=mR,Y=bR,M=0),A=0,u=0,l=f,B=i,p=h,b=0,I=-1,y=1<<h,_=y-1,t===bd&&y>B2||t===R2&&y>k2)return 1;for(;;){Q=l-b,s[u]+1<M?(se=0,oe=s[u]):s[u]>=M?(se=Y[s[u]-M],oe=N[s[u]-M]):(se=96,oe=0),S=1<<l-b,E=1<<p,f=E;do E-=S,o[B+(A>>b)+E]=Q<<24|se<<16|oe|0;while(E!==0);for(S=1<<l-1;A&S;)S>>=1;if(S!==0?(A&=S-1,A+=S):A=0,u++,--F[l]===0){if(l===d)break;l=e[n+s[u]]}if(l>h&&(A&_)!==I){for(b===0&&(b=h),B+=f,p=l-b,v=1<<p;p+b<d&&(v-=F[p+b],!(v<=0));)p++,v<<=1;if(y+=1<<p,t===bd&&y>B2||t===R2&&y>k2)return 1;I=A&_,o[I]=h<<24|p<<16|B-i|0}}return A!==0&&(o[B+A]=l-b<<24|64<<16|0),a.bits=h,0};const yR=0,F2=1,M2=2,{Z_FINISH:P2,Z_BLOCK:wR,Z_TREES:Gl,Z_OK:Si,Z_STREAM_END:xR,Z_NEED_DICT:vR,Z_STREAM_ERROR:dn,Z_DATA_ERROR:L2,Z_MEM_ERROR:O2,Z_BUF_ERROR:AR,Z_DEFLATED:N2}=I2,Hl=16180,z2=16181,U2=16182,G2=16183,H2=16184,V2=16185,q2=16186,j2=16187,W2=16188,Y2=16189,Vl=16190,tr=16191,yd=16192,Q2=16193,wd=16194,Z2=16195,X2=16196,K2=16197,J2=16198,ql=16199,jl=16200,$2=16201,ew=16202,tw=16203,nw=16204,rw=16205,xd=16206,iw=16207,ow=16208,ct=16209,sw=16210,aw=16211,ER=852,SR=592,CR=15,cw=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function IR(){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 Ci=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<Hl||e.mode>aw?1:0},lw=t=>{if(Ci(t))return dn;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=Hl,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(ER),e.distcode=e.distdyn=new Int32Array(SR),e.sane=1,e.back=-1,Si},uw=t=>{if(Ci(t))return dn;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,lw(t)},fw=(t,e)=>{let n;if(Ci(t))return dn;const r=t.state;return e<0?(n=0,e=-e):(n=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?dn:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,uw(t))},hw=(t,e)=>{if(!t)return dn;const n=new IR;t.state=n,n.strm=t,n.window=null,n.mode=Hl;const r=fw(t,e);return r!==Si&&(t.state=null),r},TR=t=>hw(t,CR);let dw=!0,vd,Ad;const DR=t=>{if(dw){vd=new Int32Array(512),Ad=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(Ca(F2,t.lens,0,288,vd,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Ca(M2,t.lens,0,32,Ad,0,t.work,{bits:5}),dw=!1}t.lencode=vd,t.lenbits=9,t.distcode=Ad,t.distbits=5},pw=(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},BR=(t,e)=>{let n,r,o,i,s,a,c,l,u,f,d,h,p,b,v=0,y,A,S,E,I,_,B,N;const M=new Uint8Array(4);let F,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(Ci(t)||!t.output||!t.input&&t.avail_in!==0)return dn;n=t.state,n.mode===tr&&(n.mode=yd),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=Si;e:for(;;)switch(n.mode){case Hl:if(n.wrap===0){n.mode=yd;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,M[0]=l&255,M[1]=l>>>8&255,n.check=Vn(n.check,M,2,0),l=0,u=0,n.mode=z2;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)!==N2){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?Y2:tr,l=0,u=0;break;case z2:for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==N2){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&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Vn(n.check,M,2,0)),l=0,u=0,n.mode=U2;case U2: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&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,n.check=Vn(n.check,M,4,0)),l=0,u=0,n.mode=G2;case G2: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&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Vn(n.check,M,2,0)),l=0,u=0,n.mode=H2;case H2: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&&(M[0]=l&255,M[1]=l>>>8&255,n.check=Vn(n.check,M,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=V2;case V2: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=Vn(n.check,r,h,i)),a-=h,i+=h,n.length-=h),n.length))break e;n.length=0,n.mode=q2;case q2: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=Vn(n.check,r,h,i)),a-=h,i+=h,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=j2;case j2: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=Vn(n.check,r,h,i)),a-=h,i+=h,B)break e}else n.head&&(n.head.comment=null);n.mode=W2;case W2: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=tr;break;case Y2:for(;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}t.adler=n.check=cw(l),l=0,u=0,n.mode=Vl;case Vl: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,vR;t.adler=n.check=1,n.mode=tr;case tr:if(e===wR||e===Gl)break e;case yd:if(n.last){l>>>=u&7,u-=u&7,n.mode=xd;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=Q2;break;case 1:if(DR(n),n.mode=ql,e===Gl){l>>>=2,u-=2;break e}break;case 2:n.mode=X2;break;case 3:t.msg="invalid block type",n.mode=ct}l>>>=2,u-=2;break;case Q2: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=wd,e===Gl)break e;case wd:n.mode=Z2;case Z2: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=tr;break;case X2: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=K2;case K2: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,F={bits:n.lenbits},N=Ca(yR,n.lens,0,19,n.lencode,0,n.work,F),n.lenbits=F.bits,N){t.msg="invalid code lengths set",n.mode=ct;break}n.have=0,n.mode=J2;case J2:for(;n.have<n.nlen+n.ndist;){for(;v=n.lencode[l&(1<<n.lenbits)-1],y=v>>>24,A=v>>>16&255,S=v&65535,!(y<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(S<16)l>>>=y,u-=y,n.lens[n.have++]=S;else{if(S===16){for(C=y+2;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(l>>>=y,u-=y,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=y+3;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=y,u-=y,B=0,h=3+(l&7),l>>>=3,u-=3}else{for(C=y+7;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=y,u-=y,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,F={bits:n.lenbits},N=Ca(F2,n.lens,0,n.nlen,n.lencode,0,n.work,F),n.lenbits=F.bits,N){t.msg="invalid literal/lengths set",n.mode=ct;break}if(n.distbits=6,n.distcode=n.distdyn,F={bits:n.distbits},N=Ca(M2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,F),n.distbits=F.bits,N){t.msg="invalid distances set",n.mode=ct;break}if(n.mode=ql,e===Gl)break e;case ql:n.mode=jl;case jl: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,dR(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===tr&&(n.back=-1);break}for(n.back=0;v=n.lencode[l&(1<<n.lenbits)-1],y=v>>>24,A=v>>>16&255,S=v&65535,!(y<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(A&&!(A&240)){for(E=y,I=A,_=S;v=n.lencode[_+((l&(1<<E+I)-1)>>E)],y=v>>>24,A=v>>>16&255,S=v&65535,!(E+y<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=E,u-=E,n.back+=E}if(l>>>=y,u-=y,n.back+=y,n.length=S,A===0){n.mode=rw;break}if(A&32){n.back=-1,n.mode=tr;break}if(A&64){t.msg="invalid literal/length code",n.mode=ct;break}n.extra=A&15,n.mode=$2;case $2: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=ew;case ew:for(;v=n.distcode[l&(1<<n.distbits)-1],y=v>>>24,A=v>>>16&255,S=v&65535,!(y<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(!(A&240)){for(E=y,I=A,_=S;v=n.distcode[_+((l&(1<<E+I)-1)>>E)],y=v>>>24,A=v>>>16&255,S=v&65535,!(E+y<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=E,u-=E,n.back+=E}if(l>>>=y,u-=y,n.back+=y,A&64){t.msg="invalid distance code",n.mode=ct;break}n.offset=S,n.extra=A&15,n.mode=tw;case tw: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=nw;case nw: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),b=n.window}else b=o,p=s-n.offset,h=n.length;h>c&&(h=c),c-=h,n.length-=h;do o[s++]=b[p++];while(--h);n.length===0&&(n.mode=jl);break;case rw:if(c===0)break e;o[s++]=n.length,c--,n.mode=jl;break;case xd: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?Vn(n.check,o,d,s-d):pd(n.check,o,d,s-d)),d=c,n.wrap&4&&(n.flags?l:cw(l))!==n.check){t.msg="incorrect data check",n.mode=ct;break}l=0,u=0}n.mode=iw;case iw: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=ow;case ow:N=xR;break e;case ct:N=L2;break e;case sw:return O2;case aw:default:return dn}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<xd||e!==P2))&&pw(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?Vn(n.check,o,d,t.next_out-d):pd(n.check,o,d,t.next_out-d)),t.data_type=n.bits+(n.last?64:0)+(n.mode===tr?128:0)+(n.mode===ql||n.mode===wd?256:0),(f===0&&d===0||e===P2)&&N===Si&&(N=AR),N},kR=t=>{if(Ci(t))return dn;let e=t.state;return e.window&&(e.window=null),t.state=null,Si},_R=(t,e)=>{if(Ci(t))return dn;const n=t.state;return n.wrap&2?(n.head=e,e.done=!1,Si):dn},RR=(t,e)=>{const n=e.length;let r,o,i;return Ci(t)||(r=t.state,r.wrap!==0&&r.mode!==Vl)?dn:r.mode===Vl&&(o=1,o=pd(o,e,n,0),o!==r.check)?L2:(i=pw(t,e,n,n),i?(r.mode=sw,O2):(r.havedict=1,Si))};var FR=uw,MR=fw,PR=lw,LR=TR,OR=hw,NR=BR,zR=kR,UR=_R,GR=RR,HR="pako inflate (from Nodeca project)",nr={inflateReset:FR,inflateReset2:MR,inflateResetKeep:PR,inflateInit:LR,inflateInit2:OR,inflate:NR,inflateEnd:zR,inflateGetHeader:UR,inflateSetDictionary:GR,inflateInfo:HR};function VR(){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 qR=VR;const gw=Object.prototype.toString,{Z_NO_FLUSH:jR,Z_FINISH:WR,Z_OK:Ia,Z_STREAM_END:Ed,Z_NEED_DICT:Sd,Z_STREAM_ERROR:YR,Z_DATA_ERROR:mw,Z_MEM_ERROR:QR}=I2;function Wl(t){this.options=T2.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 fR,this.strm.avail_out=0;let n=nr.inflateInit2(this.strm,e.windowBits);if(n!==Ia)throw new Error(gd[n]);if(this.header=new qR,nr.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=md.string2buf(e.dictionary):gw.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=nr.inflateSetDictionary(this.strm,e.dictionary),n!==Ia)))throw new Error(gd[n])}Wl.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?WR:jR,gw.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=nr.inflate(n,s),i===Sd&&o&&(i=nr.inflateSetDictionary(n,o),i===Ia?i=nr.inflate(n,s):i===mw&&(i=Sd));n.avail_in>0&&i===Ed&&n.state.wrap>0&&t[n.next_in]!==0;)nr.inflateReset(n),i=nr.inflate(n,s);switch(i){case YR:case mw:case Sd:case QR:return this.onEnd(i),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||i===Ed))if(this.options.to==="string"){let c=md.utf8border(n.output,n.next_out),l=n.next_out-c,u=md.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===Ia&&a===0)){if(i===Ed)return i=nr.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},Wl.prototype.onData=function(t){this.chunks.push(t)},Wl.prototype.onEnd=function(t){t===Ia&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=T2.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function ZR(t,e){const n=new Wl(e);if(n.push(t),n.err)throw n.msg||gd[n.err];return n.result}function XR(t,e){return e=e||{},e.raw=!0,ZR(t,e)}var KR=XR,JR={inflateRaw:KR};const{inflateRaw:$R}=JR;var eF=$R;function tF(t){return eF(t.subarray(2))}let nF=class extends Error{constructor(e){super(e),this.code="ERR_ABORTED"}};function rF(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 Yl(t){if(t&&t.aborted)if(typeof DOMException>"u"){const e=new nF("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}const Cd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Id(t,e,n,r){return t<r&&e>=n}class bw{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 Ei({cache:new zl({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=[],b=0;const v=!0,y=(I,_,B)=>{try{const M=I.subarray(_),F=new DataView(M.buffer,M.byteOffset,M.length);let C=0;const Y=F.getUint8(C);C+=2;const Q=F.getUint16(C,v);if(C+=2,Y===1){const se=[];for(let oe=0;oe<Q;oe++){const ae=F.getUint32(C,v);C+=4;const ce=F.getUint32(C,v);C+=4;const ye=F.getUint32(C,v);C+=4;const he=F.getUint32(C,v);C+=4;const De=Number(F.getBigUint64(C,v));C+=8;const we=Number(F.getBigUint64(C,v));C+=8,se.push({startChrom:ae,startBase:ce,endBase:he,endChrom:ye,blockOffset:De,blockSize:we,offset:C})}p=p.concat(se.filter(oe=>A(oe)).map(oe=>({offset:oe.blockOffset,length:oe.blockSize})))}else if(Y===0){const se=[];for(let ae=0;ae<Q;ae++){const ce=F.getUint32(C,v);C+=4;const ye=F.getUint32(C,v);C+=4;const he=F.getUint32(C,v);C+=4;const De=F.getUint32(C,v);C+=4;const we=Number(F.getBigUint64(C,v));C+=8,se.push({startChrom:ce,startBase:ye,endChrom:he,endBase:De,blockOffset:we,offset:C})}const oe=se.filter(ae=>A(ae)).map(ae=>ae.blockOffset);oe.length>0&&E(oe,B+1)}}catch(N){o.error(N)}},A=I=>{const{startChrom:_,startBase:B,endChrom:N,endBase:M}=I;return(_<u||_===u&&B<=r)&&(N>u||N===u&&M>=n)},S=async(I,_,B)=>{try{const N=_.max-_.min,M=_.min,F=await this.featureCache.get(`${N}_${M}`,{length:N,offset:M},i==null?void 0:i.signal);for(const C of I)_.contains(C)&&(y(F,C-M,B),b-=1,b===0&&this.readFeatures(o,p,{...i,request:f}).catch(Y=>{o.error(Y)}))}catch(N){o.error(N)}},E=(I,_)=>{try{b+=I.length;const B=4+h*32;let N=new wo([{min:I[0],max:I[0]+B}]);for(let M=1;M<I.length;M+=1){const F=new wo([{min:I[M],max:I[M]+B}]);N=N.union(F)}N.getRanges().map(M=>S(I,M,_))}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&&Id(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 b=a;for(;b<e.length&&e[b]!==0;b++);const v=e.subarray(a,b),y=(i=Cd==null?void 0:Cd.decode(v))!==null&&i!==void 0?i:v.toString();a=b+1,s.push({chromId:d,start:h,end:p,rest:y,uniqueId:`bb-${r+f}`})}return o?s.filter(f=>Id(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 b=i.getInt32(s,!0);s+=4;const v=i.getFloat32(s,!0);s+=4,d[h]={start:p,end:b,score:v}}break}case 2:{for(let h=0;h<f;h++){const p=i.getInt32(s,!0);s+=4;const b=i.getFloat32(s,!0);s+=4,d[h]={score:b,start:p,end:p+l}}break}case 3:{for(let h=0;h<f;h++){const p=i.getFloat32(s,!0);s+=4;const b=a+h*c;d[h]={score:p,start:b,end:b+l}}break}}return r?d.filter(h=>Id(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=rF(n);Yl(s),await Promise.all(c.map(async l=>{Yl(s);const{length:u,offset:f}=l,d=await this.featureCache.get(`${u}_${f}`,l,s);for(const h of l.blocks){Yl(s);let p=Number(h.offset)-Number(l.offset),b=d;switch(i&&(b=tF(d.subarray(p)),p=0),Yl(s),o){case"summary":{e.next(this.parseSummaryBlock(b,p,a));break}case"bigwig":{e.next(this.parseBigWigBlock(b,p,a));break}case"bigbed":{e.next(this.parseBigBedBlock(b,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 Td=function(t,e){return Td=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])},Td(t,e)};function Dd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Td(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function iF(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 Ta(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 Bd(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 kd(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 Ao(t){return this instanceof Ao?(this.v=t,this):new Ao(t)}function oF(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(b){return new Promise(function(v,y){i.push([h,b,v,y])>1||c(h,b)})},p&&(o[h]=p(o[h])))}function c(h,p){try{l(r[h](p))}catch(b){d(i[0][3],b)}}function l(h){h.value instanceof Ao?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 sF(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 Ta=="function"?Ta(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 xt(t){return typeof t=="function"}function ww(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=ww(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
627
652
|
`+n.map(function(r,o){return o+1+") "+r.toString()}).join(`
|
|
628
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function tw(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var bd=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=ga(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(xt(u))try{u()}catch(y){i=y instanceof md?y.errors:[y]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=ga(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{rw(p)}catch(y){i=i??[],y instanceof md?i=gd(gd([],pd(i)),pd(y.errors)):i.push(y)}}}catch(y){r={error:y}}finally{try{d&&!d.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}if(i)throw new md(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)rw(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)&&tw(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&tw(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();bd.EMPTY;function nw(t){return t instanceof bd||t&&"closed"in t&&xt(t.remove)&&xt(t.add)&&xt(t.unsubscribe)}function rw(t){xt(t)?t():t.unsubscribe()}var OR={Promise:void 0},zR={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,gd([t,e],pd(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function iw(t){zR.setTimeout(function(){throw t})}function ow(){}function UR(t){t()}var yd=function(t){dd(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,nw(n)&&n.add(r)):r.destination=VR,r}return e.create=function(n,r,o){return new Ll(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}(bd),GR=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){Nl(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Nl(r)}else Nl(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Nl(n)}},t}(),Ll=function(t){dd(e,t);function e(n,r,o){var i=t.call(this)||this,s;return xt(n)||!n?s={next:n??void 0,error:r??void 0,complete:o??void 0}:s=n,i.destination=new GR(s),i}return e}(yd);function Nl(t){iw(t)}function HR(t){throw t}var VR={closed:!0,next:ow,error:HR,complete:ow},wd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function sw(t){return t}function qR(t){return t.length===0?sw:t.length===1?t[0]:function(n){return t.reduce(function(r,o){return o(r)},n)}}var hn=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=WR(e)?e:new Ll(e,n,r);return UR(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=aw(n),new n(function(o,i){var s=new Ll({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[wd]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return qR(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=aw(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 aw(t){var e;return(e=t??OR.Promise)!==null&&e!==void 0?e:Promise}function jR(t){return t&&xt(t.next)&&xt(t.error)&&xt(t.complete)}function WR(t){return t&&t instanceof yd||jR(t)&&nw(t)}function QR(t){return xt(t==null?void 0:t.lift)}function go(t){return function(e){if(QR(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 ma(t,e,n,r,o){return new YR(t,e,n,r,o)}var YR=function(t){dd(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}(yd),ZR=new hn(function(t){return t.complete()});function XR(t){return t&&xt(t.schedule)}function cw(t){return t[t.length-1]}function KR(t){return XR(cw(t))?t.pop():void 0}function JR(t,e){return typeof cw(t)=="number"?t.pop():e}var lw=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function uw(t){return xt(t==null?void 0:t.then)}function fw(t){return xt(t[wd])}function hw(t){return Symbol.asyncIterator&&xt(t==null?void 0:t[Symbol.asyncIterator])}function dw(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 $R(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var pw=$R();function gw(t){return xt(t==null?void 0:t[pw])}function mw(t){return LR(this,arguments,function(){var n,r,o,i;return $y(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,po(n.read())];case 3:return r=s.sent(),o=r.value,i=r.done,i?[4,po(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,po(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 bw(t){return xt(t==null?void 0:t.getReader)}function mo(t){if(t instanceof hn)return t;if(t!=null){if(fw(t))return eF(t);if(lw(t))return tF(t);if(uw(t))return nF(t);if(hw(t))return yw(t);if(gw(t))return rF(t);if(bw(t))return iF(t)}throw dw(t)}function eF(t){return new hn(function(e){var n=t[wd]();if(xt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function tF(t){return new hn(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function nF(t){return new hn(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,iw)})}function rF(t){return new hn(function(e){var n,r;try{for(var o=ga(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 yw(t){return new hn(function(e){oF(t,e).catch(function(n){return e.error(n)})})}function iF(t){return yw(mw(t))}function oF(t,e){var n,r,o,i;return PR(this,void 0,void 0,function(){var s,a;return $y(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=NR(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 Ai(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 ww(t,e){return e===void 0&&(e=0),go(function(n,r){n.subscribe(ma(r,function(o){return Ai(r,t,function(){return r.next(o)},e)},function(){return Ai(r,t,function(){return r.complete()},e)},function(o){return Ai(r,t,function(){return r.error(o)},e)}))})}function xw(t,e){return e===void 0&&(e=0),go(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function sF(t,e){return mo(t).pipe(xw(e),ww(e))}function aF(t,e){return mo(t).pipe(xw(e),ww(e))}function cF(t,e){return new hn(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function lF(t,e){return new hn(function(n){var r;return Ai(n,e,function(){r=t[pw](),Ai(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 xt(r==null?void 0:r.return)&&r.return()}})}function vw(t,e){if(!t)throw new Error("Iterable cannot be null");return new hn(function(n){Ai(n,e,function(){var r=t[Symbol.asyncIterator]();Ai(n,e,function(){r.next().then(function(o){o.done?n.complete():n.next(o.value)})},0,!0)})})}function uF(t,e){return vw(mw(t),e)}function fF(t,e){if(t!=null){if(fw(t))return sF(t,e);if(lw(t))return cF(t,e);if(uw(t))return aF(t,e);if(hw(t))return vw(t,e);if(gw(t))return lF(t,e);if(bw(t))return uF(t,e)}throw dw(t)}function hF(t,e){return e?fF(t,e):mo(t)}var dF=ew(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Aw(t,e){return new Promise(function(n,r){var o=new Ll({next:function(i){n(i),o.unsubscribe()},error:r,complete:function(){r(new dF)}});t.subscribe(o)})}function Ew(t,e){return go(function(n,r){var o=0;n.subscribe(ma(r,function(i){r.next(t.call(e,i,o++))}))})}function pF(t,e,n,r,o,i,s,a){var c=[],l=0,u=0,f=!1,h=function(){f&&!c.length&&!l&&e.complete()},d=function(y){return l<r?p(y):c.push(y)},p=function(y){l++;var v=!1;mo(n(y,u++)).subscribe(ma(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();h()}catch(A){e.error(A)}}))};return t.subscribe(ma(e,d,function(){f=!0,h()})),function(){}}function Sw(t,e,n){return n===void 0&&(n=1/0),xt(e)?Sw(function(r,o){return Ew(function(i,s){return e(r,i,o,s)})(mo(t(r,o)))},n):(typeof e=="number"&&(n=e),go(function(r,o){return pF(r,o,t,n)}))}function gF(t){return t===void 0&&(t=1/0),Sw(sw,t)}function mF(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=KR(t),r=JR(t,1/0),o=t;return o.length?o.length===1?mo(o[0]):gF(r)(hF(o,n)):ZR}function bF(t,e,n,r,o){return function(i,s){var a=n,c=e,l=0;i.subscribe(ma(s,function(u){var f=l++;c=a?t(c,u,f):(a=!0,u)},function(){a&&s.next(c),s.complete()}))}}function Cw(t,e){return go(bF(t,e,arguments.length>=2,!1,!0))}var yF=function(t,e){return t.push(e),t};function wF(){return go(function(t,e){Cw(yF,[])(t).subscribe(e)})}const Iw=-2003829722,xd=-2021002517;class Tw{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 En(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 h=Number(a.getBigUint64(c,!0));c+=8;const d=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 C=a.getUint32(c,!0);c+=4;const E=Number(a.getBigUint64(c,!0));c+=8;const I=[];for(let O=0;O<f;O++){const F=a.getUint32(c,!0);c+=4;const P=a.getUint32(c,!0);c+=4;const S=Number(a.getBigUint64(c,!0));c+=8;const Q=Number(a.getBigUint64(c,!0));c+=8,I.push({reductionLevel:F,reserved:P,dataOffset:S,indexOffset:Q})}const R=l===xd?"bigbed":"bigwig";if(b>n||A>n-8*5)return this._getMainHeader(e,n*2);let B;if(A){const O=o.subarray(Number(A));let F=0;const P=new DataView(O.buffer,O.byteOffset,O.length),S=Number(P.getBigUint64(F,!0));F+=8;const Q=P.getFloat64(F,!0);F+=8;const Z=P.getFloat64(F,!0);F+=8;const ae=P.getFloat64(F,!0);F+=8;const ce=P.getFloat64(F,!0);F+=8,B={scoreMin:Q,scoreMax:Z,scoreSum:ae,scoreSumSquares:ce,basesCovered:S}}else throw new Error("no stats");return{zoomLevels:I,magic:l,extHeaderOffset:E,numZoomLevels:f,fieldCount:y,totalSummary:B,definedFieldCount:v,uncompressBufSize:C,asOffset:b,chromTreeOffset:h,totalSummaryOffset:A,unzoomedDataOffset:d,unzoomedIndexOffset:p,fileType:R,version:u,isBigEndian:i,autoSql:b?o.subarray(b,o.indexOf(0,b)).toString():""}}_isBigEndian(e){let n=e.readInt32LE(0);if(n===Iw||n===xd)return!1;if(n=e.readInt32BE(0),n===Iw||n===xd)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,h=new DataView(f.buffer,f.byteOffset,f.length);let d=0;d+=4,d+=4;const p=h.getUint32(d,o);d+=4,d+=4,d+=8;const y=32,v=async b=>{let A=b;if(A>=u.length)throw new Error("reading beyond end of buffer");const C=h.getUint8(A);A+=2;const E=h.getUint16(A,o);if(A+=2,C)for(let I=0;I<E;I++){const R=u.subarray(A,A+p).toString().replaceAll("\0","");A+=p;const B=h.getUint32(A,o);A+=4;const O=h.getUint32(A,o);A+=4;const F={name:R,id:B,length:O};s[this.renameRefSeqs(R)]=B,i[B]=F}else{const I=[];for(let R=0;R<E;R++){A+=p;const B=Number(h.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 Jy(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 hn(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 Aw(i.pipe(wF()))).flat()}}class xF extends Tw{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 Jy(this.bbi,o,u.indexOffset,i,s>0,"summary")}return this.getUnzoomedView(n)}}function vF(t){return t.filter(e=>!!e)}class AF extends Tw{constructor(){super(...arguments),this.readIndicesCache=new wi({cache:new Tl({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,h=f*l,{buffer:d}=await this.bbi.read(Ke.Buffer.alloc(h),0,h,Number(u)),p=[];for(let y=0;y<l;y+=1){const v=d.subarray(y*f),b=new DataView(v.buffer,v.byteOffset,v.length);let A=0;const C=b.getInt16(A,i);A+=2;const E=b.getInt16(A,i);A+=2;const I=Number(b.getBigUint64(A,i));A+=12;const R=b.getInt16(A,i);p.push({type:C,fieldcount:E,offset:Number(I),field:R})}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,h=new DataView(f.buffer,f.byteOffset,f.length);let d=0;d+=4;const p=h.getInt32(d,u);d+=4;const y=h.getInt32(d,u);d+=4;const v=h.getInt32(d,u);d+=4,d+=8;const b=async C=>{const E=Number(C),I=4+p*(y+v),{buffer:R}=await this.bbi.read(Ke.Buffer.alloc(I),0,I,E,n),B=R,O=new DataView(B.buffer,B.byteOffset,B.length);let F=0;const P=O.getInt8(F);F+=2;const S=O.getInt16(F,u);F+=2;const Q=[];if(P===0){const Z=[];for(let ce=0;ce<S;ce++){const fe=B.subarray(F,F+y).toString().replaceAll("\0","");F+=y;const le=Number(O.getBigUint64(F,u));F+=8,Z.push({key:fe,offset:le})}let ae=0;for(const{key:ce,offset:fe}of Z){if(e.localeCompare(ce)<0&&ae)return b(ae);ae=fe}return b(ae)}else if(P===1){for(let Z=0;Z<S;Z++){const ae=B.subarray(F,F+y).toString().replaceAll("\0","");F+=y;const ce=Number(O.getBigUint64(F,u));F+=8;const fe=O.getUint32(F,u);F+=4;const le=O.getUint32(F,u);F+=4,Q.push({key:ae,offset:ce,length:fe,reserved:le})}for(const Z of Q)if(Z.key===e)return{...Z,field:c};return}};return b(a+32)});return vF(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 hn(c=>{o.readFeatures(c,[a],n).catch(l=>{c.error(l)})}).pipe(Cw((c,l)=>c.concat(l)),Ew(c=>{for(const l of c)l.field=a.field;return c})));return(await Aw(mF(...i))).filter(a=>{var c;return((c=a.rest)===null||c===void 0?void 0:c.split(" ")[(a.field||0)-3])===e})}}const Dw=Object.freeze(Object.defineProperty({__proto__:null,BigBed:AF,BigWig:xF},Symbol.toStringTag,{value:"Module"}));var vd,Bw;function EF(){if(Bw)return vd;Bw=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(h){return'"'+a(h.text)+'"'},class:function(h){var d="",p;for(p=0;p<h.parts.length;p++)d+=h.parts[p]instanceof Array?c(h.parts[p][0])+"-"+c(h.parts[p][1]):c(h.parts[p]);return"["+(h.inverted?"^":"")+d+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.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(d){return"\\x0"+s(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+s(d)})}function c(h){return h.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(d){return"\\x0"+s(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+s(d)})}function l(h){return i[h.type](h)}function u(h){var d=new Array(h.length),p,y;for(p=0;p<h.length;p++)d[p]=l(h[p]);if(d.sort(),d.length>0){for(p=1,y=1;p<d.length;p++)d[p-1]!==d[p]&&(d[y]=d[p],y++);d.length=y}switch(d.length){case 1:return d[0];case 2:return d[0]+" or "+d[1];default:return d.slice(0,-1).join(", ")+", or "+d[d.length-1]}}function f(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+u(r)+" but "+f(o)+" found."};function n(r,o){o=o!==void 0?o:{};var i={},s={declaration:Nx},a=Nx,c="(",l=ze("(",!1),u=")",f=ze(")",!1),h=function(M,te,de,me){return{type:M,name:te,comment:de,fields:me}},d="simple",p=ze("simple",!1),y="object",v=ze("object",!1),b="table",A=ze("table",!1),C="auto",E=ze("auto",!1),I="primary",R=ze("primary",!1),B="index",O=ze("index",!1),F="unique",P=ze("unique",!1),S=function(M,te){return te},Q=function(M,te){return M.name&&te.unshift(M),te},Z="#",ae=ze("#",!1),ce=";",fe=ze(";",!1),le=function(M,te,de){return{type:M,name:te,comment:de}},Ee="[",pe=ze("[",!1),Ce="]",Ie=ze("]",!1),we=function(M,te,de,me){return{type:M,size:te,name:de,comment:me}},Te=function(M,te,de,me){return{type:M,vals:te,name:de,comment:me}},He=",",Le=ze(",",!1),j=function(M,te){return te.unshift(M),te},q="int",re=ze("int",!1),$="uint",ue=ze("uint",!1),L="short",D=ze("short",!1),ee="ushort",oe=ze("ushort",!1),De="byte",ye=ze("byte",!1),xe="ubyte",ke=ze("ubyte",!1),dt="float",Xt=ze("float",!1),It="char",$e=ze("char",!1),kt="string",Ot=ze("string",!1),et="lstring",zt=ze("lstring",!1),_="enum",m=ze("enum",!1),w="double",N=ze("double",!1),x="bigint",z=ze("bigint",!1),V="set",se=ze("set",!1),G=function(M,te){return M+" "+te},Y=/^[a-zA-Z_]/,T=ht([["a","z"],["A","Z"],"_"],!1,!1),ne=/^[a-zA-Z0-9_]/,_e=ht([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),g=function(M){return ft()},K=/^[^\n\r]/,J=ht([`
|
|
629
|
-
`,"\r"],!0,!1),
|
|
630
|
-
`,"\r"],!1,!1),U=0,Me=0,lt=[{line:1,column:1}],tt=0,Tt=[],
|
|
653
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function xw(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Rd=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=Ta(s),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(b){e={error:b}}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(xt(u))try{u()}catch(b){i=b instanceof _d?b.errors:[b]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var d=Ta(f),h=d.next();!h.done;h=d.next()){var p=h.value;try{Aw(p)}catch(b){i=i??[],b instanceof _d?i=kd(kd([],Bd(i)),Bd(b.errors)):i.push(b)}}}catch(b){r={error:b}}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)Aw(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)&&xw(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&xw(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();Rd.EMPTY;function vw(t){return t instanceof Rd||t&&"closed"in t&&xt(t.remove)&&xt(t.add)&&xt(t.unsubscribe)}function Aw(t){xt(t)?t():t.unsubscribe()}var aF={Promise:void 0},cF={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,kd([t,e],Bd(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Ew(t){cF.setTimeout(function(){throw t})}function Sw(){}function lF(t){t()}var Fd=function(t){Dd(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,vw(n)&&n.add(r)):r.destination=hF,r}return e.create=function(n,r,o){return new Ql(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}(Rd),uF=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){Zl(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Zl(r)}else Zl(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Zl(n)}},t}(),Ql=function(t){Dd(e,t);function e(n,r,o){var i=t.call(this)||this,s;return xt(n)||!n?s={next:n??void 0,error:r??void 0,complete:o??void 0}:s=n,i.destination=new uF(s),i}return e}(Fd);function Zl(t){Ew(t)}function fF(t){throw t}var hF={closed:!0,next:Sw,error:fF,complete:Sw},Md=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Cw(t){return t}function dF(t){return t.length===0?Cw:t.length===1?t[0]:function(n){return t.reduce(function(r,o){return o(r)},n)}}var pn=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=gF(e)?e:new Ql(e,n,r);return lF(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=Iw(n),new n(function(o,i){var s=new Ql({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[Md]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return dF(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Iw(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 Iw(t){var e;return(e=t??aF.Promise)!==null&&e!==void 0?e:Promise}function pF(t){return t&&xt(t.next)&&xt(t.error)&&xt(t.complete)}function gF(t){return t&&t instanceof Fd||pF(t)&&vw(t)}function mF(t){return xt(t==null?void 0:t.lift)}function Eo(t){return function(e){if(mF(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 Da(t,e,n,r,o){return new bF(t,e,n,r,o)}var bF=function(t){Dd(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}(Fd),yF=new pn(function(t){return t.complete()});function wF(t){return t&&xt(t.schedule)}function Tw(t){return t[t.length-1]}function xF(t){return wF(Tw(t))?t.pop():void 0}function vF(t,e){return typeof Tw(t)=="number"?t.pop():e}var Dw=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Bw(t){return xt(t==null?void 0:t.then)}function kw(t){return xt(t[Md])}function _w(t){return Symbol.asyncIterator&&xt(t==null?void 0:t[Symbol.asyncIterator])}function Rw(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 AF(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Fw=AF();function Mw(t){return xt(t==null?void 0:t[Fw])}function Pw(t){return oF(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,Ao(n.read())];case 3:return r=s.sent(),o=r.value,i=r.done,i?[4,Ao(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Ao(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 Lw(t){return xt(t==null?void 0:t.getReader)}function So(t){if(t instanceof pn)return t;if(t!=null){if(kw(t))return EF(t);if(Dw(t))return SF(t);if(Bw(t))return CF(t);if(_w(t))return Ow(t);if(Mw(t))return IF(t);if(Lw(t))return TF(t)}throw Rw(t)}function EF(t){return new pn(function(e){var n=t[Md]();if(xt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function SF(t){return new pn(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function CF(t){return new pn(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Ew)})}function IF(t){return new pn(function(e){var n,r;try{for(var o=Ta(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 Ow(t){return new pn(function(e){DF(t,e).catch(function(n){return e.error(n)})})}function TF(t){return Ow(Pw(t))}function DF(t,e){var n,r,o,i;return iF(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=sF(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 Ii(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 Nw(t,e){return e===void 0&&(e=0),Eo(function(n,r){n.subscribe(Da(r,function(o){return Ii(r,t,function(){return r.next(o)},e)},function(){return Ii(r,t,function(){return r.complete()},e)},function(o){return Ii(r,t,function(){return r.error(o)},e)}))})}function zw(t,e){return e===void 0&&(e=0),Eo(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function BF(t,e){return So(t).pipe(zw(e),Nw(e))}function kF(t,e){return So(t).pipe(zw(e),Nw(e))}function _F(t,e){return new pn(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function RF(t,e){return new pn(function(n){var r;return Ii(n,e,function(){r=t[Fw](),Ii(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 xt(r==null?void 0:r.return)&&r.return()}})}function Uw(t,e){if(!t)throw new Error("Iterable cannot be null");return new pn(function(n){Ii(n,e,function(){var r=t[Symbol.asyncIterator]();Ii(n,e,function(){r.next().then(function(o){o.done?n.complete():n.next(o.value)})},0,!0)})})}function FF(t,e){return Uw(Pw(t),e)}function MF(t,e){if(t!=null){if(kw(t))return BF(t,e);if(Dw(t))return _F(t,e);if(Bw(t))return kF(t,e);if(_w(t))return Uw(t,e);if(Mw(t))return RF(t,e);if(Lw(t))return FF(t,e)}throw Rw(t)}function PF(t,e){return e?MF(t,e):So(t)}var LF=ww(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Gw(t,e){return new Promise(function(n,r){var o=new Ql({next:function(i){n(i),o.unsubscribe()},error:r,complete:function(){r(new LF)}});t.subscribe(o)})}function Hw(t,e){return Eo(function(n,r){var o=0;n.subscribe(Da(r,function(i){r.next(t.call(e,i,o++))}))})}function OF(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(b){return l<r?p(b):c.push(b)},p=function(b){l++;var v=!1;So(n(b,u++)).subscribe(Da(e,function(y){e.next(y)},function(){v=!0},void 0,function(){if(v)try{l--;for(var y=function(){var A=c.shift();s||p(A)};c.length&&l<r;)y();d()}catch(A){e.error(A)}}))};return t.subscribe(Da(e,h,function(){f=!0,d()})),function(){}}function Vw(t,e,n){return n===void 0&&(n=1/0),xt(e)?Vw(function(r,o){return Hw(function(i,s){return e(r,i,o,s)})(So(t(r,o)))},n):(typeof e=="number"&&(n=e),Eo(function(r,o){return OF(r,o,t,n)}))}function NF(t){return t===void 0&&(t=1/0),Vw(Cw,t)}function zF(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=xF(t),r=vF(t,1/0),o=t;return o.length?o.length===1?So(o[0]):NF(r)(PF(o,n)):yF}function UF(t,e,n,r,o){return function(i,s){var a=n,c=e,l=0;i.subscribe(Da(s,function(u){var f=l++;c=a?t(c,u,f):(a=!0,u)},function(){a&&s.next(c),s.complete()}))}}function qw(t,e){return Eo(UF(t,e,arguments.length>=2,!1,!0))}var GF=function(t,e){return t.push(e),t};function HF(){return Eo(function(t,e){qw(GF,[])(t).subscribe(e)})}const jw=-2003829722,Pd=-2021002517;class Ww{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 b=a.getUint16(c,!0);c+=2;const v=a.getUint16(c,!0);c+=2;const y=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 M=a.getUint32(c,!0);c+=4;const F=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:M,reserved:F,dataOffset:C,indexOffset:Y})}const _=l===Pd?"bigbed":"bigwig";if(y>n||A>n-8*5)return this._getMainHeader(e,n*2);let B;if(A){const N=o.subarray(Number(A));let M=0;const F=new DataView(N.buffer,N.byteOffset,N.length),C=Number(F.getBigUint64(M,!0));M+=8;const Y=F.getFloat64(M,!0);M+=8;const Q=F.getFloat64(M,!0);M+=8;const se=F.getFloat64(M,!0);M+=8;const oe=F.getFloat64(M,!0);M+=8,B={scoreMin:Y,scoreMax:Q,scoreSum:se,scoreSumSquares:oe,basesCovered:C}}else throw new Error("no stats");return{zoomLevels:I,magic:l,extHeaderOffset:E,numZoomLevels:f,fieldCount:b,totalSummary:B,definedFieldCount:v,uncompressBufSize:S,asOffset:y,chromTreeOffset:d,totalSummaryOffset:A,unzoomedDataOffset:h,unzoomedIndexOffset:p,fileType:_,version:u,isBigEndian:i,autoSql:y?o.subarray(y,o.indexOf(0,y)).toString():""}}_isBigEndian(e){let n=e.readInt32LE(0);if(n===jw||n===Pd)return!1;if(n=e.readInt32BE(0),n===jw||n===Pd)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 b=32,v=async y=>{let A=y;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 M={name:_,id:B,length:N};s[this.renameRefSeqs(_)]=B,i[B]=M}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(b),{refsByName:s,refsByNumber:i}}async getUnzoomedView(e){const{unzoomedIndexOffset:n,refsByName:r,uncompressBufSize:o,isBigEndian:i,fileType:s}=await this.getHeader(e);return new bw(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 pn(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 Gw(i.pipe(HF()))).flat()}}class VF extends Ww{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 bw(this.bbi,o,u.indexOffset,i,s>0,"summary")}return this.getUnzoomedView(n)}}function qF(t){return t.filter(e=>!!e)}class jF extends Ww{constructor(){super(...arguments),this.readIndicesCache=new Ei({cache:new zl({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 b=0;b<l;b+=1){const v=h.subarray(b*f),y=new DataView(v.buffer,v.byteOffset,v.length);let A=0;const S=y.getInt16(A,i);A+=2;const E=y.getInt16(A,i);A+=2;const I=Number(y.getBigUint64(A,i));A+=12;const _=y.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 b=d.getInt32(h,u);h+=4;const v=d.getInt32(h,u);h+=4,h+=8;const y=async S=>{const E=Number(S),I=4+p*(b+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 M=0;const F=N.getInt8(M);M+=2;const C=N.getInt16(M,u);M+=2;const Y=[];if(F===0){const Q=[];for(let oe=0;oe<C;oe++){const ae=B.subarray(M,M+b).toString().replaceAll("\0","");M+=b;const ce=Number(N.getBigUint64(M,u));M+=8,Q.push({key:ae,offset:ce})}let se=0;for(const{key:oe,offset:ae}of Q){if(e.localeCompare(oe)<0&&se)return y(se);se=ae}return y(se)}else if(F===1){for(let Q=0;Q<C;Q++){const se=B.subarray(M,M+b).toString().replaceAll("\0","");M+=b;const oe=Number(N.getBigUint64(M,u));M+=8;const ae=N.getUint32(M,u);M+=4;const ce=N.getUint32(M,u);M+=4,Y.push({key:se,offset:oe,length:ae,reserved:ce})}for(const Q of Y)if(Q.key===e)return{...Q,field:c};return}};return y(a+32)});return qF(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 pn(c=>{o.readFeatures(c,[a],n).catch(l=>{c.error(l)})}).pipe(qw((c,l)=>c.concat(l)),Hw(c=>{for(const l of c)l.field=a.field;return c})));return(await Gw(zF(...i))).filter(a=>{var c;return((c=a.rest)===null||c===void 0?void 0:c.split(" ")[(a.field||0)-3])===e})}}const Yw=Object.freeze(Object.defineProperty({__proto__:null,BigBed:jF,BigWig:VF},Symbol.toStringTag,{value:"Module"}));var Ld,Qw;function WF(){if(Qw)return Ld;Qw=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,b;for(p=0;p<d.length;p++)h[p]=l(d[p]);if(h.sort(),h.length>0){for(p=1,b=1;p<h.length;p++)h[p-1]!==h[p]&&(h[b]=h[p],b++);h.length=b}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:nv},a=nv,c="(",l=Ne("(",!1),u=")",f=Ne(")",!1),d=function(P,ne,pe,be){return{type:P,name:ne,comment:pe,fields:be}},h="simple",p=Ne("simple",!1),b="object",v=Ne("object",!1),y="table",A=Ne("table",!1),S="auto",E=Ne("auto",!1),I="primary",_=Ne("primary",!1),B="index",N=Ne("index",!1),M="unique",F=Ne("unique",!1),C=function(P,ne){return ne},Y=function(P,ne){return P.name&&ne.unshift(P),ne},Q="#",se=Ne("#",!1),oe=";",ae=Ne(";",!1),ce=function(P,ne,pe){return{type:P,name:ne,comment:pe}},ye="[",he=Ne("[",!1),De="]",we=Ne("]",!1),Ee=function(P,ne,pe,be){return{type:P,size:ne,name:pe,comment:be}},Ie=function(P,ne,pe,be){return{type:P,vals:ne,name:pe,comment:be}},Ge=",",Ve=Ne(",",!1),q=function(P,ne){return ne.unshift(P),ne},j="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),Ae="ubyte",Re=Ne("ubyte",!1),dt="float",$t=Ne("float",!1),It="char",$e=Ne("char",!1),Rt="string",Nt=Ne("string",!1),et="lstring",zt=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([`
|
|
654
|
+
`,"\r"],!0,!1),R=function(P){return P.join("").replace(/^"/,"").replace(/"$/,"")},H=on("integer"),Z=/^[0-9]/,Ce=ht([["0","9"]],!1,!1),me=function(){return parseInt(ft(),10)},xe=on("whitespace"),Ue=/^[ \t\n\r]/,bn=ht([" "," ",`
|
|
655
|
+
`,"\r"],!1,!1),U=0,Me=0,lt=[{line:1,column:1}],tt=0,Tt=[],ke=0,ar;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,pe){return{type:"class",parts:P,inverted:ne,ignoreCase:pe}}function Bn(){return{type:"end"}}function on(P){return{type:"other",description:P}}function $a(P){var ne=lt[P],pe;if(ne)return ne;for(pe=P-1;!lt[pe];)pe--;for(ne=lt[pe],ne={line:ne.line,column:ne.column};pe<P;)r.charCodeAt(pe)===10?(ne.line++,ne.column=1):ne.column++,pe++;return lt[P]=ne,ne}function tv(P,ne){var pe=$a(P),be=$a(ne);return{start:{offset:P,line:pe.line,column:pe.column},end:{offset:ne,line:be.line,column:be.column}}}function Le(P){U<tt||(U>tt&&(tt=U,Tt=[]),Tt.push(P))}function Z9(P,ne,pe){return new e(e.buildMessage(P,ne),P,ne,pe)}function nv(){var P,ne,pe,be,Fe,rt,ut,yn,jr,cr,Wr,lr,Yr,ur;return P=U,ne=qe(),ne!==i?(pe=rv(),pe!==i?(be=qe(),be!==i?(Fe=iv(),Fe!==i?(rt=qe(),rt!==i?(ut=fu(),ut!==i?(yn=qe(),yn!==i?(r.charCodeAt(U)===40?(jr=c,U++):(jr=i,ke===0&&Le(l)),jr!==i?(cr=qe(),cr!==i?(Wr=X9(),Wr!==i?(lr=qe(),lr!==i?(r.charCodeAt(U)===41?(Yr=u,U++):(Yr=i,ke===0&&Le(f)),Yr!==i?(ur=qe(),ur!==i?(Me=P,ne=d(pe,Fe,ut,Wr),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)===b?(P=b,U+=6):(P=i,ke===0&&Le(v)),P===i&&(r.substr(U,5)===y?(P=y,U+=5):(P=i,ke===0&&Le(A)))),P}function iv(){var P,ne,pe,be;return P=kn(),P===i&&(P=U,ne=kn(),ne!==i?(pe=ov(),pe!==i?(ne=[ne,pe],P=ne):(U=P,P=i)):(U=P,P=i),P===i&&(P=U,ne=kn(),ne!==i?(r.substr(U,4)===S?(pe=S,U+=4):(pe=i,ke===0&&Le(E)),pe!==i?(ne=[ne,pe],P=ne):(U=P,P=i)):(U=P,P=i),P===i&&(P=U,ne=kn(),ne!==i?(pe=ov(),pe!==i?(r.substr(U,4)===S?(be=S,U+=4):(be=i,ke===0&&Le(E)),be!==i?(ne=[ne,pe,be],P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)))),P}function ov(){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)===M?(P=M,U+=6):(P=i,ke===0&&Le(F)))),P}function fu(){var P;return P=sv(),P===i&&(P=qe()),P}function X9(){var P,ne,pe,be,Fe,rt,ut;if(P=U,ne=f0(),ne!==i)if(pe=qe(),pe!==i){for(be=[],Fe=U,rt=qe(),rt!==i?(ut=f0(),ut!==i?(Me=Fe,rt=C(ne,ut),Fe=rt):(U=Fe,Fe=i)):(U=Fe,Fe=i);Fe!==i;)be.push(Fe),Fe=U,rt=qe(),rt!==i?(ut=f0(),ut!==i?(Me=Fe,rt=C(ne,ut),Fe=rt):(U=Fe,Fe=i)):(U=Fe,Fe=i);be!==i?(Fe=qe(),Fe!==i?(Me=P,ne=Y(ne,be),P=ne):(U=P,P=i)):(U=P,P=i)}else U=P,P=i;else U=P,P=i;return P}function K9(){var P;return r.charCodeAt(U)===35?(P=Q,U++):(P=i,ke===0&&Le(se)),P}function J9(){var P,ne,pe,be,Fe;return P=U,ne=qe(),ne!==i?(pe=K9(),pe!==i?(be=sv(),be!==i?(Fe=qe(),Fe!==i?(ne=[ne,pe,be,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,pe,be,Fe,rt,ut,yn,jr,cr,Wr,lr,Yr,ur;return P=U,ne=h0(),ne!==i?(pe=qe(),pe!==i?(be=kn(),be!==i?(Fe=qe(),Fe!==i?(r.charCodeAt(U)===59?(rt=oe,U++):(rt=i,ke===0&&Le(ae)),rt!==i?(ut=qe(),ut!==i?(yn=fu(),yn!==i?(Me=P,ne=ce(ne,be,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=h0(),ne!==i?(pe=qe(),pe!==i?(r.charCodeAt(U)===91?(be=ye,U++):(be=i,ke===0&&Le(he)),be!==i?(Fe=qe(),Fe!==i?(rt=eM(),rt!==i?(ut=qe(),ut!==i?(r.charCodeAt(U)===93?(yn=De,U++):(yn=i,ke===0&&Le(we)),yn!==i?(jr=qe(),jr!==i?(cr=kn(),cr!==i?(Wr=qe(),Wr!==i?(r.charCodeAt(U)===59?(lr=oe,U++):(lr=i,ke===0&&Le(ae)),lr!==i?(Yr=qe(),Yr!==i?(ur=fu(),ur!==i?(Me=P,ne=Ee(ne,rt,cr,ur),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=h0(),ne!==i?(pe=qe(),pe!==i?(r.charCodeAt(U)===40?(be=c,U++):(be=i,ke===0&&Le(l)),be!==i?(Fe=qe(),Fe!==i?(rt=$9(),rt!==i?(ut=qe(),ut!==i?(r.charCodeAt(U)===41?(yn=u,U++):(yn=i,ke===0&&Le(f)),yn!==i?(jr=qe(),jr!==i?(cr=kn(),cr!==i?(Wr=qe(),Wr!==i?(r.charCodeAt(U)===59?(lr=oe,U++):(lr=i,ke===0&&Le(ae)),lr!==i?(Yr=qe(),Yr!==i?(ur=fu(),ur!==i?(Me=P,ne=Ie(ne,rt,cr,ur),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=J9()))),P}function $9(){var P,ne,pe,be,Fe,rt,ut;if(P=U,ne=kn(),ne!==i){for(pe=[],be=U,r.charCodeAt(U)===44?(Fe=Ge,U++):(Fe=i,ke===0&&Le(Ve)),Fe!==i?(rt=qe(),rt!==i?(ut=kn(),ut!==i?(Me=be,Fe=C(ne,ut),be=Fe):(U=be,be=i)):(U=be,be=i)):(U=be,be=i);be!==i;)pe.push(be),be=U,r.charCodeAt(U)===44?(Fe=Ge,U++):(Fe=i,ke===0&&Le(Ve)),Fe!==i?(rt=qe(),rt!==i?(ut=kn(),ut!==i?(Me=be,Fe=C(ne,ut),be=Fe):(U=be,be=i)):(U=be,be=i)):(U=be,be=i);pe!==i?(Me=P,ne=q(ne,pe),P=ne):(U=P,P=i)}else U=P,P=i;return P}function h0(){var P,ne,pe,be;return r.substr(U,3)===j?(P=j,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)===Ae?(P=Ae,U+=5):(P=i,ke===0&&Le(Re)),P===i&&(r.substr(U,5)===dt?(P=dt,U+=5):(P=i,ke===0&&Le($t)),P===i&&(r.substr(U,4)===It?(P=It,U+=4):(P=i,ke===0&&Le($e)),P===i&&(r.substr(U,6)===Rt?(P=Rt,U+=6):(P=i,ke===0&&Le(Nt)),P===i&&(r.substr(U,7)===et?(P=et,U+=7):(P=i,ke===0&&Le(zt)),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?(pe=qe(),pe!==i?(be=iv(),be!==i?(Me=P,ne=G(ne,be),P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i))))))))))))))),P}function eM(){var P;return P=tM(),P===i&&(P=kn()),P}function kn(){var P,ne,pe,be,Fe;if(P=U,ne=U,X.test(r.charAt(U))?(pe=r.charAt(U),U++):(pe=i,ke===0&&Le(T)),pe!==i){for(be=[],re.test(r.charAt(U))?(Fe=r.charAt(U),U++):(Fe=i,ke===0&&Le(_e));Fe!==i;)be.push(Fe),re.test(r.charAt(U))?(Fe=r.charAt(U),U++):(Fe=i,ke===0&&Le(_e));be!==i?(pe=[pe,be],ne=pe):(U=ne,ne=i)}else U=ne,ne=i;return ne!==i&&(Me=P,ne=g()),P=ne,P}function sv(){var P,ne,pe;for(P=U,ne=[],K.test(r.charAt(U))?(pe=r.charAt(U),U++):(pe=i,ke===0&&Le($));pe!==i;)ne.push(pe),K.test(r.charAt(U))?(pe=r.charAt(U),U++):(pe=i,ke===0&&Le($));return ne!==i&&(Me=P,ne=R(ne)),P=ne,P}function tM(){var P,ne,pe,be;if(ke++,P=U,ne=qe(),ne!==i){if(pe=[],Z.test(r.charAt(U))?(be=r.charAt(U),U++):(be=i,ke===0&&Le(Ce)),be!==i)for(;be!==i;)pe.push(be),Z.test(r.charAt(U))?(be=r.charAt(U),U++):(be=i,ke===0&&Le(Ce));else pe=i;pe!==i?(Me=P,ne=me(),P=ne):(U=P,P=i)}else U=P,P=i;return ke--,P===i&&(ne=i,ke===0&&Le(H)),P}function qe(){var P,ne;for(ke++,P=[],Ue.test(r.charAt(U))?(ne=r.charAt(U),U++):(ne=i,ke===0&&Le(bn));ne!==i;)P.push(ne),Ue.test(r.charAt(U))?(ne=r.charAt(U),U++):(ne=i,ke===0&&Le(bn));return ke--,P===i&&(ne=i,ke===0&&Le(xe)),P}if(ar=a(),ar!==i&&U===r.length)return ar;throw ar!==i&&U<r.length&&Le(Bn()),Z9(Tt,tt<r.length?r.charAt(tt):null,tt<r.length?tv(tt,tt+1):tv(tt,tt))}return Ld={SyntaxError:e,parse:n},Ld}var Zw=WF();const YF=Ml(Zw),Od=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
|
|
631
656
|
"bigChain pairwise alignment"
|
|
632
657
|
(
|
|
633
658
|
string chrom; "Reference sequence chromosome or scaffold"
|
|
@@ -786,20 +811,20 @@ chrM 16299`};function nD(t){if(!(t in Eb))throw new Error(`Unknown assembly: ${t
|
|
|
786
811
|
float score; "Floating point score."
|
|
787
812
|
char[1] leftStatus; "Gap/break annotation for preceding block"
|
|
788
813
|
char[1] rightStatus; "Gap/break annotation for following block"
|
|
789
|
-
)`},Symbol.toStringTag,{value:"Module"}))).map(([t,e])=>[t,_w.parse(e.trim())]));function Ed(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 CF={".":0,"-":-1,"+":1};function IF(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 TF{constructor(e={}){if(e.autoSql)this.autoSql=Ed(SF.parse(e.autoSql));else if(e.type){if(!Ad[e.type])throw new Error("Type not found");this.autoSql=Ed(Ad[e.type])}else this.autoSql=Ed(Ad.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&&IF(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:h,name:d}=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(),h&&(l=l.map(Number)));s[d]=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=CF[s.strand]||0,s.chrom=decodeURIComponent(s.chrom),s}}const DF=Object.freeze(Object.defineProperty({__proto__:null,default:TF},Symbol.toStringTag,{value:"Module"}));let kw=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 bo(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new kw(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 Sd=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 BF(t){return new Promise(e=>setTimeout(e,t))}function _F(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 kF(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function RF(t={}){return"aborted"in t?{signal:t}:t}function Rw(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):kF(r,o)?o.maxv.compareTo(r.maxv)>0&&(r.maxv=o.maxv):(n.push(o),r=o));return n}function Fw(t,e){return{lineCount:Cl.fromBytesLE(Array.prototype.slice.call(t,e,e+8),!0).toNumber()}}function Ol(t,e){return t?t.compareTo(e)>0?e:t:e}function FF(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 Mw=class{constructor({filehandle:e,renameRefSeq:n=r=>r}){this.filehandle=e,this.renameRefSeq=n}};const MF=21578050;function PF(t,e){return t-t%e}function LF(t,e){return t-t%e+e}function NF(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 yo extends Mw{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)!==MF)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 h={};for(let y=0;y<u;y+=1){const v=n.readUInt32LE(s);if(s+=4,v===i+1)s+=4,f=Fw(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 C=0;C<b;C++){const E=bo(n,s);s+=8;const I=bo(n,s);s+=8,a=Ol(a,E),A[C]=new Sd(E,I,v)}h[v]=A}}}const d=n.readInt32LE(s);s+=4;const p=new Array(d);for(let y=0;y<d;y++){const v=bo(n,s);s+=8,a=Ol(a,v),p[y]=v}c[l]={binIndex:h,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:LF(r,16384),h=n===void 0?0:PF(n,16384),d=s?new Array((f-h)/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[h/16384].blockPosition;for(let v=h/16384,b=0;v<f/16384;v++,b++)d[b]={score:l[v+1].blockPosition-y,start:v*16384,end:v*16384+16384},y=l[v+1].blockPosition;return d.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=NF(n,r),c=[];for(const[d,p]of a)for(let y=d;y<=p;y++)if(s.binIndex[y]){const v=s.binIndex[y];for(const b of v)c.push(new Sd(b.minv,b.maxv,y))}const l=s.linearIndex.length;let u;const f=Math.min(n>>14,l-1),h=Math.min(r>>14,l-1);for(let d=f;d<=h;++d){const p=s.linearIndex[d];p&&(!u||p.compareTo(u)<0)&&(u=p)}return Rw(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 Cd=[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"&&(Cd=new Int32Array(Cd));const OF=(t,e)=>{let n=e===0?0:~~e^-1;for(let r=0;r<t.length;r++)n=Cd[(n^t[r])&255]^n>>>8;return n^-1},Pw=(t,e)=>Ke.Buffer.from(t,e);function zF(t,e){const n=(r,o)=>e(Pw(r),o)>>>0;return n.signed=(r,o)=>e(Pw(r),o),n.unsigned=n,n.model=t,n}const UF=zF("crc-32",OF),GF=21582659,HF=38359875;function VF(t,e){return t*2**e}function Lw(t,e){return Math.floor(t/2**e)}let zl=class extends Mw{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,...FF(e.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(e){const n=await this.filehandle.readFile(e),r=await Pr(n);let o;if(r.readUInt32LE(0)===GF)o=1;else if(r.readUInt32LE(0)===HF)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 h=r.readInt32LE(c);c+=4;const d={};let p;for(let y=0;y<h;y++){const v=r.readUInt32LE(c);if(c+=4,v>this.maxBinNumber)p=Fw(r,c+28),c+=44;else{l=Ol(l,bo(r,c)),c+=8;const b=r.readInt32LE(c);c+=4;const A=new Array(b);for(let C=0;C<b;C+=1){const E=bo(r,c);c+=8;const I=bo(r,c);c+=8,l=Ol(l,E),A[C]=new Sd(E,I,v)}d[v]=A}}u[f]={binIndex:d,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 h=s.binIndex[f];for(const d of h)c.push(d)}return Rw(c,new kw(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+=VF(1,r*3),r+=1){const a=o+Lw(e,i),c=o+Lw(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 dn={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},Nw="=ACMGRSVTWYHKDBN".split(""),ba="MIDNSHP=X???????".split("");class wo{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 h=e.readInt32LE(n),d=h>>4,p=ba[h&15];u.push(d+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 h=e.readUInt32LE(n),d=h>>4,p=ba[h&15];u.push(d+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&dn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&dn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&dn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&dn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&dn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&dn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&dn.BAM_FREAD1)}isRead2(){return!!(this.flags&dn.BAM_FREAD2)}isSecondary(){return!!(this.flags&dn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&dn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&dn.BAM_FDUP)}isSupplementary(){return!!(this.flags&dn.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=ba[o&15];if(s==="S"&&i===this.seq_length)return n+=4,o=this.byteArray.readInt32LE(n),i=o>>4,s=ba[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=ba[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(Nw[(c&240)>>4]),s++,s<o&&(i.push(Nw[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 Ul(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}})}Ul(wo,"tags"),Ul(wo,"cigarAndLength"),Ul(wo,"seq"),Ul(wo,"qual");function Ow(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 zw=21840194,Uw=65536;async function qF(t){let e=[];for await(const n of t)e=e.concat(n);return e}class jF{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 Gw{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:h=d=>d}){if(this.htsget=!1,this.featureCache=new wi({cache:new Tl({maxSize:50}),fill:async(d,p)=>{const{chunk:y,opts:v}=d,{data:b,cpositions:A,dpositions:C}=await this._readChunk({chunk:y,opts:{...v,signal:p}});return this.readBamFeatures(b,A,C,y)}}),this.renameRefSeq=h,e)this.bam=e;else if(n)this.bam=new Ct(n);else if(r)this.bam=new En(r);else if(u)this.htsget=!0,this.bam=new jF;else throw new Error("unable to initialize bam");if(c)this.index=new zl({filehandle:c});else if(a)this.index=new zl({filehandle:new Ct(a)});else if(l)this.index=new zl({filehandle:new En(l)});else if(i)this.index=new yo({filehandle:i});else if(o)this.index=new yo({filehandle:new Ct(o)});else if(s)this.index=new yo({filehandle:new En(s)});else if(n)this.index=new yo({filehandle:new Ct(`${n}.bai`)});else if(r)this.index=new yo({filehandle:new En(`${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=RF(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+Uw,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 Pr(i);if(s.readInt32LE(0)!==zw)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,Ow(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+Uw,{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 Pr(s.subarray(0,Math.min(i,n))),c=a.readInt32LE(e);let l=e+4;const u={},f=[];for(let h=0;h<c;h+=1){const d=a.readInt32LE(l),p=this.renameRefSeq(a.toString("utf8",l+4,l+4+d-1)),y=a.readInt32LE(l+d+4);if(u[p]=h,f.push({refName:p,length:y}),l=l+8+d,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 qF(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 h of u)if(h.ref_id===n)if(h.start>=o){c=!0;break}else h.end>=r&&f.push(h);if(a.push(f),yield f,c)break}_F(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(h=>{const d={};for(const p of h){const y=p.name,v=p.id;d[y]||(d[y]=0),d[y]++,a[v]=1}for(const[p,y]of Object.entries(d))y===1&&(s[p]=!0)});const c=[];n.map(h=>{for(const d of h){const p=d.name,y=d.start,v=d.next_pos,b=d.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 h of u.flat())l.has(h.toString())||l.set(h.toString(),h);return(await Promise.all([...l.values()].map(async h=>{const{data:d,cpositions:p,dpositions:y,chunk:v}=await this._readChunk({chunk:h,opts:r}),b=[];for(const A of await this.readBamFeatures(d,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 K2(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 wo({bytes:{byteArray:e,start:i,end:u},fileOffset:n.length>0?n[a]*256+(i-r[a])+o.minv.dataPosition+1:UF.signed(e.slice(i,u))});s.push(f),this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime&&(await BF(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 Hw(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=>Pr(r))))}class WF extends Gw{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 Hw(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 Hw(o.htsget.urls,e);if(i.readInt32LE(0)!==zw)throw new Error("Not a BAM file");const s=i.readInt32LE(4),a=i.toString("utf8",8,8+s),c=Ow(a),l=[],u={},f=c.filter(h=>h.tag==="SQ");for(const[h,d]of f.entries()){let p="",y=0;for(const v of d.data)v.tag==="SN"?p=v.value:v.tag==="LN"&&(y=+v.value);u[p]=h,l[h]={refName:p,length:y}}return this.chrToIndex=u,this.indexToChr=l,c}}const QF=Object.freeze(Object.defineProperty({__proto__:null,BAI:yo,BamFile:Gw,BamRecord:wo,CSI:zl,HtsgetFile:WF},Symbol.toStringTag,{value:"Module"}));function Vw(t){if(t.greaterThan(Number.MAX_SAFE_INTEGER)||t.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return t.toNumber()}class YF extends Error{}function ya(t){if(t&&t.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const e=new YF("aborted");throw e.code="ERR_ABORTED",e}}}function ZF(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function qw(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):ZF(r,o)?o.maxv.compareTo(r.maxv)>0&&(r.maxv=o.maxv):(n.push(o),r=o))}),n)}class Id{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 xo(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Id(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 Gl{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 jw{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 XF=21578324,Ww=14;function KF(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 vo extends jw{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 Pr(n);if(ya(e.signal),r.readUInt32LE(0)!==XF)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,h=((1<<(f+1)*3)-1)/7,d=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 C=36+v,E;return{indices:new Array(o).fill(0).map(()=>{const R=r.readInt32LE(C);C+=4;const B={};let O;for(let S=0;S<R;S+=1){const Q=r.readUInt32LE(C);if(C+=4,Q>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(Q===h+1){const Z=r.readInt32LE(C);C+=4,Z===2&&(O=this.parsePseudoBin(r,C)),C+=16*Z}else{const Z=r.readInt32LE(C);C+=4;const ae=new Array(Z);for(let ce=0;ce<Z;ce+=1){const fe=xo(r,C),le=xo(r,C+8);C+=16,E=this._findFirstData(E,fe),ae[ce]=new Gl(fe,le,Q)}B[Q]=ae}}const F=r.readInt32LE(C);C+=4;const P=new Array(F);for(let S=0;S<F;S+=1)P[S]=xo(r,C),C+=8,E=this._findFirstData(E,P[S]);return{binIndex:B,linearIndex:P,stats:O}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:y,firstDataLine:E,columnNumbers:l,coordinateType:s,format:c,refIdToName:A,refNameToId:b,maxBlockSize:65536}}parsePseudoBin(e,n){return{lineCount:Vw(Cl.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>>Ww>=a.linearIndex.length?a.linearIndex.length-1:n>>Ww]:new Id(0,0))||console.warn("querying outside of possible tabix range");const l=KF(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 Gl(A.minv,A.maxv,b));const f=a.linearIndex.length;let h=null;const d=Math.min(n>>14,f-1),p=Math.min(r>>14,f-1);for(let y=d;y<=p;++y){const v=a.linearIndex[y];v&&(!h||v.compareTo(h)<0)&&(h=v)}return qw(u,h)}}const JF=21582659,$F=38359875;function e9(t,e){return t*2**e}function Qw(t,e){return Math.floor(t/2**e)}class Hl extends jw{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:h}=this._parseNameBytes(e.slice(n+28,n+28+u));return{refIdToName:f,refNameToId:h,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 Pr(await this.filehandle.readFile(e));let r;if(n.readUInt32LE(0)===JF)r=1;else if(n.readUInt32LE(0)===$F)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 h={};let d;for(let p=0;p<f;p+=1){const y=n.readUInt32LE(l);if(y>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=48;else{const v=xo(n,l+4);c=this._findFirstData(c,v);const b=n.readInt32LE(l+12);l+=16;const A=new Array(b);for(let C=0;C<b;C+=1){const E=xo(n,l),I=xo(n,l+8);l+=16,A[C]=new Gl(E,I,y)}h[y]=A}}return{binIndex:h,stats:d}});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:Vw(Cl.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 h=u;h<=f;h++)if(a.binIndex[h])for(const d of a.binIndex[h])l.push(new Gl(d.minv,d.maxv,h));return qw(l,new Id(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+=e9(1,r*3),r+=1){const a=o+Qw(e,i),c=o+Qw(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 t9(t){return/^[\u0000-\u007F]*$/.test(t)}const Ao=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;class n9{constructor({path:e,filehandle:n,url:r,tbiPath:o,tbiUrl:i,tbiFilehandle:s,csiPath:a,csiUrl:c,csiFilehandle:l,renameRefSeqs:u=h=>h,chunkCacheSize:f=5*2**20}){if(n)this.filehandle=n;else if(e)this.filehandle=new Ct(e);else if(r)this.filehandle=new En(r);else throw new TypeError("must provide either filehandle or path");if(s)this.index=new vo({filehandle:s,renameRefSeqs:u});else if(l)this.index=new Hl({filehandle:l,renameRefSeqs:u});else if(o)this.index=new vo({filehandle:new Ct(o),renameRefSeqs:u});else if(a)this.index=new Hl({filehandle:new Ct(a),renameRefSeqs:u});else if(e)this.index=new vo({filehandle:new Ct(`${e}.tbi`),renameRefSeqs:u});else if(c)this.index=new Hl({filehandle:new En(c)});else if(i)this.index=new vo({filehandle:new En(i)});else if(r)this.index=new vo({filehandle:new En(`${r}.tbi`)});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.renameRefSeq=u,this.chunkCache=new wi({cache:new Tl({maxSize:Math.floor(f/65536)}),fill:(h,d)=>this.readChunk(h,{signal:d})})}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);ya(a);const f=n??0,h=r??u.maxRefLength;if(!(f<=h))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(f===h)return;const d=await this.index.blocksForRange(e,f,h,c);ya(a);for(const p of d){const{buffer:y,cpositions:v,dpositions:b}=await this.chunkCache.get(p.toString(),p,a);ya(a);let A=0,C=0;const E=(i=Ao==null?void 0:Ao.decode(y))!==null&&i!==void 0?i:y.toString(),I=y.length<5e8&&t9(E);for(;A<E.length;){let R,B;if(I){if(B=E.indexOf(`
|
|
790
|
-
`,A),B===-1)break;
|
|
791
|
-
`,A),B===-1)break;const P=y.slice(A,B);R=(s=Ao==null?void 0:Ao.decode(P))!==null&&s!==void 0?s:P.toString()}if(b){for(;A+p.minv.dataPosition>=b[C++];);C--}const{startCoordinate:O,overlaps:F}=this.checkLine(u,e,f,h,R);if(F)l(R,v[C]*256+(A-b[C])+p.minv.dataPosition+1);else if(O!==void 0&&O>=h)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);ya(e.signal);const i=((n==null?void 0:n.blockPosition)||0)+o,s=await this._readRegion(0,i,e),a=await Pr(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:h}=s;u||(u=0),f||(f=0),h||(h=0),l==="VCF"&&(h=8);const d=Math.max(u,f,h);let p=1,y=0,v="",b=-1/0;const A=i.length;for(let C=0;C<A+1;C++)if(i[C]===" "||C===A){if(p===u){if(this.renameRefSeq(i.slice(y,C))!==n)return{overlaps:!1}}else if(p===f){if(b=parseInt(i.slice(y,C),10),c==="1-based-closed"&&(b-=1),b>=o)return{startCoordinate:b,overlaps:!1};if((h===0||h===f)&&b+1<=r)return{startCoordinate:b,overlaps:!1}}else if(l==="VCF"&&p===4)v=i.slice(y,C);else if(p===h&&(l==="VCF"?this._getVcfEnd(b,v,i.slice(y,C)):Number.parseInt(i.slice(y,C),10))<=r)return{overlaps:!1};if(y=C+1,p+=1,p>d)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 K2(r,e)}}const r9=Object.freeze(Object.defineProperty({__proto__:null,CSI:Hl,TBI:vo,TabixIndexedFile:n9},Symbol.toStringTag,{value:"Module"}));var Vl={exports:{}},Yw;function Td(){if(Yw)return Vl.exports;Yw=1;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(I,R,B){return Function.prototype.apply.call(I,R,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)}Vl.exports=i,Vl.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 R=[],B=1;B<arguments.length;B++)R.push(arguments[B]);var O=I==="error",F=this._events;if(F!==void 0)O=O&&F.error===void 0;else if(!O)return!1;if(O){var P;if(R.length>0&&(P=R[0]),P instanceof Error)throw P;var S=new Error("Unhandled error."+(P?" ("+P.message+")":""));throw S.context=P,S}var Q=F[I];if(Q===void 0)return!1;if(typeof Q=="function")e(Q,this,R);else for(var Z=Q.length,ae=p(Q,Z),B=0;B<Z;++B)e(ae[B],this,R);return!0};function l(E,I,R,B){var O,F,P;if(a(R),F=E._events,F===void 0?(F=E._events=Object.create(null),E._eventsCount=0):(F.newListener!==void 0&&(E.emit("newListener",I,R.listener?R.listener:R),F=E._events),P=F[I]),P===void 0)P=F[I]=R,++E._eventsCount;else if(typeof P=="function"?P=F[I]=B?[R,P]:[P,R]:B?P.unshift(R):P.push(R),O=c(E),O>0&&P.length>O&&!P.warned){P.warned=!0;var S=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(I)+" listeners added. Use emitter.setMaxListeners() to increase limit");S.name="MaxListenersExceededWarning",S.emitter=E,S.type=I,S.count=P.length,r(S)}return E}i.prototype.addListener=function(I,R){return l(this,I,R,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(I,R){return l(this,I,R,!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,R){var B={fired:!1,wrapFn:void 0,target:E,type:I,listener:R},O=u.bind(B);return O.listener=R,B.wrapFn=O,O}i.prototype.once=function(I,R){return a(R),this.on(I,f(this,I,R)),this},i.prototype.prependOnceListener=function(I,R){return a(R),this.prependListener(I,f(this,I,R)),this},i.prototype.removeListener=function(I,R){var B,O,F,P,S;if(a(R),O=this._events,O===void 0)return this;if(B=O[I],B===void 0)return this;if(B===R||B.listener===R)--this._eventsCount===0?this._events=Object.create(null):(delete O[I],O.removeListener&&this.emit("removeListener",I,B.listener||R));else if(typeof B!="function"){for(F=-1,P=B.length-1;P>=0;P--)if(B[P]===R||B[P].listener===R){S=B[P].listener,F=P;break}if(F<0)return this;F===0?B.shift():y(B,F),B.length===1&&(O[I]=B[0]),O.removeListener!==void 0&&this.emit("removeListener",I,S||R)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(I){var R,B,O;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),P;for(O=0;O<F.length;++O)P=F[O],P!=="removeListener"&&this.removeAllListeners(P);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(R=B[I],typeof R=="function")this.removeListener(I,R);else if(R!==void 0)for(O=R.length-1;O>=0;O--)this.removeListener(I,R[O]);return this};function h(E,I,R){var B=E._events;if(B===void 0)return[];var O=B[I];return O===void 0?[]:typeof O=="function"?R?[O.listener||O]:[O]:R?v(O):p(O,O.length)}i.prototype.listeners=function(I){return h(this,I,!0)},i.prototype.rawListeners=function(I){return h(this,I,!1)},i.listenerCount=function(E,I){return typeof E.listenerCount=="function"?E.listenerCount(I):d.call(E,I)},i.prototype.listenerCount=d;function d(E){var I=this._events;if(I!==void 0){var R=I[E];if(typeof R=="function")return 1;if(R!==void 0)return R.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function p(E,I){for(var R=new Array(I),B=0;B<I;++B)R[B]=E[B];return R}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),R=0;R<I.length;++R)I[R]=E[R].listener||E[R];return I}function b(E,I){return new Promise(function(R,B){function O(P){E.removeListener(I,F),B(P)}function F(){typeof E.removeListener=="function"&&E.removeListener("error",O),R([].slice.call(arguments))}C(E,I,F,{once:!0}),I!=="error"&&A(E,O,{once:!0})})}function A(E,I,R){typeof E.on=="function"&&C(E,"error",I,R)}function C(E,I,R,B){if(typeof E.on=="function")B.once?E.once(I,R):E.on(I,R);else if(typeof E.addEventListener=="function")E.addEventListener(I,function O(F){B.once&&E.removeEventListener(I,O),R(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E)}return Vl.exports}var ql={exports:{}},Zw;function Eo(){return Zw||(Zw=1,typeof Object.create=="function"?ql.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ql.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}}),ql.exports}var Dd,Xw;function Kw(){return Xw||(Xw=1,Dd=Td().EventEmitter),Dd}const Jw=j_(Z_);var Bd,$w;function i9(){if($w)return Bd;$w=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=ua(),l=c.Buffer,u=Jw,f=u.inspect,h=f&&f.custom||"inspect";function d(p,y,v){l.prototype.copy.call(p,y,v)}return Bd=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,C=0;A;)d(A.data,b,C),C+=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,C=b.data;for(v-=C.length;b=b.next;){var E=b.data,I=v>E.length?E.length:v;if(I===E.length?C+=E:C+=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,C}},{key:"_getBuffer",value:function(v){var b=l.allocUnsafe(v),A=this.head,C=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?(++C,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=E.slice(I));break}++C}return this.length-=C,b}},{key:h,value:function(v,b){return f(this,e(e({},b),{},{depth:0,customInspect:!1}))}}]),p}(),Bd}var _d,ex;function tx(){if(ex)return _d;ex=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 _d={destroy:t,undestroy:r,errorOrDestroy:i},_d}var kd={},nx;function So(){if(nx)return kd;nx=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(h,d,p){return typeof c=="string"?c:c(h,d,p)}var f=function(h){t(d,h);function d(p,y,v){return h.call(this,u(p,y,v))||this}return d}(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 h=s(a,".")?"property":"argument";f='The "'.concat(a,'" ').concat(h," ").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"),kd.codes=e,kd}var Rd,rx;function ix(){if(rx)return Rd;rx=1;var t=So().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 Rd={getHighWaterMark:n},Rd}var Fd,ox;function o9(){if(ox)return Fd;ox=1,Fd=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 Fd}var Md,sx;function ax(){if(sx)return Md;sx=1,Md=O;function t(j){var q=this;this.next=null,this.entry=null,this.finish=function(){Le(q,j)}}var e;O.WritableState=R;var n={deprecate:o9()},r=Kw(),o=ua().Buffer,i=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(j){return o.from(j)}function a(j){return o.isBuffer(j)||j instanceof i}var c=tx(),l=ix(),u=l.getHighWaterMark,f=So().codes,h=f.ERR_INVALID_ARG_TYPE,d=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,C=f.ERR_UNKNOWN_ENCODING,E=c.errorOrDestroy;Eo()(O,r);function I(){}function R(j,q,re){e=e||Co(),j=j||{},typeof re!="boolean"&&(re=q instanceof e),this.objectMode=!!j.objectMode,re&&(this.objectMode=this.objectMode||!!j.writableObjectMode),this.highWaterMark=u(this,j,"writableHighWaterMark",re),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var $=j.decodeStrings===!1;this.decodeStrings=!$,this.defaultEncoding=j.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ue){fe(q,ue)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=j.emitClose!==!1,this.autoDestroy=!!j.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}R.prototype.getBuffer=function(){for(var q=this.bufferedRequest,re=[];q;)re.push(q),q=q.next;return re},function(){try{Object.defineProperty(R.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(O,Symbol.hasInstance,{value:function(q){return B.call(this,q)?!0:this!==O?!1:q&&q._writableState instanceof R}})):B=function(q){return q instanceof this};function O(j){e=e||Co();var q=this instanceof e;if(!q&&!B.call(O,this))return new O(j);this._writableState=new R(j,this,q),this.writable=!0,j&&(typeof j.write=="function"&&(this._write=j.write),typeof j.writev=="function"&&(this._writev=j.writev),typeof j.destroy=="function"&&(this._destroy=j.destroy),typeof j.final=="function"&&(this._final=j.final)),r.call(this)}O.prototype.pipe=function(){E(this,new y)};function F(j,q){var re=new A;E(j,re),process.nextTick(q,re)}function P(j,q,re,$){var ue;return re===null?ue=new b:typeof re!="string"&&!q.objectMode&&(ue=new h("chunk",["string","Buffer"],re)),ue?(E(j,ue),process.nextTick($,ue),!1):!0}O.prototype.write=function(j,q,re){var $=this._writableState,ue=!1,L=!$.objectMode&&a(j);return L&&!o.isBuffer(j)&&(j=s(j)),typeof q=="function"&&(re=q,q=null),L?q="buffer":q||(q=$.defaultEncoding),typeof re!="function"&&(re=I),$.ending?F(this,re):(L||P(this,$,j,re))&&($.pendingcb++,ue=Q(this,$,L,j,q,re)),ue},O.prototype.cork=function(){this._writableState.corked++},O.prototype.uncork=function(){var j=this._writableState;j.corked&&(j.corked--,!j.writing&&!j.corked&&!j.bufferProcessing&&j.bufferedRequest&&pe(this,j))},O.prototype.setDefaultEncoding=function(q){if(typeof q=="string"&&(q=q.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((q+"").toLowerCase())>-1))throw new C(q);return this._writableState.defaultEncoding=q,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function S(j,q,re){return!j.objectMode&&j.decodeStrings!==!1&&typeof q=="string"&&(q=o.from(q,re)),q}Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Q(j,q,re,$,ue,L){if(!re){var D=S(q,$,ue);$!==D&&(re=!0,ue="buffer",$=D)}var ee=q.objectMode?1:$.length;q.length+=ee;var oe=q.length<q.highWaterMark;if(oe||(q.needDrain=!0),q.writing||q.corked){var De=q.lastBufferedRequest;q.lastBufferedRequest={chunk:$,encoding:ue,isBuf:re,callback:L,next:null},De?De.next=q.lastBufferedRequest:q.bufferedRequest=q.lastBufferedRequest,q.bufferedRequestCount+=1}else Z(j,q,!1,ee,$,ue,L);return oe}function Z(j,q,re,$,ue,L,D){q.writelen=$,q.writecb=D,q.writing=!0,q.sync=!0,q.destroyed?q.onwrite(new v("write")):re?j._writev(ue,q.onwrite):j._write(ue,L,q.onwrite),q.sync=!1}function ae(j,q,re,$,ue){--q.pendingcb,re?(process.nextTick(ue,$),process.nextTick(Te,j,q),j._writableState.errorEmitted=!0,E(j,$)):(ue($),j._writableState.errorEmitted=!0,E(j,$),Te(j,q))}function ce(j){j.writing=!1,j.writecb=null,j.length-=j.writelen,j.writelen=0}function fe(j,q){var re=j._writableState,$=re.sync,ue=re.writecb;if(typeof ue!="function")throw new p;if(ce(re),q)ae(j,re,$,q,ue);else{var L=Ce(re)||j.destroyed;!L&&!re.corked&&!re.bufferProcessing&&re.bufferedRequest&&pe(j,re),$?process.nextTick(le,j,re,L,ue):le(j,re,L,ue)}}function le(j,q,re,$){re||Ee(j,q),q.pendingcb--,$(),Te(j,q)}function Ee(j,q){q.length===0&&q.needDrain&&(q.needDrain=!1,j.emit("drain"))}function pe(j,q){q.bufferProcessing=!0;var re=q.bufferedRequest;if(j._writev&&re&&re.next){var $=q.bufferedRequestCount,ue=new Array($),L=q.corkedRequestsFree;L.entry=re;for(var D=0,ee=!0;re;)ue[D]=re,re.isBuf||(ee=!1),re=re.next,D+=1;ue.allBuffers=ee,Z(j,q,!0,q.length,ue,"",L.finish),q.pendingcb++,q.lastBufferedRequest=null,L.next?(q.corkedRequestsFree=L.next,L.next=null):q.corkedRequestsFree=new t(q),q.bufferedRequestCount=0}else{for(;re;){var oe=re.chunk,De=re.encoding,ye=re.callback,xe=q.objectMode?1:oe.length;if(Z(j,q,!1,xe,oe,De,ye),re=re.next,q.bufferedRequestCount--,q.writing)break}re===null&&(q.lastBufferedRequest=null)}q.bufferedRequest=re,q.bufferProcessing=!1}O.prototype._write=function(j,q,re){re(new d("_write()"))},O.prototype._writev=null,O.prototype.end=function(j,q,re){var $=this._writableState;return typeof j=="function"?(re=j,j=null,q=null):typeof q=="function"&&(re=q,q=null),j!=null&&this.write(j,q),$.corked&&($.corked=1,this.uncork()),$.ending||He(this,$,re),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ce(j){return j.ending&&j.length===0&&j.bufferedRequest===null&&!j.finished&&!j.writing}function Ie(j,q){j._final(function(re){q.pendingcb--,re&&E(j,re),q.prefinished=!0,j.emit("prefinish"),Te(j,q)})}function we(j,q){!q.prefinished&&!q.finalCalled&&(typeof j._final=="function"&&!q.destroyed?(q.pendingcb++,q.finalCalled=!0,process.nextTick(Ie,j,q)):(q.prefinished=!0,j.emit("prefinish")))}function Te(j,q){var re=Ce(q);if(re&&(we(j,q),q.pendingcb===0&&(q.finished=!0,j.emit("finish"),q.autoDestroy))){var $=j._readableState;(!$||$.autoDestroy&&$.endEmitted)&&j.destroy()}return re}function He(j,q,re){q.ending=!0,Te(j,q),re&&(q.finished?process.nextTick(re):j.once("finish",re)),q.ended=!0,j.writable=!1}function Le(j,q,re){var $=j.entry;for(j.entry=null;$;){var ue=$.callback;q.pendingcb--,ue(re),$=$.next}q.corkedRequestsFree.next=j}return Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(q){this._writableState&&(this._writableState.destroyed=q)}}),O.prototype.destroy=c.destroy,O.prototype._undestroy=c.undestroy,O.prototype._destroy=function(j,q){q(j)},Md}var Pd,cx;function Co(){if(cx)return Pd;cx=1;var t=Object.keys||function(l){var u=[];for(var f in l)u.push(f);return u};Pd=s;var e=gx(),n=ax();Eo()(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)}}),Pd}var Ld={},jl={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var lx;function s9(){return lx||(lx=1,function(t,e){var n=ua(),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)}}(jl,jl.exports)),jl.exports}var ux;function Nd(){if(ux)return Ld;ux=1;var t=s9().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}Ld.StringDecoder=o;function o(b){this.encoding=r(b);var A;switch(this.encoding){case"utf16le":this.text=f,this.end=h,A=4;break;case"utf8":this.fillLast=c,A=4;break;case"base64":this.text=d,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,C;if(this.lastNeed){if(A=this.fillLast(b),A===void 0)return"";C=this.lastNeed,this.lastNeed=0}else C=0;return C<b.length?A?A+this.text(b,C):this.text(b,C):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,C){var E=A.length-1;if(E<C)return 0;var I=i(A[E]);return I>=0?(I>0&&(b.lastNeed=I-1),I):--E<C||I===-2?0:(I=i(A[E]),I>=0?(I>0&&(b.lastNeed=I-2),I):--E<C||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,C){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,C=a(this,b);if(C!==void 0)return C;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 C=s(this,b,A);if(!this.lastNeed)return b.toString("utf8",A);this.lastTotal=C;var E=b.length-(C-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 C=b.toString("utf16le",A);if(C){var E=C.charCodeAt(C.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],C.slice(0,-1)}return C}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",A,b.length-1)}function h(b){var A=b&&b.length?this.write(b):"";if(this.lastNeed){var C=this.lastTotal-this.lastNeed;return A+this.lastChar.toString("utf16le",0,C)}return A}function d(b,A){var C=(b.length-A)%3;return C===0?b.toString("base64",A):(this.lastNeed=3-C,this.lastTotal=3,C===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-C))}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 Ld}var Od,fx;function zd(){if(fx)return Od;fx=1;var t=So().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||h()},f=i._writableState&&i._writableState.finished,h=function(){l=!1,f=!0,c||a.call(i)},d=i._readableState&&i._readableState.endEmitted,p=function(){c=!1,d=!0,l||a.call(i)},y=function(C){a.call(i,C)},v=function(){var C;if(c&&!d)return(!i._readableState||!i._readableState.ended)&&(C=new t),a.call(i,C);if(l&&!f)return(!i._writableState||!i._writableState.ended)&&(C=new t),a.call(i,C)},b=function(){i.req.on("finish",h)};return r(i)?(i.on("complete",h),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",h),s.error!==!1&&i.on("error",y),i.on("close",v),function(){i.removeListener("complete",h),i.removeListener("abort",v),i.removeListener("request",b),i.req&&i.req.removeListener("finish",h),i.removeListener("end",u),i.removeListener("close",u),i.removeListener("finish",h),i.removeListener("end",p),i.removeListener("error",y),i.removeListener("close",v)}}return Od=o,Od}var Ud,hx;function a9(){if(hx)return Ud;hx=1;var t;function e(C,E,I){return E=n(E),E in C?Object.defineProperty(C,E,{value:I,enumerable:!0,configurable:!0,writable:!0}):C[E]=I,C}function n(C){var E=r(C,"string");return typeof E=="symbol"?E:String(E)}function r(C,E){if(typeof C!="object"||C===null)return C;var I=C[Symbol.toPrimitive];if(I!==void 0){var R=I.call(C,E);if(typeof R!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(E==="string"?String:Number)(C)}var o=zd(),i=Symbol("lastResolve"),s=Symbol("lastReject"),a=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function h(C,E){return{value:C,done:E}}function d(C){var E=C[i];if(E!==null){var I=C[f].read();I!==null&&(C[l]=null,C[i]=null,C[s]=null,E(h(I,!1)))}}function p(C){process.nextTick(d,C)}function y(C,E){return function(I,R){C.then(function(){if(E[c]){I(h(void 0,!0));return}E[u](I,R)},R)}}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(h(void 0,!0));if(this[f].destroyed)return new Promise(function(F,P){process.nextTick(function(){E[a]?P(E[a]):F(h(void 0,!0))})});var R=this[l],B;if(R)B=new Promise(y(R,this));else{var O=this[f].read();if(O!==null)return Promise.resolve(h(O,!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,R){E[f].destroy(null,function(B){if(B){R(B);return}I(h(void 0,!0))})})}),t),v),A=function(E){var I,R=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(O,F){var P=R[f].read();P?(R[l]=null,R[i]=null,R[s]=null,O(h(P,!1))):(R[i]=O,R[s]=F)},writable:!0}),I));return R[l]=null,o(E,function(B){if(B&&B.code!=="ERR_STREAM_PREMATURE_CLOSE"){var O=R[s];O!==null&&(R[l]=null,R[i]=null,R[s]=null,O(B)),R[a]=B;return}var F=R[i];F!==null&&(R[l]=null,R[i]=null,R[s]=null,F(h(void 0,!0))),R[c]=!0}),E.on("readable",p.bind(null,R)),R};return Ud=A,Ud}var Gd,dx;function c9(){return dx||(dx=1,Gd=function(){throw new Error("Readable.from is not available in the browser")}),Gd}var Hd,px;function gx(){if(px)return Hd;px=1,Hd=F;var t;F.ReadableState=O,Td().EventEmitter;var e=function(D,ee){return D.listeners(ee).length},n=Kw(),r=ua().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=Jw,c;a&&a.debuglog?c=a.debuglog("stream"):c=function(){};var l=i9(),u=tx(),f=ix(),h=f.getHighWaterMark,d=So().codes,p=d.ERR_INVALID_ARG_TYPE,y=d.ERR_STREAM_PUSH_AFTER_EOF,v=d.ERR_METHOD_NOT_IMPLEMENTED,b=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A,C,E;Eo()(F,n);var I=u.errorOrDestroy,R=["error","close","destroy","pause","resume"];function B(L,D,ee){if(typeof L.prependListener=="function")return L.prependListener(D,ee);!L._events||!L._events[D]?L.on(D,ee):Array.isArray(L._events[D])?L._events[D].unshift(ee):L._events[D]=[ee,L._events[D]]}function O(L,D,ee){t=t||Co(),L=L||{},typeof ee!="boolean"&&(ee=D instanceof t),this.objectMode=!!L.objectMode,ee&&(this.objectMode=this.objectMode||!!L.readableObjectMode),this.highWaterMark=h(this,L,"readableHighWaterMark",ee),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=Nd().StringDecoder),this.decoder=new A(L.encoding),this.encoding=L.encoding)}function F(L){if(t=t||Co(),!(this instanceof F))return new F(L);var D=this instanceof t;this._readableState=new O(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 ee=this._readableState,oe;return ee.objectMode?oe=!0:typeof L=="string"&&(D=D||ee.defaultEncoding,D!==ee.encoding&&(L=r.from(L,D),D=""),oe=!0),P(this,L,D,!1,oe)},F.prototype.unshift=function(L){return P(this,L,null,!0,!1)};function P(L,D,ee,oe,De){c("readableAddChunk",D);var ye=L._readableState;if(D===null)ye.reading=!1,fe(L,ye);else{var xe;if(De||(xe=Q(ye,D)),xe)I(L,xe);else if(ye.objectMode||D&&D.length>0)if(typeof D!="string"&&!ye.objectMode&&Object.getPrototypeOf(D)!==r.prototype&&(D=i(D)),oe)ye.endEmitted?I(L,new b):S(L,ye,D,!0);else if(ye.ended)I(L,new y);else{if(ye.destroyed)return!1;ye.reading=!1,ye.decoder&&!ee?(D=ye.decoder.write(D),ye.objectMode||D.length!==0?S(L,ye,D,!1):pe(L,ye)):S(L,ye,D,!1)}else oe||(ye.reading=!1,pe(L,ye))}return!ye.ended&&(ye.length<ye.highWaterMark||ye.length===0)}function S(L,D,ee,oe){D.flowing&&D.length===0&&!D.sync?(D.awaitDrain=0,L.emit("data",ee)):(D.length+=D.objectMode?1:ee.length,oe?D.buffer.unshift(ee):D.buffer.push(ee),D.needReadable&&le(L)),pe(L,D)}function Q(L,D){var ee;return!s(D)&&typeof D!="string"&&D!==void 0&&!L.objectMode&&(ee=new p("chunk",["string","Buffer","Uint8Array"],D)),ee}F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(L){A||(A=Nd().StringDecoder);var D=new A(L);this._readableState.decoder=D,this._readableState.encoding=this._readableState.decoder.encoding;for(var ee=this._readableState.buffer.head,oe="";ee!==null;)oe+=D.write(ee.data),ee=ee.next;return this._readableState.buffer.clear(),oe!==""&&this._readableState.buffer.push(oe),this._readableState.length=oe.length,this};var Z=1073741824;function ae(L){return L>=Z?L=Z:(L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++),L}function ce(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=ae(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,ee=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?re(this):le(this),null;if(L=ce(L,D),L===0&&D.ended)return D.length===0&&re(this),null;var oe=D.needReadable;c("need readable",oe),(D.length===0||D.length-L<D.highWaterMark)&&(oe=!0,c("length less than watermark",oe)),D.ended||D.reading?(oe=!1,c("reading or ended",oe)):oe&&(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=ce(ee,D)));var De;return L>0?De=q(L,D):De=null,De===null?(D.needReadable=D.length<=D.highWaterMark,L=0):(D.length-=L,D.awaitDrain=0),D.length===0&&(D.ended||(D.needReadable=!0),ee!==L&&D.ended&&re(this)),De!==null&&this.emit("data",De),De};function fe(L,D){if(c("onEofChunk"),!D.ended){if(D.decoder){var ee=D.decoder.end();ee&&ee.length&&(D.buffer.push(ee),D.length+=D.objectMode?1:ee.length)}D.ended=!0,D.sync?le(L):(D.needReadable=!1,D.emittedReadable||(D.emittedReadable=!0,Ee(L)))}}function le(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(Ee,L))}function Ee(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,j(L)}function pe(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 ee=D.length;if(c("maybeReadMore read 0"),L.read(0),ee===D.length)break}D.readingMore=!1}F.prototype._read=function(L){I(this,new v("_read()"))},F.prototype.pipe=function(L,D){var ee=this,oe=this._readableState;switch(oe.pipesCount){case 0:oe.pipes=L;break;case 1:oe.pipes=[oe.pipes,L];break;default:oe.pipes.push(L);break}oe.pipesCount+=1,c("pipe count=%d opts=%j",oe.pipesCount,D);var De=(!D||D.end!==!1)&&L!==process.stdout&&L!==process.stderr,ye=De?ke:zt;oe.endEmitted?process.nextTick(ye):ee.once("end",ye),L.on("unpipe",xe);function xe(_,m){c("onunpipe"),_===ee&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,It())}function ke(){c("onend"),L.end()}var dt=Ie(ee);L.on("drain",dt);var Xt=!1;function It(){c("cleanup"),L.removeListener("close",Ot),L.removeListener("finish",et),L.removeListener("drain",dt),L.removeListener("error",kt),L.removeListener("unpipe",xe),ee.removeListener("end",ke),ee.removeListener("end",zt),ee.removeListener("data",$e),Xt=!0,oe.awaitDrain&&(!L._writableState||L._writableState.needDrain)&&dt()}ee.on("data",$e);function $e(_){c("ondata");var m=L.write(_);c("dest.write",m),m===!1&&((oe.pipesCount===1&&oe.pipes===L||oe.pipesCount>1&&ue(oe.pipes,L)!==-1)&&!Xt&&(c("false write response, pause",oe.awaitDrain),oe.awaitDrain++),ee.pause())}function kt(_){c("onerror",_),zt(),L.removeListener("error",kt),e(L,"error")===0&&I(L,_)}B(L,"error",kt);function Ot(){L.removeListener("finish",et),zt()}L.once("close",Ot);function et(){c("onfinish"),L.removeListener("close",Ot),zt()}L.once("finish",et);function zt(){c("unpipe"),ee.unpipe(L)}return L.emit("pipe",ee),oe.flowing||(c("pipe resume"),ee.resume()),L};function Ie(L){return function(){var ee=L._readableState;c("pipeOnDrain",ee.awaitDrain),ee.awaitDrain&&ee.awaitDrain--,ee.awaitDrain===0&&e(L,"data")&&(ee.flowing=!0,j(L))}}F.prototype.unpipe=function(L){var D=this._readableState,ee={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,ee),this);if(!L){var oe=D.pipes,De=D.pipesCount;D.pipes=null,D.pipesCount=0,D.flowing=!1;for(var ye=0;ye<De;ye++)oe[ye].emit("unpipe",this,{hasUnpiped:!1});return this}var xe=ue(D.pipes,L);return xe===-1?this:(D.pipes.splice(xe,1),D.pipesCount-=1,D.pipesCount===1&&(D.pipes=D.pipes[0]),L.emit("unpipe",this,ee),this)},F.prototype.on=function(L,D){var ee=n.prototype.on.call(this,L,D),oe=this._readableState;return L==="data"?(oe.readableListening=this.listenerCount("readable")>0,oe.flowing!==!1&&this.resume()):L==="readable"&&!oe.endEmitted&&!oe.readableListening&&(oe.readableListening=oe.needReadable=!0,oe.flowing=!1,oe.emittedReadable=!1,c("on readable",oe.length,oe.reading),oe.length?le(this):oe.reading||process.nextTick(Te,this)),ee},F.prototype.addListener=F.prototype.on,F.prototype.removeListener=function(L,D){var ee=n.prototype.removeListener.call(this,L,D);return L==="readable"&&process.nextTick(we,this),ee},F.prototype.removeAllListeners=function(L){var D=n.prototype.removeAllListeners.apply(this,arguments);return(L==="readable"||L===void 0)&&process.nextTick(we,this),D};function we(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 Te(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,He(this,L)),L.paused=!1,this};function He(L,D){D.resumeScheduled||(D.resumeScheduled=!0,process.nextTick(Le,L,D))}function Le(L,D){c("resume",D.reading),D.reading||L.read(0),D.resumeScheduled=!1,L.emit("resume"),j(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 j(L){var D=L._readableState;for(c("flow",D.flowing);D.flowing&&L.read()!==null;);}F.prototype.wrap=function(L){var D=this,ee=this._readableState,oe=!1;L.on("end",function(){if(c("wrapped end"),ee.decoder&&!ee.ended){var xe=ee.decoder.end();xe&&xe.length&&D.push(xe)}D.push(null)}),L.on("data",function(xe){if(c("wrapped data"),ee.decoder&&(xe=ee.decoder.write(xe)),!(ee.objectMode&&xe==null)&&!(!ee.objectMode&&(!xe||!xe.length))){var ke=D.push(xe);ke||(oe=!0,L.pause())}});for(var De in L)this[De]===void 0&&typeof L[De]=="function"&&(this[De]=function(ke){return function(){return L[ke].apply(L,arguments)}}(De));for(var ye=0;ye<R.length;ye++)L.on(R[ye],this.emit.bind(this,R[ye]));return this._read=function(xe){c("wrapped _read",xe),oe&&(oe=!1,L.resume())},this},typeof Symbol=="function"&&(F.prototype[Symbol.asyncIterator]=function(){return C===void 0&&(C=a9()),C(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=q,Object.defineProperty(F.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function q(L,D){if(D.length===0)return null;var ee;return D.objectMode?ee=D.buffer.shift():!L||L>=D.length?(D.decoder?ee=D.buffer.join(""):D.buffer.length===1?ee=D.buffer.first():ee=D.buffer.concat(D.length),D.buffer.clear()):ee=D.buffer.consume(L,D.decoder),ee}function re(L){var D=L._readableState;c("endReadable",D.endEmitted),D.endEmitted||(D.ended=!0,process.nextTick($,D,L))}function $(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 ee=D._writableState;(!ee||ee.autoDestroy&&ee.finished)&&D.destroy()}}typeof Symbol=="function"&&(F.from=function(L,D){return E===void 0&&(E=c9()),E(F,L,D)});function ue(L,D){for(var ee=0,oe=L.length;ee<oe;ee++)if(L[ee]===D)return ee;return-1}return Hd}var Vd,mx;function bx(){if(mx)return Vd;mx=1,Vd=a;var t=So().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=Co();Eo()(a,i);function s(u,f){var h=this._transformState;h.transforming=!1;var d=h.writecb;if(d===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),d(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,h){l(u,f,h)}):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,h){h(new e("_transform()"))},a.prototype._write=function(u,f,h){var d=this._transformState;if(d.writecb=h,d.writechunk=u,d.writeencoding=f,!d.transforming){var p=this._readableState;(d.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(h){f(h)})};function l(u,f,h){if(f)return u.emit("error",f);if(h!=null&&u.push(h),u._writableState.length)throw new o;if(u._transformState.transforming)throw new r;return u.push(null)}return Vd}var qd,yx;function l9(){if(yx)return qd;yx=1,qd=e;var t=bx();Eo()(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)},qd}var jd,wx;function u9(){if(wx)return jd;wx=1;var t;function e(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=So().codes,r=n.ERR_MISSING_ARGS,o=n.ERR_STREAM_DESTROYED;function i(h){if(h)throw h}function s(h){return h.setHeader&&typeof h.abort=="function"}function a(h,d,p,y){y=e(y);var v=!1;h.on("close",function(){v=!0}),t===void 0&&(t=zd()),t(h,{readable:d,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(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();y(A||new o("pipe"))}}}function c(h){h()}function l(h,d){return h.pipe(d)}function u(h){return!h.length||typeof h[h.length-1]!="function"?i:h.pop()}function f(){for(var h=arguments.length,d=new Array(h),p=0;p<h;p++)d[p]=arguments[p];var y=u(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var v,b=d.map(function(A,C){var E=C<d.length-1,I=C>0;return a(A,E,I,function(R){v||(v=R),R&&b.forEach(c),!E&&(b.forEach(c),y(v))})});return d.reduce(l)}return jd=f,jd}var Wd,xx;function f9(){if(xx)return Wd;xx=1,Wd=n;var t=Td().EventEmitter,e=Eo();e(n,t),n.Readable=gx(),n.Writable=ax(),n.Duplex=Co(),n.Transform=bx(),n.PassThrough=l9(),n.finished=zd(),n.pipeline=u9(),n.Stream=n;function n(){t.call(this)}return n.prototype.pipe=function(r,o){var i=this;function s(d){r.writable&&r.write(d)===!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(d){if(h(),t.listenerCount(this,"error")===0)throw d}i.on("error",f),r.on("error",f);function h(){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",h),i.removeListener("close",h),r.removeListener("close",h)}return i.on("end",h),i.on("close",h),r.on("close",h),r.emit("pipe",i),r},Wd}var vx=f9(),h9=Nd();function wa(t){return t.replace(/%([0-9A-Fa-f]{2})/g,(e,n)=>String.fromCharCode(parseInt(n,16)))}function Ax(t,e){return String(e).replace(t,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function xa(t){return Ax(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,t)}function nr(t){return Ax(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,t)}function Ex(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(wa))}),e}function Sx(t){const e=t.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:e[0]&&wa(e[0]),source:e[1]&&wa(e[1]),type:e[2]&&wa(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:Ex(e[8])}}function Cx(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 Ix(t){const e=[];return Object.entries(t).forEach(([n,r])=>{if(!r)return;let o;r.hasOwnProperty("toString")?o=xa(r.toString()):Array.isArray(r)?o=r.map(xa).join(","):o=xa(r),e.push(`${xa(n)}=${o}`)}),e.length?e.join(";"):"."}function d9(t,e){const n=t.attributes===null||t.attributes===void 0?".":Ix(t.attributes),o=`${[t.seq_id===null?".":nr(t.seq_id),t.source===null?".":nr(t.source),t.type===null?".":nr(t.type),t.start===null?".":nr(t.start),t.end===null?".":nr(t.end),t.score===null?".":nr(t.score),t.strand===null?".":nr(t.strand),t.phase===null?".":nr(t.phase),n].join(" ")}
|
|
792
|
-
`;return e[o]?"":(e[o]=!0,o)}function
|
|
793
|
-
`,e}function
|
|
794
|
-
`}function
|
|
814
|
+
)`},Symbol.toStringTag,{value:"Module"}))).map(([t,e])=>[t,Zw.parse(e.trim())]));function Nd(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 QF={".":0,"-":-1,"+":1};function ZF(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 XF{constructor(e={}){if(e.autoSql)this.autoSql=Nd(YF.parse(e.autoSql));else if(e.type){if(!Od[e.type])throw new Error("Type not found");this.autoSql=Nd(Od[e.type])}else this.autoSql=Nd(Od.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&&ZF(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=QF[s.strand]||0,s.chrom=decodeURIComponent(s.chrom),s}}const KF=Object.freeze(Object.defineProperty({__proto__:null,default:XF},Symbol.toStringTag,{value:"Module"}));let Xw=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 Co(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Xw(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 zd=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 JF(t){return new Promise(e=>setTimeout(e,t))}function $F(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 e9(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function t9(t={}){return"aborted"in t?{signal:t}:t}function Kw(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):e9(r,o)?o.maxv.compareTo(r.maxv)>0&&(r.maxv=o.maxv):(n.push(o),r=o));return n}function Jw(t,e){return{lineCount:Ol.fromBytesLE(Array.prototype.slice.call(t,e,e+8),!0).toNumber()}}function Xl(t,e){return t?t.compareTo(e)>0?e:t:e}function n9(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 $w=class{constructor({filehandle:e,renameRefSeq:n=r=>r}){this.filehandle=e,this.renameRefSeq=n}};const r9=21578050;function i9(t,e){return t-t%e}function o9(t,e){return t-t%e+e}function s9(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 Io extends $w{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)!==r9)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 b=0;b<u;b+=1){const v=n.readUInt32LE(s);if(s+=4,v===i+1)s+=4,f=Jw(n,s+16),s+=32;else{if(v>i+1)throw new Error("bai index contains too many bins, please use CSI");{const y=n.readInt32LE(s);s+=4;const A=new Array(y);for(let S=0;S<y;S++){const E=Co(n,s);s+=8;const I=Co(n,s);s+=8,a=Xl(a,E),A[S]=new zd(E,I,v)}d[v]=A}}}const h=n.readInt32LE(s);s+=4;const p=new Array(h);for(let b=0;b<h;b++){const v=Co(n,s);s+=8,a=Xl(a,v),p[b]=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:o9(r,16384),d=n===void 0?0:i9(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 b=l[d/16384].blockPosition;for(let v=d/16384,y=0;v<f/16384;v++,y++)h[y]={score:l[v+1].blockPosition-b,start:v*16384,end:v*16384+16384},b=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=s9(n,r),c=[];for(const[h,p]of a)for(let b=h;b<=p;b++)if(s.binIndex[b]){const v=s.binIndex[b];for(const y of v)c.push(new zd(y.minv,y.maxv,b))}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 Kw(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 Ud=[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"&&(Ud=new Int32Array(Ud));const a9=(t,e)=>{let n=e===0?0:~~e^-1;for(let r=0;r<t.length;r++)n=Ud[(n^t[r])&255]^n>>>8;return n^-1},ex=(t,e)=>Ke.Buffer.from(t,e);function c9(t,e){const n=(r,o)=>e(ex(r),o)>>>0;return n.signed=(r,o)=>e(ex(r),o),n.unsigned=n,n.model=t,n}const l9=c9("crc-32",a9),u9=21582659,f9=38359875;function h9(t,e){return t*2**e}function tx(t,e){return Math.floor(t/2**e)}let Kl=class extends $w{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,...n9(e.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(e){const n=await this.filehandle.readFile(e),r=await Or(n);let o;if(r.readUInt32LE(0)===u9)o=1;else if(r.readUInt32LE(0)===f9)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 b=0;b<d;b++){const v=r.readUInt32LE(c);if(c+=4,v>this.maxBinNumber)p=Jw(r,c+28),c+=44;else{l=Xl(l,Co(r,c)),c+=8;const y=r.readInt32LE(c);c+=4;const A=new Array(y);for(let S=0;S<y;S+=1){const E=Co(r,c);c+=8;const I=Co(r,c);c+=8,l=Xl(l,E),A[S]=new zd(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 Kw(c,new Xw(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+=h9(1,r*3),r+=1){const a=o+tx(e,i),c=o+tx(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 gn={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},nx="=ACMGRSVTWYHKDBN".split(""),Ba="MIDNSHP=X???????".split("");class To{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=Ba[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=Ba[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&gn.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&gn.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&gn.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&gn.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&gn.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&gn.BAM_FMREVERSE)}isRead1(){return!!(this.flags&gn.BAM_FREAD1)}isRead2(){return!!(this.flags&gn.BAM_FREAD2)}isSecondary(){return!!(this.flags&gn.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&gn.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&gn.BAM_FDUP)}isSupplementary(){return!!(this.flags&gn.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=Ba[o&15];if(s==="S"&&i===this.seq_length)return n+=4,o=this.byteArray.readInt32LE(n),i=o>>4,s=Ba[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=Ba[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(nx[(c&240)>>4]),s++,s<o&&(i.push(nx[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 Jl(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}})}Jl(To,"tags"),Jl(To,"cigarAndLength"),Jl(To,"seq"),Jl(To,"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 ix=21840194,ox=65536;async function d9(t){let e=[];for await(const n of t)e=e.concat(n);return e}class p9{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 sx{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 Ei({cache:new zl({maxSize:50}),fill:async(h,p)=>{const{chunk:b,opts:v}=h,{data:y,cpositions:A,dpositions:S}=await this._readChunk({chunk:b,opts:{...v,signal:p}});return this.readBamFeatures(y,A,S,b)}}),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 p9;else throw new Error("unable to initialize bam");if(c)this.index=new Kl({filehandle:c});else if(a)this.index=new Kl({filehandle:new Ct(a)});else if(l)this.index=new Kl({filehandle:new Cn(l)});else if(i)this.index=new Io({filehandle:i});else if(o)this.index=new Io({filehandle:new Ct(o)});else if(s)this.index=new Io({filehandle:new Cn(s)});else if(n)this.index=new Io({filehandle:new Ct(`${n}.bai`)});else if(r)this.index=new Io({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=t9(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+ox,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 Or(i);if(s.readInt32LE(0)!==ix)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+ox,{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 Or(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)),b=a.readInt32LE(l+h+4);if(u[p]=d,f.push({refName:p,length:b}),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 d9(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}$F(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 b=p.name,v=p.id;h[b]||(h[b]=0),h[b]++,a[v]=1}for(const[p,b]of Object.entries(h))b===1&&(s[p]=!0)});const c=[];n.map(d=>{for(const h of d){const p=h.name,b=h.start,v=h.next_pos,y=h.next_refid;this.index&&s[p]&&(o||y===e&&Math.abs(b-v)<i)&&c.push(this.index.blocksForRange(y,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:b,chunk:v}=await this._readChunk({chunk:d,opts:r}),y=[];for(const A of await this.readBamFeatures(h,p,b,v))s[A.name]&&!a[A.id]&&y.push(A);return y}))).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 m2(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 To({bytes:{byteArray:e,start:i,end:u},fileOffset:n.length>0?n[a]*256+(i-r[a])+o.minv.dataPosition+1:l9.signed(e.slice(i,u))});s.push(f),this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime&&(await JF(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 ax(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=>Or(r))))}class g9 extends sx{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 ax(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 ax(o.htsget.urls,e);if(i.readInt32LE(0)!==ix)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="",b=0;for(const v of h.data)v.tag==="SN"?p=v.value:v.tag==="LN"&&(b=+v.value);u[p]=d,l[d]={refName:p,length:b}}return this.chrToIndex=u,this.indexToChr=l,c}}const m9=Object.freeze(Object.defineProperty({__proto__:null,BAI:Io,BamFile:sx,BamRecord:To,CSI:Kl,HtsgetFile:g9},Symbol.toStringTag,{value:"Module"}));function cx(t){if(t.greaterThan(Number.MAX_SAFE_INTEGER)||t.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return t.toNumber()}class b9 extends Error{}function ka(t){if(t&&t.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const e=new b9("aborted");throw e.code="ERR_ABORTED",e}}}function y9(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function lx(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):y9(r,o)?o.maxv.compareTo(r.maxv)>0&&(r.maxv=o.maxv):(n.push(o),r=o))}),n)}class Gd{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 Do(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Gd(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 $l{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 ux{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 w9=21578324,fx=14;function x9(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 Bo extends ux{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 Or(n);if(ka(e.signal),r.readUInt32LE(0)!==w9)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,b=r.readInt32LE(28),v=r.readInt32LE(32),{refNameToId:y,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 se=new Array(Q);for(let oe=0;oe<Q;oe+=1){const ae=Do(r,S),ce=Do(r,S+8);S+=16,E=this._findFirstData(E,ae),se[oe]=new $l(ae,ce,Y)}B[Y]=se}}const M=r.readInt32LE(S);S+=4;const F=new Array(M);for(let C=0;C<M;C+=1)F[C]=Do(r,S),S+=8,E=this._findFirstData(E,F[C]);return{binIndex:B,linearIndex:F,stats:N}}),metaChar:p,maxBinNumber:d,maxRefLength:h,skipLines:b,firstDataLine:E,columnNumbers:l,coordinateType:s,format:c,refIdToName:A,refNameToId:y,maxBlockSize:65536}}parsePseudoBin(e,n){return{lineCount:cx(Ol.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>>fx>=a.linearIndex.length?a.linearIndex.length-1:n>>fx]:new Gd(0,0))||console.warn("querying outside of possible tabix range");const l=x9(n,r),u=[];for(const[b,v]of l)for(let y=b;y<=v;y++)if(a.binIndex[y])for(const A of a.binIndex[y])u.push(new $l(A.minv,A.maxv,y));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 b=h;b<=p;++b){const v=a.linearIndex[b];v&&(!d||v.compareTo(d)<0)&&(d=v)}return lx(u,d)}}const v9=21582659,A9=38359875;function E9(t,e){return t*2**e}function hx(t,e){return Math.floor(t/2**e)}class eu extends ux{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 Or(await this.filehandle.readFile(e));let r;if(n.readUInt32LE(0)===v9)r=1;else if(n.readUInt32LE(0)===A9)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 b=n.readUInt32LE(l);if(b>this.maxBinNumber)h=this.parsePseudoBin(n,l+4),l+=48;else{const v=Do(n,l+4);c=this._findFirstData(c,v);const y=n.readInt32LE(l+12);l+=16;const A=new Array(y);for(let S=0;S<y;S+=1){const E=Do(n,l),I=Do(n,l+8);l+=16,A[S]=new $l(E,I,b)}d[b]=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:cx(Ol.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 $l(h.minv,h.maxv,d));return lx(l,new Gd(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+=E9(1,r*3),r+=1){const a=o+hx(e,i),c=o+hx(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 S9(t){return/^[\u0000-\u007F]*$/.test(t)}const ko=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;class C9{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 Bo({filehandle:s,renameRefSeqs:u});else if(l)this.index=new eu({filehandle:l,renameRefSeqs:u});else if(o)this.index=new Bo({filehandle:new Ct(o),renameRefSeqs:u});else if(a)this.index=new eu({filehandle:new Ct(a),renameRefSeqs:u});else if(e)this.index=new Bo({filehandle:new Ct(`${e}.tbi`),renameRefSeqs:u});else if(c)this.index=new eu({filehandle:new Cn(c)});else if(i)this.index=new Bo({filehandle:new Cn(i)});else if(r)this.index=new Bo({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 Ei({cache:new zl({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);ka(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);ka(a);for(const p of h){const{buffer:b,cpositions:v,dpositions:y}=await this.chunkCache.get(p.toString(),p,a);ka(a);let A=0,S=0;const E=(i=ko==null?void 0:ko.decode(b))!==null&&i!==void 0?i:b.toString(),I=b.length<5e8&&S9(E);for(;A<E.length;){let _,B;if(I){if(B=E.indexOf(`
|
|
815
|
+
`,A),B===-1)break;_=E.slice(A,B)}else{if(B=b.indexOf(`
|
|
816
|
+
`,A),B===-1)break;const F=b.slice(A,B);_=(s=ko==null?void 0:ko.decode(F))!==null&&s!==void 0?s:F.toString()}if(y){for(;A+p.minv.dataPosition>=y[S++];);S--}const{startCoordinate:N,overlaps:M}=this.checkLine(u,e,f,d,_);if(M)l(_,v[S]*256+(A-y[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);ka(e.signal);const i=((n==null?void 0:n.blockPosition)||0)+o,s=await this._readRegion(0,i,e),a=await Or(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,b=0,v="",y=-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(b,S))!==n)return{overlaps:!1}}else if(p===f){if(y=parseInt(i.slice(b,S),10),c==="1-based-closed"&&(y-=1),y>=o)return{startCoordinate:y,overlaps:!1};if((d===0||d===f)&&y+1<=r)return{startCoordinate:y,overlaps:!1}}else if(l==="VCF"&&p===4)v=i.slice(b,S);else if(p===d&&(l==="VCF"?this._getVcfEnd(y,v,i.slice(b,S)):Number.parseInt(i.slice(b,S),10))<=r)return{overlaps:!1};if(b=S+1,p+=1,p>h)break}return{startCoordinate:y,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 m2(r,e)}}const I9=Object.freeze(Object.defineProperty({__proto__:null,CSI:eu,TBI:Bo,TabixIndexedFile:C9},Symbol.toStringTag,{value:"Module"}));var tu={exports:{}},dx;function Hd(){if(dx)return tu.exports;dx=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)}tu.exports=i,tu.exports.once=y,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",M=this._events;if(M!==void 0)N=N&&M.error===void 0;else if(!N)return!1;if(N){var F;if(_.length>0&&(F=_[0]),F instanceof Error)throw F;var C=new Error("Unhandled error."+(F?" ("+F.message+")":""));throw C.context=F,C}var Y=M[I];if(Y===void 0)return!1;if(typeof Y=="function")e(Y,this,_);else for(var Q=Y.length,se=p(Y,Q),B=0;B<Q;++B)e(se[B],this,_);return!0};function l(E,I,_,B){var N,M,F;if(a(_),M=E._events,M===void 0?(M=E._events=Object.create(null),E._eventsCount=0):(M.newListener!==void 0&&(E.emit("newListener",I,_.listener?_.listener:_),M=E._events),F=M[I]),F===void 0)F=M[I]=_,++E._eventsCount;else if(typeof F=="function"?F=M[I]=B?[_,F]:[F,_]:B?F.unshift(_):F.push(_),N=c(E),N>0&&F.length>N&&!F.warned){F.warned=!0;var C=new Error("Possible EventEmitter memory leak detected. "+F.length+" "+String(I)+" listeners added. Use emitter.setMaxListeners() to increase limit");C.name="MaxListenersExceededWarning",C.emitter=E,C.type=I,C.count=F.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,M,F,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(M=-1,F=B.length-1;F>=0;F--)if(B[F]===_||B[F].listener===_){C=B[F].listener,M=F;break}if(M<0)return this;M===0?B.shift():b(B,M),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 M=Object.keys(B),F;for(N=0;N<M.length;++N)F=M[N],F!=="removeListener"&&this.removeAllListeners(F);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 b(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 y(E,I){return new Promise(function(_,B){function N(F){E.removeListener(I,M),B(F)}function M(){typeof E.removeListener=="function"&&E.removeListener("error",N),_([].slice.call(arguments))}S(E,I,M,{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(M){B.once&&E.removeEventListener(I,N),_(M)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E)}return tu.exports}var nu={exports:{}},px;function _o(){return px||(px=1,typeof Object.create=="function"?nu.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:nu.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}}),nu.exports}var Vd,gx;function mx(){return gx||(gx=1,Vd=Hd().EventEmitter),Vd}const bx=p_(y_);var qd,yx;function T9(){if(yx)return qd;yx=1;function t(p,b){var v=Object.keys(p);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(p);b&&(y=y.filter(function(A){return Object.getOwnPropertyDescriptor(p,A).enumerable})),v.push.apply(v,y)}return v}function e(p){for(var b=1;b<arguments.length;b++){var v=arguments[b]!=null?arguments[b]:{};b%2?t(Object(v),!0).forEach(function(y){n(p,y,v[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(v)):t(Object(v)).forEach(function(y){Object.defineProperty(p,y,Object.getOwnPropertyDescriptor(v,y))})}return p}function n(p,b,v){return b=s(b),b in p?Object.defineProperty(p,b,{value:v,enumerable:!0,configurable:!0,writable:!0}):p[b]=v,p}function r(p,b){if(!(p instanceof b))throw new TypeError("Cannot call a class as a function")}function o(p,b){for(var v=0;v<b.length;v++){var y=b[v];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,s(y.key),y)}}function i(p,b,v){return b&&o(p.prototype,b),Object.defineProperty(p,"prototype",{writable:!1}),p}function s(p){var b=a(p,"string");return typeof b=="symbol"?b:String(b)}function a(p,b){if(typeof p!="object"||p===null)return p;var v=p[Symbol.toPrimitive];if(v!==void 0){var y=v.call(p,b);if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}var c=Aa(),l=c.Buffer,u=bx,f=u.inspect,d=f&&f.custom||"inspect";function h(p,b,v){l.prototype.copy.call(p,b,v)}return qd=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return i(p,[{key:"push",value:function(v){var y={data:v,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(v){var y={data:v,next:this.head};this.length===0&&(this.tail=y),this.head=y,++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 y=this.head,A=""+y.data;y=y.next;)A+=v+y.data;return A}},{key:"concat",value:function(v){if(this.length===0)return l.alloc(0);for(var y=l.allocUnsafe(v>>>0),A=this.head,S=0;A;)h(A.data,y,S),S+=A.data.length,A=A.next;return y}},{key:"consume",value:function(v,y){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=y?this._getString(v):this._getBuffer(v),A}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var y=this.head,A=1,S=y.data;for(v-=S.length;y=y.next;){var E=y.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,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=E.slice(I));break}++A}return this.length-=A,S}},{key:"_getBuffer",value:function(v){var y=l.allocUnsafe(v),A=this.head,S=1;for(A.data.copy(y),v-=A.data.length;A=A.next;){var E=A.data,I=v>E.length?E.length:v;if(E.copy(y,y.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,y}},{key:d,value:function(v,y){return f(this,e(e({},y),{},{depth:0,customInspect:!1}))}}]),p}(),qd}var jd,wx;function xx(){if(wx)return jd;wx=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 jd={destroy:t,undestroy:r,errorOrDestroy:i},jd}var Wd={},vx;function Ro(){if(vx)return Wd;vx=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,b,v){return d.call(this,u(p,b,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"),Wd.codes=e,Wd}var Yd,Ax;function Ex(){if(Ax)return Yd;Ax=1;var t=Ro().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 Yd={getHighWaterMark:n},Yd}var Qd,Sx;function D9(){if(Sx)return Qd;Sx=1,Qd=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 Qd}var Zd,Cx;function Ix(){if(Cx)return Zd;Cx=1,Zd=N;function t(q){var j=this;this.next=null,this.entry=null,this.finish=function(){Ve(j,q)}}var e;N.WritableState=_;var n={deprecate:D9()},r=mx(),o=Aa().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=xx(),l=Ex(),u=l.getHighWaterMark,f=Ro().codes,d=f.ERR_INVALID_ARG_TYPE,h=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,b=f.ERR_STREAM_CANNOT_PIPE,v=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,A=f.ERR_STREAM_WRITE_AFTER_END,S=f.ERR_UNKNOWN_ENCODING,E=c.errorOrDestroy;_o()(N,r);function I(){}function _(q,j,ee){e=e||Fo(),q=q||{},typeof ee!="boolean"&&(ee=j 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(j,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 j=this.bufferedRequest,ee=[];j;)ee.push(j),j=j.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(j){return B.call(this,j)?!0:this!==N?!1:j&&j._writableState instanceof _}})):B=function(j){return j instanceof this};function N(q){e=e||Fo();var j=this instanceof e;if(!j&&!B.call(N,this))return new N(q);this._writableState=new _(q,this,j),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 b)};function M(q,j){var ee=new A;E(q,ee),process.nextTick(j,ee)}function F(q,j,ee,J){var fe;return ee===null?fe=new y:typeof ee!="string"&&!j.objectMode&&(fe=new d("chunk",["string","Buffer"],ee)),fe?(E(q,fe),process.nextTick(J,fe),!1):!0}N.prototype.write=function(q,j,ee){var J=this._writableState,fe=!1,L=!J.objectMode&&a(q);return L&&!o.isBuffer(q)&&(q=s(q)),typeof j=="function"&&(ee=j,j=null),L?j="buffer":j||(j=J.defaultEncoding),typeof ee!="function"&&(ee=I),J.ending?M(this,ee):(L||F(this,J,q,ee))&&(J.pendingcb++,fe=Y(this,J,L,q,j,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&&he(this,q))},N.prototype.setDefaultEncoding=function(j){if(typeof j=="string"&&(j=j.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((j+"").toLowerCase())>-1))throw new S(j);return this._writableState.defaultEncoding=j,this},Object.defineProperty(N.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function C(q,j,ee){return!q.objectMode&&q.decodeStrings!==!1&&typeof j=="string"&&(j=o.from(j,ee)),j}Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Y(q,j,ee,J,fe,L){if(!ee){var D=C(j,J,fe);J!==D&&(ee=!0,fe="buffer",J=D)}var te=j.objectMode?1:J.length;j.length+=te;var le=j.length<j.highWaterMark;if(le||(j.needDrain=!0),j.writing||j.corked){var Be=j.lastBufferedRequest;j.lastBufferedRequest={chunk:J,encoding:fe,isBuf:ee,callback:L,next:null},Be?Be.next=j.lastBufferedRequest:j.bufferedRequest=j.lastBufferedRequest,j.bufferedRequestCount+=1}else Q(q,j,!1,te,J,fe,L);return le}function Q(q,j,ee,J,fe,L,D){j.writelen=J,j.writecb=D,j.writing=!0,j.sync=!0,j.destroyed?j.onwrite(new v("write")):ee?q._writev(fe,j.onwrite):q._write(fe,L,j.onwrite),j.sync=!1}function se(q,j,ee,J,fe){--j.pendingcb,ee?(process.nextTick(fe,J),process.nextTick(Ie,q,j),q._writableState.errorEmitted=!0,E(q,J)):(fe(J),q._writableState.errorEmitted=!0,E(q,J),Ie(q,j))}function oe(q){q.writing=!1,q.writecb=null,q.length-=q.writelen,q.writelen=0}function ae(q,j){var ee=q._writableState,J=ee.sync,fe=ee.writecb;if(typeof fe!="function")throw new p;if(oe(ee),j)se(q,ee,J,j,fe);else{var L=De(ee)||q.destroyed;!L&&!ee.corked&&!ee.bufferProcessing&&ee.bufferedRequest&&he(q,ee),J?process.nextTick(ce,q,ee,L,fe):ce(q,ee,L,fe)}}function ce(q,j,ee,J){ee||ye(q,j),j.pendingcb--,J(),Ie(q,j)}function ye(q,j){j.length===0&&j.needDrain&&(j.needDrain=!1,q.emit("drain"))}function he(q,j){j.bufferProcessing=!0;var ee=j.bufferedRequest;if(q._writev&&ee&&ee.next){var J=j.bufferedRequestCount,fe=new Array(J),L=j.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,j,!0,j.length,fe,"",L.finish),j.pendingcb++,j.lastBufferedRequest=null,L.next?(j.corkedRequestsFree=L.next,L.next=null):j.corkedRequestsFree=new t(j),j.bufferedRequestCount=0}else{for(;ee;){var le=ee.chunk,Be=ee.encoding,ve=ee.callback,Ae=j.objectMode?1:le.length;if(Q(q,j,!1,Ae,le,Be,ve),ee=ee.next,j.bufferedRequestCount--,j.writing)break}ee===null&&(j.lastBufferedRequest=null)}j.bufferedRequest=ee,j.bufferProcessing=!1}N.prototype._write=function(q,j,ee){ee(new h("_write()"))},N.prototype._writev=null,N.prototype.end=function(q,j,ee){var J=this._writableState;return typeof q=="function"?(ee=q,q=null,j=null):typeof j=="function"&&(ee=j,j=null),q!=null&&this.write(q,j),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 De(q){return q.ending&&q.length===0&&q.bufferedRequest===null&&!q.finished&&!q.writing}function we(q,j){q._final(function(ee){j.pendingcb--,ee&&E(q,ee),j.prefinished=!0,q.emit("prefinish"),Ie(q,j)})}function Ee(q,j){!j.prefinished&&!j.finalCalled&&(typeof q._final=="function"&&!j.destroyed?(j.pendingcb++,j.finalCalled=!0,process.nextTick(we,q,j)):(j.prefinished=!0,q.emit("prefinish")))}function Ie(q,j){var ee=De(j);if(ee&&(Ee(q,j),j.pendingcb===0&&(j.finished=!0,q.emit("finish"),j.autoDestroy))){var J=q._readableState;(!J||J.autoDestroy&&J.endEmitted)&&q.destroy()}return ee}function Ge(q,j,ee){j.ending=!0,Ie(q,j),ee&&(j.finished?process.nextTick(ee):q.once("finish",ee)),j.ended=!0,q.writable=!1}function Ve(q,j,ee){var J=q.entry;for(q.entry=null;J;){var fe=J.callback;j.pendingcb--,fe(ee),J=J.next}j.corkedRequestsFree.next=q}return Object.defineProperty(N.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(j){this._writableState&&(this._writableState.destroyed=j)}}),N.prototype.destroy=c.destroy,N.prototype._undestroy=c.undestroy,N.prototype._destroy=function(q,j){j(q)},Zd}var Xd,Tx;function Fo(){if(Tx)return Xd;Tx=1;var t=Object.keys||function(l){var u=[];for(var f in l)u.push(f);return u};Xd=s;var e=Mx(),n=Ix();_o()(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)}}),Xd}var Kd={},ru={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Dx;function B9(){return Dx||(Dx=1,function(t,e){var n=Aa(),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)}}(ru,ru.exports)),ru.exports}var Bx;function Jd(){if(Bx)return Kd;Bx=1;var t=B9().Buffer,e=t.isEncoding||function(y){switch(y=""+y,y&&y.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(y){if(!y)return"utf8";for(var A;;)switch(y){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 y;default:if(A)return;y=(""+y).toLowerCase(),A=!0}}function r(y){var A=n(y);if(typeof A!="string"&&(t.isEncoding===e||!e(y)))throw new Error("Unknown encoding: "+y);return A||y}Kd.StringDecoder=o;function o(y){this.encoding=r(y);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=b,this.end=v;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(A)}o.prototype.write=function(y){if(y.length===0)return"";var A,S;if(this.lastNeed){if(A=this.fillLast(y),A===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S<y.length?A?A+this.text(y,S):this.text(y,S):A||""},o.prototype.end=u,o.prototype.text=l,o.prototype.fillLast=function(y){if(this.lastNeed<=y.length)return y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,y.length),this.lastNeed-=y.length};function i(y){return y<=127?0:y>>5===6?2:y>>4===14?3:y>>3===30?4:y>>6===2?-1:-2}function s(y,A,S){var E=A.length-1;if(E<S)return 0;var I=i(A[E]);return I>=0?(I>0&&(y.lastNeed=I-1),I):--E<S||I===-2?0:(I=i(A[E]),I>=0?(I>0&&(y.lastNeed=I-2),I):--E<S||I===-2?0:(I=i(A[E]),I>=0?(I>0&&(I===2?I=0:y.lastNeed=I-3),I):0))}function a(y,A,S){if((A[0]&192)!==128)return y.lastNeed=0,"�";if(y.lastNeed>1&&A.length>1){if((A[1]&192)!==128)return y.lastNeed=1,"�";if(y.lastNeed>2&&A.length>2&&(A[2]&192)!==128)return y.lastNeed=2,"�"}}function c(y){var A=this.lastTotal-this.lastNeed,S=a(this,y);if(S!==void 0)return S;if(this.lastNeed<=y.length)return y.copy(this.lastChar,A,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,A,0,y.length),this.lastNeed-=y.length}function l(y,A){var S=s(this,y,A);if(!this.lastNeed)return y.toString("utf8",A);this.lastTotal=S;var E=y.length-(S-this.lastNeed);return y.copy(this.lastChar,0,E),y.toString("utf8",A,E)}function u(y){var A=y&&y.length?this.write(y):"";return this.lastNeed?A+"�":A}function f(y,A){if((y.length-A)%2===0){var S=y.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]=y[y.length-2],this.lastChar[1]=y[y.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",A,y.length-1)}function d(y){var A=y&&y.length?this.write(y):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return A+this.lastChar.toString("utf16le",0,S)}return A}function h(y,A){var S=(y.length-A)%3;return S===0?y.toString("base64",A):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",A,y.length-S))}function p(y){var A=y&&y.length?this.write(y):"";return this.lastNeed?A+this.lastChar.toString("base64",0,3-this.lastNeed):A}function b(y){return y.toString(this.encoding)}function v(y){return y&&y.length?this.write(y):""}return Kd}var $d,kx;function e0(){if(kx)return $d;kx=1;var t=Ro().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)},b=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)},y=function(){i.req.on("finish",d)};return r(i)?(i.on("complete",d),i.on("abort",v),i.req?y():i.on("request",y)):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",b),i.on("close",v),function(){i.removeListener("complete",d),i.removeListener("abort",v),i.removeListener("request",y),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",b),i.removeListener("close",v)}}return $d=o,$d}var t0,_x;function k9(){if(_x)return t0;_x=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=e0(),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 b(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(){}),y=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(M,F){process.nextTick(function(){E[a]?F(E[a]):M(d(void 0,!0))})});var _=this[l],B;if(_)B=new Promise(b(_,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(y,(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,M){var F=_[f].read();F?(_[l]=null,_[i]=null,_[s]=null,N(d(F,!1))):(_[i]=N,_[s]=M)},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 M=_[i];M!==null&&(_[l]=null,_[i]=null,_[s]=null,M(d(void 0,!0))),_[c]=!0}),E.on("readable",p.bind(null,_)),_};return t0=A,t0}var n0,Rx;function _9(){return Rx||(Rx=1,n0=function(){throw new Error("Readable.from is not available in the browser")}),n0}var r0,Fx;function Mx(){if(Fx)return r0;Fx=1,r0=M;var t;M.ReadableState=N,Hd().EventEmitter;var e=function(D,te){return D.listeners(te).length},n=mx(),r=Aa().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=bx,c;a&&a.debuglog?c=a.debuglog("stream"):c=function(){};var l=T9(),u=xx(),f=Ex(),d=f.getHighWaterMark,h=Ro().codes,p=h.ERR_INVALID_ARG_TYPE,b=h.ERR_STREAM_PUSH_AFTER_EOF,v=h.ERR_METHOD_NOT_IMPLEMENTED,y=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A,S,E;_o()(M,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||Fo(),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=Jd().StringDecoder),this.decoder=new A(L.encoding),this.encoding=L.encoding)}function M(L){if(t=t||Fo(),!(this instanceof M))return new M(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(M.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(D){this._readableState&&(this._readableState.destroyed=D)}}),M.prototype.destroy=u.destroy,M.prototype._undestroy=u.undestroy,M.prototype._destroy=function(L,D){D(L)},M.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),F(this,L,D,!1,le)},M.prototype.unshift=function(L){return F(this,L,null,!0,!1)};function F(L,D,te,le,Be){c("readableAddChunk",D);var ve=L._readableState;if(D===null)ve.reading=!1,ae(L,ve);else{var Ae;if(Be||(Ae=Y(ve,D)),Ae)I(L,Ae);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 y):C(L,ve,D,!0);else if(ve.ended)I(L,new b);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):he(L,ve)):C(L,ve,D,!1)}else le||(ve.reading=!1,he(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)),he(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}M.prototype.isPaused=function(){return this._readableState.flowing===!1},M.prototype.setEncoding=function(L){A||(A=Jd().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 se(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 oe(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=se(L)),L<=D.length?L:D.ended?D.length:(D.needReadable=!0,0))}M.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=oe(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=oe(te,D)));var Be;return L>0?Be=j(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 he(L,D){D.readingMore||(D.readingMore=!0,process.nextTick(De,L,D))}function De(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}M.prototype._read=function(L){I(this,new v("_read()"))},M.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:zt;le.endEmitted?process.nextTick(ve):te.once("end",ve),L.on("unpipe",Ae);function Ae(k,m){c("onunpipe"),k===te&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,It())}function Re(){c("onend"),L.end()}var dt=we(te);L.on("drain",dt);var $t=!1;function It(){c("cleanup"),L.removeListener("close",Nt),L.removeListener("finish",et),L.removeListener("drain",dt),L.removeListener("error",Rt),L.removeListener("unpipe",Ae),te.removeListener("end",Re),te.removeListener("end",zt),te.removeListener("data",$e),$t=!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)&&!$t&&(c("false write response, pause",le.awaitDrain),le.awaitDrain++),te.pause())}function Rt(k){c("onerror",k),zt(),L.removeListener("error",Rt),e(L,"error")===0&&I(L,k)}B(L,"error",Rt);function Nt(){L.removeListener("finish",et),zt()}L.once("close",Nt);function et(){c("onfinish"),L.removeListener("close",Nt),zt()}L.once("finish",et);function zt(){c("unpipe"),te.unpipe(L)}return L.emit("pipe",te),le.flowing||(c("pipe resume"),te.resume()),L};function we(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))}}M.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 Ae=fe(D.pipes,L);return Ae===-1?this:(D.pipes.splice(Ae,1),D.pipesCount-=1,D.pipesCount===1&&(D.pipes=D.pipes[0]),L.emit("unpipe",this,te),this)},M.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(Ie,this)),te},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(L,D){var te=n.prototype.removeListener.call(this,L,D);return L==="readable"&&process.nextTick(Ee,this),te},M.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 Ie(L){c("readable nexttick read 0"),L.read(0)}M.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)}M.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;);}M.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 Ae=te.decoder.end();Ae&&Ae.length&&D.push(Ae)}D.push(null)}),L.on("data",function(Ae){if(c("wrapped data"),te.decoder&&(Ae=te.decoder.write(Ae)),!(te.objectMode&&Ae==null)&&!(!te.objectMode&&(!Ae||!Ae.length))){var Re=D.push(Ae);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(Ae){c("wrapped _read",Ae),le&&(le=!1,L.resume())},this},typeof Symbol=="function"&&(M.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=k9()),S(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(D){this._readableState&&(this._readableState.flowing=D)}}),M._fromList=j,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function j(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"&&(M.from=function(L,D){return E===void 0&&(E=_9()),E(M,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 r0}var i0,Px;function Lx(){if(Px)return i0;Px=1,i0=a;var t=Ro().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=Fo();_o()(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 o0,Ox;function R9(){if(Ox)return o0;Ox=1,o0=e;var t=Lx();_o()(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)},o0}var s0,Nx;function F9(){if(Nx)return s0;Nx=1;var t;function e(d){var h=!1;return function(){h||(h=!0,d.apply(void 0,arguments))}}var n=Ro().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,b){b=e(b);var v=!1;d.on("close",function(){v=!0}),t===void 0&&(t=e0()),t(d,{readable:h,writable:p},function(A){if(A)return b(A);v=!0,b()});var y=!1;return function(A){if(!v&&!y){if(y=!0,s(d))return d.abort();if(typeof d.destroy=="function")return d.destroy();b(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 b=u(h);if(Array.isArray(h[0])&&(h=h[0]),h.length<2)throw new r("streams");var v,y=h.map(function(A,S){var E=S<h.length-1,I=S>0;return a(A,E,I,function(_){v||(v=_),_&&y.forEach(c),!E&&(y.forEach(c),b(v))})});return h.reduce(l)}return s0=f,s0}var a0,zx;function M9(){if(zx)return a0;zx=1,a0=n;var t=Hd().EventEmitter,e=_o();e(n,t),n.Readable=Mx(),n.Writable=Ix(),n.Duplex=Fo(),n.Transform=Lx(),n.PassThrough=R9(),n.finished=e0(),n.pipeline=F9(),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},a0}var Ux=M9(),P9=Jd();function _a(t){return t.replace(/%([0-9A-Fa-f]{2})/g,(e,n)=>String.fromCharCode(parseInt(n,16)))}function Gx(t,e){return String(e).replace(t,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function Ra(t){return Gx(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,t)}function rr(t){return Gx(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,t)}function Hx(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(_a))}),e}function Vx(t){const e=t.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:e[0]&&_a(e[0]),source:e[1]&&_a(e[1]),type:e[2]&&_a(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:Hx(e[8])}}function qx(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 jx(t){const e=[];return Object.entries(t).forEach(([n,r])=>{if(!r)return;let o;r.hasOwnProperty("toString")?o=Ra(r.toString()):Array.isArray(r)?o=r.map(Ra).join(","):o=Ra(r),e.push(`${Ra(n)}=${o}`)}),e.length?e.join(";"):"."}function L9(t,e){const n=t.attributes===null||t.attributes===void 0?".":jx(t.attributes),o=`${[t.seq_id===null?".":rr(t.seq_id),t.source===null?".":rr(t.source),t.type===null?".":rr(t.type),t.start===null?".":rr(t.start),t.end===null?".":rr(t.end),t.score===null?".":rr(t.score),t.strand===null?".":rr(t.strand),t.phase===null?".":rr(t.phase),n].join(" ")}
|
|
817
|
+
`;return e[o]?"":(e[o]=!0,o)}function iu(t,e){if(Array.isArray(t))return t.map(r=>iu(r,e)).join("");const n=[L9(t,e)];return O9(t)&&n.push(...t.child_features.map(r=>iu(r,e)),...t.derived_features.map(r=>iu(r,e))),n.join("")}function Wx(t){return iu(t,{})}function Yx(t){let e=`##${t.directive}`;return t.value&&(e+=` ${t.value}`),e+=`
|
|
818
|
+
`,e}function Qx(t){return`# ${t.comment}
|
|
819
|
+
`}function c0(t){return`>${t.id}${t.description?` ${t.description}`:""}
|
|
795
820
|
${t.sequence}
|
|
796
|
-
`}function
|
|
797
|
-
`}return Array.isArray(t)?t.map(e):e(t)}function
|
|
798
|
-
`,r+=n.map(
|
|
821
|
+
`}function ou(t){function e(n){return"attributes"in n?Wx(n):"directive"in n?Yx(n):"sequence"in n?c0(n):"comment"in n?Qx(n):`# (invalid item found during format)
|
|
822
|
+
`}return Array.isArray(t)?t.map(e):e(t)}function O9(t){return t.child_features!==void 0&&t.derived_features!==void 0}const N9=Object.freeze(Object.defineProperty({__proto__:null,escape:Ra,escapeColumn:rr,formatAttributes:jx,formatComment:Qx,formatDirective:Yx,formatFeature:Wx,formatItem:ou,formatSequence:c0,parseAttributes:Hx,parseDirective:qx,parseFeature:Vx,unescape:_a},Symbol.toStringTag,{value:"Module"})),Zx={Parent:"child_features",Derives_from:"derived_features"};class Xx{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 Kx{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=qx(e);i&&(i.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new Xx(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 Xx(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={...Vx(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=Zx.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=Zx.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 l0(t){process&&process.nextTick?process.nextTick(t):t()}function Jx(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 z9 extends Ux.Transform{constructor(e={}){super({objectMode:!0}),this.textBuffer="";const n=Jx(e);this.encoding=e.encoding||"utf8",this.decoder=new P9.StringDecoder;const r=this.push.bind(this);this.parser=new Kx({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)),l0(r)}_flush(e){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),l0(e)}}function U9(t={}){return new z9(t)}function G9(t,e={}){if(!t)return[];const n=Jx(e),r=[],o=r.push.bind(r),i=new Kx({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 H9(t){const e=[],n=[];t.forEach(o=>{"sequence"in o?n.push(o):e.push(o)});let r=e.map(ou).join("");return n.length&&(r+=`##FASTA
|
|
823
|
+
`,r+=n.map(c0).join("")),r}class $x extends Ux.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
|
|
799
824
|
`)}if("sequence"in e&&!this.fastaMode&&(this.push(`##FASTA
|
|
800
|
-
`),this.fastaMode=!0),Array.isArray(e)?o=e.map(
|
|
825
|
+
`),this.fastaMode=!0),Array.isArray(e)?o=e.map(ou).join(""):o=ou(e),this.push(o),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
|
|
801
826
|
`),this.linesSinceLastSyncMark=0;else{let i=0;for(let s=0;s<o.length;s+=1)o[s]===`
|
|
802
|
-
`&&(i+=1);this.linesSinceLastSyncMark+=i}this.haveWeEmittedData=!0,
|
|
827
|
+
`&&(i+=1);this.linesSinceLastSyncMark+=i}this.haveWeEmittedData=!0,l0(r)}}function V9(t={}){return new $x(t)}function q9(t,e,n={}){const r={insertVersionDirective:!0,...n};return new Promise((o,i)=>{t.pipe(new $x(r)).on("end",()=>o(null)).on("error",i).pipe(e)})}const j9=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:U9,parseStringSync:G9,formatSync:H9,formatStream:V9,formatFile:q9,util:N9}},Symbol.toStringTag,{value:"Module"})),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 W9(t){try{return decodeURIComponent(t)}catch{return t}}class Y9{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:su.InfoFields,FORMAT:su.GenotypeFields,ALT:su.AltTypes,FILTER:su.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:
|
|
803
828
|
${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:
|
|
804
829
|
${o}`);if(s.length!==a.length||!s.every((c,l)=>c===a[l]))throw new Error(`VCF column headers not correct:
|
|
805
|
-
${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(
|
|
830
|
+
${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,b=+c,v=l==="."?void 0:l.split(";"),y=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(F=>F==="."?void 0:F).map(F=>F&&I?W9(F):F),M=this.getMetadata("INFO",B,"Type");M==="Integer"||M==="Float"?_[B]=N==null?void 0:N.map(F=>F===void 0?void 0:Number(F)):M==="Flag"?_[B]=!0:_[B]=N}return{CHROM:p,POS:b,ALT:A,INFO:_,REF:y,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 Q9=Object.freeze(Object.defineProperty({__proto__:null,default:Y9},Symbol.toStringTag,{value:"Module"}));ze.GenomeSpy=Gy,ze.embed=h_,ze.favIcon=f_,ze.html=ot,ze.icon=u_,ze.loadSpec=Hy,Object.defineProperty(ze,Symbol.toStringTag,{value:"Module"})});
|