@genome-spy/core 0.62.1 → 0.63.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.
Files changed (35) hide show
  1. package/dist/bundle/index.es.js +4302 -4236
  2. package/dist/bundle/index.js +97 -97
  3. package/dist/src/encoder/encoder.d.ts +4 -0
  4. package/dist/src/encoder/encoder.d.ts.map +1 -1
  5. package/dist/src/encoder/encoder.js +14 -0
  6. package/dist/src/genomeSpy.d.ts +11 -0
  7. package/dist/src/genomeSpy.d.ts.map +1 -1
  8. package/dist/src/genomeSpy.js +98 -20
  9. package/dist/src/gl/includes/common.glsl.js +1 -1
  10. package/dist/src/gl/webGLHelper.d.ts +18 -14
  11. package/dist/src/gl/webGLHelper.d.ts.map +1 -1
  12. package/dist/src/gl/webGLHelper.js +58 -65
  13. package/dist/src/index.d.ts.map +1 -1
  14. package/dist/src/index.js +1 -0
  15. package/dist/src/marks/mark.d.ts +6 -1
  16. package/dist/src/marks/mark.d.ts.map +1 -1
  17. package/dist/src/marks/mark.js +14 -19
  18. package/dist/src/marks/markUtils.d.ts.map +1 -1
  19. package/dist/src/marks/markUtils.js +4 -8
  20. package/dist/src/marks/rect.vertex.glsl.js +1 -1
  21. package/dist/src/marks/text.d.ts.map +1 -1
  22. package/dist/src/marks/text.js +7 -15
  23. package/dist/src/marks/text.vertex.glsl.js +1 -1
  24. package/dist/src/types/embedApi.d.ts +16 -0
  25. package/dist/src/types/viewContext.d.ts +0 -2
  26. package/dist/src/view/gridView/gridView.js +1 -1
  27. package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts +32 -17
  28. package/dist/src/view/renderingContext/bufferedViewRenderingContext.d.ts.map +1 -1
  29. package/dist/src/view/renderingContext/bufferedViewRenderingContext.js +85 -39
  30. package/dist/src/view/renderingContext/simpleViewRenderingContext.d.ts.map +1 -1
  31. package/dist/src/view/renderingContext/simpleViewRenderingContext.js +5 -1
  32. package/dist/src/view/renderingContext/viewRenderingContext.d.ts +1 -0
  33. package/dist/src/view/renderingContext/viewRenderingContext.d.ts.map +1 -1
  34. package/dist/src/view/renderingContext/viewRenderingContext.js +4 -0
  35. package/package.json +2 -2
@@ -1,35 +1,35 @@
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 _M=Object.defineProperty;var wv=ze=>{throw TypeError(ze)};var RM=(ze,Ye,Je)=>Ye in ze?_M(ze,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ze[Ye]=Je;var Gt=(ze,Ye,Je)=>RM(ze,typeof Ye!="symbol"?Ye+"":Ye,Je),v0=(ze,Ye,Je)=>Ye.has(ze)||wv("Cannot "+Je);var W=(ze,Ye,Je)=>(v0(ze,Ye,"read from private field"),Je?Je.call(ze):Ye.get(ze)),ge=(ze,Ye,Je)=>Ye.has(ze)?wv("Cannot add the same private member more than once"):Ye instanceof WeakSet?Ye.add(ze):Ye.set(ze,Je),Te=(ze,Ye,Je,Vi)=>(v0(ze,Ye,"write to private field"),Vi?Vi.call(ze,Je):Ye.set(ze,Je),Je),de=(ze,Ye,Je)=>(v0(ze,Ye,"access private method"),Je);var xv=(ze,Ye,Je,Vi)=>({set _(xu){Te(ze,Ye,xu,Je)},get _(){return W(ze,Ye,Vi)}});var hv,or,Uo,_i,Ri,Go,Oa,jt,zr,Ho,Na,Vo,vv,Av,Fi,rc,za,Ur,Mi,qo,jo,Ua,In,Gr,A0,E0,Wo,hu,Ev,Yo,Jt,Pi,Ga,Pe,S0,C0,hr,I0,Sv,Cv,T0,D0,bu,B0,Gi,Iv,Tv,Ha,k0,Qo,Zo,Xo,Va,qa,qn,ic,_0,ja,du,Dv,sr,Wa,Hr,Li,Ko,tn,R0,F0,M0,Bv,Ya,P0,pu,kv,Jo,$o,es,Qa,ts,ns,Za,L0,Xa,O0,Oi,rs,Ka,Ja,is,$a,ec,ar,Ni,Vr,qr,os,tc,jr,zi,gu,_v,ss,as,nn,Ui,cs,He,Hi,Rv,oc,N0,z0,U0,Fv,yu,Mv,ls,pn,wu,Pv,Lv,Ov;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 Vi(t){return t==null?null:t.fname}function xu(t){return t==null?null:t.fields}function Nv(t){return t.length===1?zv(t[0]):Uv(t)}const zv=t=>function(e){return e[t]},Uv=t=>{const e=t.length;return function(n){for(let r=0;r<e;++r)n=n[t[r]];return n}};function bn(t){throw Error(t)}function Gv(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||bn("Access path missing open bracket: "+t),o>0&&l(),o=0,s=a+1)}return o&&bn("Access path missing closing bracket: "+t),r&&bn("Access path missing closing quote: "+t),a>s&&(a++,l()),e}function sc(t,e,n){const r=Gv(t);return t=r.length===1?r[0]:t,Je((n&&n.get||Nv)(r),[t],e||t)}sc("id");const ac=Je(t=>t,[],"identity");Je(()=>0,[],"zero"),Je(()=>1,[],"one"),Je(()=>!0,[],"true"),Je(()=>!1,[],"false");var _t=Array.isArray;function Rt(t){return t===Object(t)}function jn(t){return t[t.length-1]}function cc(t){return t==null||t===""?null:+t}const G0=t=>e=>t*Math.exp(e),H0=t=>e=>Math.log(t*e),Hv=t=>e=>Math.sign(e)*Math.log1p(Math.abs(e/t)),Vv=t=>e=>Math.sign(e)*Math.expm1(Math.abs(e))*t,lc=t=>e=>e<0?-Math.pow(-e,t):Math.pow(e,t);function vu(t,e,n,r){const o=n(t[0]),i=n(jn(t)),s=(i-o)*e;return[r(o-s),r(i-s)]}function qv(t,e){return vu(t,e,cc,ac)}function jv(t,e){var n=Math.sign(t[0]);return vu(t,e,H0(n),G0(n))}function Wv(t,e,n){return vu(t,e,lc(n),lc(1/n))}function uc(t,e,n,r,o){const i=r(t[0]),s=r(jn(t)),a=e!=null?r(e):(i+s)/2;return[o(a+(i-a)*n),o(a+(s-a)*n)]}function V0(t,e,n){return uc(t,e,n,cc,ac)}function q0(t,e,n){const r=Math.sign(t[0]);return uc(t,e,n,H0(r),G0(r))}function Au(t,e,n,r){return uc(t,e,n,lc(r),lc(1/r))}function Yv(t,e,n,r){return uc(t,e,n,Hv(r),Vv(r))}function j0(t){return t!=null?_t(t)?t:[t]:[]}function Qv(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 kn(t){return typeof t=="function"}const Zv="descending";function W0(t,e,n){n=n||{},e=j0(e)||[];const r=[],o=[],i={},s=n.comparator||Xv;return j0(t).forEach((a,c)=>{a!=null&&(r.push(e[c]===Zv?-1:1),o.push(a=kn(a)?a:sc(a,null,n)),(xu(a)||[]).forEach(l=>i[l]=1))}),o.length===0?null:Je(s(o,r),Object.keys(i))}const Y0=(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),Xv=(t,e)=>t.length===1?Kv(t[0],e[0]):Jv(t,e,t.length),Kv=(t,e)=>function(n,r){return Y0(t(n),t(r))*e},Jv=(t,e,n)=>(e.push(0),function(r,o){let i,s=0,a=-1;for(;s===0&&++a<n;)i=t[a],s=Y0(i(r),i(o));return s*e[a]});function $v(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}function Q0(t,e){return Object.hasOwn(t,e)}function us(t){return typeof t=="boolean"}function eA(t){return Object.prototype.toString.call(t)==="[object Date]"}function tA(t){return t&&kn(t[Symbol.iterator])}function Ht(t){return typeof t=="number"}function nA(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function rt(t){return typeof t=="string"}function Z0(t,e){const n=t[0],r=jn(t),o=+e;return o?o===1?r:n+o*(r-n):n}function fs(t){return t&&jn(t)-t[0]||0}function Eu(t){return _t(t)?"["+t.map(Eu)+"]":Rt(t)||rt(t)?JSON.stringify(t).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):t}function rA(t){return t==null||t===""?null:!t||t==="false"||t==="0"?!1:!!t}const iA=t=>Ht(t)||eA(t)?t:Date.parse(t);function oA(t,e){return e=e||iA,t==null||t===""?null:e(t)}function sA(t){return t==null||t===""?null:t+""}function aA(t){const e={},n=t.length;for(let r=0;r<n;++r)e[t[r]]=!0;return e}/**
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 jM=Object.defineProperty;var _v=ze=>{throw TypeError(ze)};var WM=(ze,Ye,Je)=>Ye in ze?jM(ze,Ye,{enumerable:!0,configurable:!0,writable:!0,value:Je}):ze[Ye]=Je;var Gt=(ze,Ye,Je)=>WM(ze,typeof Ye!="symbol"?Ye+"":Ye,Je),R0=(ze,Ye,Je)=>Ye.has(ze)||_v("Cannot "+Je);var q=(ze,Ye,Je)=>(R0(ze,Ye,"read from private field"),Je?Je.call(ze):Ye.get(ze)),he=(ze,Ye,Je)=>Ye.has(ze)?_v("Cannot add the same private member more than once"):Ye instanceof WeakSet?Ye.add(ze):Ye.set(ze,Je),Ae=(ze,Ye,Je,qi)=>(R0(ze,Ye,"write to private field"),qi?qi.call(ze,Je):Ye.set(ze,Je),Je),pe=(ze,Ye,Je)=>(R0(ze,Ye,"access private method"),Je);var Rv=(ze,Ye,Je,qi)=>({set _(ku){Ae(ze,Ye,ku,Je)},get _(){return q(ze,Ye,qi)}});var Sv,sr,Go,Ri,Fi,Ho,Ua,jt,Ur,Vo,Ga,qo,Fv,Mv,Mi,hc,Ha,Gr,Pi,jo,Wo,Va,Tn,Hr,F0,M0,Yo,vu,Pv,Qo,Kt,Li,qa,Pe,P0,L0,dr,O0,Lv,Ov,N0,z0,Tu,U0,Hi,Nv,zv,ja,G0,Zo,Xo,Ko,Wa,Ya,jn,dc,H0,Qa,Au,Uv,ar,Za,Vr,Oi,Jo,tn,V0,q0,j0,Gv,Xa,W0,Eu,Hv,$o,es,ts,Ka,ns,rs,Ja,Y0,$a,Q0,Ni,is,ec,tc,os,nc,rc,ic,Bn,oc,ss,sc,ac,cc,as,lc,Su,Vv,cr,zi,qr,jr,cs,uc,Wr,Ui,Cu,qv,ls,us,nn,Gi,fs,He,Vi,jv,pc,Z0,X0,K0,Wv,Du,Yv,hs,pn,Bu,Qv,Zv,Xv;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 qi(t){return t==null?null:t.fname}function ku(t){return t==null?null:t.fields}function Kv(t){return t.length===1?Jv(t[0]):$v(t)}const Jv=t=>function(e){return e[t]},$v=t=>{const e=t.length;return function(n){for(let r=0;r<e;++r)n=n[t[r]];return n}};function yn(t){throw Error(t)}function eA(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||yn("Access path missing open bracket: "+t),o>0&&l(),o=0,s=a+1)}return o&&yn("Access path missing closing bracket: "+t),r&&yn("Access path missing closing quote: "+t),a>s&&(a++,l()),e}function gc(t,e,n){const r=eA(t);return t=r.length===1?r[0]:t,Je((n&&n.get||Kv)(r),[t],e||t)}gc("id");const mc=Je(t=>t,[],"identity");Je(()=>0,[],"zero"),Je(()=>1,[],"one"),Je(()=>!0,[],"true"),Je(()=>!1,[],"false");var _t=Array.isArray;function Rt(t){return t===Object(t)}function Wn(t){return t[t.length-1]}function yc(t){return t==null||t===""?null:+t}const J0=t=>e=>t*Math.exp(e),$0=t=>e=>Math.log(t*e),tA=t=>e=>Math.sign(e)*Math.log1p(Math.abs(e/t)),nA=t=>e=>Math.sign(e)*Math.expm1(Math.abs(e))*t,bc=t=>e=>e<0?-Math.pow(-e,t):Math.pow(e,t);function _u(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 rA(t,e){return _u(t,e,yc,mc)}function iA(t,e){var n=Math.sign(t[0]);return _u(t,e,$0(n),J0(n))}function oA(t,e,n){return _u(t,e,bc(n),bc(1/n))}function wc(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 ep(t,e,n){return wc(t,e,n,yc,mc)}function tp(t,e,n){const r=Math.sign(t[0]);return wc(t,e,n,$0(r),J0(r))}function Ru(t,e,n,r){return wc(t,e,n,bc(r),bc(1/r))}function sA(t,e,n,r){return wc(t,e,n,tA(r),nA(r))}function np(t){return t!=null?_t(t)?t:[t]:[]}function aA(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 Rn(t){return typeof t=="function"}const cA="descending";function rp(t,e,n){n=n||{},e=np(e)||[];const r=[],o=[],i={},s=n.comparator||lA;return np(t).forEach((a,c)=>{a!=null&&(r.push(e[c]===cA?-1:1),o.push(a=Rn(a)?a:gc(a,null,n)),(ku(a)||[]).forEach(l=>i[l]=1))}),o.length===0?null:Je(s(o,r),Object.keys(i))}const ip=(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),lA=(t,e)=>t.length===1?uA(t[0],e[0]):fA(t,e,t.length),uA=(t,e)=>function(n,r){return ip(t(n),t(r))*e},fA=(t,e,n)=>(e.push(0),function(r,o){let i,s=0,a=-1;for(;s===0&&++a<n;)i=t[a],s=ip(i(r),i(o));return s*e[a]});function hA(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}function op(t,e){return Object.hasOwn(t,e)}function ds(t){return typeof t=="boolean"}function dA(t){return Object.prototype.toString.call(t)==="[object Date]"}function pA(t){return t&&Rn(t[Symbol.iterator])}function Ht(t){return typeof t=="number"}function gA(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function rt(t){return typeof t=="string"}function sp(t,e){const n=t[0],r=Wn(t),o=+e;return o?o===1?r:n+o*(r-n):n}function ps(t){return t&&Wn(t)-t[0]||0}function Fu(t){return _t(t)?"["+t.map(Fu)+"]":Rt(t)||rt(t)?JSON.stringify(t).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):t}function mA(t){return t==null||t===""?null:!t||t==="false"||t==="0"?!1:!!t}const yA=t=>Ht(t)||dA(t)?t:Date.parse(t);function bA(t,e){return e=e||yA,t==null||t===""?null:e(t)}function wA(t){return t==null||t===""?null:t+""}function xA(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 fc=globalThis,Su=fc.ShadowRoot&&(fc.ShadyCSS===void 0||fc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,X0=Symbol(),K0=new WeakMap;let cA=class{constructor(e,n,r){if(this._$cssResult$=!0,r!==X0)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(Su&&e===void 0){const r=n!==void 0&&n.length===1;r&&(e=K0.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&K0.set(n,e))}return e}toString(){return this.cssText}};const lA=t=>new cA(typeof t=="string"?t:t+"",void 0,X0),uA=(t,e)=>{if(Su)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const r=document.createElement("style"),o=fc.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=n.cssText,t.appendChild(r)}},J0=Su?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const r of e.cssRules)n+=r.cssText;return lA(n)})(t):t;/**
5
+ */const xc=globalThis,Mu=xc.ShadowRoot&&(xc.ShadyCSS===void 0||xc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ap=Symbol(),cp=new WeakMap;let vA=class{constructor(e,n,r){if(this._$cssResult$=!0,r!==ap)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(Mu&&e===void 0){const r=n!==void 0&&n.length===1;r&&(e=cp.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&cp.set(n,e))}return e}toString(){return this.cssText}};const AA=t=>new vA(typeof t=="string"?t:t+"",void 0,ap),EA=(t,e)=>{if(Mu)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const r=document.createElement("style"),o=xc.litNonce;o!==void 0&&r.setAttribute("nonce",o),r.textContent=n.cssText,t.appendChild(r)}},lp=Mu?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const r of e.cssRules)n+=r.cssText;return AA(n)})(t):t;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:fA,defineProperty:hA,getOwnPropertyDescriptor:dA,getOwnPropertyNames:pA,getOwnPropertySymbols:gA,getPrototypeOf:mA}=Object,dr=globalThis,$0=dr.trustedTypes,bA=$0?$0.emptyScript:"",Cu=dr.reactiveElementPolyfillSupport,hs=(t,e)=>t,Iu={toAttribute(t,e){switch(e){case Boolean:t=t?bA: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}},ep=(t,e)=>!fA(t,e),tp={attribute:!0,type:String,converter:Iu,reflect:!1,useDefault:!1,hasChanged:ep};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),dr.litPropertyMetadata??(dr.litPropertyMetadata=new WeakMap);let qi=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=tp){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(e,n),!n.noAccessor){const r=Symbol(),o=this.getPropertyDescriptor(e,r,n);o!==void 0&&hA(this.prototype,e,o)}}static getPropertyDescriptor(e,n,r){const{get:o,set:i}=dA(this.prototype,e)??{get(){return this[n]},set(s){this[n]=s}};return{get:o,set(s){const a=o==null?void 0:o.call(this);i==null||i.call(this,s),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??tp}static _$Ei(){if(this.hasOwnProperty(hs("elementProperties")))return;const e=mA(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(hs("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(hs("properties"))){const n=this.properties,r=[...pA(n),...gA(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(J0(o))}else e!==void 0&&n.push(J0(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 uA(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)}_$ET(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:Iu).toAttribute(n,r.type);this._$Em=e,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(e,n){var i,s;const r=this.constructor,o=r._$Eh.get(e);if(o!==void 0&&this._$Em!==o){const a=r.getPropertyOptions(o),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)==null?void 0:i.fromAttribute)!==void 0?a.converter:Iu;this._$Em=o,this[o]=c.fromAttribute(n,a.type)??((s=this._$Ej)==null?void 0:s.get(o))??null,this._$Em=null}}requestUpdate(e,n,r){var o;if(e!==void 0){const i=this.constructor,s=this[e];if(r??(r=i.getPropertyOptions(e)),!((r.hasChanged??ep)(s,n)||r.useDefault&&r.reflect&&s===((o=this._$Ej)==null?void 0:o.get(e))&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,n,{useDefault:r,reflect:o,wrapped:i},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,s??n??this[e]),i!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(n=void 0),this._$AL.set(e,n)),o===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){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){const{wrapped:a}=s,c=this[i];a!==!0||this._$AL.has(i)||c===void 0||this.C(i,void 0,s,c)}}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._$EM()}catch(o){throw e=!1,this._$EM(),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)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(n=>this._$ET(n,this[n]))),this._$EM()}updated(e){}firstUpdated(e){}};qi.elementStyles=[],qi.shadowRootOptions={mode:"open"},qi[hs("elementProperties")]=new Map,qi[hs("finalized")]=new Map,Cu==null||Cu({ReactiveElement:qi}),(dr.reactiveElementVersions??(dr.reactiveElementVersions=[])).push("2.1.0");/**
9
+ */const{is:SA,defineProperty:CA,getOwnPropertyDescriptor:IA,getOwnPropertyNames:TA,getOwnPropertySymbols:DA,getPrototypeOf:BA}=Object,pr=globalThis,up=pr.trustedTypes,kA=up?up.emptyScript:"",Pu=pr.reactiveElementPolyfillSupport,gs=(t,e)=>t,Lu={toAttribute(t,e){switch(e){case Boolean:t=t?kA: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}},fp=(t,e)=>!SA(t,e),hp={attribute:!0,type:String,converter:Lu,reflect:!1,useDefault:!1,hasChanged:fp};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),pr.litPropertyMetadata??(pr.litPropertyMetadata=new WeakMap);let ji=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=hp){if(n.state&&(n.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((n=Object.create(n)).wrapped=!0),this.elementProperties.set(e,n),!n.noAccessor){const r=Symbol(),o=this.getPropertyDescriptor(e,r,n);o!==void 0&&CA(this.prototype,e,o)}}static getPropertyDescriptor(e,n,r){const{get:o,set:i}=IA(this.prototype,e)??{get(){return this[n]},set(s){this[n]=s}};return{get:o,set(s){const a=o==null?void 0:o.call(this);i==null||i.call(this,s),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??hp}static _$Ei(){if(this.hasOwnProperty(gs("elementProperties")))return;const e=BA(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(gs("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(gs("properties"))){const n=this.properties,r=[...TA(n),...DA(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(lp(o))}else e!==void 0&&n.push(lp(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 EA(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)}_$ET(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:Lu).toAttribute(n,r.type);this._$Em=e,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(e,n){var i,s;const r=this.constructor,o=r._$Eh.get(e);if(o!==void 0&&this._$Em!==o){const a=r.getPropertyOptions(o),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)==null?void 0:i.fromAttribute)!==void 0?a.converter:Lu;this._$Em=o,this[o]=c.fromAttribute(n,a.type)??((s=this._$Ej)==null?void 0:s.get(o))??null,this._$Em=null}}requestUpdate(e,n,r){var o;if(e!==void 0){const i=this.constructor,s=this[e];if(r??(r=i.getPropertyOptions(e)),!((r.hasChanged??fp)(s,n)||r.useDefault&&r.reflect&&s===((o=this._$Ej)==null?void 0:o.get(e))&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,n,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,n,{useDefault:r,reflect:o,wrapped:i},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(e)&&(this._$Ej.set(e,s??n??this[e]),i!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(n=void 0),this._$AL.set(e,n)),o===!0&&this._$Em!==e&&(this._$Eq??(this._$Eq=new Set)).add(e))}async _$EP(){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){const{wrapped:a}=s,c=this[i];a!==!0||this._$AL.has(i)||c===void 0||this.C(i,void 0,s,c)}}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._$EM()}catch(o){throw e=!1,this._$EM(),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)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach(n=>this._$ET(n,this[n]))),this._$EM()}updated(e){}firstUpdated(e){}};ji.elementStyles=[],ji.shadowRootOptions={mode:"open"},ji[gs("elementProperties")]=new Map,ji[gs("finalized")]=new Map,Pu==null||Pu({ReactiveElement:ji}),(pr.reactiveElementVersions??(pr.reactiveElementVersions=[])).push("2.1.0");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const ds=globalThis,hc=ds.trustedTypes,np=hc?hc.createPolicy("lit-html",{createHTML:t=>t}):void 0,rp="$lit$",pr=`lit$${Math.random().toFixed(9).slice(2)}$`,ip="?"+pr,yA=`<${ip}>`,Zr=document,ps=()=>Zr.createComment(""),gs=t=>t===null||typeof t!="object"&&typeof t!="function",Tu=Array.isArray,wA=t=>Tu(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Du=`[
14
- \f\r]`,ms=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,op=/-->/g,sp=/>/g,Xr=RegExp(`>|${Du}(?:([^\\s"'>=/]+)(${Du}*=${Du}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ap=/'/g,cp=/"/g,lp=/^(?:script|style|textarea|title)$/i,xA=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),ot=xA(1),Kr=Symbol.for("lit-noChange"),pt=Symbol.for("lit-nothing"),up=new WeakMap,Jr=Zr.createTreeWalker(Zr,129);function fp(t,e){if(!Tu(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return np!==void 0?np.createHTML(e):e}const vA=(t,e)=>{const n=t.length-1,r=[];let o,i=e===2?"<svg>":e===3?"<math>":"",s=ms;for(let a=0;a<n;a++){const c=t[a];let l,u,f=-1,h=0;for(;h<c.length&&(s.lastIndex=h,u=s.exec(c),u!==null);)h=s.lastIndex,s===ms?u[1]==="!--"?s=op:u[1]!==void 0?s=sp:u[2]!==void 0?(lp.test(u[2])&&(o=RegExp("</"+u[2],"g")),s=Xr):u[3]!==void 0&&(s=Xr):s===Xr?u[0]===">"?(s=o??ms,f=-1):u[1]===void 0?f=-2:(f=s.lastIndex-u[2].length,l=u[1],s=u[3]===void 0?Xr:u[3]==='"'?cp:ap):s===cp||s===ap?s=Xr:s===op||s===sp?s=ms:(s=Xr,o=void 0);const d=s===Xr&&t[a+1].startsWith("/>")?" ":"";i+=s===ms?c+yA:f>=0?(r.push(l),c.slice(0,f)+rp+c.slice(f)+pr+d):c+pr+(f===-2?a:d)}return[fp(t,i+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class bs{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]=vA(e,n);if(this.el=bs.createElement(l,r),Jr.currentNode=this.el.content,n===2||n===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(o=Jr.nextNode())!==null&&c.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const f of o.getAttributeNames())if(f.endsWith(rp)){const h=u[s++],d=o.getAttribute(f).split(pr),p=/([.?@])?(.*)/.exec(h);c.push({type:1,index:i,name:p[2],strings:d,ctor:p[1]==="."?EA:p[1]==="?"?SA:p[1]==="@"?CA:dc}),o.removeAttribute(f)}else f.startsWith(pr)&&(c.push({type:6,index:i}),o.removeAttribute(f));if(lp.test(o.tagName)){const f=o.textContent.split(pr),h=f.length-1;if(h>0){o.textContent=hc?hc.emptyScript:"";for(let d=0;d<h;d++)o.append(f[d],ps()),Jr.nextNode(),c.push({type:2,index:++i});o.append(f[h],ps())}}}else if(o.nodeType===8)if(o.data===ip)c.push({type:2,index:i});else{let f=-1;for(;(f=o.data.indexOf(pr,f+1))!==-1;)c.push({type:7,index:i}),f+=pr.length-1}i++}}static createElement(e,n){const r=Zr.createElement("template");return r.innerHTML=e,r}}function ji(t,e,n=t,r){var s,a;if(e===Kr)return e;let o=r!==void 0?(s=n._$Co)==null?void 0:s[r]:n._$Cl;const i=gs(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=ji(t,o._$AS(t,e.values),o,r)),e}class AA{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)??Zr).importNode(n,!0);Jr.currentNode=o;let i=Jr.nextNode(),s=0,a=0,c=r[0];for(;c!==void 0;){if(s===c.index){let l;c.type===2?l=new ys(i,i.nextSibling,this,e):c.type===1?l=new c.ctor(i,c.name,c.strings,this,e):c.type===6&&(l=new IA(i,this,e)),this._$AV.push(l),c=r[++a]}s!==(c==null?void 0:c.index)&&(i=Jr.nextNode(),s++)}return Jr.currentNode=Zr,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 ys{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=ji(this,e,n),gs(e)?e===pt||e==null||e===""?(this._$AH!==pt&&this._$AR(),this._$AH=pt):e!==this._$AH&&e!==Kr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):wA(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&&gs(this._$AH)?this._$AA.nextSibling.data=e:this.T(Zr.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=bs.createElement(fp(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 AA(o,this),a=s.u(this.options);s.p(n),this.T(a),this._$AH=s}}_$AC(e){let n=up.get(e.strings);return n===void 0&&up.set(e.strings,n=new bs(e)),n}k(e){Tu(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 ys(this.O(ps()),this.O(ps()),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 dc{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=ji(this,e,n,0),s=!gs(e)||e!==this._$AH&&e!==Kr,s&&(this._$AH=e);else{const a=e;let c,l;for(e=i[0],c=0;c<i.length-1;c++)l=ji(this,a[r+c],n,c),l===Kr&&(l=this._$AH[c]),s||(s=!gs(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 EA extends dc{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===pt?void 0:e}}class SA extends dc{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==pt)}}class CA extends dc{constructor(e,n,r,o,i){super(e,n,r,o,i),this.type=5}_$AI(e,n=this){if((e=ji(this,e,n,0)??pt)===Kr)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 IA=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){ji(this,e)}};const Bu=ds.litHtmlPolyfillSupport;Bu==null||Bu(bs,ys),(ds.litHtmlVersions??(ds.litHtmlVersions=[])).push("3.3.0");const ws=(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 ys(e.insertBefore(ps(),i),i,void 0,n??{})}return o._$AI(t),o};/**
13
+ */const ms=globalThis,vc=ms.trustedTypes,dp=vc?vc.createPolicy("lit-html",{createHTML:t=>t}):void 0,pp="$lit$",gr=`lit$${Math.random().toFixed(9).slice(2)}$`,gp="?"+gr,_A=`<${gp}>`,Xr=document,ys=()=>Xr.createComment(""),bs=t=>t===null||typeof t!="object"&&typeof t!="function",Ou=Array.isArray,RA=t=>Ou(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Nu=`[
14
+ \f\r]`,ws=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,mp=/-->/g,yp=/>/g,Kr=RegExp(`>|${Nu}(?:([^\\s"'>=/]+)(${Nu}*=${Nu}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),bp=/'/g,wp=/"/g,xp=/^(?:script|style|textarea|title)$/i,FA=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),ot=FA(1),Jr=Symbol.for("lit-noChange"),pt=Symbol.for("lit-nothing"),vp=new WeakMap,$r=Xr.createTreeWalker(Xr,129);function Ap(t,e){if(!Ou(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return dp!==void 0?dp.createHTML(e):e}const MA=(t,e)=>{const n=t.length-1,r=[];let o,i=e===2?"<svg>":e===3?"<math>":"",s=ws;for(let a=0;a<n;a++){const c=t[a];let l,u,f=-1,h=0;for(;h<c.length&&(s.lastIndex=h,u=s.exec(c),u!==null);)h=s.lastIndex,s===ws?u[1]==="!--"?s=mp:u[1]!==void 0?s=yp:u[2]!==void 0?(xp.test(u[2])&&(o=RegExp("</"+u[2],"g")),s=Kr):u[3]!==void 0&&(s=Kr):s===Kr?u[0]===">"?(s=o??ws,f=-1):u[1]===void 0?f=-2:(f=s.lastIndex-u[2].length,l=u[1],s=u[3]===void 0?Kr:u[3]==='"'?wp:bp):s===wp||s===bp?s=Kr:s===mp||s===yp?s=ws:(s=Kr,o=void 0);const d=s===Kr&&t[a+1].startsWith("/>")?" ":"";i+=s===ws?c+_A:f>=0?(r.push(l),c.slice(0,f)+pp+c.slice(f)+gr+d):c+gr+(f===-2?a:d)}return[Ap(t,i+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class xs{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]=MA(e,n);if(this.el=xs.createElement(l,r),$r.currentNode=this.el.content,n===2||n===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(o=$r.nextNode())!==null&&c.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const f of o.getAttributeNames())if(f.endsWith(pp)){const h=u[s++],d=o.getAttribute(f).split(gr),p=/([.?@])?(.*)/.exec(h);c.push({type:1,index:i,name:p[2],strings:d,ctor:p[1]==="."?LA:p[1]==="?"?OA:p[1]==="@"?NA:Ac}),o.removeAttribute(f)}else f.startsWith(gr)&&(c.push({type:6,index:i}),o.removeAttribute(f));if(xp.test(o.tagName)){const f=o.textContent.split(gr),h=f.length-1;if(h>0){o.textContent=vc?vc.emptyScript:"";for(let d=0;d<h;d++)o.append(f[d],ys()),$r.nextNode(),c.push({type:2,index:++i});o.append(f[h],ys())}}}else if(o.nodeType===8)if(o.data===gp)c.push({type:2,index:i});else{let f=-1;for(;(f=o.data.indexOf(gr,f+1))!==-1;)c.push({type:7,index:i}),f+=gr.length-1}i++}}static createElement(e,n){const r=Xr.createElement("template");return r.innerHTML=e,r}}function Wi(t,e,n=t,r){var s,a;if(e===Jr)return e;let o=r!==void 0?(s=n._$Co)==null?void 0:s[r]:n._$Cl;const i=bs(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=Wi(t,o._$AS(t,e.values),o,r)),e}class PA{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)??Xr).importNode(n,!0);$r.currentNode=o;let i=$r.nextNode(),s=0,a=0,c=r[0];for(;c!==void 0;){if(s===c.index){let l;c.type===2?l=new vs(i,i.nextSibling,this,e):c.type===1?l=new c.ctor(i,c.name,c.strings,this,e):c.type===6&&(l=new zA(i,this,e)),this._$AV.push(l),c=r[++a]}s!==(c==null?void 0:c.index)&&(i=$r.nextNode(),s++)}return $r.currentNode=Xr,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 vs{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=Wi(this,e,n),bs(e)?e===pt||e==null||e===""?(this._$AH!==pt&&this._$AR(),this._$AH=pt):e!==this._$AH&&e!==Jr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):RA(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&&bs(this._$AH)?this._$AA.nextSibling.data=e:this.T(Xr.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=xs.createElement(Ap(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 PA(o,this),a=s.u(this.options);s.p(n),this.T(a),this._$AH=s}}_$AC(e){let n=vp.get(e.strings);return n===void 0&&vp.set(e.strings,n=new xs(e)),n}k(e){Ou(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 vs(this.O(ys()),this.O(ys()),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 Ac{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=Wi(this,e,n,0),s=!bs(e)||e!==this._$AH&&e!==Jr,s&&(this._$AH=e);else{const a=e;let c,l;for(e=i[0],c=0;c<i.length-1;c++)l=Wi(this,a[r+c],n,c),l===Jr&&(l=this._$AH[c]),s||(s=!bs(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 LA extends Ac{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===pt?void 0:e}}class OA extends Ac{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==pt)}}class NA extends Ac{constructor(e,n,r,o,i){super(e,n,r,o,i),this.type=5}_$AI(e,n=this){if((e=Wi(this,e,n,0)??pt)===Jr)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 zA=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){Wi(this,e)}};const zu=ms.litHtmlPolyfillSupport;zu==null||zu(xs,vs),(ms.litHtmlVersions??(ms.litHtmlVersions=[])).push("3.3.0");const As=(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 vs(e.insertBefore(ys(),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
- */const $r=globalThis;let pc=class extends qi{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=ws(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 Kr}};pc._$litElement$=!0,pc.finalized=!0,(hv=$r.litElementHydrateSupport)==null||hv.call($r,{LitElement:pc});const ku=$r.litElementPolyfillSupport;ku==null||ku({LitElement:pc}),($r.litElementVersions??($r.litElementVersions=[])).push("4.2.0");var hp={},_u={},Ru=34,xs=10,Fu=13;function dp(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function TA(t,e){var n=dp(t);return function(r,o){return e(n(r),o,t)}}function pp(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 DA(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":DA(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 gp(t){var e=new RegExp('["'+t+`
20
- \r]`),n=t.charCodeAt(0);function r(f,h){var d,p,y=o(f,function(v,b){if(d)return d(v,b-1);p=v,d=h?TA(v,h):dp(v)});return y.columns=p||[],y}function o(f,h){var d=[],p=f.length,y=0,v=0,b,A=p<=0,S=!1;f.charCodeAt(p-1)===xs&&--p,f.charCodeAt(p-1)===Fu&&--p;function E(){if(A)return _u;if(S)return S=!1,hp;var _,B=y,N;if(f.charCodeAt(B)===Ru){for(;y++<p&&f.charCodeAt(y)!==Ru||f.charCodeAt(++y)===Ru;);return(_=y)>=p?A=!0:(N=f.charCodeAt(y++))===xs?S=!0:N===Fu&&(S=!0,f.charCodeAt(y)===xs&&++y),f.slice(B+1,_-1).replace(/""/g,'"')}for(;y<p;){if((N=f.charCodeAt(_=y++))===xs)S=!0;else if(N===Fu)S=!0,f.charCodeAt(y)===xs&&++y;else if(N!==n)continue;return f.slice(B,_)}return A=!0,f.slice(B,p)}for(;(b=E())!==_u;){for(var I=[];b!==hp&&b!==_u;)I.push(b),b=E();h&&(I=h(I,v++))==null||d.push(I)}return d}function i(f,h){return f.map(function(d){return h.map(function(p){return u(d[p])}).join(t)})}function s(f,h){return h==null&&(h=pp(f)),[h.map(u).join(t)].concat(i(f,h)).join(`
21
- `)}function a(f,h){return h==null&&(h=pp(f)),i(f,h).join(`
19
+ */const ei=globalThis;let Ec=class extends ji{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=As(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 Jr}};Ec._$litElement$=!0,Ec.finalized=!0,(Sv=ei.litElementHydrateSupport)==null||Sv.call(ei,{LitElement:Ec});const Uu=ei.litElementPolyfillSupport;Uu==null||Uu({LitElement:Ec}),(ei.litElementVersions??(ei.litElementVersions=[])).push("4.2.0");var Ep={},Gu={},Hu=34,Es=10,Vu=13;function Sp(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function UA(t,e){var n=Sp(t);return function(r,o){return e(n(r),o,t)}}function Cp(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 GA(t){return t<0?"-"+Wt(-t,6):t>9999?"+"+Wt(t,6):Wt(t,4)}function HA(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":GA(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 Ip(t){var e=new RegExp('["'+t+`
20
+ \r]`),n=t.charCodeAt(0);function r(f,h){var d,p,b=o(f,function(v,y){if(d)return d(v,y-1);p=v,d=h?UA(v,h):Sp(v)});return b.columns=p||[],b}function o(f,h){var d=[],p=f.length,b=0,v=0,y,A=p<=0,S=!1;f.charCodeAt(p-1)===Es&&--p,f.charCodeAt(p-1)===Vu&&--p;function E(){if(A)return Gu;if(S)return S=!1,Ep;var _,B=b,N;if(f.charCodeAt(B)===Hu){for(;b++<p&&f.charCodeAt(b)!==Hu||f.charCodeAt(++b)===Hu;);return(_=b)>=p?A=!0:(N=f.charCodeAt(b++))===Es?S=!0:N===Vu&&(S=!0,f.charCodeAt(b)===Es&&++b),f.slice(B+1,_-1).replace(/""/g,'"')}for(;b<p;){if((N=f.charCodeAt(_=b++))===Es)S=!0;else if(N===Vu)S=!0,f.charCodeAt(b)===Es&&++b;else if(N!==n)continue;return f.slice(B,_)}return A=!0,f.slice(B,p)}for(;(y=E())!==Gu;){for(var I=[];y!==Ep&&y!==Gu;)I.push(y),y=E();h&&(I=h(I,v++))==null||d.push(I)}return d}function i(f,h){return f.map(function(d){return h.map(function(p){return u(d[p])}).join(t)})}function s(f,h){return h==null&&(h=Cp(f)),[h.map(u).join(t)].concat(i(f,h)).join(`
21
+ `)}function a(f,h){return h==null&&(h=Cp(f)),i(f,h).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?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 kA=gp(" "),_A=kA.parseRows;function RA(t){return t}function FA(t){if(t==null)return RA;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 MA(t,e){for(var n,r=t.length,o=r-e;o<--r;)n=t[o],t[o++]=t[r],t[r]=n}function PA(t,e){return typeof e=="string"&&(e=t.objects[e]),e.type==="GeometryCollection"?{type:"FeatureCollection",features:e.geometries.map(function(n){return mp(t,n)})}:mp(t,e)}function mp(t,e){var n=e.id,r=e.bbox,o=e.properties==null?{}:e.properties,i=bp(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 bp(t,e){var n=FA(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&&MA(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 LA(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 OA(t){return bp(t,NA.apply(this,arguments))}function NA(t,e,n){var r,o,i;if(arguments.length>1)r=zA(t,e,n);else for(o=0,r=new Array(i=t.arcs.length);o<i;++o)r[o]=o;return{type:"MultiLineString",arcs:LA(t,r)}}function zA(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 ei(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function UA(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ti(t){let e,n,r;t.length!==2?(e=ei,n=(a,c)=>ei(t(a),c),r=(a,c)=>t(a)-c):(e=t===ei||t===UA?t:GA,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 GA(){return 0}function yp(t){return t===null?NaN:+t}function*HA(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 wp=ti(ei),gr=wp.right;wp.left,ti(yp).center;function VA(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 qA(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 jA(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 Wn extends Map{constructor(e,n=QA){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(xp(this,e))}has(e){return super.has(xp(this,e))}set(e,n){return super.set(WA(this,e),n)}delete(e){return super.delete(YA(this,e))}}function xp({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function WA({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function YA({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function QA(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Mu(t){return t}function gc(t,...e){return vp(t,Mu,Mu,e)}function ZA(t,...e){return vp(t,Array.from,Mu,e)}function vp(t,e,n,r){return function o(i,s){if(s>=r.length)return n(i);const a=new Wn,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 XA(t=ei){if(t===ei)return Ap;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 Ap(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const KA=Math.sqrt(50),JA=Math.sqrt(10),$A=Math.sqrt(2);function mc(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>=KA?10:i>=JA?5:i>=$A?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?mc(t,e,n*2):[a,c,l]}function bc(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?mc(e,t,n):mc(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 Pu(t,e,n){return e=+e,t=+t,n=+n,mc(t,e,n)[2]}function ni(t,e,n){e=+e,t=+t,n=+n;const r=e<t,o=r?Pu(e,t,n):Pu(t,e,n);return(r?-1:1)*(o<0?1/-o:o)}function Lu(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 Ou(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 Ep(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?Ap:XA(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));Ep(t,e,d,p,o)}const i=t[e];let s=n,a=r;for(vs(t,n,e),o(t[r],i)>0&&vs(t,n,r);s<a;){for(vs(t,s,a),++s,--a;o(t[s],i)<0;)++s;for(;o(t[a],i)>0;)--a}o(t[n],i)===0?vs(t,n,a):(++a,vs(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function vs(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function e3(t,e,n){if(t=Float64Array.from(HA(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Ou(t);if(e>=1)return Lu(t);var r,o=(r-1)*e,i=Math.floor(o),s=Lu(Ep(t,i).subarray(0,i+1)),a=Ou(t.subarray(i+1));return s+(a-s)*(o-i)}}function Sp(t,e,n=yp){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 t3(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 n3(t,e){return e3(t,.5,e)}function As(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 Es(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 r3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function yc(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 Wi(t){return t=yc(Math.abs(t)),t?t[1]:NaN}function i3(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 o3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var s3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yi(t){if(!(e=s3.exec(t)))throw new Error("invalid format: "+t);var e;return new Nu({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]})}Yi.prototype=Nu.prototype;function Nu(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+""}Nu.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 a3(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 Cp;function c3(t,e){var n=yc(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(Cp=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")+yc(t,Math.max(0,e+i-1))[0]}function Ip(t,e){var n=yc(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 Tp={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:r3,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)=>Ip(t*100,e),r:Ip,s:c3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Dp(t){return t}var Bp=Array.prototype.map,kp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function l3(t){var e=t.grouping===void 0||t.thousands===void 0?Dp:i3(Bp.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?Dp:o3(Bp.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=Yi(f);var h=f.fill,d=f.align,p=f.sign,y=f.symbol,v=f.zero,b=f.width,A=f.comma,S=f.precision,E=f.trim,I=f.type;I==="n"?(A=!0,I="g"):Tp[I]||(S===void 0&&(S=12),E=!0,I="g"),(v||h==="0"&&d==="=")&&(v=!0,h="0",d="=");var _=y==="$"?n:y==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",B=y==="$"?r:/[%p]/.test(I)?s:"",N=Tp[I],F=/[defgprs%]/.test(I);S=S===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function M(C){var Y=_,Q=B,oe,se,ae;if(I==="c")Q=N(C)+Q,C="";else{C=+C;var ce=C<0||1/C<0;if(C=isNaN(C)?c:N(Math.abs(C),S),E&&(C=a3(C)),ce&&+C==0&&p!=="+"&&(ce=!1),Y=(ce?p==="("?p:a:p==="-"||p==="("?"":p)+Y,Q=(I==="s"?kp[8+Cp/3]:"")+Q+(ce&&p==="("?")":""),F){for(oe=-1,se=C.length;++oe<se;)if(ae=C.charCodeAt(oe),48>ae||ae>57){Q=(ae===46?o+C.slice(oe+1):C.slice(oe))+Q,C=C.slice(0,oe);break}}}A&&!v&&(C=e(C,1/0));var be=Y.length+C.length+Q.length,he=be<b?new Array(b-be+1).join(h):"";switch(A&&v&&(C=e(he+C,he.length?b-Q.length:1/0),he=""),d){case"<":C=Y+C+Q+he;break;case"=":C=Y+he+C+Q;break;case"^":C=he.slice(0,be=he.length>>1)+Y+C+Q+he.slice(be);break;default:C=he+Y+C+Q;break}return i(C)}return M.toString=function(){return f+""},M}function u(f,h){var d=l((f=Yi(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Wi(h)/3)))*3,y=Math.pow(10,-p),v=kp[8+p/3];return function(b){return d(y*b)+v}}return{format:l,formatPrefix:u}}var wc,Dt,_p;u3({thousands:",",grouping:[3],currency:["$",""]});function u3(t){return wc=l3(t),Dt=wc.format,_p=wc.formatPrefix,wc}function f3(t){return Math.max(0,-Wi(Math.abs(t)))}function h3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Wi(e)/3)))*3-Wi(Math.abs(t)))}function d3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Wi(e)-Wi(t))+1}const zu=new Date,Uu=new Date;function mt(t,e,n,r){function o(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(t(i=new Date(+i)),i),o.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),o.round=i=>{const s=o(i),a=o.ceil(i);return i-s<a-i?s:a},o.offset=(i,s)=>(e(i=new Date(+i),s==null?1:Math.floor(s)),i),o.range=(i,s,a)=>{const c=[];if(i=o.ceil(i),a=a==null?1:Math.floor(a),!(i<s)||!(a>0))return c;let l;do c.push(l=new Date(+i)),e(i,a),t(i);while(l<i&&i<s);return c},o.filter=i=>mt(s=>{if(s>=s)for(;t(s),!i(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!i(s););else for(;--a>=0;)for(;e(s,1),!i(s););}),n&&(o.count=(i,s)=>(zu.setTime(+i),Uu.setTime(+s),t(zu),t(Uu),Math.floor(n(zu,Uu))),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 Qi=mt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Qi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?mt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Qi),Qi.range;const Yn=1e3,on=Yn*60,Qn=on*60,Zn=Qn*24,Gu=Zn*7,Rp=Zn*30,Hu=Zn*365,Xn=mt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Yn)},(t,e)=>(e-t)/Yn,t=>t.getUTCSeconds());Xn.range;const xc=mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Yn)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getMinutes());xc.range;const vc=mt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getUTCMinutes());vc.range;const Ac=mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Yn-t.getMinutes()*on)},(t,e)=>{t.setTime(+t+e*Qn)},(t,e)=>(e-t)/Qn,t=>t.getHours());Ac.range;const Ec=mt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Qn)},(t,e)=>(e-t)/Qn,t=>t.getUTCHours());Ec.range;const mr=mt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*on)/Zn,t=>t.getDate()-1);mr.range;const ri=mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Zn,t=>t.getUTCDate()-1);ri.range;const Fp=mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Zn,t=>Math.floor(t/Zn));Fp.range;function ii(t){return mt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*on)/Gu)}const Ss=ii(0),Sc=ii(1),p3=ii(2),g3=ii(3),Zi=ii(4),m3=ii(5),b3=ii(6);Ss.range,Sc.range,p3.range,g3.range,Zi.range,m3.range,b3.range;function oi(t){return mt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Gu)}const Cs=oi(0),Cc=oi(1),y3=oi(2),w3=oi(3),Xi=oi(4),x3=oi(5),v3=oi(6);Cs.range,Cc.range,y3.range,w3.range,Xi.range,x3.range,v3.range;const Ki=mt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Ki.range;const Ji=mt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Ji.range;const _n=mt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());_n.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:mt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}),_n.range;const Rn=mt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Rn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:mt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}),Rn.range;function Mp(t,e,n,r,o,i){const s=[[Xn,1,Yn],[Xn,5,5*Yn],[Xn,15,15*Yn],[Xn,30,30*Yn],[i,1,on],[i,5,5*on],[i,15,15*on],[i,30,30*on],[o,1,Qn],[o,3,3*Qn],[o,6,6*Qn],[o,12,12*Qn],[r,1,Zn],[r,2,2*Zn],[n,1,Gu],[e,1,Rp],[e,3,3*Rp],[t,1,Hu]];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=ti(([,,v])=>v).right(s,h);if(d===s.length)return t.every(ni(l/Hu,u/Hu,f));if(d===0)return Qi.every(Math.max(ni(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[A3,E3]=Mp(Rn,Ji,Cs,Fp,Ec,vc),[S3,C3]=Mp(_n,Ki,Ss,mr,Ac,xc),Is="year",Ts="quarter",Ds="month",Bs="week",ks="date",Ic="day",Vu="dayofyear",_s="hours",Rs="minutes",Fs="seconds",Tc="milliseconds";[Is,Ts,Ds,Bs,ks,Ic,Vu,_s,Rs,Fs,Tc].reduce((t,e,n)=>(t[e]=1+n,t),{});const I3={[Is]:_n,[Ts]:Ki.every(3),[Ds]:Ki,[Bs]:Ss,[ks]:mr,[Ic]:mr,[Vu]:mr,[_s]:Ac,[Rs]:xc,[Fs]:Xn,[Tc]:Qi},T3={[Is]:Rn,[Ts]:Ji.every(3),[Ds]:Ji,[Bs]:Cs,[ks]:ri,[Ic]:ri,[Vu]:ri,[_s]:Ec,[Rs]:vc,[Fs]:Xn,[Tc]:Qi};function D3(t){return I3[t]}function B3(t){return T3[t]}function qu(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 ju(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 Pp(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=Ps(o),u=Ls(o),f=Ps(i),h=Ls(i),d=Ps(s),p=Ls(s),y=Ps(a),v=Ls(a),b=Ps(c),A=Ls(c),S={a:ce,A:be,b:he,B:Ie,c:null,d:Gp,e:Gp,f:J3,g:cE,G:uE,H:Z3,I:X3,j:K3,L:Hp,m:$3,M:eE,p:me,q:Ae,Q:Qp,s:Zp,S:tE,u:nE,U:rE,V:iE,w:oE,W:sE,x:null,X:null,y:aE,Y:lE,Z:fE,"%":Yp},E={a:De,A:Ge,b:Ve,B:q,c:null,d:qp,e:qp,f:gE,g:CE,G:TE,H:hE,I:dE,j:pE,L:jp,m:mE,M:bE,p:j,q:ee,Q:Qp,s:Zp,S:yE,u:wE,U:xE,V:vE,w:AE,W:EE,x:null,X:null,y:SE,Y:IE,Z:DE,"%":Yp},I={a:M,A:C,b:Y,B:Q,c:oe,d:zp,e:zp,f:j3,g:Np,G:Op,H:Up,I:Up,j:G3,L:q3,m:U3,M:H3,p:F,q:z3,Q:Y3,s:Q3,S:V3,u:M3,U:P3,V:L3,w:F3,W:O3,x:se,X:ae,y:Np,Y:Op,Z:N3,"%":W3};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,Ee,Re;for(L instanceof Date||(L=new Date(+L));++te<Be;)J.charCodeAt(te)===37&&(D.push(J.slice(le,te)),(Ee=Lp[ve=J.charAt(++te)])!=null?ve=J.charAt(++te):Ee=ve==="e"?" ":"0",(Re=fe[ve])&&(ve=Re(L,Ee)),D.push(ve),le=te+1);return D.push(J.slice(le,te)),D.join("")}}function B(J,fe){return function(L){var D=Ms(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=ju(Ms(D.y,0,1)),Be=le.getUTCDay(),le=Be>4||Be===0?Cc.ceil(le):Cc(le),le=ri.offset(le,(D.V-1)*7),D.y=le.getUTCFullYear(),D.m=le.getUTCMonth(),D.d=le.getUTCDate()+(D.w+6)%7):(le=qu(Ms(D.y,0,1)),Be=le.getDay(),le=Be>4||Be===0?Sc.ceil(le):Sc(le),le=mr.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?ju(Ms(D.y,0,1)).getUTCDay():qu(Ms(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,ju(D)):qu(D)}}function N(J,fe,L,D){for(var te=0,le=fe.length,Be=L.length,ve,Ee;te<le;){if(D>=Be)return-1;if(ve=fe.charCodeAt(te++),ve===37){if(ve=fe.charAt(te++),Ee=I[ve in Lp?fe.charAt(te++):ve],!Ee||(D=Ee(J,L,D))<0)return-1}else if(ve!=L.charCodeAt(D++))return-1}return D}function F(J,fe,L){var D=l.exec(fe.slice(L));return D?(J.p=u.get(D[0].toLowerCase()),L+D[0].length):-1}function M(J,fe,L){var D=d.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=h.get(D[0].toLowerCase()),L+D[0].length):-1}function Y(J,fe,L){var D=b.exec(fe.slice(L));return D?(J.m=A.get(D[0].toLowerCase()),L+D[0].length):-1}function Q(J,fe,L){var D=y.exec(fe.slice(L));return D?(J.m=v.get(D[0].toLowerCase()),L+D[0].length):-1}function oe(J,fe,L){return N(J,e,fe,L)}function se(J,fe,L){return N(J,n,fe,L)}function ae(J,fe,L){return N(J,r,fe,L)}function ce(J){return s[J.getDay()]}function be(J){return i[J.getDay()]}function he(J){return c[J.getMonth()]}function Ie(J){return a[J.getMonth()]}function me(J){return o[+(J.getHours()>=12)]}function Ae(J){return 1+~~(J.getMonth()/3)}function De(J){return s[J.getUTCDay()]}function Ge(J){return i[J.getUTCDay()]}function Ve(J){return c[J.getUTCMonth()]}function q(J){return a[J.getUTCMonth()]}function 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 Lp={"-":"",_:" ",0:"0"},xt=/^\s*\d+/,k3=/^%/,_3=/[\\^$*+?|[\]().{}]/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 R3(t){return t.replace(_3,"\\$&")}function Ps(t){return new RegExp("^(?:"+t.map(R3).join("|")+")","i")}function Ls(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function F3(t,e,n){var r=xt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function M3(t,e,n){var r=xt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function P3(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function L3(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function O3(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Op(t,e,n){var r=xt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Np(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function N3(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 z3(t,e,n){var r=xt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function U3(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function zp(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function G3(t,e,n){var r=xt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Up(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function H3(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function V3(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function q3(t,e,n){var r=xt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function j3(t,e,n){var r=xt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function W3(t,e,n){var r=k3.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Y3(t,e,n){var r=xt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Q3(t,e,n){var r=xt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Gp(t,e){return je(t.getDate(),e,2)}function Z3(t,e){return je(t.getHours(),e,2)}function X3(t,e){return je(t.getHours()%12||12,e,2)}function K3(t,e){return je(1+mr.count(_n(t),t),e,3)}function Hp(t,e){return je(t.getMilliseconds(),e,3)}function J3(t,e){return Hp(t,e)+"000"}function $3(t,e){return je(t.getMonth()+1,e,2)}function eE(t,e){return je(t.getMinutes(),e,2)}function tE(t,e){return je(t.getSeconds(),e,2)}function nE(t){var e=t.getDay();return e===0?7:e}function rE(t,e){return je(Ss.count(_n(t)-1,t),e,2)}function Vp(t){var e=t.getDay();return e>=4||e===0?Zi(t):Zi.ceil(t)}function iE(t,e){return t=Vp(t),je(Zi.count(_n(t),t)+(_n(t).getDay()===4),e,2)}function oE(t){return t.getDay()}function sE(t,e){return je(Sc.count(_n(t)-1,t),e,2)}function aE(t,e){return je(t.getFullYear()%100,e,2)}function cE(t,e){return t=Vp(t),je(t.getFullYear()%100,e,2)}function lE(t,e){return je(t.getFullYear()%1e4,e,4)}function uE(t,e){var n=t.getDay();return t=n>=4||n===0?Zi(t):Zi.ceil(t),je(t.getFullYear()%1e4,e,4)}function fE(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+je(e/60|0,"0",2)+je(e%60,"0",2)}function qp(t,e){return je(t.getUTCDate(),e,2)}function hE(t,e){return je(t.getUTCHours(),e,2)}function dE(t,e){return je(t.getUTCHours()%12||12,e,2)}function pE(t,e){return je(1+ri.count(Rn(t),t),e,3)}function jp(t,e){return je(t.getUTCMilliseconds(),e,3)}function gE(t,e){return jp(t,e)+"000"}function mE(t,e){return je(t.getUTCMonth()+1,e,2)}function bE(t,e){return je(t.getUTCMinutes(),e,2)}function yE(t,e){return je(t.getUTCSeconds(),e,2)}function wE(t){var e=t.getUTCDay();return e===0?7:e}function xE(t,e){return je(Cs.count(Rn(t)-1,t),e,2)}function Wp(t){var e=t.getUTCDay();return e>=4||e===0?Xi(t):Xi.ceil(t)}function vE(t,e){return t=Wp(t),je(Xi.count(Rn(t),t)+(Rn(t).getUTCDay()===4),e,2)}function AE(t){return t.getUTCDay()}function EE(t,e){return je(Cc.count(Rn(t)-1,t),e,2)}function SE(t,e){return je(t.getUTCFullYear()%100,e,2)}function CE(t,e){return t=Wp(t),je(t.getUTCFullYear()%100,e,2)}function IE(t,e){return je(t.getUTCFullYear()%1e4,e,4)}function TE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Xi(t):Xi.ceil(t),je(t.getUTCFullYear()%1e4,e,4)}function DE(){return"+0000"}function Yp(){return"%"}function Qp(t){return+t}function Zp(t){return Math.floor(+t/1e3)}var $i,Wu,Xp,Yu,Kp;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 $i=Pp(t),Wu=$i.format,Xp=$i.parse,Yu=$i.utcFormat,Kp=$i.utcParse,$i}function Dc(t){const e={};return n=>e[n]||(e[n]=t(n))}function Jp(t,e,n){n=n||{},Rt(n)||bn(`Invalid time multi-format specifier: ${n}`);const r=e(Fs),o=e(Rs),i=e(_s),s=e(ks),a=e(Bs),c=e(Ds),l=e(Ts),u=e(Is),f=t(n[Tc]||".%L"),h=t(n[Fs]||":%S"),d=t(n[Rs]||"%I:%M"),p=t(n[_s]||"%I %p"),y=t(n[ks]||n[Ic]||"%a %d"),v=t(n[Bs]||"%b %d"),b=t(n[Ds]||"%B"),A=t(n[Ts]||"%B"),S=t(n[Is]||"%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:S)(E)}function $p(t){const e=Dc(t.format),n=Dc(t.utcFormat);return{timeFormat:r=>rt(r)?e(r):Jp(e,D3,r),utcFormat:r=>rt(r)?n(r):Jp(n,B3,r),timeParse:Dc(t.parse),utcParse:Dc(t.utcParse)}}let Qu;kE();function kE(){return Qu=$p({format:Wu,parse:Xp,utcFormat:Yu,utcParse:Kp})}function _E(t){return $p(Pp(t))}function RE(t){return arguments.length?Qu=_E(t):Qu}const FE=t=>t!=null&&t===t,ME=t=>t==="true"||t==="false"||t===!0||t===!1,PE=t=>!Number.isNaN(Date.parse(t)),eg=t=>!Number.isNaN(+t)&&!(t instanceof Date),LE=t=>eg(t)&&Number.isInteger(+t),tg={boolean:rA,integer:cc,number:cc,date:oA,string:sA,unknown:ac},Bc=[ME,LE,eg,PE],OE=["boolean","integer","number","date"];function NE(t,e){if(!t||!t.length)return"unknown";const n=t.length,r=Bc.length,o=Bc.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]&&FE(c)&&!Bc[a](c)&&(o[a]=0,++s,s===Bc.length))return"string";return OE[o.reduce((i,s)=>i===0?s:i,0)-1]}function zE(t,e){return e.reduce((n,r)=>(n[r]=NE(t,r),n),{})}function ng(t){const e=function(n,r){const o={delimiter:t};return Zu(n,r?$v(r,o):o)};return e.responseType="text",e}function Zu(t,e){return e.header&&(t=e.header.map(Eu).join(e.delimiter)+`
24
- `+t),gp(e.delimiter).parse(t+"")}Zu.responseType="text";function UE(t){return typeof Buffer=="function"&&kn(Buffer.isBuffer)?Buffer.isBuffer(t):!1}function Xu(t,e){const n=e&&e.property?sc(e.property):ac;return Rt(t)&&!UE(t)?GE(n(t),e):n(JSON.parse(t))}Xu.responseType="json";function GE(t,e){return!_t(t)&&tA(t)&&(t=[...t]),e&&e.copy?JSON.parse(JSON.stringify(t)):t}const HE={interior:(t,e)=>t!==e,exterior:(t,e)=>t===e};function rg(t,e){let n,r,o,i;return t=Xu(t,e),e&&e.feature?(n=PA,o=e.feature):e&&e.mesh?(n=OA,o=e.mesh,i=HE[e.filter]):bn("Missing TopoJSON feature or mesh parameter."),r=(r=t.objects[o])?n(t,r,i):bn("Invalid TopoJSON object: "+o),r&&r.features||[r]}rg.responseType="json";const Ku={dsv:Zu,csv:ng(","),tsv:ng(" "),json:Xu,topojson:rg};function Ju(t,e){return arguments.length>1?(Ku[t]=e,this):Q0(Ku,t)?Ku[t]:null}function $u(t,e,n,r){e=e||{};const o=Ju(e.type||"json");return o||bn("Unknown data format type: "+e.type),t=o(t,e),e.parse&&VE(t,e.parse,n,r),Q0(t,"columns")&&delete t.columns,t}function VE(t,e,n,r){if(!t.length)return;const o=RE();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=zE(t,i)),i=Object.keys(e);const h=i.map(d=>{const p=e[d];let y,v;if(p&&(p.startsWith("date:")||p.startsWith("utc:")))return y=p.split(/:(.+)?/,2),v=y[1],(v[0]==="'"&&v[v.length-1]==="'"||v[0]==='"'&&v[v.length-1]==='"')&&(v=v.slice(1,-1)),(y[0]==="utc"?r:n)(v);if(!tg[p])throw Error("Illegal format pattern: "+d+":"+p);return tg[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]=h[l](s[a])}/**
23
+ `)}function l(f){return f.map(u).join(t)}function u(f){return f==null?"":f instanceof Date?HA(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:o,format:s,formatBody:a,formatRows:c,formatRow:l,formatValue:u}}var VA=Ip(" "),qA=VA.parseRows;function jA(t){return t}function WA(t){if(t==null)return jA;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 YA(t,e){for(var n,r=t.length,o=r-e;o<--r;)n=t[o],t[o++]=t[r],t[r]=n}function QA(t,e){return typeof e=="string"&&(e=t.objects[e]),e.type==="GeometryCollection"?{type:"FeatureCollection",features:e.geometries.map(function(n){return Tp(t,n)})}:Tp(t,e)}function Tp(t,e){var n=e.id,r=e.bbox,o=e.properties==null?{}:e.properties,i=Dp(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 Dp(t,e){var n=WA(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&&YA(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 ZA(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 b=p===d?d:d.concat(p);r[b.start=d.start]=o[b.end=p.end]=b}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 XA(t){return Dp(t,KA.apply(this,arguments))}function KA(t,e,n){var r,o,i;if(arguments.length>1)r=JA(t,e,n);else for(o=0,r=new Array(i=t.arcs.length);o<i;++o)r[o]=o;return{type:"MultiLineString",arcs:ZA(t,r)}}function JA(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 ti(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $A(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ni(t){let e,n,r;t.length!==2?(e=ti,n=(a,c)=>ti(t(a),c),r=(a,c)=>t(a)-c):(e=t===ti||t===$A?t:e3,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 e3(){return 0}function Bp(t){return t===null?NaN:+t}function*t3(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 kp=ni(ti),mr=kp.right;kp.left,ni(Bp).center;function n3(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 r3(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 i3(t,e){let n,r;for(const o of t)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)));return[n,r]}class Yn extends Map{constructor(e,n=a3){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(_p(this,e))}has(e){return super.has(_p(this,e))}set(e,n){return super.set(o3(this,e),n)}delete(e){return super.delete(s3(this,e))}}function _p({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function o3({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function s3({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function a3(t){return t!==null&&typeof t=="object"?t.valueOf():t}function qu(t){return t}function Sc(t,...e){return Rp(t,qu,qu,e)}function c3(t,...e){return Rp(t,Array.from,qu,e)}function Rp(t,e,n,r){return function o(i,s){if(s>=r.length)return n(i);const a=new Yn,c=r[s++];let l=-1;for(const u of i){const f=c(u,++l,i),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 l3(t=ti){if(t===ti)return Fp;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 Fp(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const u3=Math.sqrt(50),f3=Math.sqrt(10),h3=Math.sqrt(2);function Cc(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>=u3?10:i>=f3?5:i>=h3?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?Cc(t,e,n*2):[a,c,l]}function Ic(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?Cc(e,t,n):Cc(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 ju(t,e,n){return e=+e,t=+t,n=+n,Cc(t,e,n)[2]}function ri(t,e,n){e=+e,t=+t,n=+n;const r=e<t,o=r?ju(e,t,n):ju(t,e,n);return(r?-1:1)*(o<0?1/-o:o)}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 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 Mp(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?Fp:l3(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));Mp(t,e,d,p,o)}const i=t[e];let s=n,a=r;for(Ss(t,n,e),o(t[r],i)>0&&Ss(t,n,r);s<a;){for(Ss(t,s,a),++s,--a;o(t[s],i)<0;)++s;for(;o(t[a],i)>0;)--a}o(t[n],i)===0?Ss(t,n,a):(++a,Ss(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function Ss(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function d3(t,e,n){if(t=Float64Array.from(t3(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Yu(t);if(e>=1)return Wu(t);var r,o=(r-1)*e,i=Math.floor(o),s=Wu(Mp(t,i).subarray(0,i+1)),a=Yu(t.subarray(i+1));return s+(a-s)*(o-i)}}function Pp(t,e,n=Bp){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 p3(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 g3(t,e){return d3(t,.5,e)}function Cs(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 Is(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 m3(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Tc(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Yi(t){return t=Tc(Math.abs(t)),t?t[1]:NaN}function y3(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 b3(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var w3=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qi(t){if(!(e=w3.exec(t)))throw new Error("invalid format: "+t);var e;return new Qu({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=Qu.prototype;function Qu(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+""}Qu.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 x3(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 Lp;function v3(t,e){var n=Tc(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(Lp=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")+Tc(t,Math.max(0,e+i-1))[0]}function Op(t,e){var n=Tc(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:m3,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)=>Op(t*100,e),r:Op,s:v3,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function zp(t){return t}var Up=Array.prototype.map,Gp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function A3(t){var e=t.grouping===void 0||t.thousands===void 0?zp:y3(Up.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?zp:b3(Up.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 h=f.fill,d=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"):Np[I]||(S===void 0&&(S=12),E=!0,I="g"),(v||h==="0"&&d==="=")&&(v=!0,h="0",d="=");var _=b==="$"?n:b==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",B=b==="$"?r:/[%p]/.test(I)?s:"",N=Np[I],F=/[defgprs%]/.test(I);S=S===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function M(C){var Y=_,Q=B,oe,se,ae;if(I==="c")Q=N(C)+Q,C="";else{C=+C;var ce=C<0||1/C<0;if(C=isNaN(C)?c:N(Math.abs(C),S),E&&(C=x3(C)),ce&&+C==0&&p!=="+"&&(ce=!1),Y=(ce?p==="("?p:a:p==="-"||p==="("?"":p)+Y,Q=(I==="s"?Gp[8+Lp/3]:"")+Q+(ce&&p==="("?")":""),F){for(oe=-1,se=C.length;++oe<se;)if(ae=C.charCodeAt(oe),48>ae||ae>57){Q=(ae===46?o+C.slice(oe+1):C.slice(oe))+Q,C=C.slice(0,oe);break}}}A&&!v&&(C=e(C,1/0));var ye=Y.length+C.length+Q.length,de=ye<y?new Array(y-ye+1).join(h):"";switch(A&&v&&(C=e(de+C,de.length?y-Q.length:1/0),de=""),d){case"<":C=Y+C+Q+de;break;case"=":C=Y+de+C+Q;break;case"^":C=de.slice(0,ye=de.length>>1)+Y+C+Q+de.slice(ye);break;default:C=de+Y+C+Q;break}return i(C)}return M.toString=function(){return f+""},M}function u(f,h){var d=l((f=Qi(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Yi(h)/3)))*3,b=Math.pow(10,-p),v=Gp[8+p/3];return function(y){return d(b*y)+v}}return{format:l,formatPrefix:u}}var Dc,Dt,Hp;E3({thousands:",",grouping:[3],currency:["$",""]});function E3(t){return Dc=A3(t),Dt=Dc.format,Hp=Dc.formatPrefix,Dc}function S3(t){return Math.max(0,-Yi(Math.abs(t)))}function C3(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yi(e)/3)))*3-Yi(Math.abs(t)))}function I3(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Yi(e)-Yi(t))+1}const Zu=new Date,Xu=new Date;function mt(t,e,n,r){function o(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(t(i=new Date(+i)),i),o.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),o.round=i=>{const s=o(i),a=o.ceil(i);return i-s<a-i?s:a},o.offset=(i,s)=>(e(i=new Date(+i),s==null?1:Math.floor(s)),i),o.range=(i,s,a)=>{const c=[];if(i=o.ceil(i),a=a==null?1:Math.floor(a),!(i<s)||!(a>0))return c;let l;do c.push(l=new Date(+i)),e(i,a),t(i);while(l<i&&i<s);return c},o.filter=i=>mt(s=>{if(s>=s)for(;t(s),!i(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!i(s););else for(;--a>=0;)for(;e(s,1),!i(s););}),n&&(o.count=(i,s)=>(Zu.setTime(+i),Xu.setTime(+s),t(Zu),t(Xu),Math.floor(n(Zu,Xu))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?s=>r(s)%i===0:s=>o.count(0,s)%i===0):o)),o}const Zi=mt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Zi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?mt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Zi),Zi.range;const Qn=1e3,on=Qn*60,Zn=on*60,Xn=Zn*24,Ku=Xn*7,Vp=Xn*30,Ju=Xn*365,Kn=mt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Qn)},(t,e)=>(e-t)/Qn,t=>t.getUTCSeconds());Kn.range;const Bc=mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qn)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getMinutes());Bc.range;const kc=mt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*on)},(t,e)=>(e-t)/on,t=>t.getUTCMinutes());kc.range;const _c=mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qn-t.getMinutes()*on)},(t,e)=>{t.setTime(+t+e*Zn)},(t,e)=>(e-t)/Zn,t=>t.getHours());_c.range;const Rc=mt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Zn)},(t,e)=>(e-t)/Zn,t=>t.getUTCHours());Rc.range;const yr=mt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*on)/Xn,t=>t.getDate()-1);yr.range;const ii=mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Xn,t=>t.getUTCDate()-1);ii.range;const qp=mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Xn,t=>Math.floor(t/Xn));qp.range;function oi(t){return mt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*on)/Ku)}const Ts=oi(0),Fc=oi(1),T3=oi(2),D3=oi(3),Xi=oi(4),B3=oi(5),k3=oi(6);Ts.range,Fc.range,T3.range,D3.range,Xi.range,B3.range,k3.range;function si(t){return mt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Ku)}const Ds=si(0),Mc=si(1),_3=si(2),R3=si(3),Ki=si(4),F3=si(5),M3=si(6);Ds.range,Mc.range,_3.range,R3.range,Ki.range,F3.range,M3.range;const Ji=mt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Ji.range;const $i=mt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());$i.range;const Fn=mt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Fn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:mt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}),Fn.range;const Mn=mt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Mn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:mt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}),Mn.range;function jp(t,e,n,r,o,i){const s=[[Kn,1,Qn],[Kn,5,5*Qn],[Kn,15,15*Qn],[Kn,30,30*Qn],[i,1,on],[i,5,5*on],[i,15,15*on],[i,30,30*on],[o,1,Zn],[o,3,3*Zn],[o,6,6*Zn],[o,12,12*Zn],[r,1,Xn],[r,2,2*Xn],[n,1,Ku],[e,1,Vp],[e,3,3*Vp],[t,1,Ju]];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(ri(l/Ju,u/Ju,f));if(d===0)return Zi.every(Math.max(ri(l,u,f),1));const[p,b]=s[h/s[d-1][2]<s[d][2]/h?d-1:d];return p.every(b)}return[a,c]}const[P3,L3]=jp(Mn,$i,Ds,qp,Rc,kc),[O3,N3]=jp(Fn,Ji,Ts,yr,_c,Bc),Bs="year",ks="quarter",_s="month",Rs="week",Fs="date",Pc="day",$u="dayofyear",Ms="hours",Ps="minutes",Ls="seconds",Lc="milliseconds";[Bs,ks,_s,Rs,Fs,Pc,$u,Ms,Ps,Ls,Lc].reduce((t,e,n)=>(t[e]=1+n,t),{});const z3={[Bs]:Fn,[ks]:Ji.every(3),[_s]:Ji,[Rs]:Ts,[Fs]:yr,[Pc]:yr,[$u]:yr,[Ms]:_c,[Ps]:Bc,[Ls]:Kn,[Lc]:Zi},U3={[Bs]:Mn,[ks]:$i.every(3),[_s]:$i,[Rs]:Ds,[Fs]:ii,[Pc]:ii,[$u]:ii,[Ms]:Rc,[Ps]:kc,[Ls]:Kn,[Lc]:Zi};function G3(t){return z3[t]}function H3(t){return U3[t]}function ef(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 tf(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 Os(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Wp(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=Ns(o),u=zs(o),f=Ns(i),h=zs(i),d=Ns(s),p=zs(s),b=Ns(a),v=zs(a),y=Ns(c),A=zs(c),S={a:ce,A:ye,b:de,B:Ce,c:null,d:Jp,e:Jp,f:fE,g:vE,G:EE,H:cE,I:lE,j:uE,L:$p,m:hE,M:dE,p:me,q:Ee,Q:og,s:sg,S:pE,u:gE,U:mE,V:yE,w:bE,W:wE,x:null,X:null,y:xE,Y:AE,Z:SE,"%":ig},E={a:De,A:Ge,b:Ve,B:j,c:null,d:tg,e:tg,f:DE,g:NE,G:UE,H:CE,I:IE,j:TE,L:ng,m:BE,M:kE,p:W,q:ee,Q:og,s:sg,S:_E,u:RE,U:FE,V:ME,w:PE,W:LE,x:null,X:null,y:OE,Y:zE,Z:GE,"%":ig},I={a:M,A:C,b:Y,B:Q,c:oe,d:Xp,e:Xp,f:iE,g:Zp,G:Qp,H:Kp,I:Kp,j:eE,L:rE,m:$3,M:tE,p:F,q:J3,Q:sE,s:aE,S:nE,u:Y3,U:Q3,V:Z3,w:W3,W:X3,x:se,X:ae,y:Zp,Y:Qp,Z:K3,"%":oE};S.x=_(n,S),S.X=_(r,S),S.c=_(e,S),E.x=_(n,E),E.X=_(r,E),E.c=_(e,E);function _(J,fe){return function(L){var D=[],te=-1,le=0,Be=J.length,ve,Se,Re;for(L instanceof Date||(L=new Date(+L));++te<Be;)J.charCodeAt(te)===37&&(D.push(J.slice(le,te)),(Se=Yp[ve=J.charAt(++te)])!=null?ve=J.charAt(++te):Se=ve==="e"?" ":"0",(Re=fe[ve])&&(ve=Re(L,Se)),D.push(ve),le=te+1);return D.push(J.slice(le,te)),D.join("")}}function B(J,fe){return function(L){var D=Os(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=tf(Os(D.y,0,1)),Be=le.getUTCDay(),le=Be>4||Be===0?Mc.ceil(le):Mc(le),le=ii.offset(le,(D.V-1)*7),D.y=le.getUTCFullYear(),D.m=le.getUTCMonth(),D.d=le.getUTCDate()+(D.w+6)%7):(le=ef(Os(D.y,0,1)),Be=le.getDay(),le=Be>4||Be===0?Fc.ceil(le):Fc(le),le=yr.offset(le,(D.V-1)*7),D.y=le.getFullYear(),D.m=le.getMonth(),D.d=le.getDate()+(D.w+6)%7)}else("W"in D||"U"in D)&&("w"in D||(D.w="u"in D?D.u%7:"W"in D?1:0),Be="Z"in D?tf(Os(D.y,0,1)).getUTCDay():ef(Os(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,tf(D)):ef(D)}}function N(J,fe,L,D){for(var te=0,le=fe.length,Be=L.length,ve,Se;te<le;){if(D>=Be)return-1;if(ve=fe.charCodeAt(te++),ve===37){if(ve=fe.charAt(te++),Se=I[ve in Yp?fe.charAt(te++):ve],!Se||(D=Se(J,L,D))<0)return-1}else if(ve!=L.charCodeAt(D++))return-1}return D}function F(J,fe,L){var D=l.exec(fe.slice(L));return D?(J.p=u.get(D[0].toLowerCase()),L+D[0].length):-1}function M(J,fe,L){var D=d.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=h.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 oe(J,fe,L){return N(J,e,fe,L)}function se(J,fe,L){return N(J,n,fe,L)}function ae(J,fe,L){return N(J,r,fe,L)}function ce(J){return s[J.getDay()]}function ye(J){return i[J.getDay()]}function de(J){return c[J.getMonth()]}function Ce(J){return a[J.getMonth()]}function me(J){return o[+(J.getHours()>=12)]}function Ee(J){return 1+~~(J.getMonth()/3)}function De(J){return s[J.getUTCDay()]}function Ge(J){return i[J.getUTCDay()]}function Ve(J){return c[J.getUTCMonth()]}function j(J){return a[J.getUTCMonth()]}function W(J){return o[+(J.getUTCHours()>=12)]}function ee(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var fe=_(J+="",S);return fe.toString=function(){return J},fe},parse:function(J){var fe=B(J+="",!1);return fe.toString=function(){return J},fe},utcFormat:function(J){var fe=_(J+="",E);return fe.toString=function(){return J},fe},utcParse:function(J){var fe=B(J+="",!0);return fe.toString=function(){return J},fe}}}var Yp={"-":"",_:" ",0:"0"},xt=/^\s*\d+/,V3=/^%/,q3=/[\\^$*+?|[\]().{}]/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 j3(t){return t.replace(q3,"\\$&")}function Ns(t){return new RegExp("^(?:"+t.map(j3).join("|")+")","i")}function zs(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function W3(t,e,n){var r=xt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Y3(t,e,n){var r=xt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Q3(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Z3(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function X3(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Qp(t,e,n){var r=xt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Zp(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function K3(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 J3(t,e,n){var r=xt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function $3(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Xp(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function eE(t,e,n){var r=xt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Kp(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function tE(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function nE(t,e,n){var r=xt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function rE(t,e,n){var r=xt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function iE(t,e,n){var r=xt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function oE(t,e,n){var r=V3.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function sE(t,e,n){var r=xt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function aE(t,e,n){var r=xt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Jp(t,e){return je(t.getDate(),e,2)}function cE(t,e){return je(t.getHours(),e,2)}function lE(t,e){return je(t.getHours()%12||12,e,2)}function uE(t,e){return je(1+yr.count(Fn(t),t),e,3)}function $p(t,e){return je(t.getMilliseconds(),e,3)}function fE(t,e){return $p(t,e)+"000"}function hE(t,e){return je(t.getMonth()+1,e,2)}function dE(t,e){return je(t.getMinutes(),e,2)}function pE(t,e){return je(t.getSeconds(),e,2)}function gE(t){var e=t.getDay();return e===0?7:e}function mE(t,e){return je(Ts.count(Fn(t)-1,t),e,2)}function eg(t){var e=t.getDay();return e>=4||e===0?Xi(t):Xi.ceil(t)}function yE(t,e){return t=eg(t),je(Xi.count(Fn(t),t)+(Fn(t).getDay()===4),e,2)}function bE(t){return t.getDay()}function wE(t,e){return je(Fc.count(Fn(t)-1,t),e,2)}function xE(t,e){return je(t.getFullYear()%100,e,2)}function vE(t,e){return t=eg(t),je(t.getFullYear()%100,e,2)}function AE(t,e){return je(t.getFullYear()%1e4,e,4)}function EE(t,e){var n=t.getDay();return t=n>=4||n===0?Xi(t):Xi.ceil(t),je(t.getFullYear()%1e4,e,4)}function SE(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+je(e/60|0,"0",2)+je(e%60,"0",2)}function tg(t,e){return je(t.getUTCDate(),e,2)}function CE(t,e){return je(t.getUTCHours(),e,2)}function IE(t,e){return je(t.getUTCHours()%12||12,e,2)}function TE(t,e){return je(1+ii.count(Mn(t),t),e,3)}function ng(t,e){return je(t.getUTCMilliseconds(),e,3)}function DE(t,e){return ng(t,e)+"000"}function BE(t,e){return je(t.getUTCMonth()+1,e,2)}function kE(t,e){return je(t.getUTCMinutes(),e,2)}function _E(t,e){return je(t.getUTCSeconds(),e,2)}function RE(t){var e=t.getUTCDay();return e===0?7:e}function FE(t,e){return je(Ds.count(Mn(t)-1,t),e,2)}function rg(t){var e=t.getUTCDay();return e>=4||e===0?Ki(t):Ki.ceil(t)}function ME(t,e){return t=rg(t),je(Ki.count(Mn(t),t)+(Mn(t).getUTCDay()===4),e,2)}function PE(t){return t.getUTCDay()}function LE(t,e){return je(Mc.count(Mn(t)-1,t),e,2)}function OE(t,e){return je(t.getUTCFullYear()%100,e,2)}function NE(t,e){return t=rg(t),je(t.getUTCFullYear()%100,e,2)}function zE(t,e){return je(t.getUTCFullYear()%1e4,e,4)}function UE(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ki(t):Ki.ceil(t),je(t.getUTCFullYear()%1e4,e,4)}function GE(){return"+0000"}function ig(){return"%"}function og(t){return+t}function sg(t){return Math.floor(+t/1e3)}var eo,nf,ag,rf,cg;HE({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 HE(t){return eo=Wp(t),nf=eo.format,ag=eo.parse,rf=eo.utcFormat,cg=eo.utcParse,eo}function Oc(t){const e={};return n=>e[n]||(e[n]=t(n))}function lg(t,e,n){n=n||{},Rt(n)||yn(`Invalid time multi-format specifier: ${n}`);const r=e(Ls),o=e(Ps),i=e(Ms),s=e(Fs),a=e(Rs),c=e(_s),l=e(ks),u=e(Bs),f=t(n[Lc]||".%L"),h=t(n[Ls]||":%S"),d=t(n[Ps]||"%I:%M"),p=t(n[Ms]||"%I %p"),b=t(n[Fs]||n[Pc]||"%a %d"),v=t(n[Rs]||"%b %d"),y=t(n[_s]||"%B"),A=t(n[ks]||"%B"),S=t(n[Bs]||"%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?b:v:u(E)<E?l(E)<E?y:A:S)(E)}function ug(t){const e=Oc(t.format),n=Oc(t.utcFormat);return{timeFormat:r=>rt(r)?e(r):lg(e,G3,r),utcFormat:r=>rt(r)?n(r):lg(n,H3,r),timeParse:Oc(t.parse),utcParse:Oc(t.utcParse)}}let of;VE();function VE(){return of=ug({format:nf,parse:ag,utcFormat:rf,utcParse:cg})}function qE(t){return ug(Wp(t))}function jE(t){return arguments.length?of=qE(t):of}const WE=t=>t!=null&&t===t,YE=t=>t==="true"||t==="false"||t===!0||t===!1,QE=t=>!Number.isNaN(Date.parse(t)),fg=t=>!Number.isNaN(+t)&&!(t instanceof Date),ZE=t=>fg(t)&&Number.isInteger(+t),hg={boolean:mA,integer:yc,number:yc,date:bA,string:wA,unknown:mc},Nc=[YE,ZE,fg,QE],XE=["boolean","integer","number","date"];function KE(t,e){if(!t||!t.length)return"unknown";const n=t.length,r=Nc.length,o=Nc.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]&&WE(c)&&!Nc[a](c)&&(o[a]=0,++s,s===Nc.length))return"string";return XE[o.reduce((i,s)=>i===0?s:i,0)-1]}function JE(t,e){return e.reduce((n,r)=>(n[r]=KE(t,r),n),{})}function dg(t){const e=function(n,r){const o={delimiter:t};return sf(n,r?hA(r,o):o)};return e.responseType="text",e}function sf(t,e){return e.header&&(t=e.header.map(Fu).join(e.delimiter)+`
24
+ `+t),Ip(e.delimiter).parse(t+"")}sf.responseType="text";function $E(t){return typeof Buffer=="function"&&Rn(Buffer.isBuffer)?Buffer.isBuffer(t):!1}function af(t,e){const n=e&&e.property?gc(e.property):mc;return Rt(t)&&!$E(t)?eS(n(t),e):n(JSON.parse(t))}af.responseType="json";function eS(t,e){return!_t(t)&&pA(t)&&(t=[...t]),e&&e.copy?JSON.parse(JSON.stringify(t)):t}const tS={interior:(t,e)=>t!==e,exterior:(t,e)=>t===e};function pg(t,e){let n,r,o,i;return t=af(t,e),e&&e.feature?(n=QA,o=e.feature):e&&e.mesh?(n=XA,o=e.mesh,i=tS[e.filter]):yn("Missing TopoJSON feature or mesh parameter."),r=(r=t.objects[o])?n(t,r,i):yn("Invalid TopoJSON object: "+o),r&&r.features||[r]}pg.responseType="json";const cf={dsv:sf,csv:dg(","),tsv:dg(" "),json:af,topojson:pg};function lf(t,e){return arguments.length>1?(cf[t]=e,this):op(cf,t)?cf[t]:null}function uf(t,e,n,r){e=e||{};const o=lf(e.type||"json");return o||yn("Unknown data format type: "+e.type),t=o(t,e),e.parse&&nS(t,e.parse,n,r),op(t,"columns")&&delete t.columns,t}function nS(t,e,n,r){if(!t.length)return;const o=jE();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=JE(t,i)),i=Object.keys(e);const h=i.map(d=>{const p=e[d];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(!hg[p])throw Error("Illegal format pattern: "+d+":"+p);return hg[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]=h[l](s[a])}/**
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
- */const qE={ATTRIBUTE:1},jE=t=>(...e)=>({_$litDirective$:t,values:e});let WE=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)}};/**
28
+ */const rS={ATTRIBUTE:1},iS=t=>(...e)=>({_$litDirective$:t,values:e});let oS=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 ig="important",YE=" !"+ig,QE=jE(class extends WE{constructor(t){var e;if(super(t),t.type!==qE.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(YE);r.includes("-")||i?n.setProperty(r,i?o.slice(0,-11):o,i?ig:""):n[r]=o}}return Kr}}),ZE="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",XE=`
32
+ */const gg="important",sS=" !"+gg,aS=iS(class extends oS{constructor(t){var e;if(super(t),t.type!==rS.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(sS);r.includes("-")||i?n.setProperty(r,i?o.slice(0,-11):o,i?gg:""):n[r]=o}}return Jr}}),cS="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",lS=`
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;
@@ -233,17 +233,17 @@
233
233
  font-size: 14px;
234
234
  padding: 10px;
235
235
  }
236
- `;function KE(t,e){var n=t.getBoundingClientRect();return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}function kc(t,e){return t.length==e.length&&t.every((n,r)=>t[r]===e[r])}function Ft(t){return Array.isArray(t)?t:typeof t<"u"?[t]:[]}function Os(t){return t[t.length-1]}class JE{constructor(e){ge(this,or,!1);ge(this,Uo,!0);ge(this,_i);ge(this,Ri,0);ge(this,Go);ge(this,Oa,0);ge(this,jt);ge(this,zr);ge(this,Ho,[!0]);Te(this,zr,e),Te(this,jt,document.createElement("div")),W(this,jt).className="tooltip",W(this,zr).appendChild(W(this,jt)),this.clear()}set sticky(e){!e&&W(this,or)&&this.clear(),Te(this,or,e),W(this,jt).classList.toggle("sticky",W(this,or))}get sticky(){return W(this,or)}set visible(e){e!=W(this,Uo)&&(W(this,jt).style.display=e?null:"none",Te(this,Uo,e))}get visible(){return W(this,Uo)}get enabled(){return Os(W(this,Ho))??!0}pushEnabledState(e){W(this,Ho).push(e),e||(this.visible=!1)}popEnabledState(){W(this,Ho).pop()}handleMouseMove(e){if(W(this,or))return;this.mouseCoords=KE(W(this,zr),e);const n=performance.now();!this.visible&&!this._isPenalty()&&n-W(this,Oa)>500&&Te(this,Ri,n+70),W(this,Go)&&$E(this.mouseCoords,W(this,Go))>20&&Te(this,Ri,n+400),Te(this,Go,this.mouseCoords),this.visible&&this.updatePlacement(),Te(this,Oa,n)}updatePlacement(){const[n,r]=this.mouseCoords;let o=n+20;o>W(this,zr).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,zr).clientHeight-W(this,jt).offsetHeight)+"px"}setContent(e){if(!W(this,or)){if(!e||!this.enabled||this._isPenalty()){this.visible&&(ws("",W(this,jt)),this.visible=!1),Te(this,_i,void 0);return}ws(e,W(this,jt)),this.visible=!0,this.updatePlacement()}}clear(){Te(this,_i,void 0),this.setContent(void 0)}updateWithDatum(e,n){e!==W(this,_i)&&(Te(this,_i,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,Ri)&&W(this,Ri)>performance.now()}}or=new WeakMap,Uo=new WeakMap,_i=new WeakMap,Ri=new WeakMap,Go=new WeakMap,Oa=new WeakMap,jt=new WeakMap,zr=new WeakMap,Ho=new WeakMap;function $E(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.
236
+ `;function uS(t,e){var n=t.getBoundingClientRect();return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}function zc(t,e){return t.length==e.length&&t.every((n,r)=>t[r]===e[r])}function Ft(t){return Array.isArray(t)?t:typeof t<"u"?[t]:[]}function Us(t){return t[t.length-1]}class fS{constructor(e){he(this,sr,!1);he(this,Go,!0);he(this,Ri);he(this,Fi,0);he(this,Ho);he(this,Ua,0);he(this,jt);he(this,Ur);he(this,Vo,[!0]);Ae(this,Ur,e),Ae(this,jt,document.createElement("div")),q(this,jt).className="tooltip",q(this,Ur).appendChild(q(this,jt)),this.clear()}set sticky(e){!e&&q(this,sr)&&this.clear(),Ae(this,sr,e),q(this,jt).classList.toggle("sticky",q(this,sr))}get sticky(){return q(this,sr)}set visible(e){e!=q(this,Go)&&(q(this,jt).style.display=e?null:"none",Ae(this,Go,e))}get visible(){return q(this,Go)}get enabled(){return Us(q(this,Vo))??!0}pushEnabledState(e){q(this,Vo).push(e),e||(this.visible=!1)}popEnabledState(){q(this,Vo).pop()}handleMouseMove(e){if(q(this,sr))return;this.mouseCoords=uS(q(this,Ur),e);const n=performance.now();!this.visible&&!this._isPenalty()&&n-q(this,Ua)>500&&Ae(this,Fi,n+70),q(this,Ho)&&hS(this.mouseCoords,q(this,Ho))>20&&Ae(this,Fi,n+400),Ae(this,Ho,this.mouseCoords),this.visible&&this.updatePlacement(),Ae(this,Ua,n)}updatePlacement(){const[n,r]=this.mouseCoords;let o=n+20;o>q(this,Ur).clientWidth-q(this,jt).offsetWidth&&(o=n-20-q(this,jt).offsetWidth),q(this,jt).style.left=o+"px",q(this,jt).style.top=Math.min(r+20,q(this,Ur).clientHeight-q(this,jt).offsetHeight)+"px"}setContent(e){if(!q(this,sr)){if(!e||!this.enabled||this._isPenalty()){this.visible&&(As("",q(this,jt)),this.visible=!1),Ae(this,Ri,void 0);return}As(e,q(this,jt)),this.visible=!0,this.updatePlacement()}}clear(){Ae(this,Ri,void 0),this.setContent(void 0)}updateWithDatum(e,n){e!==q(this,Ri)&&(Ae(this,Ri,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 q(this,Fi)&&q(this,Fi)>performance.now()}}sr=new WeakMap,Go=new WeakMap,Ri=new WeakMap,Fi=new WeakMap,Ho=new WeakMap,Ua=new WeakMap,jt=new WeakMap,Ur=new WeakMap,Vo=new WeakMap;function hS(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.
237
237
  Available via the MIT license.
238
- see: http://github.com/greggman/twgl.js for details */const ef=5120,Ns=5121,tf=5122,nf=5123,rf=5124,of=5125,sf=5126,eS=32819,tS=32820,nS=33635,rS=5131,iS=33640,oS=35899,sS=35902,aS=36269,cS=34042,og={};{const t=og;t[ef]=Int8Array,t[Ns]=Uint8Array,t[tf]=Int16Array,t[nf]=Uint16Array,t[rf]=Int32Array,t[of]=Uint32Array,t[sf]=Float32Array,t[eS]=Uint16Array,t[tS]=Uint16Array,t[nS]=Uint16Array,t[rS]=Uint16Array,t[iS]=Uint32Array,t[oS]=Uint32Array,t[sS]=Uint32Array,t[aS]=Uint32Array,t[cS]=Uint32Array}function af(t){if(t instanceof Int8Array)return ef;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)return Ns;if(t instanceof Int16Array)return tf;if(t instanceof Uint16Array)return nf;if(t instanceof Int32Array)return rf;if(t instanceof Uint32Array)return of;if(t instanceof Float32Array)return sf;throw new Error("unsupported typed array type")}function lS(t){if(t===Int8Array)return ef;if(t===Uint8Array||t===Uint8ClampedArray)return Ns;if(t===Int16Array)return tf;if(t===Uint16Array)return nf;if(t===Int32Array)return rf;if(t===Uint32Array)return of;if(t===Float32Array)return sf;throw new Error("unsupported typed array type")}function uS(t){const e=og[t];if(!e)throw new Error("unknown gl type");return e}const _c=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 fS(...t){console.error(...t)}function sg(...t){console.warn(...t)}function hS(t,e){return typeof WebGLBuffer<"u"&&e instanceof WebGLBuffer}function ag(t,e){return typeof WebGLRenderbuffer<"u"&&e instanceof WebGLRenderbuffer}function Rc(t,e){return typeof WebGLTexture<"u"&&e instanceof WebGLTexture}function dS(t,e){return typeof WebGLSampler<"u"&&e instanceof WebGLSampler}const cg=35044,Fn=34962,pS=34963,gS=34660,mS=5120,bS=5121,yS=5122,wS=5123,xS=5124,vS=5125,AS=5126,lg={attribPrefix:""};function ug(t,e,n,r,o){t.bindBuffer(e,n),t.bufferData(e,r,o||cg)}function fg(t,e,n,r){if(hS(t,e))return e;n=n||Fn;const o=t.createBuffer();return ug(t,n,o,e,r),o}function hg(t){return t==="indices"}function ES(t){return t instanceof Int8Array||t instanceof Uint8Array}function SS(t){return t===Int8Array||t===Uint8Array}function CS(t){return t.length?t:t.data}const IS=/coord|texture/i,TS=/color|colour/i;function dg(t,e){let n;if(IS.test(t)?n=2:TS.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 DS(t,e){return t.numComponents||t.size||dg(e,CS(t).length)}function cf(t,e){if(_c(t))return t;if(_c(t.data))return t.data;Array.isArray(t)&&(t={data:t});let n=t.type;return n||(hg(e)?n=Uint16Array:n=Float32Array),new n(t.data)}function BS(t,e){const n={};return Object.keys(e).forEach(function(r){if(!hg(r)){const o=e[r],i=o.attrib||o.name||o.attribName||lg.attribPrefix+r;if(o.value){if(!Array.isArray(o.value)&&!_c(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=lS(f),c=o.normalize!==void 0?o.normalize:SS(f),l=o.numComponents||o.size||dg(r,u),s=t.createBuffer(),t.bindBuffer(Fn,s),t.bufferData(Fn,h,o.drawType||cg)}else{const u=cf(o,r);s=fg(t,u,void 0,o.drawType),a=af(u),c=o.normalize!==void 0?o.normalize:ES(u),l=DS(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 kS(t,e,n,r){n=cf(n),r!==void 0?(t.bindBuffer(Fn,e.buffer),t.bufferSubData(Fn,r,n)):ug(t,Fn,e.buffer,n,e.drawType)}function _S(t,e){return e===mS||e===bS?1:e===yS||e===wS?2:e===xS||e===vS||e===AS?4:0}const lf=["position","positions","a_position"];function RS(t,e){let n,r;for(r=0;r<lf.length&&(n=lf[r],!(n in e||(n=lg.attribPrefix+n,n in e)));++r);r===lf.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,gS);t.bindBuffer(Fn,null);const s=_S(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 FS(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=cf(i,"indices");o.indices=fg(t,s,pS),o.numElements=s.length,o.elementType=af(s)}else o.numElements||(o.numElements=RS(t,o.attribs));return o}function eo(t){return!!t.texStorage2D}const uf=function(){const t={},e={};function n(r){const o=r.constructor.name;if(!t[o]){for(const i in r)if(typeof r[i]=="number"){const s=e[r[i]];e[r[i]]=s?`${s} | ${i}`:i}t[o]=!0}}return function(o,i){return n(o),e[i]||(typeof i=="number"?`0x${i.toString(16)}`:i)}}(),br={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},to=_c,pg=function(){let t;return function(){return t=t||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),t}}(),gg=6406,Mn=6407,st=6408,mg=6409,bg=6410,zs=6402,yg=34041,Fc=33071,MS=9728,PS=9729,Kn=3553,Jn=34067,yr=32879,wr=35866,Mc=34069,LS=34070,OS=34071,NS=34072,zS=34073,US=34074,ff=10241,hf=10240,Pc=10242,Lc=10243,wg=32882,GS=33082,HS=33083,VS=33084,qS=33085,df=3317,xg=3314,vg=32878,Ag=3316,Eg=3315,Sg=32877,jS=37443,WS=37441,YS=37440,QS=33321,ZS=36756,XS=33325,KS=33326,JS=33330,$S=33329,e4=33338,t4=33337,n4=33340,r4=33339,i4=33323,o4=36757,s4=33327,a4=33328,c4=33336,l4=33335,u4=33332,f4=33331,h4=33334,d4=33333,p4=32849,g4=35905,m4=36194,b4=36758,y4=35898,w4=35901,x4=34843,v4=34837,A4=36221,E4=36239,S4=36215,C4=36233,I4=36209,T4=36227,D4=32856,B4=35907,k4=36759,_4=32855,R4=32854,F4=32857,M4=34842,P4=34836,L4=36220,O4=36238,N4=36975,z4=36214,U4=36232,G4=36226,H4=36208,V4=33189,q4=33190,j4=36012,W4=36013,Y4=35056,xr=5120,at=5121,Oc=5122,no=5123,Nc=5124,si=5125,Mt=5126,Cg=32819,Ig=32820,Tg=33635,yn=5131,Us=36193,pf=33640,Q4=35899,Z4=35902,X4=36269,K4=34042,zc=33319,ro=33320,Uc=6403,io=36244,oo=36248,ai=36249;let gf;function Gc(t){if(!gf){const e={};e[gg]={textureFormat:gg,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,yn,Us,Mt]},e[mg]={textureFormat:mg,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,yn,Us,Mt]},e[bg]={textureFormat:bg,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[at,yn,Us,Mt]},e[Mn]={textureFormat:Mn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[at,yn,Us,Mt,Tg]},e[st]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[at,yn,Us,Mt,Cg,Ig]},e[zs]={textureFormat:zs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[si,no]},e[QS]={textureFormat:Uc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[at]},e[ZS]={textureFormat:Uc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[xr]},e[XS]={textureFormat:Uc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Mt,yn]},e[KS]={textureFormat:Uc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[JS]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[at]},e[$S]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[xr]},e[u4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[no]},e[f4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Oc]},e[h4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[si]},e[d4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Nc]},e[i4]={textureFormat:zc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[at]},e[o4]={textureFormat:zc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[xr]},e[s4]={textureFormat:zc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Mt,yn]},e[a4]={textureFormat:zc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Mt]},e[c4]={textureFormat:ro,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[at]},e[l4]={textureFormat:ro,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[xr]},e[e4]={textureFormat:ro,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[no]},e[t4]={textureFormat:ro,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Oc]},e[n4]={textureFormat:ro,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[si]},e[r4]={textureFormat:ro,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Nc]},e[p4]={textureFormat:Mn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[g4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[m4]={textureFormat:Mn,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[at,Tg]},e[b4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[xr]},e[y4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,yn,Q4]},e[w4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,yn,Z4]},e[x4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Mt,yn]},e[v4]={textureFormat:Mn,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Mt]},e[A4]={textureFormat:oo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[at]},e[E4]={textureFormat:oo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[xr]},e[S4]={textureFormat:oo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[no]},e[C4]={textureFormat:oo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Oc]},e[I4]={textureFormat:oo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[si]},e[T4]={textureFormat:oo,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Nc]},e[D4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[B4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[k4]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[xr]},e[_4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[at,Ig,pf]},e[R4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[at,Cg]},e[F4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[pf]},e[M4]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Mt,yn]},e[P4]={textureFormat:st,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Mt]},e[L4]={textureFormat:ai,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[at]},e[O4]={textureFormat:ai,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[xr]},e[N4]={textureFormat:ai,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[pf]},e[z4]={textureFormat:ai,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[no]},e[U4]={textureFormat:ai,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Oc]},e[G4]={textureFormat:ai,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Nc]},e[H4]={textureFormat:ai,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[si]},e[V4]={textureFormat:zs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[no,si]},e[q4]={textureFormat:zs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[si]},e[j4]={textureFormat:zs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[Y4]={textureFormat:yg,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[K4]},e[W4]={textureFormat:yg,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[X4]},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})}),gf=e}return gf[t]}function J4(t,e){const n=Gc(t);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[e];if(r===void 0)throw"unknown internal format";return r}function so(t){const e=Gc(t);if(!e)throw"unknown internal format";return{format:e.textureFormat,type:e.type[0]}}function Dg(t){return(t&t-1)===0}function $4(t,e,n,r){if(!eo(t))return Dg(e)&&Dg(n);const o=Gc(r);if(!o)throw"unknown internal format";return o.colorRenderable&&o.textureFilterable}function eC(t){const e=Gc(t);if(!e)throw"unknown internal format";return e.textureFilterable}function Bg(t,e,n){return to(e)?af(e):n||at}function Hc(t,e,n,r,o){if(o%1!==0)throw"can't guess dimensions";if(!n&&!r){const i=Math.sqrt(o/(e===Jn?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 ao(t,e){e.colorspaceConversion!==void 0&&t.pixelStorei(jS,e.colorspaceConversion),e.premultiplyAlpha!==void 0&&t.pixelStorei(WS,e.premultiplyAlpha),e.flipY!==void 0&&t.pixelStorei(YS,e.flipY)}function kg(t){t.pixelStorei(df,4),eo(t)&&(t.pixelStorei(xg,0),t.pixelStorei(vg,0),t.pixelStorei(Ag,0),t.pixelStorei(Eg,0),t.pixelStorei(Sg,0))}function tC(t,e,n,r){r.minMag&&(n.call(t,e,ff,r.minMag),n.call(t,e,hf,r.minMag)),r.min&&n.call(t,e,ff,r.min),r.mag&&n.call(t,e,hf,r.mag),r.wrap&&(n.call(t,e,Pc,r.wrap),n.call(t,e,Lc,r.wrap),(e===yr||dS(t,e))&&n.call(t,e,wg,r.wrap)),r.wrapR&&n.call(t,e,wg,r.wrapR),r.wrapS&&n.call(t,e,Pc,r.wrapS),r.wrapT&&n.call(t,e,Lc,r.wrapT),r.minLod&&n.call(t,e,GS,r.minLod),r.maxLod&&n.call(t,e,HS,r.maxLod),r.baseLevel&&n.call(t,e,VS,r.baseLevel),r.maxLevel&&n.call(t,e,qS,r.maxLevel)}function _g(t,e,n){const r=n.target||Kn;t.bindTexture(r,e),tC(t,r,t.texParameteri,n)}function nC(t){return t=t||br.textureColor,to(t)?t:new Uint8Array([t[0]*255,t[1]*255,t[2]*255,t[3]*255])}function mf(t,e,n,r,o,i){n=n||br.textureOptions,i=i||st;const s=n.target||Kn;if(r=r||n.width,o=o||n.height,t.bindTexture(s,e),$4(t,r,o,i))t.generateMipmap(s);else{const a=eC(i)?PS:MS;t.texParameteri(s,ff,a),t.texParameteri(s,hf,a),t.texParameteri(s,Pc,Fc),t.texParameteri(s,Lc,Fc)}}function Gs(t){return t.auto===!0||t.auto===void 0&&t.level===void 0}function bf(t,e){return e=e||{},e.cubeFaceOrder||[Mc,LS,OS,NS,zS,US]}function yf(t,e){const r=bf(t,e).map(function(o,i){return{face:o,ndx:i}});return r.sort(function(o,i){return o.face-i.face}),r}function Rg(t,e,n,r){r=r||br.textureOptions;const o=r.target||Kn,i=r.level||0;let s=n.width,a=n.height;const c=r.internalFormat||r.format||st,l=so(c),u=r.format||l.format,f=r.type||l.type;if(ao(t,r),t.bindTexture(o,e),o===Jn){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=pg();v?(v.canvas.width=p,v.canvas.height=p,s=p,a=p,yf(t,r).forEach(function(b){const A=y[b.ndx*2+0]*p,S=y[b.ndx*2+1]*p;v.drawImage(n,A,S,p,p,0,0,p,p),t.texImage2D(b.face,i,c,u,f,v.canvas)}),v.canvas.width=1,v.canvas.height=1):typeof createImageBitmap<"u"&&(s=p,a=p,yf(t,r).forEach(function(b){const A=y[b.ndx*2+0]*p,S=y[b.ndx*2+1]*p;t.texImage2D(b.face,i,c,p,p,0,u,f,null),createImageBitmap(n,A,S,p,p,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(E){ao(t,r),t.bindTexture(o,e),t.texImage2D(b.face,i,c,u,f,E),Gs(r)&&mf(t,e,r,s,a,c)})}))}else if(o===yr||o===wr){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(df,1),t.pixelStorei(xg,n.width),t.pixelStorei(vg,0),t.pixelStorei(Sg,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,S=b*h*v;t.pixelStorei(Ag,A),t.pixelStorei(Eg,S),t.texSubImage3D(o,i,0,0,b,h,h,1,u,f,n)}kg(t)}else t.texImage2D(o,i,c,u,f,n);Gs(r)&&mf(t,e,r,s,a,c),_g(t,e,r)}function Hs(){}function rC(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 iC(t,e){return e===void 0&&!rC(t)?"anonymous":e}function oC(t,e,n){n=n||Hs;let r;if(e=e!==void 0?e:br.crossOrigin,e=iC(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;fS(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 Fg(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof ImageData<"u"&&t instanceof ImageData||typeof HTMLElement<"u"&&t instanceof HTMLElement}function wf(t,e,n){return Fg(t)?(setTimeout(function(){n(null,t)}),t):oC(t,e,n)}function xf(t,e,n){n=n||br.textureOptions;const r=n.target||Kn;if(t.bindTexture(r,e),n.color===!1)return;const o=nC(n.color);if(r===Jn)for(let i=0;i<6;++i)t.texImage2D(Mc+i,0,st,1,1,0,st,at,o);else r===yr||r===wr?t.texImage3D(r,0,st,1,1,1,0,st,at,o):t.texImage2D(r,0,st,1,1,0,st,at,o)}function sC(t,e,n,r){return r=r||Hs,n=n||br.textureOptions,xf(t,e,n),n=Object.assign({},n),wf(n.src,n.crossOrigin,function(i,s){i?r(i,e,s):(Rg(t,e,s,n),r(null,e,s))})}function aC(t,e,n,r){r=r||Hs;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=so(s),c=n.format||a.format,l=n.type||at,u=n.target||Kn;if(u!==Jn)throw"target must be TEXTURE_CUBE_MAP";xf(t,e,n),n=Object.assign({},n);let f=6;const h=[],d=bf(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):(ao(t,n),t.bindTexture(u,e),f===5?bf().forEach(function(S){t.texImage2D(S,i,s,c,l,A)}):t.texImage2D(v,i,s,c,l,A),Gs(n)&&t.generateMipmap(u)),f===0&&r(h.length?h:void 0,e,p)}}p=o.map(function(v,b){return wf(v,n.crossOrigin,y(d[b]))})}function cC(t,e,n,r){r=r||Hs;const o=n.src,i=n.internalFormat||n.format||st,s=so(i),a=n.format||s.format,c=n.type||at,l=n.target||wr;if(l!==yr&&l!==wr)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";xf(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(S){return function(E,I){if(--u,E)f.push(E);else{if(ao(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 _=0;_<v;++_)t.texSubImage3D(l,d,0,0,_,p,y,1,a,c,I)}else{let _=I,B;(I.width!==p||I.height!==y)&&(B=pg(),_=B.canvas,B.canvas.width=p,B.canvas.height=y,B.drawImage(I,0,0,p,y)),t.texSubImage3D(l,d,0,0,S,p,y,1,a,c,_),B&&_===B.canvas&&(B.canvas.width=0,B.canvas.height=0)}Gs(n)&&t.generateMipmap(l)}u===0&&r(f.length?f:void 0,e,h)}}h=o.map(function(S,E){return wf(S,n.crossOrigin,A(E))})}function Mg(t,e,n,r){r=r||br.textureOptions;const o=r.target||Kn;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=so(l),f=r.format||u.format,h=r.type||Bg(t,n,u.type);if(to(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const v=uS(h);n=new v(n)}const d=J4(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+uf(t,f);let y;if(o===yr||o===wr)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=Hc(t,o,s,a,p/i),s=y.width,a=y.height):s&&(!i||!a)?(y=Hc(t,o,i,a,p/s),i=y.width,a=y.height):(y=Hc(t,o,i,s,p/a),i=y.width,s=y.height);else y=Hc(t,o,i,s,p),i=y.width,s=y.height;if(kg(t),t.pixelStorei(df,r.unpackAlignment||1),ao(t,r),o===Jn){const v=d/n.BYTES_PER_ELEMENT,b=p/6*v;yf(t,r).forEach(A=>{const S=b*A.ndx,E=n.subarray(S,S+b);t.texImage2D(A.face,c,l,i,s,0,f,h,E)})}else o===yr||o===wr?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 lC(t,e,n){const r=n.target||Kn;t.bindTexture(r,e);const o=n.level||0,i=n.internalFormat||n.format||st,s=so(i),a=n.format||s.format,c=n.type||s.type;if(ao(t,n),r===Jn)for(let l=0;l<6;++l)t.texImage2D(Mc+l,o,i,n.width,n.height,0,a,c,null);else r===yr||r===wr?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 Vs(t,e,n){n=n||Hs,e=e||br.textureOptions;const r=t.createTexture(),o=e.target||Kn;let i=e.width||1,s=e.height||1;const a=e.internalFormat||st;t.bindTexture(o,r),o===Jn&&(t.texParameteri(o,Pc,Fc),t.texParameteri(o,Lc,Fc));let c=e.src;if(c)if(typeof c=="function"&&(c=c(t,e)),typeof c=="string")sC(t,r,e,n);else if(to(c)||Array.isArray(c)&&(typeof c[0]=="number"||Array.isArray(c[0])||to(c[0]))){const l=Mg(t,r,c,e);i=l.width,s=l.height}else Array.isArray(c)&&(typeof c[0]=="string"||Fg(c[0]))?o===Jn?aC(t,r,e,n):cC(t,r,e,n):(Rg(t,r,c,e),i=c.width,s=c.height);else lC(t,r,e);return Gs(e)&&mf(t,r,e,i,s,a),_g(t,r,e),r}function uC(t,e,n,r,o,i){r=r||n.width,o=o||n.height,i=i||n.depth;const s=n.target||Kn;t.bindTexture(s,e);const a=n.level||0,c=n.internalFormat||n.format||st,l=so(c),u=n.format||l.format;let f;const h=n.src;if(h&&(to(h)||Array.isArray(h)&&typeof h[0]=="number")?f=n.type||Bg(t,h,l.type):f=n.type||l.type,s===Jn)for(let d=0;d<6;++d)t.texImage2D(Mc+d,a,c,r,o,0,u,f,null);else s===yr||s===wr?t.texImage3D(s,a,c,r,o,i,0,u,f,null):t.texImage2D(s,a,c,r,o,0,u,f,null)}const fC=sg,Vc=33984,hC=35048,qc=34962,dC=34963,vf=35345,Pg=35718,pC=35721,gC=35971,mC=35382,bC=35396,yC=35398,wC=35392,xC=35395,jc=5126,Lg=35664,Og=35665,Ng=35666,Af=5124,zg=35667,Ug=35668,Gg=35669,Hg=35670,Vg=35671,qg=35672,jg=35673,Wg=35674,Yg=35675,Qg=35676,vC=35678,AC=35680,EC=35679,SC=35682,CC=35685,IC=35686,TC=35687,DC=35688,BC=35689,kC=35690,_C=36289,RC=36292,FC=36293,Ef=5125,Zg=36294,Xg=36295,Kg=36296,MC=36298,PC=36299,LC=36300,OC=36303,NC=36306,zC=36307,UC=36308,GC=36311,Wc=3553,Yc=34067,Sf=32879,Qc=35866,Oe={};function Jg(t,e){return Oe[e].bindPoint}function HC(t,e){return function(n){t.uniform1f(e,n)}}function VC(t,e){return function(n){t.uniform1fv(e,n)}}function qC(t,e){return function(n){t.uniform2fv(e,n)}}function jC(t,e){return function(n){t.uniform3fv(e,n)}}function WC(t,e){return function(n){t.uniform4fv(e,n)}}function $g(t,e){return function(n){t.uniform1i(e,n)}}function em(t,e){return function(n){t.uniform1iv(e,n)}}function tm(t,e){return function(n){t.uniform2iv(e,n)}}function nm(t,e){return function(n){t.uniform3iv(e,n)}}function rm(t,e){return function(n){t.uniform4iv(e,n)}}function YC(t,e){return function(n){t.uniform1ui(e,n)}}function QC(t,e){return function(n){t.uniform1uiv(e,n)}}function ZC(t,e){return function(n){t.uniform2uiv(e,n)}}function XC(t,e){return function(n){t.uniform3uiv(e,n)}}function KC(t,e){return function(n){t.uniform4uiv(e,n)}}function JC(t,e){return function(n){t.uniformMatrix2fv(e,!1,n)}}function $C(t,e){return function(n){t.uniformMatrix3fv(e,!1,n)}}function e6(t,e){return function(n){t.uniformMatrix4fv(e,!1,n)}}function t6(t,e){return function(n){t.uniformMatrix2x3fv(e,!1,n)}}function n6(t,e){return function(n){t.uniformMatrix3x2fv(e,!1,n)}}function r6(t,e){return function(n){t.uniformMatrix2x4fv(e,!1,n)}}function i6(t,e){return function(n){t.uniformMatrix4x2fv(e,!1,n)}}function o6(t,e){return function(n){t.uniformMatrix3x4fv(e,!1,n)}}function s6(t,e){return function(n){t.uniformMatrix4x3fv(e,!1,n)}}function Vt(t,e,n,r){const o=Jg(t,e);return eo(t)?function(i){let s,a;Rc(t,i)?(s=i,a=null):(s=i.texture,a=i.sampler),t.uniform1i(r,n),t.activeTexture(Vc+n),t.bindTexture(o,s),t.bindSampler(n,a)}:function(i){t.uniform1i(r,n),t.activeTexture(Vc+n),t.bindTexture(o,i)}}function qt(t,e,n,r,o){const i=Jg(t,e),s=new Int32Array(o);for(let a=0;a<o;++a)s[a]=n+a;return eo(t)?function(a){t.uniform1iv(r,s),a.forEach(function(c,l){t.activeTexture(Vc+s[l]);let u,f;Rc(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(Vc+s[l]),t.bindTexture(i,c)})}}Oe[jc]={Type:Float32Array,size:4,setter:HC,arraySetter:VC},Oe[Lg]={Type:Float32Array,size:8,setter:qC,cols:2},Oe[Og]={Type:Float32Array,size:12,setter:jC,cols:3},Oe[Ng]={Type:Float32Array,size:16,setter:WC,cols:4},Oe[Af]={Type:Int32Array,size:4,setter:$g,arraySetter:em},Oe[zg]={Type:Int32Array,size:8,setter:tm,cols:2},Oe[Ug]={Type:Int32Array,size:12,setter:nm,cols:3},Oe[Gg]={Type:Int32Array,size:16,setter:rm,cols:4},Oe[Ef]={Type:Uint32Array,size:4,setter:YC,arraySetter:QC},Oe[Zg]={Type:Uint32Array,size:8,setter:ZC,cols:2},Oe[Xg]={Type:Uint32Array,size:12,setter:XC,cols:3},Oe[Kg]={Type:Uint32Array,size:16,setter:KC,cols:4},Oe[Hg]={Type:Uint32Array,size:4,setter:$g,arraySetter:em},Oe[Vg]={Type:Uint32Array,size:8,setter:tm,cols:2},Oe[qg]={Type:Uint32Array,size:12,setter:nm,cols:3},Oe[jg]={Type:Uint32Array,size:16,setter:rm,cols:4},Oe[Wg]={Type:Float32Array,size:32,setter:JC,rows:2,cols:2},Oe[Yg]={Type:Float32Array,size:48,setter:$C,rows:3,cols:3},Oe[Qg]={Type:Float32Array,size:64,setter:e6,rows:4,cols:4},Oe[CC]={Type:Float32Array,size:32,setter:t6,rows:2,cols:3},Oe[IC]={Type:Float32Array,size:32,setter:r6,rows:2,cols:4},Oe[TC]={Type:Float32Array,size:48,setter:n6,rows:3,cols:2},Oe[DC]={Type:Float32Array,size:48,setter:o6,rows:3,cols:4},Oe[BC]={Type:Float32Array,size:64,setter:i6,rows:4,cols:2},Oe[kC]={Type:Float32Array,size:64,setter:s6,rows:4,cols:3},Oe[vC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Wc},Oe[AC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Yc},Oe[EC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Sf},Oe[SC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Wc},Oe[_C]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Qc},Oe[RC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Qc},Oe[FC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Yc},Oe[MC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Wc},Oe[PC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Sf},Oe[LC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Yc},Oe[OC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Qc},Oe[NC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Wc},Oe[zC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Sf},Oe[UC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Yc},Oe[GC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Qc};function Zc(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(qc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribPointer(e,n.numComponents||n.size,n.type||jc,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function vr(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(qc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||Af,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function Xc(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(qc,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||Ef,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function Cf(t,e,n){const r=n.size,o=n.count;return function(i){t.bindBuffer(qc,i.buffer);const s=i.size||i.numComponents||r,a=s/o,c=i.type||jc,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[jc]={size:4,setter:Zc},gt[Lg]={size:8,setter:Zc},gt[Og]={size:12,setter:Zc},gt[Ng]={size:16,setter:Zc},gt[Af]={size:4,setter:vr},gt[zg]={size:8,setter:vr},gt[Ug]={size:12,setter:vr},gt[Gg]={size:16,setter:vr},gt[Ef]={size:4,setter:Xc},gt[Zg]={size:8,setter:Xc},gt[Xg]={size:12,setter:Xc},gt[Kg]={size:16,setter:Xc},gt[Hg]={size:4,setter:vr},gt[Vg]={size:8,setter:vr},gt[qg]={size:12,setter:vr},gt[jg]={size:16,setter:vr},gt[Wg]={size:4,setter:Cf,count:2},gt[Yg]={size:9,setter:Cf,count:3},gt[Qg]={size:16,setter:Cf,count:4};function im(t){const e=t.name;return e.startsWith("gl_")||e.startsWith("webgl_")}const a6=/(\.|\[|]|\w+)/g,c6=t=>t>="0"&&t<="9";function om(t,e,n,r){const o=t.split(a6).filter(a=>a!=="");let i=0,s="";for(;;){const a=o[i++];s+=a;const c=c6(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){um(p,y)}}(d),s+=f}}}function l6(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,Pg);for(let a=0;a<s;++a){const c=t.getActiveUniform(e,a);if(im(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,om(l,f,i,o)}}return o}function u6(t,e){const n={},r=t.getProgramParameter(e,gC);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 f6(t,e){const n=t.getProgramParameter(e,Pg),r=[],o=[];for(let a=0;a<n;++a){o.push(a),r.push({});const c=t.getActiveUniform(e,a);r[a].name=c.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(a){const c=a[0],l=a[1];t.getActiveUniforms(e,o,t[c]).forEach(function(u,f){r[f][l]=u})});const i={},s=t.getProgramParameter(e,mC);for(let a=0;a<s;++a){const c=t.getActiveUniformBlockName(e,a),l={index:t.getUniformBlockIndex(e,c),usedByVertexShader:t.getActiveUniformBlockParameter(e,a,bC),usedByFragmentShader:t.getActiveUniformBlockParameter(e,a,yC),size:t.getActiveUniformBlockParameter(e,a,wC),uniformIndices:t.getActiveUniformBlockParameter(e,a,xC)};l.used=l.usedByVertexShader||l.usedByFragmentShader,i[c]=l}return{blockSpecs:i,uniformData:r}}const sm=/\[\d+\]\.$/,h6=(t,e)=>((t+(e-1))/e|0)*e;function d6(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 p6(t,e,n,r){const o=n.blockSpecs,i=n.uniformData,s=o[r];if(!s)return fC("no uniform block object named:",r),{name:r,uniforms:{}};const a=new ArrayBuffer(s.size),c=t.createBuffer(),l=s.index;t.bindBuffer(vf,c),t.uniformBlockBinding(e,s.index,l);let u=r+".";sm.test(u)&&(u=u.replace(sm,"."));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],S=A.Type,E=b?h6(A.size,16)*y.size:A.size*y.size,I=new S(a,y.offset,E/S.BYTES_PER_ELEMENT);f[v]=I;const _=d6(I,b,A.rows,A.cols);h[v]=_,om(v,_,d,h)}),{name:r,array:a,asFloat:new Float32Array(a),buffer:c,uniforms:f,setters:h}}function am(t,e,n){return p6(t,e.program,e.uniformBlockSpec,n)}function cm(t,e,n){const o=(e.uniformBlockSpec||e).blockSpecs[n.name];if(o){const i=o.index;return t.bindBufferRange(vf,i,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function lm(t,e,n){cm(t,e,n)&&t.bufferData(vf,n.array,hC)}function qs(t,e){const n=t.setters;for(const r in e){const o=n[r];if(o){const i=e[r];o(i)}}}function um(t,e){for(const n in e){const r=t[n];typeof r=="function"?r(e[n]):um(t[n],e[n])}}function ci(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)ci(n,i[a])}else for(const s in i){const a=n[s];a&&a(i[s])}}}function g6(t,e){const n={},r=t.getProgramParameter(e,pC);for(let o=0;o<r;++o){const i=t.getActiveAttrib(e,o);if(im(i))continue;const s=t.getAttribLocation(e,i.name),a=gt[i.type],c=a.setter(t,s,a);c.location=s,n[i.name]=c}return n}function m6(t,e){for(const n in e){const r=t[n];r&&r(e[n])}}function li(t,e,n){n.vertexArrayObject?t.bindVertexArray(n.vertexArrayObject):(m6(e.attribSetters||e,n.attribs),n.indices&&t.bindBuffer(dC,n.indices))}function b6(t,e){const n=l6(t,e),r=g6(t,e),o={program:e,uniformSetters:n,attribSetters:r};return eo(t)&&(o.uniformBlockSpec=f6(t,e),o.transformFeedbackInfo=u6(t,e)),o}const y6=4,fm=5123;function Kc(t,e,n,r,o,i){n=n===void 0?y6: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?fm:e.elementType,o,i):t.drawElements(n,c,a===void 0?fm:e.elementType,o):i!==void 0?t.drawArraysInstanced(n,o,c,i):t.drawArrays(n,o,c)}const w6=36160,ui=36161,x6=3553,v6=5121,A6=6402,E6=6408,S6=33190,C6=36012,I6=35056,T6=36013,D6=32854,B6=32855,k6=36194,hm=33189,dm=6401,pm=36168,If=34041,Tf=36064,Jc=36096,gm=36128,Df=33306,Bf=33071,kf=9729,mm=[{format:E6,type:v6,min:kf,wrap:Bf},{format:If}],wn={};wn[If]=Df,wn[dm]=gm,wn[pm]=gm,wn[A6]=Jc,wn[hm]=Jc,wn[S6]=Jc,wn[C6]=Jc,wn[I6]=Df,wn[T6]=Df;function _6(t,e){return wn[t]||wn[e]}const Ar={};Ar[D6]=!0,Ar[B6]=!0,Ar[k6]=!0,Ar[If]=!0,Ar[hm]=!0,Ar[dm]=!0,Ar[pm]=!0;function R6(t){return Ar[t]}const F6=32;function M6(t){return t>=Tf&&t<Tf+F6}function P6(t,e,n,r){const o=w6,i=t.createFramebuffer();t.bindFramebuffer(o,i),n=n||t.drawingBufferWidth,r=r||t.drawingBufferHeight,e=e||mm;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||_6(h,c.internalFormat);if(d||(d=Tf+l),M6(d)&&s.push(d),!u)if(f!==void 0||R6(h))u=t.createRenderbuffer(),t.bindRenderbuffer(ui,u),f>1?t.renderbufferStorageMultisample(ui,f,h,n,r):t.renderbufferStorage(ui,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||kf,p.mag=p.mag||p.minMag||kf,p.wrapS=p.wrapS||p.wrap||Bf,p.wrapT=p.wrapT||p.wrap||Bf),u=Vs(t,p)}if(ag(t,u))t.framebufferRenderbuffer(o,d,ui,u);else if(Rc(t,u))c.layer!==void 0?t.framebufferTextureLayer(o,d,u,c.level||0,c.layer):t.framebufferTexture2D(o,d,c.target||x6,u,c.level||0);else throw new Error("unknown attachment type");a.attachments.push(u)}),t.drawBuffers&&t.drawBuffers(s),a}function L6(t,e,n,r,o){r=r||t.drawingBufferWidth,o=o||t.drawingBufferHeight,e.width=r,e.height=o,n=n||mm,n.forEach(function(i,s){const a=e.attachments[s],c=i.format,l=i.samples;if(l!==void 0||ag(t,a))t.bindRenderbuffer(ui,a),l>1?t.renderbufferStorageMultisample(ui,l,c,r,o):t.renderbufferStorage(ui,c,r,o);else if(Rc(t,a))uC(t,a,i,r,o);else throw new Error("unknown attachment type")})}function O6(t,e,n){const r=t.createVertexArray();return t.bindVertexArray(r),e.length||(e=[e]),e.forEach(function(o){li(t,o,n)}),t.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const N6=/^(.*?)_/;function z6(t,e){uf(t,0);const n=t.getExtension(e);if(n){const r={},o=N6.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&&sg(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},uf(r,0)}return n}const bm=["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 ym(t){for(let e=0;e<bm.length;++e)z6(t,bm[e])}function U6(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){ym(r);break}return r}function G6(t,e){return U6(t,e)}const H6=`out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
238
+ see: http://github.com/greggman/twgl.js for details */const ff=5120,Gs=5121,hf=5122,df=5123,pf=5124,gf=5125,mf=5126,dS=32819,pS=32820,gS=33635,mS=5131,yS=33640,bS=35899,wS=35902,xS=36269,vS=34042,mg={};{const t=mg;t[ff]=Int8Array,t[Gs]=Uint8Array,t[hf]=Int16Array,t[df]=Uint16Array,t[pf]=Int32Array,t[gf]=Uint32Array,t[mf]=Float32Array,t[dS]=Uint16Array,t[pS]=Uint16Array,t[gS]=Uint16Array,t[mS]=Uint16Array,t[yS]=Uint32Array,t[bS]=Uint32Array,t[wS]=Uint32Array,t[xS]=Uint32Array,t[vS]=Uint32Array}function yf(t){if(t instanceof Int8Array)return ff;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)return Gs;if(t instanceof Int16Array)return hf;if(t instanceof Uint16Array)return df;if(t instanceof Int32Array)return pf;if(t instanceof Uint32Array)return gf;if(t instanceof Float32Array)return mf;throw new Error("unsupported typed array type")}function AS(t){if(t===Int8Array)return ff;if(t===Uint8Array||t===Uint8ClampedArray)return Gs;if(t===Int16Array)return hf;if(t===Uint16Array)return df;if(t===Int32Array)return pf;if(t===Uint32Array)return gf;if(t===Float32Array)return mf;throw new Error("unsupported typed array type")}function ES(t){const e=mg[t];if(!e)throw new Error("unknown gl type");return e}const Uc=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 SS(...t){console.error(...t)}function yg(...t){console.warn(...t)}function CS(t,e){return typeof WebGLBuffer<"u"&&e instanceof WebGLBuffer}function bg(t,e){return typeof WebGLRenderbuffer<"u"&&e instanceof WebGLRenderbuffer}function Gc(t,e){return typeof WebGLTexture<"u"&&e instanceof WebGLTexture}function IS(t,e){return typeof WebGLSampler<"u"&&e instanceof WebGLSampler}const wg=35044,Pn=34962,TS=34963,DS=34660,BS=5120,kS=5121,_S=5122,RS=5123,FS=5124,MS=5125,PS=5126,xg={attribPrefix:""};function vg(t,e,n,r,o){t.bindBuffer(e,n),t.bufferData(e,r,o||wg)}function Ag(t,e,n,r){if(CS(t,e))return e;n=n||Pn;const o=t.createBuffer();return vg(t,n,o,e,r),o}function Eg(t){return t==="indices"}function LS(t){return t instanceof Int8Array||t instanceof Uint8Array}function OS(t){return t===Int8Array||t===Uint8Array}function NS(t){return t.length?t:t.data}const zS=/coord|texture/i,US=/color|colour/i;function Sg(t,e){let n;if(zS.test(t)?n=2:US.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 GS(t,e){return t.numComponents||t.size||Sg(e,NS(t).length)}function bf(t,e){if(Uc(t))return t;if(Uc(t.data))return t.data;Array.isArray(t)&&(t={data:t});let n=t.type;return n||(Eg(e)?n=Uint16Array:n=Float32Array),new n(t.data)}function HS(t,e){const n={};return Object.keys(e).forEach(function(r){if(!Eg(r)){const o=e[r],i=o.attrib||o.name||o.attribName||xg.attribPrefix+r;if(o.value){if(!Array.isArray(o.value)&&!Uc(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=AS(f),c=o.normalize!==void 0?o.normalize:OS(f),l=o.numComponents||o.size||Sg(r,u),s=t.createBuffer(),t.bindBuffer(Pn,s),t.bufferData(Pn,h,o.drawType||wg)}else{const u=bf(o,r);s=Ag(t,u,void 0,o.drawType),a=yf(u),c=o.normalize!==void 0?o.normalize:LS(u),l=GS(o,r)}n[i]={buffer:s,numComponents:l,type:a,normalize:c,stride:o.stride||0,offset:o.offset||0,divisor:o.divisor===void 0?void 0:o.divisor,drawType:o.drawType}}}}),t.bindBuffer(Pn,null),n}function VS(t,e,n,r){n=bf(n),r!==void 0?(t.bindBuffer(Pn,e.buffer),t.bufferSubData(Pn,r,n)):vg(t,Pn,e.buffer,n,e.drawType)}function qS(t,e){return e===BS||e===kS?1:e===_S||e===RS?2:e===FS||e===MS||e===PS?4:0}const wf=["position","positions","a_position"];function jS(t,e){let n,r;for(r=0;r<wf.length&&(n=wf[r],!(n in e||(n=xg.attribPrefix+n,n in e)));++r);r===wf.length&&(n=Object.keys(e)[0]);const o=e[n];if(!o.buffer)return 1;t.bindBuffer(Pn,o.buffer);const i=t.getBufferParameter(Pn,DS);t.bindBuffer(Pn,null);const s=qS(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 WS(t,e,n){const r=HS(t,e),o=Object.assign({},n||{});o.attribs=Object.assign({},n?n.attribs:{},r);const i=e.indices;if(i){const s=bf(i,"indices");o.indices=Ag(t,s,TS),o.numElements=s.length,o.elementType=yf(s)}else o.numElements||(o.numElements=jS(t,o.attribs));return o}function to(t){return!!t.texStorage2D}const xf=function(){const t={},e={};function n(r){const o=r.constructor.name;if(!t[o]){for(const i in r)if(typeof r[i]=="number"){const s=e[r[i]];e[r[i]]=s?`${s} | ${i}`:i}t[o]=!0}}return function(o,i){return n(o),e[i]||(typeof i=="number"?`0x${i.toString(16)}`:i)}}(),br={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},no=Uc,Cg=function(){let t;return function(){return t=t||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),t}}(),Ig=6406,Ln=6407,st=6408,Tg=6409,Dg=6410,Hs=6402,Bg=34041,Hc=33071,YS=9728,QS=9729,Jn=3553,$n=34067,wr=32879,xr=35866,Vc=34069,ZS=34070,XS=34071,KS=34072,JS=34073,$S=34074,vf=10241,Af=10240,qc=10242,jc=10243,kg=32882,e4=33082,t4=33083,n4=33084,r4=33085,Ef=3317,_g=3314,Rg=32878,Fg=3316,Mg=3315,Pg=32877,i4=37443,o4=37441,s4=37440,a4=33321,c4=36756,l4=33325,u4=33326,f4=33330,h4=33329,d4=33338,p4=33337,g4=33340,m4=33339,y4=33323,b4=36757,w4=33327,x4=33328,v4=33336,A4=33335,E4=33332,S4=33331,C4=33334,I4=33333,T4=32849,D4=35905,B4=36194,k4=36758,_4=35898,R4=35901,F4=34843,M4=34837,P4=36221,L4=36239,O4=36215,N4=36233,z4=36209,U4=36227,G4=32856,H4=35907,V4=36759,q4=32855,j4=32854,W4=32857,Y4=34842,Q4=34836,Z4=36220,X4=36238,K4=36975,J4=36214,$4=36232,eC=36226,tC=36208,nC=33189,rC=33190,iC=36012,oC=36013,sC=35056,vr=5120,at=5121,Wc=5122,ro=5123,Yc=5124,ai=5125,Mt=5126,Lg=32819,Og=32820,Ng=33635,bn=5131,Vs=36193,Sf=33640,aC=35899,cC=35902,lC=36269,uC=34042,Qc=33319,io=33320,Zc=6403,oo=36244,so=36248,ci=36249;let Cf;function Xc(t){if(!Cf){const e={};e[Ig]={textureFormat:Ig,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,bn,Vs,Mt]},e[Tg]={textureFormat:Tg,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[at,bn,Vs,Mt]},e[Dg]={textureFormat:Dg,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[at,bn,Vs,Mt]},e[Ln]={textureFormat:Ln,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[at,bn,Vs,Mt,Ng]},e[st]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[at,bn,Vs,Mt,Lg,Og]},e[Hs]={textureFormat:Hs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[ai,ro]},e[a4]={textureFormat:Zc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[at]},e[c4]={textureFormat:Zc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[vr]},e[l4]={textureFormat:Zc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Mt,bn]},e[u4]={textureFormat:Zc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[f4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[at]},e[h4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[vr]},e[E4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[ro]},e[S4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Wc]},e[C4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ai]},e[I4]={textureFormat:oo,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Yc]},e[y4]={textureFormat:Qc,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[at]},e[b4]={textureFormat:Qc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[vr]},e[w4]={textureFormat:Qc,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Mt,bn]},e[x4]={textureFormat:Qc,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Mt]},e[v4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[at]},e[A4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[vr]},e[d4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ro]},e[p4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Wc]},e[g4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[ai]},e[m4]={textureFormat:io,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Yc]},e[T4]={textureFormat:Ln,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[D4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[at]},e[B4]={textureFormat:Ln,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[at,Ng]},e[k4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[vr]},e[_4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,bn,aC]},e[R4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Mt,bn,cC]},e[F4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Mt,bn]},e[M4]={textureFormat:Ln,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Mt]},e[P4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[at]},e[L4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[vr]},e[O4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[ro]},e[N4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Wc]},e[z4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[ai]},e[U4]={textureFormat:so,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Yc]},e[G4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[H4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[at]},e[V4]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[vr]},e[q4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[at,Og,Sf]},e[j4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[at,Lg]},e[W4]={textureFormat:st,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Sf]},e[Y4]={textureFormat:st,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Mt,bn]},e[Q4]={textureFormat:st,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Mt]},e[Z4]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[at]},e[X4]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[vr]},e[K4]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Sf]},e[J4]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[ro]},e[$4]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Wc]},e[eC]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[Yc]},e[tC]={textureFormat:ci,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[ai]},e[nC]={textureFormat:Hs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[ro,ai]},e[rC]={textureFormat:Hs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ai]},e[iC]={textureFormat:Hs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Mt]},e[sC]={textureFormat:Bg,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[uC]},e[oC]={textureFormat:Bg,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[lC]},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})}),Cf=e}return Cf[t]}function fC(t,e){const n=Xc(t);if(!n)throw"unknown internal format";const r=n.bytesPerElementMap[e];if(r===void 0)throw"unknown internal format";return r}function ao(t){const e=Xc(t);if(!e)throw"unknown internal format";return{format:e.textureFormat,type:e.type[0]}}function zg(t){return(t&t-1)===0}function hC(t,e,n,r){if(!to(t))return zg(e)&&zg(n);const o=Xc(r);if(!o)throw"unknown internal format";return o.colorRenderable&&o.textureFilterable}function dC(t){const e=Xc(t);if(!e)throw"unknown internal format";return e.textureFilterable}function Ug(t,e,n){return no(e)?yf(e):n||at}function Kc(t,e,n,r,o){if(o%1!==0)throw"can't guess dimensions";if(!n&&!r){const i=Math.sqrt(o/(e===$n?6:1));i%1===0?(n=i,r=i):(n=o,r=1)}else if(r){if(!n&&(n=o/r,n%1))throw"can't guess dimensions"}else if(r=o/n,r%1)throw"can't guess dimensions";return{width:n,height:r}}function co(t,e){e.colorspaceConversion!==void 0&&t.pixelStorei(i4,e.colorspaceConversion),e.premultiplyAlpha!==void 0&&t.pixelStorei(o4,e.premultiplyAlpha),e.flipY!==void 0&&t.pixelStorei(s4,e.flipY)}function Gg(t){t.pixelStorei(Ef,4),to(t)&&(t.pixelStorei(_g,0),t.pixelStorei(Rg,0),t.pixelStorei(Fg,0),t.pixelStorei(Mg,0),t.pixelStorei(Pg,0))}function pC(t,e,n,r){r.minMag&&(n.call(t,e,vf,r.minMag),n.call(t,e,Af,r.minMag)),r.min&&n.call(t,e,vf,r.min),r.mag&&n.call(t,e,Af,r.mag),r.wrap&&(n.call(t,e,qc,r.wrap),n.call(t,e,jc,r.wrap),(e===wr||IS(t,e))&&n.call(t,e,kg,r.wrap)),r.wrapR&&n.call(t,e,kg,r.wrapR),r.wrapS&&n.call(t,e,qc,r.wrapS),r.wrapT&&n.call(t,e,jc,r.wrapT),r.minLod&&n.call(t,e,e4,r.minLod),r.maxLod&&n.call(t,e,t4,r.maxLod),r.baseLevel&&n.call(t,e,n4,r.baseLevel),r.maxLevel&&n.call(t,e,r4,r.maxLevel)}function Hg(t,e,n){const r=n.target||Jn;t.bindTexture(r,e),pC(t,r,t.texParameteri,n)}function gC(t){return t=t||br.textureColor,no(t)?t:new Uint8Array([t[0]*255,t[1]*255,t[2]*255,t[3]*255])}function If(t,e,n,r,o,i){n=n||br.textureOptions,i=i||st;const s=n.target||Jn;if(r=r||n.width,o=o||n.height,t.bindTexture(s,e),hC(t,r,o,i))t.generateMipmap(s);else{const a=dC(i)?QS:YS;t.texParameteri(s,vf,a),t.texParameteri(s,Af,a),t.texParameteri(s,qc,Hc),t.texParameteri(s,jc,Hc)}}function qs(t){return t.auto===!0||t.auto===void 0&&t.level===void 0}function Tf(t,e){return e=e||{},e.cubeFaceOrder||[Vc,ZS,XS,KS,JS,$S]}function Df(t,e){const r=Tf(t,e).map(function(o,i){return{face:o,ndx:i}});return r.sort(function(o,i){return o.face-i.face}),r}function Vg(t,e,n,r){r=r||br.textureOptions;const o=r.target||Jn,i=r.level||0;let s=n.width,a=n.height;const c=r.internalFormat||r.format||st,l=ao(c),u=r.format||l.format,f=r.type||l.type;if(co(t,r),t.bindTexture(o,e),o===$n){const h=n.width,d=n.height;let p,b;if(h/6===d)p=d,b=[0,0,1,0,2,0,3,0,4,0,5,0];else if(d/6===h)p=h,b=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===d/2)p=h/3,b=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===d/3)p=h/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=Cg();v?(v.canvas.width=p,v.canvas.height=p,s=p,a=p,Df(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,Df(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){co(t,r),t.bindTexture(o,e),t.texImage2D(y.face,i,c,u,f,E),qs(r)&&If(t,e,r,s,a,c)})}))}else if(o===wr||o===xr){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 b=n.width===d?1:0,v=n.height===d?1:0;t.pixelStorei(Ef,1),t.pixelStorei(_g,n.width),t.pixelStorei(Rg,0),t.pixelStorei(Pg,0),t.texImage3D(o,i,c,h,h,h,0,u,f,null);for(let y=0;y<p;++y){const A=y*h*b,S=y*h*v;t.pixelStorei(Fg,A),t.pixelStorei(Mg,S),t.texSubImage3D(o,i,0,0,y,h,h,1,u,f,n)}Gg(t)}else t.texImage2D(o,i,c,u,f,n);qs(r)&&If(t,e,r,s,a,c),Hg(t,e,r)}function js(){}function mC(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 yC(t,e){return e===void 0&&!mC(t)?"anonymous":e}function bC(t,e,n){n=n||js;let r;if(e=e!==void 0?e:br.crossOrigin,e=yC(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;SS(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 qg(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof ImageData<"u"&&t instanceof ImageData||typeof HTMLElement<"u"&&t instanceof HTMLElement}function Bf(t,e,n){return qg(t)?(setTimeout(function(){n(null,t)}),t):bC(t,e,n)}function kf(t,e,n){n=n||br.textureOptions;const r=n.target||Jn;if(t.bindTexture(r,e),n.color===!1)return;const o=gC(n.color);if(r===$n)for(let i=0;i<6;++i)t.texImage2D(Vc+i,0,st,1,1,0,st,at,o);else r===wr||r===xr?t.texImage3D(r,0,st,1,1,1,0,st,at,o):t.texImage2D(r,0,st,1,1,0,st,at,o)}function wC(t,e,n,r){return r=r||js,n=n||br.textureOptions,kf(t,e,n),n=Object.assign({},n),Bf(n.src,n.crossOrigin,function(i,s){i?r(i,e,s):(Vg(t,e,s,n),r(null,e,s))})}function xC(t,e,n,r){r=r||js;const o=n.src;if(o.length!==6)throw"there must be 6 urls for a cubemap";const i=n.level||0,s=n.internalFormat||n.format||st,a=ao(s),c=n.format||a.format,l=n.type||at,u=n.target||Jn;if(u!==$n)throw"target must be TEXTURE_CUBE_MAP";kf(t,e,n),n=Object.assign({},n);let f=6;const h=[],d=Tf(t,n);let p;function b(v){return function(y,A){--f,y?h.push(y):A.width!==A.height?h.push("cubemap face img is not a square: "+A.src):(co(t,n),t.bindTexture(u,e),f===5?Tf().forEach(function(S){t.texImage2D(S,i,s,c,l,A)}):t.texImage2D(v,i,s,c,l,A),qs(n)&&t.generateMipmap(u)),f===0&&r(h.length?h:void 0,e,p)}}p=o.map(function(v,y){return Bf(v,n.crossOrigin,b(d[y]))})}function vC(t,e,n,r){r=r||js;const o=n.src,i=n.internalFormat||n.format||st,s=ao(i),a=n.format||s.format,c=n.type||at,l=n.target||xr;if(l!==wr&&l!==xr)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";kf(t,e,n),n=Object.assign({},n);let u=o.length;const f=[];let h;const d=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(co(t,n),t.bindTexture(l,e),y){y=!1,p=n.width||I.width,b=n.height||I.height,t.texImage3D(l,d,i,p,b,v,0,a,c,null);for(let _=0;_<v;++_)t.texSubImage3D(l,d,0,0,_,p,b,1,a,c,I)}else{let _=I,B;(I.width!==p||I.height!==b)&&(B=Cg(),_=B.canvas,B.canvas.width=p,B.canvas.height=b,B.drawImage(I,0,0,p,b)),t.texSubImage3D(l,d,0,0,S,p,b,1,a,c,_),B&&_===B.canvas&&(B.canvas.width=0,B.canvas.height=0)}qs(n)&&t.generateMipmap(l)}u===0&&r(f.length?f:void 0,e,h)}}h=o.map(function(S,E){return Bf(S,n.crossOrigin,A(E))})}function jg(t,e,n,r){r=r||br.textureOptions;const o=r.target||Jn;t.bindTexture(o,e);let i=r.width,s=r.height,a=r.depth;const c=r.level||0,l=r.internalFormat||r.format||st,u=ao(l),f=r.format||u.format,h=r.type||Ug(t,n,u.type);if(no(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const v=ES(h);n=new v(n)}const d=fC(l,h),p=n.byteLength/d;if(p%1)throw"length wrong size for format: "+xf(t,f);let b;if(o===wr||o===xr)if(!i&&!s&&!a){const v=Math.cbrt(p);if(v%1!==0)throw"can't guess cube size of array of numElements: "+p;i=v,s=v,a=v}else i&&(!s||!a)?(b=Kc(t,o,s,a,p/i),s=b.width,a=b.height):s&&(!i||!a)?(b=Kc(t,o,i,a,p/s),i=b.width,a=b.height):(b=Kc(t,o,i,s,p/a),i=b.width,s=b.height);else b=Kc(t,o,i,s,p),i=b.width,s=b.height;if(Gg(t),t.pixelStorei(Ef,r.unpackAlignment||1),co(t,r),o===$n){const v=d/n.BYTES_PER_ELEMENT,y=p/6*v;Df(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,h,E)})}else o===wr||o===xr?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 AC(t,e,n){const r=n.target||Jn;t.bindTexture(r,e);const o=n.level||0,i=n.internalFormat||n.format||st,s=ao(i),a=n.format||s.format,c=n.type||s.type;if(co(t,n),r===$n)for(let l=0;l<6;++l)t.texImage2D(Vc+l,o,i,n.width,n.height,0,a,c,null);else r===wr||r===xr?t.texImage3D(r,o,i,n.width,n.height,n.depth,0,a,c,null):t.texImage2D(r,o,i,n.width,n.height,0,a,c,null)}function Ws(t,e,n){n=n||js,e=e||br.textureOptions;const r=t.createTexture(),o=e.target||Jn;let i=e.width||1,s=e.height||1;const a=e.internalFormat||st;t.bindTexture(o,r),o===$n&&(t.texParameteri(o,qc,Hc),t.texParameteri(o,jc,Hc));let c=e.src;if(c)if(typeof c=="function"&&(c=c(t,e)),typeof c=="string")wC(t,r,e,n);else if(no(c)||Array.isArray(c)&&(typeof c[0]=="number"||Array.isArray(c[0])||no(c[0]))){const l=jg(t,r,c,e);i=l.width,s=l.height}else Array.isArray(c)&&(typeof c[0]=="string"||qg(c[0]))?o===$n?xC(t,r,e,n):vC(t,r,e,n):(Vg(t,r,c,e),i=c.width,s=c.height);else AC(t,r,e);return qs(e)&&If(t,r,e,i,s,a),Hg(t,r,e),r}function EC(t,e,n,r,o,i){r=r||n.width,o=o||n.height,i=i||n.depth;const s=n.target||Jn;t.bindTexture(s,e);const a=n.level||0,c=n.internalFormat||n.format||st,l=ao(c),u=n.format||l.format;let f;const h=n.src;if(h&&(no(h)||Array.isArray(h)&&typeof h[0]=="number")?f=n.type||Ug(t,h,l.type):f=n.type||l.type,s===$n)for(let d=0;d<6;++d)t.texImage2D(Vc+d,a,c,r,o,0,u,f,null);else s===wr||s===xr?t.texImage3D(s,a,c,r,o,i,0,u,f,null):t.texImage2D(s,a,c,r,o,0,u,f,null)}const SC=yg,Jc=33984,CC=35048,$c=34962,IC=34963,_f=35345,Wg=35718,TC=35721,DC=35971,BC=35382,kC=35396,_C=35398,RC=35392,FC=35395,el=5126,Yg=35664,Qg=35665,Zg=35666,Rf=5124,Xg=35667,Kg=35668,Jg=35669,$g=35670,em=35671,tm=35672,nm=35673,rm=35674,im=35675,om=35676,MC=35678,PC=35680,LC=35679,OC=35682,NC=35685,zC=35686,UC=35687,GC=35688,HC=35689,VC=35690,qC=36289,jC=36292,WC=36293,Ff=5125,sm=36294,am=36295,cm=36296,YC=36298,QC=36299,ZC=36300,XC=36303,KC=36306,JC=36307,$C=36308,e6=36311,tl=3553,nl=34067,Mf=32879,rl=35866,Oe={};function lm(t,e){return Oe[e].bindPoint}function t6(t,e){return function(n){t.uniform1f(e,n)}}function n6(t,e){return function(n){t.uniform1fv(e,n)}}function r6(t,e){return function(n){t.uniform2fv(e,n)}}function i6(t,e){return function(n){t.uniform3fv(e,n)}}function o6(t,e){return function(n){t.uniform4fv(e,n)}}function um(t,e){return function(n){t.uniform1i(e,n)}}function fm(t,e){return function(n){t.uniform1iv(e,n)}}function hm(t,e){return function(n){t.uniform2iv(e,n)}}function dm(t,e){return function(n){t.uniform3iv(e,n)}}function pm(t,e){return function(n){t.uniform4iv(e,n)}}function s6(t,e){return function(n){t.uniform1ui(e,n)}}function a6(t,e){return function(n){t.uniform1uiv(e,n)}}function c6(t,e){return function(n){t.uniform2uiv(e,n)}}function l6(t,e){return function(n){t.uniform3uiv(e,n)}}function u6(t,e){return function(n){t.uniform4uiv(e,n)}}function f6(t,e){return function(n){t.uniformMatrix2fv(e,!1,n)}}function h6(t,e){return function(n){t.uniformMatrix3fv(e,!1,n)}}function d6(t,e){return function(n){t.uniformMatrix4fv(e,!1,n)}}function p6(t,e){return function(n){t.uniformMatrix2x3fv(e,!1,n)}}function g6(t,e){return function(n){t.uniformMatrix3x2fv(e,!1,n)}}function m6(t,e){return function(n){t.uniformMatrix2x4fv(e,!1,n)}}function y6(t,e){return function(n){t.uniformMatrix4x2fv(e,!1,n)}}function b6(t,e){return function(n){t.uniformMatrix3x4fv(e,!1,n)}}function w6(t,e){return function(n){t.uniformMatrix4x3fv(e,!1,n)}}function Vt(t,e,n,r){const o=lm(t,e);return to(t)?function(i){let s,a;Gc(t,i)?(s=i,a=null):(s=i.texture,a=i.sampler),t.uniform1i(r,n),t.activeTexture(Jc+n),t.bindTexture(o,s),t.bindSampler(n,a)}:function(i){t.uniform1i(r,n),t.activeTexture(Jc+n),t.bindTexture(o,i)}}function qt(t,e,n,r,o){const i=lm(t,e),s=new Int32Array(o);for(let a=0;a<o;++a)s[a]=n+a;return to(t)?function(a){t.uniform1iv(r,s),a.forEach(function(c,l){t.activeTexture(Jc+s[l]);let u,f;Gc(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(Jc+s[l]),t.bindTexture(i,c)})}}Oe[el]={Type:Float32Array,size:4,setter:t6,arraySetter:n6},Oe[Yg]={Type:Float32Array,size:8,setter:r6,cols:2},Oe[Qg]={Type:Float32Array,size:12,setter:i6,cols:3},Oe[Zg]={Type:Float32Array,size:16,setter:o6,cols:4},Oe[Rf]={Type:Int32Array,size:4,setter:um,arraySetter:fm},Oe[Xg]={Type:Int32Array,size:8,setter:hm,cols:2},Oe[Kg]={Type:Int32Array,size:12,setter:dm,cols:3},Oe[Jg]={Type:Int32Array,size:16,setter:pm,cols:4},Oe[Ff]={Type:Uint32Array,size:4,setter:s6,arraySetter:a6},Oe[sm]={Type:Uint32Array,size:8,setter:c6,cols:2},Oe[am]={Type:Uint32Array,size:12,setter:l6,cols:3},Oe[cm]={Type:Uint32Array,size:16,setter:u6,cols:4},Oe[$g]={Type:Uint32Array,size:4,setter:um,arraySetter:fm},Oe[em]={Type:Uint32Array,size:8,setter:hm,cols:2},Oe[tm]={Type:Uint32Array,size:12,setter:dm,cols:3},Oe[nm]={Type:Uint32Array,size:16,setter:pm,cols:4},Oe[rm]={Type:Float32Array,size:32,setter:f6,rows:2,cols:2},Oe[im]={Type:Float32Array,size:48,setter:h6,rows:3,cols:3},Oe[om]={Type:Float32Array,size:64,setter:d6,rows:4,cols:4},Oe[NC]={Type:Float32Array,size:32,setter:p6,rows:2,cols:3},Oe[zC]={Type:Float32Array,size:32,setter:m6,rows:2,cols:4},Oe[UC]={Type:Float32Array,size:48,setter:g6,rows:3,cols:2},Oe[GC]={Type:Float32Array,size:48,setter:b6,rows:3,cols:4},Oe[HC]={Type:Float32Array,size:64,setter:y6,rows:4,cols:2},Oe[VC]={Type:Float32Array,size:64,setter:w6,rows:4,cols:3},Oe[MC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:tl},Oe[PC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:nl},Oe[LC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Mf},Oe[OC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:tl},Oe[qC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:rl},Oe[jC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:rl},Oe[WC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:nl},Oe[YC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:tl},Oe[QC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Mf},Oe[ZC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:nl},Oe[XC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:rl},Oe[KC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:tl},Oe[JC]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:Mf},Oe[$C]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:nl},Oe[e6]={Type:null,size:0,setter:Vt,arraySetter:qt,bindPoint:rl};function il(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($c,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribPointer(e,n.numComponents||n.size,n.type||el,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function Ar(t,e){return function(n){if(n.value)if(t.disableVertexAttribArray(e),n.value.length===4)t.vertexAttrib4iv(e,n.value);else throw new Error("The length of an integer constant value must be 4!");else t.bindBuffer($c,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 ol(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($c,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||Ff,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function Pf(t,e,n){const r=n.size,o=n.count;return function(i){t.bindBuffer($c,i.buffer);const s=i.size||i.numComponents||r,a=s/o,c=i.type||el,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[el]={size:4,setter:il},gt[Yg]={size:8,setter:il},gt[Qg]={size:12,setter:il},gt[Zg]={size:16,setter:il},gt[Rf]={size:4,setter:Ar},gt[Xg]={size:8,setter:Ar},gt[Kg]={size:12,setter:Ar},gt[Jg]={size:16,setter:Ar},gt[Ff]={size:4,setter:ol},gt[sm]={size:8,setter:ol},gt[am]={size:12,setter:ol},gt[cm]={size:16,setter:ol},gt[$g]={size:4,setter:Ar},gt[em]={size:8,setter:Ar},gt[tm]={size:12,setter:Ar},gt[nm]={size:16,setter:Ar},gt[rm]={size:4,setter:Pf,count:2},gt[im]={size:9,setter:Pf,count:3},gt[om]={size:16,setter:Pf,count:4};function gm(t){const e=t.name;return e.startsWith("gl_")||e.startsWith("webgl_")}const x6=/(\.|\[|]|\w+)/g,v6=t=>t>="0"&&t<="9";function mm(t,e,n,r){const o=t.split(x6).filter(a=>a!=="");let i=0,s="";for(;;){const a=o[i++];s+=a;const c=v6(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(b){vm(p,b)}}(d),s+=f}}}function A6(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,Wg);for(let a=0;a<s;++a){const c=t.getActiveUniform(e,a);if(gm(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,mm(l,f,i,o)}}return o}function E6(t,e){const n={},r=t.getProgramParameter(e,DC);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 S6(t,e){const n=t.getProgramParameter(e,Wg),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,BC);for(let a=0;a<s;++a){const c=t.getActiveUniformBlockName(e,a),l={index:t.getUniformBlockIndex(e,c),usedByVertexShader:t.getActiveUniformBlockParameter(e,a,kC),usedByFragmentShader:t.getActiveUniformBlockParameter(e,a,_C),size:t.getActiveUniformBlockParameter(e,a,RC),uniformIndices:t.getActiveUniformBlockParameter(e,a,FC)};l.used=l.usedByVertexShader||l.usedByFragmentShader,i[c]=l}return{blockSpecs:i,uniformData:r}}const ym=/\[\d+\]\.$/,C6=(t,e)=>((t+(e-1))/e|0)*e;function I6(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 T6(t,e,n,r){const o=n.blockSpecs,i=n.uniformData,s=o[r];if(!s)return SC("no uniform block object named:",r),{name:r,uniforms:{}};const a=new ArrayBuffer(s.size),c=t.createBuffer(),l=s.index;t.bindBuffer(_f,c),t.uniformBlockBinding(e,s.index,l);let u=r+".";ym.test(u)&&(u=u.replace(ym,"."));const f={},h={},d={};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?C6(A.size,16)*b.size:A.size*b.size,I=new S(a,b.offset,E/S.BYTES_PER_ELEMENT);f[v]=I;const _=I6(I,y,A.rows,A.cols);h[v]=_,mm(v,_,d,h)}),{name:r,array:a,asFloat:new Float32Array(a),buffer:c,uniforms:f,setters:h}}function bm(t,e,n){return T6(t,e.program,e.uniformBlockSpec,n)}function wm(t,e,n){const o=(e.uniformBlockSpec||e).blockSpecs[n.name];if(o){const i=o.index;return t.bindBufferRange(_f,i,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function xm(t,e,n){wm(t,e,n)&&t.bufferData(_f,n.array,CC)}function Ys(t,e){const n=t.setters;for(const r in e){const o=n[r];if(o){const i=e[r];o(i)}}}function vm(t,e){for(const n in e){const r=t[n];typeof r=="function"?r(e[n]):vm(t[n],e[n])}}function li(t,...e){const n=t.uniformSetters||t,r=e.length;for(let o=0;o<r;++o){const i=e[o];if(Array.isArray(i)){const s=i.length;for(let a=0;a<s;++a)li(n,i[a])}else for(const s in i){const a=n[s];a&&a(i[s])}}}function D6(t,e){const n={},r=t.getProgramParameter(e,TC);for(let o=0;o<r;++o){const i=t.getActiveAttrib(e,o);if(gm(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 B6(t,e){for(const n in e){const r=t[n];r&&r(e[n])}}function ui(t,e,n){n.vertexArrayObject?t.bindVertexArray(n.vertexArrayObject):(B6(e.attribSetters||e,n.attribs),n.indices&&t.bindBuffer(IC,n.indices))}function k6(t,e){const n=A6(t,e),r=D6(t,e),o={program:e,uniformSetters:n,attribSetters:r};return to(t)&&(o.uniformBlockSpec=S6(t,e),o.transformFeedbackInfo=E6(t,e)),o}const _6=4,Am=5123;function sl(t,e,n,r,o,i){n=n===void 0?_6: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?Am:e.elementType,o,i):t.drawElements(n,c,a===void 0?Am:e.elementType,o):i!==void 0?t.drawArraysInstanced(n,o,c,i):t.drawArrays(n,o,c)}const R6=36160,fi=36161,F6=3553,M6=5121,P6=6402,L6=6408,O6=33190,N6=36012,z6=35056,U6=36013,G6=32854,H6=32855,V6=36194,Em=33189,Sm=6401,Cm=36168,Lf=34041,Of=36064,al=36096,Im=36128,Nf=33306,zf=33071,Uf=9729,Tm=[{format:L6,type:M6,min:Uf,wrap:zf},{format:Lf}],wn={};wn[Lf]=Nf,wn[Sm]=Im,wn[Cm]=Im,wn[P6]=al,wn[Em]=al,wn[O6]=al,wn[N6]=al,wn[z6]=Nf,wn[U6]=Nf;function q6(t,e){return wn[t]||wn[e]}const Er={};Er[G6]=!0,Er[H6]=!0,Er[V6]=!0,Er[Lf]=!0,Er[Em]=!0,Er[Sm]=!0,Er[Cm]=!0;function j6(t){return Er[t]}const W6=32;function Y6(t){return t>=Of&&t<Of+W6}function Dm(t,e,n,r){const o=R6,i=t.createFramebuffer();t.bindFramebuffer(o,i),n=n||t.drawingBufferWidth,r=r||t.drawingBufferHeight,e=e||Tm;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||q6(h,c.internalFormat);if(d||(d=Of+l),Y6(d)&&s.push(d),!u)if(f!==void 0||j6(h))u=t.createRenderbuffer(),t.bindRenderbuffer(fi,u),f>1?t.renderbufferStorageMultisample(fi,f,h,n,r):t.renderbufferStorage(fi,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||Uf,p.mag=p.mag||p.minMag||Uf,p.wrapS=p.wrapS||p.wrap||zf,p.wrapT=p.wrapT||p.wrap||zf),u=Ws(t,p)}if(bg(t,u))t.framebufferRenderbuffer(o,d,fi,u);else if(Gc(t,u))c.layer!==void 0?t.framebufferTextureLayer(o,d,u,c.level||0,c.layer):t.framebufferTexture2D(o,d,c.target||F6,u,c.level||0);else throw new Error("unknown attachment type");a.attachments.push(u)}),t.drawBuffers&&t.drawBuffers(s),a}function Q6(t,e,n,r,o){r=r||t.drawingBufferWidth,o=o||t.drawingBufferHeight,e.width=r,e.height=o,n=n||Tm,n.forEach(function(i,s){const a=e.attachments[s],c=i.format,l=i.samples;if(l!==void 0||bg(t,a))t.bindRenderbuffer(fi,a),l>1?t.renderbufferStorageMultisample(fi,l,c,r,o):t.renderbufferStorage(fi,c,r,o);else if(Gc(t,a))EC(t,a,i,r,o);else throw new Error("unknown attachment type")})}function Z6(t,e,n){const r=t.createVertexArray();return t.bindVertexArray(r),e.length||(e=[e]),e.forEach(function(o){ui(t,o,n)}),t.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:r}}const X6=/^(.*?)_/;function K6(t,e){xf(t,0);const n=t.getExtension(e);if(n){const r={},o=X6.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&&yg(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},xf(r,0)}return n}const Bm=["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 km(t){for(let e=0;e<Bm.length;++e)K6(t,Bm[e])}function J6(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){km(r);break}return r}function $6(t,e){return J6(t,e)}const e8=`out lowp vec4 vFillColor;out lowp vec4 vStrokeColor;out float vHalfStrokeWidth;out vec4 vCornerRadii;
239
239
  #if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
240
240
  out vec2 vPosInPixels;
241
241
  #endif
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);
242
+ out vec2 vHalfSizeInPixels;/***Adjusts the vertex position to ensure that the rectangle is at least \`minSpan\`*wide or high. Returns a value that reflects the amount of clamping and can be*used to adjust the opacity of the rectangle.**pos: vertex position*frac: vertex position within the rectangle,[0,1]*size: width or height of the rectangle*minSize: minimum width or height of the rectangle*/float clampMinSize(inout float pos,float frac,float size,float minSize){if(minSize>0.0&&size<minSize){pos+=(frac-0.5)*(minSize-size);return 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));size=max(size,normalizedMinSize);pos=applySampleFacet(pos);
243
243
  #if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
244
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);
245
245
  #endif
246
- gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,V6=`#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
246
+ gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,t8=`#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
247
247
  in vec2 vPosInPixels;
248
248
  #endif
249
249
  in vec2 vHalfSizeInPixels;in lowp vec4 vFillColor;in lowp vec4 vStrokeColor;in float vHalfStrokeWidth;in vec4 vCornerRadii;out lowp vec4 fragColor;
@@ -269,36 +269,36 @@ if(vHalfStrokeWidth>0.0&&uHatchPattern>0){d=max(d,-pattern());}fragColor=distanc
269
269
  #else
270
270
  fragColor=vFillColor;if(uPickingEnabled){fragColor=vPickingColor;}
271
271
  #endif
272
- }`,q6=`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;
272
+ }`,n8=`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;
273
273
  #pragma markUniforms
274
- };`,wm=1e4;class j6{constructor(e){ge(this,Vo);ge(this,Na,!1);this.size=e,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}configure(){if(W(this,Na))throw new Error("Already configured!");de(this,Vo,vv).call(this),de(this,Vo,Av).call(this),Te(this,Na,!0)}addConverter(e,n){const r=this.createUpdater(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(!Ht(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()}}Na=new WeakMap,Vo=new WeakSet,vv=function(){if(this.size>wm){const e=this.pushers.map((r,o)=>`const p${o} = that.pushers[${o}];`).join(`
274
+ };`,_m=1e4;class r8{constructor(e){he(this,qo);he(this,Ga,!1);this.size=e,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}configure(){if(q(this,Ga))throw new Error("Already configured!");pe(this,qo,Fv).call(this),pe(this,qo,Mv).call(this),Ae(this,Ga,!0)}addConverter(e,n){const r=this.createUpdater(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(!Ht(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()}}Ga=new WeakMap,qo=new WeakSet,Fv=function(){if(this.size>_m){const e=this.pushers.map((r,o)=>`const p${o} = that.pushers[${o}];`).join(`
275
275
  `),n=this.pushers.map((r,o)=>` p${o}();`).join(`
276
276
  `);this.pushAll=new Function("that",`${e}
277
277
  return function unrolledPushAll() {
278
278
  ${n}
279
279
  that.vertexCount++;
280
- };`)(this)}else this.pushAll=()=>{for(let e=0;e<this.pushers.length;e++)this.pushers[e]();this.vertexCount++}},Av=function(){if(this.size>wm){const e=this.dataUpdaters.map((r,o)=>`const u${o} = that.dataUpdaters[${o}];`).join(`
280
+ };`)(this)}else this.pushAll=()=>{for(let e=0;e<this.pushers.length;e++)this.pushers[e]();this.vertexCount++}},Mv=function(){if(this.size>_m){const e=this.dataUpdaters.map((r,o)=>`const u${o} = that.dataUpdaters[${o}];`).join(`
281
281
  `),n=this.dataUpdaters.map((r,o)=>` u${o}(datum);`).join(`
282
282
  `);this.updateFromDatum=new Function("that","datum",`${e}
283
283
  return function unrolledUpdateFromDatum(datum) {
284
284
  ${n}
285
- };`)(this)}else this.updateFromDatum=e=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](e)}};const js=5,_f=127;function Rf(t){const e=[];for(let p=0;p<=_f;p++)e.push(void 0);const n=new Map;for(const p of t.chars)p.id<=_f?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<=_f?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-js*2,f=c.height-js*2,h=l.height-a.height+l.yoffset-a.yoffset;function d(p,y=1){let v=0;for(let b=0;b<p.length;b++)v+=o(p.charCodeAt(b)).xadvance;return v/s*y}return{measureWidth:d,getCharByCode:o,getChar:i,xHeight:u,capHeight:f,descent:h,common:t.common}}function co(t,e=0,n=1){return Math.max(e,Math.min(n,t))}const xm=2**31-1,W6=-2147483648;function Y6(t,e,n,r=n){const o=new Array(t);o.fill(xm);let i=W6,s=-1/0,a=!1;const c=new Array(t);c.fill(0);const l=e[0],f=(e[1]-e[0])/t,h=(b,A)=>{const S=(b-l)/f,E=Math.floor(S);return co(A&&E==S?E-1:E,0,t-1)};function d(b,A,S){if(a)return;if(A>i)i=A;else{a=!0;return}const E=n(b);if(E<s){a=!0;return}s=E;const I=h(E,!1);o[I]>A&&(o[I]=A),c[I]<S&&(c[I]=S)}function p(b,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(b),I=r(b);if(E<s){a=!0;return}else if(I<E){a=!0;return}s=E;const _=h(E,!1),B=h(I,!0);for(let N=_;N<=B;N++)o[N]>A&&(o[N]=A),c[N]<S&&(c[N]=S)}const y=(b,A,S=[0,0])=>{const E=h(b,!1),I=h(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 b=!0;for(let A=o.length-1;A>0;A--)b&&o[A]==xm?(o[A]=c[A],b=!1):o[A-1]>o[A]&&(o[A-1]=o[A]);return y};return d.getIndex=v,p.getIndex=v,n==r?d:p}const Pn=1,Er=2,Ff=4;class Mf{constructor(e){ge(this,Fi);Gt(this,"stats",{count:0,first:null});Gt(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,Fi,rc).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,Fi,rc).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,Fi,rc).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,Fi,rc).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:""}
286
- ${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){}}Fi=new WeakSet,rc=function(){this._propagate=Function("children","stats",As(this.children.length).map(e=>`const child${e} = children[${e}];`).join(`
285
+ };`)(this)}else this.updateFromDatum=e=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](e)}};const Qs=5,Gf=127;function Hf(t){const e=[];for(let p=0;p<=Gf;p++)e.push(void 0);const n=new Map;for(const p of t.chars)p.id<=Gf?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<=Gf?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-Qs*2,f=c.height-Qs*2,h=l.height-a.height+l.yoffset-a.yoffset;function d(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:d,getCharByCode:o,getChar:i,xHeight:u,capHeight:f,descent:h,common:t.common}}function lo(t,e=0,n=1){return Math.max(e,Math.min(n,t))}const Rm=2**31-1,i8=-2147483648;function o8(t,e,n,r=n){const o=new Array(t);o.fill(Rm);let i=i8,s=-1/0,a=!1;const c=new Array(t);c.fill(0);const l=e[0],f=(e[1]-e[0])/t,h=(y,A)=>{const S=(y-l)/f,E=Math.floor(S);return lo(A&&E==S?E-1:E,0,t-1)};function d(y,A,S){if(a)return;if(A>i)i=A;else{a=!0;return}const E=n(y);if(E<s){a=!0;return}s=E;const I=h(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;return}else if(I<E){a=!0;return}s=E;const _=h(E,!1),B=h(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=h(y,!1),I=h(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]==Rm?(o[A]=c[A],y=!1):o[A-1]>o[A]&&(o[A-1]=o[A]);return b};return d.getIndex=v,p.getIndex=v,n==r?d:p}const On=1,Sr=2,Vf=4;class qf{constructor(e){he(this,Mi);Gt(this,"stats",{count:0,first:null});Gt(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),pe(this,Mi,hc).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,pe(n=this.parent,Mi,hc).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,pe(this,Mi,hc).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,pe(e=this.parent,Mi,hc).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:""}
286
+ ${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){}}Mi=new WeakSet,hc=function(){this._propagate=Function("children","stats",Cs(this.children.length).map(e=>`const child${e} = children[${e}];`).join(`
287
287
  `)+`return function propagate(datum) {
288
288
  if (stats.count === 0) {
289
289
  stats.first = structuredClone(datum);
290
290
  }
291
291
  stats.count++;
292
- ${As(this.children.length).map(e=>`child${e}.handle(datum);`).join(`
292
+ ${Cs(this.children.length).map(e=>`child${e}.handle(datum);`).join(`
293
293
  `)}
294
- };`)(this.children,this.stats)};function vm(t){return t.type=="file"}function Q6(t){return t.type=="facet"}class bt extends Mf{constructor(n,r){super(r);ge(this,za);Te(this,za,n.type)}get label(){return W(this,za)}}za=new WeakMap;const sn="_uniqueId",Am=1e4,Em=[null];class Pf extends bt{get behavior(){return Er}constructor(e){super(e),this.params=e,this.as=e.as??sn,this._blocks=[],this._usedBlocks=0,this._id=-1}initialize(){}reset(){super.reset(),this._usedBlocks=0,this._id=-1}handle(e){e[this.as]=this._nextId(),this._propagate(e)}_nextId(){return++this._id%Am==0&&(this._id=this._getBlock()*Am),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const e=Em.length;return Em[e]=this,this._blocks.push(e),this._usedBlocks++,e}}function lo(t,e,n){return t.fields=e||[],t.fname=n,t}function Z6(t){return t.length===1?X6(t[0]):K6(t)}const X6=t=>function(e){return e[t]},K6=t=>{const e=t.length;return function(n){for(let r=0;r<e;++r)n=n[t[r]];return n}};function xn(t){throw Error(t)}function J6(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||xn("Access path missing open bracket: "+t),o>0&&l(),o=0,s=a+1)}return o&&xn("Access path missing closing bracket: "+t),r&&xn("Access path missing closing quote: "+t),a>s&&(a++,l()),e}function $6(t,e,n){const r=J6(t);return t=r.length===1?r[0]:t,lo(Z6(r),[t],t)}$6("id"),lo(t=>t,[],"identity"),lo(()=>0,[],"zero"),lo(()=>1,[],"one"),lo(()=>!0,[],"true"),lo(()=>!1,[],"false");function Sm(t){return typeof t=="function"}function $c(t,e){return Object.hasOwn(t,e)}function e8(t){return typeof t=="string"}function Cm(t){const e={},n=t.length;for(let r=0;r<n;++r)e[t[r]]=!0;return e}const t8="RawCode",n8="Literal",r8="Property",i8="Identifier",o8="ArrayExpression",s8="BinaryExpression",a8="CallExpression",c8="ConditionalExpression",l8="LogicalExpression",u8="MemberExpression",f8="ObjectExpression",h8="UnaryExpression";function vn(t){this.type=t}vn.prototype.visit=function(t){let e,n,r;if(t(this))return 1;for(e=d8(this),n=0,r=e.length;n<r;++n)if(e[n].visit(t))return 1};function d8(t){switch(t.type){case o8:return t.elements;case s8:case l8:return[t.left,t.right];case a8:return[t.callee].concat(t.arguments);case c8:return[t.test,t.consequent,t.alternate];case u8:return[t.object,t.property];case f8:return t.properties;case r8:return[t.key,t.value];case h8:return[t.argument];case i8:case n8:case t8:default:return[]}}var Ln,Se,ie,Pt,Xe,el=1,Ws=2,fi=3,Sr=4,tl=5,hi=6,Yt=7,Ys=8,p8=9;Ln={},Ln[el]="Boolean",Ln[Ws]="<end>",Ln[fi]="Identifier",Ln[Sr]="Keyword",Ln[tl]="Null",Ln[hi]="Numeric",Ln[Yt]="Punctuator",Ln[Ys]="String",Ln[p8]="RegularExpression";var g8="ArrayExpression",m8="BinaryExpression",b8="CallExpression",y8="ConditionalExpression",Im="Identifier",w8="Literal",x8="LogicalExpression",v8="MemberExpression",A8="ObjectExpression",E8="Property",S8="UnaryExpression",vt="Unexpected token %0",C8="Unexpected number",I8="Unexpected string",T8="Unexpected identifier",D8="Unexpected reserved word",B8="Unexpected end of input",Lf="Invalid regular expression",Of="Invalid regular expression: missing /",Tm="Octal literals are not allowed in strict mode.",k8="Duplicate data property in object literal not allowed in strict mode",Bt="ILLEGAL",Qs="Disabled.",_8=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\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\\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]"),R8=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\\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\\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 $n(t){return t>=48&&t<=57}function Nf(t){return"0123456789abcdefABCDEF".includes(t)}function Zs(t){return"01234567".includes(t)}function F8(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 Xs(t){return t===10||t===13||t===8232||t===8233}function Ks(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&_8.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&&R8.test(String.fromCharCode(t))}const M8={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 Dm(){for(;ie<Pt;){const t=Se.charCodeAt(ie);if(F8(t)||Xs(t))++ie;else break}}function zf(t){var e,n,r,o=0;for(n=t==="u"?4:2,e=0;e<n;++e)ie<Pt&&Nf(Se[ie])?(r=Se[ie++],o=o*16+"0123456789abcdef".indexOf(r.toLowerCase())):We({},vt,Bt);return String.fromCharCode(o)}function P8(){var t,e,n,r;for(t=Se[ie],e=0,t==="}"&&We({},vt,Bt);ie<Pt&&(t=Se[ie++],!!Nf(t));)e=e*16+"0123456789abcdef".indexOf(t.toLowerCase());return(e>1114111||t!=="}")&&We({},vt,Bt),e<=65535?String.fromCharCode(e):(n=(e-65536>>10)+55296,r=(e-65536&1023)+56320,String.fromCharCode(n,r))}function Bm(){var t,e;for(t=Se.charCodeAt(ie++),e=String.fromCharCode(t),t===92&&(Se.charCodeAt(ie)!==117&&We({},vt,Bt),++ie,t=zf("u"),(!t||t==="\\"||!Ks(t.charCodeAt(0)))&&We({},vt,Bt),e=t);ie<Pt&&(t=Se.charCodeAt(ie),!!rl(t));)++ie,e+=String.fromCharCode(t),t===92&&(e=e.substr(0,e.length-1),Se.charCodeAt(ie)!==117&&We({},vt,Bt),++ie,t=zf("u"),(!t||t==="\\"||!rl(t.charCodeAt(0)))&&We({},vt,Bt),e+=t);return e}function L8(){var t,e;for(t=ie++;ie<Pt;){if(e=Se.charCodeAt(ie),e===92)return ie=t,Bm();if(rl(e))++ie;else break}return Se.slice(t,ie)}function O8(){var t,e,n;return t=ie,e=Se.charCodeAt(ie)===92?Bm():L8(),e.length===1?n=fi:M8.hasOwnProperty(e)?n=Sr:e==="null"?n=tl:e==="true"||e==="false"?n=el:n=fi,{type:n,value:e,start:t,end:ie}}function Uf(){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:Yt,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:Yt,value:String.fromCharCode(e)+String.fromCharCode(n),start:t,end:ie};case 33:case 61:return ie+=2,Se.charCodeAt(ie)===61&&++ie,{type:Yt,value:Se.slice(t,ie),start:t,end:ie}}}if(s=Se.substr(ie,4),s===">>>=")return ie+=4,{type:Yt,value:s,start:t,end:ie};if(i=s.substr(0,3),i===">>>"||i==="<<="||i===">>=")return ie+=3,{type:Yt,value:i,start:t,end:ie};if(o=i.substr(0,2),r===o[1]&&"+-<>&|".includes(r)||o==="=>")return ie+=2,{type:Yt,value:o,start:t,end:ie};if(o==="//"&&We({},vt,Bt),"<>=!+-*%&|^/".includes(r))return++ie,{type:Yt,value:r,start:t,end:ie};We({},vt,Bt)}function N8(t){let e="";for(;ie<Pt&&Nf(Se[ie]);)e+=Se[ie++];return e.length===0&&We({},vt,Bt),Ks(Se.charCodeAt(ie))&&We({},vt,Bt),{type:hi,value:parseInt("0x"+e,16),start:t,end:ie}}function z8(t){let e="0"+Se[ie++];for(;ie<Pt&&Zs(Se[ie]);)e+=Se[ie++];return(Ks(Se.charCodeAt(ie))||$n(Se.charCodeAt(ie)))&&We({},vt,Bt),{type:hi,value:parseInt(e,8),octal:!0,start:t,end:ie}}function km(){var t,e,n;if(n=Se[ie],nl($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,N8(e);if(Zs(n))return z8(e);n&&$n(n.charCodeAt(0))&&We({},vt,Bt)}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({},vt,Bt);return Ks(Se.charCodeAt(ie))&&We({},vt,Bt),{type:hi,value:parseFloat(t),start:e,end:ie}}function U8(){var t="",e,n,r,o,i=!1;for(e=Se[ie],nl(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||!Xs(r.charCodeAt(0)))switch(r){case"u":case"x":Se[ie]==="{"?(++ie,t+=P8()):t+=zf(r);break;case"n":t+=`
295
- `;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:Zs(r)?(o="01234567".indexOf(r),o!==0&&(i=!0),ie<Pt&&Zs(Se[ie])&&(i=!0,o=o*8+"01234567".indexOf(Se[ie++]),"0123".includes(r)&&ie<Pt&&Zs(Se[ie])&&(o=o*8+"01234567".indexOf(Se[ie++]))),t+=String.fromCharCode(o)):t+=r;break}else r==="\r"&&Se[ie]===`
296
- `&&++ie;else{if(Xs(r.charCodeAt(0)))break;t+=r}return e!==""&&We({},vt,Bt),{type:Ys,value:t,octal:i,start:n,end:ie}}function G8(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({},Lf)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{We({},Lf)}try{return new RegExp(t,e)}catch{return null}}function H8(){var t,e,n,r,o;for(t=Se[ie],nl(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++],Xs(t.charCodeAt(0))&&We({},Of),e+=t;else if(Xs(t.charCodeAt(0)))We({},Of);else if(n)t==="]"&&(n=!1);else if(t==="/"){r=!0;break}else t==="["&&(n=!0);return r||We({},Of),o=e.substr(1,e.length-2),{value:o,literal:e}}function V8(){var t,e,n;for(e="",n="";ie<Pt&&(t=Se[ie],!!rl(t.charCodeAt(0)));)++ie,t==="\\"&&ie<Pt?We({},vt,Bt):(n+=t,e+=t);return n.search(/[^gimuy]/g)>=0&&We({},Lf,n),{value:n,literal:e}}function q8(){var t,e,n,r;return Xe=null,Dm(),t=ie,e=H8(),n=V8(),r=G8(e.value,n.value),{literal:e.literal+n.literal,value:r,regex:{pattern:e.value,flags:n.value},start:t,end:ie}}function j8(t){return t.type===fi||t.type===Sr||t.type===el||t.type===tl}function _m(){if(Dm(),ie>=Pt)return{type:Ws,start:ie,end:ie};const t=Se.charCodeAt(ie);return Ks(t)?O8():t===40||t===41||t===59?Uf():t===39||t===34?U8():t===46?$n(Se.charCodeAt(ie+1))?km():Uf():$n(t)?km():Uf()}function Qt(){const t=Xe;return ie=t.end,Xe=_m(),ie=t.end,t}function Rm(){const t=ie;Xe=_m(),ie=t}function W8(t){const e=new vn(g8);return e.elements=t,e}function Fm(t,e,n){const r=new vn(t==="||"||t==="&&"?x8:m8);return r.operator=t,r.left=e,r.right=n,r}function Y8(t,e){const n=new vn(b8);return n.callee=t,n.arguments=e,n}function Q8(t,e,n){const r=new vn(y8);return r.test=t,r.consequent=e,r.alternate=n,r}function Gf(t){const e=new vn(Im);return e.name=t,e}function Js(t){const e=new vn(w8);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 Mm(t,e,n){const r=new vn(v8);return r.computed=t==="[",r.object=e,r.property=n,r.computed||(n.member=!0),r}function Z8(t){const e=new vn(A8);return e.properties=t,e}function Pm(t,e,n){const r=new vn(E8);return r.key=e,r.value=n,r.kind=t,r}function X8(t,e){const n=new vn(S8);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===Ws&&We(t,B8),t.type===hi&&We(t,C8),t.type===Ys&&We(t,I8),t.type===fi&&We(t,T8),t.type===Sr&&We(t,D8),We(t,vt,t.value)}function Lt(t){const e=Qt();(e.type!==Yt||e.value!==t)&&il(e)}function it(t){return Xe.type===Yt&&Xe.value===t}function Hf(t){return Xe.type===Sr&&Xe.value===t}function K8(){const t=[];for(ie=Xe.start,Lt("[");!it("]");)it(",")?(Qt(),t.push(null)):(t.push(di()),it("]")||Lt(","));return Qt(),W8(t)}function Lm(){ie=Xe.start;const t=Qt();return t.type===Ys||t.type===hi?(t.octal&&We(t,Tm),Js(t)):Gf(t.value)}function J8(){var t,e,n,r;if(ie=Xe.start,t=Xe,t.type===fi)return n=Lm(),Lt(":"),r=di(),Pm("init",n,r);if(t.type===Ws||t.type===Yt)il(t);else return e=Lm(),Lt(":"),r=di(),Pm("init",e,r)}function $8(){var t=[],e,n,r,o={},i=String;for(ie=Xe.start,Lt("{");!it("}");)e=J8(),e.key.type===Im?n=e.key.name:n=i(e.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(o,r)?We({},k8):o[r]=!0,t.push(e),it("}")||Lt(",");return Lt("}"),Z8(t)}function e5(){Lt("(");const t=Vf();return Lt(")"),t}const t5={if:1};function n5(){var t,e,n;if(it("("))return e5();if(it("["))return K8();if(it("{"))return $8();if(t=Xe.type,ie=Xe.start,t===fi||t5[Xe.value])n=Gf(Qt().value);else if(t===Ys||t===hi)Xe.octal&&We(Xe,Tm),n=Js(Qt());else{if(t===Sr)throw new Error(Qs);t===el?(e=Qt(),e.value=e.value==="true",n=Js(e)):t===tl?(e=Qt(),e.value=null,n=Js(e)):it("/")||it("/=")?(n=Js(q8()),Rm()):il(Qt())}return n}function r5(){const t=[];if(Lt("("),!it(")"))for(;ie<Pt&&(t.push(di()),!it(")"));)Lt(",");return Lt(")"),t}function i5(){ie=Xe.start;const t=Qt();return j8(t)||il(t),Gf(t.value)}function o5(){return Lt("."),i5()}function s5(){Lt("[");const t=Vf();return Lt("]"),t}function a5(){var t,e,n;for(t=n5();;)if(it("."))n=o5(),t=Mm(".",t,n);else if(it("("))e=r5(),t=Y8(t,e);else if(it("["))n=s5(),t=Mm("[",t,n);else break;return t}function Om(){const t=a5();if(Xe.type===Yt&&(it("++")||it("--")))throw new Error(Qs);return t}function ol(){var t,e;if(Xe.type!==Yt&&Xe.type!==Sr)e=Om();else{if(it("++")||it("--"))throw new Error(Qs);if(it("+")||it("-")||it("~")||it("!"))t=Qt(),e=ol(),e=X8(t.value,e);else{if(Hf("delete")||Hf("void")||Hf("typeof"))throw new Error(Qs);e=Om()}}return e}function Nm(t){let e=0;if(t.type!==Yt&&t.type!==Sr)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 c5(){var t,e,n,r,o,i,s,a,c,l;if(t=Xe,c=ol(),r=Xe,o=Nm(r),o===0)return c;for(r.prec=o,Qt(),e=[t,Xe],s=ol(),i=[c,r,s];(o=Nm(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=Fm(a,c,s),i.push(n);r=Qt(),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=Fm(i[l-1].value,i[l-2],n),l-=2;return n}function di(){var t,e,n;return t=c5(),it("?")&&(Qt(),e=di(),Lt(":"),n=di(),t=Q8(t,e,n)),t}function Vf(){const t=di();if(it(","))throw new Error(Qs);return t}function l5(t){Se=t,ie=0,Pt=Se.length,Xe=null,Rm();const e=Vf();if(Xe.type!==Ws)throw new Error("Unexpect token after expression.");return e}var u5={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 zm(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&&xn("Missing arguments to clamp function."),s.length>3&&xn("Too many arguments to clamp function.");const a=s.map(t);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:r,date:n("getDate",r,0),day:n("getDay",r,0),year:n("getFullYear",r,0),month:n("getMonth",r,0),hours:n("getHours",r,0),minutes:n("getMinutes",r,0),seconds:n("getSeconds",r,0),milliseconds:n("getMilliseconds",r,0),time:n("getTime",r,0),timezoneoffset:n("getTimezoneOffset",r,0),utcdate:n("getUTCDate",r,0),utcday:n("getUTCDay",r,0),utcyear:n("getUTCFullYear",r,0),utcmonth:n("getUTCMonth",r,0),utchours:n("getUTCHours",r,0),utcminutes:n("getUTCMinutes",r,0),utcseconds:n("getUTCSeconds",r,0),utcmilliseconds:n("getUTCMilliseconds",r,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",o,0),lower:n("toLowerCase",o,0),substring:n("substring",o),split:n("split",o),trim:n("trim",o,0),btoa:"btoa",atob:"atob",regexp:i,test:n("test",i),if:function(s){s.length<3&&xn("Missing arguments to if function."),s.length>3&&xn("Too many arguments to if function.");const a=s.map(t);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function f5(t){const e=t&&t.length-1;return e&&(t[0]==='"'&&t[e]==='"'||t[0]==="'"&&t[e]==="'")?t.slice(1,-1):t}function h5(t){t=t||{};const e=t.allowed?Cm(t.allowed):{},n=t.forbidden?Cm(t.forbidden):{},r=t.constants||u5,o=(t.functions||zm)(f),i=t.globalvar,s=t.fieldvar,a=Sm(i)?i:p=>`${i}["${p}"]`;let c={},l={},u=0;function f(p){if(e8(p))return p;const y=h[p.type];return y==null&&xn("Unsupported type: "+p.type),y(p)}const h={Literal:p=>p.raw,Identifier:p=>{const y=p.name;return u>0?y:$c(n,y)?xn("Illegal identifier: "+y):$c(r,y)?r[y]:$c(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[f5(b)]=1),y&&(u-=1),v+(y?"."+b:"["+b+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&xn("Illegal callee type: "+p.callee.type);const y=p.callee.name,v=p.arguments,b=$c(o,y)&&o[y];return b||xn("Unrecognized function: "+y),Sm(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 Um(t,e,n){return n=(n-t)/(e-t),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function d5(t,e,n){return co((n-t)/(e-t),0,1)}const Gm={clamp:co,format(t,e){return Dt(e)(t)},mapHasKey(t,e){return t.has(e)},isArray:_t,isBoolean:us,isDefined(t){return t!==void 0},isNumber:Ht,isObject:Rt,isRegExp:nA,isString:rt,isValid(t){return t!=null&&t===t},lerp:Z0,linearstep:d5,replace(t,e,n){return String(t).replace(e,n)},smoothstep:Um};function p5(t){const e=zm(t);for(const n in Gm)e[n]=`this.${n}`;return e}const g5=h5({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:p5});function m5(t,e={}){try{const n=l5(t),r=g5(n),o=Function("datum","globalObject",`"use strict";
294
+ };`)(this.children,this.stats)};function Fm(t){return t.type=="file"}function s8(t){return t.type=="facet"}class yt extends qf{constructor(n,r){super(r);he(this,Ha);Ae(this,Ha,n.type)}get label(){return q(this,Ha)}}Ha=new WeakMap;const sn="_uniqueId",Mm=1e4,Pm=[null];class jf extends yt{get behavior(){return Sr}constructor(e){super(e),this.params=e,this.as=e.as??sn,this._blocks=[],this._usedBlocks=0,this._id=-1}initialize(){}reset(){super.reset(),this._usedBlocks=0,this._id=-1}handle(e){e[this.as]=this._nextId(),this._propagate(e)}_nextId(){return++this._id%Mm==0&&(this._id=this._getBlock()*Mm),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const e=Pm.length;return Pm[e]=this,this._blocks.push(e),this._usedBlocks++,e}}function uo(t,e,n){return t.fields=e||[],t.fname=n,t}function a8(t){return t.length===1?c8(t[0]):l8(t)}const c8=t=>function(e){return e[t]},l8=t=>{const e=t.length;return function(n){for(let r=0;r<e;++r)n=n[t[r]];return n}};function xn(t){throw Error(t)}function u8(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||xn("Access path missing open bracket: "+t),o>0&&l(),o=0,s=a+1)}return o&&xn("Access path missing closing bracket: "+t),r&&xn("Access path missing closing quote: "+t),a>s&&(a++,l()),e}function f8(t,e,n){const r=u8(t);return t=r.length===1?r[0]:t,uo(a8(r),[t],t)}f8("id"),uo(t=>t,[],"identity"),uo(()=>0,[],"zero"),uo(()=>1,[],"one"),uo(()=>!0,[],"true"),uo(()=>!1,[],"false");function Lm(t){return typeof t=="function"}function cl(t,e){return Object.hasOwn(t,e)}function h8(t){return typeof t=="string"}function Om(t){const e={},n=t.length;for(let r=0;r<n;++r)e[t[r]]=!0;return e}const d8="RawCode",p8="Literal",g8="Property",m8="Identifier",y8="ArrayExpression",b8="BinaryExpression",w8="CallExpression",x8="ConditionalExpression",v8="LogicalExpression",A8="MemberExpression",E8="ObjectExpression",S8="UnaryExpression";function vn(t){this.type=t}vn.prototype.visit=function(t){let e,n,r;if(t(this))return 1;for(e=C8(this),n=0,r=e.length;n<r;++n)if(e[n].visit(t))return 1};function C8(t){switch(t.type){case y8:return t.elements;case b8:case v8:return[t.left,t.right];case w8:return[t.callee].concat(t.arguments);case x8:return[t.test,t.consequent,t.alternate];case A8:return[t.object,t.property];case E8:return t.properties;case g8:return[t.key,t.value];case S8:return[t.argument];case m8:case p8:case d8:default:return[]}}var Nn,Ie,ie,Pt,Xe,ll=1,Zs=2,hi=3,Cr=4,ul=5,di=6,Yt=7,Xs=8,I8=9;Nn={},Nn[ll]="Boolean",Nn[Zs]="<end>",Nn[hi]="Identifier",Nn[Cr]="Keyword",Nn[ul]="Null",Nn[di]="Numeric",Nn[Yt]="Punctuator",Nn[Xs]="String",Nn[I8]="RegularExpression";var T8="ArrayExpression",D8="BinaryExpression",B8="CallExpression",k8="ConditionalExpression",Nm="Identifier",_8="Literal",R8="LogicalExpression",F8="MemberExpression",M8="ObjectExpression",P8="Property",L8="UnaryExpression",vt="Unexpected token %0",O8="Unexpected number",N8="Unexpected string",z8="Unexpected identifier",U8="Unexpected reserved word",G8="Unexpected end of input",Wf="Invalid regular expression",Yf="Invalid regular expression: missing /",zm="Octal literals are not allowed in strict mode.",H8="Duplicate data property in object literal not allowed in strict mode",Bt="ILLEGAL",Ks="Disabled.",V8=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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\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]"),q8=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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-\\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 fl(t,e){if(!t)throw new Error("ASSERT: "+e)}function er(t){return t>=48&&t<=57}function Qf(t){return"0123456789abcdefABCDEF".includes(t)}function Js(t){return"01234567".includes(t)}function j8(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 $s(t){return t===10||t===13||t===8232||t===8233}function ea(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&V8.test(String.fromCharCode(t))}function hl(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===92||t>=128&&q8.test(String.fromCharCode(t))}const W8={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 Um(){for(;ie<Pt;){const t=Ie.charCodeAt(ie);if(j8(t)||$s(t))++ie;else break}}function Zf(t){var e,n,r,o=0;for(n=t==="u"?4:2,e=0;e<n;++e)ie<Pt&&Qf(Ie[ie])?(r=Ie[ie++],o=o*16+"0123456789abcdef".indexOf(r.toLowerCase())):We({},vt,Bt);return String.fromCharCode(o)}function Y8(){var t,e,n,r;for(t=Ie[ie],e=0,t==="}"&&We({},vt,Bt);ie<Pt&&(t=Ie[ie++],!!Qf(t));)e=e*16+"0123456789abcdef".indexOf(t.toLowerCase());return(e>1114111||t!=="}")&&We({},vt,Bt),e<=65535?String.fromCharCode(e):(n=(e-65536>>10)+55296,r=(e-65536&1023)+56320,String.fromCharCode(n,r))}function Gm(){var t,e;for(t=Ie.charCodeAt(ie++),e=String.fromCharCode(t),t===92&&(Ie.charCodeAt(ie)!==117&&We({},vt,Bt),++ie,t=Zf("u"),(!t||t==="\\"||!ea(t.charCodeAt(0)))&&We({},vt,Bt),e=t);ie<Pt&&(t=Ie.charCodeAt(ie),!!hl(t));)++ie,e+=String.fromCharCode(t),t===92&&(e=e.substr(0,e.length-1),Ie.charCodeAt(ie)!==117&&We({},vt,Bt),++ie,t=Zf("u"),(!t||t==="\\"||!hl(t.charCodeAt(0)))&&We({},vt,Bt),e+=t);return e}function Q8(){var t,e;for(t=ie++;ie<Pt;){if(e=Ie.charCodeAt(ie),e===92)return ie=t,Gm();if(hl(e))++ie;else break}return Ie.slice(t,ie)}function Z8(){var t,e,n;return t=ie,e=Ie.charCodeAt(ie)===92?Gm():Q8(),e.length===1?n=hi:W8.hasOwnProperty(e)?n=Cr:e==="null"?n=ul:e==="true"||e==="false"?n=ll:n=hi,{type:n,value:e,start:t,end:ie}}function Xf(){var t=ie,e=Ie.charCodeAt(ie),n,r=Ie[ie],o,i,s;switch(e){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++ie,{type:Yt,value:String.fromCharCode(e),start:t,end:ie};default:if(n=Ie.charCodeAt(ie+1),n===61)switch(e){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return ie+=2,{type:Yt,value:String.fromCharCode(e)+String.fromCharCode(n),start:t,end:ie};case 33:case 61:return ie+=2,Ie.charCodeAt(ie)===61&&++ie,{type:Yt,value:Ie.slice(t,ie),start:t,end:ie}}}if(s=Ie.substr(ie,4),s===">>>=")return ie+=4,{type:Yt,value:s,start:t,end:ie};if(i=s.substr(0,3),i===">>>"||i==="<<="||i===">>=")return ie+=3,{type:Yt,value:i,start:t,end:ie};if(o=i.substr(0,2),r===o[1]&&"+-<>&|".includes(r)||o==="=>")return ie+=2,{type:Yt,value:o,start:t,end:ie};if(o==="//"&&We({},vt,Bt),"<>=!+-*%&|^/".includes(r))return++ie,{type:Yt,value:r,start:t,end:ie};We({},vt,Bt)}function X8(t){let e="";for(;ie<Pt&&Qf(Ie[ie]);)e+=Ie[ie++];return e.length===0&&We({},vt,Bt),ea(Ie.charCodeAt(ie))&&We({},vt,Bt),{type:di,value:parseInt("0x"+e,16),start:t,end:ie}}function K8(t){let e="0"+Ie[ie++];for(;ie<Pt&&Js(Ie[ie]);)e+=Ie[ie++];return(ea(Ie.charCodeAt(ie))||er(Ie.charCodeAt(ie)))&&We({},vt,Bt),{type:di,value:parseInt(e,8),octal:!0,start:t,end:ie}}function Hm(){var t,e,n;if(n=Ie[ie],fl(er(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),e=ie,t="",n!=="."){if(t=Ie[ie++],n=Ie[ie],t==="0"){if(n==="x"||n==="X")return++ie,X8(e);if(Js(n))return K8(e);n&&er(n.charCodeAt(0))&&We({},vt,Bt)}for(;er(Ie.charCodeAt(ie));)t+=Ie[ie++];n=Ie[ie]}if(n==="."){for(t+=Ie[ie++];er(Ie.charCodeAt(ie));)t+=Ie[ie++];n=Ie[ie]}if(n==="e"||n==="E")if(t+=Ie[ie++],n=Ie[ie],(n==="+"||n==="-")&&(t+=Ie[ie++]),er(Ie.charCodeAt(ie)))for(;er(Ie.charCodeAt(ie));)t+=Ie[ie++];else We({},vt,Bt);return ea(Ie.charCodeAt(ie))&&We({},vt,Bt),{type:di,value:parseFloat(t),start:e,end:ie}}function J8(){var t="",e,n,r,o,i=!1;for(e=Ie[ie],fl(e==="'"||e==='"',"String literal must starts with a quote"),n=ie,++ie;ie<Pt;)if(r=Ie[ie++],r===e){e="";break}else if(r==="\\")if(r=Ie[ie++],!r||!$s(r.charCodeAt(0)))switch(r){case"u":case"x":Ie[ie]==="{"?(++ie,t+=Y8()):t+=Zf(r);break;case"n":t+=`
295
+ `;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:Js(r)?(o="01234567".indexOf(r),o!==0&&(i=!0),ie<Pt&&Js(Ie[ie])&&(i=!0,o=o*8+"01234567".indexOf(Ie[ie++]),"0123".includes(r)&&ie<Pt&&Js(Ie[ie])&&(o=o*8+"01234567".indexOf(Ie[ie++]))),t+=String.fromCharCode(o)):t+=r;break}else r==="\r"&&Ie[ie]===`
296
+ `&&++ie;else{if($s(r.charCodeAt(0)))break;t+=r}return e!==""&&We({},vt,Bt),{type:Xs,value:t,octal:i,start:n,end:ie}}function $8(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({},Wf)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{We({},Wf)}try{return new RegExp(t,e)}catch{return null}}function e5(){var t,e,n,r,o;for(t=Ie[ie],fl(t==="/","Regular expression literal must start with a slash"),e=Ie[ie++],n=!1,r=!1;ie<Pt;)if(t=Ie[ie++],e+=t,t==="\\")t=Ie[ie++],$s(t.charCodeAt(0))&&We({},Yf),e+=t;else if($s(t.charCodeAt(0)))We({},Yf);else if(n)t==="]"&&(n=!1);else if(t==="/"){r=!0;break}else t==="["&&(n=!0);return r||We({},Yf),o=e.substr(1,e.length-2),{value:o,literal:e}}function t5(){var t,e,n;for(e="",n="";ie<Pt&&(t=Ie[ie],!!hl(t.charCodeAt(0)));)++ie,t==="\\"&&ie<Pt?We({},vt,Bt):(n+=t,e+=t);return n.search(/[^gimuy]/g)>=0&&We({},Wf,n),{value:n,literal:e}}function n5(){var t,e,n,r;return Xe=null,Um(),t=ie,e=e5(),n=t5(),r=$8(e.value,n.value),{literal:e.literal+n.literal,value:r,regex:{pattern:e.value,flags:n.value},start:t,end:ie}}function r5(t){return t.type===hi||t.type===Cr||t.type===ll||t.type===ul}function Vm(){if(Um(),ie>=Pt)return{type:Zs,start:ie,end:ie};const t=Ie.charCodeAt(ie);return ea(t)?Z8():t===40||t===41||t===59?Xf():t===39||t===34?J8():t===46?er(Ie.charCodeAt(ie+1))?Hm():Xf():er(t)?Hm():Xf()}function Qt(){const t=Xe;return ie=t.end,Xe=Vm(),ie=t.end,t}function qm(){const t=ie;Xe=Vm(),ie=t}function i5(t){const e=new vn(T8);return e.elements=t,e}function jm(t,e,n){const r=new vn(t==="||"||t==="&&"?R8:D8);return r.operator=t,r.left=e,r.right=n,r}function o5(t,e){const n=new vn(B8);return n.callee=t,n.arguments=e,n}function s5(t,e,n){const r=new vn(k8);return r.test=t,r.consequent=e,r.alternate=n,r}function Kf(t){const e=new vn(Nm);return e.name=t,e}function ta(t){const e=new vn(_8);return e.value=t.value,e.raw=Ie.slice(t.start,t.end),t.regex&&(e.raw==="//"&&(e.raw="/(?:)/"),e.regex=t.regex),e}function Wm(t,e,n){const r=new vn(F8);return r.computed=t==="[",r.object=e,r.property=n,r.computed||(n.member=!0),r}function a5(t){const e=new vn(M8);return e.properties=t,e}function Ym(t,e,n){const r=new vn(P8);return r.key=e,r.value=n,r.kind=t,r}function c5(t,e){const n=new vn(L8);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)=>(fl(s<r.length,"Message reference must be in range"),r[s]));throw n=new Error(o),n.index=ie,n.description=o,n}function dl(t){t.type===Zs&&We(t,G8),t.type===di&&We(t,O8),t.type===Xs&&We(t,N8),t.type===hi&&We(t,z8),t.type===Cr&&We(t,U8),We(t,vt,t.value)}function Lt(t){const e=Qt();(e.type!==Yt||e.value!==t)&&dl(e)}function it(t){return Xe.type===Yt&&Xe.value===t}function Jf(t){return Xe.type===Cr&&Xe.value===t}function l5(){const t=[];for(ie=Xe.start,Lt("[");!it("]");)it(",")?(Qt(),t.push(null)):(t.push(pi()),it("]")||Lt(","));return Qt(),i5(t)}function Qm(){ie=Xe.start;const t=Qt();return t.type===Xs||t.type===di?(t.octal&&We(t,zm),ta(t)):Kf(t.value)}function u5(){var t,e,n,r;if(ie=Xe.start,t=Xe,t.type===hi)return n=Qm(),Lt(":"),r=pi(),Ym("init",n,r);if(t.type===Zs||t.type===Yt)dl(t);else return e=Qm(),Lt(":"),r=pi(),Ym("init",e,r)}function f5(){var t=[],e,n,r,o={},i=String;for(ie=Xe.start,Lt("{");!it("}");)e=u5(),e.key.type===Nm?n=e.key.name:n=i(e.key.value),r="$"+n,Object.prototype.hasOwnProperty.call(o,r)?We({},H8):o[r]=!0,t.push(e),it("}")||Lt(",");return Lt("}"),a5(t)}function h5(){Lt("(");const t=$f();return Lt(")"),t}const d5={if:1};function p5(){var t,e,n;if(it("("))return h5();if(it("["))return l5();if(it("{"))return f5();if(t=Xe.type,ie=Xe.start,t===hi||d5[Xe.value])n=Kf(Qt().value);else if(t===Xs||t===di)Xe.octal&&We(Xe,zm),n=ta(Qt());else{if(t===Cr)throw new Error(Ks);t===ll?(e=Qt(),e.value=e.value==="true",n=ta(e)):t===ul?(e=Qt(),e.value=null,n=ta(e)):it("/")||it("/=")?(n=ta(n5()),qm()):dl(Qt())}return n}function g5(){const t=[];if(Lt("("),!it(")"))for(;ie<Pt&&(t.push(pi()),!it(")"));)Lt(",");return Lt(")"),t}function m5(){ie=Xe.start;const t=Qt();return r5(t)||dl(t),Kf(t.value)}function y5(){return Lt("."),m5()}function b5(){Lt("[");const t=$f();return Lt("]"),t}function w5(){var t,e,n;for(t=p5();;)if(it("."))n=y5(),t=Wm(".",t,n);else if(it("("))e=g5(),t=o5(t,e);else if(it("["))n=b5(),t=Wm("[",t,n);else break;return t}function Zm(){const t=w5();if(Xe.type===Yt&&(it("++")||it("--")))throw new Error(Ks);return t}function pl(){var t,e;if(Xe.type!==Yt&&Xe.type!==Cr)e=Zm();else{if(it("++")||it("--"))throw new Error(Ks);if(it("+")||it("-")||it("~")||it("!"))t=Qt(),e=pl(),e=c5(t.value,e);else{if(Jf("delete")||Jf("void")||Jf("typeof"))throw new Error(Ks);e=Zm()}}return e}function Xm(t){let e=0;if(t.type!==Yt&&t.type!==Cr)return 0;switch(t.value){case"||":e=1;break;case"&&":e=2;break;case"|":e=3;break;case"^":e=4;break;case"&":e=5;break;case"==":case"!=":case"===":case"!==":e=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":e=7;break;case"<<":case">>":case">>>":e=8;break;case"+":case"-":e=9;break;case"*":case"/":case"%":e=11;break}return e}function x5(){var t,e,n,r,o,i,s,a,c,l;if(t=Xe,c=pl(),r=Xe,o=Xm(r),o===0)return c;for(r.prec=o,Qt(),e=[t,Xe],s=pl(),i=[c,r,s];(o=Xm(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=jm(a,c,s),i.push(n);r=Qt(),r.prec=o,i.push(r),e.push(Xe),n=pl(),i.push(n)}for(l=i.length-1,n=i[l],e.pop();l>1;)e.pop(),n=jm(i[l-1].value,i[l-2],n),l-=2;return n}function pi(){var t,e,n;return t=x5(),it("?")&&(Qt(),e=pi(),Lt(":"),n=pi(),t=s5(t,e,n)),t}function $f(){const t=pi();if(it(","))throw new Error(Ks);return t}function v5(t){Ie=t,ie=0,Pt=Ie.length,Xe=null,qm();const e=$f();if(Xe.type!==Zs)throw new Error("Unexpect token after expression.");return e}var A5={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 Km(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&&xn("Missing arguments to clamp function."),s.length>3&&xn("Too many arguments to clamp function.");const a=s.map(t);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:r,date:n("getDate",r,0),day:n("getDay",r,0),year:n("getFullYear",r,0),month:n("getMonth",r,0),hours:n("getHours",r,0),minutes:n("getMinutes",r,0),seconds:n("getSeconds",r,0),milliseconds:n("getMilliseconds",r,0),time:n("getTime",r,0),timezoneoffset:n("getTimezoneOffset",r,0),utcdate:n("getUTCDate",r,0),utcday:n("getUTCDay",r,0),utcyear:n("getUTCFullYear",r,0),utcmonth:n("getUTCMonth",r,0),utchours:n("getUTCHours",r,0),utcminutes:n("getUTCMinutes",r,0),utcseconds:n("getUTCSeconds",r,0),utcmilliseconds:n("getUTCMilliseconds",r,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",o,0),lower:n("toLowerCase",o,0),substring:n("substring",o),split:n("split",o),trim:n("trim",o,0),btoa:"btoa",atob:"atob",regexp:i,test:n("test",i),if:function(s){s.length<3&&xn("Missing arguments to if function."),s.length>3&&xn("Too many arguments to if function.");const a=s.map(t);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function E5(t){const e=t&&t.length-1;return e&&(t[0]==='"'&&t[e]==='"'||t[0]==="'"&&t[e]==="'")?t.slice(1,-1):t}function S5(t){t=t||{};const e=t.allowed?Om(t.allowed):{},n=t.forbidden?Om(t.forbidden):{},r=t.constants||A5,o=(t.functions||Km)(f),i=t.globalvar,s=t.fieldvar,a=Lm(i)?i:p=>`${i}["${p}"]`;let c={},l={},u=0;function f(p){if(h8(p))return p;const b=h[p.type];return b==null&&xn("Unsupported type: "+p.type),b(p)}const h={Literal:p=>p.raw,Identifier:p=>{const b=p.name;return u>0?b:cl(n,b)?xn("Illegal identifier: "+b):cl(r,b)?r[b]:cl(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[E5(y)]=1),b&&(u-=1),v+(b?"."+y:"["+y+"]")},CallExpression:p=>{p.callee.type!=="Identifier"&&xn("Illegal callee type: "+p.callee.type);const b=p.callee.name,v=p.arguments,y=cl(o,b)&&o[b];return y||xn("Unrecognized function: "+b),Lm(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 d(p){const b={code:f(p),globals:Object.keys(c),fields:Object.keys(l)};return c={},l={},b}return d.functions=o,d.constants=r,d}function Jm(t,e,n){return n=(n-t)/(e-t),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function C5(t,e,n){return lo((n-t)/(e-t),0,1)}const $m={clamp:lo,format(t,e){return Dt(e)(t)},mapHasKey(t,e){return t.has(e)},isArray:_t,isBoolean:ds,isDefined(t){return t!==void 0},isNumber:Ht,isObject:Rt,isRegExp:gA,isString:rt,isValid(t){return t!=null&&t===t},lerp:sp,linearstep:C5,replace(t,e,n){return String(t).replace(e,n)},smoothstep:Jm};function I5(t){const e=Km(t);for(const n in $m)e[n]=`this.${n}`;return e}const T5=S5({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:I5});function D5(t,e={}){try{const n=v5(t),r=T5(n),o=Function("datum","globalObject",`"use strict";
297
297
  try {
298
298
  return (${r.code});
299
299
  } catch (e) {
300
300
  throw new Error("Error evaluating expression: " + ${JSON.stringify(t)} + ", " + e.message, e);
301
- }`).bind(Gm),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 b5{constructor(e){ge(this,Ur);Gt(this,"paramListeners");ge(this,Mi,new Map);ge(this,qo,new Map);ge(this,jo,new Map);ge(this,Ua);Te(this,Ua,e??(()=>{})),Te(this,Ur,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,Mi).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=al(e.select);if(jf(o))r(o.toggle?jm():qm(null));else if(Zm(o)){if(!o.encodings)throw new Error(`Interval selection "${n}" must have encodings defined!`);r(Wm(o.encodings))}}return W(this,jo).set(n,e),r}allocateSetter(e,n,r=!1){if($s(e),W(this,Mi).has(e))throw new Error("Setter already allocated for parameter: "+e);const o=i=>{const s=W(this,Ur).get(e);if(i!==s){W(this,Ur).set(e,i);const a=this.paramListeners.get(e);if(a&&!r)for(const c of a)c()}};return o(n),W(this,Mi).set(e,o),o}getSetter(e){const n=W(this,Mi).get(e);if(!n)throw new Error("Setter not found for parameter: "+e);return n}getValue(e){return W(this,Ur).get(e)}findValue(e){const n=this.findMediatorForParam(e);return n==null?void 0:n.getValue(e)}get paramConfigs(){return W(this,jo)}findMediatorForParam(e){var n;return W(this,Ur).has(e)?this:(n=W(this,Ua).call(this))==null?void 0:n.findMediatorForParam(e)}createExpression(e){if(W(this,qo).has(e))return W(this,qo).get(e);const n={},r=m5(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,qo).set(e,r),r}evaluateAndGet(e){return this.createExpression(e)()}hasPointSelections(){for(const e of W(this,jo).values())if(Hm(e)){const n=e.select;if(rt(n)){if(n=="point")return!0}else if(n.type=="point")return!0}return!1}}Ur=new WeakMap,Mi=new WeakMap,qo=new WeakMap,jo=new WeakMap,Ua=new WeakMap;function Ot(t){return typeof t=="object"&&t!=null&&"expr"in t&&rt(t.expr)}function an(t){if(Ot(t))throw new Error(`ExprRef ${JSON.stringify(t)} not allowed here. Expected a scalar value.`);return t}function y5(t){return("expr"in t||"bind"in t)&&!("select"in t)}function Hm(t){return!("expr"in t||"bind"in t)&&"select"in t}function sl(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(Ot(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 $s(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 Vm(t){return Object.assign(()=>t,{addListener:()=>{},invalidate:()=>{},identifier:()=>"constant",fields:[],globals:[],code:JSON.stringify(t)})}function qm(t){return{type:"single",datum:t,uniqueId:t==null?void 0:t[sn]}}function jm(t){return t??(t=[]),{type:"multi",data:new Map(t.map(e=>[e[sn],e]))}}function Wm(t){return{type:"interval",intervals:Object.fromEntries(t.map(e=>[e,null]))}}function w5(t,{add:e,remove:n,toggle:r}){const o=t.data;for(const i of e??[])o.set(i[sn],i);for(const i of n??[])o.delete(i[sn]);for(const i of r??[]){const s=i[sn];o.has(s)?o.delete(s):o.set(s,i)}return{type:"multi",data:o}}function x5(t,e){const n=!!(t.empty??!0),r=$s(t.param),o=t.fields??{};if(Qm(e))return`${r}.uniqueId == null ? ${n} : ${r}.uniqueId === datum[${JSON.stringify(sn)}]`;if(qf(e))return`${r}.data.size == 0 ? ${n} : mapHasKey(${r}.data, datum[${JSON.stringify(sn)}])`;if(Ym(e)){const i=Object.keys(e.intervals),s=Object.keys(o).filter(Yf);if(s.length===0)throw new Error("Filtering using interval selections requires at least one primary positional channel in the config! "+JSON.stringify(t));if(s.some(l=>!i.includes(l)))throw new Error(`Selection channels (${i.join(", ")}) do not match the fields: ${JSON.stringify(t)}!`);const a=l=>`datum[${JSON.stringify(l)}]`;return i.map(l=>{const u=Zf(l),f=o[l],h=o[u]??o[l],d=`${r}.intervals.${l}[0] <= ${a(h)}`,p=`${a(f)} <= ${r}.intervals.${l}[1]`;return`(${r}.intervals.${l} ? (${d} && ${p}) : ${n})`}).join(" && ")}else throw new Error(`Unrecognized selection type : ${JSON.stringify(e)}`)}function Ym(t){return t.type==="interval"}function Qm(t){return t.type==="single"}function qf(t){return t.type==="multi"}function al(t){const e=typeof t=="string"?{type:t}:t;return jf(e)&&(e.on??(e.on="click"),e.on==="click"&&(e.toggle=!0)),e}function jf(t){return t&&t.type=="point"}function Zm(t){return t&&t.type=="interval"}function Xm(t){return Object.values(t.intervals).some(e=>e&&e.length===2)}function v5(t,e){return Object.entries(t.intervals).every(([n,r])=>(n=="x"||n=="y")&&r&&r[0]<=e[n]&&r[1]>=e[n])}function Qe(t,e=t){if(/^[A-Za-z0-9_]+$/.test(t)){const n=function(o){t in o||A5(o,t)},r=new Function("validator",`
301
+ }`).bind($m),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 B5{constructor(e){he(this,Gr);Gt(this,"paramListeners");he(this,Pi,new Map);he(this,jo,new Map);he(this,Wo,new Map);he(this,Va);Ae(this,Va,e??(()=>{})),Ae(this,Gr,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),q(this,Pi).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=ml(e.select);if(th(o))r(o.toggle?r1():n1(null));else if(a1(o)){if(!o.encodings)throw new Error(`Interval selection "${n}" must have encodings defined!`);r(i1(o.encodings))}}return q(this,Wo).set(n,e),r}allocateSetter(e,n,r=!1){if(na(e),q(this,Pi).has(e))throw new Error("Setter already allocated for parameter: "+e);const o=i=>{const s=q(this,Gr).get(e);if(i!==s){q(this,Gr).set(e,i);const a=this.paramListeners.get(e);if(a&&!r)for(const c of a)c()}};return o(n),q(this,Pi).set(e,o),o}getSetter(e){const n=q(this,Pi).get(e);if(!n)throw new Error("Setter not found for parameter: "+e);return n}getValue(e){return q(this,Gr).get(e)}findValue(e){const n=this.findMediatorForParam(e);return n==null?void 0:n.getValue(e)}get paramConfigs(){return q(this,Wo)}findMediatorForParam(e){var n;return q(this,Gr).has(e)?this:(n=q(this,Va).call(this))==null?void 0:n.findMediatorForParam(e)}createExpression(e){if(q(this,jo).has(e))return q(this,jo).get(e);const n={},r=D5(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,q(this,jo).set(e,r),r}evaluateAndGet(e){return this.createExpression(e)()}hasPointSelections(){for(const e of q(this,Wo).values())if(e1(e)){const n=e.select;if(rt(n)){if(n=="point")return!0}else if(n.type=="point")return!0}return!1}}Gr=new WeakMap,Pi=new WeakMap,jo=new WeakMap,Wo=new WeakMap,Va=new WeakMap;function Ot(t){return typeof t=="object"&&t!=null&&"expr"in t&&rt(t.expr)}function an(t){if(Ot(t))throw new Error(`ExprRef ${JSON.stringify(t)} not allowed here. Expected a scalar value.`);return t}function k5(t){return("expr"in t||"bind"in t)&&!("select"in t)}function e1(t){return!("expr"in t||"bind"in t)&&"select"in t}function gl(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(Ot(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 na(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 t1(t){return Object.assign(()=>t,{addListener:()=>{},invalidate:()=>{},identifier:()=>"constant",fields:[],globals:[],code:JSON.stringify(t)})}function n1(t){return{type:"single",datum:t,uniqueId:t==null?void 0:t[sn]}}function r1(t){return t??(t=[]),{type:"multi",data:new Map(t.map(e=>[e[sn],e]))}}function i1(t){return{type:"interval",intervals:Object.fromEntries(t.map(e=>[e,null]))}}function _5(t,{add:e,remove:n,toggle:r}){const o=t.data;for(const i of e??[])o.set(i[sn],i);for(const i of n??[])o.delete(i[sn]);for(const i of r??[]){const s=i[sn];o.has(s)?o.delete(s):o.set(s,i)}return{type:"multi",data:o}}function R5(t,e){const n=!!(t.empty??!0),r=na(t.param),o=t.fields??{};if(s1(e))return`${r}.uniqueId == null ? ${n} : ${r}.uniqueId === datum[${JSON.stringify(sn)}]`;if(eh(e))return`${r}.data.size == 0 ? ${n} : mapHasKey(${r}.data, datum[${JSON.stringify(sn)}])`;if(o1(e)){const i=Object.keys(e.intervals),s=Object.keys(o).filter(rh);if(s.length===0)throw new Error("Filtering using interval selections requires at least one primary positional channel in the config! "+JSON.stringify(t));if(s.some(l=>!i.includes(l)))throw new Error(`Selection channels (${i.join(", ")}) do not match the fields: ${JSON.stringify(t)}!`);const a=l=>`datum[${JSON.stringify(l)}]`;return i.map(l=>{const u=oh(l),f=o[l],h=o[u]??o[l],d=`${r}.intervals.${l}[0] <= ${a(h)}`,p=`${a(f)} <= ${r}.intervals.${l}[1]`;return`(${r}.intervals.${l} ? (${d} && ${p}) : ${n})`}).join(" && ")}else throw new Error(`Unrecognized selection type : ${JSON.stringify(e)}`)}function o1(t){return t.type==="interval"}function s1(t){return t.type==="single"}function eh(t){return t.type==="multi"}function ml(t){const e=typeof t=="string"?{type:t}:t;return th(e)&&(e.on??(e.on="click"),e.on==="click"&&(e.toggle=!0)),e}function th(t){return t&&t.type=="point"}function a1(t){return t&&t.type=="interval"}function c1(t){return Object.values(t.intervals).some(e=>e&&e.length===2)}function F5(t,e){return Object.entries(t.intervals).every(([n,r])=>(n=="x"||n=="y")&&r&&r[0]<=e[n]&&r[1]>=e[n])}function Qe(t,e=t){if(/^[A-Za-z0-9_]+$/.test(t)){const n=function(o){t in o||M5(o,t)},r=new Function("validator",`
302
302
  let validated = !validator;
303
303
  return function accessField(datum) {
304
304
  if (!validated) {
@@ -306,46 +306,46 @@ ${n}`}handle(e){this._propagate(e)}complete(){this.completed=!0;for(const e of t
306
306
  validated = true;
307
307
  }
308
308
  return datum[${JSON.stringify(t)}];
309
- }`)(n);return Je(r,[t],e)}else return sc(t)}function A5(t,e){throw new Error(`Invalid field "${e}". Available fields or properties: ${Object.keys(t).join(", ")}`)}function Km(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=((Zt(e)&&e.resolutionChannel)??(ll(t)&&t))||void 0,"param"in e?(s.predicate=Vm(!1),s.predicate.param=e.param,s.predicate.empty=e.empty??!0):(s.predicate=Vm(!0),s.predicate.empty=!1),s.asNumberAccessor=()=>s,s}function o(i){if(Ot(i)){const s=r(n.createExpression(i.expr));if(s.fields.length>0)throw new Error("Expression in DatumDef/ValueDef cannot access data fields: "+i.expr);return s}else{const s=i;return r(()=>s)}}if(Cr(e))try{return r(Qe(e.field))}catch(i){throw new Error(`Invalid field definition: ${i.message}`)}else{if(ta(e))return r(n.createExpression(e.expr));if(ea(e))return o(e.datum);if(cn(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 E5(t,e,n){const r=[];if(T5(e)||Wf(e)){const o=Array.isArray(e.condition)?e.condition:[e.condition];for(const i of o)r.push(Km(t,i,n))}if(r.push(Km(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 S5(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]=C5(E5(o,i,t.paramMediator),r));return n}function C5(t,e){if(t.length===1)return Jm(t[0],e);const n=t.map(i=>i.predicate),r=t.map(i=>Jm(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 Jm(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 cn(t){return t&&"value"in t}function Cr(t){return t&&"field"in t}function ea(t){return t&&"datum"in t}function Zt(t){return Cr(t)||ea(t)||ta(t)||$m(t)}function I5(t,e){const n=t.mark.encoding[e];if(Zt(n))return n;throw new Error("Not a channel def with scale!")}function $m(t){return t&&"chrom"in t}function ta(t){return t&&"expr"in t}function T5(t){return(Cr(t)||ea(t))&&"condition"in t}function Wf(t){return cn(t)&&"condition"in t}const pi=["x","y"],D5=["x2","y2"],B5=[...pi,...D5];function Yf(t){return pi.includes(t)}function na(t){return B5.includes(t)}const e1={x:"x2",y:"y2"},t1=Object.fromEntries(Object.entries(e1).map(t=>[t[1],t[0]]));function Qf(t){return t in t1}function Zf(t){const e=e1[t];if(e)return e;throw new Error(`${t} has no secondary channel!`)}function gi(t){return t1[t]??t}function Ir(t){return["color","fill","stroke"].includes(gi(t))}function cl(t){return["shape"].includes(t)}function ll(t){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(t)}function k5(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 n1(t){if(!cl(t))throw new Error("Not a discrete channel: "+t);const e=new Map(k5(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 uo(t,e,n){return t.fields=e||[],t.fname=n,t}function _5(t){return t.length===1?R5(t[0]):F5(t)}const R5=t=>function(e){return e[t]},F5=t=>{const e=t.length;return function(n){for(let r=0;r<e;++r)n=n[t[r]];return n}};function Xf(t){throw Error(t)}function M5(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||Xf("Access path missing open bracket: "+t),o>0&&l(),o=0,s=a+1)}return o&&Xf("Access path missing closing bracket: "+t),r&&Xf("Access path missing closing quote: "+t),a>s&&(a++,l()),e}function P5(t,e,n){const r=M5(t);return t=r.length===1?r[0]:t,uo(_5(r),[t],t)}P5("id"),uo(t=>t,[],"identity"),uo(()=>0,[],"zero"),uo(()=>1,[],"one"),uo(()=>!0,[],"true"),uo(()=>!1,[],"false");var r1=Array.isArray;function i1(t){return t[t.length-1]}function L5(t){return t==null||t===""?null:+t}function O5(t){return t!=null?r1(t)?t:[t]:[]}function N5(t){const e={},n=t.length;for(let r=0;r<n;++r)e[t[r]]=!0;return e}function On(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Tr(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 Kf=Symbol("implicit");function Jf(){var t=new Wn,e=[],n=[],r=Kf;function o(i){let s=t.get(i);if(s===void 0){if(r!==Kf)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 Wn;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 Jf(e,n).unknown(r)},On.apply(o,arguments),o}function fo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ra(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Dr(){}var mi=.7,ho=1/mi,po="\\s*([+-]?\\d+)\\s*",ia="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Nn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z5=/^#([0-9a-f]{3,8})$/,U5=new RegExp(`^rgb\\(${po},${po},${po}\\)$`),G5=new RegExp(`^rgb\\(${Nn},${Nn},${Nn}\\)$`),H5=new RegExp(`^rgba\\(${po},${po},${po},${ia}\\)$`),V5=new RegExp(`^rgba\\(${Nn},${Nn},${Nn},${ia}\\)$`),q5=new RegExp(`^hsl\\(${ia},${Nn},${Nn}\\)$`),j5=new RegExp(`^hsla\\(${ia},${Nn},${Nn},${ia}\\)$`),o1={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};fo(Dr,Br,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:s1,formatHex:s1,formatHex8:W5,formatHsl:Y5,formatRgb:a1,toString:a1});function s1(){return this.rgb().formatHex()}function W5(){return this.rgb().formatHex8()}function Y5(){return h1(this).formatHsl()}function a1(){return this.rgb().formatRgb()}function Br(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=z5.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?c1(e):n===3?new At(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ul(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ul(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=U5.exec(t))?new At(e[1],e[2],e[3],1):(e=G5.exec(t))?new At(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=H5.exec(t))?ul(e[1],e[2],e[3],e[4]):(e=V5.exec(t))?ul(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=q5.exec(t))?f1(e[1],e[2]/100,e[3]/100,1):(e=j5.exec(t))?f1(e[1],e[2]/100,e[3]/100,e[4]):o1.hasOwnProperty(t)?c1(o1[t]):t==="transparent"?new At(NaN,NaN,NaN,0):null}function c1(t){return new At(t>>16&255,t>>8&255,t&255,1)}function ul(t,e,n,r){return r<=0&&(t=e=n=NaN),new At(t,e,n,r)}function $f(t){return t instanceof Dr||(t=Br(t)),t?(t=t.rgb(),new At(t.r,t.g,t.b,t.opacity)):new At}function fl(t,e,n,r){return arguments.length===1?$f(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}fo(At,fl,ra(Dr,{brighter(t){return t=t==null?ho:Math.pow(ho,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?mi:Math.pow(mi,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new At(bi(this.r),bi(this.g),bi(this.b),hl(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:l1,formatHex:l1,formatHex8:Q5,formatRgb:u1,toString:u1}));function l1(){return`#${yi(this.r)}${yi(this.g)}${yi(this.b)}`}function Q5(){return`#${yi(this.r)}${yi(this.g)}${yi(this.b)}${yi((isNaN(this.opacity)?1:this.opacity)*255)}`}function u1(){const t=hl(this.opacity);return`${t===1?"rgb(":"rgba("}${bi(this.r)}, ${bi(this.g)}, ${bi(this.b)}${t===1?")":`, ${t})`}`}function hl(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function bi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function yi(t){return t=bi(t),(t<16?"0":"")+t.toString(16)}function f1(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 h1(t){if(t instanceof An)return new An(t.h,t.s,t.l,t.opacity);if(t instanceof Dr||(t=Br(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 eh(t,e,n,r){return arguments.length===1?h1(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}fo(An,eh,ra(Dr,{brighter(t){return t=t==null?ho:Math.pow(ho,t),new An(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?mi:Math.pow(mi,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(th(t>=240?t-240:t+120,o,r),th(t,o,r),th(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new An(d1(this.h),dl(this.s),dl(this.l),hl(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=hl(this.opacity);return`${t===1?"hsl(":"hsla("}${d1(this.h)}, ${dl(this.s)*100}%, ${dl(this.l)*100}%${t===1?")":`, ${t})`}`}}));function d1(t){return t=(t||0)%360,t<0?t+360:t}function dl(t){return Math.max(0,Math.min(1,t||0))}function th(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 p1=Math.PI/180,g1=180/Math.PI,pl=18,m1=.96422,b1=1,y1=.82521,w1=4/29,go=6/29,x1=3*go*go,Z5=go*go*go;function v1(t){if(t instanceof zn)return new zn(t.l,t.a,t.b,t.opacity);if(t instanceof er)return A1(t);t instanceof At||(t=$f(t));var e=sh(t.r),n=sh(t.g),r=sh(t.b),o=rh((.2225045*e+.7168786*n+.0606169*r)/b1),i,s;return e===n&&n===r?i=s=o:(i=rh((.4360747*e+.3850649*n+.1430804*r)/m1),s=rh((.0139322*e+.0971045*n+.7141733*r)/y1)),new zn(116*o-16,500*(i-o),200*(o-s),t.opacity)}function nh(t,e,n,r){return arguments.length===1?v1(t):new zn(t,e,n,r??1)}function zn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}fo(zn,nh,ra(Dr,{brighter(t){return new zn(this.l+pl*(t??1),this.a,this.b,this.opacity)},darker(t){return new zn(this.l-pl*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=m1*ih(e),t=b1*ih(t),n=y1*ih(n),new At(oh(3.1338561*e-1.6168667*t-.4906146*n),oh(-.9787684*e+1.9161415*t+.033454*n),oh(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function rh(t){return t>Z5?Math.pow(t,1/3):t/x1+w1}function ih(t){return t>go?t*t*t:x1*(t-w1)}function oh(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function sh(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function X5(t){if(t instanceof er)return new er(t.h,t.c,t.l,t.opacity);if(t instanceof zn||(t=v1(t)),t.a===0&&t.b===0)return new er(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*g1;return new er(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ah(t,e,n,r){return arguments.length===1?X5(t):new er(t,e,n,r??1)}function er(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function A1(t){if(isNaN(t.h))return new zn(t.l,0,0,t.opacity);var e=t.h*p1;return new zn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}fo(er,ah,ra(Dr,{brighter(t){return new er(this.h,this.c,this.l+pl*(t??1),this.opacity)},darker(t){return new er(this.h,this.c,this.l-pl*(t??1),this.opacity)},rgb(){return A1(this).rgb()}}));var E1=-.14861,ch=1.78277,lh=-.29227,gl=-.90649,oa=1.97294,S1=oa*gl,C1=oa*ch,I1=ch*lh-gl*E1;function K5(t){if(t instanceof wi)return new wi(t.h,t.s,t.l,t.opacity);t instanceof At||(t=$f(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(I1*r+S1*e-C1*n)/(I1+S1-C1),i=r-o,s=(oa*(n-o)-lh*i)/gl,a=Math.sqrt(s*s+i*i)/(oa*o*(1-o)),c=a?Math.atan2(s,i)*g1-120:NaN;return new wi(c<0?c+360:c,a,o,t.opacity)}function uh(t,e,n,r){return arguments.length===1?K5(t):new wi(t,e,n,r??1)}function wi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}fo(wi,uh,ra(Dr,{brighter(t){return t=t==null?ho:Math.pow(ho,t),new wi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?mi:Math.pow(mi,t),new wi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*p1,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*(E1*r+ch*o)),255*(e+n*(lh*r+gl*o)),255*(e+n*(oa*r)),this.opacity)}}));function T1(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 D1(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 T1((n-r/e)*e,s,o,i,a)}}function B1(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 T1((n-r/e)*e,o,i,s,a)}}const ml=t=>()=>t;function k1(t,e){return function(n){return t+n*e}}function J5(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 bl(t,e){var n=e-t;return n?k1(t,n>180||n<-180?n-360*Math.round(n/360):n):ml(isNaN(t)?e:t)}function $5(t){return(t=+t)==1?Et:function(e,n){return n-e?J5(e,n,t):ml(isNaN(e)?n:e)}}function Et(t,e){var n=e-t;return n?k1(t,n):ml(isNaN(t)?e:t)}const fh=function t(e){var n=$5(e);function r(o,i){var s=n((o=fl(o)).r,(i=fl(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 _1(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=fl(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 eI=_1(D1),tI=_1(B1);function hh(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 R1(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function nI(t,e){return(R1(e)?hh:F1)(t,e)}function F1(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]=kr(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 M1(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 P1(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]=kr(t[o],e[o]):r[o]=e[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var dh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ph=new RegExp(dh.source,"g");function rI(t){return function(){return t}}function iI(t){return function(e){return t(e)+""}}function L1(t,e){var n=dh.lastIndex=ph.lastIndex=0,r,o,i,s=-1,a=[],c=[];for(t=t+"",e=e+"";(r=dh.exec(t))&&(o=ph.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=ph.lastIndex;return n<e.length&&(i=e.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?c[0]?iI(c[0].x):rI(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 kr(t,e){var n=typeof e,r;return e==null||n==="boolean"?ml(e):(n==="number"?En:n==="string"?(r=Br(e))?(e=r,fh):L1:e instanceof Br?fh:e instanceof Date?M1:R1(e)?hh:Array.isArray(e)?F1:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?P1:En)(t,e)}function oI(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function sI(t,e){var n=bl(+t,+e);return function(r){var o=n(r);return o-360*Math.floor(o/360)}}function sa(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var O1=180/Math.PI,gh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function N1(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)*O1,skewX:Math.atan(c)*O1,scaleX:s,scaleY:a}}var yl;function aI(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?gh:N1(e.a,e.b,e.c,e.d,e.e,e.f)}function cI(t){return t==null||(yl||(yl=document.createElementNS("http://www.w3.org/2000/svg","g")),yl.setAttribute("transform",t),!(t=yl.transform.baseVal.consolidate()))?gh:(t=t.matrix,N1(t.a,t.b,t.c,t.d,t.e,t.f))}function z1(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:En(l,f)},{i:y-2,x:En(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:En(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:En(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:En(l,f)},{i:y-2,x:En(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 lI=z1(aI,"px, ","px)","deg)"),uI=z1(cI,", ",")",")"),fI=1e-12;function U1(t){return((t=Math.exp(t))+1/t)/2}function hI(t){return((t=Math.exp(t))-1/t)/2}function dI(t){return((t=Math.exp(2*t))-1)/(t+1)}const pI=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<fI)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),S=(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(S*S+1)-S),_=Math.log(Math.sqrt(E*E+1)-E);b=(_-I)/e,v=function(B){var N=B*b,F=U1(I),M=l/(n*A)*(F*dI(e*N+I)-hI(I));return[a+M*d,c+M*p,l*F/U1(e*N+I)]}}return v.duration=b*1e3*e/Math.SQRT2,v}return o.rho=function(i){var s=Math.max(.001,+i),a=s*s,c=a*a;return t(s,a,c)},o}(Math.SQRT2,2,4);function G1(t){return function(e,n){var r=t((e=eh(e)).h,(n=eh(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 gI=G1(bl);var mI=G1(Et);function bI(t,e){var n=Et((t=nh(t)).l,(e=nh(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 H1(t){return function(e,n){var r=t((e=ah(e)).h,(n=ah(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 yI=H1(bl);var wI=H1(Et);function V1(t){return function e(n){n=+n;function r(o,i){var s=t((o=uh(o)).h,(i=uh(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 xI=V1(bl);var vI=V1(Et);function mh(t,e){e===void 0&&(e=t,t=kr);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 AI(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}const EI=Object.freeze(Object.defineProperty({__proto__:null,interpolate:kr,interpolateArray:nI,interpolateBasis:D1,interpolateBasisClosed:B1,interpolateCubehelix:xI,interpolateCubehelixLong:vI,interpolateDate:M1,interpolateDiscrete:oI,interpolateHcl:yI,interpolateHclLong:wI,interpolateHsl:gI,interpolateHslLong:mI,interpolateHue:sI,interpolateLab:bI,interpolateNumber:En,interpolateNumberArray:hh,interpolateObject:P1,interpolateRgb:fh,interpolateRgbBasis:eI,interpolateRgbBasisClosed:tI,interpolateRound:sa,interpolateString:L1,interpolateTransformCss:lI,interpolateTransformSvg:uI,interpolateZoom:pI,piecewise:mh,quantize:AI},Symbol.toStringTag,{value:"Module"}));function SI(t){return function(){return t}}function bh(t){return+t}var q1=[0,1];function Xt(t){return t}function yh(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:SI(isNaN(e)?NaN:.5)}function CI(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function II(t,e,n){var r=t[0],o=t[1],i=e[0],s=e[1];return o<r?(r=yh(o,r),i=n(s,i)):(r=yh(r,o),i=n(i,s)),function(a){return i(r(a))}}function TI(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]=yh(t[s],t[s+1]),i[s]=n(e[s],e[s+1]);return function(a){var c=gr(t,a,1,r)-1;return i[c](o[c](a))}}function aa(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function wl(){var t=q1,e=q1,n=kr,r,o,i,s=Xt,a,c,l;function u(){var h=Math.min(t.length,e.length);return s!==Xt&&(s=CI(t[0],t[h-1])),a=h>2?TI:II,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),En)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,bh),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=sa,u()},f.clamp=function(h){return arguments.length?(s=h?!0:Xt,u()):s!==Xt},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 j1(){return wl()(Xt,Xt)}function W1(t,e,n,r){var o=ni(t,e,n),i;switch(r=Yi(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(i=h3(o,s))&&(r.precision=i),_p(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=d3(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=f3(o))&&(r.precision=i-(r.type==="%")*2);break}}return Dt(r)}function xi(t){var e=t.domain;return t.ticks=function(n){var r=e();return bc(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var o=e();return W1(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=Pu(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 Y1(){var t=j1();return t.copy=function(){return aa(t,Y1())},On.apply(t,arguments),xi(t)}function Q1(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,bh),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return Q1(t).unknown(e)},t=arguments.length?Array.from(t,bh):[0,1],xi(n)}function Z1(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 X1(t){return Math.log(t)}function K1(t){return Math.exp(t)}function DI(t){return-Math.log(-t)}function BI(t){return-Math.exp(-t)}function kI(t){return isFinite(t)?+("1e"+t):t<0?0:t}function _I(t){return t===10?kI:t===Math.E?Math.exp:e=>Math.pow(t,e)}function RI(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 J1(t){return(e,n)=>-t(-e,n)}function wh(t){const e=t(X1,K1),n=e.domain;let r=10,o,i;function s(){return o=RI(r),i=_I(r),n()[0]<0?(o=J1(o),i=J1(i),t(DI,BI)):t(X1,K1),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=bc(l,u,v))}else b=bc(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=Yi(c)).precision==null&&(c.trim=!0),c=Dt(c)),a===1/0)return c;const l=Math.max(1,r*a/e.ticks().length);return u=>{let f=u/i(Math.round(o(u)));return f*r<r-.5&&(f*=r),f<=l?c(u):""}},e.nice=()=>n(Z1(n(),{floor:a=>i(Math.floor(o(a))),ceil:a=>i(Math.ceil(o(a)))})),e}function xh(){const t=wh(wl()).domain([1,10]);return t.copy=()=>aa(t,xh()).base(t.base()),On.apply(t,arguments),t}function $1(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function eb(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function vh(t){var e=1,n=t($1(e),eb(e));return n.constant=function(r){return arguments.length?t($1(e=+r),eb(e)):e},xi(n)}function tb(){var t=vh(wl());return t.copy=function(){return aa(t,tb()).constant(t.constant())},On.apply(t,arguments)}function nb(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function FI(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function MI(t){return t<0?-t*t:t*t}function Ah(t){var e=t(Xt,Xt),n=1;function r(){return n===1?t(Xt,Xt):n===.5?t(FI,MI):t(nb(n),nb(1/n))}return e.exponent=function(o){return arguments.length?(n=+o,r()):n},xi(e)}function Eh(){var t=Ah(wl());return t.copy=function(){return aa(t,Eh()).exponent(t.exponent())},On.apply(t,arguments),t}function PI(){return Eh.apply(null,arguments).exponent(.5)}function rb(){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]=Sp(t,s/a);return i}function i(s){return s==null||isNaN(s=+s)?r:e[gr(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(ei),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 rb().domain(t).range(e).unknown(r)},On.apply(i,arguments)}function ib(){var t=0,e=1,n=1,r=[.5],o=[0,1],i;function s(c){return c!=null&&c<=c?o[gr(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 ib().domain([t,e]).range(o).unknown(i)},On.apply(xi(s),arguments)}function ob(){var t=[.5],e=[0,1],n,r=1;function o(i){return i!=null&&i<=i?e[gr(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 ob().domain(t).range(e).unknown(n)},On.apply(o,arguments)}function LI(t){return new Date(t)}function OI(t){return t instanceof Date?+t:+new Date(+t)}function Sh(t,e,n,r,o,i,s,a,c,l){var u=j1(),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"),S=l("%B"),E=l("%Y");function I(_){return(c(_)<_?d:a(_)<_?p:s(_)<_?y:i(_)<_?v:r(_)<_?o(_)<_?b:A:n(_)<_?S:E)(_)}return u.invert=function(_){return new Date(f(_))},u.domain=function(_){return arguments.length?h(Array.from(_,OI)):h().map(LI)},u.ticks=function(_){var B=h();return t(B[0],B[B.length-1],_??10)},u.tickFormat=function(_,B){return B==null?I:l(B)},u.nice=function(_){var B=h();return(!_||typeof _.range!="function")&&(_=e(B[0],B[B.length-1],_??10)),_?h(Z1(B,_)):u},u.copy=function(){return aa(u,Sh(t,e,n,r,o,i,s,a,c,l))},u}function NI(){return On.apply(Sh(S3,C3,_n,Ki,Ss,mr,Ac,xc,Xn,Wu).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function zI(){return On.apply(Sh(A3,E3,Rn,Ji,Cs,ri,Ec,vc,Xn,Yu).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function xl(){var t=0,e=1,n,r,o,i,s=Xt,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(kr),l.rangeRound=u(sa),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 _r(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Ch(){var t=xi(xl()(Xt));return t.copy=function(){return _r(t,Ch())},Tr.apply(t,arguments)}function sb(){var t=wh(xl()).domain([1,10]);return t.copy=function(){return _r(t,sb()).base(t.base())},Tr.apply(t,arguments)}function ab(){var t=vh(xl());return t.copy=function(){return _r(t,ab()).constant(t.constant())},Tr.apply(t,arguments)}function Ih(){var t=Ah(xl());return t.copy=function(){return _r(t,Ih()).exponent(t.exponent())},Tr.apply(t,arguments)}function UI(){return Ih.apply(null,arguments).exponent(.5)}function vl(){var t=0,e=.5,n=1,r=1,o,i,s,a,c,l=Xt,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,S;return arguments.length?([b,A,S]=v,l=mh(y,[b,A,S]),d):[l(0),l(.5),l(1)]}}return d.range=p(kr),d.rangeRound=p(sa),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 cb(){var t=xi(vl()(Xt));return t.copy=function(){return _r(t,cb())},Tr.apply(t,arguments)}function lb(){var t=wh(vl()).domain([.1,1,10]);return t.copy=function(){return _r(t,lb()).base(t.base())},Tr.apply(t,arguments)}function ub(){var t=vh(vl());return t.copy=function(){return _r(t,ub()).constant(t.constant())},Tr.apply(t,arguments)}function Th(){var t=Ah(vl());return t.copy=function(){return _r(t,Th()).exponent(t.exponent())},Tr.apply(t,arguments)}function GI(){return Th.apply(null,arguments).exponent(.5)}function Un(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 HI=Un("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),VI=Un("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),qI=Un("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),jI=Un("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),WI=Un("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),YI=Un("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),QI=Un("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),ZI=Un("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),XI=Un("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),KI=Un("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),JI="year",Dh="quarter";[JI,Dh,"month","week","date","day","dayofyear","hours","minutes","seconds","milliseconds"].reduce((t,e,n)=>(t[e]=1+n,t),{}),Dh+"",Ki.every(3),Dh+"",Ji.every(3);function Bh(t,e,n){const r=t-e+n*2;return t?r>0?r:1:0}const $I="identity",mo="linear",Rr="log",ca="pow",la="sqrt",Al="symlog",fb="time",hb="utc",Gn="sequential",bo="diverging",kh="quantile",db="quantize",pb="threshold",_h="ordinal",Rh="point",gb="band",Fh="bin-ordinal",yt="continuous",ua="discrete",fa="discretizing",ln="interpolating",mb="temporal";function eT(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 tT(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 Mh(){const t=Jf().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=Bh(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=As(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,S;if(!(y!==y||v!==v)&&(v<y&&(S=y,y=v,v=S),!(v<d[0]||y>r[1-h])))return b=Math.max(0,gr(d,y)-1),A=y===v?b:gr(d,v)-1,y-d[b]>i+1e-10&&++b,h&&(S=b,b=p-A,A=p-S),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 Mh().domain(e()).range(r).round(s).paddingInner(a).paddingOuter(c).align(l)},u()}function bb(t){const e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return bb(e())},t}function nT(){return bb(Mh().paddingInner(1))}var rT=Array.prototype.map;function iT(t){return rT.call(t,L5)}const oT=Array.prototype.slice;function yb(){let t=[],e=[];function n(r){return r==null||r!==r?void 0:e[(gr(t,r)-1)%e.length]}return n.domain=function(r){return arguments.length?(t=iT(r),n):t.slice()},n.range=function(r){return arguments.length?(e=oT.call(r),n):e.slice()},n.tickFormat=function(r,o){return W1(t[0],i1(t),r??10,o)},n.copy=function(){return yb().domain(n.domain()).range(n.range())},n}const El=new Map,sT=Symbol("vega_scale");function aT(t){return t[sT]=!0,t}function cT(t,e,n){const r=function(){const i=e();return i.invertRange||(i.invertRange=i.invert?eT(i):i.invertExtent?tT(i):void 0),i.type=t,aT(i)};return r.metadata=N5(O5(n)),r}function Ze(t,e,n){return arguments.length>1?(El.set(t,cT(t,e,n)),this):lT(t)?El.get(t):void 0}Ze($I,Q1),Ze(mo,Y1,yt),Ze(Rr,xh,[yt,Rr]),Ze(ca,Eh,yt),Ze(la,PI,yt),Ze(Al,tb,yt),Ze(fb,NI,[yt,mb]),Ze(hb,zI,[yt,mb]),Ze(Gn,Ch,[yt,ln]),Ze(`${Gn}-${mo}`,Ch,[yt,ln]),Ze(`${Gn}-${Rr}`,sb,[yt,ln,Rr]),Ze(`${Gn}-${ca}`,Ih,[yt,ln]),Ze(`${Gn}-${la}`,UI,[yt,ln]),Ze(`${Gn}-${Al}`,ab,[yt,ln]),Ze(`${bo}-${mo}`,cb,[yt,ln]),Ze(`${bo}-${Rr}`,lb,[yt,ln,Rr]),Ze(`${bo}-${ca}`,Th,[yt,ln]),Ze(`${bo}-${la}`,GI,[yt,ln]),Ze(`${bo}-${Al}`,ub,[yt,ln]),Ze(kh,rb,[fa,kh]),Ze(db,ib,fa),Ze(pb,ob,fa),Ze(Fh,yb,[ua,fa]),Ze(_h,Jf,ua),Ze(gb,Mh,ua),Ze(Rh,nT,ua);function lT(t){return El.has(t)}function ha(t,e){const n=El.get(t);return n&&n.metadata[e]}function St(t){return ha(t,yt)}function Fr(t){return ha(t,ua)}function vi(t){return ha(t,fa)}function wb(t){return ha(t,Rr)}function Sl(t){return ha(t,ln)}function uT(t,e){const n=e[0],r=i1(e)-n;return function(o){return t(n+o*r)}}function Cl(t,e,n){return mh(xb(e||"rgb",n),t)}function fT(t,e){const n=new Array(e),r=e+1;for(let o=0;o<e;)n[o]=t(++o/r);return n}function xb(t,e){const n=EI[hT(t)];return e!=null&&n&&n.gamma?n.gamma(e):n}function hT(t){return"interpolate"+t.toLowerCase().split("-").map(e=>e[0].toUpperCase()+e.slice(1)).join("")}const dT={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"},pT={accent:VI,category10:HI,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:qI,observable10:jI,paired:WI,pastel1:YI,pastel2:QI,set1:ZI,set2:XI,set3:KI,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function vb(t){if(r1(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 Ab(t,e){for(const n in t)Ph(n,e(t[n]))}const Eb={};Ab(pT,vb),Ab(dT,t=>Cl(vb(t)));function Ph(t,e){return t=t&&t.toLowerCase(),arguments.length>1?(Eb[t]=e,this):Eb[t]}function Lh(){const t=e=>e;return t.invert=e=>e,t.copy=Lh,t.invertRange=()=>{},t.type="null",t}class gT{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=G6(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(!eo(s))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");if(ym(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=P6(s,this._pickingAttachmentOptions),s.bindFramebuffer(s.FRAMEBUFFER,null),this.adjustGl(),this._updateDpr(),this._clearColor=[0,0,0,0],r){const a=Br(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;";_t(n)&&(n=n.join(`
309
+ }`)(n);return Je(r,[t],e)}else return gc(t)}function M5(t,e){throw new Error(`Invalid field "${e}". Available fields or properties: ${Object.keys(t).join(", ")}`)}function l1(t,e,n){if(!t)return;function r(i){const s=i;return s.fields??(s.fields=[]),s.constant=s.fields.length===0,s.channelDef=e,s.channel=t,s.scaleChannel=(($t(e)&&e.resolutionChannel)??(bl(t)&&t))||void 0,"param"in e?(s.predicate=t1(!1),s.predicate.param=e.param,s.predicate.empty=e.empty??!0):(s.predicate=t1(!0),s.predicate.empty=!1),s.asNumberAccessor=()=>s,s}function o(i){if(Ot(i)){const s=r(n.createExpression(i.expr));if(s.fields.length>0)throw new Error("Expression in DatumDef/ValueDef cannot access data fields: "+i.expr);return s}else{const s=i;return r(()=>s)}}if(Ir(e))try{return r(Qe(e.field))}catch(i){throw new Error(`Invalid field definition: ${i.message}`)}else{if(ia(e))return r(n.createExpression(e.expr));if(ra(e))return o(e.datum);if(cn(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 P5(t,e,n){const r=[];if(z5(e)||nh(e)){const o=Array.isArray(e.condition)?e.condition:[e.condition];for(const i of o)r.push(l1(t,i,n))}if(r.push(l1(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 L5(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]=O5(P5(o,i,t.paramMediator),r));return n}function O5(t,e){if(t.length===1)return u1(t[0],e);const n=t.map(i=>i.predicate),r=t.map(i=>u1(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 u1(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 cn(t){return t&&"value"in t}function Ir(t){return t&&"field"in t}function ra(t){return t&&"datum"in t}function $t(t){return Ir(t)||ra(t)||ia(t)||h1(t)}function f1(t){if(nh(t)){const e=t.condition;if(!Array.isArray(e)&&$t(e))return e}else if($t(t))return t}function N5(t,e){const n=t.mark.encoding[e];if($t(n))return n;throw new Error("Not a channel def with scale!")}function h1(t){return t&&"chrom"in t}function ia(t){return t&&"expr"in t}function z5(t){return(Ir(t)||ra(t))&&"condition"in t}function nh(t){return cn(t)&&"condition"in t}const gi=["x","y"],U5=["x2","y2"],G5=[...gi,...U5];function rh(t){return gi.includes(t)}function oa(t){return G5.includes(t)}const d1={x:"x2",y:"y2"},p1=Object.fromEntries(Object.entries(d1).map(t=>[t[1],t[0]]));function ih(t){return t in p1}function oh(t){const e=d1[t];if(e)return e;throw new Error(`${t} has no secondary channel!`)}function mi(t){return p1[t]??t}function Tr(t){return["color","fill","stroke"].includes(mi(t))}function yl(t){return["shape"].includes(t)}function bl(t){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(t)}function H5(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 g1(t){if(!yl(t))throw new Error("Not a discrete channel: "+t);const e=new Map(H5(t).map((n,r)=>[n,r]));return n=>{const r=e.get(n);if(r!==void 0)return r;throw new Error(`Invalid value for "${t}" channel: ${n}`)}}function fo(t,e,n){return t.fields=e||[],t.fname=n,t}function V5(t){return t.length===1?q5(t[0]):j5(t)}const q5=t=>function(e){return e[t]},j5=t=>{const e=t.length;return function(n){for(let r=0;r<e;++r)n=n[t[r]];return n}};function sh(t){throw Error(t)}function W5(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||sh("Access path missing open bracket: "+t),o>0&&l(),o=0,s=a+1)}return o&&sh("Access path missing closing bracket: "+t),r&&sh("Access path missing closing quote: "+t),a>s&&(a++,l()),e}function Y5(t,e,n){const r=W5(t);return t=r.length===1?r[0]:t,fo(V5(r),[t],t)}Y5("id"),fo(t=>t,[],"identity"),fo(()=>0,[],"zero"),fo(()=>1,[],"one"),fo(()=>!0,[],"true"),fo(()=>!1,[],"false");var m1=Array.isArray;function y1(t){return t[t.length-1]}function Q5(t){return t==null||t===""?null:+t}function Z5(t){return t!=null?m1(t)?t:[t]:[]}function X5(t){const e={},n=t.length;for(let r=0;r<n;++r)e[t[r]]=!0;return e}function zn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Dr(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const ah=Symbol("implicit");function ch(){var t=new Yn,e=[],n=[],r=ah;function o(i){let s=t.get(i);if(s===void 0){if(r!==ah)return r;t.set(i,s=e.push(i)-1)}return n[s%n.length]}return o.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new Yn;for(const s of i)t.has(s)||t.set(s,e.push(s)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return ch(e,n).unknown(r)},zn.apply(o,arguments),o}function ho(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function sa(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Br(){}var yi=.7,po=1/yi,go="\\s*([+-]?\\d+)\\s*",aa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Un="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",K5=/^#([0-9a-f]{3,8})$/,J5=new RegExp(`^rgb\\(${go},${go},${go}\\)$`),$5=new RegExp(`^rgb\\(${Un},${Un},${Un}\\)$`),eI=new RegExp(`^rgba\\(${go},${go},${go},${aa}\\)$`),tI=new RegExp(`^rgba\\(${Un},${Un},${Un},${aa}\\)$`),nI=new RegExp(`^hsl\\(${aa},${Un},${Un}\\)$`),rI=new RegExp(`^hsla\\(${aa},${Un},${Un},${aa}\\)$`),b1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ho(Br,kr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:w1,formatHex:w1,formatHex8:iI,formatHsl:oI,formatRgb:x1,toString:x1});function w1(){return this.rgb().formatHex()}function iI(){return this.rgb().formatHex8()}function oI(){return C1(this).formatHsl()}function x1(){return this.rgb().formatRgb()}function kr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=K5.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?v1(e):n===3?new At(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?wl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?wl(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=J5.exec(t))?new At(e[1],e[2],e[3],1):(e=$5.exec(t))?new At(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=eI.exec(t))?wl(e[1],e[2],e[3],e[4]):(e=tI.exec(t))?wl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=nI.exec(t))?S1(e[1],e[2]/100,e[3]/100,1):(e=rI.exec(t))?S1(e[1],e[2]/100,e[3]/100,e[4]):b1.hasOwnProperty(t)?v1(b1[t]):t==="transparent"?new At(NaN,NaN,NaN,0):null}function v1(t){return new At(t>>16&255,t>>8&255,t&255,1)}function wl(t,e,n,r){return r<=0&&(t=e=n=NaN),new At(t,e,n,r)}function lh(t){return t instanceof Br||(t=kr(t)),t?(t=t.rgb(),new At(t.r,t.g,t.b,t.opacity)):new At}function xl(t,e,n,r){return arguments.length===1?lh(t):new At(t,e,n,r??1)}function At(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ho(At,xl,sa(Br,{brighter(t){return t=t==null?po:Math.pow(po,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?yi:Math.pow(yi,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new At(bi(this.r),bi(this.g),bi(this.b),vl(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:A1,formatHex:A1,formatHex8:sI,formatRgb:E1,toString:E1}));function A1(){return`#${wi(this.r)}${wi(this.g)}${wi(this.b)}`}function sI(){return`#${wi(this.r)}${wi(this.g)}${wi(this.b)}${wi((isNaN(this.opacity)?1:this.opacity)*255)}`}function E1(){const t=vl(this.opacity);return`${t===1?"rgb(":"rgba("}${bi(this.r)}, ${bi(this.g)}, ${bi(this.b)}${t===1?")":`, ${t})`}`}function vl(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function bi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function wi(t){return t=bi(t),(t<16?"0":"")+t.toString(16)}function S1(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 C1(t){if(t instanceof An)return new An(t.h,t.s,t.l,t.opacity);if(t instanceof Br||(t=kr(t)),!t)return new An;if(t instanceof An)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),s=NaN,a=i-o,c=(i+o)/2;return a?(e===i?s=(n-r)/a+(n<r)*6:n===i?s=(r-e)/a+2:s=(e-n)/a+4,a/=c<.5?i+o:2-i-o,s*=60):a=c>0&&c<1?0:s,new An(s,a,c,t.opacity)}function uh(t,e,n,r){return arguments.length===1?C1(t):new An(t,e,n,r??1)}function An(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ho(An,uh,sa(Br,{brighter(t){return t=t==null?po:Math.pow(po,t),new An(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?yi:Math.pow(yi,t),new An(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new At(fh(t>=240?t-240:t+120,o,r),fh(t,o,r),fh(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new An(I1(this.h),Al(this.s),Al(this.l),vl(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=vl(this.opacity);return`${t===1?"hsl(":"hsla("}${I1(this.h)}, ${Al(this.s)*100}%, ${Al(this.l)*100}%${t===1?")":`, ${t})`}`}}));function I1(t){return t=(t||0)%360,t<0?t+360:t}function Al(t){return Math.max(0,Math.min(1,t||0))}function fh(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 T1=Math.PI/180,D1=180/Math.PI,El=18,B1=.96422,k1=1,_1=.82521,R1=4/29,mo=6/29,F1=3*mo*mo,aI=mo*mo*mo;function M1(t){if(t instanceof Gn)return new Gn(t.l,t.a,t.b,t.opacity);if(t instanceof tr)return P1(t);t instanceof At||(t=lh(t));var e=mh(t.r),n=mh(t.g),r=mh(t.b),o=dh((.2225045*e+.7168786*n+.0606169*r)/k1),i,s;return e===n&&n===r?i=s=o:(i=dh((.4360747*e+.3850649*n+.1430804*r)/B1),s=dh((.0139322*e+.0971045*n+.7141733*r)/_1)),new Gn(116*o-16,500*(i-o),200*(o-s),t.opacity)}function hh(t,e,n,r){return arguments.length===1?M1(t):new Gn(t,e,n,r??1)}function Gn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}ho(Gn,hh,sa(Br,{brighter(t){return new Gn(this.l+El*(t??1),this.a,this.b,this.opacity)},darker(t){return new Gn(this.l-El*(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=B1*ph(e),t=k1*ph(t),n=_1*ph(n),new At(gh(3.1338561*e-1.6168667*t-.4906146*n),gh(-.9787684*e+1.9161415*t+.033454*n),gh(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function dh(t){return t>aI?Math.pow(t,1/3):t/F1+R1}function ph(t){return t>mo?t*t*t:F1*(t-R1)}function gh(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function mh(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function cI(t){if(t instanceof tr)return new tr(t.h,t.c,t.l,t.opacity);if(t instanceof Gn||(t=M1(t)),t.a===0&&t.b===0)return new tr(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*D1;return new tr(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function yh(t,e,n,r){return arguments.length===1?cI(t):new tr(t,e,n,r??1)}function tr(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function P1(t){if(isNaN(t.h))return new Gn(t.l,0,0,t.opacity);var e=t.h*T1;return new Gn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}ho(tr,yh,sa(Br,{brighter(t){return new tr(this.h,this.c,this.l+El*(t??1),this.opacity)},darker(t){return new tr(this.h,this.c,this.l-El*(t??1),this.opacity)},rgb(){return P1(this).rgb()}}));var L1=-.14861,bh=1.78277,wh=-.29227,Sl=-.90649,ca=1.97294,O1=ca*Sl,N1=ca*bh,z1=bh*wh-Sl*L1;function lI(t){if(t instanceof xi)return new xi(t.h,t.s,t.l,t.opacity);t instanceof At||(t=lh(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(z1*r+O1*e-N1*n)/(z1+O1-N1),i=r-o,s=(ca*(n-o)-wh*i)/Sl,a=Math.sqrt(s*s+i*i)/(ca*o*(1-o)),c=a?Math.atan2(s,i)*D1-120:NaN;return new xi(c<0?c+360:c,a,o,t.opacity)}function xh(t,e,n,r){return arguments.length===1?lI(t):new xi(t,e,n,r??1)}function xi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ho(xi,xh,sa(Br,{brighter(t){return t=t==null?po:Math.pow(po,t),new xi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?yi:Math.pow(yi,t),new xi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*T1,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*(L1*r+bh*o)),255*(e+n*(wh*r+Sl*o)),255*(e+n*(ca*r)),this.opacity)}}));function U1(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 G1(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 U1((n-r/e)*e,s,o,i,a)}}function H1(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 U1((n-r/e)*e,o,i,s,a)}}const Cl=t=>()=>t;function V1(t,e){return function(n){return t+n*e}}function uI(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?V1(t,n>180||n<-180?n-360*Math.round(n/360):n):Cl(isNaN(t)?e:t)}function fI(t){return(t=+t)==1?Et:function(e,n){return n-e?uI(e,n,t):Cl(isNaN(e)?n:e)}}function Et(t,e){var n=e-t;return n?V1(t,n):Cl(isNaN(t)?e:t)}const vh=function t(e){var n=fI(e);function r(o,i){var s=n((o=xl(o)).r,(i=xl(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 q1(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=xl(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 hI=q1(G1),dI=q1(H1);function Ah(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 j1(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function pI(t,e){return(j1(e)?Ah:W1)(t,e)}function W1(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=_r(t[s],e[s]);for(;s<n;++s)i[s]=e[s];return function(a){for(s=0;s<r;++s)i[s]=o[s](a);return i}}function Y1(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 Q1(t,e){var n={},r={},o;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(o in e)o in t?n[o]=_r(t[o],e[o]):r[o]=e[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Eh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sh=new RegExp(Eh.source,"g");function gI(t){return function(){return t}}function mI(t){return function(e){return t(e)+""}}function Z1(t,e){var n=Eh.lastIndex=Sh.lastIndex=0,r,o,i,s=-1,a=[],c=[];for(t=t+"",e=e+"";(r=Eh.exec(t))&&(o=Sh.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=Sh.lastIndex;return n<e.length&&(i=e.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?c[0]?mI(c[0].x):gI(e):(e=c.length,function(l){for(var u=0,f;u<e;++u)a[(f=c[u]).i]=f.x(l);return a.join("")})}function _r(t,e){var n=typeof e,r;return e==null||n==="boolean"?Cl(e):(n==="number"?En:n==="string"?(r=kr(e))?(e=r,vh):Z1:e instanceof kr?vh:e instanceof Date?Y1:j1(e)?Ah:Array.isArray(e)?W1:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Q1:En)(t,e)}function yI(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function bI(t,e){var n=Il(+t,+e);return function(r){var o=n(r);return o-360*Math.floor(o/360)}}function la(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var X1=180/Math.PI,Ch={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function K1(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)*X1,skewX:Math.atan(c)*X1,scaleX:s,scaleY:a}}var Tl;function wI(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Ch:K1(e.a,e.b,e.c,e.d,e.e,e.f)}function xI(t){return t==null||(Tl||(Tl=document.createElementNS("http://www.w3.org/2000/svg","g")),Tl.setAttribute("transform",t),!(t=Tl.transform.baseVal.consolidate()))?Ch:(t=t.matrix,K1(t.a,t.b,t.c,t.d,t.e,t.f))}function J1(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 b=d.push("translate(",null,e,null,n);p.push({i:b-4,x:En(l,f)},{i:b-2,x:En(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:En(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:En(l,u)}):u&&f.push(o(f)+"skewX("+u+r)}function c(l,u,f,h,d,p){if(l!==f||u!==h){var b=d.push(o(d)+"scale(",null,",",null,")");p.push({i:b-4,x:En(l,f)},{i:b-2,x:En(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,b=h.length,v;++p<b;)f[(v=h[p]).i]=v.x(d);return f.join("")}}}var vI=J1(wI,"px, ","px)","deg)"),AI=J1(xI,", ",")",")"),EI=1e-12;function $1(t){return((t=Math.exp(t))+1/t)/2}function SI(t){return((t=Math.exp(t))-1/t)/2}function CI(t){return((t=Math.exp(2*t))-1)/(t+1)}const II=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,b=d*d+p*p,v,y;if(b<EI)y=Math.log(h/l)/e,v=function(B){return[a+B*d,c+B*p,l*Math.exp(e*B*y)]};else{var A=Math.sqrt(b),S=(h*h-l*l+r*b)/(2*l*n*A),E=(h*h-l*l-r*b)/(2*h*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,F=$1(I),M=l/(n*A)*(F*CI(e*N+I)-SI(I));return[a+M*d,c+M*p,l*F/$1(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 ey(t){return function(e,n){var r=t((e=uh(e)).h,(n=uh(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 TI=ey(Il);var DI=ey(Et);function BI(t,e){var n=Et((t=hh(t)).l,(e=hh(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 ty(t){return function(e,n){var r=t((e=yh(e)).h,(n=yh(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 kI=ty(Il);var _I=ty(Et);function ny(t){return function e(n){n=+n;function r(o,i){var s=t((o=xh(o)).h,(i=xh(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 RI=ny(Il);var FI=ny(Et);function Ih(t,e){e===void 0&&(e=t,t=_r);for(var n=0,r=e.length-1,o=e[0],i=new Array(r<0?0:r);n<r;)i[n]=t(o,o=e[++n]);return function(s){var a=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[a](s-a)}}function MI(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}const PI=Object.freeze(Object.defineProperty({__proto__:null,interpolate:_r,interpolateArray:pI,interpolateBasis:G1,interpolateBasisClosed:H1,interpolateCubehelix:RI,interpolateCubehelixLong:FI,interpolateDate:Y1,interpolateDiscrete:yI,interpolateHcl:kI,interpolateHclLong:_I,interpolateHsl:TI,interpolateHslLong:DI,interpolateHue:bI,interpolateLab:BI,interpolateNumber:En,interpolateNumberArray:Ah,interpolateObject:Q1,interpolateRgb:vh,interpolateRgbBasis:hI,interpolateRgbBasisClosed:dI,interpolateRound:la,interpolateString:Z1,interpolateTransformCss:vI,interpolateTransformSvg:AI,interpolateZoom:II,piecewise:Ih,quantize:MI},Symbol.toStringTag,{value:"Module"}));function LI(t){return function(){return t}}function Th(t){return+t}var ry=[0,1];function Zt(t){return t}function Dh(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:LI(isNaN(e)?NaN:.5)}function OI(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function NI(t,e,n){var r=t[0],o=t[1],i=e[0],s=e[1];return o<r?(r=Dh(o,r),i=n(s,i)):(r=Dh(r,o),i=n(i,s)),function(a){return i(r(a))}}function zI(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]=Dh(t[s],t[s+1]),i[s]=n(e[s],e[s+1]);return function(a){var c=mr(t,a,1,r)-1;return i[c](o[c](a))}}function ua(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Dl(){var t=ry,e=ry,n=_r,r,o,i,s=Zt,a,c,l;function u(){var h=Math.min(t.length,e.length);return s!==Zt&&(s=OI(t[0],t[h-1])),a=h>2?zI:NI,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),En)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Th),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=la,u()},f.clamp=function(h){return arguments.length?(s=h?!0:Zt,u()):s!==Zt},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 iy(){return Dl()(Zt,Zt)}function oy(t,e,n,r){var o=ri(t,e,n),i;switch(r=Qi(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(i=C3(o,s))&&(r.precision=i),Hp(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=I3(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=S3(o))&&(r.precision=i-(r.type==="%")*2);break}}return Dt(r)}function vi(t){var e=t.domain;return t.ticks=function(n){var r=e();return Ic(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var o=e();return oy(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=ju(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 sy(){var t=iy();return t.copy=function(){return ua(t,sy())},zn.apply(t,arguments),vi(t)}function ay(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,Th),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return ay(t).unknown(e)},t=arguments.length?Array.from(t,Th):[0,1],vi(n)}function cy(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 ly(t){return Math.log(t)}function uy(t){return Math.exp(t)}function UI(t){return-Math.log(-t)}function GI(t){return-Math.exp(-t)}function HI(t){return isFinite(t)?+("1e"+t):t<0?0:t}function VI(t){return t===10?HI:t===Math.E?Math.exp:e=>Math.pow(t,e)}function qI(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 fy(t){return(e,n)=>-t(-e,n)}function Bh(t){const e=t(ly,uy),n=e.domain;let r=10,o,i;function s(){return o=qI(r),i=VI(r),n()[0]<0?(o=fy(o),i=fy(i),t(UI,GI)):t(ly,uy),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,b;const v=a==null?10:+a;let y=[];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(b=h<0?p/i(-h):p*i(h),!(b<l)){if(b>u)break;y.push(b)}}else for(;h<=d;++h)for(p=r-1;p>=1;--p)if(b=h>0?p/i(-h):p*i(h),!(b<l)){if(b>u)break;y.push(b)}y.length*2<v&&(y=Ic(l,u,v))}else y=Ic(h,d,Math.min(d-h,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=Dt(c)),a===1/0)return c;const l=Math.max(1,r*a/e.ticks().length);return u=>{let f=u/i(Math.round(o(u)));return f*r<r-.5&&(f*=r),f<=l?c(u):""}},e.nice=()=>n(cy(n(),{floor:a=>i(Math.floor(o(a))),ceil:a=>i(Math.ceil(o(a)))})),e}function kh(){const t=Bh(Dl()).domain([1,10]);return t.copy=()=>ua(t,kh()).base(t.base()),zn.apply(t,arguments),t}function hy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function dy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function _h(t){var e=1,n=t(hy(e),dy(e));return n.constant=function(r){return arguments.length?t(hy(e=+r),dy(e)):e},vi(n)}function py(){var t=_h(Dl());return t.copy=function(){return ua(t,py()).constant(t.constant())},zn.apply(t,arguments)}function gy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function jI(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function WI(t){return t<0?-t*t:t*t}function Rh(t){var e=t(Zt,Zt),n=1;function r(){return n===1?t(Zt,Zt):n===.5?t(jI,WI):t(gy(n),gy(1/n))}return e.exponent=function(o){return arguments.length?(n=+o,r()):n},vi(e)}function Fh(){var t=Rh(Dl());return t.copy=function(){return ua(t,Fh()).exponent(t.exponent())},zn.apply(t,arguments),t}function YI(){return Fh.apply(null,arguments).exponent(.5)}function my(){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[mr(n,s)]}return i.invertExtent=function(s){var a=e.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},i.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let a of s)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(ti),o()},i.range=function(s){return arguments.length?(e=Array.from(s),o()):e.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return my().domain(t).range(e).unknown(r)},zn.apply(i,arguments)}function yy(){var t=0,e=1,n=1,r=[.5],o=[0,1],i;function s(c){return c!=null&&c<=c?o[mr(r,c,0,n)]:i}function a(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*e-(c-n)*t)/(n+1);return s}return s.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,a()):[t,e]},s.range=function(c){return arguments.length?(n=(o=Array.from(c)).length-1,a()):o.slice()},s.invertExtent=function(c){var l=o.indexOf(c);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},s.unknown=function(c){return arguments.length&&(i=c),s},s.thresholds=function(){return r.slice()},s.copy=function(){return yy().domain([t,e]).range(o).unknown(i)},zn.apply(vi(s),arguments)}function by(){var t=[.5],e=[0,1],n,r=1;function o(i){return i!=null&&i<=i?e[mr(t,i,0,r)]:n}return o.domain=function(i){return arguments.length?(t=Array.from(i),r=Math.min(t.length,e.length-1),o):t.slice()},o.range=function(i){return arguments.length?(e=Array.from(i),r=Math.min(t.length,e.length-1),o):e.slice()},o.invertExtent=function(i){var s=e.indexOf(i);return[t[s-1],t[s]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return by().domain(t).range(e).unknown(n)},zn.apply(o,arguments)}function QI(t){return new Date(t)}function ZI(t){return t instanceof Date?+t:+new Date(+t)}function Mh(t,e,n,r,o,i,s,a,c,l){var u=iy(),f=u.invert,h=u.domain,d=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(_)<_?d: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?h(Array.from(_,ZI)):h().map(QI)},u.ticks=function(_){var B=h();return t(B[0],B[B.length-1],_??10)},u.tickFormat=function(_,B){return B==null?I:l(B)},u.nice=function(_){var B=h();return(!_||typeof _.range!="function")&&(_=e(B[0],B[B.length-1],_??10)),_?h(cy(B,_)):u},u.copy=function(){return ua(u,Mh(t,e,n,r,o,i,s,a,c,l))},u}function XI(){return zn.apply(Mh(O3,N3,Fn,Ji,Ts,yr,_c,Bc,Kn,nf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function KI(){return zn.apply(Mh(P3,L3,Mn,$i,Ds,ii,Rc,kc,Kn,rf).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Bl(){var t=0,e=1,n,r,o,i,s=Zt,a=!1,c;function l(f){return f==null||isNaN(f=+f)?c:s(o===0?.5:(f=(i(f)-n)*o,a?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([t,e]=f,n=i(t=+t),r=i(e=+e),o=n===r?0:1/(r-n),l):[t,e]},l.clamp=function(f){return arguments.length?(a=!!f,l):a},l.interpolator=function(f){return arguments.length?(s=f,l):s};function u(f){return function(h){var d,p;return arguments.length?([d,p]=h,s=f(d,p),l):[s(0),s(1)]}}return l.range=u(_r),l.rangeRound=u(la),l.unknown=function(f){return arguments.length?(c=f,l):c},function(f){return i=f,n=f(t),r=f(e),o=n===r?0:1/(r-n),l}}function Rr(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Ph(){var t=vi(Bl()(Zt));return t.copy=function(){return Rr(t,Ph())},Dr.apply(t,arguments)}function wy(){var t=Bh(Bl()).domain([1,10]);return t.copy=function(){return Rr(t,wy()).base(t.base())},Dr.apply(t,arguments)}function xy(){var t=_h(Bl());return t.copy=function(){return Rr(t,xy()).constant(t.constant())},Dr.apply(t,arguments)}function Lh(){var t=Rh(Bl());return t.copy=function(){return Rr(t,Lh()).exponent(t.exponent())},Dr.apply(t,arguments)}function JI(){return Lh.apply(null,arguments).exponent(.5)}function kl(){var t=0,e=.5,n=1,r=1,o,i,s,a,c,l=Zt,u,f=!1,h;function d(b){return isNaN(b=+b)?h:(b=.5+((b=+u(b))-i)*(r*b<r*i?a:c),l(f?Math.max(0,Math.min(1,b)):b))}d.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,d):[t,e,n]},d.clamp=function(b){return arguments.length?(f=!!b,d):f},d.interpolator=function(b){return arguments.length?(l=b,d):l};function p(b){return function(v){var y,A,S;return arguments.length?([y,A,S]=v,l=Ih(b,[y,A,S]),d):[l(0),l(.5),l(1)]}}return d.range=p(_r),d.rangeRound=p(la),d.unknown=function(b){return arguments.length?(h=b,d):h},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,d}}function vy(){var t=vi(kl()(Zt));return t.copy=function(){return Rr(t,vy())},Dr.apply(t,arguments)}function Ay(){var t=Bh(kl()).domain([.1,1,10]);return t.copy=function(){return Rr(t,Ay()).base(t.base())},Dr.apply(t,arguments)}function Ey(){var t=_h(kl());return t.copy=function(){return Rr(t,Ey()).constant(t.constant())},Dr.apply(t,arguments)}function Oh(){var t=Rh(kl());return t.copy=function(){return Rr(t,Oh()).exponent(t.exponent())},Dr.apply(t,arguments)}function $I(){return Oh.apply(null,arguments).exponent(.5)}function Hn(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const eT=Hn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),tT=Hn("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),nT=Hn("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),rT=Hn("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),iT=Hn("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),oT=Hn("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),sT=Hn("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),aT=Hn("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),cT=Hn("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),lT=Hn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),uT="year",Nh="quarter";[uT,Nh,"month","week","date","day","dayofyear","hours","minutes","seconds","milliseconds"].reduce((t,e,n)=>(t[e]=1+n,t),{}),Nh+"",Ji.every(3),Nh+"",$i.every(3);function zh(t,e,n){const r=t-e+n*2;return t?r>0?r:1:0}const fT="identity",yo="linear",Fr="log",fa="pow",ha="sqrt",_l="symlog",Sy="time",Cy="utc",Vn="sequential",bo="diverging",Uh="quantile",Iy="quantize",Ty="threshold",Gh="ordinal",Hh="point",Dy="band",Vh="bin-ordinal",bt="continuous",da="discrete",pa="discretizing",ln="interpolating",By="temporal";function hT(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 dT(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 qh(){const t=ch().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=zh(f,a,c);let b=r[h-0];o=(d-b)/(p||1),s&&(o=Math.floor(o)),b+=(d-b-o*(f-a))*l,i=o*(1-a),s&&(b=Math.round(b),i=Math.round(i));const v=Cs(f).map(y=>b+o*y);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 b=+f[0],v=+f[1],y,A,S;if(!(b!==b||v!==v)&&(v<b&&(S=b,b=v,v=S),!(v<d[0]||b>r[1-h])))return y=Math.max(0,mr(d,b)-1),A=b===v?y:mr(d,v)-1,b-d[y]>i+1e-10&&++y,h&&(S=y,y=p-A,A=p-S),y>A?void 0:e().slice(y,A+1)},t.invert=function(f){const h=t.invertRange([f,f]);return h&&h[0]},t.copy=function(){return qh().domain(e()).range(r).round(s).paddingInner(a).paddingOuter(c).align(l)},u()}function ky(t){const e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return ky(e())},t}function pT(){return ky(qh().paddingInner(1))}var gT=Array.prototype.map;function mT(t){return gT.call(t,Q5)}const yT=Array.prototype.slice;function _y(){let t=[],e=[];function n(r){return r==null||r!==r?void 0:e[(mr(t,r)-1)%e.length]}return n.domain=function(r){return arguments.length?(t=mT(r),n):t.slice()},n.range=function(r){return arguments.length?(e=yT.call(r),n):e.slice()},n.tickFormat=function(r,o){return oy(t[0],y1(t),r??10,o)},n.copy=function(){return _y().domain(n.domain()).range(n.range())},n}const Rl=new Map,bT=Symbol("vega_scale");function wT(t){return t[bT]=!0,t}function xT(t,e,n){const r=function(){const i=e();return i.invertRange||(i.invertRange=i.invert?hT(i):i.invertExtent?dT(i):void 0),i.type=t,wT(i)};return r.metadata=X5(Z5(n)),r}function Ze(t,e,n){return arguments.length>1?(Rl.set(t,xT(t,e,n)),this):vT(t)?Rl.get(t):void 0}Ze(fT,ay),Ze(yo,sy,bt),Ze(Fr,kh,[bt,Fr]),Ze(fa,Fh,bt),Ze(ha,YI,bt),Ze(_l,py,bt),Ze(Sy,XI,[bt,By]),Ze(Cy,KI,[bt,By]),Ze(Vn,Ph,[bt,ln]),Ze(`${Vn}-${yo}`,Ph,[bt,ln]),Ze(`${Vn}-${Fr}`,wy,[bt,ln,Fr]),Ze(`${Vn}-${fa}`,Lh,[bt,ln]),Ze(`${Vn}-${ha}`,JI,[bt,ln]),Ze(`${Vn}-${_l}`,xy,[bt,ln]),Ze(`${bo}-${yo}`,vy,[bt,ln]),Ze(`${bo}-${Fr}`,Ay,[bt,ln,Fr]),Ze(`${bo}-${fa}`,Oh,[bt,ln]),Ze(`${bo}-${ha}`,$I,[bt,ln]),Ze(`${bo}-${_l}`,Ey,[bt,ln]),Ze(Uh,my,[pa,Uh]),Ze(Iy,yy,pa),Ze(Ty,by,pa),Ze(Vh,_y,[da,pa]),Ze(Gh,ch,da),Ze(Dy,qh,da),Ze(Hh,pT,da);function vT(t){return Rl.has(t)}function ga(t,e){const n=Rl.get(t);return n&&n.metadata[e]}function St(t){return ga(t,bt)}function Mr(t){return ga(t,da)}function Ai(t){return ga(t,pa)}function Ry(t){return ga(t,Fr)}function Fl(t){return ga(t,ln)}function AT(t,e){const n=e[0],r=y1(e)-n;return function(o){return t(n+o*r)}}function Ml(t,e,n){return Ih(Fy(e||"rgb",n),t)}function ET(t,e){const n=new Array(e),r=e+1;for(let o=0;o<e;)n[o]=t(++o/r);return n}function Fy(t,e){const n=PI[ST(t)];return e!=null&&n&&n.gamma?n.gamma(e):n}function ST(t){return"interpolate"+t.toLowerCase().split("-").map(e=>e[0].toUpperCase()+e.slice(1)).join("")}const CT={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"},IT={accent:tT,category10:eT,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:nT,observable10:rT,paired:iT,pastel1:oT,pastel2:sT,set1:aT,set2:cT,set3:lT,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function My(t){if(m1(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 Py(t,e){for(const n in t)jh(n,e(t[n]))}const Ly={};Py(IT,My),Py(CT,t=>Ml(My(t)));function jh(t,e){return t=t&&t.toLowerCase(),arguments.length>1?(Ly[t]=e,this):Ly[t]}function Wh(){const t=e=>e;return t.invert=e=>e,t.copy=Wh,t.invertRange=()=>{},t.type="null",t}class TT{constructor(e,n,r={}){this._container=e,this._sizeSource=n??(()=>({width:void 0,height:void 0})),this._shaderCache=new Map,this.rangeTextures=new WeakMap,this.selectionTextures=new WeakMap;const o=document.createElement("canvas");e.appendChild(o);const i=$6(o,{antialias:!0,depth:!1,premultipliedAlpha:!0,...r});if(!i)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!to(i))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");km(i),i.blendFunc(i.ONE,i.ONE_MINUS_SRC_ALPHA),this.canvas=o,this.gl=i,this._pickingAttachmentOptions=[{format:i.RGBA,type:i.UNSIGNED_BYTE,minMag:i.LINEAR,wrap:i.CLAMP_TO_EDGE}],this._pickingBufferInfo=Dm(i,this._pickingAttachmentOptions),i.bindFramebuffer(i.FRAMEBUFFER,null),this.adjustGl()}invalidateSize(){this._logicalCanvasSize=void 0,this.adjustGl()}compileShader(e,n){const r="#version 300 es",o="precision mediump float;";_t(n)&&(n=n.join(`
310
310
 
311
311
  `));const i=this.gl,s=n.replaceAll(/ {2,}|^\s*\/\/.*$/gm,"");let a=this._shaderCache.get(s);if(!a){const c=[r,o,n].join(`
312
312
 
313
- `);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,L6(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.scale);if(!n&&r)return;function o(s,a){return Fr(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(Ir(i)){const s=e.scale,a=s.props,c=s.range();let l;if(a.scheme)if(s.type=="threshold"&&c)l=Oh(c,this.gl,s.domain().length,r);else{let u=rt(a.scheme)?void 0:a.scheme.count;u=o(u,s),l=yT(a.scheme,this.gl,u,r)}else Sl(s.type)||St(s.type)&&c.length>1?l=wT(c,a.interpolate,this.gl,r):l=Oh(c,this.gl,s.domain().length,r);this.rangeTextures.set(s,l)}else{const s=e.scale;if(s.type==="ordinal"||vi(s.type)){const a=cl(i)?n1(i):l=>l,c=s.range();this.rangeTextures.set(s,xT(c.map(a),this.gl,s.domain().length,r))}}}createSelectionTexture(e,n=!0){if(!qf(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=da(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 mT(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(`
313
+ `);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,Q6(this.gl,this._pickingBufferInfo,this._pickingAttachmentOptions)}finalize(){this.canvas.remove()}getPhysicalCanvasSize(e){const n=window.devicePixelRatio??1;return e=e||this.getLogicalCanvasSize(),{width:e.width*n,height:e.height*n}}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}createRangeTexture(e,n=!1){const r=this.rangeTextures.get(e.scale);if(!n&&r)return;function o(s,a){return Mr(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(Tr(i)){const s=e.scale,a=s.props,c=s.range();let l;if(a.scheme)if(s.type=="threshold"&&c)l=Yh(c,this.gl,s.domain().length,r);else{let u=rt(a.scheme)?void 0:a.scheme.count;u=o(u,s),l=RT(a.scheme,this.gl,u,r)}else Fl(s.type)||St(s.type)&&c.length>1?l=FT(c,a.interpolate,this.gl,r):l=Yh(c,this.gl,s.domain().length,r);this.rangeTextures.set(s,l)}else{const s=e.scale;if(s.type==="ordinal"||Ai(s.type)){const a=yl(i)?g1(i):l=>l,c=s.range();this.rangeTextures.set(s,MT(c.map(a),this.gl,s.domain().length,r))}}}createSelectionTexture(e,n=!0){if(!eh(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=ma(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 DT(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(`
314
314
  `).map((s,a)=>{const c=i.get(a);return`${a+1+n}: ${s}${c?`
315
315
 
316
316
  ^^^ ${c}`:""}`}).join(`
317
- `)}function bT(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=mT(t.getShaderSource(c),i,0)+`
318
- Error compiling: ${i}`,t.deleteShader(c));t.deleteProgram(r)}if(i)return{message:i,detail:s}}return{program:r,getProgramErrors:o}}function da(t,e,n,r){return r?Mg(t,r,n,e):r=Vs(t,{...e,src:n}),r}function yT(t,e,n,r){const o=rt(t)?t:t.name,i=!rt(t)&&t.extent||[0,1];if(n===void 0&&!rt(t)&&(n=t.count),o){const s=Ph(o);if(kn(s)){const a=Sb(s,{extent:i,count:n});return da(e,{minMag:e.LINEAR,format:e.RGB,height:1,wrap:e.CLAMP_TO_EDGE},a,r)}else{if(_t(s))return Oh(s,e);throw new Error("Unknown scheme: "+o)}}}function wT(t,e="rgb",n,r){const o=Cl(t,rt(e)?e:e.type,rt(e)?void 0:e.gamma),i=Sb(o);return da(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},i,r)}function xT(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 da(e,{minMag:e.NEAREST,format:e.RED,internalFormat:e.R32F,height:1},i,r)}function Oh(t,e,n,r){const o=Cb(t,n);return da(e,{minMag:e.NEAREST,format:e.RGB,height:1},o,r)}function Sb(t,{extent:e=[0,1],reverse:n=!1,count:r=256}={}){const o=e[0],i=Os(e)-o,s=As(r).map(a=>a/(r-1)).map(a=>o+a/i).map(t);return n&&s.reverse(),Cb(s)}function Cb(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=Br(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 Nh(t){const e=Br(t).rgb();return[e.r,e.g,e.b].map(n=>n/255)}const vT="attr_",AT="uDomain_",ET="range_",ST="accessor_",Ib="scale_",CT="getScaled_",zh="uRangeTexture_",Il="uParam_",pa="checkSelection_",IT=3402823466e29;function TT(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 ga(t,e){return`${ST}${t}_${e}`}function DT(t,e,n){let r;if(cl(t))r=Ai(n1(t)(n));else if(rt(n))if(Ir(t))r=FT(n);else throw new Error(`String values are not supported on the "${t}" channel: ${n}`);else if(us(n))r=Ai(n?1:0);else if(n===null)if(Ir(t))r=Ai([0,0,0]);else throw new Error(`null value is not supported on the "${t}" chanel.`);else r=Ai(n);const o=ga(t,e),i=`
317
+ `)}function BT(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=DT(t.getShaderSource(c),i,0)+`
318
+ Error compiling: ${i}`,t.deleteShader(c));t.deleteProgram(r)}if(i)return{message:i,detail:s}}return{program:r,getProgramErrors:o}}function ma(t,e,n,r){return r?jg(t,r,n,e):r=Ws(t,{...e,src:n}),r}function kT(t,e,n,r){const{height:o,framebuffer:i}=e,s=new Uint8Array(4);return t.bindFramebuffer(t.FRAMEBUFFER,i),t.readPixels(n,o-r-1,1,1,t.RGBA,t.UNSIGNED_BYTE,s),t.bindFramebuffer(t.FRAMEBUFFER,null),s}function _T(t,e,n="image/png"){const{width:r,height:o}=e,i=new Uint8Array(r*o*4);t.bindFramebuffer(t.FRAMEBUFFER,e.framebuffer),t.readPixels(0,0,r,o,t.RGBA,t.UNSIGNED_BYTE,i),t.bindFramebuffer(t.FRAMEBUFFER,null);const s=document.createElement("canvas");s.width=r,s.height=o;const a=s.getContext("2d"),c=a.createImageData(r,o);for(let l=0;l<o;l++){const u=(o-1-l)*r*4,f=l*r*4;c.data.set(i.subarray(u,u+r*4),f)}return a.putImageData(c,0,0),s.toDataURL(n)}function RT(t,e,n,r){const o=rt(t)?t:t.name,i=!rt(t)&&t.extent||[0,1];if(n===void 0&&!rt(t)&&(n=t.count),o){const s=jh(o);if(Rn(s)){const a=Oy(s,{extent:i,count:n});return ma(e,{minMag:e.LINEAR,format:e.RGB,height:1,wrap:e.CLAMP_TO_EDGE},a,r)}else{if(_t(s))return Yh(s,e);throw new Error("Unknown scheme: "+o)}}}function FT(t,e="rgb",n,r){const o=Ml(t,rt(e)?e:e.type,rt(e)?void 0:e.gamma),i=Oy(o);return ma(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},i,r)}function MT(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 ma(e,{minMag:e.NEAREST,format:e.RED,internalFormat:e.R32F,height:1},i,r)}function Yh(t,e,n,r){const o=Ny(t,n);return ma(e,{minMag:e.NEAREST,format:e.RGB,height:1},o,r)}function Oy(t,{extent:e=[0,1],reverse:n=!1,count:r=256}={}){const o=e[0],i=Us(e)-o,s=Cs(r).map(a=>a/(r-1)).map(a=>o+a/i).map(t);return n&&s.reverse(),Ny(s)}function Ny(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=kr(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 Qh(t){const e=kr(t).rgb();return[e.r,e.g,e.b].map(n=>n/255)}const PT="attr_",LT="uDomain_",OT="range_",NT="accessor_",zy="scale_",zT="getScaled_",Zh="uRangeTexture_",Pl="uParam_",ya="checkSelection_",UT=3402823466e29;function GT(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 ba(t,e){return`${NT}${t}_${e}`}function HT(t,e,n){let r;if(yl(t))r=Ei(g1(t)(n));else if(rt(n))if(Tr(t))r=YT(n);else throw new Error(`String values are not supported on the "${t}" channel: ${n}`);else if(ds(n))r=Ei(n?1:0);else if(n===null)if(Tr(t))r=Ei([0,0,0]);else throw new Error(`null value is not supported on the "${t}" chanel.`);else r=Ei(n);const o=ba(t,e),i=`
319
319
  ${r.type} ${o}() {
320
320
  // Constant value
321
321
  return ${r};
322
- }`;return{channel:t,accessorGlsl:i,accessorFunctionName:o}}function BT(t,e){let n="float",r=c=>c;Ir(t)&&(n="vec3",r=c=>Nh(c));const o=`u${NT(t)}_${e}`,i=` // Dynamic value
323
- uniform ${n} ${o};`,s=ga(t,e);let a=`
322
+ }`;return{channel:t,accessorGlsl:i,accessorFunctionName:o}}function VT(t,e){let n="float",r=c=>c;Tr(t)&&(n="vec3",r=c=>Qh(c));const o=`u${JT(t)}_${e}`,i=` // Dynamic value
323
+ uniform ${n} ${o};`,s=ba(t,e);let a=`
324
324
  ${n} ${s}() {
325
325
  // Dynamic value
326
326
  return ${o};
327
- }`;return{channel:t,uniformName:o,uniformGlsl:i,accessorGlsl:a,accessorFunctionName:s,adjuster:r}}function Tb(t,e,n,r=[t]){const{attributeType:o}=yo(e,t),i=wo(r),s=`in highp ${o} ${i};`,a=ga(t,n),c=`
327
+ }`;return{channel:t,uniformName:o,uniformGlsl:i,accessorGlsl:a,accessorFunctionName:s,adjuster:r}}function Uy(t,e,n,r=[t]){const{attributeType:o}=wo(e,t),i=xo(r),s=`in highp ${o} ${i};`,a=ba(t,n),c=`
328
328
  ${o} ${a}() {
329
329
  return ${i};
330
- }`;return{channel:t,attributeName:i,attributeGlsl:s,accessorGlsl:c,accessorFunctionName:a}}function kT(t,e,n){const{attributeType:r}=yo(e,t),o=wo(t),i=` uniform highp ${r} ${o};`,s=ga(t,n),a=`
330
+ }`;return{channel:t,attributeName:i,attributeGlsl:s,accessorGlsl:c,accessorFunctionName:a}}function qT(t,e,n){const{attributeType:r}=wo(e,t),o=xo(t),i=` uniform highp ${r} ${o};`,s=ba(t,n),a=`
331
331
  ${r} ${s}() {
332
332
  return ${o};
333
- }`;return{channel:t,uniformName:o,uniformGlsl:i,accessorGlsl:a,accessorFunctionName:s}}function _T(t,e,n){e??(e=Lh());const r=gi(t),o=AT+r,i=ET+r,{hp:s,attributeType:a}=yo(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}=TT(e.type),h=(B,...N)=>MT.apply(null,[B,"value",...N]);let d;switch(f){case"linear":d=h("scaleLinear","domain",i);break;case"log":d=h("scaleLog","domain",i,e.base());break;case"symlog":d=h("scaleSymlog","domain",i,e.constant());break;case"pow":case"sqrt":d=h("scalePow","domain",i,e.exponent());break;case"index":case"locus":d=h("scaleBandHp","domain",i,e.paddingInner(),e.paddingOuter(),e.align(),n.band??.5);break;case"point":case"band":d=h("scaleBand","domain",i,e.paddingInner(),e.paddingOuter(),e.align(),n.band??.5);break;case"ordinal":case"null":case"identity":d=h("scaleIdentity");break;case"threshold":break;default:throw new Error(`Unsupported scale type: ${e.type}! ${t}: ${JSON.stringify(n)}`)}const p=Pb(e,t);let y;if(p&&t==r){const B=e.props.range??[];if(Ot(B)||B.some(Ot)){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)}`);y=` uniform ${Bb(p.length)} ${i};`}else if(p.length&&p.every(Ht)){const N=_b(p);u.push(`const ${N.type} ${i} = ${N};`)}}const v=kb(t);let b;if(Ir(t)){const B=zh+r;if(t==r&&u.push(`uniform sampler2D ${B};`),St(e.type))b=`getInterpolatedColor(${B}, transformed)`;else if(Fr(e.type)||vi(e.type))b=`getDiscreteColor(${B}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(e.type==="ordinal"||vi(e.type)){const B=zh+r;t==r&&u.push(`uniform sampler2D ${B};`),b=`getDiscreteColor(${B}, int(transformed)).r`}const A=[],S=St(e.type)&&c>2,E=vi(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=St(e.type)||vi(e.type)||["band","point"].includes(e.type);if(d){const B=o;I&&(s?A.push(`vec3 domain = ${B};`):A.push(`vec2 domain = vec2(${B}[slot], ${B}[slot + 1]);`)),A.push(`float transformed = ${d};`),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, ${_b(p)});`),A.push(`return ${b??"transformed"};`),u.push(`
334
- ${v} ${Ib}${t}(${a} value) {
333
+ }`;return{channel:t,uniformName:o,uniformGlsl:i,accessorGlsl:a,accessorFunctionName:s}}function jT(t,e,n){e??(e=Wh());const r=mi(t),o=LT+r,i=OT+r,{hp:s,attributeType:a}=wo(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}=GT(e.type),h=(B,...N)=>QT.apply(null,[B,"value",...N]);let d;switch(f){case"linear":d=h("scaleLinear","domain",i);break;case"log":d=h("scaleLog","domain",i,e.base());break;case"symlog":d=h("scaleSymlog","domain",i,e.constant());break;case"pow":case"sqrt":d=h("scalePow","domain",i,e.exponent());break;case"index":case"locus":d=h("scaleBandHp","domain",i,e.paddingInner(),e.paddingOuter(),e.align(),n.band??.5);break;case"point":case"band":d=h("scaleBand","domain",i,e.paddingInner(),e.paddingOuter(),e.align(),n.band??.5);break;case"ordinal":case"null":case"identity":d=h("scaleIdentity");break;case"threshold":break;default:throw new Error(`Unsupported scale type: ${e.type}! ${t}: ${JSON.stringify(n)}`)}const p=Qy(e,t);let b;if(p&&t==r){const B=e.props.range??[];if(Ot(B)||B.some(Ot)){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 ${Hy(p.length)} ${i};`}else if(p.length&&p.every(Ht)){const N=qy(p);u.push(`const ${N.type} ${i} = ${N};`)}}const v=Vy(t);let y;if(Tr(t)){const B=Zh+r;if(t==r&&u.push(`uniform sampler2D ${B};`),St(e.type))y=`getInterpolatedColor(${B}, transformed)`;else if(Mr(e.type)||Ai(e.type))y=`getDiscreteColor(${B}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(e.type==="ordinal"||Ai(e.type)){const B=Zh+r;t==r&&u.push(`uniform sampler2D ${B};`),y=`getDiscreteColor(${B}, int(transformed)).r`}const A=[],S=St(e.type)&&c>2,E=Ai(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=St(e.type)||Ai(e.type)||["band","point"].includes(e.type);if(d){const B=o;I&&(s?A.push(`vec3 domain = ${B};`):A.push(`vec2 domain = vec2(${B}[slot], ${B}[slot + 1]);`)),A.push(`float transformed = ${d};`),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, ${qy(p)});`),A.push(`return ${y??"transformed"};`),u.push(`
334
+ ${v} ${zy}${t}(${a} value) {
335
335
  ${A.map(B=>` ${B}
336
336
  `).join("")}
337
337
  }`);const _=u.join(`
338
- `);if(I&&t==r){const B=St(e.type)||vi(e.type)?c:2;l=s?` highp vec3 ${o};`:` mediump float ${o}[${B}];`}return{glsl:_,domainUniformName:o,domainUniform:l,rangeUniformName:i,rangeUniform:y}}function RT(t,e){const n=kb(t),r=[],o=[];for(let i=0;i<e.length;i++){const s=e[i],a=ga(t,i),{param:c,empty:l}=s.predicate;r.push(c?`${pa}${c}(${!!l})`:null),o.push(s.scaleChannel?`return ${Ib}${t}(${a}());`:`return ${a}();`)}return`${n} ${CT}${t}() {
339
- ${zT(r,o)}
338
+ `);if(I&&t==r){const B=St(e.type)||Ai(e.type)?c:2;l=s?` highp vec3 ${o};`:` mediump float ${o}[${B}];`}return{glsl:_,domainUniformName:o,domainUniform:l,rangeUniformName:i,rangeUniform:b}}function WT(t,e){const n=Vy(t),r=[],o=[];for(let i=0;i<e.length;i++){const s=e[i],a=ba(t,i),{param:c,empty:l}=s.predicate;r.push(c?`${ya}${c}(${!!l})`:null),o.push(s.scaleChannel?`return ${zy}${t}(${a}());`:`return ${a}();`)}return`${n} ${zT}${t}() {
339
+ ${$T(r,o)}
340
340
  }
341
341
 
342
- #define ${t}_DEFINED`}function Db(t){if(!Ht(t))throw new Error(`Not a number: ${t}`);if(t==1/0)return""+IT;if(t==-1/0)return""+-3402823466e29;{let e=`${t}`;return/^(-)?\d+$/.test(e)&&(e+=".0"),e}}function Ai(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=Bb(e),r=`${n}(${t.map(Db).join(", ")})`;return Object.assign(r,{type:n,numComponents:e})}function Bb(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 kb(t){return Ir(t)?"vec3":t=="uniqueId"?"uint":"float"}function FT(t){return Ai(Nh(t))}function _b(t){return Ai([t[0],Os(t)])}function MT(t,...e){const n=[];for(const r of e)Ht(r)?n.push(Db(r)):_t(r)?n.push(Ai(r)):n.push(r);return`${t}(${n.join(", ")})`}function yo(t,e){var s;const n=t&&Fr(t.type),r=t&&Rb(t.type),o=r&&PT(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 Rb(t){return t=="index"||t=="locus"}function PT(t){return t[1]>2**32}const Uh=2**12;function Fb(t,e=[]){const n=t%Uh,r=(t-n)/Uh;return e[0]=r,e[1]=n,e}function LT(t){const e=t%Uh;return[t-e,e]}function OT(t){return[...LT(t[0]),t[1]-t[0]]}function Mb(t){const e=new Wn([],JSON.stringify);for(const[n,r]of Object.entries(t)){const o=r.channelDef;if(Cr(o)){const s=[o.field,r.scale?(St(r.scale.type)||vi(r.scale.type))??!1:!1];e.set(s,[...e.get(s)??[],n])}}return e}function wo(t){return vT+Ft(t).toSorted().join("_")}function NT(t){return t[0].toUpperCase()+t.slice(1)}const Pb=(t,e)=>Sl(t.type)||St(t.type)&&Ir(e)?[0,1]:t.range?t.range():void 0;function zT(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} {
342
+ #define ${t}_DEFINED`}function Gy(t){if(!Ht(t))throw new Error(`Not a number: ${t}`);if(t==1/0)return""+UT;if(t==-1/0)return""+-3402823466e29;{let e=`${t}`;return/^(-)?\d+$/.test(e)&&(e+=".0"),e}}function Ei(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=Hy(e),r=`${n}(${t.map(Gy).join(", ")})`;return Object.assign(r,{type:n,numComponents:e})}function Hy(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 Vy(t){return Tr(t)?"vec3":t=="uniqueId"?"uint":"float"}function YT(t){return Ei(Qh(t))}function qy(t){return Ei([t[0],Us(t)])}function QT(t,...e){const n=[];for(const r of e)Ht(r)?n.push(Gy(r)):_t(r)?n.push(Ei(r)):n.push(r);return`${t}(${n.join(", ")})`}function wo(t,e){var s;const n=t&&Mr(t.type),r=t&&jy(t.type),o=r&&ZT(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 jy(t){return t=="index"||t=="locus"}function ZT(t){return t[1]>2**32}const Xh=2**12;function Wy(t,e=[]){const n=t%Xh,r=(t-n)/Xh;return e[0]=r,e[1]=n,e}function XT(t){const e=t%Xh;return[t-e,e]}function KT(t){return[...XT(t[0]),t[1]-t[0]]}function Yy(t){const e=new Yn([],JSON.stringify);for(const[n,r]of Object.entries(t)){const o=r.channelDef;if(Ir(o)){const s=[o.field,r.scale?(St(r.scale.type)||Ai(r.scale.type))??!1:!1];e.set(s,[...e.get(s)??[],n])}}return e}function xo(t){return PT+Ft(t).toSorted().join("_")}function JT(t){return t[0].toUpperCase()+t.slice(1)}const Qy=(t,e)=>Fl(t.type)||St(t.type)&&Tr(e)?[0,1]:t.range?t.range():void 0;function $T(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} {
343
343
  ${e[o]}
344
344
  }`)}return r.join(`
345
- `)}function UT(){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 ma{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=[...Mb(e).entries()].filter(([i,s])=>i[1]&&s.length>1).map(([i,s])=>s);this.allocatedVertices=n,this.variableBuilder=new j6(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:h,discrete:d,numComponents:p}=yo(u,i),y=[0,0];let v;u&&d&&"domain"in u&&(v=UT(),v.addAll(u.domain()));const b=v?S=>v(a(S)):f?S=>Fb(l(S),y):l,A=wo(c??i);this.variableBuilder.addConverter(A,{f:b,numComponents:p,arrayReference:f?y:void 0,targetArrayType:h})}this.lastOffset=0,this.rangeMap=new Wn([],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&&St((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,h=[u(e[n]),f(e[r-1])];if(h[1]>h[0]){this.xIndexer=Y6(50,h,u,f);let d=this.variableBuilder.vertexCount;this.addToXIndex=p=>{let y=this.variableBuilder.vertexCount;this.xIndexer(p,d,y),d=y}}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 ma{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() {
345
+ `)}function eD(){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 wa{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=[...Yy(e).entries()].filter(([i,s])=>i[1]&&s.length>1).map(([i,s])=>s);this.allocatedVertices=n,this.variableBuilder=new r8(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:h,discrete:d,numComponents:p}=wo(u,i),b=[0,0];let v;u&&d&&"domain"in u&&(v=eD(),v.addAll(u.domain()));const y=v?S=>v(a(S)):f?S=>Wy(l(S),b):l,A=xo(c??i);this.variableBuilder.addConverter(A,{f:y,numComponents:p,arrayReference:f?b:void 0,targetArrayType:h})}this.lastOffset=0,this.rangeMap=new Yn([],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&&St((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,h=[u(e[n]),f(e[r-1])];if(h[1]>h[0]){this.xIndexer=o8(50,h,u,f);let d=this.variableBuilder.vertexCount;this.addToXIndex=p=>{let b=this.variableBuilder.vertexCount;this.xIndexer(p,d,b),d=b}}else o()}else o()}addToXIndex(e){}toArrays(){return{arrays:this.variableBuilder.arrays,vertexCount:this.variableBuilder.vertexCount,allocatedVertices:this.allocatedVertices,rangeMap:this.rangeMap}}}class tD extends wa{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() {
346
346
  pushAll(); pushAll(); pushAll(); pushAll(); pushAll(); pushAll();
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 HT extends ma{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 VT extends ma{constructor({encoders:e,attributes:n,numItems:r=void 0}){super({encoders:e,attributes:n,numVertices:r}),this.variableBuilder.configure()}}class qT extends ma{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 jT extends ma{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=!cn(a)&&"format"in a&&a.format?Dt(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 h=[0,0];this.updateTextureCoord(h),this.prepareXIndexer(n,r,o);for(let d=r;d<o;d++){const p=n[d],y=this.numberFormat(u(p)),v=rt(y)?y:y===null?"":""+y;if(v.length==0)continue;this.variableBuilder.updateFromDatum(p);const b=s?v.length:this.metrics.measureWidth(v);this.updateWidth(b);let A=i=="right"?-b:i=="center"?-b/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+js*2)/B.width,A=-I/2,E=(B.height+js*2)/B.height,S=-.5-js/B.height):(E=B.height/a,S=-(B.height+B.yoffset+l)/a,I=B.width/a);const F=B.x,M=B.y;f[0]=A,f[1]=S+E,h[0]=F/c,h[1]=M/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=S+E,h[0]=(F+B.width)/c,h[1]=M/c,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,h[0]=F/c,h[1]=(M+B.height)/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=S+E,h[0]=(F+B.width)/c,h[1]=M/c,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,h[0]=F/c,h[1]=(M+B.height)/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=S,h[0]=(F+B.width)/c,h[1]=(M+B.height)/c,this.variableBuilder.pushAll(),A+=N}this.addToXIndex(p)}this.registerBatch(e)}}const Lb=`#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));}}`,WT="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));}",YT=`/***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;
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 nD extends wa{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 rD extends wa{constructor({encoders:e,attributes:n,numItems:r=void 0}){super({encoders:e,attributes:n,numVertices:r}),this.variableBuilder.configure()}}class iD extends wa{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 oD extends wa{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=!cn(a)&&"format"in a&&a.format?Dt(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 h=[0,0];this.updateTextureCoord(h),this.prepareXIndexer(n,r,o);for(let d=r;d<o;d++){const p=n[d],b=this.numberFormat(u(p)),v=rt(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+Qs*2)/B.width,A=-I/2,E=(B.height+Qs*2)/B.height,S=-.5-Qs/B.height):(E=B.height/a,S=-(B.height+B.yoffset+l)/a,I=B.width/a);const F=B.x,M=B.y;f[0]=A,f[1]=S+E,h[0]=F/c,h[1]=M/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=S+E,h[0]=(F+B.width)/c,h[1]=M/c,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,h[0]=F/c,h[1]=(M+B.height)/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=S+E,h[0]=(F+B.width)/c,h[1]=M/c,this.variableBuilder.pushAll(),f[0]=A,f[1]=S,h[0]=F/c,h[1]=(M+B.height)/c,this.variableBuilder.pushAll(),f[0]=A+I,f[1]=S,h[0]=(F+B.width)/c,h[1]=(M+B.height)/c,this.variableBuilder.pushAll(),A+=N}this.addToXIndex(p)}this.registerBatch(e)}}const Zy=`#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;if(texSize==1&&texelFetch(s,ivec2(0,0),0).r==0u){return false;}int left=0;int right=texSize-1;while(left<=right){int mid=left+(right-left)/2;uint midValue=texelFetch(s,ivec2(mid,0),0).r;if(midValue==value){return true;}if(midValue<value){left=mid+1;}else{right=mid-1;}}return false;}/***Calculates a gamma for antialiasing opacity based on the color.*/float getGammaForColor(vec3 rgb){return mix(1.25,0.75,smoothstep(0.0,1.0,dot(rgb,vec3(0.299,0.587,0.114))));}/***Specialized linearstep for doing antialiasing*/float distanceToRatio(float d){return clamp(d*uDevicePixelRatio+0.5,0.0,1.0);}vec4 distanceToColor(float d,vec4 fill,vec4 stroke,vec4 background,float halfStrokeWidth){if(halfStrokeWidth>0.0){float sd=abs(d)-halfStrokeWidth;return mix(stroke,d<=0.0 ? fill : background,distanceToRatio(sd));}else{return mix(background,fill,distanceToRatio(-d));}}`,sD="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));}",aD=`/***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;
349
349
  #if !defined(SAMPLE_FACET_UNIFORM) && !defined(SAMPLE_FACET_TEXTURE)
350
350
  SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1.0);}
351
351
  #elif defined(SAMPLE_FACET_UNIFORM)
@@ -353,37 +353,37 @@ SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1
353
353
  #elif defined(SAMPLE_FACET_TEXTURE)
354
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);}
355
355
  #endif
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;}}`,QT=`/**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){
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;}}`,cD=`/**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){
357
357
  #ifdef uniqueId_DEFINED
358
358
  uint id=attr_uniqueId;vPickingColor=vec4(ivec4(id>>0,id>>8,id>>16,id>>24)&0xFF)/float(0xFF);
359
359
  #else
360
360
  vPickingColor=vec4(1.0);
361
361
  #endif
362
- return true;}return false;}`,ZT="in highp vec4 vPickingColor;",Tl=Symbol("cacheMap");function Dl(t,e,n){let r=ba(t).get(e);return r===void 0&&(r=n(e),ba(t).set(e,r)),r}function XT(t,e){ba(t).delete(e)}function Bl(t,e){const n=ba(t);for(const r of n.keys())r.startsWith(e)&&n.delete(r);ba(t).delete(e)}function Ob(t){t[Tl]=new Map}function ba(t){return t[Tl]||Ob(t),t[Tl]}function Nb(...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 KT(t){return rt(t)||Ht(t)||us(t)}class Mr extends Error{constructor(e,n){super(e),this.name="ViewError",this.view=n}}const JT="SAMPLE_FACET_UNIFORM",zb="SAMPLE_FACET_TEXTURE",Ub="uSelectionTexture_";class ya{constructor(e){ge(this,In,[]);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 $T,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=Nb(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:sn}),e}fixEncoding(e){return e}setupExprRefsNeedingGraphicsUpdate(e){const n=this.getSupportedChannels(),r={};for(const i of e){const s=this.properties[i];if(s&&Ot(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=Nb(()=>r,()=>o)}get encoding(){return Dl(this,"encoding",()=>{var s;const e=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=a=>{const c=this.properties[a];return KT(c)||Ot(c)?{value:c}:void 0},o=Object.fromEntries(this.getSupportedChannels().map(a=>[a,r(a)]).filter(a=>cn(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=S5(this.unitView,this.encoding)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return zb;if(this.unitView.getLayoutAncestors().find(e=>"samples"in e.spec))return JT}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=Mb(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 _=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 F=wo("uniqueId");if(Qm(N)){if(!d.has(_)){d.set(_,"single");const M=Il+$s(_);f.push(" // Selection parameter"),f.push(` uniform highp uint ${M};`),W(this,In).push(()=>{this.registerMarkUniformValue(M,{expr:_},C=>C.uniqueId??0)}),c.push(`bool ${pa}${_}(bool empty) {
363
- return ${Il}${_} == ${F} || (empty && ${Il}${_} == 0u);
364
- }`)}}else if(qf(N)){if(!d.has(_)){d.set(_,"multi");const M=Ub+$s(_);c.push(`// Selection texture
365
- uniform highp usampler2D ${M};`);const C=this.getContext().glHelper,Y=C.selectionTextures;this.selectionTextureOps.push(()=>{const se=B.getValue(_),ae=Y.get(se);if(!ae)throw new Error(`Bug: no selection texture found for "${_}"!`);ci(this.programInfo,{[M]:ae})});const Q=Ub+_;c.push(`bool ${pa}${_}(bool empty) {
362
+ return true;}return false;}`,lD="in highp vec4 vPickingColor;",Ll=Symbol("cacheMap");function Ol(t,e,n){let r=xa(t).get(e);return r===void 0&&(r=n(e),xa(t).set(e,r)),r}function uD(t,e){xa(t).delete(e)}function Nl(t,e){const n=xa(t);for(const r of n.keys())r.startsWith(e)&&n.delete(r);xa(t).delete(e)}function Xy(t){t[Ll]=new Map}function xa(t){return t[Ll]||Xy(t),t[Ll]}function Ky(...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 fD(t){return rt(t)||Ht(t)||ds(t)}class Pr extends Error{constructor(e,n){super(e),this.name="ViewError",this.view=n}}const hD="SAMPLE_FACET_UNIFORM",Jy="SAMPLE_FACET_TEXTURE",$y="uSelectionTexture_";class va{constructor(e){he(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 dD,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=Ky(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:sn}),e}fixEncoding(e){return e}setupExprRefsNeedingGraphicsUpdate(e){const n=this.getSupportedChannels(),r={};for(const i of e){const s=this.properties[i];if(s&&Ot(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=Ky(()=>r,()=>o)}get encoding(){return Ol(this,"encoding",()=>{var s;const e=this.getDefaultEncoding(),n=this.unitView.getEncoding(),r=a=>{const c=this.properties[a];return fD(c)||Ot(c)?{value:c}:void 0},o=Object.fromEntries(this.getSupportedChannels().map(a=>[a,r(a)]).filter(a=>cn(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=L5(this.unitView,this.encoding)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return Jy;if(this.unitView.getLayoutAncestors().find(e=>"samples"in e.spec))return hD}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=Yy(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 _=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 F=xo("uniqueId");if(s1(N)){if(!d.has(_)){d.set(_,"single");const M=Pl+na(_);f.push(" // Selection parameter"),f.push(` uniform highp uint ${M};`),q(this,Tn).push(()=>{this.registerMarkUniformValue(M,{expr:_},C=>C.uniqueId??0)}),c.push(`bool ${ya}${_}(bool empty) {
363
+ return ${Pl}${_} == ${F} || (empty && ${Pl}${_} == 0u);
364
+ }`)}}else if(eh(N)){if(!d.has(_)){d.set(_,"multi");const M=$y+na(_);c.push(`// Selection texture
365
+ uniform highp usampler2D ${M};`);const C=this.getContext().glHelper,Y=C.selectionTextures;this.selectionTextureOps.push(()=>{const se=B.getValue(_),ae=Y.get(se);if(!ae)throw new Error(`Bug: no selection texture found for "${_}"!`);li(this.programInfo,{[M]:ae})});const Q=$y+_;c.push(`bool ${ya}${_}(bool empty) {
366
366
  return binarySearchTexture(${Q}, ${F}) || (empty && isEmptyBinarySearchTexture(${Q}));
367
- }`),C.createSelectionTexture(N);const oe=B.createExpression(_);oe.addListener(()=>{const se=oe(null);C.createSelectionTexture(se),this.getContext().animator.requestRender()})}}else if(Ym(N)&&!d.has(_)){d.set(_,"interval");const M=[],C=[];for(const Y of Object.keys(N.intervals)){if(!["x","y"].includes(Y))continue;const Q=Il+$s(_)+`_${Y}`,{attributeType:oe}=yo(this.unitView.getScaleResolution(Y).scale,Y);f.push(" // Selection parameter"),f.push(` uniform highp ${oe}[2] ${Q};`),W(this,In).push(()=>{this.registerMarkUniformValue(Q,{expr:_},Ie=>Ie.intervals[Y]??[1,0])});const se=Ie=>{for(const[me,Ae]of u.entries())if(me[1]&&Ae.includes(Ie))return wo(Ae);return wo(Ie)},ae=se(Y),ce=Q+"[0]",be=Q+"[1]",he=Zf(Y);if(this.encoding[he]){const Ie=se(he),me=this.defaultHitTestMode;if(me=="endpoints")M.push(`((${ce} <= ${ae} && ${ae} <= ${be}) || (${ce} <= ${Ie} && ${Ie} <= ${be}))`);else if(me=="encloses")M.push(`(${ce} <= ${ae} && ${Ie} <= ${be})`);else if(me=="intersects")M.push(`(${ce} <= ${Ie} && ${ae} <= ${be})`);else throw new Mr(`Unsupported hit test mode "${me}" for interval selection!`,this.unitView)}else M.push(`(${ce} <= ${ae} && ${ae} <= ${be})`);C.push(`${ce} > ${be}`)}c.push(`bool ${pa}${_}(bool empty) {
367
+ }`),C.createSelectionTexture(N);const oe=B.createExpression(_);oe.addListener(()=>{const se=oe(null);C.createSelectionTexture(se),this.getContext().animator.requestRender()})}}else if(o1(N)&&!d.has(_)){d.set(_,"interval");const M=[],C=[];for(const Y of Object.keys(N.intervals)){if(!["x","y"].includes(Y))continue;const Q=Pl+na(_)+`_${Y}`,{attributeType:oe}=wo(this.unitView.getScaleResolution(Y).scale,Y);f.push(" // Selection parameter"),f.push(` uniform highp ${oe}[2] ${Q};`),q(this,Tn).push(()=>{this.registerMarkUniformValue(Q,{expr:_},Ce=>Ce.intervals[Y]??[1,0])});const se=Ce=>{for(const[me,Ee]of u.entries())if(me[1]&&Ee.includes(Ce))return xo(Ee);return xo(Ce)},ae=se(Y),ce=Q+"[0]",ye=Q+"[1]",de=oh(Y);if(this.encoding[de]){const Ce=se(de),me=this.defaultHitTestMode;if(me=="endpoints")M.push(`((${ce} <= ${ae} && ${ae} <= ${ye}) || (${ce} <= ${Ce} && ${Ce} <= ${ye}))`);else if(me=="encloses")M.push(`(${ce} <= ${ae} && ${Ce} <= ${ye})`);else if(me=="intersects")M.push(`(${ce} <= ${Ce} && ${ae} <= ${ye})`);else throw new Pr(`Unsupported hit test mode "${me}" for interval selection!`,this.unitView)}else M.push(`(${ce} <= ${ae} && ${ae} <= ${ye})`);C.push(`${ce} > ${ye}`)}c.push(`bool ${ya}${_}(bool empty) {
368
368
  return ${M.join(" && ")} || (empty && (${C.join(" || ")}));
369
- }`)}}const p=(I,_,B,N)=>{const F=_.channelDef;if(cn(F))if(Ot(F.value)){const{uniformName:M,uniformGlsl:C,accessorGlsl:Y,adjuster:Q}=BT(I,B);c.push(Y),f.push(C),W(this,In).push(()=>{this.registerMarkUniformValue(M,F.value,Q)})}else c.push(DT(I,B,F.value).accessorGlsl);else if(ea(F)){const{uniformName:M,uniformGlsl:C,accessorGlsl:Y}=kT(I,N,B);f.push(C),c.push(Y);const{largeHp:Q,discrete:oe}=yo(N,I),se=oe&&"domain"in N?ae=>N.domain().indexOf(ae):Q?Fb:ae=>+ae;W(this,In).push(()=>{this.registerMarkUniformValue(M,F.datum,se)})}else if(Cr(F)){const M=u.get([F.field,!0]),{attributeGlsl:C,accessorGlsl:Y}=Tb(I,N,B,M!=null&&M.includes(I)?M:void 0);l.add(C),c.push(Y)}else if(ta(F)){const{attributeGlsl:M,accessorGlsl:C}=Tb(I,N,B);l.add(M),c.push(C)}else throw new Mr(`Unsupported channel definition: ${JSON.stringify(F)}`,this.unitView)};for(const[I,_]of Object.entries(i)){if(!o.includes(I))continue;const{channelDef:B,accessors:N,scale:F}=_;for(let M=0;M<N.length;M++)p(I,N[M],M,F);if(F){const M=Zt(B)&&B.resolutionChannel||I,C=ll(M)?this.unitView.getScaleResolution(M):null,{glsl:Y,domainUniform:Q,domainUniformName:oe,rangeUniform:se,rangeUniformName:ae}=_T(I,F,B);c.push(Y),f.push(Q),f.push(se),se&&W(this,In).push(()=>{const ce=this.createMarkUniformSetter(ae),be=()=>ce(Pb(F,I));C.addEventListener("range",be),be()}),Q&&W(this,In).push(()=>{const ce=this.createMarkUniformSetter(oe),be=()=>{const he=Fr(F.type)?[0,F.domain().length]:F.domain();ce(Rb(F.type)?OT(he):he)};C.addEventListener("domain",be),be()})}c.push(RT(I,N))}const y=[...d.keys()].map(I=>`${pa}${I}(false)`);c.push(`bool isPointSelected() {
370
- `+(this.encoders.uniqueId&&y.length>0?` return ${y.join(" || ")};`:" return false;")+`
369
+ }`)}}const p=(I,_,B,N)=>{const F=_.channelDef;if(cn(F))if(Ot(F.value)){const{uniformName:M,uniformGlsl:C,accessorGlsl:Y,adjuster:Q}=VT(I,B);c.push(Y),f.push(C),q(this,Tn).push(()=>{this.registerMarkUniformValue(M,F.value,Q)})}else c.push(HT(I,B,F.value).accessorGlsl);else if(ra(F)){const{uniformName:M,uniformGlsl:C,accessorGlsl:Y}=qT(I,N,B);f.push(C),c.push(Y);const{largeHp:Q,discrete:oe}=wo(N,I),se=oe&&"domain"in N?ae=>N.domain().indexOf(ae):Q?Wy:ae=>+ae;q(this,Tn).push(()=>{this.registerMarkUniformValue(M,F.datum,se)})}else if(Ir(F)){const M=u.get([F.field,!0]),{attributeGlsl:C,accessorGlsl:Y}=Uy(I,N,B,M!=null&&M.includes(I)?M:void 0);l.add(C),c.push(Y)}else if(ia(F)){const{attributeGlsl:M,accessorGlsl:C}=Uy(I,N,B);l.add(M),c.push(C)}else throw new Pr(`Unsupported channel definition: ${JSON.stringify(F)}`,this.unitView)};for(const[I,_]of Object.entries(i)){if(!o.includes(I))continue;const{channelDef:B,accessors:N,scale:F}=_;for(let M=0;M<N.length;M++)p(I,N[M],M,F);if(F){const M=f1(B),C=M&&M.resolutionChannel||I,Y=bl(C)?this.unitView.getScaleResolution(C):null,{glsl:Q,domainUniform:oe,domainUniformName:se,rangeUniform:ae,rangeUniformName:ce}=jT(I,F,B);c.push(Q),f.push(oe),f.push(ae),ae&&q(this,Tn).push(()=>{const ye=this.createMarkUniformSetter(ce),de=()=>ye(Qy(F,I));Y.addEventListener("range",de),de()}),oe&&q(this,Tn).push(()=>{const ye=this.createMarkUniformSetter(se),de=()=>{const Ce=Mr(F.type)?[0,F.domain().length]:F.domain();ye(jy(F.type)?KT(Ce):Ce)};Y.addEventListener("domain",de),de()})}c.push(WT(I,N))}const b=[...d.keys()].map(I=>`${ya}${I}(false)`);c.push(`bool isPointSelected() {
370
+ `+(this.encoders.uniqueId&&b.length>0?` return ${b.join(" || ")};`:" return false;")+`
371
371
  }`);const v=`precision highp float;
372
- precision highp int;`,b=I=>I.replace("#pragma markUniforms",f.join(`
373
- `));r=r.map(b),e=b(e),n=b(n);const A=[v,a,...r,Lb,WT,[...l].join(`
374
- `),...c,YT,QT,e],S=[v,a,...r,Lb,ZT,n],E=this.gl;this.programStatus=bT(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=b6(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=am(this.gl,this.programInfo,"View"),this.markUniformInfo=am(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),ci(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of W(this,In))n();Te(this,In,void 0)}createMarkUniformSetter(e){const n=this.markUniformInfo.setters[e];if(!n)throw new Error(`Uniform "${e}" not found int the Mark block!`);return r=>{n(r),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(e,n,r=o=>o){const o=this.createMarkUniformSetter(e),i=s=>{if(s==null)throw new Error(`Trying to set null/undefined value for uniform: ${e}${Ot(n)?`Expr: ${n.expr}`:""}`);o(s)};if(Ot(n)){const s=this.unitView.paramMediator.createExpression(n.expr),a=()=>i(r(s(null)));s.addListener(a),a()}else i(r(n))}deleteGraphicsData(){const e=this.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),e.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let n=0;n<8;n++)e.disableVertexAttribArray(n);Object.values(this.bufferInfo.attribs).forEach(n=>this.gl.deleteBuffer(n.buffer)),this.bufferInfo.indices&&this.gl.deleteBuffer(this.bufferInfo.indices),this.bufferInfo=void 0}}updateBufferInfo(e){if(this.gl.bindVertexArray(null),this.bufferInfo&&e.vertexCount<=this.bufferInfo.allocatedVertices)for(const[n,r]of Object.entries(e.arrays))r.data&&kS(this.gl,this.bufferInfo.attribs[n],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=FS(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?(lm(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):cm(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(e){const n=this.glHelper,r=this.gl,o=[];o.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=O6(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[s,a]of Object.entries(this.encoders)){const c=n.rangeTextures.get(a.scale);c&&o.push(()=>ci(this.programInfo,{[zh+s]:c}))}o.push(...this.selectionTextureOps),this.getSampleFacetMode()==zb&&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.");ci(this.programInfo,{uSampleFacetTexture:s})});const i=(e.picking??!1)&&this.isPickingParticipant();return o.push(()=>qs(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:i})),this.opaque||e.picking?o.push(()=>r.disable(r.BLEND)):o.push(()=>r.enable(r.BLEND)),o}prepareSampleFacetRendering(e){const n=e.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(n&&r){const o=n.locSize?n.locSize.location:0,i=n.locSize?n.locSize.size:1;if(o>1||o+i<0)return!1;const s=n.targetLocSize?n.targetLocSize.location:o,a=n.targetLocSize?n.targetLocSize.size:i;this.gl.uniform4f(r.location,o,i,s,a)}return!0}render(e){}createRenderCallback(e,n){var f;if(!this.bufferInfo)return()=>{};const r=this;let o;const i=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,s=i&&St(i.type),a=["index","locus"].includes(i==null?void 0:i.type)?-1:0,c=[0,0];o=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(S=>S*r),v=y.map(S=>Math.floor(S)),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 qs(this.viewUniformInfo,{...u,uViewportSize:[e.width,e.height],uDevicePixelRatio:r}),lm(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(e,n){}}In=new WeakMap;class $T extends Wn{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 Gh(t,e){const n=Zf(e);let r=t[e]&&{...t[e]},o=t[n]&&{...t[n]};if(!(cn(r)||cn(o))){if(r){if(!Zt(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 kl(t,e){if(Wf(t)){const n=t.condition;!Array.isArray(n)&&Zt(n)&&(n.resolutionChannel=e)}else Zt(t)&&(t.resolutionChannel=e)}function Gb(t,e){t.stroke||(e?t.stroke={value:null}:(t.stroke=structuredClone(t.color),kl(t.stroke,"color"))),cn(t.stroke)&&t.stroke.value===null&&(t.strokeWidth={value:0}),t.strokeOpacity||(t.strokeOpacity=structuredClone(t.opacity),kl(t.strokeOpacity,"opacity"))}function Hb(t,e){cn(t.fill)&&t.fill.value===null?t.fillOpacity={value:0}:t.fill||(t.fill=structuredClone(t.color),kl(t.fill,"color"),!e&&!t.fillOpacity&&(t.fillOpacity={value:0})),t.fillOpacity||(e?(t.fillOpacity=structuredClone(t.opacity),kl(t.fillOpacity,"opacity")):t.fillOpacity={value:0})}const eD=["none","diagonal","antiDiagonal","cross","vertical","horizontal","grid","dots","rings","ringsLarge"];class tD extends ya{constructor(n){super(n);ge(this,Gr);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 Dl(this,"opaque",()=>!de(this,Gr,A0).call(this)&&!de(this,Gr,E0).call(this)&&!this.properties.shadowOpacity&&cn(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return Gh(n,"x"),Gh(n,"y"),Gb(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=[];de(this,Gr,A0).call(this)&&n.push("ROUNDED_CORNERS"),de(this,Gr,E0).call(this)&&n.push("STROKED"),this.properties.shadowOpacity&&n.push("SHADOW"),this.createAndLinkShaders(H6,V6,[q6,...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,eD.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",Nh)}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(()=>li(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((o,i)=>{Kc(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,i,o)},n)}findDatumAt(n,r){n=Ft(n);const o=this.unitView.getCollector().facetBatches.get(n);if(!o)return;const i=this.encoders,s=i.x.scale.type;if(Fr(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))}}}Gr=new WeakSet,A0=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},E0=function(){const n=this.encoding.strokeWidth;return!(cn(n)&&!n.value)||"condition"in n};const nD=`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,Zy,sD,[...l].join(`
374
+ `),...c,aD,cD,e],S=[v,a,...r,Zy,lD,n],E=this.gl;this.programStatus=BT(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=k6(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=bm(this.gl,this.programInfo,"View"),this.markUniformInfo=bm(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),li(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of q(this,Tn))n();Ae(this,Tn,void 0)}createMarkUniformSetter(e){const n=this.markUniformInfo.setters[e];if(!n)throw new Error(`Uniform "${e}" not found int the Mark block!`);return r=>{n(r),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(e,n,r=o=>o){const o=this.createMarkUniformSetter(e),i=s=>{if(s==null)throw new Error(`Trying to set null/undefined value for uniform: ${e}${Ot(n)?`Expr: ${n.expr}`:""}`);o(s)};if(Ot(n)){const s=this.unitView.paramMediator.createExpression(n.expr),a=()=>i(r(s(null)));s.addListener(a),a()}else i(r(n))}deleteGraphicsData(){const e=this.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),e.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let n=0;n<8;n++)e.disableVertexAttribArray(n);Object.values(this.bufferInfo.attribs).forEach(n=>this.gl.deleteBuffer(n.buffer)),this.bufferInfo.indices&&this.gl.deleteBuffer(this.bufferInfo.indices),this.bufferInfo=void 0}}updateBufferInfo(e){if(this.gl.bindVertexArray(null),this.bufferInfo&&e.vertexCount<=this.bufferInfo.allocatedVertices)for(const[n,r]of Object.entries(e.arrays))r.data&&VS(this.gl,this.bufferInfo.attribs[n],r.data,0);else{this.deleteGraphicsData(),this.bufferInfo=WS(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?(xm(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):wm(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(e){const n=this.glHelper,r=this.gl,o=[];o.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=Z6(this.gl,this.programInfo,this.bufferInfo)),r.useProgram(this.programInfo.program)});for(const[s,a]of Object.entries(this.encoders)){const c=n.rangeTextures.get(a.scale);c&&o.push(()=>li(this.programInfo,{[Zh+s]:c}))}o.push(...this.selectionTextureOps),this.getSampleFacetMode()==Jy&&o.push(()=>{let s;for(const a of this.unitView.getLayoutAncestors())if(s=a.getSampleFacetTexture(),s)break;if(!s)throw new Error("No facet texture available. This is bug.");li(this.programInfo,{uSampleFacetTexture:s})});const i=(e.picking??!1)&&this.isPickingParticipant();return o.push(()=>Ys(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:i})),this.opaque||e.picking?o.push(()=>r.disable(r.BLEND)):o.push(()=>r.enable(r.BLEND)),o}prepareSampleFacetRendering(e){const n=e.sampleFacetRenderingOptions,r=this.programInfo.uniformSetters.uSampleFacet;if(n&&r){const o=n.locSize?n.locSize.location:0,i=n.locSize?n.locSize.size:1;if(o>1||o+i<0)return!1;const s=n.targetLocSize?n.targetLocSize.location:o,a=n.targetLocSize?n.targetLocSize.size:i;this.gl.uniform4f(r.location,o,i,s,a)}return!0}render(e){}createRenderCallback(e,n){var f;if(!this.bufferInfo)return()=>{};const r=this;let o;const i=(f=this.unitView.getScaleResolution("x"))==null?void 0:f.scale,s=i&&St(i.type),a=["index","locus"].includes(i==null?void 0:i.type)?-1:0,c=[0,0];o=h=>{if(s&&h.xIndex){const d=i.domain(),p=h.xIndex(d[0]+a,d[1],c),b=p[0],v=p[1]-b;v>0&&e(b,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,r,o){r=r.flatten();const i=this.gl,s=this.properties,a=.5,c=(s.xOffset??0)+a,l=(s.yOffset??0)+a;let u,f=r;if(s.clip!=="never"&&(s.clip||o)){let h=0,d=0,p;if(o){if(f=r.intersect(o).flatten(),!f.isDefined())return!1;p=[r.width/f.width,r.height/f.height],d=Math.max(0,r.y2-o.y2),h=Math.min(0,r.x-o.x)}else p=[1,1];const b=[f.x,e.height-f.y2,f.width,f.height].map(S=>S*n),v=b.map(S=>Math.floor(S)),y=b[0]-v[0],A=b[1]-v[1];i.viewport(...v),i.scissor(...v),i.enable(i.SCISSOR_TEST),u={uViewOffset:[(c+h+y/n)/f.width,-(l+d-A/n)/f.height],uViewScale:p}}else{if(!r.isDefined())return!1;i.viewport(0,0,e.width*n,e.height*n),i.disable(i.SCISSOR_TEST),u={uViewOffset:[(r.x+c)/e.width,(e.height-r.y-l-r.height)/e.height],uViewScale:[r.width/e.width,r.height/e.height]}}return Ys(this.viewUniformInfo,{...u,uViewportSize:[r.width,r.height],uDevicePixelRatio:n}),xm(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(e,n){}}Tn=new WeakMap;class dD extends Yn{constructor(){super([],JSON.stringify)}get(e){let n=super.get(e);return n===void 0&&(n={offset:0,count:0,xIndex:void 0},super.set(e,n)),n}migrateEntries(e){for(const[n,r]of this.entries())e.has(n)||(r.offset=0,r.count=0,r.xIndex=void 0);for(const[n,r]of e.entries())Object.assign(this.get(n),r)}}function Kh(t,e){const n=oh(e);let r=t[e]&&{...t[e]},o=t[n]&&{...t[n]};if(!(cn(r)||cn(o))){if(r){if(!$t(t[e]))return;if(o){if(r.type!="quantitative"){const i=(1-(r.band||1))/2;r.band=i,o.band=-i}}else if(r.type=="quantitative")o={datum:0,contributesToScaleDomain:!1};else{o={...r};const i=(1-(r.band??1))/2;r.band=0+i,o.band=1-i}}else r={value:0},o={value:1};t[e]=r,t[n]=o}}function zl(t,e){const n=f1(t);n&&(n.resolutionChannel=e)}function eb(t,e){t.stroke||(e?t.stroke={value:null}:(t.stroke=structuredClone(t.color),zl(t.stroke,"color"))),cn(t.stroke)&&t.stroke.value===null&&(t.strokeWidth={value:0}),t.strokeOpacity||(t.strokeOpacity=structuredClone(t.opacity),zl(t.strokeOpacity,"opacity"))}function tb(t,e){cn(t.fill)&&t.fill.value===null?t.fillOpacity={value:0}:t.fill||(t.fill=structuredClone(t.color),zl(t.fill,"color"),!e&&!t.fillOpacity&&(t.fillOpacity={value:0})),t.fillOpacity||(e?(t.fillOpacity=structuredClone(t.opacity),zl(t.fillOpacity,"opacity")):t.fillOpacity={value:0})}const pD=["none","diagonal","antiDiagonal","cross","vertical","horizontal","grid","dots","rings","ringsLarge"];class gD extends va{constructor(n){super(n);he(this,Hr);this.augmentDefaultProperties({x2:void 0,y2:void 0,filled:!0,color:"#4c78a8",opacity:1,strokeWidth:3,cornerRadius:0,minWidth:.5,minHeight:.5,minOpacity:1})}getAttributes(){return["uniqueId","facetIndex","x","x2","y","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}getSupportedChannels(){return[...super.getSupportedChannels(),"x2","y2","fill","stroke","fillOpacity","strokeOpacity","strokeWidth"]}get opaque(){return Ol(this,"opaque",()=>!pe(this,Hr,F0).call(this)&&!pe(this,Hr,M0).call(this)&&!this.properties.shadowOpacity&&cn(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(n){return Kh(n,"x"),Kh(n,"y"),eb(n,this.properties.filled),tb(n,this.properties.filled),delete n.color,delete n.opacity,n}onBeforeSampleAnimation(){}onAfterSampleAnimation(){}async initializeGraphics(){await super.initializeGraphics();const n=[];pe(this,Hr,F0).call(this)&&n.push("ROUNDED_CORNERS"),pe(this,Hr,M0).call(this)&&n.push("STROKED"),this.properties.shadowOpacity&&n.push("SHADOW"),this.createAndLinkShaders(e8,t8,[n8,...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,pD.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",Qh)}updateGraphicsData(){const n=this.unitView.getCollector();if(!n){console.debug("No collector");return}const r=n.getItemCount(),o=new tD({encoders:this.encoders,attributes:this.getAttributes(),numItems:r});o.addBatches(n.facetBatches);const i=o.toArrays();this.rangeMap.migrateEntries(i.rangeMap),this.updateBufferInfo(i)}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>ui(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((o,i)=>{sl(r,this.vertexArrayInfo,r.TRIANGLE_STRIP,i,o)},n)}findDatumAt(n,r){n=Ft(n);const o=this.unitView.getCollector().facetBatches.get(n);if(!o)return;const i=this.encoders,s=i.x.scale.type;if(Mr(s)){const a=i.x.dataAccessor;return o.find(c=>r==a(c))}else{const a=i.x.dataAccessor,c=i.x2.dataAccessor;return o.find(l=>r>=a(l)&&r<c(l))}}}Hr=new WeakSet,F0=function(){const n=this.properties;return n.cornerRadius||n.cornerRadiusBottomLeft||n.cornerRadiusBottomRight||n.cornerRadiusTopLeft||n.cornerRadiusTopRight},M0=function(){const n=this.encoding.strokeWidth;return!(cn(n)&&!n.value)||"condition"in n};const mD=`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(){
375
375
  #if defined(dx_DEFINED) || defined(dy_DEFINED)
376
376
  return vec2(getScaled_dx(),getScaled_dy())/uViewportSize;
377
377
  #else
378
378
  return vec2(0.0,0.0);
379
379
  #endif
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();}`,rD="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;}}",iD=`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;
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();}`,yD="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;}}",bD=`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;
381
381
  #pragma markUniforms
382
- };`;class Vb extends bt{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 oD(t,e,n){const r=new Vb({type:"sample",size:t});for(const o of e)r.handle(n(o));return r.complete(),r.reservoir}const sD={};class aD extends ya{constructor(n){super(n);ge(this,hu);ge(this,Wo,()=>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(Ot(r)){const o=this.unitView.paramMediator.createExpression(r.expr);o.addListener(()=>this.getContext().animator.requestRender()),Te(this,Wo,o)}else Te(this,Wo,()=>r);"geometricZoomBound"in this.properties&&console.warn('geometricZoomBound is deprecated. Use something like the following instead: "size": { "expr": "min(0.5 * pow(zoomLevel, 2), 200)" }.')}getAttributes(){return["uniqueId","facetIndex","x","y","size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getDefaultEncoding(){return{...super.getDefaultEncoding(),...sD}}fixEncoding(n){return Gb(n,this.properties.filled),Hb(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(oD(1e4,this.unitView.getCollector().getData(),n)),this.sampledSemanticScores.sort((i,s)=>i-s))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(nD,rD,[iD])}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 VT({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,Wo).call(this)*this.unitView.getZoomLevel());if(n<=0)return-1/0;if(n>=1)return 1/0;{const r=this.sampledSemanticScores;return Sp(r,n)}}else return-1}prepareRender(n){const r=super.prepareRender(n);return r.push(()=>{qs(this.markUniformInfo,{uScaleFactor:de(this,hu,Ev).call(this),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>li(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((o,i)=>{i&&Kc(r,this.vertexArrayInfo,r.POINTS,i,o)},n)}}Wo=new WeakMap,hu=new WeakSet,Ev=function(){const n=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/n),1/3)};const cD="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();}",lD="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;}}",uD=`layout(std140)uniform Mark{uniform mediump float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;uniform mediump float uStrokeDashOffset;
382
+ };`;class nb extends yt{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 wD(t,e,n){const r=new nb({type:"sample",size:t});for(const o of e)r.handle(n(o));return r.complete(),r.reservoir}const xD={};class vD extends va{constructor(n){super(n);he(this,vu);he(this,Yo,()=>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(Ot(r)){const o=this.unitView.paramMediator.createExpression(r.expr);o.addListener(()=>this.getContext().animator.requestRender()),Ae(this,Yo,o)}else Ae(this,Yo,()=>r);"geometricZoomBound"in this.properties&&console.warn('geometricZoomBound is deprecated. Use something like the following instead: "size": { "expr": "min(0.5 * pow(zoomLevel, 2), 200)" }.')}getAttributes(){return["uniqueId","facetIndex","x","y","size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getSupportedChannels(){return[...super.getSupportedChannels(),"size","semanticScore","shape","strokeWidth","dx","dy","fill","stroke","fillOpacity","strokeOpacity","angle"]}getDefaultEncoding(){return{...super.getDefaultEncoding(),...xD}}fixEncoding(n){return eb(n,this.properties.filled),tb(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(wD(1e4,this.unitView.getCollector().getData(),n)),this.sampledSemanticScores.sort((i,s)=>i-s))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(mD,yD,[bD])}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 rD({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-q(this,Yo).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(()=>{Ys(this.markUniformInfo,{uScaleFactor:pe(this,vu,Pv).call(this),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),r.push(()=>this.bindOrSetMarkUniformBlock()),r.push(()=>ui(this.gl,this.programInfo,this.vertexArrayInfo)),r}render(n){const r=this.gl;return this.createRenderCallback((o,i)=>{i&&sl(r,this.vertexArrayInfo,r.POINTS,i,o)},n)}}Yo=new WeakMap,vu=new WeakSet,Pv=function(){const n=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/n),1/3)};const AD="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();}",ED="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;}}",SD=`layout(std140)uniform Mark{uniform mediump float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;uniform mediump float uStrokeDashOffset;
383
383
  #pragma markUniforms
384
- };`;class fD extends ya{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&&Zt(e.y)&&e.y.type=="quantitative")e.x2=e.x,e.y2={datum:0};else if(!e.y2&&Zt(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=hD(this.properties.strokeDash);this.dashTexture=Vs(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(cD,lD,[uD])}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)),qs(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 HT({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(()=>ci(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>li(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((r,o)=>Kc(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,o,r),e)}}function hD(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 dD="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();}",pD="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;}}",gD=`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;
384
+ };`;class CD extends va{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&&$t(e.y)&&e.y.type=="quantitative")e.x2=e.x,e.y2={datum:0};else if(!e.y2&&$t(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=ID(this.properties.strokeDash);this.dashTexture=Ws(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(AD,ED,[SD])}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)),Ys(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 nD({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(()=>li(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>ui(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((r,o)=>sl(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,o,r),e)}}function ID(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 TD="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();}",DD="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;}}",BD=`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;
385
385
  #pragma markUniforms
386
- };`,mD=["arc","dome","diagonal","line"],bD=["vertical","horizontal"];class yD extends ya{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||(Zt(e.x)?e.x2={datum:0}:e.x2=e.x),e.y2||(Zt(e.y)?e.y2={datum:0}:e.y2=e.y),e}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(dD,pD,[gD])}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=>mD.indexOf(n)),this.registerMarkUniformValue("uOrient",e.orient,n=>bD.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 qT({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(()=>li(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))}li(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,r(),i)},e)}}const wD=`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);
386
+ };`,kD=["arc","dome","diagonal","line"],_D=["vertical","horizontal"];class RD extends va{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||($t(e.x)?e.x2={datum:0}:e.x2=e.x),e.y2||($t(e.y)?e.y2={datum:0}:e.y2=e.y),e}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(TD,DD,[BD])}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=>kD.indexOf(n)),this.registerMarkUniformValue("uOrient",e.orient,n=>_D.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 iD({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(()=>ui(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))}ui(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,r(),i)},e)}}const FD=`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);
387
387
  #if defined(x2_DEFINED) || defined(y2_DEFINED)
388
388
  ivec2 align=fixAlignForAngle(uAlign,angleInDegrees);
389
389
  #else
@@ -396,9 +396,9 @@ vec2 pos=applySampleFacet(vec2(x,y));
396
396
  #ifdef y2_DEFINED
397
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;}
398
398
  #endif
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();}`,xD="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;}}",vD=`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;
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*uDevicePixelRatio);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vGamma=getGammaForColor(color);vTexCoord=textureCoord;if(maxValue(uViewportEdgeFadeDistance)>-pow(10.0,10.0)){vEdgeFadeOpacity=minValue(((vec4(1.0,1.0,0.0,0.0)+vec4(-1.0,-1.0,1.0,1.0)*unitPos.yxyx)*uViewportSize.yxyx-uViewportEdgeFadeDistance)/uViewportEdgeFadeWidth);}else{vEdgeFadeOpacity=1.0;}setupPicking();}`,MD="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;}}",PD=`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;
400
400
  #pragma markUniforms
401
- };`,AD={left:-1,center:0,right:1},ED={top:-1,middle:0,bottom:1,alphabetic:1};class SD extends ya{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 pi)this.properties.fitToBand&&Gh(e,n);return e}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(wD,xD,[vD])}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),qs(this.markUniformInfo,{uAlign:[AD[e.align],ED[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?Dt(r.text.format):l=>l;for(const l of n){const u=s(o(l)),f=rt(u)?u:u===null?"":""+u;i+=f&&f.length||0}const a=new jT({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(()=>{ci(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>li(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((r,o)=>Kc(n,this.vertexArrayInfo,n.TRIANGLES,o,r),e)}}const qb=1;function Hh(){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=jA(u),n=t[1]-t[0];const f=t[0]===0&&t[0]===0;if(n<qb&&!f){n=qb;const h=(t[0]+t[1])/2;t[0]=h-n/2,t[1]=h+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(),h=l.numberingOffset();return bc(t[0]-f+h,t[1]-f+h,Math.min(u,Math.ceil(n))).filter(Number.isInteger).map(d=>d-a)},l.tickFormat=(u,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const d=ni(t[0],t[1],Math.min(u,Math.ceil(n)))<1e5?Dt(","):Dt(".3s");return p=>d(p+a)},l.copy=()=>Hh().domain(t).range(e).paddingInner(o).paddingOuter(i).numberingOffset(a),l}function CD(){const t=Hh().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,ni(o[0],o[1],r)),l=[];for(let u=s.index;u<=a.index;u++){const f=e.chromosomes[u],h=Math.max(f.continuousStart+c,o[0]-(o[0]-f.continuousStart)%c),d=Math.min(f.continuousEnd-c/4,o[1]+1);for(let p=h;p<=d;p+=c){const y=p-i;y>=o[0]&&y<o[1]&&l.push(y)}}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=ni(i[0],i[1],Math.min(r,Math.ceil(s)))<1e6?Dt(","):Dt(".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 ID(t){return t.type=="locus"}function _l(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||xo(s)&&xo(a)||xo(s)&&a===!0||s===!0&&Rt(a)||Array.isArray(s)&&Array.isArray(a)&&s.length===a.length&&s.every((c,l)=>c===a[l]),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(xo(l))xo(c)&&(r[a]=_l([l,c],a));else if(xo(c)){if(!(l===!0||l===void 0))throw new Error("Bug in merge! Target is: "+l);r[a]=_l([{},c],a)}else r[a]=c}}};for(const s of t)i(s);return r}function xo(t){return Rt(t)&&!Array.isArray(t)}/*!
401
+ };`,LD={left:-1,center:0,right:1},OD={top:-1,middle:0,bottom:1,alphabetic:1};class ND extends va{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 gi)this.properties.fitToBand&&Kh(e,n);return e}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(FD,MD,[PD])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties,n=this.font.metrics.common.base*.35*(this.properties.logoLetters?.5:1);this.registerMarkUniformValue("uPaddingX",e.paddingX),this.registerMarkUniformValue("uPaddingY",e.paddingY),this.registerMarkUniformValue("uFlushX",e.flushX,r=>!!r),this.registerMarkUniformValue("uFlushY",e.flushY,r=>!!r),this.registerMarkUniformValue("uSqueeze",e.squeeze,r=>!!r),Ys(this.markUniformInfo,{uAlign:[LD[e.align],OD[e.baseline]],uD:[e.dx,-e.dy],uLogoLetter:!!e.logoLetters,uSdfNumerator:n,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?Dt(r.text.format):l=>l;for(const l of n){const u=s(o(l)),f=rt(u)?u:u===null?"":""+u;i+=f&&f.length||0}const a=new oD({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(()=>{li(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>ui(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((r,o)=>sl(n,this.vertexArrayInfo,n.TRIANGLES,o,r),e)}}const rb=1;function Jh(){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=i3(u),n=t[1]-t[0];const f=t[0]===0&&t[0]===0;if(n<rb&&!f){n=rb;const h=(t[0]+t[1])/2;t[0]=h-n/2,t[1]=h+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(),h=l.numberingOffset();return Ic(t[0]-f+h,t[1]-f+h,Math.min(u,Math.ceil(n))).filter(Number.isInteger).map(d=>d-a)},l.tickFormat=(u,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const d=ri(t[0],t[1],Math.min(u,Math.ceil(n)))<1e5?Dt(","):Dt(".3s");return p=>d(p+a)},l.copy=()=>Jh().domain(t).range(e).paddingInner(o).paddingOuter(i).numberingOffset(a),l}function zD(){const t=Jh().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,ri(o[0],o[1],r)),l=[];for(let u=s.index;u<=a.index;u++){const f=e.chromosomes[u],h=Math.max(f.continuousStart+c,o[0]-(o[0]-f.continuousStart)%c),d=Math.min(f.continuousEnd-c/4,o[1]+1);for(let p=h;p<=d;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=ri(i[0],i[1],Math.min(r,Math.ceil(s)))<1e6?Dt(","):Dt(".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 UD(t){return t.type=="locus"}function Ul(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||vo(s)&&vo(a)||vo(s)&&a===!0||s===!0&&Rt(a)||Array.isArray(s)&&Array.isArray(a)&&s.length===a.length&&s.every((c,l)=>c===a[l]),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(vo(l))vo(c)&&(r[a]=Ul([l,c],a));else if(vo(c)){if(!(l===!0||l===void 0))throw new Error("Bug in merge! Target is: "+l);r[a]=Ul([{},c],a)}else r[a]=c}}};for(const s of t)i(s);return r}function vo(t){return Rt(t)&&!Array.isArray(t)}/*!
402
402
  * Adapted from vega-encode:
403
403
  * https://github.com/vega/vega/blob/master/packages/vega-encode/src/ticks.js
404
404
  *
@@ -406,7 +406,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
406
406
  * All rights reserved.
407
407
  *
408
408
  * BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
409
- */function jb(t,e,n){return Ht(e)&&n!=null&&(e=Math.min(e,~~(fs(t.domain())/n)||1)),Rt(e)&&(e.step,e=e.interval),e}function Wb(t,e,n){var r=t.range(),o=Math.floor(r[0]),i=Math.ceil(jn(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],jn(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?Wb(t,DD(t.bins,e)):t.ticks?t.ticks(e):t.domain()}function DD(t,e){var n=t.length,r=~~(n/(e||n));return r<2?t.slice():t.filter(function(o,i){return!(i%r)})}function BD(t,e,n){var r=t.tickFormat?t.tickFormat(e,n):n?Dt(n):String;if(wb(t.type)){var o=_D(n);r=t.bins?o:kD(r,o)}return r}function kD(t,e){return function(n){return t(n)?e(n):""}}function _D(t){var e=Yi(t||",");if(e.precision==null){switch(e.precision=12,e.type){case"%":e.precision-=2;break;case"e":e.precision-=1;break}return RD(Dt(e),Dt(".1f")(1)[1])}else return Dt(e)}function RD(t,e){return function(n){var r=t(n),o=r.indexOf(e),i,s;if(o<0)return r;for(i=FD(r,o),s=i<r.length?r.slice(i):"";--i>o;)if(r[i]!=="0"){++i;break}return r.slice(0,i)+s}}function FD(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}/*!
409
+ */function ib(t,e,n){return Ht(e)&&n!=null&&(e=Math.min(e,~~(ps(t.domain())/n)||1)),Rt(e)&&(e.step,e=e.interval),e}function ob(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 GD(t,e){return t.bins?ob(t,HD(t.bins,e)):t.ticks?t.ticks(e):t.domain()}function HD(t,e){var n=t.length,r=~~(n/(e||n));return r<2?t.slice():t.filter(function(o,i){return!(i%r)})}function VD(t,e,n){var r=t.tickFormat?t.tickFormat(e,n):n?Dt(n):String;if(Ry(t.type)){var o=jD(n);r=t.bins?o:qD(r,o)}return r}function qD(t,e){return function(n){return t(n)?e(n):""}}function jD(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 WD(Dt(e),Dt(".1f")(1)[1])}else return Dt(e)}function WD(t,e){return function(n){var r=t(n),o=r.indexOf(e),i,s;if(o<0)return r;for(i=YD(r,o),s=i<r.length?r.slice(i):"";--i>o;)if(r[i]!=="0"){++i;break}return r.slice(0,i)+s}}function YD(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}/*!
410
410
  * Adapted from vega-encode:
411
411
  * https://github.com/vega/vega/blob/master/packages/vega-encode/src/Scale.js
412
412
  *
@@ -414,7 +414,7 @@ if(scale<1.0){if(uSqueeze){vec2 scaleFadeExtent=vec2(3.0,6.0)/size;if(scale<scal
414
414
  * All rights reserved.
415
415
  *
416
416
  * BSD-3-Clause License: https://github.com/vega/vega-lite/blob/master/LICENSE
417
- */const MD="locus",PD="index";var LD=5;function OD(t){const e=t.type;return!t.bins&&(e===mo||e===ca||e===la)}function Yb(t){return St(t)&&![Gn,PD,MD].includes(t)}function Qb(t){return t||{warn:(e,...n)=>console.warn(e,...n)}}var ND=aA(["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 Zb(t,e,n){n=Qb(n);for(const r in t)if(!ND[r]){if(r==="padding"&&Yb(e.type))continue;kn(e[r])?e[r](t[r]):n.warn("Unsupported scale property: "+r)}WD(e,t,jD(e,t,HD(e,t,n)))}function zD(t,e){const n=UD(t),r=Ze(n);if(!r)throw new Error("Unknown scale type: "+n);const o=r();return!t.domain&&St(o.type)&&(t.domain=[0,0]),Zb(t,o,e),o}function UD(t){var e=t.type,n="",r;return e===Gn?Gn+"-"+mo:(GD(t)&&(r=t.rawDomain?t.rawDomain.length:t.domain?t.domain.length+ +(t.domainMid!=null):0,n=r===2?Gn+"-":r===3?bo+"-":""),(n+e||mo).toLowerCase())}function GD(t){const e=t.type;return St(e)&&e!==fb&&e!==hb&&(t.scheme||t.range&&t.range.length&&t.range.every(rt))}function HD(t,e,n){if(!t.domain)return 0;n=Qb(n);var r=VD(t,e.domainRaw,n);if(r>-1)return r;var o=e.domain,i=t.type,s=e.zero||e.zero===void 0&&OD(t),a,c;return o?(Yb(i)&&e.padding&&o[0]!==jn(o)&&(o=qD(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(Xb(i,o,n)),i===_h&&t.unknown(e.domainImplicit?Kf:void 0),e.nice&&t.nice&&t.nice(e.nice!==!0&&jb(t,e.nice)||null),o.length):0}function VD(t,e,n){return e?(t.domain(Xb(t.type,e,n)),e.length):-1}function qD(t,e,n,r,o,i){n??(n=[0,1]);var s=Math.abs(jn(n)-n[0]),a=s/(s-2*r),c=t===Rr?q0(e,null,a):t===la?Au(e,null,a,.5):t===ca?Au(e,null,a,o||1):t===Al?Yv(e,null,a,i||1):V0(e,null,a);return e=e.slice(),e[0]=c[0],e[e.length-1]=c[1],e}function Xb(t,e,n){if(wb(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: "+Eu(e))}return e}function jD(t,e,n){let r=e.bins;if(r&&!_t(r)){const o=(r.start==null||r.stop==null)&&t.domain(),i=r.start==null?o[0]:r.start,s=r.stop==null?jn(o):r.stop,a=r.step;a||bn("Scale bins parameter missing step property."),r=As(i,s+a,a)}return r?t.bins=r:t.bins&&delete t.bins,t.type===Fh&&(r?!e.domain&&!e.domainRaw&&(t.domain(r),n=r.length):t.bins=t.domain()),n}function WD(t,e,n){var r=t.type,o=e.round||!1,i=e.range;if(e.rangeStep!=null)i=YD(r,e,n);else if(e.scheme&&(i=QD(r,e,n),kn(i))){if(t.interpolator)return t.interpolator(i);bn(`Scale type ${r} does not support interpolating color schemes.`)}if(i&&Sl(r))return t.interpolator(Cl(Vh(i,e.reverse),e.interpolate,e.interpolateGamma));i&&e.interpolate&&t.interpolate?t.interpolate(xb(e.interpolate,e.interpolateGamma)):kn(t.round)?t.round(o):kn(t.rangeRound)&&t.interpolate(o?sa:kr),i&&t.range(Vh(i,e.reverse))}function YD(t,e,n){t!==gb&&t!==Rh&&bn("Only band and point scales support rangeStep.");var r=(e.paddingOuter!=null?e.paddingOuter:e.padding)||0,o=t===Rh?1:(e.paddingInner!=null?e.paddingInner:e.padding)||0;return[0,e.rangeStep*Bh(n,o,r)]}function QD(t,e,n){var r=e.schemeExtent,o,i;return _t(e.scheme)?i=Cl(e.scheme,e.interpolate,e.interpolateGamma):(o=e.scheme.toLowerCase(),i=Ph(o),i||bn(`Unrecognized scheme name: ${e.scheme}`)),n=t===pb?n+1:t===Fh?n-1:t===kh||t===db?+e.schemeCount||LD:n,Sl(t)?Kb(i,r,e.reverse):kn(i)?fT(Kb(i,r),n):t===_h?i:i.slice(0,n)}function Kb(t,e,n){return kn(t)&&(e||n)?uT(t,Vh(e||[0,1],n)):t}function Vh(t,e){return e?t.slice().reverse():t}const Jb=Dt(",d");function ZD(t,e){return t.chrom+":"+Jb(Math.floor(t.pos+1))+"-"+(t.chrom!=e.chrom?e.chrom+":":"")+Jb(Math.ceil(e.pos))}const $b={dm6:`chr3R 32079331
417
+ */const QD="locus",ZD="index";var XD=5;function KD(t){const e=t.type;return!t.bins&&(e===yo||e===fa||e===ha)}function sb(t){return St(t)&&![Vn,ZD,QD].includes(t)}function ab(t){return t||{warn:(e,...n)=>console.warn(e,...n)}}var JD=xA(["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 cb(t,e,n){n=ab(n);for(const r in t)if(!JD[r]){if(r==="padding"&&sb(e.type))continue;Rn(e[r])?e[r](t[r]):n.warn("Unsupported scale property: "+r)}sB(e,t,oB(e,t,nB(e,t,n)))}function $D(t,e){const n=eB(t),r=Ze(n);if(!r)throw new Error("Unknown scale type: "+n);const o=r();return!t.domain&&St(o.type)&&(t.domain=[0,0]),cb(t,o,e),o}function eB(t){var e=t.type,n="",r;return e===Vn?Vn+"-"+yo:(tB(t)&&(r=t.rawDomain?t.rawDomain.length:t.domain?t.domain.length+ +(t.domainMid!=null):0,n=r===2?Vn+"-":r===3?bo+"-":""),(n+e||yo).toLowerCase())}function tB(t){const e=t.type;return St(e)&&e!==Sy&&e!==Cy&&(t.scheme||t.range&&t.range.length&&t.range.every(rt))}function nB(t,e,n){if(!t.domain)return 0;n=ab(n);var r=rB(t,e.domainRaw,n);if(r>-1)return r;var o=e.domain,i=t.type,s=e.zero||e.zero===void 0&&KD(t),a,c;return o?(sb(i)&&e.padding&&o[0]!==Wn(o)&&(o=iB(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(lb(i,o,n)),i===Gh&&t.unknown(e.domainImplicit?ah:void 0),e.nice&&t.nice&&t.nice(e.nice!==!0&&ib(t,e.nice)||null),o.length):0}function rB(t,e,n){return e?(t.domain(lb(t.type,e,n)),e.length):-1}function iB(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===Fr?tp(e,null,a):t===ha?Ru(e,null,a,.5):t===fa?Ru(e,null,a,o||1):t===_l?sA(e,null,a,i||1):ep(e,null,a);return e=e.slice(),e[0]=c[0],e[e.length-1]=c[1],e}function lb(t,e,n){if(Ry(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: "+Fu(e))}return e}function oB(t,e,n){let r=e.bins;if(r&&!_t(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||yn("Scale bins parameter missing step property."),r=Cs(i,s+a,a)}return r?t.bins=r:t.bins&&delete t.bins,t.type===Vh&&(r?!e.domain&&!e.domainRaw&&(t.domain(r),n=r.length):t.bins=t.domain()),n}function sB(t,e,n){var r=t.type,o=e.round||!1,i=e.range;if(e.rangeStep!=null)i=aB(r,e,n);else if(e.scheme&&(i=cB(r,e,n),Rn(i))){if(t.interpolator)return t.interpolator(i);yn(`Scale type ${r} does not support interpolating color schemes.`)}if(i&&Fl(r))return t.interpolator(Ml($h(i,e.reverse),e.interpolate,e.interpolateGamma));i&&e.interpolate&&t.interpolate?t.interpolate(Fy(e.interpolate,e.interpolateGamma)):Rn(t.round)?t.round(o):Rn(t.rangeRound)&&t.interpolate(o?la:_r),i&&t.range($h(i,e.reverse))}function aB(t,e,n){t!==Dy&&t!==Hh&&yn("Only band and point scales support rangeStep.");var r=(e.paddingOuter!=null?e.paddingOuter:e.padding)||0,o=t===Hh?1:(e.paddingInner!=null?e.paddingInner:e.padding)||0;return[0,e.rangeStep*zh(n,o,r)]}function cB(t,e,n){var r=e.schemeExtent,o,i;return _t(e.scheme)?i=Ml(e.scheme,e.interpolate,e.interpolateGamma):(o=e.scheme.toLowerCase(),i=jh(o),i||yn(`Unrecognized scheme name: ${e.scheme}`)),n=t===Ty?n+1:t===Vh?n-1:t===Uh||t===Iy?+e.schemeCount||XD:n,Fl(t)?ub(i,r,e.reverse):Rn(i)?ET(ub(i,r),n):t===Gh?i:i.slice(0,n)}function ub(t,e,n){return Rn(t)&&(e||n)?AT(t,$h(e||[0,1],n)):t}function $h(t,e){return e?t.slice().reverse():t}const fb=Dt(",d");function lB(t,e){return t.chrom+":"+fb(Math.floor(t.pos+1))+"-"+(t.chrom!=e.chrom?e.chrom+":":"")+fb(Math.ceil(e.pos))}const hb={dm6:`chr3R 32079331
418
418
  chr3L 28110227
419
419
  chr2R 25286936
420
420
  chrX 23542271
@@ -535,12 +535,12 @@ chr18 90702639
535
535
  chr19 61431566
536
536
  chrX 171031299
537
537
  chrY 91744698
538
- chrM 16299`};function XD(t){if(!(t in $b))throw new Error(`Unknown assembly: ${t}`);return $b[t].split(`
539
- `).map(e=>{const n=e.split(" ");return{name:n[0],size:parseInt(n[1])}})}const KD=/^([A-Za-z]+:)?\/\//;function Ei(t,e){if(e&&KD.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 ey(n)+e}function ey(t){const e=t.replace(/[^/]*$/,"");return e===""?void 0:e.endsWith("://")?t+"/":e}class JD{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(!qh(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,ny(this.config))this.setChromSizes(this.config.contigs);else if(!jh(this.config)){const n=XD(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(jh(this.config))try{const n=Ei(e,this.config.url),r=await fetch(n);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);this.setChromSizes($D(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=gr(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 ZD(...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 $D(t){return _A(t).map(([e,n])=>({name:e,size:parseInt(n)}))}function ty(t){return Rt(t)&&"chrom"in t}function eB(t){return t.every(ty)}function qh(t){return Rt(t)&&("name"in t||jh(t)||ny(t))}function jh(t){return qh(t)&&"url"in t}function ny(t){return qh(t)&&"contigs"in t}class wa extends Array{constructor(){super(),this.type=void 0}extend(e){return this}extendAll(e){if(e instanceof wa&&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 Wh extends wa{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 ry extends wa{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 iy extends ry{constructor(){super(),this.type="nominal"}}class tB extends wa{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 oy={quantitative:Wh,index:Wh,locus:Wh,nominal:iy,ordinal:ry};function sy(t,e){if(t=="quantitative"&&nB(e)){const n=new tB(e);return n.type=t,n}else if(oy[t]){const n=new oy[t];return n.type=t,e&&n.extendAll(e),n}throw new Error("Unknown type: "+t)}function nB(t){return t&&t.length>0&&t.length!=2&&t.every(e=>typeof e=="number")}function rB(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function iB(t,e,n){return t*Math.pow(e/t,n)}Ze("index",Hh,["continuous"]),Ze("locus",CD,["continuous"]),Ze("null",Lh,[]);const ay="quantitative",cy="ordinal",ly="nominal",uy="locus",oB="index";class sB{constructor(e){ge(this,Pe);ge(this,Yo,{domain:new Set,range:new Set});ge(this,Jt);ge(this,Pi);ge(this,Ga,new Set);this.channel=e,this.members=[],this.type=null,this.name=void 0}get zoomExtent(){return(W(this,Jt)&&St(W(this,Jt).type)&&de(this,Pe,Iv).call(this))??[-1/0,1/0]}addEventListener(e,n){W(this,Yo)[e].add(n)}removeEventListener(e,n){W(this,Yo)[e].delete(n)}addMember(e){var a;const{channel:n,channelDef:r}=e,o=r.type==null&&this.type;if(n!="sample"&&!r.type&&!Qf(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&&!Qf(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,Sv).call(this),r=e.domain(),o=de(this,Pe,T0).call(this,!0);if(Zb({...o,range:void 0},e),e.props=o,de(this,Pe,D0).call(this),!W(this,Pi)&&St(e.type)){const s=e.domain();fs(s)>0&&Te(this,Pi,s)}if(!n){Te(this,Pi,e.domain()),de(this,Pe,hr).call(this,"domain");return}const i=e.domain();kc(i,r)||(this.isZoomable()?e.domain(r):de(this,Pe,Gi).call(this)?(e.domain(r),this.zoomTo(i,500)):de(this,Pe,hr).call(this,"domain"))}get scale(){if(W(this,Jt))return W(this,Jt);const e=de(this,Pe,T0).call(this),n=zD({...e,range:void 0});n.props=e,"unknown"in n&&n.unknown(null),Te(this,Jt,n),de(this,Pe,D0).call(this),ID(n)&&n.genome(this.getGenome());const r=n.range;if(r){const o=()=>de(this,Pe,hr).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,Gi).call(this)&&kc(de(this,Pe,bu).call(this),this.getDomain())}isZoomable(){return de(this,Pe,Gi).call(this)&&!!this.scale.props.zoom}zoom(e,n,r){if(!de(this,Pe,Gi).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=qv(s,r||0),s=V0(s,a,e);break;case"log":s=jv(s,r||0),s=q0(s,a,e);break;case"pow":case"sqrt":{const l=o;s=Wv(s,r||0,l.exponent()),s=Au(s,a,e,l.exponent());break}default:throw new Error("Zooming is not implemented for: "+o.type)}const c=this.zoomExtent;return s=Qv(s,c[0],c[1]),[0,1].some(l=>s[l]!=i[l])?(o.domain(s),de(this,Pe,hr).call(this,"domain"),!0):!1}async zoomTo(e,n=!1){if(us(n)&&(n=n?700:0),!de(this,Pe,Gi).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(e),o=W(this,Pe,C0).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:rB,onUpdate:d=>{const p=iB(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),de(this,Pe,hr).call(this,"domain")}}),i.domain(r),de(this,Pe,hr).call(this,"domain")}else i.domain(r),o==null||o.requestRender(),de(this,Pe,hr).call(this,"domain")}resetZoom(){if(!de(this,Pe,Gi).call(this))throw new Error("Not a zoomable scale!");const e=this.getDomain(),n=de(this,Pe,bu).call(this);return[0,1].some(r=>n[r]!=e[r])?(W(this,Jt).domain(n),de(this,Pe,hr).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?fs(this.zoomExtent)/fs(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,C0).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 ty(e)?this.getGenome().toContinuous(e.chrom,e.pos):e}fromComplexInterval(e){return this.type==="locus"&&eB(e)?this.getGenome().toContinuousInterval(e):e}}Yo=new WeakMap,Jt=new WeakMap,Pi=new WeakMap,Ga=new WeakMap,Pe=new WeakSet,S0=function(){return this.members[0].view},C0=function(){return W(this,Pe,S0).context},hr=function(e){for(const n of W(this,Yo)[e].values())n({type:e,scaleResolution:this})},I0=function(){return!!de(this,Pe,B0).call(this)},Sv=function(){const e=W(this,Jt);if(!e)return!1;const n=e.domain();return St(e.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},Cv=function(){const e=this.members.map(n=>n.channelDef.scale).filter(n=>n!==void 0);return _l(e,"scale",["domain"])},T0=function(e=!1){const n=de(this,Pe,Cv).call(this);if(n===null||n.type=="null")return{type:"null"};const r={...de(this,Pe,Tv).call(this,this.type),...n};r.type||(r.type=aB(this.channel,this.type));const o=de(this,Pe,bu).call(this,e);return o&&o.length>0?r.domain=o:Fr(r.type)&&(r.domain=new iy),!r.domain&&r.domainMid!==void 0&&(r.domain=[r.domainMin??0,r.domainMax??1]),this.channel=="y"&&Fr(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),cB(r,this.channel),r},D0=function(){const e=W(this,Jt).props,n=e.range;if(W(this,Ga).forEach(o=>o.invalidate()),!n||!_t(n))return;const r=(o,i)=>i?o.slice().reverse():o;if(n.some(Ot)){let o;const i=()=>{W(this,Jt).range(r(o.map(s=>s()),e.reverse))};o=n.map(s=>{if(Ot(s)){const a=W(this,Pe,S0).paramMediator.createExpression(s.expr);return a.addListener(i),W(this,Ga).add(a),()=>a(null)}else return()=>s}),i()}else W(this,Jt).range(r(n,e.reverse))},bu=function(e=!1){return de(this,Pe,B0).call(this)??(this.type==uy?this.getGenome().getExtent():e?this.getDataDomain():[])},B0=function(){const e=this.members.map(n=>n.channelDef).filter(n=>{var r;return(r=n.scale)==null?void 0:r.domain}).map(n=>sy(n.type,this.fromComplexInterval(n.scale.domain)));if(e.length>0)return e.reduce((n,r)=>n.extendAll(r))},Gi=function(){const e=this.scale.type;return St(e)},Iv=function(){const e=this.scale.props,n=e.zoom;return lB(n)&&_t(n.extent)?this.fromComplexInterval(n.extent):n&&e.type=="locus"?this.getGenome().getExtent():W(this,Pi)},Tv=function(e){const n=this.channel,r={};return de(this,Pe,I0).call(this)&&(r.zero=!1),na(n)?r.nice=!de(this,Pe,I0).call(this):Ir(n)?r.scheme=e==ly?"tableau10":e==cy?"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 aB(t,e){if(e==oB||e==uy){if(Yf(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][[ly,cy,ay].indexOf(e)]:e==ay?"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 cB(t,e){na(e)&&t.type!=="ordinal"&&(t.range=[0,1]),e=="opacity"&&St(t.type)&&(t.clamp=!0)}function lB(t){return Rt(t)}function Yh(t){const e=new Set;function n(r){for(const o of Object.values(r.resolutions.scale))e.add(o)}for(const r of Ft(t)){r.visit(n);for(const o of r.getDataAncestors()){if(!o.options.contributesToScaleDomain)break;n(o)}}e.forEach(r=>r.reconfigure())}function Qh(...t){for(const e of t)if(e!==void 0)return e}class uB{constructor(e){this.channel=e,this.members=[]}get scaleResolution(){var e;return(e=Os(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 Dl(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:_l(e.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const e=i=>{var a;const s=I5(i.view,i.channel);if(!cn(s))return{member:i,explicitTitle:Qh("axis"in s?(a=s.axis)==null?void 0:a.title:void 0,s.title),implicitTitle:Qh(Cr(s)?s.field:void 0,ta(s)?s.expr:void 0)}},n=this.members.map(e),r=n.filter(i=>{var s;if(Qf(i.member.channel)&&!i.explicitTitle){const a=gi(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=>Qh(i.explicitTitle,i.implicitTitle)).filter(rt));return o.size?[...o].join(", "):null}}function fy(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+=Rl(p.px)+(Zh(p)?0:n),a+=Rl(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&&Zh(t[0]))return[{location:d,size:0}];for(let p=0;p<t.length;p++){const y=t[p];if(Zh(y))u.push(y);else{h(f.length>0);const v=Rl(y.px)+(a?Rl(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 fB(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 y0=class y0{constructor(e,n){ge(this,Ha);this.width=e,this.height=n}addPadding(e){return de(this,Ha,k0).call(this,e.width,e.height)}subtractPadding(e){return de(this,Ha,k0).call(this,-e.width,-e.height)}isGrowing(){return!!(this.width.grow||this.height.grow)}};Ha=new WeakSet,k0=function(e,n){return new y0({px:(this.width.px??0)+e,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Pr=y0;const xa=Object.freeze({px:0,grow:0}),hy=new Pr(xa,xa);function Zh(t){return!t.px&&!t.grow}function Rl(t){return t||0}function hB(t){return t&&(Ht(t.px)||Ht(t.grow))}function dy(t){if(my(t))throw new Error("parseSizeDef does not accept step-based sizes.");if(hB(t))return t;if(Ht(t))return{px:t,grow:0};if(t==="container")return{px:0,grow:1};if(!t)return{px:0,grow:1};throw new Error(`Invalid sizeDef: ${t}`)}class Nt{constructor(e,n,r,o){this.top=e||0,this.right=n||0,this.bottom=r||0,this.left=o||0}get width(){return this.left+this.right}get height(){return this.top+this.bottom}expand(e){return e<=0?this:new Nt(this.top+e,this.right+e,this.bottom+e,this.left+e)}add(e){return new Nt(this.top+e.top,this.right+e.right,this.bottom+e.bottom,this.left+e.left)}subtract(e){return new Nt(this.top-e.top,this.right-e.right,this.bottom-e.bottom,this.left-e.left)}union(e){return new Nt(Math.max(this.top,e.top),Math.max(this.right,e.right),Math.max(this.bottom,e.bottom),Math.max(this.left,e.left))}getHorizontal(){return new Nt(0,this.right,0,this.left)}getVertical(){return new Nt(this.top,0,this.bottom,0)}get horizontalTotal(){return this.left+this.right}get verticalTotal(){return this.top+this.bottom}static createFromConfig(e){return typeof e=="number"?this.createUniformPadding(e):e?this.createFromRecord(e):Xh}static createFromRecord(e){return new Nt(e.top,e.right,e.bottom,e.left)}static zero(){return Xh}static createUniformPadding(e){return new Nt(e,e,e,e)}}const Xh=Nt.createUniformPadding(0);Object.freeze(Xh);function va(t,e){return!e||/^(data:|([A-Za-z]+:)?\/\/)/.test(t)||t.startsWith("/")?t:(e.endsWith("/")||(e+="/"),e+t)}function dB(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 pB="VISIT_SKIP",Aa="VISIT_STOP",py=t=>t;class gy{constructor(e,n,r,o,i,s={}){ge(this,qn);ge(this,Qo,{});ge(this,Zo,{});ge(this,Xo,{});ge(this,Va);ge(this,qa);Gt(this,"opacityFunction",py);Gt(this,"facetCoords",new Wn([],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 b5(()=>{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,qa,c("height")),Te(this,Va,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 Pr(de(this,qn,ic).call(this,"width"),de(this,qn,ic).call(this,"height")):hy)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return hy;const e=this.getSize();return new Pr(de(this,qn,ic).call(this,"viewportWidth")??e.width,de(this,qn,ic).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,_0).call(this,"layoutParent")}getDataAncestors(){return de(this,qn,_0).call(this,"dataParent")}handleBroadcast(e){for(const n of W(this,Qo)[e.type]||[])n(e)}_addBroadcastHandler(e,n){let r=W(this,Qo)[e];r||(r=[],W(this,Qo)[e]=r),r.push(n)}handleInteractionEvent(e,n,r){const o=r?W(this,Zo):W(this,Xo);for(const i of o[n.type]||[])i(e,n)}addInteractionEventListener(e,n,r){const o=r?W(this,Zo):W(this,Xo);let i=o[e];i||(i=[],o[e]=i),i.push(n)}removeInteractionEventListener(e,n,r){const o=r?W(this,Zo):W(this,Xo);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!==Aa)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===py)&&(this.opacityFunction=mB(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,Va))==null||o.call(this,n.width),(i=W(this,qa))==null||i.call(this,n.height)}getEncoding(){const e=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...e,...n};for(const[o,i]of Object.entries(r))i===null&&delete r[o];return r}getFacetAccessor(e){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(e){var r;const n=this.getEncoding().sample;return Cr(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(e){const n=gi(e);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(e){const n=gi(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 Ei(()=>{var e;return(e=this.dataParent)==null?void 0:e.getBaseUrl()},dB(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const e=this.spec.title;if(e)return rt(e)?e:Ot(e.text)?this.paramMediator.evaluateAndGet(e.text.expr):e.text}_cache(e,n){return Dl(this,e,n)}_invalidateCacheByPrefix(e,n="self"){switch(n){case"self":Bl(this,e);break;case"ancestors":for(const r of this.getLayoutAncestors())Bl(r,e);break;case"progeny":this.visit(r=>Bl(r,e));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(e){}}Qo=new WeakMap,Zo=new WeakMap,Xo=new WeakMap,Va=new WeakMap,qa=new WeakMap,qn=new WeakSet,ic=function(e){var o;let n=this.spec[e];const r=e=="viewportWidth"||e=="viewportHeight";if(my(n)){if(r)throw new Mr(`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(Fr(s.type))a=s.domain().length;else if(["locus","index"].includes(s.type)){const l=s.domain();a=Os(l)-l[0]}else throw new Mr(`Cannot use step-based size with "${s.type}" scale!`,this);const c=s;return a=Bh(a,c.paddingInner(),c.paddingOuter()),{px:a*i,grow:0}}else throw new Mr("Cannot use 'step' size with missing scale!",this)}else return(n&&dy(n))??(r?void 0:{px:0,grow:1})},_0=function(e){const n=[];let r=this;do n.push(r),r=r[e];while(r);return n};function gB(t){return"unitsPerPixel"in t}function mB(t){const e="opacity"in t.spec?t.spec.opacity:void 0;if(e!==void 0){if(Ht(e))return n=>n*e;if(gB(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 Mr("Cannot find a resolved quantitative scale for dynamic opacity!",t);const o=xh().domain(e.unitsPerPixel).range(e.values).clamp(!0);return i=>{const a=fs(r.domain())/1e3;return o(a)*i}}else if(Ot(e)){const n=t.paramMediator.createExpression(e.expr);return n.addListener(()=>t.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const my=t=>!!(t!=null&&t.step),bB={point:aD,rect:tD,rule:fD,link:yD,text:SD};class en extends gy{constructor(n,r,o,i,s,a){super(n,r,o,i,s,a);ge(this,du);ge(this,ja);this.spec=n;const c=bB[this.getMarkType()];if(c)this.mark=new c(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),Te(this,ja,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(l=>{var u;return(u=this.getScaleResolution(l))==null?void 0:u.addEventListener("domain",()=>W(this,ja).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0},de(this,du,Dv).call(this)}render(n,r,o={}){super.render(n,r,o),this.isConfiguredVisible()&&(n.pushView(this,r),n.renderMark(this.mark,o),n.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}getEncoding(){const n=super.getEncoding(),r=this.mark.getSupportedChannels();for(const o of Object.keys(n))r.includes(o)||delete n[o];return n}resolve(n){if(!n){this.resolve("scale"),this.resolve("axis");return}const r=this.mark.encoding;for(const[o,i]of Object.entries(r)){if(!i)continue;let s;if(Zt(i))s=i;else if(Wf(i)){const l=i.condition;if(!Array.isArray(l)&&Zt(l))s=l;else continue}else continue;const a=gi(s.resolutionChannel??o);if(!ll(a)||n=="axis"&&!na(a))continue;let c=this;for(;(c.getConfiguredOrDefaultResolution(a,n)=="forced"||c.dataParent&&["shared","excluded","forced"].includes(c.dataParent.getConfiguredOrDefaultResolution(a,n)))&&c.getConfiguredOrDefaultResolution(a,n)!="excluded";)c=c.dataParent;if(n=="axis"&&na(o)&&Yf(a))c.resolutions[n][a]||(c.resolutions[n][a]=new uB(a)),c.resolutions[n][a].addMember({view:this,channel:o,channelDef:s});else if(n=="scale"&&ll(o)){if(!c.resolutions[n][a]){const u=new sB(a);c.resolutions[n][a]=u,u.addEventListener("range",f=>{var h;(h=this.context.glHelper)==null||h.createRangeTexture(f.scaleResolution,!0)})}const l=this.getLayoutAncestors().some(u=>!u.options.contributesToScaleDomain)||Zt(s)&&s.contributesToScaleDomain===!1?void 0:this.extractDataDomain.bind(this);c.resolutions[n][a].addMember({view:this,channel:o,channelDef:s,dataDomainSource:l})}}}getDataAccessor(n){var r;return(r=this.mark.encoders[n])==null?void 0:r.dataAccessor}getFacetAccessor(n){const r=this.getDataAccessor("sample");return r||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}extractDataDomain(n,r){var i;let o=sy(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 pi.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"}}ja=new WeakMap,du=new WeakSet,Dv=function(){for(const[n,r]of this.paramMediator.paramConfigs){if(!("select"in r))continue;const o=al(r.select);if(jf(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=c(),d=h?h[sn]:0;let p;if(o.toggle)if(f.mouseEvent.shiftKey){if(h){const v=this.paramMediator.getValue(n);p=w5(v,{toggle:[h]})}}else p=jm(h?[h]:null);else d!=s&&(s=d,p=qm(h));p!==void 0&&a(p)};this.addInteractionEventListener(["mouseover","pointerover"].includes(o.on)?"mousemove":"click",l)}}};function*Kh(t,e=[]){for(const[n,r]of t.entries())if(r instanceof Map)for(const o of Kh(r,[...e,n]))yield o;else yield[[...e,n],r]}const by=2147483647,yB=yy([by]);function yy(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 wB(t){const e=yy(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>=yB?u>by?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 wy extends Mf{constructor(n){var r;super();ge(this,tn);ge(this,sr,[]);ge(this,Wa,Qe(sn));ge(this,Hr,[]);ge(this,Li);ge(this,Ko);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=new Wn([],JSON.stringify),Te(this,Ko,vB((r=this.params)==null?void 0:r.sort)),de(this,tn,R0).call(this)}get behavior(){return Ff}get label(){return"collect"}reset(){super.reset(),de(this,tn,R0).call(this)}handle(n){W(this,sr).push(n)}beginBatch(n){Q6(n)&&(Te(this,sr,[]),this.facetBatches.set(Ft(n.facetId),W(this,sr)))}complete(){var n;if(Te(this,sr,[]),(n=this.params.groupby)!=null&&n.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const r=this.facetBatches.get(void 0),o=this.params.groupby.map(s=>Qe(s)),i=o.length>1?gc(r,...o):xB(r,o[0]);this.facetBatches.clear();for(const[s,a]of Kh(i))this.facetBatches.set(s,a)}if(W(this,Ko))for(const r of this.facetBatches.values())r.sort(W(this,Ko));de(this,tn,Bv).call(this),de(this,tn,F0).call(this),super.complete();for(const r of this.observers)r(this)}repropagate(){for(const n of this.children)n.reset();de(this,tn,F0).call(this);for(const n of this.children)n.complete()}getData(){switch(de(this,tn,M0).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,tn,M0).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,Hr).length)return;const r=ti(c=>c.start).right,o=W(this,Wa),i=ti(c=>o(s(c))).left,s=c=>{const l=r(W(this,Li),c),u=W(this,Li)[l-1];return!u||c>=u.stop?void 0:this.facetBatches.get(u.facetId)[c-u.start]},a=i(W(this,Hr),n);if(a>=0){const c=s(W(this,Hr)[a]);if(c&&o(c)===n)return c}}}sr=new WeakMap,Wa=new WeakMap,Hr=new WeakMap,Li=new WeakMap,Ko=new WeakMap,tn=new WeakSet,R0=function(){Te(this,sr,[]),Te(this,Hr,[]),this.facetBatches.clear(),this.facetBatches.set(void 0,W(this,sr))},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])}},M0=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},Bv=function(){var s;Te(this,Li,[]);const n=(s=this.facetBatches.values().next().value)==null?void 0:s[0];if(n==null||!(sn in n))return;let r=0;const o=[],i=W(this,Wa);for(const[a,c]of this.facetBatches){W(this,Li).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,Hr,wB(o))};function xB(t,e){const n=new Map;for(let r=0,o=t.length;r<o;r++){const i=t[r],s=e(i);let a=n.get(s);a||(a=[],n.set(s,a)),a.push(i)}return n}function vB(t){if(t!=null&&t.field){const e=Ft(t.field);if(e.length==1&&!e[0].includes(".")){const n=Ft(t.order)[0]??"ascending",r=JSON.stringify(e[0]);return new Function("a","b",`return a[${r}] ${n==="ascending"?"-":"+"} b[${r}];`)}return W0(t.field,t.order)}}class Fl{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 AB extends bt{get behavior(){return Pn}constructor(e){super(e),this.params=e,this.startAccessor=Qe(e.start),this.endAccessor=Qe(e.end),this.chromAccessor=e.chrom?Qe(e.chrom):n=>{},this.weightAccessor=e.weight?Qe(e.weight):n=>1,this.as={coverage:e.as??"coverage",start:e.asStart??e.start,end:e.asEnd??e.end,chrom:e.asChrom??e.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([n,r])=>r).map(([n,r])=>`${JSON.stringify(r)}: ${n}`).join(", ")+"};"),this.ends=new Fl}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,S)=>{if(b==A)return;let E=!1;c&&(c[e]===S?(c[n]=A,E=!0):c[e]!=0&&p(c)),E||(c=this.createSegment(b,A,S,u))},v=()=>{let b=0;for(;(b=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 S=0;for(;(S=d.peekValue())!==void 0&&S<A;)y(h,S,f),h=S,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 EB(t,e,n=i=>+i,r=0,o=t.length){const i=new Fl,s=o-r;let a;for(a=0;a<e&&a<s;a++)i.push(a,n(t[r+a]));for(;a<s;a++){const u=n(t[r+a]);u>=i.peekValue()&&(i.push(a,u),i.pop())}const c=[];let l;for(;(l=i.pop())!==void 0;)c.push(t[r+l]);return c.reverse()}class SB{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 CB extends bt{get behavior(){return Ff}constructor(e,n){if(super(e),this.params=e,this._data=[],this.channel=e.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.startPosAccessor=Qe(this.params.pos),this.endPosAccessor=Qe(this.params.pos2??this.params.pos),this.startPosBisector=ti(this.startPosAccessor),this.endPosBisector=ti(this.endPosAccessor),this.scoreAccessor=Qe(this.params.score),this.widthAccessor=Qe(this.params.width),this.laneAccessor=this.params.lane?Qe(this.params.lane):o=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=n.getScaleResolution(this.channel);const r=()=>this._filterAndPropagate();this.schedule=()=>n.context.animator.requestTransition(r),this.resolution.addEventListener("domain",o=>this.schedule()),n._addBroadcastHandler("layoutComputed",()=>this.schedule())}complete(){const e=this.startPosAccessor;this._data.sort((n,r)=>e(n)-e(r));for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new SB(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=EB(this._data,70,this.scoreAccessor,this.endPosBisector.left(this._data,r[0]),this.startPosBisector.right(this._data,r[1]));for(const s of i){let a=e(this.startPosAccessor(s))*n,c=e(this.endPosAccessor(s))*n;const l=c-a,u=this.widthAccessor(s)+this.padding*2;let f=(a+c)/2;const h=Math.max(0,(l-u)/2);if(h>0){const d=Math.max(0,u/2-f);f+=Math.min(d,h);const p=Math.max(0,u/2+f-n);f-=Math.min(p,h)}if(this.reservationMaps.get(this.laneAccessor(s)).reserve(f-u/2,f+u/2))if(this.params.asMidpoint){const d=Object.assign({},s);d[this.params.asMidpoint]=e.invert(f/n),this._propagate(d)}else this._propagate(s)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(e){this._data.push(e)}}class IB extends bt{constructor(e,n){super(e,n),this.params=e,this.predicate=void 0}initialize(){let e="";if(TB(this.params))e=this.params.expr;else if(DB(this.params)){const n=this.paramMediator.findValue(this.params.param);if(!n)throw new Error(`Cannot initialize filter transform. Selection parameter "${this.params.param}" not found!`);e=x5(this.params,n)}else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramMediator.createExpression(e),this.predicate.addListener(()=>this.repropagate())}handle(e){this.predicate(e)&&this._propagate(e)}}function TB(t){return"expr"in t}function DB(t){return"param"in t}class BB extends bt{get behavior(){return Pn}constructor(e){super(e),this.params=e;const n=e.index;if(e.fields){const r=Ft(e.fields).map(i=>Qe(i)),o=Ft(e.as||e.fields);if(r.length!==o.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${o.length}) do not match!`);this.handle=i=>{const s=r.map((c,l)=>c(i)??[]),a=s[0].length;for(let c=0;c<a;c++){const l=Object.assign({},i);for(let u=0;u<r.length;u++)l[o[u]]=c<s[u].length?s[u][c]:null;n&&(l[n]=c),this._propagate(l)}}}else this.handle=r=>{for(let o=0;o<r.length;o++){const i=Object.assign({},r[o]);n&&(i[n]=o),this._propagate(i)}}}}const kB=48;function*_B(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-kB}yield r}class RB extends bt{get behavior(){return Pn}constructor(e){super(e);const n=Qe(e.exons??"exons"),r=Qe(e.start??"start"),[o,i]=e.as||["exonStart","exonEnd"];this.handle=s=>{let a=r(s),c=a,l=!0;const u=n(s);for(const f of _B(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 FB extends bt{get behavior(){return Pn}constructor(e){super(e);const n=Ft(e.field).map(i=>Qe(i)),r=Ft(e.separator),o=Ft(e.as||e.field);if(n.length!==r.length||n.length!==o.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${n.length}), and "as" (${o.length}) do not match!`);this.handle=i=>{if(n.some(c=>!c(i)))return;const s=n.map((c,l)=>c(i).split(r[l]));MB(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 MB(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 PB extends bt{get behavior(){return Er}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 xy extends bt{get behavior(){return Er}constructor(e,n){e={channel:"x",...e},super(e),this.params=e;const r=e.channel;if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const o=n.getScaleResolution(r).getGenome();if(!o)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const i=Qe(e.chrom),s=Ft(e.pos).map(p=>Qe(p)),a=Ft(e.as);if(s.length!=a.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=Ft(e.offset);let l;if(c.length==0)l=new Array(s.length).fill(0);else if(c.length==1)l=new Array(s.length).fill(c[0]);else if(c.length==s.length)l=c;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(e.offset)}!`);const u=new Function("datum","chromOffset","posAccessors",a.map((p,y)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${y}](datum) - ${l[y]};`).join(`
540
- `));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 vy={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 bt{get behavior(){return Er}constructor(e,n){super(e),this.params=e;const r=Rf(vy),o=Qe(e.field),i=e.as;let s=0;if(Ot(e.fontSize)){const a=n.paramMediator.createExpression(e.fontSize.expr);s=a(),a.addListener(()=>{s=a(),this.repropagate()})}else s=e.fontSize;this.handle=a=>{const c=o(a);c!==void 0?a[i]=r.measureWidth(c,s):a[i]=0,this._propagate(a)}}}const OB=65536;class NB extends bt{get behavior(){return Er}constructor(e){super(e),this.params=e}reset(){super.reset(),this.initialize()}initialize(){const e=this.params,n=e.as||"lane",r=Ht(e.spacing)?e.spacing:1,o=Qe(e.start),i=Qe(e.end);if(!e.preference!=!e.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(e.preference){const s=new Float64Array(OB),a=Qe(e.preference),c=e.preferredOrder;let l=1/0;this.handle=u=>{const f=o(u);f<l&&s.fill(-1/0),l=f;const 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 Fl,a=new Fl;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 zB extends bt{get behavior(){return Pn}constructor(e){if(super(e),this.params=e,e.as&&e.as.length!=e.fields.length)throw new Error('"fields" and "as" have unequal lengths!');const n=e.fields.map(o=>Qe(o)),r=e.as?e.as:n.map(Vi);this.handle=o=>{const i={};for(let s=0;s<n.length;s++)i[r[s]]=n[s](o);this._propagate(i)}}}class UB extends bt{get behavior(){return Er}constructor(e){super(e),this.params=e;const n=new RegExp(e.regex),r=typeof e.as=="string"?[e.as]:e.as,o=Qe(e.field);this.handle=i=>{const s=o(i);if(rt(s)){const a=s.match(n);if(a){if(a.length-1!=r.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let c=0;c<r.length;c++)i[r[c]]=a[c+1]}else if(e.skipInvalidInput)for(let c=0;c<r.length;c++)i[r[c]]=void 0;else throw new Error(`"${s}" does not match the given regex: ${n.toString()}`)}else if(!e.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof s}, field content: "${s}".`);this._propagate(i)}}}class GB extends bt{get behavior(){return Pn}constructor(e){super(e),this.params=e;const n=Ft(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=Ft(e.asValue);if(n.length!=r.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const o=e.skipRegex?new RegExp(e.skipRegex):void 0,i=e.asKey||"sample";let s,a,c;const l=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 S of d){const E=(v=A.exec(S))==null?void 0:v[1];if(E!==void 0){let I=p.get(E);I||(I=[],p.set(E,I)),I[b]=S}}s=[...p.entries()],a=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 {
541
- `+y.join(`,
538
+ chrM 16299`};function uB(t){if(!(t in hb))throw new Error(`Unknown assembly: ${t}`);return hb[t].split(`
539
+ `).map(e=>{const n=e.split(" ");return{name:n[0],size:parseInt(n[1])}})}const fB=/^([A-Za-z]+:)?\/\//;function Si(t,e){if(e&&fB.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 db(n)+e}function db(t){const e=t.replace(/[^/]*$/,"");return e===""?void 0:e.endsWith("://")?t+"/":e}class hB{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(!ed(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,gb(this.config))this.setChromSizes(this.config.contigs);else if(!td(this.config)){const n=uB(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(td(this.config))try{const n=Si(e,this.config.url),r=await fetch(n);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);this.setChromSizes(dB(await r.text()))}catch(n){throw new Error(`Could not load chrom sizes: ${this.config.url}. Reason: ${n.message}`)}}hasChrPrefix(){return this.chromosomes.some(e=>e.name.startsWith("chr"))}setChromSizes(e){let n=0;this.startByIndex=[0];for(let r=0;r<e.length;r++){this.startByIndex.push(n);const o=e[r].size,i={...e[r],continuousStart:n,continuousEnd:n+o,continuousInterval:[n,n+o],index:r,number:r+1,odd:!(r&1)};this.chromosomes.push(i);const s=i.name.replace(/^chr/i,"");for(const a of["chr"+s,"CHR"+s,"Chr"+s,i.number,""+i.number,s,i.name])this.cumulativeChromPositions.set(a,n),this.chromosomesByName.set(a,i);n+=i.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(e,n){let r=this.cumulativeChromPositions.get(e);if(r===void 0)throw new Error("Unknown chromosome/contig: "+e);return r+ +n}toChromosome(e){if(e>this.totalSize)return;e=Math.floor(e);const n=mr(this.startByIndex,e)-1;if(n>0&&n<=this.chromosomes.length)return this.chromosomes[n-1]}toChromosomal(e){const n=this.toChromosome(e);if(n)return{chrom:n.name,pos:Math.floor(e)-n.continuousStart}}getChromosome(e){return this.chromosomesByName.get(e)}formatInterval(e){return lB(...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 dB(t){return qA(t).map(([e,n])=>({name:e,size:parseInt(n)}))}function pb(t){return Rt(t)&&"chrom"in t}function pB(t){return t.every(pb)}function ed(t){return Rt(t)&&("name"in t||td(t)||gb(t))}function td(t){return ed(t)&&"url"in t}function gb(t){return ed(t)&&"contigs"in t}class Aa extends Array{constructor(){super(),this.type=void 0}extend(e){return this}extendAll(e){if(e instanceof Aa&&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 nd extends Aa{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 mb extends Aa{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 yb extends mb{constructor(){super(),this.type="nominal"}}class gB extends Aa{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:nd,index:nd,locus:nd,nominal:yb,ordinal:mb};function wb(t,e){if(t=="quantitative"&&mB(e)){const n=new gB(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 mB(t){return t&&t.length>0&&t.length!=2&&t.every(e=>typeof e=="number")}function yB(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function bB(t,e,n){return t*Math.pow(e/t,n)}Ze("index",Jh,["continuous"]),Ze("locus",zD,["continuous"]),Ze("null",Wh,[]);const xb="quantitative",vb="ordinal",Ab="nominal",Eb="locus",wB="index";class xB{constructor(e){he(this,Pe);he(this,Qo,{domain:new Set,range:new Set});he(this,Kt);he(this,Li);he(this,qa,new Set);this.channel=e,this.members=[],this.type=null,this.name=void 0}get zoomExtent(){return(q(this,Kt)&&St(q(this,Kt).type)&&pe(this,Pe,Nv).call(this))??[-1/0,1/0]}addEventListener(e,n){q(this,Qo)[e].add(n)}removeEventListener(e,n){q(this,Qo)[e].delete(n)}addMember(e){var a;const{channel:n,channelDef:r}=e,o=r.type==null&&this.type;if(n!="sample"&&!r.type&&!ih(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&&!ih(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=q(this,Kt);if(!e||e.type=="null")return;const n=pe(this,Pe,Lv).call(this),r=e.domain(),o=pe(this,Pe,N0).call(this,!0);if(cb({...o,range:void 0},e),e.props=o,pe(this,Pe,z0).call(this),!q(this,Li)&&St(e.type)){const s=e.domain();ps(s)>0&&Ae(this,Li,s)}if(!n){Ae(this,Li,e.domain()),pe(this,Pe,dr).call(this,"domain");return}const i=e.domain();zc(i,r)||(this.isZoomable()?e.domain(r):pe(this,Pe,Hi).call(this)?(e.domain(r),this.zoomTo(i,500)):pe(this,Pe,dr).call(this,"domain"))}get scale(){if(q(this,Kt))return q(this,Kt);const e=pe(this,Pe,N0).call(this),n=$D({...e,range:void 0});n.props=e,"unknown"in n&&n.unknown(null),Ae(this,Kt,n),pe(this,Pe,z0).call(this),UD(n)&&n.genome(this.getGenome());const r=n.range;if(r){const o=()=>pe(this,Pe,dr).call(this,"range");n.range=function(i){if(arguments.length)r(i),o();else return r()},o()}return n}getDomain(){return this.scale.domain()}getComplexDomain(){var e;return((e=this.getGenome())==null?void 0:e.toChromosomalInterval(this.getDomain()))??this.getDomain()}isZoomed(){return pe(this,Pe,Hi).call(this)&&zc(pe(this,Pe,Tu).call(this),this.getDomain())}isZoomable(){return pe(this,Pe,Hi).call(this)&&!!this.scale.props.zoom}zoom(e,n,r){if(!pe(this,Pe,Hi).call(this))return!1;const o=this.scale,i=o.domain();let s=[...i],a=o.invert(n);switch(o.props.reverse&&(r=-r),"align"in o&&(a+=o.align()),o.type){case"linear":case"index":case"locus":s=rA(s,r||0),s=ep(s,a,e);break;case"log":s=iA(s,r||0),s=tp(s,a,e);break;case"pow":case"sqrt":{const l=o;s=oA(s,r||0,l.exponent()),s=Ru(s,a,e,l.exponent());break}default:throw new Error("Zooming is not implemented for: "+o.type)}const c=this.zoomExtent;return s=aA(s,c[0],c[1]),[0,1].some(l=>s[l]!=i[l])?(o.domain(s),pe(this,Pe,dr).call(this,"domain"),!0):!1}async zoomTo(e,n=!1){if(ds(n)&&(n=n?700:0),!pe(this,Pe,Hi).call(this))throw new Error("Not a zoomable scale!");const r=this.fromComplexInterval(e),o=q(this,Pe,L0).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:yB,onUpdate:d=>{const p=bB(a,c,d),b=a==c?d:(a-p)/(a-c),v=b*u+(1-b)*l,y=[f?s[0]:v-p/2,h?s[1]:v+p/2];i.domain(y),pe(this,Pe,dr).call(this,"domain")}}),i.domain(r),pe(this,Pe,dr).call(this,"domain")}else i.domain(r),o==null||o.requestRender(),pe(this,Pe,dr).call(this,"domain")}resetZoom(){if(!pe(this,Pe,Hi).call(this))throw new Error("Not a zoomable scale!");const e=this.getDomain(),n=pe(this,Pe,Tu).call(this);return[0,1].some(r=>n[r]!=e[r])?(q(this,Kt).domain(n),pe(this,Pe,dr).call(this,"domain"),!0):!1}getZoomLevel(){return this.isZoomable()?ps(this.zoomExtent)/ps(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=q(this,Pe,L0).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 pb(e)?this.getGenome().toContinuous(e.chrom,e.pos):e}fromComplexInterval(e){return this.type==="locus"&&pB(e)?this.getGenome().toContinuousInterval(e):e}}Qo=new WeakMap,Kt=new WeakMap,Li=new WeakMap,qa=new WeakMap,Pe=new WeakSet,P0=function(){return this.members[0].view},L0=function(){return q(this,Pe,P0).context},dr=function(e){for(const n of q(this,Qo)[e].values())n({type:e,scaleResolution:this})},O0=function(){return!!pe(this,Pe,U0).call(this)},Lv=function(){const e=q(this,Kt);if(!e)return!1;const n=e.domain();return St(e.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0},Ov=function(){const e=this.members.map(n=>n.channelDef.scale).filter(n=>n!==void 0);return Ul(e,"scale",["domain"])},N0=function(e=!1){const n=pe(this,Pe,Ov).call(this);if(n===null||n.type=="null")return{type:"null"};const r={...pe(this,Pe,zv).call(this,this.type),...n};r.type||(r.type=vB(this.channel,this.type));const o=pe(this,Pe,Tu).call(this,e);return o&&o.length>0?r.domain=o:Mr(r.type)&&(r.domain=new yb),!r.domain&&r.domainMid!==void 0&&(r.domain=[r.domainMin??0,r.domainMax??1]),this.channel=="y"&&Mr(r.type)&&r.reverse==null&&(r.reverse=!0),r.range&&r.scheme&&delete r.scheme,!("zoom"in r)&&["index","locus"].includes(r.type)&&(r.zoom=!0),AB(r,this.channel),r},z0=function(){const e=q(this,Kt).props,n=e.range;if(q(this,qa).forEach(o=>o.invalidate()),!n||!_t(n))return;const r=(o,i)=>i?o.slice().reverse():o;if(n.some(Ot)){let o;const i=()=>{q(this,Kt).range(r(o.map(s=>s()),e.reverse))};o=n.map(s=>{if(Ot(s)){const a=q(this,Pe,P0).paramMediator.createExpression(s.expr);return a.addListener(i),q(this,qa).add(a),()=>a(null)}else return()=>s}),i()}else q(this,Kt).range(r(n,e.reverse))},Tu=function(e=!1){return pe(this,Pe,U0).call(this)??(this.type==Eb?this.getGenome().getExtent():e?this.getDataDomain():[])},U0=function(){const e=this.members.map(n=>n.channelDef).filter(n=>{var r;return(r=n.scale)==null?void 0:r.domain}).map(n=>wb(n.type,this.fromComplexInterval(n.scale.domain)));if(e.length>0)return e.reduce((n,r)=>n.extendAll(r))},Hi=function(){const e=this.scale.type;return St(e)},Nv=function(){const e=this.scale.props,n=e.zoom;return EB(n)&&_t(n.extent)?this.fromComplexInterval(n.extent):n&&e.type=="locus"?this.getGenome().getExtent():q(this,Li)},zv=function(e){const n=this.channel,r={};return pe(this,Pe,O0).call(this)&&(r.zero=!1),oa(n)?r.nice=!pe(this,Pe,O0).call(this):Tr(n)?r.scheme=e==Ab?"tableau10":e==vb?"blues":"viridis":yl(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 vB(t,e){if(e==wB||e==Eb){if(rh(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][[Ab,vb,xb].indexOf(e)]:e==xb?"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 AB(t,e){oa(e)&&t.type!=="ordinal"&&(t.range=[0,1]),e=="opacity"&&St(t.type)&&(t.clamp=!0)}function EB(t){return Rt(t)}function rd(t){const e=new Set;function n(r){for(const o of Object.values(r.resolutions.scale))e.add(o)}for(const r of Ft(t)){r.visit(n);for(const o of r.getDataAncestors()){if(!o.options.contributesToScaleDomain)break;n(o)}}e.forEach(r=>r.reconfigure())}function id(...t){for(const e of t)if(e!==void 0)return e}class SB{constructor(e){this.channel=e,this.members=[]}get scaleResolution(){var e;return(e=Us(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 Ol(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:Ul(e.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const e=i=>{var a;const s=N5(i.view,i.channel);if(!cn(s))return{member:i,explicitTitle:id("axis"in s?(a=s.axis)==null?void 0:a.title:void 0,s.title),implicitTitle:id(Ir(s)?s.field:void 0,ia(s)?s.expr:void 0)}},n=this.members.map(e),r=n.filter(i=>{var s;if(ih(i.member.channel)&&!i.explicitTitle){const a=mi(i.member.channel);return((s=n.find(c=>c.member.view==i.member.view&&c.member.channel==a))==null?void 0:s.explicitTitle)===void 0}return!0}),o=new Set(r.map(i=>id(i.explicitTitle,i.implicitTitle)).filter(rt));return o.size?[...o].join(", "):null}}function Sb(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)+(od(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 b=u.length;if(!b)return;const v=(p?n:0)*(i?-1:1);d-=v;for(let y=0;y<b;y++)f.push({location:d+(y+1)/(b+1)*v,size:0});d+=v,u.length=0};let d=i?Math.max(e,s):0+o;if(t.length==1&&od(t[0]))return[{location:d,size:0}];for(let p=0;p<t.length;p++){const b=t[p];if(od(b))u.push(b);else{h(f.length>0);const v=Gl(b.px)+(a?Gl(b.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 CB(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 B0=class B0{constructor(e,n){he(this,ja);this.width=e,this.height=n}addPadding(e){return pe(this,ja,G0).call(this,e.width,e.height)}subtractPadding(e){return pe(this,ja,G0).call(this,-e.width,-e.height)}isGrowing(){return!!(this.width.grow||this.height.grow)}};ja=new WeakSet,G0=function(e,n){return new B0({px:(this.width.px??0)+e,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})};let Lr=B0;const Ea=Object.freeze({px:0,grow:0}),Cb=new Lr(Ea,Ea);function od(t){return!t.px&&!t.grow}function Gl(t){return t||0}function IB(t){return t&&(Ht(t.px)||Ht(t.grow))}function Ib(t){if(Bb(t))throw new Error("parseSizeDef does not accept step-based sizes.");if(IB(t))return t;if(Ht(t))return{px:t,grow:0};if(t==="container")return{px:0,grow:1};if(!t)return{px:0,grow:1};throw new Error(`Invalid sizeDef: ${t}`)}class Nt{constructor(e,n,r,o){this.top=e||0,this.right=n||0,this.bottom=r||0,this.left=o||0}get width(){return this.left+this.right}get height(){return this.top+this.bottom}expand(e){return e<=0?this:new Nt(this.top+e,this.right+e,this.bottom+e,this.left+e)}add(e){return new Nt(this.top+e.top,this.right+e.right,this.bottom+e.bottom,this.left+e.left)}subtract(e){return new Nt(this.top-e.top,this.right-e.right,this.bottom-e.bottom,this.left-e.left)}union(e){return new Nt(Math.max(this.top,e.top),Math.max(this.right,e.right),Math.max(this.bottom,e.bottom),Math.max(this.left,e.left))}getHorizontal(){return new Nt(0,this.right,0,this.left)}getVertical(){return new Nt(this.top,0,this.bottom,0)}get horizontalTotal(){return this.left+this.right}get verticalTotal(){return this.top+this.bottom}static createFromConfig(e){return typeof e=="number"?this.createUniformPadding(e):e?this.createFromRecord(e):sd}static createFromRecord(e){return new Nt(e.top,e.right,e.bottom,e.left)}static zero(){return sd}static createUniformPadding(e){return new Nt(e,e,e,e)}}const sd=Nt.createUniformPadding(0);Object.freeze(sd);function Sa(t,e){return!e||/^(data:|([A-Za-z]+:)?\/\/)/.test(t)||t.startsWith("/")?t:(e.endsWith("/")||(e+="/"),e+t)}function TB(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 DB="VISIT_SKIP",Ca="VISIT_STOP",Tb=t=>t;class Db{constructor(e,n,r,o,i,s={}){he(this,jn);he(this,Zo,{});he(this,Xo,{});he(this,Ko,{});he(this,Wa);he(this,Ya);Gt(this,"opacityFunction",Tb);Gt(this,"facetCoords",new Yn([],JSON.stringify));var a;if(!e)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=r,this.dataParent=o,this.name=e.name||i,this.spec=e,this.resolutions={scale:{},axis:{}},Xy(this),this.options={blockEncodingInheritance:!1,contributesToScaleDomain:!0,...s},this.needsAxes={x:!1,y:!1},this.paramMediator=new B5(()=>{var c;return(c=this.dataParent)==null?void 0:c.paramMediator}),e.params)for(const c of e.params)this.paramMediator.registerParam(c);if(!((a=this.layoutParent)!=null&&a.options.layeredChildren)){const c=l=>this.paramMediator.findMediatorForParam(l)?void 0:this.paramMediator.allocateSetter(l,0);Ae(this,Ya,c("height")),Ae(this,Wa,c("width"))}}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>Nt.createFromConfig(this.spec.padding))}getOverhang(){return Nt.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Lr(pe(this,jn,dc).call(this,"width"),pe(this,jn,dc).call(this,"height")):Cb)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return Cb;const e=this.getSize();return new Lr(pe(this,jn,dc).call(this,"viewportWidth")??e.width,pe(this,jn,dc).call(this,"viewportHeight")??e.height)}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(e=>e.isConfiguredVisible())}getEffectiveOpacity(){var e;return this.opacityFunction(((e=this.layoutParent)==null?void 0:e.getEffectiveOpacity())??1)}getPathString(){return this.getLayoutAncestors().map(e=>e.name).reverse().join("/")}getLayoutAncestors(){return pe(this,jn,H0).call(this,"layoutParent")}getDataAncestors(){return pe(this,jn,H0).call(this,"dataParent")}handleBroadcast(e){for(const n of q(this,Zo)[e.type]||[])n(e)}_addBroadcastHandler(e,n){let r=q(this,Zo)[e];r||(r=[],q(this,Zo)[e]=r),r.push(n)}handleInteractionEvent(e,n,r){const o=r?q(this,Xo):q(this,Ko);for(const i of o[n.type]||[])i(e,n)}addInteractionEventListener(e,n,r){const o=r?q(this,Xo):q(this,Ko);let i=o[e];i||(i=[],o[e]=i),i.push(n)}removeInteractionEventListener(e,n,r){const o=r?q(this,Xo):q(this,Ko);let i=o==null?void 0:o[e];if(i){const s=i.indexOf(n);s>=0&&i.splice(s,1)}}visit(e){try{const n=e(this);if(e.postOrder&&e.postOrder(this),n!==Ca)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===Tb)&&(this.opacityFunction=kB(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=q(this,Wa))==null||o.call(this,n.width),(i=q(this,Ya))==null||i.call(this,n.height)}getEncoding(){const e=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},r={...e,...n};for(const[o,i]of Object.entries(r))i===null&&delete r[o];return r}getFacetAccessor(e){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(e){var r;const n=this.getEncoding().sample;return Ir(n)?[n.field]:(r=this.layoutParent)==null?void 0:r.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(e){const n=mi(e);return this.getDataAncestors().map(r=>r.resolutions.scale[n]).find(r=>r)}getAxisResolution(e){const n=mi(e);return this.getDataAncestors().map(r=>r.resolutions.axis[n]).find(r=>r)}getConfiguredResolution(e,n){var r,o;return(o=(r=this.spec.resolve)==null?void 0:r[n])==null?void 0:o[e]}getConfiguredOrDefaultResolution(e,n){return this.getConfiguredResolution(e,n)??this.getConfiguredResolution("default",n)??this.getDefaultResolution(e,n)}getDefaultResolution(e,n){return"independent"}getBaseUrl(){return Si(()=>{var e;return(e=this.dataParent)==null?void 0:e.getBaseUrl()},TB(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const e=this.spec.title;if(e)return rt(e)?e:Ot(e.text)?this.paramMediator.evaluateAndGet(e.text.expr):e.text}_cache(e,n){return Ol(this,e,n)}_invalidateCacheByPrefix(e,n="self"){switch(n){case"self":Nl(this,e);break;case"ancestors":for(const r of this.getLayoutAncestors())Nl(r,e);break;case"progeny":this.visit(r=>Nl(r,e));break}}invalidateSizeCache(){this._invalidateCacheByPrefix("size/","ancestors")}propagateInteractionEvent(e){}}Zo=new WeakMap,Xo=new WeakMap,Ko=new WeakMap,Wa=new WeakMap,Ya=new WeakMap,jn=new WeakSet,dc=function(e){var o;let n=this.spec[e];const r=e=="viewportWidth"||e=="viewportHeight";if(Bb(n)){if(r)throw new Pr(`Cannot use step-based size with "${e}"!`,this);const i=n.step,s=(o=this.getScaleResolution(e=="width"?"x":"y"))==null?void 0:o.scale;if(s){let a=0;if(Mr(s.type))a=s.domain().length;else if(["locus","index"].includes(s.type)){const l=s.domain();a=Us(l)-l[0]}else throw new Pr(`Cannot use step-based size with "${s.type}" scale!`,this);const c=s;return a=zh(a,c.paddingInner(),c.paddingOuter()),{px:a*i,grow:0}}else throw new Pr("Cannot use 'step' size with missing scale!",this)}else return(n&&Ib(n))??(r?void 0:{px:0,grow:1})},H0=function(e){const n=[];let r=this;do n.push(r),r=r[e];while(r);return n};function BB(t){return"unitsPerPixel"in t}function kB(t){const e="opacity"in t.spec?t.spec.opacity:void 0;if(e!==void 0){if(Ht(e))return n=>n*e;if(BB(e)){const n=i=>{var a;const s=(a=t.getScaleResolution(i))==null?void 0:a.scale;if(["linear","index","locus"].includes(s==null?void 0:s.type))return s},r=e.channel?n(e.channel):n("x")??n("y");if(!r)throw new Pr("Cannot find a resolved quantitative scale for dynamic opacity!",t);const o=kh().domain(e.unitsPerPixel).range(e.values).clamp(!0);return i=>{const a=ps(r.domain())/1e3;return o(a)*i}}else if(Ot(e)){const n=t.paramMediator.createExpression(e.expr);return n.addListener(()=>t.context.animator.requestRender()),r=>n(null)*r}}return n=>n}const Bb=t=>!!(t!=null&&t.step),_B={point:vD,rect:gD,rule:CD,link:RD,text:ND};class en extends Db{constructor(n,r,o,i,s,a){super(n,r,o,i,s,a);he(this,Au);he(this,Qa);this.spec=n;const c=_B[this.getMarkType()];if(c)this.mark=new c(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),Ae(this,Qa,this.paramMediator.allocateSetter("zoomLevel",1)),["x","y"].forEach(l=>{var u;return(u=this.getScaleResolution(l))==null?void 0:u.addEventListener("domain",()=>q(this,Qa).call(this,Math.sqrt(this.getZoomLevel())))}),this.needsAxes={x:!0,y:!0},pe(this,Au,Uv).call(this)}render(n,r,o={}){super.render(n,r,o),this.isConfiguredVisible()&&(n.pushView(this,r),n.renderMark(this.mark,o),n.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}getEncoding(){const n=super.getEncoding(),r=this.mark.getSupportedChannels();for(const o of Object.keys(n))r.includes(o)||delete n[o];return n}resolve(n){if(!n){this.resolve("scale"),this.resolve("axis");return}const r=this.mark.encoding;for(const[o,i]of Object.entries(r)){if(!i)continue;let s;if($t(i))s=i;else if(nh(i)){const l=i.condition;if(!Array.isArray(l)&&$t(l))s=l;else continue}else continue;const a=mi(s.resolutionChannel??o);if(!bl(a)||n=="axis"&&!oa(a))continue;let c=this;for(;(c.getConfiguredOrDefaultResolution(a,n)=="forced"||c.dataParent&&["shared","excluded","forced"].includes(c.dataParent.getConfiguredOrDefaultResolution(a,n)))&&c.getConfiguredOrDefaultResolution(a,n)!="excluded";)c=c.dataParent;if(n=="axis"&&oa(o)&&rh(a))c.resolutions[n][a]||(c.resolutions[n][a]=new SB(a)),c.resolutions[n][a].addMember({view:this,channel:o,channelDef:s});else if(n=="scale"&&bl(o)){if(!c.resolutions[n][a]){const u=new xB(a);c.resolutions[n][a]=u,u.addEventListener("range",f=>{var h;(h=this.context.glHelper)==null||h.createRangeTexture(f.scaleResolution,!0)})}const l=this.getLayoutAncestors().some(u=>!u.options.contributesToScaleDomain)||$t(s)&&s.contributesToScaleDomain===!1?void 0:this.extractDataDomain.bind(this);c.resolutions[n][a].addMember({view:this,channel:o,channelDef:s,dataDomainSource:l})}}}getDataAccessor(n){var r;return(r=this.mark.encoders[n])==null?void 0:r.dataAccessor}getFacetAccessor(n){const r=this.getDataAccessor("sample");return r||super.getFacetAccessor(this)}getCollector(){return this.context.dataFlow.findCollectorByKey(this)}extractDataDomain(n,r){var i;let o=wb(r);return(((i=this.mark.encoders[n])==null?void 0:i.accessors)??[]).filter(s=>s.scaleChannel).forEach(s=>{if(s.constant)o.extend(s({}));else{const a=this.getCollector();a!=null&&a.completed&&a.visitData(c=>o.extend(s(c)))}}),o}getZoomLevel(){const n=r=>{var o;return((o=this.getScaleResolution(r))==null?void 0:o.getZoomLevel())??1};return gi.map(n).reduce((r,o)=>r*o,1)}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0),n.target=this,!n.stopped&&this.handleInteractionEvent(void 0,n,!1)}getDefaultResolution(n,r){return n=="x"?"shared":"independent"}}Qa=new WeakMap,Au=new WeakSet,Uv=function(){for(const[n,r]of this.paramMediator.paramConfigs){if(!("select"in r))continue;const o=ml(r.select);if(th(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=c(),d=h?h[sn]:0;let p;if(o.toggle)if(f.mouseEvent.shiftKey){if(h){const v=this.paramMediator.getValue(n);p=_5(v,{toggle:[h]})}}else p=r1(h?[h]:null);else d!=s&&(s=d,p=n1(h));p!==void 0&&a(p)};this.addInteractionEventListener(["mouseover","pointerover"].includes(o.on)?"mousemove":"click",l)}}};function*ad(t,e=[]){for(const[n,r]of t.entries())if(r instanceof Map)for(const o of ad(r,[...e,n]))yield o;else yield[[...e,n],r]}const kb=2147483647,RB=_b([kb]);function _b(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 FB(t){const e=_b(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>=RB?u>kb?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 Rb extends qf{constructor(n){var r;super();he(this,tn);he(this,ar,[]);he(this,Za,Qe(sn));he(this,Vr,[]);he(this,Oi);he(this,Jo);this.params=n??{type:"collect"},this.observers=[],this.facetBatches=new Yn([],JSON.stringify),Ae(this,Jo,PB((r=this.params)==null?void 0:r.sort)),pe(this,tn,V0).call(this)}get behavior(){return Vf}get label(){return"collect"}reset(){super.reset(),pe(this,tn,V0).call(this)}handle(n){q(this,ar).push(n)}beginBatch(n){s8(n)&&(Ae(this,ar,[]),this.facetBatches.set(Ft(n.facetId),q(this,ar)))}complete(){var n;if(Ae(this,ar,[]),(n=this.params.groupby)!=null&&n.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const r=this.facetBatches.get(void 0),o=this.params.groupby.map(s=>Qe(s)),i=o.length>1?Sc(r,...o):MB(r,o[0]);this.facetBatches.clear();for(const[s,a]of ad(i))this.facetBatches.set(s,a)}if(q(this,Jo))for(const r of this.facetBatches.values())r.sort(q(this,Jo));pe(this,tn,Gv).call(this),pe(this,tn,q0).call(this),super.complete();for(const r of this.observers)r(this)}repropagate(){for(const n of this.children)n.reset();pe(this,tn,q0).call(this);for(const n of this.children)n.complete()}getData(){switch(pe(this,tn,j0).call(this),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const n=this.facetBatches;return{[Symbol.iterator]:function*(){for(const o of n.values())yield*o}}}}}visitData(n){pe(this,tn,j0).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(!q(this,Vr).length)return;const r=ni(c=>c.start).right,o=q(this,Za),i=ni(c=>o(s(c))).left,s=c=>{const l=r(q(this,Oi),c),u=q(this,Oi)[l-1];return!u||c>=u.stop?void 0:this.facetBatches.get(u.facetId)[c-u.start]},a=i(q(this,Vr),n);if(a>=0){const c=s(q(this,Vr)[a]);if(c&&o(c)===n)return c}}}ar=new WeakMap,Za=new WeakMap,Vr=new WeakMap,Oi=new WeakMap,Jo=new WeakMap,tn=new WeakSet,V0=function(){Ae(this,ar,[]),Ae(this,Vr,[]),this.facetBatches.clear(),this.facetBatches.set(void 0,q(this,ar))},q0=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])}},j0=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},Gv=function(){var s;Ae(this,Oi,[]);const n=(s=this.facetBatches.values().next().value)==null?void 0:s[0];if(n==null||!(sn in n))return;let r=0;const o=[],i=q(this,Za);for(const[a,c]of this.facetBatches){q(this,Oi).push({start:r,stop:r+c.length,facetId:a}),r+=c.length;for(let l=0,u=c.length;l<u;l++)o.push(i(c[l]))}Ae(this,Vr,FB(o))};function MB(t,e){const n=new Map;for(let r=0,o=t.length;r<o;r++){const i=t[r],s=e(i);let a=n.get(s);a||(a=[],n.set(s,a)),a.push(i)}return n}function PB(t){if(t!=null&&t.field){const e=Ft(t.field);if(e.length==1&&!e[0].includes(".")){const n=Ft(t.order)[0]??"ascending",r=JSON.stringify(e[0]);return new Function("a","b",`return a[${r}] ${n==="ascending"?"-":"+"} b[${r}];`)}return rp(t.field,t.order)}}class Hl{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 LB extends yt{get behavior(){return On}constructor(e){super(e),this.params=e,this.startAccessor=Qe(e.start),this.endAccessor=Qe(e.end),this.chromAccessor=e.chrom?Qe(e.chrom):n=>{},this.weightAccessor=e.weight?Qe(e.weight):n=>1,this.as={coverage:e.as??"coverage",start:e.asStart??e.start,end:e.asEnd??e.end,chrom:e.asChrom??e.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([n,r])=>r).map(([n,r])=>`${JSON.stringify(r)}: ${n}`).join(", ")+"};"),this.ends=new Hl}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=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=d.peekValue())!==void 0;)b(h,y,f),h=y,f-=d.pop();h=NaN,c&&p(c)};this.handle=y=>{const A=o(y);let S=0;for(;(S=d.peekValue())!==void 0&&S<A;)b(h,S,f),h=S,f-=d.pop();if(r){let I=s(y);I!==l&&(v(),u=I,l=u)}isNaN(h)||b(h,A,f),h=A;const E=a(y);f+=E,d.push(E,i(y))},this.complete=()=>{v(),super.complete()},this.beginBatch=y=>{v(),l=null,super.beginBatch(y)}}}function OB(t,e,n=i=>+i,r=0,o=t.length){const i=new Hl,s=o-r;let a;for(a=0;a<e&&a<s;a++)i.push(a,n(t[r+a]));for(;a<s;a++){const u=n(t[r+a]);u>=i.peekValue()&&(i.push(a,u),i.pop())}const c=[];let l;for(;(l=i.pop())!==void 0;)c.push(t[r+l]);return c.reverse()}class NB{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 zB extends yt{get behavior(){return Vf}constructor(e,n){if(super(e),this.params=e,this._data=[],this.channel=e.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.startPosAccessor=Qe(this.params.pos),this.endPosAccessor=Qe(this.params.pos2??this.params.pos),this.startPosBisector=ni(this.startPosAccessor),this.endPosBisector=ni(this.endPosAccessor),this.scoreAccessor=Qe(this.params.score),this.widthAccessor=Qe(this.params.width),this.laneAccessor=this.params.lane?Qe(this.params.lane):o=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=n.getScaleResolution(this.channel);const r=()=>this._filterAndPropagate();this.schedule=()=>n.context.animator.requestTransition(r),this.resolution.addEventListener("domain",o=>this.schedule()),n._addBroadcastHandler("layoutComputed",()=>this.schedule())}complete(){const e=this.startPosAccessor;this._data.sort((n,r)=>e(n)-e(r));for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new NB(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=OB(this._data,70,this.scoreAccessor,this.endPosBisector.left(this._data,r[0]),this.startPosBisector.right(this._data,r[1]));for(const s of i){let a=e(this.startPosAccessor(s))*n,c=e(this.endPosAccessor(s))*n;const l=c-a,u=this.widthAccessor(s)+this.padding*2;let f=(a+c)/2;const h=Math.max(0,(l-u)/2);if(h>0){const d=Math.max(0,u/2-f);f+=Math.min(d,h);const p=Math.max(0,u/2+f-n);f-=Math.min(p,h)}if(this.reservationMaps.get(this.laneAccessor(s)).reserve(f-u/2,f+u/2))if(this.params.asMidpoint){const d=Object.assign({},s);d[this.params.asMidpoint]=e.invert(f/n),this._propagate(d)}else this._propagate(s)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(e){this._data.push(e)}}class UB extends yt{constructor(e,n){super(e,n),this.params=e,this.predicate=void 0}initialize(){let e="";if(GB(this.params))e=this.params.expr;else if(HB(this.params)){const n=this.paramMediator.findValue(this.params.param);if(!n)throw new Error(`Cannot initialize filter transform. Selection parameter "${this.params.param}" not found!`);e=R5(this.params,n)}else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramMediator.createExpression(e),this.predicate.addListener(()=>this.repropagate())}handle(e){this.predicate(e)&&this._propagate(e)}}function GB(t){return"expr"in t}function HB(t){return"param"in t}class VB extends yt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=e.index;if(e.fields){const r=Ft(e.fields).map(i=>Qe(i)),o=Ft(e.as||e.fields);if(r.length!==o.length)throw new Error(`Lengths of "fields" (${r.length}), and "as" (${o.length}) do not match!`);this.handle=i=>{const s=r.map((c,l)=>c(i)??[]),a=s[0].length;for(let c=0;c<a;c++){const l=Object.assign({},i);for(let u=0;u<r.length;u++)l[o[u]]=c<s[u].length?s[u][c]:null;n&&(l[n]=c),this._propagate(l)}}}else this.handle=r=>{for(let o=0;o<r.length;o++){const i=Object.assign({},r[o]);n&&(i[n]=o),this._propagate(i)}}}}const qB=48;function*jB(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-qB}yield r}class WB extends yt{get behavior(){return On}constructor(e){super(e);const n=Qe(e.exons??"exons"),r=Qe(e.start??"start"),[o,i]=e.as||["exonStart","exonEnd"];this.handle=s=>{let a=r(s),c=a,l=!0;const u=n(s);for(const f of jB(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 YB extends yt{get behavior(){return On}constructor(e){super(e);const n=Ft(e.field).map(i=>Qe(i)),r=Ft(e.separator),o=Ft(e.as||e.field);if(n.length!==r.length||n.length!==o.length)throw new Error(`Lengths of "separator" (${r.length}), "fields" (${n.length}), and "as" (${o.length}) do not match!`);this.handle=i=>{if(n.some(c=>!c(i)))return;const s=n.map((c,l)=>c(i).split(r[l]));QB(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 QB(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 ZB extends yt{get behavior(){return Sr}constructor(e,n){super(e,n),this.params=e,this.as=e.as,this.fn=void 0}initialize(){this.fn=this.paramMediator.createExpression(this.params.expr),this.fn.addListener(()=>this.repropagate())}handle(e){e[this.as]=this.fn(e),this._propagate(e)}}class Fb extends yt{get behavior(){return Sr}constructor(e,n){e={channel:"x",...e},super(e),this.params=e;const r=e.channel;if(!["x","y"].includes(r))throw new Error("Invalid channel: "+r);const o=n.getScaleResolution(r).getGenome();if(!o)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const i=Qe(e.chrom),s=Ft(e.pos).map(p=>Qe(p)),a=Ft(e.as);if(s.length!=a.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=Ft(e.offset);let l;if(c.length==0)l=new Array(s.length).fill(0);else if(c.length==1)l=new Array(s.length).fill(c[0]);else if(c.length==s.length)l=c;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(e.offset)}!`);const u=new Function("datum","chromOffset","posAccessors",a.map((p,b)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${b}](datum) - ${l[b]};`).join(`
540
+ `));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 b=i(p),v=d(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 Mb={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 XB extends yt{get behavior(){return Sr}constructor(e,n){super(e),this.params=e;const r=Hf(Mb),o=Qe(e.field),i=e.as;let s=0;if(Ot(e.fontSize)){const a=n.paramMediator.createExpression(e.fontSize.expr);s=a(),a.addListener(()=>{s=a(),this.repropagate()})}else s=e.fontSize;this.handle=a=>{const c=o(a);c!==void 0?a[i]=r.measureWidth(c,s):a[i]=0,this._propagate(a)}}}const KB=65536;class JB extends yt{get behavior(){return Sr}constructor(e){super(e),this.params=e}reset(){super.reset(),this.initialize()}initialize(){const e=this.params,n=e.as||"lane",r=Ht(e.spacing)?e.spacing:1,o=Qe(e.start),i=Qe(e.end);if(!e.preference!=!e.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(e.preference){const s=new Float64Array(KB),a=Qe(e.preference),c=e.preferredOrder;let l=1/0;this.handle=u=>{const f=o(u);f<l&&s.fill(-1/0),l=f;const 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 Hl,a=new Hl;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 $B extends yt{get behavior(){return On}constructor(e){if(super(e),this.params=e,e.as&&e.as.length!=e.fields.length)throw new Error('"fields" and "as" have unequal lengths!');const n=e.fields.map(o=>Qe(o)),r=e.as?e.as:n.map(qi);this.handle=o=>{const i={};for(let s=0;s<n.length;s++)i[r[s]]=n[s](o);this._propagate(i)}}}class ek extends yt{get behavior(){return Sr}constructor(e){super(e),this.params=e;const n=new RegExp(e.regex),r=typeof e.as=="string"?[e.as]:e.as,o=Qe(e.field);this.handle=i=>{const s=o(i);if(rt(s)){const a=s.match(n);if(a){if(a.length-1!=r.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let c=0;c<r.length;c++)i[r[c]]=a[c+1]}else if(e.skipInvalidInput)for(let c=0;c<r.length;c++)i[r[c]]=void 0;else throw new Error(`"${s}" does not match the given regex: ${n.toString()}`)}else if(!e.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof s}, field content: "${s}".`);this._propagate(i)}}}class tk extends yt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=Ft(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=Ft(e.asValue);if(n.length!=r.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const o=e.skipRegex?new RegExp(e.skipRegex):void 0,i=e.asKey||"sample";let s,a,c;const l=h=>{var v;const d=Object.keys(h);for(const y of n)if(!d.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 d){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=d.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(`,
542
542
  `)+`
543
- };`)},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=>{vm(h)&&(this.handle=f),super.beginBatch(h)}}}class HB extends bt{get behavior(){return Er}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?W0(e.sort.field,e.sort.order):void 0,o=e.field?Qe(e.field):()=>1,i=e.groupby.map(u=>Qe(u)),s=ZA(this.buffer,u=>i.map(f=>f(u)).join()).map(u=>u[1]);let a=u=>!0;if(e.baseField){const u=Qe(e.baseField);a=f=>u(f)!==null}let c,l;switch(e.offset){case"normalize":c=(u,f)=>u/f,l=(u,f)=>Es(u,f);break;case"center":c=(u,f)=>u-f/2,l=(u,f)=>Es(u,f);break;case"information":{const u=Math.log2(e.cardinality??4);c=(f,h)=>f/h,l=(f,h)=>{const p=Es(f,A=>+!a(A)),y=Es(f,h),v=y-p;let b=0;for(let A=0;A<f.length;A++){const S=f[A];if(a(S)){const E=h(S)/v;b-=E*Math.log2(E)}}return v/(u-(b+0))*(v/y)}}break;default:c=(u,f)=>u,l=(u,f)=>1}for(const u of s){r&&u.sort(r);const f=l(u,o);let 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 VB extends bt{get behavior(){return Pn}constructor(e){super(e),this.params=e;const n=Qe(e.field??"sequence"),[r,o]=e.as??["pos","sequence"];this.handle=i=>{const s=Object.assign({},i,{[o]:"",[r]:0}),a=n(i);for(let c=0;c<a.length;c++){const l=Object.assign({},s);l[r]=c,l[o]=a.charAt(c),this._propagate(l)}}}}const Ay={count:t=>t.length,valid:VA,sum:Es,min:Ou,max:Lu,mean:t3,median:n3,variance:qA};class qB extends bt{get behavior(){return Pn}constructor(e){if(super(e),this.params=e,this.buffer=[],this.ops=[],this.as=[],e.fields){if(e.fields.length!=e.ops.length)throw new Error("Fields and ops must have the same length!");if(e.as&&e.as.length!=e.ops.length)throw new Error('If "as" is defined, "fields" and "as" must have the same length!');e.fields.forEach((n,r)=>{const o=Qe(n),i=Ay[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=>Ay.count(n)),this.as.push("count")}reset(){super.reset(),this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const e=this.params,n=e==null?void 0:e.groupby;if((n==null?void 0:n.length)>0){const r=n.map(i=>Qe(i)),o=gc(this.buffer,...r);for(const[i,s]of Kh(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 jB={aggregate:qB,collect:wy,coverage:AB,filterScoredLabels:CB,filter:IB,flatten:BB,flattenCompressedExons:RB,flattenDelimited:FB,flattenSequence:VB,formula:PB,identifier:Pf,linearizeGenomicCoordinate:xy,measureText:LB,pileup:NB,project:zB,regexExtract:UB,regexFold:GB,sample:Vb,stack:HB};function WB(t,e){const n=jB[t.type];if(n)return new n(t,e);throw new Error("Unknown transform: "+t.type)}function Ey(t,e=[]){if(!Iy(t)&&!Cy(t))return;const n={...t.format};if(n.type??(n.type=Cy(t)&&QB(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 YB(t){var e;return((e=Ju(t))==null?void 0:e.responseType)??"text"}function QB(t){var e;if(Array.isArray(t)&&(t=t[0]),t)return(e=t.match(/\.(csv|tsv|json)/))==null?void 0:e[1]}const Sy=t=>typeof t!="object"?ZB:XB,ZB=t=>({data:t}),XB=t=>t;function Cy(t){return"url"in t}class vo extends Mf{constructor(n){super();Gt(this,"view");this.view=n}get identifier(){}setLoadingStatus(n,r){this.view.context.setDataLoadingStatus(this.view,n,r)}get paramMediator(){return this.view.paramMediator}handle(n){throw new Error("Source does not handle incoming data!")}async load(){}repropagate(){this.load()}}function Iy(t){return"values"in t}class KB extends vo{constructor(n,r){var o;super(r);ge(this,Ya);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,Ya,P0).call(this,n)}loadSynchronously(){de(this,Ya,P0).call(this,this.params.values)}async load(){this.loadSynchronously()}}Ya=new WeakSet,P0=function(n){let r=[],o=i=>i;if(Array.isArray(n))n.length>0&&(r=n,o=Sy(n[0]));else if(typeof n=="object")r=[n];else if(typeof n=="string")r=$u(n,Ey(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 JB(t){return"url"in t}class $B extends vo{constructor(n,r){super(r);ge(this,pu);this.params=sl(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=an(this.params.url),r=typeof n=="object"&&"urlsFromFile"in n?await de(this,pu,kv).call(this,n):(Array.isArray(n)?n:[n]).map(c=>Ei(this.baseUrl,c)),o=Ey(this.params,r),i=YB(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=$u(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()}}pu=new WeakSet,kv=async function(n){const r=Ei(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 $u(i,{type:n.type??"tsv"}).map(a=>typeof a=="string"?a:a.url).map(a=>Ei(r,a))};function ek(t){return"sequence"in t}class tk extends vo{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=an(this.sequence.as)??"data",n=an(this.sequence.start)??0,r=an(this.sequence.step)??1,o=an(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 Jh extends vo{constructor(n,r){super(n);Gt(this,"initializedPromise",Promise.resolve());if(r){if(r!=="x"&&r!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${r}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the lazy data source. Must be either "x" or "y".');if(this.channel=r,this.scaleResolution=this.view.getScaleResolution(r),!this.scaleResolution){const i=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof en||i.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(i.join(" "))}const o=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",o),this.view.context.addBroadcastListener("layoutComputed",o)}get genome(){return this.scaleResolution.getGenome()}onDomainChanged(n,r){}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(n){this.reset(),this.beginBatch({type:"file"});for(const r of n)for(const o of r)this._propagate(o);this.complete(),Yh(this.view)}}class nk extends Jh{constructor(n,r){const o={...n};super(r,o.channel);Gt(this,"ticks",[]);this.params=n}get label(){return"axisTickSource"}async load(){this.ticks=null,this.onDomainChanged()}onDomainChanged(){const n=this.scaleResolution.scale,r=this.scaleResolution.getAxisLength(),o=this.params.axis,i=l=>25+60*Um(100,700,l),s=Ht(o.tickCount)?o.tickCount:Math.round(r/i(r)),a=jb(n,s,o.tickMinStep),c=o.values?Wb(n,o.values,a):TD(n,a);if(this.ticks==null||!kc(c,this.ticks)){this.ticks=c;const l=BD(n,s,o.format);this.publishData([c.map(u=>({value:u,label:l(u)}))])}}}class rk extends Jh{constructor(e,n){super(n,e.channel)}get label(){return"axisGenomeSource"}async load(){this.publishData([this.genome.chromosomes])}}function Ml(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 Ea extends Jh{constructor(){super(...arguments);ge(this,Jo,new AbortController);ge(this,$o,[0,0]);ge(this,es,[0,0]);ge(this,Qa,0);Gt(this,"params")}setupDebouncing(n){const r=()=>an(n.debounce),o=n.debounceMode;if(o=="domain")this.onDomainChanged=Ml(this.onDomainChanged.bind(this),r,!1);else if(o=="window")this.loadInterval=Ml(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+o)}onDomainChanged(n){var o;Te(this,es,n);const r=an((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,es);Te(this,es,[0,0]),Te(this,$o,[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,$o);(r!==W(this,Qa)||i[0]<s[0]||i[1]>s[1])&&(Te(this,$o,i),Te(this,Qa,r),o(i))}}Jo=new WeakMap,$o=new WeakMap,es=new WeakMap,Qa=new WeakMap;class ik extends Ea{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(()=>W_),Promise.resolve().then(()=>hR),Promise.resolve().then(()=>Ta)]).then(([{Buffer:i},{IndexedFasta:s},{RemoteFile:a}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=i));const c=l=>new a(va(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 ok extends Ea{constructor(n,r){const o={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},i=sl(r.paramMediator,o,s=>{s.includes("url")?de(this,Za,L0).call(this).then(()=>this.reloadLastDomain()):s.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,i.channel);ge(this,Za);ge(this,ts,[]);ge(this,ns);if(this.params=i,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),de(this,Za,L0).call(this)}get label(){return"bigWigSource"}async onDomainChanged(n){await this.initializedPromise;const r=this.scaleResolution.getAxisLength()||700,o=sk(n,r,W(this,ts)),i=Math.max(o*r,5e3);this.callIfWindowsChanged(n,i,s=>this.loadInterval(s,o))}async loadInterval(n,r){const o=.5/r/an(this.params.pixelsPerBin),i=await this.discretizeAndLoad(n,(s,a)=>W(this,ns).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)}}ts=new WeakMap,ns=new WeakMap,Za=new WeakSet,L0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>ox),Promise.resolve().then(()=>Ta)]).then(([{BigWig:o},{RemoteFile:i}])=>{Te(this,ns,new o({filehandle:new i(va(an(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),W(this,ns).getHeader().then(s=>{Te(this,ts,s.zoomLevels.map(a=>a.reductionLevel).reverse()),W(this,ts).push(1),this.setLoadingStatus("complete"),n()}).catch(s=>{this.load(),this.setLoadingStatus("error",`${an(this.params.url)}: ${s.message}`),r(s)})})}),this.initializedPromise};function sk(t,e,n){const r=(t[1]-t[0])/e;return n.find(o=>o<r)??n.at(-1)}class ak extends Ea{constructor(n,r){const o={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},i=sl(r.paramMediator,o,s=>{s.includes("url")?de(this,Xa,O0).call(this).then(()=>this.reloadLastDomain()):s.includes("windowSize")&&this.reloadLastDomain()});super(r,i.channel);ge(this,Xa);Gt(this,"parser");Gt(this,"bbi");Gt(this,"parseLine");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),de(this,Xa,O0).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)}}Xa=new WeakSet,O0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>I9),Promise.resolve().then(()=>ox),Promise.resolve().then(()=>Ta)]).then(([o,{BigBed:i},{RemoteFile:s}])=>{const a=o.default;this.bbi=new i({filehandle:new s(va(an(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=ck(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",`${an(this.params.url)}: ${c.message}`),r(c)})})}),this.initializedPromise};function ck(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 h=e.map(A=>`${JSON.stringify(A.name)}: ${A.isNumeric?"0":"emptyString"}`),d=new Function(`
543
+ };`)},u=h=>{s||l(h);for(let d=0;d<s.length;d++){const[p,b]=s[d],v=c(h,p,b);this._propagate(v)}},f=h=>{l(h),u(h),this.handle=u};this.handle=f,this.beginBatch=h=>{Fm(h)&&(this.handle=f),super.beginBatch(h)}}}class nk extends yt{get behavior(){return Sr}constructor(e){super(e),this.params=e,this.buffer=[]}reset(){this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const e=this.params,n=e.as||["y0","y1"],r=e.sort?rp(e.sort.field,e.sort.order):void 0,o=e.field?Qe(e.field):()=>1,i=e.groupby.map(u=>Qe(u)),s=c3(this.buffer,u=>i.map(f=>f(u)).join()).map(u=>u[1]);let a=u=>!0;if(e.baseField){const u=Qe(e.baseField);a=f=>u(f)!==null}let c,l;switch(e.offset){case"normalize":c=(u,f)=>u/f,l=(u,f)=>Is(u,f);break;case"center":c=(u,f)=>u-f/2,l=(u,f)=>Is(u,f);break;case"information":{const u=Math.log2(e.cardinality??4);c=(f,h)=>f/h,l=(f,h)=>{const p=Is(f,A=>+!a(A)),b=Is(f,h),v=b-p;let y=0;for(let A=0;A<f.length;A++){const S=f[A];if(a(S)){const E=h(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 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 rk extends yt{get behavior(){return On}constructor(e){super(e),this.params=e;const n=Qe(e.field??"sequence"),[r,o]=e.as??["pos","sequence"];this.handle=i=>{const s=Object.assign({},i,{[o]:"",[r]:0}),a=n(i);for(let c=0;c<a.length;c++){const l=Object.assign({},s);l[r]=c,l[o]=a.charAt(c),this._propagate(l)}}}}const Pb={count:t=>t.length,valid:n3,sum:Is,min:Yu,max:Wu,mean:p3,median:g3,variance:r3};class ik extends yt{get behavior(){return On}constructor(e){if(super(e),this.params=e,this.buffer=[],this.ops=[],this.as=[],e.fields){if(e.fields.length!=e.ops.length)throw new Error("Fields and ops must have the same length!");if(e.as&&e.as.length!=e.ops.length)throw new Error('If "as" is defined, "fields" and "as" must have the same length!');e.fields.forEach((n,r)=>{const o=Qe(n),i=Pb[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=>Pb.count(n)),this.as.push("count")}reset(){super.reset(),this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const e=this.params,n=e==null?void 0:e.groupby;if((n==null?void 0:n.length)>0){const r=n.map(i=>Qe(i)),o=Sc(this.buffer,...r);for(const[i,s]of ad(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 ok={aggregate:ik,collect:Rb,coverage:LB,filterScoredLabels:zB,filter:UB,flatten:VB,flattenCompressedExons:WB,flattenDelimited:YB,flattenSequence:rk,formula:ZB,identifier:jf,linearizeGenomicCoordinate:Fb,measureText:XB,pileup:JB,project:$B,regexExtract:ek,regexFold:tk,sample:nb,stack:nk};function sk(t,e){const n=ok[t.type];if(n)return new n(t,e);throw new Error("Unknown transform: "+t.type)}function Lb(t,e=[]){if(!zb(t)&&!Nb(t))return;const n={...t.format};if(n.type??(n.type=Nb(t)&&ck(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 ak(t){var e;return((e=lf(t))==null?void 0:e.responseType)??"text"}function ck(t){var e;if(Array.isArray(t)&&(t=t[0]),t)return(e=t.match(/\.(csv|tsv|json)/))==null?void 0:e[1]}const Ob=t=>typeof t!="object"?lk:uk,lk=t=>({data:t}),uk=t=>t;function Nb(t){return"url"in t}class Ao extends qf{constructor(n){super();Gt(this,"view");this.view=n}get identifier(){}setLoadingStatus(n,r){this.view.context.setDataLoadingStatus(this.view,n,r)}get paramMediator(){return this.view.paramMediator}handle(n){throw new Error("Source does not handle incoming data!")}async load(){}repropagate(){this.load()}}function zb(t){return"values"in t}class fk extends Ao{constructor(n,r){var o;super(r);he(this,Xa);if(this.params=n,typeof n.values=="string"&&!((o=n==null?void 0:n.format)!=null&&o.type))throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}get label(){return"inlineSource"}isTrivial(){const n=this.params.values,r=Array.isArray(n)?n[0]:n;return!!(r&&Object.keys(r).length==0&&r.constructor===Object)}updateDynamicData(n){pe(this,Xa,W0).call(this,n)}loadSynchronously(){pe(this,Xa,W0).call(this,this.params.values)}async load(){this.loadSynchronously()}}Xa=new WeakSet,W0=function(n){let r=[],o=i=>i;if(Array.isArray(n))n.length>0&&(r=n,o=Ob(n[0]));else if(typeof n=="object")r=[n];else if(typeof n=="string")r=uf(n,Lb(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 hk(t){return"url"in t}class dk extends Ao{constructor(n,r){super(r);he(this,Eu);this.params=gl(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=an(this.params.url),r=typeof n=="object"&&"urlsFromFile"in n?await pe(this,Eu,Hv).call(this,n):(Array.isArray(n)?n:[n]).map(c=>Si(this.baseUrl,c)),o=Lb(this.params,r),i=ak(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=uf(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()}}Eu=new WeakSet,Hv=async function(n){const r=Si(this.baseUrl,n.urlsFromFile),o=await fetch(r);if(!o.ok)throw new Error(`Cannot load "${r}": ${o.status} ${o.statusText}`);const i=await o.text();return uf(i,{type:n.type??"tsv"}).map(a=>typeof a=="string"?a:a.url).map(a=>Si(r,a))};function pk(t){return"sequence"in t}class gk extends Ao{constructor(e,n){if(super(n),this.sequence=gl(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=an(this.sequence.as)??"data",n=an(this.sequence.start)??0,r=an(this.sequence.step)??1,o=an(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 cd extends Ao{constructor(n,r){super(n);Gt(this,"initializedPromise",Promise.resolve());if(r){if(r!=="x"&&r!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${r}. Must be either "x" or "y"`)}else throw new Error('No channel has been specified for the lazy data source. Must be either "x" or "y".');if(this.channel=r,this.scaleResolution=this.view.getScaleResolution(r),!this.scaleResolution){const i=[`The lazy data source cannot find a resolved scale for channel "${r}".`];throw this.view instanceof en||i.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(i.join(" "))}const o=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",o),this.view.context.addBroadcastListener("layoutComputed",o)}get genome(){return this.scaleResolution.getGenome()}onDomainChanged(n,r){}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(n){this.reset(),this.beginBatch({type:"file"});for(const r of n)for(const o of r)this._propagate(o);this.complete(),rd(this.view)}}class mk extends cd{constructor(n,r){const o={...n};super(r,o.channel);Gt(this,"ticks",[]);this.params=n}get label(){return"axisTickSource"}async load(){this.ticks=null,this.onDomainChanged()}onDomainChanged(){const n=this.scaleResolution.scale,r=this.scaleResolution.getAxisLength(),o=this.params.axis,i=l=>25+60*Jm(100,700,l),s=Ht(o.tickCount)?o.tickCount:Math.round(r/i(r)),a=ib(n,s,o.tickMinStep),c=o.values?ob(n,o.values,a):GD(n,a);if(this.ticks==null||!zc(c,this.ticks)){this.ticks=c;const l=VD(n,s,o.format);this.publishData([c.map(u=>({value:u,label:l(u)}))])}}}class yk extends cd{constructor(e,n){super(n,e.channel)}get label(){return"axisGenomeSource"}async load(){this.publishData([this.genome.chromosomes])}}function Vl(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 Ia extends cd{constructor(){super(...arguments);he(this,$o,new AbortController);he(this,es,[0,0]);he(this,ts,[0,0]);he(this,Ka,0);Gt(this,"params")}setupDebouncing(n){const r=()=>an(n.debounce),o=n.debounceMode;if(o=="domain")this.onDomainChanged=Vl(this.onDomainChanged.bind(this),r,!1);else if(o=="window")this.loadInterval=Vl(this.loadInterval.bind(this),r,!1);else throw new Error("Invalid debounceMode: "+o)}onDomainChanged(n){var o;Ae(this,ts,n);const r=an((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=q(this,ts);Ae(this,ts,[0,0]),Ae(this,es,[0,0]),this.onDomainChanged(n)}async loadInterval(n){}async discretizeAndLoad(n,r){q(this,$o).abort(),this.setLoadingStatus("loading"),Ae(this,$o,new AbortController);const o=q(this,$o).signal,i=this.genome.continuousToDiscreteChromosomeIntervals(n);try{const s=await Promise.all(i.map(async a=>r(a,o)));if(!o.aborted)return this.setLoadingStatus("complete"),s}catch(s){if(!o.aborted)throw this.setLoadingStatus("error",s.message),s}}callIfWindowsChanged(n,r,o){const i=[Math.max(Math.floor(n[0]/r)*r,0),Math.min(Math.ceil(n[1]/r)*r,this.genome.totalSize)],s=q(this,es);(r!==q(this,Ka)||i[0]<s[0]||i[1]>s[1])&&(Ae(this,es,i),Ae(this,Ka,r),o(i))}}$o=new WeakMap,es=new WeakMap,ts=new WeakMap,Ka=new WeakMap;class bk extends Ia{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(()=>sR),Promise.resolve().then(()=>IR),Promise.resolve().then(()=>ka)]).then(([{Buffer:i},{IndexedFasta:s},{RemoteFile:a}])=>{typeof window<"u"&&(window.Buffer??(window.Buffer=i));const c=l=>new a(Sa(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 wk extends Ia{constructor(n,r){const o={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...n},i=gl(r.paramMediator,o,s=>{s.includes("url")?pe(this,Ja,Y0).call(this).then(()=>this.reloadLastDomain()):s.includes("pixelsPerBin")&&this.reloadLastDomain()});super(r,i.channel);he(this,Ja);he(this,ns,[]);he(this,rs);if(this.params=i,!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),pe(this,Ja,Y0).call(this)}get label(){return"bigWigSource"}async onDomainChanged(n){await this.initializedPromise;const r=this.scaleResolution.getAxisLength()||700,o=xk(n,r,q(this,ns)),i=Math.max(o*r,5e3);this.callIfWindowsChanged(n,i,s=>this.loadInterval(s,o))}async loadInterval(n,r){const o=.5/r/an(this.params.pixelsPerBin),i=await this.discretizeAndLoad(n,(s,a)=>q(this,rs).getFeatures(s.chrom,s.startPos,s.endPos,{scale:o,signal:a}).then(c=>c.map(l=>({chrom:s.chrom,start:l.start,end:l.end,score:l.score}))));i&&this.publishData(i)}}ns=new WeakMap,rs=new WeakMap,Ja=new WeakSet,Y0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>yx),Promise.resolve().then(()=>ka)]).then(([{BigWig:o},{RemoteFile:i}])=>{Ae(this,rs,new o({filehandle:new i(Sa(an(this.params.url),this.view.getBaseUrl()))})),this.setLoadingStatus("loading"),q(this,rs).getHeader().then(s=>{Ae(this,ns,s.zoomLevels.map(a=>a.reductionLevel).reverse()),q(this,ns).push(1),this.setLoadingStatus("complete"),n()}).catch(s=>{this.load(),this.setLoadingStatus("error",`${an(this.params.url)}: ${s.message}`),r(s)})})}),this.initializedPromise};function xk(t,e,n){const r=(t[1]-t[0])/e;return n.find(o=>o<r)??n.at(-1)}class vk extends Ia{constructor(n,r){const o={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...n},i=gl(r.paramMediator,o,s=>{s.includes("url")?pe(this,$a,Q0).call(this).then(()=>this.reloadLastDomain()):s.includes("windowSize")&&this.reloadLastDomain()});super(r,i.channel);he(this,$a);Gt(this,"parser");Gt(this,"bbi");Gt(this,"parseLine");if(this.params=i,!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),pe(this,$a,Q0).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)}}$a=new WeakSet,Q0=function(){return this.initializedPromise=new Promise((n,r)=>{Promise.all([Promise.resolve().then(()=>U9),Promise.resolve().then(()=>yx),Promise.resolve().then(()=>ka)]).then(([o,{BigBed:i},{RemoteFile:s}])=>{const a=o.default;this.bbi=new i({filehandle:new s(Sa(an(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=Ak(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",`${an(this.params.url)}: ${c.message}`),r(c)})})}),this.initializedPromise};function Ak(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 h=e.map(A=>`${JSON.stringify(A.name)}: ${A.isNumeric?"0":"emptyString"}`),d=new Function(`
544
544
  const emptyString = "";
545
545
  return function makeTemplate(chrom, chromStart, chromEnd) {
546
546
  return {
@@ -550,21 +550,21 @@ chrM 16299`};function XD(t){if(!(t in $b))throw new Error(`Unknown assembly: ${t
550
550
  ${h.join(`,
551
551
  `)}
552
552
  }
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)}),y=lk(p,50).map((A,S)=>Function("parseInt","parseString",`return function parseFieldChunk${S}(d) {
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=Ek(p,50).map((A,S)=>Function("parseInt","parseString",`return function parseFieldChunk${S}(d) {
554
554
  ${A.join(`
555
555
  `)}
556
- }`)(f,u));function v(A){r=A,o=A.length,n=0}function b(A,S,E,I){v(I),i=d(A,S,E);for(const _ of y)_(i);return i}return b}function lk(t,e){return Array.from({length:Math.ceil(t.length/e)},(n,r)=>t.slice(r*e,r*e+e))}class uk extends Ea{constructor(n,r){const o={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,o.channel);ge(this,Oi);Gt(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(()=>j9),Promise.resolve().then(()=>Ta)]).then(([{BamFile:s},{RemoteFile:a}])=>{const c=l=>new a(va(l,this.view.getBaseUrl()));Te(this,Oi,new s({bamFilehandle:c(this.params.url),baiFilehandle:c(this.params.indexUrl??this.params.url+".bai")})),W(this,Oi).getHeader().then(l=>{var h,d;const u=this.genome.hasChrPrefix(),f=(d=(h=W(this,Oi).indexToChr)==null?void 0:h[0])==null?void 0:d.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,Oi).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)}}Oi=new WeakMap;class Ty extends Ea{constructor(n,r){const o={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",addChrPrefix:!1,...n};super(r,o.channel);ge(this,rs);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(()=>tM),Promise.resolve().then(()=>Ta)]).then(async([{TabixIndexedFile:s},{RemoteFile:a}])=>{const c=u=>new a(va(u,this.view.getBaseUrl()));Te(this,rs,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,rs).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,rs).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[]}}rs=new WeakMap;class fk extends Ty{constructor(){super(...arguments);ge(this,Ka)}get label(){return"gff3Source"}async _handleHeader(n){Te(this,Ka,(await Promise.resolve().then(()=>xM)).default)}_parseFeatures(n){var o;return(o=W(this,Ka))==null?void 0:o.parseStringSync(n.join(`
557
- `),{parseSequences:!1})}}Ka=new WeakMap;class hk extends Ty{constructor(){super(...arguments);ge(this,Ja)}get label(){return"vcfSource"}async _handleHeader(n){const r=(await Promise.resolve().then(()=>EM)).default;Te(this,Ja,new r({header:n}))}_parseFeatures(n){return n.map(r=>{const o=W(this,Ja).parseLine(r);return delete o.GENOTYPES,o.SAMPLES=o.SAMPLES(),o})}}Ja=new WeakMap;function dk(t,e){if(Iy(t))return new KB(t,e);if(JB(t))return new $B(t,e);if(ek(t))return new tk(t,e);if(pk(t))return Ek(t.lazy,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function pk(t){return"lazy"in t}function gk(t){return(t==null?void 0:t.type)=="axisTicks"}function mk(t){return(t==null?void 0:t.type)=="axisGenome"}function bk(t){return(t==null?void 0:t.type)=="indexedFasta"}function yk(t){return(t==null?void 0:t.type)=="bigwig"}function wk(t){return(t==null?void 0:t.type)=="bigbed"}function xk(t){return(t==null?void 0:t.type)=="bam"}function vk(t){return(t==null?void 0:t.type)=="gff3"}function Ak(t){return(t==null?void 0:t.type)=="vcf"}function Ek(t,e){if(gk(t))return new nk(t,e);if(mk(t))return new rk(t,e);if(bk(t))return new ik(t,e);if(yk(t))return new ok(t,e);if(wk(t))return new ak(t,e);if(xk(t))return new uk(t,e);if(vk(t))return new fk(t,e);if(Ak(t))return new hk(t,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function Sk(t){const e=Dy(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 Dy(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 Pl extends bt{constructor(){super({type:"clone"});ge(this,is);ge(this,$a,n=>n);const n=r=>{const o=Dy(r);(!W(this,is)||!kc(o,W(this,is)))&&(Te(this,is,o),Te(this,$a,Sk(r)));const i=W(this,$a);this.handle=s=>this._propagate(i(s)),this.handle(r)};this.handle=n,this.beginBatch=r=>{vm(r)&&(this.handle=n),super.beginBatch(r)}}get behavior(){return Pn}}is=new WeakMap,$a=new WeakMap;function Ck(t){return"name"in t}class By extends vo{constructor(n,r,o){super(r);ge(this,ec);this.provider=o,this.params=n}get identifier(){return this.params.name}get label(){return"namedSource"}updateDynamicData(n){Te(this,ec,n),this.loadSynchronously()}loadSynchronously(){const n=W(this,ec)??this.provider(this.params.name)??[];let r=o=>o;if(Array.isArray(n))n.length>0&&(r=Sy(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()}}ec=new WeakMap;class ky{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 Ik(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 _y(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=_y(s,e,n);if(a==="stop")return a}return(i=e.postOrder)==null?void 0:i.call(e,t)}function Tk(t,e){return _y(t,e,n=>n.children)}function Dk(t,e){const n=[],r=[];let o;const i=e??new ky,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=WB(y,p)}catch(b){throw console.warn(b),new Error(`Cannot initialize "${y.type}" transform: ${b}`)}v.behavior&Er&&c(new Pl),c(v)}}function u(){return n.findLastIndex(d=>d instanceof Pf)>n.findLastIndex(d=>d instanceof vo)}const f=d=>{if(d.spec.data){const p=Ck(d.spec.data)?new By(d.spec.data,d,d.context.getNamedDataFromProvider):dk(d.spec.data,d);o=p,n.push(p),i.addDataSource(p,d)}if(d.spec.transform&&l(d.spec.transform,d),d instanceof en){if(!o)throw new Error(`A unit view (${d.getPathString()}) has no (inherited) data source`);const p=Bk(d);if(p){s.push(p.rewrite);for(const v of p.transforms)c(v)}d.mark.isPickingParticipant()&&!u()&&(c(new Pl),c(new Pf({type:"identifier"})));const y=new wy({type:"collect",groupby:d.getFacetFields(),sort:kk(d,p==null?void 0:p.rewrittenEncoding)});a(y),i.addCollector(y,d)}},h=Ik(t.getDescendants(),d=>d.dataParent);for(const d of h)Tk(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 Bk(t){var i;const e=[],n={},r=[];for(const[s,a]of Object.entries(t.getEncoding())){const c=s;na(c)&&$m(a)&&r.push({channel:c,chromPosDef:a})}const o=gc(r,s=>gi(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 Pl),e.push(new xy({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},XT(t.mark,"encoding")}}:void 0}function kk(t,e){var r;const n={...t.getEncoding(),...e}.x;if(Zt(n)&&(r=t.getScaleResolution("x"))!=null&&r.isZoomable()){if(Cr(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!ea(n)){if(ta(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function Ry(t,e=void 0){if(t.parent!==e)return!1;for(const n of t.children)if(!Ry(n,t))return!1;return!0}function $h(t,e=!1){if(t.behavior&Ff&&(e=!0),t instanceof Pl)if(e)e=!1;else{const n=t.children[0];t.excise(),n&&$h(n,e);return}t.behavior&Pn&&(e=!1);for(let n=0,r=t.children.length;n<r;n++)$h(t.children[n],e||r>1)}function _k(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 Rk(t){if($h(t),!Ry(t))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function Fk(t){_k(t);for(const e of t.dataSources)Rk(e)}function Mk(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 Pk(t){for(const e of pi){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=Ei(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=Ei(ey(r.url),i.baseUrl),i;throw new Error(`The imported spec "${o}" is not a view spec: ${JSON.stringify(t)}`)}function Ok(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 tr(t){return()=>t}const Tn=class Tn{static create(e,n,r,o){return new Tn(tr(e),tr(n),tr(r),tr(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"?tr(o):typeof o=="function"?o:this._passThrough(r)};return new Tn(n("x"),n("y"),n("width"),n("height"))}translate(e,n){return e===0&&n===0?this:new Tn(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 Tn(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 Tn(()=>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 Tn(()=>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 Tn(tr(this.x),tr(this.y),tr(this.width),tr(this.height))}containsPoint(e,n){return e>=this.x&&e<this.x2&&n>=this.y&&n<this.y2}normalizePoint(e,n,r=!1){const o={x:(e-this.x)/this.width,y:(n-this.y)/this.height};return r&&(o.y=1-o.y),o}denormalizePoint(e,n,r=!1){return r&&(n=1-n),{x:this.x+e*this.width,y:this.y+n*this.height}}toString(){return`Rectangle: x: ${this.x}, y: ${this.y}, width: ${this.width}, height: ${this.height}`}toRoundedString(){return`Rectangle: x: ${Math.round(this.x)}, y: ${Math.round(this.y)}, width: ${Math.round(this.width)}, height: ${Math.round(this.height)}`}};Gt(Tn,"ZERO",Tn.create(0,0,0,0));let Hn=Tn;class Fy{constructor(e){this.globalOptions=e}pushView(e,n){}popView(e){}renderMark(e,n){}}class My extends Fy{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=gc(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 Nk extends Fy{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 zk{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}get mouseEvent(){if(this.uiEvent instanceof MouseEvent)return this.uiEvent;throw new Error("Not a MouseEvent!")}}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 Uk=t=>new Promise(e=>setTimeout(e,t));function Gk(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"):Uk(t.delay).then(r):r()}class Hk{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 Gk({requestAnimationFrame:n=>this.requestTransition(n),...e})}}function ed(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 Vk{constructor(e){this.genomes=new Map,this.baseUrl=e}async initialize(e){const n=new JD(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 qk="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAEFzklEQVR4AezcRXjr2BnG8b8SQ+gJOiA5d1NmZuZVuU133Zf3++6XxW27Ku7LzIzDrMgByxQGaxwfWVFGMly088z7e76Zi5bu6nvP+Y4sKwgC2n4KP4QfgEcvAVdZGHfuM++Fj8HHwUZERO6aMTocsMGhl4C7bbrzr7C5N0REFAC30nct7qwhdH8REQXAfKf7FrjTLPpJ7EPuMhERycB36XD+hX0/DuzSlsnw3OfyilcwAA/vn/yzQQMoUHg9r59hhn7Oz/njH9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wGAyGrMnloxAhPhSPBw4n7lYjV2tZFBWhCKC+Xsv/x5xuLy1FtsxlRwAgF05BBevBYDAYTAqojETZc4m25xLRKDMzSAC2b6ekhCeS88sCoOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",jk={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 Wn([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:Rf(vy),texture:e?this._createTextureNow(qk):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(e,n="normal",r="regular"){if(rt(r)&&(r=jk[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=Qk(r,n),i=this.fontRepository+Py(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=>Rf(r)),this._fontPromises.set(e,n)),n}_loadMetadata(e){const n=Py(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=>Yk(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)=>{Vs(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=Vs(n,{src:e,min:n.LINEAR},(a,c,l)=>{a?s(a):i(c)})});return this._promises.push(o),r}}function Py(t){return t.toLowerCase().replaceAll(/[^\w]/g,"")}function Yk(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 Qk(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 Zk(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 Xk{constructor(e,n){this.animator=e,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=ed(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=co(this.targetValue+e-this.lastValue,-this.maxDistance,this.maxDistance);this.targetValue=this.lastValue+r,this.smoother({x:this.targetValue})}}function Kk(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 Ly=new Map,Jk={Organism:"Homo sapiens"};async function $k(t,e,n={}){const r=t.symbol,o={...Jk,...n,GENE:r};let i=Ly.get(r)??await n_(o);return i?(Ly.set(r,i),ot`
556
+ }`)(f,u));function v(A){r=A,o=A.length,n=0}function y(A,S,E,I){v(I),i=d(A,S,E);for(const _ of b)_(i);return i}return y}function Ek(t,e){return Array.from({length:Math.ceil(t.length/e)},(n,r)=>t.slice(r*e,r*e+e))}class Sk extends Ia{constructor(n,r){const o={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...n};super(r,o.channel);he(this,Ni);Gt(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(()=>oM),Promise.resolve().then(()=>ka)]).then(([{BamFile:s},{RemoteFile:a}])=>{const c=l=>new a(Sa(l,this.view.getBaseUrl()));Ae(this,Ni,new s({bamFilehandle:c(this.params.url),baiFilehandle:c(this.params.indexUrl??this.params.url+".bai")})),q(this,Ni).getHeader().then(l=>{var h,d;const u=this.genome.hasChrPrefix(),f=(d=(h=q(this,Ni).indexToChr)==null?void 0:h[0])==null?void 0:d.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)=>q(this,Ni).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)}}Ni=new WeakMap;class Ub extends Ia{constructor(n,r){const o={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",addChrPrefix:!1,...n};super(r,o.channel);he(this,is);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(()=>gM),Promise.resolve().then(()=>ka)]).then(async([{TabixIndexedFile:s},{RemoteFile:a}])=>{const c=u=>new a(Sa(u,this.view.getBaseUrl()));Ae(this,is,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 q(this,is).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 q(this,is).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[]}}is=new WeakMap;class Ck extends Ub{constructor(){super(...arguments);he(this,ec)}get label(){return"gff3Source"}async _handleHeader(n){Ae(this,ec,(await Promise.resolve().then(()=>MM)).default)}_parseFeatures(n){var o;return(o=q(this,ec))==null?void 0:o.parseStringSync(n.join(`
557
+ `),{parseSequences:!1})}}ec=new WeakMap;class Ik extends Ub{constructor(){super(...arguments);he(this,tc)}get label(){return"vcfSource"}async _handleHeader(n){const r=(await Promise.resolve().then(()=>OM)).default;Ae(this,tc,new r({header:n}))}_parseFeatures(n){return n.map(r=>{const o=q(this,tc).parseLine(r);return delete o.GENOTYPES,o.SAMPLES=o.SAMPLES(),o})}}tc=new WeakMap;function Tk(t,e){if(zb(t))return new fk(t,e);if(hk(t))return new dk(t,e);if(pk(t))return new gk(t,e);if(Dk(t))return Ok(t.lazy,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function Dk(t){return"lazy"in t}function Bk(t){return(t==null?void 0:t.type)=="axisTicks"}function kk(t){return(t==null?void 0:t.type)=="axisGenome"}function _k(t){return(t==null?void 0:t.type)=="indexedFasta"}function Rk(t){return(t==null?void 0:t.type)=="bigwig"}function Fk(t){return(t==null?void 0:t.type)=="bigbed"}function Mk(t){return(t==null?void 0:t.type)=="bam"}function Pk(t){return(t==null?void 0:t.type)=="gff3"}function Lk(t){return(t==null?void 0:t.type)=="vcf"}function Ok(t,e){if(Bk(t))return new mk(t,e);if(kk(t))return new yk(t,e);if(_k(t))return new bk(t,e);if(Rk(t))return new wk(t,e);if(Fk(t))return new vk(t,e);if(Mk(t))return new Sk(t,e);if(Pk(t))return new Ck(t,e);if(Lk(t))return new Ik(t,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function Nk(t){const e=Gb(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 Gb(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 ql extends yt{constructor(){super({type:"clone"});he(this,os);he(this,nc,n=>n);const n=r=>{const o=Gb(r);(!q(this,os)||!zc(o,q(this,os)))&&(Ae(this,os,o),Ae(this,nc,Nk(r)));const i=q(this,nc);this.handle=s=>this._propagate(i(s)),this.handle(r)};this.handle=n,this.beginBatch=r=>{Fm(r)&&(this.handle=n),super.beginBatch(r)}}get behavior(){return On}}os=new WeakMap,nc=new WeakMap;function zk(t){return"name"in t}class Hb extends Ao{constructor(n,r,o){super(r);he(this,rc);this.provider=o,this.params=n}get identifier(){return this.params.name}get label(){return"namedSource"}updateDynamicData(n){Ae(this,rc,n),this.loadSynchronously()}loadSynchronously(){const n=q(this,rc)??this.provider(this.params.name)??[];let r=o=>o;if(Array.isArray(n))n.length>0&&(r=Ob(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()}}rc=new WeakMap;class Vb{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 Hb&&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 Uk(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 qb(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=qb(s,e,n);if(a==="stop")return a}return(i=e.postOrder)==null?void 0:i.call(e,t)}function Gk(t,e){return qb(t,e,n=>n.children)}function Hk(t,e){const n=[],r=[];let o;const i=e??new Vb,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 b of d){let v;try{v=sk(b,p)}catch(y){throw console.warn(y),new Error(`Cannot initialize "${b.type}" transform: ${y}`)}v.behavior&Sr&&c(new ql),c(v)}}function u(){return n.findLastIndex(d=>d instanceof jf)>n.findLastIndex(d=>d instanceof Ao)}const f=d=>{if(d.spec.data){const p=zk(d.spec.data)?new Hb(d.spec.data,d,d.context.getNamedDataFromProvider):Tk(d.spec.data,d);o=p,n.push(p),i.addDataSource(p,d)}if(d.spec.transform&&l(d.spec.transform,d),d instanceof en){if(!o)throw new Error(`A unit view (${d.getPathString()}) has no (inherited) data source`);const p=Vk(d);if(p){s.push(p.rewrite);for(const v of p.transforms)c(v)}d.mark.isPickingParticipant()&&!u()&&(c(new ql),c(new jf({type:"identifier"})));const b=new Rb({type:"collect",groupby:d.getFacetFields(),sort:qk(d,p==null?void 0:p.rewrittenEncoding)});a(b),i.addCollector(b,d)}},h=Uk(t.getDescendants(),d=>d.dataParent);for(const d of h)Gk(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 Vk(t){var i;const e=[],n={},r=[];for(const[s,a]of Object.entries(t.getEncoding())){const c=s;oa(c)&&h1(a)&&r.push({channel:c,chromPosDef:a})}const o=Sc(r,s=>mi(s.channel),s=>s.chromPosDef.chrom);for(const[s,a]of o.entries())for(const[c,l]of a.entries()){const u=[],f=[],h=[];for(const{channel:d,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[d])??t.getEncoding()[d]??{},field:v};delete y.chrom,delete y.pos,!y.type&&p.type&&(y.type=p.type),n[d]=y,u.push(p.pos),h.push(p.offset??0),f.push(v)}e.push(new ql),e.push(new Fb({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},uD(t.mark,"encoding")}}:void 0}function qk(t,e){var r;const n={...t.getEncoding(),...e}.x;if($t(n)&&(r=t.getScaleResolution("x"))!=null&&r.isZoomable()){if(Ir(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!ra(n)){if(ia(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function jb(t,e=void 0){if(t.parent!==e)return!1;for(const n of t.children)if(!jb(n,t))return!1;return!0}function ld(t,e=!1){if(t.behavior&Vf&&(e=!0),t instanceof ql)if(e)e=!1;else{const n=t.children[0];t.excise(),n&&ld(n,e);return}t.behavior&On&&(e=!1);for(let n=0,r=t.children.length;n<r;n++)ld(t.children[n],e||r>1)}function jk(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 Wk(t){if(ld(t),!jb(t))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function Yk(t){jk(t);for(const e of t.dataSources)Wk(e)}function Qk(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 Zk(t){for(const e of gi){const n=t.getScaleResolution(e);n&&!n.name&&n.isZoomable()&&(n.name=`${e}_at_root`)}}async function Xk(t,e,n){const r=t.import;if(!("url"in r))throw new Error("Not an url import: "+JSON.stringify(r));const o=Si(e,r.url);let i;try{const s=await fetch(o);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);i=await s.json()}catch(s){throw new Error(`Could not load imported view spec: ${o}. Reason: ${s.message}`)}if(n.isViewSpec(i))return i.baseUrl=Si(db(r.url),i.baseUrl),i;throw new Error(`The imported spec "${o}" is not a view spec: ${JSON.stringify(t)}`)}function Kk(t){const e=t.getSize(),n=t.getPadding(),r=(o,i)=>o.grow>0?void 0:o.px+i;return{width:r(e.width,n.horizontalTotal),height:r(e.height,n.verticalTotal)}}function nr(t){return()=>t}const Dn=class Dn{static create(e,n,r,o){return new Dn(nr(e),nr(n),nr(r),nr(o))}_offset(e,n){const r=this["_"+e];if(n===0)return r;switch(typeof n){case"number":return()=>r()+n;case"function":return()=>r()+n();default:throw new Error("Not a number of function")}}_passThrough(e){return this._offset(e,0)}constructor(e,n,r,o){this._x=e,this._y=n,this._width=r,this._height=o}get x(){return this._x()}get y(){return this._y()}get width(){return this._width()}get height(){return this._height()}get x2(){return this._x()+this._width()}get y2(){return this._y()+this._height()}equals(e){return e?this===e||this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height:!1}modify(e){if(!Object.keys(e).length)return this;const n=r=>{const o=e[r];return typeof o=="number"?nr(o):typeof o=="function"?o:this._passThrough(r)};return new Dn(n("x"),n("y"),n("width"),n("height"))}translate(e,n){return e===0&&n===0?this:new Dn(this._offset("x",e),this._offset("y",n),this._passThrough("width"),this._passThrough("height"))}translateBy(e){return this.translate(e.x,e.y)}expand(e,n=1){return e.left==0&&e.top==0&&e.right==0&&e.bottom==0?this:new Dn(e.left?this._offset("x",-e.left*n):this._passThrough("x"),e.top?this._offset("y",-e.top*n):this._passThrough("y"),e.width?this._offset("width",e.width*n):this._passThrough("width"),e.height?this._offset("height",e.height*n):this._passThrough("height"))}shrink(e){return this.expand(e,-1)}intersect(e){return this===e||e==null?this:new Dn(()=>Math.max(this.x,e.x),()=>Math.max(this.y,e.y),()=>Math.min(this.x2,e.x2)-Math.max(this.x,e.x),()=>Math.min(this.y2,e.y2)-Math.max(this.y,e.y))}union(e){return this===e||e==null?this:new Dn(()=>Math.min(this.x,e.x),()=>Math.min(this.y,e.y),()=>Math.max(this.x2,e.x2)-Math.min(this.x,e.x),()=>Math.max(this.y2,e.y2)-Math.min(this.y,e.y))}isDefined(){return this.width>=0&&this.height>=0}flatten(){return new Dn(nr(this.x),nr(this.y),nr(this.width),nr(this.height))}containsPoint(e,n){return e>=this.x&&e<this.x2&&n>=this.y&&n<this.y2}normalizePoint(e,n,r=!1){const o={x:(e-this.x)/this.width,y:(n-this.y)/this.height};return r&&(o.y=1-o.y),o}denormalizePoint(e,n,r=!1){return r&&(n=1-n),{x:this.x+e*this.width,y:this.y+n*this.height}}toString(){return`Rectangle: x: ${this.x}, y: ${this.y}, width: ${this.width}, height: ${this.height}`}toRoundedString(){return`Rectangle: x: ${Math.round(this.x)}, y: ${Math.round(this.y)}, width: ${Math.round(this.width)}, height: ${Math.round(this.height)}`}};Gt(Dn,"ZERO",Dn.create(0,0,0,0));let Sn=Dn;class Wb{constructor(e){this.globalOptions=e}pushView(e,n){}popView(e){}renderMark(e,n){}getDevicePixelRatio(){return 1}}class ud extends Wb{constructor(n,r){super(n);he(this,Su);he(this,ic,[0,0,0,0]);he(this,Bn);he(this,oc,[]);he(this,ss);he(this,sc);he(this,ac,new Set);he(this,cc);he(this,as,1);he(this,lc,{width:0,height:0});if(Ae(this,sc,r.webGLHelper),Ae(this,ss,r.framebufferInfo),Ae(this,as,r.devicePixelRatio),Ae(this,lc,r.canvasSize),r.clearColor){const o=kr(r.clearColor).rgb();Ae(this,ic,[o.r/255,o.g/255,o.b/255,o.opacity])}}getDevicePixelRatio(){return q(this,as)}pushView(n,r){q(this,ac).add(n),Ae(this,cc,r)}renderMark(n,r){if(this.globalOptions.picking&&!n.isPickingParticipant())return;const o=n.render(r);o&&q(this,oc).push({mark:n,callback:o,coords:q(this,cc),clipRect:r.clipRect})}render(){if(q(this,Bn)||pe(this,Su,Vv).call(this),q(this,Bn).length==0)return;const n=q(this,sc).gl,r=q(this,ss);r?(n.bindFramebuffer(n.FRAMEBUFFER,r.framebuffer),n.viewport(0,0,r.width,r.height)):n.viewport(0,0,n.drawingBufferWidth,n.drawingBufferHeight),n.disable(n.SCISSOR_TEST),n.clearColor(...q(this,ic)),n.clear(n.COLOR_BUFFER_BIT);for(const o of q(this,ac))o.onBeforeRender();for(const o of q(this,Bn))o();q(this,ss)&&n.bindFramebuffer(n.FRAMEBUFFER,null)}}ic=new WeakMap,Bn=new WeakMap,oc=new WeakMap,ss=new WeakMap,sc=new WeakMap,ac=new WeakMap,cc=new WeakMap,as=new WeakMap,lc=new WeakMap,Su=new WeakSet,Vv=function(){Ae(this,Bn,[]);let n=!0,r=!0;const o=a=>()=>{n&&a()},i=a=>()=>{n&&r&&a()},s=Sc(q(this,oc).reverse(),a=>a.mark);for(const[a,c]of[...s.entries()].reverse()){if(!a.isReady())continue;q(this,Bn).push(()=>{n=a.unitView.getEffectiveOpacity()>0}),q(this,Bn).push(...a.prepareRender(this.globalOptions).map(u=>o(u)));let l;for(const u of c){const f=u.coords;f.equals(l)||q(this,Bn).push(o(()=>{r=a.setViewport(q(this,lc),q(this,as),f,u.clipRect)})),q(this,Bn).push(i(u.callback)),l=u.coords}}};class Jk extends Wb{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 $k{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}get mouseEvent(){if(this.uiEvent instanceof MouseEvent)return this.uiEvent;throw new Error("Not a MouseEvent!")}}class Xt{static fromMouseEvent(e){return new Xt(e.clientX,e.clientY)}constructor(e,n){this.x=e,this.y=n}subtract(e){return new Xt(this.x-e.x,this.y-e.y)}add(e){return new Xt(this.x-e.x,this.y-e.y)}multiply(e){return new Xt(this.x*e,this.y*e)}get length(){return Math.sqrt(this.x**2+this.y**2)}equals(e){return e?e===this||e.x===this.x&&e.y===this.y:!1}}const e_=t=>new Promise(e=>setTimeout(e,t));function t_(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),h=b=>b*(l-c)+c,d=b=>Math.max(0,Math.min(1,b)),p=b=>{n!=null&&n.aborted?i("aborted"):(t.onUpdate(h(u(d(f(b))))),b<a?e(p):(t.onUpdate(h(u(1))),o()))};e(p)});return t.delay?n!=null&&n.aborted?Promise.reject("aborted"):e_(t.delay).then(r):r()}class n_{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 t_({requestAnimationFrame:n=>this.requestTransition(n),...e})}}function fd(t,e,n,r,o){let i=0,s=!0,a=structuredClone(o),c=a;function l(h,d,p,b){return d+(h-d)*Math.pow(2,-p/b)}function u(h){if(s)return;const d=h-i;i=h;for(const b of Object.keys(c))a[b]=l(a[b],c[b],d,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(h){c=h,s&&(s=!1,i=+document.timeline.currentTime,u(i))}return f.stop=()=>{s=!0},f}class r_{constructor(e){this.genomes=new Map,this.baseUrl=e}async initialize(e){const n=new hB(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 i_="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+JiOgMILYJcDpNuFQKq5+neMrFbRXLnI+fu7im6KlSCS9fqXDBccLb31siIgqARBOu1SiV8DzKZbpr0nRxWxnQqs8tv51lol/2Xf63qlS6euOpKYZIREQ7ANOHTYdu1SDL/wMOlguFlxW+Hf8dujMX9ryrNx4KEREFgGXd9BQoWu97S0vLbU36T4EOD6NwGf78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u4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",o_={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class s_{constructor(e){this._webGLHelper=e,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new Yn([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:Hf(Mb),texture:e?this._createTextureNow(i_):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(e,n="normal",r="regular"){if(rt(r)&&(r=o_[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=c_(r,n),i=this.fontRepository+Yb(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=>Hf(r)),this._fontPromises.set(e,n)),n}_loadMetadata(e){const n=Yb(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=>a_(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)=>{Ws(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=Ws(n,{src:e,min:n.LINEAR},(a,c,l)=>{a?s(a):i(c)})});return this._promises.push(o),r}}function Yb(t){return t.toLowerCase().replaceAll(/[^\w]/g,"")}function a_(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 c_(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 l_(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 u_{constructor(e,n){this.animator=e,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=fd(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=sp([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 f_(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 Qb=new Map,h_={Organism:"Homo sapiens"};async function d_(t,e,n={}){const r=t.symbol,o={...h_,...n,GENE:r};let i=Qb.get(r)??await m_(o);return i?(Qb.set(r,i),ot`
561
561
  <div class="title">
562
562
  <strong>${i.name}</strong>
563
563
  ${i.description}
564
564
  </div>
565
565
  <p class="summary">${i.summary}</p>
566
566
  <p class="source">Source: NCBI RefSeq Gene</p>
567
- `):null}async function e_(t){const e={mode:"cors"},n=new URL("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi");n.search=new URLSearchParams({db:"gene",term:r_(t),sort:"relevance",retmax:"1",retmode:"json"}).toString();const o=(await fetch(n.toString(),e).then(i=>i.json())).esearchresult.idlist[0];if(o){const i=new URL("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi");return i.search=new URLSearchParams({db:"gene",id:o,retmode:"json"}).toString(),(await fetch(i.toString(),e).then(c=>c.json())).result[o]}else return null}const t_=Ml(e_,500);function n_(t){return t_(t)}function r_(t){return Object.entries(t).filter(([e,n])=>n&&n.length>0).map(([e,n])=>`("${n}"[${e}])`).join(" AND ")}const i_=Dt(".4~r"),o_=Dt(".4~e");function Oy(t){return t==null?ot` <span class="na">NA</span> `:rt(t)?t.substring(0,30):Number.isInteger(t)?""+t:Ht(t)?Math.abs(t)>Math.pow(10,8)||Math.abs(t)<Math.pow(10,-8)?o_(t):i_(t):us(t)?t?"True":"False":_t(t)?ot`${t.map((e,n)=>[Oy(e),n<t.length-1?", ":pt])}`:"?"+typeof t+" "+t}async function s_(t,e,n){const r=(l,u)=>{var f;for(const[h,d]of Object.entries(e.encoders))if((f=d==null?void 0:d.dataAccessor)!=null&&f.fields.includes(l))switch(h){case"color":case"fill":case"stroke":return ot`
567
+ `):null}async function p_(t){const e={mode:"cors"},n=new URL("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi");n.search=new URLSearchParams({db:"gene",term:y_(t),sort:"relevance",retmax:"1",retmode:"json"}).toString();const o=(await fetch(n.toString(),e).then(i=>i.json())).esearchresult.idlist[0];if(o){const i=new URL("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi");return i.search=new URLSearchParams({db:"gene",id:o,retmode:"json"}).toString(),(await fetch(i.toString(),e).then(c=>c.json())).result[o]}else return null}const g_=Vl(p_,500);function m_(t){return g_(t)}function y_(t){return Object.entries(t).filter(([e,n])=>n&&n.length>0).map(([e,n])=>`("${n}"[${e}])`).join(" AND ")}const b_=Dt(".4~r"),w_=Dt(".4~e");function Zb(t){return t==null?ot` <span class="na">NA</span> `:rt(t)?t.substring(0,30):Number.isInteger(t)?""+t:Ht(t)?Math.abs(t)>Math.pow(10,8)||Math.abs(t)<Math.pow(10,-8)?w_(t):b_(t):ds(t)?t?"True":"False":_t(t)?ot`${t.map((e,n)=>[Zb(e),n<t.length-1?", ":pt])}`:"?"+typeof t+" "+t}async function x_(t,e,n){const r=(l,u)=>{var f;for(const[h,d]of Object.entries(e.encoders))if((f=d==null?void 0:d.dataAccessor)!=null&&f.fields.includes(l))switch(h){case"color":case"fill":case"stroke":return ot`
568
568
  <span
569
569
  class="color-legend"
570
570
  style=${`background-color: ${d(u)}`}
@@ -572,7 +572,7 @@ chrM 16299`};function XD(t){if(!(t in $b))throw new Error(`Unknown assembly: ${t
572
572
  `}return""},o=(l,u)=>{const f=l.filter(([h,d])=>!h.startsWith("_"));if(f.length!==0)return f.map(([h,d])=>d!==null&&typeof d=="object"&&!Array.isArray(d)?ot`${o(Object.entries(d),(u||"")+h+".")}`:ot`
573
573
  <tr>
574
574
  <th>${u}${h}</th>
575
- <td>${Oy(d)} ${r(h,t)}</td>
575
+ <td>${Zb(d)} ${r(h,t)}</td>
576
576
  </tr>
577
577
  `)},i=o(Object.entries(t));if(!i)return;const s=ot`
578
578
  <table class="attributes">
@@ -582,14 +582,14 @@ chrM 16299`};function XD(t){if(!(t in $b))throw new Error(`Unknown assembly: ${t
582
582
  <div class="title">
583
583
  <strong>${a}</strong>
584
584
  </div>
585
- `:"";return ot`${c}${s}`}class Sa extends gy{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===Aa)return n;if(n!==pB){e.beforeChildren&&e.beforeChildren(this);for(const r of this){const o=r.visit(e);if(o===Aa)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 Sa)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,Aa}),n}getDefaultResolution(e,n){return"shared"}}class Ao extends Sa{constructor(n,r,o,i,s,a){super(n,r,o,i,s,{layersChildren:!0,...a});ge(this,ar,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){Te(this,ar,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,o=>{if(!sd(o)&&!od(o))throw new Mr("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return W(this,ar).slice()}*[Symbol.iterator](){for(const n of W(this,ar))yield n}render(n,r,o={}){if(super.render(n,r,o),!!this.isConfiguredVisible()){n.pushView(this,r);for(const i of W(this,ar))i.render(n,r,o);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=W(this,ar).length-1;r>=0;r--)if(W(this,ar)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}ar=new WeakMap;class Ny{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 a_="chromosome_ticks_and_labels",c_={x:"width",y:"height"};function td(t){return t=="x"?"y":"x"}const Ll={x:["bottom","top"],y:["left","right"]},nd=Object.fromEntries(Object.entries(Ll).map(([t,e])=>e.map(n=>[n,t])).flat(1));function Lr(t){return nd[t]}class zy extends Ao{constructor(e,n,r,o,i,s){const a=n=="locus",c={...a?u_:Uy,...l_(n,e),...e};super(a?f_(c,n):Gy(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 nd[this.axisProps.orient]=="x"?new Pr(n,e):new Pr(e,n)}getPerpendicularSize(){return rd(this.axisProps)}isPickingSupported(){return!1}}function rd(t){const e=Lr(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 Uy={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 l_(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 Gy(t,e){const n={...t,extent:rd(t)},r=Lr(n.orient),o=td(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"}},[c_[td(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 u_={...Uy,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 f_(t,e){const n={...t,extent:rd(t)},r=Lr(n.orient),o=td(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=Gy({...t,...c},e);if(t.chromTicks||t.chromLabels){const u={name:a_,data:{lazy:{type:"axisGenome",channel:Lr(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 h_{constructor(e){ge(this,Ni);ge(this,Vr,0);ge(this,qr,0);Te(this,Ni,new Array(e))}push(e){W(this,Ni)[W(this,Vr)]=e,Te(this,Vr,(W(this,Vr)+1)%this.size),Te(this,qr,Math.min(W(this,qr)+1,this.size))}get(){const e=W(this,Ni);return W(this,qr)<this.size?e.slice(0,W(this,qr)):e.slice(W(this,Vr),this.size).concat(e.slice(0,W(this,Vr)))}get size(){return W(this,Ni).length}get length(){return W(this,qr)}}Ni=new WeakMap,Vr=new WeakMap,qr=new WeakMap;let Si,Hy=0;function Vy(){return performance.now()-Hy<50}function d_(t){return function(...e){Hy=performance.now(),t(...e)}}function p_(t,e,n,r,o){if(n=d_(n),t.type=="wheel"){t.uiEvent.preventDefault();const i=t.uiEvent,s=i.deltaMode?120:1;if(!i.deltaX&&!i.deltaY)return;Si==null||Si.stop();let{x:a,y:c}=t.point;if(r){const l=r.mark.encoders;l.x&&!l.x2&&!l.x.constant&&(a=+l.x(r.datum)*e.width+e.x),l.y&&!l.y2&&!l.y.constant&&(c=(1-+l.y(r.datum))*e.height+e.y)}Math.abs(i.deltaX)<Math.abs(i.deltaY)?n({x:a,y:c,xDelta:0,yDelta:0,zDelta:i.deltaY*s/300}):n({x:a,y:c,xDelta:-i.deltaX*s,yDelta:0,zDelta:0})}else if(t.type=="mousedown"&&t.mouseEvent.button===0){Si&&Si.stop();const i=new h_(30),s=t.mouseEvent;s.preventDefault();let a=Kt.fromMouseEvent(s);const c=f=>{const h=Kt.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(S=>h-S.timestamp<160);if(d.length<5||!o||g_(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;Si=ed(o,S=>{n({x:S.x,y:S.y,xDelta:b-S.x,yDelta:A-S.y,zDelta:0}),b=S.x,A=S.y},150,.5,{x:b,y:A}),Si({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 g_(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 m_ extends Ao{constructor(e,n,r,o,i,s){const c={...n=="locus"?b_:qy,...e};super(v_(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 qy={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},b_={...qy,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function y_(t,e){const n=t,r=Lr(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 w_(t,e){const n=t,r=Lr(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 x_(t,e){const n=t,r=Lr(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 v_(t,e){const n={...t},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(x_(n,e)),n.chromGrid&&n.chromGridOpacity>0&&r.push(w_(n,e)),n.grid&&n.gridOpacity>0&&r.push(y_(n,e)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Lr(t.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const jy={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"},A_={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},E_={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},S_={start:0,middle:.5,end:1},C_={start:"left",middle:"center",end:"right"};function I_(t){if(!t)return;const e=rt(t)?{text:t}:t;if(!e.text||e.orient=="none")return;const n={"track-title":A_,overlay:E_}[e.style]??{},r={...jy,...n,...e};let o={},i={x:0,y:0};const s=S_[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={...jy,...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??C_[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 Wy extends en{constructor(n,r){const o={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},n.layoutParent.context,n.layoutParent,n.view,"scrollbar-"+r,{blockEncodingInheritance:!0});ge(this,os);ge(this,tc,Hn.ZERO);ge(this,jr,0);ge(this,zi,0);Gt(this,"viewportOffset",0);this.config=o,Te(this,os,r),this.interpolateViewportOffset=ed(this.context.animator,i=>{this.viewportOffset=i.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(i,s)=>{if(s.stopPropagation(),W(this,jr)<=0)return;const a=h=>r=="vertical"?h.clientY:h.clientX;s.mouseEvent.preventDefault();const c=this.scrollOffset,l=a(s.mouseEvent),u=h=>{const d=co(a(h)-l+c,0,W(this,jr));this.interpolateViewportOffset({x:d/W(this,jr)*W(this,zi)})},f=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f)};document.addEventListener("mouseup",f,!1),document.addEventListener("mousemove",u,!1)})}get scrollOffset(){return this.viewportOffset/W(this,zi)*W(this,jr)}render(n,r,o){super.render(n,W(this,tc),o)}updateScrollbar(n,r){const o=this.config.scrollbarPadding,i=this.config.scrollbarSize,s=W(this,os)=="horizontal"?"width":"height",a=Math.min(1,n[s]/r[s]),c=n[s]-2*o,l=a*c;Te(this,jr,c-l),Te(this,zi,r[s]-n[s]),this.viewportOffset=co(this.viewportOffset,0,W(this,zi)),Te(this,tc,W(this,os)=="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))}}os=new WeakMap,tc=new WeakMap,jr=new WeakMap,zi=new WeakMap;class T_ extends Ao{constructor(e,n,r={}){const o=n(),i=Object.keys(o.intervals);if(pi.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:Yy(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(Yy(l))})}}function Yy(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 Qy{constructor(e,n,r){ge(this,gu);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=D_(i);s&&(this.background=new en(s,n.context,n,e,"background"+r,{blockEncodingInheritance:!0}));const a=B_(i);a&&(this.backgroundStroke=new en(a,n.context,n,e,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const c=I_(e.spec.title);if(c){const l=new en(c,n.context,n,e,"title"+r,{blockEncodingInheritance:!0});this.title=l}}e.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new Wy(this,"horizontal")),e.spec.viewportHeight!=null&&(this.scrollbars.vertical=new Wy(this,"vertical")),de(this,gu,_v).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 Ll[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()),!Ll[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 zy(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 m_(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 Ao){for(const a of e)for(const[c,l]of Object.entries(a.resolutions.axis)){const u=l.getAxisProps();u&&u.orient&&await i(l,c,a)}for(const a of e)for(const[c,l]of Object.entries(a.resolutions.axis)){const u=l.getAxisProps();u&&!u.orient&&await i(l,c,a)}}[...Object.values(n),...Object.values(r)].forEach(a=>a.visit(c=>{c instanceof en&&c.resolve("scale")}))}getOverhang(){const e=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+(r.axisProps.offset??0),0):0};return new Nt(e("top"),e("right"),e("bottom"),e("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}gu=new WeakSet,_v=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=al(o.select);if(!Zm(i))continue;const s=i.encodings,a=Object.fromEntries(s.map(S=>{const E=this.view.getScaleResolution(S),I=E==null?void 0:E.scale;if(!I||!St(I.type))throw new Error(`No continuous scale found for interval selection param "${r}" on channel "${S}"! Scale type is "${(I==null?void 0:I.type)??"none"}".`);return[S,E]}));if(this.selectionRect)throw new Error("Only one interval selection per container is currently allowed!");let c=!1,l=!1,u=!1,f=null;const h=(S,E)=>Object.fromEntries(s.map(I=>[I,[Math.min(S[I],E[I]),Math.max(S[I],E[I])]])),d=e.paramMediator.createExpression(r),p=e.paramMediator.getSetter(r);o.value&&p({type:"interval",intervals:o.value});const y=()=>{p(Wm(s)),n(null)};this.selectionRect=new T_(this,d,i.mark),this.selectionRect.initializeChildren();const v=S=>{const E={x:0,y:0},I=e.coords.normalizePoint(S.x,S.y,!0);for(const _ of s){const B=a[_].scale,N=B.invert(_=="x"?I.x:I.y);E[_]=N+(["index","locus"].includes(B.type)?.5:0)}return E},b=S=>{var N,F,M,C;const{intervals:E}=S,I=(Y,Q,oe)=>{const se=(be,he)=>he==null?null:a[be].scale(he),ae=se("x",Y)??oe,ce=se("y",Q)??oe;return e.coords.denormalizePoint(ae,ce,!0)},_=I((N=E.x)==null?void 0:N[0],(F=E.y)==null?void 0:F[0],0),B=I((M=E.x)==null?void 0:M[1],(C=E.y)==null?void 0:C[1],1);return Hn.create(_.x,_.y,B.x-_.x,B.y-_.y)};e.addInteractionEventListener("mousedown",(S,E)=>{if(E.mouseEvent.button!=0)return;if(f=c?b(d()):null,f)n("grabbing"),l=!0;else{const F=E.point;if(Xm(d())&&(l=!0),E.mouseEvent.shiftKey)y(),u=!0;else if(Xm(d())){const C=(Y,Q)=>{e.removeInteractionEventListener("mouseup",C);const oe=Q.point;F.subtract(oe).length<2&&y()};e.addInteractionEventListener("mouseup",C);return}else return}E.stopPropagation();const I=E.point,_=Kt.fromMouseEvent(E.mouseEvent).subtract(I),B=F=>{const M=Kt.fromMouseEvent(F).subtract(_);let C;if(f){const Y=M.subtract(I),Q=f.translate(Y.x,Y.y);C=h(v(new Kt(Q.x,Q.y)),v(new Kt(Q.x2,Q.y2)))}else C=h(v(I),v(M));for(const Y of s){const Q=a[Y],{zoomExtent:oe,scale:se}=Q,ae=C[Y];if(["index","locus"].includes(se.type)&&(ae[0]=Math.ceil(ae[0]),ae[1]=Math.ceil(ae[1])),f){const ce=ae[1]-ae[0],be=oe[0],he=oe[1];ae[0]<be&&(ae[0]=be,ae[1]=be+ce),ae[1]>he&&(ae[1]=he,ae[0]=he-ce)}else ae[0]=Math.max(oe[0],ae[0]),ae[1]=Math.min(oe[1],ae[1]);ae[1]=Math.min(oe[1],ae[1])}p({type:"interval",intervals:C})},N=()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",N),u=!1,f&&(n("move"),f=null)};document.addEventListener("mousemove",B),document.addEventListener("mouseup",N)}),e.addInteractionEventListener("click",(S,E)=>{E.mouseEvent.button==0&&l&&(E.stopPropagation(),l=!1)},!0);const A=S=>v5(d(),v(S));e.addInteractionEventListener("dblclick",(S,E)=>{A(E.point)&&(y(),E.stopPropagation())},!0),e.addInteractionEventListener("mousemove",(S,E)=>{A(E.point)?u||(c=!0,f||n("move")):(c=!1,f||n(null))})}};function D_(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 B_(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 k_ extends Sa{constructor(n,r,o,i,s,a,c){super(n,r,o,i,s,c);ge(this,He);ge(this,ss,1/0);ge(this,as,10);ge(this,nn,[]);ge(this,Ui,{});ge(this,cs,0);this.spec=n,Te(this,as,n.spacing??10),Te(this,ss,a),Te(this,nn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),W(this,nn).push(new Qy(n,this,W(this,cs))),xv(this,cs)._++}setChildren(n){Te(this,nn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const o=W(this,nn).findIndex(i=>i.view==n);if(o>=0)W(this,nn)[o]=new Qy(r,this,W(this,cs));else throw new Error("Not my child view!")}get children(){return W(this,nn).map(n=>n.view)}get childCount(){return W(this,nn).length}async createAxes(){const n=[];for(const r of pi){const o=this.resolutions.axis[r];if(o){const i=o.getAxisProps();if(i){const s={title:o.getTitle(),orient:Ll[r][0],...i},a=new zy(s,o.scaleResolution.type,this.context,this,this);n.push(a.initializeChildren()),W(this,Ui)[r]=a}}}return Promise.all([...n,...W(this,nn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of W(this,nn))yield*n.getChildren();for(const n of Object.values(W(this,Ui)))yield n}getOverhang(){return de(this,He,Fv).call(this).union(de(this,He,yu).call(this))}getSize(){return this._cache("size",()=>new Pr(de(this,He,z0).call(this,"column"),de(this,He,z0).call(this,"row")).addPadding(de(this,He,yu).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,yu).call(this)),n.pushView(this,r);const i={devicePixelRatio:this.context.devicePixelRatio},s=fy(de(this,He,N0).call(this,"column"),r.width,i),a=fy(de(this,He,N0).call(this,"row"),r.height,i),c=new Ny(W(this,He,Hi).length,W(this,ss)??1/0),l=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,f]of W(this,He,Hi).entries()){const{view:h,axes:d,gridLines:p,background:y,backgroundStroke:v,title:b,selectionRect:A}=f,[S,E]=c.getCellCoords(u),I=s[de(this,He,U0).call(this,"column",S)],_=a[de(this,He,U0).call(this,"row",E)],B=h.getViewportSize(),N=h.getSize(),F=h.getOverhang(),M=I.location-F.left,C=_.location-F.top,Y=(q,j)=>(q[j].grow?(j=="width"?I:_).size:q[j].px)+F[j],Q=Y(B,"width"),oe=Y(B,"height"),se=Y(N,"width"),ae=Y(N,"height"),ce=f.scrollbars.horizontal,be=f.scrollbars.vertical,he=ce?()=>l(ce.viewportOffset):()=>0,Ie=be?()=>l(be.viewportOffset):()=>0,me=new Hn(()=>r.x+M,()=>r.y+C,()=>Q,()=>oe),Ae=h.isScrollable(),De=Ae?new Hn(()=>r.x+M-he(),()=>r.y+C-Ie(),()=>se,()=>ae):me;f.coords=me;const Ge=o.clipRect?me.intersect(o.clipRect):me;y==null||y.render(n,Ge,{...o,clipRect:void 0});for(const q of Object.values(p))q.render(n,me,o);const Ve=R_(h)||Ae;Ve&&h.render(n,De,{...o,clipRect:Ge}),v==null||v.render(n,Ge,{...o,clipRect:void 0});for(const[q,j]of Object.entries(d)){const ee=q=="left"||q=="right"?"vertical":"horizontal",J=f.scrollbars[ee],fe=J?me.modify(ee=="vertical"?{y:()=>De.y,height:ae}:{x:()=>De.x,width:se}):me,L=Zy(fe,q,j);let D=o.clipRect;J&&(D=L.intersect(D).intersect(J?me.modify(ee=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),j.render(n,L,{...o,clipRect:D})}for(const q of Object.values(W(this,Ui))){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,Zy(me.shrink(f.view.getOverhang()),ee,q),o)}Ve||h.render(n,De,o),A==null||A.render(n,De,o);for(const q of Object.values(f.scrollbars))q.updateScrollbar(me,De),q.render(n,r,o);b==null||b.render(n,me,o)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=W(this,He,Hi).find(i=>i.coords.containsPoint(n.point.x,n.point.y));for(const i of Object.values((r==null?void 0:r.scrollbars)??{}))if(i.coords.containsPoint(n.point.x,n.point.y)&&(i.propagateInteractionEvent(n),n.stopped))return;const o=r==null?void 0:r.view;if(o){if(o.propagateInteractionEvent(n),n.stopped)return;(o instanceof en||o instanceof Ao)&&p_(n,r.coords,i=>de(this,He,Mv).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"}}ss=new WeakMap,as=new WeakMap,nn=new WeakMap,Ui=new WeakMap,cs=new WeakMap,He=new WeakSet,Hi=function(){return W(this,nn).filter(n=>n.view.isConfiguredVisible())},Rv=function(){return new Ny(W(this,He,Hi).length,W(this,ss)??1/0)},oc=function(n){const r=n=="column"?"width":"height",o=(i,s)=>i.map(a=>{const l=W(this,He,Hi)[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,Rv)[n=="column"?"colIndices":"rowIndices"].map(i=>({axisBefore:o(i,0),axisAfter:o(i,1),view:fB(i.map(s=>W(this,He,Hi)[s].view.getViewportSize()[r]))})))},N0=function(n){const r=de(this,He,oc).call(this,n),o=[];o.push(xa);for(const[i,s]of r.entries())i>0&&o.push({px:W(this,as),grow:0}),(i==0||this.wrappingFacet)&&o.push(xa),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(xa);return o},z0=function(n){let r=0,o=0;const i=n=="row"?this.spec.height:this.spec.width;if(i||i===0)return dy(i);const s=de(this,He,oc).call(this,n);for(const[a,c]of s.entries())a>0&&(o+=W(this,as)),(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}},U0=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},Fv=function(){const n=de(this,He,oc).call(this,"column"),r=de(this,He,oc).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)},yu=function(){const n=r=>{const o=nd[r],i=W(this,Ui)[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"))},Mv=function(n,r,o){for(const[i,s]of Object.entries(__(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 __(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 en&&e&&(e=n.mark.properties.clip===!0)}),e}function Zy(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 id extends k_{constructor(e,n,r,o,i){super(e,n,r,o,i,ad(e)?e.columns:Ol(e)?1:1/0),this.spec=e}async initializeChildren(){const e=this.spec,n=ad(e)?e.concat:Ol(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":Ol(this.spec)&&e==="x"||Jy(this.spec)&&e==="y"?"shared":"independent"}}const Xy="viewRoot";class F_{constructor(e={}){ge(this,ls,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(sd,n(Ao)),this.addViewType(od,n(en)),this.addViewType(Ol,n(id)),this.addViewType(Jy,n(id)),this.addViewType(ad,n(id)),this.addViewType(L_,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(e,n){W(this,ls).set(e,n)}createView(e,n,r,o,i){for(const[s,a]of W(this,ls))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,ls).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(P_(e)){let u;if("url"in e.import)if(this.options.allowImport)u=await Lk(e,o.getBaseUrl(),n);else throw new Mr("Importing views is not allowed!",r);else if("template"in e.import)u=Ky(e.import.template,o);else throw new Error("Invalid import: "+JSON.stringify(e));s==null||s(u),M_(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(h=>Hm(h)&&al(h.select).type=="interval")};!o&&this.options.wrapRoot&&(od(a)||sd(a)||c(a))&&i===Xy&&(a={name:"implicitRoot",vconcat:[a]});const l=this.createView(a,n,r,o,i);return l instanceof Sa&&await l.initializeChildren(),l}}ls=new WeakMap;function Ky(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 Ky(t,e.dataParent);throw new Error(`Cannot find template "${t}" in current view or its ancestors!`)}function M_(t,e){e.name!=null&&(t.name=e.name);const n=_t(e.params)?e.params:Rt(e.params)?Object.entries(e.params).map(([r,o])=>({name:r,value:o})):[];if(n.length){t.params??(t.params=[]);for(const r of n){const o=t.params.findIndex(i=>i.name==r.name);o>=0&&(t.params[o]=r)}for(const r of n)t.params.some(o=>o.name==r.name)||t.params.push(r)}}function od(t){return"mark"in t&&(rt(t.mark)||Rt(t.mark))}function sd(t){return"layer"in t&&Rt(t.layer)}function P_(t){return"import"in t}function Ol(t){return"vconcat"in t&&_t(t.vconcat)}function Jy(t){return"hconcat"in t&&_t(t.hconcat)}function ad(t){return"concat"in t&&_t(t.concat)}function L_(t){return"samples"in t&&Rt(t.samples)&&"spec"in t&&Rt(t.spec)}function O_(t){const e=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of t.paramConfigs.values()){if(!y5(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?Ml(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 Ta extends Db{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===Ca)return n;if(n!==DB){e.beforeChildren&&e.beforeChildren(this);for(const r of this){const o=r.visit(e);if(o===Ca)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 Ta)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,Ca}),n}getDefaultResolution(e,n){return"shared"}}class Eo extends Ta{constructor(n,r,o,i,s,a){super(n,r,o,i,s,{layersChildren:!0,...a});he(this,cr,[]);this.spec=n,this.needsAxes={x:!0,y:!0}}async initializeChildren(){Ae(this,cr,await Promise.all(this.spec.layer.map((n,r)=>this.context.createOrImportView(n,this,this,"grid"+r,o=>{if(!yd(o)&&!md(o))throw new Pr("LayerView accepts only unit or layer specs as children!",this)}))))}get children(){return q(this,cr).slice()}*[Symbol.iterator](){for(const n of q(this,cr))yield n}render(n,r,o={}){if(super.render(n,r,o),!!this.isConfiguredVisible()){n.pushView(this,r);for(const i of q(this,cr))i.render(n,r,o);n.popView(this)}}propagateInteractionEvent(n){this.handleInteractionEvent(void 0,n,!0);for(let r=q(this,cr).length-1;r>=0;r--)if(q(this,cr)[r].propagateInteractionEvent(n),n.stopped)return;this.handleInteractionEvent(void 0,n,!1)}}cr=new WeakMap;class Xb{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 v_="chromosome_ticks_and_labels",A_={x:"width",y:"height"};function hd(t){return t=="x"?"y":"x"}const jl={x:["bottom","top"],y:["left","right"]},dd=Object.fromEntries(Object.entries(jl).map(([t,e])=>e.map(n=>[n,t])).flat(1));function Or(t){return dd[t]}class Kb extends Eo{constructor(e,n,r,o,i,s){const a=n=="locus",c={...a?S_:Jb,...E_(n,e),...e};super(a?C_(c,n):$b(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 dd[this.axisProps.orient]=="x"?new Lr(n,e):new Lr(e,n)}getPerpendicularSize(){return pd(this.axisProps)}isPickingSupported(){return!1}}function pd(t){const e=Or(t.orient);let n=t.ticks&&t.tickSize||0;return t.labels&&(n+=t.labelPadding,e=="x"?n+=t.labelFontSize:n+=30),t.title&&(n+=t.titlePadding+t.titleFontSize),n=Math.min(t.maxExtent||1/0,Math.max(t.minExtent||0,n)),n}const Jb={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 E_(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 $b(t,e){const n={...t,extent:pd(t)},r=Or(n.orient),o=hd(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"}},[A_[hd(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 S_={...Jb,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 C_(t,e){const n={...t,extent:pd(t)},r=Or(n.orient),o=hd(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=$b({...t,...c},e);if(t.chromTicks||t.chromLabels){const u={name:v_,data:{lazy:{type:"axisGenome",channel:Or(n.orient)}},encoding:{[r]:{field:"continuousStart",type:e,band:0}},layer:[]};if(t.chromTicks&&u.layer.push(s()),t.chromLabels){u.layer.push(a());let f;l.layer.filter(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 I_{constructor(e){he(this,zi);he(this,qr,0);he(this,jr,0);Ae(this,zi,new Array(e))}push(e){q(this,zi)[q(this,qr)]=e,Ae(this,qr,(q(this,qr)+1)%this.size),Ae(this,jr,Math.min(q(this,jr)+1,this.size))}get(){const e=q(this,zi);return q(this,jr)<this.size?e.slice(0,q(this,jr)):e.slice(q(this,qr),this.size).concat(e.slice(0,q(this,qr)))}get size(){return q(this,zi).length}get length(){return q(this,jr)}}zi=new WeakMap,qr=new WeakMap,jr=new WeakMap;let Ci,e2=0;function t2(){return performance.now()-e2<50}function T_(t){return function(...e){e2=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;Ci==null||Ci.stop();let{x:a,y:c}=t.point;if(r){const l=r.mark.encoders;l.x&&!l.x2&&!l.x.constant&&(a=+l.x(r.datum)*e.width+e.x),l.y&&!l.y2&&!l.y.constant&&(c=(1-+l.y(r.datum))*e.height+e.y)}Math.abs(i.deltaX)<Math.abs(i.deltaY)?n({x:a,y:c,xDelta:0,yDelta:0,zDelta:i.deltaY*s/300}):n({x:a,y:c,xDelta:-i.deltaX*s,yDelta:0,zDelta:0})}else if(t.type=="mousedown"&&t.mouseEvent.button===0){Ci&&Ci.stop();const i=new I_(30),s=t.mouseEvent;s.preventDefault();let a=Xt.fromMouseEvent(s);const c=f=>{const h=Xt.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(S=>h-S.timestamp<160);if(d.length<5||!o||B_(d))return;const p=d.at(-1),b=d[0],v=p.point.subtract(b.point).multiply(1/(p.timestamp-b.timestamp));let y=a.x,A=a.y;Ci=fd(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}),Ci({x:a.x-v.x*250,y:a.y-v.y*250})},u=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),l()};document.addEventListener("mouseup",u,!1),document.addEventListener("mousemove",c,!1)}}function 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 k_ extends Eo{constructor(e,n,r,o,i,s){const c={...n=="locus"?__:n2,...e};super(P_(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 n2={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},__={...n2,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function R_(t,e){const n=t,r=Or(n.orient);return{name:"grid_lines",data:{lazy:{type:"axisTicks",channel:r,axis:t}},mark:{type:"rule",strokeDash:n.gridDash,strokeCap:n.gridCap,color:n.gridColor,size:n.gridWidth,opacity:n.gridOpacity,minBufferSize:300},encoding:{[r]:{field:"value",type:e}}}}function F_(t,e){const n=t,r=Or(n.orient);return{name:"chromosome_lines",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rule",strokeDash:n.chromGridDash,strokeCap:n.chromGridCap,color:n.chromGridColor,size:n.chromGridWidth,opacity:n.chromGridOpacity},encoding:{[r]:{field:"continuousStart",type:e,band:0}}}}function M_(t,e){const n=t,r=Or(n.orient);return{name:"chromosome_fill",data:{lazy:{type:"axisGenome",channel:r}},mark:{type:"rect"},encoding:{[r]:{field:"continuousStart",type:e,band:0},[r+"2"]:{field:"continuousEnd",band:0},fill:{field:"odd",type:"nominal",scale:{domain:[!1,!0],range:[n.chromGridFillEven??"white",n.chromGridFillOdd??"white"]}},opacity:{field:"odd",type:"nominal",scale:{type:"ordinal",domain:[!1,!0],range:[n.chromGridFillEven?1:0,n.chromGridFillOdd?1:0]}}}}}function P_(t,e){const n={...t},r=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&r.push(M_(n,e)),n.chromGrid&&n.chromGridOpacity>0&&r.push(F_(n,e)),n.grid&&n.gridOpacity>0&&r.push(R_(n,e)),{name:"grid_layers",configurableVisibility:!1,resolve:{scale:{[Or(t.orient)]:"forced",fill:"independent",opacity:"independent"}},layer:r}}const r2={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"},L_={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},O_={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},N_={start:0,middle:.5,end:1},z_={start:"left",middle:"center",end:"right"};function U_(t){if(!t)return;const e=rt(t)?{text:t}:t;if(!e.text||e.orient=="none")return;const n={"track-title":L_,overlay:O_}[e.style]??{},r={...r2,...n,...e};let o={},i={x:0,y:0};const s=N_[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={...r2,...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??z_[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 i2 extends en{constructor(n,r){const o={scrollbarSize:8,scrollbarPadding:2};super({data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1},configurableVisibility:!1},n.layoutParent.context,n.layoutParent,n.view,"scrollbar-"+r,{blockEncodingInheritance:!0});he(this,cs);he(this,uc,Sn.ZERO);he(this,Wr,0);he(this,Ui,0);Gt(this,"viewportOffset",0);this.config=o,Ae(this,cs,r),this.interpolateViewportOffset=fd(this.context.animator,i=>{this.viewportOffset=i.x},50,.4,{x:this.viewportOffset}),this.addInteractionEventListener("mousedown",(i,s)=>{if(s.stopPropagation(),q(this,Wr)<=0)return;const a=h=>r=="vertical"?h.clientY:h.clientX;s.mouseEvent.preventDefault();const c=this.scrollOffset,l=a(s.mouseEvent),u=h=>{const d=lo(a(h)-l+c,0,q(this,Wr));this.interpolateViewportOffset({x:d/q(this,Wr)*q(this,Ui)})},f=()=>{document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",f)};document.addEventListener("mouseup",f,!1),document.addEventListener("mousemove",u,!1)})}get scrollOffset(){return this.viewportOffset/q(this,Ui)*q(this,Wr)}render(n,r,o){super.render(n,q(this,uc),o)}updateScrollbar(n,r){const o=this.config.scrollbarPadding,i=this.config.scrollbarSize,s=q(this,cs)=="horizontal"?"width":"height",a=Math.min(1,n[s]/r[s]),c=n[s]-2*o,l=a*c;Ae(this,Wr,c-l),Ae(this,Ui,r[s]-n[s]),this.viewportOffset=lo(this.viewportOffset,0,q(this,Ui)),Ae(this,uc,q(this,cs)=="vertical"?new Sn(()=>n.x+n.width-i-o,()=>n.y+o+this.scrollOffset,()=>i,()=>l):new Sn(()=>n.x+o+this.scrollOffset,()=>n.y+n.height-i-o,()=>l,()=>i))}}cs=new WeakMap,uc=new WeakMap,Wr=new WeakMap,Ui=new WeakMap;class G_ extends Eo{constructor(e,n,r={}){const o=n(),i=Object.keys(o.intervals);if(gi.every(l=>!i.includes(l)))throw new Error("SelectionRect requires at least one of the channels 'x' or 'y' to be present in the selection.");const s={name:"selectionRect",configurableVisibility:!1,resolve:{scale:{x:"forced",y:"forced"}},data:{values:o2(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(o2(l))})}}function o2(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 s2{constructor(e,n,r){he(this,Cu);if(this.layoutParent=n,this.view=e,this.serial=r,this.background=void 0,this.backgroundStroke=void 0,this.axes={},this.gridLines={},this.scrollbars={},this.selectionRect=void 0,this.title=void 0,this.coords=Sn.ZERO,e.needsAxes.x||e.needsAxes.y){const o=e.spec,i="view"in o?o==null?void 0:o.view:void 0,s=H_(i);s&&(this.background=new en(s,n.context,n,e,"background"+r,{blockEncodingInheritance:!0}));const a=V_(i);a&&(this.backgroundStroke=new en(a,n.context,n,e,"backgroundStroke"+r,{blockEncodingInheritance:!0}));const c=U_(e.spec.title);if(c){const l=new en(c,n.context,n,e,"title"+r,{blockEncodingInheritance:!0});this.title=l}}e.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new i2(this,"horizontal")),e.spec.viewportHeight!=null&&(this.scrollbars.vertical=new i2(this,"vertical")),pe(this,Cu,qv).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 jl[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()),!jl[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 Kb(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 k_(u,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,l);r[u.orient]=f,await f.initializeChildren()}};for(const a of["x","y"])if(e.needsAxes[a]){const c=e.resolutions.axis[a];if(!c)continue;await i(c,a,e)}for(const a of["x","y"])if(e.needsAxes[a]&&e.getConfiguredOrDefaultResolution(a,"axis")!="excluded"){const c=e.getAxisResolution(a);if(!c)continue;await s(c,a,e)}if(e instanceof Eo){for(const a of e)for(const[c,l]of Object.entries(a.resolutions.axis)){const u=l.getAxisProps();u&&u.orient&&await i(l,c,a)}for(const a of e)for(const[c,l]of Object.entries(a.resolutions.axis)){const u=l.getAxisProps();u&&!u.orient&&await i(l,c,a)}}[...Object.values(n),...Object.values(r)].forEach(a=>a.visit(c=>{c instanceof en&&c.resolve("scale")}))}getOverhang(){const e=n=>{const r=this.axes[n];return r?Math.max(r.getPerpendicularSize()+(r.axisProps.offset??0),0):0};return new Nt(e("top"),e("right"),e("bottom"),e("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}Cu=new WeakSet,qv=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=ml(o.select);if(!a1(i))continue;const s=i.encodings,a=Object.fromEntries(s.map(S=>{const E=this.view.getScaleResolution(S),I=E==null?void 0:E.scale;if(!I||!St(I.type))throw new Error(`No continuous scale found for interval selection param "${r}" on channel "${S}"! Scale type is "${(I==null?void 0:I.type)??"none"}".`);return[S,E]}));if(this.selectionRect)throw new Error("Only one interval selection per container is currently allowed!");let c=!1,l=!1,u=!1,f=null;const h=(S,E)=>Object.fromEntries(s.map(I=>[I,[Math.min(S[I],E[I]),Math.max(S[I],E[I])]])),d=e.paramMediator.createExpression(r),p=e.paramMediator.getSetter(r);o.value&&p({type:"interval",intervals:o.value});const b=()=>{p(i1(s)),n(null)};this.selectionRect=new G_(this,d,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,F,M,C;const{intervals:E}=S,I=(Y,Q,oe)=>{const se=(ye,de)=>de==null?null:a[ye].scale(de),ae=se("x",Y)??oe,ce=se("y",Q)??oe;return e.coords.denormalizePoint(ae,ce,!0)},_=I((N=E.x)==null?void 0:N[0],(F=E.y)==null?void 0:F[0],0),B=I((M=E.x)==null?void 0:M[1],(C=E.y)==null?void 0:C[1],1);return Sn.create(_.x,_.y,B.x-_.x,B.y-_.y)};e.addInteractionEventListener("mousedown",(S,E)=>{if(E.mouseEvent.button!=0)return;if(f=c?y(d()):null,f)n("grabbing"),l=!0;else{const F=E.point;if(c1(d())&&(l=!0),E.mouseEvent.shiftKey)b(),u=!0;else if(c1(d())){const C=(Y,Q)=>{e.removeInteractionEventListener("mouseup",C);const oe=Q.point;F.subtract(oe).length<2&&b()};e.addInteractionEventListener("mouseup",C);return}else return}E.stopPropagation();const I=E.point,_=Xt.fromMouseEvent(E.mouseEvent).subtract(I),B=F=>{const M=Xt.fromMouseEvent(F).subtract(_);let C;if(f){const Y=M.subtract(I),Q=f.translate(Y.x,Y.y);C=h(v(new Xt(Q.x,Q.y)),v(new Xt(Q.x2,Q.y2)))}else C=h(v(I),v(M));for(const Y of s){const Q=a[Y],{zoomExtent:oe,scale:se}=Q,ae=C[Y];if(["index","locus"].includes(se.type)&&(ae[0]=Math.ceil(ae[0]),ae[1]=Math.ceil(ae[1])),f){const ce=ae[1]-ae[0],ye=oe[0],de=oe[1];ae[0]<ye&&(ae[0]=ye,ae[1]=ye+ce),ae[1]>de&&(ae[1]=de,ae[0]=de-ce)}else ae[0]=Math.max(oe[0],ae[0]),ae[1]=Math.min(oe[1],ae[1]);ae[1]=Math.min(oe[1],ae[1])}p({type:"interval",intervals:C})},N=()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",N),u=!1,f&&(n("move"),f=null)};document.addEventListener("mousemove",B),document.addEventListener("mouseup",N)}),e.addInteractionEventListener("click",(S,E)=>{E.mouseEvent.button==0&&l&&(E.stopPropagation(),l=!1)},!0);const A=S=>F5(d(),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 H_(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 V_(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 q_ extends Ta{constructor(n,r,o,i,s,a,c){super(n,r,o,i,s,c);he(this,He);he(this,ls,1/0);he(this,us,10);he(this,nn,[]);he(this,Gi,{});he(this,fs,0);this.spec=n,Ae(this,us,n.spacing??10),Ae(this,ls,a),Ae(this,nn,[]),this.wrappingFacet=!1}appendChild(n){n.layoutParent??(n.layoutParent=this),q(this,nn).push(new s2(n,this,q(this,fs))),Rv(this,fs)._++}setChildren(n){Ae(this,nn,[]);for(const r of n)this.appendChild(r)}replaceChild(n,r){const o=q(this,nn).findIndex(i=>i.view==n);if(o>=0)q(this,nn)[o]=new s2(r,this,q(this,fs));else throw new Error("Not my child view!")}get children(){return q(this,nn).map(n=>n.view)}get childCount(){return q(this,nn).length}async createAxes(){const n=[];for(const r of gi){const o=this.resolutions.axis[r];if(o){const i=o.getAxisProps();if(i){const s={title:o.getTitle(),orient:jl[r][0],...i},a=new Kb(s,o.scaleResolution.type,this.context,this,this);n.push(a.initializeChildren()),q(this,Gi)[r]=a}}}return Promise.all([...n,...q(this,nn).map(r=>r.createAxes())])}*[Symbol.iterator](){for(const n of q(this,nn))yield*n.getChildren();for(const n of Object.values(q(this,Gi)))yield n}getOverhang(){return pe(this,He,Wv).call(this).union(pe(this,He,Du).call(this))}getSize(){return this._cache("size",()=>new Lr(pe(this,He,X0).call(this,"column"),pe(this,He,X0).call(this,"row")).addPadding(pe(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(pe(this,He,Du).call(this)),n.pushView(this,r);const i={devicePixelRatio:n.getDevicePixelRatio()},s=Sb(pe(this,He,Z0).call(this,"column"),r.width,i),a=Sb(pe(this,He,Z0).call(this,"row"),r.height,i),c=new Xb(q(this,He,Vi).length,q(this,ls)??1/0),l=u=>Math.round(u*devicePixelRatio)/devicePixelRatio;for(const[u,f]of q(this,He,Vi).entries()){const{view:h,axes:d,gridLines:p,background:b,backgroundStroke:v,title:y,selectionRect:A}=f,[S,E]=c.getCellCoords(u),I=s[pe(this,He,K0).call(this,"column",S)],_=a[pe(this,He,K0).call(this,"row",E)],B=h.getViewportSize(),N=h.getSize(),F=h.getOverhang(),M=I.location-F.left,C=_.location-F.top,Y=(j,W)=>(j[W].grow?(W=="width"?I:_).size:j[W].px)+F[W],Q=Y(B,"width"),oe=Y(B,"height"),se=Y(N,"width"),ae=Y(N,"height"),ce=f.scrollbars.horizontal,ye=f.scrollbars.vertical,de=ce?()=>l(ce.viewportOffset):()=>0,Ce=ye?()=>l(ye.viewportOffset):()=>0,me=new Sn(()=>r.x+M,()=>r.y+C,()=>Q,()=>oe),Ee=h.isScrollable(),De=Ee?new Sn(()=>r.x+M-de(),()=>r.y+C-Ce(),()=>se,()=>ae):me;f.coords=me;const Ge=o.clipRect?me.intersect(o.clipRect):me;b==null||b.render(n,Ge,{...o,clipRect:void 0});for(const j of Object.values(p))j.render(n,me,o);const Ve=W_(h)||Ee;Ve&&h.render(n,De,{...o,clipRect:Ge}),v==null||v.render(n,Ge,{...o,clipRect:void 0});for(const[j,W]of Object.entries(d)){const ee=j=="left"||j=="right"?"vertical":"horizontal",J=f.scrollbars[ee],fe=J?me.modify(ee=="vertical"?{y:()=>De.y,height:ae}:{x:()=>De.x,width:se}):me,L=a2(fe,j,W);let D=o.clipRect;J&&(D=L.intersect(D).intersect(J?me.modify(ee=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),W.render(n,L,{...o,clipRect:D})}for(const j of Object.values(q(this,Gi))){const ee=j.axisProps.orient;(ee=="left"&&S==0||ee=="right"&&S==c.nCols-1||ee=="top"&&E==0||ee=="bottom"&&E==c.nRows-1)&&j.render(n,a2(me.shrink(f.view.getOverhang()),ee,j),o)}Ve||h.render(n,De,o),A==null||A.render(n,De,o);for(const j of Object.values(f.scrollbars))j.updateScrollbar(me,De),j.render(n,r,o);y==null||y.render(n,me,o)}n.popView(this)}propagateInteractionEvent(n){if(this.handleInteractionEvent(void 0,n,!0),n.stopped)return;const r=q(this,He,Vi).find(i=>i.coords.containsPoint(n.point.x,n.point.y));for(const i of Object.values((r==null?void 0:r.scrollbars)??{}))if(i.coords.containsPoint(n.point.x,n.point.y)&&(i.propagateInteractionEvent(n),n.stopped))return;const o=r==null?void 0:r.view;if(o){if(o.propagateInteractionEvent(n),n.stopped)return;(o instanceof en||o instanceof Eo)&&D_(n,r.coords,i=>pe(this,He,Yv).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"}}ls=new WeakMap,us=new WeakMap,nn=new WeakMap,Gi=new WeakMap,fs=new WeakMap,He=new WeakSet,Vi=function(){return q(this,nn).filter(n=>n.view.isConfiguredVisible())},jv=function(){return new Xb(q(this,He,Vi).length,q(this,ls)??1/0)},pc=function(n){const r=n=="column"?"width":"height",o=(i,s)=>i.map(a=>{const l=q(this,He,Vi)[a].getOverhangAndPadding();return n=="column"?s?l.right:l.left:s?l.bottom:l.top}).reduce((a,c)=>Math.max(a,c),0);return this._cache(`size/directionSizes/${n}`,()=>q(this,He,jv)[n=="column"?"colIndices":"rowIndices"].map(i=>({axisBefore:o(i,0),axisAfter:o(i,1),view:CB(i.map(s=>q(this,He,Vi)[s].view.getViewportSize()[r]))})))},Z0=function(n){const r=pe(this,He,pc).call(this,n),o=[];o.push(Ea);for(const[i,s]of r.entries())i>0&&o.push({px:q(this,us),grow:0}),(i==0||this.wrappingFacet)&&o.push(Ea),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(Ea);return o},X0=function(n){let r=0,o=0;const i=n=="row"?this.spec.height:this.spec.width;if(i||i===0)return Ib(i);const s=pe(this,He,pc).call(this,n);for(const[a,c]of s.entries())a>0&&(o+=q(this,us)),(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}},K0=function(n,r){return n=="row"&&this.wrappingFacet?1+6*r+2:2+4*r+1},Wv=function(){const n=pe(this,He,pc).call(this,"column"),r=pe(this,He,pc).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)},Du=function(){const n=r=>{const o=dd[r],i=q(this,Gi)[o];return(i==null?void 0:i.axisProps.orient)!==r?0:Math.max(i.getPerpendicularSize()+(i.axisProps.offset??0),0)};return new Nt(n("top"),n("right"),n("bottom"),n("left"))},Yv=function(n,r,o){for(const[i,s]of Object.entries(j_(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 j_(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 W_(t){let e=!0;return t.visit(n=>{n instanceof en&&e&&(e=n.mark.properties.clip===!0)}),e}function a2(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 gd extends q_{constructor(e,n,r,o,i){super(e,n,r,o,i,bd(e)?e.columns:Wl(e)?1:1/0),this.spec=e}async initializeChildren(){const e=this.spec,n=bd(e)?e.concat:Wl(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":Wl(this.spec)&&e==="x"||u2(this.spec)&&e==="y"?"shared":"independent"}}const c2="viewRoot";class Y_{constructor(e={}){he(this,hs,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(yd,n(Eo)),this.addViewType(md,n(en)),this.addViewType(Wl,n(gd)),this.addViewType(u2,n(gd)),this.addViewType(bd,n(gd)),this.addViewType(X_,()=>{throw new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!")})}addViewType(e,n){q(this,hs).set(e,n)}createView(e,n,r,o,i){for(const[s,a]of q(this,hs))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=[...q(this,hs).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(Z_(e)){let u;if("url"in e.import)if(this.options.allowImport)u=await Xk(e,o.getBaseUrl(),n);else throw new Pr("Importing views is not allowed!",r);else if("template"in e.import)u=l2(e.import.template,o);else throw new Error("Invalid import: "+JSON.stringify(e));s==null||s(u),Q_(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(h=>e1(h)&&ml(h.select).type=="interval")};!o&&this.options.wrapRoot&&(md(a)||yd(a)||c(a))&&i===c2&&(a={name:"implicitRoot",vconcat:[a]});const l=this.createView(a,n,r,o,i);return l instanceof Ta&&await l.initializeChildren(),l}}hs=new WeakMap;function l2(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 l2(t,e.dataParent);throw new Error(`Cannot find template "${t}" in current view or its ancestors!`)}function Q_(t,e){e.name!=null&&(t.name=e.name);const n=_t(e.params)?e.params:Rt(e.params)?Object.entries(e.params).map(([r,o])=>({name:r,value:o})):[];if(n.length){t.params??(t.params=[]);for(const r of n){const o=t.params.findIndex(i=>i.name==r.name);o>=0&&(t.params[o]=r)}for(const r of n)t.params.some(o=>o.name==r.name)||t.params.push(r)}}function md(t){return"mark"in t&&(rt(t.mark)||Rt(t.mark))}function yd(t){return"layer"in t&&Rt(t.layer)}function Z_(t){return"import"in t}function Wl(t){return"vconcat"in t&&_t(t.vconcat)}function u2(t){return"hconcat"in t&&_t(t.hconcat)}function bd(t){return"concat"in t&&_t(t.concat)}function X_(t){return"samples"in t&&Rt(t.samples)&&"spec"in t&&Rt(t.spec)}function K_(t){const e=Math.floor(Math.random()*16777215).toString(16),n=[];for(const r of t.paramConfigs.values()){if(!k5(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?Vl(s,o.debounce,!1):s,u=`${e}-param-${i}`;if(o.input=="range")n.push(ot`<label for=${u}>${c}</label>
586
586
  <div>
587
587
  <input
588
588
  id=${u}
589
589
  type="range"
590
590
  min=${o.min??0}
591
591
  max=${o.max??100}
592
- step=${o.step??ni(o.min,o.max,100)}
592
+ step=${o.step??ri(o.min,o.max,100)}
593
593
  .value=${a}
594
594
  @input=${f=>{l(f.target.valueAsNumber),f.target.nextElementSibling.textContent=f.target.valueAsNumber}}
595
595
  /><span>${a}</span>
@@ -632,27 +632,27 @@ chrM 16299`};function XD(t){if(!(t in $b))throw new Error(`Unknown assembly: ${t
632
632
  @focus=${f=>f.target.select()}
633
633
  @input=${f=>{l(o.input=="number"?f.target.valueAsNumber:f.target.value)}}
634
634
  />
635
- </div>`);else throw new Error("Unsupported input type: "+o.input);o.description&&n.push(ot`<div class="description">${o.description}</div>`)}return n}Ju("fasta",Zk);class $y{constructor(e,n,r={}){ge(this,pn);this.container=e,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=n,this.viewFactory=new F_,this.namedDataProviders=[],this.animator=new Hk(()=>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 Xk(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:s_,refseqgene:$k,...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),Yh(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=${QE(s)}>
635
+ </div>`);else throw new Error("Unsupported input type: "+o.input);o.description&&n.push(ot`<div class="description">${o.description}</div>`)}return n}lf("fasta",l_);class f2{constructor(e,n,r={}){he(this,pn);this.container=e,this.options=r,r.inputBindingContainer??(r.inputBindingContainer="default"),this._destructionCallbacks=[],this.spec=n,this.viewFactory=new Y_,this.namedDataProviders=[],this.animator=new n_(()=>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 u_(this.animator),this._keyboardListeners=new Map,this._eventListeners=new Map,this._extraBroadcastListeners=new Map,this.tooltipHandlers={default:x_,refseqgene:d_,...r.tooltipHandlers??{}},this.viewRoot=void 0,this._loadingViews=new Map,this._inputBindingContainer=void 0,this._mouseDownCoords=void 0,this.dpr=window.devicePixelRatio}registerNamedDataProvider(e){this.namedDataProviders.unshift(e)}getNamedDataFromProvider(e){for(const 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),rd(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=${aS(s)}>
636
636
  <div class=${o.status}>
637
637
  ${o.status=="error"?ot`<span
638
638
  >Loading
639
639
  failed${o.detail?ot`: ${o.detail}`:pt}</span
640
640
  >`:ot`
641
- <img src="${ZE}" alt="" />
641
+ <img src="${cS}" alt="" />
642
642
  <span>Loading...</span>
643
643
  `}
644
644
  </div>
645
- </div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),ws(e,this.loadingIndicatorsElement)}destroy(){var n;const e=W(this,pn,wu);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 Vk(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const e=this,n={dataFlow:new ky,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,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,Xy),W(this,pn,wu).style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",de(this,pn,Pv).call(this),Mk(this.viewRoot),Pk(this.viewRoot);const o=this.viewRoot.getDescendants();o.forEach(c=>c.configureViewOpacity()),this._glHelper.invalidateSize(),de(this,pn,Lv).call(this);const i=o.filter(c=>c instanceof en),s=Dk(this.viewRoot,n.dataFlow);Fk(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())),Yh(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=>Bl(c,"size")),this._glHelper.invalidateSize()}async launch(){try{return de(this,pn,Ov).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),N_(this.container,n),!1}finally{W(this,pn,wu).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&&!Vy()&&(this.renderPickingFramebuffer(),this._handlePicking(f.x,f.y)));const h=d=>{this.viewRoot.propagateInteractionEvent(new zk(f,d)),this._tooltipUpdateRequested||this.tooltip.clear()};if(i.type!="wheel"&&this._wheelInertia.cancel(),(i.type=="mousedown"||i.type=="mouseup")&&!Vy())this.renderPickingFramebuffer();else if(i.type=="wheel"){n=s,this._tooltipUpdateRequested=!1;const d=i;if(Math.abs(d.deltaX)>Math.abs(d.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const p=Kk(d);this._wheelInertia.setMomentum(d.deltaY*(d.deltaMode?80:1),y=>{const v=new WheelEvent("wheel",{...p,deltaMode:0,deltaX:0,deltaY:y});h(v)}),d.preventDefault();return}}if(i.type=="click"){if(r)return;const d=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(d))}(i.type!="click"||((l=this._mouseDownCoords)==null?void 0:l.subtract(Kt.fromMouseEvent(i)).length)<3)&&h(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 en){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 Aa}}),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 My({picking:!1},this._glHelper),this._pickingContext=new My({picking:!0},this._glHelper),e.render(new Nk(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 en&&n.getDataAccessor("search")&&e.push(n)}),e}getNamedScaleResolutions(){const e=new Map;return this.viewRoot.visit(n=>{for(const r of Object.values(n.resolutions.scale))r.name&&e.set(r.name,r)}),e}}pn=new WeakSet,wu=function(){return this.container.querySelector(".canvas-wrapper")},Pv=function(){const e=[];this.viewRoot.visit(r=>{const o=r.paramMediator;e.push(...O_(o))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!e.length)){if(this._inputBindingContainer=Nl("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&&ws(ot`<div class="gs-input-binding">${e}</div>`,this._inputBindingContainer)}},Lv=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)},Ov=function(){this.container.classList.add("genome-spy");const e=document.createElement("style");e.innerHTML=XE,this.container.appendChild(e);const n=Nl("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new gT(n,()=>this.viewRoot?Ok(this.viewRoot):{width:void 0,height:void 0},this.spec.background,{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=Nl("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=Nl("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new JE(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function N_(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 Nl(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 z_="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",U_="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 G_(t,e,n={}){let r;if(rt(t)){if(r=document.querySelector(t),!r)throw new Error(`No such element: ${t}`)}else if(t instanceof HTMLElement)r=t;else throw new Error(`Invalid element: ${t}`);let o;try{const i=Rt(e)?e:await 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 $y(r,i,n),H_(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 H_(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 zl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function V_(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 cd={},Ca={},t2;function q_(){if(t2)return Ca;t2=1,Ca.byteLength=a,Ca.toByteArray=l,Ca.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)),S=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[S++]=p>>16&255,A[S++]=p>>8&255,A[S++]=p&255;return b===2&&(p=e[d.charCodeAt(I)]<<2|e[d.charCodeAt(I+1)]>>4,A[S++]=p&255),b===1&&(p=e[d.charCodeAt(I)]<<10|e[d.charCodeAt(I+1)]<<4|e[d.charCodeAt(I+2)]>>2,A[S++]=p>>8&255,A[S++]=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,S=0,E=y-v;S<E;S+=A)b.push(f(d,S,S+A>E?E:S+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 Ca}var Ul={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var n2;function j_(){return n2||(n2=1,Ul.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)},Ul.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}),Ul}/*!
645
+ </div>`)}}n()?this.loadingIndicatorsElement.style.display="block":setTimeout(()=>{n()||(this.loadingIndicatorsElement.style.display="none")},3e3),As(e,this.loadingIndicatorsElement)}destroy(){var n;const e=q(this,pn,Bu);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 r_(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome));const e=this,n={dataFlow:new Vb,glHelper:this._glHelper,animator:this.animator,genomeStore:this.genomeStore,fontManager:new s_(this._glHelper),requestLayoutReflow:()=>{},updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this._currentHover,setDataLoadingStatus:(c,l,u)=>{this._loadingViews.set(c,{status:l,detail:u}),this._updateLoadingIndicators()},addKeyboardListener:(c,l)=>{document.addEventListener(c,l);let u=this._keyboardListeners.get(c);u||(u=[],this._keyboardListeners.set(c,u)),u.push(l)},addBroadcastListener(c,l){const u=e._extraBroadcastListeners;let f=u.get(c);f||(f=new Set,u.set(c,f)),f.add(l)},removeBroadcastListener(c,l){var f;(f=e._extraBroadcastListeners.get(c))==null||f.delete(l)},isViewConfiguredVisible:e.viewVisibilityPredicate,isViewSpec:c=>e.viewFactory.isViewSpec(c),createOrImportView:async function(c,l,u,f,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,c2),q(this,pn,Bu).style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",pe(this,pn,Qv).call(this),Qk(this.viewRoot),Zk(this.viewRoot);const o=this.viewRoot.getDescendants();o.forEach(c=>c.configureViewOpacity()),this._glHelper.invalidateSize(),pe(this,pn,Zv).call(this);const i=o.filter(c=>c instanceof en),s=Hk(this.viewRoot,n.dataFlow);Yk(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())),rd(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=>Nl(c,"size")),this._glHelper.invalidateSize()}async launch(){try{return pe(this,pn,Xv).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),J_(this.container,n),!1}finally{q(this,pn,Bu).classList.remove("loading"),window.setTimeout(()=>{this.loadingMessageElement.style.display="none"},2e3)}}registerMouseEvents(){const e=this._glHelper.canvas;let n=performance.now(),r=!1;const o=i=>{var c,l;const s=performance.now(),a=s-n<200;if(i instanceof MouseEvent){const u=e.getBoundingClientRect(),f=new Xt(i.clientX-u.left-e.clientLeft,i.clientY-u.top-e.clientTop);i.type=="mousemove"&&!a&&(this.tooltip.handleMouseMove(i),this._tooltipUpdateRequested=!1,i.buttons==0&&!t2()&&(this.renderPickingFramebuffer(),this._handlePicking(f.x,f.y)));const h=d=>{this.viewRoot.propagateInteractionEvent(new $k(f,d)),this._tooltipUpdateRequested||this.tooltip.clear()};if(i.type!="wheel"&&this._wheelInertia.cancel(),(i.type=="mousedown"||i.type=="mouseup")&&!t2())this.renderPickingFramebuffer();else if(i.type=="wheel"){n=s,this._tooltipUpdateRequested=!1;const d=i;if(Math.abs(d.deltaX)>Math.abs(d.deltaY))this._currentHover=null,this._wheelInertia.cancel();else{const p=f_(d);this._wheelInertia.setMomentum(d.deltaY*(d.deltaMode?80:1),b=>{const v=new WheelEvent("wheel",{...p,deltaMode:0,deltaX:0,deltaY:b});h(v)}),d.preventDefault();return}}if(i.type=="click"){if(r)return;const d=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(d))}(i.type!="click"||((l=this._mouseDownCoords)==null?void 0:l.subtract(Xt.fromMouseEvent(i)).length)<3)&&h(i)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu","dblclick"].forEach(i=>e.addEventListener(i,o)),e.addEventListener("mousedown",i=>{this._mouseDownCoords=Xt.fromMouseEvent(i),this.tooltip.sticky?(this.tooltip.sticky=!1,this.tooltip.clear(),r=!0):r=!1;const s=()=>{document.addEventListener("mouseup",()=>this.tooltip.popEnabledState(),{once:!0}),this.tooltip.pushEnabledState(!1)};if(i.button==2||i.shiftKey||i.ctrlKey||i.metaKey)s();else if(this.tooltip.visible){const a=setTimeout(()=>{r=!0,this.tooltip.sticky=!0},400),c=()=>clearTimeout(a);document.addEventListener("mouseup",c,{once:!0}),document.addEventListener("mousemove",c,{once:!0})}}),e.addEventListener("dragstart",i=>i.stopPropagation())}_handlePicking(e,n){var s;const r=this.dpr,o=kT(this._glHelper.gl,this._glHelper._pickingBufferInfo,e*r,n*r),i=o[0]|o[1]<<8|o[2]<<16|o[3]<<24;if(i==0){this._currentHover=null;return}if(i!==((s=this._currentHover)==null?void 0:s.uniqueId)&&(this._currentHover=null),this._currentHover||this.viewRoot.visit(a=>{if(a instanceof en){if(a.mark.isPickingParticipant()&&[...a.facetCoords.values()].some(c=>c.containsPoint(e,n))){const c=a.getCollector().findDatumByUniqueId(i);c&&(this._currentHover={mark:a.mark,datum:c,uniqueId:i})}if(this._currentHover)return Ca}}),this._currentHover){const a=this._currentHover.mark;this.updateTooltip(this._currentHover.datum,async c=>{if(!a.isPickingParticipant())return;const l=a.properties.tooltip;if(l!==null){const u=(l==null?void 0:l.handler)??"default",f=this.tooltipHandlers[u];if(!f)throw new Error("No such tooltip handler: "+u);return f(c,a,l==null?void 0:l.params)}})}}updateTooltip(e,n){if(!this._tooltipUpdateRequested||!e)this.tooltip.updateWithDatum(e,n),this._tooltipUpdateRequested=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}exportCanvas(e,n,r,o="white"){const i=this._glHelper;e??(e=i.getLogicalCanvasSize().width),n??(n=i.getLogicalCanvasSize().height),r??(r=window.devicePixelRatio??1);const s=i.gl,a=Math.floor(e*r),c=Math.floor(n*r),l=Dm(s,[{format:s.RGBA,type:s.UNSIGNED_BYTE,minMag:s.LINEAR,wrap:s.CLAMP_TO_EDGE}],a,c),u=new ud({picking:!1},{webGLHelper:this._glHelper,canvasSize:{width:e,height:n},devicePixelRatio:r,clearColor:o,framebufferInfo:l});this.viewRoot.render(u,Sn.create(0,0,e,n)),u.render();const f=_T(s,l,"image/png");return this.computeLayout(),this.renderAll(),f}computeLayout(){const e=this.viewRoot;if(!e)return;this.broadcast("layout");const n=this._glHelper.getLogicalCanvasSize();if(isNaN(n.width)||isNaN(n.height)){console.log(`NaN in canvas size: ${n.width}x${n.height}. Skipping computeLayout().`);return}const r={webGLHelper:this._glHelper,canvasSize:n,devicePixelRatio:window.devicePixelRatio??1};this._renderingContext=new ud({picking:!1},{...r,clearColor:this.spec.background}),this._pickingContext=new ud({picking:!0},{...r,framebufferInfo:this._glHelper._pickingBufferInfo}),e.render(new Jk(this._renderingContext,this._pickingContext),Sn.create(0,0,n.width,n.height)),this._updateLoadingIndicators(),this.broadcast("layoutComputed")}renderAll(){var e;(e=this._renderingContext)==null||e.render(),this._dirtyPickingBuffer=!0}renderPickingFramebuffer(){this._dirtyPickingBuffer&&(this._pickingContext.render(),this._dirtyPickingBuffer=!1)}getSearchableViews(){const e=[];return this.viewRoot.visit(n=>{n instanceof en&&n.getDataAccessor("search")&&e.push(n)}),e}getNamedScaleResolutions(){const e=new Map;return this.viewRoot.visit(n=>{for(const r of Object.values(n.resolutions.scale))r.name&&e.set(r.name,r)}),e}}pn=new WeakSet,Bu=function(){return this.container.querySelector(".canvas-wrapper")},Qv=function(){const e=[];this.viewRoot.visit(r=>{const o=r.paramMediator;e.push(...K_(o))});const n=this.options.inputBindingContainer;if(!(!n||n=="none"||!e.length)){if(this._inputBindingContainer=Yl("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&&As(ot`<div class="gs-input-binding">${e}</div>`,this._inputBindingContainer)}},Zv=function(){const e=this.viewRoot.paramMediator.allocateSetter("devicePixelRatio",this.dpr),n=()=>{this._glHelper.invalidateSize(),this.dpr=window.devicePixelRatio,e(this.dpr),this.computeLayout(),this.renderAll()};if(this.viewRoot.getSize().isGrowing()){const i=new ResizeObserver(n);i.observe(this.container),this._destructionCallbacks.push(()=>i.disconnect())}let r=null;const o=()=>{r!=null&&(r(),n());const i=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);i.addEventListener("change",o),r=()=>{i.removeEventListener("change",o)}};o(),r&&this._destructionCallbacks.push(r)},Xv=function(){this.container.classList.add("genome-spy");const e=document.createElement("style");e.innerHTML=lS,this.container.appendChild(e);const n=Yl("div",{class:"canvas-wrapper"});this.container.appendChild(n),n.classList.add("loading"),this._glHelper=new TT(n,()=>this.viewRoot?Kk(this.viewRoot):{width:void 0,height:void 0},{powerPreference:this.options.powerPreference??"default"}),this.loadingMessageElement=Yl("div",{class:"loading-message",innerHTML:'<div class="message">Loading<span class="ellipsis">...</span></div>'}),n.appendChild(this.loadingMessageElement),this.loadingIndicatorsElement=Yl("div",{class:"loading-indicators"}),n.appendChild(this.loadingIndicatorsElement),this.tooltip=new fS(this.container),this.loadingMessageElement.querySelector(".message").addEventListener("transitionend",()=>{this.loadingMessageElement.style.display="none"})};function J_(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 Yl(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 $_="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",eR="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 tR(t,e,n={}){let r;if(rt(t)){if(r=document.querySelector(t),!r)throw new Error(`No such element: ${t}`)}else if(t instanceof HTMLElement)r=t;else throw new Error(`Invalid element: ${t}`);let o;try{const i=Rt(e)?e:await h2(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 f2(r,i,n),nR(o,n),await o.launch()}catch(i){r.innerText=i.toString(),console.error(i)}return{finalize(){for(o.destroy();r.firstChild;)r.firstChild.remove()},addEventListener(i,s){const a=o._eventListeners;let c=a.get(i);c||(c=new Set,a.set(i,c)),c.add(s)},removeEventListener(i,s){var c;(c=o._eventListeners.get(i))==null||c.delete(s)},getScaleResolutionByName(i){return o.getNamedScaleResolutions().get(i)},updateNamedData:o.updateNamedData.bind(o),exportCanvas:o.exportCanvas.bind(o)}}function nR(t,e){e.namedDataProvider&&t.registerNamedDataProvider(e.namedDataProvider)}async function h2(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 Ql(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function rR(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 wd={},Da={},d2;function iR(){if(d2)return Da;d2=1,Da.byteLength=a,Da.toByteArray=l,Da.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 b=d.indexOf("=");b===-1&&(b=p);var v=b===p?0:4-b%4;return[b,v]}function a(d){var p=s(d),b=p[0],v=p[1];return(b+v)*3/4-v}function c(d,p,b){return(p+b)*3/4-b}function l(d){var p,b=s(d),v=b[0],y=b[1],A=new n(c(d,v,y)),S=0,E=y>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[S++]=p>>16&255,A[S++]=p>>8&255,A[S++]=p&255;return y===2&&(p=e[d.charCodeAt(I)]<<2|e[d.charCodeAt(I+1)]>>4,A[S++]=p&255),y===1&&(p=e[d.charCodeAt(I)]<<10|e[d.charCodeAt(I+1)]<<4|e[d.charCodeAt(I+2)]>>2,A[S++]=p>>8&255,A[S++]=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,b){for(var v,y=[],A=p;A<b;A+=3)v=(d[A]<<16&16711680)+(d[A+1]<<8&65280)+(d[A+2]&255),y.push(u(v));return y.join("")}function h(d){for(var p,b=d.length,v=b%3,y=[],A=16383,S=0,E=b-v;S<E;S+=A)y.push(f(d,S,S+A>E?E:S+A));return v===1?(p=d[b-1],y.push(t[p>>2]+t[p<<4&63]+"==")):v===2&&(p=(d[b-2]<<8)+d[b-1],y.push(t[p>>10]+t[p>>4&63]+t[p<<2&63]+"=")),y.join("")}return Da}var Zl={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var p2;function oR(){return p2||(p2=1,Zl.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)},Zl.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,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+=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]|=b*128}),Zl}/*!
646
646
  * The buffer module from node.js, for the browser.
647
647
  *
648
648
  * @author Feross Aboukhadijeh <https://feross.org>
649
649
  * @license MIT
650
- */var r2;function Ia(){return r2||(r2=1,function(t){const e=q_(),n=j_(),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 h(k,m);if(ArrayBuffer.isView(k))return p(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if($e(k,ArrayBuffer)||k&&$e(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($e(k,SharedArrayBuffer)||k&&$e(k.buffer,SharedArrayBuffer)))return y(k,m,w);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const O=k.valueOf&&k.valueOf();if(O!=null&&O!==k)return a.from(O,m,w);const x=v(k);if(x)return x;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return a.from(k[Symbol.toPrimitive]("string"),m,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}a.from=function(k,m,w){return c(k,m,w)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function u(k,m,w){return l(k),k<=0?s(k):m!==void 0?typeof w=="string"?s(k).fill(m,w):s(k).fill(m):s(k)}a.alloc=function(k,m,w){return u(k,m,w)};function f(k){return l(k),s(k<0?0:b(k)|0)}a.allocUnsafe=function(k){return f(k)},a.allocUnsafeSlow=function(k){return f(k)};function h(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 d(k){const m=k.length<0?0:b(k.length)|0,w=s(m);for(let O=0;O<m;O+=1)w[O]=k[O]&255;return w}function p(k){if($e(k,Uint8Array)){const m=new Uint8Array(k);return y(m.buffer,m.byteOffset,m.byteLength)}return d(k)}function y(k,m,w){if(m<0||k.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<m+(w||0))throw new RangeError('"length" is outside of buffer bounds');let O;return m===void 0&&w===void 0?O=new Uint8Array(k):w===void 0?O=new Uint8Array(k,m):O=new Uint8Array(k,m,w),Object.setPrototypeOf(O,a.prototype),O}function v(k){if(a.isBuffer(k)){const m=b(k.length)|0,w=s(m);return w.length===0||k.copy(w,0,0,m),w}if(k.length!==void 0)return typeof k.length!="number"||kt(k.length)?s(0):d(k);if(k.type==="Buffer"&&Array.isArray(k.data))return d(k.data)}function b(k){if(k>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return k|0}function A(k){return+k!=k&&(k=0),a.alloc(+k)}a.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==a.prototype},a.compare=function(m,w){if($e(m,Uint8Array)&&(m=a.from(m,m.offset,m.byteLength)),$e(w,Uint8Array)&&(w=a.from(w,w.offset,w.byteLength)),!a.isBuffer(m)||!a.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(m===w)return 0;let O=m.length,x=w.length;for(let z=0,V=Math.min(O,x);z<V;++z)if(m[z]!==w[z]){O=m[z],x=w[z];break}return O<x?-1:x<O?1:0},a.isEncoding=function(m){switch(String(m).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(m,w){if(!Array.isArray(m))throw new TypeError('"list" argument must be an Array of Buffers');if(m.length===0)return a.alloc(0);let O;if(w===void 0)for(w=0,O=0;O<m.length;++O)w+=m[O].length;const x=a.allocUnsafe(w);let z=0;for(O=0;O<m.length;++O){let V=m[O];if($e(V,Uint8Array))z+V.length>x.length?(a.isBuffer(V)||(V=a.from(V)),V.copy(x,z)):Uint8Array.prototype.set.call(x,V,z);else if(a.isBuffer(V))V.copy(x,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=V.length}return x};function S(k,m){if(a.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||$e(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const w=k.length,O=arguments.length>2&&arguments[2]===!0;if(!O&&w===0)return 0;let x=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return Ee(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:Ee(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 oe(this,m,w);case"ascii":return ce(this,m,w);case"latin1":case"binary":return be(this,m,w);case"base64":return Q(this,m,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ie(this,m,w);default:if(O)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),O=!0}}a.prototype._isBuffer=!0;function I(k,m,w){const O=k[m];k[m]=k[w],k[w]=O}a.prototype.swap16=function(){const m=this.length;if(m%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<m;w+=2)I(this,w,w+1);return this},a.prototype.swap32=function(){const m=this.length;if(m%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<m;w+=4)I(this,w,w+3),I(this,w+1,w+2);return this},a.prototype.swap64=function(){const m=this.length;if(m%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<m;w+=8)I(this,w,w+7),I(this,w+1,w+6),I(this,w+2,w+5),I(this,w+3,w+4);return this},a.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?oe(this,0,m):E.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(m){if(!a.isBuffer(m))throw new TypeError("Argument must be a Buffer");return this===m?!0:a.compare(this,m)===0},a.prototype.inspect=function(){let m="";const w=t.INSPECT_MAX_BYTES;return m=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(m+=" ... "),"<Buffer "+m+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(m,w,O,x,z){if($e(m,Uint8Array)&&(m=a.from(m,m.offset,m.byteLength)),!a.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(w===void 0&&(w=0),O===void 0&&(O=m?m.length:0),x===void 0&&(x=0),z===void 0&&(z=this.length),w<0||O>m.length||x<0||z>this.length)throw new RangeError("out of range index");if(x>=z&&w>=O)return 0;if(x>=z)return-1;if(w>=O)return 1;if(w>>>=0,O>>>=0,x>>>=0,z>>>=0,this===m)return 0;let V=z-x,ue=O-w;const G=Math.min(V,ue),X=this.slice(x,z),T=m.slice(w,O);for(let re=0;re<G;++re)if(X[re]!==T[re]){V=X[re],ue=T[re];break}return V<ue?-1:ue<V?1:0};function _(k,m,w,O,x){if(k.length===0)return-1;if(typeof w=="string"?(O=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,kt(w)&&(w=x?0:k.length-1),w<0&&(w=k.length+w),w>=k.length){if(x)return-1;w=k.length-1}else if(w<0)if(x)w=0;else return-1;if(typeof m=="string"&&(m=a.from(m,O)),a.isBuffer(m))return m.length===0?-1:B(k,m,w,O,x);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?x?Uint8Array.prototype.indexOf.call(k,m,w):Uint8Array.prototype.lastIndexOf.call(k,m,w):B(k,[m],w,O,x);throw new TypeError("val must be string, number or Buffer")}function B(k,m,w,O,x){let z=1,V=k.length,ue=m.length;if(O!==void 0&&(O=String(O).toLowerCase(),O==="ucs2"||O==="ucs-2"||O==="utf16le"||O==="utf-16le")){if(k.length<2||m.length<2)return-1;z=2,V/=2,ue/=2,w/=2}function G(T,re){return z===1?T[re]:T.readUInt16BE(re*z)}let X;if(x){let T=-1;for(X=w;X<V;X++)if(G(k,X)===G(m,T===-1?0:X-T)){if(T===-1&&(T=X),X-T+1===ue)return T*z}else T!==-1&&(X-=X-T),T=-1}else for(w+ue>V&&(w=V-ue),X=w;X>=0;X--){let T=!0;for(let re=0;re<ue;re++)if(G(k,X+re)!==G(m,re)){T=!1;break}if(T)return X}return-1}a.prototype.includes=function(m,w,O){return this.indexOf(m,w,O)!==-1},a.prototype.indexOf=function(m,w,O){return _(this,m,w,O,!0)},a.prototype.lastIndexOf=function(m,w,O){return _(this,m,w,O,!1)};function N(k,m,w,O){w=Number(w)||0;const x=k.length-w;O?(O=Number(O),O>x&&(O=x)):O=x;const z=m.length;O>z/2&&(O=z/2);let V;for(V=0;V<O;++V){const ue=parseInt(m.substr(V*2,2),16);if(kt(ue))return V;k[w+V]=ue}return V}function F(k,m,w,O){return It(Ee(m,k.length-w),k,w,O)}function M(k,m,w,O){return It(Re(m),k,w,O)}function C(k,m,w,O){return It($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 F(this,m,w,O);case"ascii":case"latin1":case"binary":return M(this,m,w,O);case"base64":return C(this,m,w,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,m,w,O);default:if(V)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),V=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(k,m,w){return m===0&&w===k.length?e.fromByteArray(k):e.fromByteArray(k.slice(m,w))}function oe(k,m,w){w=Math.min(k.length,w);const O=[];let x=m;for(;x<w;){const z=k[x];let V=null,ue=z>239?4:z>223?3:z>191?2:1;if(x+ue<=w){let G,X,T,re;switch(ue){case 1:z<128&&(V=z);break;case 2:G=k[x+1],(G&192)===128&&(re=(z&31)<<6|G&63,re>127&&(V=re));break;case 3:G=k[x+1],X=k[x+2],(G&192)===128&&(X&192)===128&&(re=(z&15)<<12|(G&63)<<6|X&63,re>2047&&(re<55296||re>57343)&&(V=re));break;case 4:G=k[x+1],X=k[x+2],T=k[x+3],(G&192)===128&&(X&192)===128&&(T&192)===128&&(re=(z&15)<<18|(G&63)<<12|(X&63)<<6|T&63,re>65535&&re<1114112&&(V=re))}}V===null?(V=65533,ue=1):V>65535&&(V-=65536,O.push(V>>>10&1023|55296),V=56320|V&1023),O.push(V),x+=ue}return ae(O)}const se=4096;function ae(k){const m=k.length;if(m<=se)return String.fromCharCode.apply(String,k);let w="",O=0;for(;O<m;)w+=String.fromCharCode.apply(String,k.slice(O,O+=se));return w}function ce(k,m,w){let O="";w=Math.min(k.length,w);for(let x=m;x<w;++x)O+=String.fromCharCode(k[x]&127);return O}function be(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+=zt[k[z]];return x}function Ie(k,m,w){const O=k.slice(m,w);let x="";for(let z=0;z<O.length-1;z+=2)x+=String.fromCharCode(O[z]+O[z+1]*256);return x}a.prototype.slice=function(m,w){const O=this.length;m=~~m,w=w===void 0?O:~~w,m<0?(m+=O,m<0&&(m=0)):m>O&&(m=O),w<0?(w+=O,w<0&&(w=0)):w>O&&(w=O),w<m&&(w=m);const x=this.subarray(m,w);return Object.setPrototypeOf(x,a.prototype),x};function me(k,m,w){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+m>w)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=this[m],z=1,V=0;for(;++V<w&&(z*=256);)x+=this[m+V]*z;return x},a.prototype.readUintBE=a.prototype.readUIntBE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=this[m+--w],z=1;for(;w>0&&(z*=256);)x+=this[m+--w]*z;return x},a.prototype.readUint8=a.prototype.readUInt8=function(m,w){return m=m>>>0,w||me(m,1,this.length),this[m]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(m,w){return m=m>>>0,w||me(m,2,this.length),this[m]|this[m+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(m,w){return m=m>>>0,w||me(m,2,this.length),this[m]<<8|this[m+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(m,w){return m=m>>>0,w||me(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+this[m+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(m,w){return m=m>>>0,w||me(m,4,this.length),this[m]*16777216+(this[m+1]<<16|this[m+2]<<8|this[m+3])},a.prototype.readBigUInt64LE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=w+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24,z=this[++m]+this[++m]*2**8+this[++m]*2**16+O*2**24;return BigInt(x)+(BigInt(z)<<BigInt(32))}),a.prototype.readBigUInt64BE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=w*2**24+this[++m]*2**16+this[++m]*2**8+this[++m],z=this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+O;return(BigInt(x)<<BigInt(32))+BigInt(z)}),a.prototype.readIntLE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=this[m],z=1,V=0;for(;++V<w&&(z*=256);)x+=this[m+V]*z;return z*=128,x>=z&&(x-=Math.pow(2,8*w)),x},a.prototype.readIntBE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=w,z=1,V=this[m+--x];for(;x>0&&(z*=256);)V+=this[m+--x]*z;return z*=128,V>=z&&(V-=Math.pow(2,8*w)),V},a.prototype.readInt8=function(m,w){return m=m>>>0,w||me(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},a.prototype.readInt16LE=function(m,w){m=m>>>0,w||me(m,2,this.length);const O=this[m]|this[m+1]<<8;return O&32768?O|4294901760:O},a.prototype.readInt16BE=function(m,w){m=m>>>0,w||me(m,2,this.length);const O=this[m+1]|this[m]<<8;return O&32768?O|4294901760:O},a.prototype.readInt32LE=function(m,w){return m=m>>>0,w||me(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},a.prototype.readInt32BE=function(m,w){return m=m>>>0,w||me(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},a.prototype.readBigInt64LE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(O<<24);return(BigInt(x)<<BigInt(32))+BigInt(w+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24)}),a.prototype.readBigInt64BE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=(w<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(x)<<BigInt(32))+BigInt(this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+O)}),a.prototype.readFloatLE=function(m,w){return m=m>>>0,w||me(m,4,this.length),n.read(this,m,!0,23,4)},a.prototype.readFloatBE=function(m,w){return m=m>>>0,w||me(m,4,this.length),n.read(this,m,!1,23,4)},a.prototype.readDoubleLE=function(m,w){return m=m>>>0,w||me(m,8,this.length),n.read(this,m,!0,52,8)},a.prototype.readDoubleBE=function(m,w){return m=m>>>0,w||me(m,8,this.length),n.read(this,m,!1,52,8)};function Ae(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;Ae(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;Ae(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||Ae(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||Ae(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||Ae(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||Ae(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||Ae(this,m,w,4,4294967295,0),this[w]=m>>>24,this[w+1]=m>>>16,this[w+2]=m>>>8,this[w+3]=m&255,w+4};function De(k,m,w,O,x){D(m,O,x,k,w,7);let z=Number(m&BigInt(4294967295));k[w++]=z,z=z>>8,k[w++]=z,z=z>>8,k[w++]=z,z=z>>8,k[w++]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return k[w++]=V,V=V>>8,k[w++]=V,V=V>>8,k[w++]=V,V=V>>8,k[w++]=V,w}function Ge(k,m,w,O,x){D(m,O,x,k,w,7);let z=Number(m&BigInt(4294967295));k[w+7]=z,z=z>>8,k[w+6]=z,z=z>>8,k[w+5]=z,z=z>>8,k[w+4]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return k[w+3]=V,V=V>>8,k[w+2]=V,V=V>>8,k[w+1]=V,V=V>>8,k[w]=V,w+8}a.prototype.writeBigUInt64LE=et(function(m,w=0){return De(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=et(function(m,w=0){return Ge(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(m,w,O,x){if(m=+m,w=w>>>0,!x){const G=Math.pow(2,8*O-1);Ae(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);Ae(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||Ae(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||Ae(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||Ae(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||Ae(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||Ae(this,m,w,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[w]=m>>>24,this[w+1]=m>>>16,this[w+2]=m>>>8,this[w+3]=m&255,w+4},a.prototype.writeBigInt64LE=et(function(m,w=0){return De(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=et(function(m,w=0){return Ge(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ve(k,m,w,O,x,z){if(w+O>k.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function q(k,m,w,O,x){return m=+m,w=w>>>0,x||Ve(k,m,w,4),n.write(k,m,w,O,23,4),w+4}a.prototype.writeFloatLE=function(m,w,O){return q(this,m,w,!0,O)},a.prototype.writeFloatBE=function(m,w,O){return q(this,m,w,!1,O)};function 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 Ee(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 kt(k){return k!==k}const zt=function(){const k="0123456789abcdef",m=new Array(256);for(let w=0;w<16;++w){const O=w*16;for(let x=0;x<16;++x)m[O+x]=k[w]+k[x]}return m}();function et(k){return typeof BigInt>"u"?Ut:k}function Ut(){throw new Error("BigInt not supported")}}(cd)),cd}var Ke=Ia();const W_=Ye({__proto__:null,default:zl(Ke)},[Ke]),Ct={},Y_=Object.freeze(Object.defineProperty({__proto__:null,default:Ct},Symbol.toStringTag,{value:"Module"}));function i2(t){return(typeof t=="object"&&t!==null&&"message"in t?t.message:`${t}`).replace(/\.$/,"")}class Sn{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(`${i2(i)} fetching ${e}`,{cause:i})}}else throw new Error(`${i2(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 o2(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 Q_(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 Z_{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 o2(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 Q_(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await o2(this.blob);return Ke.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function s2(t,e={}){return new Sn(t,e)}function X_(t,e,n,r={}){if(n!==void 0)return n;if(t!==void 0)return s2(t,r);if(e!==void 0)return new Ct(e,r);throw new Error("no url, path, or filehandle provided, cannot open")}const Ta=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:Z_,LocalFile:Ct,RemoteFile:Sn,fromUrl:s2,open:X_},Symbol.toStringTag,{value:"Module"}));var ld={},a2;function Or(){return a2||(a2=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)}(ld)),ld}var Eo={},Cn={},Ci={},c2;function K_(){if(c2)return Ci;c2=1;var t=Or(),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,S=7,E=256,I=16,_=17,B=18,N=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],F=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=512,Q=new Array((d+2)*2);i(Q);var oe=new Array(p*2);i(oe);var se=new Array(Y);i(se);var ae=new Array(u-l+1);i(ae);var ce=new Array(f);i(ce);var be=new Array(p);i(be);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 Ie,me,Ae;function De(x,z){this.dyn_tree=x,this.max_code=0,this.stat_desc=z}function Ge(x){return x<256?se[x]:se[256+(x>>>7)]}function Ve(x,z){x.pending_buf[x.pending++]=z&255,x.pending_buf[x.pending++]=z>>>8&255}function q(x,z,V){x.bi_valid>A-V?(x.bi_buf|=z<<x.bi_valid&65535,Ve(x,x.bi_buf),x.bi_buf=z>>A-x.bi_valid,x.bi_valid+=V-A):(x.bi_buf|=z<<x.bi_valid&65535,x.bi_valid+=V)}function 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<=b;R++)x.bl_count[R]=0;for(V[x.heap[x.heap_max]*2+1]=0,g=x.heap_max+1;g<v;g++)K=x.heap[g],R=V[V[K*2+1]*2+1]+1,R>_e&&(R=_e,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(b+1),G=0,X,T;for(X=1;X<=b;X++)ue[X]=G=G+V[X-1]<<1;for(T=0;T<=z;T++){var re=x[T*2+1];re!==0&&(x[T*2]=ee(ue[re]++,re))}}function D(){var x,z,V,ue,G,X=new Array(b+1);for(V=0,ue=0;ue<f-1;ue++)for(ce[ue]=V,x=0;x<1<<N[ue];x++)ae[V++]=ue;for(ae[V-1]=ue,G=0,ue=0;ue<16;ue++)for(be[ue]=G,x=0;x<1<<F[ue];x++)se[G++]=ue;for(G>>=7;ue<p;ue++)for(be[ue]=G<<7,x=0;x<1<<F[ue]-7;x++)se[256+G++]=ue;for(z=0;z<=b;z++)X[z]=0;for(x=0;x<=143;)Q[x*2+1]=8,x++,X[8]++;for(;x<=255;)Q[x*2+1]=9,x++,X[9]++;for(;x<=279;)Q[x*2+1]=7,x++,X[7]++;for(;x<=287;)Q[x*2+1]=8,x++,X[8]++;for(L(Q,d+1,X),x=0;x<p;x++)oe[x*2+1]=5,oe[x*2]=ee(x,5);Ie=new he(Q,N,h+1,d,b),me=new he(oe,F,0,p,b),Ae=new he(new Array(0),M,0,y,S)}function te(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 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 Ee(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+h+1,z),re=N[T],re!==0&&(G-=ce[T],q(x,G,re)),ue--,T=Ge(ue),j(x,T,V),re=F[T],re!==0&&(ue-=be[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--)Ee(x,V,T);g=X;do T=x.heap[1],x.heap[1]=x.heap[x.heap_len--],Ee(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++,Ee(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=y-1;z>=3&&x.bl_tree[C[z]*2+1]===0;z--);return x.opt_len+=3*(z+1)+5+5+4,z}function kt(x,z,V,ue){var G;for(q(x,z-257,5),q(x,V-1,5),q(x,ue-4,4),G=0;G<ue;G++)q(x,x.bl_tree[C[G]*2+1],3);It(x,x.dyn_ltree,z-1),It(x,x.dyn_dtree,V-1)}function zt(x){var z=4093624447,V;for(V=0;V<=31;V++,z>>>=1)if(z&1&&x.dyn_ltree[V*2]!==0)return n;if(x.dyn_ltree[9*2]!==0||x.dyn_ltree[10*2]!==0||x.dyn_ltree[13*2]!==0)return r;for(V=32;V<h;V++)if(x.dyn_ltree[V*2]!==0)return r;return n}var et=!1;function Ut(x){et||(D(),et=!0),x.l_desc=new De(x.dyn_ltree,Ie),x.d_desc=new De(x.dyn_dtree,me),x.bl_desc=new De(x.bl_tree,Ae),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=zt(x)),dt(x,x.l_desc),dt(x,x.d_desc),T=$e(x),G=x.opt_len+3+7>>>3,X=x.static_len+3+7>>>3,X<=G&&(G=X)):G=X=V+5,V+4<=G&&z!==-1?k(x,z,V,ue):x.strategy===e||X===G?(q(x,(a<<1)+(ue?1:0),3),Re(x,Q,oe)):(q(x,(c<<1)+(ue?1:0),3),kt(x,x.l_desc.max_code+1,x.d_desc.max_code+1,T+1),Re(x,x.dyn_ltree,x.dyn_dtree)),te(x),ue&&le(x)}function O(x,z,V){return x.pending_buf[x.d_buf+x.last_lit*2]=z>>>8&255,x.pending_buf[x.d_buf+x.last_lit*2+1]=z&255,x.pending_buf[x.l_buf+x.last_lit]=V&255,x.last_lit++,z===0?x.dyn_ltree[V*2]++:(x.matches++,z--,x.dyn_ltree[(ae[V]+h+1)*2]++,x.dyn_dtree[Ge(z)*2]++),x.last_lit===x.lit_bufsize-1}return Ci._tr_init=Ut,Ci._tr_stored_block=k,Ci._tr_flush_block=w,Ci._tr_tally=O,Ci._tr_align=m,Ci}var ud,l2;function u2(){if(l2)return ud;l2=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 ud=t,ud}var fd,f2;function h2(){if(f2)return fd;f2=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 fd=n,fd}var hd,d2;function dd(){return d2||(d2=1,hd={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"}),hd}var p2;function J_(){if(p2)return Cn;p2=1;var t=Or(),e=K_(),n=u2(),r=h2(),o=dd(),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,S=4,E=0,I=2,_=8,B=9,N=15,F=8,M=29,C=256,Y=C+1+M,Q=30,oe=19,se=2*Y+1,ae=15,ce=3,be=258,he=be+ce+1,Ie=32,me=42,Ae=69,De=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 Ee(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,ye=g.nice_match,xe=g.strstart>g.w_size-he?g.strstart-(g.w_size-he):0,Ue=g.window,gn=g.w_mask,U=g.prev,Me=g.strstart+be,lt=Ue[R+Ce-1],tt=Ue[R+Ce];g.prev_length>=g.good_match&&($>>=2),ye>g.lookahead&&(ye=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=be-(Me-R),R=Me-be,Z>Ce){if(g.match_start=K,Ce=Z,Z>=ye)break;lt=Ue[R+Ce-1],tt=Ue[R+Ce]}}while((K=U[K&gn])>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 kt(g,K){var $=65535;for($>g.pending_buf_size-5&&($=g.pending_buf_size-5);;){if(g.lookahead<=1){if($e(g),g.lookahead===0&&K===i)return ee;if(g.lookahead===0)break}g.strstart+=g.lookahead,g.lookahead=0;var R=g.block_start+$;if((g.strstart===0||g.strstart>=R)&&(g.lookahead=g.strstart-R,g.strstart=R,Ee(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-he&&(Ee(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Ee(g,!0),g.strm.avail_out===0?fe:L):(g.strstart>g.block_start&&(Ee(g,!1),g.strm.avail_out===0),ee)}function zt(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&&(Ee(g,!1),g.strm.avail_out===0))return ee}return g.insert=g.strstart<ce-1?g.strstart:ce-1,K===c?(Ee(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Ee(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&&(Ee(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&&Ee(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?(Ee(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Ee(g,!1),g.strm.avail_out===0)?ee:J}function Ut(g,K){for(var $,R,H,Z,Ce=g.window;;){if(g.lookahead<=be){if($e(g),g.lookahead<=be&&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+be;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=be-(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++),$&&(Ee(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Ee(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Ee(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++,$&&(Ee(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Ee(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Ee(g,!1),g.strm.avail_out===0)?ee:J}function m(g,K,$,R,H){this.good_length=g,this.max_lazy=K,this.nice_length=$,this.max_chain=R,this.func=H}var w;w=[new m(0,0,0,0,kt),new m(4,4,8,4,zt),new m(4,5,16,8,zt),new m(4,6,32,32,zt),new m(4,4,16,16,et),new m(8,16,32,32,et),new m(8,16,128,128,et),new m(8,32,128,256,et),new m(32,128,258,1024,et),new m(32,258,258,4096,et)];function O(g){g.window_size=2*g.w_size,Be(g.head),g.max_lazy_match=w[g.level].max_lazy,g.good_match=w[g.level].good_length,g.nice_match=w[g.level].nice_length,g.max_chain_length=w[g.level].max_chain,g.strstart=0,g.block_start=0,g.lookahead=0,g.insert=0,g.match_length=g.prev_length=ce-1,g.match_available=0,g.ins_h=0}function x(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(se*2),this.dyn_dtree=new t.Buf16((2*Q+1)*2),this.bl_tree=new t.Buf16((2*oe+1)*2),Be(this.dyn_ltree),Be(this.dyn_dtree),Be(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(ae+1),this.heap=new t.Buf16(2*Y+1),Be(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*Y+1),Be(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function z(g){var K;return!g||!g.state?te(g,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?me:q,g.adler=K.wrap===2?0:1,K.last_flush=i,e._tr_init(K),u)}function V(g){var K=z(g);return K===u&&O(g.state),K}function ue(g,K){return!g||!g.state||g.state.wrap!==2?h:(g.state.gzhead=K,u)}function G(g,K,$,R,H,Z){if(!g)return h;var Ce=1;if(K===y&&(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,h);R===8&&(R=9);var ye=new x;return g.state=ye,ye.strm=g,ye.wrap=Ce,ye.gzhead=null,ye.w_bits=R,ye.w_size=1<<ye.w_bits,ye.w_mask=ye.w_size-1,ye.hash_bits=H+7,ye.hash_size=1<<ye.hash_bits,ye.hash_mask=ye.hash_size-1,ye.hash_shift=~~((ye.hash_bits+ce-1)/ce),ye.window=new t.Buf8(ye.w_size*2),ye.head=new t.Buf16(ye.hash_size),ye.prev=new t.Buf16(ye.w_size),ye.lit_bufsize=1<<H+6,ye.pending_buf_size=ye.lit_bufsize*4,ye.pending_buf=new t.Buf8(ye.pending_buf_size),ye.d_buf=1*ye.lit_bufsize,ye.l_buf=3*ye.lit_bufsize,ye.level=K,ye.strategy=Z,ye.method=$,V(g)}function X(g,K){return G(g,K,_,N,F,E)}function T(g,K){var $,R,H,Z;if(!g||!g.state||K>l||K<0)return g?te(g,h):h;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:h);if(R.strm=g,$=R.last_flush,R.last_flush=K,R.status===me)if(R.wrap===2)g.adler=0,Re(R,31),Re(R,139),Re(R,8),R.gzhead?(Re(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),Re(R,R.gzhead.time&255),Re(R,R.gzhead.time>>8&255),Re(R,R.gzhead.time>>16&255),Re(R,R.gzhead.time>>24&255),Re(R,R.level===9?2:R.strategy>=b||R.level<2?4:0),Re(R,R.gzhead.os&255),R.gzhead.extra&&R.gzhead.extra.length&&(Re(R,R.gzhead.extra.length&255),Re(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(g.adler=r(g.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=Ae):(Re(R,0),Re(R,0),Re(R,0),Re(R,0),Re(R,0),Re(R,R.level===9?2:R.strategy>=b||R.level<2?4:0),Re(R,D),R.status=q);else{var Ce=_+(R.w_bits-8<<4)<<8,ye=-1;R.strategy>=b||R.level<2?ye=0:R.level<6?ye=1:R.level===6?ye=2:ye=3,Ce|=ye<<6,R.strstart!==0&&(Ce|=Ie),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===Ae)if(R.gzhead.extra){for(H=R.pending;R.gzindex<(R.gzhead.extra.length&65535)&&!(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),ve(g),H=R.pending,R.pending===R.pending_buf_size));)Re(R,R.gzhead.extra[R.gzindex]&255),R.gzindex++;R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=De)}else R.status=De;if(R.status===De)if(R.gzhead.name){H=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),ve(g),H=R.pending,R.pending===R.pending_buf_size)){Z=1;break}R.gzindex<R.gzhead.name.length?Z=R.gzhead.name.charCodeAt(R.gzindex++)&255:Z=0,Re(R,Z)}while(Z!==0);R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),Z===0&&(R.gzindex=0,R.status=Ge)}else R.status=Ge;if(R.status===Ge)if(R.gzhead.comment){H=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),ve(g),H=R.pending,R.pending===R.pending_buf_size)){Z=1;break}R.gzindex<R.gzhead.comment.length?Z=R.gzhead.comment.charCodeAt(R.gzindex++)&255:Z=0,Re(R,Z)}while(Z!==0);R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),Z===0&&(R.status=Ve)}else R.status=Ve;if(R.status===Ve&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&ve(g),R.pending+2<=R.pending_buf_size&&(Re(R,g.adler&255),Re(R,g.adler>>8&255),g.adler=0,R.status=q)):R.status=q),R.pending!==0){if(ve(g),g.avail_out===0)return R.last_flush=-1,u}else if(g.avail_in===0&&le(K)<=le($)&&K!==c)return te(g,p);if(R.status===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===b?k(R,K):R.strategy===A?Ut(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?h:(K=g.state.status,K!==me&&K!==Ae&&K!==De&&K!==Ge&&K!==Ve&&K!==q&&K!==j?te(g,h):(g.state=null,K===q?te(g,d):u))}function _e(g,K){var $=K.length,R,H,Z,Ce,ye,xe,Ue,gn;if(!g||!g.state||(R=g.state,Ce=R.wrap,Ce===2||Ce===1&&R.status!==me||R.lookahead))return h;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),gn=new t.Buf8(R.w_size),t.arraySet(gn,K,$-R.w_size,R.w_size,0),K=gn,$=R.w_size),ye=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=ye,R.wrap=Ce,u}return Cn.deflateInit=X,Cn.deflateInit2=G,Cn.deflateReset=V,Cn.deflateResetKeep=z,Cn.deflateSetHeader=ue,Cn.deflate=T,Cn.deflateEnd=re,Cn.deflateSetDictionary=_e,Cn.deflateInfo="pako deflate (from Nodeca project)",Cn}var Ii={},g2;function m2(){if(g2)return Ii;g2=1;var t=Or(),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,Ii.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 Ii.buf2binstring=function(s){return i(s,s.length)},Ii.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},Ii.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)},Ii.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},Ii}var pd,b2;function y2(){if(b2)return pd;b2=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 pd=t,pd}var w2;function $_(){if(w2)return Eo;w2=1;var t=J_(),e=Or(),n=m2(),r=dd(),o=y2(),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 S=this.options;S.raw&&S.windowBits>0?S.windowBits=-S.windowBits:S.gzip&&S.windowBits>0&&S.windowBits<16&&(S.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var E=t.deflateInit2(this.strm,S.level,S.method,S.windowBits,S.memLevel,S.strategy);if(E!==c)throw new Error(r[E]);if(S.header&&t.deflateSetHeader(this.strm,S.header),S.dictionary){var I;if(typeof S.dictionary=="string"?I=n.string2buf(S.dictionary):i.call(S.dictionary)==="[object ArrayBuffer]"?I=new Uint8Array(S.dictionary):I=S.dictionary,E=t.deflateSetDictionary(this.strm,I),E!==c)throw new Error(r[E]);this._dict_set=!0}}p.prototype.push=function(A,S){var E=this.strm,I=this.options.chunkSize,_,B;if(this.ended)return!1;B=S===~~S?S:S===!0?a:s,typeof A=="string"?E.input=n.string2buf(A):i.call(A)==="[object ArrayBuffer]"?E.input=new Uint8Array(A):E.input=A,E.next_in=0,E.avail_in=E.input.length;do{if(E.avail_out===0&&(E.output=new e.Buf8(I),E.next_out=0,E.avail_out=I),_=t.deflate(E,B),_!==l&&_!==c)return this.onEnd(_),this.ended=!0,!1;(E.avail_out===0||E.avail_in===0&&(B===a||B===u))&&(this.options.to==="string"?this.onData(n.buf2binstring(e.shrinkBuf(E.output,E.next_out))):this.onData(e.shrinkBuf(E.output,E.next_out)))}while((E.avail_in>0||E.avail_out===0)&&_!==l);return B===a?(_=t.deflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===c):(B===u&&(this.onEnd(c),E.avail_out=0),!0)},p.prototype.onData=function(A){this.chunks.push(A)},p.prototype.onEnd=function(A){A===c&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};function y(A,S){var E=new p(S);if(E.push(A,!0),E.err)throw E.msg||r[E.err];return E.result}function v(A,S){return S=S||{},S.raw=!0,y(A,S)}function b(A,S){return S=S||{},S.gzip=!0,y(A,S)}return Eo.Deflate=p,Eo.deflate=y,Eo.deflateRaw=v,Eo.gzip=b,Eo}var So={},un={},gd,x2;function eR(){if(x2)return gd;x2=1;var t=30,e=12;return gd=function(r,o){var i,s,a,c,l,u,f,h,d,p,y,v,b,A,S,E,I,_,B,N,F,M,C,Y,Q;i=r.state,s=r.next_in,Y=r.input,a=s+(r.avail_in-5),c=r.next_out,Q=r.output,l=c-(o-r.avail_out),u=c+(r.avail_out-257),f=i.dmax,h=i.wsize,d=i.whave,p=i.wnext,y=i.window,v=i.hold,b=i.bits,A=i.lencode,S=i.distcode,E=(1<<i.lenbits)-1,I=(1<<i.distbits)-1;e:do{b<15&&(v+=Y[s++]<<b,b+=8,v+=Y[s++]<<b,b+=8),_=A[v&E];t:for(;;){if(B=_>>>24,v>>>=B,b-=B,B=_>>>16&255,B===0)Q[c++]=_&65535;else if(B&16){N=_&65535,B&=15,B&&(b<B&&(v+=Y[s++]<<b,b+=8),N+=v&(1<<B)-1,v>>>=B,b-=B),b<15&&(v+=Y[s++]<<b,b+=8,v+=Y[s++]<<b,b+=8),_=S[v&I];n:for(;;){if(B=_>>>24,v>>>=B,b-=B,B=_>>>16&255,B&16){if(F=_&65535,B&=15,b<B&&(v+=Y[s++]<<b,b+=8,b<B&&(v+=Y[s++]<<b,b+=8)),F+=v&(1<<B)-1,F>f){r.msg="invalid distance too far back",i.mode=t;break e}if(v>>>=B,b-=B,B=c-l,F>B){if(B=F-B,B>d&&i.sane){r.msg="invalid distance too far back",i.mode=t;break e}if(M=0,C=y,p===0){if(M+=h-B,B<N){N-=B;do Q[c++]=y[M++];while(--B);M=c-F,C=Q}}else if(p<B){if(M+=h+p-B,B-=p,B<N){N-=B;do Q[c++]=y[M++];while(--B);if(M=0,p<N){B=p,N-=B;do Q[c++]=y[M++];while(--B);M=c-F,C=Q}}}else if(M+=p-B,B<N){N-=B;do Q[c++]=y[M++];while(--B);M=c-F,C=Q}for(;N>2;)Q[c++]=C[M++],Q[c++]=C[M++],Q[c++]=C[M++],N-=3;N&&(Q[c++]=C[M++],N>1&&(Q[c++]=C[M++]))}else{M=c-F;do Q[c++]=Q[M++],Q[c++]=Q[M++],Q[c++]=Q[M++],N-=3;while(N>2);N&&(Q[c++]=Q[M++],N>1&&(Q[c++]=Q[M++]))}}else if(B&64){r.msg="invalid distance code",i.mode=t;break e}else{_=S[(_&65535)+(v&(1<<B)-1)];continue n}break}}else if(B&64)if(B&32){i.mode=e;break e}else{r.msg="invalid literal/length code",i.mode=t;break e}else{_=A[(_&65535)+(v&(1<<B)-1)];continue t}break}}while(s<a&&c<u);N=b>>3,s-=N,b-=N<<3,v&=(1<<b)-1,r.next_in=s,r.next_out=c,r.avail_in=s<a?5+(a-s):5-(s-a),r.avail_out=c<u?257+(u-c):257-(c-u),i.hold=v,i.bits=b},gd}var md,v2;function tR(){if(v2)return md;v2=1;var t=Or(),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 md=function(h,d,p,y,v,b,A,S){var E=S.bits,I=0,_=0,B=0,N=0,F=0,M=0,C=0,Y=0,Q=0,oe=0,se,ae,ce,be,he,Ie=null,me=0,Ae,De=new t.Buf16(e+1),Ge=new t.Buf16(e+1),Ve=null,q=0,j,ee,J;for(I=0;I<=e;I++)De[I]=0;for(_=0;_<y;_++)De[d[p+_]]++;for(F=E,N=e;N>=1&&De[N]===0;N--);if(F>N&&(F=N),N===0)return v[b++]=1<<24|64<<16|0,v[b++]=1<<24|64<<16|0,S.bits=1,0;for(B=1;B<N&&De[B]===0;B++);for(F<B&&(F=B),Y=1,I=1;I<=e;I++)if(Y<<=1,Y-=De[I],Y<0)return-1;if(Y>0&&(h===o||N!==1))return-1;for(Ge[1]=0,I=1;I<e;I++)Ge[I+1]=Ge[I]+De[I];for(_=0;_<y;_++)d[p+_]!==0&&(A[Ge[d[p+_]]++]=_);if(h===o?(Ie=Ve=A,Ae=19):h===i?(Ie=a,me-=257,Ve=c,q-=257,Ae=256):(Ie=l,Ve=u,Ae=-1),oe=0,_=0,I=B,he=b,M=F,C=0,ce=-1,Q=1<<F,be=Q-1,h===i&&Q>n||h===s&&Q>r)return 1;for(;;){j=I-C,A[_]<Ae?(ee=0,J=A[_]):A[_]>Ae?(ee=Ve[q+A[_]],J=Ie[me+A[_]]):(ee=96,J=0),se=1<<I-C,ae=1<<M,B=ae;do ae-=se,v[he+(oe>>C)+ae]=j<<24|ee<<16|J|0;while(ae!==0);for(se=1<<I-1;oe&se;)se>>=1;if(se!==0?(oe&=se-1,oe+=se):oe=0,_++,--De[I]===0){if(I===N)break;I=d[p+A[_]]}if(I>F&&(oe&be)!==ce){for(C===0&&(C=F),he+=B,M=I-C,Y=1<<M;M+C<N&&(Y-=De[M+C],!(Y<=0));)M++,Y<<=1;if(Q+=1<<M,h===i&&Q>n||h===s&&Q>r)return 1;ce=oe&be,v[ce]=F<<24|M<<16|he-b|0}}return oe!==0&&(v[he+oe]=I-C<<24|64<<16|0),S.bits=F,0},md}var A2;function nR(){if(A2)return un;A2=1;var t=Or(),e=u2(),n=h2(),r=eR(),o=tR(),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,S=1,E=2,I=3,_=4,B=5,N=6,F=7,M=8,C=9,Y=10,Q=11,oe=12,se=13,ae=14,ce=15,be=16,he=17,Ie=18,me=19,Ae=20,De=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,Ee=15,Re=Ee;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 kt(G,X){var T,re;return!G||!G.state||(re=G.state,X<0?(T=0,X=-X):(T=(X>>4)+1,X<48&&(X&=15)),X&&(X<8||X>15))?p:(re.window!==null&&re.wbits!==X&&(re.window=null),re.wrap=T,re.wbits=X,$e(G))}function zt(G,X){var T,re;return G?(re=new $t,G.state=re,re.window=null,T=kt(G,X),T!==f&&(G.state=null),T):p}function et(G){return zt(G,Re)}var Ut=!0,k,m;function w(G){if(Ut){var X;for(k=new t.Buf32(512),m=new t.Buf32(32),X=0;X<144;)G.lens[X++]=8;for(;X<256;)G.lens[X++]=9;for(;X<280;)G.lens[X++]=7;for(;X<288;)G.lens[X++]=8;for(o(s,G.lens,0,288,k,0,G.work,{bits:9}),X=0;X<32;)G.lens[X++]=5;o(a,G.lens,0,32,m,0,G.work,{bits:5}),Ut=!1}G.lencode=k,G.lenbits=9,G.distcode=m,G.distbits=5}function O(G,X,T,re){var _e,g=G.state;return g.window===null&&(g.wsize=1<<g.wbits,g.wnext=0,g.whave=0,g.window=new t.Buf8(g.wsize)),re>=g.wsize?(t.arraySet(g.window,X,T-g.wsize,g.wsize,0),g.wnext=0,g.whave=g.wsize):(_e=g.wsize-g.wnext,_e>re&&(_e=re),t.arraySet(g.window,X,T-re,_e,g.wnext),re-=_e,re?(t.arraySet(g.window,X,T-re,re,0),g.wnext=re,g.whave=g.wsize):(g.wnext+=_e,g.wnext===g.wsize&&(g.wnext=0),g.whave<g.wsize&&(g.whave+=_e))),0}function x(G,X){var T,re,_e,g,K,$,R,H,Z,Ce,ye,xe,Ue,gn,U=0,Me,lt,tt,Tt,ke,cr,ft,Ne,ht=new t.Buf8(4),Dn,rn,nc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!G||!G.state||!G.output||!G.input&&G.avail_in!==0)return p;T=G.state,T.mode===oe&&(T.mode=se),K=G.next_out,_e=G.output,R=G.avail_out,g=G.next_in,re=G.input,$=G.avail_in,H=T.hold,Z=T.bits,Ce=$,ye=R,Ne=f;e:for(;;)switch(T.mode){case S:if(T.wrap===0){T.mode=se;break}for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(T.wrap&2&&H===35615){T.check=0,ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0),H=0,Z=0,T.mode=E;break}if(T.flags=0,T.head&&(T.head.done=!1),!(T.wrap&1)||(((H&255)<<8)+(H>>8))%31){G.msg="incorrect header check",T.mode=D;break}if((H&15)!==A){G.msg="unknown compression method",T.mode=D;break}if(H>>>=4,Z-=4,ft=(H&15)+8,T.wbits===0)T.wbits=ft;else if(ft>T.wbits){G.msg="invalid window size",T.mode=D;break}T.dmax=1<<ft,G.adler=T.check=1,T.mode=H&512?Y:oe,H=0,Z=0;break;case E:for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(T.flags=H,(T.flags&255)!==A){G.msg="unknown compression method",T.mode=D;break}if(T.flags&57344){G.msg="unknown header flags set",T.mode=D;break}T.head&&(T.head.text=H>>8&1),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,Z=0,T.mode=I;case I:for(;Z<32;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.head&&(T.head.time=H),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,ht[2]=H>>>16&255,ht[3]=H>>>24&255,T.check=n(T.check,ht,4,0)),H=0,Z=0,T.mode=_;case _:for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.head&&(T.head.xflags=H&255,T.head.os=H>>8),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,Z=0,T.mode=B;case B:if(T.flags&1024){for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.length=H,T.head&&(T.head.extra_len=H),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,Z=0}else T.head&&(T.head.extra=null);T.mode=N;case N:if(T.flags&1024&&(xe=T.length,xe>$&&(xe=$),xe&&(T.head&&(ft=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),t.arraySet(T.head.extra,re,g,xe,ft)),T.flags&512&&(T.check=n(T.check,re,xe,g)),$-=xe,g+=xe,T.length-=xe),T.length))break e;T.length=0,T.mode=F;case F:if(T.flags&2048){if($===0)break e;xe=0;do ft=re[g+xe++],T.head&&ft&&T.length<65536&&(T.head.name+=String.fromCharCode(ft));while(ft&&xe<$);if(T.flags&512&&(T.check=n(T.check,re,xe,g)),$-=xe,g+=xe,ft)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=M;case M:if(T.flags&4096){if($===0)break e;xe=0;do ft=re[g+xe++],T.head&&ft&&T.length<65536&&(T.head.comment+=String.fromCharCode(ft));while(ft&&xe<$);if(T.flags&512&&(T.check=n(T.check,re,xe,g)),$-=xe,g+=xe,ft)break e}else T.head&&(T.head.comment=null);T.mode=C;case C:if(T.flags&512){for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(H!==(T.check&65535)){G.msg="header crc mismatch",T.mode=D;break}H=0,Z=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),G.adler=T.check=0,T.mode=oe;break;case Y:for(;Z<32;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}G.adler=T.check=dt(H),H=0,Z=0,T.mode=Q;case Q:if(T.havedict===0)return G.next_out=K,G.avail_out=R,G.next_in=g,G.avail_in=$,T.hold=H,T.bits=Z,d;G.adler=T.check=1,T.mode=oe;case oe:if(X===l||X===u)break e;case se:if(T.last){H>>>=Z&7,Z-=Z&7,T.mode=J;break}for(;Z<3;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}switch(T.last=H&1,H>>>=1,Z-=1,H&3){case 0:T.mode=ae;break;case 1:if(w(T),T.mode=Ae,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=be;case be:if(xe=T.length,xe){if(xe>$&&(xe=$),xe>R&&(xe=R),xe===0)break e;t.arraySet(_e,re,g,xe,K),$-=xe,g+=xe,R-=xe,K+=xe,T.length-=xe;break}T.mode=oe;break;case 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=Ie;case Ie:for(;T.have<T.ncode;){for(;Z<3;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.lens[nc[T.have++]]=H&7,H>>>=3,Z-=3}for(;T.have<19;)T.lens[nc[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,Dn={bits:T.lenbits},Ne=o(i,T.lens,0,19,T.lencode,0,T.work,Dn),T.lenbits=Dn.bits,Ne){G.msg="invalid code lengths set",T.mode=D;break}T.have=0,T.mode=me;case me:for(;T.have<T.nlen+T.ndist;){for(;U=T.lencode[H&(1<<T.lenbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(tt<16)H>>>=Me,Z-=Me,T.lens[T.have++]=tt;else{if(tt===16){for(rn=Me+2;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(H>>>=Me,Z-=Me,T.have===0){G.msg="invalid bit length repeat",T.mode=D;break}ft=T.lens[T.have-1],xe=3+(H&3),H>>>=2,Z-=2}else if(tt===17){for(rn=Me+3;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Me,Z-=Me,ft=0,xe=3+(H&7),H>>>=3,Z-=3}else{for(rn=Me+7;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Me,Z-=Me,ft=0,xe=11+(H&127),H>>>=7,Z-=7}if(T.have+xe>T.nlen+T.ndist){G.msg="invalid bit length repeat",T.mode=D;break}for(;xe--;)T.lens[T.have++]=ft}}if(T.mode===D)break;if(T.lens[256]===0){G.msg="invalid code -- missing end-of-block",T.mode=D;break}if(T.lenbits=9,Dn={bits:T.lenbits},Ne=o(s,T.lens,0,T.nlen,T.lencode,0,T.work,Dn),T.lenbits=Dn.bits,Ne){G.msg="invalid literal/lengths set",T.mode=D;break}if(T.distbits=6,T.distcode=T.distdyn,Dn={bits:T.distbits},Ne=o(a,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,Dn),T.distbits=Dn.bits,Ne){G.msg="invalid distances set",T.mode=D;break}if(T.mode=Ae,X===u)break e;case Ae:T.mode=De;case De:if($>=6&&R>=258){G.next_out=K,G.avail_out=R,G.next_in=g,G.avail_in=$,T.hold=H,T.bits=Z,r(G,ye),K=G.next_out,_e=G.output,R=G.avail_out,g=G.next_in,re=G.input,$=G.avail_in,H=T.hold,Z=T.bits,T.mode===oe&&(T.back=-1);break}for(T.back=0;U=T.lencode[H&(1<<T.lenbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(lt&&!(lt&240)){for(Tt=Me,ke=lt,cr=tt;U=T.lencode[cr+((H&(1<<Tt+ke)-1)>>Tt)],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Tt+Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Tt,Z-=Tt,T.back+=Tt}if(H>>>=Me,Z-=Me,T.back+=Me,T.length=tt,lt===0){T.mode=ee;break}if(lt&32){T.back=-1,T.mode=oe;break}if(lt&64){G.msg="invalid literal/length code",T.mode=D;break}T.extra=lt&15,T.mode=Ge;case Ge:if(T.extra){for(rn=T.extra;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.length+=H&(1<<T.extra)-1,H>>>=T.extra,Z-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=Ve;case Ve:for(;U=T.distcode[H&(1<<T.distbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(!(lt&240)){for(Tt=Me,ke=lt,cr=tt;U=T.distcode[cr+((H&(1<<Tt+ke)-1)>>Tt)],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Tt+Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Tt,Z-=Tt,T.back+=Tt}if(H>>>=Me,Z-=Me,T.back+=Me,lt&64){G.msg="invalid distance code",T.mode=D;break}T.offset=tt,T.extra=lt&15,T.mode=q;case q:if(T.extra){for(rn=T.extra;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.offset+=H&(1<<T.extra)-1,H>>>=T.extra,Z-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){G.msg="invalid distance too far back",T.mode=D;break}T.mode=j;case j:if(R===0)break e;if(xe=ye-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),gn=T.window}else gn=_e,Ue=K-T.offset,xe=T.length;xe>R&&(xe=R),R-=xe,T.length-=xe;do _e[K++]=gn[Ue++];while(--xe);T.length===0&&(T.mode=De);break;case ee:if(R===0)break e;_e[K++]=T.length,R--,T.mode=De;break;case J:if(T.wrap){for(;Z<32;){if($===0)break e;$--,H|=re[g++]<<Z,Z+=8}if(ye-=R,G.total_out+=ye,T.total+=ye,ye&&(G.adler=T.check=T.flags?n(T.check,_e,ye,K-ye):e(T.check,_e,ye,K-ye)),ye=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=h;break e;case D:Ne=y;break e;case te:return v;case le:default:return p}return G.next_out=K,G.avail_out=R,G.next_in=g,G.avail_in=$,T.hold=H,T.bits=Z,(T.wsize||ye!==G.avail_out&&T.mode<D&&(T.mode<J||X!==c))&&O(G,G.output,G.next_out,ye-G.avail_out),Ce-=G.avail_in,ye-=G.avail_out,G.total_in+=Ce,G.total_out+=ye,T.total+=ye,T.wrap&&ye&&(G.adler=T.check=T.flags?n(T.check,_e,ye,G.next_out-ye):e(T.check,_e,ye,G.next_out-ye)),G.data_type=T.bits+(T.last?64:0)+(T.mode===oe?128:0)+(T.mode===Ae||T.mode===ce?256:0),(Ce===0&&ye===0||X===c)&&Ne===f&&(Ne=b),Ne}function z(G){if(!G||!G.state)return p;var X=G.state;return X.window&&(X.window=null),G.state=null,f}function V(G,X){var T;return!G||!G.state||(T=G.state,!(T.wrap&2))?p:(T.head=X,X.done=!1,f)}function ue(G,X){var T=X.length,re,_e,g;return!G||!G.state||(re=G.state,re.wrap!==0&&re.mode!==Q)?p:re.mode===Q&&(_e=1,_e=e(_e,X,T,0),_e!==re.check)?y:(g=O(G,X,T,T),g?(re.mode=te,v):(re.havedict=1,f))}return un.inflateReset=$e,un.inflateReset2=kt,un.inflateResetKeep=It,un.inflateInit=et,un.inflateInit2=zt,un.inflate=x,un.inflateEnd=z,un.inflateGetHeader=V,un.inflateSetDictionary=ue,un.inflateInfo="pako inflate (from Nodeca project)",un}var bd,E2;function S2(){return E2||(E2=1,bd={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}),bd}var yd,C2;function rR(){if(C2)return yd;C2=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 yd=t,yd}var I2;function iR(){if(I2)return So;I2=1;var t=nR(),e=Or(),n=m2(),r=S2(),o=dd(),i=y2(),s=rR(),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,S,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),S=d.next_out-A,E=n.buf2string(d.output,A),d.next_out=S,d.avail_out=p-S,S&&e.arraySet(d.output,d.output,A,S,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 So.Inflate=c,So.inflate=l,So.inflateRaw=u,So.ungzip=l,So}var wd,T2;function oR(){if(T2)return wd;T2=1;var t=Or().assign,e=$_(),n=iR(),r=S2(),o={};return t(o,e,n,r),wd=o,wd}var Gl=oR();async function Nr(t){try{let e,n=0,r=0;const o=[];let i=0,s;do{const c=t.subarray(n);if(s=new Gl.Inflate,{strm:e}=s,s.push(c,Gl.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 D2(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 Gl.Inflate;if({strm:n}=y,y.push(p,Gl.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 xd,B2;function sR(){if(B2)return xd;B2=1,xd=e;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function e(M,C,Y){this.low=M|0,this.high=C|0,this.unsigned=!!Y}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0});function n(M){return(M&&M.__isLong__)===!0}e.isLong=n;var r={},o={};function i(M,C){var Y,Q,oe;return C?(M>>>=0,(oe=0<=M&&M<256)&&(Q=o[M],Q)?Q:(Y=a(M,(M|0)<0?-1:0,!0),oe&&(o[M]=Y),Y)):(M|=0,(oe=-128<=M&&M<128)&&(Q=r[M],Q)?Q:(Y=a(M,M<0?-1:0,!1),oe&&(r[M]=Y),Y))}e.fromInt=i;function s(M,C){if(isNaN(M))return C?A:b;if(C){if(M<0)return A;if(M>=p)return B}else{if(M<=-9223372036854776e3)return N;if(M+1>=y)return _}return M<0?s(-M,C).neg():a(M%d|0,M/d|0,C)}e.fromNumber=s;function a(M,C,Y){return new e(M,C,Y)}e.fromBits=a;var c=Math.pow;function l(M,C,Y){if(M.length===0)throw Error("empty string");if(M==="NaN"||M==="Infinity"||M==="+Infinity"||M==="-Infinity")return b;if(typeof C=="number"?(Y=C,C=!1):C=!!C,Y=Y||10,Y<2||36<Y)throw RangeError("radix");var Q;if((Q=M.indexOf("-"))>0)throw Error("interior hyphen");if(Q===0)return l(M.substring(1),C,Y).neg();for(var oe=s(c(Y,8)),se=b,ae=0;ae<M.length;ae+=8){var ce=Math.min(8,M.length-ae),be=parseInt(M.substring(ae,ae+ce),Y);if(ce<8){var he=s(c(Y,ce));se=se.mul(he).add(s(be))}else se=se.mul(oe),se=se.add(s(be))}return se.unsigned=C,se}e.fromString=l;function u(M,C){return typeof M=="number"?s(M,C):typeof M=="string"?l(M,C):a(M.low,M.high,typeof C=="boolean"?C:M.unsigned)}e.fromValue=u;var f=65536,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 S=i(1);e.ONE=S;var E=i(1,!0);e.UONE=E;var I=i(-1);e.NEG_ONE=I;var _=a(-1,2147483647,!1);e.MAX_VALUE=_;var B=a(-1,-1,!0);e.MAX_UNSIGNED_VALUE=B;var N=a(0,-2147483648,!1);e.MIN_VALUE=N;var F=e.prototype;return F.toInt=function(){return this.unsigned?this.low>>>0:this.low},F.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},F.toString=function(C){if(C=C||10,C<2||36<C)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(N)){var Y=s(C),Q=this.div(Y),oe=Q.mul(Y).sub(this);return Q.toString(C)+oe.toInt().toString(C)}else return"-"+this.neg().toString(C);for(var se=s(c(C,6),this.unsigned),ae=this,ce="";;){var be=ae.div(se),he=ae.sub(be.mul(se)).toInt()>>>0,Ie=he.toString(C);if(ae=be,ae.isZero())return Ie+ce;for(;Ie.length<6;)Ie="0"+Ie;ce=""+Ie+ce}},F.getHighBits=function(){return this.high},F.getHighBitsUnsigned=function(){return this.high>>>0},F.getLowBits=function(){return this.low},F.getLowBitsUnsigned=function(){return this.low>>>0},F.getNumBitsAbs=function(){if(this.isNegative())return this.eq(N)?64:this.neg().getNumBitsAbs();for(var C=this.high!=0?this.high:this.low,Y=31;Y>0&&!(C&1<<Y);Y--);return this.high!=0?Y+33:Y+1},F.isZero=function(){return this.high===0&&this.low===0},F.eqz=F.isZero,F.isNegative=function(){return!this.unsigned&&this.high<0},F.isPositive=function(){return this.unsigned||this.high>=0},F.isOdd=function(){return(this.low&1)===1},F.isEven=function(){return(this.low&1)===0},F.equals=function(C){return n(C)||(C=u(C)),this.unsigned!==C.unsigned&&this.high>>>31===1&&C.high>>>31===1?!1:this.high===C.high&&this.low===C.low},F.eq=F.equals,F.notEquals=function(C){return!this.eq(C)},F.neq=F.notEquals,F.ne=F.notEquals,F.lessThan=function(C){return this.comp(C)<0},F.lt=F.lessThan,F.lessThanOrEqual=function(C){return this.comp(C)<=0},F.lte=F.lessThanOrEqual,F.le=F.lessThanOrEqual,F.greaterThan=function(C){return this.comp(C)>0},F.gt=F.greaterThan,F.greaterThanOrEqual=function(C){return this.comp(C)>=0},F.gte=F.greaterThanOrEqual,F.ge=F.greaterThanOrEqual,F.compare=function(C){if(n(C)||(C=u(C)),this.eq(C))return 0;var Y=this.isNegative(),Q=C.isNegative();return Y&&!Q?-1:!Y&&Q?1:this.unsigned?C.high>>>0>this.high>>>0||C.high===this.high&&C.low>>>0>this.low>>>0?-1:1:this.sub(C).isNegative()?-1:1},F.comp=F.compare,F.negate=function(){return!this.unsigned&&this.eq(N)?N:this.not().add(S)},F.neg=F.negate,F.add=function(C){n(C)||(C=u(C));var Y=this.high>>>16,Q=this.high&65535,oe=this.low>>>16,se=this.low&65535,ae=C.high>>>16,ce=C.high&65535,be=C.low>>>16,he=C.low&65535,Ie=0,me=0,Ae=0,De=0;return De+=se+he,Ae+=De>>>16,De&=65535,Ae+=oe+be,me+=Ae>>>16,Ae&=65535,me+=Q+ce,Ie+=me>>>16,me&=65535,Ie+=Y+ae,Ie&=65535,a(Ae<<16|De,Ie<<16|me,this.unsigned)},F.subtract=function(C){return n(C)||(C=u(C)),this.add(C.neg())},F.sub=F.subtract,F.multiply=function(C){if(this.isZero())return b;if(n(C)||(C=u(C)),t){var Y=t.mul(this.low,this.high,C.low,C.high);return a(Y,t.get_high(),this.unsigned)}if(C.isZero())return b;if(this.eq(N))return C.isOdd()?N:b;if(C.eq(N))return this.isOdd()?N:b;if(this.isNegative())return C.isNegative()?this.neg().mul(C.neg()):this.neg().mul(C).neg();if(C.isNegative())return this.mul(C.neg()).neg();if(this.lt(v)&&C.lt(v))return s(this.toNumber()*C.toNumber(),this.unsigned);var Q=this.high>>>16,oe=this.high&65535,se=this.low>>>16,ae=this.low&65535,ce=C.high>>>16,be=C.high&65535,he=C.low>>>16,Ie=C.low&65535,me=0,Ae=0,De=0,Ge=0;return Ge+=ae*Ie,De+=Ge>>>16,Ge&=65535,De+=se*Ie,Ae+=De>>>16,De&=65535,De+=ae*he,Ae+=De>>>16,De&=65535,Ae+=oe*Ie,me+=Ae>>>16,Ae&=65535,Ae+=se*he,me+=Ae>>>16,Ae&=65535,Ae+=ae*be,me+=Ae>>>16,Ae&=65535,me+=Q*Ie+oe*he+se*be+ae*ce,me&=65535,a(De<<16|Ge,me<<16|Ae,this.unsigned)},F.mul=F.multiply,F.divide=function(C){if(n(C)||(C=u(C)),C.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&C.low===-1&&C.high===-1)return this;var Y=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,C.low,C.high);return a(Y,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?A:b;var Q,oe,se;if(this.unsigned){if(C.unsigned||(C=C.toUnsigned()),C.gt(this))return A;if(C.gt(this.shru(1)))return E;se=A}else{if(this.eq(N)){if(C.eq(S)||C.eq(I))return N;if(C.eq(N))return S;var ae=this.shr(1);return Q=ae.div(C).shl(1),Q.eq(b)?C.isNegative()?S:I:(oe=this.sub(C.mul(Q)),se=Q.add(oe.div(C)),se)}else if(C.eq(N))return this.unsigned?A:b;if(this.isNegative())return C.isNegative()?this.neg().div(C.neg()):this.neg().div(C).neg();if(C.isNegative())return this.div(C.neg()).neg();se=b}for(oe=this;oe.gte(C);){Q=Math.max(1,Math.floor(oe.toNumber()/C.toNumber()));for(var ce=Math.ceil(Math.log(Q)/Math.LN2),be=ce<=48?1:c(2,ce-48),he=s(Q),Ie=he.mul(C);Ie.isNegative()||Ie.gt(oe);)Q-=be,he=s(Q,this.unsigned),Ie=he.mul(C);he.isZero()&&(he=S),se=se.add(he),oe=oe.sub(Ie)}return se},F.div=F.divide,F.modulo=function(C){if(n(C)||(C=u(C)),t){var Y=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,C.low,C.high);return a(Y,t.get_high(),this.unsigned)}return this.sub(this.div(C).mul(C))},F.mod=F.modulo,F.rem=F.modulo,F.not=function(){return a(~this.low,~this.high,this.unsigned)},F.and=function(C){return n(C)||(C=u(C)),a(this.low&C.low,this.high&C.high,this.unsigned)},F.or=function(C){return n(C)||(C=u(C)),a(this.low|C.low,this.high|C.high,this.unsigned)},F.xor=function(C){return n(C)||(C=u(C)),a(this.low^C.low,this.high^C.high,this.unsigned)},F.shiftLeft=function(C){return n(C)&&(C=C.toInt()),(C&=63)===0?this:C<32?a(this.low<<C,this.high<<C|this.low>>>32-C,this.unsigned):a(0,this.low<<C-32,this.unsigned)},F.shl=F.shiftLeft,F.shiftRight=function(C){return n(C)&&(C=C.toInt()),(C&=63)===0?this:C<32?a(this.low>>>C|this.high<<32-C,this.high>>C,this.unsigned):a(this.high>>C-32,this.high>=0?0:-1,this.unsigned)},F.shr=F.shiftRight,F.shiftRightUnsigned=function(C){if(n(C)&&(C=C.toInt()),C&=63,C===0)return this;var Y=this.high;if(C<32){var Q=this.low;return a(Q>>>C|Y<<32-C,Y>>>C,this.unsigned)}else return C===32?a(Y,0,this.unsigned):a(Y>>>C-32,0,this.unsigned)},F.shru=F.shiftRightUnsigned,F.shr_u=F.shiftRightUnsigned,F.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},F.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},F.toBytes=function(C){return C?this.toBytesLE():this.toBytesBE()},F.toBytesLE=function(){var C=this.high,Y=this.low;return[Y&255,Y>>>8&255,Y>>>16&255,Y>>>24,C&255,C>>>8&255,C>>>16&255,C>>>24]},F.toBytesBE=function(){var C=this.high,Y=this.low;return[C>>>24,C>>>16&255,C>>>8&255,C&255,Y>>>24,Y>>>16&255,Y>>>8&255,Y&255]},e.fromBytes=function(C,Y,Q){return Q?e.fromBytesLE(C,Y):e.fromBytesBE(C,Y)},e.fromBytesLE=function(C,Y){return new e(C[0]|C[1]<<8|C[2]<<16|C[3]<<24,C[4]|C[5]<<8|C[6]<<16|C[7]<<24,Y)},e.fromBytesBE=function(C,Y){return new e(C[4]<<24|C[5]<<16|C[6]<<8|C[7],C[0]<<24|C[1]<<16|C[2]<<8|C[3],Y)},xd}var aR=sR();const Hl=zl(aR),Vl=1;class cR{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=Hl.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[Vl],y=d?d[Vl]: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][Vl]>=r));f+=1);return i[i.length-1][Vl]<r&&i.push([]),i}}class k2{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 cR({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 Nr(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 _2(t,e){return t.offset+t.lineBytes*Math.floor(e/t.lineLength)+e%t.lineLength}async function lR(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 R2{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=lR(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=_2(e,n),a=_2(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 uR extends R2{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 k2({filehandle:e,gziFilehandle:i}):n&&s&&(this.fasta=new k2({path:n,gziPath:s}))}}function F2(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 fR{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 F2(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 hR=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:uR,FetchableSmallFasta:fR,IndexedFasta:R2,parseSmallFasta:F2},Symbol.toStringTag,{value:"Module"})),M2=BigInt(32);function dR(t,e,n){const r=+!!n,o=+!n;return BigInt(t.getInt32(e,n)*o+t.getInt32(e+4,n)*r)<<M2|BigInt(t.getUint32(e,n)*r+t.getUint32(e+4,n)*o)}function pR(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)<<M2|BigInt(r*i+o*s)}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(t,e){return dR(this,t,e)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(t,e){return pR(this,t,e)});class gR{}class mR{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(e=new gR){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 bR{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 Ti{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 mR,s=new bR;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),Ti.checkSinglePromise(i.promise,r)):(this.fill(e,n,r,o),Ti.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 vd,P2;function yR(){if(P2)return vd;P2=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 vd=t,vd}var wR=yR();const ql=zl(wR);class Co{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 Co([{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 Co([{min:o.min,max:i.max}]));return r.push(o),r.length===1?r[0]:new Co(r)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */function Io(t){let e=t.length;for(;--e>=0;)t[e]=0}const xR=3,vR=258,L2=29,AR=256+1+L2,O2=30,ER=512,SR=new Array((AR+2)*2);Io(SR);const CR=new Array(O2*2);Io(CR);const IR=new Array(ER);Io(IR);const TR=new Array(vR-xR+1);Io(TR);const DR=new Array(L2);Io(DR);const BR=new Array(O2);Io(BR);var Ad=(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 kR=()=>{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},_R=new Uint32Array(kR());var Vn=(t,e,n,r)=>{const o=_R,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"},N2={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 FR=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},MR=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},z2={assign:FR,flattenChunks:MR};let U2=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{U2=!1}const Da=new Uint8Array(256);for(let t=0;t<256;t++)Da[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Da[254]=Da[254]=1;var PR=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 LR=(t,e)=>{if(e<65534&&t.subarray&&U2)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 OR=(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=Da[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 LR(i,o)},NR=(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+Da[t[n]]>e?n:e},Sd={string2buf:PR,buf2string:OR,utf8border:NR};function zR(){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 UR=zR;const jl=16209,GR=16191;var HR=function(e,n){let r,o,i,s,a,c,l,u,f,h,d,p,y,v,b,A,S,E,I,_,B,N,F,M;const C=e.state;r=e.next_in,F=e.input,o=r+(e.avail_in-5),i=e.next_out,M=e.output,s=i-(n-e.avail_out),a=i+(e.avail_out-257),c=C.dmax,l=C.wsize,u=C.whave,f=C.wnext,h=C.window,d=C.hold,p=C.bits,y=C.lencode,v=C.distcode,b=(1<<C.lenbits)-1,A=(1<<C.distbits)-1;e:do{p<15&&(d+=F[r++]<<p,p+=8,d+=F[r++]<<p,p+=8),S=y[d&b];t:for(;;){if(E=S>>>24,d>>>=E,p-=E,E=S>>>16&255,E===0)M[i++]=S&65535;else if(E&16){I=S&65535,E&=15,E&&(p<E&&(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),S=v[d&A];n:for(;;){if(E=S>>>24,d>>>=E,p-=E,E=S>>>16&255,E&16){if(_=S&65535,E&=15,p<E&&(d+=F[r++]<<p,p+=8,p<E&&(d+=F[r++]<<p,p+=8)),_+=d&(1<<E)-1,_>c){e.msg="invalid distance too far back",C.mode=jl;break e}if(d>>>=E,p-=E,E=i-s,_>E){if(E=_-E,E>u&&C.sane){e.msg="invalid distance too far back",C.mode=jl;break e}if(B=0,N=h,f===0){if(B+=l-E,E<I){I-=E;do M[i++]=h[B++];while(--E);B=i-_,N=M}}else if(f<E){if(B+=l+f-E,E-=f,E<I){I-=E;do M[i++]=h[B++];while(--E);if(B=0,f<I){E=f,I-=E;do M[i++]=h[B++];while(--E);B=i-_,N=M}}}else if(B+=f-E,E<I){I-=E;do M[i++]=h[B++];while(--E);B=i-_,N=M}for(;I>2;)M[i++]=N[B++],M[i++]=N[B++],M[i++]=N[B++],I-=3;I&&(M[i++]=N[B++],I>1&&(M[i++]=N[B++]))}else{B=i-_;do M[i++]=M[B++],M[i++]=M[B++],M[i++]=M[B++],I-=3;while(I>2);I&&(M[i++]=M[B++],I>1&&(M[i++]=M[B++]))}}else if(E&64){e.msg="invalid distance code",C.mode=jl;break e}else{S=v[(S&65535)+(d&(1<<E)-1)];continue n}break}}else if(E&64)if(E&32){C.mode=GR;break e}else{e.msg="invalid literal/length code",C.mode=jl;break e}else{S=y[(S&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),C.hold=d,C.bits=p};const To=15,G2=852,H2=592,V2=0,Cd=1,q2=2,VR=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]),qR=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]),jR=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]),WR=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 Ba=(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,S,E,I,_,B,N=null,F;const M=new Uint16Array(To+1),C=new Uint16Array(To+1);let Y=null,Q,oe,se;for(l=0;l<=To;l++)M[l]=0;for(u=0;u<r;u++)M[e[n+u]]++;for(d=c,h=To;h>=1&&M[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&&M[f]===0;f++);for(d<f&&(d=f),v=1,l=1;l<=To;l++)if(v<<=1,v-=M[l],v<0)return-1;if(v>0&&(t===V2||h!==1))return-1;for(C[1]=0,l=1;l<To;l++)C[l+1]=C[l]+M[l];for(u=0;u<r;u++)e[n+u]!==0&&(s[C[e[n+u]]++]=u);if(t===V2?(N=Y=s,F=20):t===Cd?(N=VR,Y=qR,F=257):(N=jR,Y=WR,F=0),A=0,u=0,l=f,B=i,p=d,y=0,I=-1,b=1<<d,_=b-1,t===Cd&&b>G2||t===q2&&b>H2)return 1;for(;;){Q=l-y,s[u]+1<F?(oe=0,se=s[u]):s[u]>=F?(oe=Y[s[u]-F],se=N[s[u]-F]):(oe=96,se=0),S=1<<l-y,E=1<<p,f=E;do E-=S,o[B+(A>>y)+E]=Q<<24|oe<<16|se|0;while(E!==0);for(S=1<<l-1;A&S;)S>>=1;if(S!==0?(A&=S-1,A+=S):A=0,u++,--M[l]===0){if(l===h)break;l=e[n+s[u]]}if(l>d&&(A&_)!==I){for(y===0&&(y=d),B+=f,p=l-y,v=1<<p;p+y<h&&(v-=M[p+y],!(v<=0));)p++,v<<=1;if(b+=1<<p,t===Cd&&b>G2||t===q2&&b>H2)return 1;I=A&_,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 YR=0,j2=1,W2=2,{Z_FINISH:Y2,Z_BLOCK:QR,Z_TREES:Wl,Z_OK:Di,Z_STREAM_END:ZR,Z_NEED_DICT:XR,Z_STREAM_ERROR:fn,Z_DATA_ERROR:Q2,Z_MEM_ERROR:Z2,Z_BUF_ERROR:KR,Z_DEFLATED:X2}=N2,Yl=16180,K2=16181,J2=16182,$2=16183,ew=16184,tw=16185,nw=16186,rw=16187,iw=16188,ow=16189,Ql=16190,nr=16191,Id=16192,sw=16193,Td=16194,aw=16195,cw=16196,lw=16197,uw=16198,Zl=16199,Xl=16200,fw=16201,hw=16202,dw=16203,pw=16204,gw=16205,Dd=16206,mw=16207,bw=16208,ct=16209,yw=16210,ww=16211,JR=852,$R=592,eF=15,xw=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function tF(){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 Bi=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<Yl||e.mode>ww?1:0},vw=t=>{if(Bi(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=Yl,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(JR),e.distcode=e.distdyn=new Int32Array($R),e.sane=1,e.back=-1,Di},Aw=t=>{if(Bi(t))return fn;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,vw(t)},Ew=(t,e)=>{let n;if(Bi(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,Aw(t))},Sw=(t,e)=>{if(!t)return fn;const n=new tF;t.state=n,n.strm=t,n.window=null,n.mode=Yl;const r=Ew(t,e);return r!==Di&&(t.state=null),r},nF=t=>Sw(t,eF);let Cw=!0,Bd,kd;const rF=t=>{if(Cw){Bd=new Int32Array(512),kd=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(Ba(j2,t.lens,0,288,Bd,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Ba(W2,t.lens,0,32,kd,0,t.work,{bits:5}),Cw=!1}t.lencode=Bd,t.lenbits=9,t.distcode=kd,t.distbits=5},Iw=(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},iF=(t,e)=>{let n,r,o,i,s,a,c,l,u,f,h,d,p,y,v=0,b,A,S,E,I,_,B,N;const F=new Uint8Array(4);let M,C;const Y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Bi(t)||!t.output||!t.input&&t.avail_in!==0)return fn;n=t.state,n.mode===nr&&(n.mode=Id),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,N=Di;e:for(;;)switch(n.mode){case Yl:if(n.wrap===0){n.mode=Id;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=Vn(n.check,F,2,0),l=0,u=0,n.mode=K2;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)!==X2){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?ow:nr,l=0,u=0;break;case K2:for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==X2){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=Vn(n.check,F,2,0)),l=0,u=0,n.mode=J2;case J2: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=Vn(n.check,F,4,0)),l=0,u=0,n.mode=$2;case $2: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=Vn(n.check,F,2,0)),l=0,u=0,n.mode=ew;case ew: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=Vn(n.check,F,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=tw;case tw: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=Vn(n.check,r,d,i)),a-=d,i+=d,n.length-=d),n.length))break e;n.length=0,n.mode=nw;case nw: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=Vn(n.check,r,d,i)),a-=d,i+=d,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=rw;case rw: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=Vn(n.check,r,d,i)),a-=d,i+=d,B)break e}else n.head&&(n.head.comment=null);n.mode=iw;case iw: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=nr;break;case ow:for(;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}t.adler=n.check=xw(l),l=0,u=0,n.mode=Ql;case Ql: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,XR;t.adler=n.check=1,n.mode=nr;case nr:if(e===QR||e===Wl)break e;case Id:if(n.last){l>>>=u&7,u-=u&7,n.mode=Dd;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=sw;break;case 1:if(rF(n),n.mode=Zl,e===Wl){l>>>=2,u-=2;break e}break;case 2:n.mode=cw;break;case 3:t.msg="invalid block type",n.mode=ct}l>>>=2,u-=2;break;case sw: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=Td,e===Wl)break e;case Td:n.mode=aw;case aw: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=nr;break;case cw:for(;u<14;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=ct;break}n.have=0,n.mode=lw;case lw:for(;n.have<n.ncode;){for(;u<3;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.lens[Y[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[Y[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},N=Ba(YR,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,N){t.msg="invalid code lengths set",n.mode=ct;break}n.have=0,n.mode=uw;case uw:for(;n.have<n.nlen+n.ndist;){for(;v=n.lencode[l&(1<<n.lenbits)-1],b=v>>>24,A=v>>>16&255,S=v&65535,!(b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(S<16)l>>>=b,u-=b,n.lens[n.have++]=S;else{if(S===16){for(C=b+2;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(l>>>=b,u-=b,n.have===0){t.msg="invalid bit length repeat",n.mode=ct;break}B=n.lens[n.have-1],d=3+(l&3),l>>>=2,u-=2}else if(S===17){for(C=b+3;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=b,u-=b,B=0,d=3+(l&7),l>>>=3,u-=3}else{for(C=b+7;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=b,u-=b,B=0,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,M={bits:n.lenbits},N=Ba(j2,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,N){t.msg="invalid literal/lengths set",n.mode=ct;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},N=Ba(W2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,N){t.msg="invalid distances set",n.mode=ct;break}if(n.mode=Zl,e===Wl)break e;case Zl:n.mode=Xl;case Xl: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,HR(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===nr&&(n.back=-1);break}for(n.back=0;v=n.lencode[l&(1<<n.lenbits)-1],b=v>>>24,A=v>>>16&255,S=v&65535,!(b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(A&&!(A&240)){for(E=b,I=A,_=S;v=n.lencode[_+((l&(1<<E+I)-1)>>E)],b=v>>>24,A=v>>>16&255,S=v&65535,!(E+b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=E,u-=E,n.back+=E}if(l>>>=b,u-=b,n.back+=b,n.length=S,A===0){n.mode=gw;break}if(A&32){n.back=-1,n.mode=nr;break}if(A&64){t.msg="invalid literal/length code",n.mode=ct;break}n.extra=A&15,n.mode=fw;case fw: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=hw;case hw:for(;v=n.distcode[l&(1<<n.distbits)-1],b=v>>>24,A=v>>>16&255,S=v&65535,!(b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(!(A&240)){for(E=b,I=A,_=S;v=n.distcode[_+((l&(1<<E+I)-1)>>E)],b=v>>>24,A=v>>>16&255,S=v&65535,!(E+b<=u);){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}l>>>=E,u-=E,n.back+=E}if(l>>>=b,u-=b,n.back+=b,A&64){t.msg="invalid distance code",n.mode=ct;break}n.offset=S,n.extra=A&15,n.mode=dw;case dw:if(n.extra){for(C=n.extra;u<C;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.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=pw;case pw: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=Xl);break;case gw:if(c===0)break e;o[s++]=n.length,c--,n.mode=Xl;break;case Dd: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?Vn(n.check,o,h,s-h):Ad(n.check,o,h,s-h)),h=c,n.wrap&4&&(n.flags?l:xw(l))!==n.check){t.msg="incorrect data check",n.mode=ct;break}l=0,u=0}n.mode=mw;case mw: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=bw;case bw:N=ZR;break e;case ct:N=Q2;break e;case yw:return Z2;case ww: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<Dd||e!==Y2))&&Iw(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?Vn(n.check,o,h,t.next_out-h):Ad(n.check,o,h,t.next_out-h)),t.data_type=n.bits+(n.last?64:0)+(n.mode===nr?128:0)+(n.mode===Zl||n.mode===Td?256:0),(f===0&&h===0||e===Y2)&&N===Di&&(N=KR),N},oF=t=>{if(Bi(t))return fn;let e=t.state;return e.window&&(e.window=null),t.state=null,Di},sF=(t,e)=>{if(Bi(t))return fn;const n=t.state;return n.wrap&2?(n.head=e,e.done=!1,Di):fn},aF=(t,e)=>{const n=e.length;let r,o,i;return Bi(t)||(r=t.state,r.wrap!==0&&r.mode!==Ql)?fn:r.mode===Ql&&(o=1,o=Ad(o,e,n,0),o!==r.check)?Q2:(i=Iw(t,e,n,n),i?(r.mode=yw,Z2):(r.havedict=1,Di))};var cF=Aw,lF=Ew,uF=vw,fF=nF,hF=Sw,dF=iF,pF=oF,gF=sF,mF=aF,bF="pako inflate (from Nodeca project)",rr={inflateReset:cF,inflateReset2:lF,inflateResetKeep:uF,inflateInit:fF,inflateInit2:hF,inflate:dF,inflateEnd:pF,inflateGetHeader:gF,inflateSetDictionary:mF,inflateInfo:bF};function yF(){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 wF=yF;const Tw=Object.prototype.toString,{Z_NO_FLUSH:xF,Z_FINISH:vF,Z_OK:ka,Z_STREAM_END:_d,Z_NEED_DICT:Rd,Z_STREAM_ERROR:AF,Z_DATA_ERROR:Dw,Z_MEM_ERROR:EF}=N2;function Kl(t){this.options=z2.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 UR,this.strm.avail_out=0;let n=rr.inflateInit2(this.strm,e.windowBits);if(n!==ka)throw new Error(Ed[n]);if(this.header=new wF,rr.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Sd.string2buf(e.dictionary):Tw.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=rr.inflateSetDictionary(this.strm,e.dictionary),n!==ka)))throw new Error(Ed[n])}Kl.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?vF:xF,Tw.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=rr.inflate(n,s),i===Rd&&o&&(i=rr.inflateSetDictionary(n,o),i===ka?i=rr.inflate(n,s):i===Dw&&(i=Rd));n.avail_in>0&&i===_d&&n.state.wrap>0&&t[n.next_in]!==0;)rr.inflateReset(n),i=rr.inflate(n,s);switch(i){case AF:case Dw:case Rd:case EF:return this.onEnd(i),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||i===_d))if(this.options.to==="string"){let c=Sd.utf8border(n.output,n.next_out),l=n.next_out-c,u=Sd.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===ka&&a===0)){if(i===_d)return i=rr.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},Kl.prototype.onData=function(t){this.chunks.push(t)},Kl.prototype.onEnd=function(t){t===ka&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=z2.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function SF(t,e){const n=new Kl(e);if(n.push(t),n.err)throw n.msg||Ed[n.err];return n.result}function CF(t,e){return e=e||{},e.raw=!0,SF(t,e)}var IF=CF,TF={inflateRaw:IF};const{inflateRaw:DF}=TF;var BF=DF;function kF(t){return BF(t.subarray(2))}let _F=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 Jl(t){if(t&&t.aborted)if(typeof DOMException>"u"){const e=new _F("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}const Fd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Md(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 Ti({cache:new ql({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,_,B)=>{try{const F=I.subarray(_),M=new DataView(F.buffer,F.byteOffset,F.length);let C=0;const Y=M.getUint8(C);C+=2;const Q=M.getUint16(C,v);if(C+=2,Y===1){const oe=[];for(let se=0;se<Q;se++){const ae=M.getUint32(C,v);C+=4;const ce=M.getUint32(C,v);C+=4;const be=M.getUint32(C,v);C+=4;const he=M.getUint32(C,v);C+=4;const Ie=Number(M.getBigUint64(C,v));C+=8;const me=Number(M.getBigUint64(C,v));C+=8,oe.push({startChrom:ae,startBase:ce,endBase:he,endChrom:be,blockOffset:Ie,blockSize:me,offset:C})}p=p.concat(oe.filter(se=>A(se)).map(se=>({offset:se.blockOffset,length:se.blockSize})))}else if(Y===0){const oe=[];for(let ae=0;ae<Q;ae++){const ce=M.getUint32(C,v);C+=4;const be=M.getUint32(C,v);C+=4;const he=M.getUint32(C,v);C+=4;const Ie=M.getUint32(C,v);C+=4;const me=Number(M.getBigUint64(C,v));C+=8,oe.push({startChrom:ce,startBase:be,endChrom:he,endBase:Ie,blockOffset:me,offset:C})}const se=oe.filter(ae=>A(ae)).map(ae=>ae.blockOffset);se.length>0&&E(se,B+1)}}catch(N){o.error(N)}},A=I=>{const{startChrom:_,startBase:B,endChrom:N,endBase:F}=I;return(_<u||_===u&&B<=r)&&(N>u||N===u&&F>=n)},S=async(I,_,B)=>{try{const N=_.max-_.min,F=_.min,M=await this.featureCache.get(`${N}_${F}`,{length:N,offset:F},i==null?void 0:i.signal);for(const C of I)_.contains(C)&&(b(M,C-F,B),y-=1,y===0&&this.readFeatures(o,p,{...i,request:f}).catch(Y=>{o.error(Y)}))}catch(N){o.error(N)}},E=(I,_)=>{try{y+=I.length;const B=4+d*32;let N=new Co([{min:I[0],max:I[0]+B}]);for(let F=1;F<I.length;F+=1){const M=new Co([{min:I[F],max:I[F]+B}]);N=N.union(M)}N.getRanges().map(F=>S(I,F,_))}catch(B){o.error(B)}};E([Number(c)+48],1);return}catch(s){o.error(s)}}parseSummaryBlock(e,n,r){const o=[];let i=n;const s=new DataView(e.buffer,e.byteOffset,e.length);for(;i<e.byteLength;){const a=s.getUint32(i,!0);i+=4;const c=s.getUint32(i,!0);i+=4;const l=s.getUint32(i,!0);i+=4;const u=s.getUint32(i,!0);i+=4;const f=s.getFloat32(i,!0);i+=4;const h=s.getFloat32(i,!0);i+=4;const d=s.getFloat32(i,!0);i+=4,i+=4,(!r||a===r.chrId&&Md(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=Fd==null?void 0:Fd.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=>Md(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=>Md(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=RF(n);Jl(s),await Promise.all(c.map(async l=>{Jl(s);const{length:u,offset:f}=l,h=await this.featureCache.get(`${u}_${f}`,l,s);for(const d of l.blocks){Jl(s);let p=Number(d.offset)-Number(l.offset),y=h;switch(i&&(y=kF(h.subarray(p)),p=0),Jl(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 Pd=function(t,e){return Pd=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])},Pd(t,e)};function Ld(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Pd(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function FF(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 kw(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 _a(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 Od(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 Nd(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 Do(t){return this instanceof Do?(this.v=t,this):new Do(t)}function MF(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 Do?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 PF(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 _a=="function"?_a(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=t[i]&&function(s){return new Promise(function(a,c){s=t[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}typeof SuppressedError=="function"&&SuppressedError;function wt(t){return typeof t=="function"}function _w(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 zd=_w(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
650
+ */var g2;function Ba(){return g2||(g2=1,function(t){const e=iR(),n=oR(),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 h(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 h(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 d(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 d(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"||kt(k.length)?s(0):d(k);if(k.type==="Buffer"&&Array.isArray(k.data))return d(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 Se(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return Jt(k).length;default:if(x)return O?-1:Se(k).length;m=(""+m).toLowerCase(),x=!0}}a.byteLength=S;function E(k,m,w){let O=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,m>>>=0,w<=m))return"";for(k||(k="utf8");;)switch(k){case"hex":return de(this,m,w);case"utf8":case"utf-8":return oe(this,m,w);case"ascii":return ce(this,m,w);case"latin1":case"binary":return ye(this,m,w);case"base64":return Q(this,m,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ce(this,m,w);default:if(O)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),O=!0}}a.prototype._isBuffer=!0;function I(k,m,w){const O=k[m];k[m]=k[w],k[w]=O}a.prototype.swap16=function(){const m=this.length;if(m%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<m;w+=2)I(this,w,w+1);return this},a.prototype.swap32=function(){const m=this.length;if(m%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<m;w+=4)I(this,w,w+3),I(this,w+1,w+2);return this},a.prototype.swap64=function(){const m=this.length;if(m%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<m;w+=8)I(this,w,w+7),I(this,w+1,w+6),I(this,w+2,w+5),I(this,w+3,w+4);return this},a.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?oe(this,0,m):E.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(m){if(!a.isBuffer(m))throw new TypeError("Argument must be a Buffer");return this===m?!0:a.compare(this,m)===0},a.prototype.inspect=function(){let m="";const w=t.INSPECT_MAX_BYTES;return m=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(m+=" ... "),"<Buffer "+m+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(m,w,O,x,z){if($e(m,Uint8Array)&&(m=a.from(m,m.offset,m.byteLength)),!a.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(w===void 0&&(w=0),O===void 0&&(O=m?m.length:0),x===void 0&&(x=0),z===void 0&&(z=this.length),w<0||O>m.length||x<0||z>this.length)throw new RangeError("out of range index");if(x>=z&&w>=O)return 0;if(x>=z)return-1;if(w>=O)return 1;if(w>>>=0,O>>>=0,x>>>=0,z>>>=0,this===m)return 0;let V=z-x,ue=O-w;const G=Math.min(V,ue),X=this.slice(x,z),T=m.slice(w,O);for(let re=0;re<G;++re)if(X[re]!==T[re]){V=X[re],ue=T[re];break}return V<ue?-1:ue<V?1:0};function _(k,m,w,O,x){if(k.length===0)return-1;if(typeof w=="string"?(O=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,kt(w)&&(w=x?0:k.length-1),w<0&&(w=k.length+w),w>=k.length){if(x)return-1;w=k.length-1}else if(w<0)if(x)w=0;else return-1;if(typeof m=="string"&&(m=a.from(m,O)),a.isBuffer(m))return m.length===0?-1:B(k,m,w,O,x);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?x?Uint8Array.prototype.indexOf.call(k,m,w):Uint8Array.prototype.lastIndexOf.call(k,m,w):B(k,[m],w,O,x);throw new TypeError("val must be string, number or Buffer")}function B(k,m,w,O,x){let z=1,V=k.length,ue=m.length;if(O!==void 0&&(O=String(O).toLowerCase(),O==="ucs2"||O==="ucs-2"||O==="utf16le"||O==="utf-16le")){if(k.length<2||m.length<2)return-1;z=2,V/=2,ue/=2,w/=2}function G(T,re){return z===1?T[re]:T.readUInt16BE(re*z)}let X;if(x){let T=-1;for(X=w;X<V;X++)if(G(k,X)===G(m,T===-1?0:X-T)){if(T===-1&&(T=X),X-T+1===ue)return T*z}else T!==-1&&(X-=X-T),T=-1}else for(w+ue>V&&(w=V-ue),X=w;X>=0;X--){let T=!0;for(let re=0;re<ue;re++)if(G(k,X+re)!==G(m,re)){T=!1;break}if(T)return X}return-1}a.prototype.includes=function(m,w,O){return this.indexOf(m,w,O)!==-1},a.prototype.indexOf=function(m,w,O){return _(this,m,w,O,!0)},a.prototype.lastIndexOf=function(m,w,O){return _(this,m,w,O,!1)};function N(k,m,w,O){w=Number(w)||0;const x=k.length-w;O?(O=Number(O),O>x&&(O=x)):O=x;const z=m.length;O>z/2&&(O=z/2);let V;for(V=0;V<O;++V){const ue=parseInt(m.substr(V*2,2),16);if(kt(ue))return V;k[w+V]=ue}return V}function F(k,m,w,O){return It(Se(m,k.length-w),k,w,O)}function M(k,m,w,O){return It(Re(m),k,w,O)}function C(k,m,w,O){return It(Jt(m),k,w,O)}function Y(k,m,w,O){return It(dt(m,k.length-w),k,w,O)}a.prototype.write=function(m,w,O,x){if(w===void 0)x="utf8",O=this.length,w=0;else if(O===void 0&&typeof w=="string")x=w,O=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(O)?(O=O>>>0,x===void 0&&(x="utf8")):(x=O,O=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const z=this.length-w;if((O===void 0||O>z)&&(O=z),m.length>0&&(O<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");let V=!1;for(;;)switch(x){case"hex":return N(this,m,w,O);case"utf8":case"utf-8":return F(this,m,w,O);case"ascii":case"latin1":case"binary":return M(this,m,w,O);case"base64":return C(this,m,w,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,m,w,O);default:if(V)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),V=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(k,m,w){return m===0&&w===k.length?e.fromByteArray(k):e.fromByteArray(k.slice(m,w))}function oe(k,m,w){w=Math.min(k.length,w);const O=[];let x=m;for(;x<w;){const z=k[x];let V=null,ue=z>239?4:z>223?3:z>191?2:1;if(x+ue<=w){let G,X,T,re;switch(ue){case 1:z<128&&(V=z);break;case 2:G=k[x+1],(G&192)===128&&(re=(z&31)<<6|G&63,re>127&&(V=re));break;case 3:G=k[x+1],X=k[x+2],(G&192)===128&&(X&192)===128&&(re=(z&15)<<12|(G&63)<<6|X&63,re>2047&&(re<55296||re>57343)&&(V=re));break;case 4:G=k[x+1],X=k[x+2],T=k[x+3],(G&192)===128&&(X&192)===128&&(T&192)===128&&(re=(z&15)<<18|(G&63)<<12|(X&63)<<6|T&63,re>65535&&re<1114112&&(V=re))}}V===null?(V=65533,ue=1):V>65535&&(V-=65536,O.push(V>>>10&1023|55296),V=56320|V&1023),O.push(V),x+=ue}return ae(O)}const se=4096;function ae(k){const m=k.length;if(m<=se)return String.fromCharCode.apply(String,k);let w="",O=0;for(;O<m;)w+=String.fromCharCode.apply(String,k.slice(O,O+=se));return w}function ce(k,m,w){let O="";w=Math.min(k.length,w);for(let x=m;x<w;++x)O+=String.fromCharCode(k[x]&127);return O}function ye(k,m,w){let O="";w=Math.min(k.length,w);for(let x=m;x<w;++x)O+=String.fromCharCode(k[x]);return O}function de(k,m,w){const O=k.length;(!m||m<0)&&(m=0),(!w||w<0||w>O)&&(w=O);let x="";for(let z=m;z<w;++z)x+=zt[k[z]];return x}function Ce(k,m,w){const O=k.slice(m,w);let x="";for(let z=0;z<O.length-1;z+=2)x+=String.fromCharCode(O[z]+O[z+1]*256);return x}a.prototype.slice=function(m,w){const O=this.length;m=~~m,w=w===void 0?O:~~w,m<0?(m+=O,m<0&&(m=0)):m>O&&(m=O),w<0?(w+=O,w<0&&(w=0)):w>O&&(w=O),w<m&&(w=m);const x=this.subarray(m,w);return Object.setPrototypeOf(x,a.prototype),x};function me(k,m,w){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+m>w)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=this[m],z=1,V=0;for(;++V<w&&(z*=256);)x+=this[m+V]*z;return x},a.prototype.readUintBE=a.prototype.readUIntBE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=this[m+--w],z=1;for(;w>0&&(z*=256);)x+=this[m+--w]*z;return x},a.prototype.readUint8=a.prototype.readUInt8=function(m,w){return m=m>>>0,w||me(m,1,this.length),this[m]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(m,w){return m=m>>>0,w||me(m,2,this.length),this[m]|this[m+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(m,w){return m=m>>>0,w||me(m,2,this.length),this[m]<<8|this[m+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(m,w){return m=m>>>0,w||me(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+this[m+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(m,w){return m=m>>>0,w||me(m,4,this.length),this[m]*16777216+(this[m+1]<<16|this[m+2]<<8|this[m+3])},a.prototype.readBigUInt64LE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=w+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24,z=this[++m]+this[++m]*2**8+this[++m]*2**16+O*2**24;return BigInt(x)+(BigInt(z)<<BigInt(32))}),a.prototype.readBigUInt64BE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=w*2**24+this[++m]*2**16+this[++m]*2**8+this[++m],z=this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+O;return(BigInt(x)<<BigInt(32))+BigInt(z)}),a.prototype.readIntLE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=this[m],z=1,V=0;for(;++V<w&&(z*=256);)x+=this[m+V]*z;return z*=128,x>=z&&(x-=Math.pow(2,8*w)),x},a.prototype.readIntBE=function(m,w,O){m=m>>>0,w=w>>>0,O||me(m,w,this.length);let x=w,z=1,V=this[m+--x];for(;x>0&&(z*=256);)V+=this[m+--x]*z;return z*=128,V>=z&&(V-=Math.pow(2,8*w)),V},a.prototype.readInt8=function(m,w){return m=m>>>0,w||me(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},a.prototype.readInt16LE=function(m,w){m=m>>>0,w||me(m,2,this.length);const O=this[m]|this[m+1]<<8;return O&32768?O|4294901760:O},a.prototype.readInt16BE=function(m,w){m=m>>>0,w||me(m,2,this.length);const O=this[m+1]|this[m]<<8;return O&32768?O|4294901760:O},a.prototype.readInt32LE=function(m,w){return m=m>>>0,w||me(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},a.prototype.readInt32BE=function(m,w){return m=m>>>0,w||me(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},a.prototype.readBigInt64LE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(O<<24);return(BigInt(x)<<BigInt(32))+BigInt(w+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24)}),a.prototype.readBigInt64BE=et(function(m){m=m>>>0,te(m,"offset");const w=this[m],O=this[m+7];(w===void 0||O===void 0)&&le(m,this.length-8);const x=(w<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(x)<<BigInt(32))+BigInt(this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+O)}),a.prototype.readFloatLE=function(m,w){return m=m>>>0,w||me(m,4,this.length),n.read(this,m,!0,23,4)},a.prototype.readFloatBE=function(m,w){return m=m>>>0,w||me(m,4,this.length),n.read(this,m,!1,23,4)},a.prototype.readDoubleLE=function(m,w){return m=m>>>0,w||me(m,8,this.length),n.read(this,m,!0,52,8)},a.prototype.readDoubleBE=function(m,w){return m=m>>>0,w||me(m,8,this.length),n.read(this,m,!1,52,8)};function Ee(k,m,w,O,x,z){if(!a.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>x||m<z)throw new RangeError('"value" argument is out of bounds');if(w+O>k.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(m,w,O,x){if(m=+m,w=w>>>0,O=O>>>0,!x){const ue=Math.pow(2,8*O)-1;Ee(this,m,w,O,ue,0)}let z=1,V=0;for(this[w]=m&255;++V<O&&(z*=256);)this[w+V]=m/z&255;return w+O},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(m,w,O,x){if(m=+m,w=w>>>0,O=O>>>0,!x){const ue=Math.pow(2,8*O)-1;Ee(this,m,w,O,ue,0)}let z=O-1,V=1;for(this[w+z]=m&255;--z>=0&&(V*=256);)this[w+z]=m/V&255;return w+O},a.prototype.writeUint8=a.prototype.writeUInt8=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,1,255,0),this[w]=m&255,w+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,2,65535,0),this[w]=m&255,this[w+1]=m>>>8,w+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,2,65535,0),this[w]=m>>>8,this[w+1]=m&255,w+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,4,4294967295,0),this[w+3]=m>>>24,this[w+2]=m>>>16,this[w+1]=m>>>8,this[w]=m&255,w+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,4,4294967295,0),this[w]=m>>>24,this[w+1]=m>>>16,this[w+2]=m>>>8,this[w+3]=m&255,w+4};function De(k,m,w,O,x){D(m,O,x,k,w,7);let z=Number(m&BigInt(4294967295));k[w++]=z,z=z>>8,k[w++]=z,z=z>>8,k[w++]=z,z=z>>8,k[w++]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return k[w++]=V,V=V>>8,k[w++]=V,V=V>>8,k[w++]=V,V=V>>8,k[w++]=V,w}function Ge(k,m,w,O,x){D(m,O,x,k,w,7);let z=Number(m&BigInt(4294967295));k[w+7]=z,z=z>>8,k[w+6]=z,z=z>>8,k[w+5]=z,z=z>>8,k[w+4]=z;let V=Number(m>>BigInt(32)&BigInt(4294967295));return k[w+3]=V,V=V>>8,k[w+2]=V,V=V>>8,k[w+1]=V,V=V>>8,k[w]=V,w+8}a.prototype.writeBigUInt64LE=et(function(m,w=0){return De(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=et(function(m,w=0){return Ge(this,m,w,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(m,w,O,x){if(m=+m,w=w>>>0,!x){const G=Math.pow(2,8*O-1);Ee(this,m,w,O,G-1,-G)}let z=0,V=1,ue=0;for(this[w]=m&255;++z<O&&(V*=256);)m<0&&ue===0&&this[w+z-1]!==0&&(ue=1),this[w+z]=(m/V>>0)-ue&255;return w+O},a.prototype.writeIntBE=function(m,w,O,x){if(m=+m,w=w>>>0,!x){const G=Math.pow(2,8*O-1);Ee(this,m,w,O,G-1,-G)}let z=O-1,V=1,ue=0;for(this[w+z]=m&255;--z>=0&&(V*=256);)m<0&&ue===0&&this[w+z+1]!==0&&(ue=1),this[w+z]=(m/V>>0)-ue&255;return w+O},a.prototype.writeInt8=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,1,127,-128),m<0&&(m=255+m+1),this[w]=m&255,w+1},a.prototype.writeInt16LE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,2,32767,-32768),this[w]=m&255,this[w+1]=m>>>8,w+2},a.prototype.writeInt16BE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,2,32767,-32768),this[w]=m>>>8,this[w+1]=m&255,w+2},a.prototype.writeInt32LE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,4,2147483647,-2147483648),this[w]=m&255,this[w+1]=m>>>8,this[w+2]=m>>>16,this[w+3]=m>>>24,w+4},a.prototype.writeInt32BE=function(m,w,O){return m=+m,w=w>>>0,O||Ee(this,m,w,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[w]=m>>>24,this[w+1]=m>>>16,this[w+2]=m>>>8,this[w+3]=m&255,w+4},a.prototype.writeBigInt64LE=et(function(m,w=0){return De(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=et(function(m,w=0){return Ge(this,m,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ve(k,m,w,O,x,z){if(w+O>k.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function j(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 j(this,m,w,!0,O)},a.prototype.writeFloatBE=function(m,w,O){return j(this,m,w,!1,O)};function W(k,m,w,O,x){return m=+m,w=w>>>0,x||Ve(k,m,w,8),n.write(k,m,w,O,52,8),w+8}a.prototype.writeDoubleLE=function(m,w,O){return W(this,m,w,!0,O)},a.prototype.writeDoubleBE=function(m,w,O){return W(this,m,w,!1,O)},a.prototype.copy=function(m,w,O,x){if(!a.isBuffer(m))throw new TypeError("argument should be a Buffer");if(O||(O=0),!x&&x!==0&&(x=this.length),w>=m.length&&(w=m.length),w||(w=0),x>0&&x<O&&(x=O),x===O||m.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(O<0||O>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),m.length-w<x-O&&(x=m.length-w+O);const z=x-O;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(w,O,x):Uint8Array.prototype.set.call(m,this.subarray(O,x),w),z},a.prototype.fill=function(m,w,O,x){if(typeof m=="string"){if(typeof w=="string"?(x=w,w=0,O=this.length):typeof O=="string"&&(x=O,O=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!a.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(m.length===1){const V=m.charCodeAt(0);(x==="utf8"&&V<128||x==="latin1")&&(m=V)}}else typeof m=="number"?m=m&255:typeof m=="boolean"&&(m=Number(m));if(w<0||this.length<w||this.length<O)throw new RangeError("Out of range index");if(O<=w)return this;w=w>>>0,O=O===void 0?this.length:O>>>0,m||(m=0);let z;if(typeof m=="number")for(z=w;z<O;++z)this[z]=m;else{const V=a.isBuffer(m)?m:a.from(m,x),ue=V.length;if(ue===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(z=0;z<O-w;++z)this[z+w]=V[z%ue]}return this};const ee={};function J(k,m,w){ee[k]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(x){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:x,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}J("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),J("ERR_INVALID_ARG_TYPE",function(k,m){return`The "${k}" argument must be of type number. Received type ${typeof m}`},TypeError),J("ERR_OUT_OF_RANGE",function(k,m,w){let O=`The value of "${k}" is out of range.`,x=w;return Number.isInteger(w)&&Math.abs(w)>2**32?x=fe(String(w)):typeof w=="bigint"&&(x=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(x=fe(x)),x+="n"),O+=` It must be ${m}. Received ${x}`,O},RangeError);function fe(k){let m="",w=k.length;const O=k[0]==="-"?1:0;for(;w>=O+4;w-=3)m=`_${k.slice(w-3,w)}${m}`;return`${k.slice(0,w)}${m}`}function L(k,m,w){te(m,"offset"),(k[m]===void 0||k[m+w]===void 0)&&le(m,k.length-(w+1))}function D(k,m,w,O,x,z){if(k>w||k<m){const V=typeof m=="bigint"?"n":"";let ue;throw m===0||m===BigInt(0)?ue=`>= 0${V} and < 2${V} ** ${(z+1)*8}${V}`:ue=`>= -(2${V} ** ${(z+1)*8-1}${V}) and < 2 ** ${(z+1)*8-1}${V}`,new ee.ERR_OUT_OF_RANGE("value",ue,k)}L(O,x,z)}function te(k,m){if(typeof k!="number")throw new ee.ERR_INVALID_ARG_TYPE(m,"number",k)}function le(k,m,w){throw Math.floor(k)!==k?(te(k,w),new ee.ERR_OUT_OF_RANGE("offset","an integer",k)):m<0?new ee.ERR_BUFFER_OUT_OF_BOUNDS:new ee.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${m}`,k)}const Be=/[^+/0-9A-Za-z-_]/g;function ve(k){if(k=k.split("=")[0],k=k.trim().replace(Be,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Se(k,m){m=m||1/0;let w;const O=k.length;let x=null;const z=[];for(let V=0;V<O;++V){if(w=k.charCodeAt(V),w>55295&&w<57344){if(!x){if(w>56319){(m-=3)>-1&&z.push(239,191,189);continue}else if(V+1===O){(m-=3)>-1&&z.push(239,191,189);continue}x=w;continue}if(w<56320){(m-=3)>-1&&z.push(239,191,189),x=w;continue}w=(x-55296<<10|w-56320)+65536}else x&&(m-=3)>-1&&z.push(239,191,189);if(x=null,w<128){if((m-=1)<0)break;z.push(w)}else if(w<2048){if((m-=2)<0)break;z.push(w>>6|192,w&63|128)}else if(w<65536){if((m-=3)<0)break;z.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((m-=4)<0)break;z.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return z}function Re(k){const m=[];for(let w=0;w<k.length;++w)m.push(k.charCodeAt(w)&255);return m}function dt(k,m){let w,O,x;const z=[];for(let V=0;V<k.length&&!((m-=2)<0);++V)w=k.charCodeAt(V),O=w>>8,x=w%256,z.push(x),z.push(O);return z}function Jt(k){return e.toByteArray(ve(k))}function It(k,m,w,O){let x;for(x=0;x<O&&!(x+w>=m.length||x>=k.length);++x)m[x+w]=k[x];return x}function $e(k,m){return k instanceof m||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===m.name}function kt(k){return k!==k}const zt=function(){const k="0123456789abcdef",m=new Array(256);for(let w=0;w<16;++w){const O=w*16;for(let x=0;x<16;++x)m[O+x]=k[w]+k[x]}return m}();function et(k){return typeof BigInt>"u"?Ut:k}function Ut(){throw new Error("BigInt not supported")}}(wd)),wd}var Ke=Ba();const sR=Ye({__proto__:null,default:Ql(Ke)},[Ke]),Ct={},aR=Object.freeze(Object.defineProperty({__proto__:null,default:Ct},Symbol.toStringTag,{value:"Module"}));function m2(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(`${m2(i)} fetching ${e}`,{cause:i})}}else throw new Error(`${m2(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 y2(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 cR(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 lR{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 y2(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 cR(this.blob);if(n)throw new Error(`unsupported encoding: ${n}`);const r=await y2(this.blob);return Ke.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function b2(t,e={}){return new Cn(t,e)}function uR(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 ka=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:lR,LocalFile:Ct,RemoteFile:Cn,fromUrl:b2,open:uR},Symbol.toStringTag,{value:"Module"}));var xd={},w2;function Nr(){return w2||(w2=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)}(xd)),xd}var So={},In={},Ii={},x2;function fR(){if(x2)return Ii;x2=1;var t=Nr(),e=4,n=0,r=1,o=2;function i(x){for(var z=x.length;--z>=0;)x[z]=0}var s=0,a=1,c=2,l=3,u=258,f=29,h=256,d=h+1+f,p=30,b=19,v=2*d+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],F=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=512,Q=new Array((d+2)*2);i(Q);var oe=new Array(p*2);i(oe);var se=new Array(Y);i(se);var ae=new Array(u-l+1);i(ae);var ce=new Array(f);i(ce);var ye=new Array(p);i(ye);function de(x,z,V,ue,G){this.static_tree=x,this.extra_bits=z,this.extra_base=V,this.elems=ue,this.max_length=G,this.has_stree=x&&x.length}var Ce,me,Ee;function De(x,z){this.dyn_tree=x,this.max_code=0,this.stat_desc=z}function Ge(x){return x<256?se[x]:se[256+(x>>>7)]}function Ve(x,z){x.pending_buf[x.pending++]=z&255,x.pending_buf[x.pending++]=z>>>8&255}function j(x,z,V){x.bi_valid>A-V?(x.bi_buf|=z<<x.bi_valid&65535,Ve(x,x.bi_buf),x.bi_buf=z>>A-x.bi_valid,x.bi_valid+=V-A):(x.bi_buf|=z<<x.bi_valid&65535,x.bi_valid+=V)}function W(x,z,V){j(x,V[z*2],V[z*2+1])}function ee(x,z){var V=0;do V|=x&1,x>>>=1,V<<=1;while(--z>0);return V>>>1}function J(x){x.bi_valid===16?(Ve(x,x.bi_buf),x.bi_buf=0,x.bi_valid=0):x.bi_valid>=8&&(x.pending_buf[x.pending++]=x.bi_buf&255,x.bi_buf>>=8,x.bi_valid-=8)}function fe(x,z){var V=z.dyn_tree,ue=z.max_code,G=z.stat_desc.static_tree,X=z.stat_desc.has_stree,T=z.stat_desc.extra_bits,re=z.stat_desc.extra_base,_e=z.stat_desc.max_length,g,K,$,R,H,Z,Te=0;for(R=0;R<=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,Te++),V[K*2+1]=R,!(K>ue)&&(x.bl_count[R]++,H=0,K>=re&&(H=T[K-re]),Z=V[K*2],x.opt_len+=Z*(R+H),X&&(x.static_len+=Z*(G[K*2+1]+H)));if(Te!==0){do{for(R=_e-1;x.bl_count[R]===0;)R--;x.bl_count[R]--,x.bl_count[R+1]+=2,x.bl_count[_e]--,Te-=2}while(Te>0);for(R=_e;R!==0;R--)for(K=x.bl_count[R];K!==0;)$=x.heap[--g],!($>ue)&&(V[$*2+1]!==R&&(x.opt_len+=(R-V[$*2+1])*V[$*2],V[$*2+1]=R),K--)}}function L(x,z,V){var ue=new Array(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<<F[ue];x++)se[G++]=ue;for(G>>=7;ue<p;ue++)for(ye[ue]=G<<7,x=0;x<1<<F[ue]-7;x++)se[256+G++]=ue;for(z=0;z<=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,d+1,X),x=0;x<p;x++)oe[x*2+1]=5,oe[x*2]=ee(x,5);Ce=new de(Q,N,h+1,d,y),me=new de(oe,F,0,p,y),Ee=new de(new Array(0),M,0,b,S)}function te(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<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 Se(x,z,V){for(var ue=x.heap[V],G=V<<1;G<=x.heap_len&&(G<x.heap_len&&ve(z,x.heap[G+1],x.heap[G],x.depth)&&G++,!ve(z,ue,x.heap[G],x.depth));)x.heap[V]=x.heap[G],V=G,G<<=1;x.heap[V]=ue}function Re(x,z,V){var ue,G,X=0,T,re;if(x.last_lit!==0)do ue=x.pending_buf[x.d_buf+X*2]<<8|x.pending_buf[x.d_buf+X*2+1],G=x.pending_buf[x.l_buf+X],X++,ue===0?W(x,G,z):(T=ae[G],W(x,T+h+1,z),re=N[T],re!==0&&(G-=ce[T],j(x,G,re)),ue--,T=Ge(ue),W(x,T,V),re=F[T],re!==0&&(ue-=ye[T],j(x,ue,re)));while(X<x.last_lit);W(x,E,z)}function dt(x,z){var V=z.dyn_tree,ue=z.stat_desc.static_tree,G=z.stat_desc.has_stree,X=z.stat_desc.elems,T,re,_e=-1,g;for(x.heap_len=0,x.heap_max=v,T=0;T<X;T++)V[T*2]!==0?(x.heap[++x.heap_len]=_e=T,x.depth[T]=0):V[T*2+1]=0;for(;x.heap_len<2;)g=x.heap[++x.heap_len]=_e<2?++_e:0,V[g*2]=1,x.depth[g]=0,x.opt_len--,G&&(x.static_len-=ue[g*2+1]);for(z.max_code=_e,T=x.heap_len>>1;T>=1;T--)Se(x,V,T);g=X;do T=x.heap[1],x.heap[1]=x.heap[x.heap_len--],Se(x,V,1),re=x.heap[1],x.heap[--x.heap_max]=T,x.heap[--x.heap_max]=re,V[g*2]=V[T*2]+V[re*2],x.depth[g]=(x.depth[T]>=x.depth[re]?x.depth[T]:x.depth[re])+1,V[T*2+1]=V[re*2+1]=g,x.heap[1]=g++,Se(x,V,1);while(x.heap_len>=2);x.heap[--x.heap_max]=x.heap[1],fe(x,z),L(V,_e,x.bl_count)}function Jt(x,z,V){var ue,G=-1,X,T=z[0*2+1],re=0,_e=7,g=4;for(T===0&&(_e=138,g=3),z[(V+1)*2+1]=65535,ue=0;ue<=V;ue++)X=T,T=z[(ue+1)*2+1],!(++re<_e&&X===T)&&(re<g?x.bl_tree[X*2]+=re:X!==0?(X!==G&&x.bl_tree[X*2]++,x.bl_tree[I*2]++):re<=10?x.bl_tree[_*2]++:x.bl_tree[B*2]++,re=0,G=X,T===0?(_e=138,g=3):X===T?(_e=6,g=3):(_e=7,g=4))}function It(x,z,V){var ue,G=-1,X,T=z[0*2+1],re=0,_e=7,g=4;for(T===0&&(_e=138,g=3),ue=0;ue<=V;ue++)if(X=T,T=z[(ue+1)*2+1],!(++re<_e&&X===T)){if(re<g)do W(x,X,x.bl_tree);while(--re!==0);else X!==0?(X!==G&&(W(x,X,x.bl_tree),re--),W(x,I,x.bl_tree),j(x,re-3,2)):re<=10?(W(x,_,x.bl_tree),j(x,re-3,3)):(W(x,B,x.bl_tree),j(x,re-11,7));re=0,G=X,T===0?(_e=138,g=3):X===T?(_e=6,g=3):(_e=7,g=4)}}function $e(x){var z;for(Jt(x,x.dyn_ltree,x.l_desc.max_code),Jt(x,x.dyn_dtree,x.d_desc.max_code),dt(x,x.bl_desc),z=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 kt(x,z,V,ue){var G;for(j(x,z-257,5),j(x,V-1,5),j(x,ue-4,4),G=0;G<ue;G++)j(x,x.bl_tree[C[G]*2+1],3);It(x,x.dyn_ltree,z-1),It(x,x.dyn_dtree,V-1)}function zt(x){var z=4093624447,V;for(V=0;V<=31;V++,z>>>=1)if(z&1&&x.dyn_ltree[V*2]!==0)return n;if(x.dyn_ltree[9*2]!==0||x.dyn_ltree[10*2]!==0||x.dyn_ltree[13*2]!==0)return r;for(V=32;V<h;V++)if(x.dyn_ltree[V*2]!==0)return r;return n}var et=!1;function Ut(x){et||(D(),et=!0),x.l_desc=new De(x.dyn_ltree,Ce),x.d_desc=new De(x.dyn_dtree,me),x.bl_desc=new De(x.bl_tree,Ee),x.bi_buf=0,x.bi_valid=0,te(x)}function k(x,z,V,ue){j(x,(s<<1)+(ue?1:0),3),Be(x,z,V)}function m(x){j(x,a<<1,3),W(x,E,Q),J(x)}function w(x,z,V,ue){var G,X,T=0;x.level>0?(x.strm.data_type===o&&(x.strm.data_type=zt(x)),dt(x,x.l_desc),dt(x,x.d_desc),T=$e(x),G=x.opt_len+3+7>>>3,X=x.static_len+3+7>>>3,X<=G&&(G=X)):G=X=V+5,V+4<=G&&z!==-1?k(x,z,V,ue):x.strategy===e||X===G?(j(x,(a<<1)+(ue?1:0),3),Re(x,Q,oe)):(j(x,(c<<1)+(ue?1:0),3),kt(x,x.l_desc.max_code+1,x.d_desc.max_code+1,T+1),Re(x,x.dyn_ltree,x.dyn_dtree)),te(x),ue&&le(x)}function O(x,z,V){return x.pending_buf[x.d_buf+x.last_lit*2]=z>>>8&255,x.pending_buf[x.d_buf+x.last_lit*2+1]=z&255,x.pending_buf[x.l_buf+x.last_lit]=V&255,x.last_lit++,z===0?x.dyn_ltree[V*2]++:(x.matches++,z--,x.dyn_ltree[(ae[V]+h+1)*2]++,x.dyn_dtree[Ge(z)*2]++),x.last_lit===x.lit_bufsize-1}return Ii._tr_init=Ut,Ii._tr_stored_block=k,Ii._tr_flush_block=w,Ii._tr_tally=O,Ii._tr_align=m,Ii}var vd,v2;function A2(){if(v2)return vd;v2=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 vd=t,vd}var Ad,E2;function S2(){if(E2)return Ad;E2=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 Ad=n,Ad}var Ed,C2;function Sd(){return C2||(C2=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"}),Ed}var I2;function hR(){if(I2)return In;I2=1;var t=Nr(),e=fR(),n=A2(),r=S2(),o=Sd(),i=0,s=1,a=3,c=4,l=5,u=0,f=1,h=-2,d=-3,p=-5,b=-1,v=1,y=2,A=3,S=4,E=0,I=2,_=8,B=9,N=15,F=8,M=29,C=256,Y=C+1+M,Q=30,oe=19,se=2*Y+1,ae=15,ce=3,ye=258,de=ye+ce+1,Ce=32,me=42,Ee=69,De=73,Ge=91,Ve=103,j=113,W=666,ee=1,J=2,fe=3,L=4,D=3;function te(g,K){return g.msg=o[K],K}function le(g){return(g<<1)-(g>4?9:0)}function Be(g){for(var K=g.length;--K>=0;)g[K]=0}function ve(g){var K=g.state,$=K.pending;$>g.avail_out&&($=g.avail_out),$!==0&&(t.arraySet(g.output,K.pending_buf,K.pending_out,$,g.next_out),g.next_out+=$,K.pending_out+=$,g.total_out+=$,g.avail_out-=$,K.pending-=$,K.pending===0&&(K.pending_out=0))}function Se(g,K){e._tr_flush_block(g,g.block_start>=0?g.block_start:-1,g.strstart-g.block_start,K),g.block_start=g.strstart,ve(g.strm)}function Re(g,K){g.pending_buf[g.pending++]=K}function dt(g,K){g.pending_buf[g.pending++]=K>>>8&255,g.pending_buf[g.pending++]=K&255}function Jt(g,K,$,R){var H=g.avail_in;return H>R&&(H=R),H===0?0:(g.avail_in-=H,t.arraySet(K,g.input,g.next_in,H,$),g.state.wrap===1?g.adler=n(g.adler,K,H,$):g.state.wrap===2&&(g.adler=r(g.adler,K,H,$)),g.next_in+=H,g.total_in+=H,H)}function It(g,K){var $=g.max_chain_length,R=g.strstart,H,Z,Te=g.prev_length,be=g.nice_match,xe=g.strstart>g.w_size-de?g.strstart-(g.w_size-de):0,Ue=g.window,gn=g.w_mask,U=g.prev,Me=g.strstart+ye,lt=Ue[R+Te-1],tt=Ue[R+Te];g.prev_length>=g.good_match&&($>>=2),be>g.lookahead&&(be=g.lookahead);do if(H=K,!(Ue[H+Te]!==tt||Ue[H+Te-1]!==lt||Ue[H]!==Ue[R]||Ue[++H]!==Ue[R+1])){R+=2,H++;do;while(Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&Ue[++R]===Ue[++H]&&R<Me);if(Z=ye-(Me-R),R=Me-ye,Z>Te){if(g.match_start=K,Te=Z,Z>=be)break;lt=Ue[R+Te-1],tt=Ue[R+Te]}}while((K=U[K&gn])>xe&&--$!==0);return Te<=g.lookahead?Te:g.lookahead}function $e(g){var K=g.w_size,$,R,H,Z,Te;do{if(Z=g.window_size-g.lookahead-g.strstart,g.strstart>=K+(K-de)){t.arraySet(g.window,g.window,K,K,0),g.match_start-=K,g.strstart-=K,g.block_start-=K,R=g.hash_size,$=R;do H=g.head[--$],g.head[$]=H>=K?H-K:0;while(--R);R=K,$=R;do H=g.prev[--$],g.prev[$]=H>=K?H-K:0;while(--R);Z+=K}if(g.strm.avail_in===0)break;if(R=Jt(g.strm,g.window,g.strstart+g.lookahead,Z),g.lookahead+=R,g.lookahead+g.insert>=ce)for(Te=g.strstart-g.insert,g.ins_h=g.window[Te],g.ins_h=(g.ins_h<<g.hash_shift^g.window[Te+1])&g.hash_mask;g.insert&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[Te+ce-1])&g.hash_mask,g.prev[Te&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=Te,Te++,g.insert--,!(g.lookahead+g.insert<ce)););}while(g.lookahead<de&&g.strm.avail_in!==0)}function kt(g,K){var $=65535;for($>g.pending_buf_size-5&&($=g.pending_buf_size-5);;){if(g.lookahead<=1){if($e(g),g.lookahead===0&&K===i)return ee;if(g.lookahead===0)break}g.strstart+=g.lookahead,g.lookahead=0;var R=g.block_start+$;if((g.strstart===0||g.strstart>=R)&&(g.lookahead=g.strstart-R,g.strstart=R,Se(g,!1),g.strm.avail_out===0)||g.strstart-g.block_start>=g.w_size-de&&(Se(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Se(g,!0),g.strm.avail_out===0?fe:L):(g.strstart>g.block_start&&(Se(g,!1),g.strm.avail_out===0),ee)}function zt(g,K){for(var $,R;;){if(g.lookahead<de){if($e(g),g.lookahead<de&&K===i)return ee;if(g.lookahead===0)break}if($=0,g.lookahead>=ce&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+ce-1])&g.hash_mask,$=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),$!==0&&g.strstart-$<=g.w_size-de&&(g.match_length=It(g,$)),g.match_length>=ce)if(R=e._tr_tally(g,g.strstart-g.match_start,g.match_length-ce),g.lookahead-=g.match_length,g.match_length<=g.max_lazy_match&&g.lookahead>=ce){g.match_length--;do g.strstart++,g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+ce-1])&g.hash_mask,$=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart;while(--g.match_length!==0);g.strstart++}else g.strstart+=g.match_length,g.match_length=0,g.ins_h=g.window[g.strstart],g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+1])&g.hash_mask;else R=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++;if(R&&(Se(g,!1),g.strm.avail_out===0))return ee}return g.insert=g.strstart<ce-1?g.strstart:ce-1,K===c?(Se(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Se(g,!1),g.strm.avail_out===0)?ee:J}function et(g,K){for(var $,R,H;;){if(g.lookahead<de){if($e(g),g.lookahead<de&&K===i)return ee;if(g.lookahead===0)break}if($=0,g.lookahead>=ce&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+ce-1])&g.hash_mask,$=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart),g.prev_length=g.match_length,g.prev_match=g.match_start,g.match_length=ce-1,$!==0&&g.prev_length<g.max_lazy_match&&g.strstart-$<=g.w_size-de&&(g.match_length=It(g,$),g.match_length<=5&&(g.strategy===v||g.match_length===ce&&g.strstart-g.match_start>4096)&&(g.match_length=ce-1)),g.prev_length>=ce&&g.match_length<=g.prev_length){H=g.strstart+g.lookahead-ce,R=e._tr_tally(g,g.strstart-1-g.prev_match,g.prev_length-ce),g.lookahead-=g.prev_length-1,g.prev_length-=2;do++g.strstart<=H&&(g.ins_h=(g.ins_h<<g.hash_shift^g.window[g.strstart+ce-1])&g.hash_mask,$=g.prev[g.strstart&g.w_mask]=g.head[g.ins_h],g.head[g.ins_h]=g.strstart);while(--g.prev_length!==0);if(g.match_available=0,g.match_length=ce-1,g.strstart++,R&&(Se(g,!1),g.strm.avail_out===0))return ee}else if(g.match_available){if(R=e._tr_tally(g,0,g.window[g.strstart-1]),R&&Se(g,!1),g.strstart++,g.lookahead--,g.strm.avail_out===0)return ee}else g.match_available=1,g.strstart++,g.lookahead--}return g.match_available&&(R=e._tr_tally(g,0,g.window[g.strstart-1]),g.match_available=0),g.insert=g.strstart<ce-1?g.strstart:ce-1,K===c?(Se(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Se(g,!1),g.strm.avail_out===0)?ee:J}function Ut(g,K){for(var $,R,H,Z,Te=g.window;;){if(g.lookahead<=ye){if($e(g),g.lookahead<=ye&&K===i)return ee;if(g.lookahead===0)break}if(g.match_length=0,g.lookahead>=ce&&g.strstart>0&&(H=g.strstart-1,R=Te[H],R===Te[++H]&&R===Te[++H]&&R===Te[++H])){Z=g.strstart+ye;do;while(R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&R===Te[++H]&&H<Z);g.match_length=ye-(Z-H),g.match_length>g.lookahead&&(g.match_length=g.lookahead)}if(g.match_length>=ce?($=e._tr_tally(g,1,g.match_length-ce),g.lookahead-=g.match_length,g.strstart+=g.match_length,g.match_length=0):($=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++),$&&(Se(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Se(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Se(g,!1),g.strm.avail_out===0)?ee:J}function k(g,K){for(var $;;){if(g.lookahead===0&&($e(g),g.lookahead===0)){if(K===i)return ee;break}if(g.match_length=0,$=e._tr_tally(g,0,g.window[g.strstart]),g.lookahead--,g.strstart++,$&&(Se(g,!1),g.strm.avail_out===0))return ee}return g.insert=0,K===c?(Se(g,!0),g.strm.avail_out===0?fe:L):g.last_lit&&(Se(g,!1),g.strm.avail_out===0)?ee:J}function m(g,K,$,R,H){this.good_length=g,this.max_lazy=K,this.nice_length=$,this.max_chain=R,this.func=H}var w;w=[new m(0,0,0,0,kt),new m(4,4,8,4,zt),new m(4,5,16,8,zt),new m(4,6,32,32,zt),new m(4,4,16,16,et),new m(8,16,32,32,et),new m(8,16,128,128,et),new m(8,32,128,256,et),new m(32,128,258,1024,et),new m(32,258,258,4096,et)];function O(g){g.window_size=2*g.w_size,Be(g.head),g.max_lazy_match=w[g.level].max_lazy,g.good_match=w[g.level].good_length,g.nice_match=w[g.level].nice_length,g.max_chain_length=w[g.level].max_chain,g.strstart=0,g.block_start=0,g.lookahead=0,g.insert=0,g.match_length=g.prev_length=ce-1,g.match_available=0,g.ins_h=0}function x(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(se*2),this.dyn_dtree=new t.Buf16((2*Q+1)*2),this.bl_tree=new t.Buf16((2*oe+1)*2),Be(this.dyn_ltree),Be(this.dyn_dtree),Be(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(ae+1),this.heap=new t.Buf16(2*Y+1),Be(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*Y+1),Be(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function z(g){var K;return!g||!g.state?te(g,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?me: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&&O(g.state),K}function ue(g,K){return!g||!g.state||g.state.wrap!==2?h:(g.state.gzhead=K,u)}function G(g,K,$,R,H,Z){if(!g)return h;var Te=1;if(K===b&&(K=6),R<0?(Te=0,R=-R):R>15&&(Te=2,R-=16),H<1||H>B||$!==_||R<8||R>15||K<0||K>9||Z<0||Z>S)return te(g,h);R===8&&(R=9);var be=new x;return g.state=be,be.strm=g,be.wrap=Te,be.gzhead=null,be.w_bits=R,be.w_size=1<<be.w_bits,be.w_mask=be.w_size-1,be.hash_bits=H+7,be.hash_size=1<<be.hash_bits,be.hash_mask=be.hash_size-1,be.hash_shift=~~((be.hash_bits+ce-1)/ce),be.window=new t.Buf8(be.w_size*2),be.head=new t.Buf16(be.hash_size),be.prev=new t.Buf16(be.w_size),be.lit_bufsize=1<<H+6,be.pending_buf_size=be.lit_bufsize*4,be.pending_buf=new t.Buf8(be.pending_buf_size),be.d_buf=1*be.lit_bufsize,be.l_buf=3*be.lit_bufsize,be.level=K,be.strategy=Z,be.method=$,V(g)}function X(g,K){return G(g,K,_,N,F,E)}function T(g,K){var $,R,H,Z;if(!g||!g.state||K>l||K<0)return g?te(g,h):h;if(R=g.state,!g.output||!g.input&&g.avail_in!==0||R.status===W&&K!==c)return te(g,g.avail_out===0?p:h);if(R.strm=g,$=R.last_flush,R.last_flush=K,R.status===me)if(R.wrap===2)g.adler=0,Re(R,31),Re(R,139),Re(R,8),R.gzhead?(Re(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),Re(R,R.gzhead.time&255),Re(R,R.gzhead.time>>8&255),Re(R,R.gzhead.time>>16&255),Re(R,R.gzhead.time>>24&255),Re(R,R.level===9?2:R.strategy>=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=j);else{var Te=_+(R.w_bits-8<<4)<<8,be=-1;R.strategy>=y||R.level<2?be=0:R.level<6?be=1:R.level===6?be=2:be=3,Te|=be<<6,R.strstart!==0&&(Te|=Ce),Te+=31-Te%31,R.status=j,dt(R,Te),R.strstart!==0&&(dt(R,g.adler>>>16),dt(R,g.adler&65535)),g.adler=1}if(R.status===Ee)if(R.gzhead.extra){for(H=R.pending;R.gzindex<(R.gzhead.extra.length&65535)&&!(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),ve(g),H=R.pending,R.pending===R.pending_buf_size));)Re(R,R.gzhead.extra[R.gzindex]&255),R.gzindex++;R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=De)}else R.status=De;if(R.status===De)if(R.gzhead.name){H=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),ve(g),H=R.pending,R.pending===R.pending_buf_size)){Z=1;break}R.gzindex<R.gzhead.name.length?Z=R.gzhead.name.charCodeAt(R.gzindex++)&255:Z=0,Re(R,Z)}while(Z!==0);R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),Z===0&&(R.gzindex=0,R.status=Ge)}else R.status=Ge;if(R.status===Ge)if(R.gzhead.comment){H=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),ve(g),H=R.pending,R.pending===R.pending_buf_size)){Z=1;break}R.gzindex<R.gzhead.comment.length?Z=R.gzhead.comment.charCodeAt(R.gzindex++)&255:Z=0,Re(R,Z)}while(Z!==0);R.gzhead.hcrc&&R.pending>H&&(g.adler=r(g.adler,R.pending_buf,R.pending-H,H)),Z===0&&(R.status=Ve)}else R.status=Ve;if(R.status===Ve&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&ve(g),R.pending+2<=R.pending_buf_size&&(Re(R,g.adler&255),Re(R,g.adler>>8&255),g.adler=0,R.status=j)):R.status=j),R.pending!==0){if(ve(g),g.avail_out===0)return R.last_flush=-1,u}else if(g.avail_in===0&&le(K)<=le($)&&K!==c)return te(g,p);if(R.status===W&&g.avail_in!==0)return te(g,p);if(g.avail_in!==0||R.lookahead!==0||K!==i&&R.status!==W){var xe=R.strategy===y?k(R,K):R.strategy===A?Ut(R,K):w[R.level].func(R,K);if((xe===fe||xe===L)&&(R.status=W),xe===ee||xe===fe)return g.avail_out===0&&(R.last_flush=-1),u;if(xe===J&&(K===s?e._tr_align(R):K!==l&&(e._tr_stored_block(R,0,0,!1),K===a&&(Be(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),ve(g),g.avail_out===0))return R.last_flush=-1,u}return K!==c?u:R.wrap<=0?f:(R.wrap===2?(Re(R,g.adler&255),Re(R,g.adler>>8&255),Re(R,g.adler>>16&255),Re(R,g.adler>>24&255),Re(R,g.total_in&255),Re(R,g.total_in>>8&255),Re(R,g.total_in>>16&255),Re(R,g.total_in>>24&255)):(dt(R,g.adler>>>16),dt(R,g.adler&65535)),ve(g),R.wrap>0&&(R.wrap=-R.wrap),R.pending!==0?u:f)}function re(g){var K;return!g||!g.state?h:(K=g.state.status,K!==me&&K!==Ee&&K!==De&&K!==Ge&&K!==Ve&&K!==j&&K!==W?te(g,h):(g.state=null,K===j?te(g,d):u))}function _e(g,K){var $=K.length,R,H,Z,Te,be,xe,Ue,gn;if(!g||!g.state||(R=g.state,Te=R.wrap,Te===2||Te===1&&R.status!==me||R.lookahead))return h;for(Te===1&&(g.adler=n(g.adler,K,$,0)),R.wrap=0,$>=R.w_size&&(Te===0&&(Be(R.head),R.strstart=0,R.block_start=0,R.insert=0),gn=new t.Buf8(R.w_size),t.arraySet(gn,K,$-R.w_size,R.w_size,0),K=gn,$=R.w_size),be=g.avail_in,xe=g.next_in,Ue=g.input,g.avail_in=$,g.next_in=0,g.input=K,$e(R);R.lookahead>=ce;){H=R.strstart,Z=R.lookahead-(ce-1);do R.ins_h=(R.ins_h<<R.hash_shift^R.window[H+ce-1])&R.hash_mask,R.prev[H&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=H,H++;while(--Z);R.strstart=H,R.lookahead=ce-1,$e(R)}return R.strstart+=R.lookahead,R.block_start=R.strstart,R.insert=R.lookahead,R.lookahead=0,R.match_length=R.prev_length=ce-1,R.match_available=0,g.next_in=xe,g.input=Ue,g.avail_in=be,R.wrap=Te,u}return In.deflateInit=X,In.deflateInit2=G,In.deflateReset=V,In.deflateResetKeep=z,In.deflateSetHeader=ue,In.deflate=T,In.deflateEnd=re,In.deflateSetDictionary=_e,In.deflateInfo="pako deflate (from Nodeca project)",In}var Ti={},T2;function D2(){if(T2)return Ti;T2=1;var t=Nr(),e=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{e=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var r=new t.Buf8(256),o=0;o<256;o++)r[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;r[254]=r[254]=1,Ti.string2buf=function(s){var a,c,l,u,f,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 Ti.buf2binstring=function(s){return i(s,s.length)},Ti.binstring2buf=function(s){for(var a=new t.Buf8(s.length),c=0,l=a.length;c<l;c++)a[c]=s.charCodeAt(c);return a},Ti.buf2string=function(s,a){var c,l,u,f,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)},Ti.utf8border=function(s,a){var c;for(a=a||s.length,a>s.length&&(a=s.length),c=a-1;c>=0&&(s[c]&192)===128;)c--;return c<0||c===0?a:c+r[s[c]]>a?c:a},Ti}var Cd,B2;function k2(){if(B2)return Cd;B2=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 Cd=t,Cd}var _2;function dR(){if(_2)return So;_2=1;var t=hR(),e=Nr(),n=D2(),r=Sd(),o=k2(),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 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 So.Deflate=p,So.deflate=b,So.deflateRaw=v,So.gzip=y,So}var Co={},un={},Id,R2;function pR(){if(R2)return Id;R2=1;var t=30,e=12;return Id=function(r,o){var i,s,a,c,l,u,f,h,d,p,b,v,y,A,S,E,I,_,B,N,F,M,C,Y,Q;i=r.state,s=r.next_in,Y=r.input,a=s+(r.avail_in-5),c=r.next_out,Q=r.output,l=c-(o-r.avail_out),u=c+(r.avail_out-257),f=i.dmax,h=i.wsize,d=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(F=_&65535,B&=15,y<B&&(v+=Y[s++]<<y,y+=8,y<B&&(v+=Y[s++]<<y,y+=8)),F+=v&(1<<B)-1,F>f){r.msg="invalid distance too far back",i.mode=t;break e}if(v>>>=B,y-=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(M=0,C=b,p===0){if(M+=h-B,B<N){N-=B;do Q[c++]=b[M++];while(--B);M=c-F,C=Q}}else if(p<B){if(M+=h+p-B,B-=p,B<N){N-=B;do Q[c++]=b[M++];while(--B);if(M=0,p<N){B=p,N-=B;do Q[c++]=b[M++];while(--B);M=c-F,C=Q}}}else if(M+=p-B,B<N){N-=B;do Q[c++]=b[M++];while(--B);M=c-F,C=Q}for(;N>2;)Q[c++]=C[M++],Q[c++]=C[M++],Q[c++]=C[M++],N-=3;N&&(Q[c++]=C[M++],N>1&&(Q[c++]=C[M++]))}else{M=c-F;do Q[c++]=Q[M++],Q[c++]=Q[M++],Q[c++]=Q[M++],N-=3;while(N>2);N&&(Q[c++]=Q[M++],N>1&&(Q[c++]=Q[M++]))}}else if(B&64){r.msg="invalid distance code",i.mode=t;break e}else{_=S[(_&65535)+(v&(1<<B)-1)];continue n}break}}else if(B&64)if(B&32){i.mode=e;break e}else{r.msg="invalid literal/length code",i.mode=t;break e}else{_=A[(_&65535)+(v&(1<<B)-1)];continue t}break}}while(s<a&&c<u);N=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},Id}var Td,F2;function gR(){if(F2)return Td;F2=1;var t=Nr(),e=15,n=852,r=592,o=0,i=1,s=2,a=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],c=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];return Td=function(h,d,p,b,v,y,A,S){var E=S.bits,I=0,_=0,B=0,N=0,F=0,M=0,C=0,Y=0,Q=0,oe=0,se,ae,ce,ye,de,Ce=null,me=0,Ee,De=new t.Buf16(e+1),Ge=new t.Buf16(e+1),Ve=null,j=0,W,ee,J;for(I=0;I<=e;I++)De[I]=0;for(_=0;_<b;_++)De[d[p+_]]++;for(F=E,N=e;N>=1&&De[N]===0;N--);if(F>N&&(F=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&&De[B]===0;B++);for(F<B&&(F=B),Y=1,I=1;I<=e;I++)if(Y<<=1,Y-=De[I],Y<0)return-1;if(Y>0&&(h===o||N!==1))return-1;for(Ge[1]=0,I=1;I<e;I++)Ge[I+1]=Ge[I]+De[I];for(_=0;_<b;_++)d[p+_]!==0&&(A[Ge[d[p+_]]++]=_);if(h===o?(Ce=Ve=A,Ee=19):h===i?(Ce=a,me-=257,Ve=c,j-=257,Ee=256):(Ce=l,Ve=u,Ee=-1),oe=0,_=0,I=B,de=y,M=F,C=0,ce=-1,Q=1<<F,ye=Q-1,h===i&&Q>n||h===s&&Q>r)return 1;for(;;){W=I-C,A[_]<Ee?(ee=0,J=A[_]):A[_]>Ee?(ee=Ve[j+A[_]],J=Ce[me+A[_]]):(ee=96,J=0),se=1<<I-C,ae=1<<M,B=ae;do ae-=se,v[de+(oe>>C)+ae]=W<<24|ee<<16|J|0;while(ae!==0);for(se=1<<I-1;oe&se;)se>>=1;if(se!==0?(oe&=se-1,oe+=se):oe=0,_++,--De[I]===0){if(I===N)break;I=d[p+A[_]]}if(I>F&&(oe&ye)!==ce){for(C===0&&(C=F),de+=B,M=I-C,Y=1<<M;M+C<N&&(Y-=De[M+C],!(Y<=0));)M++,Y<<=1;if(Q+=1<<M,h===i&&Q>n||h===s&&Q>r)return 1;ce=oe&ye,v[ce]=F<<24|M<<16|de-y|0}}return oe!==0&&(v[de+oe]=I-C<<24|64<<16|0),S.bits=F,0},Td}var M2;function mR(){if(M2)return un;M2=1;var t=Nr(),e=A2(),n=S2(),r=pR(),o=gR(),i=0,s=1,a=2,c=4,l=5,u=6,f=0,h=1,d=2,p=-2,b=-3,v=-4,y=-5,A=8,S=1,E=2,I=3,_=4,B=5,N=6,F=7,M=8,C=9,Y=10,Q=11,oe=12,se=13,ae=14,ce=15,ye=16,de=17,Ce=18,me=19,Ee=20,De=21,Ge=22,Ve=23,j=24,W=25,ee=26,J=27,fe=28,L=29,D=30,te=31,le=32,Be=852,ve=592,Se=15,Re=Se;function dt(G){return(G>>>24&255)+(G>>>8&65280)+((G&65280)<<8)+((G&255)<<24)}function Jt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function It(G){var X;return!G||!G.state?p:(X=G.state,G.total_in=G.total_out=X.total=0,G.msg="",X.wrap&&(G.adler=X.wrap&1),X.mode=S,X.last=0,X.havedict=0,X.dmax=32768,X.head=null,X.hold=0,X.bits=0,X.lencode=X.lendyn=new t.Buf32(Be),X.distcode=X.distdyn=new t.Buf32(ve),X.sane=1,X.back=-1,f)}function $e(G){var X;return!G||!G.state?p:(X=G.state,X.wsize=0,X.whave=0,X.wnext=0,It(G))}function kt(G,X){var T,re;return!G||!G.state||(re=G.state,X<0?(T=0,X=-X):(T=(X>>4)+1,X<48&&(X&=15)),X&&(X<8||X>15))?p:(re.window!==null&&re.wbits!==X&&(re.window=null),re.wrap=T,re.wbits=X,$e(G))}function zt(G,X){var T,re;return G?(re=new Jt,G.state=re,re.window=null,T=kt(G,X),T!==f&&(G.state=null),T):p}function et(G){return zt(G,Re)}var Ut=!0,k,m;function w(G){if(Ut){var X;for(k=new t.Buf32(512),m=new t.Buf32(32),X=0;X<144;)G.lens[X++]=8;for(;X<256;)G.lens[X++]=9;for(;X<280;)G.lens[X++]=7;for(;X<288;)G.lens[X++]=8;for(o(s,G.lens,0,288,k,0,G.work,{bits:9}),X=0;X<32;)G.lens[X++]=5;o(a,G.lens,0,32,m,0,G.work,{bits:5}),Ut=!1}G.lencode=k,G.lenbits=9,G.distcode=m,G.distbits=5}function O(G,X,T,re){var _e,g=G.state;return g.window===null&&(g.wsize=1<<g.wbits,g.wnext=0,g.whave=0,g.window=new t.Buf8(g.wsize)),re>=g.wsize?(t.arraySet(g.window,X,T-g.wsize,g.wsize,0),g.wnext=0,g.whave=g.wsize):(_e=g.wsize-g.wnext,_e>re&&(_e=re),t.arraySet(g.window,X,T-re,_e,g.wnext),re-=_e,re?(t.arraySet(g.window,X,T-re,re,0),g.wnext=re,g.whave=g.wsize):(g.wnext+=_e,g.wnext===g.wsize&&(g.wnext=0),g.whave<g.wsize&&(g.whave+=_e))),0}function x(G,X){var T,re,_e,g,K,$,R,H,Z,Te,be,xe,Ue,gn,U=0,Me,lt,tt,Tt,ke,lr,ft,Ne,ht=new t.Buf8(4),kn,rn,fc=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!G||!G.state||!G.output||!G.input&&G.avail_in!==0)return p;T=G.state,T.mode===oe&&(T.mode=se),K=G.next_out,_e=G.output,R=G.avail_out,g=G.next_in,re=G.input,$=G.avail_in,H=T.hold,Z=T.bits,Te=$,be=R,Ne=f;e:for(;;)switch(T.mode){case S:if(T.wrap===0){T.mode=se;break}for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(T.wrap&2&&H===35615){T.check=0,ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0),H=0,Z=0,T.mode=E;break}if(T.flags=0,T.head&&(T.head.done=!1),!(T.wrap&1)||(((H&255)<<8)+(H>>8))%31){G.msg="incorrect header check",T.mode=D;break}if((H&15)!==A){G.msg="unknown compression method",T.mode=D;break}if(H>>>=4,Z-=4,ft=(H&15)+8,T.wbits===0)T.wbits=ft;else if(ft>T.wbits){G.msg="invalid window size",T.mode=D;break}T.dmax=1<<ft,G.adler=T.check=1,T.mode=H&512?Y:oe,H=0,Z=0;break;case E:for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(T.flags=H,(T.flags&255)!==A){G.msg="unknown compression method",T.mode=D;break}if(T.flags&57344){G.msg="unknown header flags set",T.mode=D;break}T.head&&(T.head.text=H>>8&1),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,Z=0,T.mode=I;case I:for(;Z<32;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.head&&(T.head.time=H),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,ht[2]=H>>>16&255,ht[3]=H>>>24&255,T.check=n(T.check,ht,4,0)),H=0,Z=0,T.mode=_;case _:for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.head&&(T.head.xflags=H&255,T.head.os=H>>8),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,Z=0,T.mode=B;case B:if(T.flags&1024){for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.length=H,T.head&&(T.head.extra_len=H),T.flags&512&&(ht[0]=H&255,ht[1]=H>>>8&255,T.check=n(T.check,ht,2,0)),H=0,Z=0}else T.head&&(T.head.extra=null);T.mode=N;case N:if(T.flags&1024&&(xe=T.length,xe>$&&(xe=$),xe&&(T.head&&(ft=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),t.arraySet(T.head.extra,re,g,xe,ft)),T.flags&512&&(T.check=n(T.check,re,xe,g)),$-=xe,g+=xe,T.length-=xe),T.length))break e;T.length=0,T.mode=F;case F:if(T.flags&2048){if($===0)break e;xe=0;do ft=re[g+xe++],T.head&&ft&&T.length<65536&&(T.head.name+=String.fromCharCode(ft));while(ft&&xe<$);if(T.flags&512&&(T.check=n(T.check,re,xe,g)),$-=xe,g+=xe,ft)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=M;case M:if(T.flags&4096){if($===0)break e;xe=0;do ft=re[g+xe++],T.head&&ft&&T.length<65536&&(T.head.comment+=String.fromCharCode(ft));while(ft&&xe<$);if(T.flags&512&&(T.check=n(T.check,re,xe,g)),$-=xe,g+=xe,ft)break e}else T.head&&(T.head.comment=null);T.mode=C;case C:if(T.flags&512){for(;Z<16;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(H!==(T.check&65535)){G.msg="header crc mismatch",T.mode=D;break}H=0,Z=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),G.adler=T.check=0,T.mode=oe;break;case Y:for(;Z<32;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}G.adler=T.check=dt(H),H=0,Z=0,T.mode=Q;case Q:if(T.havedict===0)return G.next_out=K,G.avail_out=R,G.next_in=g,G.avail_in=$,T.hold=H,T.bits=Z,d;G.adler=T.check=1,T.mode=oe;case oe:if(X===l||X===u)break e;case se:if(T.last){H>>>=Z&7,Z-=Z&7,T.mode=J;break}for(;Z<3;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}switch(T.last=H&1,H>>>=1,Z-=1,H&3){case 0:T.mode=ae;break;case 1:if(w(T),T.mode=Ee,X===u){H>>>=2,Z-=2;break e}break;case 2:T.mode=de;break;case 3:G.msg="invalid block type",T.mode=D}H>>>=2,Z-=2;break;case ae:for(H>>>=Z&7,Z-=Z&7;Z<32;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if((H&65535)!==(H>>>16^65535)){G.msg="invalid stored block lengths",T.mode=D;break}if(T.length=H&65535,H=0,Z=0,T.mode=ce,X===u)break e;case ce:T.mode=ye;case ye:if(xe=T.length,xe){if(xe>$&&(xe=$),xe>R&&(xe=R),xe===0)break e;t.arraySet(_e,re,g,xe,K),$-=xe,g+=xe,R-=xe,K+=xe,T.length-=xe;break}T.mode=oe;break;case de:for(;Z<14;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(T.nlen=(H&31)+257,H>>>=5,Z-=5,T.ndist=(H&31)+1,H>>>=5,Z-=5,T.ncode=(H&15)+4,H>>>=4,Z-=4,T.nlen>286||T.ndist>30){G.msg="too many length or distance symbols",T.mode=D;break}T.have=0,T.mode=Ce;case Ce:for(;T.have<T.ncode;){for(;Z<3;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.lens[fc[T.have++]]=H&7,H>>>=3,Z-=3}for(;T.have<19;)T.lens[fc[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,kn={bits:T.lenbits},Ne=o(i,T.lens,0,19,T.lencode,0,T.work,kn),T.lenbits=kn.bits,Ne){G.msg="invalid code lengths set",T.mode=D;break}T.have=0,T.mode=me;case me:for(;T.have<T.nlen+T.ndist;){for(;U=T.lencode[H&(1<<T.lenbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(tt<16)H>>>=Me,Z-=Me,T.lens[T.have++]=tt;else{if(tt===16){for(rn=Me+2;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(H>>>=Me,Z-=Me,T.have===0){G.msg="invalid bit length repeat",T.mode=D;break}ft=T.lens[T.have-1],xe=3+(H&3),H>>>=2,Z-=2}else if(tt===17){for(rn=Me+3;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Me,Z-=Me,ft=0,xe=3+(H&7),H>>>=3,Z-=3}else{for(rn=Me+7;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Me,Z-=Me,ft=0,xe=11+(H&127),H>>>=7,Z-=7}if(T.have+xe>T.nlen+T.ndist){G.msg="invalid bit length repeat",T.mode=D;break}for(;xe--;)T.lens[T.have++]=ft}}if(T.mode===D)break;if(T.lens[256]===0){G.msg="invalid code -- missing end-of-block",T.mode=D;break}if(T.lenbits=9,kn={bits:T.lenbits},Ne=o(s,T.lens,0,T.nlen,T.lencode,0,T.work,kn),T.lenbits=kn.bits,Ne){G.msg="invalid literal/lengths set",T.mode=D;break}if(T.distbits=6,T.distcode=T.distdyn,kn={bits:T.distbits},Ne=o(a,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,kn),T.distbits=kn.bits,Ne){G.msg="invalid distances set",T.mode=D;break}if(T.mode=Ee,X===u)break e;case Ee:T.mode=De;case De:if($>=6&&R>=258){G.next_out=K,G.avail_out=R,G.next_in=g,G.avail_in=$,T.hold=H,T.bits=Z,r(G,be),K=G.next_out,_e=G.output,R=G.avail_out,g=G.next_in,re=G.input,$=G.avail_in,H=T.hold,Z=T.bits,T.mode===oe&&(T.back=-1);break}for(T.back=0;U=T.lencode[H&(1<<T.lenbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(lt&&!(lt&240)){for(Tt=Me,ke=lt,lr=tt;U=T.lencode[lr+((H&(1<<Tt+ke)-1)>>Tt)],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Tt+Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Tt,Z-=Tt,T.back+=Tt}if(H>>>=Me,Z-=Me,T.back+=Me,T.length=tt,lt===0){T.mode=ee;break}if(lt&32){T.back=-1,T.mode=oe;break}if(lt&64){G.msg="invalid literal/length code",T.mode=D;break}T.extra=lt&15,T.mode=Ge;case Ge:if(T.extra){for(rn=T.extra;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.length+=H&(1<<T.extra)-1,H>>>=T.extra,Z-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=Ve;case Ve:for(;U=T.distcode[H&(1<<T.distbits)-1],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(!(lt&240)){for(Tt=Me,ke=lt,lr=tt;U=T.distcode[lr+((H&(1<<Tt+ke)-1)>>Tt)],Me=U>>>24,lt=U>>>16&255,tt=U&65535,!(Tt+Me<=Z);){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}H>>>=Tt,Z-=Tt,T.back+=Tt}if(H>>>=Me,Z-=Me,T.back+=Me,lt&64){G.msg="invalid distance code",T.mode=D;break}T.offset=tt,T.extra=lt&15,T.mode=j;case j:if(T.extra){for(rn=T.extra;Z<rn;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}T.offset+=H&(1<<T.extra)-1,H>>>=T.extra,Z-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){G.msg="invalid distance too far back",T.mode=D;break}T.mode=W;case W:if(R===0)break e;if(xe=be-R,T.offset>xe){if(xe=T.offset-xe,xe>T.whave&&T.sane){G.msg="invalid distance too far back",T.mode=D;break}xe>T.wnext?(xe-=T.wnext,Ue=T.wsize-xe):Ue=T.wnext-xe,xe>T.length&&(xe=T.length),gn=T.window}else gn=_e,Ue=K-T.offset,xe=T.length;xe>R&&(xe=R),R-=xe,T.length-=xe;do _e[K++]=gn[Ue++];while(--xe);T.length===0&&(T.mode=De);break;case ee:if(R===0)break e;_e[K++]=T.length,R--,T.mode=De;break;case J:if(T.wrap){for(;Z<32;){if($===0)break e;$--,H|=re[g++]<<Z,Z+=8}if(be-=R,G.total_out+=be,T.total+=be,be&&(G.adler=T.check=T.flags?n(T.check,_e,be,K-be):e(T.check,_e,be,K-be)),be=R,(T.flags?H:dt(H))!==T.check){G.msg="incorrect data check",T.mode=D;break}H=0,Z=0}T.mode=fe;case fe:if(T.wrap&&T.flags){for(;Z<32;){if($===0)break e;$--,H+=re[g++]<<Z,Z+=8}if(H!==(T.total&4294967295)){G.msg="incorrect length check",T.mode=D;break}H=0,Z=0}T.mode=L;case L:Ne=h;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||be!==G.avail_out&&T.mode<D&&(T.mode<J||X!==c))&&O(G,G.output,G.next_out,be-G.avail_out),Te-=G.avail_in,be-=G.avail_out,G.total_in+=Te,G.total_out+=be,T.total+=be,T.wrap&&be&&(G.adler=T.check=T.flags?n(T.check,_e,be,G.next_out-be):e(T.check,_e,be,G.next_out-be)),G.data_type=T.bits+(T.last?64:0)+(T.mode===oe?128:0)+(T.mode===Ee||T.mode===ce?256:0),(Te===0&&be===0||X===c)&&Ne===f&&(Ne=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 un.inflateReset=$e,un.inflateReset2=kt,un.inflateResetKeep=It,un.inflateInit=et,un.inflateInit2=zt,un.inflate=x,un.inflateEnd=z,un.inflateGetHeader=V,un.inflateSetDictionary=ue,un.inflateInfo="pako inflate (from Nodeca project)",un}var Dd,P2;function L2(){return P2||(P2=1,Dd={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}),Dd}var Bd,O2;function yR(){if(O2)return Bd;O2=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 Bd=t,Bd}var N2;function bR(){if(N2)return Co;N2=1;var t=mR(),e=Nr(),n=D2(),r=L2(),o=Sd(),i=k2(),s=yR(),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,b=this.options.dictionary,v,y,A,S,E,I=!1;if(this.ended)return!1;y=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&&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;d.next_out&&(d.avail_out===0||v===r.Z_STREAM_END||d.avail_in===0&&(y===r.Z_FINISH||y===r.Z_SYNC_FLUSH))&&(this.options.to==="string"?(A=n.utf8border(d.output,d.next_out),S=d.next_out-A,E=n.buf2string(d.output,A),d.next_out=S,d.avail_out=p-S,S&&e.arraySet(d.output,d.output,A,S,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&&(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),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 Co.Inflate=c,Co.inflate=l,Co.inflateRaw=u,Co.ungzip=l,Co}var kd,z2;function wR(){if(z2)return kd;z2=1;var t=Nr().assign,e=dR(),n=bR(),r=L2(),o={};return t(o,e,n,r),kd=o,kd}var Xl=wR();async function zr(t){try{let e,n=0,r=0;const o=[];let i=0,s;do{const c=t.subarray(n);if(s=new Xl.Inflate,{strm:e}=s,s.push(c,Xl.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 U2(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 Xl.Inflate;if({strm:n}=b,b.push(p,Xl.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 h=new Uint8Array(u);for(let p=0,b=0;p<a.length;p++)h.set(a[p],b),b+=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 _d,G2;function xR(){if(G2)return _d;G2=1,_d=e;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function e(M,C,Y){this.low=M|0,this.high=C|0,this.unsigned=!!Y}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0});function n(M){return(M&&M.__isLong__)===!0}e.isLong=n;var r={},o={};function i(M,C){var Y,Q,oe;return C?(M>>>=0,(oe=0<=M&&M<256)&&(Q=o[M],Q)?Q:(Y=a(M,(M|0)<0?-1:0,!0),oe&&(o[M]=Y),Y)):(M|=0,(oe=-128<=M&&M<128)&&(Q=r[M],Q)?Q:(Y=a(M,M<0?-1:0,!1),oe&&(r[M]=Y),Y))}e.fromInt=i;function s(M,C){if(isNaN(M))return C?A:y;if(C){if(M<0)return A;if(M>=p)return B}else{if(M<=-9223372036854776e3)return N;if(M+1>=b)return _}return M<0?s(-M,C).neg():a(M%d|0,M/d|0,C)}e.fromNumber=s;function a(M,C,Y){return new e(M,C,Y)}e.fromBits=a;var c=Math.pow;function l(M,C,Y){if(M.length===0)throw Error("empty string");if(M==="NaN"||M==="Infinity"||M==="+Infinity"||M==="-Infinity")return 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=M.indexOf("-"))>0)throw Error("interior hyphen");if(Q===0)return l(M.substring(1),C,Y).neg();for(var oe=s(c(Y,8)),se=y,ae=0;ae<M.length;ae+=8){var ce=Math.min(8,M.length-ae),ye=parseInt(M.substring(ae,ae+ce),Y);if(ce<8){var de=s(c(Y,ce));se=se.mul(de).add(s(ye))}else se=se.mul(oe),se=se.add(s(ye))}return se.unsigned=C,se}e.fromString=l;function u(M,C){return typeof M=="number"?s(M,C):typeof M=="string"?l(M,C):a(M.low,M.high,typeof C=="boolean"?C:M.unsigned)}e.fromValue=u;var f=65536,h=1<<24,d=f*f,p=d*d,b=p/2,v=i(h),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 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(C){if(C=C||10,C<2||36<C)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(N)){var Y=s(C),Q=this.div(Y),oe=Q.mul(Y).sub(this);return Q.toString(C)+oe.toInt().toString(C)}else return"-"+this.neg().toString(C);for(var se=s(c(C,6),this.unsigned),ae=this,ce="";;){var ye=ae.div(se),de=ae.sub(ye.mul(se)).toInt()>>>0,Ce=de.toString(C);if(ae=ye,ae.isZero())return Ce+ce;for(;Ce.length<6;)Ce="0"+Ce;ce=""+Ce+ce}},F.getHighBits=function(){return this.high},F.getHighBitsUnsigned=function(){return this.high>>>0},F.getLowBits=function(){return this.low},F.getLowBitsUnsigned=function(){return this.low>>>0},F.getNumBitsAbs=function(){if(this.isNegative())return this.eq(N)?64:this.neg().getNumBitsAbs();for(var C=this.high!=0?this.high:this.low,Y=31;Y>0&&!(C&1<<Y);Y--);return this.high!=0?Y+33:Y+1},F.isZero=function(){return this.high===0&&this.low===0},F.eqz=F.isZero,F.isNegative=function(){return!this.unsigned&&this.high<0},F.isPositive=function(){return this.unsigned||this.high>=0},F.isOdd=function(){return(this.low&1)===1},F.isEven=function(){return(this.low&1)===0},F.equals=function(C){return n(C)||(C=u(C)),this.unsigned!==C.unsigned&&this.high>>>31===1&&C.high>>>31===1?!1:this.high===C.high&&this.low===C.low},F.eq=F.equals,F.notEquals=function(C){return!this.eq(C)},F.neq=F.notEquals,F.ne=F.notEquals,F.lessThan=function(C){return this.comp(C)<0},F.lt=F.lessThan,F.lessThanOrEqual=function(C){return this.comp(C)<=0},F.lte=F.lessThanOrEqual,F.le=F.lessThanOrEqual,F.greaterThan=function(C){return this.comp(C)>0},F.gt=F.greaterThan,F.greaterThanOrEqual=function(C){return this.comp(C)>=0},F.gte=F.greaterThanOrEqual,F.ge=F.greaterThanOrEqual,F.compare=function(C){if(n(C)||(C=u(C)),this.eq(C))return 0;var Y=this.isNegative(),Q=C.isNegative();return Y&&!Q?-1:!Y&&Q?1:this.unsigned?C.high>>>0>this.high>>>0||C.high===this.high&&C.low>>>0>this.low>>>0?-1:1:this.sub(C).isNegative()?-1:1},F.comp=F.compare,F.negate=function(){return!this.unsigned&&this.eq(N)?N:this.not().add(S)},F.neg=F.negate,F.add=function(C){n(C)||(C=u(C));var Y=this.high>>>16,Q=this.high&65535,oe=this.low>>>16,se=this.low&65535,ae=C.high>>>16,ce=C.high&65535,ye=C.low>>>16,de=C.low&65535,Ce=0,me=0,Ee=0,De=0;return De+=se+de,Ee+=De>>>16,De&=65535,Ee+=oe+ye,me+=Ee>>>16,Ee&=65535,me+=Q+ce,Ce+=me>>>16,me&=65535,Ce+=Y+ae,Ce&=65535,a(Ee<<16|De,Ce<<16|me,this.unsigned)},F.subtract=function(C){return n(C)||(C=u(C)),this.add(C.neg())},F.sub=F.subtract,F.multiply=function(C){if(this.isZero())return 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,oe=this.high&65535,se=this.low>>>16,ae=this.low&65535,ce=C.high>>>16,ye=C.high&65535,de=C.low>>>16,Ce=C.low&65535,me=0,Ee=0,De=0,Ge=0;return Ge+=ae*Ce,De+=Ge>>>16,Ge&=65535,De+=se*Ce,Ee+=De>>>16,De&=65535,De+=ae*de,Ee+=De>>>16,De&=65535,Ee+=oe*Ce,me+=Ee>>>16,Ee&=65535,Ee+=se*de,me+=Ee>>>16,Ee&=65535,Ee+=ae*ye,me+=Ee>>>16,Ee&=65535,me+=Q*Ce+oe*de+se*ye+ae*ce,me&=65535,a(De<<16|Ge,me<<16|Ee,this.unsigned)},F.mul=F.multiply,F.divide=function(C){if(n(C)||(C=u(C)),C.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&C.low===-1&&C.high===-1)return this;var Y=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,C.low,C.high);return a(Y,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?A:y;var Q,oe,se;if(this.unsigned){if(C.unsigned||(C=C.toUnsigned()),C.gt(this))return A;if(C.gt(this.shru(1)))return E;se=A}else{if(this.eq(N)){if(C.eq(S)||C.eq(I))return N;if(C.eq(N))return S;var ae=this.shr(1);return Q=ae.div(C).shl(1),Q.eq(y)?C.isNegative()?S:I:(oe=this.sub(C.mul(Q)),se=Q.add(oe.div(C)),se)}else if(C.eq(N))return this.unsigned?A: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();se=y}for(oe=this;oe.gte(C);){Q=Math.max(1,Math.floor(oe.toNumber()/C.toNumber()));for(var ce=Math.ceil(Math.log(Q)/Math.LN2),ye=ce<=48?1:c(2,ce-48),de=s(Q),Ce=de.mul(C);Ce.isNegative()||Ce.gt(oe);)Q-=ye,de=s(Q,this.unsigned),Ce=de.mul(C);de.isZero()&&(de=S),se=se.add(de),oe=oe.sub(Ce)}return se},F.div=F.divide,F.modulo=function(C){if(n(C)||(C=u(C)),t){var Y=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,C.low,C.high);return a(Y,t.get_high(),this.unsigned)}return this.sub(this.div(C).mul(C))},F.mod=F.modulo,F.rem=F.modulo,F.not=function(){return a(~this.low,~this.high,this.unsigned)},F.and=function(C){return n(C)||(C=u(C)),a(this.low&C.low,this.high&C.high,this.unsigned)},F.or=function(C){return n(C)||(C=u(C)),a(this.low|C.low,this.high|C.high,this.unsigned)},F.xor=function(C){return n(C)||(C=u(C)),a(this.low^C.low,this.high^C.high,this.unsigned)},F.shiftLeft=function(C){return n(C)&&(C=C.toInt()),(C&=63)===0?this:C<32?a(this.low<<C,this.high<<C|this.low>>>32-C,this.unsigned):a(0,this.low<<C-32,this.unsigned)},F.shl=F.shiftLeft,F.shiftRight=function(C){return n(C)&&(C=C.toInt()),(C&=63)===0?this:C<32?a(this.low>>>C|this.high<<32-C,this.high>>C,this.unsigned):a(this.high>>C-32,this.high>=0?0:-1,this.unsigned)},F.shr=F.shiftRight,F.shiftRightUnsigned=function(C){if(n(C)&&(C=C.toInt()),C&=63,C===0)return this;var Y=this.high;if(C<32){var Q=this.low;return a(Q>>>C|Y<<32-C,Y>>>C,this.unsigned)}else return C===32?a(Y,0,this.unsigned):a(Y>>>C-32,0,this.unsigned)},F.shru=F.shiftRightUnsigned,F.shr_u=F.shiftRightUnsigned,F.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},F.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},F.toBytes=function(C){return C?this.toBytesLE():this.toBytesBE()},F.toBytesLE=function(){var C=this.high,Y=this.low;return[Y&255,Y>>>8&255,Y>>>16&255,Y>>>24,C&255,C>>>8&255,C>>>16&255,C>>>24]},F.toBytesBE=function(){var C=this.high,Y=this.low;return[C>>>24,C>>>16&255,C>>>8&255,C&255,Y>>>24,Y>>>16&255,Y>>>8&255,Y&255]},e.fromBytes=function(C,Y,Q){return Q?e.fromBytesLE(C,Y):e.fromBytesBE(C,Y)},e.fromBytesLE=function(C,Y){return new e(C[0]|C[1]<<8|C[2]<<16|C[3]<<24,C[4]|C[5]<<8|C[6]<<16|C[7]<<24,Y)},e.fromBytesBE=function(C,Y){return new e(C[4]<<24|C[5]<<16|C[6]<<8|C[7],C[0]<<24|C[1]<<16|C[2]<<8|C[3],Y)},_d}var vR=xR();const Kl=Ql(vR),Jl=1;class AR{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=Kl.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[Jl],b=d?d[Jl]: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][Jl]>=r));f+=1);return i[i.length-1][Jl]<r&&i.push([]),i}}class H2{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 AR({filehandle:r,path:!r&&!o&&n?o:`${n}.gzi`})}async stat(){const e=await this.filehandle.stat();return Object.assign(e,{size:await this.getUncompressedFileSize(),blocks:void 0,blksize:void 0})}async getUncompressedFileSize(){const[,e]=await this.gzi.getLastBlock(),{size:n}=await this.filehandle.stat(),r=Ke.Buffer.allocUnsafe(4),{bytesRead:o}=await this.filehandle.read(r,0,4,n-28-4);if(o!==4)throw new Error("read error");const i=r.readUInt32LE(0);return e+i}async _readAndUncompressBlock(e,[n],[r]){let o=r;o||(o=(await this.filehandle.stat()).size);const i=o-n;return await this.filehandle.read(e,0,i,n),await zr(e.slice(0,i))}async read(e,n,r,o){const i=await this.gzi.getRelevantBlocksForRead(r,o),s=Ke.Buffer.allocUnsafe(32768*2);let a=n,c=0;for(let l=0;l<i.length-1;l+=1){const u=await this._readAndUncompressBlock(s,i[l],i[l+1]),[,f]=i[l],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 V2(t,e){return t.offset+t.lineBytes*Math.floor(e/t.lineLength)+e%t.lineLength}async function ER(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 q2{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=ER(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=V2(e,n),a=V2(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 SR extends q2{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 H2({filehandle:e,gziFilehandle:i}):n&&s&&(this.fasta=new H2({path:n,gziPath:s}))}}function j2(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 CR{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 j2(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 IR=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:SR,FetchableSmallFasta:CR,IndexedFasta:q2,parseSmallFasta:j2},Symbol.toStringTag,{value:"Module"})),W2=BigInt(32);function TR(t,e,n){const r=+!!n,o=+!n;return BigInt(t.getInt32(e,n)*o+t.getInt32(e+4,n)*r)<<W2|BigInt(t.getUint32(e,n)*r+t.getUint32(e+4,n)*o)}function DR(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)<<W2|BigInt(r*i+o*s)}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(t,e){return TR(this,t,e)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(t,e){return DR(this,t,e)});class BR{}class kR{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(e=new BR){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 _R{constructor(){this.callbacks=new Set}addCallback(e=()=>{}){this.callbacks.add(e),e(this.currentMessage)}callback(e){this.currentMessage=e;for(const n of this.callbacks)n(e)}}class Di{constructor({fill:e,cache:n}){if(typeof e!="function")throw new TypeError("must pass a fill function");if(typeof n!="object")throw new TypeError("must pass a cache object");if(typeof n.get!="function"||typeof n.set!="function"||typeof n.delete!="function")throw new TypeError("cache must implement get(key), set(key, val), and and delete(key)");this.cache=n,this.fillCallback=e}static isAbortException(e){return e.name==="AbortError"||e.code==="ERR_ABORTED"||e.message==="AbortError: aborted"||e.message==="Error: aborted"}evict(e,n){this.cache.get(e)===n&&this.cache.delete(e)}fill(e,n,r,o){const i=new kR,s=new _R;s.addCallback(o);const a={aborter:i,promise:this.fillCallback(n,i.signal,c=>{s.callback(c)}),settled:!1,statusReporter:s,get aborted(){return this.aborter.signal.aborted}};a.aborter.addSignal(r),a.aborter.signal.addEventListener("abort",()=>{a.settled||this.evict(e,a)}),a.promise.then(()=>{a.settled=!0},()=>{a.settled=!0,this.evict(e,a)}).catch(c=>{throw console.error(c),c}),this.cache.set(e,a)}static checkSinglePromise(e,n){function r(){if(n!=null&&n.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return e.then(o=>(r(),o),o=>{throw r(),o})}has(e){return this.cache.has(e)}get(e,n,r,o){if(!r&&n instanceof AbortSignal)throw new TypeError("second get argument appears to be an AbortSignal, perhaps you meant to pass `null` for the fill data?");const i=this.cache.get(e);return i?i.aborted&&!i.settled?(this.evict(e,i),this.get(e,n,r,o)):i.settled?i.promise:(i.aborter.addSignal(r),i.statusReporter.addCallback(o),Di.checkSinglePromise(i.promise,r)):(this.fill(e,n,r,o),Di.checkSinglePromise(this.cache.get(e).promise,r))}delete(e){const n=this.cache.get(e);n&&(n.settled||n.aborter.abort(),this.cache.delete(e))}clear(){const e=this.cache.keys();let n=0;for(let r=e.next();!r.done;r=e.next())this.delete(r.value),n+=1;return n}}var Rd,Y2;function RR(){if(Y2)return Rd;Y2=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 Rd=t,Rd}var FR=RR();const $l=Ql(FR);class Io{constructor(e){this.ranges=e}get min(){return this.ranges[0].min}get max(){return this.ranges.at(-1).max}contains(e){for(const n of this.ranges)if(n.min<=e&&n.max>=e)return!0;return!1}isContiguous(){return this.ranges.length>1}getRanges(){return this.ranges.map(e=>new Io([{min:e.min,max:e.max}]))}toString(){return this.ranges.map(e=>`[${e.min}-${e.max}]`).join(",")}union(e){const n=[...this.getRanges(),...e.getRanges()].sort((i,s)=>i.min<s.min?-1:i.min>s.min?1:i.max<s.max?-1:s.max>i.max?1:0),r=[];let o=n[0];for(const i of n)i.min>o.max+1?(r.push(o),o=i):i.max>o.max&&(o=new Io([{min:o.min,max:i.max}]));return r.push(o),r.length===1?r[0]:new Io(r)}}/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */function To(t){let e=t.length;for(;--e>=0;)t[e]=0}const MR=3,PR=258,Q2=29,LR=256+1+Q2,Z2=30,OR=512,NR=new Array((LR+2)*2);To(NR);const zR=new Array(Z2*2);To(zR);const UR=new Array(OR);To(UR);const GR=new Array(PR-MR+1);To(GR);const HR=new Array(Q2);To(HR);const VR=new Array(Z2);To(VR);var Fd=(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 qR=()=>{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},jR=new Uint32Array(qR());var qn=(t,e,n,r)=>{const o=jR,i=r+n;t^=-1;for(let s=r;s<i;s++)t=t>>>8^o[(t^e[s])&255];return t^-1},Md={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"},X2={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 WR=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var YR=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)WR(n,r)&&(t[r]=n[r])}}return t},QR=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},K2={assign:YR,flattenChunks:QR};let J2=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{J2=!1}const _a=new Uint8Array(256);for(let t=0;t<256;t++)_a[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;_a[254]=_a[254]=1;var ZR=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 XR=(t,e)=>{if(e<65534&&t.subarray&&J2)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 KR=(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=_a[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 XR(i,o)},JR=(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+_a[t[n]]>e?n:e},Pd={string2buf:ZR,buf2string:KR,utf8border:JR};function $R(){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 eF=$R;const eu=16209,tF=16191;var nF=function(e,n){let r,o,i,s,a,c,l,u,f,h,d,p,b,v,y,A,S,E,I,_,B,N,F,M;const C=e.state;r=e.next_in,F=e.input,o=r+(e.avail_in-5),i=e.next_out,M=e.output,s=i-(n-e.avail_out),a=i+(e.avail_out-257),c=C.dmax,l=C.wsize,u=C.whave,f=C.wnext,h=C.window,d=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&&(d+=F[r++]<<p,p+=8,d+=F[r++]<<p,p+=8),S=b[d&y];t:for(;;){if(E=S>>>24,d>>>=E,p-=E,E=S>>>16&255,E===0)M[i++]=S&65535;else if(E&16){I=S&65535,E&=15,E&&(p<E&&(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),S=v[d&A];n:for(;;){if(E=S>>>24,d>>>=E,p-=E,E=S>>>16&255,E&16){if(_=S&65535,E&=15,p<E&&(d+=F[r++]<<p,p+=8,p<E&&(d+=F[r++]<<p,p+=8)),_+=d&(1<<E)-1,_>c){e.msg="invalid distance too far back",C.mode=eu;break e}if(d>>>=E,p-=E,E=i-s,_>E){if(E=_-E,E>u&&C.sane){e.msg="invalid distance too far back",C.mode=eu;break e}if(B=0,N=h,f===0){if(B+=l-E,E<I){I-=E;do M[i++]=h[B++];while(--E);B=i-_,N=M}}else if(f<E){if(B+=l+f-E,E-=f,E<I){I-=E;do M[i++]=h[B++];while(--E);if(B=0,f<I){E=f,I-=E;do M[i++]=h[B++];while(--E);B=i-_,N=M}}}else if(B+=f-E,E<I){I-=E;do M[i++]=h[B++];while(--E);B=i-_,N=M}for(;I>2;)M[i++]=N[B++],M[i++]=N[B++],M[i++]=N[B++],I-=3;I&&(M[i++]=N[B++],I>1&&(M[i++]=N[B++]))}else{B=i-_;do M[i++]=M[B++],M[i++]=M[B++],M[i++]=M[B++],I-=3;while(I>2);I&&(M[i++]=M[B++],I>1&&(M[i++]=M[B++]))}}else if(E&64){e.msg="invalid distance code",C.mode=eu;break e}else{S=v[(S&65535)+(d&(1<<E)-1)];continue n}break}}else if(E&64)if(E&32){C.mode=tF;break e}else{e.msg="invalid literal/length code",C.mode=eu;break e}else{S=b[(S&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),C.hold=d,C.bits=p};const Do=15,$2=852,ew=592,tw=0,Ld=1,nw=2,rF=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]),iF=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]),oF=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]),sF=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 Ra=(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,b=0,v=0,y=0,A=0,S,E,I,_,B,N=null,F;const M=new Uint16Array(Do+1),C=new Uint16Array(Do+1);let Y=null,Q,oe,se;for(l=0;l<=Do;l++)M[l]=0;for(u=0;u<r;u++)M[e[n+u]]++;for(d=c,h=Do;h>=1&&M[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&&M[f]===0;f++);for(d<f&&(d=f),v=1,l=1;l<=Do;l++)if(v<<=1,v-=M[l],v<0)return-1;if(v>0&&(t===tw||h!==1))return-1;for(C[1]=0,l=1;l<Do;l++)C[l+1]=C[l]+M[l];for(u=0;u<r;u++)e[n+u]!==0&&(s[C[e[n+u]]++]=u);if(t===tw?(N=Y=s,F=20):t===Ld?(N=rF,Y=iF,F=257):(N=oF,Y=sF,F=0),A=0,u=0,l=f,B=i,p=d,b=0,I=-1,y=1<<d,_=y-1,t===Ld&&y>$2||t===nw&&y>ew)return 1;for(;;){Q=l-b,s[u]+1<F?(oe=0,se=s[u]):s[u]>=F?(oe=Y[s[u]-F],se=N[s[u]-F]):(oe=96,se=0),S=1<<l-b,E=1<<p,f=E;do E-=S,o[B+(A>>b)+E]=Q<<24|oe<<16|se|0;while(E!==0);for(S=1<<l-1;A&S;)S>>=1;if(S!==0?(A&=S-1,A+=S):A=0,u++,--M[l]===0){if(l===h)break;l=e[n+s[u]]}if(l>d&&(A&_)!==I){for(b===0&&(b=d),B+=f,p=l-b,v=1<<p;p+b<h&&(v-=M[p+b],!(v<=0));)p++,v<<=1;if(y+=1<<p,t===Ld&&y>$2||t===nw&&y>ew)return 1;I=A&_,o[I]=d<<24|p<<16|B-i|0}}return A!==0&&(o[B+A]=l-b<<24|64<<16|0),a.bits=d,0};const aF=0,rw=1,iw=2,{Z_FINISH:ow,Z_BLOCK:cF,Z_TREES:tu,Z_OK:Bi,Z_STREAM_END:lF,Z_NEED_DICT:uF,Z_STREAM_ERROR:fn,Z_DATA_ERROR:sw,Z_MEM_ERROR:aw,Z_BUF_ERROR:fF,Z_DEFLATED:cw}=X2,nu=16180,lw=16181,uw=16182,fw=16183,hw=16184,dw=16185,pw=16186,gw=16187,mw=16188,yw=16189,ru=16190,rr=16191,Od=16192,bw=16193,Nd=16194,ww=16195,xw=16196,vw=16197,Aw=16198,iu=16199,ou=16200,Ew=16201,Sw=16202,Cw=16203,Iw=16204,Tw=16205,zd=16206,Dw=16207,Bw=16208,ct=16209,kw=16210,_w=16211,hF=852,dF=592,pF=15,Rw=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function gF(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ki=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<nu||e.mode>_w?1:0},Fw=t=>{if(ki(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=nu,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(hF),e.distcode=e.distdyn=new Int32Array(dF),e.sane=1,e.back=-1,Bi},Mw=t=>{if(ki(t))return fn;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Fw(t)},Pw=(t,e)=>{let n;if(ki(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,Mw(t))},Lw=(t,e)=>{if(!t)return fn;const n=new gF;t.state=n,n.strm=t,n.window=null,n.mode=nu;const r=Pw(t,e);return r!==Bi&&(t.state=null),r},mF=t=>Lw(t,pF);let Ow=!0,Ud,Gd;const yF=t=>{if(Ow){Ud=new Int32Array(512),Gd=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(Ra(rw,t.lens,0,288,Ud,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Ra(iw,t.lens,0,32,Gd,0,t.work,{bits:5}),Ow=!1}t.lencode=Ud,t.lenbits=9,t.distcode=Gd,t.distbits=5},Nw=(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},bF=(t,e)=>{let n,r,o,i,s,a,c,l,u,f,h,d,p,b,v=0,y,A,S,E,I,_,B,N;const F=new Uint8Array(4);let M,C;const Y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ki(t)||!t.output||!t.input&&t.avail_in!==0)return fn;n=t.state,n.mode===rr&&(n.mode=Od),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,N=Bi;e:for(;;)switch(n.mode){case nu:if(n.wrap===0){n.mode=Od;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=qn(n.check,F,2,0),l=0,u=0,n.mode=lw;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)!==cw){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?yw:rr,l=0,u=0;break;case lw:for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==cw){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=qn(n.check,F,2,0)),l=0,u=0,n.mode=uw;case uw: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=qn(n.check,F,4,0)),l=0,u=0,n.mode=fw;case fw: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=qn(n.check,F,2,0)),l=0,u=0,n.mode=hw;case hw: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=qn(n.check,F,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=dw;case dw: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=qn(n.check,r,d,i)),a-=d,i+=d,n.length-=d),n.length))break e;n.length=0,n.mode=pw;case pw: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=qn(n.check,r,d,i)),a-=d,i+=d,B)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=gw;case gw: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=qn(n.check,r,d,i)),a-=d,i+=d,B)break e}else n.head&&(n.head.comment=null);n.mode=mw;case mw:if(n.flags&512){for(;u<16;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){t.msg="header crc mismatch",n.mode=ct;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=rr;break;case yw:for(;u<32;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}t.adler=n.check=Rw(l),l=0,u=0,n.mode=ru;case ru: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,uF;t.adler=n.check=1,n.mode=rr;case rr:if(e===cF||e===tu)break e;case Od:if(n.last){l>>>=u&7,u-=u&7,n.mode=zd;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=bw;break;case 1:if(yF(n),n.mode=iu,e===tu){l>>>=2,u-=2;break e}break;case 2:n.mode=xw;break;case 3:t.msg="invalid block type",n.mode=ct}l>>>=2,u-=2;break;case bw: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=Nd,e===tu)break e;case Nd:n.mode=ww;case ww: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=rr;break;case xw: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=vw;case vw:for(;n.have<n.ncode;){for(;u<3;){if(a===0)break e;a--,l+=r[i++]<<u,u+=8}n.lens[Y[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[Y[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,M={bits:n.lenbits},N=Ra(aF,n.lens,0,19,n.lencode,0,n.work,M),n.lenbits=M.bits,N){t.msg="invalid code lengths set",n.mode=ct;break}n.have=0,n.mode=Aw;case Aw: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],d=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,d=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,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,M={bits:n.lenbits},N=Ra(rw,n.lens,0,n.nlen,n.lencode,0,n.work,M),n.lenbits=M.bits,N){t.msg="invalid literal/lengths set",n.mode=ct;break}if(n.distbits=6,n.distcode=n.distdyn,M={bits:n.distbits},N=Ra(iw,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,M),n.distbits=M.bits,N){t.msg="invalid distances set",n.mode=ct;break}if(n.mode=iu,e===tu)break e;case iu:n.mode=ou;case ou: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,nF(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===rr&&(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=Tw;break}if(A&32){n.back=-1,n.mode=rr;break}if(A&64){t.msg="invalid literal/length code",n.mode=ct;break}n.extra=A&15,n.mode=Ew;case Ew: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=Sw;case Sw: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=Cw;case Cw: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=Iw;case Iw: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),b=n.window}else b=o,p=s-n.offset,d=n.length;d>c&&(d=c),c-=d,n.length-=d;do o[s++]=b[p++];while(--d);n.length===0&&(n.mode=ou);break;case Tw:if(c===0)break e;o[s++]=n.length,c--,n.mode=ou;break;case zd: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?qn(n.check,o,h,s-h):Fd(n.check,o,h,s-h)),h=c,n.wrap&4&&(n.flags?l:Rw(l))!==n.check){t.msg="incorrect data check",n.mode=ct;break}l=0,u=0}n.mode=Dw;case Dw: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=Bw;case Bw:N=lF;break e;case ct:N=sw;break e;case kw:return aw;case _w: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<zd||e!==ow))&&Nw(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?qn(n.check,o,h,t.next_out-h):Fd(n.check,o,h,t.next_out-h)),t.data_type=n.bits+(n.last?64:0)+(n.mode===rr?128:0)+(n.mode===iu||n.mode===Nd?256:0),(f===0&&h===0||e===ow)&&N===Bi&&(N=fF),N},wF=t=>{if(ki(t))return fn;let e=t.state;return e.window&&(e.window=null),t.state=null,Bi},xF=(t,e)=>{if(ki(t))return fn;const n=t.state;return n.wrap&2?(n.head=e,e.done=!1,Bi):fn},vF=(t,e)=>{const n=e.length;let r,o,i;return ki(t)||(r=t.state,r.wrap!==0&&r.mode!==ru)?fn:r.mode===ru&&(o=1,o=Fd(o,e,n,0),o!==r.check)?sw:(i=Nw(t,e,n,n),i?(r.mode=kw,aw):(r.havedict=1,Bi))};var AF=Mw,EF=Pw,SF=Fw,CF=mF,IF=Lw,TF=bF,DF=wF,BF=xF,kF=vF,_F="pako inflate (from Nodeca project)",ir={inflateReset:AF,inflateReset2:EF,inflateResetKeep:SF,inflateInit:CF,inflateInit2:IF,inflate:TF,inflateEnd:DF,inflateGetHeader:BF,inflateSetDictionary:kF,inflateInfo:_F};function RF(){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 FF=RF;const zw=Object.prototype.toString,{Z_NO_FLUSH:MF,Z_FINISH:PF,Z_OK:Fa,Z_STREAM_END:Hd,Z_NEED_DICT:Vd,Z_STREAM_ERROR:LF,Z_DATA_ERROR:Uw,Z_MEM_ERROR:OF}=X2;function su(t){this.options=K2.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 eF,this.strm.avail_out=0;let n=ir.inflateInit2(this.strm,e.windowBits);if(n!==Fa)throw new Error(Md[n]);if(this.header=new FF,ir.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Pd.string2buf(e.dictionary):zw.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=ir.inflateSetDictionary(this.strm,e.dictionary),n!==Fa)))throw new Error(Md[n])}su.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?PF:MF,zw.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),i=ir.inflate(n,s),i===Vd&&o&&(i=ir.inflateSetDictionary(n,o),i===Fa?i=ir.inflate(n,s):i===Uw&&(i=Vd));n.avail_in>0&&i===Hd&&n.state.wrap>0&&t[n.next_in]!==0;)ir.inflateReset(n),i=ir.inflate(n,s);switch(i){case LF:case Uw:case Vd:case OF:return this.onEnd(i),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(n.avail_out===0||i===Hd))if(this.options.to==="string"){let c=Pd.utf8border(n.output,n.next_out),l=n.next_out-c,u=Pd.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===Fa&&a===0)){if(i===Hd)return i=ir.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},su.prototype.onData=function(t){this.chunks.push(t)},su.prototype.onEnd=function(t){t===Fa&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=K2.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function NF(t,e){const n=new su(e);if(n.push(t),n.err)throw n.msg||Md[n.err];return n.result}function zF(t,e){return e=e||{},e.raw=!0,NF(t,e)}var UF=zF,GF={inflateRaw:UF};const{inflateRaw:HF}=GF;var VF=HF;function qF(t){return VF(t.subarray(2))}let jF=class extends Error{constructor(e){super(e),this.code="ERR_ABORTED"}};function WF(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 au(t){if(t&&t.aborted)if(typeof DOMException>"u"){const e=new jF("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}const qd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function jd(t,e,n,r){return t<r&&e>=n}class Gw{constructor(e,n,r,o,i,s){if(this.bbi=e,this.refsByName=n,this.cirTreeOffset=r,this.isBigEndian=o,this.isCompressed=i,this.blockType=s,this.featureCache=new Di({cache:new $l({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=[],b=0;const v=!0,y=(I,_,B)=>{try{const F=I.subarray(_),M=new DataView(F.buffer,F.byteOffset,F.length);let C=0;const Y=M.getUint8(C);C+=2;const Q=M.getUint16(C,v);if(C+=2,Y===1){const oe=[];for(let se=0;se<Q;se++){const ae=M.getUint32(C,v);C+=4;const ce=M.getUint32(C,v);C+=4;const ye=M.getUint32(C,v);C+=4;const de=M.getUint32(C,v);C+=4;const Ce=Number(M.getBigUint64(C,v));C+=8;const me=Number(M.getBigUint64(C,v));C+=8,oe.push({startChrom:ae,startBase:ce,endBase:de,endChrom:ye,blockOffset:Ce,blockSize:me,offset:C})}p=p.concat(oe.filter(se=>A(se)).map(se=>({offset:se.blockOffset,length:se.blockSize})))}else if(Y===0){const oe=[];for(let ae=0;ae<Q;ae++){const ce=M.getUint32(C,v);C+=4;const ye=M.getUint32(C,v);C+=4;const de=M.getUint32(C,v);C+=4;const Ce=M.getUint32(C,v);C+=4;const me=Number(M.getBigUint64(C,v));C+=8,oe.push({startChrom:ce,startBase:ye,endChrom:de,endBase:Ce,blockOffset:me,offset:C})}const se=oe.filter(ae=>A(ae)).map(ae=>ae.blockOffset);se.length>0&&E(se,B+1)}}catch(N){o.error(N)}},A=I=>{const{startChrom:_,startBase:B,endChrom:N,endBase:F}=I;return(_<u||_===u&&B<=r)&&(N>u||N===u&&F>=n)},S=async(I,_,B)=>{try{const N=_.max-_.min,F=_.min,M=await this.featureCache.get(`${N}_${F}`,{length:N,offset:F},i==null?void 0:i.signal);for(const C of I)_.contains(C)&&(y(M,C-F,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+d*32;let N=new Io([{min:I[0],max:I[0]+B}]);for(let F=1;F<I.length;F+=1){const M=new Io([{min:I[F],max:I[F]+B}]);N=N.union(M)}N.getRanges().map(F=>S(I,F,_))}catch(B){o.error(B)}};E([Number(c)+48],1);return}catch(s){o.error(s)}}parseSummaryBlock(e,n,r){const o=[];let i=n;const s=new DataView(e.buffer,e.byteOffset,e.length);for(;i<e.byteLength;){const a=s.getUint32(i,!0);i+=4;const c=s.getUint32(i,!0);i+=4;const l=s.getUint32(i,!0);i+=4;const u=s.getUint32(i,!0);i+=4;const f=s.getFloat32(i,!0);i+=4;const h=s.getFloat32(i,!0);i+=4;const d=s.getFloat32(i,!0);i+=4,i+=4,(!r||a===r.chrId&&jd(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 b=a;for(;b<e.length&&e[b]!==0;b++);const v=e.subarray(a,b),y=(i=qd==null?void 0:qd.decode(v))!==null&&i!==void 0?i:v.toString();a=b+1,s.push({chromId:h,start:d,end:p,rest:y,uniqueId:`bb-${r+f}`})}return o?s.filter(f=>jd(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 b=i.getInt32(s,!0);s+=4;const v=i.getFloat32(s,!0);s+=4,h[d]={start:p,end:b,score:v}}break}case 2:{for(let d=0;d<f;d++){const p=i.getInt32(s,!0);s+=4;const b=i.getFloat32(s,!0);s+=4,h[d]={score:b,start:p,end:p+l}}break}case 3:{for(let d=0;d<f;d++){const p=i.getFloat32(s,!0);s+=4;const b=a+d*c;h[d]={score:p,start:b,end:b+l}}break}}return r?h.filter(d=>jd(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=WF(n);au(s),await Promise.all(c.map(async l=>{au(s);const{length:u,offset:f}=l,h=await this.featureCache.get(`${u}_${f}`,l,s);for(const d of l.blocks){au(s);let p=Number(d.offset)-Number(l.offset),b=h;switch(i&&(b=qF(h.subarray(p)),p=0),au(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(d.offset)*256,a));break}default:console.warn(`Don't know what to do with ${o}`)}}})),e.complete()}catch(o){e.error(o)}}}var Wd=function(t,e){return Wd=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])},Wd(t,e)};function Yd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Wd(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function YF(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 Hw(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 Ma(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 Qd(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 Zd(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function Bo(t){return this instanceof Bo?(this.v=t,this):new Bo(t)}function QF(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(b){return new Promise(function(v,y){i.push([d,b,v,y])>1||c(d,b)})},p&&(o[d]=p(o[d])))}function c(d,p){try{l(r[d](p))}catch(b){h(i[0][3],b)}}function l(d){d.value instanceof Bo?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 ZF(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 Ma=="function"?Ma(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=t[i]&&function(s){return new Promise(function(a,c){s=t[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}typeof SuppressedError=="function"&&SuppressedError;function wt(t){return typeof t=="function"}function Vw(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 Xd=Vw(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
652
652
  `+n.map(function(r,o){return o+1+") "+r.toString()}).join(`
653
- `):"",this.name="UnsubscriptionError",this.errors=n}});function Rw(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Ud=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=_a(s),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(y){e={error:y}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}else s.remove(this);var u=this.initialTeardown;if(wt(u))try{u()}catch(y){i=y instanceof zd?y.errors:[y]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=_a(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{Mw(p)}catch(y){i=i??[],y instanceof zd?i=Nd(Nd([],Od(i)),Od(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 zd(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Mw(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)&&Rw(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Rw(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();Ud.EMPTY;function Fw(t){return t instanceof Ud||t&&"closed"in t&&wt(t.remove)&&wt(t.add)&&wt(t.unsubscribe)}function Mw(t){wt(t)?t():t.unsubscribe()}var LF={Promise:void 0},OF={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Nd([t,e],Od(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Pw(t){OF.setTimeout(function(){throw t})}function Lw(){}function NF(t){t()}var Gd=function(t){Ld(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Fw(n)&&n.add(r)):r.destination=GF,r}return e.create=function(n,r,o){return new $l(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}(Ud),zF=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){eu(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){eu(r)}else eu(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){eu(n)}},t}(),$l=function(t){Ld(e,t);function e(n,r,o){var i=t.call(this)||this,s;return wt(n)||!n?s={next:n??void 0,error:r??void 0,complete:o??void 0}:s=n,i.destination=new zF(s),i}return e}(Gd);function eu(t){Pw(t)}function UF(t){throw t}var GF={closed:!0,next:Lw,error:UF,complete:Lw},Hd=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ow(t){return t}function HF(t){return t.length===0?Ow: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=qF(e)?e:new $l(e,n,r);return NF(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=Nw(n),new n(function(o,i){var s=new $l({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[Hd]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return HF(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Nw(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 Nw(t){var e;return(e=t??LF.Promise)!==null&&e!==void 0?e:Promise}function VF(t){return t&&wt(t.next)&&wt(t.error)&&wt(t.complete)}function qF(t){return t&&t instanceof Gd||VF(t)&&Fw(t)}function jF(t){return wt(t==null?void 0:t.lift)}function Bo(t){return function(e){if(jF(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 Ra(t,e,n,r,o){return new WF(t,e,n,r,o)}var WF=function(t){Ld(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}(Gd),YF=new hn(function(t){return t.complete()});function QF(t){return t&&wt(t.schedule)}function zw(t){return t[t.length-1]}function ZF(t){return QF(zw(t))?t.pop():void 0}function XF(t,e){return typeof zw(t)=="number"?t.pop():e}var Uw=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Gw(t){return wt(t==null?void 0:t.then)}function Hw(t){return wt(t[Hd])}function Vw(t){return Symbol.asyncIterator&&wt(t==null?void 0:t[Symbol.asyncIterator])}function qw(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 KF(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var jw=KF();function Ww(t){return wt(t==null?void 0:t[jw])}function Yw(t){return MF(this,arguments,function(){var n,r,o,i;return kw(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,Do(n.read())];case 3:return r=s.sent(),o=r.value,i=r.done,i?[4,Do(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Do(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 Qw(t){return wt(t==null?void 0:t.getReader)}function ko(t){if(t instanceof hn)return t;if(t!=null){if(Hw(t))return JF(t);if(Uw(t))return $F(t);if(Gw(t))return e9(t);if(Vw(t))return Zw(t);if(Ww(t))return t9(t);if(Qw(t))return n9(t)}throw qw(t)}function JF(t){return new hn(function(e){var n=t[Hd]();if(wt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function $F(t){return new hn(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function e9(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,Pw)})}function t9(t){return new hn(function(e){var n,r;try{for(var o=_a(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 Zw(t){return new hn(function(e){r9(t,e).catch(function(n){return e.error(n)})})}function n9(t){return Zw(Yw(t))}function r9(t,e){var n,r,o,i;return FF(this,void 0,void 0,function(){var s,a;return kw(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=PF(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 ki(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 Xw(t,e){return e===void 0&&(e=0),Bo(function(n,r){n.subscribe(Ra(r,function(o){return ki(r,t,function(){return r.next(o)},e)},function(){return ki(r,t,function(){return r.complete()},e)},function(o){return ki(r,t,function(){return r.error(o)},e)}))})}function Kw(t,e){return e===void 0&&(e=0),Bo(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function i9(t,e){return ko(t).pipe(Kw(e),Xw(e))}function o9(t,e){return ko(t).pipe(Kw(e),Xw(e))}function s9(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 a9(t,e){return new hn(function(n){var r;return ki(n,e,function(){r=t[jw](),ki(n,e,function(){var o,i,s;try{o=r.next(),i=o.value,s=o.done}catch(a){n.error(a);return}s?n.complete():n.next(i)},0,!0)}),function(){return wt(r==null?void 0:r.return)&&r.return()}})}function Jw(t,e){if(!t)throw new Error("Iterable cannot be null");return new hn(function(n){ki(n,e,function(){var r=t[Symbol.asyncIterator]();ki(n,e,function(){r.next().then(function(o){o.done?n.complete():n.next(o.value)})},0,!0)})})}function c9(t,e){return Jw(Yw(t),e)}function l9(t,e){if(t!=null){if(Hw(t))return i9(t,e);if(Uw(t))return s9(t,e);if(Gw(t))return o9(t,e);if(Vw(t))return Jw(t,e);if(Ww(t))return a9(t,e);if(Qw(t))return c9(t,e)}throw qw(t)}function u9(t,e){return e?l9(t,e):ko(t)}var f9=_w(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function $w(t,e){return new Promise(function(n,r){var o=new $l({next:function(i){n(i),o.unsubscribe()},error:r,complete:function(){r(new f9)}});t.subscribe(o)})}function ex(t,e){return Bo(function(n,r){var o=0;n.subscribe(Ra(r,function(i){r.next(t.call(e,i,o++))}))})}function h9(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;ko(n(y,u++)).subscribe(Ra(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(Ra(e,d,function(){f=!0,h()})),function(){}}function tx(t,e,n){return n===void 0&&(n=1/0),wt(e)?tx(function(r,o){return ex(function(i,s){return e(r,i,o,s)})(ko(t(r,o)))},n):(typeof e=="number"&&(n=e),Bo(function(r,o){return h9(r,o,t,n)}))}function d9(t){return t===void 0&&(t=1/0),tx(Ow,t)}function p9(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ZF(t),r=XF(t,1/0),o=t;return o.length?o.length===1?ko(o[0]):d9(r)(u9(o,n)):YF}function g9(t,e,n,r,o){return function(i,s){var a=n,c=e,l=0;i.subscribe(Ra(s,function(u){var f=l++;c=a?t(c,u,f):(a=!0,u)},function(){a&&s.next(c),s.complete()}))}}function nx(t,e){return Bo(g9(t,e,arguments.length>=2,!1,!0))}var m9=function(t,e){return t.push(e),t};function b9(){return Bo(function(t,e){nx(m9,[])(t).subscribe(e)})}const rx=-2003829722,Vd=-2021002517;class ix{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 Sn(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 S=a.getUint32(c,!0);c+=4;const E=Number(a.getBigUint64(c,!0));c+=8;const I=[];for(let N=0;N<f;N++){const F=a.getUint32(c,!0);c+=4;const M=a.getUint32(c,!0);c+=4;const C=Number(a.getBigUint64(c,!0));c+=8;const Y=Number(a.getBigUint64(c,!0));c+=8,I.push({reductionLevel:F,reserved:M,dataOffset:C,indexOffset:Y})}const _=l===Vd?"bigbed":"bigwig";if(b>n||A>n-8*5)return this._getMainHeader(e,n*2);let B;if(A){const N=o.subarray(Number(A));let F=0;const M=new DataView(N.buffer,N.byteOffset,N.length),C=Number(M.getBigUint64(F,!0));F+=8;const Y=M.getFloat64(F,!0);F+=8;const Q=M.getFloat64(F,!0);F+=8;const oe=M.getFloat64(F,!0);F+=8;const se=M.getFloat64(F,!0);F+=8,B={scoreMin:Y,scoreMax:Q,scoreSum:oe,scoreSumSquares:se,basesCovered:C}}else throw new Error("no stats");return{zoomLevels:I,magic:l,extHeaderOffset:E,numZoomLevels:f,fieldCount:y,totalSummary:B,definedFieldCount:v,uncompressBufSize:S,asOffset:b,chromTreeOffset:h,totalSummaryOffset:A,unzoomedDataOffset:d,unzoomedIndexOffset:p,fileType:_,version:u,isBigEndian:i,autoSql:b?o.subarray(b,o.indexOf(0,b)).toString():""}}_isBigEndian(e){let n=e.readInt32LE(0);if(n===rx||n===Vd)return!1;if(n=e.readInt32BE(0),n===rx||n===Vd)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 S=h.getUint8(A);A+=2;const E=h.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=h.getUint32(A,o);A+=4;const N=h.getUint32(A,o);A+=4;const F={name:_,id:B,length:N};s[this.renameRefSeqs(_)]=B,i[B]=F}else{const I=[];for(let _=0;_<E;_++){A+=p;const B=Number(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 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 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 $w(i.pipe(b9()))).flat()}}class y9 extends ix{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 w9(t){return t.filter(e=>!!e)}class x9 extends ix{constructor(){super(...arguments),this.readIndicesCache=new Ti({cache:new ql({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 S=b.getInt16(A,i);A+=2;const E=b.getInt16(A,i);A+=2;const I=Number(b.getBigUint64(A,i));A+=12;const _=b.getInt16(A,i);p.push({type:S,fieldcount:E,offset:Number(I),field:_})}return p}async searchExtraIndexBlocks(e,n={}){const{isBigEndian:r}=await this.getHeader(n),o=await this.readIndices(n);if(o.length===0)return[];const i=o.map(async s=>{const{offset:a,field:c}=s,{buffer:l}=await this.bbi.read(Ke.Buffer.alloc(32),0,32,a,n),u=!r,f=l,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 S=>{const E=Number(S),I=4+p*(y+v),{buffer:_}=await this.bbi.read(Ke.Buffer.alloc(I),0,I,E,n),B=_,N=new DataView(B.buffer,B.byteOffset,B.length);let F=0;const M=N.getInt8(F);F+=2;const C=N.getInt16(F,u);F+=2;const Y=[];if(M===0){const Q=[];for(let se=0;se<C;se++){const ae=B.subarray(F,F+y).toString().replaceAll("\0","");F+=y;const ce=Number(N.getBigUint64(F,u));F+=8,Q.push({key:ae,offset:ce})}let oe=0;for(const{key:se,offset:ae}of Q){if(e.localeCompare(se)<0&&oe)return b(oe);oe=ae}return b(oe)}else if(M===1){for(let Q=0;Q<C;Q++){const oe=B.subarray(F,F+y).toString().replaceAll("\0","");F+=y;const se=Number(N.getBigUint64(F,u));F+=8;const ae=N.getUint32(F,u);F+=4;const ce=N.getUint32(F,u);F+=4,Y.push({key:oe,offset:se,length:ae,reserved:ce})}for(const Q of Y)if(Q.key===e)return{...Q,field:c};return}};return b(a+32)});return w9(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(nx((c,l)=>c.concat(l)),ex(c=>{for(const l of c)l.field=a.field;return c})));return(await $w(p9(...i))).filter(a=>{var c;return((c=a.rest)===null||c===void 0?void 0:c.split(" ")[(a.field||0)-3])===e})}}const ox=Object.freeze(Object.defineProperty({__proto__:null,BigBed:x9,BigWig:y9},Symbol.toStringTag,{value:"Module"}));var qd,sx;function v9(){if(sx)return qd;sx=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:pv},a=pv,c="(",l=Ne("(",!1),u=")",f=Ne(")",!1),h=function(P,ne,pe,we){return{type:P,name:ne,comment:pe,fields:we}},d="simple",p=Ne("simple",!1),y="object",v=Ne("object",!1),b="table",A=Ne("table",!1),S="auto",E=Ne("auto",!1),I="primary",_=Ne("primary",!1),B="index",N=Ne("index",!1),F="unique",M=Ne("unique",!1),C=function(P,ne){return ne},Y=function(P,ne){return P.name&&ne.unshift(P),ne},Q="#",oe=Ne("#",!1),se=";",ae=Ne(";",!1),ce=function(P,ne,pe){return{type:P,name:ne,comment:pe}},be="[",he=Ne("[",!1),Ie="]",me=Ne("]",!1),Ae=function(P,ne,pe,we){return{type:P,size:ne,name:pe,comment:we}},De=function(P,ne,pe,we){return{type:P,vals:ne,name:pe,comment:we}},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),Ee="ubyte",Re=Ne("ubyte",!1),dt="float",$t=Ne("float",!1),It="char",$e=Ne("char",!1),kt="string",zt=Ne("string",!1),et="lstring",Ut=Ne("lstring",!1),k="enum",m=Ne("enum",!1),w="double",O=Ne("double",!1),x="bigint",z=Ne("bigint",!1),V="set",ue=Ne("set",!1),G=function(P,ne){return P+" "+ne},X=/^[a-zA-Z_]/,T=ht([["a","z"],["A","Z"],"_"],!1,!1),re=/^[a-zA-Z0-9_]/,_e=ht([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),g=function(P){return ft()},K=/^[^\n\r]/,$=ht([`
654
- `,"\r"],!0,!1),R=function(P){return P.join("").replace(/^"/,"").replace(/"$/,"")},H=rn("integer"),Z=/^[0-9]/,Ce=ht([["0","9"]],!1,!1),ye=function(){return parseInt(ft(),10)},xe=rn("whitespace"),Ue=/^[ \t\n\r]/,gn=ht([" "," ",`
655
- `,"\r"],!1,!1),U=0,Me=0,lt=[{line:1,column:1}],tt=0,Tt=[],ke=0,cr;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 Dn(){return{type:"end"}}function rn(P){return{type:"other",description:P}}function nc(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 dv(P,ne){var pe=nc(P),we=nc(ne);return{start:{offset:P,line:pe.line,column:pe.column},end:{offset:ne,line:we.line,column:we.column}}}function Le(P){U<tt||(U>tt&&(tt=U,Tt=[]),Tt.push(P))}function SM(P,ne,pe){return new e(e.buildMessage(P,ne),P,ne,pe)}function pv(){var P,ne,pe,we,Fe,nt,ut,mn,Wr,lr,Yr,ur,Qr,fr;return P=U,ne=qe(),ne!==i?(pe=gv(),pe!==i?(we=qe(),we!==i?(Fe=mv(),Fe!==i?(nt=qe(),nt!==i?(ut=mu(),ut!==i?(mn=qe(),mn!==i?(r.charCodeAt(U)===40?(Wr=c,U++):(Wr=i,ke===0&&Le(l)),Wr!==i?(lr=qe(),lr!==i?(Yr=CM(),Yr!==i?(ur=qe(),ur!==i?(r.charCodeAt(U)===41?(Qr=u,U++):(Qr=i,ke===0&&Le(f)),Qr!==i?(fr=qe(),fr!==i?(Me=P,ne=h(pe,Fe,ut,Yr),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 gv(){var P;return r.substr(U,6)===d?(P=d,U+=6):(P=i,ke===0&&Le(p)),P===i&&(r.substr(U,6)===y?(P=y,U+=6):(P=i,ke===0&&Le(v)),P===i&&(r.substr(U,5)===b?(P=b,U+=5):(P=i,ke===0&&Le(A)))),P}function mv(){var P,ne,pe,we;return P=Bn(),P===i&&(P=U,ne=Bn(),ne!==i?(pe=bv(),pe!==i?(ne=[ne,pe],P=ne):(U=P,P=i)):(U=P,P=i),P===i&&(P=U,ne=Bn(),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=Bn(),ne!==i?(pe=bv(),pe!==i?(r.substr(U,4)===S?(we=S,U+=4):(we=i,ke===0&&Le(E)),we!==i?(ne=[ne,pe,we],P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)))),P}function bv(){var P;return r.substr(U,7)===I?(P=I,U+=7):(P=i,ke===0&&Le(_)),P===i&&(r.substr(U,5)===B?(P=B,U+=5):(P=i,ke===0&&Le(N)),P===i&&(r.substr(U,6)===F?(P=F,U+=6):(P=i,ke===0&&Le(M)))),P}function mu(){var P;return P=yv(),P===i&&(P=qe()),P}function CM(){var P,ne,pe,we,Fe,nt,ut;if(P=U,ne=w0(),ne!==i)if(pe=qe(),pe!==i){for(we=[],Fe=U,nt=qe(),nt!==i?(ut=w0(),ut!==i?(Me=Fe,nt=C(ne,ut),Fe=nt):(U=Fe,Fe=i)):(U=Fe,Fe=i);Fe!==i;)we.push(Fe),Fe=U,nt=qe(),nt!==i?(ut=w0(),ut!==i?(Me=Fe,nt=C(ne,ut),Fe=nt):(U=Fe,Fe=i)):(U=Fe,Fe=i);we!==i?(Fe=qe(),Fe!==i?(Me=P,ne=Y(ne,we),P=ne):(U=P,P=i)):(U=P,P=i)}else U=P,P=i;else U=P,P=i;return P}function IM(){var P;return r.charCodeAt(U)===35?(P=Q,U++):(P=i,ke===0&&Le(oe)),P}function TM(){var P,ne,pe,we,Fe;return P=U,ne=qe(),ne!==i?(pe=IM(),pe!==i?(we=yv(),we!==i?(Fe=qe(),Fe!==i?(ne=[ne,pe,we,Fe],P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i),P}function w0(){var P,ne,pe,we,Fe,nt,ut,mn,Wr,lr,Yr,ur,Qr,fr;return P=U,ne=x0(),ne!==i?(pe=qe(),pe!==i?(we=Bn(),we!==i?(Fe=qe(),Fe!==i?(r.charCodeAt(U)===59?(nt=se,U++):(nt=i,ke===0&&Le(ae)),nt!==i?(ut=qe(),ut!==i?(mn=mu(),mn!==i?(Me=P,ne=ce(ne,we,mn),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=x0(),ne!==i?(pe=qe(),pe!==i?(r.charCodeAt(U)===91?(we=be,U++):(we=i,ke===0&&Le(he)),we!==i?(Fe=qe(),Fe!==i?(nt=BM(),nt!==i?(ut=qe(),ut!==i?(r.charCodeAt(U)===93?(mn=Ie,U++):(mn=i,ke===0&&Le(me)),mn!==i?(Wr=qe(),Wr!==i?(lr=Bn(),lr!==i?(Yr=qe(),Yr!==i?(r.charCodeAt(U)===59?(ur=se,U++):(ur=i,ke===0&&Le(ae)),ur!==i?(Qr=qe(),Qr!==i?(fr=mu(),fr!==i?(Me=P,ne=Ae(ne,nt,lr,fr),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=x0(),ne!==i?(pe=qe(),pe!==i?(r.charCodeAt(U)===40?(we=c,U++):(we=i,ke===0&&Le(l)),we!==i?(Fe=qe(),Fe!==i?(nt=DM(),nt!==i?(ut=qe(),ut!==i?(r.charCodeAt(U)===41?(mn=u,U++):(mn=i,ke===0&&Le(f)),mn!==i?(Wr=qe(),Wr!==i?(lr=Bn(),lr!==i?(Yr=qe(),Yr!==i?(r.charCodeAt(U)===59?(ur=se,U++):(ur=i,ke===0&&Le(ae)),ur!==i?(Qr=qe(),Qr!==i?(fr=mu(),fr!==i?(Me=P,ne=De(ne,nt,lr,fr),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=TM()))),P}function DM(){var P,ne,pe,we,Fe,nt,ut;if(P=U,ne=Bn(),ne!==i){for(pe=[],we=U,r.charCodeAt(U)===44?(Fe=Ge,U++):(Fe=i,ke===0&&Le(Ve)),Fe!==i?(nt=qe(),nt!==i?(ut=Bn(),ut!==i?(Me=we,Fe=C(ne,ut),we=Fe):(U=we,we=i)):(U=we,we=i)):(U=we,we=i);we!==i;)pe.push(we),we=U,r.charCodeAt(U)===44?(Fe=Ge,U++):(Fe=i,ke===0&&Le(Ve)),Fe!==i?(nt=qe(),nt!==i?(ut=Bn(),ut!==i?(Me=we,Fe=C(ne,ut),we=Fe):(U=we,we=i)):(U=we,we=i)):(U=we,we=i);pe!==i?(Me=P,ne=q(ne,pe),P=ne):(U=P,P=i)}else U=P,P=i;return P}function x0(){var P,ne,pe,we;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)===Ee?(P=Ee,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)===kt?(P=kt,U+=6):(P=i,ke===0&&Le(zt)),P===i&&(r.substr(U,7)===et?(P=et,U+=7):(P=i,ke===0&&Le(Ut)),P===i&&(r.substr(U,4)===k?(P=k,U+=4):(P=i,ke===0&&Le(m)),P===i&&(r.substr(U,6)===w?(P=w,U+=6):(P=i,ke===0&&Le(O)),P===i&&(r.substr(U,6)===x?(P=x,U+=6):(P=i,ke===0&&Le(z)),P===i&&(r.substr(U,3)===V?(P=V,U+=3):(P=i,ke===0&&Le(ue)),P===i&&(P=U,ne=gv(),ne!==i?(pe=qe(),pe!==i?(we=mv(),we!==i?(Me=P,ne=G(ne,we),P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i))))))))))))))),P}function BM(){var P;return P=kM(),P===i&&(P=Bn()),P}function Bn(){var P,ne,pe,we,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(we=[],re.test(r.charAt(U))?(Fe=r.charAt(U),U++):(Fe=i,ke===0&&Le(_e));Fe!==i;)we.push(Fe),re.test(r.charAt(U))?(Fe=r.charAt(U),U++):(Fe=i,ke===0&&Le(_e));we!==i?(pe=[pe,we],ne=pe):(U=ne,ne=i)}else U=ne,ne=i;return ne!==i&&(Me=P,ne=g()),P=ne,P}function yv(){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 kM(){var P,ne,pe,we;if(ke++,P=U,ne=qe(),ne!==i){if(pe=[],Z.test(r.charAt(U))?(we=r.charAt(U),U++):(we=i,ke===0&&Le(Ce)),we!==i)for(;we!==i;)pe.push(we),Z.test(r.charAt(U))?(we=r.charAt(U),U++):(we=i,ke===0&&Le(Ce));else pe=i;pe!==i?(Me=P,ne=ye(),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(gn));ne!==i;)P.push(ne),Ue.test(r.charAt(U))?(ne=r.charAt(U),U++):(ne=i,ke===0&&Le(gn));return ke--,P===i&&(ne=i,ke===0&&Le(xe)),P}if(cr=a(),cr!==i&&U===r.length)return cr;throw cr!==i&&U<r.length&&Le(Dn()),SM(Tt,tt<r.length?r.charAt(tt):null,tt<r.length?dv(tt,tt+1):dv(tt,tt))}return qd={SyntaxError:e,parse:n},qd}var ax=v9();const A9=zl(ax),jd=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
653
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function qw(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Kd=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=Ma(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(wt(u))try{u()}catch(b){i=b instanceof Xd?b.errors:[b]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=Ma(f),d=h.next();!d.done;d=h.next()){var p=d.value;try{Ww(p)}catch(b){i=i??[],b instanceof Xd?i=Zd(Zd([],Qd(i)),Qd(b.errors)):i.push(b)}}}catch(b){r={error:b}}finally{try{d&&!d.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}if(i)throw new Xd(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Ww(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)&&qw(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&qw(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}();Kd.EMPTY;function jw(t){return t instanceof Kd||t&&"closed"in t&&wt(t.remove)&&wt(t.add)&&wt(t.unsubscribe)}function Ww(t){wt(t)?t():t.unsubscribe()}var XF={Promise:void 0},KF={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Zd([t,e],Qd(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Yw(t){KF.setTimeout(function(){throw t})}function Qw(){}function JF(t){t()}var Jd=function(t){Yd(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,jw(n)&&n.add(r)):r.destination=t9,r}return e.create=function(n,r,o){return new cu(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}(Kd),$F=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){lu(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){lu(r)}else lu(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){lu(n)}},t}(),cu=function(t){Yd(e,t);function e(n,r,o){var i=t.call(this)||this,s;return wt(n)||!n?s={next:n??void 0,error:r??void 0,complete:o??void 0}:s=n,i.destination=new $F(s),i}return e}(Jd);function lu(t){Yw(t)}function e9(t){throw t}var t9={closed:!0,next:Qw,error:e9,complete:Qw},$d=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Zw(t){return t}function n9(t){return t.length===0?Zw: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=i9(e)?e:new cu(e,n,r);return JF(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=Xw(n),new n(function(o,i){var s=new cu({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[$d]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return n9(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Xw(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 Xw(t){var e;return(e=t??XF.Promise)!==null&&e!==void 0?e:Promise}function r9(t){return t&&wt(t.next)&&wt(t.error)&&wt(t.complete)}function i9(t){return t&&t instanceof Jd||r9(t)&&jw(t)}function o9(t){return wt(t==null?void 0:t.lift)}function ko(t){return function(e){if(o9(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 Pa(t,e,n,r,o){return new s9(t,e,n,r,o)}var s9=function(t){Yd(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}(Jd),a9=new hn(function(t){return t.complete()});function c9(t){return t&&wt(t.schedule)}function Kw(t){return t[t.length-1]}function l9(t){return c9(Kw(t))?t.pop():void 0}function u9(t,e){return typeof Kw(t)=="number"?t.pop():e}var Jw=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function $w(t){return wt(t==null?void 0:t.then)}function ex(t){return wt(t[$d])}function tx(t){return Symbol.asyncIterator&&wt(t==null?void 0:t[Symbol.asyncIterator])}function nx(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 f9(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var rx=f9();function ix(t){return wt(t==null?void 0:t[rx])}function ox(t){return QF(this,arguments,function(){var n,r,o,i;return Hw(this,function(s){switch(s.label){case 0:n=t.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,Bo(n.read())];case 3:return r=s.sent(),o=r.value,i=r.done,i?[4,Bo(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Bo(o)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function sx(t){return wt(t==null?void 0:t.getReader)}function _o(t){if(t instanceof hn)return t;if(t!=null){if(ex(t))return h9(t);if(Jw(t))return d9(t);if($w(t))return p9(t);if(tx(t))return ax(t);if(ix(t))return g9(t);if(sx(t))return m9(t)}throw nx(t)}function h9(t){return new hn(function(e){var n=t[$d]();if(wt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function d9(t){return new hn(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function p9(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,Yw)})}function g9(t){return new hn(function(e){var n,r;try{for(var o=Ma(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 ax(t){return new hn(function(e){y9(t,e).catch(function(n){return e.error(n)})})}function m9(t){return ax(ox(t))}function y9(t,e){var n,r,o,i;return YF(this,void 0,void 0,function(){var s,a;return Hw(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=ZF(t),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(s=r.value,e.next(s),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),o={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(i=n.return)?[4,i.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function _i(t,e,n,r,o){r===void 0&&(r=0),o===void 0&&(o=!1);var i=e.schedule(function(){n(),o?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(i),!o)return i}function cx(t,e){return e===void 0&&(e=0),ko(function(n,r){n.subscribe(Pa(r,function(o){return _i(r,t,function(){return r.next(o)},e)},function(){return _i(r,t,function(){return r.complete()},e)},function(o){return _i(r,t,function(){return r.error(o)},e)}))})}function lx(t,e){return e===void 0&&(e=0),ko(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function b9(t,e){return _o(t).pipe(lx(e),cx(e))}function w9(t,e){return _o(t).pipe(lx(e),cx(e))}function x9(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 v9(t,e){return new hn(function(n){var r;return _i(n,e,function(){r=t[rx](),_i(n,e,function(){var o,i,s;try{o=r.next(),i=o.value,s=o.done}catch(a){n.error(a);return}s?n.complete():n.next(i)},0,!0)}),function(){return wt(r==null?void 0:r.return)&&r.return()}})}function ux(t,e){if(!t)throw new Error("Iterable cannot be null");return new hn(function(n){_i(n,e,function(){var r=t[Symbol.asyncIterator]();_i(n,e,function(){r.next().then(function(o){o.done?n.complete():n.next(o.value)})},0,!0)})})}function A9(t,e){return ux(ox(t),e)}function E9(t,e){if(t!=null){if(ex(t))return b9(t,e);if(Jw(t))return x9(t,e);if($w(t))return w9(t,e);if(tx(t))return ux(t,e);if(ix(t))return v9(t,e);if(sx(t))return A9(t,e)}throw nx(t)}function S9(t,e){return e?E9(t,e):_o(t)}var C9=Vw(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function fx(t,e){return new Promise(function(n,r){var o=new cu({next:function(i){n(i),o.unsubscribe()},error:r,complete:function(){r(new C9)}});t.subscribe(o)})}function hx(t,e){return ko(function(n,r){var o=0;n.subscribe(Pa(r,function(i){r.next(t.call(e,i,o++))}))})}function I9(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(b){return l<r?p(b):c.push(b)},p=function(b){l++;var v=!1;_o(n(b,u++)).subscribe(Pa(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();h()}catch(A){e.error(A)}}))};return t.subscribe(Pa(e,d,function(){f=!0,h()})),function(){}}function dx(t,e,n){return n===void 0&&(n=1/0),wt(e)?dx(function(r,o){return hx(function(i,s){return e(r,i,o,s)})(_o(t(r,o)))},n):(typeof e=="number"&&(n=e),ko(function(r,o){return I9(r,o,t,n)}))}function T9(t){return t===void 0&&(t=1/0),dx(Zw,t)}function D9(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=l9(t),r=u9(t,1/0),o=t;return o.length?o.length===1?_o(o[0]):T9(r)(S9(o,n)):a9}function B9(t,e,n,r,o){return function(i,s){var a=n,c=e,l=0;i.subscribe(Pa(s,function(u){var f=l++;c=a?t(c,u,f):(a=!0,u)},function(){a&&s.next(c),s.complete()}))}}function px(t,e){return ko(B9(t,e,arguments.length>=2,!1,!0))}var k9=function(t,e){return t.push(e),t};function _9(){return ko(function(t,e){px(k9,[])(t).subscribe(e)})}const gx=-2003829722,e0=-2021002517;class mx{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 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 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 F=a.getUint32(c,!0);c+=4;const M=a.getUint32(c,!0);c+=4;const C=Number(a.getBigUint64(c,!0));c+=8;const Y=Number(a.getBigUint64(c,!0));c+=8,I.push({reductionLevel:F,reserved:M,dataOffset:C,indexOffset:Y})}const _=l===e0?"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 F=0;const M=new DataView(N.buffer,N.byteOffset,N.length),C=Number(M.getBigUint64(F,!0));F+=8;const Y=M.getFloat64(F,!0);F+=8;const Q=M.getFloat64(F,!0);F+=8;const oe=M.getFloat64(F,!0);F+=8;const se=M.getFloat64(F,!0);F+=8,B={scoreMin:Y,scoreMax:Q,scoreSum:oe,scoreSumSquares:se,basesCovered:C}}else throw new Error("no stats");return{zoomLevels:I,magic:l,extHeaderOffset:E,numZoomLevels:f,fieldCount:b,totalSummary:B,definedFieldCount:v,uncompressBufSize:S,asOffset:y,chromTreeOffset:h,totalSummaryOffset:A,unzoomedDataOffset:d,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===gx||n===e0)return!1;if(n=e.readInt32BE(0),n===gx||n===e0)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 b=32,v=async y=>{let A=y;if(A>=u.length)throw new Error("reading beyond end of buffer");const S=h.getUint8(A);A+=2;const E=h.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=h.getUint32(A,o);A+=4;const N=h.getUint32(A,o);A+=4;const F={name:_,id:B,length:N};s[this.renameRefSeqs(_)]=B,i[B]=F}else{const I=[];for(let _=0;_<E;_++){A+=p;const B=Number(h.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 Gw(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 fx(i.pipe(_9()))).flat()}}class R9 extends mx{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 Gw(this.bbi,o,u.indexOffset,i,s>0,"summary")}return this.getUnzoomedView(n)}}function F9(t){return t.filter(e=>!!e)}class M9 extends mx{constructor(){super(...arguments),this.readIndicesCache=new Di({cache:new $l({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 b=0;b<l;b+=1){const v=d.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,h=new DataView(f.buffer,f.byteOffset,f.length);let d=0;d+=4;const p=h.getInt32(d,u);d+=4;const b=h.getInt32(d,u);d+=4;const v=h.getInt32(d,u);d+=4,d+=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 F=0;const M=N.getInt8(F);F+=2;const C=N.getInt16(F,u);F+=2;const Y=[];if(M===0){const Q=[];for(let se=0;se<C;se++){const ae=B.subarray(F,F+b).toString().replaceAll("\0","");F+=b;const ce=Number(N.getBigUint64(F,u));F+=8,Q.push({key:ae,offset:ce})}let oe=0;for(const{key:se,offset:ae}of Q){if(e.localeCompare(se)<0&&oe)return y(oe);oe=ae}return y(oe)}else if(M===1){for(let Q=0;Q<C;Q++){const oe=B.subarray(F,F+b).toString().replaceAll("\0","");F+=b;const se=Number(N.getBigUint64(F,u));F+=8;const ae=N.getUint32(F,u);F+=4;const ce=N.getUint32(F,u);F+=4,Y.push({key:oe,offset:se,length:ae,reserved:ce})}for(const Q of Y)if(Q.key===e)return{...Q,field:c};return}};return y(a+32)});return F9(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(px((c,l)=>c.concat(l)),hx(c=>{for(const l of c)l.field=a.field;return c})));return(await fx(D9(...i))).filter(a=>{var c;return((c=a.rest)===null||c===void 0?void 0:c.split(" ")[(a.field||0)-3])===e})}}const yx=Object.freeze(Object.defineProperty({__proto__:null,BigBed:M9,BigWig:R9},Symbol.toStringTag,{value:"Module"}));var t0,bx;function P9(){if(bx)return t0;bx=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,b;for(p=0;p<h.length;p++)d[p]=l(h[p]);if(d.sort(),d.length>0){for(p=1,b=1;p<d.length;p++)d[p-1]!==d[p]&&(d[b]=d[p],b++);d.length=b}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:Iv},a=Iv,c="(",l=Ne("(",!1),u=")",f=Ne(")",!1),h=function(P,ne,ge,we){return{type:P,name:ne,comment:ge,fields:we}},d="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),F="unique",M=Ne("unique",!1),C=function(P,ne){return ne},Y=function(P,ne){return P.name&&ne.unshift(P),ne},Q="#",oe=Ne("#",!1),se=";",ae=Ne(";",!1),ce=function(P,ne,ge){return{type:P,name:ne,comment:ge}},ye="[",de=Ne("[",!1),Ce="]",me=Ne("]",!1),Ee=function(P,ne,ge,we){return{type:P,size:ne,name:ge,comment:we}},De=function(P,ne,ge,we){return{type:P,vals:ne,name:ge,comment:we}},Ge=",",Ve=Ne(",",!1),j=function(P,ne){return ne.unshift(P),ne},W="int",ee=Ne("int",!1),J="uint",fe=Ne("uint",!1),L="short",D=Ne("short",!1),te="ushort",le=Ne("ushort",!1),Be="byte",ve=Ne("byte",!1),Se="ubyte",Re=Ne("ubyte",!1),dt="float",Jt=Ne("float",!1),It="char",$e=Ne("char",!1),kt="string",zt=Ne("string",!1),et="lstring",Ut=Ne("lstring",!1),k="enum",m=Ne("enum",!1),w="double",O=Ne("double",!1),x="bigint",z=Ne("bigint",!1),V="set",ue=Ne("set",!1),G=function(P,ne){return P+" "+ne},X=/^[a-zA-Z_]/,T=ht([["a","z"],["A","Z"],"_"],!1,!1),re=/^[a-zA-Z0-9_]/,_e=ht([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),g=function(P){return ft()},K=/^[^\n\r]/,$=ht([`
654
+ `,"\r"],!0,!1),R=function(P){return P.join("").replace(/^"/,"").replace(/"$/,"")},H=rn("integer"),Z=/^[0-9]/,Te=ht([["0","9"]],!1,!1),be=function(){return parseInt(ft(),10)},xe=rn("whitespace"),Ue=/^[ \t\n\r]/,gn=ht([" "," ",`
655
+ `,"\r"],!1,!1),U=0,Me=0,lt=[{line:1,column:1}],tt=0,Tt=[],ke=0,lr;if("startRule"in o){if(!(o.startRule in s))throw new Error(`Can't start parsing from rule "`+o.startRule+'".');a=s[o.startRule]}function ft(){return r.substring(Me,U)}function Ne(P,ne){return{type:"literal",text:P,ignoreCase:ne}}function ht(P,ne,ge){return{type:"class",parts:P,inverted:ne,ignoreCase:ge}}function kn(){return{type:"end"}}function rn(P){return{type:"other",description:P}}function fc(P){var ne=lt[P],ge;if(ne)return ne;for(ge=P-1;!lt[ge];)ge--;for(ne=lt[ge],ne={line:ne.line,column:ne.column};ge<P;)r.charCodeAt(ge)===10?(ne.line++,ne.column=1):ne.column++,ge++;return lt[P]=ne,ne}function Cv(P,ne){var ge=fc(P),we=fc(ne);return{start:{offset:P,line:ge.line,column:ge.column},end:{offset:ne,line:we.line,column:we.column}}}function Le(P){U<tt||(U>tt&&(tt=U,Tt=[]),Tt.push(P))}function NM(P,ne,ge){return new e(e.buildMessage(P,ne),P,ne,ge)}function Iv(){var P,ne,ge,we,Fe,nt,ut,mn,Yr,ur,Qr,fr,Zr,hr;return P=U,ne=qe(),ne!==i?(ge=Tv(),ge!==i?(we=qe(),we!==i?(Fe=Dv(),Fe!==i?(nt=qe(),nt!==i?(ut=Iu(),ut!==i?(mn=qe(),mn!==i?(r.charCodeAt(U)===40?(Yr=c,U++):(Yr=i,ke===0&&Le(l)),Yr!==i?(ur=qe(),ur!==i?(Qr=zM(),Qr!==i?(fr=qe(),fr!==i?(r.charCodeAt(U)===41?(Zr=u,U++):(Zr=i,ke===0&&Le(f)),Zr!==i?(hr=qe(),hr!==i?(Me=P,ne=h(ge,Fe,ut,Qr),P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i),P}function Tv(){var P;return r.substr(U,6)===d?(P=d,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 Dv(){var P,ne,ge,we;return P=_n(),P===i&&(P=U,ne=_n(),ne!==i?(ge=Bv(),ge!==i?(ne=[ne,ge],P=ne):(U=P,P=i)):(U=P,P=i),P===i&&(P=U,ne=_n(),ne!==i?(r.substr(U,4)===S?(ge=S,U+=4):(ge=i,ke===0&&Le(E)),ge!==i?(ne=[ne,ge],P=ne):(U=P,P=i)):(U=P,P=i),P===i&&(P=U,ne=_n(),ne!==i?(ge=Bv(),ge!==i?(r.substr(U,4)===S?(we=S,U+=4):(we=i,ke===0&&Le(E)),we!==i?(ne=[ne,ge,we],P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)))),P}function Bv(){var P;return r.substr(U,7)===I?(P=I,U+=7):(P=i,ke===0&&Le(_)),P===i&&(r.substr(U,5)===B?(P=B,U+=5):(P=i,ke===0&&Le(N)),P===i&&(r.substr(U,6)===F?(P=F,U+=6):(P=i,ke===0&&Le(M)))),P}function Iu(){var P;return P=kv(),P===i&&(P=qe()),P}function zM(){var P,ne,ge,we,Fe,nt,ut;if(P=U,ne=k0(),ne!==i)if(ge=qe(),ge!==i){for(we=[],Fe=U,nt=qe(),nt!==i?(ut=k0(),ut!==i?(Me=Fe,nt=C(ne,ut),Fe=nt):(U=Fe,Fe=i)):(U=Fe,Fe=i);Fe!==i;)we.push(Fe),Fe=U,nt=qe(),nt!==i?(ut=k0(),ut!==i?(Me=Fe,nt=C(ne,ut),Fe=nt):(U=Fe,Fe=i)):(U=Fe,Fe=i);we!==i?(Fe=qe(),Fe!==i?(Me=P,ne=Y(ne,we),P=ne):(U=P,P=i)):(U=P,P=i)}else U=P,P=i;else U=P,P=i;return P}function UM(){var P;return r.charCodeAt(U)===35?(P=Q,U++):(P=i,ke===0&&Le(oe)),P}function GM(){var P,ne,ge,we,Fe;return P=U,ne=qe(),ne!==i?(ge=UM(),ge!==i?(we=kv(),we!==i?(Fe=qe(),Fe!==i?(ne=[ne,ge,we,Fe],P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i),P}function k0(){var P,ne,ge,we,Fe,nt,ut,mn,Yr,ur,Qr,fr,Zr,hr;return P=U,ne=_0(),ne!==i?(ge=qe(),ge!==i?(we=_n(),we!==i?(Fe=qe(),Fe!==i?(r.charCodeAt(U)===59?(nt=se,U++):(nt=i,ke===0&&Le(ae)),nt!==i?(ut=qe(),ut!==i?(mn=Iu(),mn!==i?(Me=P,ne=ce(ne,we,mn),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=_0(),ne!==i?(ge=qe(),ge!==i?(r.charCodeAt(U)===91?(we=ye,U++):(we=i,ke===0&&Le(de)),we!==i?(Fe=qe(),Fe!==i?(nt=VM(),nt!==i?(ut=qe(),ut!==i?(r.charCodeAt(U)===93?(mn=Ce,U++):(mn=i,ke===0&&Le(me)),mn!==i?(Yr=qe(),Yr!==i?(ur=_n(),ur!==i?(Qr=qe(),Qr!==i?(r.charCodeAt(U)===59?(fr=se,U++):(fr=i,ke===0&&Le(ae)),fr!==i?(Zr=qe(),Zr!==i?(hr=Iu(),hr!==i?(Me=P,ne=Ee(ne,nt,ur,hr),P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i),P===i&&(P=U,ne=_0(),ne!==i?(ge=qe(),ge!==i?(r.charCodeAt(U)===40?(we=c,U++):(we=i,ke===0&&Le(l)),we!==i?(Fe=qe(),Fe!==i?(nt=HM(),nt!==i?(ut=qe(),ut!==i?(r.charCodeAt(U)===41?(mn=u,U++):(mn=i,ke===0&&Le(f)),mn!==i?(Yr=qe(),Yr!==i?(ur=_n(),ur!==i?(Qr=qe(),Qr!==i?(r.charCodeAt(U)===59?(fr=se,U++):(fr=i,ke===0&&Le(ae)),fr!==i?(Zr=qe(),Zr!==i?(hr=Iu(),hr!==i?(Me=P,ne=De(ne,nt,ur,hr),P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i)):(U=P,P=i),P===i&&(P=GM()))),P}function HM(){var P,ne,ge,we,Fe,nt,ut;if(P=U,ne=_n(),ne!==i){for(ge=[],we=U,r.charCodeAt(U)===44?(Fe=Ge,U++):(Fe=i,ke===0&&Le(Ve)),Fe!==i?(nt=qe(),nt!==i?(ut=_n(),ut!==i?(Me=we,Fe=C(ne,ut),we=Fe):(U=we,we=i)):(U=we,we=i)):(U=we,we=i);we!==i;)ge.push(we),we=U,r.charCodeAt(U)===44?(Fe=Ge,U++):(Fe=i,ke===0&&Le(Ve)),Fe!==i?(nt=qe(),nt!==i?(ut=_n(),ut!==i?(Me=we,Fe=C(ne,ut),we=Fe):(U=we,we=i)):(U=we,we=i)):(U=we,we=i);ge!==i?(Me=P,ne=j(ne,ge),P=ne):(U=P,P=i)}else U=P,P=i;return P}function _0(){var P,ne,ge,we;return r.substr(U,3)===W?(P=W,U+=3):(P=i,ke===0&&Le(ee)),P===i&&(r.substr(U,4)===J?(P=J,U+=4):(P=i,ke===0&&Le(fe)),P===i&&(r.substr(U,5)===L?(P=L,U+=5):(P=i,ke===0&&Le(D)),P===i&&(r.substr(U,6)===te?(P=te,U+=6):(P=i,ke===0&&Le(le)),P===i&&(r.substr(U,4)===Be?(P=Be,U+=4):(P=i,ke===0&&Le(ve)),P===i&&(r.substr(U,5)===Se?(P=Se,U+=5):(P=i,ke===0&&Le(Re)),P===i&&(r.substr(U,5)===dt?(P=dt,U+=5):(P=i,ke===0&&Le(Jt)),P===i&&(r.substr(U,4)===It?(P=It,U+=4):(P=i,ke===0&&Le($e)),P===i&&(r.substr(U,6)===kt?(P=kt,U+=6):(P=i,ke===0&&Le(zt)),P===i&&(r.substr(U,7)===et?(P=et,U+=7):(P=i,ke===0&&Le(Ut)),P===i&&(r.substr(U,4)===k?(P=k,U+=4):(P=i,ke===0&&Le(m)),P===i&&(r.substr(U,6)===w?(P=w,U+=6):(P=i,ke===0&&Le(O)),P===i&&(r.substr(U,6)===x?(P=x,U+=6):(P=i,ke===0&&Le(z)),P===i&&(r.substr(U,3)===V?(P=V,U+=3):(P=i,ke===0&&Le(ue)),P===i&&(P=U,ne=Tv(),ne!==i?(ge=qe(),ge!==i?(we=Dv(),we!==i?(Me=P,ne=G(ne,we),P=ne):(U=P,P=i)):(U=P,P=i)):(U=P,P=i))))))))))))))),P}function VM(){var P;return P=qM(),P===i&&(P=_n()),P}function _n(){var P,ne,ge,we,Fe;if(P=U,ne=U,X.test(r.charAt(U))?(ge=r.charAt(U),U++):(ge=i,ke===0&&Le(T)),ge!==i){for(we=[],re.test(r.charAt(U))?(Fe=r.charAt(U),U++):(Fe=i,ke===0&&Le(_e));Fe!==i;)we.push(Fe),re.test(r.charAt(U))?(Fe=r.charAt(U),U++):(Fe=i,ke===0&&Le(_e));we!==i?(ge=[ge,we],ne=ge):(U=ne,ne=i)}else U=ne,ne=i;return ne!==i&&(Me=P,ne=g()),P=ne,P}function kv(){var P,ne,ge;for(P=U,ne=[],K.test(r.charAt(U))?(ge=r.charAt(U),U++):(ge=i,ke===0&&Le($));ge!==i;)ne.push(ge),K.test(r.charAt(U))?(ge=r.charAt(U),U++):(ge=i,ke===0&&Le($));return ne!==i&&(Me=P,ne=R(ne)),P=ne,P}function qM(){var P,ne,ge,we;if(ke++,P=U,ne=qe(),ne!==i){if(ge=[],Z.test(r.charAt(U))?(we=r.charAt(U),U++):(we=i,ke===0&&Le(Te)),we!==i)for(;we!==i;)ge.push(we),Z.test(r.charAt(U))?(we=r.charAt(U),U++):(we=i,ke===0&&Le(Te));else ge=i;ge!==i?(Me=P,ne=be(),P=ne):(U=P,P=i)}else U=P,P=i;return ke--,P===i&&(ne=i,ke===0&&Le(H)),P}function qe(){var P,ne;for(ke++,P=[],Ue.test(r.charAt(U))?(ne=r.charAt(U),U++):(ne=i,ke===0&&Le(gn));ne!==i;)P.push(ne),Ue.test(r.charAt(U))?(ne=r.charAt(U),U++):(ne=i,ke===0&&Le(gn));return ke--,P===i&&(ne=i,ke===0&&Le(xe)),P}if(lr=a(),lr!==i&&U===r.length)return lr;throw lr!==i&&U<r.length&&Le(kn()),NM(Tt,tt<r.length?r.charAt(tt):null,tt<r.length?Cv(tt,tt+1):Cv(tt,tt))}return t0={SyntaxError:e,parse:n},t0}var wx=P9();const L9=Ql(wx),n0=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
656
656
  "bigChain pairwise alignment"
657
657
  (
658
658
  string chrom; "Reference sequence chromosome or scaffold"
@@ -811,20 +811,20 @@ chrM 16299`};function XD(t){if(!(t in $b))throw new Error(`Unknown assembly: ${t
811
811
  float score; "Floating point score."
812
812
  char[1] leftStatus; "Gap/break annotation for preceding block"
813
813
  char[1] rightStatus; "Gap/break annotation for following block"
814
- )`},Symbol.toStringTag,{value:"Module"}))).map(([t,e])=>[t,ax.parse(e.trim())]));function Wd(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 E9={".":0,"-":-1,"+":1};function S9(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 C9{constructor(e={}){if(e.autoSql)this.autoSql=Wd(A9.parse(e.autoSql));else if(e.type){if(!jd[e.type])throw new Error("Type not found");this.autoSql=Wd(jd[e.type])}else this.autoSql=Wd(jd.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&&S9(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=E9[s.strand]||0,s.chrom=decodeURIComponent(s.chrom),s}}const I9=Object.freeze(Object.defineProperty({__proto__:null,default:C9},Symbol.toStringTag,{value:"Module"}));let cx=class{constructor(e,n){this.blockPosition=e,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}static min(...e){let n,r=0;for(;!n;r+=1)n=e[r];for(;r<e.length;r+=1)n.compareTo(e[r])>0&&(n=e[r]);return n}};function _o(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new cx(t[e+7]*1099511627776+t[e+6]*4294967296+t[e+5]*16777216+t[e+4]*65536+t[e+3]*256+t[e+2],t[e+1]<<8|t[e])}let Yd=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 T9(t){return new Promise(e=>setTimeout(e,t))}function D9(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 B9(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function k9(t={}){return"aborted"in t?{signal:t}:t}function lx(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):B9(r,o)?o.maxv.compareTo(r.maxv)>0&&(r.maxv=o.maxv):(n.push(o),r=o));return n}function ux(t,e){return{lineCount:Hl.fromBytesLE(Array.prototype.slice.call(t,e,e+8),!0).toNumber()}}function tu(t,e){return t?t.compareTo(e)>0?e:t:e}function _9(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 fx=class{constructor({filehandle:e,renameRefSeq:n=r=>r}){this.filehandle=e,this.renameRefSeq=n}};const R9=21578050;function F9(t,e){return t-t%e}function M9(t,e){return t-t%e+e}function P9(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 Ro extends fx{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 h={};for(let y=0;y<u;y+=1){const v=n.readUInt32LE(s);if(s+=4,v===i+1)s+=4,f=ux(n,s+16),s+=32;else{if(v>i+1)throw new Error("bai index contains too many bins, please use CSI");{const b=n.readInt32LE(s);s+=4;const A=new Array(b);for(let S=0;S<b;S++){const E=_o(n,s);s+=8;const I=_o(n,s);s+=8,a=tu(a,E),A[S]=new Yd(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=_o(n,s);s+=8,a=tu(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:M9(r,16384),h=n===void 0?0:F9(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=P9(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 Yd(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 lx(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 Qd=[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"&&(Qd=new Int32Array(Qd));const L9=(t,e)=>{let n=e===0?0:~~e^-1;for(let r=0;r<t.length;r++)n=Qd[(n^t[r])&255]^n>>>8;return n^-1},hx=(t,e)=>Ke.Buffer.from(t,e);function O9(t,e){const n=(r,o)=>e(hx(r),o)>>>0;return n.signed=(r,o)=>e(hx(r),o),n.unsigned=n,n.model=t,n}const N9=O9("crc-32",L9),z9=21582659,U9=38359875;function G9(t,e){return t*2**e}function dx(t,e){return Math.floor(t/2**e)}let nu=class extends fx{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,..._9(e.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(e){const n=await this.filehandle.readFile(e),r=await Nr(n);let o;if(r.readUInt32LE(0)===z9)o=1;else if(r.readUInt32LE(0)===U9)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=ux(r,c+28),c+=44;else{l=tu(l,_o(r,c)),c+=8;const b=r.readInt32LE(c);c+=4;const A=new Array(b);for(let S=0;S<b;S+=1){const E=_o(r,c);c+=8;const I=_o(r,c);c+=8,l=tu(l,E),A[S]=new Yd(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 lx(c,new cx(0,0))}reg2bins(e,n){e-=1,e<1&&(e=1),n>2**50&&(n=2**34),n-=1;let r=0,o=0,i=this.minShift+this.depth*3;const s=[];for(;r<=this.depth;i-=3,o+=G9(1,r*3),r+=1){const a=o+dx(e,i),c=o+dx(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},px="=ACMGRSVTWYHKDBN".split(""),Fa="MIDNSHP=X???????".split("");class Fo{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=Fa[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=Fa[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=Fa[o&15];if(s==="S"&&i===this.seq_length)return n+=4,o=this.byteArray.readInt32LE(n),i=o>>4,s=Fa[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=Fa[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(px[(c&240)>>4]),s++,s<o&&(i.push(px[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 ru(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}})}ru(Fo,"tags"),ru(Fo,"cigarAndLength"),ru(Fo,"seq"),ru(Fo,"qual");function gx(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 mx=21840194,bx=65536;async function H9(t){let e=[];for await(const n of t)e=e.concat(n);return e}class V9{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 yx{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 Ti({cache:new ql({maxSize:50}),fill:async(d,p)=>{const{chunk:y,opts:v}=d,{data:b,cpositions:A,dpositions:S}=await this._readChunk({chunk:y,opts:{...v,signal:p}});return this.readBamFeatures(b,A,S,y)}}),this.renameRefSeq=h,e)this.bam=e;else if(n)this.bam=new Ct(n);else if(r)this.bam=new Sn(r);else if(u)this.htsget=!0,this.bam=new V9;else throw new Error("unable to initialize bam");if(c)this.index=new nu({filehandle:c});else if(a)this.index=new nu({filehandle:new Ct(a)});else if(l)this.index=new nu({filehandle:new Sn(l)});else if(i)this.index=new Ro({filehandle:i});else if(o)this.index=new Ro({filehandle:new Ct(o)});else if(s)this.index=new Ro({filehandle:new Sn(s)});else if(n)this.index=new Ro({filehandle:new Ct(`${n}.bai`)});else if(r)this.index=new Ro({filehandle:new Sn(`${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=k9(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+bx,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 Nr(i);if(s.readInt32LE(0)!==mx)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,gx(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+bx,{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 Nr(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 H9(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}D9(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 D2(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 Fo({bytes:{byteArray:e,start:i,end:u},fileOffset:n.length>0?n[a]*256+(i-r[a])+o.minv.dataPosition+1:N9.signed(e.slice(i,u))});s.push(f),this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime&&(await T9(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 wx(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=>Nr(r))))}class q9 extends yx{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 wx(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 wx(o.htsget.urls,e);if(i.readInt32LE(0)!==mx)throw new Error("Not a BAM file");const s=i.readInt32LE(4),a=i.toString("utf8",8,8+s),c=gx(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 j9=Object.freeze(Object.defineProperty({__proto__:null,BAI:Ro,BamFile:yx,BamRecord:Fo,CSI:nu,HtsgetFile:q9},Symbol.toStringTag,{value:"Module"}));function xx(t){if(t.greaterThan(Number.MAX_SAFE_INTEGER)||t.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return t.toNumber()}class W9 extends Error{}function Ma(t){if(t&&t.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const e=new W9("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 vx(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 Zd{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 Mo(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new Zd(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 iu{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 Ax{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 Q9=21578324,Ex=14;function Z9(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 Po extends Ax{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 Nr(n);if(Ma(e.signal),r.readUInt32LE(0)!==Q9)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 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>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(Y===h+1){const Q=r.readInt32LE(S);S+=4,Q===2&&(N=this.parsePseudoBin(r,S)),S+=16*Q}else{const Q=r.readInt32LE(S);S+=4;const oe=new Array(Q);for(let se=0;se<Q;se+=1){const ae=Mo(r,S),ce=Mo(r,S+8);S+=16,E=this._findFirstData(E,ae),oe[se]=new iu(ae,ce,Y)}B[Y]=oe}}const F=r.readInt32LE(S);S+=4;const M=new Array(F);for(let C=0;C<F;C+=1)M[C]=Mo(r,S),S+=8,E=this._findFirstData(E,M[C]);return{binIndex:B,linearIndex:M,stats:N}}),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:xx(Hl.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>>Ex>=a.linearIndex.length?a.linearIndex.length-1:n>>Ex]:new Zd(0,0))||console.warn("querying outside of possible tabix range");const l=Z9(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 iu(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 vx(u,h)}}const X9=21582659,K9=38359875;function J9(t,e){return t*2**e}function Sx(t,e){return Math.floor(t/2**e)}class ou extends Ax{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 Nr(await this.filehandle.readFile(e));let r;if(n.readUInt32LE(0)===X9)r=1;else if(n.readUInt32LE(0)===K9)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=Mo(n,l+4);c=this._findFirstData(c,v);const b=n.readInt32LE(l+12);l+=16;const A=new Array(b);for(let S=0;S<b;S+=1){const E=Mo(n,l),I=Mo(n,l+8);l+=16,A[S]=new iu(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:xx(Hl.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 iu(d.minv,d.maxv,h));return vx(l,new Zd(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+=J9(1,r*3),r+=1){const a=o+Sx(e,i),c=o+Sx(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 $9(t){return/^[\u0000-\u007F]*$/.test(t)}const Lo=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;class eM{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 Sn(r);else throw new TypeError("must provide either filehandle or path");if(s)this.index=new Po({filehandle:s,renameRefSeqs:u});else if(l)this.index=new ou({filehandle:l,renameRefSeqs:u});else if(o)this.index=new Po({filehandle:new Ct(o),renameRefSeqs:u});else if(a)this.index=new ou({filehandle:new Ct(a),renameRefSeqs:u});else if(e)this.index=new Po({filehandle:new Ct(`${e}.tbi`),renameRefSeqs:u});else if(c)this.index=new ou({filehandle:new Sn(c)});else if(i)this.index=new Po({filehandle:new Sn(i)});else if(r)this.index=new Po({filehandle:new Sn(`${r}.tbi`)});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.renameRefSeq=u,this.chunkCache=new Ti({cache:new ql({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);Ma(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);Ma(a);for(const p of d){const{buffer:y,cpositions:v,dpositions:b}=await this.chunkCache.get(p.toString(),p,a);Ma(a);let A=0,S=0;const E=(i=Lo==null?void 0:Lo.decode(y))!==null&&i!==void 0?i:y.toString(),I=y.length<5e8&&$9(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=y.indexOf(`
816
- `,A),B===-1)break;const M=y.slice(A,B);_=(s=Lo==null?void 0:Lo.decode(M))!==null&&s!==void 0?s:M.toString()}if(b){for(;A+p.minv.dataPosition>=b[S++];);S--}const{startCoordinate:N,overlaps:F}=this.checkLine(u,e,f,h,_);if(F)l(_,v[S]*256+(A-b[S])+p.minv.dataPosition+1);else if(N!==void 0&&N>=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);Ma(e.signal);const i=((n==null?void 0:n.blockPosition)||0)+o,s=await this._readRegion(0,i,e),a=await Nr(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 S=0;S<A+1;S++)if(i[S]===" "||S===A){if(p===u){if(this.renameRefSeq(i.slice(y,S))!==n)return{overlaps:!1}}else if(p===f){if(b=parseInt(i.slice(y,S),10),c==="1-based-closed"&&(b-=1),b>=o)return{startCoordinate:b,overlaps:!1};if((h===0||h===f)&&b+1<=r)return{startCoordinate:b,overlaps:!1}}else if(l==="VCF"&&p===4)v=i.slice(y,S);else if(p===h&&(l==="VCF"?this._getVcfEnd(b,v,i.slice(y,S)):Number.parseInt(i.slice(y,S),10))<=r)return{overlaps:!1};if(y=S+1,p+=1,p>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 D2(r,e)}}const tM=Object.freeze(Object.defineProperty({__proto__:null,CSI:ou,TBI:Po,TabixIndexedFile:eM},Symbol.toStringTag,{value:"Module"}));var su={exports:{}},Cx;function Xd(){if(Cx)return su.exports;Cx=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)}su.exports=i,su.exports.once=b,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(E){if(typeof E!="number"||E<0||o(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");s=E}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(I){if(typeof I!="number"||I<0||o(I))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+I+".");return this._maxListeners=I,this};function c(E){return E._maxListeners===void 0?i.defaultMaxListeners:E._maxListeners}i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(I){for(var _=[],B=1;B<arguments.length;B++)_.push(arguments[B]);var N=I==="error",F=this._events;if(F!==void 0)N=N&&F.error===void 0;else if(!N)return!1;if(N){var M;if(_.length>0&&(M=_[0]),M instanceof Error)throw M;var C=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw C.context=M,C}var Y=F[I];if(Y===void 0)return!1;if(typeof Y=="function")e(Y,this,_);else for(var Q=Y.length,oe=p(Y,Q),B=0;B<Q;++B)e(oe[B],this,_);return!0};function l(E,I,_,B){var N,F,M;if(a(_),F=E._events,F===void 0?(F=E._events=Object.create(null),E._eventsCount=0):(F.newListener!==void 0&&(E.emit("newListener",I,_.listener?_.listener:_),F=E._events),M=F[I]),M===void 0)M=F[I]=_,++E._eventsCount;else if(typeof M=="function"?M=F[I]=B?[_,M]:[M,_]:B?M.unshift(_):M.push(_),N=c(E),N>0&&M.length>N&&!M.warned){M.warned=!0;var C=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(I)+" listeners added. Use emitter.setMaxListeners() to increase limit");C.name="MaxListenersExceededWarning",C.emitter=E,C.type=I,C.count=M.length,r(C)}return E}i.prototype.addListener=function(I,_){return l(this,I,_,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(I,_){return l(this,I,_,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(E,I,_){var B={fired:!1,wrapFn:void 0,target:E,type:I,listener:_},N=u.bind(B);return N.listener=_,B.wrapFn=N,N}i.prototype.once=function(I,_){return a(_),this.on(I,f(this,I,_)),this},i.prototype.prependOnceListener=function(I,_){return a(_),this.prependListener(I,f(this,I,_)),this},i.prototype.removeListener=function(I,_){var B,N,F,M,C;if(a(_),N=this._events,N===void 0)return this;if(B=N[I],B===void 0)return this;if(B===_||B.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete N[I],N.removeListener&&this.emit("removeListener",I,B.listener||_));else if(typeof B!="function"){for(F=-1,M=B.length-1;M>=0;M--)if(B[M]===_||B[M].listener===_){C=B[M].listener,F=M;break}if(F<0)return this;F===0?B.shift():y(B,F),B.length===1&&(N[I]=B[0]),N.removeListener!==void 0&&this.emit("removeListener",I,C||_)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(I){var _,B,N;if(B=this._events,B===void 0)return this;if(B.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):B[I]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete B[I]),this;if(arguments.length===0){var F=Object.keys(B),M;for(N=0;N<F.length;++N)M=F[N],M!=="removeListener"&&this.removeAllListeners(M);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_=B[I],typeof _=="function")this.removeListener(I,_);else if(_!==void 0)for(N=_.length-1;N>=0;N--)this.removeListener(I,_[N]);return this};function h(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 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 _=I[E];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function p(E,I){for(var _=new Array(I),B=0;B<I;++B)_[B]=E[B];return _}function y(E,I){for(;I+1<E.length;I++)E[I]=E[I+1];E.pop()}function v(E){for(var I=new Array(E.length),_=0;_<I.length;++_)I[_]=E[_].listener||E[_];return I}function b(E,I){return new Promise(function(_,B){function N(M){E.removeListener(I,F),B(M)}function F(){typeof E.removeListener=="function"&&E.removeListener("error",N),_([].slice.call(arguments))}S(E,I,F,{once:!0}),I!=="error"&&A(E,N,{once:!0})})}function A(E,I,_){typeof E.on=="function"&&S(E,"error",I,_)}function S(E,I,_,B){if(typeof E.on=="function")B.once?E.once(I,_):E.on(I,_);else if(typeof E.addEventListener=="function")E.addEventListener(I,function N(F){B.once&&E.removeEventListener(I,N),_(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E)}return su.exports}var au={exports:{}},Ix;function Oo(){return Ix||(Ix=1,typeof Object.create=="function"?au.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:au.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}}),au.exports}var Kd,Tx;function Dx(){return Tx||(Tx=1,Kd=Xd().EventEmitter),Kd}const Bx=V_(Y_);var Jd,kx;function nM(){if(kx)return Jd;kx=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=Ia(),l=c.Buffer,u=Bx,f=u.inspect,h=f&&f.custom||"inspect";function d(p,y,v){l.prototype.copy.call(p,y,v)}return Jd=function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return i(p,[{key:"push",value:function(v){var b={data:v,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length}},{key:"unshift",value:function(v){var b={data:v,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var b=this.head,A=""+b.data;b=b.next;)A+=v+b.data;return A}},{key:"concat",value:function(v){if(this.length===0)return l.alloc(0);for(var b=l.allocUnsafe(v>>>0),A=this.head,S=0;A;)d(A.data,b,S),S+=A.data.length,A=A.next;return b}},{key:"consume",value:function(v,b){var A;return v<this.head.data.length?(A=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):v===this.head.data.length?A=this.shift():A=b?this._getString(v):this._getBuffer(v),A}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var b=this.head,A=1,S=b.data;for(v-=S.length;b=b.next;){var E=b.data,I=v>E.length?E.length:v;if(I===E.length?S+=E:S+=E.slice(0,v),v-=I,v===0){I===E.length?(++A,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=E.slice(I));break}++A}return this.length-=A,S}},{key:"_getBuffer",value:function(v){var b=l.allocUnsafe(v),A=this.head,S=1;for(A.data.copy(b),v-=A.data.length;A=A.next;){var E=A.data,I=v>E.length?E.length:v;if(E.copy(b,b.length-v,0,I),v-=I,v===0){I===E.length?(++S,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=E.slice(I));break}++S}return this.length-=S,b}},{key:h,value:function(v,b){return f(this,e(e({},b),{},{depth:0,customInspect:!1}))}}]),p}(),Jd}var $d,_x;function Rx(){if(_x)return $d;_x=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 e0={},Fx;function No(){if(Fx)return e0;Fx=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"),e0.codes=e,e0}var t0,Mx;function Px(){if(Mx)return t0;Mx=1;var t=No().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 t0={getHighWaterMark:n},t0}var n0,Lx;function rM(){if(Lx)return n0;Lx=1,n0=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 n0}var r0,Ox;function Nx(){if(Ox)return r0;Ox=1,r0=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:rM()},r=Dx(),o=Ia().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=Rx(),l=Px(),u=l.getHighWaterMark,f=No().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,S=f.ERR_UNKNOWN_ENCODING,E=c.errorOrDestroy;Oo()(N,r);function I(){}function _(q,j,ee){e=e||zo(),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||zo();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 y)};function F(q,j){var ee=new A;E(q,ee),process.nextTick(j,ee)}function M(q,j,ee,J){var fe;return ee===null?fe=new b:typeof ee!="string"&&!j.objectMode&&(fe=new h("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?F(this,ee):(L||M(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 oe(q,j,ee,J,fe){--j.pendingcb,ee?(process.nextTick(fe,J),process.nextTick(De,q,j),q._writableState.errorEmitted=!0,E(q,J)):(fe(J),q._writableState.errorEmitted=!0,E(q,J),De(q,j))}function se(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(se(ee),j)oe(q,ee,J,j,fe);else{var L=Ie(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||be(q,j),j.pendingcb--,J(),De(q,j)}function be(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,Ee=j.objectMode?1:le.length;if(Q(q,j,!1,Ee,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 d("_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 Ie(q){return q.ending&&q.length===0&&q.bufferedRequest===null&&!q.finished&&!q.writing}function me(q,j){q._final(function(ee){j.pendingcb--,ee&&E(q,ee),j.prefinished=!0,q.emit("prefinish"),De(q,j)})}function Ae(q,j){!j.prefinished&&!j.finalCalled&&(typeof q._final=="function"&&!j.destroyed?(j.pendingcb++,j.finalCalled=!0,process.nextTick(me,q,j)):(j.prefinished=!0,q.emit("prefinish")))}function De(q,j){var ee=Ie(j);if(ee&&(Ae(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,De(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)},r0}var i0,zx;function zo(){if(zx)return i0;zx=1;var t=Object.keys||function(l){var u=[];for(var f in l)u.push(f);return u};i0=s;var e=Wx(),n=Nx();Oo()(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)}}),i0}var o0={},cu={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Ux;function iM(){return Ux||(Ux=1,function(t,e){var n=Ia(),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)}}(cu,cu.exports)),cu.exports}var Gx;function s0(){if(Gx)return o0;Gx=1;var t=iM().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}o0.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,S;if(this.lastNeed){if(A=this.fillLast(b),A===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S<b.length?A?A+this.text(b,S):this.text(b,S):A||""},o.prototype.end=u,o.prototype.text=l,o.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length};function i(b){return b<=127?0:b>>5===6?2:b>>4===14?3:b>>3===30?4:b>>6===2?-1:-2}function s(b,A,S){var E=A.length-1;if(E<S)return 0;var I=i(A[E]);return I>=0?(I>0&&(b.lastNeed=I-1),I):--E<S||I===-2?0:(I=i(A[E]),I>=0?(I>0&&(b.lastNeed=I-2),I):--E<S||I===-2?0:(I=i(A[E]),I>=0?(I>0&&(I===2?I=0:b.lastNeed=I-3),I):0))}function a(b,A,S){if((A[0]&192)!==128)return b.lastNeed=0,"�";if(b.lastNeed>1&&A.length>1){if((A[1]&192)!==128)return b.lastNeed=1,"�";if(b.lastNeed>2&&A.length>2&&(A[2]&192)!==128)return b.lastNeed=2,"�"}}function c(b){var A=this.lastTotal-this.lastNeed,S=a(this,b);if(S!==void 0)return S;if(this.lastNeed<=b.length)return b.copy(this.lastChar,A,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,A,0,b.length),this.lastNeed-=b.length}function l(b,A){var S=s(this,b,A);if(!this.lastNeed)return b.toString("utf8",A);this.lastTotal=S;var E=b.length-(S-this.lastNeed);return b.copy(this.lastChar,0,E),b.toString("utf8",A,E)}function u(b){var A=b&&b.length?this.write(b):"";return this.lastNeed?A+"�":A}function f(b,A){if((b.length-A)%2===0){var S=b.toString("utf16le",A);if(S){var E=S.charCodeAt(S.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",A,b.length-1)}function h(b){var A=b&&b.length?this.write(b):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return A+this.lastChar.toString("utf16le",0,S)}return A}function d(b,A){var S=(b.length-A)%3;return S===0?b.toString("base64",A):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",A,b.length-S))}function p(b){var A=b&&b.length?this.write(b):"";return this.lastNeed?A+this.lastChar.toString("base64",0,3-this.lastNeed):A}function y(b){return b.toString(this.encoding)}function v(b){return b&&b.length?this.write(b):""}return o0}var a0,Hx;function c0(){if(Hx)return a0;Hx=1;var t=No().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(S){a.call(i,S)},v=function(){var S;if(c&&!d)return(!i._readableState||!i._readableState.ended)&&(S=new t),a.call(i,S);if(l&&!f)return(!i._writableState||!i._writableState.ended)&&(S=new t),a.call(i,S)},b=function(){i.req.on("finish",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 a0=o,a0}var l0,Vx;function oM(){if(Vx)return l0;Vx=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=c0(),i=Symbol("lastResolve"),s=Symbol("lastReject"),a=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function h(S,E){return{value:S,done:E}}function d(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(h(I,!1)))}}function p(S){process.nextTick(d,S)}function y(S,E){return function(I,_){S.then(function(){if(E[c]){I(h(void 0,!0));return}E[u](I,_)},_)}}var v=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((t={get stream(){return this[f]},next:function(){var E=this,I=this[a];if(I!==null)return Promise.reject(I);if(this[c])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(F,M){process.nextTick(function(){E[a]?M(E[a]):F(h(void 0,!0))})});var _=this[l],B;if(_)B=new Promise(y(_,this));else{var N=this[f].read();if(N!==null)return Promise.resolve(h(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(h(void 0,!0))})})}),t),v),A=function(E){var I,_=Object.create(b,(I={},e(I,f,{value:E,writable:!0}),e(I,i,{value:null,writable:!0}),e(I,s,{value:null,writable:!0}),e(I,a,{value:null,writable:!0}),e(I,c,{value:E._readableState.endEmitted,writable:!0}),e(I,u,{value:function(N,F){var M=_[f].read();M?(_[l]=null,_[i]=null,_[s]=null,N(h(M,!1))):(_[i]=N,_[s]=F)},writable:!0}),I));return _[l]=null,o(E,function(B){if(B&&B.code!=="ERR_STREAM_PREMATURE_CLOSE"){var N=_[s];N!==null&&(_[l]=null,_[i]=null,_[s]=null,N(B)),_[a]=B;return}var F=_[i];F!==null&&(_[l]=null,_[i]=null,_[s]=null,F(h(void 0,!0))),_[c]=!0}),E.on("readable",p.bind(null,_)),_};return l0=A,l0}var u0,qx;function sM(){return qx||(qx=1,u0=function(){throw new Error("Readable.from is not available in the browser")}),u0}var f0,jx;function Wx(){if(jx)return f0;jx=1,f0=F;var t;F.ReadableState=N,Xd().EventEmitter;var e=function(D,te){return D.listeners(te).length},n=Dx(),r=Ia().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=nM(),u=Rx(),f=Px(),h=f.getHighWaterMark,d=No().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,S,E;Oo()(F,n);var I=u.errorOrDestroy,_=["error","close","destroy","pause","resume"];function B(L,D,te){if(typeof L.prependListener=="function")return L.prependListener(D,te);!L._events||!L._events[D]?L.on(D,te):Array.isArray(L._events[D])?L._events[D].unshift(te):L._events[D]=[te,L._events[D]]}function N(L,D,te){t=t||zo(),L=L||{},typeof te!="boolean"&&(te=D instanceof t),this.objectMode=!!L.objectMode,te&&(this.objectMode=this.objectMode||!!L.readableObjectMode),this.highWaterMark=h(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=s0().StringDecoder),this.decoder=new A(L.encoding),this.encoding=L.encoding)}function F(L){if(t=t||zo(),!(this instanceof F))return new F(L);var D=this instanceof t;this._readableState=new N(L,this,D),this.readable=!0,L&&(typeof L.read=="function"&&(this._read=L.read),typeof L.destroy=="function"&&(this._destroy=L.destroy)),n.call(this)}Object.defineProperty(F.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(D){this._readableState&&(this._readableState.destroyed=D)}}),F.prototype.destroy=u.destroy,F.prototype._undestroy=u.undestroy,F.prototype._destroy=function(L,D){D(L)},F.prototype.push=function(L,D){var te=this._readableState,le;return te.objectMode?le=!0:typeof L=="string"&&(D=D||te.defaultEncoding,D!==te.encoding&&(L=r.from(L,D),D=""),le=!0),M(this,L,D,!1,le)},F.prototype.unshift=function(L){return M(this,L,null,!0,!1)};function M(L,D,te,le,Be){c("readableAddChunk",D);var ve=L._readableState;if(D===null)ve.reading=!1,ae(L,ve);else{var Ee;if(Be||(Ee=Y(ve,D)),Ee)I(L,Ee);else if(ve.objectMode||D&&D.length>0)if(typeof D!="string"&&!ve.objectMode&&Object.getPrototypeOf(D)!==r.prototype&&(D=i(D)),le)ve.endEmitted?I(L,new b):C(L,ve,D,!0);else if(ve.ended)I(L,new y);else{if(ve.destroyed)return!1;ve.reading=!1,ve.decoder&&!te?(D=ve.decoder.write(D),ve.objectMode||D.length!==0?C(L,ve,D,!1):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}F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(L){A||(A=s0().StringDecoder);var D=new A(L);this._readableState.decoder=D,this._readableState.encoding=this._readableState.decoder.encoding;for(var te=this._readableState.buffer.head,le="";te!==null;)le+=D.write(te.data),te=te.next;return this._readableState.buffer.clear(),le!==""&&this._readableState.buffer.push(le),this._readableState.length=le.length,this};var Q=1073741824;function oe(L){return L>=Q?L=Q:(L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++),L}function se(L,D){return L<=0||D.length===0&&D.ended?0:D.objectMode?1:L!==L?D.flowing&&D.length?D.buffer.head.data.length:D.length:(L>D.highWaterMark&&(D.highWaterMark=oe(L)),L<=D.length?L:D.ended?D.length:(D.needReadable=!0,0))}F.prototype.read=function(L){c("read",L),L=parseInt(L,10);var D=this._readableState,te=L;if(L!==0&&(D.emittedReadable=!1),L===0&&D.needReadable&&((D.highWaterMark!==0?D.length>=D.highWaterMark:D.length>0)||D.ended))return c("read: emitReadable",D.length,D.ended),D.length===0&&D.ended?ee(this):ce(this),null;if(L=se(L,D),L===0&&D.ended)return D.length===0&&ee(this),null;var le=D.needReadable;c("need readable",le),(D.length===0||D.length-L<D.highWaterMark)&&(le=!0,c("length less than watermark",le)),D.ended||D.reading?(le=!1,c("reading or ended",le)):le&&(c("do read"),D.reading=!0,D.sync=!0,D.length===0&&(D.needReadable=!0),this._read(D.highWaterMark),D.sync=!1,D.reading||(L=se(te,D)));var Be;return L>0?Be=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,be(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(be,L))}function be(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(Ie,L,D))}function Ie(L,D){for(;!D.reading&&!D.ended&&(D.length<D.highWaterMark||D.flowing&&D.length===0);){var te=D.length;if(c("maybeReadMore read 0"),L.read(0),te===D.length)break}D.readingMore=!1}F.prototype._read=function(L){I(this,new v("_read()"))},F.prototype.pipe=function(L,D){var te=this,le=this._readableState;switch(le.pipesCount){case 0:le.pipes=L;break;case 1:le.pipes=[le.pipes,L];break;default:le.pipes.push(L);break}le.pipesCount+=1,c("pipe count=%d opts=%j",le.pipesCount,D);var Be=(!D||D.end!==!1)&&L!==process.stdout&&L!==process.stderr,ve=Be?Re:Ut;le.endEmitted?process.nextTick(ve):te.once("end",ve),L.on("unpipe",Ee);function Ee(k,m){c("onunpipe"),k===te&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,It())}function Re(){c("onend"),L.end()}var dt=me(te);L.on("drain",dt);var $t=!1;function It(){c("cleanup"),L.removeListener("close",zt),L.removeListener("finish",et),L.removeListener("drain",dt),L.removeListener("error",kt),L.removeListener("unpipe",Ee),te.removeListener("end",Re),te.removeListener("end",Ut),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 kt(k){c("onerror",k),Ut(),L.removeListener("error",kt),e(L,"error")===0&&I(L,k)}B(L,"error",kt);function zt(){L.removeListener("finish",et),Ut()}L.once("close",zt);function et(){c("onfinish"),L.removeListener("close",zt),Ut()}L.once("finish",et);function Ut(){c("unpipe"),te.unpipe(L)}return L.emit("pipe",te),le.flowing||(c("pipe resume"),te.resume()),L};function me(L){return function(){var te=L._readableState;c("pipeOnDrain",te.awaitDrain),te.awaitDrain&&te.awaitDrain--,te.awaitDrain===0&&e(L,"data")&&(te.flowing=!0,q(L))}}F.prototype.unpipe=function(L){var D=this._readableState,te={hasUnpiped:!1};if(D.pipesCount===0)return this;if(D.pipesCount===1)return L&&L!==D.pipes?this:(L||(L=D.pipes),D.pipes=null,D.pipesCount=0,D.flowing=!1,L&&L.emit("unpipe",this,te),this);if(!L){var le=D.pipes,Be=D.pipesCount;D.pipes=null,D.pipesCount=0,D.flowing=!1;for(var ve=0;ve<Be;ve++)le[ve].emit("unpipe",this,{hasUnpiped:!1});return this}var Ee=fe(D.pipes,L);return Ee===-1?this:(D.pipes.splice(Ee,1),D.pipesCount-=1,D.pipesCount===1&&(D.pipes=D.pipes[0]),L.emit("unpipe",this,te),this)},F.prototype.on=function(L,D){var te=n.prototype.on.call(this,L,D),le=this._readableState;return L==="data"?(le.readableListening=this.listenerCount("readable")>0,le.flowing!==!1&&this.resume()):L==="readable"&&!le.endEmitted&&!le.readableListening&&(le.readableListening=le.needReadable=!0,le.flowing=!1,le.emittedReadable=!1,c("on readable",le.length,le.reading),le.length?ce(this):le.reading||process.nextTick(De,this)),te},F.prototype.addListener=F.prototype.on,F.prototype.removeListener=function(L,D){var te=n.prototype.removeListener.call(this,L,D);return L==="readable"&&process.nextTick(Ae,this),te},F.prototype.removeAllListeners=function(L){var D=n.prototype.removeAllListeners.apply(this,arguments);return(L==="readable"||L===void 0)&&process.nextTick(Ae,this),D};function Ae(L){var D=L._readableState;D.readableListening=L.listenerCount("readable")>0,D.resumeScheduled&&!D.paused?D.flowing=!0:L.listenerCount("data")>0&&L.resume()}function De(L){c("readable nexttick read 0"),L.read(0)}F.prototype.resume=function(){var L=this._readableState;return L.flowing||(c("resume"),L.flowing=!L.readableListening,Ge(this,L)),L.paused=!1,this};function Ge(L,D){D.resumeScheduled||(D.resumeScheduled=!0,process.nextTick(Ve,L,D))}function Ve(L,D){c("resume",D.reading),D.reading||L.read(0),D.resumeScheduled=!1,L.emit("resume"),q(L),D.flowing&&!D.reading&&L.read(0)}F.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function q(L){var D=L._readableState;for(c("flow",D.flowing);D.flowing&&L.read()!==null;);}F.prototype.wrap=function(L){var D=this,te=this._readableState,le=!1;L.on("end",function(){if(c("wrapped end"),te.decoder&&!te.ended){var Ee=te.decoder.end();Ee&&Ee.length&&D.push(Ee)}D.push(null)}),L.on("data",function(Ee){if(c("wrapped data"),te.decoder&&(Ee=te.decoder.write(Ee)),!(te.objectMode&&Ee==null)&&!(!te.objectMode&&(!Ee||!Ee.length))){var Re=D.push(Ee);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(Ee){c("wrapped _read",Ee),le&&(le=!1,L.resume())},this},typeof Symbol=="function"&&(F.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=oM()),S(this)}),Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(F.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(F.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(D){this._readableState&&(this._readableState.flowing=D)}}),F._fromList=j,Object.defineProperty(F.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"&&(F.from=function(L,D){return E===void 0&&(E=sM()),E(F,L,D)});function fe(L,D){for(var te=0,le=L.length;te<le;te++)if(L[te]===D)return te;return-1}return f0}var h0,Yx;function Qx(){if(Yx)return h0;Yx=1,h0=a;var t=No().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=zo();Oo()(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 h0}var d0,Zx;function aM(){if(Zx)return d0;Zx=1,d0=e;var t=Qx();Oo()(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)},d0}var p0,Xx;function cM(){if(Xx)return p0;Xx=1;var t;function e(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=No().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=c0()),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,S){var E=S<d.length-1,I=S>0;return a(A,E,I,function(_){v||(v=_),_&&b.forEach(c),!E&&(b.forEach(c),y(v))})});return d.reduce(l)}return p0=f,p0}var g0,Kx;function lM(){if(Kx)return g0;Kx=1,g0=n;var t=Xd().EventEmitter,e=Oo();e(n,t),n.Readable=Wx(),n.Writable=Nx(),n.Duplex=zo(),n.Transform=Qx(),n.PassThrough=aM(),n.finished=c0(),n.pipeline=cM(),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},g0}var Jx=lM(),uM=s0();function Pa(t){return t.replace(/%([0-9A-Fa-f]{2})/g,(e,n)=>String.fromCharCode(parseInt(n,16)))}function $x(t,e){return String(e).replace(t,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function La(t){return $x(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,t)}function ir(t){return $x(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,t)}function ev(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(Pa))}),e}function tv(t){const e=t.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:e[0]&&Pa(e[0]),source:e[1]&&Pa(e[1]),type:e[2]&&Pa(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:ev(e[8])}}function nv(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 rv(t){const e=[];return Object.entries(t).forEach(([n,r])=>{if(!r)return;let o;r.hasOwnProperty("toString")?o=La(r.toString()):Array.isArray(r)?o=r.map(La).join(","):o=La(r),e.push(`${La(n)}=${o}`)}),e.length?e.join(";"):"."}function fM(t,e){const n=t.attributes===null||t.attributes===void 0?".":rv(t.attributes),o=`${[t.seq_id===null?".":ir(t.seq_id),t.source===null?".":ir(t.source),t.type===null?".":ir(t.type),t.start===null?".":ir(t.start),t.end===null?".":ir(t.end),t.score===null?".":ir(t.score),t.strand===null?".":ir(t.strand),t.phase===null?".":ir(t.phase),n].join(" ")}
817
- `;return e[o]?"":(e[o]=!0,o)}function lu(t,e){if(Array.isArray(t))return t.map(r=>lu(r,e)).join("");const n=[fM(t,e)];return hM(t)&&n.push(...t.child_features.map(r=>lu(r,e)),...t.derived_features.map(r=>lu(r,e))),n.join("")}function iv(t){return lu(t,{})}function ov(t){let e=`##${t.directive}`;return t.value&&(e+=` ${t.value}`),e+=`
818
- `,e}function sv(t){return`# ${t.comment}
819
- `}function m0(t){return`>${t.id}${t.description?` ${t.description}`:""}
814
+ )`},Symbol.toStringTag,{value:"Module"}))).map(([t,e])=>[t,wx.parse(e.trim())]));function r0(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 O9={".":0,"-":-1,"+":1};function N9(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 z9{constructor(e={}){if(e.autoSql)this.autoSql=r0(L9.parse(e.autoSql));else if(e.type){if(!n0[e.type])throw new Error("Type not found");this.autoSql=r0(n0[e.type])}else this.autoSql=r0(n0.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&&N9(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=O9[s.strand]||0,s.chrom=decodeURIComponent(s.chrom),s}}const U9=Object.freeze(Object.defineProperty({__proto__:null,default:z9},Symbol.toStringTag,{value:"Module"}));let xx=class{constructor(e,n){this.blockPosition=e,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}static min(...e){let n,r=0;for(;!n;r+=1)n=e[r];for(;r<e.length;r+=1)n.compareTo(e[r])>0&&(n=e[r]);return n}};function Ro(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new xx(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 i0=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 G9(t){return new Promise(e=>setTimeout(e,t))}function H9(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 V9(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function q9(t={}){return"aborted"in t?{signal:t}:t}function vx(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):V9(r,o)?o.maxv.compareTo(r.maxv)>0&&(r.maxv=o.maxv):(n.push(o),r=o));return n}function Ax(t,e){return{lineCount:Kl.fromBytesLE(Array.prototype.slice.call(t,e,e+8),!0).toNumber()}}function uu(t,e){return t?t.compareTo(e)>0?e:t:e}function j9(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 Ex=class{constructor({filehandle:e,renameRefSeq:n=r=>r}){this.filehandle=e,this.renameRefSeq=n}};const W9=21578050;function Y9(t,e){return t-t%e}function Q9(t,e){return t-t%e+e}function Z9(t,e){return e-=1,[[0,0],[1+(t>>26),1+(e>>26)],[9+(t>>23),9+(e>>23)],[73+(t>>20),73+(e>>20)],[585+(t>>17),585+(e>>17)],[4681+(t>>14),4681+(e>>14)]]}class Fo extends Ex{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)!==W9)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 b=0;b<u;b+=1){const v=n.readUInt32LE(s);if(s+=4,v===i+1)s+=4,f=Ax(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=Ro(n,s);s+=8;const I=Ro(n,s);s+=8,a=uu(a,E),A[S]=new i0(E,I,v)}h[v]=A}}}const d=n.readInt32LE(s);s+=4;const p=new Array(d);for(let b=0;b<d;b++){const v=Ro(n,s);s+=8,a=uu(a,v),p[b]=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:Q9(r,16384),h=n===void 0?0:Y9(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 b=l[h/16384].blockPosition;for(let v=h/16384,y=0;v<f/16384;v++,y++)d[y]={score:l[v+1].blockPosition-b,start:v*16384,end:v*16384+16384},b=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=Z9(n,r),c=[];for(const[d,p]of a)for(let b=d;b<=p;b++)if(s.binIndex[b]){const v=s.binIndex[b];for(const y of v)c.push(new i0(y.minv,y.maxv,b))}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 vx(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 o0=[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"&&(o0=new Int32Array(o0));const X9=(t,e)=>{let n=e===0?0:~~e^-1;for(let r=0;r<t.length;r++)n=o0[(n^t[r])&255]^n>>>8;return n^-1},Sx=(t,e)=>Ke.Buffer.from(t,e);function K9(t,e){const n=(r,o)=>e(Sx(r),o)>>>0;return n.signed=(r,o)=>e(Sx(r),o),n.unsigned=n,n.model=t,n}const J9=K9("crc-32",X9),$9=21582659,eM=38359875;function tM(t,e){return t*2**e}function Cx(t,e){return Math.floor(t/2**e)}let fu=class extends Ex{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,...j9(e.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(e){const n=await this.filehandle.readFile(e),r=await zr(n);let o;if(r.readUInt32LE(0)===$9)o=1;else if(r.readUInt32LE(0)===eM)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 b=0;b<h;b++){const v=r.readUInt32LE(c);if(c+=4,v>this.maxBinNumber)p=Ax(r,c+28),c+=44;else{l=uu(l,Ro(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=Ro(r,c);c+=8;const I=Ro(r,c);c+=8,l=uu(l,E),A[S]=new i0(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 vx(c,new xx(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+=tM(1,r*3),r+=1){const a=o+Cx(e,i),c=o+Cx(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},Ix="=ACMGRSVTWYHKDBN".split(""),La="MIDNSHP=X???????".split("");class Mo{constructor(e){this.bytes=e.bytes,this.fileOffset=e.fileOffset}get byteArray(){return this.bytes.byteArray}get flags(){return(this.byteArray.readInt32LE(this.bytes.start+16)&4294901760)>>16}get ref_id(){return this.byteArray.readInt32LE(this.bytes.start+4)}get start(){return this.byteArray.readInt32LE(this.bytes.start+8)}get end(){return this.start+this.length_on_ref}get id(){return this.fileOffset}get mq(){const e=(this.bin_mq_nl&65280)>>8;return e===255?void 0:e}get score(){return this.mq}get qual(){if(this.isSegmentUnmapped())return;const e=this.b0+this.read_name_length+this.num_cigar_ops*4+this.num_seq_bytes;return this.byteArray.subarray(e,e+this.seq_length)}get strand(){return this.isReverseComplemented()?-1:1}get b0(){return this.bytes.start+36}get name(){return this.byteArray.toString("ascii",this.b0,this.b0+this.read_name_length-1)}get tags(){const{byteArray:e}=this.bytes;let n=this.b0+this.read_name_length+this.num_cigar_ops*4+this.num_seq_bytes+this.seq_length;const r=this.bytes.end,o={};for(;n<r;){const i=String.fromCharCode(e[n],e[n+1]),s=String.fromCharCode(e[n+2]);if(n+=3,s==="A")o[i]=String.fromCharCode(e[n]),n+=1;else if(s==="i")o[i]=e.readInt32LE(n),n+=4;else if(s==="I")o[i]=e.readUInt32LE(n),n+=4;else if(s==="c")o[i]=e.readInt8(n),n+=1;else if(s==="C")o[i]=e.readUInt8(n),n+=1;else if(s==="s")o[i]=e.readInt16LE(n),n+=2;else if(s==="S")o[i]=e.readUInt16LE(n),n+=2;else if(s==="f")o[i]=e.readFloatLE(n),n+=4;else if(s==="Z"||s==="H"){const a=[];for(;n<=r;){const c=e[n++];if(c!==0)a.push(String.fromCharCode(c));else break}o[i]=a.join("")}else if(s==="B"){const a=e[n++],c=String.fromCharCode(a),l=e.readInt32LE(n);if(n+=4,c==="i")if(i==="CG"){const u=[];for(let f=0;f<l;f++){const h=e.readInt32LE(n),d=h>>4,p=La[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=La[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=La[o&15];if(s==="S"&&i===this.seq_length)return n+=4,o=this.byteArray.readInt32LE(n),i=o>>4,s=La[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=La[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(Ix[(c&240)>>4]),s++,s<o&&(i.push(Ix[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 hu(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}})}hu(Mo,"tags"),hu(Mo,"cigarAndLength"),hu(Mo,"seq"),hu(Mo,"qual");function Tx(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 Dx=21840194,Bx=65536;async function nM(t){let e=[];for await(const n of t)e=e.concat(n);return e}class rM{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 kx{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 Di({cache:new $l({maxSize:50}),fill:async(d,p)=>{const{chunk:b,opts:v}=d,{data:y,cpositions:A,dpositions:S}=await this._readChunk({chunk:b,opts:{...v,signal:p}});return this.readBamFeatures(y,A,S,b)}}),this.renameRefSeq=h,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 rM;else throw new Error("unable to initialize bam");if(c)this.index=new fu({filehandle:c});else if(a)this.index=new fu({filehandle:new Ct(a)});else if(l)this.index=new fu({filehandle:new Cn(l)});else if(i)this.index=new Fo({filehandle:i});else if(o)this.index=new Fo({filehandle:new Ct(o)});else if(s)this.index=new Fo({filehandle:new Cn(s)});else if(n)this.index=new Fo({filehandle:new Ct(`${n}.bai`)});else if(r)this.index=new Fo({filehandle:new Cn(`${r}.bai`)});else if(u)this.htsget=!0;else throw new Error("unable to infer index format");this.yieldThreadTime=f}async getHeaderPre(e){const n=q9(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+Bx,f=await this.bam.read(Ke.Buffer.alloc(u),0,u,0,n);if(!f.bytesRead)throw new Error("Error reading header");i=f.buffer.subarray(0,Math.min(f.bytesRead,o))}else i=await this.bam.readFile(n);const s=await zr(i);if(s.readInt32LE(0)!==Dx)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,Tx(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+Bx,{bytesRead:i,buffer:s}=await this.bam.read(Ke.Buffer.alloc(o),0,n,0,r);if(!i)throw new Error("Error reading refseqs from header");const a=await zr(s.subarray(0,Math.min(i,n))),c=a.readInt32LE(e);let l=e+4;const u={},f=[];for(let h=0;h<c;h+=1){const d=a.readInt32LE(l),p=this.renameRefSeq(a.toString("utf8",l+4,l+4+d-1)),b=a.readInt32LE(l+d+4);if(u[p]=h,f.push({refName:p,length:b}),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 nM(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}H9(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 b=p.name,v=p.id;d[b]||(d[b]=0),d[b]++,a[v]=1}for(const[p,b]of Object.entries(d))b===1&&(s[p]=!0)});const c=[];n.map(h=>{for(const d of h){const p=d.name,b=d.start,v=d.next_pos,y=d.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 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:b,chunk:v}=await this._readChunk({chunk:h,opts:r}),y=[];for(const A of await this.readBamFeatures(d,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 U2(r,e);return{data:o,cpositions:i,dpositions:s,chunk:e}}async readBamFeatures(e,n,r,o){let i=0;const s=[];let a=0,c=+Date.now();for(;i+4<e.length;){const l=e.readInt32LE(i),u=i+4+l-1;if(r){for(;i+o.minv.dataPosition>=r[a++];);a--}if(u<e.length){const f=new Mo({bytes:{byteArray:e,start:i,end:u},fileOffset:n.length>0?n[a]*256+(i-r[a])+o.minv.dataPosition+1:J9.signed(e.slice(i,u))});s.push(f),this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime&&(await G9(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 _x(t,e){const n=await Promise.all(t.map(async r=>{const{url:o,headers:i}=r;if(o.startsWith("data:"))return Ke.Buffer.from(o.split(",")[1],"base64");{const{referer:s,...a}=i,c=await fetch(o,{...e,headers:{...e==null?void 0:e.headers,...a}});if(!c.ok)throw new Error(`HTTP ${c.status} fetching ${o}: ${await c.text()}`);return Ke.Buffer.from(await c.arrayBuffer())}}));return Ke.Buffer.concat(await Promise.all(n.map(r=>zr(r))))}class iM extends kx{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 _x(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 _x(o.htsget.urls,e);if(i.readInt32LE(0)!==Dx)throw new Error("Not a BAM file");const s=i.readInt32LE(4),a=i.toString("utf8",8,8+s),c=Tx(a),l=[],u={},f=c.filter(h=>h.tag==="SQ");for(const[h,d]of f.entries()){let p="",b=0;for(const v of d.data)v.tag==="SN"?p=v.value:v.tag==="LN"&&(b=+v.value);u[p]=h,l[h]={refName:p,length:b}}return this.chrToIndex=u,this.indexToChr=l,c}}const oM=Object.freeze(Object.defineProperty({__proto__:null,BAI:Fo,BamFile:kx,BamRecord:Mo,CSI:fu,HtsgetFile:iM},Symbol.toStringTag,{value:"Module"}));function Rx(t){if(t.greaterThan(Number.MAX_SAFE_INTEGER)||t.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return t.toNumber()}class sM extends Error{}function Oa(t){if(t&&t.aborted){if(typeof DOMException<"u")throw new DOMException("aborted","AbortError");{const e=new sM("aborted");throw e.code="ERR_ABORTED",e}}}function aM(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function Fx(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):aM(r,o)?o.maxv.compareTo(r.maxv)>0&&(r.maxv=o.maxv):(n.push(o),r=o))}),n)}class s0{constructor(e,n){this.blockPosition=e,this.dataPosition=n}toString(){return`${this.blockPosition}:${this.dataPosition}`}compareTo(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}}function Po(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new s0(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 du{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 Mx{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 cM=21578324,Px=14;function lM(t,e){return t+=1,e-=1,[[0,0],[1+(t>>26),1+(e>>26)],[9+(t>>23),9+(e>>23)],[73+(t>>20),73+(e>>20)],[585+(t>>17),585+(e>>17)],[4681+(t>>14),4681+(e>>14)]]}class Lo extends Mx{async lineCount(e,n={}){const r=await this.parse(n),o=r.refNameToId[e];if(o===void 0||!r.indices[o])return-1;const{stats:s}=r.indices[o];return s?s.lineCount:-1}async _parse(e={}){const n=await this.filehandle.readFile(e),r=await zr(n);if(Oa(e.signal),r.readUInt32LE(0)!==cM)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,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>h+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(Y===h+1){const Q=r.readInt32LE(S);S+=4,Q===2&&(N=this.parsePseudoBin(r,S)),S+=16*Q}else{const Q=r.readInt32LE(S);S+=4;const oe=new Array(Q);for(let se=0;se<Q;se+=1){const ae=Po(r,S),ce=Po(r,S+8);S+=16,E=this._findFirstData(E,ae),oe[se]=new du(ae,ce,Y)}B[Y]=oe}}const F=r.readInt32LE(S);S+=4;const M=new Array(F);for(let C=0;C<F;C+=1)M[C]=Po(r,S),S+=8,E=this._findFirstData(E,M[C]);return{binIndex:B,linearIndex:M,stats:N}}),metaChar:p,maxBinNumber:h,maxRefLength:d,skipLines:b,firstDataLine:E,columnNumbers:l,coordinateType:s,format:c,refIdToName:A,refNameToId:y,maxBlockSize:65536}}parsePseudoBin(e,n){return{lineCount:Rx(Kl.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>>Px>=a.linearIndex.length?a.linearIndex.length-1:n>>Px]:new s0(0,0))||console.warn("querying outside of possible tabix range");const l=lM(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 du(A.minv,A.maxv,y));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 b=d;b<=p;++b){const v=a.linearIndex[b];v&&(!h||v.compareTo(h)<0)&&(h=v)}return Fx(u,h)}}const uM=21582659,fM=38359875;function hM(t,e){return t*2**e}function Lx(t,e){return Math.floor(t/2**e)}class pu extends Mx{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 zr(await this.filehandle.readFile(e));let r;if(n.readUInt32LE(0)===uM)r=1;else if(n.readUInt32LE(0)===fM)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 b=n.readUInt32LE(l);if(b>this.maxBinNumber)d=this.parsePseudoBin(n,l+4),l+=48;else{const v=Po(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=Po(n,l),I=Po(n,l+8);l+=16,A[S]=new du(E,I,b)}h[b]=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:Rx(Kl.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 du(d.minv,d.maxv,h));return Fx(l,new s0(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+=hM(1,r*3),r+=1){const a=o+Lx(e,i),c=o+Lx(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 dM(t){return/^[\u0000-\u007F]*$/.test(t)}const Oo=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;class pM{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 Cn(r);else throw new TypeError("must provide either filehandle or path");if(s)this.index=new Lo({filehandle:s,renameRefSeqs:u});else if(l)this.index=new pu({filehandle:l,renameRefSeqs:u});else if(o)this.index=new Lo({filehandle:new Ct(o),renameRefSeqs:u});else if(a)this.index=new pu({filehandle:new Ct(a),renameRefSeqs:u});else if(e)this.index=new Lo({filehandle:new Ct(`${e}.tbi`),renameRefSeqs:u});else if(c)this.index=new pu({filehandle:new Cn(c)});else if(i)this.index=new Lo({filehandle:new Cn(i)});else if(r)this.index=new Lo({filehandle:new Cn(`${r}.tbi`)});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.renameRefSeq=u,this.chunkCache=new Di({cache:new $l({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);Oa(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);Oa(a);for(const p of d){const{buffer:b,cpositions:v,dpositions:y}=await this.chunkCache.get(p.toString(),p,a);Oa(a);let A=0,S=0;const E=(i=Oo==null?void 0:Oo.decode(b))!==null&&i!==void 0?i:b.toString(),I=b.length<5e8&&dM(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 M=b.slice(A,B);_=(s=Oo==null?void 0:Oo.decode(M))!==null&&s!==void 0?s:M.toString()}if(y){for(;A+p.minv.dataPosition>=y[S++];);S--}const{startCoordinate:N,overlaps:F}=this.checkLine(u,e,f,h,_);if(F)l(_,v[S]*256+(A-y[S])+p.minv.dataPosition+1);else if(N!==void 0&&N>=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);Oa(e.signal);const i=((n==null?void 0:n.blockPosition)||0)+o,s=await this._readRegion(0,i,e),a=await zr(s);if(r){let c=-1;const l=10,u=r.charCodeAt(0);for(let f=0;f<a.length&&!(f===c+1&&a[f]!==u);f+=1)a[f]===l&&(c=f);return a.subarray(0,c+1)}return a}async getHeader(e={}){return(await this.getHeaderBuffer(e)).toString("utf8")}async getReferenceSequenceNames(e={}){return(await this.getMetadata(e)).refIdToName}checkLine(e,n,r,o,i){const{columnNumbers:s,metaChar:a,coordinateType:c,format:l}=e;if(a&&i.startsWith(a))return{overlaps:!1};let{ref:u,start:f,end: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,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((h===0||h===f)&&y+1<=r)return{startCoordinate:y,overlaps:!1}}else if(l==="VCF"&&p===4)v=i.slice(b,S);else if(p===h&&(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>d)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 U2(r,e)}}const gM=Object.freeze(Object.defineProperty({__proto__:null,CSI:pu,TBI:Lo,TabixIndexedFile:pM},Symbol.toStringTag,{value:"Module"}));var gu={exports:{}},Ox;function a0(){if(Ox)return gu.exports;Ox=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)}gu.exports=i,gu.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",F=this._events;if(F!==void 0)N=N&&F.error===void 0;else if(!N)return!1;if(N){var M;if(_.length>0&&(M=_[0]),M instanceof Error)throw M;var C=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw C.context=M,C}var Y=F[I];if(Y===void 0)return!1;if(typeof Y=="function")e(Y,this,_);else for(var Q=Y.length,oe=p(Y,Q),B=0;B<Q;++B)e(oe[B],this,_);return!0};function l(E,I,_,B){var N,F,M;if(a(_),F=E._events,F===void 0?(F=E._events=Object.create(null),E._eventsCount=0):(F.newListener!==void 0&&(E.emit("newListener",I,_.listener?_.listener:_),F=E._events),M=F[I]),M===void 0)M=F[I]=_,++E._eventsCount;else if(typeof M=="function"?M=F[I]=B?[_,M]:[M,_]:B?M.unshift(_):M.push(_),N=c(E),N>0&&M.length>N&&!M.warned){M.warned=!0;var C=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(I)+" listeners added. Use emitter.setMaxListeners() to increase limit");C.name="MaxListenersExceededWarning",C.emitter=E,C.type=I,C.count=M.length,r(C)}return E}i.prototype.addListener=function(I,_){return l(this,I,_,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(I,_){return l(this,I,_,!0)};function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(E,I,_){var B={fired:!1,wrapFn:void 0,target:E,type:I,listener:_},N=u.bind(B);return N.listener=_,B.wrapFn=N,N}i.prototype.once=function(I,_){return a(_),this.on(I,f(this,I,_)),this},i.prototype.prependOnceListener=function(I,_){return a(_),this.prependListener(I,f(this,I,_)),this},i.prototype.removeListener=function(I,_){var B,N,F,M,C;if(a(_),N=this._events,N===void 0)return this;if(B=N[I],B===void 0)return this;if(B===_||B.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete N[I],N.removeListener&&this.emit("removeListener",I,B.listener||_));else if(typeof B!="function"){for(F=-1,M=B.length-1;M>=0;M--)if(B[M]===_||B[M].listener===_){C=B[M].listener,F=M;break}if(F<0)return this;F===0?B.shift():b(B,F),B.length===1&&(N[I]=B[0]),N.removeListener!==void 0&&this.emit("removeListener",I,C||_)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(I){var _,B,N;if(B=this._events,B===void 0)return this;if(B.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):B[I]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete B[I]),this;if(arguments.length===0){var F=Object.keys(B),M;for(N=0;N<F.length;++N)M=F[N],M!=="removeListener"&&this.removeAllListeners(M);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_=B[I],typeof _=="function")this.removeListener(I,_);else if(_!==void 0)for(N=_.length-1;N>=0;N--)this.removeListener(I,_[N]);return this};function h(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 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 _=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(M){E.removeListener(I,F),B(M)}function F(){typeof E.removeListener=="function"&&E.removeListener("error",N),_([].slice.call(arguments))}S(E,I,F,{once:!0}),I!=="error"&&A(E,N,{once:!0})})}function A(E,I,_){typeof E.on=="function"&&S(E,"error",I,_)}function S(E,I,_,B){if(typeof E.on=="function")B.once?E.once(I,_):E.on(I,_);else if(typeof E.addEventListener=="function")E.addEventListener(I,function N(F){B.once&&E.removeEventListener(I,N),_(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E)}return gu.exports}var mu={exports:{}},Nx;function No(){return Nx||(Nx=1,typeof Object.create=="function"?mu.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:mu.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}}),mu.exports}var c0,zx;function Ux(){return zx||(zx=1,c0=a0().EventEmitter),c0}const Gx=rR(aR);var l0,Hx;function mM(){if(Hx)return l0;Hx=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=Ba(),l=c.Buffer,u=Gx,f=u.inspect,h=f&&f.custom||"inspect";function d(p,b,v){l.prototype.copy.call(p,b,v)}return l0=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;)d(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:h,value:function(v,y){return f(this,e(e({},y),{},{depth:0,customInspect:!1}))}}]),p}(),l0}var u0,Vx;function qx(){if(Vx)return u0;Vx=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 u0={destroy:t,undestroy:r,errorOrDestroy:i},u0}var f0={},jx;function zo(){if(jx)return f0;jx=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,b,v){return h.call(this,u(p,b,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"),f0.codes=e,f0}var h0,Wx;function Yx(){if(Wx)return h0;Wx=1;var t=zo().codes.ERR_INVALID_OPT_VALUE;function e(r,o,i){return r.highWaterMark!=null?r.highWaterMark:o?r[i]:null}function n(r,o,i,s){var a=e(o,s,i);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var c=s?i:"highWaterMark";throw new t(c,a)}return Math.floor(a)}return r.objectMode?16:16*1024}return h0={getHighWaterMark:n},h0}var d0,Qx;function yM(){if(Qx)return d0;Qx=1,d0=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 d0}var p0,Zx;function Xx(){if(Zx)return p0;Zx=1,p0=N;function t(j){var W=this;this.next=null,this.entry=null,this.finish=function(){Ve(W,j)}}var e;N.WritableState=_;var n={deprecate:yM()},r=Ux(),o=Ba().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=qx(),l=Yx(),u=l.getHighWaterMark,f=zo().codes,h=f.ERR_INVALID_ARG_TYPE,d=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;No()(N,r);function I(){}function _(j,W,ee){e=e||Uo(),j=j||{},typeof ee!="boolean"&&(ee=W instanceof e),this.objectMode=!!j.objectMode,ee&&(this.objectMode=this.objectMode||!!j.writableObjectMode),this.highWaterMark=u(this,j,"writableHighWaterMark",ee),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var J=j.decodeStrings===!1;this.decodeStrings=!J,this.defaultEncoding=j.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(fe){ae(W,fe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=j.emitClose!==!1,this.autoDestroy=!!j.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}_.prototype.getBuffer=function(){for(var W=this.bufferedRequest,ee=[];W;)ee.push(W),W=W.next;return ee},function(){try{Object.defineProperty(_.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var B;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(B=Function.prototype[Symbol.hasInstance],Object.defineProperty(N,Symbol.hasInstance,{value:function(W){return B.call(this,W)?!0:this!==N?!1:W&&W._writableState instanceof _}})):B=function(W){return W instanceof this};function N(j){e=e||Uo();var W=this instanceof e;if(!W&&!B.call(N,this))return new N(j);this._writableState=new _(j,this,W),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)}N.prototype.pipe=function(){E(this,new b)};function F(j,W){var ee=new A;E(j,ee),process.nextTick(W,ee)}function M(j,W,ee,J){var fe;return ee===null?fe=new y:typeof ee!="string"&&!W.objectMode&&(fe=new h("chunk",["string","Buffer"],ee)),fe?(E(j,fe),process.nextTick(J,fe),!1):!0}N.prototype.write=function(j,W,ee){var J=this._writableState,fe=!1,L=!J.objectMode&&a(j);return L&&!o.isBuffer(j)&&(j=s(j)),typeof W=="function"&&(ee=W,W=null),L?W="buffer":W||(W=J.defaultEncoding),typeof ee!="function"&&(ee=I),J.ending?F(this,ee):(L||M(this,J,j,ee))&&(J.pendingcb++,fe=Y(this,J,L,j,W,ee)),fe},N.prototype.cork=function(){this._writableState.corked++},N.prototype.uncork=function(){var j=this._writableState;j.corked&&(j.corked--,!j.writing&&!j.corked&&!j.bufferProcessing&&j.bufferedRequest&&de(this,j))},N.prototype.setDefaultEncoding=function(W){if(typeof W=="string"&&(W=W.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((W+"").toLowerCase())>-1))throw new S(W);return this._writableState.defaultEncoding=W,this},Object.defineProperty(N.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function C(j,W,ee){return!j.objectMode&&j.decodeStrings!==!1&&typeof W=="string"&&(W=o.from(W,ee)),W}Object.defineProperty(N.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Y(j,W,ee,J,fe,L){if(!ee){var D=C(W,J,fe);J!==D&&(ee=!0,fe="buffer",J=D)}var te=W.objectMode?1:J.length;W.length+=te;var le=W.length<W.highWaterMark;if(le||(W.needDrain=!0),W.writing||W.corked){var Be=W.lastBufferedRequest;W.lastBufferedRequest={chunk:J,encoding:fe,isBuf:ee,callback:L,next:null},Be?Be.next=W.lastBufferedRequest:W.bufferedRequest=W.lastBufferedRequest,W.bufferedRequestCount+=1}else Q(j,W,!1,te,J,fe,L);return le}function Q(j,W,ee,J,fe,L,D){W.writelen=J,W.writecb=D,W.writing=!0,W.sync=!0,W.destroyed?W.onwrite(new v("write")):ee?j._writev(fe,W.onwrite):j._write(fe,L,W.onwrite),W.sync=!1}function oe(j,W,ee,J,fe){--W.pendingcb,ee?(process.nextTick(fe,J),process.nextTick(De,j,W),j._writableState.errorEmitted=!0,E(j,J)):(fe(J),j._writableState.errorEmitted=!0,E(j,J),De(j,W))}function se(j){j.writing=!1,j.writecb=null,j.length-=j.writelen,j.writelen=0}function ae(j,W){var ee=j._writableState,J=ee.sync,fe=ee.writecb;if(typeof fe!="function")throw new p;if(se(ee),W)oe(j,ee,J,W,fe);else{var L=Ce(ee)||j.destroyed;!L&&!ee.corked&&!ee.bufferProcessing&&ee.bufferedRequest&&de(j,ee),J?process.nextTick(ce,j,ee,L,fe):ce(j,ee,L,fe)}}function ce(j,W,ee,J){ee||ye(j,W),W.pendingcb--,J(),De(j,W)}function ye(j,W){W.length===0&&W.needDrain&&(W.needDrain=!1,j.emit("drain"))}function de(j,W){W.bufferProcessing=!0;var ee=W.bufferedRequest;if(j._writev&&ee&&ee.next){var J=W.bufferedRequestCount,fe=new Array(J),L=W.corkedRequestsFree;L.entry=ee;for(var D=0,te=!0;ee;)fe[D]=ee,ee.isBuf||(te=!1),ee=ee.next,D+=1;fe.allBuffers=te,Q(j,W,!0,W.length,fe,"",L.finish),W.pendingcb++,W.lastBufferedRequest=null,L.next?(W.corkedRequestsFree=L.next,L.next=null):W.corkedRequestsFree=new t(W),W.bufferedRequestCount=0}else{for(;ee;){var le=ee.chunk,Be=ee.encoding,ve=ee.callback,Se=W.objectMode?1:le.length;if(Q(j,W,!1,Se,le,Be,ve),ee=ee.next,W.bufferedRequestCount--,W.writing)break}ee===null&&(W.lastBufferedRequest=null)}W.bufferedRequest=ee,W.bufferProcessing=!1}N.prototype._write=function(j,W,ee){ee(new d("_write()"))},N.prototype._writev=null,N.prototype.end=function(j,W,ee){var J=this._writableState;return typeof j=="function"?(ee=j,j=null,W=null):typeof W=="function"&&(ee=W,W=null),j!=null&&this.write(j,W),J.corked&&(J.corked=1,this.uncork()),J.ending||Ge(this,J,ee),this},Object.defineProperty(N.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ce(j){return j.ending&&j.length===0&&j.bufferedRequest===null&&!j.finished&&!j.writing}function me(j,W){j._final(function(ee){W.pendingcb--,ee&&E(j,ee),W.prefinished=!0,j.emit("prefinish"),De(j,W)})}function Ee(j,W){!W.prefinished&&!W.finalCalled&&(typeof j._final=="function"&&!W.destroyed?(W.pendingcb++,W.finalCalled=!0,process.nextTick(me,j,W)):(W.prefinished=!0,j.emit("prefinish")))}function De(j,W){var ee=Ce(W);if(ee&&(Ee(j,W),W.pendingcb===0&&(W.finished=!0,j.emit("finish"),W.autoDestroy))){var J=j._readableState;(!J||J.autoDestroy&&J.endEmitted)&&j.destroy()}return ee}function Ge(j,W,ee){W.ending=!0,De(j,W),ee&&(W.finished?process.nextTick(ee):j.once("finish",ee)),W.ended=!0,j.writable=!1}function Ve(j,W,ee){var J=j.entry;for(j.entry=null;J;){var fe=J.callback;W.pendingcb--,fe(ee),J=J.next}W.corkedRequestsFree.next=j}return Object.defineProperty(N.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(W){this._writableState&&(this._writableState.destroyed=W)}}),N.prototype.destroy=c.destroy,N.prototype._undestroy=c.undestroy,N.prototype._destroy=function(j,W){W(j)},p0}var g0,Kx;function Uo(){if(Kx)return g0;Kx=1;var t=Object.keys||function(l){var u=[];for(var f in l)u.push(f);return u};g0=s;var e=iv(),n=Xx();No()(s,e);for(var r=t(n.prototype),o=0;o<r.length;o++){var i=r[o];s.prototype[i]||(s.prototype[i]=n.prototype[i])}function s(l){if(!(this instanceof s))return new s(l);e.call(this,l),n.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",a)))}Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function a(){this._writableState.ended||process.nextTick(c,this)}function c(l){l.end()}return Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),g0}var m0={},yu={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Jx;function bM(){return Jx||(Jx=1,function(t,e){var n=Ba(),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)}}(yu,yu.exports)),yu.exports}var $x;function y0(){if($x)return m0;$x=1;var t=bM().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}m0.StringDecoder=o;function o(y){this.encoding=r(y);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=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 h(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 d(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 m0}var b0,ev;function w0(){if(ev)return b0;ev=1;var t=zo().codes.ERR_STREAM_PREMATURE_CLOSE;function e(i){var s=!1;return function(){if(!s){s=!0;for(var a=arguments.length,c=new Array(a),l=0;l<a;l++)c[l]=arguments[l];i.apply(this,c)}}}function n(){}function r(i){return i.setHeader&&typeof i.abort=="function"}function o(i,s,a){if(typeof s=="function")return o(i,null,s);s||(s={}),a=e(a||n);var c=s.readable||s.readable!==!1&&i.readable,l=s.writable||s.writable!==!1&&i.writable,u=function(){i.writable||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)},b=function(S){a.call(i,S)},v=function(){var S;if(c&&!d)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",h)};return r(i)?(i.on("complete",h),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",h),s.error!==!1&&i.on("error",b),i.on("close",v),function(){i.removeListener("complete",h),i.removeListener("abort",v),i.removeListener("request",y),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",b),i.removeListener("close",v)}}return b0=o,b0}var x0,tv;function wM(){if(tv)return x0;tv=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=w0(),i=Symbol("lastResolve"),s=Symbol("lastReject"),a=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function h(S,E){return{value:S,done:E}}function d(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(h(I,!1)))}}function p(S){process.nextTick(d,S)}function b(S,E){return function(I,_){S.then(function(){if(E[c]){I(h(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(h(void 0,!0));if(this[f].destroyed)return new Promise(function(F,M){process.nextTick(function(){E[a]?M(E[a]):F(h(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(h(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(h(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,F){var M=_[f].read();M?(_[l]=null,_[i]=null,_[s]=null,N(h(M,!1))):(_[i]=N,_[s]=F)},writable:!0}),I));return _[l]=null,o(E,function(B){if(B&&B.code!=="ERR_STREAM_PREMATURE_CLOSE"){var N=_[s];N!==null&&(_[l]=null,_[i]=null,_[s]=null,N(B)),_[a]=B;return}var F=_[i];F!==null&&(_[l]=null,_[i]=null,_[s]=null,F(h(void 0,!0))),_[c]=!0}),E.on("readable",p.bind(null,_)),_};return x0=A,x0}var v0,nv;function xM(){return nv||(nv=1,v0=function(){throw new Error("Readable.from is not available in the browser")}),v0}var A0,rv;function iv(){if(rv)return A0;rv=1,A0=F;var t;F.ReadableState=N,a0().EventEmitter;var e=function(D,te){return D.listeners(te).length},n=Ux(),r=Ba().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=Gx,c;a&&a.debuglog?c=a.debuglog("stream"):c=function(){};var l=mM(),u=qx(),f=Yx(),h=f.getHighWaterMark,d=zo().codes,p=d.ERR_INVALID_ARG_TYPE,b=d.ERR_STREAM_PUSH_AFTER_EOF,v=d.ERR_METHOD_NOT_IMPLEMENTED,y=d.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,A,S,E;No()(F,n);var I=u.errorOrDestroy,_=["error","close","destroy","pause","resume"];function B(L,D,te){if(typeof L.prependListener=="function")return L.prependListener(D,te);!L._events||!L._events[D]?L.on(D,te):Array.isArray(L._events[D])?L._events[D].unshift(te):L._events[D]=[te,L._events[D]]}function N(L,D,te){t=t||Uo(),L=L||{},typeof te!="boolean"&&(te=D instanceof t),this.objectMode=!!L.objectMode,te&&(this.objectMode=this.objectMode||!!L.readableObjectMode),this.highWaterMark=h(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=y0().StringDecoder),this.decoder=new A(L.encoding),this.encoding=L.encoding)}function F(L){if(t=t||Uo(),!(this instanceof F))return new F(L);var D=this instanceof t;this._readableState=new N(L,this,D),this.readable=!0,L&&(typeof L.read=="function"&&(this._read=L.read),typeof L.destroy=="function"&&(this._destroy=L.destroy)),n.call(this)}Object.defineProperty(F.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(D){this._readableState&&(this._readableState.destroyed=D)}}),F.prototype.destroy=u.destroy,F.prototype._undestroy=u.undestroy,F.prototype._destroy=function(L,D){D(L)},F.prototype.push=function(L,D){var te=this._readableState,le;return te.objectMode?le=!0:typeof L=="string"&&(D=D||te.defaultEncoding,D!==te.encoding&&(L=r.from(L,D),D=""),le=!0),M(this,L,D,!1,le)},F.prototype.unshift=function(L){return M(this,L,null,!0,!1)};function M(L,D,te,le,Be){c("readableAddChunk",D);var ve=L._readableState;if(D===null)ve.reading=!1,ae(L,ve);else{var Se;if(Be||(Se=Y(ve,D)),Se)I(L,Se);else if(ve.objectMode||D&&D.length>0)if(typeof D!="string"&&!ve.objectMode&&Object.getPrototypeOf(D)!==r.prototype&&(D=i(D)),le)ve.endEmitted?I(L,new 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):de(L,ve)):C(L,ve,D,!1)}else le||(ve.reading=!1,de(L,ve))}return!ve.ended&&(ve.length<ve.highWaterMark||ve.length===0)}function C(L,D,te,le){D.flowing&&D.length===0&&!D.sync?(D.awaitDrain=0,L.emit("data",te)):(D.length+=D.objectMode?1:te.length,le?D.buffer.unshift(te):D.buffer.push(te),D.needReadable&&ce(L)),de(L,D)}function Y(L,D){var te;return!s(D)&&typeof D!="string"&&D!==void 0&&!L.objectMode&&(te=new p("chunk",["string","Buffer","Uint8Array"],D)),te}F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(L){A||(A=y0().StringDecoder);var D=new A(L);this._readableState.decoder=D,this._readableState.encoding=this._readableState.decoder.encoding;for(var te=this._readableState.buffer.head,le="";te!==null;)le+=D.write(te.data),te=te.next;return this._readableState.buffer.clear(),le!==""&&this._readableState.buffer.push(le),this._readableState.length=le.length,this};var Q=1073741824;function oe(L){return L>=Q?L=Q:(L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++),L}function se(L,D){return L<=0||D.length===0&&D.ended?0:D.objectMode?1:L!==L?D.flowing&&D.length?D.buffer.head.data.length:D.length:(L>D.highWaterMark&&(D.highWaterMark=oe(L)),L<=D.length?L:D.ended?D.length:(D.needReadable=!0,0))}F.prototype.read=function(L){c("read",L),L=parseInt(L,10);var D=this._readableState,te=L;if(L!==0&&(D.emittedReadable=!1),L===0&&D.needReadable&&((D.highWaterMark!==0?D.length>=D.highWaterMark:D.length>0)||D.ended))return c("read: emitReadable",D.length,D.ended),D.length===0&&D.ended?ee(this):ce(this),null;if(L=se(L,D),L===0&&D.ended)return D.length===0&&ee(this),null;var le=D.needReadable;c("need readable",le),(D.length===0||D.length-L<D.highWaterMark)&&(le=!0,c("length less than watermark",le)),D.ended||D.reading?(le=!1,c("reading or ended",le)):le&&(c("do read"),D.reading=!0,D.sync=!0,D.length===0&&(D.needReadable=!0),this._read(D.highWaterMark),D.sync=!1,D.reading||(L=se(te,D)));var Be;return L>0?Be=W(L,D):Be=null,Be===null?(D.needReadable=D.length<=D.highWaterMark,L=0):(D.length-=L,D.awaitDrain=0),D.length===0&&(D.ended||(D.needReadable=!0),te!==L&&D.ended&&ee(this)),Be!==null&&this.emit("data",Be),Be};function ae(L,D){if(c("onEofChunk"),!D.ended){if(D.decoder){var te=D.decoder.end();te&&te.length&&(D.buffer.push(te),D.length+=D.objectMode?1:te.length)}D.ended=!0,D.sync?ce(L):(D.needReadable=!1,D.emittedReadable||(D.emittedReadable=!0,ye(L)))}}function ce(L){var D=L._readableState;c("emitReadable",D.needReadable,D.emittedReadable),D.needReadable=!1,D.emittedReadable||(c("emitReadable",D.flowing),D.emittedReadable=!0,process.nextTick(ye,L))}function ye(L){var D=L._readableState;c("emitReadable_",D.destroyed,D.length,D.ended),!D.destroyed&&(D.length||D.ended)&&(L.emit("readable"),D.emittedReadable=!1),D.needReadable=!D.flowing&&!D.ended&&D.length<=D.highWaterMark,j(L)}function de(L,D){D.readingMore||(D.readingMore=!0,process.nextTick(Ce,L,D))}function Ce(L,D){for(;!D.reading&&!D.ended&&(D.length<D.highWaterMark||D.flowing&&D.length===0);){var te=D.length;if(c("maybeReadMore read 0"),L.read(0),te===D.length)break}D.readingMore=!1}F.prototype._read=function(L){I(this,new v("_read()"))},F.prototype.pipe=function(L,D){var te=this,le=this._readableState;switch(le.pipesCount){case 0:le.pipes=L;break;case 1:le.pipes=[le.pipes,L];break;default:le.pipes.push(L);break}le.pipesCount+=1,c("pipe count=%d opts=%j",le.pipesCount,D);var Be=(!D||D.end!==!1)&&L!==process.stdout&&L!==process.stderr,ve=Be?Re:Ut;le.endEmitted?process.nextTick(ve):te.once("end",ve),L.on("unpipe",Se);function Se(k,m){c("onunpipe"),k===te&&m&&m.hasUnpiped===!1&&(m.hasUnpiped=!0,It())}function Re(){c("onend"),L.end()}var dt=me(te);L.on("drain",dt);var Jt=!1;function It(){c("cleanup"),L.removeListener("close",zt),L.removeListener("finish",et),L.removeListener("drain",dt),L.removeListener("error",kt),L.removeListener("unpipe",Se),te.removeListener("end",Re),te.removeListener("end",Ut),te.removeListener("data",$e),Jt=!0,le.awaitDrain&&(!L._writableState||L._writableState.needDrain)&&dt()}te.on("data",$e);function $e(k){c("ondata");var m=L.write(k);c("dest.write",m),m===!1&&((le.pipesCount===1&&le.pipes===L||le.pipesCount>1&&fe(le.pipes,L)!==-1)&&!Jt&&(c("false write response, pause",le.awaitDrain),le.awaitDrain++),te.pause())}function kt(k){c("onerror",k),Ut(),L.removeListener("error",kt),e(L,"error")===0&&I(L,k)}B(L,"error",kt);function zt(){L.removeListener("finish",et),Ut()}L.once("close",zt);function et(){c("onfinish"),L.removeListener("close",zt),Ut()}L.once("finish",et);function Ut(){c("unpipe"),te.unpipe(L)}return L.emit("pipe",te),le.flowing||(c("pipe resume"),te.resume()),L};function me(L){return function(){var te=L._readableState;c("pipeOnDrain",te.awaitDrain),te.awaitDrain&&te.awaitDrain--,te.awaitDrain===0&&e(L,"data")&&(te.flowing=!0,j(L))}}F.prototype.unpipe=function(L){var D=this._readableState,te={hasUnpiped:!1};if(D.pipesCount===0)return this;if(D.pipesCount===1)return L&&L!==D.pipes?this:(L||(L=D.pipes),D.pipes=null,D.pipesCount=0,D.flowing=!1,L&&L.emit("unpipe",this,te),this);if(!L){var le=D.pipes,Be=D.pipesCount;D.pipes=null,D.pipesCount=0,D.flowing=!1;for(var ve=0;ve<Be;ve++)le[ve].emit("unpipe",this,{hasUnpiped:!1});return this}var Se=fe(D.pipes,L);return Se===-1?this:(D.pipes.splice(Se,1),D.pipesCount-=1,D.pipesCount===1&&(D.pipes=D.pipes[0]),L.emit("unpipe",this,te),this)},F.prototype.on=function(L,D){var te=n.prototype.on.call(this,L,D),le=this._readableState;return L==="data"?(le.readableListening=this.listenerCount("readable")>0,le.flowing!==!1&&this.resume()):L==="readable"&&!le.endEmitted&&!le.readableListening&&(le.readableListening=le.needReadable=!0,le.flowing=!1,le.emittedReadable=!1,c("on readable",le.length,le.reading),le.length?ce(this):le.reading||process.nextTick(De,this)),te},F.prototype.addListener=F.prototype.on,F.prototype.removeListener=function(L,D){var te=n.prototype.removeListener.call(this,L,D);return L==="readable"&&process.nextTick(Ee,this),te},F.prototype.removeAllListeners=function(L){var D=n.prototype.removeAllListeners.apply(this,arguments);return(L==="readable"||L===void 0)&&process.nextTick(Ee,this),D};function Ee(L){var D=L._readableState;D.readableListening=L.listenerCount("readable")>0,D.resumeScheduled&&!D.paused?D.flowing=!0:L.listenerCount("data")>0&&L.resume()}function De(L){c("readable nexttick read 0"),L.read(0)}F.prototype.resume=function(){var L=this._readableState;return L.flowing||(c("resume"),L.flowing=!L.readableListening,Ge(this,L)),L.paused=!1,this};function Ge(L,D){D.resumeScheduled||(D.resumeScheduled=!0,process.nextTick(Ve,L,D))}function Ve(L,D){c("resume",D.reading),D.reading||L.read(0),D.resumeScheduled=!1,L.emit("resume"),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,te=this._readableState,le=!1;L.on("end",function(){if(c("wrapped end"),te.decoder&&!te.ended){var Se=te.decoder.end();Se&&Se.length&&D.push(Se)}D.push(null)}),L.on("data",function(Se){if(c("wrapped data"),te.decoder&&(Se=te.decoder.write(Se)),!(te.objectMode&&Se==null)&&!(!te.objectMode&&(!Se||!Se.length))){var Re=D.push(Se);Re||(le=!0,L.pause())}});for(var Be in L)this[Be]===void 0&&typeof L[Be]=="function"&&(this[Be]=function(Re){return function(){return L[Re].apply(L,arguments)}}(Be));for(var ve=0;ve<_.length;ve++)L.on(_[ve],this.emit.bind(this,_[ve]));return this._read=function(Se){c("wrapped _read",Se),le&&(le=!1,L.resume())},this},typeof Symbol=="function"&&(F.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=wM()),S(this)}),Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(F.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(F.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(D){this._readableState&&(this._readableState.flowing=D)}}),F._fromList=W,Object.defineProperty(F.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function W(L,D){if(D.length===0)return null;var te;return D.objectMode?te=D.buffer.shift():!L||L>=D.length?(D.decoder?te=D.buffer.join(""):D.buffer.length===1?te=D.buffer.first():te=D.buffer.concat(D.length),D.buffer.clear()):te=D.buffer.consume(L,D.decoder),te}function ee(L){var D=L._readableState;c("endReadable",D.endEmitted),D.endEmitted||(D.ended=!0,process.nextTick(J,D,L))}function J(L,D){if(c("endReadableNT",L.endEmitted,L.length),!L.endEmitted&&L.length===0&&(L.endEmitted=!0,D.readable=!1,D.emit("end"),L.autoDestroy)){var te=D._writableState;(!te||te.autoDestroy&&te.finished)&&D.destroy()}}typeof Symbol=="function"&&(F.from=function(L,D){return E===void 0&&(E=xM()),E(F,L,D)});function fe(L,D){for(var te=0,le=L.length;te<le;te++)if(L[te]===D)return te;return-1}return A0}var E0,ov;function sv(){if(ov)return E0;ov=1,E0=a;var t=zo().codes,e=t.ERR_METHOD_NOT_IMPLEMENTED,n=t.ERR_MULTIPLE_CALLBACK,r=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=t.ERR_TRANSFORM_WITH_LENGTH_0,i=Uo();No()(a,i);function s(u,f){var 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 E0}var S0,av;function vM(){if(av)return S0;av=1,S0=e;var t=sv();No()(e,t);function e(n){if(!(this instanceof e))return new e(n);t.call(this,n)}return e.prototype._transform=function(n,r,o){o(null,n)},S0}var C0,cv;function AM(){if(cv)return C0;cv=1;var t;function e(h){var d=!1;return function(){d||(d=!0,h.apply(void 0,arguments))}}var n=zo().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,b){b=e(b);var v=!1;h.on("close",function(){v=!0}),t===void 0&&(t=w0()),t(h,{readable:d,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(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();b(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 b=u(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new r("streams");var v,y=d.map(function(A,S){var E=S<d.length-1,I=S>0;return a(A,E,I,function(_){v||(v=_),_&&y.forEach(c),!E&&(y.forEach(c),b(v))})});return d.reduce(l)}return C0=f,C0}var I0,lv;function EM(){if(lv)return I0;lv=1,I0=n;var t=a0().EventEmitter,e=No();e(n,t),n.Readable=iv(),n.Writable=Xx(),n.Duplex=Uo(),n.Transform=sv(),n.PassThrough=vM(),n.finished=w0(),n.pipeline=AM(),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},I0}var uv=EM(),SM=y0();function Na(t){return t.replace(/%([0-9A-Fa-f]{2})/g,(e,n)=>String.fromCharCode(parseInt(n,16)))}function fv(t,e){return String(e).replace(t,n=>`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)}function za(t){return fv(/[\n;\r\t=%&,\x00-\x1f\x7f-\xff]/g,t)}function or(t){return fv(/[\n\r\t%\x00-\x1f\x7f-\xff]/g,t)}function hv(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(Na))}),e}function dv(t){const e=t.split(" ").map(r=>r==="."||r===""?null:r);return{seq_id:e[0]&&Na(e[0]),source:e[1]&&Na(e[1]),type:e[2]&&Na(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:hv(e[8])}}function pv(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 gv(t){const e=[];return Object.entries(t).forEach(([n,r])=>{if(!r)return;let o;r.hasOwnProperty("toString")?o=za(r.toString()):Array.isArray(r)?o=r.map(za).join(","):o=za(r),e.push(`${za(n)}=${o}`)}),e.length?e.join(";"):"."}function CM(t,e){const n=t.attributes===null||t.attributes===void 0?".":gv(t.attributes),o=`${[t.seq_id===null?".":or(t.seq_id),t.source===null?".":or(t.source),t.type===null?".":or(t.type),t.start===null?".":or(t.start),t.end===null?".":or(t.end),t.score===null?".":or(t.score),t.strand===null?".":or(t.strand),t.phase===null?".":or(t.phase),n].join(" ")}
817
+ `;return e[o]?"":(e[o]=!0,o)}function bu(t,e){if(Array.isArray(t))return t.map(r=>bu(r,e)).join("");const n=[CM(t,e)];return IM(t)&&n.push(...t.child_features.map(r=>bu(r,e)),...t.derived_features.map(r=>bu(r,e))),n.join("")}function mv(t){return bu(t,{})}function yv(t){let e=`##${t.directive}`;return t.value&&(e+=` ${t.value}`),e+=`
818
+ `,e}function bv(t){return`# ${t.comment}
819
+ `}function T0(t){return`>${t.id}${t.description?` ${t.description}`:""}
820
820
  ${t.sequence}
821
- `}function uu(t){function e(n){return"attributes"in n?iv(n):"directive"in n?ov(n):"sequence"in n?m0(n):"comment"in n?sv(n):`# (invalid item found during format)
822
- `}return Array.isArray(t)?t.map(e):e(t)}function hM(t){return t.child_features!==void 0&&t.derived_features!==void 0}const dM=Object.freeze(Object.defineProperty({__proto__:null,escape:La,escapeColumn:ir,formatAttributes:rv,formatComment:sv,formatDirective:ov,formatFeature:iv,formatItem:uu,formatSequence:m0,parseAttributes:ev,parseDirective:nv,parseFeature:tv,unescape:Pa},Symbol.toStringTag,{value:"Module"})),av={Parent:"child_features",Derives_from:"derived_features"};class cv{constructor(e){this.seqCallback=e,this.currentSequence=void 0}addLine(e){const n=/^>\s*(\S+)\s*(.*)/.exec(e);n?(this._flush(),this.currentSequence={id:n[1],sequence:""},n[2]&&(this.currentSequence.description=n[2].trim())):this.currentSequence&&/\S/.test(e)&&(this.currentSequence.sequence+=e.replace(/\s/g,""))}_flush(){this.currentSequence&&this.seqCallback(this.currentSequence)}finish(){this._flush()}}class lv{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=nv(e);i&&(i.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new cv(this.sequenceCallback)):this._emitItem(i))}else o=o.replace(/\s*/,""),this._emitItem({comment:o})}else if(!/^\s*$/.test(e))if(/^\s*>/.test(e))this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new cv(this.sequenceCallback),this.fastaParser.addLine(e);else{const r=e.replace(/\r?\n?$/g,"");throw new Error(`GFF3 parse error. Cannot parse '${r}'.`)}}finish(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}_emitItem(e){Array.isArray(e)?this.featureCallback(e):"directive"in e?this.directiveCallback(e):"comment"in e&&this.commentCallback(e)}_enforceBufferSizeLimit(e=0){const n=r=>{r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach(i=>{delete this._underConstructionById[i],delete this._completedReferences[i]}),r.forEach(i=>{i.child_features&&i.child_features.forEach(s=>n(s)),i.derived_features&&i.derived_features.forEach(s=>n(s))}))};for(;this._underConstructionTopLevel.length+e>this.bufferSize;){const r=this._underConstructionTopLevel.shift();r&&(this._emitItem(r),n(r))}}_emitAllUnderConstructionFeatures(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${Object.keys(this._underConstructionOrphans)}`)}_bufferLine(e){var n,r,o;const s={...tv(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 h=this._underConstructionById[f];h?(h[h.length-1].type!==s.type&&this._parseError(`multi-line feature "${f}" has inconsistent types: "${s.type}", "${h[h.length-1].type}"`),h.push(s),u=h):(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=av.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=av.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 b0(t){process&&process.nextTick?process.nextTick(t):t()}function uv(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 pM extends Jx.Transform{constructor(e={}){super({objectMode:!0}),this.textBuffer="";const n=uv(e);this.encoding=e.encoding||"utf8",this.decoder=new uM.StringDecoder;const r=this.push.bind(this);this.parser=new lv({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)),b0(r)}_flush(e){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),b0(e)}}function gM(t={}){return new pM(t)}function mM(t,e={}){if(!t)return[];const n=uv(e),r=[],o=r.push.bind(r),i=new lv({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 bM(t){const e=[],n=[];t.forEach(o=>{"sequence"in o?n.push(o):e.push(o)});let r=e.map(uu).join("");return n.length&&(r+=`##FASTA
823
- `,r+=n.map(m0).join("")),r}class fv extends Jx.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
821
+ `}function wu(t){function e(n){return"attributes"in n?mv(n):"directive"in n?yv(n):"sequence"in n?T0(n):"comment"in n?bv(n):`# (invalid item found during format)
822
+ `}return Array.isArray(t)?t.map(e):e(t)}function IM(t){return t.child_features!==void 0&&t.derived_features!==void 0}const TM=Object.freeze(Object.defineProperty({__proto__:null,escape:za,escapeColumn:or,formatAttributes:gv,formatComment:bv,formatDirective:yv,formatFeature:mv,formatItem:wu,formatSequence:T0,parseAttributes:hv,parseDirective:pv,parseFeature:dv,unescape:Na},Symbol.toStringTag,{value:"Module"})),wv={Parent:"child_features",Derives_from:"derived_features"};class xv{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 vv{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=pv(e);i&&(i.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new xv(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 xv(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={...dv(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 h=this._underConstructionById[f];h?(h[h.length-1].type!==s.type&&this._parseError(`multi-line feature "${f}" has inconsistent types: "${s.type}", "${h[h.length-1].type}"`),h.push(s),u=h):(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=wv.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=wv.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 D0(t){process&&process.nextTick?process.nextTick(t):t()}function Av(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 DM extends uv.Transform{constructor(e={}){super({objectMode:!0}),this.textBuffer="";const n=Av(e);this.encoding=e.encoding||"utf8",this.decoder=new SM.StringDecoder;const r=this.push.bind(this);this.parser=new vv({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)),D0(r)}_flush(e){this.decoder.end&&this._nextText(this.decoder.end()),this.textBuffer!=null&&this._addLine(this.textBuffer),this.parser.finish(),D0(e)}}function BM(t={}){return new DM(t)}function kM(t,e={}){if(!t)return[];const n=Av(e),r=[],o=r.push.bind(r),i=new vv({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 _M(t){const e=[],n=[];t.forEach(o=>{"sequence"in o?n.push(o):e.push(o)});let r=e.map(wu).join("");return n.length&&(r+=`##FASTA
823
+ `,r+=n.map(T0).join("")),r}class Ev extends uv.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
824
824
  `)}if("sequence"in e&&!this.fastaMode&&(this.push(`##FASTA
825
- `),this.fastaMode=!0),Array.isArray(e)?o=e.map(uu).join(""):o=uu(e),this.push(o),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
825
+ `),this.fastaMode=!0),Array.isArray(e)?o=e.map(wu).join(""):o=wu(e),this.push(o),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push(`###
826
826
  `),this.linesSinceLastSyncMark=0;else{let i=0;for(let s=0;s<o.length;s+=1)o[s]===`
827
- `&&(i+=1);this.linesSinceLastSyncMark+=i}this.haveWeEmittedData=!0,b0(r)}}function yM(t={}){return new fv(t)}function wM(t,e,n={}){const r={insertVersionDirective:!0,...n};return new Promise((o,i)=>{t.pipe(new fv(r)).on("end",()=>o(null)).on("error",i).pipe(e)})}const xM=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:gM,parseStringSync:mM,formatSync:bM,formatStream:yM,formatFile:wM,util:dM}},Symbol.toStringTag,{value:"Module"})),fu={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 vM(t){try{return decodeURIComponent(t)}catch{return t}}class AM{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:fu.InfoFields,FORMAT:fu.GenotypeFields,ALT:fu.AltTypes,FILTER:fu.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:
827
+ `&&(i+=1);this.linesSinceLastSyncMark+=i}this.haveWeEmittedData=!0,D0(r)}}function RM(t={}){return new Ev(t)}function FM(t,e,n={}){const r={insertVersionDirective:!0,...n};return new Promise((o,i)=>{t.pipe(new Ev(r)).on("end",()=>o(null)).on("error",i).pipe(e)})}const MM=Object.freeze(Object.defineProperty({__proto__:null,default:{parseStream:BM,parseStringSync:kM,formatSync:_M,formatStream:RM,formatFile:FM,util:TM}},Symbol.toStringTag,{value:"Module"})),xu={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 PM(t){try{return decodeURIComponent(t)}catch{return t}}class LM{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:xu.InfoFields,FORMAT:xu.GenotypeFields,ALT:xu.AltTypes,FILTER:xu.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:
828
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:
829
829
  ${o}`);if(s.length!==a.length||!s.every((c,l)=>c===a[l]))throw new Error(`VCF column headers not correct:
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(h=>h==="."?void 0:s[u]?+h:h)}}}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,h,d]=i,p=a,y=+c,v=l==="."?void 0:l.split(";"),b=u,A=f==="."?void 0:f.split(","),S=h==="."?void 0:+h,E=d==="."?void 0:d.split(";");if(this.strict&&!i[7])throw new Error("no INFO field specified, must contain at least a '.' (turn off strict mode to allow)");const I=(n=i[7])===null||n===void 0?void 0:n.includes("%"),_=i[7]===void 0||i[7]==="."?{}:this.parseKeyValue(i[7]);for(const B of Object.keys(_)){const N=(r=_[B])===null||r===void 0?void 0:r.split(",").map(M=>M==="."?void 0:M).map(M=>M&&I?vM(M):M),F=this.getMetadata("INFO",B,"Type");F==="Integer"||F==="Float"?_[B]=N==null?void 0:N.map(M=>M===void 0?void 0:Number(M)):F==="Flag"?_[B]=!0:_[B]=N}return{CHROM:p,POS:y,ALT:A,INFO:_,REF:b,FILTER:E&&E.length===1&&E[0]==="PASS"?"PASS":E,ID:v,QUAL:S,SAMPLES:()=>{var B;return this.parseSamples((B=i[8])!==null&&B!==void 0?B:"",s)},GENOTYPES:()=>{var B;return this.parseGenotypesOnly((B=i[8])!==null&&B!==void 0?B:"",s)}}}}const EM=Object.freeze(Object.defineProperty({__proto__:null,default:AM},Symbol.toStringTag,{value:"Module"}));ze.GenomeSpy=$y,ze.embed=G_,ze.favIcon=U_,ze.html=ot,ze.icon=z_,ze.loadSpec=e2,Object.defineProperty(ze,Symbol.toStringTag,{value:"Module"})});
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(h=>h==="."?void 0:s[u]?+h:h)}}}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,h,d]=i,p=a,b=+c,v=l==="."?void 0:l.split(";"),y=u,A=f==="."?void 0:f.split(","),S=h==="."?void 0:+h,E=d==="."?void 0:d.split(";");if(this.strict&&!i[7])throw new Error("no INFO field specified, must contain at least a '.' (turn off strict mode to allow)");const I=(n=i[7])===null||n===void 0?void 0:n.includes("%"),_=i[7]===void 0||i[7]==="."?{}:this.parseKeyValue(i[7]);for(const B of Object.keys(_)){const N=(r=_[B])===null||r===void 0?void 0:r.split(",").map(M=>M==="."?void 0:M).map(M=>M&&I?PM(M):M),F=this.getMetadata("INFO",B,"Type");F==="Integer"||F==="Float"?_[B]=N==null?void 0:N.map(M=>M===void 0?void 0:Number(M)):F==="Flag"?_[B]=!0:_[B]=N}return{CHROM:p,POS: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 OM=Object.freeze(Object.defineProperty({__proto__:null,default:LM},Symbol.toStringTag,{value:"Module"}));ze.GenomeSpy=f2,ze.embed=tR,ze.favIcon=eR,ze.html=ot,ze.icon=$_,ze.loadSpec=h2,Object.defineProperty(ze,Symbol.toStringTag,{value:"Module"})});