@genome-spy/core 0.72.0 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/bundle/index.es.js +6779 -5393
- package/dist/bundle/index.js +133 -121
- package/dist/schema.json +281 -17
- package/dist/src/data/formats/bed.d.ts +8 -0
- package/dist/src/data/formats/bed.d.ts.map +1 -0
- package/dist/src/data/formats/bed.js +53 -0
- package/dist/src/data/formats/bedpe.d.ts +8 -0
- package/dist/src/data/formats/bedpe.d.ts.map +1 -0
- package/dist/src/data/formats/bedpe.js +160 -0
- package/dist/src/data/sources/dataUtils.d.ts +16 -0
- package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
- package/dist/src/data/sources/dataUtils.js +53 -3
- package/dist/src/data/sources/urlSource.d.ts +4 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +133 -14
- package/dist/src/genome/assemblyPreflight.d.ts +31 -0
- package/dist/src/genome/assemblyPreflight.d.ts.map +1 -0
- package/dist/src/genome/assemblyPreflight.js +99 -0
- package/dist/src/genome/genome.d.ts +2 -2
- package/dist/src/genome/genome.d.ts.map +1 -1
- package/dist/src/genome/genome.js +4 -0
- package/dist/src/genome/genomeStore.d.ts +34 -3
- package/dist/src/genome/genomeStore.d.ts.map +1 -1
- package/dist/src/genome/genomeStore.js +409 -18
- package/dist/src/genome/rootGenomeConfig.d.ts +26 -0
- package/dist/src/genome/rootGenomeConfig.d.ts.map +1 -0
- package/dist/src/genome/rootGenomeConfig.js +94 -0
- package/dist/src/genomeSpy/interactionController.d.ts +5 -1
- package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
- package/dist/src/genomeSpy/interactionController.js +244 -29
- package/dist/src/genomeSpy/renderCoordinator.js +1 -1
- package/dist/src/genomeSpy.d.ts +13 -3
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +81 -7
- package/dist/src/gl/canvasSizeHelper.d.ts +74 -0
- package/dist/src/gl/canvasSizeHelper.d.ts.map +1 -0
- package/dist/src/gl/canvasSizeHelper.js +203 -0
- package/dist/src/gl/webGLHelper.d.ts +25 -11
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +59 -33
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -2
- package/dist/src/marks/link.d.ts.map +1 -1
- package/dist/src/marks/link.js +5 -3
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +6 -1
- package/dist/src/scales/domainPlanner.d.ts +34 -3
- package/dist/src/scales/domainPlanner.d.ts.map +1 -1
- package/dist/src/scales/domainPlanner.js +247 -26
- package/dist/src/scales/scaleInstanceManager.d.ts +2 -1
- package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
- package/dist/src/scales/scaleInstanceManager.js +10 -11
- package/dist/src/scales/scaleInteractionController.d.ts.map +1 -1
- package/dist/src/scales/scaleInteractionController.js +16 -14
- package/dist/src/scales/scaleResolution.d.ts +16 -0
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +314 -54
- package/dist/src/scales/scaleResolutionTestUtils.d.ts +21 -0
- package/dist/src/scales/scaleResolutionTestUtils.d.ts.map +1 -0
- package/dist/src/scales/scaleResolutionTestUtils.js +33 -0
- package/dist/src/scales/selectionDomainUtils.d.ts +22 -0
- package/dist/src/scales/selectionDomainUtils.d.ts.map +1 -0
- package/dist/src/scales/selectionDomainUtils.js +79 -0
- package/dist/src/scales/zoomDomainUtils.d.ts +18 -0
- package/dist/src/scales/zoomDomainUtils.d.ts.map +1 -0
- package/dist/src/scales/zoomDomainUtils.js +69 -0
- package/dist/src/screenshotHarness.d.ts +16 -0
- package/dist/src/screenshotHarness.d.ts.map +1 -0
- package/dist/src/screenshotHarness.js +242 -0
- package/dist/src/singlePageApp.js +1 -1
- package/dist/src/spec/data.d.ts +23 -3
- package/dist/src/spec/genome.d.ts +22 -2
- package/dist/src/spec/parameter.d.ts +39 -2
- package/dist/src/spec/root.d.ts +20 -1
- package/dist/src/spec/scale.d.ts +41 -5
- package/dist/src/styles/genome-spy.css +8 -0
- package/dist/src/styles/genome-spy.css.d.ts +1 -1
- package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
- package/dist/src/styles/genome-spy.css.js +8 -0
- package/dist/src/tooltip/dataTooltipHandler.js +59 -10
- package/dist/src/types/embedApi.d.ts +19 -0
- package/dist/src/utils/inferSpecBaseUrl.d.ts +14 -0
- package/dist/src/utils/inferSpecBaseUrl.d.ts.map +1 -0
- package/dist/src/utils/inferSpecBaseUrl.js +73 -0
- package/dist/src/utils/interactionEvent.d.ts +53 -3
- package/dist/src/utils/interactionEvent.d.ts.map +1 -1
- package/dist/src/utils/interactionEvent.js +62 -1
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerMutationHelper.js +8 -0
- package/dist/src/view/dataReadiness.d.ts +2 -2
- package/dist/src/view/dataReadiness.d.ts.map +1 -1
- package/dist/src/view/dataReadiness.js +63 -58
- package/dist/src/view/facetView.js +1 -1
- package/dist/src/view/gridView/gridChild.d.ts +7 -0
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +180 -11
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +60 -17
- package/dist/src/view/zoom.d.ts +14 -2
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/dist/src/view/zoom.js +373 -76
- package/package.json +4 -2
package/dist/bundle/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(bt,At){typeof exports=="object"&&typeof module<"u"?At(exports):typeof define=="function"&&define.amd?define(["exports"],At):(bt=typeof globalThis<"u"?globalThis:bt||self,At(bt.genomeSpyEmbed={}))})(this,(function(bt){"use strict";function At(t,e,n){return t.fields=e||[],t.fname=n,t}function dI(t){return t==null?null:t.fname}function gI(t){return t==null?null:t.fields}function pI(t){return t.length===1?mI(t[0]):wI(t)}const mI=t=>function(e){return e[t]},wI=t=>{const e=t.length;return function(n){for(let i=0;i<e;++i)n=n[t[i]];return n}};function be(t){throw Error(t)}function yI(t){const e=[],n=t.length;let i=null,r=0,s="",o,a,l;t=t+"";function c(){e.push(s+t.substring(o,a)),s="",o=a+1}for(o=a=0;a<n;++a)if(l=t[a],l==="\\")s+=t.substring(o,a++),o=a;else if(l===i)c(),i=null,r=-1;else{if(i)continue;o===r&&l==='"'||o===r&&l==="'"?(o=a+1,i=l):l==="."&&!r?a>o?c():o=a+1:l==="["?(a>o&&c(),r=o=a+1):l==="]"&&(r||be("Access path missing open bracket: "+t),r>0&&c(),r=0,o=a+1)}return r&&be("Access path missing closing bracket: "+t),i&&be("Access path missing closing quote: "+t),a>o&&(a++,c()),e}function Qo(t,e,n){const i=yI(t);return t=i.length===1?i[0]:t,At((n&&n.get||pI)(i),[t],e||t)}Qo("id");const Do=At(t=>t,[],"identity");At(()=>0,[],"zero"),At(()=>1,[],"one"),At(()=>!0,[],"true"),At(()=>!1,[],"false");const CI=new Set([...Object.getOwnPropertyNames(Object.prototype).filter(t=>typeof Object.prototype[t]=="function"),"__proto__"]);var Ce=Array.isArray;function Ge(t){return t===Object(t)}function xt(t){return t[t.length-1]}function Gr(t){return t==null||t===""?null:+t}const Ah=t=>e=>t*Math.exp(e),hh=t=>e=>Math.log(t*e),EI=t=>e=>Math.sign(e)*Math.log1p(Math.abs(e/t)),II=t=>e=>Math.sign(e)*Math.expm1(Math.abs(e))*t,ko=t=>e=>e<0?-Math.pow(-e,t):Math.pow(e,t);function $c(t,e,n,i){const r=n(t[0]),s=n(xt(t)),o=(s-r)*e;return[i(r-o),i(s-o)]}function bI(t,e){return $c(t,e,Gr,Do)}function xI(t,e){var n=Math.sign(t[0]);return $c(t,e,hh(n),Ah(n))}function BI(t,e,n){return $c(t,e,ko(n),ko(1/n))}function Fo(t,e,n,i,r){const s=i(t[0]),o=i(xt(t)),a=e!=null?i(e):(s+o)/2;return[r(a+(s-a)*n),r(a+(o-a)*n)]}function dh(t,e,n){return Fo(t,e,n,Gr,Do)}function gh(t,e,n){const i=Math.sign(t[0]);return Fo(t,e,n,hh(i),Ah(i))}function el(t,e,n,i){return Fo(t,e,n,ko(i),ko(1/i))}function vI(t,e,n,i){return Fo(t,e,n,EI(i),II(i))}function tl(t){return t!=null?Ce(t)?t:[t]:[]}function SI(t,e,n){let i=t[0],r=t[1],s;return r<i&&(s=r,r=i,i=s),s=r-i,s>=n-e?[e,n]:[i=Math.min(Math.max(i,e),n-s),i+s]}function ht(t){return typeof t=="function"}const QI="descending";function ph(t,e,n){n=n||{},e=tl(e)||[];const i=[],r=[],s={},o=n.comparator||DI;return tl(t).forEach((a,l)=>{a!=null&&(i.push(e[l]===QI?-1:1),r.push(a=ht(a)?a:Qo(a,null,n)),(gI(a)||[]).forEach(c=>s[c]=1))}),r.length===0?null:At(o(r,i),Object.keys(s))}const mh=(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),DI=(t,e)=>t.length===1?kI(t[0],e[0]):FI(t,e,t.length),kI=(t,e)=>function(n,i){return mh(t(n),t(i))*e},FI=(t,e,n)=>(e.push(0),function(i,r){let s,o=0,a=-1;for(;o===0&&++a<n;)s=t[a],o=mh(s(i),s(r));return o*e[a]});function RI(t){for(let e,n,i=1,r=arguments.length;i<r;++i){e=arguments[i];for(n in e)t[n]=e[n]}return t}function Mi(t,e){return Object.hasOwn(t,e)}function zr(t){return typeof t=="boolean"}function NI(t){return Object.prototype.toString.call(t)==="[object Date]"}function MI(t){return t&&ht(t[Symbol.iterator])}function Ve(t){return typeof t=="number"}function TI(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function le(t){return typeof t=="string"}function wh(t,e){const n=t[0],i=xt(t),r=+e;return r?r===1?i:n+r*(i-n):n}function Hr(t){return t&&xt(t)-t[0]||0}function nl(t){return Ce(t)?`[${t.map(e=>e===null?"null":nl(e))}]`:Ge(t)||le(t)?JSON.stringify(t).replaceAll("\u2028","\\u2028").replaceAll("\u2029","\\u2029"):t}function PI(t){return t==null||t===""?null:!t||t==="false"||t==="0"?!1:!!t}const LI=t=>Ve(t)||NI(t)?t:Date.parse(t);function OI(t,e){return e=e||LI,t==null||t===""?null:e(t)}function UI(t){return t==null||t===""?null:t+""}function Ro(t){const e={},n=t.length;for(let i=0;i<n;++i)e[t[i]]=!0;return e}const No=globalThis,il=No.ShadowRoot&&(No.ShadyCSS===void 0||No.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yh=Symbol(),Ch=new WeakMap;let _I=class{constructor(e,n,i){if(this._$cssResult$=!0,i!==yh)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(il&&e===void 0){const i=n!==void 0&&n.length===1;i&&(e=Ch.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ch.set(n,e))}return e}toString(){return this.cssText}};const GI=t=>new _I(typeof t=="string"?t:t+"",void 0,yh),zI=(t,e)=>{if(il)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const i=document.createElement("style"),r=No.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=n.cssText,t.appendChild(i)}},Eh=il?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const i of e.cssRules)n+=i.cssText;return GI(n)})(t):t;const{is:HI,defineProperty:YI,getOwnPropertyDescriptor:VI,getOwnPropertyNames:JI,getOwnPropertySymbols:qI,getPrototypeOf:KI}=Object,Mo=globalThis,Ih=Mo.trustedTypes,jI=Ih?Ih.emptyScript:"",WI=Mo.reactiveElementPolyfillSupport,Yr=(t,e)=>t,rl={toAttribute(t,e){switch(e){case Boolean:t=t?jI: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}},bh=(t,e)=>!HI(t,e),xh={attribute:!0,type:String,converter:rl,reflect:!1,useDefault:!1,hasChanged:bh};Symbol.metadata??=Symbol("metadata"),Mo.litPropertyMetadata??=new WeakMap;let Ti=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=xh){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 i=Symbol(),r=this.getPropertyDescriptor(e,i,n);r!==void 0&&YI(this.prototype,e,r)}}static getPropertyDescriptor(e,n,i){const{get:r,set:s}=VI(this.prototype,e)??{get(){return this[n]},set(o){this[n]=o}};return{get:r,set(o){const a=r?.call(this);s?.call(this,o),this.requestUpdate(e,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??xh}static _$Ei(){if(this.hasOwnProperty(Yr("elementProperties")))return;const e=KI(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Yr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Yr("properties"))){const n=this.properties,i=[...JI(n),...qI(n)];for(const r of i)this.createProperty(r,n[r])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[i,r]of n)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[n,i]of this.elementProperties){const r=this._$Eu(n,i);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)n.unshift(Eh(r))}else e!==void 0&&n.push(Eh(e));return n}static _$Eu(e,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i: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(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const i of n.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return zI(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,n,i){this._$AK(e,i)}_$ET(e,n){const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const s=(i.converter?.toAttribute!==void 0?i.converter:rl).toAttribute(n,i.type);this._$Em=e,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(e,n){const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const s=i.getPropertyOptions(r),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:rl;this._$Em=r;const a=o.fromAttribute(n,s.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,n,i,r=!1,s){if(e!==void 0){const o=this.constructor;if(r===!1&&(s=this[e]),i??=o.getPropertyOptions(e),!((i.hasChanged??bh)(s,n)||i.useDefault&&i.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,i))))return;this.C(e,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,n,{useDefault:i,reflect:r,wrapped:s},o){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??n??this[e]),s!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(n=void 0),this._$AL.set(e,n)),r===!0&&this._$Em!==e&&(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(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,s]of i){const{wrapped:o}=s,a=this[r];o!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,s,a)}}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(n)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(n)}willUpdate(e){}_$AE(e){this._$EO?.forEach(n=>n.hostUpdated?.()),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.forEach(n=>this._$ET(n,this[n])),this._$EM()}updated(e){}firstUpdated(e){}};Ti.elementStyles=[],Ti.shadowRootOptions={mode:"open"},Ti[Yr("elementProperties")]=new Map,Ti[Yr("finalized")]=new Map,WI?.({ReactiveElement:Ti}),(Mo.reactiveElementVersions??=[]).push("2.1.2");const sl=globalThis,Bh=t=>t,To=sl.trustedTypes,vh=To?To.createPolicy("lit-html",{createHTML:t=>t}):void 0,Sh="$lit$",wn=`lit$${Math.random().toFixed(9).slice(2)}$`,Qh="?"+wn,XI=`<${Qh}>`,qn=document,Vr=()=>qn.createComment(""),Jr=t=>t===null||typeof t!="object"&&typeof t!="function",ol=Array.isArray,ZI=t=>ol(t)||typeof t?.[Symbol.iterator]=="function",al=`[
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
4
|
-
\r]`),n=t.charCodeAt(0);function i(
|
|
5
|
-
`)}function a(
|
|
6
|
-
`)}function l(
|
|
7
|
-
`)}function c(u){return u.map(f).join(t)}function f(u){return u==null?"":u instanceof Date?f2(u):e.test(u+="")?'"'+u.replace(/"/g,'""')+'"':u}return{parse:i,parseRows:r,format:o,formatBody:a,formatRows:l,formatRow:c,formatValue:f}}var u2=Uh(" "),A2=u2.parseRows;function h2(t){return t}function d2(t){if(t==null)return h2;var e,n,i=t.scale[0],r=t.scale[1],s=t.translate[0],o=t.translate[1];return function(a,l){l||(e=n=0);var c=2,f=a.length,u=new Array(f);for(u[0]=(e+=a[0])*i+s,u[1]=(n+=a[1])*r+o;c<f;)u[c]=a[c],++c;return u}}function g2(t,e){for(var n,i=t.length,r=i-e;r<--i;)n=t[r],t[r++]=t[i],t[i]=n}function p2(t,e){return typeof e=="string"&&(e=t.objects[e]),e.type==="GeometryCollection"?{type:"FeatureCollection",features:e.geometries.map(function(n){return _h(t,n)})}:_h(t,e)}function _h(t,e){var n=e.id,i=e.bbox,r=e.properties==null?{}:e.properties,s=Gh(t,e);return n==null&&i==null?{type:"Feature",properties:r,geometry:s}:i==null?{type:"Feature",id:n,properties:r,geometry:s}:{type:"Feature",id:n,bbox:i,properties:r,geometry:s}}function Gh(t,e){var n=d2(t.transform),i=t.arcs;function r(f,u){u.length&&u.pop();for(var h=i[f<0?~f:f],A=0,d=h.length;A<d;++A)u.push(n(h[A],A));f<0&&g2(u,d)}function s(f){return n(f)}function o(f){for(var u=[],h=0,A=f.length;h<A;++h)r(f[h],u);return u.length<2&&u.push(u[0]),u}function a(f){for(var u=o(f);u.length<4;)u.push(u[0]);return u}function l(f){return f.map(a)}function c(f){var u=f.type,h;switch(u){case"GeometryCollection":return{type:u,geometries:f.geometries.map(c)};case"Point":h=s(f.coordinates);break;case"MultiPoint":h=f.coordinates.map(s);break;case"LineString":h=o(f.arcs);break;case"MultiLineString":h=f.arcs.map(o);break;case"Polygon":h=l(f.arcs);break;case"MultiPolygon":h=f.arcs.map(l);break;default:return null}return{type:u,coordinates:h}}return c(e)}function m2(t,e){var n={},i={},r={},s=[],o=-1;e.forEach(function(c,f){var u=t.arcs[c<0?~c:c],h;u.length<3&&!u[1][0]&&!u[1][1]&&(h=e[++o],e[o]=c,e[f]=h)}),e.forEach(function(c){var f=a(c),u=f[0],h=f[1],A,d;if(A=r[u])if(delete r[A.end],A.push(c),A.end=h,d=i[h]){delete i[d.start];var g=d===A?A:A.concat(d);i[g.start=A.start]=r[g.end=d.end]=g}else i[A.start]=r[A.end]=A;else if(A=i[h])if(delete i[A.start],A.unshift(c),A.start=u,d=r[u]){delete r[d.end];var m=d===A?A:d.concat(A);i[m.start=d.start]=r[m.end=A.end]=m}else i[A.start]=r[A.end]=A;else A=[c],i[A.start=u]=r[A.end=h]=A});function a(c){var f=t.arcs[c<0?~c:c],u=f[0],h;return t.transform?(h=[0,0],f.forEach(function(A){h[0]+=A[0],h[1]+=A[1]})):h=f[f.length-1],c<0?[h,u]:[u,h]}function l(c,f){for(var u in c){var h=c[u];delete f[h.start],delete h.start,delete h.end,h.forEach(function(A){n[A<0?~A:A]=1}),s.push(h)}}return l(r,i),l(i,r),e.forEach(function(c){n[c<0?~c:c]||s.push([c])}),s}function w2(t){return Gh(t,y2.apply(this,arguments))}function y2(t,e,n){var i,r,s;if(arguments.length>1)i=C2(t,e,n);else for(r=0,i=new Array(s=t.arcs.length);r<s;++r)i[r]=r;return{type:"MultiLineString",arcs:m2(t,i)}}function C2(t,e,n){var i=[],r=[],s;function o(u){var h=u<0?~u:u;(r[h]||(r[h]=[])).push({i:u,g:s})}function a(u){u.forEach(o)}function l(u){u.forEach(a)}function c(u){u.forEach(l)}function f(u){switch(s=u,u.type){case"GeometryCollection":u.geometries.forEach(f);break;case"LineString":a(u.arcs);break;case"MultiLineString":case"Polygon":l(u.arcs);break;case"MultiPolygon":c(u.arcs);break}}return f(e),r.forEach(n==null?function(u){i.push(u[0].i)}:function(u){n(u[0].g,u[u.length-1].g)&&i.push(u[0].i)}),i}function Xn(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function E2(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Zn(t){let e,n,i;t.length!==2?(e=Xn,n=(a,l)=>Xn(t(a),l),i=(a,l)=>t(a)-l):(e=t===Xn||t===E2?t:I2,n=t,i=t);function r(a,l,c=0,f=a.length){if(c<f){if(e(l,l)!==0)return f;do{const u=c+f>>>1;n(a[u],l)<0?c=u+1:f=u}while(c<f)}return c}function s(a,l,c=0,f=a.length){if(c<f){if(e(l,l)!==0)return f;do{const u=c+f>>>1;n(a[u],l)<=0?c=u+1:f=u}while(c<f)}return c}function o(a,l,c=0,f=a.length){const u=r(a,l,c,f-1);return u>c&&i(a[u-1],l)>-i(a[u],l)?u-1:u}return{left:r,center:o,right:s}}function I2(){return 0}function zh(t){return t===null?NaN:+t}function*b2(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(i=+i)>=i&&(yield i)}}const Hh=Zn(Xn),yn=Hh.right;Hh.left,Zn(zh).center;function x2(t,e){let n=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&++n;else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(r=+r)>=r&&++n}return n}function B2(t,e){let n=0,i,r=0,s=0;if(e===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(i=o-r,r+=i/++n,s+=i*(o-r));else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&(a=+a)>=a&&(i=a-r,r+=i/++n,s+=i*(a-r))}if(n>1)return s/(n-1)}function v2(t,e){let n,i;for(const r of t)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));return[n,i]}class Wt extends Map{constructor(e,n=D2){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(Yh(this,e))}has(e){return super.has(Yh(this,e))}set(e,n){return super.set(S2(this,e),n)}delete(e){return super.delete(Q2(this,e))}}function Yh({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function S2({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function Q2({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function D2(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Al(t){return t}function Oo(t,...e){return Vh(t,Al,Al,e)}function k2(t,...e){return Vh(t,Array.from,Al,e)}function Vh(t,e,n,i){return(function r(s,o){if(o>=i.length)return n(s);const a=new Wt,l=i[o++];let c=-1;for(const f of s){const u=l(f,++c,s),h=a.get(u);h?h.push(f):a.set(u,[f])}for(const[f,u]of a)a.set(f,r(u,o));return e(a)})(t,0)}function F2(t=Xn){if(t===Xn)return Jh;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const i=t(e,n);return i||i===0?i:(t(n,n)===0)-(t(e,e)===0)}}function Jh(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const R2=Math.sqrt(50),N2=Math.sqrt(10),M2=Math.sqrt(2);function Uo(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),s=i/Math.pow(10,r),o=s>=R2?10:s>=N2?5:s>=M2?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/o,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*o,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?Uo(t,e,n*2):[a,l,c]}function _o(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,s,o]=i?Uo(e,t,n):Uo(t,e,n);if(!(s>=r))return[];const a=s-r+1,l=new Array(a);if(i)if(o<0)for(let c=0;c<a;++c)l[c]=(s-c)/-o;else for(let c=0;c<a;++c)l[c]=(s-c)*o;else if(o<0)for(let c=0;c<a;++c)l[c]=(r+c)/-o;else for(let c=0;c<a;++c)l[c]=(r+c)*o;return l}function hl(t,e,n){return e=+e,t=+t,n=+n,Uo(t,e,n)[2]}function $n(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?hl(e,t,n):hl(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function dl(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function gl(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function qh(t,e,n=0,i=1/0,r){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(t.length-1,i)),!(n<=e&&e<=i))return t;for(r=r===void 0?Jh:F2(r);i>n;){if(i-n>600){const l=i-n+1,c=e-n+1,f=Math.log(l),u=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*u*(l-u)/l)*(c-l/2<0?-1:1),A=Math.max(n,Math.floor(e-c*u/l+h)),d=Math.min(i,Math.floor(e+(l-c)*u/l+h));qh(t,e,A,d,r)}const s=t[e];let o=n,a=i;for(Zr(t,n,e),r(t[i],s)>0&&Zr(t,n,i);o<a;){for(Zr(t,o,a),++o,--a;r(t[o],s)<0;)++o;for(;r(t[a],s)>0;)--a}r(t[n],s)===0?Zr(t,n,a):(++a,Zr(t,a,i)),a<=e&&(n=a+1),e<=a&&(i=a-1)}return t}function Zr(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function T2(t,e,n){if(t=Float64Array.from(b2(t,n)),!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return gl(t);if(e>=1)return dl(t);var i,r=(i-1)*e,s=Math.floor(r),o=dl(qh(t,s).subarray(0,s+1)),a=gl(t.subarray(s+1));return o+(a-o)*(r-s)}}function Kh(t,e,n=zh){if(!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,s=Math.floor(r),o=+n(t[s],s,t),a=+n(t[s+1],s+1,t);return o+(a-o)*(r-s)}}function P2(t,e){let n=0,i=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let s of t)(s=e(s,++r,t))!=null&&(s=+s)>=s&&(++n,i+=s)}if(n)return i/n}function L2(t,e){return T2(t,.5,e)}function $r(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,s=new Array(r);++i<r;)s[i]=t+i*n;return s}function es(t,e){let n=0;if(e===void 0)for(let i of t)(i=+i)&&(n+=i);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}function O2(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Go(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function Li(t){return t=Go(Math.abs(t)),t?t[1]:NaN}function U2(t,e){return function(n,i){for(var r=n.length,s=[],o=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),s.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[o=(o+1)%t.length];return s.reverse().join(e)}}function _2(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var G2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Oi(t){if(!(e=G2.exec(t)))throw new Error("invalid format: "+t);var e;return new pl({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]})}Oi.prototype=pl.prototype;function pl(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+""}pl.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 z2(t){e:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break e;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var zo;function H2(t,e){var n=Go(t,e);if(!n)return zo=void 0,t.toPrecision(e);var i=n[0],r=n[1],s=r-(zo=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return s===o?i:s>o?i+new Array(s-o+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+Go(t,Math.max(0,e+s-1))[0]}function jh(t,e){var n=Go(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const Wh={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:O2,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)=>jh(t*100,e),r:jh,s:H2,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Xh(t){return t}var Zh=Array.prototype.map,$h=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Y2(t){var e=t.grouping===void 0||t.thousands===void 0?Xh:U2(Zh.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?Xh:_2(Zh.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(u,h){u=Oi(u);var A=u.fill,d=u.align,g=u.sign,m=u.symbol,p=u.zero,w=u.width,C=u.comma,y=u.precision,b=u.trim,x=u.type;x==="n"?(C=!0,x="g"):Wh[x]||(y===void 0&&(y=12),b=!0,x="g"),(p||A==="0"&&d==="=")&&(p=!0,A="0",d="=");var I=(h&&h.prefix!==void 0?h.prefix:"")+(m==="$"?n:m==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():""),S=(m==="$"?i:/[%p]/.test(x)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),Q=Wh[x],v=/[defgprs%]/.test(x);y=y===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function F(R){var M=I,O=S,z,_,Y;if(x==="c")O=Q(R)+O,R="";else{R=+R;var te=R<0||1/R<0;if(R=isNaN(R)?l:Q(Math.abs(R),y),b&&(R=z2(R)),te&&+R==0&&g!=="+"&&(te=!1),M=(te?g==="("?g:a:g==="-"||g==="("?"":g)+M,O=(x==="s"&&!isNaN(R)&&zo!==void 0?$h[8+zo/3]:"")+O+(te&&g==="("?")":""),v){for(z=-1,_=R.length;++z<_;)if(Y=R.charCodeAt(z),48>Y||Y>57){O=(Y===46?r+R.slice(z+1):R.slice(z))+O,R=R.slice(0,z);break}}}C&&!p&&(R=e(R,1/0));var oe=M.length+R.length+O.length,ne=oe<w?new Array(w-oe+1).join(A):"";switch(C&&p&&(R=e(ne+R,ne.length?w-O.length:1/0),ne=""),d){case"<":R=M+R+O+ne;break;case"=":R=M+ne+R+O;break;case"^":R=ne.slice(0,oe=ne.length>>1)+M+R+O+ne.slice(oe);break;default:R=ne+M+R+O;break}return s(R)}return F.toString=function(){return u+""},F}function f(u,h){var A=Math.max(-8,Math.min(8,Math.floor(Li(h)/3)))*3,d=Math.pow(10,-A),g=c((u=Oi(u),u.type="f",u),{suffix:$h[8+A/3]});return function(m){return g(d*m)}}return{format:c,formatPrefix:f}}var Ho,ze,ed;V2({thousands:",",grouping:[3],currency:["$",""]});function V2(t){return Ho=Y2(t),ze=Ho.format,ed=Ho.formatPrefix,Ho}function J2(t){return Math.max(0,-Li(Math.abs(t)))}function q2(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Li(e)/3)))*3-Li(Math.abs(t)))}function K2(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Li(e)-Li(t))+1}const ml=new Date,wl=new Date;function Se(t,e,n,i){function r(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return r.floor=s=>(t(s=new Date(+s)),s),r.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),r.round=s=>{const o=r(s),a=r.ceil(s);return s-o<a-s?o:a},r.offset=(s,o)=>(e(s=new Date(+s),o==null?1:Math.floor(o)),s),r.range=(s,o,a)=>{const l=[];if(s=r.ceil(s),a=a==null?1:Math.floor(a),!(s<o)||!(a>0))return l;let c;do l.push(c=new Date(+s)),e(s,a),t(s);while(c<s&&s<o);return l},r.filter=s=>Se(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;e(o,-1),!s(o););else for(;--a>=0;)for(;e(o,1),!s(o););}),n&&(r.count=(s,o)=>(ml.setTime(+s),wl.setTime(+o),t(ml),t(wl),Math.floor(n(ml,wl))),r.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?r.filter(i?o=>i(o)%s===0:o=>r.count(0,o)%s===0):r)),r}const Ui=Se(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ui.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Se(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ui),Ui.range;const Xt=1e3,dt=Xt*60,Zt=dt*60,$t=Zt*24,yl=$t*7,td=$t*30,Cl=$t*365,en=Se(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Xt)},(t,e)=>(e-t)/Xt,t=>t.getUTCSeconds());en.range;const Yo=Se(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xt)},(t,e)=>{t.setTime(+t+e*dt)},(t,e)=>(e-t)/dt,t=>t.getMinutes());Yo.range;const Vo=Se(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*dt)},(t,e)=>(e-t)/dt,t=>t.getUTCMinutes());Vo.range;const Jo=Se(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xt-t.getMinutes()*dt)},(t,e)=>{t.setTime(+t+e*Zt)},(t,e)=>(e-t)/Zt,t=>t.getHours());Jo.range;const qo=Se(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Zt)},(t,e)=>(e-t)/Zt,t=>t.getUTCHours());qo.range;const Cn=Se(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*dt)/$t,t=>t.getDate()-1);Cn.range;const ei=Se(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/$t,t=>t.getUTCDate()-1);ei.range;const nd=Se(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/$t,t=>Math.floor(t/$t));nd.range;function ti(t){return Se(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())*dt)/yl)}const ts=ti(0),Ko=ti(1),j2=ti(2),W2=ti(3),_i=ti(4),X2=ti(5),Z2=ti(6);ts.range,Ko.range,j2.range,W2.range,_i.range,X2.range,Z2.range;function ni(t){return Se(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)/yl)}const ns=ni(0),jo=ni(1),$2=ni(2),eb=ni(3),Gi=ni(4),tb=ni(5),nb=ni(6);ns.range,jo.range,$2.range,eb.range,Gi.range,tb.range,nb.range;const is=Se(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());is.range;const rs=Se(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());rs.range;const Rt=Se(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());Rt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Se(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)}),Rt.range;const Nt=Se(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());Nt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Se(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)}),Nt.range;function id(t,e,n,i,r,s){const o=[[en,1,Xt],[en,5,5*Xt],[en,15,15*Xt],[en,30,30*Xt],[s,1,dt],[s,5,5*dt],[s,15,15*dt],[s,30,30*dt],[r,1,Zt],[r,3,3*Zt],[r,6,6*Zt],[r,12,12*Zt],[i,1,$t],[i,2,2*$t],[n,1,yl],[e,1,td],[e,3,3*td],[t,1,Cl]];function a(c,f,u){const h=f<c;h&&([c,f]=[f,c]);const A=u&&typeof u.range=="function"?u:l(c,f,u),d=A?A.range(c,+f+1):[];return h?d.reverse():d}function l(c,f,u){const h=Math.abs(f-c)/u,A=Zn(([,,m])=>m).right(o,h);if(A===o.length)return t.every($n(c/Cl,f/Cl,u));if(A===0)return Ui.every(Math.max($n(c,f,u),1));const[d,g]=o[h/o[A-1][2]<o[A][2]/h?A-1:A];return d.every(g)}return[a,l]}const[ib,rb]=id(Nt,rs,ns,nd,qo,Vo),[sb,ob]=id(Rt,is,ts,Cn,Jo,Yo),ss="year",os="quarter",as="month",cs="week",ls="date",Wo="day",El="dayofyear",fs="hours",us="minutes",As="seconds",Xo="milliseconds";[ss,os,as,cs,ls,Wo,El,fs,us,As,Xo].reduce((t,e,n)=>(t[e]=1+n,t),{});const ab={[ss]:Rt,[os]:is.every(3),[as]:is,[cs]:ts,[ls]:Cn,[Wo]:Cn,[El]:Cn,[fs]:Jo,[us]:Yo,[As]:en,[Xo]:Ui},cb={[ss]:Nt,[os]:rs.every(3),[as]:rs,[cs]:ns,[ls]:ei,[Wo]:ei,[El]:ei,[fs]:qo,[us]:Vo,[As]:en,[Xo]:Ui};function lb(t){return ab[t]}function fb(t){return cb[t]}function Il(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 bl(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 hs(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function rd(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,s=t.days,o=t.shortDays,a=t.months,l=t.shortMonths,c=ds(r),f=gs(r),u=ds(s),h=gs(s),A=ds(o),d=gs(o),g=ds(a),m=gs(a),p=ds(l),w=gs(l),C={a:Y,A:te,b:oe,B:ne,c:null,d:fd,e:fd,f:Nb,g:Hb,G:Vb,H:kb,I:Fb,j:Rb,L:ud,m:Mb,M:Tb,p:_e,q:Kt,Q:md,s:wd,S:Pb,u:Lb,U:Ob,V:Ub,w:_b,W:Gb,x:null,X:null,y:zb,Y:Yb,Z:Jb,"%":pd},y={a:xo,A:Ur,b:hn,B:Ni,c:null,d:hd,e:hd,f:Wb,g:ox,G:cx,H:qb,I:Kb,j:jb,L:dd,m:Xb,M:Zb,p:Bo,q:_r,Q:md,s:wd,S:$b,u:ex,U:tx,V:nx,w:ix,W:rx,x:null,X:null,y:sx,Y:ax,Z:lx,"%":pd},b={a:v,A:F,b:R,B:M,c:O,d:cd,e:cd,f:vb,g:ad,G:od,H:ld,I:ld,j:Ib,L:Bb,m:Eb,M:bb,p:Q,q:Cb,Q:Qb,s:Db,S:xb,u:gb,U:pb,V:mb,w:db,W:wb,x:z,X:_,y:ad,Y:od,Z:yb,"%":Sb};C.x=x(n,C),C.X=x(i,C),C.c=x(e,C),y.x=x(n,y),y.X=x(i,y),y.c=x(e,y);function x(U,K){return function(W){var N=[],Ze=-1,se=0,it=U.length,$e,dn,vo;for(W instanceof Date||(W=new Date(+W));++Ze<it;)U.charCodeAt(Ze)===37&&(N.push(U.slice(se,Ze)),(dn=sd[$e=U.charAt(++Ze)])!=null?$e=U.charAt(++Ze):dn=$e==="e"?" ":"0",(vo=K[$e])&&($e=vo(W,dn)),N.push($e),se=Ze+1);return N.push(U.slice(se,Ze)),N.join("")}}function I(U,K){return function(W){var N=hs(1900,void 0,1),Ze=S(N,U,W+="",0),se,it;if(Ze!=W.length)return null;if("Q"in N)return new Date(N.Q);if("s"in N)return new Date(N.s*1e3+("L"in N?N.L:0));if(K&&!("Z"in N)&&(N.Z=0),"p"in N&&(N.H=N.H%12+N.p*12),N.m===void 0&&(N.m="q"in N?N.q:0),"V"in N){if(N.V<1||N.V>53)return null;"w"in N||(N.w=1),"Z"in N?(se=bl(hs(N.y,0,1)),it=se.getUTCDay(),se=it>4||it===0?jo.ceil(se):jo(se),se=ei.offset(se,(N.V-1)*7),N.y=se.getUTCFullYear(),N.m=se.getUTCMonth(),N.d=se.getUTCDate()+(N.w+6)%7):(se=Il(hs(N.y,0,1)),it=se.getDay(),se=it>4||it===0?Ko.ceil(se):Ko(se),se=Cn.offset(se,(N.V-1)*7),N.y=se.getFullYear(),N.m=se.getMonth(),N.d=se.getDate()+(N.w+6)%7)}else("W"in N||"U"in N)&&("w"in N||(N.w="u"in N?N.u%7:"W"in N?1:0),it="Z"in N?bl(hs(N.y,0,1)).getUTCDay():Il(hs(N.y,0,1)).getDay(),N.m=0,N.d="W"in N?(N.w+6)%7+N.W*7-(it+5)%7:N.w+N.U*7-(it+6)%7);return"Z"in N?(N.H+=N.Z/100|0,N.M+=N.Z%100,bl(N)):Il(N)}}function S(U,K,W,N){for(var Ze=0,se=K.length,it=W.length,$e,dn;Ze<se;){if(N>=it)return-1;if($e=K.charCodeAt(Ze++),$e===37){if($e=K.charAt(Ze++),dn=b[$e in sd?K.charAt(Ze++):$e],!dn||(N=dn(U,W,N))<0)return-1}else if($e!=W.charCodeAt(N++))return-1}return N}function Q(U,K,W){var N=c.exec(K.slice(W));return N?(U.p=f.get(N[0].toLowerCase()),W+N[0].length):-1}function v(U,K,W){var N=A.exec(K.slice(W));return N?(U.w=d.get(N[0].toLowerCase()),W+N[0].length):-1}function F(U,K,W){var N=u.exec(K.slice(W));return N?(U.w=h.get(N[0].toLowerCase()),W+N[0].length):-1}function R(U,K,W){var N=p.exec(K.slice(W));return N?(U.m=w.get(N[0].toLowerCase()),W+N[0].length):-1}function M(U,K,W){var N=g.exec(K.slice(W));return N?(U.m=m.get(N[0].toLowerCase()),W+N[0].length):-1}function O(U,K,W){return S(U,e,K,W)}function z(U,K,W){return S(U,n,K,W)}function _(U,K,W){return S(U,i,K,W)}function Y(U){return o[U.getDay()]}function te(U){return s[U.getDay()]}function oe(U){return l[U.getMonth()]}function ne(U){return a[U.getMonth()]}function _e(U){return r[+(U.getHours()>=12)]}function Kt(U){return 1+~~(U.getMonth()/3)}function xo(U){return o[U.getUTCDay()]}function Ur(U){return s[U.getUTCDay()]}function hn(U){return l[U.getUTCMonth()]}function Ni(U){return a[U.getUTCMonth()]}function Bo(U){return r[+(U.getUTCHours()>=12)]}function _r(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var K=x(U+="",C);return K.toString=function(){return U},K},parse:function(U){var K=I(U+="",!1);return K.toString=function(){return U},K},utcFormat:function(U){var K=x(U+="",y);return K.toString=function(){return U},K},utcParse:function(U){var K=I(U+="",!0);return K.toString=function(){return U},K}}}var sd={"-":"",_:" ",0:"0"},Re=/^\s*\d+/,ub=/^%/,Ab=/[\\^$*+?|[\]().{}]/g;function Z(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",s=r.length;return i+(s<n?new Array(n-s+1).join(e)+r:r)}function hb(t){return t.replace(Ab,"\\$&")}function ds(t){return new RegExp("^(?:"+t.map(hb).join("|")+")","i")}function gs(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function db(t,e,n){var i=Re.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function gb(t,e,n){var i=Re.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function pb(t,e,n){var i=Re.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function mb(t,e,n){var i=Re.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function wb(t,e,n){var i=Re.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function od(t,e,n){var i=Re.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function ad(t,e,n){var i=Re.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function yb(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Cb(t,e,n){var i=Re.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function Eb(t,e,n){var i=Re.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function cd(t,e,n){var i=Re.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Ib(t,e,n){var i=Re.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function ld(t,e,n){var i=Re.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function bb(t,e,n){var i=Re.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function xb(t,e,n){var i=Re.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Bb(t,e,n){var i=Re.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function vb(t,e,n){var i=Re.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Sb(t,e,n){var i=ub.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function Qb(t,e,n){var i=Re.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function Db(t,e,n){var i=Re.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function fd(t,e){return Z(t.getDate(),e,2)}function kb(t,e){return Z(t.getHours(),e,2)}function Fb(t,e){return Z(t.getHours()%12||12,e,2)}function Rb(t,e){return Z(1+Cn.count(Rt(t),t),e,3)}function ud(t,e){return Z(t.getMilliseconds(),e,3)}function Nb(t,e){return ud(t,e)+"000"}function Mb(t,e){return Z(t.getMonth()+1,e,2)}function Tb(t,e){return Z(t.getMinutes(),e,2)}function Pb(t,e){return Z(t.getSeconds(),e,2)}function Lb(t){var e=t.getDay();return e===0?7:e}function Ob(t,e){return Z(ts.count(Rt(t)-1,t),e,2)}function Ad(t){var e=t.getDay();return e>=4||e===0?_i(t):_i.ceil(t)}function Ub(t,e){return t=Ad(t),Z(_i.count(Rt(t),t)+(Rt(t).getDay()===4),e,2)}function _b(t){return t.getDay()}function Gb(t,e){return Z(Ko.count(Rt(t)-1,t),e,2)}function zb(t,e){return Z(t.getFullYear()%100,e,2)}function Hb(t,e){return t=Ad(t),Z(t.getFullYear()%100,e,2)}function Yb(t,e){return Z(t.getFullYear()%1e4,e,4)}function Vb(t,e){var n=t.getDay();return t=n>=4||n===0?_i(t):_i.ceil(t),Z(t.getFullYear()%1e4,e,4)}function Jb(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Z(e/60|0,"0",2)+Z(e%60,"0",2)}function hd(t,e){return Z(t.getUTCDate(),e,2)}function qb(t,e){return Z(t.getUTCHours(),e,2)}function Kb(t,e){return Z(t.getUTCHours()%12||12,e,2)}function jb(t,e){return Z(1+ei.count(Nt(t),t),e,3)}function dd(t,e){return Z(t.getUTCMilliseconds(),e,3)}function Wb(t,e){return dd(t,e)+"000"}function Xb(t,e){return Z(t.getUTCMonth()+1,e,2)}function Zb(t,e){return Z(t.getUTCMinutes(),e,2)}function $b(t,e){return Z(t.getUTCSeconds(),e,2)}function ex(t){var e=t.getUTCDay();return e===0?7:e}function tx(t,e){return Z(ns.count(Nt(t)-1,t),e,2)}function gd(t){var e=t.getUTCDay();return e>=4||e===0?Gi(t):Gi.ceil(t)}function nx(t,e){return t=gd(t),Z(Gi.count(Nt(t),t)+(Nt(t).getUTCDay()===4),e,2)}function ix(t){return t.getUTCDay()}function rx(t,e){return Z(jo.count(Nt(t)-1,t),e,2)}function sx(t,e){return Z(t.getUTCFullYear()%100,e,2)}function ox(t,e){return t=gd(t),Z(t.getUTCFullYear()%100,e,2)}function ax(t,e){return Z(t.getUTCFullYear()%1e4,e,4)}function cx(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Gi(t):Gi.ceil(t),Z(t.getUTCFullYear()%1e4,e,4)}function lx(){return"+0000"}function pd(){return"%"}function md(t){return+t}function wd(t){return Math.floor(+t/1e3)}var zi,xl,yd,Bl,Cd;fx({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 fx(t){return zi=rd(t),xl=zi.format,yd=zi.parse,Bl=zi.utcFormat,Cd=zi.utcParse,zi}function Zo(t){const e={};return n=>e[n]||(e[n]=t(n))}function Ed(t,e,n){n=n||{},Ge(n)||be(`Invalid time multi-format specifier: ${n}`);const i=e(As),r=e(us),s=e(fs),o=e(ls),a=e(cs),l=e(as),c=e(os),f=e(ss),u=t(n[Xo]||".%L"),h=t(n[As]||":%S"),A=t(n[us]||"%I:%M"),d=t(n[fs]||"%I %p"),g=t(n[ls]||n[Wo]||"%a %d"),m=t(n[cs]||"%b %d"),p=t(n[as]||"%B"),w=t(n[os]||"%B"),C=t(n[ss]||"%Y");return y=>(i(y)<y?u:r(y)<y?h:s(y)<y?A:o(y)<y?d:l(y)<y?a(y)<y?g:m:f(y)<y?c(y)<y?p:w:C)(y)}function Id(t){const e=Zo(t.format),n=Zo(t.utcFormat);return{timeFormat:i=>le(i)?e(i):Ed(e,lb,i),utcFormat:i=>le(i)?n(i):Ed(n,fb,i),timeParse:Zo(t.parse),utcParse:Zo(t.utcParse)}}let vl;ux();function ux(){return vl=Id({format:xl,parse:yd,utcFormat:Bl,utcParse:Cd})}function Ax(t){return Id(rd(t))}function hx(t){return arguments.length?vl=Ax(t):vl}const dx=t=>t!=null&&t===t,gx=t=>t==="true"||t==="false"||t===!0||t===!1,px=t=>!Number.isNaN(Date.parse(t)),bd=t=>!Number.isNaN(+t)&&!(t instanceof Date),mx=t=>bd(t)&&Number.isInteger(+t),xd={boolean:PI,integer:Gr,number:Gr,date:OI,string:UI,unknown:Do},$o=[gx,mx,bd,px],wx=["boolean","integer","number","date"];function yx(t,e){if(!t||!t.length)return"unknown";const n=t.length,i=$o.length,r=$o.map((s,o)=>o+1);for(let s=0,o=0,a,l;s<n;++s)for(l=e?t[s][e]:t[s],a=0;a<i;++a)if(r[a]&&dx(l)&&!$o[a](l)&&(r[a]=0,++o,o===$o.length))return"string";return wx[r.reduce((s,o)=>s===0?o:s,0)-1]}function Cx(t,e){return e.reduce((n,i)=>(n[i]=yx(t,i),n),{})}function Bd(t){const e=function(n,i){const r={delimiter:t};return Sl(n,i?RI(i,r):r)};return e.responseType="text",e}function Sl(t,e){return e.header&&(t=e.header.map(nl).join(e.delimiter)+`
|
|
8
|
-
`+t),
|
|
1
|
+
(function(xt,At){typeof exports=="object"&&typeof module<"u"?At(exports):typeof define=="function"&&define.amd?define(["exports"],At):(xt=typeof globalThis<"u"?globalThis:xt||self,At(xt.genomeSpyEmbed={}))})(this,(function(xt){"use strict";function At(t,e,n){return t.fields=e||[],t.fname=n,t}function jE(t){return t==null?null:t.fname}function WE(t){return t==null?null:t.fields}function XE(t){return t.length===1?ZE(t[0]):$E(t)}const ZE=t=>function(e){return e[t]},$E=t=>{const e=t.length;return function(n){for(let i=0;i<e;++i)n=n[t[i]];return n}};function xe(t){throw Error(t)}function IA(t){const e=[],n=t.length;let i=null,r=0,s="",o,a,l;t=t+"";function c(){e.push(s+t.substring(o,a)),s="",o=a+1}for(o=a=0;a<n;++a)if(l=t[a],l==="\\")s+=t.substring(o,a++),o=a;else if(l===i)c(),i=null,r=-1;else{if(i)continue;o===r&&l==='"'||o===r&&l==="'"?(o=a+1,i=l):l==="."&&!r?a>o?c():o=a+1:l==="["?(a>o&&c(),r=o=a+1):l==="]"&&(r||xe("Access path missing open bracket: "+t),r>0&&c(),r=0,o=a+1)}return r&&xe("Access path missing closing bracket: "+t),i&&xe("Access path missing closing quote: "+t),a>o&&(a++,c()),e}function Fo(t,e,n){const i=IA(t);return t=i.length===1?i[0]:t,At((n&&n.get||XE)(i),[t],e||t)}Fo("id");const No=At(t=>t,[],"identity");At(()=>0,[],"zero"),At(()=>1,[],"one"),At(()=>!0,[],"true"),At(()=>!1,[],"false");const eI=new Set([...Object.getOwnPropertyNames(Object.prototype).filter(t=>typeof Object.prototype[t]=="function"),"__proto__"]);var be=Array.isArray;function Ge(t){return t===Object(t)}function vt(t){return t[t.length-1]}function Jr(t){return t==null||t===""?null:+t}const xA=t=>e=>t*Math.exp(e),vA=t=>e=>Math.log(t*e),tI=t=>e=>Math.sign(e)*Math.log1p(Math.abs(e/t)),nI=t=>e=>Math.sign(e)*Math.expm1(Math.abs(e))*t,Mo=t=>e=>e<0?-Math.pow(-e,t):Math.pow(e,t);function al(t,e,n,i){const r=n(t[0]),s=n(vt(t)),o=(s-r)*e;return[i(r-o),i(s-o)]}function iI(t,e){return al(t,e,Jr,No)}function rI(t,e){var n=Math.sign(t[0]);return al(t,e,vA(n),xA(n))}function sI(t,e,n){return al(t,e,Mo(n),Mo(1/n))}function To(t,e,n,i,r){const s=i(t[0]),o=i(vt(t)),a=e!=null?i(e):(s+o)/2;return[r(a+(s-a)*n),r(a+(o-a)*n)]}function BA(t,e,n){return To(t,e,n,Jr,No)}function SA(t,e,n){const i=Math.sign(t[0]);return To(t,e,n,vA(i),xA(i))}function cl(t,e,n,i){return To(t,e,n,Mo(i),Mo(1/i))}function DA(t,e,n,i){return To(t,e,n,tI(i),nI(i))}function ll(t){return t!=null?be(t)?t:[t]:[]}function oI(t,e,n){let i=t[0],r=t[1],s;return r<i&&(s=r,r=i,i=s),s=r-i,s>=n-e?[e,n]:[i=Math.min(Math.max(i,e),n-s),i+s]}function dt(t){return typeof t=="function"}const aI="descending";function QA(t,e,n){n=n||{},e=ll(e)||[];const i=[],r=[],s={},o=n.comparator||cI;return ll(t).forEach((a,l)=>{a!=null&&(i.push(e[l]===aI?-1:1),r.push(a=dt(a)?a:Fo(a,null,n)),(WE(a)||[]).forEach(c=>s[c]=1))}),r.length===0?null:At(o(r,i),Object.keys(s))}const kA=(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),cI=(t,e)=>t.length===1?lI(t[0],e[0]):uI(t,e,t.length),lI=(t,e)=>function(n,i){return kA(t(n),t(i))*e},uI=(t,e,n)=>(e.push(0),function(i,r){let s,o=0,a=-1;for(;o===0&&++a<n;)s=t[a],o=kA(s(i),s(r));return o*e[a]});function fI(t){for(let e,n,i=1,r=arguments.length;i<r;++i){e=arguments[i];for(n in e)t[n]=e[n]}return t}function Ui(t,e){return Object.hasOwn(t,e)}function qr(t){return typeof t=="boolean"}function hI(t){return Object.prototype.toString.call(t)==="[object Date]"}function AI(t){return t&&dt(t[Symbol.iterator])}function qe(t){return typeof t=="number"}function dI(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function le(t){return typeof t=="string"}function RA(t,e){const n=t[0],i=vt(t),r=+e;return r?r===1?i:n+r*(i-n):n}function Kr(t){return t&&vt(t)-t[0]||0}function ul(t){return be(t)?`[${t.map(e=>e===null?"null":ul(e))}]`:Ge(t)||le(t)?JSON.stringify(t).replaceAll("\u2028","\\u2028").replaceAll("\u2029","\\u2029"):t}function gI(t){return t==null||t===""?null:!t||t==="false"||t==="0"?!1:!!t}const pI=t=>qe(t)||hI(t)?t:Date.parse(t);function mI(t,e){return e=e||pI,t==null||t===""?null:e(t)}function wI(t){return t==null||t===""?null:t+""}function Po(t){const e={},n=t.length;for(let i=0;i<n;++i)e[t[i]]=!0;return e}const Lo=globalThis,fl=Lo.ShadowRoot&&(Lo.ShadyCSS===void 0||Lo.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,FA=Symbol(),NA=new WeakMap;let yI=class{constructor(e,n,i){if(this._$cssResult$=!0,i!==FA)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(fl&&e===void 0){const i=n!==void 0&&n.length===1;i&&(e=NA.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&NA.set(n,e))}return e}toString(){return this.cssText}};const CI=t=>new yI(typeof t=="string"?t:t+"",void 0,FA),bI=(t,e)=>{if(fl)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const i=document.createElement("style"),r=Lo.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=n.cssText,t.appendChild(i)}},MA=fl?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const i of e.cssRules)n+=i.cssText;return CI(n)})(t):t;const{is:EI,defineProperty:II,getOwnPropertyDescriptor:xI,getOwnPropertyNames:vI,getOwnPropertySymbols:BI,getPrototypeOf:SI}=Object,Oo=globalThis,TA=Oo.trustedTypes,DI=TA?TA.emptyScript:"",QI=Oo.reactiveElementPolyfillSupport,jr=(t,e)=>t,hl={toAttribute(t,e){switch(e){case Boolean:t=t?DI: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}},PA=(t,e)=>!EI(t,e),LA={attribute:!0,type:String,converter:hl,reflect:!1,useDefault:!1,hasChanged:PA};Symbol.metadata??=Symbol("metadata"),Oo.litPropertyMetadata??=new WeakMap;let _i=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=LA){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 i=Symbol(),r=this.getPropertyDescriptor(e,i,n);r!==void 0&&II(this.prototype,e,r)}}static getPropertyDescriptor(e,n,i){const{get:r,set:s}=xI(this.prototype,e)??{get(){return this[n]},set(o){this[n]=o}};return{get:r,set(o){const a=r?.call(this);s?.call(this,o),this.requestUpdate(e,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??LA}static _$Ei(){if(this.hasOwnProperty(jr("elementProperties")))return;const e=SI(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(jr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(jr("properties"))){const n=this.properties,i=[...vI(n),...BI(n)];for(const r of i)this.createProperty(r,n[r])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[i,r]of n)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[n,i]of this.elementProperties){const r=this._$Eu(n,i);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)n.unshift(MA(r))}else e!==void 0&&n.push(MA(e));return n}static _$Eu(e,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i: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(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const i of n.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return bI(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,n,i){this._$AK(e,i)}_$ET(e,n){const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const s=(i.converter?.toAttribute!==void 0?i.converter:hl).toAttribute(n,i.type);this._$Em=e,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(e,n){const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const s=i.getPropertyOptions(r),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:hl;this._$Em=r;const a=o.fromAttribute(n,s.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,n,i,r=!1,s){if(e!==void 0){const o=this.constructor;if(r===!1&&(s=this[e]),i??=o.getPropertyOptions(e),!((i.hasChanged??PA)(s,n)||i.useDefault&&i.reflect&&s===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,i))))return;this.C(e,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,n,{useDefault:i,reflect:r,wrapped:s},o){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??n??this[e]),s!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(n=void 0),this._$AL.set(e,n)),r===!0&&this._$Em!==e&&(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(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,s]of i){const{wrapped:o}=s,a=this[r];o!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,s,a)}}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(n)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(n)}willUpdate(e){}_$AE(e){this._$EO?.forEach(n=>n.hostUpdated?.()),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.forEach(n=>this._$ET(n,this[n])),this._$EM()}updated(e){}firstUpdated(e){}};_i.elementStyles=[],_i.shadowRootOptions={mode:"open"},_i[jr("elementProperties")]=new Map,_i[jr("finalized")]=new Map,QI?.({ReactiveElement:_i}),(Oo.reactiveElementVersions??=[]).push("2.1.2");const Al=globalThis,OA=t=>t,Uo=Al.trustedTypes,UA=Uo?Uo.createPolicy("lit-html",{createHTML:t=>t}):void 0,_A="$lit$",In=`lit$${Math.random().toFixed(9).slice(2)}$`,zA="?"+In,kI=`<${zA}>`,Zn=document,Wr=()=>Zn.createComment(""),Xr=t=>t===null||typeof t!="object"&&typeof t!="function",dl=Array.isArray,RI=t=>dl(t)||typeof t?.[Symbol.iterator]=="function",gl=`[
|
|
2
|
+
\f\r]`,Zr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,GA=/-->/g,HA=/>/g,$n=RegExp(`>|${gl}(?:([^\\s"'>=/]+)(${gl}*=${gl}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),YA=/'/g,VA=/"/g,JA=/^(?:script|style|textarea|title)$/i,FI=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),ae=FI(1),ei=Symbol.for("lit-noChange"),Ie=Symbol.for("lit-nothing"),qA=new WeakMap,ti=Zn.createTreeWalker(Zn,129);function KA(t,e){if(!dl(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return UA!==void 0?UA.createHTML(e):e}const NI=(t,e)=>{const n=t.length-1,i=[];let r,s=e===2?"<svg>":e===3?"<math>":"",o=Zr;for(let a=0;a<n;a++){const l=t[a];let c,u,f=-1,h=0;for(;h<l.length&&(o.lastIndex=h,u=o.exec(l),u!==null);)h=o.lastIndex,o===Zr?u[1]==="!--"?o=GA:u[1]!==void 0?o=HA:u[2]!==void 0?(JA.test(u[2])&&(r=RegExp("</"+u[2],"g")),o=$n):u[3]!==void 0&&(o=$n):o===$n?u[0]===">"?(o=r??Zr,f=-1):u[1]===void 0?f=-2:(f=o.lastIndex-u[2].length,c=u[1],o=u[3]===void 0?$n:u[3]==='"'?VA:YA):o===VA||o===YA?o=$n:o===GA||o===HA?o=Zr:(o=$n,r=void 0);const A=o===$n&&t[a+1].startsWith("/>")?" ":"";s+=o===Zr?l+kI:f>=0?(i.push(c),l.slice(0,f)+_A+l.slice(f)+In+A):l+In+(f===-2?a:A)}return[KA(t,s+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class $r{constructor({strings:e,_$litType$:n},i){let r;this.parts=[];let s=0,o=0;const a=e.length-1,l=this.parts,[c,u]=NI(e,n);if(this.el=$r.createElement(c,i),ti.currentNode=this.el.content,n===2||n===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(r=ti.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const f of r.getAttributeNames())if(f.endsWith(_A)){const h=u[o++],A=r.getAttribute(f).split(In),d=/([.?@])?(.*)/.exec(h);l.push({type:1,index:s,name:d[2],strings:A,ctor:d[1]==="."?TI:d[1]==="?"?PI:d[1]==="@"?LI:_o}),r.removeAttribute(f)}else f.startsWith(In)&&(l.push({type:6,index:s}),r.removeAttribute(f));if(JA.test(r.tagName)){const f=r.textContent.split(In),h=f.length-1;if(h>0){r.textContent=Uo?Uo.emptyScript:"";for(let A=0;A<h;A++)r.append(f[A],Wr()),ti.nextNode(),l.push({type:2,index:++s});r.append(f[h],Wr())}}}else if(r.nodeType===8)if(r.data===zA)l.push({type:2,index:s});else{let f=-1;for(;(f=r.data.indexOf(In,f+1))!==-1;)l.push({type:7,index:s}),f+=In.length-1}s++}}static createElement(e,n){const i=Zn.createElement("template");return i.innerHTML=e,i}}function zi(t,e,n=t,i){if(e===ei)return e;let r=i!==void 0?n._$Co?.[i]:n._$Cl;const s=Xr(e)?void 0:e._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),s===void 0?r=void 0:(r=new s(t),r._$AT(t,n,i)),i!==void 0?(n._$Co??=[])[i]=r:n._$Cl=r),r!==void 0&&(e=zi(t,r._$AS(t,e.values),r,i)),e}class MI{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:i}=this._$AD,r=(e?.creationScope??Zn).importNode(n,!0);ti.currentNode=r;let s=ti.nextNode(),o=0,a=0,l=i[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new es(s,s.nextSibling,this,e):l.type===1?c=new l.ctor(s,l.name,l.strings,this,e):l.type===6&&(c=new OI(s,this,e)),this._$AV.push(c),l=i[++a]}o!==l?.index&&(s=ti.nextNode(),o++)}return ti.currentNode=Zn,r}p(e){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}}class es{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,n,i,r){this.type=2,this._$AH=Ie,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&e?.nodeType===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=zi(this,e,n),Xr(e)?e===Ie||e==null||e===""?(this._$AH!==Ie&&this._$AR(),this._$AH=Ie):e!==this._$AH&&e!==ei&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):RI(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!==Ie&&Xr(this._$AH)?this._$AA.nextSibling.data=e:this.T(Zn.createTextNode(e)),this._$AH=e}$(e){const{values:n,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=$r.createElement(KA(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(n);else{const s=new MI(r,this),o=s.u(this.options);s.p(n),this.T(o),this._$AH=s}}_$AC(e){let n=qA.get(e.strings);return n===void 0&&qA.set(e.strings,n=new $r(e)),n}k(e){dl(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const s of e)r===n.length?n.push(i=new es(this.O(Wr()),this.O(Wr()),this,this.options)):i=n[r],i._$AI(s),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){for(this._$AP?.(!1,!0,n);e!==this._$AB;){const i=OA(e).nextSibling;OA(e).remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class _o{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,i,r,s){this.type=1,this._$AH=Ie,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Ie}_$AI(e,n=this,i,r){const s=this.strings;let o=!1;if(s===void 0)e=zi(this,e,n,0),o=!Xr(e)||e!==this._$AH&&e!==ei,o&&(this._$AH=e);else{const a=e;let l,c;for(e=s[0],l=0;l<s.length-1;l++)c=zi(this,a[i+l],n,l),c===ei&&(c=this._$AH[l]),o||=!Xr(c)||c!==this._$AH[l],c===Ie?e=Ie:e!==Ie&&(e+=(c??"")+s[l+1]),this._$AH[l]=c}o&&!r&&this.j(e)}j(e){e===Ie?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class TI extends _o{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Ie?void 0:e}}class PI extends _o{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Ie)}}let LI=class extends _o{constructor(e,n,i,r,s){super(e,n,i,r,s),this.type=5}_$AI(e,n=this){if((e=zi(this,e,n,0)??Ie)===ei)return;const i=this._$AH,r=e===Ie&&i!==Ie||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==Ie&&(i===Ie||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}};class OI{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){zi(this,e)}}const UI=Al.litHtmlPolyfillSupport;UI?.($r,es),(Al.litHtmlVersions??=[]).push("3.3.2");const ts=(t,e,n)=>{const i=n?.renderBefore??e;let r=i._$litPart$;if(r===void 0){const s=n?.renderBefore??null;i._$litPart$=r=new es(e.insertBefore(Wr(),s),s,void 0,n??{})}return r._$AI(t),r};const pl=globalThis;let zo=class extends _i{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=ts(n,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ei}};zo._$litElement$=!0,zo.finalized=!0,pl.litElementHydrateSupport?.({LitElement:zo});const _I=pl.litElementPolyfillSupport;_I?.({LitElement:zo}),(pl.litElementVersions??=[]).push("4.2.2");var jA={},ml={},wl=34,ns=10,yl=13;function WA(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function zI(t,e){var n=WA(t);return function(i,r){return e(n(i),r,t)}}function XA(t){var e=Object.create(null),n=[];return t.forEach(function(i){for(var r in i)r in e||n.push(e[r]=r)}),n}function at(t,e){var n=t+"",i=n.length;return i<e?new Array(e-i+1).join(0)+n:n}function GI(t){return t<0?"-"+at(-t,6):t>9999?"+"+at(t,6):at(t,4)}function HI(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),i=t.getUTCSeconds(),r=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":GI(t.getUTCFullYear())+"-"+at(t.getUTCMonth()+1,2)+"-"+at(t.getUTCDate(),2)+(r?"T"+at(e,2)+":"+at(n,2)+":"+at(i,2)+"."+at(r,3)+"Z":i?"T"+at(e,2)+":"+at(n,2)+":"+at(i,2)+"Z":n||e?"T"+at(e,2)+":"+at(n,2)+"Z":"")}function ZA(t){var e=new RegExp('["'+t+`
|
|
4
|
+
\r]`),n=t.charCodeAt(0);function i(f,h){var A,d,g=r(f,function(m,p){if(A)return A(m,p-1);d=m,A=h?zI(m,h):WA(m)});return g.columns=d||[],g}function r(f,h){var A=[],d=f.length,g=0,m=0,p,w=d<=0,C=!1;f.charCodeAt(d-1)===ns&&--d,f.charCodeAt(d-1)===yl&&--d;function y(){if(w)return ml;if(C)return C=!1,jA;var x,E=g,S;if(f.charCodeAt(E)===wl){for(;g++<d&&f.charCodeAt(g)!==wl||f.charCodeAt(++g)===wl;);return(x=g)>=d?w=!0:(S=f.charCodeAt(g++))===ns?C=!0:S===yl&&(C=!0,f.charCodeAt(g)===ns&&++g),f.slice(E+1,x-1).replace(/""/g,'"')}for(;g<d;){if((S=f.charCodeAt(x=g++))===ns)C=!0;else if(S===yl)C=!0,f.charCodeAt(g)===ns&&++g;else if(S!==n)continue;return f.slice(E,x)}return w=!0,f.slice(E,d)}for(;(p=y())!==ml;){for(var I=[];p!==jA&&p!==ml;)I.push(p),p=y();h&&(I=h(I,m++))==null||A.push(I)}return A}function s(f,h){return f.map(function(A){return h.map(function(d){return u(A[d])}).join(t)})}function o(f,h){return h==null&&(h=XA(f)),[h.map(u).join(t)].concat(s(f,h)).join(`
|
|
5
|
+
`)}function a(f,h){return h==null&&(h=XA(f)),s(f,h).join(`
|
|
6
|
+
`)}function l(f){return f.map(c).join(`
|
|
7
|
+
`)}function c(f){return f.map(u).join(t)}function u(f){return f==null?"":f instanceof Date?HI(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:i,parseRows:r,format:o,formatBody:a,formatRows:l,formatRow:c,formatValue:u}}var YI=ZA(" "),VI=YI.parseRows;function JI(t){return t}function qI(t){if(t==null)return JI;var e,n,i=t.scale[0],r=t.scale[1],s=t.translate[0],o=t.translate[1];return function(a,l){l||(e=n=0);var c=2,u=a.length,f=new Array(u);for(f[0]=(e+=a[0])*i+s,f[1]=(n+=a[1])*r+o;c<u;)f[c]=a[c],++c;return f}}function KI(t,e){for(var n,i=t.length,r=i-e;r<--i;)n=t[r],t[r++]=t[i],t[i]=n}function jI(t,e){return typeof e=="string"&&(e=t.objects[e]),e.type==="GeometryCollection"?{type:"FeatureCollection",features:e.geometries.map(function(n){return $A(t,n)})}:$A(t,e)}function $A(t,e){var n=e.id,i=e.bbox,r=e.properties==null?{}:e.properties,s=ed(t,e);return n==null&&i==null?{type:"Feature",properties:r,geometry:s}:i==null?{type:"Feature",id:n,properties:r,geometry:s}:{type:"Feature",id:n,bbox:i,properties:r,geometry:s}}function ed(t,e){var n=qI(t.transform),i=t.arcs;function r(u,f){f.length&&f.pop();for(var h=i[u<0?~u:u],A=0,d=h.length;A<d;++A)f.push(n(h[A],A));u<0&&KI(f,d)}function s(u){return n(u)}function o(u){for(var f=[],h=0,A=u.length;h<A;++h)r(u[h],f);return f.length<2&&f.push(f[0]),f}function a(u){for(var f=o(u);f.length<4;)f.push(f[0]);return f}function l(u){return u.map(a)}function c(u){var f=u.type,h;switch(f){case"GeometryCollection":return{type:f,geometries:u.geometries.map(c)};case"Point":h=s(u.coordinates);break;case"MultiPoint":h=u.coordinates.map(s);break;case"LineString":h=o(u.arcs);break;case"MultiLineString":h=u.arcs.map(o);break;case"Polygon":h=l(u.arcs);break;case"MultiPolygon":h=u.arcs.map(l);break;default:return null}return{type:f,coordinates:h}}return c(e)}function WI(t,e){var n={},i={},r={},s=[],o=-1;e.forEach(function(c,u){var f=t.arcs[c<0?~c:c],h;f.length<3&&!f[1][0]&&!f[1][1]&&(h=e[++o],e[o]=c,e[u]=h)}),e.forEach(function(c){var u=a(c),f=u[0],h=u[1],A,d;if(A=r[f])if(delete r[A.end],A.push(c),A.end=h,d=i[h]){delete i[d.start];var g=d===A?A:A.concat(d);i[g.start=A.start]=r[g.end=d.end]=g}else i[A.start]=r[A.end]=A;else if(A=i[h])if(delete i[A.start],A.unshift(c),A.start=f,d=r[f]){delete r[d.end];var m=d===A?A:d.concat(A);i[m.start=d.start]=r[m.end=A.end]=m}else i[A.start]=r[A.end]=A;else A=[c],i[A.start=f]=r[A.end=h]=A});function a(c){var u=t.arcs[c<0?~c:c],f=u[0],h;return t.transform?(h=[0,0],u.forEach(function(A){h[0]+=A[0],h[1]+=A[1]})):h=u[u.length-1],c<0?[h,f]:[f,h]}function l(c,u){for(var f in c){var h=c[f];delete u[h.start],delete h.start,delete h.end,h.forEach(function(A){n[A<0?~A:A]=1}),s.push(h)}}return l(r,i),l(i,r),e.forEach(function(c){n[c<0?~c:c]||s.push([c])}),s}function XI(t){return ed(t,ZI.apply(this,arguments))}function ZI(t,e,n){var i,r,s;if(arguments.length>1)i=$I(t,e,n);else for(r=0,i=new Array(s=t.arcs.length);r<s;++r)i[r]=r;return{type:"MultiLineString",arcs:WI(t,i)}}function $I(t,e,n){var i=[],r=[],s;function o(f){var h=f<0?~f:f;(r[h]||(r[h]=[])).push({i:f,g:s})}function a(f){f.forEach(o)}function l(f){f.forEach(a)}function c(f){f.forEach(l)}function u(f){switch(s=f,f.type){case"GeometryCollection":f.geometries.forEach(u);break;case"LineString":a(f.arcs);break;case"MultiLineString":case"Polygon":l(f.arcs);break;case"MultiPolygon":c(f.arcs);break}}return u(e),r.forEach(n==null?function(f){i.push(f[0].i)}:function(f){n(f[0].g,f[f.length-1].g)&&i.push(f[0].i)}),i}function ni(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function e2(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ii(t){let e,n,i;t.length!==2?(e=ni,n=(a,l)=>ni(t(a),l),i=(a,l)=>t(a)-l):(e=t===ni||t===e2?t:t2,n=t,i=t);function r(a,l,c=0,u=a.length){if(c<u){if(e(l,l)!==0)return u;do{const f=c+u>>>1;n(a[f],l)<0?c=f+1:u=f}while(c<u)}return c}function s(a,l,c=0,u=a.length){if(c<u){if(e(l,l)!==0)return u;do{const f=c+u>>>1;n(a[f],l)<=0?c=f+1:u=f}while(c<u)}return c}function o(a,l,c=0,u=a.length){const f=r(a,l,c,u-1);return f>c&&i(a[f-1],l)>-i(a[f],l)?f-1:f}return{left:r,center:o,right:s}}function t2(){return 0}function td(t){return t===null?NaN:+t}function*n2(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(i=+i)>=i&&(yield i)}}const nd=ii(ni),xn=nd.right;nd.left,ii(td).center;function i2(t,e){let n=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&++n;else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(r=+r)>=r&&++n}return n}function r2(t,e){let n=0,i,r=0,s=0;if(e===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(i=o-r,r+=i/++n,s+=i*(o-r));else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&(a=+a)>=a&&(i=a-r,r+=i/++n,s+=i*(a-r))}if(n>1)return s/(n-1)}function s2(t,e){let n,i;for(const r of t)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));return[n,i]}class Xt extends Map{constructor(e,n=c2){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(id(this,e))}has(e){return super.has(id(this,e))}set(e,n){return super.set(o2(this,e),n)}delete(e){return super.delete(a2(this,e))}}function id({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function o2({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function a2({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function c2(t){return t!==null&&typeof t=="object"?t.valueOf():t}function Cl(t){return t}function Go(t,...e){return rd(t,Cl,Cl,e)}function l2(t,...e){return rd(t,Array.from,Cl,e)}function rd(t,e,n,i){return(function r(s,o){if(o>=i.length)return n(s);const a=new Xt,l=i[o++];let c=-1;for(const u of s){const f=l(u,++c,s),h=a.get(f);h?h.push(u):a.set(f,[u])}for(const[u,f]of a)a.set(u,r(f,o));return e(a)})(t,0)}function u2(t=ni){if(t===ni)return sd;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const i=t(e,n);return i||i===0?i:(t(n,n)===0)-(t(e,e)===0)}}function sd(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const f2=Math.sqrt(50),h2=Math.sqrt(10),A2=Math.sqrt(2);function Ho(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),s=i/Math.pow(10,r),o=s>=f2?10:s>=h2?5:s>=A2?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/o,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*o,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?Ho(t,e,n*2):[a,l,c]}function Yo(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,s,o]=i?Ho(e,t,n):Ho(t,e,n);if(!(s>=r))return[];const a=s-r+1,l=new Array(a);if(i)if(o<0)for(let c=0;c<a;++c)l[c]=(s-c)/-o;else for(let c=0;c<a;++c)l[c]=(s-c)*o;else if(o<0)for(let c=0;c<a;++c)l[c]=(r+c)/-o;else for(let c=0;c<a;++c)l[c]=(r+c)*o;return l}function bl(t,e,n){return e=+e,t=+t,n=+n,Ho(t,e,n)[2]}function ri(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?bl(e,t,n):bl(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function El(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function Il(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function od(t,e,n=0,i=1/0,r){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(t.length-1,i)),!(n<=e&&e<=i))return t;for(r=r===void 0?sd:u2(r);i>n;){if(i-n>600){const l=i-n+1,c=e-n+1,u=Math.log(l),f=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),A=Math.max(n,Math.floor(e-c*f/l+h)),d=Math.min(i,Math.floor(e+(l-c)*f/l+h));od(t,e,A,d,r)}const s=t[e];let o=n,a=i;for(is(t,n,e),r(t[i],s)>0&&is(t,n,i);o<a;){for(is(t,o,a),++o,--a;r(t[o],s)<0;)++o;for(;r(t[a],s)>0;)--a}r(t[n],s)===0?is(t,n,a):(++a,is(t,a,i)),a<=e&&(n=a+1),e<=a&&(i=a-1)}return t}function is(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function d2(t,e,n){if(t=Float64Array.from(n2(t,n)),!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return Il(t);if(e>=1)return El(t);var i,r=(i-1)*e,s=Math.floor(r),o=El(od(t,s).subarray(0,s+1)),a=Il(t.subarray(s+1));return o+(a-o)*(r-s)}}function ad(t,e,n=td){if(!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,s=Math.floor(r),o=+n(t[s],s,t),a=+n(t[s+1],s+1,t);return o+(a-o)*(r-s)}}function g2(t,e){let n=0,i=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let s of t)(s=e(s,++r,t))!=null&&(s=+s)>=s&&(++n,i+=s)}if(n)return i/n}function p2(t,e){return d2(t,.5,e)}function rs(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,s=new Array(r);++i<r;)s[i]=t+i*n;return s}function ss(t,e){let n=0;if(e===void 0)for(let i of t)(i=+i)&&(n+=i);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}function m2(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Vo(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function Gi(t){return t=Vo(Math.abs(t)),t?t[1]:NaN}function w2(t,e){return function(n,i){for(var r=n.length,s=[],o=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),s.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[o=(o+1)%t.length];return s.reverse().join(e)}}function y2(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var C2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hi(t){if(!(e=C2.exec(t)))throw new Error("invalid format: "+t);var e;return new xl({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]})}Hi.prototype=xl.prototype;function xl(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+""}xl.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 b2(t){e:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break e;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var Jo;function E2(t,e){var n=Vo(t,e);if(!n)return Jo=void 0,t.toPrecision(e);var i=n[0],r=n[1],s=r-(Jo=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return s===o?i:s>o?i+new Array(s-o+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+Vo(t,Math.max(0,e+s-1))[0]}function cd(t,e){var n=Vo(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const ld={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:m2,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)=>cd(t*100,e),r:cd,s:E2,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ud(t){return t}var fd=Array.prototype.map,hd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function I2(t){var e=t.grouping===void 0||t.thousands===void 0?ud:w2(fd.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?ud:y2(fd.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(f,h){f=Hi(f);var A=f.fill,d=f.align,g=f.sign,m=f.symbol,p=f.zero,w=f.width,C=f.comma,y=f.precision,I=f.trim,x=f.type;x==="n"?(C=!0,x="g"):ld[x]||(y===void 0&&(y=12),I=!0,x="g"),(p||A==="0"&&d==="=")&&(p=!0,A="0",d="=");var E=(h&&h.prefix!==void 0?h.prefix:"")+(m==="$"?n:m==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():""),S=(m==="$"?i:/[%p]/.test(x)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),D=ld[x],B=/[defgprs%]/.test(x);y=y===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function k(F){var M=E,O=S,_,H,G;if(x==="c")O=D(F)+O,F="";else{F=+F;var q=F<0||1/F<0;if(F=isNaN(F)?l:D(Math.abs(F),y),I&&(F=b2(F)),q&&+F==0&&g!=="+"&&(q=!1),M=(q?g==="("?g:a:g==="-"||g==="("?"":g)+M,O=(x==="s"&&!isNaN(F)&&Jo!==void 0?hd[8+Jo/3]:"")+O+(q&&g==="("?")":""),B){for(_=-1,H=F.length;++_<H;)if(G=F.charCodeAt(_),48>G||G>57){O=(G===46?r+F.slice(_+1):F.slice(_))+O,F=F.slice(0,_);break}}}C&&!p&&(F=e(F,1/0));var Z=M.length+F.length+O.length,Y=Z<w?new Array(w-Z+1).join(A):"";switch(C&&p&&(F=e(Y+F,Y.length?w-O.length:1/0),Y=""),d){case"<":F=M+F+O+Y;break;case"=":F=M+Y+F+O;break;case"^":F=Y.slice(0,Z=Y.length>>1)+M+F+O+Y.slice(Z);break;default:F=Y+M+F+O;break}return s(F)}return k.toString=function(){return f+""},k}function u(f,h){var A=Math.max(-8,Math.min(8,Math.floor(Gi(h)/3)))*3,d=Math.pow(10,-A),g=c((f=Hi(f),f.type="f",f),{suffix:hd[8+A/3]});return function(m){return g(d*m)}}return{format:c,formatPrefix:u}}var qo,He,Ad;x2({thousands:",",grouping:[3],currency:["$",""]});function x2(t){return qo=I2(t),He=qo.format,Ad=qo.formatPrefix,qo}function v2(t){return Math.max(0,-Gi(Math.abs(t)))}function B2(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Gi(e)/3)))*3-Gi(Math.abs(t)))}function S2(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Gi(e)-Gi(t))+1}const vl=new Date,Bl=new Date;function De(t,e,n,i){function r(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return r.floor=s=>(t(s=new Date(+s)),s),r.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),r.round=s=>{const o=r(s),a=r.ceil(s);return s-o<a-s?o:a},r.offset=(s,o)=>(e(s=new Date(+s),o==null?1:Math.floor(o)),s),r.range=(s,o,a)=>{const l=[];if(s=r.ceil(s),a=a==null?1:Math.floor(a),!(s<o)||!(a>0))return l;let c;do l.push(c=new Date(+s)),e(s,a),t(s);while(c<s&&s<o);return l},r.filter=s=>De(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;e(o,-1),!s(o););else for(;--a>=0;)for(;e(o,1),!s(o););}),n&&(r.count=(s,o)=>(vl.setTime(+s),Bl.setTime(+o),t(vl),t(Bl),Math.floor(n(vl,Bl))),r.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?r.filter(i?o=>i(o)%s===0:o=>r.count(0,o)%s===0):r)),r}const Yi=De(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Yi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?De(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Yi),Yi.range;const Zt=1e3,gt=Zt*60,$t=gt*60,en=$t*24,Sl=en*7,dd=en*30,Dl=en*365,tn=De(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Zt)},(t,e)=>(e-t)/Zt,t=>t.getUTCSeconds());tn.range;const Ko=De(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Zt)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getMinutes());Ko.range;const jo=De(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCMinutes());jo.range;const Wo=De(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Zt-t.getMinutes()*gt)},(t,e)=>{t.setTime(+t+e*$t)},(t,e)=>(e-t)/$t,t=>t.getHours());Wo.range;const Xo=De(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*$t)},(t,e)=>(e-t)/$t,t=>t.getUTCHours());Xo.range;const vn=De(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*gt)/en,t=>t.getDate()-1);vn.range;const si=De(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/en,t=>t.getUTCDate()-1);si.range;const gd=De(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/en,t=>Math.floor(t/en));gd.range;function oi(t){return De(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())*gt)/Sl)}const os=oi(0),Zo=oi(1),D2=oi(2),Q2=oi(3),Vi=oi(4),k2=oi(5),R2=oi(6);os.range,Zo.range,D2.range,Q2.range,Vi.range,k2.range,R2.range;function ai(t){return De(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)/Sl)}const as=ai(0),$o=ai(1),F2=ai(2),N2=ai(3),Ji=ai(4),M2=ai(5),T2=ai(6);as.range,$o.range,F2.range,N2.range,Ji.range,M2.range,T2.range;const cs=De(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());cs.range;const ls=De(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());ls.range;const Nt=De(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());Nt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:De(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)}),Nt.range;const Mt=De(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());Mt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:De(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)}),Mt.range;function pd(t,e,n,i,r,s){const o=[[tn,1,Zt],[tn,5,5*Zt],[tn,15,15*Zt],[tn,30,30*Zt],[s,1,gt],[s,5,5*gt],[s,15,15*gt],[s,30,30*gt],[r,1,$t],[r,3,3*$t],[r,6,6*$t],[r,12,12*$t],[i,1,en],[i,2,2*en],[n,1,Sl],[e,1,dd],[e,3,3*dd],[t,1,Dl]];function a(c,u,f){const h=u<c;h&&([c,u]=[u,c]);const A=f&&typeof f.range=="function"?f:l(c,u,f),d=A?A.range(c,+u+1):[];return h?d.reverse():d}function l(c,u,f){const h=Math.abs(u-c)/f,A=ii(([,,m])=>m).right(o,h);if(A===o.length)return t.every(ri(c/Dl,u/Dl,f));if(A===0)return Yi.every(Math.max(ri(c,u,f),1));const[d,g]=o[h/o[A-1][2]<o[A][2]/h?A-1:A];return d.every(g)}return[a,l]}const[P2,L2]=pd(Mt,ls,as,gd,Xo,jo),[O2,U2]=pd(Nt,cs,os,vn,Wo,Ko),us="year",fs="quarter",hs="month",As="week",ds="date",ea="day",Ql="dayofyear",gs="hours",ps="minutes",ms="seconds",ta="milliseconds";[us,fs,hs,As,ds,ea,Ql,gs,ps,ms,ta].reduce((t,e,n)=>(t[e]=1+n,t),{});const _2={[us]:Nt,[fs]:cs.every(3),[hs]:cs,[As]:os,[ds]:vn,[ea]:vn,[Ql]:vn,[gs]:Wo,[ps]:Ko,[ms]:tn,[ta]:Yi},z2={[us]:Mt,[fs]:ls.every(3),[hs]:ls,[As]:as,[ds]:si,[ea]:si,[Ql]:si,[gs]:Xo,[ps]:jo,[ms]:tn,[ta]:Yi};function G2(t){return _2[t]}function H2(t){return z2[t]}function kl(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 Rl(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 ws(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function md(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,s=t.days,o=t.shortDays,a=t.months,l=t.shortMonths,c=ys(r),u=Cs(r),f=ys(s),h=Cs(s),A=ys(o),d=Cs(o),g=ys(a),m=Cs(a),p=ys(l),w=Cs(l),C={a:G,A:q,b:Z,B:Y,c:null,d:Id,e:Id,f:hx,g:Ex,G:xx,H:lx,I:ux,j:fx,L:xd,m:Ax,M:dx,p:we,q:ze,Q:kd,s:Rd,S:gx,u:px,U:mx,V:wx,w:yx,W:Cx,x:null,X:null,y:bx,Y:Ix,Z:vx,"%":Qd},y={a:mn,A:jt,b:wn,B:Oi,c:null,d:Bd,e:Bd,f:Qx,g:Ux,G:zx,H:Bx,I:Sx,j:Dx,L:Sd,m:kx,M:Rx,p:Qo,q:Vr,Q:kd,s:Rd,S:Fx,u:Nx,U:Mx,V:Tx,w:Px,W:Lx,x:null,X:null,y:Ox,Y:_x,Z:Gx,"%":Qd},I={a:B,A:k,b:F,B:M,c:O,d:bd,e:bd,f:sx,g:Cd,G:yd,H:Ed,I:Ed,j:tx,L:rx,m:ex,M:nx,p:D,q:$2,Q:ax,s:cx,S:ix,u:K2,U:j2,V:W2,w:q2,W:X2,x:_,X:H,y:Cd,Y:yd,Z:Z2,"%":ox};C.x=x(n,C),C.X=x(i,C),C.c=x(e,C),y.x=x(n,y),y.X=x(i,y),y.c=x(e,y);function x(U,W){return function($){var N=[],tt=-1,oe=0,st=U.length,nt,yn,ko;for($ instanceof Date||($=new Date(+$));++tt<st;)U.charCodeAt(tt)===37&&(N.push(U.slice(oe,tt)),(yn=wd[nt=U.charAt(++tt)])!=null?nt=U.charAt(++tt):yn=nt==="e"?" ":"0",(ko=W[nt])&&(nt=ko($,yn)),N.push(nt),oe=tt+1);return N.push(U.slice(oe,tt)),N.join("")}}function E(U,W){return function($){var N=ws(1900,void 0,1),tt=S(N,U,$+="",0),oe,st;if(tt!=$.length)return null;if("Q"in N)return new Date(N.Q);if("s"in N)return new Date(N.s*1e3+("L"in N?N.L:0));if(W&&!("Z"in N)&&(N.Z=0),"p"in N&&(N.H=N.H%12+N.p*12),N.m===void 0&&(N.m="q"in N?N.q:0),"V"in N){if(N.V<1||N.V>53)return null;"w"in N||(N.w=1),"Z"in N?(oe=Rl(ws(N.y,0,1)),st=oe.getUTCDay(),oe=st>4||st===0?$o.ceil(oe):$o(oe),oe=si.offset(oe,(N.V-1)*7),N.y=oe.getUTCFullYear(),N.m=oe.getUTCMonth(),N.d=oe.getUTCDate()+(N.w+6)%7):(oe=kl(ws(N.y,0,1)),st=oe.getDay(),oe=st>4||st===0?Zo.ceil(oe):Zo(oe),oe=vn.offset(oe,(N.V-1)*7),N.y=oe.getFullYear(),N.m=oe.getMonth(),N.d=oe.getDate()+(N.w+6)%7)}else("W"in N||"U"in N)&&("w"in N||(N.w="u"in N?N.u%7:"W"in N?1:0),st="Z"in N?Rl(ws(N.y,0,1)).getUTCDay():kl(ws(N.y,0,1)).getDay(),N.m=0,N.d="W"in N?(N.w+6)%7+N.W*7-(st+5)%7:N.w+N.U*7-(st+6)%7);return"Z"in N?(N.H+=N.Z/100|0,N.M+=N.Z%100,Rl(N)):kl(N)}}function S(U,W,$,N){for(var tt=0,oe=W.length,st=$.length,nt,yn;tt<oe;){if(N>=st)return-1;if(nt=W.charCodeAt(tt++),nt===37){if(nt=W.charAt(tt++),yn=I[nt in wd?W.charAt(tt++):nt],!yn||(N=yn(U,$,N))<0)return-1}else if(nt!=$.charCodeAt(N++))return-1}return N}function D(U,W,$){var N=c.exec(W.slice($));return N?(U.p=u.get(N[0].toLowerCase()),$+N[0].length):-1}function B(U,W,$){var N=A.exec(W.slice($));return N?(U.w=d.get(N[0].toLowerCase()),$+N[0].length):-1}function k(U,W,$){var N=f.exec(W.slice($));return N?(U.w=h.get(N[0].toLowerCase()),$+N[0].length):-1}function F(U,W,$){var N=p.exec(W.slice($));return N?(U.m=w.get(N[0].toLowerCase()),$+N[0].length):-1}function M(U,W,$){var N=g.exec(W.slice($));return N?(U.m=m.get(N[0].toLowerCase()),$+N[0].length):-1}function O(U,W,$){return S(U,e,W,$)}function _(U,W,$){return S(U,n,W,$)}function H(U,W,$){return S(U,i,W,$)}function G(U){return o[U.getDay()]}function q(U){return s[U.getDay()]}function Z(U){return l[U.getMonth()]}function Y(U){return a[U.getMonth()]}function we(U){return r[+(U.getHours()>=12)]}function ze(U){return 1+~~(U.getMonth()/3)}function mn(U){return o[U.getUTCDay()]}function jt(U){return s[U.getUTCDay()]}function wn(U){return l[U.getUTCMonth()]}function Oi(U){return a[U.getUTCMonth()]}function Qo(U){return r[+(U.getUTCHours()>=12)]}function Vr(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var W=x(U+="",C);return W.toString=function(){return U},W},parse:function(U){var W=E(U+="",!1);return W.toString=function(){return U},W},utcFormat:function(U){var W=x(U+="",y);return W.toString=function(){return U},W},utcParse:function(U){var W=E(U+="",!0);return W.toString=function(){return U},W}}}var wd={"-":"",_:" ",0:"0"},Ne=/^\s*\d+/,Y2=/^%/,V2=/[\\^$*+?|[\]().{}]/g;function te(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",s=r.length;return i+(s<n?new Array(n-s+1).join(e)+r:r)}function J2(t){return t.replace(V2,"\\$&")}function ys(t){return new RegExp("^(?:"+t.map(J2).join("|")+")","i")}function Cs(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function q2(t,e,n){var i=Ne.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function K2(t,e,n){var i=Ne.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function j2(t,e,n){var i=Ne.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function W2(t,e,n){var i=Ne.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function X2(t,e,n){var i=Ne.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function yd(t,e,n){var i=Ne.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Cd(t,e,n){var i=Ne.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Z2(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function $2(t,e,n){var i=Ne.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function ex(t,e,n){var i=Ne.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function bd(t,e,n){var i=Ne.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function tx(t,e,n){var i=Ne.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function Ed(t,e,n){var i=Ne.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function nx(t,e,n){var i=Ne.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function ix(t,e,n){var i=Ne.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function rx(t,e,n){var i=Ne.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function sx(t,e,n){var i=Ne.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function ox(t,e,n){var i=Y2.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function ax(t,e,n){var i=Ne.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function cx(t,e,n){var i=Ne.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function Id(t,e){return te(t.getDate(),e,2)}function lx(t,e){return te(t.getHours(),e,2)}function ux(t,e){return te(t.getHours()%12||12,e,2)}function fx(t,e){return te(1+vn.count(Nt(t),t),e,3)}function xd(t,e){return te(t.getMilliseconds(),e,3)}function hx(t,e){return xd(t,e)+"000"}function Ax(t,e){return te(t.getMonth()+1,e,2)}function dx(t,e){return te(t.getMinutes(),e,2)}function gx(t,e){return te(t.getSeconds(),e,2)}function px(t){var e=t.getDay();return e===0?7:e}function mx(t,e){return te(os.count(Nt(t)-1,t),e,2)}function vd(t){var e=t.getDay();return e>=4||e===0?Vi(t):Vi.ceil(t)}function wx(t,e){return t=vd(t),te(Vi.count(Nt(t),t)+(Nt(t).getDay()===4),e,2)}function yx(t){return t.getDay()}function Cx(t,e){return te(Zo.count(Nt(t)-1,t),e,2)}function bx(t,e){return te(t.getFullYear()%100,e,2)}function Ex(t,e){return t=vd(t),te(t.getFullYear()%100,e,2)}function Ix(t,e){return te(t.getFullYear()%1e4,e,4)}function xx(t,e){var n=t.getDay();return t=n>=4||n===0?Vi(t):Vi.ceil(t),te(t.getFullYear()%1e4,e,4)}function vx(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+te(e/60|0,"0",2)+te(e%60,"0",2)}function Bd(t,e){return te(t.getUTCDate(),e,2)}function Bx(t,e){return te(t.getUTCHours(),e,2)}function Sx(t,e){return te(t.getUTCHours()%12||12,e,2)}function Dx(t,e){return te(1+si.count(Mt(t),t),e,3)}function Sd(t,e){return te(t.getUTCMilliseconds(),e,3)}function Qx(t,e){return Sd(t,e)+"000"}function kx(t,e){return te(t.getUTCMonth()+1,e,2)}function Rx(t,e){return te(t.getUTCMinutes(),e,2)}function Fx(t,e){return te(t.getUTCSeconds(),e,2)}function Nx(t){var e=t.getUTCDay();return e===0?7:e}function Mx(t,e){return te(as.count(Mt(t)-1,t),e,2)}function Dd(t){var e=t.getUTCDay();return e>=4||e===0?Ji(t):Ji.ceil(t)}function Tx(t,e){return t=Dd(t),te(Ji.count(Mt(t),t)+(Mt(t).getUTCDay()===4),e,2)}function Px(t){return t.getUTCDay()}function Lx(t,e){return te($o.count(Mt(t)-1,t),e,2)}function Ox(t,e){return te(t.getUTCFullYear()%100,e,2)}function Ux(t,e){return t=Dd(t),te(t.getUTCFullYear()%100,e,2)}function _x(t,e){return te(t.getUTCFullYear()%1e4,e,4)}function zx(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ji(t):Ji.ceil(t),te(t.getUTCFullYear()%1e4,e,4)}function Gx(){return"+0000"}function Qd(){return"%"}function kd(t){return+t}function Rd(t){return Math.floor(+t/1e3)}var qi,Fl,Fd,Nl,Nd;Hx({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 Hx(t){return qi=md(t),Fl=qi.format,Fd=qi.parse,Nl=qi.utcFormat,Nd=qi.utcParse,qi}function na(t){const e={};return n=>e[n]||(e[n]=t(n))}function Md(t,e,n){n=n||{},Ge(n)||xe(`Invalid time multi-format specifier: ${n}`);const i=e(ms),r=e(ps),s=e(gs),o=e(ds),a=e(As),l=e(hs),c=e(fs),u=e(us),f=t(n[ta]||".%L"),h=t(n[ms]||":%S"),A=t(n[ps]||"%I:%M"),d=t(n[gs]||"%I %p"),g=t(n[ds]||n[ea]||"%a %d"),m=t(n[As]||"%b %d"),p=t(n[hs]||"%B"),w=t(n[fs]||"%B"),C=t(n[us]||"%Y");return y=>(i(y)<y?f:r(y)<y?h:s(y)<y?A:o(y)<y?d:l(y)<y?a(y)<y?g:m:u(y)<y?c(y)<y?p:w:C)(y)}function Td(t){const e=na(t.format),n=na(t.utcFormat);return{timeFormat:i=>le(i)?e(i):Md(e,G2,i),utcFormat:i=>le(i)?n(i):Md(n,H2,i),timeParse:na(t.parse),utcParse:na(t.utcParse)}}let Ml;Yx();function Yx(){return Ml=Td({format:Fl,parse:Fd,utcFormat:Nl,utcParse:Nd})}function Vx(t){return Td(md(t))}function Jx(t){return arguments.length?Ml=Vx(t):Ml}const qx=t=>t!=null&&t===t,Kx=t=>t==="true"||t==="false"||t===!0||t===!1,jx=t=>!Number.isNaN(Date.parse(t)),Pd=t=>!Number.isNaN(+t)&&!(t instanceof Date),Wx=t=>Pd(t)&&Number.isInteger(+t),Ld={boolean:gI,integer:Jr,number:Jr,date:mI,string:wI,unknown:No},ia=[Kx,Wx,Pd,jx],Xx=["boolean","integer","number","date"];function Zx(t,e){if(!t||!t.length)return"unknown";const n=t.length,i=ia.length,r=ia.map((s,o)=>o+1);for(let s=0,o=0,a,l;s<n;++s)for(l=e?t[s][e]:t[s],a=0;a<i;++a)if(r[a]&&qx(l)&&!ia[a](l)&&(r[a]=0,++o,o===ia.length))return"string";return Xx[r.reduce((s,o)=>s===0?o:s,0)-1]}function $x(t,e){return e.reduce((n,i)=>(n[i]=Zx(t,i),n),{})}function Od(t){const e=function(n,i){const r={delimiter:t};return Tl(n,i?fI(i,r):r)};return e.responseType="text",e}function Tl(t,e){return e.header&&(t=e.header.map(ul).join(e.delimiter)+`
|
|
8
|
+
`+t),ZA(e.delimiter).parse(t+"")}Tl.responseType="text";function ev(t){return typeof Buffer=="function"&&dt(Buffer.isBuffer)?Buffer.isBuffer(t):!1}function Pl(t,e){const n=e&&e.property?Fo(e.property):No;return Ge(t)&&!ev(t)?tv(n(t),e):n(JSON.parse(t))}Pl.responseType="json";function tv(t,e){return!be(t)&&AI(t)&&(t=[...t]),e&&e.copy?JSON.parse(JSON.stringify(t)):t}const nv={interior:(t,e)=>t!==e,exterior:(t,e)=>t===e};function Ud(t,e){let n,i,r,s;return t=Pl(t,e),e&&e.feature?(n=jI,r=e.feature):e&&e.mesh?(n=XI,r=e.mesh,s=nv[e.filter]):xe("Missing TopoJSON feature or mesh parameter."),i=(i=t.objects[r])?n(t,i,s):xe("Invalid TopoJSON object: "+r),i&&i.features||[i]}Ud.responseType="json";const Ll={dsv:Tl,csv:Od(","),tsv:Od(" "),json:Pl,topojson:Ud};function ci(t,e){return arguments.length>1?(Ll[t]=e,this):Ui(Ll,t)?Ll[t]:null}function Ol(t,e,n,i){e=e||{};const r=ci(e.type||"json");return r||xe("Unknown data format type: "+e.type),t=r(t,e),e.parse&&iv(t,e.parse,n,i),Ui(t,"columns")&&delete t.columns,t}function iv(t,e,n,i){if(!t.length)return;const r=Jx();n=n||r.timeParse,i=i||r.utcParse;let s=t.columns||Object.keys(t[0]),o,a,l,c,u,f;e==="auto"&&(e=$x(t,s)),s=Object.keys(e);const h=s.map(A=>{const d=e[A];let g,m;if(d&&(d.startsWith("date:")||d.startsWith("utc:")))return g=d.split(/:(.+)?/,2),m=g[1],(m[0]==="'"&&m[m.length-1]==="'"||m[0]==='"'&&m[m.length-1]==='"')&&(m=m.slice(1,-1)),(g[0]==="utc"?i:n)(m);if(!Ld[d])throw Error("Illegal format pattern: "+A+":"+d);return Ld[d]});for(l=0,u=t.length,f=s.length;l<u;++l)for(o=t[l],c=0;c<f;++c)a=s[c],o[a]=h[c](o[a])}const rv=`
|
|
9
9
|
:root {
|
|
10
10
|
--genome-spy-basic-spacing: 10px;
|
|
11
11
|
--genome-spy-font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial,
|
|
@@ -28,6 +28,7 @@ overflow: hidden;
|
|
|
28
28
|
|
|
29
29
|
canvas {
|
|
30
30
|
display: block;
|
|
31
|
+
touch-action: none;
|
|
31
32
|
transform: scale(1, 1);
|
|
32
33
|
opacity: 1;
|
|
33
34
|
transition:
|
|
@@ -170,6 +171,13 @@ margin-left: 0.4em;
|
|
|
170
171
|
box-shadow: 0px 0px 3px 1px white;
|
|
171
172
|
}
|
|
172
173
|
|
|
174
|
+
.color-legend-unmapped {
|
|
175
|
+
background-color: transparent;
|
|
176
|
+
border: 1px solid black;
|
|
177
|
+
box-sizing: border-box;
|
|
178
|
+
box-shadow: none;
|
|
179
|
+
}
|
|
180
|
+
|
|
173
181
|
.attributes {
|
|
174
182
|
.hovered {
|
|
175
183
|
background-color: #e0e0e0;
|
|
@@ -249,36 +257,36 @@ flex-basis: content;
|
|
|
249
257
|
font-size: 14px;
|
|
250
258
|
padding: var(--genome-spy-basic-spacing);
|
|
251
259
|
}
|
|
252
|
-
`;function
|
|
260
|
+
`;function sv(t,e){var n=t.getBoundingClientRect();return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}function Bn(t,e){return t.length==e.length&&t.every((n,i)=>t[i]===e[i])}function Me(t){return Array.isArray(t)?t:typeof t<"u"?[t]:[]}function ra(t){return t[t.length-1]}class ov{#e=!1;#t=!0;#n=void 0;#i=0;#r=void 0;#o=0;#s;#c;#a=[!0];constructor(e){this.#c=e,this.#s=document.createElement("div"),this.#s.className="tooltip",this.#c.appendChild(this.#s),this.clear()}set sticky(e){!e&&this.#e&&this.clear(),this.#e=e,this.#s.classList.toggle("sticky",this.#e)}get sticky(){return this.#e}set visible(e){e!=this.#t&&(this.#s.style.display=e?null:"none",this.#t=e)}get visible(){return this.#t}get enabled(){return ra(this.#a)??!0}pushEnabledState(e){this.#a.push(e),e||(this.visible=!1)}popEnabledState(){this.#a.pop()}handleMouseMove(e){if(this.#e)return;this.mouseCoords=sv(this.#c,e);const n=performance.now();!this.visible&&!this._isPenalty()&&n-this.#o>500&&(this.#i=n+70),this.#r&&av(this.mouseCoords,this.#r)>20&&(this.#i=n+400),this.#r=this.mouseCoords,this.visible&&this.updatePlacement(),this.#o=n}updatePlacement(){const[n,i]=this.mouseCoords;let r=n+20;r>this.#c.clientWidth-this.#s.offsetWidth&&(r=n-20-this.#s.offsetWidth),this.#s.style.left=r+"px",this.#s.style.top=Math.min(i+20,this.#c.clientHeight-this.#s.offsetHeight)+"px"}setContent(e){if(!this.#e){if(!e||!this.enabled||this._isPenalty()){this.visible&&(ts("",this.#s),this.visible=!1),this.#n=void 0;return}ts(e,this.#s),this.visible=!0,this.updatePlacement()}}clear(){this.#n=void 0,this.setContent(void 0)}updateWithDatum(e,n){if(e!==this.#n){this.#n=e,n||(n=r=>Promise.resolve(ae` ${JSON.stringify(r)} `));const i=e;n(e).then(r=>{this.#n===i&&this.setContent(r)}).catch(r=>{if(r!=="debounced")throw r})}}_isPenalty(){return this.#i&&this.#i>performance.now()}}function av(t,e){let n=0;for(let i=0;i<t.length;i++)n+=(t[i]-e[i])**2;return Math.sqrt(n)}function cv(t){t.classList.add("genome-spy");const e=document.createElement("style");e.innerHTML=rv,t.appendChild(e);const n=_d("div",{class:"canvas-wrapper"});t.appendChild(n),n.classList.add("loading");const i=_d("div",{class:"loading-indicators"}),r=new ov(t);return{canvasWrapper:n,loadingIndicatorsElement:i,tooltip:r,styleElement:e}}function lv(t,e){const n=document.createElement("div");n.className="message-box";const i=document.createElement("div");i.textContent=e,n.appendChild(i),t.appendChild(n)}function _d(t,e){const n=document.createElement(t);for(const[i,r]of Object.entries(e))["innerHTML","innerText","className"].includes(i)&&(n[i]=r),n.setAttribute(i,r);return n}const uv={ATTRIBUTE:1},fv=t=>(...e)=>({_$litDirective$:t,values:e});let hv=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,i){this._$Ct=e,this._$AM=n,this._$Ci=i}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}};const zd="important",Av=" !"+zd,Gd=fv(class extends hv{constructor(t){if(super(t),t.type!==uv.ATTRIBUTE||t.name!=="style"||t.strings?.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 i=t[n];return i==null?e:e+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}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 i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?n.removeProperty(i):n[i]=null);for(const i in e){const r=e[i];if(r!=null){this.ft.add(i);const s=typeof r=="string"&&r.endsWith(Av);i.includes("-")||s?n.setProperty(i,s?r.slice(0,-11):r,s?zd:""):n[i]=r}}return ei}}),Hd="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";class dv{#e;#t;#n=null;constructor(e,n){this.#e=e,this.#t=n,this.#n=this.#t.subscribe(()=>this.updateLayout()),this.updateLayout()}destroy(){this.#n&&(this.#n(),this.#n=null)}updateLayout(){const e=[],n=()=>{for(const[,s]of this.#t.entries())if(s.status=="loading"||s.status=="error")return!0;return!1};let i,r=!1;for(const[s,o]of this.#t.entries()){const a=o.status=="loading"||o.status=="error",l=s.coords;if(!l&&a&&!i&&(i=o),l){a&&(r=!0);const c={left:`${l.x}px`,top:`${l.y}px`,width:`${l.width}px`,height:`${l.height}px`};e.push(ae`<div style=${Gd(c)}>
|
|
253
261
|
<div class=${o.status}>
|
|
254
|
-
${o.status=="error"?
|
|
262
|
+
${o.status=="error"?ae`<span
|
|
255
263
|
>Loading
|
|
256
|
-
failed${o.detail?
|
|
257
|
-
>`:
|
|
258
|
-
<img src="${
|
|
264
|
+
failed${o.detail?ae`: ${o.detail}`:Ie}</span
|
|
265
|
+
>`:ae`
|
|
266
|
+
<img src="${Hd}" alt="" />
|
|
259
267
|
<span>Loading...</span>
|
|
260
268
|
`}
|
|
261
269
|
</div>
|
|
262
|
-
</div>`)}}if(i&&!r){const s={left:"0px",top:"0px",width:"100%",height:"100%"};e.push(
|
|
270
|
+
</div>`)}}if(i&&!r){const s={left:"0px",top:"0px",width:"100%",height:"100%"};e.push(ae`<div style=${Gd(s)}>
|
|
263
271
|
<div class=${i.status}>
|
|
264
|
-
${i.status=="error"?
|
|
272
|
+
${i.status=="error"?ae`<span
|
|
265
273
|
>Loading
|
|
266
|
-
failed${i.detail?
|
|
267
|
-
>`:
|
|
268
|
-
<img src="${
|
|
274
|
+
failed${i.detail?ae`: ${i.detail}`:Ie}</span
|
|
275
|
+
>`:ae`
|
|
276
|
+
<img src="${Hd}" alt="" />
|
|
269
277
|
<span>Loading...</span>
|
|
270
278
|
`}
|
|
271
279
|
</div>
|
|
272
|
-
</div>`)}n()?this.#e.style.display="block":setTimeout(()=>{n()||(this.#e.style.display="none")},3e3),
|
|
280
|
+
</div>`)}n()?this.#e.style.display="block":setTimeout(()=>{n()||(this.#e.style.display="none")},3e3),ts(e,this.#e)}}class Yd{#e=new Map;#t=new Set;set(e,n,i){if(!e)throw new Error("LoadingStatusRegistry.set requires a view.");this.#e.set(e,{status:n,detail:i});const r={view:e,status:n,detail:i};for(const s of this.#t)s(r)}delete(e){const n=this.#e.get(e);if(!n)return;this.#e.delete(e);const i={view:e,status:n.status,detail:n.detail};for(const r of this.#t)r(i)}get(e){return this.#e.get(e)}entries(){return this.#e.entries()}subscribe(e){return this.#t.add(e),()=>{this.#t.delete(e)}}}function gv(t){return e=>{if(t.querySelector(".view-highlight")?.remove(),e){if(!e.isVisible())return;const n=e.coords;if(n){const i=document.createElement("div");i.className="view-highlight",i.style.position="absolute",i.style.left=n.x+"px",i.style.top=n.y+"px",i.style.width=n.width+"px",i.style.height=n.height+"px",i.style.border="1px solid green",i.style.backgroundColor="rgba(0, 255, 0, 0.05)",i.style.pointerEvents="none",t.appendChild(i)}}}}class pv{#e;constructor(){this.#e=new Map}add(e,n){document.addEventListener(e,n);let i=this.#e.get(e);i||(i=[],this.#e.set(e,i)),i.push(n)}removeAll(){for(const[e,n]of this.#e)for(const i of n)document.removeEventListener(e,i);this.#e.clear()}}class Vd{#e;constructor(){this.#e=new Map}add(e,n){let i=this.#e.get(e);i||(i=new Set,this.#e.set(e,i)),i.add(n)}remove(e,n){this.#e.get(e)?.delete(n)}emit(e,n){this.#e.get(e)?.forEach(i=>i(n))}}function sa(t,e,n=!0){let i,r=o=>{};return function(...a){return new Promise((l,c)=>{const u=()=>{clearTimeout(i),r=f=>{},l(t(...a))};n&&r("debounced"),clearTimeout(i),r=c,i=window.setTimeout(u,typeof e=="function"?e():e)})}}const Tt=1,Sn=2,Ul=4;class _l{stats={count:0,first:null};#e=!1;#t=!1;#n=[];paramRuntimeProvider=null;get behavior(){return 0}get label(){return`(${this.constructor.name})`}constructor(e){this.paramRuntimeProvider=e,this.children=[],this.parent=void 0,this.completed=!1}get disposed(){return this.#t}reset(){this.completed=!1;for(const e of this.children)e.reset();this.stats.count=0,this.stats.first=null}initialize(){}initializeOnce(){this.#e||(this.initialize(),this.#e=!0)}#i(){this._propagate=Function("children","stats",rs(this.children.length).map(e=>`const child${e} = children[${e}];`).join(`
|
|
273
281
|
`)+`return function propagate(datum) {
|
|
274
282
|
if (stats.count === 0) {
|
|
275
283
|
stats.first = structuredClone(datum);
|
|
276
284
|
}
|
|
277
285
|
stats.count++;
|
|
278
|
-
${
|
|
286
|
+
${rs(this.children.length).map(e=>`child${e}.handle(datum);`).join(`
|
|
279
287
|
`)}
|
|
280
288
|
};`)(this.children,this.stats)}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),this.#i(),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){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,this.parent.#i(),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,this.#i();else throw new Error("Trying to remove an unknown child node!")}excise(){if(this.isRoot())throw new Error("Cannot excise root node!");if(this.isTerminal())this.parent.removeChild(this);else if(this.children.length==1){const e=this.children[0];e.setParent(this.parent),this.parent.children[this.parent.children.indexOf(this)]=e,this.parent.#i(),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(i=>i.subtreeToString(e+1)).join("");return`${" ".repeat(e*2)}* ${this.label}${"identifier"in this&&this.identifier?": "+this.identifier:""}
|
|
281
|
-
${n}`}handle(e){this._propagate(e)}complete(){this.completed=!0;for(const e of this.children)e.complete()}registerDisposer(e){this.#t?e():this.#n.push(e)}dispose(){if(!this.#t){this.#t=!0;for(const e of this.#n)e();this.#n.length=0}}disposeSubtree(){const e=()=>{};e.afterChildren=n=>{n.dispose()},this.visit(e)}beginBatch(e){for(const n of this.children)n.beginBatch(e)}get paramRuntime(){if(this.paramRuntimeProvider&&this.paramRuntimeProvider.paramRuntime)return this.paramRuntimeProvider.paramRuntime;if(!this.parent)throw new Error("Cannot find paramRuntime!");return this.parent.paramRuntime}repropagate(){if(this.parent)this.parent.repropagate();else throw new Error("Cannot repropagate data, no FlowNode with stored data found!")}_propagate(e){}}function
|
|
289
|
+
${n}`}handle(e){this._propagate(e)}complete(){this.completed=!0;for(const e of this.children)e.complete()}registerDisposer(e){this.#t?e():this.#n.push(e)}dispose(){if(!this.#t){this.#t=!0;for(const e of this.#n)e();this.#n.length=0}}disposeSubtree(){const e=()=>{};e.afterChildren=n=>{n.dispose()},this.visit(e)}beginBatch(e){for(const n of this.children)n.beginBatch(e)}get paramRuntime(){if(this.paramRuntimeProvider&&this.paramRuntimeProvider.paramRuntime)return this.paramRuntimeProvider.paramRuntime;if(!this.parent)throw new Error("Cannot find paramRuntime!");return this.parent.paramRuntime}repropagate(){if(this.parent)this.parent.repropagate();else throw new Error("Cannot repropagate data, no FlowNode with stored data found!")}_propagate(e){}}function Jd(t){return t.type=="file"}function mv(t){return t.type=="facet"}class Qe extends _l{#e;constructor(e,n){super(n),this.#e=e.type}get label(){return this.#e}}const pt="_uniqueId",qd=1e4,Kd=[null];class zl extends Qe{get behavior(){return Sn}constructor(e){super(e),this.params=e,this.as=e.as??pt,this._blocks=[],this._usedBlocks=0,this._id=-1}initialize(){}reset(){super.reset(),this._usedBlocks=0,this._id=-1}handle(e){e[this.as]=this._nextId(),this._propagate(e)}_nextId(){return++this._id%qd==0&&(this._id=this._getBlock()*qd),this._id}_getBlock(){return this._usedBlocks<this._blocks.length?this._blocks[this._usedBlocks++]:this._reserveBlock()}_reserveBlock(){const e=Kd.length;return Kd[e]=this,this._blocks.push(e),this._usedBlocks++,e}}function ne(t,e=t){if(/^[A-Za-z0-9_]+$/.test(t)){const n=function(r){t in r||wv(r,t)},i=new Function("validator",`
|
|
282
290
|
let validated = !validator;
|
|
283
291
|
return function accessField(datum) {
|
|
284
292
|
if (!validated) {
|
|
@@ -286,57 +294,57 @@ ${n}`}handle(e){this._propagate(e)}complete(){this.completed=!0;for(const e of t
|
|
|
286
294
|
validated = true;
|
|
287
295
|
}
|
|
288
296
|
return datum[${JSON.stringify(t)}];
|
|
289
|
-
}`)(n);return At(i,[t],e)}else return
|
|
297
|
+
}`)(n);return At(i,[t],e)}else return Fo(t)}function wv(t,e){throw new Error(`Invalid field "${e}". Available fields or properties: ${Object.keys(t).join(", ")}`)}function jd(t,e,n){if(!t)return;function i(s){const o=s;return o.fields??=[],o.constant=o.fields.length===0,o.channelDef=e,o.channel=t,o.sourceKey=Cv(e),o.scaleChannel=((mt(e)&&e.resolutionChannel)??(ca(t)&&t))||void 0,o.scaleChannel!==void 0&&(o.domainKeyBase=Xd({scaleChannel:o.scaleChannel,source:Gl(e)}).domainKeyBase),"param"in e?(o.predicate=f0(!1),o.predicate.param=e.param,o.predicate.empty=e.empty??!0):(o.predicate=f0(!0),o.predicate.empty=!1),o.equals=a=>a?o===a||o.sourceKey!==void 0&&o.sourceKey===a.sourceKey:!1,o.asNumberAccessor=()=>o,o}function r(s){if(Ee(s)){const o=i(n.createExpression(s.expr));if(o.fields.length>0)throw new Error("Expression in DatumDef/ValueDef cannot access data fields: "+s.expr);return o}else{const o=s;return i(()=>o)}}if(nn(e))try{return i(ne(e.field))}catch(s){throw new Error(`Invalid field definition: ${s.message}`)}else{if(ji(e))return i(n.createExpression(e.expr));if(Ki(e))return r(e.datum);if(ht(e))return r(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 yv(t,e,n){const i=[];if(vv(e)||Hl(e)){const r=Array.isArray(e.condition)?e.condition:[e.condition];for(const s of r)i.push(jd(t,s,n))}if(i.push(jd(t,e,n)),i.filter(r=>!r.constant).length>1)throw new Error("Only one accessor can be non-constant. Channel: "+t);return i}function Wd(t){return t.scaleChannel!==void 0}function Gl(t){if(nn(t))return{kind:"field",value:t.field};if(ji(t))return{kind:"expr",value:t.expr};if(Ki(t))return{kind:"datum",value:t.datum};if(ht(t))return{kind:"value",value:t.value};throw new Error("Cannot derive a domain key from channel definition: "+JSON.stringify(t))}function Cv(t){const e=Gl(t);return e.kind==="datum"||e.kind==="value"?"constant|"+e0(e.value):e.kind+"|"+$d(e)}function Xd({scaleChannel:t,source:e,type:n}){if(!t)throw new Error("Cannot build a domain key without a scale channel.");const i=t+"|"+e.kind+"|"+$d(e),r=n?n+"|"+i:void 0;return{domainKeyBase:i,domainKey:r}}function Zd(t,e){const{domainKey:n,domainKeyBase:i}=Xd({scaleChannel:t.scaleChannel,source:Gl(t.channelDef),type:e});if(!n)throw new Error("Cannot finalize a domain key without a resolved type.");return t.domainKeyBase=i,t.domainKey=n,n}function $d(t){switch(t.kind){case"field":case"expr":return t.value;case"datum":case"value":return e0(t.value);default:throw new Error("Unknown domain key source.")}}function e0(t){return Ee(t)?"expr:"+t.expr:t===void 0?"undefined":JSON.stringify(t)}function bv(t,e){const n={},i=r=>t.getScaleResolution(r)?.getScale();for(const[r,s]of Object.entries(e)){if(!s)continue;const o=r;if(Ev(o))continue;const a=s;n[o]=Iv(yv(o,a,t.paramRuntime),i)}return n}function Ev(t){return t==="key"||t==="search"}function Iv(t,e){if(t.length===1)return t0(t[0],e);const n=t.map(s=>s.predicate),i=t.map(s=>t0(s,e));return Object.assign(s=>{for(let o=0;o<i.length;o++)if(n[o](s))return i[o](s)},{constant:!1,accessors:i.map(s=>s.accessors[0]),dataAccessor:i.map(s=>s.dataAccessor).find(s=>s),scale:i.map(s=>s.scale).find(s=>s),channelDef:t.at(-1).channelDef})}function t0(t,e){const{channel:n,scaleChannel:i,channelDef:r}=t,s=t.scaleChannel?e(i):void 0;if(i&&!s)throw new Error(`Missing scale! "${n}": ${JSON.stringify(r)}`);return Object.assign(s?o=>s(t(o)):o=>t(o),{scale:s,constant:t.constant,accessors:[t],dataAccessor:t.constant?void 0:t,channelDef:r})}function ht(t){return t&&"value"in t}function nn(t){return t&&"field"in t}function Ki(t){return t&&"datum"in t}function mt(t){return nn(t)||Ki(t)||ji(t)||i0(t)}function n0(t){if(Hl(t)){const e=t.condition;if(!Array.isArray(e)&&mt(e))return e}else if(mt(t))return t}function xv(t,e){const n=t.mark.encoding[e];if(!Array.isArray(n)&&mt(n))return n;throw new Error("Not a channel def with scale!")}function i0(t){return t&&"chrom"in t}function ji(t){return t&&"expr"in t}function vv(t){return(nn(t)||Ki(t))&&"condition"in t}function Hl(t){return ht(t)&&"condition"in t}const li=["x","y"],Bv=["x2","y2"],Sv=[...li,...Bv];function oa(t){return li.includes(t)}function bs(t){return Sv.includes(t)}const r0={x:"x2",y:"y2"},s0=Object.fromEntries(Object.entries(r0).map(t=>[t[1],t[0]]));function Yl(t){return t in s0}function Vl(t){const e=r0[t];if(e)return e;throw new Error(`${t} has no secondary channel!`)}function rn(t){return s0[t]??t}function Dn(t){return["color","fill","stroke"].includes(rn(t))}function aa(t){return["shape"].includes(t)}function ca(t){return["x","y","x2","y2","color","fill","stroke","opacity","fillOpacity","strokeOpacity","strokeWidth","size","shape","angle","dx","dy","sample"].includes(t)}function Dv(t){if(t==="shape")return["circle","square","cross","diamond","triangle-up","triangle-right","triangle-down","triangle-left","tick-up","tick-right","tick-down","tick-left"]}function o0(t){if(!aa(t))throw new Error("Not a discrete channel: "+t);const e=new Map(Dv(t).map((n,i)=>[n,i]));return n=>{const i=e.get(n);if(i!==void 0)return i;throw new Error(`Invalid value for "${t}" channel: ${n}`)}}function Jl(t){return{type:"single",datum:t,uniqueId:t?.[pt]}}function ql(t){return t??=[],{type:"multi",data:new Map(t.map(e=>[e[pt],e]))}}function a0(t){return{type:"interval",intervals:Object.fromEntries(t.map(e=>[e,null]))}}function Qv(t,{add:e,remove:n,toggle:i}){const r=t.data;for(const s of e??[])r.set(s[pt],s);for(const s of n??[])r.delete(s[pt]);for(const s of i??[]){const o=s[pt];r.has(o)?r.delete(o):r.set(o,s)}return{type:"multi",data:r}}function kv(t,e){const n=!!(t.empty??!0),i=Pt(t.param),r=t.fields??{};if(c0(e))return`${i}.uniqueId == null ? ${n} : ${i}.uniqueId === datum[${JSON.stringify(pt)}]`;if(jl(e))return`${i}.data.size == 0 ? ${n} : mapHasKey(${i}.data, datum[${JSON.stringify(pt)}])`;if(Kl(e)){const s=Object.keys(e.intervals),o=Object.keys(r).filter(oa);if(o.length===0)throw new Error("Filtering using interval selections requires at least one primary positional channel in the config! "+JSON.stringify(t));if(o.some(c=>!s.includes(c)))throw new Error(`Selection channels (${s.join(", ")}) do not match the fields: ${JSON.stringify(t)}!`);const a=c=>`datum[${JSON.stringify(c)}]`;return s.map(c=>{const u=Vl(c),f=r[c],h=r[u]??r[c],A=`${i}.intervals.${c}[0] <= ${a(h)}`,d=`${a(f)} <= ${i}.intervals.${c}[1]`;return`(${i}.intervals.${c} ? (${A} && ${d}) : ${n})`}).join(" && ")}else throw new Error(`Unrecognized selection type : ${JSON.stringify(e)}`)}function Kl(t){return t.type==="interval"}function c0(t){return t.type==="single"}function jl(t){return t.type==="multi"}function la(t){const e=typeof t=="string"?{type:t}:{...t};return e.on=e.on?Xl(e.on):ua(e)?{type:"click"}:void 0,e.clear=e.clear===!1?void 0:e.clear===!0||e.clear==null?{type:"dblclick"}:Xl(e.clear),ua(e)&&e.on.type==="click"&&(e.toggle=!0),e}function ua(t){return t&&t.type=="point"}function l0(t){return t&&t.type=="interval"}function Wl(t){return Object.values(t.intervals).some(e=>e&&e.length===2)}function Rv(t,e){return Object.entries(t.intervals).every(([n,i])=>(n=="x"||n=="y")&&i&&i[0]<=e[n]&&i[1]>=e[n])}function Xl(t){if(typeof t=="string"){const e=t.match(/^([a-zA-Z]+)(?:\[(.+)\])?$/);if(!e)throw new Error(`Invalid event type string: ${t}`);const[,n,i]=e,r={type:n};return i&&(r.filter=i),r}else return t}function Ee(t){return typeof t=="object"&&t!=null&&"expr"in t&&le(t.expr)}function ve(t){if(Ee(t))throw new Error("ExprRef "+JSON.stringify(t)+" not allowed here. Expected a scalar value.");return t}function u0(t){return("expr"in t||"bind"in t)&&!("select"in t)}function Zl(t){return!("expr"in t||"bind"in t)&&"select"in t}function Pt(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 $l(t,e,n){if("select"in t){const i=la(t.select);if(ua(i))return i.toggle?ql():Jl(null);if(l0(i)){if(!i.encodings)throw new Error('Interval selection "'+t.name+'" must have encodings defined!');return a0(i.encodings)}throw new Error('Unknown selection config for parameter "'+t.name+'".')}if("expr"in t){const i=e?.createExpression(t.expr);if(!i)throw new Error('Cannot evaluate expression for parameter "'+t.name+'".');return i(null)}return"value"in t?t.value:null}function Es(t,e,n,i,r={}){const s={...e},o=new Set;let a=!1,l=!1;const c=r.batchMode??"microtask";i?.(()=>{l=!0,o.clear(),a=!1});const f=()=>{if(l)return;if(!n||o.size===0){a=!1;return}const A=new Set(o);o.clear(),a=!1,n(A)},h=A=>{l||(o.add(A),a||(a=!0,queueMicrotask(()=>{l||(c=="whenPropagated"&&t.whenPropagated?t.whenPropagated().then(f).catch(()=>{f()}):f())})))};for(const[A,d]of Object.entries(e))if(Ee(d))if(n){const g=()=>h(A),m=t.watchExpression?t.watchExpression(d.expr,g,{scopeOwned:!i,registerDisposer:i}):t.createExpression(d.expr);if(!t.watchExpression){const p=m.subscribe(g);i?.(p)}Object.defineProperty(s,A,{enumerable:!0,get(){return m()}})}else{const g=t.createExpression(d.expr);Object.defineProperty(s,A,{enumerable:!0,get(){return g()}})}else s[A]=d;return s}function f0(t){return Object.assign(()=>t,{subscribe:()=>()=>{},invalidate:()=>{},identifier:()=>"constant",fields:[],globals:[],code:JSON.stringify(t)})}function Fv(t){const e=Math.floor(Math.random()*16777215).toString(16),n=[];for(const i of t.paramConfigs.values()){if(!u0(i))continue;const r=i.bind;if(!r||!("input"in r))continue;const s=i.name,o=f=>{t.setValue(s,f)},a=t.getValue(s),l=r.name??s,c=r.debounce?sa(o,r.debounce,!1):o,u=`${e}-param-${s}`;if(r.input=="range")n.push(ae`<label for=${u}>${l}</label>
|
|
290
298
|
<div>
|
|
291
299
|
<input
|
|
292
|
-
id=${
|
|
300
|
+
id=${u}
|
|
293
301
|
type="range"
|
|
294
302
|
min=${r.min??0}
|
|
295
303
|
max=${r.max??100}
|
|
296
|
-
step=${r.step
|
|
304
|
+
step=${r.step??ri(r.min,r.max,100)}
|
|
297
305
|
.value=${a}
|
|
298
|
-
@input=${
|
|
306
|
+
@input=${f=>{c(f.target.valueAsNumber),f.target.nextElementSibling.textContent=f.target.valueAsNumber}}
|
|
299
307
|
/><span>${a}</span>
|
|
300
|
-
</div>`);else if(r.input=="checkbox")n.push(
|
|
308
|
+
</div>`);else if(r.input=="checkbox")n.push(ae`<label for=${u}>${l}</label>
|
|
301
309
|
<input
|
|
302
|
-
id=${
|
|
310
|
+
id=${u}
|
|
303
311
|
type="checkbox"
|
|
304
312
|
?checked=${a}
|
|
305
|
-
@input=${
|
|
306
|
-
/>`);else if(r.input=="radio")n.push(
|
|
313
|
+
@input=${f=>c(f.target.checked)}
|
|
314
|
+
/>`);else if(r.input=="radio")n.push(ae`<span class="label">${l}</span>
|
|
307
315
|
<div class="radio-group">
|
|
308
|
-
${r.options.map((
|
|
316
|
+
${r.options.map((f,h)=>ae`<label>
|
|
309
317
|
<input
|
|
310
318
|
type="radio"
|
|
311
319
|
name=${s}
|
|
312
|
-
value=${
|
|
313
|
-
.checked=${a==
|
|
320
|
+
value=${f}
|
|
321
|
+
.checked=${a==f}
|
|
314
322
|
@input=${A=>c(A.target.value)}
|
|
315
|
-
/>${r.labels?.[h]??
|
|
323
|
+
/>${r.labels?.[h]??f}</label
|
|
316
324
|
>`)}
|
|
317
|
-
</div>`);else if(r.input=="select")n.push(
|
|
325
|
+
</div>`);else if(r.input=="select")n.push(ae`<label for=${u}>${l}</label>
|
|
318
326
|
<select
|
|
319
|
-
id=${
|
|
320
|
-
@input=${
|
|
327
|
+
id=${u}
|
|
328
|
+
@input=${f=>c(f.target.value)}
|
|
321
329
|
>
|
|
322
|
-
${r.options.map((
|
|
323
|
-
value=${
|
|
324
|
-
?selected=${a==
|
|
330
|
+
${r.options.map((f,h)=>ae`<option
|
|
331
|
+
value=${f}
|
|
332
|
+
?selected=${a==f}
|
|
325
333
|
>
|
|
326
|
-
${r.labels?.[h]??
|
|
334
|
+
${r.labels?.[h]??f}
|
|
327
335
|
</option>`)}
|
|
328
|
-
</select> `);else if(r.input=="text"||r.input=="number"||r.input=="color")n.push(
|
|
336
|
+
</select> `);else if(r.input=="text"||r.input=="number"||r.input=="color")n.push(ae`<label for=${u}>${l}</label>
|
|
329
337
|
<div>
|
|
330
338
|
<input
|
|
331
|
-
id=${
|
|
339
|
+
id=${u}
|
|
332
340
|
type=${r.input}
|
|
333
341
|
placeholder=${r.placeholder??""}
|
|
334
342
|
autocomplete=${r.autocomplete??"off"}
|
|
335
343
|
.value=${a}
|
|
336
|
-
@focus=${
|
|
337
|
-
@input=${
|
|
344
|
+
@focus=${f=>f.target.select()}
|
|
345
|
+
@input=${f=>{c(r.input=="number"?f.target.valueAsNumber:f.target.value)}}
|
|
338
346
|
/>
|
|
339
|
-
</div>`);else throw new Error("Unsupported input type: "+r.input);r.description&&n.push(ce`<div class="description">${r.description}</div>`)}return n}class eB{#e;#t;#n;constructor(e,n){this.#e=e,this.#t=n,this.#n=void 0}initialize(e){const n=[];e.visit(r=>{const s=r.paramRuntime;n.push(...$x(s))});const i=this.#t.inputBindingContainer;if(!(!i||i=="none"||!n.length)){if(this.#n=document.createElement("div"),this.#n.className="gs-input-bindings",i=="default")this.#e.appendChild(this.#n);else if(i instanceof HTMLElement)i.appendChild(this.#n);else throw new Error("Invalid inputBindingContainer");n.length&&Wr(ce`<div class="gs-input-binding">${n}</div>`,this.#n)}}remove(){this.#n?.remove()}}const Yl=5120,ws=5121,Vl=5122,Jl=5123,ql=5124,Kl=5125,jl=5126,tB=32819,nB=32820,iB=33635,rB=5131,sB=33640,oB=35899,aB=35902,cB=36269,lB=34042,n0={};{const t=n0;t[Yl]=Int8Array,t[ws]=Uint8Array,t[Vl]=Int16Array,t[Jl]=Uint16Array,t[ql]=Int32Array,t[Kl]=Uint32Array,t[jl]=Float32Array,t[tB]=Uint16Array,t[nB]=Uint16Array,t[iB]=Uint16Array,t[rB]=Uint16Array,t[sB]=Uint32Array,t[oB]=Uint32Array,t[aB]=Uint32Array,t[cB]=Uint32Array,t[lB]=Uint32Array}function Wl(t){if(t instanceof Int8Array)return Yl;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)return ws;if(t instanceof Int16Array)return Vl;if(t instanceof Uint16Array)return Jl;if(t instanceof Int32Array)return ql;if(t instanceof Uint32Array)return Kl;if(t instanceof Float32Array)return jl;throw new Error("unsupported typed array type")}function fB(t){if(t===Int8Array)return Yl;if(t===Uint8Array||t===Uint8ClampedArray)return ws;if(t===Int16Array)return Vl;if(t===Uint16Array)return Jl;if(t===Int32Array)return ql;if(t===Uint32Array)return Kl;if(t===Float32Array)return jl;throw new Error("unsupported typed array type")}function uB(t){const e=n0[t];if(!e)throw new Error("unknown gl type");return e}const aa=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 AB(...t){console.error(...t)}function i0(...t){console.warn(...t)}function hB(t,e){return typeof WebGLBuffer<"u"&&e instanceof WebGLBuffer}function r0(t,e){return typeof WebGLRenderbuffer<"u"&&e instanceof WebGLRenderbuffer}function ca(t,e){return typeof WebGLTexture<"u"&&e instanceof WebGLTexture}function dB(t,e){return typeof WebGLSampler<"u"&&e instanceof WebGLSampler}const s0=35044,Pt=34962,gB=34963,pB=34660,mB=5120,wB=5121,yB=5122,CB=5123,EB=5124,IB=5125,bB=5126,o0={attribPrefix:""};function a0(t,e,n,i,r){t.bindBuffer(e,n),t.bufferData(e,i,r||s0)}function c0(t,e,n,i){if(hB(t,e))return e;n=n||Pt;const r=t.createBuffer();return a0(t,n,r,e,i),r}function l0(t){return t==="indices"}function xB(t){return t instanceof Int8Array||t instanceof Uint8Array}function BB(t){return t===Int8Array||t===Uint8Array}function vB(t){return t.length?t:t.data}const SB=/coord|texture/i,QB=/color|colour/i;function f0(t,e){let n;if(SB.test(t)?n=2:QB.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 DB(t,e){return t.numComponents||t.size||f0(e,vB(t).length)}function Xl(t,e){if(aa(t))return t;if(aa(t.data))return t.data;Array.isArray(t)&&(t={data:t});let n=t.type;return n||(l0(e)?n=Uint16Array:n=Float32Array),new n(t.data)}function kB(t,e){const n={};return Object.keys(e).forEach(function(i){if(!l0(i)){const r=e[i],s=r.attrib||r.name||r.attribName||o0.attribPrefix+i;if(r.value){if(!Array.isArray(r.value)&&!aa(r.value))throw new Error("array.value is not array or typedarray");n[s]={value:r.value}}else{let o,a,l,c;if(r.buffer&&r.buffer instanceof WebGLBuffer)o=r.buffer,c=r.numComponents||r.size,a=r.type,l=r.normalize;else if(typeof r=="number"||typeof r.data=="number"){const f=r.data||r,u=r.type||Float32Array,h=f*u.BYTES_PER_ELEMENT;a=fB(u),l=r.normalize!==void 0?r.normalize:BB(u),c=r.numComponents||r.size||f0(i,f),o=t.createBuffer(),t.bindBuffer(Pt,o),t.bufferData(Pt,h,r.drawType||s0)}else{const f=Xl(r,i);o=c0(t,f,void 0,r.drawType),a=Wl(f),l=r.normalize!==void 0?r.normalize:xB(f),c=DB(r,i)}n[s]={buffer:o,numComponents:c,type:a,normalize:l,stride:r.stride||0,offset:r.offset||0,divisor:r.divisor===void 0?void 0:r.divisor,drawType:r.drawType}}}}),t.bindBuffer(Pt,null),n}function FB(t,e,n,i){n=Xl(n),i!==void 0?(t.bindBuffer(Pt,e.buffer),t.bufferSubData(Pt,i,n)):a0(t,Pt,e.buffer,n,e.drawType)}function RB(t,e){return e===mB||e===wB?1:e===yB||e===CB?2:e===EB||e===IB||e===bB?4:0}const Zl=["position","positions","a_position"];function NB(t,e){let n,i;for(i=0;i<Zl.length&&(n=Zl[i],!(n in e||(n=o0.attribPrefix+n,n in e)));++i);i===Zl.length&&(n=Object.keys(e)[0]);const r=e[n];if(!r.buffer)return 1;t.bindBuffer(Pt,r.buffer);const s=t.getBufferParameter(Pt,pB);t.bindBuffer(Pt,null);const o=RB(t,r.type),a=s/o,l=r.numComponents||r.size,c=a/l;if(c%1!==0)throw new Error(`numComponents ${l} not correct for length ${length}`);return c}function MB(t,e,n){const i=kB(t,e),r=Object.assign({},n||{});r.attribs=Object.assign({},n?n.attribs:{},i);const s=e.indices;if(s){const o=Xl(s,"indices");r.indices=c0(t,o,gB),r.numElements=o.length,r.elementType=Wl(o)}else r.numElements||(r.numElements=NB(t,r.attribs));return r}function Ji(t){return!!t.texStorage2D}const $l=(function(){const t={},e={};function n(i){const r=i.constructor.name;if(!t[r]){for(const s in i)if(typeof i[s]=="number"){const o=e[i[s]];e[i[s]]=o?`${o} | ${s}`:s}t[r]=!0}}return function(r,s){return n(r),e[s]||(typeof s=="number"?`0x${s.toString(16)}`:s)}})(),xn={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},qi=aa,u0=(function(){let t;return function(){return t=t||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),t}})(),A0=6406,Lt=6407,de=6408,h0=6409,d0=6410,ys=6402,g0=34041,la=33071,TB=9728,PB=9729,nn=3553,rn=34067,Bn=32879,vn=35866,fa=34069,LB=34070,OB=34071,UB=34072,_B=34073,GB=34074,ef=10241,tf=10240,ua=10242,Aa=10243,p0=32882,zB=33082,HB=33083,YB=33084,VB=33085,nf=3317,m0=3314,w0=32878,y0=3316,C0=3315,E0=32877,JB=37443,qB=37441,KB=37440,jB=33321,WB=36756,XB=33325,ZB=33326,$B=33330,ev=33329,tv=33338,nv=33337,iv=33340,rv=33339,sv=33323,ov=36757,av=33327,cv=33328,lv=33336,fv=33335,uv=33332,Av=33331,hv=33334,dv=33333,gv=32849,pv=35905,mv=36194,wv=36758,yv=35898,Cv=35901,Ev=34843,Iv=34837,bv=36221,xv=36239,Bv=36215,vv=36233,Sv=36209,Qv=36227,Dv=32856,kv=35907,Fv=36759,Rv=32855,Nv=32854,Mv=32857,Tv=34842,Pv=34836,Lv=36220,Ov=36238,Uv=36975,_v=36214,Gv=36232,zv=36226,Hv=36208,Yv=33189,Vv=33190,Jv=36012,qv=36013,Kv=35056,Sn=5120,ge=5121,ha=5122,Ki=5123,da=5124,ri=5125,Je=5126,I0=32819,b0=32820,x0=33635,Bt=5131,Cs=36193,rf=33640,jv=35899,Wv=35902,Xv=36269,Zv=34042,ga=33319,ji=33320,pa=6403,Wi=36244,Xi=36248,si=36249;let sf;function ma(t){if(!sf){const e={};e[A0]={textureFormat:A0,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[ge,Bt,Cs,Je]},e[h0]={textureFormat:h0,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[ge,Bt,Cs,Je]},e[d0]={textureFormat:d0,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[ge,Bt,Cs,Je]},e[Lt]={textureFormat:Lt,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[ge,Bt,Cs,Je,x0]},e[de]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[ge,Bt,Cs,Je,I0,b0]},e[ys]={textureFormat:ys,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[ri,Ki]},e[jB]={textureFormat:pa,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[ge]},e[WB]={textureFormat:pa,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[Sn]},e[XB]={textureFormat:pa,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Je,Bt]},e[ZB]={textureFormat:pa,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Je]},e[$B]={textureFormat:Wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[ge]},e[ev]={textureFormat:Wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[Sn]},e[uv]={textureFormat:Wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Ki]},e[Av]={textureFormat:Wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[ha]},e[hv]={textureFormat:Wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ri]},e[dv]={textureFormat:Wi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[da]},e[sv]={textureFormat:ga,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[ge]},e[ov]={textureFormat:ga,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[Sn]},e[av]={textureFormat:ga,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Je,Bt]},e[cv]={textureFormat:ga,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Je]},e[lv]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[ge]},e[fv]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Sn]},e[tv]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ki]},e[nv]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ha]},e[iv]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[ri]},e[rv]={textureFormat:ji,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[da]},e[gv]={textureFormat:Lt,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[ge]},e[pv]={textureFormat:Lt,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[ge]},e[mv]={textureFormat:Lt,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[ge,x0]},e[wv]={textureFormat:Lt,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[Sn]},e[yv]={textureFormat:Lt,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Je,Bt,jv]},e[Cv]={textureFormat:Lt,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Je,Bt,Wv]},e[Ev]={textureFormat:Lt,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Je,Bt]},e[Iv]={textureFormat:Lt,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Je]},e[bv]={textureFormat:Xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[ge]},e[xv]={textureFormat:Xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[Sn]},e[Bv]={textureFormat:Xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Ki]},e[vv]={textureFormat:Xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[ha]},e[Sv]={textureFormat:Xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[ri]},e[Qv]={textureFormat:Xi,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[da]},e[Dv]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[ge]},e[kv]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[ge]},e[Fv]={textureFormat:de,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[Sn]},e[Rv]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[ge,b0,rf]},e[Nv]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[ge,I0]},e[Mv]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[rf]},e[Tv]={textureFormat:de,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Je,Bt]},e[Pv]={textureFormat:de,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Je]},e[Lv]={textureFormat:si,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ge]},e[Ov]={textureFormat:si,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Sn]},e[Uv]={textureFormat:si,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[rf]},e[_v]={textureFormat:si,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Ki]},e[Gv]={textureFormat:si,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[ha]},e[zv]={textureFormat:si,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[da]},e[Hv]={textureFormat:si,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[ri]},e[Yv]={textureFormat:ys,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Ki,ri]},e[Vv]={textureFormat:ys,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ri]},e[Jv]={textureFormat:ys,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Je]},e[Kv]={textureFormat:g0,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Zv]},e[qv]={textureFormat:g0,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Xv]},Object.keys(e).forEach(function(n){const i=e[n];i.bytesPerElementMap={},i.bytesPerElement.forEach(function(r,s){const o=i.type[s];i.bytesPerElementMap[o]=r})}),sf=e}return sf[t]}function $v(t,e){const n=ma(t);if(!n)throw"unknown internal format";const i=n.bytesPerElementMap[e];if(i===void 0)throw"unknown internal format";return i}function Zi(t){const e=ma(t);if(!e)throw"unknown internal format";return{format:e.textureFormat,type:e.type[0]}}function B0(t){return(t&t-1)===0}function e3(t,e,n,i){if(!Ji(t))return B0(e)&&B0(n);const r=ma(i);if(!r)throw"unknown internal format";return r.colorRenderable&&r.textureFilterable}function t3(t){const e=ma(t);if(!e)throw"unknown internal format";return e.textureFilterable}function v0(t,e,n){return qi(e)?Wl(e):n||ge}function wa(t,e,n,i,r){if(r%1!==0)throw"can't guess dimensions";if(!n&&!i){const s=Math.sqrt(r/(e===rn?6:1));s%1===0?(n=s,i=s):(n=r,i=1)}else if(i){if(!n&&(n=r/i,n%1))throw"can't guess dimensions"}else if(i=r/n,i%1)throw"can't guess dimensions";return{width:n,height:i}}function $i(t,e){e.colorspaceConversion!==void 0&&t.pixelStorei(JB,e.colorspaceConversion),e.premultiplyAlpha!==void 0&&t.pixelStorei(qB,e.premultiplyAlpha),e.flipY!==void 0&&t.pixelStorei(KB,e.flipY)}function S0(t){t.pixelStorei(nf,4),Ji(t)&&(t.pixelStorei(m0,0),t.pixelStorei(w0,0),t.pixelStorei(y0,0),t.pixelStorei(C0,0),t.pixelStorei(E0,0))}function n3(t,e,n,i){i.minMag&&(n.call(t,e,ef,i.minMag),n.call(t,e,tf,i.minMag)),i.min&&n.call(t,e,ef,i.min),i.mag&&n.call(t,e,tf,i.mag),i.wrap&&(n.call(t,e,ua,i.wrap),n.call(t,e,Aa,i.wrap),(e===Bn||dB(t,e))&&n.call(t,e,p0,i.wrap)),i.wrapR&&n.call(t,e,p0,i.wrapR),i.wrapS&&n.call(t,e,ua,i.wrapS),i.wrapT&&n.call(t,e,Aa,i.wrapT),i.minLod&&n.call(t,e,zB,i.minLod),i.maxLod&&n.call(t,e,HB,i.maxLod),i.baseLevel&&n.call(t,e,YB,i.baseLevel),i.maxLevel&&n.call(t,e,VB,i.maxLevel)}function Q0(t,e,n){const i=n.target||nn;t.bindTexture(i,e),n3(t,i,t.texParameteri,n)}function i3(t){return t=t||xn.textureColor,qi(t)?t:new Uint8Array([t[0]*255,t[1]*255,t[2]*255,t[3]*255])}function of(t,e,n,i,r,s){n=n||xn.textureOptions,s=s||de;const o=n.target||nn;if(i=i||n.width,r=r||n.height,t.bindTexture(o,e),e3(t,i,r,s))t.generateMipmap(o);else{const a=t3(s)?PB:TB;t.texParameteri(o,ef,a),t.texParameteri(o,tf,a),t.texParameteri(o,ua,la),t.texParameteri(o,Aa,la)}}function Es(t){return t.auto===!0||t.auto===void 0&&t.level===void 0}function af(t,e){return e=e||{},e.cubeFaceOrder||[fa,LB,OB,UB,_B,GB]}function cf(t,e){const i=af(t,e).map(function(r,s){return{face:r,ndx:s}});return i.sort(function(r,s){return r.face-s.face}),i}function D0(t,e,n,i){i=i||xn.textureOptions;const r=i.target||nn,s=i.level||0;let o=n.width,a=n.height;const l=i.internalFormat||i.format||de,c=Zi(l),f=i.format||c.format,u=i.type||c.type;if($i(t,i),t.bindTexture(r,e),r===rn){const h=n.width,A=n.height;let d,g;if(h/6===A)d=A,g=[0,0,1,0,2,0,3,0,4,0,5,0];else if(A/6===h)d=h,g=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===A/2)d=h/3,g=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===A/3)d=h/2,g=[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 m=u0();m?(m.canvas.width=d,m.canvas.height=d,o=d,a=d,cf(t,i).forEach(function(p){const w=g[p.ndx*2+0]*d,C=g[p.ndx*2+1]*d;m.drawImage(n,w,C,d,d,0,0,d,d),t.texImage2D(p.face,s,l,f,u,m.canvas)}),m.canvas.width=1,m.canvas.height=1):typeof createImageBitmap<"u"&&(o=d,a=d,cf(t,i).forEach(function(p){const w=g[p.ndx*2+0]*d,C=g[p.ndx*2+1]*d;t.texImage2D(p.face,s,l,d,d,0,f,u,null),createImageBitmap(n,w,C,d,d,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(y){$i(t,i),t.bindTexture(r,e),t.texImage2D(p.face,s,l,f,u,y),Es(i)&&of(t,e,i,o,a,l)})}))}else if(r===Bn||r===vn){const h=Math.min(n.width,n.height),A=Math.max(n.width,n.height),d=A/h;if(d%1!==0)throw"can not compute 3D dimensions of element";const g=n.width===A?1:0,m=n.height===A?1:0;t.pixelStorei(nf,1),t.pixelStorei(m0,n.width),t.pixelStorei(w0,0),t.pixelStorei(E0,0),t.texImage3D(r,s,l,h,h,h,0,f,u,null);for(let p=0;p<d;++p){const w=p*h*g,C=p*h*m;t.pixelStorei(y0,w),t.pixelStorei(C0,C),t.texSubImage3D(r,s,0,0,p,h,h,1,f,u,n)}S0(t)}else t.texImage2D(r,s,l,f,u,n);Es(i)&&of(t,e,i,o,a,l),Q0(t,e,i)}function Is(){}function r3(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 s3(t,e){return e===void 0&&!r3(t)?"anonymous":e}function o3(t,e,n){n=n||Is;let i;if(e=e!==void 0?e:xn.crossOrigin,e=s3(t,e),typeof Image<"u"){i=new Image,e!==void 0&&(i.crossOrigin=e);const r=function(){i.removeEventListener("error",s),i.removeEventListener("load",o),i=null},s=function(){const l="couldn't load image: "+t;AB(l),n(l,i),r()},o=function(){n(null,i),r()};return i.addEventListener("error",s),i.addEventListener("load",o),i.src=t,i}else if(typeof ImageBitmap<"u"){let r,s;const o=function(){n(r,s)},a={};e&&(a.mode="cors"),fetch(t,a).then(function(l){if(!l.ok)throw l;return l.blob()}).then(function(l){return createImageBitmap(l,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(l){s=l,setTimeout(o)}).catch(function(l){r=l,setTimeout(o)}),i=null}return i}function k0(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof ImageData<"u"&&t instanceof ImageData||typeof HTMLElement<"u"&&t instanceof HTMLElement}function lf(t,e,n){return k0(t)?(setTimeout(function(){n(null,t)}),t):o3(t,e,n)}function ff(t,e,n){n=n||xn.textureOptions;const i=n.target||nn;if(t.bindTexture(i,e),n.color===!1)return;const r=i3(n.color);if(i===rn)for(let s=0;s<6;++s)t.texImage2D(fa+s,0,de,1,1,0,de,ge,r);else i===Bn||i===vn?t.texImage3D(i,0,de,1,1,1,0,de,ge,r):t.texImage2D(i,0,de,1,1,0,de,ge,r)}function a3(t,e,n,i){return i=i||Is,n=n||xn.textureOptions,ff(t,e,n),n=Object.assign({},n),lf(n.src,n.crossOrigin,function(s,o){s?i(s,e,o):(D0(t,e,o,n),i(null,e,o))})}function c3(t,e,n,i){i=i||Is;const r=n.src;if(r.length!==6)throw"there must be 6 urls for a cubemap";const s=n.level||0,o=n.internalFormat||n.format||de,a=Zi(o),l=n.format||a.format,c=n.type||ge,f=n.target||nn;if(f!==rn)throw"target must be TEXTURE_CUBE_MAP";ff(t,e,n),n=Object.assign({},n);let u=6;const h=[],A=af(t,n);let d;function g(m){return function(p,w){--u,p?h.push(p):w.width!==w.height?h.push("cubemap face img is not a square: "+w.src):($i(t,n),t.bindTexture(f,e),u===5?af().forEach(function(C){t.texImage2D(C,s,o,l,c,w)}):t.texImage2D(m,s,o,l,c,w),Es(n)&&t.generateMipmap(f)),u===0&&i(h.length?h:void 0,e,d)}}d=r.map(function(m,p){return lf(m,n.crossOrigin,g(A[p]))})}function l3(t,e,n,i){i=i||Is;const r=n.src,s=n.internalFormat||n.format||de,o=Zi(s),a=n.format||o.format,l=n.type||ge,c=n.target||vn;if(c!==Bn&&c!==vn)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";ff(t,e,n),n=Object.assign({},n);let f=r.length;const u=[];let h;const A=n.level||0;let d=n.width,g=n.height;const m=r.length;let p=!0;function w(C){return function(y,b){if(--f,y)u.push(y);else{if($i(t,n),t.bindTexture(c,e),p){p=!1,d=n.width||b.width,g=n.height||b.height,t.texImage3D(c,A,s,d,g,m,0,a,l,null);for(let x=0;x<m;++x)t.texSubImage3D(c,A,0,0,x,d,g,1,a,l,b)}else{let x=b,I;(b.width!==d||b.height!==g)&&(I=u0(),x=I.canvas,I.canvas.width=d,I.canvas.height=g,I.drawImage(b,0,0,d,g)),t.texSubImage3D(c,A,0,0,C,d,g,1,a,l,x),I&&x===I.canvas&&(I.canvas.width=0,I.canvas.height=0)}Es(n)&&t.generateMipmap(c)}f===0&&i(u.length?u:void 0,e,h)}}h=r.map(function(C,y){return lf(C,n.crossOrigin,w(y))})}function F0(t,e,n,i){i=i||xn.textureOptions;const r=i.target||nn;t.bindTexture(r,e);let s=i.width,o=i.height,a=i.depth;const l=i.level||0,c=i.internalFormat||i.format||de,f=Zi(c),u=i.format||f.format,h=i.type||v0(t,n,f.type);if(qi(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const m=uB(h);n=new m(n)}const A=$v(c,h),d=n.byteLength/A;if(d%1)throw"length wrong size for format: "+$l(t,u);let g;if(r===Bn||r===vn)if(!s&&!o&&!a){const m=Math.cbrt(d);if(m%1!==0)throw"can't guess cube size of array of numElements: "+d;s=m,o=m,a=m}else s&&(!o||!a)?(g=wa(t,r,o,a,d/s),o=g.width,a=g.height):o&&(!s||!a)?(g=wa(t,r,s,a,d/o),s=g.width,a=g.height):(g=wa(t,r,s,o,d/a),s=g.width,o=g.height);else g=wa(t,r,s,o,d),s=g.width,o=g.height;if(S0(t),t.pixelStorei(nf,i.unpackAlignment||1),$i(t,i),r===rn){const m=A/n.BYTES_PER_ELEMENT,p=d/6*m;cf(t,i).forEach(w=>{const C=p*w.ndx,y=n.subarray(C,C+p);t.texImage2D(w.face,l,c,s,o,0,u,h,y)})}else r===Bn||r===vn?t.texImage3D(r,l,c,s,o,a,0,u,h,n):t.texImage2D(r,l,c,s,o,0,u,h,n);return{width:s,height:o,depth:a,type:h}}function f3(t,e,n){const i=n.target||nn;t.bindTexture(i,e);const r=n.level||0,s=n.internalFormat||n.format||de,o=Zi(s),a=n.format||o.format,l=n.type||o.type;if($i(t,n),i===rn)for(let c=0;c<6;++c)t.texImage2D(fa+c,r,s,n.width,n.height,0,a,l,null);else i===Bn||i===vn?t.texImage3D(i,r,s,n.width,n.height,n.depth,0,a,l,null):t.texImage2D(i,r,s,n.width,n.height,0,a,l,null)}function bs(t,e,n){n=n||Is,e=e||xn.textureOptions;const i=t.createTexture(),r=e.target||nn;let s=e.width||1,o=e.height||1;const a=e.internalFormat||de;t.bindTexture(r,i),r===rn&&(t.texParameteri(r,ua,la),t.texParameteri(r,Aa,la));let l=e.src;if(l)if(typeof l=="function"&&(l=l(t,e)),typeof l=="string")a3(t,i,e,n);else if(qi(l)||Array.isArray(l)&&(typeof l[0]=="number"||Array.isArray(l[0])||qi(l[0]))){const c=F0(t,i,l,e);s=c.width,o=c.height}else Array.isArray(l)&&(typeof l[0]=="string"||k0(l[0]))?r===rn?c3(t,i,e,n):l3(t,i,e,n):(D0(t,i,l,e),s=l.width,o=l.height);else f3(t,i,e);return Es(e)&&of(t,i,e,s,o,a),Q0(t,i,e),i}function u3(t,e,n,i,r,s){i=i||n.width,r=r||n.height,s=s||n.depth;const o=n.target||nn;t.bindTexture(o,e);const a=n.level||0,l=n.internalFormat||n.format||de,c=Zi(l),f=n.format||c.format;let u;const h=n.src;if(h&&(qi(h)||Array.isArray(h)&&typeof h[0]=="number")?u=n.type||v0(t,h,c.type):u=n.type||c.type,o===rn)for(let A=0;A<6;++A)t.texImage2D(fa+A,a,l,i,r,0,f,u,null);else o===Bn||o===vn?t.texImage3D(o,a,l,i,r,s,0,f,u,null):t.texImage2D(o,a,l,i,r,0,f,u,null)}const A3=i0,ya=33984,h3=35048,Ca=34962,d3=34963,uf=35345,R0=35718,g3=35721,p3=35971,m3=35382,w3=35396,y3=35398,C3=35392,E3=35395,Ea=5126,N0=35664,M0=35665,T0=35666,Af=5124,P0=35667,L0=35668,O0=35669,U0=35670,_0=35671,G0=35672,z0=35673,H0=35674,Y0=35675,V0=35676,I3=35678,b3=35680,x3=35679,B3=35682,v3=35685,S3=35686,Q3=35687,D3=35688,k3=35689,F3=35690,R3=36289,N3=36292,M3=36293,hf=5125,J0=36294,q0=36295,K0=36296,T3=36298,P3=36299,L3=36300,O3=36303,U3=36306,_3=36307,G3=36308,z3=36311,Ia=3553,ba=34067,df=32879,xa=35866,q={};function j0(t,e){return q[e].bindPoint}function H3(t,e){return function(n){t.uniform1f(e,n)}}function Y3(t,e){return function(n){t.uniform1fv(e,n)}}function V3(t,e){return function(n){t.uniform2fv(e,n)}}function J3(t,e){return function(n){t.uniform3fv(e,n)}}function q3(t,e){return function(n){t.uniform4fv(e,n)}}function W0(t,e){return function(n){t.uniform1i(e,n)}}function X0(t,e){return function(n){t.uniform1iv(e,n)}}function Z0(t,e){return function(n){t.uniform2iv(e,n)}}function $0(t,e){return function(n){t.uniform3iv(e,n)}}function eg(t,e){return function(n){t.uniform4iv(e,n)}}function K3(t,e){return function(n){t.uniform1ui(e,n)}}function j3(t,e){return function(n){t.uniform1uiv(e,n)}}function W3(t,e){return function(n){t.uniform2uiv(e,n)}}function X3(t,e){return function(n){t.uniform3uiv(e,n)}}function Z3(t,e){return function(n){t.uniform4uiv(e,n)}}function $3(t,e){return function(n){t.uniformMatrix2fv(e,!1,n)}}function eS(t,e){return function(n){t.uniformMatrix3fv(e,!1,n)}}function tS(t,e){return function(n){t.uniformMatrix4fv(e,!1,n)}}function nS(t,e){return function(n){t.uniformMatrix2x3fv(e,!1,n)}}function iS(t,e){return function(n){t.uniformMatrix3x2fv(e,!1,n)}}function rS(t,e){return function(n){t.uniformMatrix2x4fv(e,!1,n)}}function sS(t,e){return function(n){t.uniformMatrix4x2fv(e,!1,n)}}function oS(t,e){return function(n){t.uniformMatrix3x4fv(e,!1,n)}}function aS(t,e){return function(n){t.uniformMatrix4x3fv(e,!1,n)}}function et(t,e,n,i){const r=j0(t,e);return Ji(t)?function(s){let o,a;ca(t,s)?(o=s,a=null):(o=s.texture,a=s.sampler),t.uniform1i(i,n),t.activeTexture(ya+n),t.bindTexture(r,o),t.bindSampler(n,a)}:function(s){t.uniform1i(i,n),t.activeTexture(ya+n),t.bindTexture(r,s)}}function tt(t,e,n,i,r){const s=j0(t,e),o=new Int32Array(r);for(let a=0;a<r;++a)o[a]=n+a;return Ji(t)?function(a){t.uniform1iv(i,o),a.forEach(function(l,c){t.activeTexture(ya+o[c]);let f,u;ca(t,l)?(f=l,u=null):(f=l.texture,u=l.sampler),t.bindSampler(n,u),t.bindTexture(s,f)})}:function(a){t.uniform1iv(i,o),a.forEach(function(l,c){t.activeTexture(ya+o[c]),t.bindTexture(s,l)})}}q[Ea]={Type:Float32Array,size:4,setter:H3,arraySetter:Y3},q[N0]={Type:Float32Array,size:8,setter:V3,cols:2},q[M0]={Type:Float32Array,size:12,setter:J3,cols:3},q[T0]={Type:Float32Array,size:16,setter:q3,cols:4},q[Af]={Type:Int32Array,size:4,setter:W0,arraySetter:X0},q[P0]={Type:Int32Array,size:8,setter:Z0,cols:2},q[L0]={Type:Int32Array,size:12,setter:$0,cols:3},q[O0]={Type:Int32Array,size:16,setter:eg,cols:4},q[hf]={Type:Uint32Array,size:4,setter:K3,arraySetter:j3},q[J0]={Type:Uint32Array,size:8,setter:W3,cols:2},q[q0]={Type:Uint32Array,size:12,setter:X3,cols:3},q[K0]={Type:Uint32Array,size:16,setter:Z3,cols:4},q[U0]={Type:Uint32Array,size:4,setter:W0,arraySetter:X0},q[_0]={Type:Uint32Array,size:8,setter:Z0,cols:2},q[G0]={Type:Uint32Array,size:12,setter:$0,cols:3},q[z0]={Type:Uint32Array,size:16,setter:eg,cols:4},q[H0]={Type:Float32Array,size:32,setter:$3,rows:2,cols:2},q[Y0]={Type:Float32Array,size:48,setter:eS,rows:3,cols:3},q[V0]={Type:Float32Array,size:64,setter:tS,rows:4,cols:4},q[v3]={Type:Float32Array,size:32,setter:nS,rows:2,cols:3},q[S3]={Type:Float32Array,size:32,setter:rS,rows:2,cols:4},q[Q3]={Type:Float32Array,size:48,setter:iS,rows:3,cols:2},q[D3]={Type:Float32Array,size:48,setter:oS,rows:3,cols:4},q[k3]={Type:Float32Array,size:64,setter:sS,rows:4,cols:2},q[F3]={Type:Float32Array,size:64,setter:aS,rows:4,cols:3},q[I3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:Ia},q[b3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:ba},q[x3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:df},q[B3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:Ia},q[R3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:xa},q[N3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:xa},q[M3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:ba},q[T3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:Ia},q[P3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:df},q[L3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:ba},q[O3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:xa},q[U3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:Ia},q[_3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:df},q[G3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:ba},q[z3]={Type:null,size:0,setter:et,arraySetter:tt,bindPoint:xa};function Ba(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(Ca,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribPointer(e,n.numComponents||n.size,n.type||Ea,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function Qn(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(Ca,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 va(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(Ca,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||hf,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function gf(t,e,n){const i=n.size,r=n.count;return function(s){t.bindBuffer(Ca,s.buffer);const o=s.size||s.numComponents||i,a=o/r,l=s.type||Ea,f=q[l].size*o,u=s.normalize||!1,h=s.offset||0,A=f/r;for(let d=0;d<r;++d)t.enableVertexAttribArray(e+d),t.vertexAttribPointer(e+d,a,l,u,f,h+A*d),s.divisor!==void 0&&t.vertexAttribDivisor(e+d,s.divisor)}}const Be={};Be[Ea]={size:4,setter:Ba},Be[N0]={size:8,setter:Ba},Be[M0]={size:12,setter:Ba},Be[T0]={size:16,setter:Ba},Be[Af]={size:4,setter:Qn},Be[P0]={size:8,setter:Qn},Be[L0]={size:12,setter:Qn},Be[O0]={size:16,setter:Qn},Be[hf]={size:4,setter:va},Be[J0]={size:8,setter:va},Be[q0]={size:12,setter:va},Be[K0]={size:16,setter:va},Be[U0]={size:4,setter:Qn},Be[_0]={size:8,setter:Qn},Be[G0]={size:12,setter:Qn},Be[z0]={size:16,setter:Qn},Be[H0]={size:4,setter:gf,count:2},Be[Y0]={size:9,setter:gf,count:3},Be[V0]={size:16,setter:gf,count:4};function tg(t){const e=t.name;return e.startsWith("gl_")||e.startsWith("webgl_")}const cS=/(\.|\[|]|\w+)/g,lS=t=>t>="0"&&t<="9";function ng(t,e,n,i){const r=t.split(cS).filter(a=>a!=="");let s=0,o="";for(;;){const a=r[s++];o+=a;const l=lS(a[0]),c=l?parseInt(a):a;if(l&&(o+=r[s++]),s===r.length){n[c]=e;break}else{const u=r[s++],h=u==="[",A=n[c]||(h?[]:{});n[c]=A,n=A,i[o]=i[o]||(function(d){return function(g){ag(d,g)}})(A),o+=u}}}function fS(t,e){let n=0;function i(a,l,c){const f=l.name.endsWith("[0]"),u=l.type,h=q[u];if(!h)throw new Error(`unknown type: 0x${u.toString(16)}`);let A;if(h.bindPoint){const d=n;n+=l.size,f?A=h.arraySetter(t,u,d,c,l.size):A=h.setter(t,u,d,c,l.size)}else h.arraySetter&&f?A=h.arraySetter(t,c):A=h.setter(t,c);return A.location=c,A}const r={},s={},o=t.getProgramParameter(e,R0);for(let a=0;a<o;++a){const l=t.getActiveUniform(e,a);if(tg(l))continue;let c=l.name;c.endsWith("[0]")&&(c=c.substr(0,c.length-3));const f=t.getUniformLocation(e,l.name);if(f){const u=i(e,l,f);r[c]=u,ng(c,u,s,r)}}return r}function uS(t,e){const n={},i=t.getProgramParameter(e,p3);for(let r=0;r<i;++r){const s=t.getTransformFeedbackVarying(e,r);n[s.name]={index:r,type:s.type,size:s.size}}return n}function AS(t,e){const n=t.getProgramParameter(e,R0),i=[],r=[];for(let a=0;a<n;++a){r.push(a),i.push({});const l=t.getActiveUniform(e,a);i[a].name=l.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(a){const l=a[0],c=a[1];t.getActiveUniforms(e,r,t[l]).forEach(function(f,u){i[u][c]=f})});const s={},o=t.getProgramParameter(e,m3);for(let a=0;a<o;++a){const l=t.getActiveUniformBlockName(e,a),c={index:t.getUniformBlockIndex(e,l),usedByVertexShader:t.getActiveUniformBlockParameter(e,a,w3),usedByFragmentShader:t.getActiveUniformBlockParameter(e,a,y3),size:t.getActiveUniformBlockParameter(e,a,C3),uniformIndices:t.getActiveUniformBlockParameter(e,a,E3)};c.used=c.usedByVertexShader||c.usedByFragmentShader,s[l]=c}return{blockSpecs:s,uniformData:i}}const ig=/\[\d+\]\.$/,hS=(t,e)=>((t+(e-1))/e|0)*e;function dS(t,e,n,i){if(e||n){i=i||1;const s=t.length/4;return function(o){let a=0,l=0;for(let c=0;c<s;++c){for(let f=0;f<i;++f)t[a++]=o[l++];a+=4-i}}}else return function(r){r.length?t.set(r):t[0]=r}}function gS(t,e,n,i){const r=n.blockSpecs,s=n.uniformData,o=r[i];if(!o)return A3("no uniform block object named:",i),{name:i,uniforms:{}};const a=new ArrayBuffer(o.size),l=t.createBuffer(),c=o.index;t.bindBuffer(uf,l),t.uniformBlockBinding(e,o.index,c);let f=i+".";ig.test(f)&&(f=f.replace(ig,"."));const u={},h={},A={};return o.uniformIndices.forEach(function(d){const g=s[d];let m=g.name;m.startsWith(f)&&(m=m.substr(f.length));const p=m.endsWith("[0]");p&&(m=m.substr(0,m.length-3));const w=q[g.type],C=w.Type,y=p?hS(w.size,16)*g.size:w.size*g.size,b=new C(a,g.offset,y/C.BYTES_PER_ELEMENT);u[m]=b;const x=dS(b,p,w.rows,w.cols);h[m]=x,ng(m,x,A,h)}),{name:i,array:a,asFloat:new Float32Array(a),buffer:l,uniforms:u,setters:h}}function rg(t,e,n){return gS(t,e.program,e.uniformBlockSpec,n)}function sg(t,e,n){const r=(e.uniformBlockSpec||e).blockSpecs[n.name];if(r){const s=r.index;return t.bindBufferRange(uf,s,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function og(t,e,n){sg(t,e,n)&&t.bufferData(uf,n.array,h3)}function xs(t,e){const n=t.setters;for(const i in e){const r=n[i];if(r){const s=e[i];r(s)}}}function ag(t,e){for(const n in e){const i=t[n];typeof i=="function"?i(e[n]):ag(t[n],e[n])}}function oi(t,...e){const n=t.uniformSetters||t,i=e.length;for(let r=0;r<i;++r){const s=e[r];if(Array.isArray(s)){const o=s.length;for(let a=0;a<o;++a)oi(n,s[a])}else for(const o in s){const a=n[o];a&&a(s[o])}}}function pS(t,e){const n={},i=t.getProgramParameter(e,g3);for(let r=0;r<i;++r){const s=t.getActiveAttrib(e,r);if(tg(s))continue;const o=t.getAttribLocation(e,s.name),a=Be[s.type],l=a.setter(t,o,a);l.location=o,n[s.name]=l}return n}function mS(t,e){for(const n in e){const i=t[n];i&&i(e[n])}}function ai(t,e,n){n.vertexArrayObject?t.bindVertexArray(n.vertexArrayObject):(mS(e.attribSetters||e,n.attribs),n.indices&&t.bindBuffer(d3,n.indices))}function wS(t,e){const n=fS(t,e),i=pS(t,e),r={program:e,uniformSetters:n,attribSetters:i};return Ji(t)&&(r.uniformBlockSpec=AS(t,e),r.transformFeedbackInfo=uS(t,e)),r}const yS=4,cg=5123;function Sa(t,e,n,i,r,s){n=n===void 0?yS:n;const o=e.indices,a=e.elementType,l=i===void 0?e.numElements:i;r=r===void 0?0:r,a||o?s!==void 0?t.drawElementsInstanced(n,l,a===void 0?cg:e.elementType,r,s):t.drawElements(n,l,a===void 0?cg:e.elementType,r):s!==void 0?t.drawArraysInstanced(n,r,l,s):t.drawArrays(n,r,l)}const CS=36160,ci=36161,ES=3553,IS=5121,bS=6402,xS=6408,BS=33190,vS=36012,SS=35056,QS=36013,DS=32854,kS=32855,FS=36194,lg=33189,fg=6401,ug=36168,pf=34041,mf=36064,Qa=36096,Ag=36128,wf=33306,yf=33071,Cf=9729,hg=[{format:xS,type:IS,min:Cf,wrap:yf},{format:pf}],vt={};vt[pf]=wf,vt[fg]=Ag,vt[ug]=Ag,vt[bS]=Qa,vt[lg]=Qa,vt[BS]=Qa,vt[vS]=Qa,vt[SS]=wf,vt[QS]=wf;function RS(t,e){return vt[t]||vt[e]}const Dn={};Dn[DS]=!0,Dn[kS]=!0,Dn[FS]=!0,Dn[pf]=!0,Dn[lg]=!0,Dn[fg]=!0,Dn[ug]=!0;function NS(t){return Dn[t]}const MS=32;function TS(t){return t>=mf&&t<mf+MS}function dg(t,e,n,i){const r=CS,s=t.createFramebuffer();t.bindFramebuffer(r,s),n=n||t.drawingBufferWidth,i=i||t.drawingBufferHeight,e=e||hg;const o=[],a={framebuffer:s,attachments:[],width:n,height:i};return e.forEach(function(l,c){let f=l.attachment;const u=l.samples,h=l.format;let A=l.attachmentPoint||RS(h,l.internalFormat);if(A||(A=mf+c),TS(A)&&o.push(A),!f)if(u!==void 0||NS(h))f=t.createRenderbuffer(),t.bindRenderbuffer(ci,f),u>1?t.renderbufferStorageMultisample(ci,u,h,n,i):t.renderbufferStorage(ci,h,n,i);else{const d=Object.assign({},l);d.width=n,d.height=i,d.auto===void 0&&(d.auto=!1,d.min=d.min||d.minMag||Cf,d.mag=d.mag||d.minMag||Cf,d.wrapS=d.wrapS||d.wrap||yf,d.wrapT=d.wrapT||d.wrap||yf),f=bs(t,d)}if(r0(t,f))t.framebufferRenderbuffer(r,A,ci,f);else if(ca(t,f))l.layer!==void 0?t.framebufferTextureLayer(r,A,f,l.level||0,l.layer):t.framebufferTexture2D(r,A,l.target||ES,f,l.level||0);else throw new Error("unknown attachment type");a.attachments.push(f)}),t.drawBuffers&&t.drawBuffers(o),a}function PS(t,e,n,i,r){i=i||t.drawingBufferWidth,r=r||t.drawingBufferHeight,e.width=i,e.height=r,n=n||hg,n.forEach(function(s,o){const a=e.attachments[o],l=s.format,c=s.samples;if(c!==void 0||r0(t,a))t.bindRenderbuffer(ci,a),c>1?t.renderbufferStorageMultisample(ci,c,l,i,r):t.renderbufferStorage(ci,l,i,r);else if(ca(t,a))u3(t,a,s,i,r);else throw new Error("unknown attachment type")})}function LS(t,e,n){const i=t.createVertexArray();return t.bindVertexArray(i),e.length||(e=[e]),e.forEach(function(r){ai(t,r,n)}),t.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:i}}const OS=/^(.*?)_/;function US(t,e){$l(t,0);const n=t.getExtension(e);if(n){const i={},r=OS.exec(e)[1],s="_"+r;for(const o in n){const a=n[o],l=typeof a=="function",c=l?r:s;let f=o;o.endsWith(c)&&(f=o.substring(0,o.length-c.length)),t[f]!==void 0?!l&&t[f]!==a&&i0(f,t[f],a,o):l?t[f]=(function(u){return function(){return u.apply(n,arguments)}})(a):(t[f]=a,i[f]=a)}i.constructor={name:n.constructor.name},$l(i,0)}return n}const gg=["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 pg(t){for(let e=0;e<gg.length;++e)US(t,gg[e])}function _S(t,e){const n=["webgl2","webgl","experimental-webgl"];let i=null;for(let r=0;r<n.length;++r)if(i=t.getContext(n[r],e),i){pg(i);break}return i}function GS(t,e){return _S(t,e)}const zS=`flat out lowp vec4 vFillColor;flat out lowp vec4 vStrokeColor;flat out float vHalfStrokeWidth;flat out vec4 vCornerRadii;
|
|
347
|
+
</div>`);else throw new Error("Unsupported input type: "+r.input);r.description&&n.push(ae`<div class="description">${r.description}</div>`)}return n}class Nv{#e;#t;#n;constructor(e,n){this.#e=e,this.#t=n,this.#n=void 0}initialize(e){const n=[];e.visit(r=>{const s=r.paramRuntime;n.push(...Fv(s))});const i=this.#t.inputBindingContainer;if(!(!i||i=="none"||!n.length)){if(this.#n=document.createElement("div"),this.#n.className="gs-input-bindings",i=="default")this.#e.appendChild(this.#n);else if(i instanceof HTMLElement)i.appendChild(this.#n);else throw new Error("Invalid inputBindingContainer");n.length&&ts(ae`<div class="gs-input-binding">${n}</div>`,this.#n)}}remove(){this.#n?.remove()}}const eu=5120,Is=5121,tu=5122,nu=5123,iu=5124,ru=5125,su=5126,Mv=32819,Tv=32820,Pv=33635,Lv=5131,Ov=33640,Uv=35899,_v=35902,zv=36269,Gv=34042,h0={};{const t=h0;t[eu]=Int8Array,t[Is]=Uint8Array,t[tu]=Int16Array,t[nu]=Uint16Array,t[iu]=Int32Array,t[ru]=Uint32Array,t[su]=Float32Array,t[Mv]=Uint16Array,t[Tv]=Uint16Array,t[Pv]=Uint16Array,t[Lv]=Uint16Array,t[Ov]=Uint32Array,t[Uv]=Uint32Array,t[_v]=Uint32Array,t[zv]=Uint32Array,t[Gv]=Uint32Array}function ou(t){if(t instanceof Int8Array)return eu;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)return Is;if(t instanceof Int16Array)return tu;if(t instanceof Uint16Array)return nu;if(t instanceof Int32Array)return iu;if(t instanceof Uint32Array)return ru;if(t instanceof Float32Array)return su;throw new Error("unsupported typed array type")}function Hv(t){if(t===Int8Array)return eu;if(t===Uint8Array||t===Uint8ClampedArray)return Is;if(t===Int16Array)return tu;if(t===Uint16Array)return nu;if(t===Int32Array)return iu;if(t===Uint32Array)return ru;if(t===Float32Array)return su;throw new Error("unsupported typed array type")}function Yv(t){const e=h0[t];if(!e)throw new Error("unknown gl type");return e}const fa=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 Vv(...t){console.error(...t)}function A0(...t){console.warn(...t)}function Jv(t,e){return typeof WebGLBuffer<"u"&&e instanceof WebGLBuffer}function d0(t,e){return typeof WebGLRenderbuffer<"u"&&e instanceof WebGLRenderbuffer}function ha(t,e){return typeof WebGLTexture<"u"&&e instanceof WebGLTexture}function qv(t,e){return typeof WebGLSampler<"u"&&e instanceof WebGLSampler}const g0=35044,Lt=34962,Kv=34963,jv=34660,Wv=5120,Xv=5121,Zv=5122,$v=5123,eB=5124,tB=5125,nB=5126,p0={attribPrefix:""};function m0(t,e,n,i,r){t.bindBuffer(e,n),t.bufferData(e,i,r||g0)}function w0(t,e,n,i){if(Jv(t,e))return e;n=n||Lt;const r=t.createBuffer();return m0(t,n,r,e,i),r}function y0(t){return t==="indices"}function iB(t){return t instanceof Int8Array||t instanceof Uint8Array}function rB(t){return t===Int8Array||t===Uint8Array}function sB(t){return t.length?t:t.data}const oB=/coord|texture/i,aB=/color|colour/i;function C0(t,e){let n;if(oB.test(t)?n=2:aB.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 cB(t,e){return t.numComponents||t.size||C0(e,sB(t).length)}function au(t,e){if(fa(t))return t;if(fa(t.data))return t.data;Array.isArray(t)&&(t={data:t});let n=t.type;return n||(y0(e)?n=Uint16Array:n=Float32Array),new n(t.data)}function lB(t,e){const n={};return Object.keys(e).forEach(function(i){if(!y0(i)){const r=e[i],s=r.attrib||r.name||r.attribName||p0.attribPrefix+i;if(r.value){if(!Array.isArray(r.value)&&!fa(r.value))throw new Error("array.value is not array or typedarray");n[s]={value:r.value}}else{let o,a,l,c;if(r.buffer&&r.buffer instanceof WebGLBuffer)o=r.buffer,c=r.numComponents||r.size,a=r.type,l=r.normalize;else if(typeof r=="number"||typeof r.data=="number"){const u=r.data||r,f=r.type||Float32Array,h=u*f.BYTES_PER_ELEMENT;a=Hv(f),l=r.normalize!==void 0?r.normalize:rB(f),c=r.numComponents||r.size||C0(i,u),o=t.createBuffer(),t.bindBuffer(Lt,o),t.bufferData(Lt,h,r.drawType||g0)}else{const u=au(r,i);o=w0(t,u,void 0,r.drawType),a=ou(u),l=r.normalize!==void 0?r.normalize:iB(u),c=cB(r,i)}n[s]={buffer:o,numComponents:c,type:a,normalize:l,stride:r.stride||0,offset:r.offset||0,divisor:r.divisor===void 0?void 0:r.divisor,drawType:r.drawType}}}}),t.bindBuffer(Lt,null),n}function uB(t,e,n,i){n=au(n),i!==void 0?(t.bindBuffer(Lt,e.buffer),t.bufferSubData(Lt,i,n)):m0(t,Lt,e.buffer,n,e.drawType)}function fB(t,e){return e===Wv||e===Xv?1:e===Zv||e===$v?2:e===eB||e===tB||e===nB?4:0}const cu=["position","positions","a_position"];function hB(t,e){let n,i;for(i=0;i<cu.length&&(n=cu[i],!(n in e||(n=p0.attribPrefix+n,n in e)));++i);i===cu.length&&(n=Object.keys(e)[0]);const r=e[n];if(!r.buffer)return 1;t.bindBuffer(Lt,r.buffer);const s=t.getBufferParameter(Lt,jv);t.bindBuffer(Lt,null);const o=fB(t,r.type),a=s/o,l=r.numComponents||r.size,c=a/l;if(c%1!==0)throw new Error(`numComponents ${l} not correct for length ${length}`);return c}function AB(t,e,n){const i=lB(t,e),r=Object.assign({},n||{});r.attribs=Object.assign({},n?n.attribs:{},i);const s=e.indices;if(s){const o=au(s,"indices");r.indices=w0(t,o,Kv),r.numElements=o.length,r.elementType=ou(o)}else r.numElements||(r.numElements=hB(t,r.attribs));return r}function Wi(t){return!!t.texStorage2D}const lu=(function(){const t={},e={};function n(i){const r=i.constructor.name;if(!t[r]){for(const s in i)if(typeof i[s]=="number"){const o=e[i[s]];e[i[s]]=o?`${o} | ${s}`:s}t[r]=!0}}return function(r,s){return n(r),e[s]||(typeof s=="number"?`0x${s.toString(16)}`:s)}})(),Qn={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},Xi=fa,b0=(function(){let t;return function(){return t=t||(typeof document<"u"&&document.createElement?document.createElement("canvas").getContext("2d"):null),t}})(),E0=6406,Ot=6407,de=6408,I0=6409,x0=6410,xs=6402,v0=34041,Aa=33071,dB=9728,gB=9729,sn=3553,on=34067,kn=32879,Rn=35866,da=34069,pB=34070,mB=34071,wB=34072,yB=34073,CB=34074,uu=10241,fu=10240,ga=10242,pa=10243,B0=32882,bB=33082,EB=33083,IB=33084,xB=33085,hu=3317,S0=3314,D0=32878,Q0=3316,k0=3315,R0=32877,vB=37443,BB=37441,SB=37440,DB=33321,QB=36756,kB=33325,RB=33326,FB=33330,NB=33329,MB=33338,TB=33337,PB=33340,LB=33339,OB=33323,UB=36757,_B=33327,zB=33328,GB=33336,HB=33335,YB=33332,VB=33331,JB=33334,qB=33333,KB=32849,jB=35905,WB=36194,XB=36758,ZB=35898,$B=35901,eS=34843,tS=34837,nS=36221,iS=36239,rS=36215,sS=36233,oS=36209,aS=36227,cS=32856,lS=35907,uS=36759,fS=32855,hS=32854,AS=32857,dS=34842,gS=34836,pS=36220,mS=36238,wS=36975,yS=36214,CS=36232,bS=36226,ES=36208,IS=33189,xS=33190,vS=36012,BS=36013,SS=35056,Fn=5120,ge=5121,ma=5122,Zi=5123,wa=5124,ui=5125,Ke=5126,F0=32819,N0=32820,M0=33635,Bt=5131,vs=36193,Au=33640,DS=35899,QS=35902,kS=36269,RS=34042,ya=33319,$i=33320,Ca=6403,er=36244,tr=36248,fi=36249;let du;function ba(t){if(!du){const e={};e[E0]={textureFormat:E0,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[ge,Bt,vs,Ke]},e[I0]={textureFormat:I0,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[ge,Bt,vs,Ke]},e[x0]={textureFormat:x0,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[ge,Bt,vs,Ke]},e[Ot]={textureFormat:Ot,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[ge,Bt,vs,Ke,M0]},e[de]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[ge,Bt,vs,Ke,F0,N0]},e[xs]={textureFormat:xs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[ui,Zi]},e[DB]={textureFormat:Ca,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[ge]},e[QB]={textureFormat:Ca,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[Fn]},e[kB]={textureFormat:Ca,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[Ke,Bt]},e[RB]={textureFormat:Ca,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[Ke]},e[FB]={textureFormat:er,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[ge]},e[NB]={textureFormat:er,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[Fn]},e[YB]={textureFormat:er,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Zi]},e[VB]={textureFormat:er,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[ma]},e[JB]={textureFormat:er,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ui]},e[qB]={textureFormat:er,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[wa]},e[OB]={textureFormat:ya,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[ge]},e[UB]={textureFormat:ya,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[Fn]},e[_B]={textureFormat:ya,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[Ke,Bt]},e[zB]={textureFormat:ya,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[Ke]},e[GB]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[ge]},e[HB]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[Fn]},e[MB]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Zi]},e[TB]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ma]},e[PB]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[ui]},e[LB]={textureFormat:$i,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[wa]},e[KB]={textureFormat:Ot,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[ge]},e[jB]={textureFormat:Ot,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[ge]},e[WB]={textureFormat:Ot,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[ge,M0]},e[XB]={textureFormat:Ot,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[Fn]},e[ZB]={textureFormat:Ot,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Ke,Bt,DS]},e[$B]={textureFormat:Ot,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[Ke,Bt,QS]},e[eS]={textureFormat:Ot,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[Ke,Bt]},e[tS]={textureFormat:Ot,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[Ke]},e[nS]={textureFormat:tr,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[ge]},e[iS]={textureFormat:tr,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[Fn]},e[rS]={textureFormat:tr,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[Zi]},e[sS]={textureFormat:tr,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[ma]},e[oS]={textureFormat:tr,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[ui]},e[aS]={textureFormat:tr,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[wa]},e[cS]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[ge]},e[lS]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[ge]},e[uS]={textureFormat:de,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[Fn]},e[fS]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[ge,N0,Au]},e[hS]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[ge,F0]},e[AS]={textureFormat:de,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[Au]},e[dS]={textureFormat:de,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[Ke,Bt]},e[gS]={textureFormat:de,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[Ke]},e[pS]={textureFormat:fi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ge]},e[mS]={textureFormat:fi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Fn]},e[wS]={textureFormat:fi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Au]},e[yS]={textureFormat:fi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[Zi]},e[CS]={textureFormat:fi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[ma]},e[bS]={textureFormat:fi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[wa]},e[ES]={textureFormat:fi,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[ui]},e[IS]={textureFormat:xs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[Zi,ui]},e[xS]={textureFormat:xs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[ui]},e[vS]={textureFormat:xs,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[Ke]},e[SS]={textureFormat:v0,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[RS]},e[BS]={textureFormat:v0,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[kS]},Object.keys(e).forEach(function(n){const i=e[n];i.bytesPerElementMap={},i.bytesPerElement.forEach(function(r,s){const o=i.type[s];i.bytesPerElementMap[o]=r})}),du=e}return du[t]}function FS(t,e){const n=ba(t);if(!n)throw"unknown internal format";const i=n.bytesPerElementMap[e];if(i===void 0)throw"unknown internal format";return i}function nr(t){const e=ba(t);if(!e)throw"unknown internal format";return{format:e.textureFormat,type:e.type[0]}}function T0(t){return(t&t-1)===0}function NS(t,e,n,i){if(!Wi(t))return T0(e)&&T0(n);const r=ba(i);if(!r)throw"unknown internal format";return r.colorRenderable&&r.textureFilterable}function MS(t){const e=ba(t);if(!e)throw"unknown internal format";return e.textureFilterable}function P0(t,e,n){return Xi(e)?ou(e):n||ge}function Ea(t,e,n,i,r){if(r%1!==0)throw"can't guess dimensions";if(!n&&!i){const s=Math.sqrt(r/(e===on?6:1));s%1===0?(n=s,i=s):(n=r,i=1)}else if(i){if(!n&&(n=r/i,n%1))throw"can't guess dimensions"}else if(i=r/n,i%1)throw"can't guess dimensions";return{width:n,height:i}}function ir(t,e){e.colorspaceConversion!==void 0&&t.pixelStorei(vB,e.colorspaceConversion),e.premultiplyAlpha!==void 0&&t.pixelStorei(BB,e.premultiplyAlpha),e.flipY!==void 0&&t.pixelStorei(SB,e.flipY)}function L0(t){t.pixelStorei(hu,4),Wi(t)&&(t.pixelStorei(S0,0),t.pixelStorei(D0,0),t.pixelStorei(Q0,0),t.pixelStorei(k0,0),t.pixelStorei(R0,0))}function TS(t,e,n,i){i.minMag&&(n.call(t,e,uu,i.minMag),n.call(t,e,fu,i.minMag)),i.min&&n.call(t,e,uu,i.min),i.mag&&n.call(t,e,fu,i.mag),i.wrap&&(n.call(t,e,ga,i.wrap),n.call(t,e,pa,i.wrap),(e===kn||qv(t,e))&&n.call(t,e,B0,i.wrap)),i.wrapR&&n.call(t,e,B0,i.wrapR),i.wrapS&&n.call(t,e,ga,i.wrapS),i.wrapT&&n.call(t,e,pa,i.wrapT),i.minLod&&n.call(t,e,bB,i.minLod),i.maxLod&&n.call(t,e,EB,i.maxLod),i.baseLevel&&n.call(t,e,IB,i.baseLevel),i.maxLevel&&n.call(t,e,xB,i.maxLevel)}function O0(t,e,n){const i=n.target||sn;t.bindTexture(i,e),TS(t,i,t.texParameteri,n)}function PS(t){return t=t||Qn.textureColor,Xi(t)?t:new Uint8Array([t[0]*255,t[1]*255,t[2]*255,t[3]*255])}function gu(t,e,n,i,r,s){n=n||Qn.textureOptions,s=s||de;const o=n.target||sn;if(i=i||n.width,r=r||n.height,t.bindTexture(o,e),NS(t,i,r,s))t.generateMipmap(o);else{const a=MS(s)?gB:dB;t.texParameteri(o,uu,a),t.texParameteri(o,fu,a),t.texParameteri(o,ga,Aa),t.texParameteri(o,pa,Aa)}}function Bs(t){return t.auto===!0||t.auto===void 0&&t.level===void 0}function pu(t,e){return e=e||{},e.cubeFaceOrder||[da,pB,mB,wB,yB,CB]}function mu(t,e){const i=pu(t,e).map(function(r,s){return{face:r,ndx:s}});return i.sort(function(r,s){return r.face-s.face}),i}function U0(t,e,n,i){i=i||Qn.textureOptions;const r=i.target||sn,s=i.level||0;let o=n.width,a=n.height;const l=i.internalFormat||i.format||de,c=nr(l),u=i.format||c.format,f=i.type||c.type;if(ir(t,i),t.bindTexture(r,e),r===on){const h=n.width,A=n.height;let d,g;if(h/6===A)d=A,g=[0,0,1,0,2,0,3,0,4,0,5,0];else if(A/6===h)d=h,g=[0,0,0,1,0,2,0,3,0,4,0,5];else if(h/3===A/2)d=h/3,g=[0,0,1,0,2,0,0,1,1,1,2,1];else if(h/2===A/3)d=h/2,g=[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 m=b0();m?(m.canvas.width=d,m.canvas.height=d,o=d,a=d,mu(t,i).forEach(function(p){const w=g[p.ndx*2+0]*d,C=g[p.ndx*2+1]*d;m.drawImage(n,w,C,d,d,0,0,d,d),t.texImage2D(p.face,s,l,u,f,m.canvas)}),m.canvas.width=1,m.canvas.height=1):typeof createImageBitmap<"u"&&(o=d,a=d,mu(t,i).forEach(function(p){const w=g[p.ndx*2+0]*d,C=g[p.ndx*2+1]*d;t.texImage2D(p.face,s,l,d,d,0,u,f,null),createImageBitmap(n,w,C,d,d,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(function(y){ir(t,i),t.bindTexture(r,e),t.texImage2D(p.face,s,l,u,f,y),Bs(i)&&gu(t,e,i,o,a,l)})}))}else if(r===kn||r===Rn){const h=Math.min(n.width,n.height),A=Math.max(n.width,n.height),d=A/h;if(d%1!==0)throw"can not compute 3D dimensions of element";const g=n.width===A?1:0,m=n.height===A?1:0;t.pixelStorei(hu,1),t.pixelStorei(S0,n.width),t.pixelStorei(D0,0),t.pixelStorei(R0,0),t.texImage3D(r,s,l,h,h,h,0,u,f,null);for(let p=0;p<d;++p){const w=p*h*g,C=p*h*m;t.pixelStorei(Q0,w),t.pixelStorei(k0,C),t.texSubImage3D(r,s,0,0,p,h,h,1,u,f,n)}L0(t)}else t.texImage2D(r,s,l,u,f,n);Bs(i)&&gu(t,e,i,o,a,l),O0(t,e,i)}function Ss(){}function LS(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 OS(t,e){return e===void 0&&!LS(t)?"anonymous":e}function US(t,e,n){n=n||Ss;let i;if(e=e!==void 0?e:Qn.crossOrigin,e=OS(t,e),typeof Image<"u"){i=new Image,e!==void 0&&(i.crossOrigin=e);const r=function(){i.removeEventListener("error",s),i.removeEventListener("load",o),i=null},s=function(){const l="couldn't load image: "+t;Vv(l),n(l,i),r()},o=function(){n(null,i),r()};return i.addEventListener("error",s),i.addEventListener("load",o),i.src=t,i}else if(typeof ImageBitmap<"u"){let r,s;const o=function(){n(r,s)},a={};e&&(a.mode="cors"),fetch(t,a).then(function(l){if(!l.ok)throw l;return l.blob()}).then(function(l){return createImageBitmap(l,{premultiplyAlpha:"none",colorSpaceConversion:"none"})}).then(function(l){s=l,setTimeout(o)}).catch(function(l){r=l,setTimeout(o)}),i=null}return i}function _0(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof ImageData<"u"&&t instanceof ImageData||typeof HTMLElement<"u"&&t instanceof HTMLElement}function wu(t,e,n){return _0(t)?(setTimeout(function(){n(null,t)}),t):US(t,e,n)}function yu(t,e,n){n=n||Qn.textureOptions;const i=n.target||sn;if(t.bindTexture(i,e),n.color===!1)return;const r=PS(n.color);if(i===on)for(let s=0;s<6;++s)t.texImage2D(da+s,0,de,1,1,0,de,ge,r);else i===kn||i===Rn?t.texImage3D(i,0,de,1,1,1,0,de,ge,r):t.texImage2D(i,0,de,1,1,0,de,ge,r)}function _S(t,e,n,i){return i=i||Ss,n=n||Qn.textureOptions,yu(t,e,n),n=Object.assign({},n),wu(n.src,n.crossOrigin,function(s,o){s?i(s,e,o):(U0(t,e,o,n),i(null,e,o))})}function zS(t,e,n,i){i=i||Ss;const r=n.src;if(r.length!==6)throw"there must be 6 urls for a cubemap";const s=n.level||0,o=n.internalFormat||n.format||de,a=nr(o),l=n.format||a.format,c=n.type||ge,u=n.target||sn;if(u!==on)throw"target must be TEXTURE_CUBE_MAP";yu(t,e,n),n=Object.assign({},n);let f=6;const h=[],A=pu(t,n);let d;function g(m){return function(p,w){--f,p?h.push(p):w.width!==w.height?h.push("cubemap face img is not a square: "+w.src):(ir(t,n),t.bindTexture(u,e),f===5?pu().forEach(function(C){t.texImage2D(C,s,o,l,c,w)}):t.texImage2D(m,s,o,l,c,w),Bs(n)&&t.generateMipmap(u)),f===0&&i(h.length?h:void 0,e,d)}}d=r.map(function(m,p){return wu(m,n.crossOrigin,g(A[p]))})}function GS(t,e,n,i){i=i||Ss;const r=n.src,s=n.internalFormat||n.format||de,o=nr(s),a=n.format||o.format,l=n.type||ge,c=n.target||Rn;if(c!==kn&&c!==Rn)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";yu(t,e,n),n=Object.assign({},n);let u=r.length;const f=[];let h;const A=n.level||0;let d=n.width,g=n.height;const m=r.length;let p=!0;function w(C){return function(y,I){if(--u,y)f.push(y);else{if(ir(t,n),t.bindTexture(c,e),p){p=!1,d=n.width||I.width,g=n.height||I.height,t.texImage3D(c,A,s,d,g,m,0,a,l,null);for(let x=0;x<m;++x)t.texSubImage3D(c,A,0,0,x,d,g,1,a,l,I)}else{let x=I,E;(I.width!==d||I.height!==g)&&(E=b0(),x=E.canvas,E.canvas.width=d,E.canvas.height=g,E.drawImage(I,0,0,d,g)),t.texSubImage3D(c,A,0,0,C,d,g,1,a,l,x),E&&x===E.canvas&&(E.canvas.width=0,E.canvas.height=0)}Bs(n)&&t.generateMipmap(c)}u===0&&i(f.length?f:void 0,e,h)}}h=r.map(function(C,y){return wu(C,n.crossOrigin,w(y))})}function z0(t,e,n,i){i=i||Qn.textureOptions;const r=i.target||sn;t.bindTexture(r,e);let s=i.width,o=i.height,a=i.depth;const l=i.level||0,c=i.internalFormat||i.format||de,u=nr(c),f=i.format||u.format,h=i.type||P0(t,n,u.type);if(Xi(n))n instanceof Uint8ClampedArray&&(n=new Uint8Array(n.buffer));else{const m=Yv(h);n=new m(n)}const A=FS(c,h),d=n.byteLength/A;if(d%1)throw"length wrong size for format: "+lu(t,f);let g;if(r===kn||r===Rn)if(!s&&!o&&!a){const m=Math.cbrt(d);if(m%1!==0)throw"can't guess cube size of array of numElements: "+d;s=m,o=m,a=m}else s&&(!o||!a)?(g=Ea(t,r,o,a,d/s),o=g.width,a=g.height):o&&(!s||!a)?(g=Ea(t,r,s,a,d/o),s=g.width,a=g.height):(g=Ea(t,r,s,o,d/a),s=g.width,o=g.height);else g=Ea(t,r,s,o,d),s=g.width,o=g.height;if(L0(t),t.pixelStorei(hu,i.unpackAlignment||1),ir(t,i),r===on){const m=A/n.BYTES_PER_ELEMENT,p=d/6*m;mu(t,i).forEach(w=>{const C=p*w.ndx,y=n.subarray(C,C+p);t.texImage2D(w.face,l,c,s,o,0,f,h,y)})}else r===kn||r===Rn?t.texImage3D(r,l,c,s,o,a,0,f,h,n):t.texImage2D(r,l,c,s,o,0,f,h,n);return{width:s,height:o,depth:a,type:h}}function HS(t,e,n){const i=n.target||sn;t.bindTexture(i,e);const r=n.level||0,s=n.internalFormat||n.format||de,o=nr(s),a=n.format||o.format,l=n.type||o.type;if(ir(t,n),i===on)for(let c=0;c<6;++c)t.texImage2D(da+c,r,s,n.width,n.height,0,a,l,null);else i===kn||i===Rn?t.texImage3D(i,r,s,n.width,n.height,n.depth,0,a,l,null):t.texImage2D(i,r,s,n.width,n.height,0,a,l,null)}function Ds(t,e,n){n=n||Ss,e=e||Qn.textureOptions;const i=t.createTexture(),r=e.target||sn;let s=e.width||1,o=e.height||1;const a=e.internalFormat||de;t.bindTexture(r,i),r===on&&(t.texParameteri(r,ga,Aa),t.texParameteri(r,pa,Aa));let l=e.src;if(l)if(typeof l=="function"&&(l=l(t,e)),typeof l=="string")_S(t,i,e,n);else if(Xi(l)||Array.isArray(l)&&(typeof l[0]=="number"||Array.isArray(l[0])||Xi(l[0]))){const c=z0(t,i,l,e);s=c.width,o=c.height}else Array.isArray(l)&&(typeof l[0]=="string"||_0(l[0]))?r===on?zS(t,i,e,n):GS(t,i,e,n):(U0(t,i,l,e),s=l.width,o=l.height);else HS(t,i,e);return Bs(e)&&gu(t,i,e,s,o,a),O0(t,i,e),i}function YS(t,e,n,i,r,s){i=i||n.width,r=r||n.height,s=s||n.depth;const o=n.target||sn;t.bindTexture(o,e);const a=n.level||0,l=n.internalFormat||n.format||de,c=nr(l),u=n.format||c.format;let f;const h=n.src;if(h&&(Xi(h)||Array.isArray(h)&&typeof h[0]=="number")?f=n.type||P0(t,h,c.type):f=n.type||c.type,o===on)for(let A=0;A<6;++A)t.texImage2D(da+A,a,l,i,r,0,u,f,null);else o===kn||o===Rn?t.texImage3D(o,a,l,i,r,s,0,u,f,null):t.texImage2D(o,a,l,i,r,0,u,f,null)}const VS=A0,Ia=33984,JS=35048,xa=34962,qS=34963,Cu=35345,G0=35718,KS=35721,jS=35971,WS=35382,XS=35396,ZS=35398,$S=35392,e3=35395,va=5126,H0=35664,Y0=35665,V0=35666,bu=5124,J0=35667,q0=35668,K0=35669,j0=35670,W0=35671,X0=35672,Z0=35673,$0=35674,eg=35675,tg=35676,t3=35678,n3=35680,i3=35679,r3=35682,s3=35685,o3=35686,a3=35687,c3=35688,l3=35689,u3=35690,f3=36289,h3=36292,A3=36293,Eu=5125,ng=36294,ig=36295,rg=36296,d3=36298,g3=36299,p3=36300,m3=36303,w3=36306,y3=36307,C3=36308,b3=36311,Ba=3553,Sa=34067,Iu=32879,Da=35866,j={};function sg(t,e){return j[e].bindPoint}function E3(t,e){return function(n){t.uniform1f(e,n)}}function I3(t,e){return function(n){t.uniform1fv(e,n)}}function x3(t,e){return function(n){t.uniform2fv(e,n)}}function v3(t,e){return function(n){t.uniform3fv(e,n)}}function B3(t,e){return function(n){t.uniform4fv(e,n)}}function og(t,e){return function(n){t.uniform1i(e,n)}}function ag(t,e){return function(n){t.uniform1iv(e,n)}}function cg(t,e){return function(n){t.uniform2iv(e,n)}}function lg(t,e){return function(n){t.uniform3iv(e,n)}}function ug(t,e){return function(n){t.uniform4iv(e,n)}}function S3(t,e){return function(n){t.uniform1ui(e,n)}}function D3(t,e){return function(n){t.uniform1uiv(e,n)}}function Q3(t,e){return function(n){t.uniform2uiv(e,n)}}function k3(t,e){return function(n){t.uniform3uiv(e,n)}}function R3(t,e){return function(n){t.uniform4uiv(e,n)}}function F3(t,e){return function(n){t.uniformMatrix2fv(e,!1,n)}}function N3(t,e){return function(n){t.uniformMatrix3fv(e,!1,n)}}function M3(t,e){return function(n){t.uniformMatrix4fv(e,!1,n)}}function T3(t,e){return function(n){t.uniformMatrix2x3fv(e,!1,n)}}function P3(t,e){return function(n){t.uniformMatrix3x2fv(e,!1,n)}}function L3(t,e){return function(n){t.uniformMatrix2x4fv(e,!1,n)}}function O3(t,e){return function(n){t.uniformMatrix4x2fv(e,!1,n)}}function U3(t,e){return function(n){t.uniformMatrix3x4fv(e,!1,n)}}function _3(t,e){return function(n){t.uniformMatrix4x3fv(e,!1,n)}}function it(t,e,n,i){const r=sg(t,e);return Wi(t)?function(s){let o,a;ha(t,s)?(o=s,a=null):(o=s.texture,a=s.sampler),t.uniform1i(i,n),t.activeTexture(Ia+n),t.bindTexture(r,o),t.bindSampler(n,a)}:function(s){t.uniform1i(i,n),t.activeTexture(Ia+n),t.bindTexture(r,s)}}function rt(t,e,n,i,r){const s=sg(t,e),o=new Int32Array(r);for(let a=0;a<r;++a)o[a]=n+a;return Wi(t)?function(a){t.uniform1iv(i,o),a.forEach(function(l,c){t.activeTexture(Ia+o[c]);let u,f;ha(t,l)?(u=l,f=null):(u=l.texture,f=l.sampler),t.bindSampler(n,f),t.bindTexture(s,u)})}:function(a){t.uniform1iv(i,o),a.forEach(function(l,c){t.activeTexture(Ia+o[c]),t.bindTexture(s,l)})}}j[va]={Type:Float32Array,size:4,setter:E3,arraySetter:I3},j[H0]={Type:Float32Array,size:8,setter:x3,cols:2},j[Y0]={Type:Float32Array,size:12,setter:v3,cols:3},j[V0]={Type:Float32Array,size:16,setter:B3,cols:4},j[bu]={Type:Int32Array,size:4,setter:og,arraySetter:ag},j[J0]={Type:Int32Array,size:8,setter:cg,cols:2},j[q0]={Type:Int32Array,size:12,setter:lg,cols:3},j[K0]={Type:Int32Array,size:16,setter:ug,cols:4},j[Eu]={Type:Uint32Array,size:4,setter:S3,arraySetter:D3},j[ng]={Type:Uint32Array,size:8,setter:Q3,cols:2},j[ig]={Type:Uint32Array,size:12,setter:k3,cols:3},j[rg]={Type:Uint32Array,size:16,setter:R3,cols:4},j[j0]={Type:Uint32Array,size:4,setter:og,arraySetter:ag},j[W0]={Type:Uint32Array,size:8,setter:cg,cols:2},j[X0]={Type:Uint32Array,size:12,setter:lg,cols:3},j[Z0]={Type:Uint32Array,size:16,setter:ug,cols:4},j[$0]={Type:Float32Array,size:32,setter:F3,rows:2,cols:2},j[eg]={Type:Float32Array,size:48,setter:N3,rows:3,cols:3},j[tg]={Type:Float32Array,size:64,setter:M3,rows:4,cols:4},j[s3]={Type:Float32Array,size:32,setter:T3,rows:2,cols:3},j[o3]={Type:Float32Array,size:32,setter:L3,rows:2,cols:4},j[a3]={Type:Float32Array,size:48,setter:P3,rows:3,cols:2},j[c3]={Type:Float32Array,size:48,setter:U3,rows:3,cols:4},j[l3]={Type:Float32Array,size:64,setter:O3,rows:4,cols:2},j[u3]={Type:Float32Array,size:64,setter:_3,rows:4,cols:3},j[t3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Ba},j[n3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Sa},j[i3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Iu},j[r3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Ba},j[f3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Da},j[h3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Da},j[A3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Sa},j[d3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Ba},j[g3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Iu},j[p3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Sa},j[m3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Da},j[w3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Ba},j[y3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Iu},j[C3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Sa},j[b3]={Type:null,size:0,setter:it,arraySetter:rt,bindPoint:Da};function Qa(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(xa,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribPointer(e,n.numComponents||n.size,n.type||va,n.normalize||!1,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function Nn(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(xa,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||bu,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function ka(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(xa,n.buffer),t.enableVertexAttribArray(e),t.vertexAttribIPointer(e,n.numComponents||n.size,n.type||Eu,n.stride||0,n.offset||0),n.divisor!==void 0&&t.vertexAttribDivisor(e,n.divisor)}}function xu(t,e,n){const i=n.size,r=n.count;return function(s){t.bindBuffer(xa,s.buffer);const o=s.size||s.numComponents||i,a=o/r,l=s.type||va,u=j[l].size*o,f=s.normalize||!1,h=s.offset||0,A=u/r;for(let d=0;d<r;++d)t.enableVertexAttribArray(e+d),t.vertexAttribPointer(e+d,a,l,f,u,h+A*d),s.divisor!==void 0&&t.vertexAttribDivisor(e+d,s.divisor)}}const Be={};Be[va]={size:4,setter:Qa},Be[H0]={size:8,setter:Qa},Be[Y0]={size:12,setter:Qa},Be[V0]={size:16,setter:Qa},Be[bu]={size:4,setter:Nn},Be[J0]={size:8,setter:Nn},Be[q0]={size:12,setter:Nn},Be[K0]={size:16,setter:Nn},Be[Eu]={size:4,setter:ka},Be[ng]={size:8,setter:ka},Be[ig]={size:12,setter:ka},Be[rg]={size:16,setter:ka},Be[j0]={size:4,setter:Nn},Be[W0]={size:8,setter:Nn},Be[X0]={size:12,setter:Nn},Be[Z0]={size:16,setter:Nn},Be[$0]={size:4,setter:xu,count:2},Be[eg]={size:9,setter:xu,count:3},Be[tg]={size:16,setter:xu,count:4};function fg(t){const e=t.name;return e.startsWith("gl_")||e.startsWith("webgl_")}const z3=/(\.|\[|]|\w+)/g,G3=t=>t>="0"&&t<="9";function hg(t,e,n,i){const r=t.split(z3).filter(a=>a!=="");let s=0,o="";for(;;){const a=r[s++];o+=a;const l=G3(a[0]),c=l?parseInt(a):a;if(l&&(o+=r[s++]),s===r.length){n[c]=e;break}else{const f=r[s++],h=f==="[",A=n[c]||(h?[]:{});n[c]=A,n=A,i[o]=i[o]||(function(d){return function(g){mg(d,g)}})(A),o+=f}}}function H3(t,e){let n=0;function i(a,l,c){const u=l.name.endsWith("[0]"),f=l.type,h=j[f];if(!h)throw new Error(`unknown type: 0x${f.toString(16)}`);let A;if(h.bindPoint){const d=n;n+=l.size,u?A=h.arraySetter(t,f,d,c,l.size):A=h.setter(t,f,d,c,l.size)}else h.arraySetter&&u?A=h.arraySetter(t,c):A=h.setter(t,c);return A.location=c,A}const r={},s={},o=t.getProgramParameter(e,G0);for(let a=0;a<o;++a){const l=t.getActiveUniform(e,a);if(fg(l))continue;let c=l.name;c.endsWith("[0]")&&(c=c.substr(0,c.length-3));const u=t.getUniformLocation(e,l.name);if(u){const f=i(e,l,u);r[c]=f,hg(c,f,s,r)}}return r}function Y3(t,e){const n={},i=t.getProgramParameter(e,jS);for(let r=0;r<i;++r){const s=t.getTransformFeedbackVarying(e,r);n[s.name]={index:r,type:s.type,size:s.size}}return n}function V3(t,e){const n=t.getProgramParameter(e,G0),i=[],r=[];for(let a=0;a<n;++a){r.push(a),i.push({});const l=t.getActiveUniform(e,a);i[a].name=l.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach(function(a){const l=a[0],c=a[1];t.getActiveUniforms(e,r,t[l]).forEach(function(u,f){i[f][c]=u})});const s={},o=t.getProgramParameter(e,WS);for(let a=0;a<o;++a){const l=t.getActiveUniformBlockName(e,a),c={index:t.getUniformBlockIndex(e,l),usedByVertexShader:t.getActiveUniformBlockParameter(e,a,XS),usedByFragmentShader:t.getActiveUniformBlockParameter(e,a,ZS),size:t.getActiveUniformBlockParameter(e,a,$S),uniformIndices:t.getActiveUniformBlockParameter(e,a,e3)};c.used=c.usedByVertexShader||c.usedByFragmentShader,s[l]=c}return{blockSpecs:s,uniformData:i}}const Ag=/\[\d+\]\.$/,J3=(t,e)=>((t+(e-1))/e|0)*e;function q3(t,e,n,i){if(e||n){i=i||1;const s=t.length/4;return function(o){let a=0,l=0;for(let c=0;c<s;++c){for(let u=0;u<i;++u)t[a++]=o[l++];a+=4-i}}}else return function(r){r.length?t.set(r):t[0]=r}}function K3(t,e,n,i){const r=n.blockSpecs,s=n.uniformData,o=r[i];if(!o)return VS("no uniform block object named:",i),{name:i,uniforms:{}};const a=new ArrayBuffer(o.size),l=t.createBuffer(),c=o.index;t.bindBuffer(Cu,l),t.uniformBlockBinding(e,o.index,c);let u=i+".";Ag.test(u)&&(u=u.replace(Ag,"."));const f={},h={},A={};return o.uniformIndices.forEach(function(d){const g=s[d];let m=g.name;m.startsWith(u)&&(m=m.substr(u.length));const p=m.endsWith("[0]");p&&(m=m.substr(0,m.length-3));const w=j[g.type],C=w.Type,y=p?J3(w.size,16)*g.size:w.size*g.size,I=new C(a,g.offset,y/C.BYTES_PER_ELEMENT);f[m]=I;const x=q3(I,p,w.rows,w.cols);h[m]=x,hg(m,x,A,h)}),{name:i,array:a,asFloat:new Float32Array(a),buffer:l,uniforms:f,setters:h}}function dg(t,e,n){return K3(t,e.program,e.uniformBlockSpec,n)}function gg(t,e,n){const r=(e.uniformBlockSpec||e).blockSpecs[n.name];if(r){const s=r.index;return t.bindBufferRange(Cu,s,n.buffer,n.offset||0,n.array.byteLength),!0}return!1}function pg(t,e,n){gg(t,e,n)&&t.bufferData(Cu,n.array,JS)}function Qs(t,e){const n=t.setters;for(const i in e){const r=n[i];if(r){const s=e[i];r(s)}}}function mg(t,e){for(const n in e){const i=t[n];typeof i=="function"?i(e[n]):mg(t[n],e[n])}}function hi(t,...e){const n=t.uniformSetters||t,i=e.length;for(let r=0;r<i;++r){const s=e[r];if(Array.isArray(s)){const o=s.length;for(let a=0;a<o;++a)hi(n,s[a])}else for(const o in s){const a=n[o];a&&a(s[o])}}}function j3(t,e){const n={},i=t.getProgramParameter(e,KS);for(let r=0;r<i;++r){const s=t.getActiveAttrib(e,r);if(fg(s))continue;const o=t.getAttribLocation(e,s.name),a=Be[s.type],l=a.setter(t,o,a);l.location=o,n[s.name]=l}return n}function W3(t,e){for(const n in e){const i=t[n];i&&i(e[n])}}function Ai(t,e,n){n.vertexArrayObject?t.bindVertexArray(n.vertexArrayObject):(W3(e.attribSetters||e,n.attribs),n.indices&&t.bindBuffer(qS,n.indices))}function X3(t,e){const n=H3(t,e),i=j3(t,e),r={program:e,uniformSetters:n,attribSetters:i};return Wi(t)&&(r.uniformBlockSpec=V3(t,e),r.transformFeedbackInfo=Y3(t,e)),r}const Z3=4,wg=5123;function Ra(t,e,n,i,r,s){n=n===void 0?Z3:n;const o=e.indices,a=e.elementType,l=i===void 0?e.numElements:i;r=r===void 0?0:r,a||o?s!==void 0?t.drawElementsInstanced(n,l,a===void 0?wg:e.elementType,r,s):t.drawElements(n,l,a===void 0?wg:e.elementType,r):s!==void 0?t.drawArraysInstanced(n,r,l,s):t.drawArrays(n,r,l)}const $3=36160,di=36161,eD=3553,tD=5121,nD=6402,iD=6408,rD=33190,sD=36012,oD=35056,aD=36013,cD=32854,lD=32855,uD=36194,yg=33189,Cg=6401,bg=36168,vu=34041,Bu=36064,Fa=36096,Eg=36128,Su=33306,Du=33071,Qu=9729,Ig=[{format:iD,type:tD,min:Qu,wrap:Du},{format:vu}],St={};St[vu]=Su,St[Cg]=Eg,St[bg]=Eg,St[nD]=Fa,St[yg]=Fa,St[rD]=Fa,St[sD]=Fa,St[oD]=Su,St[aD]=Su;function fD(t,e){return St[t]||St[e]}const Mn={};Mn[cD]=!0,Mn[lD]=!0,Mn[uD]=!0,Mn[vu]=!0,Mn[yg]=!0,Mn[Cg]=!0,Mn[bg]=!0;function hD(t){return Mn[t]}const AD=32;function dD(t){return t>=Bu&&t<Bu+AD}function xg(t,e,n,i){const r=$3,s=t.createFramebuffer();t.bindFramebuffer(r,s),n=n||t.drawingBufferWidth,i=i||t.drawingBufferHeight,e=e||Ig;const o=[],a={framebuffer:s,attachments:[],width:n,height:i};return e.forEach(function(l,c){let u=l.attachment;const f=l.samples,h=l.format;let A=l.attachmentPoint||fD(h,l.internalFormat);if(A||(A=Bu+c),dD(A)&&o.push(A),!u)if(f!==void 0||hD(h))u=t.createRenderbuffer(),t.bindRenderbuffer(di,u),f>1?t.renderbufferStorageMultisample(di,f,h,n,i):t.renderbufferStorage(di,h,n,i);else{const d=Object.assign({},l);d.width=n,d.height=i,d.auto===void 0&&(d.auto=!1,d.min=d.min||d.minMag||Qu,d.mag=d.mag||d.minMag||Qu,d.wrapS=d.wrapS||d.wrap||Du,d.wrapT=d.wrapT||d.wrap||Du),u=Ds(t,d)}if(d0(t,u))t.framebufferRenderbuffer(r,A,di,u);else if(ha(t,u))l.layer!==void 0?t.framebufferTextureLayer(r,A,u,l.level||0,l.layer):t.framebufferTexture2D(r,A,l.target||eD,u,l.level||0);else throw new Error("unknown attachment type");a.attachments.push(u)}),t.drawBuffers&&t.drawBuffers(o),a}function gD(t,e,n,i,r){i=i||t.drawingBufferWidth,r=r||t.drawingBufferHeight,e.width=i,e.height=r,n=n||Ig,n.forEach(function(s,o){const a=e.attachments[o],l=s.format,c=s.samples;if(c!==void 0||d0(t,a))t.bindRenderbuffer(di,a),c>1?t.renderbufferStorageMultisample(di,c,l,i,r):t.renderbufferStorage(di,l,i,r);else if(ha(t,a))YS(t,a,s,i,r);else throw new Error("unknown attachment type")})}function pD(t,e,n){const i=t.createVertexArray();return t.bindVertexArray(i),e.length||(e=[e]),e.forEach(function(r){Ai(t,r,n)}),t.bindVertexArray(null),{numElements:n.numElements,elementType:n.elementType,vertexArrayObject:i}}const mD=/^(.*?)_/;function wD(t,e){lu(t,0);const n=t.getExtension(e);if(n){const i={},r=mD.exec(e)[1],s="_"+r;for(const o in n){const a=n[o],l=typeof a=="function",c=l?r:s;let u=o;o.endsWith(c)&&(u=o.substring(0,o.length-c.length)),t[u]!==void 0?!l&&t[u]!==a&&A0(u,t[u],a,o):l?t[u]=(function(f){return function(){return f.apply(n,arguments)}})(a):(t[u]=a,i[u]=a)}i.constructor={name:n.constructor.name},lu(i,0)}return n}const vg=["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 Bg(t){for(let e=0;e<vg.length;++e)wD(t,vg[e])}function yD(t,e){const n=["webgl2","webgl","experimental-webgl"];let i=null;for(let r=0;r<n.length;++r)if(i=t.getContext(n[r],e),i){Bg(i);break}return i}function CD(t,e){return yD(t,e)}const bD=`flat out lowp vec4 vFillColor;flat out lowp vec4 vStrokeColor;flat out float vHalfStrokeWidth;flat out vec4 vCornerRadii;
|
|
340
348
|
#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
|
|
341
349
|
out vec2 vPosInPixels;
|
|
342
350
|
#endif
|
|
@@ -344,7 +352,7 @@ flat out vec2 vHalfSizeInPixels;/***Adjusts the vertex position to ensure that t
|
|
|
344
352
|
#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
|
|
345
353
|
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);
|
|
346
354
|
#endif
|
|
347
|
-
gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,
|
|
355
|
+
gl_Position=unitToNdc(pos);float fillOpacity=getScaled_fillOpacity()*opaFactor;vFillColor=vec4(getScaled_fill()*fillOpacity,fillOpacity);setupPicking();}`,ED=`#if defined(ROUNDED_CORNERS) || defined(STROKED) || defined(SHADOW)
|
|
348
356
|
in vec2 vPosInPixels;
|
|
349
357
|
#endif
|
|
350
358
|
flat in vec2 vHalfSizeInPixels;flat in lowp vec4 vFillColor;flat in lowp vec4 vStrokeColor;flat in float vHalfStrokeWidth;flat in vec4 vCornerRadii;out lowp vec4 fragColor;
|
|
@@ -370,59 +378,59 @@ if(vHalfStrokeWidth>0.0&&uHatchPattern>0){d=max(d,-pattern());}fragColor=distanc
|
|
|
370
378
|
#else
|
|
371
379
|
fragColor=vFillColor;if(uPickingEnabled){fragColor=vPickingColor;}
|
|
372
380
|
#endif
|
|
373
|
-
}`,
|
|
381
|
+
}`,ID=`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;
|
|
374
382
|
#pragma markUniforms
|
|
375
|
-
};`,
|
|
383
|
+
};`,Sg=1e4;class xD{#e=!1;constructor(e){this.size=e,this.arrays={},this.pushers=[],this.dataUpdaters=[],this.vertexCount=0}configure(){if(this.#e)throw new Error("Already configured!");this.#t(),this.#n(),this.#e=!0}addConverter(e,n){const i=this.createUpdater(e,n.numComponents||1,n.targetArrayType??Float32Array,n.arrayReference),r=n.f;this.dataUpdaters.push(n.arrayReference?s=>i(r(s)):s=>i(r(s)))}createUpdater(e,n,i=Float32Array,r=void 0){if(!qe(this.size))throw new Error("The number of vertices must be defined!");let s,o,a=0;const l=new i(this.size*n);if(this.arrays[e]={data:l,numComponents:n},n==1){let c=0;const u=f=>{c=+f};s=()=>{l[a++]=c},o=u}else{let c=r??[0];const u=r?f=>{}:f=>{c=f};switch(n){case 1:break;case 2:s=()=>{l[a++]=c[0],l[a++]=c[1]},o=u;break;case 3:s=()=>{l[a++]=c[0],l[a++]=c[1],l[a++]=c[2]},o=u;break;case 4:s=()=>{l[a++]=c[0],l[a++]=c[1],l[a++]=c[2],l[a++]=c[3]},o=u;break;default:throw new Error("Invalid numComponents: "+n)}}return this.pushers.push(s),o}pushAll(){throw new Error("Call configure() first!")}updateFromDatum(e){throw new Error("Call configure() first!")}#t(){if(this.size>Sg){const e=this.pushers.map((i,r)=>`const p${r} = that.pushers[${r}];`).join(`
|
|
376
384
|
`),n=this.pushers.map((i,r)=>` p${r}();`).join(`
|
|
377
385
|
`);this.pushAll=new Function("that",`${e}
|
|
378
386
|
return function unrolledPushAll() {
|
|
379
387
|
${n}
|
|
380
388
|
that.vertexCount++;
|
|
381
|
-
};`)(this)}else this.pushAll=()=>{for(let e=0;e<this.pushers.length;e++)this.pushers[e]();this.vertexCount++}}#n(){if(this.size>
|
|
389
|
+
};`)(this)}else this.pushAll=()=>{for(let e=0;e<this.pushers.length;e++)this.pushers[e]();this.vertexCount++}}#n(){if(this.size>Sg){const e=this.dataUpdaters.map((i,r)=>`const u${r} = that.dataUpdaters[${r}];`).join(`
|
|
382
390
|
`),n=this.dataUpdaters.map((i,r)=>` u${r}(datum);`).join(`
|
|
383
391
|
`);this.updateFromDatum=new Function("that","datum",`${e}
|
|
384
392
|
return function unrolledUpdateFromDatum(datum) {
|
|
385
393
|
${n}
|
|
386
|
-
};`)(this)}else this.updateFromDatum=e=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](e)}}pushFromDatum(e){this.updateFromDatum(e),this.pushAll()}}const er=5,Ef=127;function If(t){const e=[];for(let d=0;d<=Ef;d++)e.push(void 0);const n=new Map;for(const d of t.chars)d.id<=Ef?e[d.id]=d:n.set(d.id,d);const i=8722;n.has(i)||n.set(i,e[45]);function r(d){return(d<=Ef?e[d]:n.get(d))||e[63]}function s(d){return r(d.charCodeAt(0))}const o=t.common.base,a=s("x"),l=s("X"),c=s("q"),f=a.height-er*2,u=l.height-er*2,h=c.height-a.height+c.yoffset-a.yoffset;function A(d,g=1){let m=0;for(let p=0;p<d.length;p++)m+=r(d.charCodeAt(p)).xadvance;return m/o*g}return{measureWidth:A,getCharByCode:r,getChar:s,xHeight:f,capHeight:u,descent:h,common:t.common}}function tr(t,e=0,n=1){return Math.max(e,Math.min(n,t))}const wg=2**31-1,JS=-2147483648;function qS(t,e,n,i=n){const r=new Array(t);r.fill(wg);let s=JS,o=-1/0,a=!1;const l=new Array(t);l.fill(0);const c=e[0],u=(e[1]-e[0])/t,h=(p,w)=>{const C=(p-c)/u,y=Math.floor(C);return tr(w&&y==C?y-1:y,0,t-1)};function A(p,w,C){if(a)return;if(w>s)s=w;else{a=!0;return}const y=n(p);if(y<o){a=!0;return}o=y;const b=h(y,!1);r[b]>w&&(r[b]=w),l[b]<C&&(l[b]=C)}function d(p,w,C){if(a)return;if(w>s)s=w;else{a=!0,console.debug("Items (vertices) are not ordered properly. Disabling binned index.");return}const y=n(p),b=i(p);if(y<o){a=!0;return}else if(b<y){a=!0;return}o=y;const x=h(y,!1),I=h(b,!0);for(let S=x;S<=I;S++)r[S]>w&&(r[S]=w),l[S]<C&&(l[S]=C)}const g=(p,w,C=[0,0])=>{const y=h(p,!1),b=h(w,!0),x=r[y],I=Math.max(l[b],x);return C[0]=x,C[1]=I,C},m=()=>{if(a)return;for(let w=1;w<l.length;w++)l[w]<l[w-1]&&(l[w]=l[w-1]);let p=!0;for(let w=r.length-1;w>0;w--)p&&r[w]==wg?(r[w]=l[w],p=!1):r[w-1]>r[w]&&(r[w-1]=r[w]);return g};return A.getIndex=m,d.getIndex=m,n==i?A:d}function Ot(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function kn(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 Da=Symbol("implicit");function bf(){var t=new Wt,e=[],n=[],i=Da;function r(s){let o=t.get(s);if(o===void 0){if(i!==Da)return i;t.set(s,o=e.push(s)-1)}return n[o%n.length]}return r.domain=function(s){if(!arguments.length)return e.slice();e=[],t=new Wt;for(const o of s)t.has(o)||t.set(o,e.push(o)-1);return r},r.range=function(s){return arguments.length?(n=Array.from(s),r):n.slice()},r.unknown=function(s){return arguments.length?(i=s,r):i},r.copy=function(){return bf(e,n).unknown(i)},Ot.apply(r,arguments),r}function nr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Bs(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Fn(){}var li=.7,ir=1/li,rr="\\s*([+-]?\\d+)\\s*",vs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KS=/^#([0-9a-f]{3,8})$/,jS=new RegExp(`^rgb\\(${rr},${rr},${rr}\\)$`),WS=new RegExp(`^rgb\\(${Ut},${Ut},${Ut}\\)$`),XS=new RegExp(`^rgba\\(${rr},${rr},${rr},${vs}\\)$`),ZS=new RegExp(`^rgba\\(${Ut},${Ut},${Ut},${vs}\\)$`),$S=new RegExp(`^hsl\\(${vs},${Ut},${Ut}\\)$`),eQ=new RegExp(`^hsla\\(${vs},${Ut},${Ut},${vs}\\)$`),yg={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};nr(Fn,Rn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Cg,formatHex:Cg,formatHex8:tQ,formatHsl:nQ,formatRgb:Eg,toString:Eg});function Cg(){return this.rgb().formatHex()}function tQ(){return this.rgb().formatHex8()}function nQ(){return vg(this).formatHsl()}function Eg(){return this.rgb().formatRgb()}function Rn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=KS.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Ig(e):n===3?new Me(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ka(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ka(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=jS.exec(t))?new Me(e[1],e[2],e[3],1):(e=WS.exec(t))?new Me(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=XS.exec(t))?ka(e[1],e[2],e[3],e[4]):(e=ZS.exec(t))?ka(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=$S.exec(t))?Bg(e[1],e[2]/100,e[3]/100,1):(e=eQ.exec(t))?Bg(e[1],e[2]/100,e[3]/100,e[4]):yg.hasOwnProperty(t)?Ig(yg[t]):t==="transparent"?new Me(NaN,NaN,NaN,0):null}function Ig(t){return new Me(t>>16&255,t>>8&255,t&255,1)}function ka(t,e,n,i){return i<=0&&(t=e=n=NaN),new Me(t,e,n,i)}function xf(t){return t instanceof Fn||(t=Rn(t)),t?(t=t.rgb(),new Me(t.r,t.g,t.b,t.opacity)):new Me}function Fa(t,e,n,i){return arguments.length===1?xf(t):new Me(t,e,n,i??1)}function Me(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}nr(Me,Fa,Bs(Fn,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new Me(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?li:Math.pow(li,t),new Me(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Me(fi(this.r),fi(this.g),fi(this.b),Ra(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:bg,formatHex:bg,formatHex8:iQ,formatRgb:xg,toString:xg}));function bg(){return`#${ui(this.r)}${ui(this.g)}${ui(this.b)}`}function iQ(){return`#${ui(this.r)}${ui(this.g)}${ui(this.b)}${ui((isNaN(this.opacity)?1:this.opacity)*255)}`}function xg(){const t=Ra(this.opacity);return`${t===1?"rgb(":"rgba("}${fi(this.r)}, ${fi(this.g)}, ${fi(this.b)}${t===1?")":`, ${t})`}`}function Ra(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function fi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ui(t){return t=fi(t),(t<16?"0":"")+t.toString(16)}function Bg(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new St(t,e,n,i)}function vg(t){if(t instanceof St)return new St(t.h,t.s,t.l,t.opacity);if(t instanceof Fn||(t=Rn(t)),!t)return new St;if(t instanceof St)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),o=NaN,a=s-r,l=(s+r)/2;return a?(e===s?o=(n-i)/a+(n<i)*6:n===s?o=(i-e)/a+2:o=(e-n)/a+4,a/=l<.5?s+r:2-s-r,o*=60):a=l>0&&l<1?0:o,new St(o,a,l,t.opacity)}function Bf(t,e,n,i){return arguments.length===1?vg(t):new St(t,e,n,i??1)}function St(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}nr(St,Bf,Bs(Fn,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new St(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?li:Math.pow(li,t),new St(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,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Me(vf(t>=240?t-240:t+120,r,i),vf(t,r,i),vf(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new St(Sg(this.h),Na(this.s),Na(this.l),Ra(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=Ra(this.opacity);return`${t===1?"hsl(":"hsla("}${Sg(this.h)}, ${Na(this.s)*100}%, ${Na(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Sg(t){return t=(t||0)%360,t<0?t+360:t}function Na(t){return Math.max(0,Math.min(1,t||0))}function vf(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 Qg=Math.PI/180,Dg=180/Math.PI,Ma=18,kg=.96422,Fg=1,Rg=.82521,Ng=4/29,sr=6/29,Mg=3*sr*sr,rQ=sr*sr*sr;function Tg(t){if(t instanceof _t)return new _t(t.l,t.a,t.b,t.opacity);if(t instanceof sn)return Pg(t);t instanceof Me||(t=xf(t));var e=Ff(t.r),n=Ff(t.g),i=Ff(t.b),r=Qf((.2225045*e+.7168786*n+.0606169*i)/Fg),s,o;return e===n&&n===i?s=o=r:(s=Qf((.4360747*e+.3850649*n+.1430804*i)/kg),o=Qf((.0139322*e+.0971045*n+.7141733*i)/Rg)),new _t(116*r-16,500*(s-r),200*(r-o),t.opacity)}function Sf(t,e,n,i){return arguments.length===1?Tg(t):new _t(t,e,n,i??1)}function _t(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}nr(_t,Sf,Bs(Fn,{brighter(t){return new _t(this.l+Ma*(t??1),this.a,this.b,this.opacity)},darker(t){return new _t(this.l-Ma*(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=kg*Df(e),t=Fg*Df(t),n=Rg*Df(n),new Me(kf(3.1338561*e-1.6168667*t-.4906146*n),kf(-.9787684*e+1.9161415*t+.033454*n),kf(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Qf(t){return t>rQ?Math.pow(t,1/3):t/Mg+Ng}function Df(t){return t>sr?t*t*t:Mg*(t-Ng)}function kf(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ff(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function sQ(t){if(t instanceof sn)return new sn(t.h,t.c,t.l,t.opacity);if(t instanceof _t||(t=Tg(t)),t.a===0&&t.b===0)return new sn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Dg;return new sn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Rf(t,e,n,i){return arguments.length===1?sQ(t):new sn(t,e,n,i??1)}function sn(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function Pg(t){if(isNaN(t.h))return new _t(t.l,0,0,t.opacity);var e=t.h*Qg;return new _t(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}nr(sn,Rf,Bs(Fn,{brighter(t){return new sn(this.h,this.c,this.l+Ma*(t??1),this.opacity)},darker(t){return new sn(this.h,this.c,this.l-Ma*(t??1),this.opacity)},rgb(){return Pg(this).rgb()}}));var Lg=-.14861,Nf=1.78277,Mf=-.29227,Ta=-.90649,Ss=1.97294,Og=Ss*Ta,Ug=Ss*Nf,_g=Nf*Mf-Ta*Lg;function oQ(t){if(t instanceof Ai)return new Ai(t.h,t.s,t.l,t.opacity);t instanceof Me||(t=xf(t));var e=t.r/255,n=t.g/255,i=t.b/255,r=(_g*i+Og*e-Ug*n)/(_g+Og-Ug),s=i-r,o=(Ss*(n-r)-Mf*s)/Ta,a=Math.sqrt(o*o+s*s)/(Ss*r*(1-r)),l=a?Math.atan2(o,s)*Dg-120:NaN;return new Ai(l<0?l+360:l,a,r,t.opacity)}function Tf(t,e,n,i){return arguments.length===1?oQ(t):new Ai(t,e,n,i??1)}function Ai(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}nr(Ai,Tf,Bs(Fn,{brighter(t){return t=t==null?ir:Math.pow(ir,t),new Ai(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?li:Math.pow(li,t),new Ai(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Qg,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),i=Math.cos(t),r=Math.sin(t);return new Me(255*(e+n*(Lg*i+Nf*r)),255*(e+n*(Mf*i+Ta*r)),255*(e+n*(Ss*i)),this.opacity)}}));function Gg(t,e,n,i,r){var s=t*t,o=s*t;return((1-3*t+3*s-o)*e+(4-6*s+3*o)*n+(1+3*t+3*s-3*o)*i+o*r)/6}function zg(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),r=t[i],s=t[i+1],o=i>0?t[i-1]:2*r-s,a=i<e-1?t[i+2]:2*s-r;return Gg((n-i/e)*e,o,r,s,a)}}function Hg(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),r=t[(i+e-1)%e],s=t[i%e],o=t[(i+1)%e],a=t[(i+2)%e];return Gg((n-i/e)*e,r,s,o,a)}}const Pa=t=>()=>t;function Yg(t,e){return function(n){return t+n*e}}function aQ(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function La(t,e){var n=e-t;return n?Yg(t,n>180||n<-180?n-360*Math.round(n/360):n):Pa(isNaN(t)?e:t)}function cQ(t){return(t=+t)==1?Te:function(e,n){return n-e?aQ(e,n,t):Pa(isNaN(e)?n:e)}}function Te(t,e){var n=e-t;return n?Yg(t,n):Pa(isNaN(t)?e:t)}const Pf=(function t(e){var n=cQ(e);function i(r,s){var o=n((r=Fa(r)).r,(s=Fa(s)).r),a=n(r.g,s.g),l=n(r.b,s.b),c=Te(r.opacity,s.opacity);return function(f){return r.r=o(f),r.g=a(f),r.b=l(f),r.opacity=c(f),r+""}}return i.gamma=t,i})(1);function Vg(t){return function(e){var n=e.length,i=new Array(n),r=new Array(n),s=new Array(n),o,a;for(o=0;o<n;++o)a=Fa(e[o]),i[o]=a.r||0,r[o]=a.g||0,s[o]=a.b||0;return i=t(i),r=t(r),s=t(s),a.opacity=1,function(l){return a.r=i(l),a.g=r(l),a.b=s(l),a+""}}}var lQ=Vg(zg),fQ=Vg(Hg);function Lf(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(s){for(r=0;r<n;++r)i[r]=t[r]*(1-s)+e[r]*s;return i}}function Jg(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function uQ(t,e){return(Jg(e)?Lf:qg)(t,e)}function qg(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),s=new Array(n),o;for(o=0;o<i;++o)r[o]=Nn(t[o],e[o]);for(;o<n;++o)s[o]=e[o];return function(a){for(o=0;o<i;++o)s[o]=r[o](a);return s}}function Kg(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Qt(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function jg(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=Nn(t[r],e[r]):i[r]=e[r];return function(s){for(r in n)i[r]=n[r](s);return i}}var Of=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Uf=new RegExp(Of.source,"g");function AQ(t){return function(){return t}}function hQ(t){return function(e){return t(e)+""}}function Wg(t,e){var n=Of.lastIndex=Uf.lastIndex=0,i,r,s,o=-1,a=[],l=[];for(t=t+"",e=e+"";(i=Of.exec(t))&&(r=Uf.exec(e));)(s=r.index)>n&&(s=e.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(i=i[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:Qt(i,r)})),n=Uf.lastIndex;return n<e.length&&(s=e.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?hQ(l[0].x):AQ(e):(e=l.length,function(c){for(var f=0,u;f<e;++f)a[(u=l[f]).i]=u.x(c);return a.join("")})}function Nn(t,e){var n=typeof e,i;return e==null||n==="boolean"?Pa(e):(n==="number"?Qt:n==="string"?(i=Rn(e))?(e=i,Pf):Wg:e instanceof Rn?Pf:e instanceof Date?Kg:Jg(e)?Lf:Array.isArray(e)?qg:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?jg:Qt)(t,e)}function dQ(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function gQ(t,e){var n=La(+t,+e);return function(i){var r=n(i);return r-360*Math.floor(r/360)}}function Qs(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Xg=180/Math.PI,_f={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Zg(t,e,n,i,r,s){var o,a,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:r,translateY:s,rotate:Math.atan2(e,t)*Xg,skewX:Math.atan(l)*Xg,scaleX:o,scaleY:a}}var Oa;function pQ(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?_f:Zg(e.a,e.b,e.c,e.d,e.e,e.f)}function mQ(t){return t==null||(Oa||(Oa=document.createElementNS("http://www.w3.org/2000/svg","g")),Oa.setAttribute("transform",t),!(t=Oa.transform.baseVal.consolidate()))?_f:(t=t.matrix,Zg(t.a,t.b,t.c,t.d,t.e,t.f))}function $g(t,e,n,i){function r(c){return c.length?c.pop()+" ":""}function s(c,f,u,h,A,d){if(c!==u||f!==h){var g=A.push("translate(",null,e,null,n);d.push({i:g-4,x:Qt(c,u)},{i:g-2,x:Qt(f,h)})}else(u||h)&&A.push("translate("+u+e+h+n)}function o(c,f,u,h){c!==f?(c-f>180?f+=360:f-c>180&&(c+=360),h.push({i:u.push(r(u)+"rotate(",null,i)-2,x:Qt(c,f)})):f&&u.push(r(u)+"rotate("+f+i)}function a(c,f,u,h){c!==f?h.push({i:u.push(r(u)+"skewX(",null,i)-2,x:Qt(c,f)}):f&&u.push(r(u)+"skewX("+f+i)}function l(c,f,u,h,A,d){if(c!==u||f!==h){var g=A.push(r(A)+"scale(",null,",",null,")");d.push({i:g-4,x:Qt(c,u)},{i:g-2,x:Qt(f,h)})}else(u!==1||h!==1)&&A.push(r(A)+"scale("+u+","+h+")")}return function(c,f){var u=[],h=[];return c=t(c),f=t(f),s(c.translateX,c.translateY,f.translateX,f.translateY,u,h),o(c.rotate,f.rotate,u,h),a(c.skewX,f.skewX,u,h),l(c.scaleX,c.scaleY,f.scaleX,f.scaleY,u,h),c=f=null,function(A){for(var d=-1,g=h.length,m;++d<g;)u[(m=h[d]).i]=m.x(A);return u.join("")}}}var wQ=$g(pQ,"px, ","px)","deg)"),yQ=$g(mQ,", ",")",")"),CQ=1e-12;function ep(t){return((t=Math.exp(t))+1/t)/2}function EQ(t){return((t=Math.exp(t))-1/t)/2}function IQ(t){return((t=Math.exp(2*t))-1)/(t+1)}const bQ=(function t(e,n,i){function r(s,o){var a=s[0],l=s[1],c=s[2],f=o[0],u=o[1],h=o[2],A=f-a,d=u-l,g=A*A+d*d,m,p;if(g<CQ)p=Math.log(h/c)/e,m=function(I){return[a+I*A,l+I*d,c*Math.exp(e*I*p)]};else{var w=Math.sqrt(g),C=(h*h-c*c+i*g)/(2*c*n*w),y=(h*h-c*c-i*g)/(2*h*n*w),b=Math.log(Math.sqrt(C*C+1)-C),x=Math.log(Math.sqrt(y*y+1)-y);p=(x-b)/e,m=function(I){var S=I*p,Q=ep(b),v=c/(n*w)*(Q*IQ(e*S+b)-EQ(b));return[a+v*A,l+v*d,c*Q/ep(e*S+b)]}}return m.duration=p*1e3*e/Math.SQRT2,m}return r.rho=function(s){var o=Math.max(.001,+s),a=o*o,l=a*a;return t(o,a,l)},r})(Math.SQRT2,2,4);function tp(t){return function(e,n){var i=t((e=Bf(e)).h,(n=Bf(n)).h),r=Te(e.s,n.s),s=Te(e.l,n.l),o=Te(e.opacity,n.opacity);return function(a){return e.h=i(a),e.s=r(a),e.l=s(a),e.opacity=o(a),e+""}}}const xQ=tp(La);var BQ=tp(Te);function vQ(t,e){var n=Te((t=Sf(t)).l,(e=Sf(e)).l),i=Te(t.a,e.a),r=Te(t.b,e.b),s=Te(t.opacity,e.opacity);return function(o){return t.l=n(o),t.a=i(o),t.b=r(o),t.opacity=s(o),t+""}}function np(t){return function(e,n){var i=t((e=Rf(e)).h,(n=Rf(n)).h),r=Te(e.c,n.c),s=Te(e.l,n.l),o=Te(e.opacity,n.opacity);return function(a){return e.h=i(a),e.c=r(a),e.l=s(a),e.opacity=o(a),e+""}}}const SQ=np(La);var QQ=np(Te);function ip(t){return(function e(n){n=+n;function i(r,s){var o=t((r=Tf(r)).h,(s=Tf(s)).h),a=Te(r.s,s.s),l=Te(r.l,s.l),c=Te(r.opacity,s.opacity);return function(f){return r.h=o(f),r.s=a(f),r.l=l(Math.pow(f,n)),r.opacity=c(f),r+""}}return i.gamma=e,i})(1)}const DQ=ip(La);var kQ=ip(Te);function Gf(t,e){e===void 0&&(e=t,t=Nn);for(var n=0,i=e.length-1,r=e[0],s=new Array(i<0?0:i);n<i;)s[n]=t(r,r=e[++n]);return function(o){var a=Math.max(0,Math.min(i-1,Math.floor(o*=i)));return s[a](o-a)}}function FQ(t,e){for(var n=new Array(e),i=0;i<e;++i)n[i]=t(i/(e-1));return n}const RQ=Object.freeze(Object.defineProperty({__proto__:null,interpolate:Nn,interpolateArray:uQ,interpolateBasis:zg,interpolateBasisClosed:Hg,interpolateCubehelix:DQ,interpolateCubehelixLong:kQ,interpolateDate:Kg,interpolateDiscrete:dQ,interpolateHcl:SQ,interpolateHclLong:QQ,interpolateHsl:xQ,interpolateHslLong:BQ,interpolateHue:gQ,interpolateLab:vQ,interpolateNumber:Qt,interpolateNumberArray:Lf,interpolateObject:jg,interpolateRgb:Pf,interpolateRgbBasis:lQ,interpolateRgbBasisClosed:fQ,interpolateRound:Qs,interpolateString:Wg,interpolateTransformCss:wQ,interpolateTransformSvg:yQ,interpolateZoom:bQ,piecewise:Gf,quantize:FQ},Symbol.toStringTag,{value:"Module"}));function NQ(t){return function(){return t}}function zf(t){return+t}var rp=[0,1];function ot(t){return t}function Hf(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:NQ(isNaN(e)?NaN:.5)}function MQ(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function TQ(t,e,n){var i=t[0],r=t[1],s=e[0],o=e[1];return r<i?(i=Hf(r,i),s=n(o,s)):(i=Hf(i,r),s=n(s,o)),function(a){return s(i(a))}}function PQ(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),s=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)r[o]=Hf(t[o],t[o+1]),s[o]=n(e[o],e[o+1]);return function(a){var l=yn(t,a,1,i)-1;return s[l](r[l](a))}}function Ds(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ua(){var t=rp,e=rp,n=Nn,i,r,s,o=ot,a,l,c;function f(){var h=Math.min(t.length,e.length);return o!==ot&&(o=MQ(t[0],t[h-1])),a=h>2?PQ:TQ,l=c=null,u}function u(h){return h==null||isNaN(h=+h)?s:(l||(l=a(t.map(i),e,n)))(i(o(h)))}return u.invert=function(h){return o(r((c||(c=a(e,t.map(i),Qt)))(h)))},u.domain=function(h){return arguments.length?(t=Array.from(h,zf),f()):t.slice()},u.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},u.rangeRound=function(h){return e=Array.from(h),n=Qs,f()},u.clamp=function(h){return arguments.length?(o=h?!0:ot,f()):o!==ot},u.interpolate=function(h){return arguments.length?(n=h,f()):n},u.unknown=function(h){return arguments.length?(s=h,u):s},function(h,A){return i=h,r=A,f()}}function sp(){return Ua()(ot,ot)}function op(t,e,n,i){var r=$n(t,e,n),s;switch(i=Oi(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(s=q2(r,o))&&(i.precision=s),ed(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=K2(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=J2(r))&&(i.precision=s-(i.type==="%")*2);break}}return ze(i)}function hi(t){var e=t.domain;return t.ticks=function(n){var i=e();return _o(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return op(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,s=i.length-1,o=i[r],a=i[s],l,c,f=10;for(a<o&&(c=o,o=a,a=c,c=r,r=s,s=c);f-- >0;){if(c=hl(o,a,n),c===l)return i[r]=o,i[s]=a,e(i);if(c>0)o=Math.floor(o/c)*c,a=Math.ceil(a/c)*c;else if(c<0)o=Math.ceil(o*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function ap(){var t=sp();return t.copy=function(){return Ds(t,ap())},Ot.apply(t,arguments),hi(t)}function cp(t){var e;function n(i){return i==null||isNaN(i=+i)?e:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(t=Array.from(i,zf),n):t.slice()},n.unknown=function(i){return arguments.length?(e=i,n):e},n.copy=function(){return cp(t).unknown(e)},t=arguments.length?Array.from(t,zf):[0,1],hi(n)}function lp(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],s=t[i],o;return s<r&&(o=n,n=i,i=o,o=r,r=s,s=o),t[n]=e.floor(r),t[i]=e.ceil(s),t}function fp(t){return Math.log(t)}function up(t){return Math.exp(t)}function LQ(t){return-Math.log(-t)}function OQ(t){return-Math.exp(-t)}function UQ(t){return isFinite(t)?+("1e"+t):t<0?0:t}function _Q(t){return t===10?UQ:t===Math.E?Math.exp:e=>Math.pow(t,e)}function GQ(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 Ap(t){return(e,n)=>-t(-e,n)}function Yf(t){const e=t(fp,up),n=e.domain;let i=10,r,s;function o(){return r=GQ(i),s=_Q(i),n()[0]<0?(r=Ap(r),s=Ap(s),t(LQ,OQ)):t(fp,up),e}return e.base=function(a){return arguments.length?(i=+a,o()):i},e.domain=function(a){return arguments.length?(n(a),o()):n()},e.ticks=a=>{const l=n();let c=l[0],f=l[l.length-1];const u=f<c;u&&([c,f]=[f,c]);let h=r(c),A=r(f),d,g;const m=a==null?10:+a;let p=[];if(!(i%1)&&A-h<m){if(h=Math.floor(h),A=Math.ceil(A),c>0){for(;h<=A;++h)for(d=1;d<i;++d)if(g=h<0?d/s(-h):d*s(h),!(g<c)){if(g>f)break;p.push(g)}}else for(;h<=A;++h)for(d=i-1;d>=1;--d)if(g=h>0?d/s(-h):d*s(h),!(g<c)){if(g>f)break;p.push(g)}p.length*2<m&&(p=_o(c,f,m))}else p=_o(h,A,Math.min(A-h,m)).map(s);return u?p.reverse():p},e.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=Oi(l)).precision==null&&(l.trim=!0),l=ze(l)),a===1/0)return l;const c=Math.max(1,i*a/e.ticks().length);return f=>{let u=f/s(Math.round(r(f)));return u*i<i-.5&&(u*=i),u<=c?l(f):""}},e.nice=()=>n(lp(n(),{floor:a=>s(Math.floor(r(a))),ceil:a=>s(Math.ceil(r(a)))})),e}function Vf(){const t=Yf(Ua()).domain([1,10]);return t.copy=()=>Ds(t,Vf()).base(t.base()),Ot.apply(t,arguments),t}function hp(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function dp(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Jf(t){var e=1,n=t(hp(e),dp(e));return n.constant=function(i){return arguments.length?t(hp(e=+i),dp(e)):e},hi(n)}function gp(){var t=Jf(Ua());return t.copy=function(){return Ds(t,gp()).constant(t.constant())},Ot.apply(t,arguments)}function pp(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function zQ(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function HQ(t){return t<0?-t*t:t*t}function qf(t){var e=t(ot,ot),n=1;function i(){return n===1?t(ot,ot):n===.5?t(zQ,HQ):t(pp(n),pp(1/n))}return e.exponent=function(r){return arguments.length?(n=+r,i()):n},hi(e)}function Kf(){var t=qf(Ua());return t.copy=function(){return Ds(t,Kf()).exponent(t.exponent())},Ot.apply(t,arguments),t}function YQ(){return Kf.apply(null,arguments).exponent(.5)}function mp(){var t=[],e=[],n=[],i;function r(){var o=0,a=Math.max(1,e.length);for(n=new Array(a-1);++o<a;)n[o-1]=Kh(t,o/a);return s}function s(o){return o==null||isNaN(o=+o)?i:e[yn(n,o)]}return s.invertExtent=function(o){var a=e.indexOf(o);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},s.domain=function(o){if(!arguments.length)return t.slice();t=[];for(let a of o)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(Xn),r()},s.range=function(o){return arguments.length?(e=Array.from(o),r()):e.slice()},s.unknown=function(o){return arguments.length?(i=o,s):i},s.quantiles=function(){return n.slice()},s.copy=function(){return mp().domain(t).range(e).unknown(i)},Ot.apply(s,arguments)}function wp(){var t=0,e=1,n=1,i=[.5],r=[0,1],s;function o(l){return l!=null&&l<=l?r[yn(i,l,0,n)]:s}function a(){var l=-1;for(i=new Array(n);++l<n;)i[l]=((l+1)*e-(l-n)*t)/(n+1);return o}return o.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,a()):[t,e]},o.range=function(l){return arguments.length?(n=(r=Array.from(l)).length-1,a()):r.slice()},o.invertExtent=function(l){var c=r.indexOf(l);return c<0?[NaN,NaN]:c<1?[t,i[0]]:c>=n?[i[n-1],e]:[i[c-1],i[c]]},o.unknown=function(l){return arguments.length&&(s=l),o},o.thresholds=function(){return i.slice()},o.copy=function(){return wp().domain([t,e]).range(r).unknown(s)},Ot.apply(hi(o),arguments)}function yp(){var t=[.5],e=[0,1],n,i=1;function r(s){return s!=null&&s<=s?e[yn(t,s,0,i)]:n}return r.domain=function(s){return arguments.length?(t=Array.from(s),i=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(s){return arguments.length?(e=Array.from(s),i=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(s){var o=e.indexOf(s);return[t[o-1],t[o]]},r.unknown=function(s){return arguments.length?(n=s,r):n},r.copy=function(){return yp().domain(t).range(e).unknown(n)},Ot.apply(r,arguments)}function VQ(t){return new Date(t)}function JQ(t){return t instanceof Date?+t:+new Date(+t)}function jf(t,e,n,i,r,s,o,a,l,c){var f=sp(),u=f.invert,h=f.domain,A=c(".%L"),d=c(":%S"),g=c("%I:%M"),m=c("%I %p"),p=c("%a %d"),w=c("%b %d"),C=c("%B"),y=c("%Y");function b(x){return(l(x)<x?A:a(x)<x?d:o(x)<x?g:s(x)<x?m:i(x)<x?r(x)<x?p:w:n(x)<x?C:y)(x)}return f.invert=function(x){return new Date(u(x))},f.domain=function(x){return arguments.length?h(Array.from(x,JQ)):h().map(VQ)},f.ticks=function(x){var I=h();return t(I[0],I[I.length-1],x??10)},f.tickFormat=function(x,I){return I==null?b:c(I)},f.nice=function(x){var I=h();return(!x||typeof x.range!="function")&&(x=e(I[0],I[I.length-1],x??10)),x?h(lp(I,x)):f},f.copy=function(){return Ds(f,jf(t,e,n,i,r,s,o,a,l,c))},f}function qQ(){return Ot.apply(jf(sb,ob,Rt,is,ts,Cn,Jo,Yo,en,xl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function KQ(){return Ot.apply(jf(ib,rb,Nt,rs,ns,ei,qo,Vo,en,Bl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function _a(){var t=0,e=1,n,i,r,s,o=ot,a=!1,l;function c(u){return u==null||isNaN(u=+u)?l:o(r===0?.5:(u=(s(u)-n)*r,a?Math.max(0,Math.min(1,u)):u))}c.domain=function(u){return arguments.length?([t,e]=u,n=s(t=+t),i=s(e=+e),r=n===i?0:1/(i-n),c):[t,e]},c.clamp=function(u){return arguments.length?(a=!!u,c):a},c.interpolator=function(u){return arguments.length?(o=u,c):o};function f(u){return function(h){var A,d;return arguments.length?([A,d]=h,o=u(A,d),c):[o(0),o(1)]}}return c.range=f(Nn),c.rangeRound=f(Qs),c.unknown=function(u){return arguments.length?(l=u,c):l},function(u){return s=u,n=u(t),i=u(e),r=n===i?0:1/(i-n),c}}function Mn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Wf(){var t=hi(_a()(ot));return t.copy=function(){return Mn(t,Wf())},kn.apply(t,arguments)}function Cp(){var t=Yf(_a()).domain([1,10]);return t.copy=function(){return Mn(t,Cp()).base(t.base())},kn.apply(t,arguments)}function Ep(){var t=Jf(_a());return t.copy=function(){return Mn(t,Ep()).constant(t.constant())},kn.apply(t,arguments)}function Xf(){var t=qf(_a());return t.copy=function(){return Mn(t,Xf()).exponent(t.exponent())},kn.apply(t,arguments)}function jQ(){return Xf.apply(null,arguments).exponent(.5)}function Ga(){var t=0,e=.5,n=1,i=1,r,s,o,a,l,c=ot,f,u=!1,h;function A(g){return isNaN(g=+g)?h:(g=.5+((g=+f(g))-s)*(i*g<i*s?a:l),c(u?Math.max(0,Math.min(1,g)):g))}A.domain=function(g){return arguments.length?([t,e,n]=g,r=f(t=+t),s=f(e=+e),o=f(n=+n),a=r===s?0:.5/(s-r),l=s===o?0:.5/(o-s),i=s<r?-1:1,A):[t,e,n]},A.clamp=function(g){return arguments.length?(u=!!g,A):u},A.interpolator=function(g){return arguments.length?(c=g,A):c};function d(g){return function(m){var p,w,C;return arguments.length?([p,w,C]=m,c=Gf(g,[p,w,C]),A):[c(0),c(.5),c(1)]}}return A.range=d(Nn),A.rangeRound=d(Qs),A.unknown=function(g){return arguments.length?(h=g,A):h},function(g){return f=g,r=g(t),s=g(e),o=g(n),a=r===s?0:.5/(s-r),l=s===o?0:.5/(o-s),i=s<r?-1:1,A}}function Ip(){var t=hi(Ga()(ot));return t.copy=function(){return Mn(t,Ip())},kn.apply(t,arguments)}function bp(){var t=Yf(Ga()).domain([.1,1,10]);return t.copy=function(){return Mn(t,bp()).base(t.base())},kn.apply(t,arguments)}function xp(){var t=Jf(Ga());return t.copy=function(){return Mn(t,xp()).constant(t.constant())},kn.apply(t,arguments)}function Zf(){var t=qf(Ga());return t.copy=function(){return Mn(t,Zf()).exponent(t.exponent())},kn.apply(t,arguments)}function WQ(){return Zf.apply(null,arguments).exponent(.5)}function Gt(t){for(var e=t.length/6|0,n=new Array(e),i=0;i<e;)n[i]="#"+t.slice(i*6,++i*6);return n}const XQ=Gt("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ZQ=Gt("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),$Q=Gt("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),eD=Gt("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),tD=Gt("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),nD=Gt("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),iD=Gt("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),rD=Gt("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),sD=Gt("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),oD=Gt("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function $f(t,e,n){const i=t-e+n*2;return t?i>0?i:1:0}const aD="identity",or="linear",Tn="log",ks="pow",Fs="sqrt",za="symlog",Bp="time",vp="utc",zt="sequential",ar="diverging",eu="quantile",Sp="quantize",Qp="threshold",Rs="ordinal",tu="point",Dp="band",nu="bin-ordinal",De="continuous",Ns="discrete",Ms="discretizing",mt="interpolating",kp="temporal";function cD(t){return function(e){let n=e[0],i=e[1],r;return i<n&&(r=n,n=i,i=r),[t.invert(n),t.invert(i)]}}function lD(t){return function(e){const n=t.range();let i=e[0],r=e[1],s=-1,o,a,l,c;for(r<i&&(a=i,i=r,r=a),l=0,c=n.length;l<c;++l)n[l]>=i&&n[l]<=r&&(s<0&&(s=l),o=l);if(!(s<0))return i=t.invertExtent(n[s]),r=t.invertExtent(n[o]),[i[0]===void 0?i[1]:i[0],r[1]===void 0?r[0]:r[1]]}}function iu(){const t=bf().unknown(void 0),e=t.domain,n=t.range;let i=[0,1],r,s,o=!1,a=0,l=0,c=.5;delete t.unknown;function f(){const u=e().length,h=i[1]<i[0],A=i[1-h],d=$f(u,a,l);let g=i[h-0];r=(A-g)/(d||1),o&&(r=Math.floor(r)),g+=(A-g-r*(u-a))*c,s=r*(1-a),o&&(g=Math.round(g),s=Math.round(s));const m=$r(u).map(p=>g+r*p);return n(h?m.reverse():m)}return t.domain=function(u){return arguments.length?(e(u),f()):e()},t.range=function(u){return arguments.length?(i=[+u[0],+u[1]],f()):i.slice()},t.rangeRound=function(u){return i=[+u[0],+u[1]],o=!0,f()},t.bandwidth=function(){return s},t.step=function(){return r},t.round=function(u){return arguments.length?(o=!!u,f()):o},t.padding=function(u){return arguments.length?(l=Math.max(0,Math.min(1,u)),a=l,f()):a},t.paddingInner=function(u){return arguments.length?(a=Math.max(0,Math.min(1,u)),f()):a},t.paddingOuter=function(u){return arguments.length?(l=Math.max(0,Math.min(1,u)),f()):l},t.align=function(u){return arguments.length?(c=Math.max(0,Math.min(1,u)),f()):c},t.invertRange=function(u){if(u[0]==null||u[1]==null)return;const h=i[1]<i[0],A=h?n().reverse():n(),d=A.length-1;let g=+u[0],m=+u[1],p,w,C;if(!(g!==g||m!==m)&&(m<g&&(C=g,g=m,m=C),!(m<A[0]||g>i[1-h])))return p=Math.max(0,yn(A,g)-1),w=g===m?p:yn(A,m)-1,g-A[p]>s+1e-10&&++p,h&&(C=p,p=d-w,w=d-C),p>w?void 0:e().slice(p,w+1)},t.invert=function(u){const h=t.invertRange([u,u]);return h&&h[0]},t.copy=function(){return iu().domain(e()).range(i).round(o).paddingInner(a).paddingOuter(l).align(c)},f()}function Fp(t){const e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return Fp(e())},t}function fD(){return Fp(iu().paddingInner(1))}var uD=Array.prototype.map;function AD(t){return uD.call(t,Gr)}const hD=Array.prototype.slice;function Rp(){let t=[],e=[];function n(i){return i==null||i!==i?void 0:e[(yn(t,i)-1)%e.length]}return n.domain=function(i){return arguments.length?(t=AD(i),n):t.slice()},n.range=function(i){return arguments.length?(e=hD.call(i),n):e.slice()},n.tickFormat=function(i,r){return op(t[0],xt(t),i??10,r)},n.copy=function(){return Rp().domain(n.domain()).range(n.range())},n}const Ha=new Map,dD=Symbol("vega_scale");function gD(t){return t[dD]=!0,t}function pD(t,e,n){const i=function(){const s=e();return s.invertRange||(s.invertRange=s.invert?cD(s):s.invertExtent?lD(s):void 0),s.type=t,gD(s)};return i.metadata=Ro(tl(n)),i}function ie(t,e,n){return arguments.length>1?(Ha.set(t,pD(t,e,n)),this):mD(t)?Ha.get(t):void 0}ie(aD,cp),ie(or,ap,De),ie(Tn,Vf,[De,Tn]),ie(ks,Kf,De),ie(Fs,YQ,De),ie(za,gp,De),ie(Bp,qQ,[De,kp]),ie(vp,KQ,[De,kp]),ie(zt,Wf,[De,mt]),ie(`${zt}-${or}`,Wf,[De,mt]),ie(`${zt}-${Tn}`,Cp,[De,mt,Tn]),ie(`${zt}-${ks}`,Xf,[De,mt]),ie(`${zt}-${Fs}`,jQ,[De,mt]),ie(`${zt}-${za}`,Ep,[De,mt]),ie(`${ar}-${or}`,Ip,[De,mt]),ie(`${ar}-${Tn}`,bp,[De,mt,Tn]),ie(`${ar}-${ks}`,Zf,[De,mt]),ie(`${ar}-${Fs}`,WQ,[De,mt]),ie(`${ar}-${za}`,xp,[De,mt]),ie(eu,mp,[Ms,eu]),ie(Sp,wp,Ms),ie(Qp,yp,Ms),ie(nu,Rp,[Ns,Ms]),ie(Rs,bf,Ns),ie(Dp,iu,Ns),ie(tu,fD,Ns);function mD(t){return Ha.has(t)}function Ts(t,e){const n=Ha.get(t);return n&&n.metadata[e]}function Pe(t){return Ts(t,De)}function on(t){return Ts(t,Ns)}function di(t){return Ts(t,Ms)}function Np(t){return Ts(t,Tn)}function Ya(t){return Ts(t,mt)}function wD(t,e){const n=e[0],i=xt(e)-n;return function(r){return t(n+r*i)}}function Va(t,e,n){return Gf(Mp(e||"rgb",n),t)}function yD(t,e){const n=new Array(e),i=e+1;for(let r=0;r<e;)n[r]=t(++r/i);return n}function Mp(t,e){const n=RQ[CD(t)];return e!=null&&n&&n.gamma?n.gamma(e):n}function CD(t){return"interpolate"+t.toLowerCase().split("-").map(e=>e[0].toUpperCase()+e.slice(1)).join("")}const ED={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"},ID={accent:ZQ,category10:XQ,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:$Q,observable10:eD,paired:tD,pastel1:nD,pastel2:iD,set1:rD,set2:sD,set3:oD,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function Tp(t){if(Ce(t))return t;const e=t.length/6|0,n=new Array(e);for(let i=0;i<e;)n[i]="#"+t.slice(i*6,++i*6);return n}function Pp(t,e){for(const n in t)ru(n,e(t[n]))}const Lp={};Pp(ID,Tp),Pp(ED,t=>Va(Tp(t)));function ru(t,e){return t=t&&t.toLowerCase(),arguments.length>1?(Lp[t]=e,this):Lp[t]}function su(){const t=e=>e;return t.invert=e=>e,t.copy=su,t.invertRange=()=>{},t.type="null",t}const ou=4294967295,bD=.6,xD=4294967295;function BD(t){let e=t>>>0;return e^=e>>>16,e=Math.imul(e,2146121005),e^=e>>>15,e=Math.imul(e,2221713035),e^=e>>>16,e>>>0}function vD(t,e={}){const n=Array.from(t,l=>QD(l,"key")),i=n.length,r=e.maxLoadFactor??bD;if(!(r>0&&r<1))throw new Error("maxLoadFactor must be between 0 and 1.");const s=e.capacity??DD(Math.ceil(i/r));if(!Number.isSafeInteger(s)||s<1)throw new Error("capacity must be a positive power of two.");if((s&s-1)!==0)throw new Error("capacity must be a power of two.");const o=new Uint32Array(s);o.fill(ou);const a=s-1;for(const l of n){if(l===ou)throw new Error("Hash table keys must not equal the empty sentinel (0xffffffff).");let c=BD(l)&a,f=!1;for(let u=0;u<s;u+=1){const h=o[c];if(h===ou||h===l){o[c]=l,f=!0;break}c=c+1&a}if(!f)throw new Error("Hash table insertion failed. Increase capacity or lower load factor.")}return{table:o,capacity:s,size:i}}function SD(t,e){if(!Number.isSafeInteger(t)||t<1)throw new Error("capacity must be a positive integer.");if((t&t-1)!==0)throw new Error("capacity must be a power of two.");if(!Number.isSafeInteger(e)||e<1)throw new Error("maxTextureSize must be a positive integer.");const n=e*e;if(t>n)throw new Error("Selection hash table exceeds maximum texture capacity.");const i=1<<Math.floor(Math.log2(e)),r=Math.min(t,i),s=t/r;if(s>e)throw new Error("Selection hash table dimensions exceed maximum texture size.");return{width:r,height:s}}function QD(t,e){if(!Number.isSafeInteger(t)||t<0||t>xD)throw new Error(e+" must be a non-negative u32.");return t>>>0}function DD(t){let e=Math.max(1,t);return e-=1,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}class kD{constructor(e,n,i={}){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 r=document.createElement("canvas");e.appendChild(r);const s=GS(r,{antialias:!0,depth:!1,premultipliedAlpha:!0,...i});if(!s)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!Ji(s))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");pg(s);const o=s.getExtension("WEBGL_provoking_vertex");o&&o.provokingVertexWEBGL(o.FIRST_VERTEX_CONVENTION_WEBGL),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),this.canvas=r,this.gl=s,this._pickingAttachmentOptions=[{format:s.RGBA,type:s.UNSIGNED_BYTE,minMag:s.LINEAR,wrap:s.CLAMP_TO_EDGE}],this._pickingBufferInfo=dg(s,this._pickingAttachmentOptions),s.bindFramebuffer(s.FRAMEBUFFER,null),this.adjustGl()}invalidateSize(){this._logicalCanvasSize=void 0,this.adjustGl()}compileShader(e,n){const i="#version 300 es",r="precision mediump float;";Ce(n)&&(n=n.join(`
|
|
394
|
+
};`)(this)}else this.updateFromDatum=e=>{for(let n=0;n<this.dataUpdaters.length;n++)this.dataUpdaters[n](e)}}pushFromDatum(e){this.updateFromDatum(e),this.pushAll()}}const rr=5,ku=127;function Ru(t){const e=[];for(let d=0;d<=ku;d++)e.push(void 0);const n=new Map;for(const d of t.chars)d.id<=ku?e[d.id]=d:n.set(d.id,d);const i=8722;n.has(i)||n.set(i,e[45]);function r(d){return(d<=ku?e[d]:n.get(d))||e[63]}function s(d){return r(d.charCodeAt(0))}const o=t.common.base,a=s("x"),l=s("X"),c=s("q"),u=a.height-rr*2,f=l.height-rr*2,h=c.height-a.height+c.yoffset-a.yoffset;function A(d,g=1){let m=0;for(let p=0;p<d.length;p++)m+=r(d.charCodeAt(p)).xadvance;return m/o*g}return{measureWidth:A,getCharByCode:r,getChar:s,xHeight:u,capHeight:f,descent:h,common:t.common}}function sr(t,e=0,n=1){return Math.max(e,Math.min(n,t))}const Dg=2**31-1,vD=-2147483648;function BD(t,e,n,i=n){const r=new Array(t);r.fill(Dg);let s=vD,o=-1/0,a=!1;const l=new Array(t);l.fill(0);const c=e[0],f=(e[1]-e[0])/t,h=(p,w)=>{const C=(p-c)/f,y=Math.floor(C);return sr(w&&y==C?y-1:y,0,t-1)};function A(p,w,C){if(a)return;if(w>s)s=w;else{a=!0;return}const y=n(p);if(y<o){a=!0;return}o=y;const I=h(y,!1);r[I]>w&&(r[I]=w),l[I]<C&&(l[I]=C)}function d(p,w,C){if(a)return;if(w>s)s=w;else{a=!0,console.debug("Items (vertices) are not ordered properly. Disabling binned index.");return}const y=n(p),I=i(p);if(y<o){a=!0;return}else if(I<y){a=!0;return}o=y;const x=h(y,!1),E=h(I,!0);for(let S=x;S<=E;S++)r[S]>w&&(r[S]=w),l[S]<C&&(l[S]=C)}const g=(p,w,C=[0,0])=>{const y=h(p,!1),I=h(w,!0),x=r[y],E=Math.max(l[I],x);return C[0]=x,C[1]=E,C},m=()=>{if(a)return;for(let w=1;w<l.length;w++)l[w]<l[w-1]&&(l[w]=l[w-1]);let p=!0;for(let w=r.length-1;w>0;w--)p&&r[w]==Dg?(r[w]=l[w],p=!1):r[w-1]>r[w]&&(r[w-1]=r[w]);return g};return A.getIndex=m,d.getIndex=m,n==i?A:d}function Ut(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Tn(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 Na=Symbol("implicit");function Fu(){var t=new Xt,e=[],n=[],i=Na;function r(s){let o=t.get(s);if(o===void 0){if(i!==Na)return i;t.set(s,o=e.push(s)-1)}return n[o%n.length]}return r.domain=function(s){if(!arguments.length)return e.slice();e=[],t=new Xt;for(const o of s)t.has(o)||t.set(o,e.push(o)-1);return r},r.range=function(s){return arguments.length?(n=Array.from(s),r):n.slice()},r.unknown=function(s){return arguments.length?(i=s,r):i},r.copy=function(){return Fu(e,n).unknown(i)},Ut.apply(r,arguments),r}function or(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ks(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Pn(){}var gi=.7,ar=1/gi,cr="\\s*([+-]?\\d+)\\s*",Rs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",_t="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SD=/^#([0-9a-f]{3,8})$/,DD=new RegExp(`^rgb\\(${cr},${cr},${cr}\\)$`),QD=new RegExp(`^rgb\\(${_t},${_t},${_t}\\)$`),kD=new RegExp(`^rgba\\(${cr},${cr},${cr},${Rs}\\)$`),RD=new RegExp(`^rgba\\(${_t},${_t},${_t},${Rs}\\)$`),FD=new RegExp(`^hsl\\(${Rs},${_t},${_t}\\)$`),ND=new RegExp(`^hsla\\(${Rs},${_t},${_t},${Rs}\\)$`),Qg={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};or(Pn,Ln,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:kg,formatHex:kg,formatHex8:MD,formatHsl:TD,formatRgb:Rg,toString:Rg});function kg(){return this.rgb().formatHex()}function MD(){return this.rgb().formatHex8()}function TD(){return Pg(this).formatHsl()}function Rg(){return this.rgb().formatRgb()}function Ln(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=SD.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Fg(e):n===3?new Te(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ma(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ma(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=DD.exec(t))?new Te(e[1],e[2],e[3],1):(e=QD.exec(t))?new Te(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=kD.exec(t))?Ma(e[1],e[2],e[3],e[4]):(e=RD.exec(t))?Ma(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=FD.exec(t))?Tg(e[1],e[2]/100,e[3]/100,1):(e=ND.exec(t))?Tg(e[1],e[2]/100,e[3]/100,e[4]):Qg.hasOwnProperty(t)?Fg(Qg[t]):t==="transparent"?new Te(NaN,NaN,NaN,0):null}function Fg(t){return new Te(t>>16&255,t>>8&255,t&255,1)}function Ma(t,e,n,i){return i<=0&&(t=e=n=NaN),new Te(t,e,n,i)}function Nu(t){return t instanceof Pn||(t=Ln(t)),t?(t=t.rgb(),new Te(t.r,t.g,t.b,t.opacity)):new Te}function Ta(t,e,n,i){return arguments.length===1?Nu(t):new Te(t,e,n,i??1)}function Te(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}or(Te,Ta,ks(Pn,{brighter(t){return t=t==null?ar:Math.pow(ar,t),new Te(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?gi:Math.pow(gi,t),new Te(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Te(pi(this.r),pi(this.g),pi(this.b),Pa(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:Ng,formatHex:Ng,formatHex8:PD,formatRgb:Mg,toString:Mg}));function Ng(){return`#${mi(this.r)}${mi(this.g)}${mi(this.b)}`}function PD(){return`#${mi(this.r)}${mi(this.g)}${mi(this.b)}${mi((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mg(){const t=Pa(this.opacity);return`${t===1?"rgb(":"rgba("}${pi(this.r)}, ${pi(this.g)}, ${pi(this.b)}${t===1?")":`, ${t})`}`}function Pa(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function pi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function mi(t){return t=pi(t),(t<16?"0":"")+t.toString(16)}function Tg(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Dt(t,e,n,i)}function Pg(t){if(t instanceof Dt)return new Dt(t.h,t.s,t.l,t.opacity);if(t instanceof Pn||(t=Ln(t)),!t)return new Dt;if(t instanceof Dt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),o=NaN,a=s-r,l=(s+r)/2;return a?(e===s?o=(n-i)/a+(n<i)*6:n===s?o=(i-e)/a+2:o=(e-n)/a+4,a/=l<.5?s+r:2-s-r,o*=60):a=l>0&&l<1?0:o,new Dt(o,a,l,t.opacity)}function Mu(t,e,n,i){return arguments.length===1?Pg(t):new Dt(t,e,n,i??1)}function Dt(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}or(Dt,Mu,ks(Pn,{brighter(t){return t=t==null?ar:Math.pow(ar,t),new Dt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gi:Math.pow(gi,t),new Dt(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,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Te(Tu(t>=240?t-240:t+120,r,i),Tu(t,r,i),Tu(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new Dt(Lg(this.h),La(this.s),La(this.l),Pa(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=Pa(this.opacity);return`${t===1?"hsl(":"hsla("}${Lg(this.h)}, ${La(this.s)*100}%, ${La(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Lg(t){return t=(t||0)%360,t<0?t+360:t}function La(t){return Math.max(0,Math.min(1,t||0))}function Tu(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 Og=Math.PI/180,Ug=180/Math.PI,Oa=18,_g=.96422,zg=1,Gg=.82521,Hg=4/29,lr=6/29,Yg=3*lr*lr,LD=lr*lr*lr;function Vg(t){if(t instanceof zt)return new zt(t.l,t.a,t.b,t.opacity);if(t instanceof an)return Jg(t);t instanceof Te||(t=Nu(t));var e=_u(t.r),n=_u(t.g),i=_u(t.b),r=Lu((.2225045*e+.7168786*n+.0606169*i)/zg),s,o;return e===n&&n===i?s=o=r:(s=Lu((.4360747*e+.3850649*n+.1430804*i)/_g),o=Lu((.0139322*e+.0971045*n+.7141733*i)/Gg)),new zt(116*r-16,500*(s-r),200*(r-o),t.opacity)}function Pu(t,e,n,i){return arguments.length===1?Vg(t):new zt(t,e,n,i??1)}function zt(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}or(zt,Pu,ks(Pn,{brighter(t){return new zt(this.l+Oa*(t??1),this.a,this.b,this.opacity)},darker(t){return new zt(this.l-Oa*(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=_g*Ou(e),t=zg*Ou(t),n=Gg*Ou(n),new Te(Uu(3.1338561*e-1.6168667*t-.4906146*n),Uu(-.9787684*e+1.9161415*t+.033454*n),Uu(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Lu(t){return t>LD?Math.pow(t,1/3):t/Yg+Hg}function Ou(t){return t>lr?t*t*t:Yg*(t-Hg)}function Uu(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function _u(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function OD(t){if(t instanceof an)return new an(t.h,t.c,t.l,t.opacity);if(t instanceof zt||(t=Vg(t)),t.a===0&&t.b===0)return new an(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Ug;return new an(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function zu(t,e,n,i){return arguments.length===1?OD(t):new an(t,e,n,i??1)}function an(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function Jg(t){if(isNaN(t.h))return new zt(t.l,0,0,t.opacity);var e=t.h*Og;return new zt(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}or(an,zu,ks(Pn,{brighter(t){return new an(this.h,this.c,this.l+Oa*(t??1),this.opacity)},darker(t){return new an(this.h,this.c,this.l-Oa*(t??1),this.opacity)},rgb(){return Jg(this).rgb()}}));var qg=-.14861,Gu=1.78277,Hu=-.29227,Ua=-.90649,Fs=1.97294,Kg=Fs*Ua,jg=Fs*Gu,Wg=Gu*Hu-Ua*qg;function UD(t){if(t instanceof wi)return new wi(t.h,t.s,t.l,t.opacity);t instanceof Te||(t=Nu(t));var e=t.r/255,n=t.g/255,i=t.b/255,r=(Wg*i+Kg*e-jg*n)/(Wg+Kg-jg),s=i-r,o=(Fs*(n-r)-Hu*s)/Ua,a=Math.sqrt(o*o+s*s)/(Fs*r*(1-r)),l=a?Math.atan2(o,s)*Ug-120:NaN;return new wi(l<0?l+360:l,a,r,t.opacity)}function Yu(t,e,n,i){return arguments.length===1?UD(t):new wi(t,e,n,i??1)}function wi(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}or(wi,Yu,ks(Pn,{brighter(t){return t=t==null?ar:Math.pow(ar,t),new wi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gi:Math.pow(gi,t),new wi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Og,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),i=Math.cos(t),r=Math.sin(t);return new Te(255*(e+n*(qg*i+Gu*r)),255*(e+n*(Hu*i+Ua*r)),255*(e+n*(Fs*i)),this.opacity)}}));function Xg(t,e,n,i,r){var s=t*t,o=s*t;return((1-3*t+3*s-o)*e+(4-6*s+3*o)*n+(1+3*t+3*s-3*o)*i+o*r)/6}function Zg(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),r=t[i],s=t[i+1],o=i>0?t[i-1]:2*r-s,a=i<e-1?t[i+2]:2*s-r;return Xg((n-i/e)*e,o,r,s,a)}}function $g(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),r=t[(i+e-1)%e],s=t[i%e],o=t[(i+1)%e],a=t[(i+2)%e];return Xg((n-i/e)*e,r,s,o,a)}}const _a=t=>()=>t;function ep(t,e){return function(n){return t+n*e}}function _D(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function za(t,e){var n=e-t;return n?ep(t,n>180||n<-180?n-360*Math.round(n/360):n):_a(isNaN(t)?e:t)}function zD(t){return(t=+t)==1?Pe:function(e,n){return n-e?_D(e,n,t):_a(isNaN(e)?n:e)}}function Pe(t,e){var n=e-t;return n?ep(t,n):_a(isNaN(t)?e:t)}const Vu=(function t(e){var n=zD(e);function i(r,s){var o=n((r=Ta(r)).r,(s=Ta(s)).r),a=n(r.g,s.g),l=n(r.b,s.b),c=Pe(r.opacity,s.opacity);return function(u){return r.r=o(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i})(1);function tp(t){return function(e){var n=e.length,i=new Array(n),r=new Array(n),s=new Array(n),o,a;for(o=0;o<n;++o)a=Ta(e[o]),i[o]=a.r||0,r[o]=a.g||0,s[o]=a.b||0;return i=t(i),r=t(r),s=t(s),a.opacity=1,function(l){return a.r=i(l),a.g=r(l),a.b=s(l),a+""}}}var GD=tp(Zg),HD=tp($g);function Ju(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(s){for(r=0;r<n;++r)i[r]=t[r]*(1-s)+e[r]*s;return i}}function np(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function YD(t,e){return(np(e)?Ju:ip)(t,e)}function ip(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),s=new Array(n),o;for(o=0;o<i;++o)r[o]=On(t[o],e[o]);for(;o<n;++o)s[o]=e[o];return function(a){for(o=0;o<i;++o)s[o]=r[o](a);return s}}function rp(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Qt(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function sp(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=On(t[r],e[r]):i[r]=e[r];return function(s){for(r in n)i[r]=n[r](s);return i}}var qu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ku=new RegExp(qu.source,"g");function VD(t){return function(){return t}}function JD(t){return function(e){return t(e)+""}}function op(t,e){var n=qu.lastIndex=Ku.lastIndex=0,i,r,s,o=-1,a=[],l=[];for(t=t+"",e=e+"";(i=qu.exec(t))&&(r=Ku.exec(e));)(s=r.index)>n&&(s=e.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(i=i[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:Qt(i,r)})),n=Ku.lastIndex;return n<e.length&&(s=e.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?JD(l[0].x):VD(e):(e=l.length,function(c){for(var u=0,f;u<e;++u)a[(f=l[u]).i]=f.x(c);return a.join("")})}function On(t,e){var n=typeof e,i;return e==null||n==="boolean"?_a(e):(n==="number"?Qt:n==="string"?(i=Ln(e))?(e=i,Vu):op:e instanceof Ln?Vu:e instanceof Date?rp:np(e)?Ju:Array.isArray(e)?ip:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?sp:Qt)(t,e)}function qD(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function KD(t,e){var n=za(+t,+e);return function(i){var r=n(i);return r-360*Math.floor(r/360)}}function Ns(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var ap=180/Math.PI,ju={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cp(t,e,n,i,r,s){var o,a,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,o=-o),{translateX:r,translateY:s,rotate:Math.atan2(e,t)*ap,skewX:Math.atan(l)*ap,scaleX:o,scaleY:a}}var Ga;function jD(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ju:cp(e.a,e.b,e.c,e.d,e.e,e.f)}function WD(t){return t==null||(Ga||(Ga=document.createElementNS("http://www.w3.org/2000/svg","g")),Ga.setAttribute("transform",t),!(t=Ga.transform.baseVal.consolidate()))?ju:(t=t.matrix,cp(t.a,t.b,t.c,t.d,t.e,t.f))}function lp(t,e,n,i){function r(c){return c.length?c.pop()+" ":""}function s(c,u,f,h,A,d){if(c!==f||u!==h){var g=A.push("translate(",null,e,null,n);d.push({i:g-4,x:Qt(c,f)},{i:g-2,x:Qt(u,h)})}else(f||h)&&A.push("translate("+f+e+h+n)}function o(c,u,f,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:f.push(r(f)+"rotate(",null,i)-2,x:Qt(c,u)})):u&&f.push(r(f)+"rotate("+u+i)}function a(c,u,f,h){c!==u?h.push({i:f.push(r(f)+"skewX(",null,i)-2,x:Qt(c,u)}):u&&f.push(r(f)+"skewX("+u+i)}function l(c,u,f,h,A,d){if(c!==f||u!==h){var g=A.push(r(A)+"scale(",null,",",null,")");d.push({i:g-4,x:Qt(c,f)},{i:g-2,x:Qt(u,h)})}else(f!==1||h!==1)&&A.push(r(A)+"scale("+f+","+h+")")}return function(c,u){var f=[],h=[];return c=t(c),u=t(u),s(c.translateX,c.translateY,u.translateX,u.translateY,f,h),o(c.rotate,u.rotate,f,h),a(c.skewX,u.skewX,f,h),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,f,h),c=u=null,function(A){for(var d=-1,g=h.length,m;++d<g;)f[(m=h[d]).i]=m.x(A);return f.join("")}}}var XD=lp(jD,"px, ","px)","deg)"),ZD=lp(WD,", ",")",")"),$D=1e-12;function up(t){return((t=Math.exp(t))+1/t)/2}function eQ(t){return((t=Math.exp(t))-1/t)/2}function tQ(t){return((t=Math.exp(2*t))-1)/(t+1)}const nQ=(function t(e,n,i){function r(s,o){var a=s[0],l=s[1],c=s[2],u=o[0],f=o[1],h=o[2],A=u-a,d=f-l,g=A*A+d*d,m,p;if(g<$D)p=Math.log(h/c)/e,m=function(E){return[a+E*A,l+E*d,c*Math.exp(e*E*p)]};else{var w=Math.sqrt(g),C=(h*h-c*c+i*g)/(2*c*n*w),y=(h*h-c*c-i*g)/(2*h*n*w),I=Math.log(Math.sqrt(C*C+1)-C),x=Math.log(Math.sqrt(y*y+1)-y);p=(x-I)/e,m=function(E){var S=E*p,D=up(I),B=c/(n*w)*(D*tQ(e*S+I)-eQ(I));return[a+B*A,l+B*d,c*D/up(e*S+I)]}}return m.duration=p*1e3*e/Math.SQRT2,m}return r.rho=function(s){var o=Math.max(.001,+s),a=o*o,l=a*a;return t(o,a,l)},r})(Math.SQRT2,2,4);function fp(t){return function(e,n){var i=t((e=Mu(e)).h,(n=Mu(n)).h),r=Pe(e.s,n.s),s=Pe(e.l,n.l),o=Pe(e.opacity,n.opacity);return function(a){return e.h=i(a),e.s=r(a),e.l=s(a),e.opacity=o(a),e+""}}}const iQ=fp(za);var rQ=fp(Pe);function sQ(t,e){var n=Pe((t=Pu(t)).l,(e=Pu(e)).l),i=Pe(t.a,e.a),r=Pe(t.b,e.b),s=Pe(t.opacity,e.opacity);return function(o){return t.l=n(o),t.a=i(o),t.b=r(o),t.opacity=s(o),t+""}}function hp(t){return function(e,n){var i=t((e=zu(e)).h,(n=zu(n)).h),r=Pe(e.c,n.c),s=Pe(e.l,n.l),o=Pe(e.opacity,n.opacity);return function(a){return e.h=i(a),e.c=r(a),e.l=s(a),e.opacity=o(a),e+""}}}const oQ=hp(za);var aQ=hp(Pe);function Ap(t){return(function e(n){n=+n;function i(r,s){var o=t((r=Yu(r)).h,(s=Yu(s)).h),a=Pe(r.s,s.s),l=Pe(r.l,s.l),c=Pe(r.opacity,s.opacity);return function(u){return r.h=o(u),r.s=a(u),r.l=l(Math.pow(u,n)),r.opacity=c(u),r+""}}return i.gamma=e,i})(1)}const cQ=Ap(za);var lQ=Ap(Pe);function Wu(t,e){e===void 0&&(e=t,t=On);for(var n=0,i=e.length-1,r=e[0],s=new Array(i<0?0:i);n<i;)s[n]=t(r,r=e[++n]);return function(o){var a=Math.max(0,Math.min(i-1,Math.floor(o*=i)));return s[a](o-a)}}function uQ(t,e){for(var n=new Array(e),i=0;i<e;++i)n[i]=t(i/(e-1));return n}const fQ=Object.freeze(Object.defineProperty({__proto__:null,interpolate:On,interpolateArray:YD,interpolateBasis:Zg,interpolateBasisClosed:$g,interpolateCubehelix:cQ,interpolateCubehelixLong:lQ,interpolateDate:rp,interpolateDiscrete:qD,interpolateHcl:oQ,interpolateHclLong:aQ,interpolateHsl:iQ,interpolateHslLong:rQ,interpolateHue:KD,interpolateLab:sQ,interpolateNumber:Qt,interpolateNumberArray:Ju,interpolateObject:sp,interpolateRgb:Vu,interpolateRgbBasis:GD,interpolateRgbBasisClosed:HD,interpolateRound:Ns,interpolateString:op,interpolateTransformCss:XD,interpolateTransformSvg:ZD,interpolateZoom:nQ,piecewise:Wu,quantize:uQ},Symbol.toStringTag,{value:"Module"}));function hQ(t){return function(){return t}}function Xu(t){return+t}var dp=[0,1];function ct(t){return t}function Zu(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:hQ(isNaN(e)?NaN:.5)}function AQ(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function dQ(t,e,n){var i=t[0],r=t[1],s=e[0],o=e[1];return r<i?(i=Zu(r,i),s=n(o,s)):(i=Zu(i,r),s=n(s,o)),function(a){return s(i(a))}}function gQ(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),s=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)r[o]=Zu(t[o],t[o+1]),s[o]=n(e[o],e[o+1]);return function(a){var l=xn(t,a,1,i)-1;return s[l](r[l](a))}}function Ms(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ha(){var t=dp,e=dp,n=On,i,r,s,o=ct,a,l,c;function u(){var h=Math.min(t.length,e.length);return o!==ct&&(o=AQ(t[0],t[h-1])),a=h>2?gQ:dQ,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?s:(l||(l=a(t.map(i),e,n)))(i(o(h)))}return f.invert=function(h){return o(r((c||(c=a(e,t.map(i),Qt)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Xu),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=Ns,u()},f.clamp=function(h){return arguments.length?(o=h?!0:ct,u()):o!==ct},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(s=h,f):s},function(h,A){return i=h,r=A,u()}}function gp(){return Ha()(ct,ct)}function pp(t,e,n,i){var r=ri(t,e,n),s;switch(i=Hi(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(s=B2(r,o))&&(i.precision=s),Ad(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=S2(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=v2(r))&&(i.precision=s-(i.type==="%")*2);break}}return He(i)}function yi(t){var e=t.domain;return t.ticks=function(n){var i=e();return Yo(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return pp(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,s=i.length-1,o=i[r],a=i[s],l,c,u=10;for(a<o&&(c=o,o=a,a=c,c=r,r=s,s=c);u-- >0;){if(c=bl(o,a,n),c===l)return i[r]=o,i[s]=a,e(i);if(c>0)o=Math.floor(o/c)*c,a=Math.ceil(a/c)*c;else if(c<0)o=Math.ceil(o*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function mp(){var t=gp();return t.copy=function(){return Ms(t,mp())},Ut.apply(t,arguments),yi(t)}function wp(t){var e;function n(i){return i==null||isNaN(i=+i)?e:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(t=Array.from(i,Xu),n):t.slice()},n.unknown=function(i){return arguments.length?(e=i,n):e},n.copy=function(){return wp(t).unknown(e)},t=arguments.length?Array.from(t,Xu):[0,1],yi(n)}function yp(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],s=t[i],o;return s<r&&(o=n,n=i,i=o,o=r,r=s,s=o),t[n]=e.floor(r),t[i]=e.ceil(s),t}function Cp(t){return Math.log(t)}function bp(t){return Math.exp(t)}function pQ(t){return-Math.log(-t)}function mQ(t){return-Math.exp(-t)}function wQ(t){return isFinite(t)?+("1e"+t):t<0?0:t}function yQ(t){return t===10?wQ:t===Math.E?Math.exp:e=>Math.pow(t,e)}function CQ(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 Ep(t){return(e,n)=>-t(-e,n)}function $u(t){const e=t(Cp,bp),n=e.domain;let i=10,r,s;function o(){return r=CQ(i),s=yQ(i),n()[0]<0?(r=Ep(r),s=Ep(s),t(pQ,mQ)):t(Cp,bp),e}return e.base=function(a){return arguments.length?(i=+a,o()):i},e.domain=function(a){return arguments.length?(n(a),o()):n()},e.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const f=u<c;f&&([c,u]=[u,c]);let h=r(c),A=r(u),d,g;const m=a==null?10:+a;let p=[];if(!(i%1)&&A-h<m){if(h=Math.floor(h),A=Math.ceil(A),c>0){for(;h<=A;++h)for(d=1;d<i;++d)if(g=h<0?d/s(-h):d*s(h),!(g<c)){if(g>u)break;p.push(g)}}else for(;h<=A;++h)for(d=i-1;d>=1;--d)if(g=h>0?d/s(-h):d*s(h),!(g<c)){if(g>u)break;p.push(g)}p.length*2<m&&(p=Yo(c,u,m))}else p=Yo(h,A,Math.min(A-h,m)).map(s);return f?p.reverse():p},e.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=Hi(l)).precision==null&&(l.trim=!0),l=He(l)),a===1/0)return l;const c=Math.max(1,i*a/e.ticks().length);return u=>{let f=u/s(Math.round(r(u)));return f*i<i-.5&&(f*=i),f<=c?l(u):""}},e.nice=()=>n(yp(n(),{floor:a=>s(Math.floor(r(a))),ceil:a=>s(Math.ceil(r(a)))})),e}function ef(){const t=$u(Ha()).domain([1,10]);return t.copy=()=>Ms(t,ef()).base(t.base()),Ut.apply(t,arguments),t}function Ip(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function xp(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function tf(t){var e=1,n=t(Ip(e),xp(e));return n.constant=function(i){return arguments.length?t(Ip(e=+i),xp(e)):e},yi(n)}function vp(){var t=tf(Ha());return t.copy=function(){return Ms(t,vp()).constant(t.constant())},Ut.apply(t,arguments)}function Bp(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function bQ(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function EQ(t){return t<0?-t*t:t*t}function nf(t){var e=t(ct,ct),n=1;function i(){return n===1?t(ct,ct):n===.5?t(bQ,EQ):t(Bp(n),Bp(1/n))}return e.exponent=function(r){return arguments.length?(n=+r,i()):n},yi(e)}function rf(){var t=nf(Ha());return t.copy=function(){return Ms(t,rf()).exponent(t.exponent())},Ut.apply(t,arguments),t}function IQ(){return rf.apply(null,arguments).exponent(.5)}function Sp(){var t=[],e=[],n=[],i;function r(){var o=0,a=Math.max(1,e.length);for(n=new Array(a-1);++o<a;)n[o-1]=ad(t,o/a);return s}function s(o){return o==null||isNaN(o=+o)?i:e[xn(n,o)]}return s.invertExtent=function(o){var a=e.indexOf(o);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},s.domain=function(o){if(!arguments.length)return t.slice();t=[];for(let a of o)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(ni),r()},s.range=function(o){return arguments.length?(e=Array.from(o),r()):e.slice()},s.unknown=function(o){return arguments.length?(i=o,s):i},s.quantiles=function(){return n.slice()},s.copy=function(){return Sp().domain(t).range(e).unknown(i)},Ut.apply(s,arguments)}function Dp(){var t=0,e=1,n=1,i=[.5],r=[0,1],s;function o(l){return l!=null&&l<=l?r[xn(i,l,0,n)]:s}function a(){var l=-1;for(i=new Array(n);++l<n;)i[l]=((l+1)*e-(l-n)*t)/(n+1);return o}return o.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,a()):[t,e]},o.range=function(l){return arguments.length?(n=(r=Array.from(l)).length-1,a()):r.slice()},o.invertExtent=function(l){var c=r.indexOf(l);return c<0?[NaN,NaN]:c<1?[t,i[0]]:c>=n?[i[n-1],e]:[i[c-1],i[c]]},o.unknown=function(l){return arguments.length&&(s=l),o},o.thresholds=function(){return i.slice()},o.copy=function(){return Dp().domain([t,e]).range(r).unknown(s)},Ut.apply(yi(o),arguments)}function Qp(){var t=[.5],e=[0,1],n,i=1;function r(s){return s!=null&&s<=s?e[xn(t,s,0,i)]:n}return r.domain=function(s){return arguments.length?(t=Array.from(s),i=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(s){return arguments.length?(e=Array.from(s),i=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(s){var o=e.indexOf(s);return[t[o-1],t[o]]},r.unknown=function(s){return arguments.length?(n=s,r):n},r.copy=function(){return Qp().domain(t).range(e).unknown(n)},Ut.apply(r,arguments)}function xQ(t){return new Date(t)}function vQ(t){return t instanceof Date?+t:+new Date(+t)}function sf(t,e,n,i,r,s,o,a,l,c){var u=gp(),f=u.invert,h=u.domain,A=c(".%L"),d=c(":%S"),g=c("%I:%M"),m=c("%I %p"),p=c("%a %d"),w=c("%b %d"),C=c("%B"),y=c("%Y");function I(x){return(l(x)<x?A:a(x)<x?d:o(x)<x?g:s(x)<x?m:i(x)<x?r(x)<x?p:w:n(x)<x?C:y)(x)}return u.invert=function(x){return new Date(f(x))},u.domain=function(x){return arguments.length?h(Array.from(x,vQ)):h().map(xQ)},u.ticks=function(x){var E=h();return t(E[0],E[E.length-1],x??10)},u.tickFormat=function(x,E){return E==null?I:c(E)},u.nice=function(x){var E=h();return(!x||typeof x.range!="function")&&(x=e(E[0],E[E.length-1],x??10)),x?h(yp(E,x)):u},u.copy=function(){return Ms(u,sf(t,e,n,i,r,s,o,a,l,c))},u}function BQ(){return Ut.apply(sf(O2,U2,Nt,cs,os,vn,Wo,Ko,tn,Fl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function SQ(){return Ut.apply(sf(P2,L2,Mt,ls,as,si,Xo,jo,tn,Nl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ya(){var t=0,e=1,n,i,r,s,o=ct,a=!1,l;function c(f){return f==null||isNaN(f=+f)?l:o(r===0?.5:(f=(s(f)-n)*r,a?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([t,e]=f,n=s(t=+t),i=s(e=+e),r=n===i?0:1/(i-n),c):[t,e]},c.clamp=function(f){return arguments.length?(a=!!f,c):a},c.interpolator=function(f){return arguments.length?(o=f,c):o};function u(f){return function(h){var A,d;return arguments.length?([A,d]=h,o=f(A,d),c):[o(0),o(1)]}}return c.range=u(On),c.rangeRound=u(Ns),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return s=f,n=f(t),i=f(e),r=n===i?0:1/(i-n),c}}function Un(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function of(){var t=yi(Ya()(ct));return t.copy=function(){return Un(t,of())},Tn.apply(t,arguments)}function kp(){var t=$u(Ya()).domain([1,10]);return t.copy=function(){return Un(t,kp()).base(t.base())},Tn.apply(t,arguments)}function Rp(){var t=tf(Ya());return t.copy=function(){return Un(t,Rp()).constant(t.constant())},Tn.apply(t,arguments)}function af(){var t=nf(Ya());return t.copy=function(){return Un(t,af()).exponent(t.exponent())},Tn.apply(t,arguments)}function DQ(){return af.apply(null,arguments).exponent(.5)}function Va(){var t=0,e=.5,n=1,i=1,r,s,o,a,l,c=ct,u,f=!1,h;function A(g){return isNaN(g=+g)?h:(g=.5+((g=+u(g))-s)*(i*g<i*s?a:l),c(f?Math.max(0,Math.min(1,g)):g))}A.domain=function(g){return arguments.length?([t,e,n]=g,r=u(t=+t),s=u(e=+e),o=u(n=+n),a=r===s?0:.5/(s-r),l=s===o?0:.5/(o-s),i=s<r?-1:1,A):[t,e,n]},A.clamp=function(g){return arguments.length?(f=!!g,A):f},A.interpolator=function(g){return arguments.length?(c=g,A):c};function d(g){return function(m){var p,w,C;return arguments.length?([p,w,C]=m,c=Wu(g,[p,w,C]),A):[c(0),c(.5),c(1)]}}return A.range=d(On),A.rangeRound=d(Ns),A.unknown=function(g){return arguments.length?(h=g,A):h},function(g){return u=g,r=g(t),s=g(e),o=g(n),a=r===s?0:.5/(s-r),l=s===o?0:.5/(o-s),i=s<r?-1:1,A}}function Fp(){var t=yi(Va()(ct));return t.copy=function(){return Un(t,Fp())},Tn.apply(t,arguments)}function Np(){var t=$u(Va()).domain([.1,1,10]);return t.copy=function(){return Un(t,Np()).base(t.base())},Tn.apply(t,arguments)}function Mp(){var t=tf(Va());return t.copy=function(){return Un(t,Mp()).constant(t.constant())},Tn.apply(t,arguments)}function cf(){var t=nf(Va());return t.copy=function(){return Un(t,cf()).exponent(t.exponent())},Tn.apply(t,arguments)}function QQ(){return cf.apply(null,arguments).exponent(.5)}function Gt(t){for(var e=t.length/6|0,n=new Array(e),i=0;i<e;)n[i]="#"+t.slice(i*6,++i*6);return n}const kQ=Gt("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),RQ=Gt("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),FQ=Gt("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),NQ=Gt("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),MQ=Gt("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),TQ=Gt("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),PQ=Gt("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),LQ=Gt("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),OQ=Gt("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),UQ=Gt("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function lf(t,e,n){const i=t-e+n*2;return t?i>0?i:1:0}const _Q="identity",ur="linear",_n="log",Ts="pow",Ps="sqrt",Ja="symlog",Tp="time",Pp="utc",Ht="sequential",fr="diverging",uf="quantile",Lp="quantize",Op="threshold",Ls="ordinal",ff="point",Up="band",hf="bin-ordinal",ke="continuous",Os="discrete",Us="discretizing",wt="interpolating",_p="temporal";function zQ(t){return function(e){let n=e[0],i=e[1],r;return i<n&&(r=n,n=i,i=r),[t.invert(n),t.invert(i)]}}function GQ(t){return function(e){const n=t.range();let i=e[0],r=e[1],s=-1,o,a,l,c;for(r<i&&(a=i,i=r,r=a),l=0,c=n.length;l<c;++l)n[l]>=i&&n[l]<=r&&(s<0&&(s=l),o=l);if(!(s<0))return i=t.invertExtent(n[s]),r=t.invertExtent(n[o]),[i[0]===void 0?i[1]:i[0],r[1]===void 0?r[0]:r[1]]}}function Af(){const t=Fu().unknown(void 0),e=t.domain,n=t.range;let i=[0,1],r,s,o=!1,a=0,l=0,c=.5;delete t.unknown;function u(){const f=e().length,h=i[1]<i[0],A=i[1-h],d=lf(f,a,l);let g=i[h-0];r=(A-g)/(d||1),o&&(r=Math.floor(r)),g+=(A-g-r*(f-a))*c,s=r*(1-a),o&&(g=Math.round(g),s=Math.round(s));const m=rs(f).map(p=>g+r*p);return n(h?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),u()):e()},t.range=function(f){return arguments.length?(i=[+f[0],+f[1]],u()):i.slice()},t.rangeRound=function(f){return i=[+f[0],+f[1]],o=!0,u()},t.bandwidth=function(){return s},t.step=function(){return r},t.round=function(f){return arguments.length?(o=!!f,u()):o},t.padding=function(f){return arguments.length?(l=Math.max(0,Math.min(1,f)),a=l,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?(l=Math.max(0,Math.min(1,f)),u()):l},t.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),u()):c},t.invertRange=function(f){if(f[0]==null||f[1]==null)return;const h=i[1]<i[0],A=h?n().reverse():n(),d=A.length-1;let g=+f[0],m=+f[1],p,w,C;if(!(g!==g||m!==m)&&(m<g&&(C=g,g=m,m=C),!(m<A[0]||g>i[1-h])))return p=Math.max(0,xn(A,g)-1),w=g===m?p:xn(A,m)-1,g-A[p]>s+1e-10&&++p,h&&(C=p,p=d-w,w=d-C),p>w?void 0:e().slice(p,w+1)},t.invert=function(f){const h=t.invertRange([f,f]);return h&&h[0]},t.copy=function(){return Af().domain(e()).range(i).round(o).paddingInner(a).paddingOuter(l).align(c)},u()}function zp(t){const e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return zp(e())},t}function HQ(){return zp(Af().paddingInner(1))}var YQ=Array.prototype.map;function VQ(t){return YQ.call(t,Jr)}const JQ=Array.prototype.slice;function Gp(){let t=[],e=[];function n(i){return i==null||i!==i?void 0:e[(xn(t,i)-1)%e.length]}return n.domain=function(i){return arguments.length?(t=VQ(i),n):t.slice()},n.range=function(i){return arguments.length?(e=JQ.call(i),n):e.slice()},n.tickFormat=function(i,r){return pp(t[0],vt(t),i??10,r)},n.copy=function(){return Gp().domain(n.domain()).range(n.range())},n}const qa=new Map,qQ=Symbol("vega_scale");function KQ(t){return t[qQ]=!0,t}function jQ(t,e,n){const i=function(){const s=e();return s.invertRange||(s.invertRange=s.invert?zQ(s):s.invertExtent?GQ(s):void 0),s.type=t,KQ(s)};return i.metadata=Po(ll(n)),i}function re(t,e,n){return arguments.length>1?(qa.set(t,jQ(t,e,n)),this):WQ(t)?qa.get(t):void 0}re(_Q,wp),re(ur,mp,ke),re(_n,ef,[ke,_n]),re(Ts,rf,ke),re(Ps,IQ,ke),re(Ja,vp,ke),re(Tp,BQ,[ke,_p]),re(Pp,SQ,[ke,_p]),re(Ht,of,[ke,wt]),re(`${Ht}-${ur}`,of,[ke,wt]),re(`${Ht}-${_n}`,kp,[ke,wt,_n]),re(`${Ht}-${Ts}`,af,[ke,wt]),re(`${Ht}-${Ps}`,DQ,[ke,wt]),re(`${Ht}-${Ja}`,Rp,[ke,wt]),re(`${fr}-${ur}`,Fp,[ke,wt]),re(`${fr}-${_n}`,Np,[ke,wt,_n]),re(`${fr}-${Ts}`,cf,[ke,wt]),re(`${fr}-${Ps}`,QQ,[ke,wt]),re(`${fr}-${Ja}`,Mp,[ke,wt]),re(uf,Sp,[Us,uf]),re(Lp,Dp,Us),re(Op,Qp,Us),re(hf,Gp,[Os,Us]),re(Ls,Fu,Os),re(Up,Af,Os),re(ff,HQ,Os);function WQ(t){return qa.has(t)}function _s(t,e){const n=qa.get(t);return n&&n.metadata[e]}function Le(t){return _s(t,ke)}function cn(t){return _s(t,Os)}function Ci(t){return _s(t,Us)}function Hp(t){return _s(t,_n)}function Ka(t){return _s(t,wt)}function XQ(t,e){const n=e[0],i=vt(e)-n;return function(r){return t(n+r*i)}}function ja(t,e,n){return Wu(Yp(e||"rgb",n),t)}function ZQ(t,e){const n=new Array(e),i=e+1;for(let r=0;r<e;)n[r]=t(++r/i);return n}function Yp(t,e){const n=fQ[$Q(t)];return e!=null&&n&&n.gamma?n.gamma(e):n}function $Q(t){return"interpolate"+t.toLowerCase().split("-").map(e=>e[0].toUpperCase()+e.slice(1)).join("")}const ek={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"},tk={accent:RQ,category10:kQ,category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",dark2:FQ,observable10:NQ,paired:MQ,pastel1:TQ,pastel2:PQ,set1:LQ,set2:OQ,set3:UQ,tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5"};function Vp(t){if(be(t))return t;const e=t.length/6|0,n=new Array(e);for(let i=0;i<e;)n[i]="#"+t.slice(i*6,++i*6);return n}function Jp(t,e){for(const n in t)df(n,e(t[n]))}const qp={};Jp(tk,Vp),Jp(ek,t=>ja(Vp(t)));function df(t,e){return t=t&&t.toLowerCase(),arguments.length>1?(qp[t]=e,this):qp[t]}function gf(){const t=e=>e;return t.invert=e=>e,t.copy=gf,t.invertRange=()=>{},t.type="null",t}const pf=4294967295,nk=.6,ik=4294967295;function rk(t){let e=t>>>0;return e^=e>>>16,e=Math.imul(e,2146121005),e^=e>>>15,e=Math.imul(e,2221713035),e^=e>>>16,e>>>0}function sk(t,e={}){const n=Array.from(t,l=>ak(l,"key")),i=n.length,r=e.maxLoadFactor??nk;if(!(r>0&&r<1))throw new Error("maxLoadFactor must be between 0 and 1.");const s=e.capacity??ck(Math.ceil(i/r));if(!Number.isSafeInteger(s)||s<1)throw new Error("capacity must be a positive power of two.");if((s&s-1)!==0)throw new Error("capacity must be a power of two.");const o=new Uint32Array(s);o.fill(pf);const a=s-1;for(const l of n){if(l===pf)throw new Error("Hash table keys must not equal the empty sentinel (0xffffffff).");let c=rk(l)&a,u=!1;for(let f=0;f<s;f+=1){const h=o[c];if(h===pf||h===l){o[c]=l,u=!0;break}c=c+1&a}if(!u)throw new Error("Hash table insertion failed. Increase capacity or lower load factor.")}return{table:o,capacity:s,size:i}}function ok(t,e){if(!Number.isSafeInteger(t)||t<1)throw new Error("capacity must be a positive integer.");if((t&t-1)!==0)throw new Error("capacity must be a power of two.");if(!Number.isSafeInteger(e)||e<1)throw new Error("maxTextureSize must be a positive integer.");const n=e*e;if(t>n)throw new Error("Selection hash table exceeds maximum texture capacity.");const i=1<<Math.floor(Math.log2(e)),r=Math.min(t,i),s=t/r;if(s>e)throw new Error("Selection hash table dimensions exceed maximum texture size.");return{width:r,height:s}}function ak(t,e){if(!Number.isSafeInteger(t)||t<0||t>ik)throw new Error(e+" must be a non-negative u32.");return t>>>0}function ck(t){let e=Math.max(1,t);return e-=1,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}class lk{constructor(e,n,i,r){this._container=e,this._canvas=n,this._sizeSource=i,this._onPhysicalSizeChange=r??(()=>{}),this._logicalCanvasSize=void 0,this._devicePixelContentBoxSize=void 0,this._devicePixelContentBoxObserver=void 0,this._observeDevicePixelContentBox()}invalidate(){this._logicalCanvasSize=void 0,this._devicePixelContentBoxSize=void 0}finalize(){this._devicePixelContentBoxObserver&&this._devicePixelContentBoxObserver.disconnect()}getPhysicalCanvasSize(e){if(this._devicePixelContentBoxSize)return this._devicePixelContentBoxSize;const n=window.devicePixelRatio??1;return e=e||this.getLogicalCanvasSize(),{width:Math.round(e.width*n),height:Math.round(e.height*n)}}getDevicePixelRatio(e){e=e||this.getLogicalCanvasSize();const n=this.getPhysicalCanvasSize(e),i=e.width>0?n.width/e.width:void 0,r=e.height>0?n.height/e.height:void 0;return i!==void 0&&r!==void 0?(i+r)/2:i!==void 0?i:r!==void 0?r:window.devicePixelRatio??1}getLogicalCanvasSize(){if(this._logicalCanvasSize)return this._logicalCanvasSize;const e=this._sizeSource(),n=window.getComputedStyle(this._container,null),i=this._container.getBoundingClientRect(),r=parseFloat(n.paddingLeft),s=parseFloat(n.paddingRight),o=parseFloat(n.paddingTop),a=parseFloat(n.paddingBottom),l=parseFloat(n.borderLeftWidth),c=parseFloat(n.borderRightWidth),u=parseFloat(n.borderTopWidth),f=parseFloat(n.borderBottomWidth),h=e.width??i.width-r-s-l-c,A=e.height??i.height-o-a-u-f;return this._logicalCanvasSize={width:h,height:A},this._logicalCanvasSize}_observeDevicePixelContentBox(){if(typeof ResizeObserver!="function")return;const e=new ResizeObserver(n=>{const i=n.find(a=>a.target==this._canvas);if(!i)return;const r=i.devicePixelContentBoxSize;if(!r)return;const s=Array.isArray(r)?r[0]:r;if(!s)return;const o={width:s.inlineSize,height:s.blockSize};this._devicePixelContentBoxSize&&this._devicePixelContentBoxSize.width==o.width&&this._devicePixelContentBoxSize.height==o.height||(this._devicePixelContentBoxSize=o,this._onPhysicalSizeChange())});try{e.observe(this._canvas,{box:"device-pixel-content-box"}),this._devicePixelContentBoxObserver=e}catch{e.disconnect()}}}class uk{constructor(e,n,i={}){const r=n??(()=>({width:void 0,height:void 0}));this._canvasSizeHelper=void 0,this._appliedCanvasSize=void 0,this._shaderCache=new Map,this.rangeTextures=new WeakMap,this.selectionTextures=new WeakMap;const s=document.createElement("canvas");e.appendChild(s);const o=CD(s,{antialias:!0,depth:!1,premultipliedAlpha:!0,...i});if(!o)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");if(!Wi(o))throw new Error("Your web browser does not support WebGL 2.0. Chrome, Firefox, and Safari Tech Preview should work.");Bg(o);const a=o.getExtension("WEBGL_provoking_vertex");a&&a.provokingVertexWEBGL(a.FIRST_VERTEX_CONVENTION_WEBGL),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA),this.canvas=s,this.gl=o,this._pickingAttachmentOptions=[{format:o.RGBA,type:o.UNSIGNED_BYTE,minMag:o.LINEAR,wrap:o.CLAMP_TO_EDGE}],this._pickingBufferInfo=xg(o,this._pickingAttachmentOptions),o.bindFramebuffer(o.FRAMEBUFFER,null),this._canvasSizeHelper=new lk(e,s,r,()=>this.adjustGl()),this.adjustGl()}invalidateSize(){this._canvasSizeHelper.invalidate(),this.adjustGl()}compileShader(e,n){const i="#version 300 es",r="precision mediump float;";be(n)&&(n=n.join(`
|
|
387
395
|
|
|
388
396
|
`));const s=this.gl,o=n.replaceAll(/ {2,}|^\s*\/\/.*$/gm,"");let a=this._shaderCache.get(o);if(!a){const l=[i,r,n].join(`
|
|
389
397
|
|
|
390
|
-
`);a=s.createShader(e),s.shaderSource(a,l),s.compileShader(a),this._shaderCache.set(o,a)}return a}adjustGl(){const e=this.getLogicalCanvasSize();this.canvas.style.width=`${e.width}px`,this.canvas.style.height=`${e.height}px
|
|
398
|
+
`);a=s.createShader(e),s.shaderSource(a,l),s.compileShader(a),this._shaderCache.set(o,a)}return a}adjustGl(){const e=this.getLogicalCanvasSize(),n=this.getPhysicalCanvasSize(e);this._appliedCanvasSize&&this._appliedCanvasSize.logicalWidth==e.width&&this._appliedCanvasSize.logicalHeight==e.height&&this._appliedCanvasSize.physicalWidth==n.width&&this._appliedCanvasSize.physicalHeight==n.height||(this.canvas.style.width=`${e.width}px`,this.canvas.style.height=`${e.height}px`,this.canvas.width=n.width,this.canvas.height=n.height,gD(this.gl,this._pickingBufferInfo,this._pickingAttachmentOptions),this._appliedCanvasSize={logicalWidth:e.width,logicalHeight:e.height,physicalWidth:n.width,physicalHeight:n.height})}finalize(){this._canvasSizeHelper.finalize(),this.canvas.remove()}getPhysicalCanvasSize(e){return this._canvasSizeHelper.getPhysicalCanvasSize(e)}getDevicePixelRatio(e){return this._canvasSizeHelper.getDevicePixelRatio(e)}getLogicalCanvasSize(){return this._canvasSizeHelper.getLogicalCanvasSize()}createRangeTexture(e,n=!1){const i=this.rangeTextures.get(e.getScale());if(!n&&i)return;function r(o,a){return cn(a.type)?a.domain().length:a.type=="threshold"?a.domain().length+1:a.type=="quantize"||a.type=="quantile"?o??4:o}const s=e.channel;if(Dn(s)){const o=e.getScale(),a=o.props,l=o.range();let c;if(a.scheme)if(o.type=="threshold"&&l)c=mf(l,this.gl,o.domain().length,i);else{let u=le(a.scheme)?void 0:a.scheme.count;u=r(u,o),c=gk(a.scheme,this.gl,u,i,!!a.reverse)}else Ka(o.type)||Le(o.type)&&l.length>1?c=pk(l,a.interpolate,this.gl,i):c=mf(l,this.gl,o.domain().length,i);this.rangeTextures.set(o,c)}else{const o=e.getScale();if(o.type==="ordinal"||Ci(o.type)){const a=aa(s)?o0(s):c=>c,l=o.range();this.rangeTextures.set(o,mk(l.map(a),this.gl,o.domain().length,i))}}}createSelectionTexture(e,n=!0){if(!jl(e))throw new Error("Not a multi-point selection, cannot create texture");const{table:i,capacity:r}=sk(e.data.keys()),{width:s,height:o}=ok(r,this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE)),a=this.selectionTextures.get(e),l=this.gl,c=zs(this.gl,{auto:!1,level:0,min:l.NEAREST,mag:l.NEAREST,format:l.RED_INTEGER,internalFormat:l.R32UI,width:s,height:o},i,n?a:!1);l.bindTexture(l.TEXTURE_2D,c),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_BASE_LEVEL,0),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAX_LEVEL,0),l.bindTexture(l.TEXTURE_2D,null),this.selectionTextures.set(e,c)}}function fk(t,e="",n=0){const i=/ERROR:\s*\d+:(\d+)/gi,r=[...e.matchAll(i)],s=new Map(r.map((o,a)=>{const l=parseInt(o[1]),c=r[a+1],u=c?c.index:e.length,f=e.substring(o.index,u);return[l-1,f]}));return t.split(`
|
|
391
399
|
`).map((o,a)=>{const l=s.get(a);return`${a+1+n}: ${o}${l?`
|
|
392
400
|
|
|
393
401
|
^^^ ${l}`:""}`}).join(`
|
|
394
|
-
`)}function
|
|
395
|
-
Error compiling: ${s}`,t.deleteShader(l));t.deleteProgram(i)}if(s)return{message:s,detail:o}}return{program:i,getProgramErrors:r}}function
|
|
402
|
+
`)}function hk(t,e,n){const i=t.createProgram();t.attachShader(i,e),t.attachShader(i,n),t.linkProgram(i);function r(){let s,o;if(!t.getProgramParameter(i,t.LINK_STATUS)){s=t.getProgramInfoLog(i);for(const l of[e,n])t.getShaderParameter(l,t.COMPILE_STATUS)||(s=t.getShaderInfoLog(l),o=fk(t.getShaderSource(l),s,0)+`
|
|
403
|
+
Error compiling: ${s}`,t.deleteShader(l));t.deleteProgram(i)}if(s)return{message:s,detail:o}}return{program:i,getProgramErrors:r}}function zs(t,e,n,i){return i?z0(t,i,n,e):i=Ds(t,{...e,src:n}),i}function Ak(t,e,n,i){const{height:r,framebuffer:s}=e,o=new Uint8Array(4);return t.bindFramebuffer(t.FRAMEBUFFER,s),t.readPixels(n,r-i-1,1,1,t.RGBA,t.UNSIGNED_BYTE,o),t.bindFramebuffer(t.FRAMEBUFFER,null),o}function dk(t,e,n="image/png"){const{width:i,height:r}=e,s=new Uint8Array(i*r*4);t.bindFramebuffer(t.FRAMEBUFFER,e.framebuffer),t.readPixels(0,0,i,r,t.RGBA,t.UNSIGNED_BYTE,s),t.bindFramebuffer(t.FRAMEBUFFER,null);const o=document.createElement("canvas");o.width=i,o.height=r;const a=o.getContext("2d"),l=a.createImageData(i,r);for(let c=0;c<r;c++){const u=(r-1-c)*i*4,f=c*i*4;l.data.set(s.subarray(u,u+i*4),f)}return a.putImageData(l,0,0),o.toDataURL(n)}function gk(t,e,n,i,r=!1){const s=le(t)?t:t.name,o=!le(t)&&t.extent||[0,1];if(n===void 0&&!le(t)&&(n=t.count),s){const a=df(s);if(dt(a)){const l=Kp(a,{extent:o,count:n,reverse:r});return zs(e,{minMag:e.LINEAR,format:e.RGB,height:1,wrap:e.CLAMP_TO_EDGE},l,i)}else{if(be(a))return mf(r?Array.from(a).reverse():a,e,n,i);throw new Error("Unknown scheme: "+s)}}}function pk(t,e="rgb",n,i){const r=ja(t,le(e)?e:e.type,le(e)?void 0:e.gamma),s=Kp(r);return zs(n,{minMag:n.LINEAR,format:n.RGB,height:1,wrap:n.CLAMP_TO_EDGE},s,i)}function mk(t,e,n,i){const r=Math.max(t.length,n||0),s=new Float32Array(r);for(let o=0;o<r;o++)s[o]=t[o%t.length];return zs(e,{minMag:e.NEAREST,format:e.RED,internalFormat:e.R32F,height:1},s,i)}function mf(t,e,n,i){const r=jp(t,n);return zs(e,{minMag:e.NEAREST,format:e.RGB,height:1},r,i)}function Kp(t,{extent:e=[0,1],reverse:n=!1,count:i=256}={}){const r=e[0],s=ra(e)-r,o=rs(i).map(a=>a/(i-1)).map(a=>r+a/s).map(t);return n&&o.reverse(),jp(o)}function jp(t,e){const n=Math.max(t.length,e||0),i=new Uint8Array(n*3);for(let r=0;r<n;r++){const s=t[r%t.length],o=Ln(s);if(!o)throw new Error(`Invalid color "${s}" in the scheme ${JSON.stringify(t)}!`);const a=o.rgb();i[r*3+0]=a.r,i[r*3+1]=a.g,i[r*3+2]=a.b}return i}function wf(t){const e=Ln(t).rgb();return[e.r,e.g,e.b].map(n=>n/255)}const wk="attr_",yk="uDomain_",Ck="range_",bk="accessor_",Wp="scale_",Ek="getScaled_",yf="uRangeTexture_",Wa="uParam_",Gs="checkSelection_",Xp=3402823466e29;function Ik(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 Hs(t,e){return`${bk}${t}_${e}`}function xk(t,e,n){let i;if(aa(t))i=bi(o0(t)(n));else if(le(n))if(Dn(t))i=Qk(n);else throw new Error(`String values are not supported on the "${t}" channel: ${n}`);else if(qr(n))i=bi(n?1:0);else if(n===null)if(Dn(t))i=bi([0,0,0]);else throw new Error(`null value is not supported on the "${t}" chanel.`);else i=bi(n);const r=Hs(t,e),s=`
|
|
396
404
|
${i.type} ${r}() {
|
|
397
405
|
// Constant value
|
|
398
406
|
return ${i};
|
|
399
|
-
}`;return{channel:t,accessorGlsl:s,accessorFunctionName:r}}function
|
|
400
|
-
uniform ${n} ${r};`,o=
|
|
407
|
+
}`;return{channel:t,accessorGlsl:s,accessorFunctionName:r}}function vk(t,e){let n="float",i=l=>l;Dn(t)&&(n="vec3",i=l=>wf(l));const r=`u${Mk(t)}_${e}`,s=` // Dynamic value
|
|
408
|
+
uniform ${n} ${r};`,o=Hs(t,e);let a=`
|
|
401
409
|
${n} ${o}() {
|
|
402
410
|
// Dynamic value
|
|
403
411
|
return ${r};
|
|
404
|
-
}`;return{channel:t,uniformName:r,uniformGlsl:s,accessorGlsl:a,accessorFunctionName:o,adjuster:i}}function
|
|
412
|
+
}`;return{channel:t,uniformName:r,uniformGlsl:s,accessorGlsl:a,accessorFunctionName:o,adjuster:i}}function Zp(t,e,n,i=[t]){const{attributeType:r}=hr(e,t),s=Ar(i),o=`in highp ${r} ${s};`,a=Hs(t,n),l=`
|
|
405
413
|
${r} ${a}() {
|
|
406
414
|
return ${s};
|
|
407
|
-
}`;return{channel:t,attributeName:s,attributeGlsl:o,accessorGlsl:l,accessorFunctionName:a}}function
|
|
415
|
+
}`;return{channel:t,attributeName:s,attributeGlsl:o,accessorGlsl:l,accessorFunctionName:a}}function Bk(t,e,n){const{attributeType:i}=hr(e,t),r=Ar(t),s=` uniform highp ${i} ${r};`,o=Hs(t,n),a=`
|
|
408
416
|
${i} ${o}() {
|
|
409
417
|
return ${r};
|
|
410
|
-
}`;return{channel:t,uniformName:r,uniformGlsl:s,accessorGlsl:a,accessorFunctionName:o}}function
|
|
411
|
-
${m} ${
|
|
412
|
-
${w.map(
|
|
418
|
+
}`;return{channel:t,uniformName:r,uniformGlsl:s,accessorGlsl:a,accessorFunctionName:o}}function Sk(t,e,n){e??=gf();const i=rn(t),r=yk+i,s=Ck+i,{hp:o,attributeType:a}=hr(e,t),l=e.domain?e.domain().length:void 0;let c;const u=[];u.push(""),u.push("/".repeat(70)),u.push(`// Channel: ${t}`),u.push("");const{transform:f}=Ik(e.type),h=(E,...S)=>kk.apply(null,[E,"value",...S]);let A;switch(f){case"linear":A=h("scaleLinear","domain",s);break;case"log":A=h("scaleLog","domain",s,e.base());break;case"symlog":A=h("scaleSymlog","domain",s,e.constant());break;case"pow":case"sqrt":A=h("scalePow","domain",s,e.exponent());break;case"index":case"locus":A=h("scaleBandHp","domain",s,e.paddingInner(),e.paddingOuter(),e.align(),n.band??.5);break;case"point":case"band":A=h("scaleBand","domain",s,e.paddingInner(),e.paddingOuter(),e.align(),n.band??.5);break;case"ordinal":case"null":case"identity":A=h("scaleIdentity");break;case"threshold":break;default:throw new Error(`Unsupported scale type: ${e.type}! ${t}: ${JSON.stringify(n)}`)}const d=om(e,t);let g;if(d&&t==i){const E=e.props.range??[];if(Ee(E)||E.some(Ee)){if(d.length<1||d.length>4)throw new Error(`A range with ExprRefs must have 1-4 elements, not ${d.length}! Range: ${JSON.stringify(d)}`);g=` uniform ${em(d.length)} ${s};`}else if(d.length&&d.every(qe)){const S=nm(d);u.push(`const ${S.type} ${s} = ${S};`)}}const m=tm(t);let p;if(Dn(t)){const E=yf+i;if(t==i&&u.push(`uniform sampler2D ${E};`),Le(e.type))p=`getInterpolatedColor(${E}, transformed)`;else if(cn(e.type)||Ci(e.type))p=`getDiscreteColor(${E}, int(transformed))`;else throw new Error("Problem with color scale!")}else if(e.type==="ordinal"||Ci(e.type)){const E=yf+i;t==i&&u.push(`uniform sampler2D ${E};`),p=`getDiscreteColor(${E}, int(transformed)).r`}const w=[],C=Le(e.type)&&l>2,y=Ci(e.type)||C;if(w.push("int slot = 0;"),y){const E=r;w.push(C?`while (slot < ${E}.length() - 2 && value >= ${E}[slot + 1]) { slot++; }`:`while (slot < ${E}.length() && value >= ${E}[slot]) { slot++; }`)}const I=Le(e.type)||Ci(e.type)||["band","point"].includes(e.type);if(A){const E=r;I&&(o?w.push(`vec3 domain = ${E};`):w.push(`vec2 domain = vec2(${E}[slot], ${E}[slot + 1]);`)),w.push(`float transformed = ${A};`),C&&w.push(`transformed = (float(slot) + transformed) / (float(${E}.length() - 1));`)}else w.push("float transformed = float(slot);");"clamp"in e&&e.clamp()&&w.push(`transformed = clampToRange(transformed, ${nm(d)});`),w.push(`return ${p??"transformed"};`),u.push(`
|
|
419
|
+
${m} ${Wp}${t}(${a} value) {
|
|
420
|
+
${w.map(E=>` ${E}
|
|
413
421
|
`).join("")}
|
|
414
|
-
}`);const x=
|
|
415
|
-
`);if(
|
|
416
|
-
${
|
|
422
|
+
}`);const x=u.join(`
|
|
423
|
+
`);if(I&&t==i){const E=Le(e.type)||Ci(e.type)?l:2;c=o?` highp vec3 ${r};`:` mediump float ${r}[${E}];`}return{glsl:x,domainUniformName:r,domainUniform:c,rangeUniformName:s,rangeUniform:g}}function Dk(t,e){const n=tm(t),i=[],r=[];for(let s=0;s<e.length;s++){const o=e[s],a=Hs(t,s),{param:l,empty:c}=o.predicate;i.push(l?`${Gs}${l}(${!!c})`:null),r.push(o.scaleChannel?`return ${Wp}${t}(${a}());`:`return ${a}();`)}return`${n} ${Ek}${t}() {
|
|
424
|
+
${Tk(i,r)}
|
|
417
425
|
}
|
|
418
426
|
|
|
419
|
-
#define ${t}_DEFINED`}function
|
|
427
|
+
#define ${t}_DEFINED`}function $p(t){if(!qe(t))throw new Error(`Not a number: ${t}`);if(t==1/0)return""+Xp;if(t==-1/0)return""+-Xp;{let e=`${t}`;return/^(-)?\d+$/.test(e)&&(e+=".0"),e}}function bi(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=em(e),i=`${n}(${t.map($p).join(", ")})`;return Object.assign(i,{type:n,numComponents:e})}function em(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 tm(t){return Dn(t)?"vec3":t=="uniqueId"?"uint":"float"}function Qk(t){return bi(wf(t))}function nm(t){return bi([t[0],ra(t)])}function kk(t,...e){const n=[];for(const i of e)qe(i)?n.push($p(i)):be(i)?n.push(bi(i)):n.push(i);return`${t}(${n.join(", ")})`}function hr(t,e){const n=t&&cn(t.type),i=t&&im(t.type),r=i&&Rk(t.domain()),s=r?{attributeType:"uvec2",arrayConstructor:Uint32Array}:i?{attributeType:"uint",arrayConstructor:Uint32Array}:n?{attributeType:"uint",arrayConstructor:Uint16Array}:e=="uniqueId"?{attributeType:"uint",arrayConstructor:Uint32Array}:{attributeType:"float",arrayConstructor:Float32Array};return Object.assign(s,{numComponents:+(s.attributeType.match(/^vec([234])$/)?.[1]??1),discrete:n,hp:i,largeHp:r})}function im(t){return t=="index"||t=="locus"}function Rk(t){return t[1]>2**32}const Cf=2**12;function rm(t,e=[]){const n=t%Cf,i=(t-n)/Cf;return e[0]=i,e[1]=n,e}function Fk(t){const e=t%Cf;return[t-e,e]}function Nk(t){return[...Fk(t[0]),t[1]-t[0]]}function sm(t){const e=new Xt([],JSON.stringify);for(const[n,i]of Object.entries(t)){const r=i.channelDef;if(nn(r)){const o=[r.field,i.scale?(Le(i.scale.type)||Ci(i.scale.type))??!1:!1];e.set(o,[...e.get(o)??[],n])}}return e}function Ar(t){return wk+Me(t).toSorted().join("_")}function Mk(t){return t[0].toUpperCase()+t.slice(1)}const om=(t,e)=>Ka(t.type)||Le(t.type)&&Dn(e)?[0,1]:t.range?t.range():void 0;function Tk(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 i=[];for(let r=0;r<n;r++){const s=t[r],o=r==0?`if (${s})`:s==null&&r==n-1?"else":`else if (${s})`;i.push(` ${o} {
|
|
420
428
|
${e[r]}
|
|
421
429
|
}`)}return i.join(`
|
|
422
|
-
`)}function
|
|
430
|
+
`)}function am(){let t=0,e,n=0;const i=new Map,r=s=>(s===e||(n=i.get(s),n===void 0&&(n=t++,i.set(s,n)),e=s),n);return r.addAll=s=>{for(const o of s)r(o)},r.invert=s=>{for(const o of i.entries())if(o[1]==s)return o[0]},r.domain=()=>[...i.keys()],r}class Ys{constructor({encoders:e,numVertices:n=void 0,attributes:i=[]}){this.encoders=e,this.variableEncoders=Object.fromEntries(Object.entries(e).filter(([s,o])=>i.includes(s)&&o&&!o.constant));const r=[...sm(e).entries()].filter(([s,o])=>s[1]&&o.length>1).map(([s,o])=>o);this.allocatedVertices=n,this.variableBuilder=new xD(n);for(const[s,o]of Object.entries(this.variableEncoders)){const a=o.dataAccessor;if(!a)continue;const l=r.find(C=>C.find(y=>y==s));if(l&&s!=l[0])continue;const c=a.asNumberAccessor(),u=o.scale,{largeHp:f,arrayConstructor:h,discrete:A,numComponents:d}=hr(u,s),g=[0,0];let m;if(u&&A)if("props"in u&&u.props.domainIndexer)m=u.props.domainIndexer;else if("domain"in u)m=am(),m.addAll(u.domain());else throw new Error("Missing domain indexer for discrete scale.");const p=m?C=>m(a(C)):f?C=>rm(c(C),g):c,w=Ar(l??s);this.variableBuilder.addConverter(w,{f:p,numComponents:d,arrayReference:f?g:void 0,targetArrayType:h})}this.lastOffset=0,this.rangeMap=new Xt([],JSON.stringify)}registerBatch(e){const n=this.lastOffset,i=this.variableBuilder.vertexCount,r=i-n;r&&this.rangeMap.set(e,{offset:n,count:r,xIndex:this.xIndexer?.getIndex()}),this.lastOffset=i}addBatches(e){for(const[n,i]of e)this.addBatch(n,i)}addBatch(e,n,i=0,r=n.length){this.prepareXIndexer(n,i,r);for(let s=i;s<r;s++){const o=n[s];this.variableBuilder.pushFromDatum(o),this.addToXIndex(o)}this.registerBatch(e)}prepareXIndexer(e,n=0,i=n+e.length){const r=()=>{this.addToXIndex=c=>{},this.xIndexer=void 0},s=this.encoders.x?.channelDef;if(!("buildIndex"in s)||!s.buildIndex||!e.length||i-n<0){r();return}const o=c=>c&&Le(c.scale?.type)&&c,a=o(this.variableEncoders.x),l=o(this.variableEncoders.x2);if(a&&!a.constant&&(!l||!l.constant)){const c=a.dataAccessor.asNumberAccessor(),u=l?l.dataAccessor.asNumberAccessor():c,f=[c(e[n]),u(e[i-1])];if(f[1]>f[0]){this.xIndexer=BD(50,f,c,u);let h=this.variableBuilder.vertexCount;this.addToXIndex=A=>{let d=this.variableBuilder.vertexCount;this.xIndexer(A,h,d),h=d}}else r()}else r()}addToXIndex(e){}toArrays(){return{arrays:this.variableBuilder.arrays,vertexCount:this.variableBuilder.vertexCount,allocatedVertices:this.allocatedVertices,rangeMap:this.rangeMap}}}class Pk extends Ys{constructor({encoders:e,attributes:n,numItems:i}){super({encoders:e,attributes:n,numVertices:i*6}),this.variableBuilder.configure();const r=this.variableBuilder.pushAll;this.pushAllSixTimes=i>500?new Function("pushAll",`return function unrolledPushAllSixTimes() {
|
|
423
431
|
pushAll(); pushAll(); pushAll(); pushAll(); pushAll(); pushAll();
|
|
424
|
-
};`)(r):function(){r(),r(),r(),r(),r(),r()}}addBatch(e,n,i=0,r=n.length){if(!(r<=i)){this.prepareXIndexer(n,i,r);for(let s=i;s<r;s++){const o=n[s];this.variableBuilder.updateFromDatum(o),this.pushAllSixTimes(),this.addToXIndex(o)}this.registerBatch(e)}}}class
|
|
425
|
-
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);}const highp uint HASH_EMPTY_KEY=0xffffffffu;highp uint hash32(highp uint key){highp uint v=key;v ^=v>>16u;v*=0x7feb352du;v ^=v>>15u;v*=0x846ca68bu;v ^=v>>16u;return v;}bool isEmptyHashTexture(highp usampler2D s){ivec2 texSize=textureSize(s,0);return texSize.x==1&&texSize.y==1&&texelFetch(s,ivec2(0,0),0).r==HASH_EMPTY_KEY;}bool hashContainsTexture(highp usampler2D s,highp uint value){ivec2 texSize=textureSize(s,0);highp uint width=uint(texSize.x);highp uint size=width*uint(texSize.y);highp uint mask=size-1u;highp uint index=hash32(value)&mask;for(highp uint probe=0u;probe<size;probe+=1u){ivec2 coord=ivec2(int(index % width),int(index/width));highp uint entry=texelFetch(s,coord,0).r;if(entry==value){return true;}if(entry==HASH_EMPTY_KEY){return false;}index=(index+1u)&mask;}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));}}`,
|
|
432
|
+
};`)(r):function(){r(),r(),r(),r(),r(),r()}}addBatch(e,n,i=0,r=n.length){if(!(r<=i)){this.prepareXIndexer(n,i,r);for(let s=i;s<r;s++){const o=n[s];this.variableBuilder.updateFromDatum(o),this.pushAllSixTimes(),this.addToXIndex(o)}this.registerBatch(e)}}}class Lk extends Ys{constructor({encoders:e,attributes:n,tessellationThreshold:i=1/0,visibleRange:r=[-1/0,1/0],numItems:s}){super({encoders:e,attributes:n,numVertices:i==1/0?s*6:void 0}),this.visibleRange=r,this.tessellationThreshold=i||1/0,this.updateSide=this.variableBuilder.createUpdater("side",1),this.updatePos=this.variableBuilder.createUpdater("pos",1),this.variableBuilder.configure()}addBatch(e,n,i=0,r=n.length){this.prepareXIndexer(n,i,r);for(let s=i;s<r;s++){const o=n[s];this.variableBuilder.updateFromDatum(o),this.updateSide(-.5),this.updatePos(0),this.variableBuilder.pushAll();const a=1;for(let l=0;l<=a;l++)this.updatePos(l/a),this.updateSide(-.5),this.variableBuilder.pushAll(),this.updateSide(.5),this.variableBuilder.pushAll();this.variableBuilder.pushAll(),this.addToXIndex(o)}this.registerBatch(e)}}class Ok extends Ys{constructor({encoders:e,attributes:n,numItems:i=void 0}){super({encoders:e,attributes:n,numVertices:i}),this.variableBuilder.configure()}}class Uk extends Ys{constructor({encoders:e,attributes:n,numItems:i=void 0}){super({encoders:e,attributes:n,numVertices:i}),this.variableBuilder.configure()}toArrays(){const e=this.variableBuilder.arrays;for(let n of Object.values(e))n.divisor=1;return super.toArrays()}}class _k extends Ys{constructor({encoders:e,attributes:n,fontMetrics:i,properties:r,numCharacters:s=void 0}){super({encoders:e,attributes:n,numVertices:s*6}),this.metadata=i,this.metrics=i,this.properties=r;const a=e.text.channelDef;this.numberFormat=!ht(a)&&"format"in a&&a.format?He(a.format):l=>l,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,i=0,r=n.length){const s=this.properties.align||"left",o=this.properties.logoLetters??!1,a=this.metadata.common.base,l=this.metadata.common.scaleH;let c=-rr;switch(this.properties.baseline){case"top":c+=this.metrics.capHeight;break;case"middle":c+=this.metrics.capHeight/2;break;case"bottom":c-=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,i,r);for(let A=i;A<r;A++){const d=n[A],g=this.numberFormat(u(d)),m=le(g)?g:g===null?"":""+g;if(m.length==0)continue;this.variableBuilder.updateFromDatum(d);const p=o?m.length:this.metrics.measureWidth(m);this.updateWidth(p);let w=s=="right"?-p:s=="center"?-p/2:0;if(!o){const x=this.metrics.getCharByCode(m.charCodeAt(0));w-=(x.width-x.xadvance)/a/2}let C=-.5,y=1,I=1;for(let x=0;x<m.length;x++){const E=this.metrics.getCharByCode(m.charCodeAt(x)),S=o?1:E.xadvance/a;if(E.id==32){w+=S;continue}o?(I=(E.width+rr*2)/E.width,w=-I/2,y=(E.height+rr*2)/E.height,C=-.5-rr/E.height):(y=E.height/a,C=-(E.height+E.yoffset+c)/a,I=E.width/a);const D=E.x,B=E.y;f[0]=w,f[1]=C+y,h[0]=D/l,h[1]=B/l,this.variableBuilder.pushAll(),f[0]=w+I,f[1]=C+y,h[0]=(D+E.width)/l,h[1]=B/l,this.variableBuilder.pushAll(),f[0]=w,f[1]=C,h[0]=D/l,h[1]=(B+E.height)/l,this.variableBuilder.pushAll(),f[0]=w+I,f[1]=C+y,h[0]=(D+E.width)/l,h[1]=B/l,this.variableBuilder.pushAll(),f[0]=w,f[1]=C,h[0]=D/l,h[1]=(B+E.height)/l,this.variableBuilder.pushAll(),f[0]=w+I,f[1]=C,h[0]=(D+E.width)/l,h[1]=(B+E.height)/l,this.variableBuilder.pushAll(),w+=S}this.addToXIndex(d)}this.registerBatch(e)}}const cm=`#define PI 3.141593
|
|
433
|
+
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);}const highp uint HASH_EMPTY_KEY=0xffffffffu;highp uint hash32(highp uint key){highp uint v=key;v ^=v>>16u;v*=0x7feb352du;v ^=v>>15u;v*=0x846ca68bu;v ^=v>>16u;return v;}bool isEmptyHashTexture(highp usampler2D s){ivec2 texSize=textureSize(s,0);return texSize.x==1&&texSize.y==1&&texelFetch(s,ivec2(0,0),0).r==HASH_EMPTY_KEY;}bool hashContainsTexture(highp usampler2D s,highp uint value){ivec2 texSize=textureSize(s,0);highp uint width=uint(texSize.x);highp uint size=width*uint(texSize.y);highp uint mask=size-1u;highp uint index=hash32(value)&mask;for(highp uint probe=0u;probe<size;probe+=1u){ivec2 coord=ivec2(int(index % width),int(index/width));highp uint entry=texelFetch(s,coord,0).r;if(entry==value){return true;}if(entry==HASH_EMPTY_KEY){return false;}index=(index+1u)&mask;}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));}}`,zk="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));}",Gk=`/***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;
|
|
426
434
|
#if !defined(SAMPLE_FACET_UNIFORM) && !defined(SAMPLE_FACET_TEXTURE)
|
|
427
435
|
SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1.0);}
|
|
428
436
|
#elif defined(SAMPLE_FACET_UNIFORM)
|
|
@@ -430,37 +438,37 @@ SampleFacetPosition getSampleFacetPos(){return SampleFacetPosition(0.0,1.0,0.0,1
|
|
|
430
438
|
#elif defined(SAMPLE_FACET_TEXTURE)
|
|
431
439
|
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);}
|
|
432
440
|
#endif
|
|
433
|
-
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;}}`,
|
|
441
|
+
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;}}`,Hk=`/**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){
|
|
434
442
|
#ifdef uniqueId_DEFINED
|
|
435
443
|
uint id=attr_uniqueId;vPickingColor=vec4(ivec4(id>>0,id>>8,id>>16,id>>24)&0xFF)/float(0xFF);
|
|
436
444
|
#else
|
|
437
445
|
vPickingColor=vec4(1.0);
|
|
438
446
|
#endif
|
|
439
|
-
return true;}return false;}`,
|
|
440
|
-
return ${
|
|
441
|
-
}`)}}else if(
|
|
442
|
-
uniform highp usampler2D ${
|
|
443
|
-
return hashContainsTexture(${M}, ${
|
|
444
|
-
}`),
|
|
445
|
-
return ${
|
|
446
|
-
}`)}}const d=(
|
|
447
|
+
return true;}return false;}`,Yk="in highp vec4 vPickingColor;",Xa=Symbol("cacheMap");function Za(t,e,n){let i=Js(t).get(e);return i===void 0&&(i=n(e),Js(t).set(e,i)),i}function bf(t,e){Js(t).delete(e)}function Vs(t,e){const n=Js(t);for(const i of n.keys())i.startsWith(e)&&n.delete(i);Js(t).delete(e)}function lm(t){t[Xa]=new Map}function Js(t){return t[Xa]||lm(t),t[Xa]}function um(...t){const e={get(n,i,r){for(const s of t){const a=s()[i];if(a!==void 0)return a}},has(n,i,r){for(const s of t){const o=s();if(i in o)return!0}return!1}};return new Proxy({},e)}function Vk(t){return le(t)||qe(t)||qr(t)}class Ye extends Error{constructor(e,n){super(e),this.name="ViewError",this.view=n}}const Jk="SAMPLE_FACET_UNIFORM",fm="SAMPLE_FACET_TEXTURE",hm="uSelectionTexture_";class qs{#e=[];constructor(e){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 qk,this.defaultProperties={get clip(){return["x","y"].map(n=>e.getScaleResolution(n)).some(n=>n?.isZoomable()??!1)},xOffset:0,yOffset:0,minBufferSize:0},this.properties=um(typeof this.unitView.spec.mark=="object"?()=>this.unitView.spec.mark:()=>({}),()=>this.defaultProperties)}augmentDefaultProperties(e){Object.defineProperties(this.defaultProperties,Object.getOwnPropertyDescriptors(e))}get opaque(){return!1}get defaultHitTestMode(){return"intersects"}getAttributes(){throw new Error("Not implemented!")}getSupportedChannels(){return["sample","facetIndex","x","y","color","opacity","search","uniqueId"]}getDefaultEncoding(){const e={sample:void 0,uniqueId:void 0};return this.isPickingParticipant()&&(e.uniqueId={field:pt}),e}fixEncoding(e){return e}setupExprRefsNeedingGraphicsUpdate(e){const n=this.getSupportedChannels(),i={};for(const s of e){const o=this.properties[s];if(o&&Ee(o)){const a=this.unitView.paramRuntime.watchExpression(o.expr,()=>{this.updateGraphicsData(),this.unitView.context.animator.requestRender()});n.includes(s)||Object.defineProperty(i,s,{get(){return a()}})}}const r=this.properties;this.properties=um(()=>i,()=>r)}get encoding(){return Za(this,"encoding",()=>{const e=this.getDefaultEncoding(),n=this.unitView.getEncoding(),i=o=>{const a=this.properties[o];return Vk(a)||Ee(a)?{value:a}:void 0},r=Object.fromEntries(this.getSupportedChannels().map(o=>[o,i(o)]).filter(o=>ht(o[1]))),s=this.fixEncoding({...e,...r,...n});for(const o of Object.keys(s))this.getSupportedChannels().includes(o)||delete s[o];return s.x&&(s.x.buildIndex??=!0),s})}getContext(){return this.unitView.context}getType(){return this.unitView.getMarkType()}initializeData(){}initializeEncoders(){this.encoders=bv(this.unitView,this.encoding)}async initializeGraphics(){}updateGraphicsData(){}getSampleFacetMode(){if(this.encoders.facetIndex)return fm;if(this.unitView.getLayoutAncestors().find(e=>"samples"in e.spec))return Jk}createAndLinkShaders(e,n,i=[]){const r=this.getAttributes(),s=this.encoders,o=this.getSampleFacetMode();o&&i.push(`#define ${o}`);const a="// view: "+this.unitView.getPathString();let l=[];const c=new Set,u=sm(s),f=[],h=Object.values(s).flatMap(I=>I.accessors).map(I=>I.predicate).filter(I=>I.param),A=new Map;for(const I of h){const x=I.param,E=this.unitView.paramRuntime,S=E.findValue(x);if(!S)throw new Error(`Cannot infer selection type as the parameter "${x}" has no value. Please ensure that the parameter is properly defined!`);const D=Ar("uniqueId");if(c0(S)){if(!A.has(x)){A.set(x,"single");const B=Wa+Pt(x);f.push(" // Selection parameter"),f.push(` uniform highp uint ${B};`),this.#e.push(()=>{this.registerMarkUniformValue(B,{expr:x},k=>k.uniqueId??0)}),l.push(`bool ${Gs}${x}(bool empty) {
|
|
448
|
+
return ${Wa}${x} == ${D} || (empty && ${Wa}${x} == 0u);
|
|
449
|
+
}`)}}else if(jl(S)){if(!A.has(x)){A.set(x,"multi");const B=hm+Pt(x);l.push(`// Selection texture
|
|
450
|
+
uniform highp usampler2D ${B};`);const k=this.getContext().glHelper,F=k.selectionTextures;this.selectionTextureOps.push(()=>{const O=E.getValue(x),_=F.get(O);if(!_)throw new Error(`Bug: no selection texture found for "${x}"!`);hi(this.programInfo,{[B]:_})});const M=hm+x;l.push(`bool ${Gs}${x}(bool empty) {
|
|
451
|
+
return hashContainsTexture(${M}, ${D}) || (empty && isEmptyHashTexture(${M}));
|
|
452
|
+
}`),k.createSelectionTexture(S),E.watchExpression(x,()=>{const O=E.getValue(x);k.createSelectionTexture(O),this.getContext().animator.requestRender()})}}else if(Kl(S)&&!A.has(x)){A.set(x,"interval");const B=[],k=[];for(const F of Object.keys(S.intervals)){if(!["x","y"].includes(F))continue;const M=Wa+Pt(x)+`_${F}`,{attributeType:O}=hr(this.unitView.getScaleResolution(F).getScale(),F);f.push(" // Selection parameter"),f.push(` uniform highp ${O}[2] ${M};`),this.#e.push(()=>{this.registerMarkUniformValue(M,{expr:x},Y=>Y.intervals[F]??[1,0])});const _=Y=>{for(const[we,ze]of u.entries())if(we[1]&&ze.includes(Y))return Ar(ze);return Ar(Y)},H=_(F),G=M+"[0]",q=M+"[1]",Z=Vl(F);if(this.encoding[Z]){const Y=_(Z),we=this.defaultHitTestMode;if(we=="endpoints")B.push(`((${G} <= ${H} && ${H} <= ${q}) || (${G} <= ${Y} && ${Y} <= ${q}))`);else if(we=="encloses")B.push(`(${G} <= ${H} && ${Y} <= ${q})`);else if(we=="intersects")B.push(`(${G} <= ${Y} && ${H} <= ${q})`);else throw new Ye(`Unsupported hit test mode "${we}" for interval selection!`,this.unitView)}else B.push(`(${G} <= ${H} && ${H} <= ${q})`);k.push(`${G} > ${q}`)}l.push(`bool ${Gs}${x}(bool empty) {
|
|
453
|
+
return ${B.join(" && ")} || (empty && (${k.join(" || ")}));
|
|
454
|
+
}`)}}const d=(I,x,E,S)=>{const D=x.channelDef;if(ht(D))if(Ee(D.value)){const{uniformName:B,uniformGlsl:k,accessorGlsl:F,adjuster:M}=vk(I,E);l.push(F),f.push(k),this.#e.push(()=>{this.registerMarkUniformValue(B,D.value,M)})}else l.push(xk(I,E,D.value).accessorGlsl);else if(Ki(D)){const{uniformName:B,uniformGlsl:k,accessorGlsl:F}=Bk(I,S,E);f.push(k),l.push(F);const{largeHp:M,discrete:O}=hr(S,I),_=O&&"domain"in S?H=>S.domain().indexOf(H):M?rm:H=>+H;this.#e.push(()=>{this.registerMarkUniformValue(B,D.datum,_)})}else if(nn(D)){const B=u.get([D.field,!0]),{attributeGlsl:k,accessorGlsl:F}=Zp(I,S,E,B?.includes(I)?B:void 0);c.add(k),l.push(F)}else if(ji(D)){const{attributeGlsl:B,accessorGlsl:k}=Zp(I,S,E);c.add(B),l.push(k)}else throw new Ye(`Unsupported channel definition: ${JSON.stringify(D)}`,this.unitView)};for(const[I,x]of Object.entries(s)){if(!r.includes(I))continue;const{channelDef:E,accessors:S,scale:D}=x;for(let B=0;B<S.length;B++)d(I,S[B],B,D);if(D){const B=n0(E),k=B&&B.resolutionChannel||I,F=ca(k)?this.unitView.getScaleResolution(k):null,{glsl:M,domainUniform:O,domainUniformName:_,rangeUniform:H,rangeUniformName:G}=Sk(I,D,E);l.push(M),f.push(O),f.push(H),H&&this.#e.push(()=>{const q=this.createMarkUniformSetter(G),Z=()=>q(om(D,I));F.addEventListener("range",Z),Z()}),O&&this.#e.push(()=>{const q=this.createMarkUniformSetter(_),Z=()=>{const Y=cn(D.type)?[0,D.domain().length]:D.domain();q(im(D.type)?Nk(Y):Y)};F.addEventListener("domain",Z),Z()})}l.push(Dk(I,S))}const g=[...A.keys()].map(I=>`${Gs}${I}(false)`);l.push(`bool isPointSelected() {
|
|
447
455
|
`+(this.encoders.uniqueId&&g.length>0?` return ${g.join(" || ")};`:" return false;")+`
|
|
448
456
|
}`);const m=`precision highp float;
|
|
449
|
-
precision highp int;`,p=
|
|
450
|
-
`));i=i.map(p),e=p(e),n=p(n);const w=[m,a,...i,
|
|
451
|
-
`),...l,c4,l4,e],C=[m,a,...i,Zp,f4,n],y=this.gl;this.programStatus=RD(y,this.glHelper.compileShader(y.VERTEX_SHADER,w),this.glHelper.compileShader(y.FRAGMENT_SHADER,C))}finalizeGraphicsInitialization(){if(this.programInfo)return;if(!this.programStatus)throw new Error("No program status found! "+this.unitView.getPathString());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=wS(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=rg(this.gl,this.programInfo,"View"),this.markUniformInfo=rg(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),oi(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of this.#e)n();this.#e=void 0}createMarkUniformSetter(e){const n=this.markUniformInfo.setters[e];if(!n)throw new Error(`Uniform "${e}" not found int the Mark block!`);return i=>{n(i),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(e,n,i=r=>r){const r=this.createMarkUniformSetter(e),s=o=>{if(o==null)throw new Error(`Trying to set null/undefined value for uniform: ${e}${Ee(n)?`Expr: ${n.expr}`:""}`);r(o)};if(Ee(n)){let o;const a=()=>s(i(o(null)));o=this.unitView.paramRuntime.watchExpression(n.expr,a),a()}else s(i(n))}deleteGraphicsData(){const e=this.glHelper;if(!e){this.vertexArrayInfo=void 0,this.bufferInfo=void 0;return}const n=e.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),n.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let i=0;i<8;i++)n.disableVertexAttribArray(i);Object.values(this.bufferInfo.attribs).forEach(i=>this.gl.deleteBuffer(i.buffer)),this.bufferInfo.indices&&this.gl.deleteBuffer(this.bufferInfo.indices),this.bufferInfo=void 0}}dispose(){this.deleteGraphicsData()}updateBufferInfo(e){if(this.gl.bindVertexArray(null),this.bufferInfo&&e.vertexCount<=this.bufferInfo.allocatedVertices)for(const[n,i]of Object.entries(e.arrays))i.data&&FB(this.gl,this.bufferInfo.attribs[n],i.data,0);else{this.deleteGraphicsData(),this.bufferInfo=MB(this.gl,e.arrays,{numElements:e.vertexCount}),this.bufferInfo.allocatedVertices=e.allocatedVertices;for(const[n,i]of Object.entries(e.arrays))this.bytesPerElement.set(n,i.data.BYTES_PER_ELEMENT)}}get glHelper(){return this.getContext().glHelper}get gl(){return this.glHelper.gl}isReady(){return this.bufferInfo&&this.programInfo}isPickingParticipant(){if(this.properties.tooltip===null&&!this.unitView.paramRuntime.hasPointSelections())return!1;for(const e of this.unitView.getLayoutAncestors())if(!e.isPickingSupported())return!1;return!0}bindOrSetMarkUniformBlock(){this.markUniformsAltered?(og(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):sg(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(e){const n=this.glHelper,i=this.gl,r=[];r.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=LS(this.gl,this.programInfo,this.bufferInfo)),i.useProgram(this.programInfo.program)});for(const[o,a]of Object.entries(this.encoders)){const l=n.rangeTextures.get(a.scale);l&&r.push(()=>oi(this.programInfo,{[lu+o]:l}))}r.push(...this.selectionTextureOps),this.getSampleFacetMode()==tm&&r.push(()=>{let o;for(const a of this.unitView.getLayoutAncestors())if(o=a.getSampleFacetTexture(),o)break;if(!o)throw new Error("No facet texture available. This is bug.");oi(this.programInfo,{uSampleFacetTexture:o})});const s=(e.picking??!1)&&this.isPickingParticipant();return r.push(()=>xs(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:s})),this.opaque||e.picking?r.push(()=>i.disable(i.BLEND)):r.push(()=>i.enable(i.BLEND)),r}prepareSampleFacetRendering(e){const n=e.sampleFacetRenderingOptions,i=this.programInfo.uniformSetters.uSampleFacet;if(n&&i){const r=n.pixelToUnit,s=n.locSize.location*r,o=n.locSize.size*r;if(s>1||s+o<0)return!1;this.gl.uniform4f(i.location,s,o,s,o)}return!0}render(e){}createRenderCallback(e,n){if(!this.bufferInfo)return()=>{};const i=this;let r;const s=this.unitView.getScaleResolution("x")?.getScale(),o=s&&Pe(s.type),a=["index","locus"].includes(s?.type)?-1:0,l=[0,0];r=u=>{if(o&&u.xIndex){const h=s.domain(),A=u.xIndex(h[0]+a,h[1],l),d=A[0],g=A[1]-d;g>0&&e(d,g)}else e(u.offset,u.count)};const c=this.rangeMap.get(void 0).count==0?n.facetId:void 0,f=this.rangeMap.get(c);return n.sampleFacetRenderingOptions?function(){f.count&&i.prepareSampleFacetRendering(n)&&r(f)}:function(){f.count&&r(f)}}setViewport(e,n,i,r){i=i.flatten();const s=this.gl,o=this.properties,a=.5,l=(o.xOffset??0)+a,c=(o.yOffset??0)+a;let f,u=i;if(o.clip!=="never"&&(o.clip||r)){let h=0,A=0,d;if(r){if(u=i.intersect(r).flatten(),!u.isDefined())return!1;d=[i.width/u.width,i.height/u.height],A=Math.max(0,i.y2-r.y2),h=Math.min(0,i.x-r.x)}else d=[1,1];const g=[u.x,e.height-u.y2,u.width,u.height].map(C=>C*n),m=g.map(C=>Math.floor(C)),p=g[0]-m[0],w=g[1]-m[1];s.viewport(...m),s.scissor(...m),s.enable(s.SCISSOR_TEST),f={uViewOffset:[(l+h+p/n)/u.width,-(c+A-w/n)/u.height],uViewScale:d}}else{if(!i.isDefined())return!1;s.viewport(0,0,e.width*n,e.height*n),s.disable(s.SCISSOR_TEST),f={uViewOffset:[(i.x+l)/e.width,(e.height-i.y-c-i.height)/e.height],uViewScale:[i.width/e.width,i.height/e.height]}}return xs(this.viewUniformInfo,{...f,uViewportSize:[i.width,i.height],uDevicePixelRatio:n}),og(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(e,n){}}class h4 extends Wt{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,i]of this.entries())e.has(n)||(i.offset=0,i.count=0,i.xIndex=void 0);for(const[n,i]of e.entries())Object.assign(this.get(n),i)}}function Au(t,e){const n=Ol(e);let i=t[e]&&{...t[e]},r=t[n]&&{...t[n]};if(!(ut(i)||ut(r))){if(i){if(!pt(t[e]))return;if(r){if(i.type!="quantitative"){const s=(1-(i.band||1))/2;i.band=s,r.band=-s}}else if(i.type=="quantitative")r={datum:0,domainInert:!0};else{r={...i};const s=(1-(i.band??1))/2;i.band=0+s,r.band=1-s}}else i={value:0},r={value:1};t[e]=i,t[n]=r}}function ja(t,e){const n=Hd(t);n&&(n.resolutionChannel=e)}function im(t,e){t.stroke||(e?t.stroke={value:null}:(t.stroke=structuredClone(t.color),ja(t.stroke,"color"))),ut(t.stroke)&&t.stroke.value===null&&(t.strokeWidth={value:0}),t.strokeOpacity||(t.strokeOpacity=structuredClone(t.opacity),ja(t.strokeOpacity,"opacity"))}function rm(t,e){ut(t.fill)&&t.fill.value===null?t.fillOpacity={value:0}:t.fill||(t.fill=structuredClone(t.color),ja(t.fill,"color"),!e&&!t.fillOpacity&&(t.fillOpacity={value:0})),t.fillOpacity||(e?(t.fillOpacity=structuredClone(t.opacity),ja(t.fillOpacity,"opacity")):t.fillOpacity={value:0})}const d4=["none","diagonal","antiDiagonal","cross","vertical","horizontal","grid","dots","rings","ringsLarge"];class g4 extends zs{constructor(e){super(e),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 Ka(this,"opaque",()=>!this.#e()&&!this.#t()&&!this.properties.shadowOpacity&&ut(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(e){return Au(e,"x"),Au(e,"y"),im(e,this.properties.filled),rm(e,this.properties.filled),delete e.color,delete e.opacity,e}#e(){const e=this.properties;return e.cornerRadius||e.cornerRadiusBottomLeft||e.cornerRadiusBottomRight||e.cornerRadiusTopLeft||e.cornerRadiusTopRight}#t(){const e=this.encoding.strokeWidth;return!(ut(e)&&!e.value)||"condition"in e}async initializeGraphics(){await super.initializeGraphics();const e=[];this.#e()&&e.push("ROUNDED_CORNERS"),this.#t()&&e.push("STROKED"),this.properties.shadowOpacity&&e.push("SHADOW"),this.createAndLinkShaders(zS,HS,[YS,...e.map(n=>"#define "+n)])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties;this.registerMarkUniformValue("uMinWidth",e.minWidth),this.registerMarkUniformValue("uMinHeight",e.minHeight),this.registerMarkUniformValue("uMinOpacity",e.minOpacity),this.registerMarkUniformValue("uCornerRadiusTopRight",e.cornerRadiusTopRight??e.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomRight",e.cornerRadiusBottomRight??e.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusTopLeft",e.cornerRadiusTopLeft??e.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomLeft",e.cornerRadiusBottomLeft??e.cornerRadius??0),this.registerMarkUniformValue("uHatchPattern",e.hatch,n=>Math.max(0,d4.indexOf(n??"none"))),this.registerMarkUniformValue("uShadowBlur",e.shadowBlur??0),this.registerMarkUniformValue("uShadowOpacity",e.shadowOpacity??0),this.registerMarkUniformValue("uShadowOffsetX",e.shadowOffsetX??0),this.registerMarkUniformValue("uShadowOffsetY",e.shadowOffsetY??0),this.registerMarkUniformValue("uShadowColor",e.shadowColor??"black",cu)}updateGraphicsData(){const e=this.unitView.getCollector();if(!e){console.debug("No collector");return}const n=e.getItemCount(),i=new n4({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});i.addBatches(e.facetBatches);const r=i.toArrays();this.rangeMap.migrateEntries(r.rangeMap),this.updateBufferInfo(r)}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>ai(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((i,r)=>{Sa(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,r,i)},e)}findDatumAt(e,n){e=Ne(e);const i=this.unitView.getCollector().facetBatches.get(e);if(!i)return;const r=this.encoders,s=r.x.scale.type;if(on(s)){const o=r.x.dataAccessor;return i.find(a=>n==o(a))}else{const o=r.x.dataAccessor,a=r.x2.dataAccessor;return i.find(l=>n>=o(l)&&n<a(l))}}}const p4=`flat out float vRadius;flat out float vRadiusWithPadding;flat out lowp vec4 vFillColor;flat out lowp vec4 vStrokeColor;flat out lowp float vShape;flat out lowp float vHalfStrokeWidth;flat out mat2 vRotationMatrix;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TRIANGLE_RIGHT=5.0;const float TRIANGLE_DOWN=6.0;const float TRIANGLE_LEFT=7.0;const float TICK_UP=8.0;const float TICK_RIGHT=9.0;const float TICK_DOWN=10.0;const float TICK_LEFT=11.0;float computeSemanticThresholdFactor(){return getScaled_semanticScore()>=uSemanticThreshold ? 1.0 : 0.0;}vec2 getDxDy(){
|
|
457
|
+
precision highp int;`,p=I=>I.replace("#pragma markUniforms",f.join(`
|
|
458
|
+
`));i=i.map(p),e=p(e),n=p(n);const w=[m,a,...i,cm,zk,[...c].join(`
|
|
459
|
+
`),...l,Gk,Hk,e],C=[m,a,...i,cm,Yk,n],y=this.gl;this.programStatus=hk(y,this.glHelper.compileShader(y.VERTEX_SHADER,w),this.glHelper.compileShader(y.FRAGMENT_SHADER,C))}finalizeGraphicsInitialization(){if(this.programInfo)return;if(!this.programStatus)throw new Error("No program status found! "+this.unitView.getPathString());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=X3(this.gl,this.programStatus.program),delete this.programStatus,this.viewUniformInfo=dg(this.gl,this.programInfo,"View"),this.markUniformInfo=dg(this.gl,this.programInfo,"Mark"),this.gl.useProgram(this.programInfo.program),hi(this.programInfo,{uSampleFacet:[0,1,0,1],uTransitionOffset:0,uZero:0});for(const n of this.#e)n();this.#e=void 0}createMarkUniformSetter(e){const n=this.markUniformInfo.setters[e];if(!n)throw new Error(`Uniform "${e}" not found int the Mark block!`);return i=>{n(i),this.markUniformsAltered=!0,this.unitView.context.animator.requestRender()}}registerMarkUniformValue(e,n,i=r=>r){const r=this.createMarkUniformSetter(e),s=o=>{if(o==null)throw new Error(`Trying to set null/undefined value for uniform: ${e}${Ee(n)?`Expr: ${n.expr}`:""}`);r(o)};if(Ee(n)){let o;const a=()=>s(i(o(null)));o=this.unitView.paramRuntime.watchExpression(n.expr,a),a()}else s(i(n))}deleteGraphicsData(){const e=this.glHelper;if(!e){this.vertexArrayInfo=void 0,this.bufferInfo=void 0;return}const n=e.gl;if(this.vertexArrayInfo&&(this.gl.bindVertexArray(null),n.deleteVertexArray(this.vertexArrayInfo.vertexArrayObject),this.vertexArrayInfo=void 0),this.bufferInfo){for(let i=0;i<8;i++)n.disableVertexAttribArray(i);Object.values(this.bufferInfo.attribs).forEach(i=>this.gl.deleteBuffer(i.buffer)),this.bufferInfo.indices&&this.gl.deleteBuffer(this.bufferInfo.indices),this.bufferInfo=void 0}}dispose(){this.deleteGraphicsData()}updateBufferInfo(e){if(this.gl.bindVertexArray(null),this.bufferInfo&&e.vertexCount<=this.bufferInfo.allocatedVertices)for(const[n,i]of Object.entries(e.arrays))i.data&&uB(this.gl,this.bufferInfo.attribs[n],i.data,0);else{this.deleteGraphicsData(),this.bufferInfo=AB(this.gl,e.arrays,{numElements:e.vertexCount}),this.bufferInfo.allocatedVertices=e.allocatedVertices;for(const[n,i]of Object.entries(e.arrays))this.bytesPerElement.set(n,i.data.BYTES_PER_ELEMENT)}}get glHelper(){return this.getContext().glHelper}get gl(){return this.glHelper.gl}isReady(){return this.bufferInfo&&this.programInfo}isPickingParticipant(){if(this.properties.tooltip===null&&!this.unitView.paramRuntime.hasPointSelections())return!1;for(const e of this.unitView.getLayoutAncestors())if(!e.isPickingSupported())return!1;return!0}bindOrSetMarkUniformBlock(){this.markUniformsAltered?(pg(this.gl,this.programInfo,this.markUniformInfo),this.markUniformsAltered=!1):gg(this.gl,this.programInfo,this.markUniformInfo)}prepareRender(e){const n=this.glHelper,i=this.gl,r=[];r.push(()=>{this.vertexArrayInfo||(this.vertexArrayInfo=pD(this.gl,this.programInfo,this.bufferInfo)),i.useProgram(this.programInfo.program)});for(const[o,a]of Object.entries(this.encoders)){const l=n.rangeTextures.get(a.scale);l&&r.push(()=>hi(this.programInfo,{[yf+o]:l}))}r.push(...this.selectionTextureOps),this.getSampleFacetMode()==fm&&r.push(()=>{let o;for(const a of this.unitView.getLayoutAncestors())if(o=a.getSampleFacetTexture(),o)break;if(!o)throw new Error("No facet texture available. This is bug.");hi(this.programInfo,{uSampleFacetTexture:o})});const s=(e.picking??!1)&&this.isPickingParticipant();return r.push(()=>Qs(this.viewUniformInfo,{uViewOpacity:this.unitView.getEffectiveOpacity(),uPickingEnabled:s})),this.opaque||e.picking?r.push(()=>i.disable(i.BLEND)):r.push(()=>i.enable(i.BLEND)),r}prepareSampleFacetRendering(e){const n=e.sampleFacetRenderingOptions,i=this.programInfo.uniformSetters.uSampleFacet;if(n&&i){const r=n.pixelToUnit,s=n.locSize.location*r,o=n.locSize.size*r;if(s>1||s+o<0)return!1;this.gl.uniform4f(i.location,s,o,s,o)}return!0}render(e){}createRenderCallback(e,n){if(!this.bufferInfo)return()=>{};const i=this;let r;const s=this.unitView.getScaleResolution("x")?.getScale(),o=s&&Le(s.type),a=["index","locus"].includes(s?.type)?-1:0,l=[0,0];r=f=>{if(o&&f.xIndex){const h=s.domain(),A=f.xIndex(h[0]+a,h[1],l),d=A[0],g=A[1]-d;g>0&&e(d,g)}else e(f.offset,f.count)};const c=this.rangeMap.get(void 0).count==0?n.facetId:void 0,u=this.rangeMap.get(c);return n.sampleFacetRenderingOptions?function(){u.count&&i.prepareSampleFacetRendering(n)&&r(u)}:function(){u.count&&r(u)}}setViewport(e,n,i,r){i=i.flatten();const s=this.gl,o=this.properties,a=.5,l=(o.xOffset??0)+a,c=(o.yOffset??0)+a;let u,f=i;if(o.clip!=="never"&&(o.clip||r)){let h=0,A=0,d;if(r){if(f=i.intersect(r).flatten(),!f.isDefined())return!1;d=[i.width/f.width,i.height/f.height],A=Math.max(0,i.y2-r.y2),h=Math.min(0,i.x-r.x)}else d=[1,1];const g=[f.x,e.height-f.y2,f.width,f.height].map(C=>C*n),m=g.map(C=>Math.floor(C)),p=g[0]-m[0],w=g[1]-m[1];s.viewport(...m),s.scissor(...m),s.enable(s.SCISSOR_TEST),u={uViewOffset:[(l+h+p/n)/f.width,-(c+A-w/n)/f.height],uViewScale:d}}else{if(!i.isDefined())return!1;s.viewport(0,0,Math.round(e.width*n),Math.round(e.height*n)),s.disable(s.SCISSOR_TEST),u={uViewOffset:[(i.x+l)/e.width,(e.height-i.y-c-i.height)/e.height],uViewScale:[i.width/e.width,i.height/e.height]}}return Qs(this.viewUniformInfo,{...u,uViewportSize:[i.width,i.height],uDevicePixelRatio:n}),pg(this.gl,this.programInfo,this.viewUniformInfo),!0}findDatumAt(e,n){}}class qk extends Xt{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,i]of this.entries())e.has(n)||(i.offset=0,i.count=0,i.xIndex=void 0);for(const[n,i]of e.entries())Object.assign(this.get(n),i)}}function Ef(t,e){const n=Vl(e);let i=t[e]&&{...t[e]},r=t[n]&&{...t[n]};if(!(ht(i)||ht(r))){if(i){if(!mt(t[e]))return;if(r){if(i.type!="quantitative"){const s=(1-(i.band||1))/2;i.band=s,r.band=-s}}else if(i.type=="quantitative")r={datum:0,domainInert:!0};else{r={...i};const s=(1-(i.band??1))/2;i.band=0+s,r.band=1-s}}else i={value:0},r={value:1};t[e]=i,t[n]=r}}function $a(t,e){const n=n0(t);n&&(n.resolutionChannel=e)}function Am(t,e){t.stroke||(e?t.stroke={value:null}:(t.stroke=structuredClone(t.color),$a(t.stroke,"color"))),ht(t.stroke)&&t.stroke.value===null&&(t.strokeWidth={value:0}),t.strokeOpacity||(t.strokeOpacity=structuredClone(t.opacity),$a(t.strokeOpacity,"opacity"))}function dm(t,e){ht(t.fill)&&t.fill.value===null?t.fillOpacity={value:0}:t.fill||(t.fill=structuredClone(t.color),$a(t.fill,"color"),!e&&!t.fillOpacity&&(t.fillOpacity={value:0})),t.fillOpacity||(e?(t.fillOpacity=structuredClone(t.opacity),$a(t.fillOpacity,"opacity")):t.fillOpacity={value:0})}const Kk=["none","diagonal","antiDiagonal","cross","vertical","horizontal","grid","dots","rings","ringsLarge"];class jk extends qs{constructor(e){super(e),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 Za(this,"opaque",()=>!this.#e()&&!this.#t()&&!this.properties.shadowOpacity&&ht(this.encoding.fillOpacity)&&this.encoding.fillOpacity.value==1&&this.properties.minOpacity==1)&&this.unitView.getEffectiveOpacity()==1}fixEncoding(e){return Ef(e,"x"),Ef(e,"y"),Am(e,this.properties.filled),dm(e,this.properties.filled),delete e.color,delete e.opacity,e}#e(){const e=this.properties;return e.cornerRadius||e.cornerRadiusBottomLeft||e.cornerRadiusBottomRight||e.cornerRadiusTopLeft||e.cornerRadiusTopRight}#t(){const e=this.encoding.strokeWidth;return!(ht(e)&&!e.value)||"condition"in e}async initializeGraphics(){await super.initializeGraphics();const e=[];this.#e()&&e.push("ROUNDED_CORNERS"),this.#t()&&e.push("STROKED"),this.properties.shadowOpacity&&e.push("SHADOW"),this.createAndLinkShaders(bD,ED,[ID,...e.map(n=>"#define "+n)])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties;this.registerMarkUniformValue("uMinWidth",e.minWidth),this.registerMarkUniformValue("uMinHeight",e.minHeight),this.registerMarkUniformValue("uMinOpacity",e.minOpacity),this.registerMarkUniformValue("uCornerRadiusTopRight",e.cornerRadiusTopRight??e.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomRight",e.cornerRadiusBottomRight??e.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusTopLeft",e.cornerRadiusTopLeft??e.cornerRadius??0),this.registerMarkUniformValue("uCornerRadiusBottomLeft",e.cornerRadiusBottomLeft??e.cornerRadius??0),this.registerMarkUniformValue("uHatchPattern",e.hatch,n=>Math.max(0,Kk.indexOf(n??"none"))),this.registerMarkUniformValue("uShadowBlur",e.shadowBlur??0),this.registerMarkUniformValue("uShadowOpacity",e.shadowOpacity??0),this.registerMarkUniformValue("uShadowOffsetX",e.shadowOffsetX??0),this.registerMarkUniformValue("uShadowOffsetY",e.shadowOffsetY??0),this.registerMarkUniformValue("uShadowColor",e.shadowColor??"black",wf)}updateGraphicsData(){const e=this.unitView.getCollector();if(!e){console.debug("No collector");return}const n=e.getItemCount(),i=new Pk({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});i.addBatches(e.facetBatches);const r=i.toArrays();this.rangeMap.migrateEntries(r.rangeMap),this.updateBufferInfo(r)}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>Ai(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((i,r)=>{Ra(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,r,i)},e)}findDatumAt(e,n){e=Me(e);const i=this.unitView.getCollector().facetBatches.get(e);if(!i)return;const r=this.encoders,s=r.x.scale.type;if(cn(s)){const o=r.x.dataAccessor;return i.find(a=>n==o(a))}else{const o=r.x.dataAccessor,a=r.x2.dataAccessor;return i.find(l=>n>=o(l)&&n<a(l))}}}const Wk=`flat out float vRadius;flat out float vRadiusWithPadding;flat out lowp vec4 vFillColor;flat out lowp vec4 vStrokeColor;flat out lowp float vShape;flat out lowp float vHalfStrokeWidth;flat out mat2 vRotationMatrix;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TRIANGLE_RIGHT=5.0;const float TRIANGLE_DOWN=6.0;const float TRIANGLE_LEFT=7.0;const float TICK_UP=8.0;const float TICK_RIGHT=9.0;const float TICK_DOWN=10.0;const float TICK_LEFT=11.0;float computeSemanticThresholdFactor(){return getScaled_semanticScore()>=uSemanticThreshold ? 1.0 : 0.0;}vec2 getDxDy(){
|
|
452
460
|
#if defined(dx_DEFINED) || defined(dy_DEFINED)
|
|
453
461
|
return vec2(getScaled_dx(),getScaled_dy())/uViewportSize;
|
|
454
462
|
#else
|
|
455
463
|
return vec2(0.0,0.0);
|
|
456
464
|
#endif
|
|
457
|
-
}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();}`,
|
|
465
|
+
}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();}`,Xk="const lowp vec4 white=vec4(1.0);const lowp vec4 black=vec4(0.0,0.0,0.0,1.0);flat in float vRadius;flat in float vRadiusWithPadding;flat in lowp vec4 vFillColor;flat in lowp vec4 vStrokeColor;flat in lowp float vShape;flat in lowp float vHalfStrokeWidth;flat in mat2 vRotationMatrix;out lowp vec4 fragColor;const float CIRCLE=0.0;const float SQUARE=1.0;const float CROSS=2.0;const float DIAMOND=3.0;const float TRIANGLE_UP=4.0;const float TICK_UP=8.0;float circle(vec2 p,float r){return length(p)-r;}float square(vec2 p,float r){p=abs(p);return max(p.x,p.y)-r;}float tickUp(vec2 p,float r){float halfR=r*0.5;p.y+=halfR;p=abs(p);return max(p.x-r*0.15,p.y-halfR);}float equilateralTriangle(vec2 p,float r){p.y=-p.y;float k=sqrt(3.0);float kr=k*r;p.y-=kr/2.0;return max((abs(p.x)*k+p.y)/2.0,-p.y-kr);}float crossShape(vec2 p,float r){p=abs(p);vec2 b=vec2(0.4,1.0)*r;vec2 v=abs(p)-b.xy;vec2 h=abs(p)-b.yx;return min(max(v.x,v.y),max(h.x,h.y));}float diamond(vec2 p,float r){p=abs(p);return(max(abs(p.x-p.y),abs(p.x+p.y))-r)/sqrt(2.0);}void main(){float d;vec2 p=vRotationMatrix*(2.0*gl_PointCoord-1.0)*vRadiusWithPadding;float r=vRadius;if(vShape==CIRCLE){d=circle(p,r);}else if(vShape==SQUARE){d=square(p,r);}else if(vShape==CROSS){d=crossShape(p,r);}else if(vShape==DIAMOND){d=diamond(p,r);}else if(vShape==TRIANGLE_UP){d=equilateralTriangle(p,r);}else if(vShape==TICK_UP){d=tickUp(p,r);}else{d=0.0;}if(!uPickingEnabled){lowp vec4 fillColor=mix(vFillColor,white,-d*uGradientStrength/vRadius);fragColor=distanceToColor(d+(uInwardStroke ? vHalfStrokeWidth : 0.0),fillColor,vStrokeColor,vec4(0.0),vHalfStrokeWidth);}else if(d-vHalfStrokeWidth<=0.0){fragColor=vPickingColor;}else{discard;}}",Zk=`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;
|
|
458
466
|
#pragma markUniforms
|
|
459
|
-
};`;class
|
|
467
|
+
};`;class gm extends Qe{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 $k(t,e,n){const i=new gm({type:"sample",size:t});for(const r of e)i.handle(n(r));return i.complete(),i.reservoir}const e4={};class t4 extends qs{#e=()=>0;constructor(e){super(e),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 n=this.properties.semanticZoomFraction;if(n!=null)if(Ee(n)){const i=this.unitView.paramRuntime.watchExpression(n.expr,()=>this.getContext().animator.requestRender());this.#e=i}else this.#e=()=>n;"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(),...e4}}fixEncoding(e){return Am(e,this.properties.filled),dm(e,this.properties.filled),delete e.color,delete e.opacity,e}initializeData(){super.initializeData();const e=this.encoders.semanticScore?.dataAccessor?.asNumberAccessor();e&&(this.sampledSemanticScores=Float32Array.from($k(1e4,this.unitView.getCollector().getData(),e)),this.sampledSemanticScores.sort((n,i)=>n-i))}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(Wk,Xk,[Zk])}finalizeGraphicsInitialization(){super.finalizeGraphicsInitialization(),this.gl.useProgram(this.programInfo.program);const e=this.properties;this.registerMarkUniformValue("uInwardStroke",e.inwardStroke,n=>!!n),this.registerMarkUniformValue("uGradientStrength",e.fillGradientStrength),this.registerMarkUniformValue("uMinPickingSize",e.minPickingSize)}updateGraphicsData(){const e=this.unitView.getCollector();if(!e){console.debug("No collector");return}const n=e.getItemCount(),i=new Ok({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(n,this.properties.minBufferSize||0)});i.addBatches(e.facetBatches);const r=i.toArrays();this.rangeMap.migrateEntries(r.rangeMap),this.updateBufferInfo(r)}#t(){const e=Math.pow(2,this.properties.geometricZoomBound||0);return Math.pow(Math.min(1,this.unitView.getZoomLevel()/e),1/3)}getSemanticThreshold(){if(this.sampledSemanticScores){const e=Math.max(0,1-this.#e()*this.unitView.getZoomLevel());if(e<=0)return-1/0;if(e>=1)return 1/0;{const n=this.sampledSemanticScores;return ad(n,e)}}else return-1}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>{Qs(this.markUniformInfo,{uScaleFactor:this.#t(),uSemanticThreshold:this.getSemanticThreshold()}),this.markUniformsAltered=!0}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>Ai(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((i,r)=>{r&&Ra(n,this.vertexArrayInfo,n.POINTS,r,i)},e)}}const n4="const int BUTT=0;const int SQUARE=1;const int ROUND=2;in float pos;in float side;flat out vec4 vColor;flat out float vSize;out float vNormalLengthInPixels;out highp vec2 vPosInPixels;void main(void){float pixelSize=1.0/uDevicePixelRatio;float size=getScaled_size();float opacity=getScaled_opacity()*uViewOpacity;if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()));vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()));vec2 tangent=b-a;float offset=0.0;float relativeDiff=0.0;if(uMinLength>0.0||uStrokeCap!=BUTT){float len=length(tangent*uViewportSize);float diff=max(0.0,uMinLength-len);if(uStrokeCap!=BUTT){diff+=size;}relativeDiff=diff/len;offset=relativeDiff*(pos-0.5);}vec2 p=pos<1.0? a+tangent*(pos+offset): b+tangent*offset;float aaPadding=pixelSize;vec2 normal=normalize(vec2(-tangent.y,tangent.x)/uViewportSize);p+=normal*side*(size+aaPadding)/uViewportSize;gl_Position=unitToNdc(p);vColor=vec4(getScaled_color()*opacity,opacity);vSize=size;vNormalLengthInPixels=side*(size+aaPadding);vPosInPixels=vec2(pos,(1.0-pos))*(1.0+relativeDiff)*length(tangent*uViewportSize)-vec2(uStrokeCap!=BUTT ? size/2.0 : 0.0);setupPicking();}",i4="const int BUTT=0;const int SQUARE=1;const int ROUND=2;uniform sampler2D uDashTexture;flat in vec4 vColor;flat in float vSize;in vec2 vPosInPixels;in float vNormalLengthInPixels;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distanceFromEnd=-min(vPosInPixels[0],vPosInPixels[1]);float distance;if(distanceFromEnd>0.0&&uStrokeCap==ROUND){distance=length(vec2(distanceFromEnd,vNormalLengthInPixels));}else{distance=abs(vNormalLengthInPixels);}float opacity=clamp(((vSize/2.0-distance)*dpr),-0.5,0.5)+0.5;if(uDashTextureSize>0.0){float pos=(vPosInPixels[0]+uStrokeDashOffset)*dpr;float floored=floor(pos);vec2 texelPositions=(floored+vec2(0.5,1.5))/dpr/uDashTextureSize;opacity*=mix(texture(uDashTexture,vec2(texelPositions[0],0)).r,texture(uDashTexture,vec2(texelPositions[1],0)).r,clamp((pos-floored),0.0,1.0));}fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",r4=`layout(std140)uniform Mark{uniform mediump float uMinLength;uniform mediump float uDashTextureSize;uniform lowp int uStrokeCap;uniform mediump float uStrokeDashOffset;
|
|
460
468
|
#pragma markUniforms
|
|
461
|
-
};`;class
|
|
469
|
+
};`;class s4 extends qs{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&&mt(e.y)&&e.y.type=="quantitative")e.x2=e.x,e.y2={datum:0};else if(!e.y2&&mt(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=o4(this.properties.strokeDash);this.dashTexture=Ds(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(n4,i4,[r4])}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(),i=new Lk({encoders:this.encoders,attributes:this.getAttributes(),numItems:Math.max(n,this.properties.minBufferSize||0)});i.addBatches(e.facetBatches);const r=i.toArrays();this.rangeMap.migrateEntries(r.rangeMap),this.updateBufferInfo(r)}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>hi(this.programInfo,{uDashTexture:this.dashTexture})),n.push(()=>Ai(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((i,r)=>Ra(n,this.vertexArrayInfo,n.TRIANGLE_STRIP,r,i),e)}}function o4(t){if(!t)return new Uint8Array(0);if(t.length==0||t.length%2||t.findIndex(s=>Math.round(s)!=s||s<1||s>1e3)>=0)throw new Error("Invalid stroke dash pattern: "+JSON.stringify(t));const e=t.reduce((s,o)=>s+o),n=new Uint8Array(e);let i=!0,r=0;for(let s of t){for(;s;)n[r++]=i&&255||0,s--;i=!i}return n}const a4="flat out vec4 vColor;flat out float vSize;out float vNormalLengthInPixels;flat out float vGamma;const int SHAPE_ARC=0;const int SHAPE_DOME=1;const int SHAPE_DIAGONAL=2;const int SHAPE_LINE=3;const int ORIENT_VERTICAL=0;const int ORIENT_HORIZONTAL=1;float distanceFromLine(vec2 pointOnLine1,vec2 pointOnLine2,vec2 point){vec2 a=point-pointOnLine1;vec2 b=pointOnLine2-pointOnLine1;vec2 proj=dot(a,b)/dot(b,b)*b;return length(a-proj);}bool isInsideViewport(vec2 point,float marginFactor){vec2 margin=uViewportSize*vec2(marginFactor);return point.x>=-margin.x&&point.x<=uViewportSize.x+margin.x&&point.y>=-margin.y&&point.y<=uViewportSize.y+margin.y;}void main(void){float pixelSize=1.0/uDevicePixelRatio;float opacity=getScaled_opacity()*uViewOpacity;vec2 p1,p2,p3,p4;vec2 a=applySampleFacet(vec2(getScaled_x(),getScaled_y()))*uViewportSize;vec2 b=applySampleFacet(vec2(getScaled_x2(),getScaled_y2()))*uViewportSize;if(uShape<=SHAPE_DOME){if(uShape==SHAPE_DOME){vec2 height=vec2(0.0);if(uOrient==ORIENT_VERTICAL){p1=vec2(min(a.x,b.x),b.y);p4=vec2(max(a.x,b.x),b.y);height=vec2(0.0,a.y-b.y);if(uClampApex){if(p4.x>0.0){p1.x=max(p1.x,-p4.x);}if(p1.x<uViewportSize.x){p4.x=min(p4.x,2.0*uViewportSize.x-p1.x);}}}else{p1=vec2(b.x,min(a.y,b.y));p4=vec2(b.x,max(a.y,b.y));height=vec2(a.x-b.x,0.0);if(uClampApex){if(p4.y>0.0){p1.y=max(p1.y,-p4.y);}if(p1.y<uViewportSize.y){p4.y=min(p4.y,2.0*uViewportSize.y-p1.y);}}}vec2 controlOffset=height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}if(uShape==SHAPE_ARC){p1=a;p4=b;vec2 chordVector=p4-p1;vec2 unitChordVector=normalize(chordVector);vec2 chordNormal=vec2(-unitChordVector.y,unitChordVector.x);float chordLength=length(chordVector);if(chordLength>uMaxChordLength){if(isInsideViewport(p1,2.0)){chordLength=uMaxChordLength;p4=p1+unitChordVector*uMaxChordLength;}else if(isInsideViewport(p4,2.0)){chordLength=uMaxChordLength;p1=p4-unitChordVector*uMaxChordLength;}}float height=max(chordLength/2.0*uArcHeightFactor,uMinArcHeight);vec2 controlOffset=chordNormal*height/0.75;p2=p1+controlOffset;p3=p4+controlOffset;}}else if(uShape==SHAPE_DIAGONAL){if(uOrient==ORIENT_VERTICAL){p1=a;p2=vec2(a.x,(a.y+b.y)/2.0);p3=vec2(b.x,(a.y+b.y)/2.0);p4=b;}else{p1=a;p2=vec2((a.x+b.x)/2.0,a.y);p3=vec2((a.x+b.x)/2.0,b.y);p4=b;}}else if(uShape==SHAPE_LINE){p1=a;p2=(a+b)/2.0;p3=p2;p4=b;}vec2 strip=vec2(float(gl_VertexID/2)/float(uSegmentBreaks),float(gl_VertexID % 2)-0.5);float t=smoothstep(0.0,1.0,strip.x);vec2 C1=p4-3.0*p3+3.0*p2-p1;vec2 C2=3.0*p3-6.0*p2+3.0*p1;vec2 C3=3.0*p2-3.0*p1;vec2 C4=p1;vec2 p;if(t==0.0){p=p1;}else if(t==1.0){p=p4;}else{p=C1*t*t*t+C2*t*t+C3*t+C4;}vec2 tangent=normalize(3.0*C1*t*t+2.0*C2*t+C3);vec2 normal=vec2(-tangent.y,tangent.x);float size=getScaled_size();if(size<pixelSize){opacity*=size/pixelSize;size=pixelSize;}float paddedSize=uPickingEnabled? max(size,uMinPickingSize): size+pixelSize;vNormalLengthInPixels=strip.y*paddedSize;if(uShape==SHAPE_ARC&&uArcFadingDistance[0]>0.0&&uArcFadingDistance[1]>0.0&&(!uNoFadingOnPointSelection||!isPointSelected())){float d=distanceFromLine(p1,p4,p);float distanceOpacity=smoothstep(uArcFadingDistance[1],uArcFadingDistance[0],d);opacity*=distanceOpacity;if(distanceOpacity<=0.0){vNormalLengthInPixels=0.0;}}p+=normal*vNormalLengthInPixels;gl_Position=pixelsToNdc(p);vec3 color=getScaled_color();vColor=vec4(color*opacity,opacity);vGamma=getGammaForColor(color);vSize=paddedSize;setupPicking();}",c4="flat in vec4 vColor;flat in float vSize;in float vNormalLengthInPixels;flat in float vGamma;out lowp vec4 fragColor;void main(void){float dpr=uDevicePixelRatio;float distance=abs(vNormalLengthInPixels);float opacity=clamp(((vSize/2.0-distance)*dpr),0.0,1.0);opacity=pow(opacity,vGamma);fragColor=vColor*opacity;if(uPickingEnabled){fragColor=vPickingColor;}}",l4=`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;
|
|
462
470
|
#pragma markUniforms
|
|
463
|
-
};`,
|
|
471
|
+
};`,u4=["arc","dome","diagonal","line"],f4=["vertical","horizontal"];class h4 extends qs{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=void 0}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||(mt(e.x)?e.x2={datum:0}:e.x2=e.x),e.y2||(mt(e.y)?e.y2={datum:0}:e.y2=e.y),e}async initializeGraphics(){await super.initializeGraphics(),this._baseInstanceExt=this.gl.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"),this.createAndLinkShaders(a4,c4,[l4])}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=>u4.indexOf(n)),this.registerMarkUniformValue("uOrient",e.orient,n=>f4.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(),i=new Uk({encoders:this.encoders,attributes:this.getAttributes(),numItems:n});i.addBatches(e.facetBatches);const r=i.toArrays();this.rangeMap.migrateEntries(r.rangeMap),this.arrays=Object.fromEntries(Object.entries(r.arrays).map(([s,o])=>[s,{...o,data:void 0}])),this.updateBufferInfo(r)}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>this.bindOrSetMarkUniformBlock()),this._baseInstanceExt?n.push(()=>Ai(this.gl,this.programInfo,this.vertexArrayInfo)):n.push(()=>this.gl.bindVertexArray(null)),n}render(e){const n=this.gl,i=()=>(this.markUniformInfo.uniforms.uSegmentBreaks[0]+1)*2;return this._baseInstanceExt?this.createRenderCallback((r,s)=>{this._baseInstanceExt.drawArraysInstancedBaseInstanceWEBGL(n.TRIANGLE_STRIP,0,i(),s,r)},e):this.createRenderCallback((r,s)=>{for(const o of Object.entries(this.bufferInfo.attribs)){const[a,l]=o;l.buffer&&l.numComponents&&l.divisor&&(l.offset=r*this.arrays[a].numComponents*this.bytesPerElement.get(a))}Ai(n,this.programInfo,this.bufferInfo),n.drawArraysInstanced(n.TRIANGLE_STRIP,0,i(),s)},e)}}const A4=`in mediump vec2 vertexCoord;in lowp vec2 textureCoord;in float width;out vec2 vTexCoord;out float vEdgeFadeOpacity;flat out vec4 vColor;flat out float vSlope;flat out float vGamma;struct RangeResult{float pos;float scale;};float minValue(vec4 v){return min(min(v.x,v.y),min(v.z,v.w));}float maxValue(vec4 v){return max(max(v.x,v.y),max(v.z,v.w));}/***All measures are in[0,1]*/RangeResult positionInsideRange(float a,float b,float width,float padding,int align,bool flush){float span=b-a;float paddedWidth=width+2.0*padding;if(a>1.0||b<0.0){return RangeResult(0.0,0.0);}float extra=max(0.0,span-paddedWidth);float pos;if(align==0){float centre=a+b;if(flush){float leftOver=max(0.0,paddedWidth-centre);centre+=min(leftOver,extra);float rightOver=max(0.0,paddedWidth+centre-2.0);centre-=min(rightOver,extra);}pos=centre/2.0;}else if(align<0){float edge=a;if(flush){float over=max(0.0,-edge);edge+=min(over,extra);}pos=edge+padding;}else{float edge=b;if(flush){float over=max(0.0,edge-1.0);edge-=min(over,extra);}pos=edge-padding;}float scale=clamp((span-padding)/paddedWidth,0.0,1.0);return RangeResult(pos,scale);}vec2 calculateRotatedDimensions(float width,mat2 rotationMatrix){vec2 a=abs(rotationMatrix*vec2(width/2.0,0.5));vec2 b=abs(rotationMatrix*vec2(width/2.0,-0.5));return vec2(max(a.x,b.x),max(a.y,b.y))*2.0;}ivec2 fixAlignForAngle(ivec2 align,float angleInDegrees){float a=mod(angleInDegrees+45.0,360.0);int x=align.x;int y=-align.y;if(a<90.0){return ivec2(x,y);}else if(a<180.0){return ivec2(y,-x);}else if(a<270.0){return ivec2(-x,y);}else{return ivec2(-y,x);}}void main(void){float opacity=getScaled_opacity()*uViewOpacity;vec2 size=vec2(getScaled_size());float x=getScaled_x();float y=getScaled_y();float scale=1.0;float angleInDegrees=getScaled_angle();float angle=-angleInDegrees*PI/180.0;float sinTheta=sin(angle);float cosTheta=cos(angle);mat2 rotationMatrix=mat2(cosTheta,sinTheta,-sinTheta,cosTheta);vec2 flushSize=calculateRotatedDimensions(width,rotationMatrix);
|
|
464
472
|
#if defined(x2_DEFINED) || defined(y2_DEFINED)
|
|
465
473
|
ivec2 align=fixAlignForAngle(uAlign,angleInDegrees);
|
|
466
474
|
#else
|
|
@@ -473,9 +481,9 @@ vec2 pos=applySampleFacet(vec2(x,y));
|
|
|
473
481
|
#ifdef y2_DEFINED
|
|
474
482
|
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;}
|
|
475
483
|
#endif
|
|
476
|
-
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();}`,
|
|
484
|
+
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();}`,d4="uniform sampler2D uTexture;in vec2 vTexCoord;in float vEdgeFadeOpacity;flat in vec4 vColor;flat in float vSlope;flat in float vGamma;out lowp vec4 fragColor;float median(float r,float g,float b){return max(min(r,g),min(max(r,g),b));}float getDist(vec2 uv){vec3 c=texture(uTexture,uv).rgb;return 1.0-median(c.r,c.g,c.b);}/***Calculates the super-sampled distance to the edge.*This is used to avoid aliasing when rendering small text,*as mip-mapping cannot be used here.*The distance is averaged over a grid of n x n samples.*/float getSuperDist(vec2 uv){vec2 dx=dFdx(uv);vec2 dy=dFdy(uv);float n=2.0;float sum=0.0;for(float x=0.5;x<n;x++){for(float y=0.5;y<n;y++){sum+=getDist(uv+x/n*dx+y/n*dy);}}return sum/(n*n);}void main(){float sigDist=getSuperDist(vTexCoord);float slope=vSlope;if(uLogoLetter){slope=0.7/length(vec2(dFdy(sigDist),dFdx(sigDist)));}float opa=clamp((sigDist-0.5)*slope+0.5,0.0,1.0);opa*=clamp(vEdgeFadeOpacity,0.0,1.0);opa=pow(opa,vGamma);fragColor=vColor*opa;if(uPickingEnabled){fragColor=vPickingColor;}}",g4=`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;
|
|
477
485
|
#pragma markUniforms
|
|
478
|
-
};`,
|
|
486
|
+
};`,p4={left:-1,center:0,right:1},m4={top:-1,middle:0,bottom:1,alphabetic:1};class w4 extends qs{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 li)this.properties.fitToBand&&Ef(e,n);return e}async initializeGraphics(){await super.initializeGraphics(),this.createAndLinkShaders(A4,d4,[g4])}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,i=>!!i),this.registerMarkUniformValue("uFlushY",e.flushY,i=>!!i),this.registerMarkUniformValue("uSqueeze",e.squeeze,i=>!!i),Qs(this.markUniformInfo,{uAlign:[p4[e.align],m4[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(),i=this.encoding,r=this.encoders.text;let s=0;const o="format"in i.text?He(i.text.format):c=>c;for(const c of n){const u=o(r(c)),f=le(u)?u:u===null?"":""+u;s+=f&&f.length||0}const a=new _k({encoders:this.encoders,attributes:this.getAttributes(),properties:this.properties,fontMetrics:this.font.metrics,numCharacters:Math.max(s,this.properties.minBufferSize||1024)});a.addBatches(e.facetBatches);const l=a.toArrays();this.rangeMap.migrateEntries(l.rangeMap),this.updateBufferInfo(l)}prepareRender(e){const n=super.prepareRender(e);return n.push(()=>{hi(this.programInfo,{uTexture:this.font.texture})}),n.push(()=>this.bindOrSetMarkUniformBlock()),n.push(()=>Ai(this.gl,this.programInfo,this.vertexArrayInfo)),n}render(e){const n=this.gl;return this.createRenderCallback((i,r)=>Ra(n,this.vertexArrayInfo,n.TRIANGLES,r,i),e)}}const pm=1;function If(){let t=[0,1],e=[0,1],n=1,i=1,r=0,s=0,o=.5,a=0;const c=u=>(u+o-t[0])/n*i+e[0];return c.invert=u=>(u-e[0])/i*n+t[0]-o,c.domain=function(u){if(arguments.length){t=s2(u),n=t[1]-t[0];const f=t[0]===0&&t[0]===0;if(n<pm&&!f){n=pm;const h=(t[0]+t[1])/2;t[0]=h-n/2,t[1]=h+n/2}return c}else return t.slice()},c.range=function(u){return arguments.length?(e=[...u],i=e[1]-e[0],c):e},c.numberingOffset=function(u){return arguments.length?(a=u,c):a},c.padding=function(u){return arguments.length?(s=u,r=Math.min(1,u),c):r},c.paddingInner=function(u){return arguments.length?(r=Math.min(1,u),c):r},c.paddingOuter=function(u){return arguments.length?(s=u,c):s},c.align=function(u){return arguments.length?(o=Math.max(0,Math.min(1,u)),c):o},c.step=()=>i/n,c.bandwidth=()=>c.step(),c.ticks=u=>{const f=c.align(),h=c.numberingOffset();return Yo(t[0]-f+h,t[1]-f+h,Math.min(u,Math.ceil(n))).filter(Number.isInteger).map(A=>A-a)},c.tickFormat=(u,f)=>{if(f)throw new Error("Index scale's tickFormat does not support a specifier!");const A=ri(t[0],t[1],Math.min(u,Math.ceil(n)))<1e5?He(","):He(".3s");return d=>A(d+a)},c.copy=()=>If().domain(t).range(e).paddingInner(r).paddingOuter(s).numberingOffset(a),c}const xf=He(",d");function y4(t){return t.chrom+":"+xf(Math.floor(t.pos+1))}function C4(t,e){return t.chrom+":"+xf(Math.floor(t.pos+1))+"-"+(t.chrom!=e.chrom?e.chrom+":":"")+xf(Math.ceil(e.pos))}const mm={dm6:`chr3R 32079331
|
|
479
487
|
chr3L 28110227
|
|
480
488
|
chr2R 25286936
|
|
481
489
|
chrX 23542271
|
|
@@ -596,24 +604,24 @@ chr18 90702639
|
|
|
596
604
|
chr19 61431566
|
|
597
605
|
chrX 171031299
|
|
598
606
|
chrY 91744698
|
|
599
|
-
chrM 16299`};function
|
|
600
|
-
`).map(e=>{const n=e.split(" ");return{name:n[0],size:parseInt(n[1])}})}const z4=/^([A-Za-z]+:)?\/\//;function pi(t,e){if(e&&z4.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 cm(n)+e}function cm(t){const e=t.replace(/[^/]*$/,"");return e===""?void 0:e.endsWith("://")?t+"/":e}class H4{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(!gu(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,fm(this.config))this.setChromSizes(this.config.contigs);else if(!pu(this.config)){const n=G4(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(pu(this.config))try{const n=pi(e,this.config.url),i=await fetch(n);if(!i.ok)throw new Error(`${i.status} ${i.statusText}`);this.setChromSizes(Y4(await i.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 i=0;i<e.length;i++){this.startByIndex.push(n);const r=e[i].size,s={...e[i],continuousStart:n,continuousEnd:n+r,continuousInterval:[n,n+r],index:i,number:i+1,odd:!(i&1)};this.chromosomes.push(s);const o=s.name.replace(/^chr/i,"");for(const a of["chr"+o,"CHR"+o,"Chr"+o,s.number,""+s.number,o,s.name])this.cumulativeChromPositions.set(a,n),this.chromosomesByName.set(a,s);n+=s.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(e,n){let i=this.cumulativeChromPositions.get(e);if(i===void 0)throw new Error("Unknown chromosome/contig: "+e);return i+ +n}toChromosome(e){if(e>this.totalSize)return;e=Math.floor(e);const n=yn(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 _4(...this.toChromosomalInterval(e))}formatLocus(e){const n=this.toChromosomal(e);if(n)return U4(n)}toChromosomalInterval(e){const n=this.toChromosomal(e[0]+.5),i=this.toChromosomal(e[1]-.5);return i.pos+=1,[n,i]}toContinuousInterval(e){let[n,i]=e;return i||(i=n),[this.toContinuous(n.chrom,n.pos??0),this.toContinuous(i.chrom,i.pos??this.chromosomesByName.get(i.chrom)?.size)]}toDiscreteChromosomeIntervals(e){const n=e[0],i=e[1],r=[];if(n.chrom===i.chrom)r.push({chrom:n.chrom,startPos:n.pos,endPos:i.pos});else{const s=this.chromosomes.findIndex(a=>a.name===n.chrom),o=this.chromosomes.findIndex(a=>a.name===i.chrom);r.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[s].size});for(let a=s+1;a<o;a++)r.push({chrom:this.chromosomes[a].name,startPos:0,endPos:this.chromosomes[a].size});r.push({chrom:i.chrom,startPos:0,endPos:i.pos})}return r}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 i=n[1];if(n.slice(2).every(a=>a===void 0)){const a=this.getChromosome(i);return a?[a.continuousStart,a.continuousEnd]:void 0}const r=n[3]||i,s=parseInt(n[2].replace(/,/g,"")),o=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):s;return[this.toContinuous(i,s-1),this.toContinuous(r,o)]}}}function Y4(t){return A2(t).map(([e,n])=>({name:e,size:parseInt(n)}))}function lm(t){return Ge(t)&&"chrom"in t}function V4(t){return t.every(lm)}function gu(t){return Ge(t)&&("name"in t||pu(t)||fm(t))}function pu(t){return gu(t)&&"url"in t}function fm(t){return gu(t)&&"contigs"in t}function J4(){const t=hu().numberingOffset(1);let e;t.genome=function(i){return arguments.length?(e=i,t):e},t.ticks=i=>{if(!e)return[];const r=t.domain(),s=t.numberingOffset(),[o,a]=[Math.max(r[0],0),Math.min(r[1],e.totalSize-1)].map(f=>e.toChromosome(f)),l=Math.max(1,$n(r[0],r[1],i)),c=[];for(let f=o.index;f<=a.index;f++){const u=e.chromosomes[f],h=Math.max(u.continuousStart+l,r[0]-(r[0]-u.continuousStart)%l),A=Math.min(u.continuousEnd-l/4,r[1]+1);for(let d=h;d<=A;d+=l){const g=d-s;g>=r[0]&&g<r[1]&&c.push(g)}}return c},t.tickFormat=(i,r)=>{if(!e)return;if(r)throw new Error("Locus scale's tickFormat does not support a specifier!");const s=t.domain(),o=s[1]-s[0],a=t.numberingOffset(),c=$n(s[0],s[1],Math.min(i,Math.ceil(o)))<1e6?ze(","):ze(".3s"),f=u=>u-e.toChromosome(u).continuousStart;return u=>c(f(u)+a)};const n=t.copy;return t.copy=()=>{const i=n();let r=e;return i.genome=function(s){return arguments.length?(r=s,i):r},i.genome(e)},t}function q4(t){return t.type=="locus"}function K4(t,e){const n=Hs(t);return n?n.toChromosomal(e):e}function j4(t,e){const n=Hs(t);return n&&lm(e)?n.toContinuous(e.chrom,e.pos):e}function W4(t,e){const n=Hs(t);return n&&V4(e)?n.toContinuousInterval(e):e}function X4(t,e){const n=Hs(t);return n?n.toChromosomalInterval(e):e}function Z4(t){const e=Hs(t);if(!e)throw new Error("No genome has been defined!");return e.getExtent()}function Hs(t){if(t&&"toChromosomal"in t)return t;if(t&&"genome"in t)return t.genome()}function um(t,e,n){return Ve(e)&&n!=null&&(e=Math.min(e,~~(Hr(t.domain())/n)||1)),Ge(e)&&(e.step,e=e.interval),e}function Am(t,e,n){var i=t.range(),r=Math.floor(i[0]),s=Math.ceil(xt(i));if(r>s&&(i=s,s=r,r=i),e=e.filter(function(a){return a=t(a),r<=a&&a<=s}),n>0&&e.length>1){for(var o=[e[0],xt(e)];e.length>n&&e.length>=3;)e=e.filter(function(a,l){return!(l%2)});e.length<3&&(e=o)}return e}function $4(t,e){return t.bins?Am(t,ek(t.bins,e)):t.ticks?t.ticks(e):t.domain()}function ek(t,e){var n=t.length,i=~~(n/(e||n));return i<2?t.slice():t.filter(function(r,s){return!(s%i)})}function tk(t,e,n){var i=t.tickFormat?t.tickFormat(e,n):n?ze(n):String;if(Np(t.type)){var r=ik(n);i=t.bins?r:nk(i,r)}return i}function nk(t,e){return function(n){return t(n)?e(n):""}}function ik(t){var e=Oi(t||",");if(e.precision==null){switch(e.precision=12,e.type){case"%":e.precision-=2;break;case"e":e.precision-=1;break}return rk(ze(e),ze(".1f")(1)[1])}else return ze(e)}function rk(t,e){return function(n){var i=t(n),r=i.indexOf(e),s,o;if(r<0)return i;for(s=sk(i,r),o=s<i.length?i.slice(s):"";--s>r;)if(i[s]!=="0"){++s;break}return i.slice(0,s)+o}}function sk(t,e){var n=t.lastIndexOf("e"),i;if(n>0)return n;for(n=t.length;--n>e;)if(i=t.charCodeAt(n),i>=48&&i<=57)return n+1}const ok="locus",ak="index";var ck=5;function lk(t){const e=t.type;return!t.bins&&(e===or||e===ks||e===Fs)}function hm(t){return Pe(t)&&![zt,ak,ok].includes(t)}function dm(t){return t||{warn:(e,...n)=>console.warn(e,...n)}}var fk=Ro(["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 gm(t,e,n){n=dm(n);for(const r in t)if(!fk[r]){if(r==="padding"&&hm(e.type))continue;ht(e[r])?e[r](t[r]):n.warn("Unsupported scale property: "+r)}const i=pm(e,t,n);i.domain&&e.domain(i.domain),i.applyOrdinalUnknown&&e.unknown(i.ordinalUnknown),wk(e,t,mk(e,t,i.count))}function uk(t,e){const n=Ak(t),i=ie(n);if(!i)throw new Error("Unknown scale type: "+n);const r=i();return!t.domain&&Pe(r.type)&&(t.domain=[0,0]),gm(t,r,e),r}function Ak(t){var e=t.type,n="",i;return e===zt?zt+"-"+or:(hk(t)&&(i=t.rawDomain?t.rawDomain.length:t.domain?t.domain.length+ +(t.domainMid!=null):0,n=i===2?zt+"-":i===3?ar+"-":""),(n+e||or).toLowerCase())}function hk(t){const e=t.type;return Pe(e)&&e!==Bp&&e!==vp&&(t.scheme||t.range&&t.range.length&&t.range.every(le))}function dk(t){if(!t.copy)return t;const e=t.copy();return e.type==null&&t.type!=null&&(e.type=t.type),e}function pm(t,e,n){if(!t.domain)return{domain:null,count:0,ordinalUnknown:void 0,applyOrdinalUnknown:!1};n=dm(n);const i=dk(t);var r=gk(i,e.domainRaw,n);if(r>-1)return{domain:i.domain(),count:r,ordinalUnknown:i.type===Rs&&e.domainImplicit?Da:void 0,applyOrdinalUnknown:!1};var s=e.domain,o=i.type,a=e.zero||e.zero===void 0&&lk(i),l,c;return s?(hm(o)&&e.padding&&s[0]!==xt(s)&&(s=pk(o,s,e.range,e.padding,e.exponent,e.constant)),(a||e.domainMin!=null||e.domainMax!=null||e.domainMid!=null)&&(l=(s=s.slice()).length-1||1,a&&(s[0]>0&&(s[0]=0),s[l]<0&&(s[l]=0)),e.domainMin!=null&&(s[0]=e.domainMin),e.domainMax!=null&&(s[l]=e.domainMax),e.domainMid!=null&&(c=e.domainMid,(c<s[0]||c>s[l])&&n.warn("Scale domainMid exceeds domain min or max.",c),s.splice(l,0,c))),i.domain(mm(o,s,n)),e.nice&&i.nice&&i.nice(e.nice!==!0&&um(i,e.nice)||null),{domain:i.domain(),count:s.length,ordinalUnknown:o===Rs&&e.domainImplicit?Da:void 0,applyOrdinalUnknown:o===Rs}):{domain:null,count:0,ordinalUnknown:void 0,applyOrdinalUnknown:!1}}function gk(t,e,n){return e?(t.domain(mm(t.type,e,n)),e.length):-1}function pk(t,e,n,i,r,s){n??=[0,1];var o=Math.abs(xt(n)-n[0]),a=o/(o-2*i),l=t===Tn?gh(e,null,a):t===Fs?el(e,null,a,.5):t===ks?el(e,null,a,r||1):t===za?vI(e,null,a,s||1):dh(e,null,a);return e=e.slice(),e[0]=l[0],e[e.length-1]=l[1],e}function mm(t,e,n){if(Np(t)){var i=Math.abs(e.reduce(function(r,s){return r+(s<0?-1:s>0?1:0)},0));i!==e.length&&n.warn("Log scale domain includes zero: "+nl(e))}return e}function mk(t,e,n){let i=e.bins;if(i&&!Ce(i)){const r=(i.start==null||i.stop==null)&&t.domain(),s=i.start==null?r[0]:i.start,o=i.stop==null?xt(r):i.stop,a=i.step;a||be("Scale bins parameter missing step property."),i=$r(s,o+a,a)}return i?t.bins=i:t.bins&&delete t.bins,t.type===nu&&(i?!e.domain&&!e.domainRaw&&(t.domain(i),n=i.length):t.bins=t.domain()),n}function wk(t,e,n){var i=t.type,r=e.round||!1,s=e.range;if(e.rangeStep!=null)s=yk(i,e,n);else if(e.scheme&&(s=Ck(i,e,n),ht(s))){if(t.interpolator)return t.interpolator(s);be(`Scale type ${i} does not support interpolating color schemes.`)}if(s&&Ya(i))return t.interpolator(Va(mu(s,e.reverse),e.interpolate,e.interpolateGamma));s&&e.interpolate&&t.interpolate?t.interpolate(Mp(e.interpolate,e.interpolateGamma)):ht(t.round)?t.round(r):ht(t.rangeRound)&&t.interpolate(r?Qs:Nn),s&&t.range(mu(s,e.reverse))}function yk(t,e,n){t!==Dp&&t!==tu&&be("Only band and point scales support rangeStep.");var i=(e.paddingOuter!=null?e.paddingOuter:e.padding)||0,r=t===tu?1:(e.paddingInner!=null?e.paddingInner:e.padding)||0;return[0,e.rangeStep*$f(n,r,i)]}function Ck(t,e,n){var i=e.schemeExtent,r,s;return Ce(e.scheme)?s=Va(e.scheme,e.interpolate,e.interpolateGamma):(r=e.scheme.toLowerCase(),s=ru(r),s||be(`Unrecognized scheme name: ${e.scheme}`)),n=t===Qp?n+1:t===nu?n-1:t===eu||t===Sp?+e.schemeCount||ck:n,Ya(t)?wm(s,i,e.reverse):ht(s)?yD(wm(s,i),n):t===Rs?s:s.slice(0,n)}function wm(t,e,n){return ht(t)&&(e||n)?wD(t,mu(e||[0,1],n)):t}function mu(t,e){return e?t.slice().reverse():t}class Ek{#e;#t=new Set;#n;#i;#s;#o;#r=0;constructor({getParamRuntime:e,onRangeChange:n,onDomainChange:i,getGenomeStore:r}){this.#n=e,this.#i=n,this.#s=i,this.#o=r}get scale(){return this.#e}getLocusGenome(){const n=this.#o?.()?.getGenome();if(!n)throw new Error("No genome has been defined!");return n}createScale(e){const n=uk({...this.#c(e),range:void 0});return n.props=e,"unknown"in n&&n.unknown(null),this.#e=n,this.#a(e),this.#l(),this.#f(),this.#e}#a(e){const n=this.#e;if(!n||!q4(n))return;const r=this.#o?.()?.getGenome(e.assembly);if(!r)throw new Error("No genome has been defined!");n.genome(r)}reconfigureScale(e){const n=this.#e;!n||n.type=="null"||(gm({...this.#c(e),range:void 0},n),n.props=e,this.#l())}withDomainNotificationsSuppressed(e){this.#r+=1;try{e()}finally{this.#r-=1}}#c(e){const n=e,{assembly:i,domainIndexer:r,...s}=n;return s}#l(){const e=this.#e;if(!e)return;const n=e.props;this.#t.forEach(s=>s.invalidate()),this.#t.clear();const i=bk({range:n.range,reverse:n.reverse,createExpression:s=>this.#n().createExpression(s),registerExpr:s=>this.#t.add(s)});if(!i)return;if("values"in i){e.range(i.values);return}const r=()=>e.range(i.evaluate());i.setup(r),r()}#f(){const e=this.#e;if(!e)return;const n=e.range,i=e.domain,r=()=>this.#i?.();Ik(e,{onRangeChange:r,onDomainChange:()=>{this.#r>0||this.#s?.()},range:n,domain:i}),r()}dispose(){this.#t.forEach(e=>e.invalidate()),this.#t.clear()}}function Ik(t,{onRangeChange:e,onDomainChange:n,range:i,domain:r}){typeof i=="function"&&(t.range=(function(s){if(arguments.length)i(s),e?.();else return i()})),typeof r=="function"&&(t.domain=(function(s){if(arguments.length)r(s),n?.();else return r()}))}function bk({range:t,reverse:e,createExpression:n,registerExpr:i}){if(!t||!Ce(t))return null;const r=(s,o)=>o?s.slice().reverse():s;if(t.some(Ee)){let s;return{dynamic:!0,evaluate:()=>r(s.map(l=>l()),e),setup:l=>{s=t.map(c=>{if(Ee(c)){const f=n(c.expr);return f.subscribe(l),i(f),()=>f(null)}return()=>c})}}}return{dynamic:!1,values:r(t,e)}}function Wa(t,e,n){if(n=n||[],t.some(o=>o===null)){if(t.every(o=>o===null))return null;throw console.warn(t),new Error("Cannot merge objects with nulls!")}const i={},r=(o,a)=>o===a||fr(o)&&fr(a)||fr(o)&&a===!0||o===!0&&Ge(a)||Array.isArray(o)&&Array.isArray(a)&&o.length===a.length&&o.every((l,c)=>l===a[c]),s=o=>{for(let a in o){const l=o[a];if(!n.includes(a)&&l!==void 0)if(i[a]!==void 0&&!r(i[a],l))console.warn(`Conflicting property ${a} of ${e}: (${JSON.stringify(i[a])} and ${JSON.stringify(o[a])}). Using ${JSON.stringify(i[a])}.`);else{const c=i[a];if(fr(c))fr(l)&&(i[a]=Wa([c,l],a));else if(fr(l)){if(!(c===!0||c===void 0))throw new Error("Bug in merge! Target is: "+c);i[a]=Wa([{},l],a)}else i[a]=l}}};for(const o of t)s(o);return i}function fr(t){return Ge(t)&&!Array.isArray(t)}const ym="quantitative",Cm="ordinal",Em="nominal",Ys="locus",Im="index";function xk(t,e,n){const i={};return n&&(i.zero=!1),ps(t)?i.nice=!n:bn(t)?i.scheme=e==Em?"tableau10":e==Cm?"blues":"viridis":ia(t)?i.range=t=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:t=="size"?i.range=[0,400]:t=="angle"&&(i.range=[0,360]),i}function Bk(t,e){if(e==Im||e==Ys){if(Pl(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]},r=["sample"].includes(t)?"null":n[t]?n[t][[Em,Cm,ym].indexOf(e)]:e==ym?"linear":"ordinal";if(r===void 0)throw new Error('Channel "'+t+'" is not compatible with "'+e+'" data type. Use of a proper scale may be needed.');return r}function vk(t,e){ps(e)&&t.type!=="ordinal"&&(t.range=[0,1]),e=="opacity"&&Pe(t.type)&&(t.clamp=!0)}function Sk({channel:t,dataType:e,members:n,isExplicitDomain:i}){const r=Array.from(n).map(a=>a.channelDef.scale).filter(a=>a!==void 0),s=Wa(r,"scale",["domain"]);if(s===null||s.type=="null")return{type:"null"};const o={...xk(t,e,i),...s};return o.type||(o.type=Bk(t,e)),t=="y"&&on(o.type)&&o.reverse==null&&(o.reverse=!0),o.range&&o.scheme&&delete o.scheme,!("zoom"in o)&&[Im,Ys].includes(o.type)&&(o.zoom=!0),vk(o,t),o}class Vs extends Array{constructor(){super(),this.type=void 0}extend(e){return this}extendAll(e){if(e instanceof Vs&&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 i of e)this.extend(n(i));return this}}class wu extends Vs{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 bm extends Vs{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 yu extends bm{constructor(){super(),this.type="nominal"}}class Qk extends Vs{constructor(e){super();let n=0;for(let i=1;i<e.length;i++)n+=Math.sign(e[i]-e[i-1]);if(Math.abs(n)!=e.length-1)throw new Error("Piecewise domain must be strictly increasing or decreasing: "+JSON.stringify(e));e.forEach(i=>this.push(i))}extend(e){if(this.includes(e))return this;throw new Error("Piecewise domains are immutable and cannot be unioned!")}}const xm={quantitative:wu,index:wu,locus:wu,nominal:yu,ordinal:bm};function Xa(t,e){if(t=="quantitative"&&Dk(e)){const n=new Qk(e);return n.type=t,n}else if(xm[t]){const n=new xm[t];return n.type=t,e&&n.extendAll(e),n}throw new Error("Unknown type: "+t)}function Dk(t){return t&&t.length>0&&t.length!=2&&t.every(e=>typeof e=="number")}class kk{#e;#t;#n;#i;#s;#o;#r;#a=!0;#c=new WeakMap;constructor({getMembers:e,getDataMembers:n,getType:i,getLocusExtent:r,fromComplexInterval:s}){this.#e=e,this.#t=n??e,this.#n=i,this.#i=r,this.#s=s}get initialDomainSnapshot(){return this.#o}hasConfiguredDomain(){return!!this.getConfiguredDomain()}invalidateConfiguredDomain(){this.#a=!0}getConfiguredOrDefaultDomain(e=!1){return this.getConfiguredDomain()??Nk(this.#n(),this.#i,e?this.getDataDomain():void 0)}getConfiguredDomain(){if(!this.#a)return this.#r;const e=Fk(this.#e(),this.#s);return this.#r=e,this.#a=!1,e}getDataDomain(){return Rk(this.#t(),this.#n,e=>this.#l(e))}captureInitialDomain(e,n){if(!this.#o&&Pe(e.type)){const i=e.domain();Hr(i)>0&&(this.#o=i)}return n?!1:(this.#o=e.domain(),!0)}#l(e){const n=this.#c.get(e);if(n)return n;const i=e.view.mark.encoders;if(!i)return[];const r=i[e.channel];if(!r)return[];const s=r.accessors??[];if(s.length===0)return[];const o=s.filter(Ld).filter(a=>!a.channelDef.domainInert);return this.#c.set(e,o),o}}function Fk(t,e){const n=Array.from(t).filter(i=>i.contributesToDomain).map(i=>i.channelDef).filter(i=>i.scale?.domain).map(i=>Xa(i.type,e(i.scale.domain)));if(n.length>0)return n.reduce((i,r)=>i.extendAll(r))}function Rk(t,e,n){const i=e(),r=new Map;for(const o of t){if(!o.contributesToDomain)continue;const a=n(o);if(a.length===0)continue;const l=o.view.getCollector();for(const c of a){const f=Ud(c,i),u=l??null;let h=r.get(u);if(h||(h=new Map,r.set(u,h)),h.has(f))continue;let A;if(l)A=l.getDomain(f,i,c);else if(c.constant)A=Xa(i),A.extend(c({}));else continue;h.set(f,A)}}if(r.size===0)return;const s=Xa(i);for(const o of r.values())for(const a of o.values())s.extendAll(a);return s}function Nk(t,e,n){return t==Ys?e():n??[]}function Mk(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function Tk(t,e,n){return t*Math.pow(e/t,n)}const Pk=t=>new Promise(e=>setTimeout(e,t));function Lk(){return{canceled:!1}}function Ok(t){const e=t.requestAnimationFrame||window.requestAnimationFrame,n=t.signal,i=t.cancelToken,r=()=>new Promise((s,o)=>{if(i?.canceled)return s();if(n?.aborted)return o("aborted");const a=performance.now(),l=a+(t.duration||1e3),c=typeof t.from=="number"?t.from:0,f=typeof t.to=="number"?t.to:1,u=t.easingFunction||(m=>m),h=m=>(m-a)/(l-a),A=m=>m*(f-c)+c,d=m=>Math.max(0,Math.min(1,m)),g=m=>{if(i?.canceled){s();return}n?.aborted?o("aborted"):(t.onUpdate(A(u(d(h(m))))),m<l?e(g):(t.onUpdate(A(u(1))),s()))};e(g)});return t.delay?i?.canceled?Promise.resolve():n?.aborted?Promise.reject("aborted"):Pk(t.delay).then(r):r()}class Uk{#e;#t;#n;#i;#s;#o;#r=null;constructor({getScale:e,getAnimator:n,getInitialDomainSnapshot:i,getResetDomain:r,fromComplexInterval:s,getGenomeExtent:o}){this.#e=e,this.#t=n,this.#n=i,this.#i=r,this.#s=s,this.#o=o}getZoomExtent(){const e=this.#e(),n=e.props.zoom;return _k(e,n,this.#s,this.#o,this.#n)}isZoomable(){return this.isZoomingSupported()&&!!this.#e().props.zoom}isZoomingSupported(){const e=this.#e().type;return Pe(e)&&!on(e)}getDomainChangeAction(e,n){return Hi(n,e)?"none":this.isZoomable()?"restore":this.isZoomingSupported()?"animate":"notify"}isZoomed(){return this.isZoomingSupported()&&Hi(this.#i(),this.#e().domain())}zoom(e,n,i){if(!this.isZoomingSupported())return!1;const r=this.#e(),s=r.domain();let o=Gk(r,s,e,n,i);const a=this.getZoomExtent();return o=SI(o,a[0],a[1]),[0,1].some(l=>o[l]!=s[l])?(r.domain(o),!0):!1}async zoomTo(e,n=!1){if(zr(n)&&(n=n?700:0),!this.isZoomingSupported())throw new Error("Not a zoomable scale!");const i=this.#s(e),r=this.#t(),s=this.#e(),o=s.domain();if(n>0&&o.length==2){const a=o[1]-o[0],l=i[1]-i[0],c=o[0]+a/2,f=i[0]+l/2,u=o[0]==i[0],h=o[1]==i[1];this.#a();const A=Lk();this.#r=A,await r.transition({duration:n,easingFunction:Mk,cancelToken:A,onUpdate:d=>{const g=Tk(a,l,d),m=a==l?d:(a-g)/(a-l),p=m*f+(1-m)*c,w=[u?o[0]:p-g/2,h?o[1]:p+g/2];s.domain(w)}}),this.#r===A&&(this.#r=null),s.domain(i)}else this.#a(),s.domain(i),r?.requestRender()}#a(){this.#r&&(this.#r.canceled=!0,this.#r=null)}resetZoom(){if(!this.isZoomingSupported())throw new Error("Not a zoomable scale!");const e=this.#e(),n=e.domain(),i=this.#i();return[0,1].some(r=>i[r]!=n[r])?(e.domain(i),!0):!1}getZoomLevel(){return this.isZoomable()?Hr(this.getZoomExtent())/Hr(this.#e().domain()):1}}function _k(t,e,n,i,r){return zk(e)&&Ce(e.extent)?n(e.extent):e&&t.props.type=="locus"?i():r()}function Gk(t,e,n,i,r){let s=[...e],o=t.invert(i);switch(t.props.reverse&&(r=-r),"align"in t&&(o+=t.align()),t.type){case"linear":case"index":case"locus":s=bI(s,r||0),s=dh(s,o,n);break;case"log":s=xI(s,r||0),s=gh(s,o,n);break;case"pow":case"sqrt":{const a=t;s=BI(s,r||0,a.exponent()),s=el(s,o,n,a.exponent());break}default:throw new Error("Zooming is not implemented for: "+t.type)}return s}function zk(t){return Ge(t)}ie("index",hu,["continuous"]),ie("locus",J4,["continuous"]),ie("null",su,[]);class Hk{#e=new Set;#t=new Set;#n={domain:new Set,range:new Set};#i;#s;#o;#r;#a=!1;constructor(e){this.channel=e,this.type=null,this.name=void 0,this.#s=new kk({getMembers:()=>this.#l(),getDataMembers:()=>this.#l(this.#t),getType:()=>this.type,getLocusExtent:()=>this.#u(),fromComplexInterval:this.fromComplexInterval.bind(this)}),this.#i=new Ek({getParamRuntime:()=>this.#c.paramRuntime,onRangeChange:()=>this.#h("range"),onDomainChange:()=>this.#h("domain"),getGenomeStore:()=>this.#f.genomeStore}),this.#o=new Uk({getScale:()=>this.getScale(),getAnimator:()=>this.#f.animator,getInitialDomainSnapshot:()=>this.#s.initialDomainSnapshot,getResetDomain:()=>this.#s.getConfiguredOrDefaultDomain(),fromComplexInterval:this.fromComplexInterval.bind(this),getGenomeExtent:()=>this.#u()})}get#c(){const e=this.#e.values().next().value;if(!e)throw new Error("ScaleResolution has no members!");return e.view}#l(e=this.#e){const n=new Set;for(const i of e){const r=i.view;r.isConfiguredVisible()&&(!r.isDataInitialized()&&!i.channelDef?.scale?.domain||n.add(i))}return n}get#f(){return this.#c.context}get zoomExtent(){return(this.#i.scale&&Pe(this.#i.scale.type)&&this.#o.getZoomExtent())??[-1/0,1/0]}#u(){return Z4(this.#A())}#A(){if(this.type===Ys)return this.#i.scale??this.#i.getLocusGenome()}addEventListener(e,n){this.#n[e].add(n)}removeEventListener(e,n){this.#n[e].delete(n)}#h(e){for(const n of this.#n[e].values())n({type:e,scaleResolution:this})}#d(e){const{channel:n,channelDef:i}=e,r=i.type==null&&this.type;if(n!="sample"&&!i.type&&!Ll(n)&&!r)throw new Error(`The "type" property must be defined in channel definition: "${n}": ${JSON.stringify(i)}. Must be one of: "quantitative", "ordinal", "nominal", "locus", "index"`);const s=n=="sample"?"nominal":i.type,o=i?.scale?.name;if(o){if(this.name!==void 0&&o!=this.name)throw new Error(`Shared scales have conflicting names: "${o}" vs. "${this.name}"!`);this.name=o}if(!r){if(!this.type)this.type=s;else if(s!==this.type&&!Ll(n))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${s}. Use "resolve: independent" for channel ${this.channel}`)}this.#e.add(e),e.contributesToDomain&&this.#t.add(e),this.#s.invalidateConfiguredDomain()}registerMember(e){return this.#d(e),()=>{const n=this.#e.delete(e);return n&&(this.#t.delete(e),this.#s.invalidateConfiguredDomain()),n&&this.#e.size===0}}dispose(){this.#n.domain.clear(),this.#n.range.clear(),this.#i.dispose()}#g(){for(const e of this.#e)if(e.view.hasRendered())return!0;return!1}registerCollectorSubscriptions(e,n){const i=new Set;for(const o of n)o.channelDef.domainInert||i.add(Ud(o,this.type));if(i.size===0)return()=>{};const r=()=>{this.reconfigureDomain()},s=[];for(const o of i)s.push(e.subscribeDomainChanges(o,r));return()=>{for(const o of s)o()}}#p(){return this.#s.hasConfiguredDomain()}#w(){const e=this.#i.scale;if(!e)return!1;const n=e.domain();return Pe(e.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0}#y(){return Sk({channel:this.channel,dataType:this.type,members:this.#e,isExplicitDomain:this.#p()})}#m(e=!1){const n=this.#y();if(n===null||n.type=="null")return{type:"null"};const i=this.#s.getConfiguredOrDefaultDomain(e);if(on(n.type)){const r=this.#p(),s=this.#C(r);if(i!=null){if(r&&s.domain().length>0&&!Hi(s.domain(),i))return this.#r=void 0,this.#m(e);s.addAll(i);const o=new Set(i),a=s.domain().filter(l=>o.has(l));n.domain=a.length>0?a:new yu}else{const o=s.domain();n.domain=o.length>0?o:new yu}n.domainIndexer=s}else i&&i.length>0&&(n.domain=i);return!n.domain&&n.domainMid!==void 0&&(n.domain=[n.domainMin??0,n.domainMax??1]),n}#C(e){return(!this.#r||this.#a!==e)&&(this.#r=Xp(),this.#a=e),this.#r}reconfigure(){this.#s.invalidateConfiguredDomain();const e=this.#E(!0);e&&(this.#I(e,(n,i)=>this.#i.reconfigureScale(i)),this.#b(e))}reconfigureDomain(){const e=this.#E(!0,!0);if(!e)return;const{domainConfig:n,targetDomain:i}=e,r=i!=null&&Hi(i,e.scale.domain());i!=null&&!r&&this.#I(e,s=>{s.domain(i),n.applyOrdinalUnknown&&s.unknown(n.ordinalUnknown)}),this.#b(e)}#E(e,n=!1){const i=this.#i.scale;if(!i||i.type=="null")return;const r={scale:i,props:this.#m(e),previousDomain:i.domain(),domainWasInitialized:this.#w()};if(n){const s=pm(i,r.props);return{...r,domainConfig:s,targetDomain:s.domain}}return r}#I(e,n){this.#i.withDomainNotificationsSuppressed(()=>{n(e.scale,e.props)})}#b(e){const{scale:n,previousDomain:i,domainWasInitialized:r}=e;if(this.#s.captureInitialDomain(n,r)){this.#h("domain");return}const s=n.domain(),o=this.#o.getDomainChangeAction(i,s);o==="restore"?this.#i.withDomainNotificationsSuppressed(()=>{n.domain(i)}):o==="animate"?this.#g()?(this.#i.withDomainNotificationsSuppressed(()=>{n.domain(i)}),this.zoomTo(s,500)):this.#h("domain"):o==="notify"&&this.#h("domain")}get scale(){if(this.#i.scale)return this.#i.scale;throw new Error("ScaleResolution.scale accessed before initialization. Call initializeScale().")}getScale(){return this.#i.scale??this.initializeScale()}initializeScale(){if(this.#i.scale)return this.#i.scale;const e=this.#m();return this.#i.createScale(e)}getDomain(){return this.getScale().domain()}getDataDomain(){return this.#s.getDataDomain()}getComplexDomain(){return X4(this.#A(),this.getDomain())}isZoomed(){return this.#o.isZoomed()}isZoomable(){return this.#o.isZoomable()}zoom(e,n,i){return this.#o.zoom(e,n,i)}async zoomTo(e,n=!1){return this.#o.zoomTo(e,n)}resetZoom(){return this.#o.resetZoom()}getZoomLevel(){return this.#o.getZoomLevel()}getAxisLength(){if(this.channel!=="x"&&this.channel!=="y")throw new Error("Axis length is only defined for x and y channels!");const e=Array.from(this.#e).map(n=>n.view.coords?.[this.channel==="x"?"width":"height"]).filter(n=>n>0);return e.length?e.reduce((n,i)=>Math.min(n,i),1e4):0}invertToComplex(e){const n=this.getScale();if("invert"in n){const i=n.invert(e);return this.toComplex(i)}else throw new Error("The scale does not support inverting!")}toComplex(e){return K4(this.#A(),e)}fromComplex(e){return j4(this.#A(),e)}fromComplexInterval(e){return this.type==Ys?W4(this.#A(),e):e}}function Cu(...t){for(const e of t)if(e!==void 0)return e}class Yk{#e=new Set;constructor(e){this.channel=e}get scaleResolution(){return this.#e.values().next().value?.view.getScaleResolution(this.channel)}#t(e){const{view:n}=e,i=n.getScaleResolution(this.channel);if(!i)throw new Error("Cannot find a scale resolution!");if(this.scaleResolution&&i!==this.scaleResolution)throw new Error(`Shared axes must have a shared scale! Channel: ${this.channel}, existing views: [${Array.from(this.#e).map(r=>r.view.getPathString()).join(", ")}], new view: ${n.getPathString()}.`);this.#e.add(e),uu(this,"axisProps")}registerMember(e){return this.#t(e),()=>this.removeMember(e)&&this.#e.size===0}removeMember(e){const n=this.#e.delete(e);return n&&uu(this,"axisProps"),n}getAxisProps(){return Ka(this,"axisProps",()=>{const e=Array.from(this.#e).map(n=>{const i=n.view.mark.encoding[n.channel];return"axis"in i&&i.axis});return e.length>0&&e.some(n=>n===null)?null:Wa(e.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const e=o=>{const a=Vx(o.view,o.channel);if(!ut(a))return{member:o,axisTitle:"axis"in a?a.axis?.title:void 0,explicitTitle:Cu("axis"in a?a.axis?.title:void 0,a.title),implicitTitle:Cu(tn(a)?a.field:void 0,Vi(a)?a.expr:void 0)}},n=Array.from(this.#e).map(e),i=n.map(o=>o.axisTitle).find(o=>o!==void 0);if(i!==void 0)return i;const r=n.filter(o=>{if(Ll(o.member.channel)&&!o.explicitTitle){const a=In(o.member.channel);return n.find(l=>l.member.view==o.member.view&&l.member.channel==a)?.explicitTitle===void 0}return!0}),s=new Set(r.map(o=>Cu(o.explicitTitle,o.implicitTitle)).filter(le));return s.size?[...s].join(", "):null}}function Bm(t,e,{spacing:n,devicePixelRatio:i,offset:r,reverse:s}={}){n=n||0,r=r||0;let o=0,a=0;for(const d of t)o+=Za(d.px)+(Eu(d)?0:n),a+=Za(d.grow);o-=n;const l=Math.max(0,e-o),c=i!==void 0?d=>Math.round(d*i)/i:d=>d,f=[],u=[],h=d=>{const g=f.length;if(!g)return;const m=(d?n:0)*(s?-1:1);A-=m;for(let p=0;p<g;p++)u.push({location:A+(p+1)/(g+1)*m,size:0});A+=m,f.length=0};let A=s?Math.max(e,o):0+r;if(t.length==1&&Eu(t[0]))return[{location:A,size:0}];for(let d=0;d<t.length;d++){const g=t[d];if(Eu(g))f.push(g);else{h(u.length>0);const m=Za(g.px)+(a?Za(g.grow)/a*l:0);s&&(A-=m),u.push({location:c(A),size:c(m)}),s?A-=n:A+=m+n}}return A+=s?n:-n,h(!1),u}function Vk(t){let e=0,n=0;for(const i of t)e=Math.max(e,i.px??0),n=Math.max(n,i.grow??0);return{px:e,grow:n}}class Pn{constructor(e,n){this.width=e,this.height=n}addPadding(e){return this.#e(e.width,e.height)}subtractPadding(e){return this.#e(-e.width,-e.height)}#e(e,n){return new Pn({px:(this.width.px??0)+e,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})}isGrowing(){return!!(this.width.grow||this.height.grow)}}const Js=Object.freeze({px:0,grow:0}),vm=new Pn(Js,Js);function Eu(t){return!t.px&&!t.grow}function Za(t){return t||0}function Jk(t){return t&&(Ve(t.px)||Ve(t.grow))}function Sm(t){if(Fu(t))throw new Error("parseSizeDef does not accept step-based sizes.");if(Jk(t))return t;if(Ve(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 qe{constructor(e,n,i,r){this.top=e||0,this.right=n||0,this.bottom=i||0,this.left=r||0}get width(){return this.left+this.right}get height(){return this.top+this.bottom}expand(e){return e<=0?this:new qe(this.top+e,this.right+e,this.bottom+e,this.left+e)}add(e){return new qe(this.top+e.top,this.right+e.right,this.bottom+e.bottom,this.left+e.left)}subtract(e){return new qe(this.top-e.top,this.right-e.right,this.bottom-e.bottom,this.left-e.left)}union(e){return new qe(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 qe(0,this.right,0,this.left)}getVertical(){return new qe(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):Iu}static createFromRecord(e){return new qe(e.top,e.right,e.bottom,e.left)}static zero(){return Iu}static createUniformPadding(e){return new qe(e,e,e,e)}}const Iu=qe.createUniformPadding(0);Object.freeze(Iu);class ur{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(e,n){let i=this.length++;for(;i>0;){const r=i-1>>1,s=this.values[r];if(n>=s)break;this.ids[i]=this.ids[r],this.values[i]=s,i=r}this.ids[i]=e,this.values[i]=n}pop(){if(this.length===0)return;const e=this.ids,n=this.values,i=e[0],r=--this.length;if(r>0){const s=e[r],o=n[r];let a=0;const l=r>>1;for(;a<l;){const c=(a<<1)+1,f=c+1,u=c+(+(f<r)&+(n[f]<n[c]));if(n[u]>=o)break;e[a]=e[u],n[a]=n[u],a=u}e[a]=s,n[a]=o}return i}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){this.ids.length=this.values.length=this.length}}const Qm=Symbol("runtimeNode"),Dm=1e6;function qk(t){return t?(e,n)=>{t.addDisposer(e,n)}:()=>{}}function km(t,e){const n={id:t.id,name:t.name,kind:t.kind,get(){return t.value},subscribe(i){return t.listeners.add(i),()=>{t.listeners.delete(i)}}};return Object.defineProperty(n,Qm,{enumerable:!1,configurable:!1,writable:!1,value:t}),e?Object.assign(n,{set(i){e(i)}}):n}function Fm(t){const e=t[Qm];if(!e)throw new Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");return e}function Rm(t){for(const e of t)e()}class Kk{#e=1;#t=1;#n=0;#i=!1;#s=!1;#o=new Set;#r=new Set;#a=new ur;#c=new ur;#l=new Set;#f;constructor(e={}){this.#f=qk(e.lifecycleRegistry)}createWritable(e,n,i,r,s={}){const o="n"+this.#e++,a=s.notify??!0,l={id:o,name:n,kind:i,value:r,rank:0,disposed:!1,listeners:new Set,subscribe(f){return l.listeners.add(f),()=>{l.listeners.delete(f)}}},c=f=>{if(l.disposed)throw new Error('Cannot set disposed parameter "'+n+'" ('+o+").");f!==l.value&&(l.value=f,a&&(Rm(l.listeners),this.#d()))};return this.#f(e,()=>{l.disposed=!0,l.listeners.clear()}),km(l,c)}computed(e,n,i,r){const o=i.map(Fm).reduce((h,A)=>Math.max(h,A.rank),0),l={id:"n"+this.#e++,name:n,kind:"derived",rank:o+1,value:r(),disposed:!1,listeners:new Set,fn:r,subscribe(h){return l.listeners.add(h),()=>{l.listeners.delete(h)}}},c=()=>{l.disposed||this.#u(l)},f=i.map(h=>h.subscribe(c)),u=()=>{l.disposed||(l.disposed=!0,f.forEach(h=>h()),l.listeners.clear(),this.#o.delete(l))};return this.#f(e,u),km(l)}effect(e,n,i){const s=n.map(Fm).reduce((u,h)=>Math.max(u,h.rank),0),a={id:"n"+this.#e++,rank:s+1,disposed:!1,fn:i},l=()=>{a.disposed||this.#A(a)},c=n.map(u=>u.subscribe(l)),f=()=>{a.disposed||(a.disposed=!0,c.forEach(u=>u()),this.#r.delete(a))};return this.#f(e,f),f}runInTransaction(e){this.#n+=1;try{return e()}finally{this.#n-=1,this.#n===0&&this.#d()}}flushNow(){if(!(this.#n>0||this.#s)){this.#i=!1,this.#s=!0;try{let e=!0;for(;e;){for(e=!1;this.#a.length>0;){e=!0;const n=this.#a.pop();if(this.#o.delete(n),n.disposed)continue;const i=n.value,r=n.fn();r!==i&&(n.value=r,Rm(n.listeners))}for(;this.#c.length>0;){e=!0;const n=this.#c.pop();this.#r.delete(n),!n.disposed&&n.fn()}}}finally{this.#s=!1,this.#p()}}}whenPropagated(e={}){if(this.#g())return Promise.resolve();const{signal:n,timeoutMs:i}=e;return n?.aborted?Promise.reject(new Error("whenPropagated aborted")):new Promise((r,s)=>{const o={resolve:r,reject:s};n&&(o.abortHandler=()=>{this.#l.delete(o),s(new Error("whenPropagated aborted"))},n.addEventListener("abort",o.abortHandler,{once:!0})),i!=null&&(o.timeoutId=setTimeout(()=>{this.#l.delete(o),o.abortHandler&&n?.removeEventListener("abort",o.abortHandler),s(new Error("whenPropagated timeout after "+i+" ms"))},i)),this.#l.add(o)})}#u(e){this.#o.has(e)||(this.#o.add(e),this.#a.push(e,this.#h(e.rank)),this.#d())}#A(e){this.#r.has(e)||(this.#r.add(e),this.#c.push(e,this.#h(e.rank)),this.#d())}#h(e){const n=this.#t%Dm;return this.#t+=1,e*Dm+n}#d(){this.#n>0||this.#i||this.#s||(this.#i=!0,queueMicrotask(()=>{this.flushNow()}))}#g(){return this.#n===0&&!this.#i&&!this.#s&&this.#a.length===0&&this.#c.length===0&&this.#o.size===0&&this.#r.size===0}#p(){if(this.#g()){for(const e of this.#l)e.timeoutId&&clearTimeout(e.timeoutId),e.resolve();this.#l.clear()}}}class jk{#e=1;#t=new Map;createOwner(e,n){const i=e+":"+n+":"+this.#e++;return this.#t.set(i,new Set),i}addDisposer(e,n){const i=this.#t.get(e);if(!i)throw new Error("Unknown owner: "+e);i.add(n)}disposeOwner(e){const n=this.#t.get(e);if(n){for(const i of n)i();n.clear(),this.#t.delete(e)}}}class Wk{#e=1;#t=new Map;createRootScope(e){const n="scope:"+this.#e++;return this.#t.set(n,{params:new Map,ownerId:e}),n}createChildScope(e,n){if(!this.#t.has(n))throw new Error("Unknown parent scope: "+n);const i="scope:"+this.#e++;return this.#t.set(i,{parentScope:n,params:new Map,ownerId:e}),i}getOwnerId(e){const n=this.#t.get(e);if(!n)throw new Error("Unknown scope: "+e);return n.ownerId}clearScope(e){const n=this.#t.get(e);if(!n)throw new Error("Unknown scope: "+e);n.params.clear()}register(e,n,i){Tt(n);const r=this.#t.get(e);if(!r)throw new Error("Unknown scope: "+e);if(r.params.has(n))throw new Error('Parameter "'+n+'" already exists in scope '+e);return r.params.set(n,i),i}resolve(e,n){Tt(n);let i=e;for(;i;){const r=this.#t.get(i);if(!r)throw new Error("Unknown scope: "+i);const s=r.params.get(n);if(s)return s;i=r.parentScope}}}const Xk="RawCode",Zk="Literal",$k="Property",e8="Identifier",t8="ArrayExpression",n8="BinaryExpression",i8="CallExpression",r8="ConditionalExpression",s8="LogicalExpression",o8="MemberExpression",a8="ObjectExpression",c8="UnaryExpression";function Dt(t){this.type=t}Dt.prototype.visit=function(t){let e,n,i;if(t(this))return 1;for(e=l8(this),n=0,i=e.length;n<i;++n)if(e[n].visit(t))return 1};function l8(t){switch(t.type){case t8:return t.elements;case n8:case s8:return[t.left,t.right];case i8:return[t.callee].concat(t.arguments);case r8:return[t.test,t.consequent,t.alternate];case o8:return[t.object,t.property];case a8:return t.properties;case $k:return[t.key,t.value];case c8:return[t.argument];case e8:case Zk:case Xk:default:return[]}}var Ht,G,k,Ke,re,$a=1,qs=2,mi=3,Ln=4,ec=5,wi=6,at=7,Ks=8,f8=9;Ht={},Ht[$a]="Boolean",Ht[qs]="<end>",Ht[mi]="Identifier",Ht[Ln]="Keyword",Ht[ec]="Null",Ht[wi]="Numeric",Ht[at]="Punctuator",Ht[Ks]="String",Ht[f8]="RegularExpression";var u8="ArrayExpression",A8="BinaryExpression",h8="CallExpression",d8="ConditionalExpression",Nm="Identifier",g8="Literal",p8="LogicalExpression",m8="MemberExpression",w8="ObjectExpression",y8="Property",C8="UnaryExpression",Le="Unexpected token %0",E8="Unexpected number",I8="Unexpected string",b8="Unexpected identifier",x8="Unexpected reserved word",B8="Unexpected end of input",bu="Invalid regular expression",xu="Invalid regular expression: missing /",Mm="Octal literals are not allowed in strict mode.",v8="Duplicate data property in object literal not allowed in strict mode",Ye="ILLEGAL",js="Disabled.",S8=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),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\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\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DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function tc(t,e){if(!t)throw new Error("ASSERT: "+e)}function an(t){return t>=48&&t<=57}function Bu(t){return"0123456789abcdefABCDEF".includes(t)}function Ws(t){return"01234567".includes(t)}function D8(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 Zs(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&S8.test(String.fromCharCode(t))}function nc(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 k8={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 Tm(){for(;k<Ke;){const t=G.charCodeAt(k);if(D8(t)||Xs(t))++k;else break}}function vu(t){var e,n,i,r=0;for(n=t==="u"?4:2,e=0;e<n;++e)k<Ke&&Bu(G[k])?(i=G[k++],r=r*16+"0123456789abcdef".indexOf(i.toLowerCase())):ee({},Le,Ye);return String.fromCharCode(r)}function F8(){var t,e,n,i;for(t=G[k],e=0,t==="}"&&ee({},Le,Ye);k<Ke&&(t=G[k++],!!Bu(t));)e=e*16+"0123456789abcdef".indexOf(t.toLowerCase());return(e>1114111||t!=="}")&&ee({},Le,Ye),e<=65535?String.fromCharCode(e):(n=(e-65536>>10)+55296,i=(e-65536&1023)+56320,String.fromCharCode(n,i))}function Pm(){var t,e;for(t=G.charCodeAt(k++),e=String.fromCharCode(t),t===92&&(G.charCodeAt(k)!==117&&ee({},Le,Ye),++k,t=vu("u"),(!t||t==="\\"||!Zs(t.charCodeAt(0)))&&ee({},Le,Ye),e=t);k<Ke&&(t=G.charCodeAt(k),!!nc(t));)++k,e+=String.fromCharCode(t),t===92&&(e=e.substr(0,e.length-1),G.charCodeAt(k)!==117&&ee({},Le,Ye),++k,t=vu("u"),(!t||t==="\\"||!nc(t.charCodeAt(0)))&&ee({},Le,Ye),e+=t);return e}function R8(){var t,e;for(t=k++;k<Ke;){if(e=G.charCodeAt(k),e===92)return k=t,Pm();if(nc(e))++k;else break}return G.slice(t,k)}function N8(){var t,e,n;return t=k,e=G.charCodeAt(k)===92?Pm():R8(),e.length===1?n=mi:k8.hasOwnProperty(e)?n=Ln:e==="null"?n=ec:e==="true"||e==="false"?n=$a:n=mi,{type:n,value:e,start:t,end:k}}function Su(){var t=k,e=G.charCodeAt(k),n,i=G[k],r,s,o;switch(e){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++k,{type:at,value:String.fromCharCode(e),start:t,end:k};default:if(n=G.charCodeAt(k+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 k+=2,{type:at,value:String.fromCharCode(e)+String.fromCharCode(n),start:t,end:k};case 33:case 61:return k+=2,G.charCodeAt(k)===61&&++k,{type:at,value:G.slice(t,k),start:t,end:k}}}if(o=G.substr(k,4),o===">>>=")return k+=4,{type:at,value:o,start:t,end:k};if(s=o.substr(0,3),s===">>>"||s==="<<="||s===">>=")return k+=3,{type:at,value:s,start:t,end:k};if(r=s.substr(0,2),i===r[1]&&"+-<>&|".includes(i)||r==="=>")return k+=2,{type:at,value:r,start:t,end:k};if(r==="//"&&ee({},Le,Ye),"<>=!+-*%&|^/".includes(i))return++k,{type:at,value:i,start:t,end:k};ee({},Le,Ye)}function M8(t){let e="";for(;k<Ke&&Bu(G[k]);)e+=G[k++];return e.length===0&&ee({},Le,Ye),Zs(G.charCodeAt(k))&&ee({},Le,Ye),{type:wi,value:parseInt("0x"+e,16),start:t,end:k}}function T8(t){let e="0"+G[k++];for(;k<Ke&&Ws(G[k]);)e+=G[k++];return(Zs(G.charCodeAt(k))||an(G.charCodeAt(k)))&&ee({},Le,Ye),{type:wi,value:parseInt(e,8),octal:!0,start:t,end:k}}function Lm(){var t,e,n;if(n=G[k],tc(an(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),e=k,t="",n!=="."){if(t=G[k++],n=G[k],t==="0"){if(n==="x"||n==="X")return++k,M8(e);if(Ws(n))return T8(e);n&&an(n.charCodeAt(0))&&ee({},Le,Ye)}for(;an(G.charCodeAt(k));)t+=G[k++];n=G[k]}if(n==="."){for(t+=G[k++];an(G.charCodeAt(k));)t+=G[k++];n=G[k]}if(n==="e"||n==="E")if(t+=G[k++],n=G[k],(n==="+"||n==="-")&&(t+=G[k++]),an(G.charCodeAt(k)))for(;an(G.charCodeAt(k));)t+=G[k++];else ee({},Le,Ye);return Zs(G.charCodeAt(k))&&ee({},Le,Ye),{type:wi,value:parseFloat(t),start:e,end:k}}function P8(){var t="",e,n,i,r,s=!1;for(e=G[k],tc(e==="'"||e==='"',"String literal must starts with a quote"),n=k,++k;k<Ke;)if(i=G[k++],i===e){e="";break}else if(i==="\\")if(i=G[k++],!i||!Xs(i.charCodeAt(0)))switch(i){case"u":case"x":G[k]==="{"?(++k,t+=F8()):t+=vu(i);break;case"n":t+=`
|
|
601
|
-
`;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:
|
|
602
|
-
`&&++k;else{if(Xs(i.charCodeAt(0)))break;t+=i}return e!==""&&ee({},Le,Ye),{type:Ks,value:t,octal:s,start:n,end:k}}function L8(t,e){let n=t;e.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(i,r)=>{if(parseInt(r,16)<=1114111)return"x";ee({},bu)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{ee({},bu)}try{return new RegExp(t,e)}catch{return null}}function O8(){var t,e,n,i,r;for(t=G[k],tc(t==="/","Regular expression literal must start with a slash"),e=G[k++],n=!1,i=!1;k<Ke;)if(t=G[k++],e+=t,t==="\\")t=G[k++],Xs(t.charCodeAt(0))&&ee({},xu),e+=t;else if(Xs(t.charCodeAt(0)))ee({},xu);else if(n)t==="]"&&(n=!1);else if(t==="/"){i=!0;break}else t==="["&&(n=!0);return i||ee({},xu),r=e.substr(1,e.length-2),{value:r,literal:e}}function U8(){var t,e,n;for(e="",n="";k<Ke&&(t=G[k],!!nc(t.charCodeAt(0)));)++k,t==="\\"&&k<Ke?ee({},Le,Ye):(n+=t,e+=t);return n.search(/[^gimuy]/g)>=0&&ee({},bu,n),{value:n,literal:e}}function _8(){var t,e,n,i;return re=null,Tm(),t=k,e=O8(),n=U8(),i=L8(e.value,n.value),{literal:e.literal+n.literal,value:i,regex:{pattern:e.value,flags:n.value},start:t,end:k}}function G8(t){return t.type===mi||t.type===Ln||t.type===$a||t.type===ec}function Om(){if(Tm(),k>=Ke)return{type:qs,start:k,end:k};const t=G.charCodeAt(k);return Zs(t)?N8():t===40||t===41||t===59?Su():t===39||t===34?P8():t===46?an(G.charCodeAt(k+1))?Lm():Su():an(t)?Lm():Su()}function ct(){const t=re;return k=t.end,re=Om(),k=t.end,t}function Um(){const t=k;re=Om(),k=t}function z8(t){const e=new Dt(u8);return e.elements=t,e}function _m(t,e,n){const i=new Dt(t==="||"||t==="&&"?p8:A8);return i.operator=t,i.left=e,i.right=n,i}function H8(t,e){const n=new Dt(h8);return n.callee=t,n.arguments=e,n}function Y8(t,e,n){const i=new Dt(d8);return i.test=t,i.consequent=e,i.alternate=n,i}function Qu(t){const e=new Dt(Nm);return e.name=t,e}function $s(t){const e=new Dt(g8);return e.value=t.value,e.raw=G.slice(t.start,t.end),t.regex&&(e.raw==="//"&&(e.raw="/(?:)/"),e.regex=t.regex),e}function Gm(t,e,n){const i=new Dt(m8);return i.computed=t==="[",i.object=e,i.property=n,i.computed||(n.member=!0),i}function V8(t){const e=new Dt(w8);return e.properties=t,e}function zm(t,e,n){const i=new Dt(y8);return i.key=e,i.value=n,i.kind=t,i}function J8(t,e){const n=new Dt(C8);return n.operator=t,n.argument=e,n.prefix=!0,n}function ee(t,e){var n,i=Array.prototype.slice.call(arguments,2),r=e.replace(/%(\d)/g,(s,o)=>(tc(o<i.length,"Message reference must be in range"),i[o]));throw n=new Error(r),n.index=k,n.description=r,n}function ic(t){t.type===qs&&ee(t,B8),t.type===wi&&ee(t,E8),t.type===Ks&&ee(t,I8),t.type===mi&&ee(t,b8),t.type===Ln&&ee(t,x8),ee(t,Le,t.value)}function je(t){const e=ct();(e.type!==at||e.value!==t)&&ic(e)}function he(t){return re.type===at&&re.value===t}function Du(t){return re.type===Ln&&re.value===t}function q8(){const t=[];for(k=re.start,je("[");!he("]");)he(",")?(ct(),t.push(null)):(t.push(yi()),he("]")||je(","));return ct(),z8(t)}function Hm(){k=re.start;const t=ct();return t.type===Ks||t.type===wi?(t.octal&&ee(t,Mm),$s(t)):Qu(t.value)}function K8(){var t,e,n,i;if(k=re.start,t=re,t.type===mi)return n=Hm(),je(":"),i=yi(),zm("init",n,i);if(t.type===qs||t.type===at)ic(t);else return e=Hm(),je(":"),i=yi(),zm("init",e,i)}function j8(){var t=[],e,n,i,r={},s=String;for(k=re.start,je("{");!he("}");)e=K8(),e.key.type===Nm?n=e.key.name:n=s(e.key.value),i="$"+n,Object.prototype.hasOwnProperty.call(r,i)?ee({},v8):r[i]=!0,t.push(e),he("}")||je(",");return je("}"),V8(t)}function W8(){je("(");const t=ku();return je(")"),t}const X8={if:1};function Z8(){var t,e,n;if(he("("))return W8();if(he("["))return q8();if(he("{"))return j8();if(t=re.type,k=re.start,t===mi||X8[re.value])n=Qu(ct().value);else if(t===Ks||t===wi)re.octal&&ee(re,Mm),n=$s(ct());else{if(t===Ln)throw new Error(js);t===$a?(e=ct(),e.value=e.value==="true",n=$s(e)):t===ec?(e=ct(),e.value=null,n=$s(e)):he("/")||he("/=")?(n=$s(_8()),Um()):ic(ct())}return n}function $8(){const t=[];if(je("("),!he(")"))for(;k<Ke&&(t.push(yi()),!he(")"));)je(",");return je(")"),t}function eF(){k=re.start;const t=ct();return G8(t)||ic(t),Qu(t.value)}function tF(){return je("."),eF()}function nF(){je("[");const t=ku();return je("]"),t}function iF(){var t,e,n;for(t=Z8();;)if(he("."))n=tF(),t=Gm(".",t,n);else if(he("("))e=$8(),t=H8(t,e);else if(he("["))n=nF(),t=Gm("[",t,n);else break;return t}function Ym(){const t=iF();if(re.type===at&&(he("++")||he("--")))throw new Error(js);return t}function rc(){var t,e;if(re.type!==at&&re.type!==Ln)e=Ym();else{if(he("++")||he("--"))throw new Error(js);if(he("+")||he("-")||he("~")||he("!"))t=ct(),e=rc(),e=J8(t.value,e);else{if(Du("delete")||Du("void")||Du("typeof"))throw new Error(js);e=Ym()}}return e}function Vm(t){let e=0;if(t.type!==at&&t.type!==Ln)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 rF(){var t,e,n,i,r,s,o,a,l,c;if(t=re,l=rc(),i=re,r=Vm(i),r===0)return l;for(i.prec=r,ct(),e=[t,re],o=rc(),s=[l,i,o];(r=Vm(re))>0;){for(;s.length>2&&r<=s[s.length-2].prec;)o=s.pop(),a=s.pop().value,l=s.pop(),e.pop(),n=_m(a,l,o),s.push(n);i=ct(),i.prec=r,s.push(i),e.push(re),n=rc(),s.push(n)}for(c=s.length-1,n=s[c],e.pop();c>1;)e.pop(),n=_m(s[c-1].value,s[c-2],n),c-=2;return n}function yi(){var t,e,n;return t=rF(),he("?")&&(ct(),e=yi(),je(":"),n=yi(),t=Y8(t,e,n)),t}function ku(){const t=yi();if(he(","))throw new Error(js);return t}function Jm(t){G=t,k=0,Ke=G.length,re=null,Um();const e=ku();if(re.type!==qs)throw new Error("Unexpect token after expression.");return e}var sF={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 qm(t){function e(o,a,l,c){let f=t(a[0]);return l&&(f=l+"("+f+")",l.lastIndexOf("new ",0)===0&&(f="("+f+")")),f+"."+o+(c<0?"":c===0?"()":"("+a.slice(1).map(t).join(",")+")")}function n(o,a,l){return c=>e(o,c,a,l)}const i="new Date",r="String",s="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(o){o.length<3&&be("Missing arguments to clamp function."),o.length>3&&be("Too many arguments to clamp function.");const a=o.map(t);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:i,date:n("getDate",i,0),day:n("getDay",i,0),year:n("getFullYear",i,0),month:n("getMonth",i,0),hours:n("getHours",i,0),minutes:n("getMinutes",i,0),seconds:n("getSeconds",i,0),milliseconds:n("getMilliseconds",i,0),time:n("getTime",i,0),timezoneoffset:n("getTimezoneOffset",i,0),utcdate:n("getUTCDate",i,0),utcday:n("getUTCDay",i,0),utcyear:n("getUTCFullYear",i,0),utcmonth:n("getUTCMonth",i,0),utchours:n("getUTCHours",i,0),utcminutes:n("getUTCMinutes",i,0),utcseconds:n("getUTCSeconds",i,0),utcmilliseconds:n("getUTCMilliseconds",i,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",r,0),lower:n("toLowerCase",r,0),substring:n("substring",r),split:n("split",r),trim:n("trim",r,0),btoa:"btoa",atob:"atob",regexp:s,test:n("test",s),if:function(o){o.length<3&&be("Missing arguments to if function."),o.length>3&&be("Too many arguments to if function.");const a=o.map(t);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function oF(t){const e=t&&t.length-1;return e&&(t[0]==='"'&&t[e]==='"'||t[0]==="'"&&t[e]==="'")?t.slice(1,-1):t}function Km(t){t=t||{};const e=t.allowed?Ro(t.allowed):{},n=t.forbidden?Ro(t.forbidden):{},i=t.constants||sF,r=(t.functions||qm)(u),s=t.globalvar,o=t.fieldvar,a=ht(s)?s:d=>`${s}["${d}"]`;[...Object.getOwnPropertyNames(Object.prototype).filter(d=>typeof Object.prototype[d]=="function")];let l={},c={},f=0;function u(d){if(le(d))return d;const g=h[d.type];return g==null&&be("Unsupported type: "+d.type),g(d)}const h={Literal:d=>d.raw,Identifier:d=>{const g=d.name;return f>0?g:Mi(n,g)?be("Illegal identifier: "+g):Mi(i,g)?i[g]:Mi(e,g)?g:(l[g]=1,a(g))},MemberExpression:d=>{const g=!d.computed,m=u(d.object);g&&(f+=1);const p=u(d.property);return m===o&&(c[oF(p)]=1),g&&(f-=1),m+(g?"."+p:"["+p+"]")},CallExpression:d=>{d.callee.type!=="Identifier"&&be("Illegal callee type: "+d.callee.type);const g=d.callee.name,m=d.arguments,p=Mi(r,g)&&r[g];return p||be("Unrecognized function: "+g),ht(p)?p(m):p+"("+m.map(u).join(",")+")"},ArrayExpression:d=>"["+d.elements.map(u).join(",")+"]",BinaryExpression:d=>"("+u(d.left)+" "+d.operator+" "+u(d.right)+")",UnaryExpression:d=>"("+d.operator+u(d.argument)+")",ConditionalExpression:d=>"("+u(d.test)+"?"+u(d.consequent)+":"+u(d.alternate)+")",LogicalExpression:d=>"("+u(d.left)+d.operator+u(d.right)+")",ObjectExpression:d=>{for(const g of d.properties){const m=g.key.name;CI.has(m)&&be("Illegal property: "+m)}return"{"+d.properties.map(u).join(",")+"}"},Property:d=>{f+=1;const g=u(d.key);return f-=1,g+":"+u(d.value)}};function A(d){const g={code:u(d),globals:Object.keys(l),fields:Object.keys(c)};return l={},c={},g}return A.functions=r,A.constants=i,A}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 aF(t,e,n){return tr((n-t)/(e-t),0,1)}const Wm={clamp:tr,format(t,e){return ze(e)(t)},mapHasKey(t,e){return t.has(e)},isArray:Ce,isBoolean:zr,isDefined(t){return t!==void 0},isNumber:Ve,isObject:Ge,isRegExp:TI,isString:le,isValid(t){return t!=null&&t===t},lerp:wh,linearstep:aF,replace(t,e,n){return String(t).replace(e,n)},smoothstep:jm};function cF(t){const e=qm(t);for(const n in Wm)e[n]=`this.${n}`;return e}const lF=Km({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:cF});function fF(t,e={}){try{const n=Jm(t),i=lF(n),r=Function("datum","globalObject",`"use strict";
|
|
607
|
+
chrM 16299`};function wm(t){if(!(t in mm))throw new Error(`Unknown assembly: ${t}`);return mm[t].split(`
|
|
608
|
+
`).map(e=>{const n=e.split(" ");return{name:n[0],size:parseInt(n[1])}})}const b4=/^([A-Za-z]+:)?\/\//;function zn(t,e){if(e&&b4.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 ym(n)+e}function E4(t,e,n=I4()){const i=typeof t=="function"?t():t;if(!e)return i;try{if(i){const r=n?new URL(i,n).href:new URL(i).href;return new URL(e,r).href}else if(n)return new URL(e,n).href}catch{}return zn(i,e)}function ym(t){const e=t.replace(/[^/]*$/,"");return e===""?void 0:e.endsWith("://")?t+"/":e}function I4(){if(typeof document<"u"&&document.baseURI)return document.baseURI;if(typeof window<"u"&&window.location?.href)return window.location.href}class Ks{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(!vf(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,bm(this.config))this.setChromSizes(this.config.contigs);else if(!Bf(this.config)){const n=wm(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(Bf(this.config))try{const n=zn(e,this.config.url),i=await fetch(n);if(!i.ok)throw new Error(`${i.status} ${i.statusText}`);this.setChromSizes(x4(await i.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){this.chromosomes=[],this.cumulativeChromPositions=new Map,this.chromosomesByName=new Map;let n=0;this.startByIndex=[0];for(let i=0;i<e.length;i++){this.startByIndex.push(n);const r=e[i].size,s={...e[i],continuousStart:n,continuousEnd:n+r,continuousInterval:[n,n+r],index:i,number:i+1,odd:!(i&1)};this.chromosomes.push(s);const o=s.name.replace(/^chr/i,"");for(const a of["chr"+o,"CHR"+o,"Chr"+o,s.number,""+s.number,o,s.name])this.cumulativeChromPositions.set(a,n),this.chromosomesByName.set(a,s);n+=s.size}this.totalSize=n}getExtent(){return[0,this.totalSize]}toContinuous(e,n){let i=this.cumulativeChromPositions.get(e);if(i===void 0)throw new Error("Unknown chromosome/contig: "+e);return i+ +n}toChromosome(e){if(e>this.totalSize)return;e=Math.floor(e);const n=xn(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 C4(...this.toChromosomalInterval(e))}formatLocus(e){const n=this.toChromosomal(e);if(n)return y4(n)}toChromosomalInterval(e){const n=this.toChromosomal(e[0]+.5),i=this.toChromosomal(e[1]-.5);return i.pos+=1,[n,i]}toContinuousInterval(e){let[n,i]=e;return i||(i=n),[this.toContinuous(n.chrom,n.pos??0),this.toContinuous(i.chrom,i.pos??this.chromosomesByName.get(i.chrom)?.size)]}toDiscreteChromosomeIntervals(e){const n=e[0],i=e[1],r=[];if(n.chrom===i.chrom)r.push({chrom:n.chrom,startPos:n.pos,endPos:i.pos});else{const s=this.chromosomes.findIndex(a=>a.name===n.chrom),o=this.chromosomes.findIndex(a=>a.name===i.chrom);r.push({chrom:n.chrom,startPos:n.pos,endPos:this.chromosomes[s].size});for(let a=s+1;a<o;a++)r.push({chrom:this.chromosomes[a].name,startPos:0,endPos:this.chromosomes[a].size});r.push({chrom:i.chrom,startPos:0,endPos:i.pos})}return r}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 i=n[1];if(n.slice(2).every(a=>a===void 0)){const a=this.getChromosome(i);return a?[a.continuousStart,a.continuousEnd]:void 0}const r=n[3]||i,s=parseInt(n[2].replace(/,/g,"")),o=n[4]!==void 0?parseInt(n[4].replace(/,/g,"")):s;return[this.toContinuous(i,s-1),this.toContinuous(r,o)]}}}function x4(t){return VI(t).map(([e,n])=>({name:e,size:parseInt(n)}))}function Cm(t){return Ge(t)&&"chrom"in t}function v4(t){return t.every(Cm)}function vf(t){return Ge(t)&&("name"in t||Bf(t)||bm(t))}function Bf(t){return vf(t)&&"url"in t}function bm(t){return vf(t)&&"contigs"in t}function B4(){const t=If().numberingOffset(1);let e;t.genome=function(i){return arguments.length?(e=i,t):e},t.ticks=i=>{if(!e)return[];const r=t.domain(),s=t.numberingOffset(),[o,a]=[Math.max(r[0],0),Math.min(r[1],e.totalSize-1)].map(u=>e.toChromosome(u)),l=Math.max(1,ri(r[0],r[1],i)),c=[];for(let u=o.index;u<=a.index;u++){const f=e.chromosomes[u],h=Math.max(f.continuousStart+l,r[0]-(r[0]-f.continuousStart)%l),A=Math.min(f.continuousEnd-l/4,r[1]+1);for(let d=h;d<=A;d+=l){const g=d-s;g>=r[0]&&g<r[1]&&c.push(g)}}return c},t.tickFormat=(i,r)=>{if(!e)return;if(r)throw new Error("Locus scale's tickFormat does not support a specifier!");const s=t.domain(),o=s[1]-s[0],a=t.numberingOffset(),c=ri(s[0],s[1],Math.min(i,Math.ceil(o)))<1e6?He(","):He(".3s"),u=f=>f-e.toChromosome(f).continuousStart;return f=>c(u(f)+a)};const n=t.copy;return t.copy=()=>{const i=n();let r=e;return i.genome=function(s){return arguments.length?(r=s,i):r},i.genome(e)},t}function S4(t){return t.type=="locus"}function D4(t,e){const n=js(t);return n?n.toChromosomal(e):e}function Q4(t,e){const n=js(t);return n&&Cm(e)?n.toContinuous(e.chrom,e.pos):e}function k4(t,e){const n=js(t);return n&&v4(e)?n.toContinuousInterval(e):e}function R4(t,e){const n=js(t);return n?n.toChromosomalInterval(e):e}function F4(t){const e=js(t);if(!e)throw new Error("No genome has been defined!");return e.getExtent()}function js(t){if(t&&"toChromosomal"in t)return t;if(t&&"genome"in t)return t.genome()}function Em(t,e,n){return qe(e)&&n!=null&&(e=Math.min(e,~~(Kr(t.domain())/n)||1)),Ge(e)&&(e.step,e=e.interval),e}function Im(t,e,n){var i=t.range(),r=Math.floor(i[0]),s=Math.ceil(vt(i));if(r>s&&(i=s,s=r,r=i),e=e.filter(function(a){return a=t(a),r<=a&&a<=s}),n>0&&e.length>1){for(var o=[e[0],vt(e)];e.length>n&&e.length>=3;)e=e.filter(function(a,l){return!(l%2)});e.length<3&&(e=o)}return e}function N4(t,e){return t.bins?Im(t,M4(t.bins,e)):t.ticks?t.ticks(e):t.domain()}function M4(t,e){var n=t.length,i=~~(n/(e||n));return i<2?t.slice():t.filter(function(r,s){return!(s%i)})}function T4(t,e,n){var i=t.tickFormat?t.tickFormat(e,n):n?He(n):String;if(Hp(t.type)){var r=L4(n);i=t.bins?r:P4(i,r)}return i}function P4(t,e){return function(n){return t(n)?e(n):""}}function L4(t){var e=Hi(t||",");if(e.precision==null){switch(e.precision=12,e.type){case"%":e.precision-=2;break;case"e":e.precision-=1;break}return O4(He(e),He(".1f")(1)[1])}else return He(e)}function O4(t,e){return function(n){var i=t(n),r=i.indexOf(e),s,o;if(r<0)return i;for(s=U4(i,r),o=s<i.length?i.slice(s):"";--s>r;)if(i[s]!=="0"){++s;break}return i.slice(0,s)+o}}function U4(t,e){var n=t.lastIndexOf("e"),i;if(n>0)return n;for(n=t.length;--n>e;)if(i=t.charCodeAt(n),i>=48&&i<=57)return n+1}const _4="locus",z4="index";var G4=5;function H4(t){const e=t.type;return!t.bins&&(e===ur||e===Ts||e===Ps)}function xm(t){return Le(t)&&![Ht,z4,_4].includes(t)}function vm(t){return t||{warn:(e,...n)=>console.warn(e,...n)}}var Y4=Po(["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 Bm(t,e,n){n=vm(n);for(const r in t)if(!Y4[r]){if(r==="padding"&&xm(e.type))continue;dt(e[r])?e[r](t[r]):n.warn("Unsupported scale property: "+r)}const i=Sm(e,t,n);i.domain&&e.domain(i.domain),i.applyOrdinalUnknown&&e.unknown(i.ordinalUnknown),Z4(e,t,X4(e,t,i.count))}function V4(t,e){const n=J4(t),i=re(n);if(!i)throw new Error("Unknown scale type: "+n);const r=i();return!t.domain&&Le(r.type)&&(t.domain=[0,0]),Bm(t,r,e),r}function J4(t){var e=t.type,n="",i;return e===Ht?Ht+"-"+ur:(q4(t)&&(i=t.rawDomain?t.rawDomain.length:t.domain?t.domain.length+ +(t.domainMid!=null):0,n=i===2?Ht+"-":i===3?fr+"-":""),(n+e||ur).toLowerCase())}function q4(t){const e=t.type;return Le(e)&&e!==Tp&&e!==Pp&&(t.scheme||t.range&&t.range.length&&t.range.every(le))}function K4(t){if(!t.copy)return t;const e=t.copy();return e.type==null&&t.type!=null&&(e.type=t.type),e}function Sm(t,e,n){if(!t.domain)return{domain:null,count:0,ordinalUnknown:void 0,applyOrdinalUnknown:!1};n=vm(n);const i=K4(t);var r=j4(i,e.domainRaw,n);if(r>-1)return{domain:i.domain(),count:r,ordinalUnknown:i.type===Ls&&e.domainImplicit?Na:void 0,applyOrdinalUnknown:!1};var s=e.domain,o=i.type,a=e.zero||e.zero===void 0&&H4(i),l,c;return s?(xm(o)&&e.padding&&s[0]!==vt(s)&&(s=W4(o,s,e.range,e.padding,e.exponent,e.constant)),(a||e.domainMin!=null||e.domainMax!=null||e.domainMid!=null)&&(l=(s=s.slice()).length-1||1,a&&(s[0]>0&&(s[0]=0),s[l]<0&&(s[l]=0)),e.domainMin!=null&&(s[0]=e.domainMin),e.domainMax!=null&&(s[l]=e.domainMax),e.domainMid!=null&&(c=e.domainMid,(c<s[0]||c>s[l])&&n.warn("Scale domainMid exceeds domain min or max.",c),s.splice(l,0,c))),i.domain(Dm(o,s,n)),e.nice&&i.nice&&i.nice(e.nice!==!0&&Em(i,e.nice)||null),{domain:i.domain(),count:s.length,ordinalUnknown:o===Ls&&e.domainImplicit?Na:void 0,applyOrdinalUnknown:o===Ls}):{domain:null,count:0,ordinalUnknown:void 0,applyOrdinalUnknown:!1}}function j4(t,e,n){return e?(t.domain(Dm(t.type,e,n)),e.length):-1}function W4(t,e,n,i,r,s){n??=[0,1];var o=Math.abs(vt(n)-n[0]),a=o/(o-2*i),l=t===_n?SA(e,null,a):t===Ps?cl(e,null,a,.5):t===Ts?cl(e,null,a,r||1):t===Ja?DA(e,null,a,s||1):BA(e,null,a);return e=e.slice(),e[0]=l[0],e[e.length-1]=l[1],e}function Dm(t,e,n){if(Hp(t)){var i=Math.abs(e.reduce(function(r,s){return r+(s<0?-1:s>0?1:0)},0));i!==e.length&&n.warn("Log scale domain includes zero: "+ul(e))}return e}function X4(t,e,n){let i=e.bins;if(i&&!be(i)){const r=(i.start==null||i.stop==null)&&t.domain(),s=i.start==null?r[0]:i.start,o=i.stop==null?vt(r):i.stop,a=i.step;a||xe("Scale bins parameter missing step property."),i=rs(s,o+a,a)}return i?t.bins=i:t.bins&&delete t.bins,t.type===hf&&(i?!e.domain&&!e.domainRaw&&(t.domain(i),n=i.length):t.bins=t.domain()),n}function Z4(t,e,n){var i=t.type,r=e.round||!1,s=e.range;if(e.rangeStep!=null)s=$4(i,e,n);else if(e.scheme&&(s=e8(i,e,n),dt(s))){if(t.interpolator)return t.interpolator(s);xe(`Scale type ${i} does not support interpolating color schemes.`)}if(s&&Ka(i))return t.interpolator(ja(Sf(s,e.reverse),e.interpolate,e.interpolateGamma));s&&e.interpolate&&t.interpolate?t.interpolate(Yp(e.interpolate,e.interpolateGamma)):dt(t.round)?t.round(r):dt(t.rangeRound)&&t.interpolate(r?Ns:On),s&&t.range(Sf(s,e.reverse))}function $4(t,e,n){t!==Up&&t!==ff&&xe("Only band and point scales support rangeStep.");var i=(e.paddingOuter!=null?e.paddingOuter:e.padding)||0,r=t===ff?1:(e.paddingInner!=null?e.paddingInner:e.padding)||0;return[0,e.rangeStep*lf(n,r,i)]}function e8(t,e,n){var i=e.schemeExtent,r,s;return be(e.scheme)?s=ja(e.scheme,e.interpolate,e.interpolateGamma):(r=e.scheme.toLowerCase(),s=df(r),s||xe(`Unrecognized scheme name: ${e.scheme}`)),n=t===Op?n+1:t===hf?n-1:t===uf||t===Lp?+e.schemeCount||G4:n,Ka(t)?Qm(s,i,e.reverse):dt(s)?ZQ(Qm(s,i),n):t===Ls?s:s.slice(0,n)}function Qm(t,e,n){return dt(t)&&(e||n)?XQ(t,Sf(e||[0,1],n)):t}function Sf(t,e){return e?t.slice().reverse():t}class t8{#e;#t=new Set;#n;#i;#r;#o;#s=0;constructor({getParamRuntime:e,onRangeChange:n,onDomainChange:i,getGenomeStore:r}){this.#n=e,this.#i=n,this.#r=i,this.#o=r}get scale(){return this.#e}getLocusGenome(e){const n=this.#o?.();if(!n)throw new Error("No genome has been defined!");return e?n.getGenome(e):n.getGenome()}createScale(e){const n=V4({...this.#a(e),range:void 0});return n.props=e,"unknown"in n&&n.unknown(null),this.#e=n,this.#c(e),this.#l(),this.#u(),this.#e}#c(e){const n=this.#e;!n||!S4(n)||n.genome(this.getLocusGenome(e.assembly))}reconfigureScale(e){const n=this.#e;!n||n.type=="null"||(Bm({...this.#a(e),range:void 0},n),n.props=e,this.#l())}withDomainNotificationsSuppressed(e){this.#s+=1;try{e()}finally{this.#s-=1}}#a(e){const n=e,{assembly:i,domainIndexer:r,...s}=n;return s}#l(){const e=this.#e;if(!e)return;const n=e.props;this.#t.forEach(s=>s.invalidate()),this.#t.clear();const i=i8({range:n.range,reverse:n.reverse,createExpression:s=>this.#n().createExpression(s),registerExpr:s=>this.#t.add(s)});if(!i)return;if("values"in i){e.range(i.values);return}const r=()=>e.range(i.evaluate());i.setup(r),r()}#u(){const e=this.#e;if(!e)return;const n=e.range,i=e.domain,r=()=>this.#i?.();n8(e,{onRangeChange:r,onDomainChange:()=>{this.#s>0||this.#r?.()},range:n,domain:i}),r()}dispose(){this.#t.forEach(e=>e.invalidate()),this.#t.clear()}}function n8(t,{onRangeChange:e,onDomainChange:n,range:i,domain:r}){typeof i=="function"&&(t.range=(function(s){if(arguments.length)i(s),e?.();else return i()})),typeof r=="function"&&(t.domain=(function(s){if(arguments.length)r(s),n?.();else return r()}))}function i8({range:t,reverse:e,createExpression:n,registerExpr:i}){if(!t||!be(t))return null;const r=(s,o)=>o?s.slice().reverse():s;if(t.some(Ee)){let s;return{dynamic:!0,evaluate:()=>r(s.map(l=>l()),e),setup:l=>{s=t.map(c=>{if(Ee(c)){const u=n(c.expr);return u.subscribe(l),i(u),()=>u(null)}return()=>c})}}}return{dynamic:!1,values:r(t,e)}}function ec(t,e,n){if(n=n||[],t.some(o=>o===null)){if(t.every(o=>o===null))return null;throw console.warn(t),new Error("Cannot merge objects with nulls!")}const i={},r=(o,a)=>o===a||dr(o)&&dr(a)||dr(o)&&a===!0||o===!0&&Ge(a)||Array.isArray(o)&&Array.isArray(a)&&o.length===a.length&&o.every((l,c)=>l===a[c]),s=o=>{for(let a in o){const l=o[a];if(!n.includes(a)&&l!==void 0)if(i[a]!==void 0&&!r(i[a],l))console.warn(`Conflicting property ${a} of ${e}: (${JSON.stringify(i[a])} and ${JSON.stringify(o[a])}). Using ${JSON.stringify(i[a])}.`);else{const c=i[a];if(dr(c))dr(l)&&(i[a]=ec([c,l],a));else if(dr(l)){if(!(c===!0||c===void 0))throw new Error("Bug in merge! Target is: "+c);i[a]=ec([{},l],a)}else i[a]=l}}};for(const o of t)s(o);return i}function dr(t){return Ge(t)&&!Array.isArray(t)}const km="quantitative",Rm="ordinal",Fm="nominal",ln="locus",tc="index";function r8(t,e,n){const i={};return n&&(i.zero=!1),bs(t)?i.nice=!n:Dn(t)?i.scheme=e==Fm?"tableau10":e==Rm?"blues":"viridis":aa(t)?i.range=t=="shape"?["circle","square","triangle-up","cross","diamond"]:[]:t=="size"?i.range=[0,400]:t=="angle"&&(i.range=[0,360]),i}function s8(t,e){if(e==tc||e==ln){if(oa(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]},r=["sample"].includes(t)?"null":n[t]?n[t][[Fm,Rm,km].indexOf(e)]:e==km?"linear":"ordinal";if(r===void 0)throw new Error('Channel "'+t+'" is not compatible with "'+e+'" data type. Use of a proper scale may be needed.');return r}function o8(t,e){bs(e)&&t.type!=="ordinal"&&(t.range=[0,1]),e=="opacity"&&Le(t.type)&&(t.clamp=!0)}function a8({channel:t,dataType:e,members:n,isExplicitDomain:i}){const r=Array.from(n).map(a=>a.channelDef.scale).filter(a=>a!==void 0),s=ec(r,"scale",["domain"]);if(s===null||s.type=="null")return{type:"null"};const o={...r8(t,e,i),...s};return o.type||(o.type=s8(t,e)),t=="y"&&cn(o.type)&&o.reverse==null&&(o.reverse=!0),o.range&&o.scheme&&delete o.scheme,!("zoom"in o)&&[tc,ln].includes(o.type)&&(o.zoom=!0),o8(o,t),o}function Nm(t,e){const n=t.findRuntimeForParam(e);if(!n)throw new Error(`Selection domain parameter "${e}" was not found.`);return n}function Mm(t,e){if(!t)throw new Error(`Selection domain parameter "${e}" was not found.`);if(!Kl(t))throw new Error(`Selection domain parameter "${e}" must be an interval selection.`);return t}function Tm(t,e,n={}){if(!t||t.length!==2)return;const i=Number(t[0]),r=Number(t[1]);if(!Number.isFinite(i)||!Number.isFinite(r))return;let s=Math.min(i,r),o=Math.max(i,r);if(s=Math.max(e[0],s),o=Math.min(e[1],o),!(s>o)&&!(n.roundToIntegers&&(s=Math.ceil(s),o=Math.ceil(o),s=Math.max(e[0],s),o=Math.min(e[1],o),s>o)))return[s,o]}class Ws extends Array{constructor(){super(),this.type=void 0}extend(e){return this}extendAll(e){if(e instanceof Ws&&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 i of e)this.extend(n(i));return this}}class Df extends Ws{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 Pm extends Ws{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 Qf extends Pm{constructor(){super(),this.type="nominal"}}class c8 extends Ws{constructor(e){super();let n=0;for(let i=1;i<e.length;i++)n+=Math.sign(e[i]-e[i-1]);if(Math.abs(n)!=e.length-1)throw new Error("Piecewise domain must be strictly increasing or decreasing: "+JSON.stringify(e));e.forEach(i=>this.push(i))}extend(e){if(this.includes(e))return this;throw new Error("Piecewise domains are immutable and cannot be unioned!")}}const Lm={quantitative:Df,index:Df,locus:Df,nominal:Qf,ordinal:Pm};function Xs(t,e){if(t=="quantitative"&&l8(e)){const n=new c8(e);return n.type=t,n}else if(Lm[t]){const n=new Lm[t];return n.type=t,e&&n.extendAll(e),n}throw new Error("Unknown type: "+t)}function l8(t){return t&&t.length>0&&t.length!=2&&t.every(e=>typeof e=="number")}class u8{#e;#t;#n;#i;#r;#o;#s;#c=void 0;#a=!0;#l=new WeakMap;constructor({getMembers:e,getDataMembers:n,getType:i,getLocusExtent:r,fromComplexInterval:s}){this.#e=e,this.#t=n??e,this.#n=i,this.#i=r,this.#r=s}get initialDomainSnapshot(){return this.#o}hasConfiguredDomain(){return!!this.getConfiguredDomain()}hasSelectionConfiguredDomain(){return this.getConfiguredDomain(),!!this.#c}getSelectionConfiguredDomainInfo(){return this.getConfiguredDomain(),this.#c}invalidateConfiguredDomain(){this.#a=!0}getDefaultDomain(e=!1,n){return p8(this.#n(),this.#i,e?this.getDataDomain():void 0,n)}getConfiguredOrDefaultDomain(e=!1,n){return this.getConfiguredDomain()??this.getDefaultDomain(e,n)}getConfiguredDomain(){if(!this.#a)return this.#s;const e=f8(this.#e(),this.#r);return this.#s=e.domain,this.#c=e.selectionRef,this.#a=!1,e.domain}getDataDomain(){return g8(this.#t(),this.#n,e=>this.#u(e))}captureInitialDomain(e,n){if(!this.#o&&Le(e.type)){const i=e.domain();Kr(i)>0&&(this.#o=i)}return n?!1:(this.#o=e.domain(),!0)}#u(e){const n=this.#l.get(e);if(n)return n;const i=e.view.mark.encoders;if(!i)return[];const r=i[e.channel];if(!r)return[];const s=r.accessors??[];if(s.length===0)return[];const o=s.filter(Wd).filter(a=>!a.channelDef.domainInert);return this.#l.set(e,o),o}}function f8(t,e){const n=Array.from(t).filter(c=>c.contributesToDomain).filter(c=>c.channelDef.scale?.domain),i=[];let r,s,o,a,l=!1;for(const c of n){const u=c.channelDef.scale.domain;if(d8(u)){if(l)throw new Error("Cannot mix selection-driven and literal configured domains on a shared scale.");const f=h8(c,u,e);if(r&&r!==f.key)throw new Error("Conflicting selection domain references on a shared scale: "+s+" vs "+f.description+".");if(!o)o=f.sync;else if(o==="auto")o=f.sync;else if(f.sync!=="auto"&&o!==f.sync)throw new Error("Conflicting selection domain sync modes on a shared scale: "+o+" vs "+f.sync+".");r=f.key,s=f.description,a={param:f.param,encoding:f.encoding,sync:o},f.domain&&i.push(f.domain);continue}if(r)throw new Error("Cannot mix literal configured domains with selection-driven domains on a shared scale.");l=!0,i.push(Xs(c.channelDef.type,e(u)))}return i.length>0?{domain:i.reduce((c,u)=>c.extendAll(u)),selectionRef:a}:r?{domain:void 0,selectionRef:a}:{domain:void 0,selectionRef:void 0}}function h8(t,e,n){const i=e.param,r=e.sync??"auto";if(r!=="auto"&&r!=="oneWay"&&r!=="twoWay")throw new Error(`Invalid selection domain sync mode "${r}" for parameter "${i}".`);const s=A8(t.channel,e,i),o=t.view.paramRuntime,l=Mm(o?.findValue(i),i).intervals[s],c=[i,s].join("|"),u=i+"."+s;return!l||l.length!==2?{domain:void 0,key:c,description:u,param:i,encoding:s,sync:r}:{domain:Xs(t.channelDef.type,n(l)),key:c,description:u,param:i,encoding:s,sync:r}}function A8(t,e,n){if(e.encoding)return e.encoding;const i=rn(t);if(i==="x"||i==="y")return i;throw new Error(`Selection domain reference "${n}" on channel "${t}" requires an explicit "encoding" ("x" or "y").`)}function d8(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&typeof t.param=="string"}function g8(t,e,n){const i=e(),r=new Map;for(const o of t){if(!o.contributesToDomain)continue;const a=n(o);if(a.length===0)continue;const l=o.view.getCollector();for(const c of a){const u=Zd(c,i),f=l??null;let h=r.get(f);if(h||(h=new Map,r.set(f,h)),h.has(u))continue;let A;if(l)A=l.getDomain(u,i,c);else if(c.constant)A=Xs(i),A.extend(c({}));else continue;h.set(u,A)}}if(r.size===0)return;const s=Xs(i);for(const o of r.values())for(const a of o.values())s.extendAll(a);return s}function p8(t,e,n,i){return t==ln?e(i):n??[]}function m8(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function w8(t,e,n){return t*Math.pow(e/t,n)}const y8=t=>new Promise(e=>setTimeout(e,t));function C8(){return{canceled:!1}}function b8(t){const e=t.requestAnimationFrame||window.requestAnimationFrame,n=t.signal,i=t.cancelToken,r=()=>new Promise((s,o)=>{if(i?.canceled)return s();if(n?.aborted)return o("aborted");const a=performance.now(),l=a+(t.duration||1e3),c=typeof t.from=="number"?t.from:0,u=typeof t.to=="number"?t.to:1,f=t.easingFunction||(m=>m),h=m=>(m-a)/(l-a),A=m=>m*(u-c)+c,d=m=>Math.max(0,Math.min(1,m)),g=m=>{if(i?.canceled){s();return}n?.aborted?o("aborted"):(t.onUpdate(A(f(d(h(m))))),m<l?e(g):(t.onUpdate(A(f(1))),s()))};e(g)});return t.delay?i?.canceled?Promise.resolve():n?.aborted?Promise.reject("aborted"):y8(t.delay).then(r):r()}function Om(t,e,n,i,r={}){const s=r.onUnsupported??"throw";switch(t.type){case"linear":case"index":case"locus":return BA(e,n,i);case"log":return SA(e,n,i);case"pow":case"sqrt":return cl(e,n,i,t.exponent());case"symlog":return DA(e,n,i,t.constant());default:if(s==="identity")return e;throw new Error("Zooming is not implemented for: "+t.type)}}class E8{#e;#t;#n;#i;#r;#o;#s=null;constructor({getScale:e,getAnimator:n,getInitialDomainSnapshot:i,getResetDomain:r,fromComplexInterval:s,getGenomeExtent:o}){this.#e=e,this.#t=n,this.#n=i,this.#i=r,this.#r=s,this.#o=o}getZoomExtent(){const e=this.#e(),n=e.props.zoom;return I8(e,n,this.#r,this.#o,this.#n)}isZoomable(){return this.isZoomingSupported()&&!!this.#e().props.zoom}isZoomingSupported(){const e=this.#e().type;return Le(e)&&!cn(e)}getDomainChangeAction(e,n){return Bn(n,e)?"none":this.isZoomable()?"restore":this.isZoomingSupported()?"animate":"notify"}isZoomed(){return this.isZoomingSupported()&&!Bn(this.#i(),this.#e().domain())}zoom(e,n,i){if(!this.isZoomingSupported())return!1;const r=this.#e(),s=r.domain();let o=x8(r,s,e,n,i);const a=this.getZoomExtent();return o=oI(o,a[0],a[1]),[0,1].some(l=>o[l]!=s[l])?(r.domain(o),!0):!1}async zoomTo(e,n=!1){if(qr(n)&&(n=n?700:0),!this.isZoomingSupported())throw new Error("Not a zoomable scale!");const i=this.#r(e),r=this.#t(),s=this.#e(),o=s.domain();if(n>0&&o.length==2){const a=o[1]-o[0],l=i[1]-i[0],c=o[0]+a/2,u=i[0]+l/2,f=o[0]==i[0],h=o[1]==i[1];this.#c();const A=C8();this.#s=A,await r.transition({duration:n,easingFunction:m8,cancelToken:A,onUpdate:d=>{const g=w8(a,l,d),m=a==l?d:(a-g)/(a-l),p=m*u+(1-m)*c,w=[f?o[0]:p-g/2,h?o[1]:p+g/2];s.domain(w)}}),this.#s===A&&(this.#s=null),s.domain(i)}else this.#c(),s.domain(i),r?.requestRender()}#c(){this.#s&&(this.#s.canceled=!0,this.#s=null)}resetZoom(){if(!this.isZoomingSupported())throw new Error("Not a zoomable scale!");const e=this.#e(),n=e.domain(),i=this.#i();return[0,1].some(r=>i[r]!=n[r])?(e.domain(i),!0):!1}getZoomLevel(){return this.isZoomable()?Kr(this.getZoomExtent())/Kr(this.#e().domain()):1}}function I8(t,e,n,i,r){return v8(e)&&be(e.extent)?n(e.extent):e&&t.props.type=="locus"?i():r()}function x8(t,e,n,i,r){let s=[...e],o=t.invert(i);switch(t.props.reverse&&(r=-r),"align"in t&&(o+=t.align()),t.type){case"linear":case"index":case"locus":s=iI(s,r||0);break;case"log":s=rI(s,r||0);break;case"pow":case"sqrt":{s=sI(s,r||0,t.exponent());break}case"symlog":{if(r!==0)throw new Error("Panning is not implemented for: "+t.type);break}default:throw new Error("Zooming is not implemented for: "+t.type)}return Om(t,s,o,n)}function v8(t){return Ge(t)}re("index",If,["continuous"]),re("locus",B4,["continuous"]),re("null",gf,[]);class B8{#e=new Set;#t=new Set;#n={domain:new Set,range:new Set};#i;#r;#o;#s;#c=!1;#a=[];#l=0;constructor(e){this.channel=e,this.type=null,this.name=void 0,this.#r=new u8({getMembers:()=>this.#f(),getDataMembers:()=>this.#f(this.#t),getType:()=>this.type,getLocusExtent:n=>this.#g(n),fromComplexInterval:this.fromComplexInterval.bind(this)}),this.#i=new t8({getParamRuntime:()=>this.#u.paramRuntime,onRangeChange:()=>this.#d("range"),onDomainChange:()=>this.#d("domain"),getGenomeStore:()=>this.#A.genomeStore}),this.#o=new E8({getScale:()=>this.getScale(),getAnimator:()=>this.#A.animator,getInitialDomainSnapshot:()=>this.#r.initialDomainSnapshot,getResetDomain:()=>this.#r.getConfiguredOrDefaultDomain(),fromComplexInterval:this.fromComplexInterval.bind(this),getGenomeExtent:()=>this.#g()})}get#u(){const e=this.#e.values().next().value;if(!e)throw new Error("ScaleResolution has no members!");return e.view}#f(e=this.#e){const n=new Set;for(const i of e){const r=i.view;r.isConfiguredVisible()&&(!r.isDataInitialized()&&!i.channelDef?.scale?.domain||n.add(i))}return n}get#A(){return this.#u.context}get zoomExtent(){return(this.#i.scale&&Le(this.#i.scale.type)&&this.#o.getZoomExtent())??[-1/0,1/0]}#g(e){return F4(this.#h(e))}#h(e){if(this.type===ln)return this.#i.scale??this.#i.getLocusGenome(e)}addEventListener(e,n){this.#n[e].add(n)}removeEventListener(e,n){this.#n[e].delete(n)}#d(e){e==="domain"&&this.#l===0&&this.#y();for(const n of this.#n[e].values())n({type:e,scaleResolution:this})}#p(e){this.#l+=1;try{e()}finally{this.#l-=1}}#y(){const e=this.#r.getSelectionConfiguredDomainInfo();if(!e||!(e.sync==="twoWay"||e.sync==="auto"&&this.isZoomable()))return;const i=Nm(this.#u.paramRuntime,e.param),r=Mm(i.getValue(e.param),e.param),s=this.#m(this.getScale().domain());if(!s)return;const o=this.#m(this.#r.getDefaultDomain(!0)),a=o&&Bn(s,o)?null:s,l=r.intervals[e.encoding]??null;S8(l,a)||i.setValue(e.param,{...r,type:"interval",intervals:{...r.intervals,[e.encoding]:a}})}#m(e){return Tm(e,this.zoomExtent)}#C(e){const n=D8(e),{channel:i,channelDef:r}=n,s=r.type==null&&this.type;if(i!="sample"&&!r.type&&!Yl(i)&&!s)throw new Error(`The "type" property must be defined in channel definition: "${i}": ${JSON.stringify(r)}. Must be one of: "quantitative", "ordinal", "nominal", "locus", "index"`);const o=i=="sample"?"nominal":r.type,a=r?.scale?.name,c=r.scale?.type??(o===tc||o===ln?o:void 0);if(c&&[tc,ln].includes(c)&&!oa(this.channel))throw new Error(`Index and locus scales are only supported on positional channels (x/y). Channel "${this.channel}" resolves to scale type "${c}".`);if(a){if(this.name!==void 0&&a!=this.name)throw new Error(`Shared scales have conflicting names: "${a}" vs. "${this.name}"!`);this.name=a}if(!s){if(!this.type)this.type=o;else if(o!==this.type&&!Yl(i))throw new Error(`Can not use shared scale for different data types: ${this.type} vs. ${o}. Use "resolve: independent" for channel ${this.channel}`)}return this.#e.add(n),n.contributesToDomain&&this.#t.add(n),this.#r.invalidateConfiguredDomain(),this.#E(),n}registerMember(e){const n=this.#C(e);return()=>{const i=this.#e.delete(n);return i&&(this.#t.delete(n),this.#r.invalidateConfiguredDomain(),this.#E()),i&&this.#e.size===0}}dispose(){this.#w(),this.#n.domain.clear(),this.#n.range.clear(),this.#i.dispose()}#w(){for(const e of this.#a)e();this.#a=[]}#E(){if(this.#w(),this.#e.size===0)return;const e=this.#r.getSelectionConfiguredDomainInfo();if(!e)return;const n=Nm(this.#u.paramRuntime,e.param);this.#a.push(n.subscribe(e.param,()=>{this.#r.invalidateConfiguredDomain(),this.reconfigureDomain()}))}#D(){for(const e of this.#e)if(e.view.hasRendered())return!0;return!1}registerCollectorSubscriptions(e,n){const i=new Set;for(const o of n)o.channelDef.domainInert||i.add(Zd(o,this.type));if(i.size===0)return()=>{};const r=()=>{this.reconfigureDomain()},s=[];for(const o of i)s.push(e.subscribeDomainChanges(o,r));return()=>{for(const o of s)o()}}#I(){return this.#r.hasConfiguredDomain()}#Q(){const e=this.#i.scale;if(!e)return!1;const n=e.domain();return Le(e.type)?n.length>2||n.length==2&&(n[0]!==0||n[1]!==0):n.length>0}#x(){return a8({channel:this.channel,dataType:this.type,members:this.#e,isExplicitDomain:this.#I()})}getAssemblyRequirement(){const e=this.#x();return e===null||e.type==="null"||e.type!==ln?{assembly:void 0,needsDefaultAssembly:!1}:{assembly:e.assembly,needsDefaultAssembly:e.assembly===void 0}}#b(e=!1){const n=this.#x();if(n===null||n.type=="null")return{type:"null"};const i=this.#r.getConfiguredOrDefaultDomain(e,n.type===ln?n.assembly:void 0);if(cn(n.type)){const r=this.#I(),s=this.#k(r);if(i!=null){if(r&&s.domain().length>0&&!Bn(s.domain(),i))return this.#s=void 0,this.#b(e);s.addAll(i);const o=new Set(i),a=s.domain().filter(l=>o.has(l));n.domain=a.length>0?a:new Qf}else{const o=s.domain();n.domain=o.length>0?o:new Qf}n.domainIndexer=s}else i&&i.length>0&&(n.domain=i);return!n.domain&&n.domainMid!==void 0&&(n.domain=[n.domainMin??0,n.domainMax??1]),n}#k(e){return(!this.#s||this.#c!==e)&&(this.#s=am(),this.#c=e),this.#s}reconfigure(){this.#p(()=>{this.#r.invalidateConfiguredDomain();const e=this.#v(!0);e&&(this.#B(e,(n,i)=>this.#i.reconfigureScale(i)),this.#S(e))})}reconfigureDomain(){this.#p(()=>{const e=this.#v(!0,!0);if(!e)return;const{domainConfig:n,targetDomain:i}=e,r=i!=null&&Bn(i,e.scale.domain());i!=null&&!r&&this.#B(e,s=>{s.domain(i),n.applyOrdinalUnknown&&s.unknown(n.ordinalUnknown)}),this.#S(e)})}#v(e,n=!1){const i=this.#i.scale;if(!i||i.type=="null")return;const r={scale:i,props:this.#b(e),previousDomain:i.domain(),domainWasInitialized:this.#Q(),hasSelectionConfiguredDomain:this.#r.hasSelectionConfiguredDomain()};if(n){const s=Sm(i,r.props);return{...r,domainConfig:s,targetDomain:s.domain}}return r}#B(e,n){this.#i.withDomainNotificationsSuppressed(()=>{n(e.scale,e.props)})}#S(e){const{scale:n,previousDomain:i,domainWasInitialized:r,hasSelectionConfiguredDomain:s}=e;if(this.#r.captureInitialDomain(n,r)){this.#d("domain");return}const o=n.domain(),a=this.#o.getDomainChangeAction(i,o);a==="restore"?s?this.#d("domain"):this.#i.withDomainNotificationsSuppressed(()=>{n.domain(i)}):a==="animate"?s?this.#d("domain"):this.#D()?(this.#i.withDomainNotificationsSuppressed(()=>{n.domain(i)}),this.zoomTo(o,500)):this.#d("domain"):a==="notify"&&this.#d("domain")}get scale(){if(this.#i.scale)return this.#i.scale;throw new Error("ScaleResolution.scale accessed before initialization. Call initializeScale().")}getScale(){return this.#i.scale??this.initializeScale()}initializeScale(){if(this.#i.scale)return this.#i.scale;const e=this.#b();return this.#i.createScale(e)}getDomain(){return this.getScale().domain()}getDataDomain(){return this.#r.getDataDomain()}getComplexDomain(){return R4(this.#h(),this.getDomain())}isZoomed(){return this.#o.isZoomed()}isZoomable(){return this.#o.isZoomable()}zoom(e,n,i){return this.#o.zoom(e,n,i)}async zoomTo(e,n=!1){return this.#o.zoomTo(e,n)}resetZoom(){return this.#o.resetZoom()}getZoomLevel(){return this.#o.getZoomLevel()}getAxisLength(){if(this.channel!=="x"&&this.channel!=="y")throw new Error("Axis length is only defined for x and y channels!");const e=Array.from(this.#e).map(n=>n.view.coords?.[this.channel==="x"?"width":"height"]).filter(n=>n>0);return e.length?e.reduce((n,i)=>Math.min(n,i),1e4):0}invertToComplex(e){const n=this.getScale();if("invert"in n){const i=n.invert(e);return this.toComplex(i)}else throw new Error("The scale does not support inverting!")}toComplex(e){return D4(this.#h(),e)}fromComplex(e){return Q4(this.#h(),e)}fromComplexInterval(e){return this.type==ln?k4(this.#h(),e):e}}function S8(t,e){return t===e?!0:!t||!e?!1:t.length===e.length&&Bn(t,e)}function D8(t){const e=t.channelDef.scale,n=e?.assembly;if(!e||!n||typeof n!="object"||!("url"in n))return t;const i=E4(t.view.getBaseUrl(),n.url);return i===n.url?t:{...t,channelDef:{...t.channelDef,scale:{...e,assembly:{...n,url:i}}}}}function kf(...t){for(const e of t)if(e!==void 0)return e}class Q8{#e=new Set;constructor(e){this.channel=e}get scaleResolution(){return this.#e.values().next().value?.view.getScaleResolution(this.channel)}#t(e){const{view:n}=e,i=n.getScaleResolution(this.channel);if(!i)throw new Error("Cannot find a scale resolution!");if(this.scaleResolution&&i!==this.scaleResolution)throw new Error(`Shared axes must have a shared scale! Channel: ${this.channel}, existing views: [${Array.from(this.#e).map(r=>r.view.getPathString()).join(", ")}], new view: ${n.getPathString()}.`);this.#e.add(e),bf(this,"axisProps")}registerMember(e){return this.#t(e),()=>this.removeMember(e)&&this.#e.size===0}removeMember(e){const n=this.#e.delete(e);return n&&bf(this,"axisProps"),n}getAxisProps(){return Za(this,"axisProps",()=>{const e=Array.from(this.#e).map(n=>{const i=n.view.mark.encoding[n.channel];return"axis"in i&&i.axis});return e.length>0&&e.some(n=>n===null)?null:ec(e.filter(n=>n!==void 0),"axis",["title"])})}getTitle(){const e=o=>{const a=xv(o.view,o.channel);if(!ht(a))return{member:o,axisTitle:"axis"in a?a.axis?.title:void 0,explicitTitle:kf("axis"in a?a.axis?.title:void 0,a.title),implicitTitle:kf(nn(a)?a.field:void 0,ji(a)?a.expr:void 0)}},n=Array.from(this.#e).map(e),i=n.map(o=>o.axisTitle).find(o=>o!==void 0);if(i!==void 0)return i;const r=n.filter(o=>{if(Yl(o.member.channel)&&!o.explicitTitle){const a=rn(o.member.channel);return n.find(l=>l.member.view==o.member.view&&l.member.channel==a)?.explicitTitle===void 0}return!0}),s=new Set(r.map(o=>kf(o.explicitTitle,o.implicitTitle)).filter(le));return s.size?[...s].join(", "):null}}function Um(t,e,{spacing:n,devicePixelRatio:i,offset:r,reverse:s}={}){n=n||0,r=r||0;let o=0,a=0;for(const d of t)o+=nc(d.px)+(Rf(d)?0:n),a+=nc(d.grow);o-=n;const l=Math.max(0,e-o),c=i!==void 0?d=>Math.round(d*i)/i:d=>d,u=[],f=[],h=d=>{const g=u.length;if(!g)return;const m=(d?n:0)*(s?-1:1);A-=m;for(let p=0;p<g;p++)f.push({location:A+(p+1)/(g+1)*m,size:0});A+=m,u.length=0};let A=s?Math.max(e,o):0+r;if(t.length==1&&Rf(t[0]))return[{location:A,size:0}];for(let d=0;d<t.length;d++){const g=t[d];if(Rf(g))u.push(g);else{h(f.length>0);const m=nc(g.px)+(a?nc(g.grow)/a*l:0);s&&(A-=m),f.push({location:c(A),size:c(m)}),s?A-=n:A+=m+n}}return A+=s?n:-n,h(!1),f}function k8(t){let e=0,n=0;for(const i of t)e=Math.max(e,i.px??0),n=Math.max(n,i.grow??0);return{px:e,grow:n}}class Gn{constructor(e,n){this.width=e,this.height=n}addPadding(e){return this.#e(e.width,e.height)}subtractPadding(e){return this.#e(-e.width,-e.height)}#e(e,n){return new Gn({px:(this.width.px??0)+e,grow:this.width.grow},{px:(this.height.px??0)+n,grow:this.height.grow})}isGrowing(){return!!(this.width.grow||this.height.grow)}}const Zs=Object.freeze({px:0,grow:0}),_m=new Gn(Zs,Zs);function Rf(t){return!t.px&&!t.grow}function nc(t){return t||0}function R8(t){return t&&(qe(t.px)||qe(t.grow))}function zm(t){if(zf(t))throw new Error("parseSizeDef does not accept step-based sizes.");if(R8(t))return t;if(qe(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 je{constructor(e,n,i,r){this.top=e||0,this.right=n||0,this.bottom=i||0,this.left=r||0}get width(){return this.left+this.right}get height(){return this.top+this.bottom}expand(e){return e<=0?this:new je(this.top+e,this.right+e,this.bottom+e,this.left+e)}add(e){return new je(this.top+e.top,this.right+e.right,this.bottom+e.bottom,this.left+e.left)}subtract(e){return new je(this.top-e.top,this.right-e.right,this.bottom-e.bottom,this.left-e.left)}union(e){return new je(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 je(0,this.right,0,this.left)}getVertical(){return new je(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):Ff}static createFromRecord(e){return new je(e.top,e.right,e.bottom,e.left)}static zero(){return Ff}static createUniformPadding(e){return new je(e,e,e,e)}}const Ff=je.createUniformPadding(0);Object.freeze(Ff);class gr{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(e,n){let i=this.length++;for(;i>0;){const r=i-1>>1,s=this.values[r];if(n>=s)break;this.ids[i]=this.ids[r],this.values[i]=s,i=r}this.ids[i]=e,this.values[i]=n}pop(){if(this.length===0)return;const e=this.ids,n=this.values,i=e[0],r=--this.length;if(r>0){const s=e[r],o=n[r];let a=0;const l=r>>1;for(;a<l;){const c=(a<<1)+1,u=c+1,f=c+(+(u<r)&+(n[u]<n[c]));if(n[f]>=o)break;e[a]=e[f],n[a]=n[f],a=f}e[a]=s,n[a]=o}return i}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){this.ids.length=this.values.length=this.length}}const Gm=Symbol("runtimeNode"),Hm=1e6;function F8(t){return t?(e,n)=>{t.addDisposer(e,n)}:()=>{}}function Ym(t,e){const n={id:t.id,name:t.name,kind:t.kind,get(){return t.value},subscribe(i){return t.listeners.add(i),()=>{t.listeners.delete(i)}}};return Object.defineProperty(n,Gm,{enumerable:!1,configurable:!1,writable:!1,value:t}),e?Object.assign(n,{set(i){e(i)}}):n}function Vm(t){const e=t[Gm];if(!e)throw new Error("ParamRef is not bound to this graph runtime. Expected runtime-created ref.");return e}function Jm(t){for(const e of t)e()}class N8{#e=1;#t=1;#n=0;#i=!1;#r=!1;#o=new Set;#s=new Set;#c=new gr;#a=new gr;#l=new Set;#u;constructor(e={}){this.#u=F8(e.lifecycleRegistry)}createWritable(e,n,i,r,s={}){const o="n"+this.#e++,a=s.notify??!0,l={id:o,name:n,kind:i,value:r,rank:0,disposed:!1,listeners:new Set,subscribe(u){return l.listeners.add(u),()=>{l.listeners.delete(u)}}},c=u=>{if(l.disposed)throw new Error('Cannot set disposed parameter "'+n+'" ('+o+").");u!==l.value&&(l.value=u,a&&(Jm(l.listeners),this.#h()))};return this.#u(e,()=>{l.disposed=!0,l.listeners.clear()}),Ym(l,c)}computed(e,n,i,r){const o=i.map(Vm).reduce((h,A)=>Math.max(h,A.rank),0),l={id:"n"+this.#e++,name:n,kind:"derived",rank:o+1,value:r(),disposed:!1,listeners:new Set,fn:r,subscribe(h){return l.listeners.add(h),()=>{l.listeners.delete(h)}}},c=()=>{l.disposed||this.#f(l)},u=i.map(h=>h.subscribe(c)),f=()=>{l.disposed||(l.disposed=!0,u.forEach(h=>h()),l.listeners.clear(),this.#o.delete(l))};return this.#u(e,f),Ym(l)}effect(e,n,i){const s=n.map(Vm).reduce((f,h)=>Math.max(f,h.rank),0),a={id:"n"+this.#e++,rank:s+1,disposed:!1,fn:i},l=()=>{a.disposed||this.#A(a)},c=n.map(f=>f.subscribe(l)),u=()=>{a.disposed||(a.disposed=!0,c.forEach(f=>f()),this.#s.delete(a))};return this.#u(e,u),u}runInTransaction(e){this.#n+=1;try{return e()}finally{this.#n-=1,this.#n===0&&this.#h()}}flushNow(){if(!(this.#n>0||this.#r)){this.#i=!1,this.#r=!0;try{let e=!0;for(;e;){for(e=!1;this.#c.length>0;){e=!0;const n=this.#c.pop();if(this.#o.delete(n),n.disposed)continue;const i=n.value,r=n.fn();r!==i&&(n.value=r,Jm(n.listeners))}for(;this.#a.length>0;){e=!0;const n=this.#a.pop();this.#s.delete(n),!n.disposed&&n.fn()}}}finally{this.#r=!1,this.#p()}}}whenPropagated(e={}){if(this.#d())return Promise.resolve();const{signal:n,timeoutMs:i}=e;return n?.aborted?Promise.reject(new Error("whenPropagated aborted")):new Promise((r,s)=>{const o={resolve:r,reject:s};n&&(o.abortHandler=()=>{this.#l.delete(o),s(new Error("whenPropagated aborted"))},n.addEventListener("abort",o.abortHandler,{once:!0})),i!=null&&(o.timeoutId=setTimeout(()=>{this.#l.delete(o),o.abortHandler&&n?.removeEventListener("abort",o.abortHandler),s(new Error("whenPropagated timeout after "+i+" ms"))},i)),this.#l.add(o)})}#f(e){this.#o.has(e)||(this.#o.add(e),this.#c.push(e,this.#g(e.rank)),this.#h())}#A(e){this.#s.has(e)||(this.#s.add(e),this.#a.push(e,this.#g(e.rank)),this.#h())}#g(e){const n=this.#t%Hm;return this.#t+=1,e*Hm+n}#h(){this.#n>0||this.#i||this.#r||(this.#i=!0,queueMicrotask(()=>{this.flushNow()}))}#d(){return this.#n===0&&!this.#i&&!this.#r&&this.#c.length===0&&this.#a.length===0&&this.#o.size===0&&this.#s.size===0}#p(){if(this.#d()){for(const e of this.#l)e.timeoutId&&clearTimeout(e.timeoutId),e.resolve();this.#l.clear()}}}class M8{#e=1;#t=new Map;createOwner(e,n){const i=e+":"+n+":"+this.#e++;return this.#t.set(i,new Set),i}addDisposer(e,n){const i=this.#t.get(e);if(!i)throw new Error("Unknown owner: "+e);i.add(n)}disposeOwner(e){const n=this.#t.get(e);if(n){for(const i of n)i();n.clear(),this.#t.delete(e)}}}class T8{#e=1;#t=new Map;createRootScope(e){const n="scope:"+this.#e++;return this.#t.set(n,{params:new Map,ownerId:e}),n}createChildScope(e,n){if(!this.#t.has(n))throw new Error("Unknown parent scope: "+n);const i="scope:"+this.#e++;return this.#t.set(i,{parentScope:n,params:new Map,ownerId:e}),i}getOwnerId(e){const n=this.#t.get(e);if(!n)throw new Error("Unknown scope: "+e);return n.ownerId}clearScope(e){const n=this.#t.get(e);if(!n)throw new Error("Unknown scope: "+e);n.params.clear()}register(e,n,i){Pt(n);const r=this.#t.get(e);if(!r)throw new Error("Unknown scope: "+e);if(r.params.has(n))throw new Error('Parameter "'+n+'" already exists in scope '+e);return r.params.set(n,i),i}resolve(e,n){Pt(n);let i=e;for(;i;){const r=this.#t.get(i);if(!r)throw new Error("Unknown scope: "+i);const s=r.params.get(n);if(s)return s;i=r.parentScope}}}const P8="RawCode",L8="Literal",O8="Property",U8="Identifier",_8="ArrayExpression",z8="BinaryExpression",G8="CallExpression",H8="ConditionalExpression",Y8="LogicalExpression",V8="MemberExpression",J8="ObjectExpression",q8="UnaryExpression";function kt(t){this.type=t}kt.prototype.visit=function(t){let e,n,i;if(t(this))return 1;for(e=K8(this),n=0,i=e.length;n<i;++n)if(e[n].visit(t))return 1};function K8(t){switch(t.type){case _8:return t.elements;case z8:case Y8:return[t.left,t.right];case G8:return[t.callee].concat(t.arguments);case H8:return[t.test,t.consequent,t.alternate];case V8:return[t.object,t.property];case J8:return t.properties;case O8:return[t.key,t.value];case q8:return[t.argument];case U8:case L8:case P8:default:return[]}}var Yt,z,R,We,se,ic=1,$s=2,Ei=3,Hn=4,rc=5,Ii=6,lt=7,eo=8,j8=9;Yt={},Yt[ic]="Boolean",Yt[$s]="<end>",Yt[Ei]="Identifier",Yt[Hn]="Keyword",Yt[rc]="Null",Yt[Ii]="Numeric",Yt[lt]="Punctuator",Yt[eo]="String",Yt[j8]="RegularExpression";var W8="ArrayExpression",X8="BinaryExpression",Z8="CallExpression",$8="ConditionalExpression",qm="Identifier",eR="Literal",tR="LogicalExpression",nR="MemberExpression",iR="ObjectExpression",rR="Property",sR="UnaryExpression",Oe="Unexpected token %0",oR="Unexpected number",aR="Unexpected string",cR="Unexpected identifier",lR="Unexpected reserved word",uR="Unexpected end of input",Nf="Invalid regular expression",Mf="Invalid regular expression: missing /",Km="Octal literals are not allowed in strict mode.",fR="Duplicate data property in object literal not allowed in strict mode",Ve="ILLEGAL",to="Disabled.",hR=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0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\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]"),AR=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7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310\\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 sc(t,e){if(!t)throw new Error("ASSERT: "+e)}function un(t){return t>=48&&t<=57}function Tf(t){return"0123456789abcdefABCDEF".includes(t)}function no(t){return"01234567".includes(t)}function dR(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 io(t){return t===10||t===13||t===8232||t===8233}function ro(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t===92||t>=128&&hR.test(String.fromCharCode(t))}function oc(t){return t===36||t===95||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===92||t>=128&&AR.test(String.fromCharCode(t))}const gR={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 jm(){for(;R<We;){const t=z.charCodeAt(R);if(dR(t)||io(t))++R;else break}}function Pf(t){var e,n,i,r=0;for(n=t==="u"?4:2,e=0;e<n;++e)R<We&&Tf(z[R])?(i=z[R++],r=r*16+"0123456789abcdef".indexOf(i.toLowerCase())):ie({},Oe,Ve);return String.fromCharCode(r)}function pR(){var t,e,n,i;for(t=z[R],e=0,t==="}"&&ie({},Oe,Ve);R<We&&(t=z[R++],!!Tf(t));)e=e*16+"0123456789abcdef".indexOf(t.toLowerCase());return(e>1114111||t!=="}")&&ie({},Oe,Ve),e<=65535?String.fromCharCode(e):(n=(e-65536>>10)+55296,i=(e-65536&1023)+56320,String.fromCharCode(n,i))}function Wm(){var t,e;for(t=z.charCodeAt(R++),e=String.fromCharCode(t),t===92&&(z.charCodeAt(R)!==117&&ie({},Oe,Ve),++R,t=Pf("u"),(!t||t==="\\"||!ro(t.charCodeAt(0)))&&ie({},Oe,Ve),e=t);R<We&&(t=z.charCodeAt(R),!!oc(t));)++R,e+=String.fromCharCode(t),t===92&&(e=e.substr(0,e.length-1),z.charCodeAt(R)!==117&&ie({},Oe,Ve),++R,t=Pf("u"),(!t||t==="\\"||!oc(t.charCodeAt(0)))&&ie({},Oe,Ve),e+=t);return e}function mR(){var t,e;for(t=R++;R<We;){if(e=z.charCodeAt(R),e===92)return R=t,Wm();if(oc(e))++R;else break}return z.slice(t,R)}function wR(){var t,e,n;return t=R,e=z.charCodeAt(R)===92?Wm():mR(),e.length===1?n=Ei:gR.hasOwnProperty(e)?n=Hn:e==="null"?n=rc:e==="true"||e==="false"?n=ic:n=Ei,{type:n,value:e,start:t,end:R}}function Lf(){var t=R,e=z.charCodeAt(R),n,i=z[R],r,s,o;switch(e){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++R,{type:lt,value:String.fromCharCode(e),start:t,end:R};default:if(n=z.charCodeAt(R+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 R+=2,{type:lt,value:String.fromCharCode(e)+String.fromCharCode(n),start:t,end:R};case 33:case 61:return R+=2,z.charCodeAt(R)===61&&++R,{type:lt,value:z.slice(t,R),start:t,end:R}}}if(o=z.substr(R,4),o===">>>=")return R+=4,{type:lt,value:o,start:t,end:R};if(s=o.substr(0,3),s===">>>"||s==="<<="||s===">>=")return R+=3,{type:lt,value:s,start:t,end:R};if(r=s.substr(0,2),i===r[1]&&"+-<>&|".includes(i)||r==="=>")return R+=2,{type:lt,value:r,start:t,end:R};if(r==="//"&&ie({},Oe,Ve),"<>=!+-*%&|^/".includes(i))return++R,{type:lt,value:i,start:t,end:R};ie({},Oe,Ve)}function yR(t){let e="";for(;R<We&&Tf(z[R]);)e+=z[R++];return e.length===0&&ie({},Oe,Ve),ro(z.charCodeAt(R))&&ie({},Oe,Ve),{type:Ii,value:parseInt("0x"+e,16),start:t,end:R}}function CR(t){let e="0"+z[R++];for(;R<We&&no(z[R]);)e+=z[R++];return(ro(z.charCodeAt(R))||un(z.charCodeAt(R)))&&ie({},Oe,Ve),{type:Ii,value:parseInt(e,8),octal:!0,start:t,end:R}}function Xm(){var t,e,n;if(n=z[R],sc(un(n.charCodeAt(0))||n===".","Numeric literal must start with a decimal digit or a decimal point"),e=R,t="",n!=="."){if(t=z[R++],n=z[R],t==="0"){if(n==="x"||n==="X")return++R,yR(e);if(no(n))return CR(e);n&&un(n.charCodeAt(0))&&ie({},Oe,Ve)}for(;un(z.charCodeAt(R));)t+=z[R++];n=z[R]}if(n==="."){for(t+=z[R++];un(z.charCodeAt(R));)t+=z[R++];n=z[R]}if(n==="e"||n==="E")if(t+=z[R++],n=z[R],(n==="+"||n==="-")&&(t+=z[R++]),un(z.charCodeAt(R)))for(;un(z.charCodeAt(R));)t+=z[R++];else ie({},Oe,Ve);return ro(z.charCodeAt(R))&&ie({},Oe,Ve),{type:Ii,value:parseFloat(t),start:e,end:R}}function bR(){var t="",e,n,i,r,s=!1;for(e=z[R],sc(e==="'"||e==='"',"String literal must starts with a quote"),n=R,++R;R<We;)if(i=z[R++],i===e){e="";break}else if(i==="\\")if(i=z[R++],!i||!io(i.charCodeAt(0)))switch(i){case"u":case"x":z[R]==="{"?(++R,t+=pR()):t+=Pf(i);break;case"n":t+=`
|
|
609
|
+
`;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:no(i)?(r="01234567".indexOf(i),r!==0&&(s=!0),R<We&&no(z[R])&&(s=!0,r=r*8+"01234567".indexOf(z[R++]),"0123".includes(i)&&R<We&&no(z[R])&&(r=r*8+"01234567".indexOf(z[R++]))),t+=String.fromCharCode(r)):t+=i;break}else i==="\r"&&z[R]===`
|
|
610
|
+
`&&++R;else{if(io(i.charCodeAt(0)))break;t+=i}return e!==""&&ie({},Oe,Ve),{type:eo,value:t,octal:s,start:n,end:R}}function ER(t,e){let n=t;e.includes("u")&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(i,r)=>{if(parseInt(r,16)<=1114111)return"x";ie({},Nf)}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch{ie({},Nf)}try{return new RegExp(t,e)}catch{return null}}function IR(){var t,e,n,i,r;for(t=z[R],sc(t==="/","Regular expression literal must start with a slash"),e=z[R++],n=!1,i=!1;R<We;)if(t=z[R++],e+=t,t==="\\")t=z[R++],io(t.charCodeAt(0))&&ie({},Mf),e+=t;else if(io(t.charCodeAt(0)))ie({},Mf);else if(n)t==="]"&&(n=!1);else if(t==="/"){i=!0;break}else t==="["&&(n=!0);return i||ie({},Mf),r=e.substr(1,e.length-2),{value:r,literal:e}}function xR(){var t,e,n;for(e="",n="";R<We&&(t=z[R],!!oc(t.charCodeAt(0)));)++R,t==="\\"&&R<We?ie({},Oe,Ve):(n+=t,e+=t);return n.search(/[^gimuy]/g)>=0&&ie({},Nf,n),{value:n,literal:e}}function vR(){var t,e,n,i;return se=null,jm(),t=R,e=IR(),n=xR(),i=ER(e.value,n.value),{literal:e.literal+n.literal,value:i,regex:{pattern:e.value,flags:n.value},start:t,end:R}}function BR(t){return t.type===Ei||t.type===Hn||t.type===ic||t.type===rc}function Zm(){if(jm(),R>=We)return{type:$s,start:R,end:R};const t=z.charCodeAt(R);return ro(t)?wR():t===40||t===41||t===59?Lf():t===39||t===34?bR():t===46?un(z.charCodeAt(R+1))?Xm():Lf():un(t)?Xm():Lf()}function ut(){const t=se;return R=t.end,se=Zm(),R=t.end,t}function $m(){const t=R;se=Zm(),R=t}function SR(t){const e=new kt(W8);return e.elements=t,e}function ew(t,e,n){const i=new kt(t==="||"||t==="&&"?tR:X8);return i.operator=t,i.left=e,i.right=n,i}function DR(t,e){const n=new kt(Z8);return n.callee=t,n.arguments=e,n}function QR(t,e,n){const i=new kt($8);return i.test=t,i.consequent=e,i.alternate=n,i}function Of(t){const e=new kt(qm);return e.name=t,e}function so(t){const e=new kt(eR);return e.value=t.value,e.raw=z.slice(t.start,t.end),t.regex&&(e.raw==="//"&&(e.raw="/(?:)/"),e.regex=t.regex),e}function tw(t,e,n){const i=new kt(nR);return i.computed=t==="[",i.object=e,i.property=n,i.computed||(n.member=!0),i}function kR(t){const e=new kt(iR);return e.properties=t,e}function nw(t,e,n){const i=new kt(rR);return i.key=e,i.value=n,i.kind=t,i}function RR(t,e){const n=new kt(sR);return n.operator=t,n.argument=e,n.prefix=!0,n}function ie(t,e){var n,i=Array.prototype.slice.call(arguments,2),r=e.replace(/%(\d)/g,(s,o)=>(sc(o<i.length,"Message reference must be in range"),i[o]));throw n=new Error(r),n.index=R,n.description=r,n}function ac(t){t.type===$s&&ie(t,uR),t.type===Ii&&ie(t,oR),t.type===eo&&ie(t,aR),t.type===Ei&&ie(t,cR),t.type===Hn&&ie(t,lR),ie(t,Oe,t.value)}function Xe(t){const e=ut();(e.type!==lt||e.value!==t)&&ac(e)}function Ae(t){return se.type===lt&&se.value===t}function Uf(t){return se.type===Hn&&se.value===t}function FR(){const t=[];for(R=se.start,Xe("[");!Ae("]");)Ae(",")?(ut(),t.push(null)):(t.push(xi()),Ae("]")||Xe(","));return ut(),SR(t)}function iw(){R=se.start;const t=ut();return t.type===eo||t.type===Ii?(t.octal&&ie(t,Km),so(t)):Of(t.value)}function NR(){var t,e,n,i;if(R=se.start,t=se,t.type===Ei)return n=iw(),Xe(":"),i=xi(),nw("init",n,i);if(t.type===$s||t.type===lt)ac(t);else return e=iw(),Xe(":"),i=xi(),nw("init",e,i)}function MR(){var t=[],e,n,i,r={},s=String;for(R=se.start,Xe("{");!Ae("}");)e=NR(),e.key.type===qm?n=e.key.name:n=s(e.key.value),i="$"+n,Object.prototype.hasOwnProperty.call(r,i)?ie({},fR):r[i]=!0,t.push(e),Ae("}")||Xe(",");return Xe("}"),kR(t)}function TR(){Xe("(");const t=_f();return Xe(")"),t}const PR={if:1};function LR(){var t,e,n;if(Ae("("))return TR();if(Ae("["))return FR();if(Ae("{"))return MR();if(t=se.type,R=se.start,t===Ei||PR[se.value])n=Of(ut().value);else if(t===eo||t===Ii)se.octal&&ie(se,Km),n=so(ut());else{if(t===Hn)throw new Error(to);t===ic?(e=ut(),e.value=e.value==="true",n=so(e)):t===rc?(e=ut(),e.value=null,n=so(e)):Ae("/")||Ae("/=")?(n=so(vR()),$m()):ac(ut())}return n}function OR(){const t=[];if(Xe("("),!Ae(")"))for(;R<We&&(t.push(xi()),!Ae(")"));)Xe(",");return Xe(")"),t}function UR(){R=se.start;const t=ut();return BR(t)||ac(t),Of(t.value)}function _R(){return Xe("."),UR()}function zR(){Xe("[");const t=_f();return Xe("]"),t}function GR(){var t,e,n;for(t=LR();;)if(Ae("."))n=_R(),t=tw(".",t,n);else if(Ae("("))e=OR(),t=DR(t,e);else if(Ae("["))n=zR(),t=tw("[",t,n);else break;return t}function rw(){const t=GR();if(se.type===lt&&(Ae("++")||Ae("--")))throw new Error(to);return t}function cc(){var t,e;if(se.type!==lt&&se.type!==Hn)e=rw();else{if(Ae("++")||Ae("--"))throw new Error(to);if(Ae("+")||Ae("-")||Ae("~")||Ae("!"))t=ut(),e=cc(),e=RR(t.value,e);else{if(Uf("delete")||Uf("void")||Uf("typeof"))throw new Error(to);e=rw()}}return e}function sw(t){let e=0;if(t.type!==lt&&t.type!==Hn)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 HR(){var t,e,n,i,r,s,o,a,l,c;if(t=se,l=cc(),i=se,r=sw(i),r===0)return l;for(i.prec=r,ut(),e=[t,se],o=cc(),s=[l,i,o];(r=sw(se))>0;){for(;s.length>2&&r<=s[s.length-2].prec;)o=s.pop(),a=s.pop().value,l=s.pop(),e.pop(),n=ew(a,l,o),s.push(n);i=ut(),i.prec=r,s.push(i),e.push(se),n=cc(),s.push(n)}for(c=s.length-1,n=s[c],e.pop();c>1;)e.pop(),n=ew(s[c-1].value,s[c-2],n),c-=2;return n}function xi(){var t,e,n;return t=HR(),Ae("?")&&(ut(),e=xi(),Xe(":"),n=xi(),t=QR(t,e,n)),t}function _f(){const t=xi();if(Ae(","))throw new Error(to);return t}function ow(t){z=t,R=0,We=z.length,se=null,$m();const e=_f();if(se.type!==$s)throw new Error("Unexpect token after expression.");return e}var YR={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 aw(t){function e(o,a,l,c){let u=t(a[0]);return l&&(u=l+"("+u+")",l.lastIndexOf("new ",0)===0&&(u="("+u+")")),u+"."+o+(c<0?"":c===0?"()":"("+a.slice(1).map(t).join(",")+")")}function n(o,a,l){return c=>e(o,c,a,l)}const i="new Date",r="String",s="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",hypot:"Math.hypot",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(o){o.length<3&&xe("Missing arguments to clamp function."),o.length>3&&xe("Too many arguments to clamp function.");const a=o.map(t);return"Math.max("+a[1]+", Math.min("+a[2]+","+a[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:i,date:n("getDate",i,0),day:n("getDay",i,0),year:n("getFullYear",i,0),month:n("getMonth",i,0),hours:n("getHours",i,0),minutes:n("getMinutes",i,0),seconds:n("getSeconds",i,0),milliseconds:n("getMilliseconds",i,0),time:n("getTime",i,0),timezoneoffset:n("getTimezoneOffset",i,0),utcdate:n("getUTCDate",i,0),utcday:n("getUTCDay",i,0),utcyear:n("getUTCFullYear",i,0),utcmonth:n("getUTCMonth",i,0),utchours:n("getUTCHours",i,0),utcminutes:n("getUTCMinutes",i,0),utcseconds:n("getUTCSeconds",i,0),utcmilliseconds:n("getUTCMilliseconds",i,0),length:n("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:n("toUpperCase",r,0),lower:n("toLowerCase",r,0),substring:n("substring",r),split:n("split",r),trim:n("trim",r,0),btoa:"btoa",atob:"atob",regexp:s,test:n("test",s),if:function(o){o.length<3&&xe("Missing arguments to if function."),o.length>3&&xe("Too many arguments to if function.");const a=o.map(t);return"("+a[0]+"?"+a[1]+":"+a[2]+")"}}}function VR(t){const e=t&&t.length-1;return e&&(t[0]==='"'&&t[e]==='"'||t[0]==="'"&&t[e]==="'")?t.slice(1,-1):t}function cw(t){t=t||{};const e=t.allowed?Po(t.allowed):{},n=t.forbidden?Po(t.forbidden):{},i=t.constants||YR,r=(t.functions||aw)(f),s=t.globalvar,o=t.fieldvar,a=dt(s)?s:d=>`${s}["${d}"]`;[...Object.getOwnPropertyNames(Object.prototype).filter(d=>typeof Object.prototype[d]=="function")];let l={},c={},u=0;function f(d){if(le(d))return d;const g=h[d.type];return g==null&&xe("Unsupported type: "+d.type),g(d)}const h={Literal:d=>d.raw,Identifier:d=>{const g=d.name;return u>0?g:Ui(n,g)?xe("Illegal identifier: "+g):Ui(i,g)?i[g]:Ui(e,g)?g:(l[g]=1,a(g))},MemberExpression:d=>{const g=!d.computed,m=f(d.object);g&&(u+=1);const p=f(d.property);return m===o&&(c[VR(p)]=1),g&&(u-=1),m+(g?"."+p:"["+p+"]")},CallExpression:d=>{d.callee.type!=="Identifier"&&xe("Illegal callee type: "+d.callee.type);const g=d.callee.name,m=d.arguments,p=Ui(r,g)&&r[g];return p||xe("Unrecognized function: "+g),dt(p)?p(m):p+"("+m.map(f).join(",")+")"},ArrayExpression:d=>"["+d.elements.map(f).join(",")+"]",BinaryExpression:d=>"("+f(d.left)+" "+d.operator+" "+f(d.right)+")",UnaryExpression:d=>"("+d.operator+f(d.argument)+")",ConditionalExpression:d=>"("+f(d.test)+"?"+f(d.consequent)+":"+f(d.alternate)+")",LogicalExpression:d=>"("+f(d.left)+d.operator+f(d.right)+")",ObjectExpression:d=>{for(const g of d.properties){const m=g.key.name;eI.has(m)&&xe("Illegal property: "+m)}return"{"+d.properties.map(f).join(",")+"}"},Property:d=>{u+=1;const g=f(d.key);return u-=1,g+":"+f(d.value)}};function A(d){const g={code:f(d),globals:Object.keys(l),fields:Object.keys(c)};return l={},c={},g}return A.functions=r,A.constants=i,A}function lw(t,e,n){return n=(n-t)/(e-t),n=Math.max(0,Math.min(1,n)),n*n*(3-2*n)}function JR(t,e,n){return sr((n-t)/(e-t),0,1)}const uw={clamp:sr,format(t,e){return He(e)(t)},mapHasKey(t,e){return t.has(e)},isArray:be,isBoolean:qr,isDefined(t){return t!==void 0},isNumber:qe,isObject:Ge,isRegExp:dI,isString:le,isValid(t){return t!=null&&t===t},lerp:RA,linearstep:JR,replace(t,e,n){return String(t).replace(e,n)},smoothstep:lw};function qR(t){const e=aw(t);for(const n in uw)e[n]=`this.${n}`;return e}const KR=cw({forbidden:[],allowed:["datum","undefined"],globalvar:"globalObject",fieldvar:"datum",functions:qR});function jR(t,e={}){try{const n=ow(t),i=KR(n),r=Function("datum","globalObject",`"use strict";
|
|
603
611
|
try {
|
|
604
612
|
return (${i.code});
|
|
605
613
|
} catch (e) {
|
|
606
614
|
throw new Error("Error evaluating expression: " + ${JSON.stringify(t)} + ", " + e.message, e);
|
|
607
|
-
}`).bind(
|
|
615
|
+
}`).bind(uw),s=(o=>r(o,e));return s.fields=i.fields,s.globals=i.globals,s.code=i.code,s}catch(n){throw new Error(`Invalid expression: ${t}, ${n.message}`)}}const WR=cw({forbidden:[],allowed:["event"],globalvar:"globalObject"});function lc(t){try{const e=ow(t),n=WR(e);return Function("event","globalObject",`"use strict";
|
|
608
616
|
try {
|
|
609
617
|
return !!(${n.code});
|
|
610
618
|
} catch (e) {
|
|
611
619
|
throw new Error("Error evaluating expression: " + ${JSON.stringify(t)} + ", " + e.message, e);
|
|
612
|
-
}`)}catch(e){throw new Error(`Invalid expression: ${t}, ${e.message}`)}}function AF(t,e={}){return fF(t,e)}function Zm(t,e){const n={},i=AF(t,n),r=new Map;for(const o of i.globals){if(r.has(o))continue;const a=e(o);if(!a)throw new Error('Unknown variable "'+o+'" in expression: '+t);r.set(o,a),Object.defineProperty(n,o,{enumerable:!0,get(){return a.get()}})}const s=new Set;return i.subscribe=o=>{const a=[];for(const f of r.values())a.push(f.subscribe(o));let l=!0;const c=()=>{l&&(l=!1,s.delete(c),a.forEach(f=>f()))};return s.add(c),c},i.invalidate=()=>{for(const o of s)o();s.clear()},i.identifier=()=>i.code+"|"+Array.from(r.values()).map(o=>o.id).join(","),{expression:i,dependencies:Array.from(r.values())}}class hF{#e=new jk;#t=new Kk({lifecycleRegistry:this.#e});#n=new Wk;createScope(e){const n=this.#e.createOwner("scope",e??"root");return e?this.#n.createChildScope(n,e):this.#n.createRootScope(n)}disposeScope(e){const n=this.#n.getOwnerId(e);this.#e.disposeOwner(n),this.#n.clearScope(e)}addScopeDisposer(e,n){const i=this.#n.getOwnerId(e);this.#e.addDisposer(i,n)}registerBase(e,n,i,r){const s=this.#n.getOwnerId(e),o=this.#t.createWritable(s,n,"base",i,r);return this.#n.register(e,n,o)}registerSelection(e,n,i,r){const s=this.#n.getOwnerId(e),o=this.#t.createWritable(s,n,"selection",i,r);return this.#n.register(e,n,o)}registerDerived(e,n,i){const{expression:r,dependencies:s}=Zm(i,l=>this.resolve(e,l)),o=this.#n.getOwnerId(e),a=this.#t.computed(o,n,s,()=>r(null));return this.#n.register(e,n,a)}createExpression(e,n){const{expression:i}=Zm(n,r=>this.resolve(e,r));return i}resolve(e,n){return this.#n.resolve(e,n)}runInTransaction(e){return this.#t.runInTransaction(e)}flushNow(){this.#t.flushNow()}whenPropagated(e){return this.#t.whenPropagated(e)}}class dF{#e;#t;#n=new Map;#i=new Map;#s=new Map;#o;#r=!1;constructor(e){this.#o=e??(()=>{});const n=this.#o();n?(this.#e=n.#e,this.#t=this.#e.createScope(n.#t)):(this.#e=new hF,this.#t=this.#e.createScope())}registerParam(e){const n=e.name;if(Tt(n),this.#s.has(n))throw new Error('Parameter "'+n+'" already registered in this scope.');if("value"in e&&"expr"in e)throw new Error(`The parameter "${n}" must not have both value and expr properties!`);let i,r;if(e.push=="outer"){const s=this.findRuntimeForParam(n);if(!s)throw new Error(`Parameter "${n}" not found in outer scope!`);const o=s.paramConfigs.get(n);if(!o)throw new Error(`Outer parameter "${n}" exists as a value but has no registered config.`);if("expr"in o||"select"in o)throw new Error(`The outer parameter "${n}" must not have expr or select properties!`);i=a=>{s.setValue(n,a)},this.#n.set(n,i)}else if("value"in e)r=Hl(e,this),i=this.#a(n,r);else if("expr"in e){const s=this.#e.registerDerived(this.#t,n,e.expr);this.#i.set(n,s),i=()=>{throw new Error('Cannot set derived parameter "'+n+'".')}}else r=Hl(e,this),i=this.#a(n,r);if("select"in e){if(r??=Hl(e,this),!this.#n.has(n)){const s=this.#e.registerSelection(this.#t,n,r);this.#i.set(n,s),this.#n.set(n,o=>{s.set(o),this.#e.flushNow()}),i=this.#n.get(n)}i(r)}return this.#s.set(n,e),i}allocateSetter(e,n,i=!1){if(Tt(e),this.#n.has(e))throw new Error("Setter already allocated for parameter: "+e);const r=this.#e.registerBase(this.#t,e,n,{notify:!i});this.#i.set(e,r);const s=o=>{r.set(o),this.#e.flushNow()};return this.#n.set(e,s),s}setValue(e,n){Tt(e);const i=this.#n.get(e);if(!i)throw new Error("Writable parameter not found in this scope: "+e);i(n)}getValue(e){return this.#i.get(e)?.get()}subscribe(e,n){Tt(e);const i=this.findRuntimeForParam(e);if(!i)throw new Error("Parameter not found: "+e);const r=i.#i.get(e);if(!r)throw new Error("Parameter found without local reference: "+e);return r.subscribe(n)}findValue(e){return this.findRuntimeForParam(e)?.getValue(e)}get paramConfigs(){return this.#s}findRuntimeForParam(e){return this.#i.has(e)?this:this.#o()?.findRuntimeForParam(e)}createExpression(e){return this.#e.createExpression(this.#t,e)}watchExpression(e,n,i={}){const r=this.createExpression(e),s=r.subscribe(n);return(i.scopeOwned??!0)&&this.#e.addScopeDisposer(this.#t,s),i.registerDisposer?.(s),r}#a(e,n){const i=this.#e.registerBase(this.#t,e,n);this.#i.set(e,i);const r=s=>{i.set(s),this.#e.flushNow()};return this.#n.set(e,r),r}evaluateAndGet(e){return this.createExpression(e)()}runInTransaction(e){return this.#e.runInTransaction(e)}flushNow(){this.#e.flushNow()}whenPropagated(e){return this.#e.whenPropagated(e)}dispose(){this.#r||(this.#r=!0,this.#e.disposeScope(this.#t),this.#n.clear(),this.#i.clear(),this.#s.clear())}hasPointSelections(){for(const e of this.#s.values())if(zl(e)){const n=e.select;if(le(n)){if(n=="point")return!0}else if(n.type=="point")return!0}return!1}}function eo(t,e){return!e||/^(data:|([A-Za-z]+:)?\/\/)/.test(t)||t.startsWith("/")?t:(e.endsWith("/")||(e+="/"),e+t)}function gF(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 On="VISIT_SKIP",Ar="VISIT_STOP",$m=t=>t;class e1{spec;#e;#t={};#n={};#i={};#s;#o;#r=!1;opacityFunction=$m;#a=[];#c="none";facetCoords=new Wt([],JSON.stringify);constructor(e,n,i,r,s,o={}){if(!e)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=i,this.dataParent=r,this.#e=s,this.spec=e,this.resolutions={scale:{},axis:{}},$p(this),this.options={blockEncodingInheritance:!1,...o},this.flowHandle=void 0,this.needsAxes={x:!1,y:!1},this.paramRuntime=new dF(()=>this.dataParent?.paramRuntime),e.params)for(const a of e.params)this.paramRuntime.registerParam(a);if(!this.layoutParent?.options.layeredChildren){const a=l=>this.paramRuntime.findRuntimeForParam(l)?void 0:this.paramRuntime.allocateSetter(l,0);this.#o=a("height"),this.#s=a("width")}}get name(){return this.spec.name??this.#e}get explicitName(){return this.spec.name}get defaultName(){return this.#e}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>qe.createFromConfig(this.spec.padding))}getOverhang(){return qe.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Pn(this.#l("width"),this.#l("height")):vm)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return vm;const e=this.getSize();return new Pn(this.#l("viewportWidth")??e.width,this.#l("viewportHeight")??e.height)}#l(e){let n=this.spec[e];const i=Fu(n),r=e=="viewportWidth"||e=="viewportHeight";if(i){if(r)throw new He(`Cannot use step-based size with "${e}"!`,this);const s=n.step,o=this.getScaleResolution(e=="width"?"x":"y")?.getScale();if(o){let a=0;if(on(o.type))a=o.domain().length;else if(["locus","index"].includes(o.type)){const c=o.domain();a=ta(c)-c[0]}else throw new He(`Cannot use step-based size with "${o.type}" scale!`,this);const l=o;return a=$f(a,l.paddingInner(),l.paddingOuter()),{px:a*s,grow:0}}else throw new He(`Cannot use step-based size with "${e}"!`,this)}else return(n&&Sm(n))??(r?void 0:{px:0,grow:1})}registerStepSizeInvalidation(){this.#f("width","x"),this.#f("height","y")}#f(e,n){const i=this.spec[e];if(!Fu(i))return;const r=this.getScaleResolution(n);if(!r)throw new He("Cannot use 'step' size without a scale!",this);const s=()=>this.invalidateSizeCache();r.addEventListener("domain",s),this.registerDisposer(()=>r.removeEventListener("domain",s))}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(e=>e.isConfiguredVisible())}isDomainInert(){if(this.spec.domainInert)return!0;const e=this.dataParent;return e?e.isDomainInert():!1}getDataInitializationState(){return this.#c}_setDataInitializationState(e){this.#c=e}isDataInitialized(){return this.#c==="ready"}getEffectiveOpacity(){return this.opacityFunction(this.layoutParent?.getEffectiveOpacity()??1)}getPathString(){return this.getLayoutAncestors().map(e=>e.name).reverse().join("/")}#u(e){const n=[];let i=this;do n.push(i),i=i[e];while(i);return n}getLayoutAncestors(){return this.#u("layoutParent")}getDataAncestors(){return this.#u("dataParent")}handleBroadcast(e){for(const n of this.#t[e.type]||[])n(e)}_addBroadcastHandler(e,n){let i=this.#t[e];return i||(i=[],this.#t[e]=i),i.push(n),()=>{const r=this.#t[e];if(!r)return;const s=r.indexOf(n);s>=0&&r.splice(s,1)}}handleInteractionEvent(e,n,i){const r=i?this.#n:this.#i;for(const s of r[n.type]||[])s(e,n)}addInteractionEventListener(e,n,i){const r=i?this.#n:this.#i;let s=r[e];s||(s=[],r[e]=s),s.push(n)}removeInteractionEventListener(e,n,i){let s=(i?this.#n:this.#i)?.[e];if(s){const o=s.indexOf(n);o>=0&&s.splice(o,1)}}visit(e){try{const n=e(this);if(e.postOrder&&e.postOrder(this),n!==Ar)return n}catch(n){throw n.view=this,n}}getDescendants(){const e=[];return this.visit(n=>{e.push(n)}),e}dispose(){for(const n of this.#a)n();this.#a.length=0;const e=this.flowHandle;e?.collector&&(this.context.dataFlow.pruneCollectorBranch(e.collector),this.context.dataFlow.removeCollector(e.collector)),e?.dataSource&&e.dataSource.view===this&&!e.dataSource.identifier&&this.context.dataFlow.removeDataSource(e.dataSource),this.paramRuntime.dispose(),this.context.dataFlow.loadingStatusRegistry.delete(this),this.flowHandle=void 0}registerDisposer(e){this.#a.push(e)}disposeSubtree(){const e=()=>{};e.postOrder=n=>{n.dispose()},this.visit(e)}configureViewOpacity(){(!this.opacityFunction||this.opacityFunction===$m)&&(this.opacityFunction=mF(this))}onBeforeRender(){this.#r||(this.#r=!0)}hasRendered(){return this.#r}render(e,n,i={}){i.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(i.facetId,i.clipRect?n.intersect(i.clipRect):n),this.#s?.(n.width),this.#o?.(n.height)}getEncoding(){const e=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},i={...e,...n};for(const[r,s]of Object.entries(i))s===null&&delete i[r];return i}getFacetAccessor(e){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(e){const n=this.getEncoding().sample;return tn(n)?[n.field]:this.layoutParent?.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(e){const n=In(e);return this.getDataAncestors().map(i=>i.resolutions.scale[n]).find(i=>i)}getAxisResolution(e){const n=In(e);return this.getDataAncestors().map(i=>i.resolutions.axis[n]).find(i=>i)}getConfiguredResolution(e,n){return this.spec.resolve?.[n]?.[e]}getConfiguredOrDefaultResolution(e,n){return this.getConfiguredResolution(e,n)??this.getConfiguredResolution("default",n)??this.getDefaultResolution(e,n)}getDefaultResolution(e,n){return"independent"}getBaseUrl(){return pi(()=>this.dataParent?.getBaseUrl(),gF(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const e=this.spec.title;if(e)return le(e)?e:Ee(e.text)?this.paramRuntime.evaluateAndGet(e.text.expr):e.text}_cache(e,n){return Ka(this,e,n)}_invalidateCacheByPrefix(e,n="self"){switch(n){case"self":_s(this,e);break;case"ancestors":for(const i of this.getLayoutAncestors())_s(i,e);break;case"progeny":this.visit(i=>_s(i,e));break}}invalidateSizeCache(){_s(this,"size"),this._invalidateCacheByPrefix("size","ancestors")}propagateInteractionEvent(e){}}function pF(t){return"unitsPerPixel"in t}function mF(t){const e="opacity"in t.spec?t.spec.opacity:void 0;if(e!==void 0){if(Ve(e))return n=>n*e;if(pF(e)){const n=c=>{const f=t.getScaleResolution(c),u=f?.getScale();if(["linear","index","locus"].includes(u?.type))return{scale:u,scaleResolution:f}},i=t1(e.values,"opacity.values",t);if(!Ce(e.unitsPerPixel))throw new He('"opacity.unitsPerPixel" must be an array.',t);let r=()=>1,s=[];const o=()=>{const c=t1(s.map(h=>h()),"opacity.unitsPerPixel",t),f=wF(c,i,t),u=Vf().domain(f.unitsPerPixel).range(f.values).clamp(!0);r=h=>u(h)};s=e.unitsPerPixel.map(c=>{if(Ee(c)){const f=t.paramRuntime.watchExpression(c.expr,()=>{o(),t.context.animator.requestRender()});return()=>f(null)}else return()=>c}),o();const a=c=>{const u=c.scaleResolution.getAxisLength()||1e3;return Hr(c.scale.domain())/u};let l;if(e.channel==="auto"){const c=n("x"),f=n("y");if(c&&f)l=()=>(a(c)+a(f))/2;else if(c)l=()=>a(c);else if(f)l=()=>a(f);else throw new He("Cannot find a resolved quantitative x or y scale for dynamic opacity!",t)}else{const c=e.channel?n(e.channel):n("x")??n("y");if(!c)throw new He("Cannot find a resolved quantitative scale for dynamic opacity!",t);l=()=>a(c)}return c=>r(l())*c}else if(Ee(e)){const n=t.paramRuntime.watchExpression(e.expr,()=>t.context.animator.requestRender());return i=>n(null)*i}}return n=>n}function wF(t,e,n){if(!t.length)throw new He('"opacity.unitsPerPixel" must contain at least one stop.',n);if(t.length!==e.length)throw new He('"opacity.unitsPerPixel" and "opacity.values" must have the same length.',n);t.forEach((o,a)=>{if(o<=0)throw new He("Invalid opacity.unitsPerPixel value at index "+a+". Stop values must be positive.",n)});const i=t.map((o,a)=>({stop:o,value:e[a]}));i.sort((o,a)=>a.stop-o.stop);const r=i.map(o=>o.stop),s=i.map(o=>o.value);for(let o=1;o<t.length;o++)if(r[o-1]<=r[o])throw new He('"opacity.unitsPerPixel" must be strictly decreasing.',n);return{unitsPerPixel:r,values:s}}function t1(t,e,n){if(!Ce(t))throw new He('"'+e+'" must evaluate to an array.',n);return t.map((i,r)=>{if(!Ve(i)||!Number.isFinite(i))throw new He("Invalid "+e+" value at index "+r+". Expected a finite number.",n);return i})}const Fu=t=>!!t?.step;function yF(t){return CF(t?.search,"search")}function CF(t,e){if(!t)return;const n=Array.isArray(t)?t:[t];if(n.length===0)throw new Error("The "+e+" channel array must not be empty.");const i=[];for(const r of n){if(!r||typeof r!="object"||!("field"in r))throw new Error("The "+e+" channel must be a field definition or an array of field definitions.");const s=r.field;if(typeof s!="string")throw new Error("The "+e+" channel field definition must include a string field name.");i.push(s)}return i}const EF={point:E4,rect:g4,rule:B4,link:R4,text:O4};class nt extends e1{#e;#t=!1;#n=null;constructor(e,n,i,r,s,o){super(e,n,i,r,s,o),this.spec=e;const a=EF[this.getMarkType()];if(a)this.mark=new a(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),this.#e=this.paramRuntime.allocateSetter("zoomLevel",1);for(const l of["x","y"]){const c=this.getScaleResolution(l);if(c){const f=()=>{this.#e(Math.sqrt(this.getZoomLevel()))};c.addEventListener("domain",f),this.registerDisposer(()=>c.removeEventListener("domain",f))}}this.needsAxes={x:!0,y:!0},this.#i()}#i(){for(const[e,n]of this.paramRuntime.paramConfigs){if(!("select"in n))continue;const i=sa(n.select),r=i.on,s=i.clear;if(oa(i)){let a=0;const l=h=>{this.paramRuntime.setValue(e,h)},c=()=>{const h=this.context.getCurrentHover();return h?.mark?.unitView===this?h.datum:null},f=r.filter?Xm(r.filter):()=>!0,u=(h,A)=>{if(!f(A.proxiedMouseEvent))return;const d=c(),g=d?d[gt]:0;let m;if(i.toggle)if(A.mouseEvent.shiftKey){if(d){const w=this.paramRuntime.getValue(e);m=Wx(w,{toggle:[d]})}}else m=_l(d?[d]:null);else g!=a&&(a=g,m=Ul(d));m!==void 0&&l(m)};if(this.addInteractionEventListener(["mouseover","pointerover"].includes(r.type)?"mousemove":r.type,u),s){const h=s.filter?Xm(s.filter):()=>!0,A=(d,g)=>{if(!h(g.proxiedMouseEvent))return;a=0;const m=i.toggle?_l():Ul(null);l(m)};this.addInteractionEventListener(s.type,A)}}}}render(e,n,i={}){super.render(e,n,i),this.isConfiguredVisible()&&(e.pushView(this,n),e.renderMark(this.mark,i),e.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}getEncoding(){const e=super.getEncoding(),n=this.mark.getSupportedChannels();for(const i of Object.keys(e))i!=="key"&&(n.includes(i)||delete e[i]);return e}resolve(e){if(!e){this.resolve("scale"),this.resolve("axis");return}const n=this.mark.encoding;for(const[i,r]of Object.entries(n)){if(!r||Array.isArray(r))continue;let s;if(pt(r))s=r;else if(Tl(r)){const l=r.condition;if(!Array.isArray(l)&&pt(l))s=l;else continue}else continue;const o=In(s.resolutionChannel??i);if(!ra(o)||e=="axis"&&!ps(o))continue;let a=this;for(;(a.getConfiguredOrDefaultResolution(o,e)=="forced"||a.dataParent&&["shared","excluded","forced"].includes(a.dataParent.getConfiguredOrDefaultResolution(o,e)))&&a.getConfiguredOrDefaultResolution(o,e)!="excluded";)a=a.dataParent;if(e=="axis"&&ps(i)&&Pl(o)){a.resolutions[e][o]||(a.resolutions[e][o]=new Yk(o));const l=a.resolutions[e][o],c=l.registerMember({view:this,channel:i,channelDef:s});this.registerDisposer(()=>{c()&&a.resolutions[e][o]===l&&delete a.resolutions[e][o]})}else if(e=="scale"&&ra(i)){if(!a.resolutions[e][o]){const u=new Hk(o);a.resolutions[e][o]=u;const h=A=>{this.context.glHelper?.createRangeTexture(A.scaleResolution,!0)};u.addEventListener("range",h),u.addEventListener("domain",h),this.registerDisposer(()=>{u.removeEventListener("range",h),u.removeEventListener("domain",h)})}const l=!this.isDomainInert(),c=a.resolutions[e][o],f=c.registerMember({view:this,channel:i,channelDef:s,contributesToDomain:l});this.registerDisposer(()=>{f()&&a.resolutions[e][o]===c&&(c.dispose(),delete a.resolutions[e][o])})}}}dispose(){super.dispose(),this.mark.dispose()}getDataAccessor(e){const n=this.mark.encoders;if(n)return n[e]?.dataAccessor}getSearchAccessors(){if(!this.#n){const e=yF(this.getEncoding())??[];this.#n=e.map(n=>$(n))}return this.#n}getFacetAccessor(e){const n=this.getDataAccessor("sample");return n||super.getFacetAccessor(this)}getCollector(){return this.flowHandle?.collector}registerDomainSubscriptions(){if(this.#t||this.isDomainInert())return;const e=this.getCollector();if(!e)return;const n=this.mark.encoders;if(!n)throw new Error("Encoders are not initialized!");this.#t=!0;const i=new Map;for(const r of Object.values(n)){if(!r)continue;const s=r.accessors??[];if(s.length!==0)for(const o of s){if(!Ld(o)||o.channelDef.domainInert)continue;const a=this.getScaleResolution(o.scaleChannel);if(!a)throw new Error("Missing scale resolution for channel: "+o.scaleChannel);let l=i.get(a);l||(l=new Set,i.set(a,l)),l.add(o)}}for(const[r,s]of i){if(s.size===0)continue;const o=r.registerCollectorSubscriptions(e,s);this.registerDisposer(o)}}getZoomLevel(){const e=n=>this.getScaleResolution(n)?.getZoomLevel()??1;return ii.map(e).reduce((n,i)=>n*i,1)}propagateInteractionEvent(e){this.handleInteractionEvent(void 0,e,!0),e.target=this,!e.stopped&&this.handleInteractionEvent(void 0,e,!1)}getDefaultResolution(e,n){return e=="x"?"shared":"independent"}}class Ru extends Error{constructor(e,n){super(n),this.kind=e}}async function n1(t,e={}){let n;try{n=await fetch(t,{signal:e.signal})}catch(i){throw new Ru("network",String(i))}if(!n.ok)throw new Ru("http",String(n.status)+" "+n.statusText);try{return await n.json()}catch(i){throw new Ru("json",String(i))}}function IF(t){const e=new Set;t.visit(n=>{for(const i of Object.values(n.resolutions.scale)){const r=i.name;if(r&&e.has(r))throw new Error(`The same scale name "${r}" occurs in multiple scale resolutions!`);e.add(r)}})}function bF(t){for(const e of ii){const n=t.getScaleResolution(e);n&&!n.name&&n.isZoomable()&&(n.name=`${e}_at_root`)}}function Nu(t,e=()=>!0){return Promise.allSettled(t).then(n=>{if(e())for(const i of n)"value"in i?i.value.finalizeGraphicsInitialization():"reason"in i&&console.error(i.reason)})}async function xF(t,e,n){const i=t.import;if(!("url"in i))throw new Error("Not an url import: "+JSON.stringify(i));const r=pi(e,i.url);let s;try{s=await n1(r)}catch(o){throw new Error(`Could not load imported view spec: ${r}. Reason: ${o.message}`)}if(n.isViewSpec(s))return s.baseUrl=pi(cm(i.url),s.baseUrl),s;throw new Error(`The imported spec "${r}" is not a view spec: ${JSON.stringify(t)}`)}function BF(t){const e=t.getSize(),n=t.getPadding(),i=(r,s)=>r.grow>0?void 0:r.px+s;return{width:i(e.width,n.horizontalTotal),height:i(e.height,n.verticalTotal)}}function*Mu(t,e=[]){for(const[n,i]of t.entries())if(i instanceof Map)for(const r of Mu(i,[...e,n]))yield r;else yield[[...e,n],i]}const i1=2147483647,vF=r1([i1]);function SF(t){for(let e=1;e<t.length;e++)if(t[e]<t[e-1])return!1;return!0}function r1(t){let e=0;for(let n=0,i=t.length;n<i;n++)t[n]>e&&(e=t[n]);return Math.floor(Math.log2(e)/4)+1}function QF(t){const e=r1(t);let n=Array.from({length:t.length},(s,o)=>o);if(SF(t))return n;let i=new Array(t.length);const r=new Array(16);for(let s=0;s<e;s++){r.fill(0);const o=s*4,a=Math.pow(16,s),l=c=>{const f=t[n[c]];return s>=vF?f>i1?Math.floor(f/a)%16:0:f>>o&15};for(let c=0;c<t.length;c++)r[l(c)]++;for(let c=1;c<16;c++)r[c]+=r[c-1];for(let c=t.length-1;c>=0;c--)i[--r[l(c)]]=n[c];[n,i]=[i,n]}return n}const sc="|",Tu="\\";class DF{#e=null;#t=null;#n=!1;invalidate(){this.#e=null,this.#t=null,this.#n=!1}findDatum(e,n,i){if(!e||e.length===0)return;const r=e.join(", ");if(e.length!==n.length)throw new Error(`Key tuple length ${n.length} does not match fields [${r}]`);(!this.#e||!this.#s(e))&&this.#i(e,i);const s=this.#t;let o;if(this.#n){let a="";for(let l=0;l<n.length;l++){l>0&&(a+=sc);const c=s[l],f=oc(n[l],c);a+=s1(f)}o=a}else{const a=s[0];o=oc(n[0],a)}return this.#e.get(o)}#i(e,n){const i=e.map(a=>$(a)),r=new Map,s=e.join(", "),o=e.length!==1;if(o)for(const a of n)for(let l=0,c=a.length;l<c;l++){const f=a[l];let u="";for(let A=0;A<i.length;A++){A>0&&(u+=sc);const d=e[A],g=oc(i[A](f),d);u+=s1(g)}if(r.get(u)!==void 0){const A=i.map(d=>d(f));throw new Error(`Duplicate key detected for fields [${s}]: ${JSON.stringify(A)}`)}r.set(u,f)}else{const a=i[0],l=e[0];for(const c of n)for(let f=0,u=c.length;f<u;f++){const h=c[f],A=oc(a(h),l);if(r.get(A)!==void 0)throw new Error(`Duplicate key detected for fields [${s}]: ${JSON.stringify(A)}`);r.set(A,h)}}this.#e=r,this.#t=[...e],this.#n=o}#s(e){if(!this.#t||this.#t.length!==e.length)return!1;for(let n=0;n<e.length;n++)if(this.#t[n]!==e[n])return!1;return!0}}function oc(t,e){if(t===void 0)throw new Error(`Key field "${e}" is undefined. Ensure all key fields are present in the data.`);if(t===null)throw new Error(`Key field "${e}" is null. Ensure all key fields are present in the data.`);if(typeof t!="string"&&typeof t!="number"&&typeof t!="boolean")throw new Error(`Key field "${e}" must be a scalar value (string, number, or boolean).`);return t}function kF(t){if(!(t.indexOf(Tu)!==-1||t.indexOf(sc)!==-1))return t;let n="";for(let i=0;i<t.length;i++){const r=t[i];(r===Tu||r===sc)&&(n+=Tu),n+=r}return n}function s1(t){return typeof t=="string"?kF(t):String(t)}class o1 extends Rl{#e=[];#t=$(gt);#n=[];#i=new DF;#s;#o;#r=new FF;get behavior(){return Fl}get label(){return"collect"}constructor(e){super(),this.params=e??{type:"collect"},this.observers=new Set,this.facetBatches=new Wt([],JSON.stringify),this.#o=NF(this.params?.sort),this.#a()}#a(){this.#e=[],this.#n=[],this.#i.invalidate(),this.facetBatches.clear(),this.facetBatches.set(void 0,this.#e)}reset(){super.reset(),this.#a()}handle(e){this.#e.push(e)}beginBatch(e){this.#i.invalidate(),Ox(e)&&(this.#e=[],this.facetBatches.set(Ne(e.facetId),this.#e))}complete(){if(this.#e=[],this.params.groupby?.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const e=this.facetBatches.get(void 0),n=this.params.groupby.map(r=>$(r)),i=n.length>1?Oo(e,...n):RF(e,n[0]);this.facetBatches.clear();for(const[r,s]of Mu(i))this.facetBatches.set(r,s)}if(this.#o)for(const e of this.facetBatches.values())e.sort(this.#o);this.#u(),this.#c(),super.complete(),this.#f();for(const e of this.observers)e(this)}observe(e){return this.observers.add(e),()=>{this.observers.delete(e)}}#c(){if(this.children.length)for(const[e,n]of this.facetBatches.entries()){if(e){const i={type:"facet",facetId:e};for(const r of this.children)r.beginBatch(i)}for(let i=0,r=n.length;i<r;i++)this._propagate(n[i])}}repropagate(){for(const e of this.children)e.reset();this.#c();for(const e of this.children)e.complete();this.#f()}getDomain(e,n,i){return this.#r.getDomain(e,()=>{const r=Xa(n);if(i.constant)r.extend(i({}));else if(this.completed)for(const s of this.facetBatches.values())for(let o=0,a=s.length;o<a;o++)r.extend(i(s[o]));return r})}subscribeDomainChanges(e,n){return this.#r.subscribe(e,n)}getData(){switch(this.#l(),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const e=this.facetBatches;return{[Symbol.iterator]:function*(){for(const i of e.values())yield*i}}}}}visitData(e){this.#l();for(const n of this.facetBatches.values())for(let i=0;i<n.length;i++)e(n[i])}getItemCount(){let e=0;for(const n of this.facetBatches.values())e+=n.length;return e}#l(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")}#f(){this.#r.hasCachedDomains()&&this.#r.clear(),this.#r.notify()}#u(){this.#s=[];const e=this.facetBatches.values().next().value?.[0];if(e==null||!(gt in e))return;let n=0;const i=[],r=this.#t;for(const[s,o]of this.facetBatches){this.#s.push({start:n,stop:n+o.length,facetId:s}),n+=o.length;for(let a=0,l=o.length;a<l;a++)i.push(r(o[a]))}this.#n=QF(i)}findDatumByUniqueId(e){if(!this.#n.length)return;const n=Zn(a=>a.start).right,i=this.#t,r=Zn(a=>i(s(a))).left,s=a=>{const l=n(this.#s,a),c=this.#s[l-1];return!c||a>=c.stop?void 0:this.facetBatches.get(c.facetId)[a-c.start]},o=r(this.#n,e);if(o>=0){const a=s(this.#n[o]);if(a&&i(a)===e)return a}}findDatumByKey(e,n){return this.#l(),this.#i.findDatum(e,n,this.facetBatches.values())}}class FF{#e=new Map;#t=new Map;hasCachedDomains(){return this.#e.size>0}clear(){this.#e.clear()}getDomain(e,n){const i=this.#e.get(e);if(i)return i;{const r=n();return this.#e.set(e,r),r}}subscribe(e,n){let i=this.#t.get(e);return i||(i=new Set,this.#t.set(e,i)),i.add(n),()=>{const r=this.#t.get(e);r&&(r.delete(n),r.size===0&&this.#t.delete(e))}}notify(){if(this.#t.size===0)return;const e=new Set;for(const n of this.#t.values())for(const i of n)e.add(i);for(const n of e)n()}}function RF(t,e){const n=new Map;for(let i=0,r=t.length;i<r;i++){const s=t[i],o=e(s);let a=n.get(o);a||(a=[],n.set(o,a)),a.push(s)}return n}function NF(t){if(t?.field){const e=Ne(t.field);if(e.length==1&&!e[0].includes(".")){const n=Ne(t.order)[0]??"ascending",i=JSON.stringify(e[0]);return new Function("a","b",`return a[${i}] ${n==="ascending"?"-":"+"} b[${i}];`)}return ph(t.field,t.order)}}class MF extends Qe{get behavior(){return Mt}constructor(e){super(e),this.params=e,this.startAccessor=$(e.start),this.endAccessor=$(e.end),this.chromAccessor=e.chrom?$(e.chrom):n=>{},this.weightAccessor=e.weight?$(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,i])=>i).map(([n,i])=>`${JSON.stringify(i)}: ${n}`).join(", ")+"};"),this.ends=new ur}reset(){super.reset(),this.initialize()}initialize(){const e=this.as.coverage,n=this.as.end,i=this.as.chrom,r=this.startAccessor,s=this.endAccessor,o=this.chromAccessor,a=this.weightAccessor;let l,c,f,u=0,h=NaN;const A=this.ends;A.clear();const d=p=>{this._propagate(p),l=null},g=(p,w,C)=>{if(p==w)return;let y=!1;l&&(l[e]===C?(l[n]=w,y=!0):l[e]!=0&&d(l)),y||(l=this.createSegment(p,w,C,f))},m=()=>{let p=0;for(;(p=A.peekValue())!==void 0;)g(h,p,u),h=p,u-=A.pop();h=NaN,l&&d(l)};this.handle=p=>{const w=r(p);let C=0;for(;(C=A.peekValue())!==void 0&&C<w;)g(h,C,u),h=C,u-=A.pop();if(i){let b=o(p);b!==c&&(m(),f=b,c=f)}isNaN(h)||g(h,w,u),h=w;const y=a(p);u+=y,A.push(y,s(p))},this.complete=()=>{m(),super.complete()},this.beginBatch=p=>{m(),c=null,super.beginBatch(p)}}}function TF(t,e,n=s=>+s,i=0,r=t.length){const s=new ur,o=r-i;let a;for(a=0;a<e&&a<o;a++)s.push(a,n(t[i+a]));for(;a<o;a++){const f=n(t[i+a]);f>=s.peekValue()&&(s.push(a,f),s.pop())}const l=[];let c;for(;(c=s.pop())!==void 0;)l.push(t[i+c]);return l.reverse()}class PF{constructor(e,n=-1/0,i=1/0){this.maxSize=e,this.lowerLimit=n,this.upperLimit=i;const r=this.maxSize*2+1;this.lowerLimits=new Float64Array(r),this.upperLimits=new Float64Array(r),this.lowerChildren=new Int32Array(r),this.upperChildren=new Int32Array(r),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,i=0){if(e>=this.lowerLimits[i]&&n<=this.upperLimits[i]){const r=this.lowerChildren[i];if(r){const s=this._findSlot(e,n,r);return s>=0?s:this._findSlot(e,n,this.upperChildren[i])}else return i}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 i=this._findSlot(e,n);if(i<0)return!1;const r=this.n++,s=this.n++;return this.lowerLimits[r]=this.lowerLimits[i],this.upperLimits[r]=e,this.lowerLimits[s]=n,this.upperLimits[s]=this.upperLimits[i],this.lowerChildren[i]=r,this.upperChildren[i]=s,!0}}class LF extends Qe{get behavior(){return Fl}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=$(this.params.pos),this.endPosAccessor=$(this.params.pos2??this.params.pos),this.startPosBisector=Zn(this.startPosAccessor),this.endPosBisector=Zn(this.endPosAccessor),this.scoreAccessor=$(this.params.score),this.widthAccessor=$(this.params.width),this.laneAccessor=this.params.lane?$(this.params.lane):o=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=n.getScaleResolution(this.channel);const i=()=>this._filterAndPropagate();this.schedule=()=>n.context.animator.requestTransition(i);const r=()=>this.schedule();this.resolution.addEventListener("domain",r),this.registerDisposer(()=>this.resolution.removeEventListener("domain",r));const s=n._addBroadcastHandler("layoutComputed",()=>this.schedule());this.registerDisposer(s)}complete(){const e=this.startPosAccessor;this._data.sort((n,i)=>e(n)-e(i));for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new PF(200));this.schedule(),super.complete()}_filterAndPropagate(){super.reset();const e=this.resolution.getScale(),n=this.resolution.getAxisLength();if(!n)return;for(const o of this.reservationMaps.values())o.reset();const i=e.domain(),s=TF(this._data,70,this.scoreAccessor,this.endPosBisector.left(this._data,i[0]),this.startPosBisector.right(this._data,i[1]));for(const o of s){let a=e(this.startPosAccessor(o))*n,l=e(this.endPosAccessor(o))*n;const c=l-a,f=this.widthAccessor(o)+this.padding*2;let u=(a+l)/2;const h=Math.max(0,(c-f)/2);if(h>0){const A=Math.max(0,f/2-u);u+=Math.min(A,h);const d=Math.max(0,f/2+u-n);u-=Math.min(d,h)}if(this.reservationMaps.get(this.laneAccessor(o)).reserve(u-f/2,u+f/2))if(this.params.asMidpoint){const A=Object.assign({},o);A[this.params.asMidpoint]=e.invert(u/n),this._propagate(A)}else this._propagate(o)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(e){this._data.push(e)}}class OF extends Qe{constructor(e,n){super(e,n),this.params=e,this.predicate=void 0}initialize(){let e="";if(UF(this.params))e=this.params.expr;else if(_F(this.params)){const n=this.paramRuntime.findValue(this.params.param);if(!n)throw new Error(`Cannot initialize filter transform. Selection parameter "${this.params.param}" not found!`);e=Xx(this.params,n)}else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramRuntime.watchExpression(e,()=>this.repropagate(),{scopeOwned:!1,registerDisposer:n=>this.registerDisposer(n)})}handle(e){this.predicate(e)&&this._propagate(e)}}function UF(t){return"expr"in t}function _F(t){return"param"in t}class GF extends Qe{get behavior(){return Mt}constructor(e){super(e),this.params=e;const n=e.index;if(e.fields){const i=Ne(e.fields).map(s=>$(s)),r=Ne(e.as||e.fields);if(i.length!==r.length)throw new Error(`Lengths of "fields" (${i.length}), and "as" (${r.length}) do not match!`);this.handle=s=>{const o=i.map((l,c)=>l(s)??[]),a=o[0].length;for(let l=0;l<a;l++){const c=Object.assign({},s);for(let f=0;f<i.length;f++)c[r[f]]=l<o[f].length?o[f][l]:null;n&&(c[n]=l),this._propagate(c)}}}else this.handle=i=>{for(let r=0;r<i.length;r++){const s=Object.assign({},i[r]);n&&(s[n]=r),this._propagate(s)}}}}const zF=48;function*HF(t,e=","){const n=e.charCodeAt(0);let i=0;for(let r=0;r<t.length;r++){const s=t.charCodeAt(r);s==n?(yield i,i=0):i=i*10+s-zF}yield i}class YF extends Qe{get behavior(){return Mt}constructor(e){super(e);const n=$(e.exons??"exons"),i=$(e.start??"start"),[r,s]=e.as||["exonStart","exonEnd"];this.handle=o=>{let a=i(o),l=a,c=!0;const f=n(o);for(const u of HF(f)){if(c)l=a+u;else{a=l+u;const h=Object.assign({},o);h[r]=l,h[s]=a,this._propagate(h)}c=!c}}}}class VF extends Qe{get behavior(){return Mt}constructor(e){super(e);const n=Ne(e.field).map(s=>$(s)),i=Ne(e.separator),r=Ne(e.as||e.field);if(n.length!==i.length||n.length!==r.length)throw new Error(`Lengths of "separator" (${i.length}), "fields" (${n.length}), and "as" (${r.length}) do not match!`);this.handle=s=>{if(n.some(l=>!l(s)))return;const o=n.map((l,c)=>l(s).split(i[c]));JF(o,s);const a=o[0].length;for(let l=0;l<a;l++){const c=Object.assign({},s);for(let f=0;f<n.length;f++)c[r[f]]=o[f][l];this._propagate(c)}}}}function JF(t,e){const n=t.map(i=>i.length);if(!n.every(i=>i==n[0]))throw new Error("Mismatching number of elements in the fields to be split: "+JSON.stringify(e))}class qF extends Qe{get behavior(){return En}constructor(e,n){super(e,n),this.params=e,this.as=e.as,this.fn=void 0}initialize(){this.fn=this.paramRuntime.watchExpression(this.params.expr,()=>this.repropagate(),{scopeOwned:!1,registerDisposer:e=>this.registerDisposer(e)})}handle(e){e[this.as]=this.fn(e),this._propagate(e)}}class a1 extends Qe{get behavior(){return En}constructor(e,n){e={channel:"x",...e},super(e),this.params=e;const i=e.channel;if(!["x","y"].includes(i))throw new Error("Invalid channel: "+i);const r=n.getScaleResolution(i).getScale(),s="genome"in r?r.genome():void 0;if(!s)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const o=$(e.chrom),a=Ne(e.pos).map(g=>$(g)),l=Ne(e.as);if(a.length!=l.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=Ne(e.offset);let f;if(c.length==0)f=new Array(a.length).fill(0);else if(c.length==1)f=new Array(a.length).fill(c[0]);else if(c.length==a.length)f=c;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(e.offset)}!`);const u=new Function("datum","chromOffset","posAccessors",l.map((g,m)=>`datum[${JSON.stringify(g)}] = chromOffset + +posAccessors[${m}](datum) - ${f[m]};`).join(`
|
|
613
|
-
`));let h,A=0;const d=g=>{if(g!==h){if(A=s.cumulativeChromPositions.get(g),A===void 0)return;h=g}return A};this.handle=g=>{const m=o(g),p=d(m);if(p===void 0)throw new Error(`Unknown chromosome/contig "${m}" in datum: ${JSON.stringify(g)}`);u(g,p,a),this._propagate(g)}}}const c1={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 KF extends Qe{get behavior(){return En}constructor(e,n){super(e,n),this.params=e;const i=If(c1),r=$(e.field),s=e.as;let o=0;if(Ee(e.fontSize)){const a=n.paramRuntime.watchExpression(e.fontSize.expr,()=>{o=a(),this.repropagate()},{scopeOwned:!1,registerDisposer:l=>this.registerDisposer(l)});o=a()}else o=e.fontSize;this.handle=a=>{const l=r(a);l!==void 0?a[s]=i.measureWidth(l,o):a[s]=0,this._propagate(a)}}}const jF=65536;class WF extends Qe{get behavior(){return En}constructor(e){super(e),this.params=e}reset(){super.reset(),this.initialize()}initialize(){const e=this.params,n=e.as||"lane",i=Ve(e.spacing)?e.spacing:1,r=$(e.start),s=$(e.end);if(!e.preference!=!e.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(e.preference){const o=new Float64Array(jF),a=$(e.preference),l=e.preferredOrder;let c=1/0;this.handle=f=>{const u=r(f);u<c&&o.fill(-1/0),c=u;const h=l.indexOf(a(f));let A=-1;if(h>=0&&o[h]<u)A=h;else{const d=r(f);for(A=0;A<o.length&&!(o[A]<d);A++);if(A>=o.length)throw new Error("Out of lanes!")}o[A]=s(f)+i,f[n]=A,this._propagate(f)}}else{const o=new ur,a=new ur;let l=-1/0,c=0;this.handle=f=>{const u=r(f);for(;o.length&&(o.peekValue()<=u||u<l);){const A=o.pop();a.push(A,A)}l=u;let h=a.pop();h===void 0&&(h=c++),f[n]=h,this._propagate(f),o.push(h,s(f)+i)}}}}class XF extends Qe{get behavior(){return Mt}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(r=>$(r)),i=e.as?e.as:n.map(dI);this.handle=r=>{const s={};for(let o=0;o<n.length;o++)s[i[o]]=n[o](r);this._propagate(s)}}}class ZF extends Qe{get behavior(){return En}constructor(e){super(e),this.params=e;const n=new RegExp(e.regex),i=typeof e.as=="string"?[e.as]:e.as,r=$(e.field);this.handle=s=>{const o=r(s);if(le(o)){const a=o.match(n);if(a){if(a.length-1!=i.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let l=0;l<i.length;l++)s[i[l]]=a[l+1]}else if(e.skipInvalidInput)for(let l=0;l<i.length;l++)s[i[l]]=void 0;else throw new Error(`"${o}" 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 o}, field content: "${o}".`);this._propagate(s)}}}class $F extends Qe{get behavior(){return Mt}constructor(e){super(e),this.params=e;const n=Ne(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 i=Ne(e.asValue);if(n.length!=i.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const r=e.skipRegex?new RegExp(e.skipRegex):void 0,s=e.asKey||"sample";let o,a,l;const c=h=>{const A=Object.keys(h);for(const m of n)if(!A.some(p=>m.test(p)))throw new Error(`No columns matching the regex ${m.toString()} found in the data!`);const d=new Map;for(const[m,p]of n.entries())for(const w of A){const C=p.exec(w)?.[1];if(C!==void 0){let y=d.get(C);y||(y=[],d.set(C,y)),y[m]=w}}o=[...d.entries()],a=A.filter(m=>!n.some(p=>p.test(m))&&!(r&&r.test(m)));const g=[...a.map(m=>JSON.stringify(m)+": datum["+JSON.stringify(m)+"]"),JSON.stringify(s)+": sampleId",...i.map((m,p)=>JSON.stringify(m)+`: datum[attrs[${p}]]`)];l=new Function("datum","sampleId","attrs",`return {
|
|
620
|
+
}`)}catch(e){throw new Error(`Invalid expression: ${t}, ${e.message}`)}}function XR(t,e={}){return jR(t,e)}function fw(t,e){const n={},i=XR(t,n),r=new Map;for(const o of i.globals){if(r.has(o))continue;const a=e(o);if(!a)throw new Error('Unknown variable "'+o+'" in expression: '+t);r.set(o,a),Object.defineProperty(n,o,{enumerable:!0,get(){return a.get()}})}const s=new Set;return i.subscribe=o=>{const a=[];for(const u of r.values())a.push(u.subscribe(o));let l=!0;const c=()=>{l&&(l=!1,s.delete(c),a.forEach(u=>u()))};return s.add(c),c},i.invalidate=()=>{for(const o of s)o();s.clear()},i.identifier=()=>i.code+"|"+Array.from(r.values()).map(o=>o.id).join(","),{expression:i,dependencies:Array.from(r.values())}}class ZR{#e=new M8;#t=new N8({lifecycleRegistry:this.#e});#n=new T8;createScope(e){const n=this.#e.createOwner("scope",e??"root");return e?this.#n.createChildScope(n,e):this.#n.createRootScope(n)}disposeScope(e){const n=this.#n.getOwnerId(e);this.#e.disposeOwner(n),this.#n.clearScope(e)}addScopeDisposer(e,n){const i=this.#n.getOwnerId(e);this.#e.addDisposer(i,n)}registerBase(e,n,i,r){const s=this.#n.getOwnerId(e),o=this.#t.createWritable(s,n,"base",i,r);return this.#n.register(e,n,o)}registerSelection(e,n,i,r){const s=this.#n.getOwnerId(e),o=this.#t.createWritable(s,n,"selection",i,r);return this.#n.register(e,n,o)}registerDerived(e,n,i){const{expression:r,dependencies:s}=fw(i,l=>this.resolve(e,l)),o=this.#n.getOwnerId(e),a=this.#t.computed(o,n,s,()=>r(null));return this.#n.register(e,n,a)}createExpression(e,n){const{expression:i}=fw(n,r=>this.resolve(e,r));return i}resolve(e,n){return this.#n.resolve(e,n)}runInTransaction(e){return this.#t.runInTransaction(e)}flushNow(){this.#t.flushNow()}whenPropagated(e){return this.#t.whenPropagated(e)}}class $R{#e;#t;#n=new Map;#i=new Map;#r=new Map;#o;#s=!1;constructor(e){this.#o=e??(()=>{});const n=this.#o();n?(this.#e=n.#e,this.#t=this.#e.createScope(n.#t)):(this.#e=new ZR,this.#t=this.#e.createScope())}registerParam(e){const n=e.name;if(Pt(n),this.#r.has(n))throw new Error('Parameter "'+n+'" already registered in this scope.');if("value"in e&&"expr"in e)throw new Error(`The parameter "${n}" must not have both value and expr properties!`);let i,r;if(e.push=="outer"){const s=this.findRuntimeForParam(n);if(!s)throw new Error(`Parameter "${n}" not found in outer scope!`);const o=s.paramConfigs.get(n);if(!o)throw new Error(`Outer parameter "${n}" exists as a value but has no registered config.`);if("expr"in o||"select"in o)throw new Error(`The outer parameter "${n}" must not have expr or select properties!`);i=a=>{s.setValue(n,a)},this.#n.set(n,i)}else if("value"in e)r=$l(e,this),i=this.#c(n,r);else if("expr"in e){const s=this.#e.registerDerived(this.#t,n,e.expr);this.#i.set(n,s),i=()=>{throw new Error('Cannot set derived parameter "'+n+'".')}}else r=$l(e,this),i=this.#c(n,r);if("select"in e){if(r??=$l(e,this),!this.#n.has(n)){const s=this.#e.registerSelection(this.#t,n,r);this.#i.set(n,s),this.#n.set(n,o=>{s.set(o),this.#e.flushNow()}),i=this.#n.get(n)}i(r)}return this.#r.set(n,e),i}allocateSetter(e,n,i=!1){if(Pt(e),this.#n.has(e))throw new Error("Setter already allocated for parameter: "+e);const r=this.#e.registerBase(this.#t,e,n,{notify:!i});this.#i.set(e,r);const s=o=>{r.set(o),this.#e.flushNow()};return this.#n.set(e,s),s}setValue(e,n){Pt(e);const i=this.#n.get(e);if(!i)throw new Error("Writable parameter not found in this scope: "+e);i(n)}getValue(e){return this.#i.get(e)?.get()}subscribe(e,n){Pt(e);const i=this.findRuntimeForParam(e);if(!i)throw new Error("Parameter not found: "+e);const r=i.#i.get(e);if(!r)throw new Error("Parameter found without local reference: "+e);return r.subscribe(n)}findValue(e){return this.findRuntimeForParam(e)?.getValue(e)}get paramConfigs(){return this.#r}findRuntimeForParam(e){return this.#i.has(e)?this:this.#o()?.findRuntimeForParam(e)}createExpression(e){return this.#e.createExpression(this.#t,e)}watchExpression(e,n,i={}){const r=this.createExpression(e),s=r.subscribe(n);return(i.scopeOwned??!0)&&this.#e.addScopeDisposer(this.#t,s),i.registerDisposer?.(s),r}#c(e,n){const i=this.#e.registerBase(this.#t,e,n);this.#i.set(e,i);const r=s=>{i.set(s),this.#e.flushNow()};return this.#n.set(e,r),r}evaluateAndGet(e){return this.createExpression(e)()}runInTransaction(e){return this.#e.runInTransaction(e)}flushNow(){this.#e.flushNow()}whenPropagated(e){return this.#e.whenPropagated(e)}dispose(){this.#s||(this.#s=!0,this.#e.disposeScope(this.#t),this.#n.clear(),this.#i.clear(),this.#r.clear())}hasPointSelections(){for(const e of this.#r.values())if(Zl(e)){const n=e.select;if(le(n)){if(n=="point")return!0}else if(n.type=="point")return!0}return!1}}function oo(t,e){return!e||/^(data:|([A-Za-z]+:)?\/\/)/.test(t)||t.startsWith("/")?t:(e.endsWith("/")||(e+="/"),e+t)}function eF(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 fn="VISIT_SKIP",pr="VISIT_STOP",hw=t=>t;class Aw{spec;#e;#t={};#n={};#i={};#r;#o;#s=!1;opacityFunction=hw;#c=[];#a="none";facetCoords=new Xt([],JSON.stringify);constructor(e,n,i,r,s,o={}){if(!e)throw new Error("View spec must be defined!");if(this.context=n,this.layoutParent=i,this.dataParent=r,this.#e=s,this.spec=e,this.resolutions={scale:{},axis:{}},lm(this),this.options={blockEncodingInheritance:!1,...o},this.flowHandle=void 0,this.needsAxes={x:!1,y:!1},this.paramRuntime=new $R(()=>this.dataParent?.paramRuntime),e.params)for(const a of e.params)this.paramRuntime.registerParam(a);if(!this.layoutParent?.options.layeredChildren){const a=l=>this.paramRuntime.findRuntimeForParam(l)?void 0:this.paramRuntime.allocateSetter(l,0);this.#o=a("height"),this.#r=a("width")}}get name(){return this.spec.name??this.#e}get explicitName(){return this.spec.name}get defaultName(){return this.#e}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>je.createFromConfig(this.spec.padding))}getOverhang(){return je.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Gn(this.#l("width"),this.#l("height")):_m)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return _m;const e=this.getSize();return new Gn(this.#l("viewportWidth")??e.width,this.#l("viewportHeight")??e.height)}#l(e){let n=this.spec[e];const i=zf(n),r=e=="viewportWidth"||e=="viewportHeight";if(i){if(r)throw new Ye(`Cannot use step-based size with "${e}"!`,this);const s=n.step,o=this.getScaleResolution(e=="width"?"x":"y")?.getScale();if(o){let a=0;if(cn(o.type))a=o.domain().length;else if(["locus","index"].includes(o.type)){const c=o.domain();a=ra(c)-c[0]}else throw new Ye(`Cannot use step-based size with "${o.type}" scale!`,this);const l=o;return a=lf(a,l.paddingInner(),l.paddingOuter()),{px:a*s,grow:0}}else throw new Ye(`Cannot use step-based size with "${e}"!`,this)}else return(n&&zm(n))??(r?void 0:{px:0,grow:1})}registerStepSizeInvalidation(){this.#u("width","x"),this.#u("height","y")}#u(e,n){const i=this.spec[e];if(!zf(i))return;const r=this.getScaleResolution(n);if(!r)throw new Ye("Cannot use 'step' size without a scale!",this);const s=()=>this.invalidateSizeCache();r.addEventListener("domain",s),this.registerDisposer(()=>r.removeEventListener("domain",s))}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(e=>e.isConfiguredVisible())}isDomainInert(){if(this.spec.domainInert)return!0;const e=this.dataParent;return e?e.isDomainInert():!1}getDataInitializationState(){return this.#a}_setDataInitializationState(e){this.#a=e}isDataInitialized(){return this.#a==="ready"}getEffectiveOpacity(){return this.opacityFunction(this.layoutParent?.getEffectiveOpacity()??1)}getPathString(){return this.getLayoutAncestors().map(e=>e.name).reverse().join("/")}#f(e){const n=[];let i=this;do n.push(i),i=i[e];while(i);return n}getLayoutAncestors(){return this.#f("layoutParent")}getDataAncestors(){return this.#f("dataParent")}handleBroadcast(e){for(const n of this.#t[e.type]||[])n(e)}_addBroadcastHandler(e,n){let i=this.#t[e];return i||(i=[],this.#t[e]=i),i.push(n),()=>{const r=this.#t[e];if(!r)return;const s=r.indexOf(n);s>=0&&r.splice(s,1)}}handleInteractionEvent(e,n,i){const r=i?this.#n:this.#i;for(const s of r[n.type]||[])s(e,n)}addInteractionEventListener(e,n,i){const r=i?this.#n:this.#i;let s=r[e];s||(s=[],r[e]=s),s.push(n)}removeInteractionEventListener(e,n,i){let s=(i?this.#n:this.#i)?.[e];if(s){const o=s.indexOf(n);o>=0&&s.splice(o,1)}}visit(e){try{const n=e(this);if(e.postOrder&&e.postOrder(this),n!==pr)return n}catch(n){throw n.view=this,n}}getDescendants(){const e=[];return this.visit(n=>{e.push(n)}),e}dispose(){for(const n of this.#c)n();this.#c.length=0;const e=this.flowHandle;e?.collector&&(this.context.dataFlow.pruneCollectorBranch(e.collector),this.context.dataFlow.removeCollector(e.collector)),e?.dataSource&&e.dataSource.view===this&&!e.dataSource.identifier&&this.context.dataFlow.removeDataSource(e.dataSource),this.paramRuntime.dispose(),this.context.dataFlow.loadingStatusRegistry.delete(this),this.flowHandle=void 0}registerDisposer(e){this.#c.push(e)}disposeSubtree(){const e=()=>{};e.postOrder=n=>{n.dispose()},this.visit(e)}configureViewOpacity(){(!this.opacityFunction||this.opacityFunction===hw)&&(this.opacityFunction=nF(this))}onBeforeRender(){this.#s||(this.#s=!0)}hasRendered(){return this.#s}render(e,n,i={}){i.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(i.facetId,i.clipRect?n.intersect(i.clipRect):n),this.#r?.(n.width),this.#o?.(n.height)}getEncoding(){const e=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},n=this.spec.encoding||{},i={...e,...n};for(const[r,s]of Object.entries(i))s===null&&delete i[r];return i}getFacetAccessor(e){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(e){const n=this.getEncoding().sample;return nn(n)?[n.field]:this.layoutParent?.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(e){const n=rn(e);return this.getDataAncestors().map(i=>i.resolutions.scale[n]).find(i=>i)}getAxisResolution(e){const n=rn(e);return this.getDataAncestors().map(i=>i.resolutions.axis[n]).find(i=>i)}getConfiguredResolution(e,n){return this.spec.resolve?.[n]?.[e]}getConfiguredOrDefaultResolution(e,n){return this.getConfiguredResolution(e,n)??this.getConfiguredResolution("default",n)??this.getDefaultResolution(e,n)}getDefaultResolution(e,n){return"independent"}getBaseUrl(){return zn(()=>this.dataParent?.getBaseUrl(),eF(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const e=this.spec.title;if(e)return le(e)?e:Ee(e.text)?this.paramRuntime.evaluateAndGet(e.text.expr):e.text}_cache(e,n){return Za(this,e,n)}_invalidateCacheByPrefix(e,n="self"){switch(n){case"self":Vs(this,e);break;case"ancestors":for(const i of this.getLayoutAncestors())Vs(i,e);break;case"progeny":this.visit(i=>Vs(i,e));break}}invalidateSizeCache(){Vs(this,"size"),this._invalidateCacheByPrefix("size","ancestors")}propagateInteractionEvent(e){}}function tF(t){return"unitsPerPixel"in t}function nF(t){const e="opacity"in t.spec?t.spec.opacity:void 0;if(e!==void 0){if(qe(e))return n=>n*e;if(tF(e)){const n=c=>{const u=t.getScaleResolution(c),f=u?.getScale();if(["linear","index","locus"].includes(f?.type))return{scale:f,scaleResolution:u}},i=dw(e.values,"opacity.values",t);if(!be(e.unitsPerPixel))throw new Ye('"opacity.unitsPerPixel" must be an array.',t);let r=()=>1,s=[];const o=()=>{const c=dw(s.map(h=>h()),"opacity.unitsPerPixel",t),u=iF(c,i,t),f=ef().domain(u.unitsPerPixel).range(u.values).clamp(!0);r=h=>f(h)};s=e.unitsPerPixel.map(c=>{if(Ee(c)){const u=t.paramRuntime.watchExpression(c.expr,()=>{o(),t.context.animator.requestRender()});return()=>u(null)}else return()=>c}),o();const a=c=>{const f=c.scaleResolution.getAxisLength()||1e3;return Kr(c.scale.domain())/f};let l;if(e.channel==="auto"){const c=n("x"),u=n("y");if(c&&u)l=()=>(a(c)+a(u))/2;else if(c)l=()=>a(c);else if(u)l=()=>a(u);else throw new Ye("Cannot find a resolved quantitative x or y scale for dynamic opacity!",t)}else{const c=e.channel?n(e.channel):n("x")??n("y");if(!c)throw new Ye("Cannot find a resolved quantitative scale for dynamic opacity!",t);l=()=>a(c)}return c=>r(l())*c}else if(Ee(e)){const n=t.paramRuntime.watchExpression(e.expr,()=>t.context.animator.requestRender());return i=>n(null)*i}}return n=>n}function iF(t,e,n){if(!t.length)throw new Ye('"opacity.unitsPerPixel" must contain at least one stop.',n);if(t.length!==e.length)throw new Ye('"opacity.unitsPerPixel" and "opacity.values" must have the same length.',n);t.forEach((o,a)=>{if(o<=0)throw new Ye("Invalid opacity.unitsPerPixel value at index "+a+". Stop values must be positive.",n)});const i=t.map((o,a)=>({stop:o,value:e[a]}));i.sort((o,a)=>a.stop-o.stop);const r=i.map(o=>o.stop),s=i.map(o=>o.value);for(let o=1;o<t.length;o++)if(r[o-1]<=r[o])throw new Ye('"opacity.unitsPerPixel" must be strictly decreasing.',n);return{unitsPerPixel:r,values:s}}function dw(t,e,n){if(!be(t))throw new Ye('"'+e+'" must evaluate to an array.',n);return t.map((i,r)=>{if(!qe(i)||!Number.isFinite(i))throw new Ye("Invalid "+e+" value at index "+r+". Expected a finite number.",n);return i})}const zf=t=>!!t?.step;function rF(t){return sF(t?.search,"search")}function sF(t,e){if(!t)return;const n=Array.isArray(t)?t:[t];if(n.length===0)throw new Error("The "+e+" channel array must not be empty.");const i=[];for(const r of n){if(!r||typeof r!="object"||!("field"in r))throw new Error("The "+e+" channel must be a field definition or an array of field definitions.");const s=r.field;if(typeof s!="string")throw new Error("The "+e+" channel field definition must include a string field name.");i.push(s)}return i}const oF={point:t4,rect:jk,rule:s4,link:h4,text:w4};class Je extends Aw{#e;#t=!1;#n=null;constructor(e,n,i,r,s,o){super(e,n,i,r,s,o),this.spec=e;const a=oF[this.getMarkType()];if(a)this.mark=new a(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),this.#e=this.paramRuntime.allocateSetter("zoomLevel",1);for(const l of["x","y"]){const c=this.getScaleResolution(l);if(c){const u=()=>{this.#e(Math.sqrt(this.getZoomLevel()))};c.addEventListener("domain",u),this.registerDisposer(()=>c.removeEventListener("domain",u))}}this.needsAxes={x:!0,y:!0},this.#i()}#i(){for(const[e,n]of this.paramRuntime.paramConfigs){if(!("select"in n))continue;const i=la(n.select),r=i.on,s=i.clear;if(ua(i)){let a=0;const l=h=>{this.paramRuntime.setValue(e,h)},c=()=>{const h=this.context.getCurrentHover();return h?.mark?.unitView===this?h.datum:null},u=r.filter?lc(r.filter):()=>!0,f=(h,A)=>{if(!u(A.proxiedMouseEvent))return;const d=c(),g=d?d[pt]:0;let m;if(i.toggle)if(A.mouseEvent.shiftKey){if(d){const w=this.paramRuntime.getValue(e);m=Qv(w,{toggle:[d]})}}else m=ql(d?[d]:null);else g!=a&&(a=g,m=Jl(d));m!==void 0&&l(m)};if(this.addInteractionEventListener(["mouseover","pointerover"].includes(r.type)?"mousemove":r.type,f),s){const h=s.filter?lc(s.filter):()=>!0,A=(d,g)=>{if(!h(g.proxiedMouseEvent))return;a=0;const m=i.toggle?ql():Jl(null);l(m)};this.addInteractionEventListener(s.type,A)}}}}render(e,n,i={}){super.render(e,n,i),this.isConfiguredVisible()&&(e.pushView(this,n),e.renderMark(this.mark,i),e.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}getEncoding(){const e=super.getEncoding(),n=this.mark.getSupportedChannels();for(const i of Object.keys(e))i!=="key"&&(n.includes(i)||delete e[i]);return e}resolve(e){if(!e){this.resolve("scale"),this.resolve("axis");return}const n=this.mark.encoding;for(const[i,r]of Object.entries(n)){if(!r||Array.isArray(r))continue;let s;if(mt(r))s=r;else if(Hl(r)){const l=r.condition;if(!Array.isArray(l)&&mt(l))s=l;else continue}else continue;const o=rn(s.resolutionChannel??i);if(!ca(o)||e=="axis"&&!bs(o))continue;let a=this;for(;(a.getConfiguredOrDefaultResolution(o,e)=="forced"||a.dataParent&&["shared","excluded","forced"].includes(a.dataParent.getConfiguredOrDefaultResolution(o,e)))&&a.getConfiguredOrDefaultResolution(o,e)!="excluded";)a=a.dataParent;if(e=="axis"&&bs(i)&&oa(o)){a.resolutions[e][o]||(a.resolutions[e][o]=new Q8(o));const l=a.resolutions[e][o],c=l.registerMember({view:this,channel:i,channelDef:s});this.registerDisposer(()=>{c()&&a.resolutions[e][o]===l&&delete a.resolutions[e][o]})}else if(e=="scale"&&ca(i)){if(!a.resolutions[e][o]){const f=new B8(o);a.resolutions[e][o]=f;const h=A=>{this.context.glHelper?.createRangeTexture(A.scaleResolution,!0)};f.addEventListener("range",h),f.addEventListener("domain",h),this.registerDisposer(()=>{f.removeEventListener("range",h),f.removeEventListener("domain",h)})}const l=!this.isDomainInert(),c=a.resolutions[e][o],u=c.registerMember({view:this,channel:i,channelDef:s,contributesToDomain:l});this.registerDisposer(()=>{u()&&a.resolutions[e][o]===c&&(c.dispose(),delete a.resolutions[e][o])})}}}dispose(){super.dispose(),this.mark.dispose()}getDataAccessor(e){const n=this.mark.encoders;if(n)return n[e]?.dataAccessor}getSearchAccessors(){if(!this.#n){const e=rF(this.getEncoding())??[];this.#n=e.map(n=>ne(n))}return this.#n}getFacetAccessor(e){const n=this.getDataAccessor("sample");return n||super.getFacetAccessor(this)}getCollector(){return this.flowHandle?.collector}registerDomainSubscriptions(){if(this.#t||this.isDomainInert())return;const e=this.getCollector();if(!e)return;const n=this.mark.encoders;if(!n)throw new Error("Encoders are not initialized!");this.#t=!0;const i=new Map;for(const r of Object.values(n)){if(!r)continue;const s=r.accessors??[];if(s.length!==0)for(const o of s){if(!Wd(o)||o.channelDef.domainInert)continue;const a=this.getScaleResolution(o.scaleChannel);if(!a)throw new Error("Missing scale resolution for channel: "+o.scaleChannel);let l=i.get(a);l||(l=new Set,i.set(a,l)),l.add(o)}}for(const[r,s]of i){if(s.size===0)continue;const o=r.registerCollectorSubscriptions(e,s);this.registerDisposer(o)}}getZoomLevel(){const e=n=>this.getScaleResolution(n)?.getZoomLevel()??1;return li.map(e).reduce((n,i)=>n*i,1)}propagateInteractionEvent(e){this.handleInteractionEvent(void 0,e,!0),e.target=this,!e.stopped&&this.handleInteractionEvent(void 0,e,!1)}getDefaultResolution(e,n){return e=="x"?"shared":"independent"}}class Gf extends Error{constructor(e,n){super(n),this.kind=e}}async function gw(t,e={}){let n;try{n=await fetch(t,{signal:e.signal})}catch(i){throw new Gf("network",String(i))}if(!n.ok)throw new Gf("http",String(n.status)+" "+n.statusText);try{return await n.json()}catch(i){throw new Gf("json",String(i))}}function aF(t){const e=new Set;t.visit(n=>{for(const i of Object.values(n.resolutions.scale)){const r=i.name;if(r&&e.has(r))throw new Error(`The same scale name "${r}" occurs in multiple scale resolutions!`);e.add(r)}})}function cF(t){for(const e of li){const n=t.getScaleResolution(e);n&&!n.name&&n.isZoomable()&&(n.name=`${e}_at_root`)}}function Hf(t,e=()=>!0){return Promise.allSettled(t).then(n=>{if(e())for(const i of n)"value"in i?i.value.finalizeGraphicsInitialization():"reason"in i&&console.error(i.reason)})}async function lF(t,e,n){const i=t.import;if(!("url"in i))throw new Error("Not an url import: "+JSON.stringify(i));const r=zn(e,i.url);let s;try{s=await gw(r)}catch(o){throw new Error(`Could not load imported view spec: ${r}. Reason: ${o.message}`)}if(n.isViewSpec(s))return s.baseUrl=zn(ym(i.url),s.baseUrl),s;throw new Error(`The imported spec "${r}" is not a view spec: ${JSON.stringify(t)}`)}function uF(t){const e=t.getSize(),n=t.getPadding(),i=(r,s)=>r.grow>0?void 0:r.px+s;return{width:i(e.width,n.horizontalTotal),height:i(e.height,n.verticalTotal)}}function*Yf(t,e=[]){for(const[n,i]of t.entries())if(i instanceof Map)for(const r of Yf(i,[...e,n]))yield r;else yield[[...e,n],i]}const pw=2147483647,fF=mw([pw]);function hF(t){for(let e=1;e<t.length;e++)if(t[e]<t[e-1])return!1;return!0}function mw(t){let e=0;for(let n=0,i=t.length;n<i;n++)t[n]>e&&(e=t[n]);return Math.floor(Math.log2(e)/4)+1}function AF(t){const e=mw(t);let n=Array.from({length:t.length},(s,o)=>o);if(hF(t))return n;let i=new Array(t.length);const r=new Array(16);for(let s=0;s<e;s++){r.fill(0);const o=s*4,a=Math.pow(16,s),l=c=>{const u=t[n[c]];return s>=fF?u>pw?Math.floor(u/a)%16:0:u>>o&15};for(let c=0;c<t.length;c++)r[l(c)]++;for(let c=1;c<16;c++)r[c]+=r[c-1];for(let c=t.length-1;c>=0;c--)i[--r[l(c)]]=n[c];[n,i]=[i,n]}return n}const uc="|",Vf="\\";class dF{#e=null;#t=null;#n=!1;invalidate(){this.#e=null,this.#t=null,this.#n=!1}findDatum(e,n,i){if(!e||e.length===0)return;const r=e.join(", ");if(e.length!==n.length)throw new Error(`Key tuple length ${n.length} does not match fields [${r}]`);(!this.#e||!this.#r(e))&&this.#i(e,i);const s=this.#t;let o;if(this.#n){let a="";for(let l=0;l<n.length;l++){l>0&&(a+=uc);const c=s[l],u=fc(n[l],c);a+=ww(u)}o=a}else{const a=s[0];o=fc(n[0],a)}return this.#e.get(o)}#i(e,n){const i=e.map(a=>ne(a)),r=new Map,s=e.join(", "),o=e.length!==1;if(o)for(const a of n)for(let l=0,c=a.length;l<c;l++){const u=a[l];let f="";for(let A=0;A<i.length;A++){A>0&&(f+=uc);const d=e[A],g=fc(i[A](u),d);f+=ww(g)}if(r.get(f)!==void 0){const A=i.map(d=>d(u));throw new Error(`Duplicate key detected for fields [${s}]: ${JSON.stringify(A)}`)}r.set(f,u)}else{const a=i[0],l=e[0];for(const c of n)for(let u=0,f=c.length;u<f;u++){const h=c[u],A=fc(a(h),l);if(r.get(A)!==void 0)throw new Error(`Duplicate key detected for fields [${s}]: ${JSON.stringify(A)}`);r.set(A,h)}}this.#e=r,this.#t=[...e],this.#n=o}#r(e){if(!this.#t||this.#t.length!==e.length)return!1;for(let n=0;n<e.length;n++)if(this.#t[n]!==e[n])return!1;return!0}}function fc(t,e){if(t===void 0)throw new Error(`Key field "${e}" is undefined. Ensure all key fields are present in the data.`);if(t===null)throw new Error(`Key field "${e}" is null. Ensure all key fields are present in the data.`);if(typeof t!="string"&&typeof t!="number"&&typeof t!="boolean")throw new Error(`Key field "${e}" must be a scalar value (string, number, or boolean).`);return t}function gF(t){if(!(t.indexOf(Vf)!==-1||t.indexOf(uc)!==-1))return t;let n="";for(let i=0;i<t.length;i++){const r=t[i];(r===Vf||r===uc)&&(n+=Vf),n+=r}return n}function ww(t){return typeof t=="string"?gF(t):String(t)}class yw extends _l{#e=[];#t=ne(pt);#n=[];#i=new dF;#r;#o;#s=new pF;get behavior(){return Ul}get label(){return"collect"}constructor(e){super(),this.params=e??{type:"collect"},this.observers=new Set,this.facetBatches=new Xt([],JSON.stringify),this.#o=wF(this.params?.sort),this.#c()}#c(){this.#e=[],this.#n=[],this.#i.invalidate(),this.facetBatches.clear(),this.facetBatches.set(void 0,this.#e)}reset(){super.reset(),this.#c()}handle(e){this.#e.push(e)}beginBatch(e){this.#i.invalidate(),mv(e)&&(this.#e=[],this.facetBatches.set(Me(e.facetId),this.#e))}complete(){if(this.#e=[],this.params.groupby?.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const e=this.facetBatches.get(void 0),n=this.params.groupby.map(r=>ne(r)),i=n.length>1?Go(e,...n):mF(e,n[0]);this.facetBatches.clear();for(const[r,s]of Yf(i))this.facetBatches.set(r,s)}if(this.#o)for(const e of this.facetBatches.values())e.sort(this.#o);this.#f(),this.#a(),super.complete(),this.#u();for(const e of this.observers)e(this)}observe(e){return this.observers.add(e),()=>{this.observers.delete(e)}}#a(){if(this.children.length)for(const[e,n]of this.facetBatches.entries()){if(e){const i={type:"facet",facetId:e};for(const r of this.children)r.beginBatch(i)}for(let i=0,r=n.length;i<r;i++)this._propagate(n[i])}}repropagate(){for(const e of this.children)e.reset();this.#a();for(const e of this.children)e.complete();this.#u()}getDomain(e,n,i){return this.#s.getDomain(e,()=>{const r=Xs(n);if(i.constant)r.extend(i({}));else if(this.completed)for(const s of this.facetBatches.values())for(let o=0,a=s.length;o<a;o++)r.extend(i(s[o]));return r})}subscribeDomainChanges(e,n){return this.#s.subscribe(e,n)}getData(){switch(this.#l(),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const e=this.facetBatches;return{[Symbol.iterator]:function*(){for(const i of e.values())yield*i}}}}}visitData(e){this.#l();for(const n of this.facetBatches.values())for(let i=0;i<n.length;i++)e(n[i])}getItemCount(){let e=0;for(const n of this.facetBatches.values())e+=n.length;return e}#l(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")}#u(){this.#s.hasCachedDomains()&&this.#s.clear(),this.#s.notify()}#f(){this.#r=[];const e=this.facetBatches.values().next().value?.[0];if(e==null||!(pt in e))return;let n=0;const i=[],r=this.#t;for(const[s,o]of this.facetBatches){this.#r.push({start:n,stop:n+o.length,facetId:s}),n+=o.length;for(let a=0,l=o.length;a<l;a++)i.push(r(o[a]))}this.#n=AF(i)}findDatumByUniqueId(e){if(!this.#n.length)return;const n=ii(a=>a.start).right,i=this.#t,r=ii(a=>i(s(a))).left,s=a=>{const l=n(this.#r,a),c=this.#r[l-1];return!c||a>=c.stop?void 0:this.facetBatches.get(c.facetId)[a-c.start]},o=r(this.#n,e);if(o>=0){const a=s(this.#n[o]);if(a&&i(a)===e)return a}}findDatumByKey(e,n){return this.#l(),this.#i.findDatum(e,n,this.facetBatches.values())}}class pF{#e=new Map;#t=new Map;hasCachedDomains(){return this.#e.size>0}clear(){this.#e.clear()}getDomain(e,n){const i=this.#e.get(e);if(i)return i;{const r=n();return this.#e.set(e,r),r}}subscribe(e,n){let i=this.#t.get(e);return i||(i=new Set,this.#t.set(e,i)),i.add(n),()=>{const r=this.#t.get(e);r&&(r.delete(n),r.size===0&&this.#t.delete(e))}}notify(){if(this.#t.size===0)return;const e=new Set;for(const n of this.#t.values())for(const i of n)e.add(i);for(const n of e)n()}}function mF(t,e){const n=new Map;for(let i=0,r=t.length;i<r;i++){const s=t[i],o=e(s);let a=n.get(o);a||(a=[],n.set(o,a)),a.push(s)}return n}function wF(t){if(t?.field){const e=Me(t.field);if(e.length==1&&!e[0].includes(".")){const n=Me(t.order)[0]??"ascending",i=JSON.stringify(e[0]);return new Function("a","b",`return a[${i}] ${n==="ascending"?"-":"+"} b[${i}];`)}return QA(t.field,t.order)}}class yF extends Qe{get behavior(){return Tt}constructor(e){super(e),this.params=e,this.startAccessor=ne(e.start),this.endAccessor=ne(e.end),this.chromAccessor=e.chrom?ne(e.chrom):n=>{},this.weightAccessor=e.weight?ne(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,i])=>i).map(([n,i])=>`${JSON.stringify(i)}: ${n}`).join(", ")+"};"),this.ends=new gr}reset(){super.reset(),this.initialize()}initialize(){const e=this.as.coverage,n=this.as.end,i=this.as.chrom,r=this.startAccessor,s=this.endAccessor,o=this.chromAccessor,a=this.weightAccessor;let l,c,u,f=0,h=NaN;const A=this.ends;A.clear();const d=p=>{this._propagate(p),l=null},g=(p,w,C)=>{if(p==w)return;let y=!1;l&&(l[e]===C?(l[n]=w,y=!0):l[e]!=0&&d(l)),y||(l=this.createSegment(p,w,C,u))},m=()=>{let p=0;for(;(p=A.peekValue())!==void 0;)g(h,p,f),h=p,f-=A.pop();h=NaN,l&&d(l)};this.handle=p=>{const w=r(p);let C=0;for(;(C=A.peekValue())!==void 0&&C<w;)g(h,C,f),h=C,f-=A.pop();if(i){let I=o(p);I!==c&&(m(),u=I,c=u)}isNaN(h)||g(h,w,f),h=w;const y=a(p);f+=y,A.push(y,s(p))},this.complete=()=>{m(),super.complete()},this.beginBatch=p=>{m(),c=null,super.beginBatch(p)}}}function CF(t,e,n=s=>+s,i=0,r=t.length){const s=new gr,o=r-i;let a;for(a=0;a<e&&a<o;a++)s.push(a,n(t[i+a]));for(;a<o;a++){const u=n(t[i+a]);u>=s.peekValue()&&(s.push(a,u),s.pop())}const l=[];let c;for(;(c=s.pop())!==void 0;)l.push(t[i+c]);return l.reverse()}class bF{constructor(e,n=-1/0,i=1/0){this.maxSize=e,this.lowerLimit=n,this.upperLimit=i;const r=this.maxSize*2+1;this.lowerLimits=new Float64Array(r),this.upperLimits=new Float64Array(r),this.lowerChildren=new Int32Array(r),this.upperChildren=new Int32Array(r),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,i=0){if(e>=this.lowerLimits[i]&&n<=this.upperLimits[i]){const r=this.lowerChildren[i];if(r){const s=this._findSlot(e,n,r);return s>=0?s:this._findSlot(e,n,this.upperChildren[i])}else return i}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 i=this._findSlot(e,n);if(i<0)return!1;const r=this.n++,s=this.n++;return this.lowerLimits[r]=this.lowerLimits[i],this.upperLimits[r]=e,this.lowerLimits[s]=n,this.upperLimits[s]=this.upperLimits[i],this.lowerChildren[i]=r,this.upperChildren[i]=s,!0}}class EF extends Qe{get behavior(){return Ul}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=ne(this.params.pos),this.endPosAccessor=ne(this.params.pos2??this.params.pos),this.startPosBisector=ii(this.startPosAccessor),this.endPosBisector=ii(this.endPosAccessor),this.scoreAccessor=ne(this.params.score),this.widthAccessor=ne(this.params.width),this.laneAccessor=this.params.lane?ne(this.params.lane):o=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=n.getScaleResolution(this.channel);const i=()=>this._filterAndPropagate();this.schedule=()=>n.context.animator.requestTransition(i);const r=()=>this.schedule();this.resolution.addEventListener("domain",r),this.registerDisposer(()=>this.resolution.removeEventListener("domain",r));const s=n._addBroadcastHandler("layoutComputed",()=>this.schedule());this.registerDisposer(s)}complete(){const e=this.startPosAccessor;this._data.sort((n,i)=>e(n)-e(i));for(const n of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(n,new bF(200));this.schedule(),super.complete()}_filterAndPropagate(){super.reset();const e=this.resolution.getScale(),n=this.resolution.getAxisLength();if(!n)return;for(const o of this.reservationMaps.values())o.reset();const i=e.domain(),s=CF(this._data,70,this.scoreAccessor,this.endPosBisector.left(this._data,i[0]),this.startPosBisector.right(this._data,i[1]));for(const o of s){let a=e(this.startPosAccessor(o))*n,l=e(this.endPosAccessor(o))*n;const c=l-a,u=this.widthAccessor(o)+this.padding*2;let f=(a+l)/2;const h=Math.max(0,(c-u)/2);if(h>0){const A=Math.max(0,u/2-f);f+=Math.min(A,h);const d=Math.max(0,u/2+f-n);f-=Math.min(d,h)}if(this.reservationMaps.get(this.laneAccessor(o)).reserve(f-u/2,f+u/2))if(this.params.asMidpoint){const A=Object.assign({},o);A[this.params.asMidpoint]=e.invert(f/n),this._propagate(A)}else this._propagate(o)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(e){this._data.push(e)}}class IF extends Qe{constructor(e,n){super(e,n),this.params=e,this.predicate=void 0}initialize(){let e="";if(xF(this.params))e=this.params.expr;else if(vF(this.params)){const n=this.paramRuntime.findValue(this.params.param);if(!n)throw new Error(`Cannot initialize filter transform. Selection parameter "${this.params.param}" not found!`);e=kv(this.params,n)}else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramRuntime.watchExpression(e,()=>this.repropagate(),{scopeOwned:!1,registerDisposer:n=>this.registerDisposer(n)})}handle(e){this.predicate(e)&&this._propagate(e)}}function xF(t){return"expr"in t}function vF(t){return"param"in t}class BF extends Qe{get behavior(){return Tt}constructor(e){super(e),this.params=e;const n=e.index;if(e.fields){const i=Me(e.fields).map(s=>ne(s)),r=Me(e.as||e.fields);if(i.length!==r.length)throw new Error(`Lengths of "fields" (${i.length}), and "as" (${r.length}) do not match!`);this.handle=s=>{const o=i.map((l,c)=>l(s)??[]),a=o[0].length;for(let l=0;l<a;l++){const c=Object.assign({},s);for(let u=0;u<i.length;u++)c[r[u]]=l<o[u].length?o[u][l]:null;n&&(c[n]=l),this._propagate(c)}}}else this.handle=i=>{for(let r=0;r<i.length;r++){const s=Object.assign({},i[r]);n&&(s[n]=r),this._propagate(s)}}}}const SF=48;function*DF(t,e=","){const n=e.charCodeAt(0);let i=0;for(let r=0;r<t.length;r++){const s=t.charCodeAt(r);s==n?(yield i,i=0):i=i*10+s-SF}yield i}class QF extends Qe{get behavior(){return Tt}constructor(e){super(e);const n=ne(e.exons??"exons"),i=ne(e.start??"start"),[r,s]=e.as||["exonStart","exonEnd"];this.handle=o=>{let a=i(o),l=a,c=!0;const u=n(o);for(const f of DF(u)){if(c)l=a+f;else{a=l+f;const h=Object.assign({},o);h[r]=l,h[s]=a,this._propagate(h)}c=!c}}}}class kF extends Qe{get behavior(){return Tt}constructor(e){super(e);const n=Me(e.field).map(s=>ne(s)),i=Me(e.separator),r=Me(e.as||e.field);if(n.length!==i.length||n.length!==r.length)throw new Error(`Lengths of "separator" (${i.length}), "fields" (${n.length}), and "as" (${r.length}) do not match!`);this.handle=s=>{if(n.some(l=>!l(s)))return;const o=n.map((l,c)=>l(s).split(i[c]));RF(o,s);const a=o[0].length;for(let l=0;l<a;l++){const c=Object.assign({},s);for(let u=0;u<n.length;u++)c[r[u]]=o[u][l];this._propagate(c)}}}}function RF(t,e){const n=t.map(i=>i.length);if(!n.every(i=>i==n[0]))throw new Error("Mismatching number of elements in the fields to be split: "+JSON.stringify(e))}class FF extends Qe{get behavior(){return Sn}constructor(e,n){super(e,n),this.params=e,this.as=e.as,this.fn=void 0}initialize(){this.fn=this.paramRuntime.watchExpression(this.params.expr,()=>this.repropagate(),{scopeOwned:!1,registerDisposer:e=>this.registerDisposer(e)})}handle(e){e[this.as]=this.fn(e),this._propagate(e)}}class Cw extends Qe{get behavior(){return Sn}constructor(e,n){e={channel:"x",...e},super(e),this.params=e;const i=e.channel;if(!["x","y"].includes(i))throw new Error("Invalid channel: "+i);const r=n.getScaleResolution(i).getScale(),s="genome"in r?r.genome():void 0;if(!s)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const o=ne(e.chrom),a=Me(e.pos).map(g=>ne(g)),l=Me(e.as);if(a.length!=l.length)throw new Error('The number of "pos" and "as" elements must be equal!');const c=Me(e.offset);let u;if(c.length==0)u=new Array(a.length).fill(0);else if(c.length==1)u=new Array(a.length).fill(c[0]);else if(c.length==a.length)u=c;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(e.offset)}!`);const f=new Function("datum","chromOffset","posAccessors",l.map((g,m)=>`datum[${JSON.stringify(g)}] = chromOffset + +posAccessors[${m}](datum) - ${u[m]};`).join(`
|
|
621
|
+
`));let h,A=0;const d=g=>{if(g!==h){if(A=s.cumulativeChromPositions.get(g),A===void 0)return;h=g}return A};this.handle=g=>{const m=o(g),p=d(m);if(p===void 0)throw new Error(`Unknown chromosome/contig "${m}" in datum: ${JSON.stringify(g)}`);f(g,p,a),this._propagate(g)}}}const bw={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 NF extends Qe{get behavior(){return Sn}constructor(e,n){super(e,n),this.params=e;const i=Ru(bw),r=ne(e.field),s=e.as;let o=0;if(Ee(e.fontSize)){const a=n.paramRuntime.watchExpression(e.fontSize.expr,()=>{o=a(),this.repropagate()},{scopeOwned:!1,registerDisposer:l=>this.registerDisposer(l)});o=a()}else o=e.fontSize;this.handle=a=>{const l=r(a);l!==void 0?a[s]=i.measureWidth(l,o):a[s]=0,this._propagate(a)}}}const MF=65536;class TF extends Qe{get behavior(){return Sn}constructor(e){super(e),this.params=e}reset(){super.reset(),this.initialize()}initialize(){const e=this.params,n=e.as||"lane",i=qe(e.spacing)?e.spacing:1,r=ne(e.start),s=ne(e.end);if(!e.preference!=!e.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(e.preference){const o=new Float64Array(MF),a=ne(e.preference),l=e.preferredOrder;let c=1/0;this.handle=u=>{const f=r(u);f<c&&o.fill(-1/0),c=f;const h=l.indexOf(a(u));let A=-1;if(h>=0&&o[h]<f)A=h;else{const d=r(u);for(A=0;A<o.length&&!(o[A]<d);A++);if(A>=o.length)throw new Error("Out of lanes!")}o[A]=s(u)+i,u[n]=A,this._propagate(u)}}else{const o=new gr,a=new gr;let l=-1/0,c=0;this.handle=u=>{const f=r(u);for(;o.length&&(o.peekValue()<=f||f<l);){const A=o.pop();a.push(A,A)}l=f;let h=a.pop();h===void 0&&(h=c++),u[n]=h,this._propagate(u),o.push(h,s(u)+i)}}}}class PF extends Qe{get behavior(){return Tt}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(r=>ne(r)),i=e.as?e.as:n.map(jE);this.handle=r=>{const s={};for(let o=0;o<n.length;o++)s[i[o]]=n[o](r);this._propagate(s)}}}class LF extends Qe{get behavior(){return Sn}constructor(e){super(e),this.params=e;const n=new RegExp(e.regex),i=typeof e.as=="string"?[e.as]:e.as,r=ne(e.field);this.handle=s=>{const o=r(s);if(le(o)){const a=o.match(n);if(a){if(a.length-1!=i.length)throw new Error('The number of RegEx groups and the length of "as" do not match!');for(let l=0;l<i.length;l++)s[i[l]]=a[l+1]}else if(e.skipInvalidInput)for(let l=0;l<i.length;l++)s[i[l]]=void 0;else throw new Error(`"${o}" 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 o}, field content: "${o}".`);this._propagate(s)}}}class OF extends Qe{get behavior(){return Tt}constructor(e){super(e),this.params=e;const n=Me(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 i=Me(e.asValue);if(n.length!=i.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const r=e.skipRegex?new RegExp(e.skipRegex):void 0,s=e.asKey||"sample";let o,a,l;const c=h=>{const A=Object.keys(h);for(const m of n)if(!A.some(p=>m.test(p)))throw new Error(`No columns matching the regex ${m.toString()} found in the data!`);const d=new Map;for(const[m,p]of n.entries())for(const w of A){const C=p.exec(w)?.[1];if(C!==void 0){let y=d.get(C);y||(y=[],d.set(C,y)),y[m]=w}}o=[...d.entries()],a=A.filter(m=>!n.some(p=>p.test(m))&&!(r&&r.test(m)));const g=[...a.map(m=>JSON.stringify(m)+": datum["+JSON.stringify(m)+"]"),JSON.stringify(s)+": sampleId",...i.map((m,p)=>JSON.stringify(m)+`: datum[attrs[${p}]]`)];l=new Function("datum","sampleId","attrs",`return {
|
|
614
622
|
`+g.join(`,
|
|
615
623
|
`)+`
|
|
616
|
-
};`)},f=h=>{o||c(h);for(let A=0;A<o.length;A++){const[d,g]=o[A],m=l(h,d,g);this._propagate(m)}},u=h=>{c(h),f(h),this.handle=f};this.handle=u,this.beginBatch=h=>{Nd(h)&&(this.handle=u),super.beginBatch(h)}}}class eR extends Qe{get behavior(){return En}constructor(e){super(e),this.params=e,this.buffer=[]}reset(){super.reset(),this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const e=this.params,n=e.as||["y0","y1"],i=e.sort?ph(e.sort.field,e.sort.order):void 0,r=e.field?$(e.field):()=>1,s=e.groupby.map(f=>$(f)),o=k2(this.buffer,f=>s.map(u=>u(f)).join()).map(f=>f[1]);let a=f=>!0;if(e.baseField){const f=$(e.baseField);a=u=>f(u)!==null}let l,c;switch(e.offset){case"normalize":l=(f,u)=>f/u,c=(f,u)=>es(f,u);break;case"center":l=(f,u)=>f-u/2,c=(f,u)=>es(f,u);break;case"information":{const f=Math.log2(e.cardinality??4);l=(u,h)=>u/h,c=(u,h)=>{const d=es(u,w=>+!a(w)),g=es(u,h),m=g-d;let p=0;for(let w=0;w<u.length;w++){const C=u[w];if(a(C)){const y=h(C)/m;p-=y*Math.log2(y)}}return m/(f-(p+0))*(m/g)}}break;default:l=(f,u)=>f,c=(f,u)=>1}for(const f of o){i&&f.sort(i);const u=c(f,r);let h=0;for(const A of f){const d=h+r(A);a(A)&&(A[n[0]]=l(h,u),A[n[1]]=l(d,u),this._propagate(A),h=d)}}super.complete()}}class tR extends Qe{get behavior(){return Mt}constructor(e){super(e),this.params=e;const n=$(e.field??"sequence"),[i,r]=e.as??["pos","sequence"];this.handle=s=>{const o=Object.assign({},s,{[r]:"",[i]:0}),a=n(s);for(let l=0;l<a.length;l++){const c=Object.assign({},o);c[i]=l,c[r]=a.charAt(l),this._propagate(c)}}}}const l1={count:t=>t.length,valid:x2,sum:es,min:gl,max:dl,mean:P2,median:L2,variance:B2};class nR extends Qe{get behavior(){return Mt}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,i)=>{const r=$(n),s=l1[e.ops[i]];this.ops.push(o=>s(o,r)),this.as.push(e.as?e.as[i]:`${e.ops[i]}_${e.fields[i]}`)})}else this.ops.push(n=>l1.count(n)),this.as.push("count")}reset(){super.reset(),this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const n=this.params?.groupby;if(n?.length>0){const i=n.map(s=>$(s)),r=Oo(this.buffer,...i);for(const[s,o]of Mu(r)){const a={};for(let l=0;l<n.length;l++)a[n[l]]=s[l];this.ops.forEach((l,c)=>{a[this.as[c]]=l(o)}),this._propagate(a)}}else{const i={};this.ops.forEach((r,s)=>{i[this.as[s]]=r(this.buffer)}),this._propagate(i)}super.complete()}}const iR={aggregate:nR,collect:o1,coverage:MF,filterScoredLabels:LF,filter:OF,flatten:GF,flattenCompressedExons:YF,flattenDelimited:VF,flattenSequence:tR,formula:qF,identifier:Nl,linearizeGenomicCoordinate:a1,measureText:KF,pileup:WF,project:XF,regexExtract:ZF,regexFold:$F,sample:sm,stack:eR};function rR(t,e){const n=iR[t.type];if(n)return new n(t,e);throw new Error("Unknown transform: "+t.type)}function f1(t,e=[]){if(!h1(t)&&!A1(t))return;const n={...t.format};if(n.type??=A1(t)&&oR(e),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 sR(t){return ea(t)?.responseType??"text"}function oR(t){if(Array.isArray(t)&&(t=t[0]),t)return t.match(/\.(csv|tsv|json)/)?.[1]}const u1=t=>typeof t!="object"?aR:cR,aR=t=>({data:t}),cR=t=>t;function A1(t){return"url"in t}class Ci extends Rl{view;constructor(e){super(),this.view=e}get identifier(){}setLoadingStatus(e,n){this.view.context.dataFlow.loadingStatusRegistry.set(this.view,e,n)}get paramRuntime(){return this.view.paramRuntime}handle(e){throw new Error("Source does not handle incoming data!")}async load(){}repropagate(){this.load()}}function h1(t){return"values"in t}class lR extends Ci{constructor(e,n){if(super(n),this.params=e,typeof e.values=="string"&&!e?.format?.type)throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}get label(){return"inlineSource"}isTrivial(){const e=this.params.values,n=Array.isArray(e)?e[0]:e;return!!(n&&Object.keys(n).length==0&&n.constructor===Object)}updateDynamicData(e){this.#e(e)}loadSynchronously(){this.#e(this.params.values)}#e(e){let n=[],i=r=>r;if(Array.isArray(e))e.length>0&&(n=e,i=u1(e[0]));else if(typeof e=="object")n=[e];else if(typeof e=="string")n=kl(e,f1(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 r of n)this._propagate(i(r));this.complete()}async load(){this.loadSynchronously()}}function fR(t){return"url"in t}class uR extends Ci{constructor(e,n){super(n),this.params=ms(n.paramRuntime,e,()=>this.load(),i=>this.registerDisposer(i),{batchMode:"whenPropagated"}),this.baseUrl=n?.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}get label(){return"urlSource"}async#e(e){const n=pi(this.baseUrl,e.urlsFromFile),i=await fetch(n);if(!i.ok)throw new Error(`Cannot load "${n}": ${i.status} ${i.statusText}`);const r=await i.text();return kl(r,{type:e.type??"tsv"}).map(o=>typeof o=="string"?o:o.url).map(o=>pi(n,o))}async load(){const e=xe(this.params.url),n=typeof e=="object"&&"urlsFromFile"in e?await this.#e(e):(Array.isArray(e)?e:[e]).map(a=>pi(this.baseUrl,a)),i=f1(this.params,n),r=sR(i.type);if(n.length===0||!n[0]){this.reset(),this.complete();return}const s=async a=>{try{const l=await fetch(a);if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return typeof l[r]=="function"?l[r]():l.text()}catch(l){throw new Error(`Could not load data: ${a}. Reason: ${l.message}`)}},o=async(a,l)=>{try{const c=kl(a,i),f=c instanceof Promise?await c:c;this.beginBatch({type:"file",url:l});for(const u of f)this._propagate(u)}catch(c){throw console.warn(c),new Error(`Cannot parse: ${l}: ${c.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(n.map(a=>s(a).then(o))),this.setLoadingStatus("complete")}catch(a){this.setLoadingStatus("error",a.message)}this.complete()}}function AR(t){return"sequence"in t}class hR extends Ci{constructor(e,n){if(super(n),this.sequence=ms(n.paramRuntime,e.sequence,()=>this.loadSynchronously(),i=>this.registerDisposer(i),{batchMode:"whenPropagated"}),!("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=xe(this.sequence.as)??"data",n=xe(this.sequence.start)??0,i=xe(this.sequence.step)??1,r=xe(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let s=n;s<r;s+=i)this._propagate({[e]:s});this.complete()}async load(){this.loadSynchronously()}}class Pu extends Ci{initializedPromise=Promise.resolve();_lastLoadedDomain;constructor(e,n){if(super(e),n){if(n!=="x"&&n!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${n}. 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=n,this.scaleResolution=this.view.getScaleResolution(n),!this.scaleResolution){const r=[`The lazy data source cannot find a resolved scale for channel "${n}".`];throw this.view instanceof nt||r.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(r.join(" "))}const i=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",i),this.view.context.addBroadcastListener("layoutComputed",i)}get genome(){const e=this.scaleResolution.getScale();if("genome"in e){const n=e.genome();if(n)return n}throw new Error("No genome has been defined!")}onDomainChanged(e,n){}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(e){this._lastLoadedDomain=Array.from(this.scaleResolution.getDomain()),this.reset(),this.beginBatch({type:"file"});for(const n of e)for(const i of n)this._propagate(i);this.complete()}isDataReadyForDomain(e){const n=e[this.channel];if(!n||!this._lastLoadedDomain)return!1;const[i,r]=n[0]<=n[1]?n:[n[1],n[0]],[s,o]=this._lastLoadedDomain[0]<=this._lastLoadedDomain[1]?this._lastLoadedDomain:[this._lastLoadedDomain[1],this._lastLoadedDomain[0]];return i>=s&&r<=o}}class dR extends Pu{ticks=[];constructor(e,n){const i={...e};super(n,i.channel),this.params=e}get label(){return"axisTickSource"}async load(){this.ticks=null,this.onDomainChanged()}onDomainChanged(){const e=this.scaleResolution.getScale(),n=this.scaleResolution.getAxisLength(),i=this.params.axis,r=l=>25+60*jm(100,700,l),s=Ve(i.tickCount)?i.tickCount:Math.round(n/r(n)),o=um(e,s,i.tickMinStep),a=i.values?Am(e,i.values,o):$4(e,o);if(this.ticks==null||!Hi(a,this.ticks)){this.ticks=a;const l=tk(e,s,i.format);this.publishData([a.map(c=>({value:c,label:l(c)}))])}}}class gR extends Pu{constructor(e,n){super(n,e.channel)}get label(){return"axisGenomeSource"}async load(){this.publishData([this.genome.chromosomes])}}class to extends Pu{#e=new AbortController;#t=[0,0];#n=[0,0];#i=0;params;setupDebouncing(e){const n=()=>xe(e.debounce),i=e.debounceMode;if(i=="domain")this.onDomainChanged=na(this.onDomainChanged.bind(this),n,!1);else if(i=="window")this.loadInterval=na(this.loadInterval.bind(this),n,!1);else throw new Error("Invalid debounceMode: "+i)}onDomainChanged(e){this.#n=e;const n=xe(this.params?.windowSize)??-1;e[1]-e[0]>n||this.callIfWindowsChanged(e,n,async i=>{await this.initializedPromise,this.loadInterval(i)})}reloadLastDomain(){const e=this.#n;this.#n=[0,0],this.#t=[0,0],this._lastLoadedDomain=void 0,this.onDomainChanged(e)}async loadInterval(e){}publishData(e){const n=this._lastLoadedDomain;super.publishData(e),n&&(this._lastLoadedDomain=n)}async discretizeAndLoad(e,n){this.#e.abort(),this.setLoadingStatus("loading"),this.#e=new AbortController;const i=this.#e.signal,r=this.genome.continuousToDiscreteChromosomeIntervals(e);try{const s=await Promise.all(r.map(async o=>n(o,i)));if(!i.aborted)return this.setLoadingStatus("complete"),this._lastLoadedDomain=Array.from(e),s}catch(s){if(!i.aborted)throw this.setLoadingStatus("error",s.message),s}}callIfWindowsChanged(e,n,i){const r=[Math.max(Math.floor(e[0]/n)*n,0),Math.min(Math.ceil(e[1]/n)*n,this.genome.totalSize)],s=this.#t;(n!==this.#i||r[0]<s[0]||r[1]>s[1])&&(this.#t=r,this.#i=n,i(r))}}class pR extends to{constructor(e,n){const i={channel:"x",windowSize:7e3,debounce:200,debounceMode:"window",...e};if(super(n,i.channel),this.params=i,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(r=>{Promise.all([Promise.resolve().then(()=>RM),Promise.resolve().then(()=>so)]).then(([{IndexedFasta:s},{RemoteFile:o}])=>{const a=l=>new o(eo(l,this.view.getBaseUrl()));this.fasta=new s({fasta:a(this.params.url),fai:a(this.params.indexUrl??this.params.url+".fai")}),r()})})}get label(){return"bigWigSource"}async loadInterval(e){const n=await this.discretizeAndLoad(e,async(i,r)=>this.fasta.getSequence(i.chrom,i.startPos,i.endPos,{signal:r}).then(s=>{if(s!=null)return{chrom:i.chrom,start:i.startPos,sequence:s};console.log(`No sequence found for interval ${i.chrom}:${i.startPos}-${i.endPos}`)}));this.publishData([n.filter(i=>i!==void 0)])}}class mR extends to{#e=[];#t;constructor(e,n){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...e},r=xe(i.channel);if(super(n,r),this.params=ms(n.paramRuntime,i,s=>{s.has("url")?this.#n().then(()=>this.reloadLastDomain()):s.has("pixelsPerBin")&&this.reloadLastDomain()},s=>this.registerDisposer(s),{batchMode:"whenPropagated"}),!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),this.#n()}get label(){return"bigWigSource"}#n(){return this.initializedPromise=new Promise((e,n)=>{Promise.all([Promise.resolve().then(()=>Vy),Promise.resolve().then(()=>so)]).then(([{BigWig:i},{RemoteFile:r}])=>{this.#t=new i({filehandle:new r(eo(xe(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.#t.getHeader().then(s=>{this.#e=s.zoomLevels.map(o=>o.reductionLevel).reverse(),this.#e.push(1),this.setLoadingStatus("complete"),e()}).catch(s=>{this.load(),this.setLoadingStatus("error",`${xe(this.params.url)}: ${s.message}`),n(s)})})}),this.initializedPromise}async onDomainChanged(e){await this.initializedPromise;const n=this.scaleResolution.getAxisLength()||700,i=wR(e,n,this.#e),r=Math.max(i*n,5e3);this.callIfWindowsChanged(e,r,s=>this.loadInterval(s,i))}async loadInterval(e,n){const i=.5/n/xe(this.params.pixelsPerBin),r=await this.discretizeAndLoad(e,(s,o)=>this.#t.getFeatures(s.chrom,s.startPos,s.endPos,{scale:i,signal:o}).then(a=>a.map(l=>({chrom:s.chrom,start:l.start,end:l.end,score:l.score}))));r&&this.publishData(r)}}function wR(t,e,n){const i=(t[1]-t[0])/e;return n.find(r=>r<i)??n.at(-1)}class yR extends to{parser;bbi;parseLine;constructor(e,n){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...e},r=xe(i.channel);if(super(n,r),this.params=ms(n.paramRuntime,i,s=>{s.has("url")?this.#e().then(()=>this.reloadLastDomain()):s.has("windowSize")&&this.reloadLastDomain()},s=>this.registerDisposer(s),{batchMode:"whenPropagated"}),!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),this.#e()}get label(){return"bigBedSource"}#e(){return this.initializedPromise=new Promise((e,n)=>{Promise.all([Promise.resolve().then(()=>UT),Promise.resolve().then(()=>Vy),Promise.resolve().then(()=>so)]).then(([i,{BigBed:r},{RemoteFile:s}])=>{const o=i.default;this.bbi=new r({filehandle:new s(eo(xe(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async a=>{this.parser=new o({autoSql:a.autoSql});try{const l=CR(this.parser);this.parseLine=(c,f)=>l(c,f.start,f.end,f.rest)}catch{this.parseLine=(c,f)=>this.parser.parseLine(`${c} ${f.start} ${f.end} ${f.rest}`)}this.setLoadingStatus("complete"),e()}).catch(a=>{this.load(),this.setLoadingStatus("error",`${xe(this.params.url)}: ${a.message}`),n(a)})})}),this.initializedPromise}async loadInterval(e){const n=await this.discretizeAndLoad(e,async(i,r)=>this.bbi.getFeatures(i.chrom,i.startPos,i.endPos,{signal:r}).then(s=>s.map(o=>this.parseLine(i.chrom,o))));n&&this.publishData(n)}}function CR(t){const e=t.autoSql.fields.filter(w=>w.type).slice(3);let n=0,i="",r=0,s={};const o=" ",a=o.charCodeAt(0),l=48,c=45;function f(){let w=i.indexOf(o,n);w<0&&(w=r);const C=i.substring(n,w);return n=w+1,C}function u(){let w=0,C=i.charCodeAt(n),y=1;C===c&&(y=-1,n++,C=i.charCodeAt(n));do{if(C===a){n++;break}w=w*10+C-l,C=i.charCodeAt(++n)}while(n<r);return w*y}const h=e.map(w=>`${JSON.stringify(w.name)}: ${w.isNumeric?"0":"emptyString"}`),A=new Function(`
|
|
624
|
+
};`)},u=h=>{o||c(h);for(let A=0;A<o.length;A++){const[d,g]=o[A],m=l(h,d,g);this._propagate(m)}},f=h=>{c(h),u(h),this.handle=u};this.handle=f,this.beginBatch=h=>{Jd(h)&&(this.handle=f),super.beginBatch(h)}}}class UF extends Qe{get behavior(){return Sn}constructor(e){super(e),this.params=e,this.buffer=[]}reset(){super.reset(),this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const e=this.params,n=e.as||["y0","y1"],i=e.sort?QA(e.sort.field,e.sort.order):void 0,r=e.field?ne(e.field):()=>1,s=e.groupby.map(u=>ne(u)),o=l2(this.buffer,u=>s.map(f=>f(u)).join()).map(u=>u[1]);let a=u=>!0;if(e.baseField){const u=ne(e.baseField);a=f=>u(f)!==null}let l,c;switch(e.offset){case"normalize":l=(u,f)=>u/f,c=(u,f)=>ss(u,f);break;case"center":l=(u,f)=>u-f/2,c=(u,f)=>ss(u,f);break;case"information":{const u=Math.log2(e.cardinality??4);l=(f,h)=>f/h,c=(f,h)=>{const d=ss(f,w=>+!a(w)),g=ss(f,h),m=g-d;let p=0;for(let w=0;w<f.length;w++){const C=f[w];if(a(C)){const y=h(C)/m;p-=y*Math.log2(y)}}return m/(u-(p+0))*(m/g)}}break;default:l=(u,f)=>u,c=(u,f)=>1}for(const u of o){i&&u.sort(i);const f=c(u,r);let h=0;for(const A of u){const d=h+r(A);a(A)&&(A[n[0]]=l(h,f),A[n[1]]=l(d,f),this._propagate(A),h=d)}}super.complete()}}class _F extends Qe{get behavior(){return Tt}constructor(e){super(e),this.params=e;const n=ne(e.field??"sequence"),[i,r]=e.as??["pos","sequence"];this.handle=s=>{const o=Object.assign({},s,{[r]:"",[i]:0}),a=n(s);for(let l=0;l<a.length;l++){const c=Object.assign({},o);c[i]=l,c[r]=a.charAt(l),this._propagate(c)}}}}const Ew={count:t=>t.length,valid:i2,sum:ss,min:Il,max:El,mean:g2,median:p2,variance:r2};class zF extends Qe{get behavior(){return Tt}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,i)=>{const r=ne(n),s=Ew[e.ops[i]];this.ops.push(o=>s(o,r)),this.as.push(e.as?e.as[i]:`${e.ops[i]}_${e.fields[i]}`)})}else this.ops.push(n=>Ew.count(n)),this.as.push("count")}reset(){super.reset(),this.buffer=[]}handle(e){this.buffer.push(e)}complete(){const n=this.params?.groupby;if(n?.length>0){const i=n.map(s=>ne(s)),r=Go(this.buffer,...i);for(const[s,o]of Yf(r)){const a={};for(let l=0;l<n.length;l++)a[n[l]]=s[l];this.ops.forEach((l,c)=>{a[this.as[c]]=l(o)}),this._propagate(a)}}else{const i={};this.ops.forEach((r,s)=>{i[this.as[s]]=r(this.buffer)}),this._propagate(i)}super.complete()}}const GF={aggregate:zF,collect:yw,coverage:yF,filterScoredLabels:EF,filter:IF,flatten:BF,flattenCompressedExons:QF,flattenDelimited:kF,flattenSequence:_F,formula:FF,identifier:zl,linearizeGenomicCoordinate:Cw,measureText:NF,pileup:TF,project:PF,regexExtract:LF,regexFold:OF,sample:gm,stack:UF};function HF(t,e){const n=GF[t.type];if(n)return new n(t,e);throw new Error("Unknown transform: "+t.type)}const YF=new Set(["csv","tsv","dsv"]),Iw=new Set(["gz","bgz","bgzf"]);function xw(t,e=[]){if(!Qw(t)&&!Dw(t))return;const n={...t.format};if(n.type??=Dw(t)&&VF(e),n.parse===void 0&&jF(n.type)&&(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 vw(t){return ci(t)?.responseType??"text"}function VF(t){if(Array.isArray(t)&&(t=t[0]),t){const e=Bw(t).split("/").pop()?.toLowerCase();if(!e)return;const n=e.split(".");for(;n.length>1&&Iw.has(n.at(-1));)n.pop();const i=n.at(-1);if(i&&ci(i))return i}}function JF(t){const e=Bw(t).split("/").pop()?.toLowerCase();if(!e)return!1;const n=e.split(".").at(-1);return!!n&&Iw.has(n)}function Bw(t){return t.replace(/[?#].*$/,"")}const Sw=t=>typeof t!="object"?qF:KF,qF=t=>({data:t}),KF=t=>t;function Dw(t){return"url"in t}function jF(t){return YF.has(t)}class vi extends _l{view;constructor(e){super(),this.view=e}get identifier(){}setLoadingStatus(e,n){this.view.context.dataFlow.loadingStatusRegistry.set(this.view,e,n)}get paramRuntime(){return this.view.paramRuntime}handle(e){throw new Error("Source does not handle incoming data!")}async load(){}repropagate(){this.load()}}function Qw(t){return"values"in t}class WF extends vi{constructor(e,n){if(super(n),this.params=e,typeof e.values=="string"&&!e?.format?.type)throw new Error("Data format type (csv, dsv, ...) must be specified if a string is provided!")}get label(){return"inlineSource"}isTrivial(){const e=this.params.values,n=Array.isArray(e)?e[0]:e;return!!(n&&Object.keys(n).length==0&&n.constructor===Object)}updateDynamicData(e){this.#e(e)}loadSynchronously(){this.#e(this.params.values)}#e(e){let n=[],i=r=>r;if(Array.isArray(e))e.length>0&&(n=e,i=Sw(e[0]));else if(typeof e=="object")n=[e];else if(typeof e=="string")n=Ol(e,xw(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 r of n)this._propagate(i(r));this.complete()}async load(){this.loadSynchronously()}}const XF=new Set(["application/gzip","application/x-gzip"]),ZF=new TextDecoder;class $F extends vi{constructor(e,n){super(n),this.params=Es(n.paramRuntime,e,()=>this.load(),i=>this.registerDisposer(i),{batchMode:"whenPropagated"}),this.baseUrl=n?.getBaseUrl()}get identifier(){return JSON.stringify({params:this.params,baseUrl:this.baseUrl})}get label(){return"urlSource"}async#e(e){const n=zn(this.baseUrl,e.urlsFromFile),i={type:e.type??"tsv"},r=await fetch(n);if(!r.ok)throw new Error(`Cannot load "${n}": ${r.status} ${r.statusText}`);const s=await Rw(r,n,vw(i.type));return Ol(s,i).map(a=>typeof a=="string"?a:a.url).map(a=>zn(n,a))}async load(){const e=ve(this.params.url),n=typeof e=="object"&&"urlsFromFile"in e?await this.#e(e):(Array.isArray(e)?e:[e]).map(a=>zn(this.baseUrl,a)),i=xw(this.params,n),r=vw(i.type);if(n.length===0||!n[0]){this.reset(),this.complete();return}const s=async a=>{try{const l=await fetch(a);if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);return await Rw(l,a,r)}catch(l){throw new Error(`Could not load data: ${a}. Reason: ${l.message}`)}},o=async(a,l)=>{try{const c=Ol(a,i),u=c instanceof Promise?await c:c;this.beginBatch({type:"file",url:l});for(const f of u)this._propagate(f)}catch(c){throw console.warn(c),new Error(`Cannot parse: ${l}: ${c.message}`)}};this.setLoadingStatus("loading"),this.reset();try{await Promise.all(n.map(a=>s(a).then(o))),this.setLoadingStatus("complete")}catch(a){this.setLoadingStatus("error",a.message)}this.complete()}}function eN(t){return"url"in t}function tN(t){return t.length>=10&&t[0]==31&&t[1]==139&&t[2]==8&&(t[3]&224)==0}function nN(t){return t?XF.has(t.split(";")[0].trim().toLowerCase()):!1}function iN(t){return t?t.toLowerCase().split(",").some(e=>e.trim()=="gzip"):!1}function kw(t){return new Uint8Array(t).buffer}async function rN(t){if(typeof DecompressionStream!="function")throw new Error("Gzip-compressed URL data requires DecompressionStream support.");const e=new Response(kw(t)).body;if(!e)throw new Error("Cannot create a readable stream for gzip decompression.");const n=e.pipeThrough(new DecompressionStream("gzip"));return new Uint8Array(await new Response(n).arrayBuffer())}async function Rw(t,e,n){if(!(JF(e)||nN(t.headers.get("content-type"))||iN(t.headers.get("content-encoding"))))return sN(t,n);const r=new Uint8Array(await t.arrayBuffer()),s=tN(r)?await rN(r):r;return oN(s,n)}function sN(t,e){return typeof t[e]=="function"?t[e]():t.text()}function oN(t,e){return e=="arrayBuffer"?kw(t):ZF.decode(t)}function aN(t){return"sequence"in t}class cN extends vi{constructor(e,n){if(super(n),this.sequence=Es(n.paramRuntime,e.sequence,()=>this.loadSynchronously(),i=>this.registerDisposer(i),{batchMode:"whenPropagated"}),!("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=ve(this.sequence.as)??"data",n=ve(this.sequence.start)??0,i=ve(this.sequence.step)??1,r=ve(this.sequence.stop);this.reset(),this.beginBatch({type:"file"});for(let s=n;s<r;s+=i)this._propagate({[e]:s});this.complete()}async load(){this.loadSynchronously()}}class hc extends vi{initializedPromise=Promise.resolve();_lastLoadedDomain;constructor(e,n){if(super(e),n){if(n!=="x"&&n!=="y")throw new Error(`Invalid channel specified for the lazy data source: ${n}. 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=n,this.scaleResolution=this.view.getScaleResolution(n),!this.scaleResolution){const r=[`The lazy data source cannot find a resolved scale for channel "${n}".`];throw this.view instanceof Je||r.push('Make sure the view has a "shared" scale resolution as it is not a unit view.'),new Error(r.join(" "))}const i=()=>{this.view.isVisible()&&this.onDomainChanged(this.scaleResolution.getDomain(),this.scaleResolution.getComplexDomain())};this.scaleResolution.addEventListener("domain",i),this.view.context.addBroadcastListener("layoutComputed",i)}get genome(){const e=this.scaleResolution.getScale();if("genome"in e){const n=e.genome();if(n)return n}throw new Error("No genome has been defined!")}onDomainChanged(e,n){}requestRender(){this.view.context.animator.requestRender()}async load(){this.reset(),this.complete()}publishData(e){this._lastLoadedDomain=Array.from(this.scaleResolution.getDomain()),this.reset(),this.beginBatch({type:"file"});for(const n of e)for(const i of n)this._propagate(i);this.complete()}isDataReadyForDomain(e){const n=e[this.channel];if(!n||!this._lastLoadedDomain)return!1;const[i,r]=n[0]<=n[1]?n:[n[1],n[0]],[s,o]=this._lastLoadedDomain[0]<=this._lastLoadedDomain[1]?this._lastLoadedDomain:[this._lastLoadedDomain[1],this._lastLoadedDomain[0]];return i>=s&&r<=o}}class lN extends hc{ticks=[];constructor(e,n){const i={...e};super(n,i.channel),this.params=e}get label(){return"axisTickSource"}async load(){this.ticks=null,this.onDomainChanged()}onDomainChanged(){const e=this.scaleResolution.getScale(),n=this.scaleResolution.getAxisLength(),i=this.params.axis,r=l=>25+60*lw(100,700,l),s=qe(i.tickCount)?i.tickCount:Math.round(n/r(n)),o=Em(e,s,i.tickMinStep),a=i.values?Im(e,i.values,o):N4(e,o);if(this.ticks==null||!Bn(a,this.ticks)){this.ticks=a;const l=T4(e,s,i.format);this.publishData([a.map(c=>({value:c,label:l(c)}))])}}}class uN extends hc{constructor(e,n){super(n,e.channel)}get label(){return"axisGenomeSource"}async load(){this.publishData([this.genome.chromosomes])}}class mr extends hc{#e=new AbortController;#t=[0,0];#n=[0,0];#i=0;params;setupDebouncing(e){const n=()=>ve(e.debounce),i=e.debounceMode;if(i=="domain")this.onDomainChanged=sa(this.onDomainChanged.bind(this),n,!1);else if(i=="window")this.loadInterval=sa(this.loadInterval.bind(this),n,!1);else throw new Error("Invalid debounceMode: "+i)}onDomainChanged(e){this.#n=e;const n=ve(this.params?.windowSize)??-1;e[1]-e[0]>n||this.callIfWindowsChanged(e,n,async i=>{await this.initializedPromise,this.loadInterval(i)})}reloadLastDomain(){const e=this.#n;this.#n=[0,0],this.#t=[0,0],this._lastLoadedDomain=void 0,this.onDomainChanged(e)}async loadInterval(e){}publishData(e){const n=this._lastLoadedDomain;super.publishData(e),n&&(this._lastLoadedDomain=n)}async discretizeAndLoad(e,n){this.#e.abort(),this.setLoadingStatus("loading"),this.#e=new AbortController;const i=this.#e.signal,r=this.genome.continuousToDiscreteChromosomeIntervals(e);try{const s=await Promise.all(r.map(async o=>n(o,i)));if(!i.aborted)return this.setLoadingStatus("complete"),this._lastLoadedDomain=Array.from(e),s}catch(s){if(!i.aborted)throw this.setLoadingStatus("error",s.message),s}}callIfWindowsChanged(e,n,i){const r=[Math.max(Math.floor(e[0]/n)*n,0),Math.min(Math.ceil(e[1]/n)*n,this.genome.totalSize)],s=this.#t;(n!==this.#i||r[0]<s[0]||r[1]>s[1])&&(this.#t=r,this.#i=n,i(r))}}class fN extends mr{constructor(e,n){const i={channel:"x",windowSize:7e3,debounce:200,debounceMode:"window",...e};if(super(n,i.channel),this.params=i,!this.params.url)throw new Error("No URL provided for IndexedFastaSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(r=>{Promise.all([Promise.resolve().then(()=>r5),Promise.resolve().then(()=>uo)]).then(([{IndexedFasta:s},{RemoteFile:o}])=>{const a=l=>new o(oo(l,this.view.getBaseUrl()));this.fasta=new s({fasta:a(this.params.url),fai:a(this.params.indexUrl??this.params.url+".fai")}),r()})})}get label(){return"bigWigSource"}async loadInterval(e){const n=await this.discretizeAndLoad(e,async(i,r)=>this.fasta.getSequence(i.chrom,i.startPos,i.endPos,{signal:r}).then(s=>{if(s!=null)return{chrom:i.chrom,start:i.startPos,sequence:s};console.log(`No sequence found for interval ${i.chrom}:${i.startPos}-${i.endPos}`)}));this.publishData([n.filter(i=>i!==void 0)])}}class hN extends mr{#e=[];#t;constructor(e,n){const i={pixelsPerBin:2,channel:"x",debounce:200,debounceMode:"window",...e},r=ve(i.channel);if(super(n,r),this.params=Es(n.paramRuntime,i,s=>{s.has("url")?this.#n().then(()=>this.reloadLastDomain()):s.has("pixelsPerBin")&&this.reloadLastDomain()},s=>this.registerDisposer(s),{batchMode:"whenPropagated"}),!this.params.url)throw new Error("No URL provided for BigWigSource");this.setupDebouncing(this.params),this.#n()}get label(){return"bigWigSource"}#n(){return this.initializedPromise=new Promise((e,n)=>{Promise.all([Promise.resolve().then(()=>vC),Promise.resolve().then(()=>uo)]).then(([{BigWig:i},{RemoteFile:r}])=>{this.#t=new i({filehandle:new r(oo(ve(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.#t.getHeader().then(s=>{this.#e=s.zoomLevels.map(o=>o.reductionLevel).reverse(),this.#e.push(1),this.setLoadingStatus("complete"),e()}).catch(s=>{this.load(),this.setLoadingStatus("error",`${ve(this.params.url)}: ${s.message}`),n(s)})})}),this.initializedPromise}async onDomainChanged(e){await this.initializedPromise;const n=this.scaleResolution.getAxisLength()||700,i=AN(e,n,this.#e),r=Math.max(i*n,5e3);this.callIfWindowsChanged(e,r,s=>this.loadInterval(s,i))}async loadInterval(e,n){const i=.5/n/ve(this.params.pixelsPerBin),r=await this.discretizeAndLoad(e,(s,o)=>this.#t.getFeatures(s.chrom,s.startPos,s.endPos,{scale:i,signal:o}).then(a=>a.map(l=>({chrom:s.chrom,start:l.start,end:l.end,score:l.score}))));r&&this.publishData(r)}}function AN(t,e,n){const i=(t[1]-t[0])/e;return n.find(r=>r<i)??n.at(-1)}class dN extends mr{parser;bbi;parseLine;constructor(e,n){const i={channel:"x",windowSize:1e6,debounce:200,debounceMode:"window",...e},r=ve(i.channel);if(super(n,r),this.params=Es(n.paramRuntime,i,s=>{s.has("url")?this.#e().then(()=>this.reloadLastDomain()):s.has("windowSize")&&this.reloadLastDomain()},s=>this.registerDisposer(s),{batchMode:"whenPropagated"}),!this.params.url)throw new Error("No URL provided for BigBedSource");this.setupDebouncing(this.params),this.#e()}get label(){return"bigBedSource"}#e(){return this.initializedPromise=new Promise((e,n)=>{Promise.all([Promise.resolve().then(()=>SC),Promise.resolve().then(()=>vC),Promise.resolve().then(()=>uo)]).then(([i,{BigBed:r},{RemoteFile:s}])=>{const o=i.default;this.bbi=new r({filehandle:new s(oo(ve(this.params.url),this.view.getBaseUrl()))}),this.setLoadingStatus("loading"),this.bbi.getHeader().then(async a=>{this.parser=new o({autoSql:a.autoSql});try{const l=gN(this.parser);this.parseLine=(c,u)=>l(c,u.start,u.end,u.rest)}catch{this.parseLine=(c,u)=>this.parser.parseLine(`${c} ${u.start} ${u.end} ${u.rest}`)}this.setLoadingStatus("complete"),e()}).catch(a=>{this.load(),this.setLoadingStatus("error",`${ve(this.params.url)}: ${a.message}`),n(a)})})}),this.initializedPromise}async loadInterval(e){const n=await this.discretizeAndLoad(e,async(i,r)=>this.bbi.getFeatures(i.chrom,i.startPos,i.endPos,{signal:r}).then(s=>s.map(o=>this.parseLine(i.chrom,o))));n&&this.publishData(n)}}function gN(t){const e=t.autoSql.fields.filter(w=>w.type).slice(3);let n=0,i="",r=0,s={};const o=" ",a=o.charCodeAt(0),l=48,c=45;function u(){let w=i.indexOf(o,n);w<0&&(w=r);const C=i.substring(n,w);return n=w+1,C}function f(){let w=0,C=i.charCodeAt(n),y=1;C===c&&(y=-1,n++,C=i.charCodeAt(n));do{if(C===a){n++;break}w=w*10+C-l,C=i.charCodeAt(++n)}while(n<r);return w*y}const h=e.map(w=>`${JSON.stringify(w.name)}: ${w.isNumeric?"0":"emptyString"}`),A=new Function(`
|
|
617
625
|
const emptyString = "";
|
|
618
626
|
return function makeTemplate(chrom, chromStart, chromEnd) {
|
|
619
627
|
return {
|
|
@@ -623,43 +631,47 @@ chrM 16299`};function G4(t){if(!(t in am))throw new Error(`Unknown assembly: ${t
|
|
|
623
631
|
${h.join(`,
|
|
624
632
|
`)}
|
|
625
633
|
}
|
|
626
|
-
};`)(),d=e.map(w=>{const C=w.type,y=JSON.stringify(w.name);if(["ubyte","int","uint"].includes(C))return`d[${y}] = parseInt();`;if(w.isNumeric)return`d[${y}] = Number(parseString());`;if(["char","string","lstring"].includes(C))return`d[${y}] = parseString();`;throw new Error("Unsupported type: "+C)}),g=
|
|
634
|
+
};`)(),d=e.map(w=>{const C=w.type,y=JSON.stringify(w.name);if(["ubyte","int","uint"].includes(C))return`d[${y}] = parseInt();`;if(w.isNumeric)return`d[${y}] = Number(parseString());`;if(["char","string","lstring"].includes(C))return`d[${y}] = parseString();`;throw new Error("Unsupported type: "+C)}),g=pN(d,50).map((w,C)=>Function("parseInt","parseString",`return function parseFieldChunk${C}(d) {
|
|
627
635
|
${w.join(`
|
|
628
636
|
`)}
|
|
629
|
-
}`)(u
|
|
630
|
-
`)+" };");return n.properties=e,n}function g1(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 ac extends Qe{get behavior(){return Mt}#e;#t=e=>e;constructor(){super({type:"clone"});const e=n=>{const i=g1(n);(!this.#e||!Hi(i,this.#e))&&(this.#e=i,this.#t=OR(n));const r=this.#t;this.handle=s=>this._propagate(r(s)),this.handle(n)};this.handle=e,this.beginBatch=n=>{Nd(n)&&(this.handle=e),super.beginBatch(n)}}}function UR(t){return"name"in t}class p1 extends Ci{#e;constructor(e,n,i){super(n),this.provider=i,this.params=e}get identifier(){return this.params.name}get label(){return"namedSource"}updateDynamicData(e){this.#e=e,this.loadSynchronously()}loadSynchronously(){const e=this.#e??this.provider(this.params.name)??[];let n=i=>i;if(Array.isArray(e))e.length>0&&(n=u1(e[0]));else throw new Error(`Named data "${this.params.name}" is not an array!`);this.reset(),this.beginBatch({type:"file"});for(const i of e)this._propagate(n(i));this.complete()}async load(){this.loadSynchronously()}}class m1{#e;#t;loadingStatusRegistry;constructor(){this.#e=new Set,this.#t=new Set,this.loadingStatusRegistry=new Fd}get dataSources(){return[...this.#e]}get collectors(){return[...this.#t]}replaceDataSources(e){this.#e=new Set(e)}addDataSource(e){this.#e.add(e)}removeDataSource(e){e.disposeSubtree(),this.#e.delete(e)}addCollector(e){this.#t.add(e)}removeCollector(e){e.parent&&e.parent.removeChild(e),e.disposeSubtree(),e.observers.clear(),this.#t.delete(e)}pruneCollectorBranch(e){let n=e.parent;for(n&&n.removeChild(e),e.disposeSubtree();n&&n.children.length===0;){const i=n;n=i.parent,n?(n.removeChild(i),i.dispose()):i instanceof Ci?this.removeDataSource(i):i.dispose()}}findNamedDataSource(e){let n;for(const i of this.#e.values())if(i instanceof p1&&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}if(n)return{dataSource:n}}}function _R(t,e){const n=new Map,i=[];for(const r of t)n.set(r,{ref:r,children:[]});for(const r of n.values()){const s=n.get(e(r.ref));s?s.children.push(r):i.push(r)}return i}function w1(t,e,n){const i=e.preOrder?.(t);if(i)return i;for(const r of n(t)){const s=w1(r,e,n);if(s==="stop")return s}return e.postOrder?.(t)}function GR(t,e){return w1(t,e,n=>n.children)}function zR(t,e,n,i){const r=[],s=[];let o;const a=e??new m1,l=[],c=i??(()=>!0);function f(p,w=()=>{}){if(!o)throw w()||new Error("Cannot append data flow node, no parent exist!");return o.addChild(p),o=p,r.push(p),p}function u(p,w){return f(p,()=>new Error("Cannot append a transform because no (inherited) data are available! "))}function h(p,w){for(const C of p){let y;try{y=rR(C,w)}catch(b){throw console.warn(b),new Error(`Cannot initialize "${C.type}" transform: ${b}`)}y.behavior&En&&u(new ac),u(y)}}function A(){return r.findLastIndex(p=>p instanceof Nl)>r.findLastIndex(p=>p instanceof Ci)}const d=p=>{if(!c(p)){const w=p.flowHandle?.node;if(w){w!==o&&(o=w,r.push(w));return}if(p.spec.data||p.spec.transform||p instanceof nt)throw new Error("Cannot reuse missing flow nodes for "+p.getPathString());return}if(p.spec.data){const w=p.flowHandle?.dataSource;w&&w.view===p&&!w.identifier&&a.removeDataSource(w);const C=UR(p.spec.data)?new p1(p.spec.data,p,p.context.getNamedDataFromProvider):vR(p.spec.data,p);o=C,r.push(C),a.addDataSource(C),p.flowHandle??={},p.flowHandle.dataSource=C}if(p.spec.transform&&h(p.spec.transform,p),p instanceof nt){if(!o)throw new Error(`A unit view (${p.getPathString()}) has no (inherited) data source`);const w=YR(p);if(w){l.push(w.rewrite);for(const b of w.transforms)u(b)}p.mark.isPickingParticipant()&&!A()&&(u(new ac),u(new Nl({type:"identifier"})));const C=new o1({type:"collect",groupby:p.getFacetFields(),sort:VR(p,w?.rewrittenEncoding)});f(C);const y=p.flowHandle?.collector;y&&a.removeCollector(y),a.addCollector(C),p.flowHandle??={},p.flowHandle.collector=C}o&&(p.flowHandle??={},p.flowHandle.node=o)},g=HR(t,n),m=_R(g,p=>p.dataParent);for(const p of m)GR(p,{preOrder:w=>{s.push({view:w.ref,nodeStackDepth:r.length}),d(w.ref)},postOrder:()=>{const{nodeStackDepth:w}=s.pop();r.length=w,o=r.at(-1)}});return l.forEach(p=>p()),a}function HR(t,e){if(!e)return t.getDescendants();const n=[];return t.visit(i=>{if(!e(i))return On;n.push(i)}),n}function YR(t){const e=[],n={},i=t.mark.encoding,r=t.getEncoding(),s=[];for(const[a,l]of Object.entries(i)){const c=a;In(c)!==c&&!(c in r)||ps(c)&&!Array.isArray(l)&&Yd(l)&&s.push({channel:c,chromPosDef:l})}const o=Oo(s,a=>In(a.channel),a=>a.chromPosDef.chrom);for(const[a,l]of o.entries())for(const[c,f]of l.entries()){const u=[],h=[],A=[];for(const{channel:d,chromPosDef:g}of f){const m=C=>C.replace(/[^A-Za-z0-9_]/g,""),p=["_linearized_",m(g.chrom),"_",m(g.pos)].join(""),w={...t.spec.encoding?.[d]??r[d]??i[d]??{},field:p};delete w.chrom,delete w.pos,!w.type&&g.type&&(w.type=g.type),n[d]=w,u.push(g.pos),A.push(g.offset??0),h.push(p)}e.push(new ac),e.push(new a1({type:"linearizeGenomicCoordinate",channel:a,chrom:c,pos:u,offset:A,as:h},t))}return e.length?{transforms:e,rewrittenEncoding:n,rewrite:()=>{t.spec.encoding={...t.spec.encoding,...n},uu(t.mark,"encoding")}}:void 0}function VR(t,e){const n={...t.getEncoding(),...e}.x;if(pt(n)&&t.getScaleResolution("x")?.isZoomable()){if(tn(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!Yi(n)){if(Vi(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function y1(t,e=void 0){if(t.parent!==e)return!1;for(const n of t.children)if(!y1(n,t))return!1;return!0}function Lu(t,e=!1){if(t.behavior&Fl&&(e=!0),t instanceof ac)if(e)e=!1;else{const n=t.children[0];t.excise(),n&&Lu(n,e);return}t.behavior&Mt&&(e=!1);for(let n=0,i=t.children.length;n<i;n++)Lu(t.children[n],e||i>1)}function JR(t){const e=t.dataSources,n=new Map;for(const s of e)s.identifier&&!n.has(s.identifier)&&n.set(s.identifier,s);const i=new Set,r=new Map;for(const s of e)if(s.identifier){const o=n.get(s.identifier);o&&(o!==s&&o.adoptChildrenOf(s),i.add(o),r.set(s,o))}else i.add(s),r.set(s,s);return t.replaceDataSources(i),r}function qR(t){if(Lu(t),!y1(t))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function KR(t){const e=JR(t);for(const n of t.dataSources)qR(n);return e}const Ou=new WeakMap,Uu=new WeakMap;function C1(t,e){const n=Ou.get(t);if(n){if(!e?.queueReload)return n;const r=Uu.get(t);if(r)return r;const s=n.catch(()=>{}).then(()=>C1(t)).finally(()=>{Uu.delete(t)});return Uu.set(t,s),s}const i=Promise.resolve().then(()=>t.load()).finally(()=>{Ou.delete(t)});return Ou.set(t,i),i}function jR(t,e){for(const n of t.getDescendants()){const i=n.flowHandle;if(!i)continue;const r=i.dataSource;r&&(i.dataSource=e.get(r)??r)}}function _u(t,e,n,i){const r=i??(()=>!0),o=E1(t,n).filter(r);if(o.length===0)return{dataFlow:e,unitViews:[],dataSources:new Set,graphicsPromises:[]};const a=new Set(o);for(const A of o)A._setDataInitializationState("pending");let l;try{l=zR(t,e,n,d=>a.has(d));const A=KR(l);jR(t,A)}catch(A){for(const d of o)d._setDataInitializationState("none");throw A}const c=WR(o);for(const A of c)A.visit(d=>d.initializeOnce());const f=o.filter(A=>A instanceof nt),u=[],h=!!t.context.glHelper;for(const A of f){const d=A.mark;d.initializeEncoders(),A.registerDomainSubscriptions(),h&&u.push(d.initializeGraphics().then(()=>d));const g=m=>{if(d.initializeData(),h)try{d.updateGraphicsData()}catch(p){throw p.view=A,p}A.context.animator.requestRender()};A.registerDisposer(A.flowHandle.collector.observe(g))}for(const A of o)A._setDataInitializationState("ready");return{dataFlow:l,unitViews:f,dataSources:c,graphicsPromises:u}}function WR(t,e){const n=Array.isArray(t)?t:E1(t,e),i=new Set;for(const r of n){let s=r;for(;s&&!s.flowHandle?.dataSource;)s=s.dataParent;s?.flowHandle?.dataSource&&i.add(s.flowHandle.dataSource)}return i}function XR(t,e){const n=new Set;return t.visit(i=>{if(e&&!e(i))return On;if(i.flowHandle?.dataSource)return n.add(i.flowHandle.dataSource),On}),n}function Gu(t,e,n,i){return e||(e=XR(t,n)),Promise.all(Array.from(e).map(r=>C1(r,i))).then(r=>(ZR(t),r))}function E1(t,e){const n=[];return e?(t.visit(i=>{if(!e(i))return On;n.push(i)}),n):t.getDescendants()}function ZR(t){const e={type:"subtreeDataReady",payload:{subtreeRoot:t}};t.visit(n=>n.handleBroadcast(e))}async function $R(t,e,n,i){const r=a=>a.isConfiguredVisible(),{dataFlow:s,graphicsPromises:o}=_u(t,e,r);return i(s),await n.waitUntilReady(),await Gu(t,new Set(s.dataSources),r),await Nu(o),s}async function e6(t,e,n){const i=h=>h.isConfiguredVisible(),s=t6(t,i).filter(h=>h.getDataInitializationState()==="none");if(s.length===0)return e;const o=new Set(s),a=h=>o.has(h),l=new Set,c=[];for(const h of s){if(h.spec.data){c.push(h);continue}const A=i6(h);A?l.add(A):c.push(h)}const{dataFlow:f,graphicsPromises:u}=_u(t,e,i,a);await n.waitUntilReady();for(const h of l)h.repropagate();if(c.length){const h=n6(c);await Promise.all(Array.from(h.entries()).map(([A,d])=>Gu(A,d,void 0,{queueReload:!0})))}return await Nu(u),f}function t6(t,e){const n=[];return t.visit(i=>{if(!e(i))return On;n.push(i)}),n}function n6(t){const e=new Map;for(const n of t){let i=n;for(;i&&!i.flowHandle?.dataSource;)i=i.dataParent;if(!i?.flowHandle?.dataSource){if(n.spec.data)throw new Error("No data source found for view "+n.getPathString());continue}let r=e.get(i);r||(r=new Set,e.set(i,r)),r.add(i.flowHandle.dataSource)}return e}function i6(t){let e=t.dataParent;for(;e;){const n=e.flowHandle?.collector;if(n)return n.completed?n:void 0;e=e.dataParent}}class r6{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 i;for(;i=n.shift();)i(e);this._renderCallback(e)}))}transition(e){return Ok({requestAnimationFrame:n=>this.requestTransition(n),...e})}}function zu(t,e,n,i,r){let s=0,o=!0,a=structuredClone(r),l=a;function c(h,A,d,g){return A+(h-A)*Math.pow(2,-d/g)}function f(h){if(o)return;const A=h-s;s=h;for(const g of Object.keys(l))a[g]=c(a[g],l[g],A,n);e(a);let d=-1/0;for(const g of Object.keys(l))d=Math.max(d,Math.abs(l[g]-a[g]));d<i?(a=l,e(a),o=!0,d!=0&&t.requestRender()):t.requestTransition(g=>f(g))}function u(h){l=h,o&&(o=!1,s=+document.timeline.currentTime,f(s))}return u.stop=()=>{o=!0},u}class s6{constructor(e){this.genomes=new Map,this.baseUrl=e}async initialize(e){const n=new H4(e);return this.genomes.set(n.name,n),Promise.all([...this.genomes.values()].map(i=>i.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 o6="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+Hf8dujMX9ryrNx4KEREFgGXd9BQoWu97S0vLbU36T4EOD6NwGf78R0REAZBoxWaJ3qqDA9Kcx3p9YXW1sLLSCoBM5jIV+i7/gwCWl8Nbzs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3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",a6={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class c6{constructor(e){this._webGLHelper=e,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new Wt([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:If(c1),texture:e?this._createTextureNow(o6):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(e,n="normal",i="regular"){if(le(i)&&(i=a6[i.toLowerCase()],!i))throw new Error("Unknown font weight: "+i);const r={family:e,style:n,weight:i};let s=this._fonts.get(r);return s||(s={metrics:void 0,texture:void 0},this._fonts.set(r,s),this._promises.push(this._loadFontEntry(s,r))),s}async _loadFontEntry(e,n){try{const i=await this._loadMetadata(n.family),r=f6(i,n),s=this.fontRepository+I1(n.family)+"/"+r.replace(/\.\w+/,""),o=this._createTexture(s+".png"),a=this._loadFont(s+".json");e.texture=await o,e.metrics=await a}catch{console.warn(`Cannot load font: "${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(i=>{if(!i.ok)throw new Error("Could not load font: "+i.status);return i}).then(i=>i.json()).then(i=>If(i)),this._fontPromises.set(e,n)),n}_loadMetadata(e){const n=I1(e);let i=this._metadataPromises.get(n);if(!i){const r=this.fontRepository+n+"/METADATA.pb";i=fetch(r).then(s=>{if(!s.ok)throw new Error("Could not load font metadata. Response status: "+s.status+", url: "+r);return s}).then(s=>s.text()).then(s=>l6(s)).catch(s=>{console.warn(s.message)}),this._metadataPromises.set(n,i)}return i}getDefaultFont(){return this._defaultFontEntry}_createTexture(e){const n=this._webGLHelper.gl;return new Promise((i,r)=>{bs(n,{src:e,min:n.LINEAR},(s,o,a)=>{s?r(s):i(o)})})}_createTextureNow(e){const n=this._webGLHelper.gl;let i;const r=new Promise((s,o)=>{i=bs(n,{src:e,min:n.LINEAR},(a,l,c)=>{a?o(a):s(l)})});return this._promises.push(r),i}}function I1(t){return t.toLowerCase().replaceAll(/[^\w]/g,"")}function l6(t){const e=t.split(`
|
|
631
|
-
`),n=[];let i;for(const r of e)if(r.startsWith("fonts {")&&(i={name:void 0,style:void 0,weight:void 0,filename:void 0,post_script_name:void 0,full_name:void 0,copyright:void 0}),r.startsWith("}")&&(n.push(i),i=void 0),i){let s=r.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(s){const o=s[1];i[o]=s[2]}if(s=r.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),s){const o=s[1];i[o]=+s[2]}}return n}function
|
|
632
|
-
`))if(r.startsWith(">"))i={identifier:r.match(/>(\S+)/)[1],sequence:""},n.push(i);else if(i)i.sequence+=r.trim();else throw new Error("Invalid fasta file!");return n}const
|
|
637
|
+
}`)(f,u));function m(w){i=w,r=w.length,n=0}function p(w,C,y,I){m(I),s=A(w,C,y);for(const x of g)x(s);return s}return p}function pN(t,e){return Array.from({length:Math.ceil(t.length/e)},(n,i)=>t.slice(i*e,i*e+e))}class mN extends mr{#e;chrPrefixFixer=e=>e;constructor(e,n){const i={channel:"x",windowSize:2e4,debounce:200,debounceMode:"domain",...e};if(super(n,i.channel),this.params=i,!this.params.url)throw new Error("No URL provided for BamSource");this.setupDebouncing(this.params),this.initializedPromise=new Promise(r=>{Promise.all([Promise.resolve().then(()=>D9),Promise.resolve().then(()=>uo)]).then(([{BamFile:s},{RemoteFile:o}])=>{const a=l=>new o(oo(l,this.view.getBaseUrl()));this.#e=new s({bamFilehandle:a(this.params.url),baiFilehandle:a(this.params.indexUrl??this.params.url+".bai")}),this.#e.getHeader().then(l=>{const c=this.genome.hasChrPrefix(),u=this.#e.indexToChr?.[0]?.refName.startsWith("chr");c&&!u?this.chrPrefixFixer=f=>f.replace("chr",""):!c&&u&&(this.chrPrefixFixer=f=>"chr"+f),r()})})})}get label(){return"bamSource"}async loadInterval(e){const n=await this.discretizeAndLoad(e,async(i,r)=>this.#e.getRecordsForRange(this.chrPrefixFixer(i.chrom),i.startPos,i.endPos,{signal:r}).then(s=>s.map(o=>({chrom:i.chrom,start:o.start,end:o.end,name:o.name,cigar:o.CIGAR,mapq:o.mq,strand:o.strand===1?"+":"-"}))));n&&this.publishData(n)}}class Fw extends mr{#e;constructor(e,n){const i={channel:"x",windowSize:3e6,debounce:200,debounceMode:"domain",addChrPrefix:!1,...e},r=ve(i.channel);if(super(n,r),this.params=Es(n.paramRuntime,i,s=>{s.has("url")||s.has("indexUrl")||s.has("addChrPrefix")?this.#t().then(()=>this.reloadLastDomain()):s.has("windowSize")&&this.reloadLastDomain()},s=>this.registerDisposer(s),{batchMode:"whenPropagated"}),!ve(this.params.url))throw new Error("No URL provided for TabixSource");this.setupDebouncing(this.params),this.#t()}#t(){return this.initializedPromise=new Promise((e,n)=>{Promise.all([Promise.resolve().then(()=>O9),Promise.resolve().then(()=>uo)]).then(async([{TabixIndexedFile:i},{RemoteFile:r}])=>{const s=c=>new r(oo(c,this.view.getBaseUrl())),o=ve(this.params.url),a=ve(this.params.indexUrl)??o+".tbi",l=ve(this.params.addChrPrefix);this.#e=new i({filehandle:s(o),tbiFilehandle:s(a),renameRefSeqs:l===!0?c=>"chr"+c:l?c=>l+c:void 0});try{this.setLoadingStatus("loading");const c=await this.#e.getHeader();await this._handleHeader(c),this.setLoadingStatus("complete"),e()}catch(c){this.load(),this.setLoadingStatus("error",`${ve(this.params.url)}: ${c.message}`),n(c)}})}),this.initializedPromise}async loadInterval(e){await this.initializedPromise;const n=await this.discretizeAndLoad(e,async(i,r)=>{const s=[];return await this.#e.getLines(i.chrom,i.startPos,i.endPos,{lineCallback:o=>{s.push(o)},signal:r}),this._parseFeatures(s)});n&&this.publishData(n)}async _handleHeader(e){}_parseFeatures(e){return[]}}class wN extends Fw{#e;get label(){return"gff3Source"}async _handleHeader(e){this.#e=await Promise.resolve().then(()=>nL)}_parseFeatures(e){return this.#e?.parseArraySync(e)}}class yN extends Fw{#e;get label(){return"vcfSource"}async _handleHeader(e){const n=(await Promise.resolve().then(()=>lL)).default;this.#e=new n({header:e})}_parseFeatures(e){return e.map(n=>{const i=this.#e.parseLine(n);return delete i.GENOTYPES,i.SAMPLES=i.SAMPLES(),i})}}const CN=[];function bN(t,e){if(Qw(t))return new WF(t,e);if(eN(t))return new $F(t,e);if(aN(t))return new cN(t,e);if(EN(t))return FN(t.lazy,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function EN(t){return"lazy"in t}function IN(t){return t?.type=="axisTicks"}function xN(t){return t?.type=="axisGenome"}function vN(t){return t?.type=="indexedFasta"}function BN(t){return t?.type=="bigwig"}function SN(t){return t?.type=="bigbed"}function DN(t){return t?.type=="bam"}function QN(t){return t?.type=="gff3"}function kN(t){return t?.type=="vcf"}const RN=[{guard:IN,Source:lN},{guard:xN,Source:uN},{guard:vN,Source:fN},{guard:BN,Source:hN},{guard:SN,Source:dN},{guard:DN,Source:mN},{guard:QN,Source:wN},{guard:kN,Source:yN}];function FN(t,e){for(const n of CN)if(n.guard(t))return new n.Source(t,e);for(const n of RN)if(n.guard(t))return new n.Source(t,e);throw new Error("Cannot figure out the data source type: "+JSON.stringify(t))}function NN(t){const e=Nw(t).filter(i=>typeof i=="string"),n=new Function("source","return { "+e.map(i=>JSON.stringify(i)).map(i=>`${i}: source[${i}]`).join(`,
|
|
638
|
+
`)+" };");return n.properties=e,n}function Nw(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 Ac extends Qe{get behavior(){return Tt}#e;#t=e=>e;constructor(){super({type:"clone"});const e=n=>{const i=Nw(n);(!this.#e||!Bn(i,this.#e))&&(this.#e=i,this.#t=NN(n));const r=this.#t;this.handle=s=>this._propagate(r(s)),this.handle(n)};this.handle=e,this.beginBatch=n=>{Jd(n)&&(this.handle=e),super.beginBatch(n)}}}function MN(t){return"name"in t}class Mw extends vi{#e;constructor(e,n,i){super(n),this.provider=i,this.params=e}get identifier(){return this.params.name}get label(){return"namedSource"}updateDynamicData(e){this.#e=e,this.loadSynchronously()}loadSynchronously(){const e=this.#e??this.provider(this.params.name)??[];let n=i=>i;if(Array.isArray(e))e.length>0&&(n=Sw(e[0]));else throw new Error(`Named data "${this.params.name}" is not an array!`);this.reset(),this.beginBatch({type:"file"});for(const i of e)this._propagate(n(i));this.complete()}async load(){this.loadSynchronously()}}class Tw{#e;#t;loadingStatusRegistry;constructor(){this.#e=new Set,this.#t=new Set,this.loadingStatusRegistry=new Yd}get dataSources(){return[...this.#e]}get collectors(){return[...this.#t]}replaceDataSources(e){this.#e=new Set(e)}addDataSource(e){this.#e.add(e)}removeDataSource(e){e.disposeSubtree(),this.#e.delete(e)}addCollector(e){this.#t.add(e)}removeCollector(e){e.parent&&e.parent.removeChild(e),e.disposeSubtree(),e.observers.clear(),this.#t.delete(e)}pruneCollectorBranch(e){let n=e.parent;for(n&&n.removeChild(e),e.disposeSubtree();n&&n.children.length===0;){const i=n;n=i.parent,n?(n.removeChild(i),i.dispose()):i instanceof vi?this.removeDataSource(i):i.dispose()}}findNamedDataSource(e){let n;for(const i of this.#e.values())if(i instanceof Mw&&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}if(n)return{dataSource:n}}}function TN(t,e){const n=new Map,i=[];for(const r of t)n.set(r,{ref:r,children:[]});for(const r of n.values()){const s=n.get(e(r.ref));s?s.children.push(r):i.push(r)}return i}function Pw(t,e,n){const i=e.preOrder?.(t);if(i)return i;for(const r of n(t)){const s=Pw(r,e,n);if(s==="stop")return s}return e.postOrder?.(t)}function PN(t,e){return Pw(t,e,n=>n.children)}function LN(t,e,n,i){const r=[],s=[];let o;const a=e??new Tw,l=[],c=i??(()=>!0);function u(p,w=()=>{}){if(!o)throw w()||new Error("Cannot append data flow node, no parent exist!");return o.addChild(p),o=p,r.push(p),p}function f(p,w){return u(p,()=>new Error("Cannot append a transform because no (inherited) data are available! "))}function h(p,w){for(const C of p){let y;try{y=HF(C,w)}catch(I){throw console.warn(I),new Error(`Cannot initialize "${C.type}" transform: ${I}`)}y.behavior&Sn&&f(new Ac),f(y)}}function A(){return r.findLastIndex(p=>p instanceof zl)>r.findLastIndex(p=>p instanceof vi)}const d=p=>{if(!c(p)){const w=p.flowHandle?.node;if(w){w!==o&&(o=w,r.push(w));return}if(p.spec.data||p.spec.transform||p instanceof Je)throw new Error("Cannot reuse missing flow nodes for "+p.getPathString());return}if(p.spec.data){const w=p.flowHandle?.dataSource;w&&w.view===p&&!w.identifier&&a.removeDataSource(w);const C=MN(p.spec.data)?new Mw(p.spec.data,p,p.context.getNamedDataFromProvider):bN(p.spec.data,p);o=C,r.push(C),a.addDataSource(C),p.flowHandle??={},p.flowHandle.dataSource=C}if(p.spec.transform&&h(p.spec.transform,p),p instanceof Je){if(!o)throw new Error(`A unit view (${p.getPathString()}) has no (inherited) data source`);const w=UN(p);if(w){l.push(w.rewrite);for(const I of w.transforms)f(I)}p.mark.isPickingParticipant()&&!A()&&(f(new Ac),f(new zl({type:"identifier"})));const C=new yw({type:"collect",groupby:p.getFacetFields(),sort:_N(p,w?.rewrittenEncoding)});u(C);const y=p.flowHandle?.collector;y&&a.removeCollector(y),a.addCollector(C),p.flowHandle??={},p.flowHandle.collector=C}o&&(p.flowHandle??={},p.flowHandle.node=o)},g=ON(t,n),m=TN(g,p=>p.dataParent);for(const p of m)PN(p,{preOrder:w=>{s.push({view:w.ref,nodeStackDepth:r.length}),d(w.ref)},postOrder:()=>{const{nodeStackDepth:w}=s.pop();r.length=w,o=r.at(-1)}});return l.forEach(p=>p()),a}function ON(t,e){if(!e)return t.getDescendants();const n=[];return t.visit(i=>{if(!e(i))return fn;n.push(i)}),n}function UN(t){const e=[],n={},i=t.mark.encoding,r=t.getEncoding(),s=[];for(const[a,l]of Object.entries(i)){const c=a;rn(c)!==c&&!(c in r)||bs(c)&&!Array.isArray(l)&&i0(l)&&s.push({channel:c,chromPosDef:l})}const o=Go(s,a=>rn(a.channel),a=>a.chromPosDef.chrom);for(const[a,l]of o.entries())for(const[c,u]of l.entries()){const f=[],h=[],A=[];for(const{channel:d,chromPosDef:g}of u){const m=C=>C.replace(/[^A-Za-z0-9_]/g,""),p=["_linearized_",m(g.chrom),"_",m(g.pos)].join(""),w={...t.spec.encoding?.[d]??r[d]??i[d]??{},field:p};delete w.chrom,delete w.pos,!w.type&&g.type&&(w.type=g.type),n[d]=w,f.push(g.pos),A.push(g.offset??0),h.push(p)}e.push(new Ac),e.push(new Cw({type:"linearizeGenomicCoordinate",channel:a,chrom:c,pos:f,offset:A,as:h},t))}return e.length?{transforms:e,rewrittenEncoding:n,rewrite:()=>{t.spec.encoding={...t.spec.encoding,...n},bf(t.mark,"encoding")}}:void 0}function _N(t,e){const n={...t.getEncoding(),...e}.x;if(mt(n)&&t.getScaleResolution("x")?.isZoomable()){if(nn(n))return"buildIndex"in n&&n.buildIndex?{field:n.field}:null;if(!Ki(n)){if(ji(n))throw new Error("A zoomable x channel must be mapped to a field.")}}}function Lw(t,e=void 0){if(t.parent!==e)return!1;for(const n of t.children)if(!Lw(n,t))return!1;return!0}function Jf(t,e=!1){if(t.behavior&Ul&&(e=!0),t instanceof Ac)if(e)e=!1;else{const n=t.children[0];t.excise(),n&&Jf(n,e);return}t.behavior&Tt&&(e=!1);for(let n=0,i=t.children.length;n<i;n++)Jf(t.children[n],e||i>1)}function zN(t){const e=t.dataSources,n=new Map;for(const s of e)s.identifier&&!n.has(s.identifier)&&n.set(s.identifier,s);const i=new Set,r=new Map;for(const s of e)if(s.identifier){const o=n.get(s.identifier);o&&(o!==s&&o.adoptChildrenOf(s),i.add(o),r.set(s,o))}else i.add(s),r.set(s,s);return t.replaceDataSources(i),r}function GN(t){if(Jf(t),!Lw(t))throw new Error("Encountered a bug! There's a problem in the data flow structure.")}function HN(t){const e=zN(t);for(const n of t.dataSources)GN(n);return e}const qf=new WeakMap,Kf=new WeakMap;function Ow(t,e){const n=qf.get(t);if(n){if(!e?.queueReload)return n;const r=Kf.get(t);if(r)return r;const s=n.catch(()=>{}).then(()=>Ow(t)).finally(()=>{Kf.delete(t)});return Kf.set(t,s),s}const i=Promise.resolve().then(()=>t.load()).finally(()=>{qf.delete(t)});return qf.set(t,i),i}function YN(t,e){for(const n of t.getDescendants()){const i=n.flowHandle;if(!i)continue;const r=i.dataSource;r&&(i.dataSource=e.get(r)??r)}}function jf(t,e,n,i){const r=i??(()=>!0),o=Uw(t,n).filter(r);if(o.length===0)return{dataFlow:e,unitViews:[],dataSources:new Set,graphicsPromises:[]};const a=new Set(o);for(const A of o)A._setDataInitializationState("pending");let l;try{l=LN(t,e,n,d=>a.has(d));const A=HN(l);YN(t,A)}catch(A){for(const d of o)d._setDataInitializationState("none");throw A}const c=VN(o);for(const A of c)A.visit(d=>d.initializeOnce());const u=o.filter(A=>A instanceof Je),f=[],h=!!t.context.glHelper;for(const A of u){const d=A.mark;d.initializeEncoders(),A.registerDomainSubscriptions(),h&&f.push(d.initializeGraphics().then(()=>d));const g=m=>{if(d.initializeData(),h)try{d.updateGraphicsData()}catch(p){throw p.view=A,p}A.context.animator.requestRender()};A.registerDisposer(A.flowHandle.collector.observe(g))}for(const A of o)A._setDataInitializationState("ready");return{dataFlow:l,unitViews:u,dataSources:c,graphicsPromises:f}}function VN(t,e){const n=Array.isArray(t)?t:Uw(t,e),i=new Set;for(const r of n){let s=r;for(;s&&!s.flowHandle?.dataSource;)s=s.dataParent;s?.flowHandle?.dataSource&&i.add(s.flowHandle.dataSource)}return i}function JN(t,e){const n=new Set;return t.visit(i=>{if(e&&!e(i))return fn;if(i.flowHandle?.dataSource)return n.add(i.flowHandle.dataSource),fn}),n}function Wf(t,e,n,i){return e||(e=JN(t,n)),Promise.all(Array.from(e).map(r=>Ow(r,i))).then(r=>(qN(t),r))}function Uw(t,e){const n=[];return e?(t.visit(i=>{if(!e(i))return fn;n.push(i)}),n):t.getDescendants()}function qN(t){const e={type:"subtreeDataReady",payload:{subtreeRoot:t}};t.visit(n=>n.handleBroadcast(e))}async function KN(t,e,n,i){const r=a=>a.isConfiguredVisible(),{dataFlow:s,graphicsPromises:o}=jf(t,e,r);return i(s),await n.waitUntilReady(),await Wf(t,new Set(s.dataSources),r),await Hf(o),s}async function jN(t,e,n){const i=h=>h.isConfiguredVisible(),s=WN(t,i).filter(h=>h.getDataInitializationState()==="none");if(s.length===0)return e;const o=new Set(s),a=h=>o.has(h),l=new Set,c=[];for(const h of s){if(h.spec.data){c.push(h);continue}const A=ZN(h);A?l.add(A):c.push(h)}const{dataFlow:u,graphicsPromises:f}=jf(t,e,i,a);await n.waitUntilReady();for(const h of l)h.repropagate();if(c.length){const h=XN(c);await Promise.all(Array.from(h.entries()).map(([A,d])=>Wf(A,d,void 0,{queueReload:!0})))}return await Hf(f),u}function WN(t,e){const n=[];return t.visit(i=>{if(!e(i))return fn;n.push(i)}),n}function XN(t){const e=new Map;for(const n of t){let i=n;for(;i&&!i.flowHandle?.dataSource;)i=i.dataParent;if(!i?.flowHandle?.dataSource){if(n.spec.data)throw new Error("No data source found for view "+n.getPathString());continue}let r=e.get(i);r||(r=new Set,e.set(i,r)),r.add(i.flowHandle.dataSource)}return e}function ZN(t){let e=t.dataParent;for(;e;){const n=e.flowHandle?.collector;if(n)return n.completed?n:void 0;e=e.dataParent}}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 i;for(;i=n.shift();)i(e);this._renderCallback(e)}))}transition(e){return b8({requestAnimationFrame:n=>this.requestTransition(n),...e})}}function Xf(t,e,n,i,r){let s=0,o=!0,a=structuredClone(r),l=a;function c(h,A,d,g){return A+(h-A)*Math.pow(2,-d/g)}function u(h){if(o)return;const A=h-s;s=h;for(const g of Object.keys(l))a[g]=c(a[g],l[g],A,n);e(a);let d=-1/0;for(const g of Object.keys(l))d=Math.max(d,Math.abs(l[g]-a[g]));d<i?(a=l,e(a),o=!0,d!=0&&t.requestRender()):t.requestTransition(g=>u(g))}function f(h){l=h,o&&(o=!1,s=+document.timeline.currentTime,u(s))}return f.stop=()=>{o=!0},f}class e6{constructor(e){this.genomes=new Map,this.#e=new Map,this.#t=new Map,this.#n=new Map,this.#i=0,this.#r=void 0,this.baseUrl=e}#e;#t;#n;#i;#r;async initialize(e){const{name:n,...i}=e;this.configureGenomes(new Map([[n,i]]),n),await this.ensureAssembly(n)}configureGenomes(e,n){this.genomes.clear(),this.#t.clear(),this.#n.clear(),this.#i=0,this.#e=new Map(e),this.#r=n}getDefaultAssemblyName(){if(this.#r)return this.#r;if(this.#e.size===1)return this.#e.keys().next().value;if(this.#e.size===0&&this.genomes.size===1)return this.genomes.keys().next().value}async ensureAssemblies(e){const n=[],i=new Set;for(const r of e){if(!r)continue;const s=t6(r);i.has(s)||(i.add(s),n.push(this.ensureAssembly(r)))}await Promise.all(n)}async ensureAssembly(e){if(typeof e=="object")return this.#f(e);const n=this.genomes.get(e);if(n)return n;const i=this.#e.get(e);if(i)return this.#u(e,i);const r=this.#c(e);if(r)return r;throw this.#s(e)}getGenome(e){if(e&&typeof e=="object")return this.#A(e);if(typeof e=="string"){const i=this.genomes.get(e);if(i)return i;if(this.#e.has(e))throw new Error(`Genome ${e} has not been loaded yet. Call ensureAssembly("${e}") before accessing it.`);const r=this.#c(e);if(r)return r;throw this.#s(e)}const n=this.getDefaultAssemblyName();if(n)return this.getGenome(n);if(this.#e.size>1)throw new Error("Cannot pick a default genome! More than one have been configured!");if(this.genomes.size===0&&this.#e.size)throw new Error("Default genome is not loaded. Define root `assembly` or call ensureAssembly() first.");if(this.genomes.size>1)throw new Error("Cannot pick a default genome! More than one have been configured!");if(this.genomes.size===0)throw new Error("No genomes have been configured!");return this.genomes.values().next().value}#o(e){try{return new Ks({name:e})}catch{return}}#s(e){return new Error(`No genome with the name ${e} has been configured!`)}#c(e){const n=this.#o(e);if(n)return this.genomes.set(e,n),n}async#a(e,n){const i=this.#t.get(e);if(!i)throw new Error(`No pending genome load for ${e}.`);await i;const r=this.genomes.get(e);if(!r)throw new Error(n);return r}async#l(e,n){const i=n.load(this.baseUrl);this.#t.set(e,i);try{await i}catch(r){throw this.genomes.delete(e),r}finally{this.#t.delete(e)}return n}async#u(e,n){const i=this.genomes.get(e);if(i)return this.#t.has(e)?this.#a(e,`Loading genome ${e} failed before it became available.`):i;if(this.#t.has(e))return this.#a(e,`Loading genome ${e} failed before it became available.`);const r=new Ks({name:e,...n});return this.genomes.set(e,r),"url"in n?this.#l(e,r):r}async#f(e){this.#g(e);const n=this.#h(e),i=this.genomes.get(n);if(i)return this.#t.has(n)?this.#a(n,`Loading inline assembly ${n} failed before it became available.`):i;if(this.#t.has(n))return this.#a(n,`Loading inline assembly ${n} failed before it became available.`);if("contigs"in e){const s=new Ks({name:n,contigs:e.contigs});return this.genomes.set(n,s),s}const r=new Ks({name:n,url:e.url});return this.genomes.set(n,r),this.#l(n,r)}#A(e){this.#g(e);const n=this.#h(e),i=this.genomes.get(n);if(i){if(this.#t.has(n))throw new Error(`Inline URL assembly ${n} has not been loaded yet. Call ensureAssembly() before accessing it.`);return i}if("url"in e)throw new Error("Inline URL assemblies must be loaded first. Call ensureAssembly() before accessing it.");const r=new Ks({name:n,contigs:e.contigs});return this.genomes.set(n,r),r}#g(e){const n="contigs"in e,i="url"in e;if(n===i)throw new Error("Inline `scale.assembly` objects must define exactly one of `contigs` or `url`.")}#h(e){const n=JSON.stringify(e),i=this.#n.get(n);if(i)return i;let r=`inline_assembly_${this.#i}`;for(this.#i+=1;this.genomes.has(r)||this.#e.has(r)||this.#t.has(r);)r=`inline_assembly_${this.#i}`,this.#i+=1;return this.#n.set(n,r),r}}function t6(t){return typeof t=="string"?`name:${t}`:`inline:${JSON.stringify(t)}`}const n6="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+Hf8dujMX9ryrNx4KEREFgGXd9BQoWu97S0vLbU36T4EOD6NwGf78R0REAZBoxWaJ3qqDA9Kcx3p9YXW1sLLSCoBM5jIV+i7/gwCWl8Nbzs0xLCIiCgDbDiub7b8JMF3exT3kMOM4a3bLmuNczoX22ScpPluK33KIREQUALmc2QS0KjGqT3BxzWKf2VmKhl0sEhD0ngKZS5ZKOgAQERmVAEg05KhVBwFXnXJ62eWLRYoGrRofv8yGHsv/gwOYmwtvtryMiIgMLQCSxwCHh92mQNGg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Tvp7IJhFkP3juGudng8GwhTAC4Hj/OEvYNkksi41G9QDZyrn2fDhxQgLg2MS770oDnCBA1tbGgyjI9GwWFKT/YDAYthJGAOJLlgAWF5meJhZjdhaKCikspKCAR4bHo4yPqwFjZ8+6cYCU4ODBTa8G23zAMBgMJgK4eTMxNZUAxse5cYNgkEQCnvFSXs7OnZvodNMpK5MG6OUdG+nrkwa49YB9+9gwzJ0/BoPBCMDwcOLllxOBQAKYnOTmTS5cgPx8mpupq8Pn4xHj9bq5IHn9QDicmguqryczSuAfIdtAGuG/IDMYDFsEIwCz44noaOLPv5GYgOlpgkGorKSzjWPHlHbZLAGwH9a0RBpgWehBNNoPebK+pAbU1LAeDAaDwZDLKzBEYiiRCCTiTZU3pjsRh4upqmL/fo4epaODR4vFMs88Q1kZgQCxGLZ9DXIdGbhDZy579mAwGAyGrMnloxAhPhSPBw4n7lYjV2tZFBWhCKC+Xsv/x5xuLy1FtsxlRwAgF05BBevBYDAYTAqojETZc4m25xLRKDMzSAC2b6ekhCeS88sCoOMp/rKdO+BQIIgCOP5mupRGYQpQxSEFEZAAhPvcg44OKAClQGkXxoJb2BubAw539txp+v889OYL/GVqpCMVAAB3APltOh0J8wcKqeLtMwBhXgQAUD0A8v+UfMvrbwUAAAjAezk/VtzlL/EBAKooCnk8AAAtAIBoEAAAAAEAABAAAAABAAA8yVeyLNvtdpfLRSnV7/dns1mj0ZC4AQAByPPcObderw+HQ61WG4/H3vvVaiVxAwACsN/vt9utc26z2dTr9cVi0W63n0sCIGIgAN77JEmOx2NeOp1OYQ2HAiBu4BK42WwaY6y1tzV8CGs4FABxA98AhsPhZDK5Xq+9Xk9rPZ1OwzoajQRA3EAArLXL5dIYcz6flVKDwWA+n7daLQHwCMBjcOE8TVOtdbfbFQAAr4ECAPgnMACAAAAA7s0HoDFhsamH/bcAAAAASUVORK5CYII=",i6={thin:100,light:300,regular:400,normal:400,medium:500,bold:700,black:900};class r6{constructor(e){this._webGLHelper=e,this.fontRepository="https://raw.githubusercontent.com/etiennepinchon/aframe-fonts/master/fonts/",this._fonts=new Xt([],JSON.stringify),this._metadataPromises=new Map,this._fontPromises=new Map,this._promises=[],this._defaultFontEntry={metrics:Ru(bw),texture:e?this._createTextureNow(n6):void 0}}async waitUntilReady(){await Promise.all(this._promises)}getFont(e,n="normal",i="regular"){if(le(i)&&(i=i6[i.toLowerCase()],!i))throw new Error("Unknown font weight: "+i);const r={family:e,style:n,weight:i};let s=this._fonts.get(r);return s||(s={metrics:void 0,texture:void 0},this._fonts.set(r,s),this._promises.push(this._loadFontEntry(s,r))),s}async _loadFontEntry(e,n){try{const i=await this._loadMetadata(n.family),r=o6(i,n),s=this.fontRepository+_w(n.family)+"/"+r.replace(/\.\w+/,""),o=this._createTexture(s+".png"),a=this._loadFont(s+".json");e.texture=await o,e.metrics=await a}catch{console.warn(`Cannot load font: "${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(i=>{if(!i.ok)throw new Error("Could not load font: "+i.status);return i}).then(i=>i.json()).then(i=>Ru(i)),this._fontPromises.set(e,n)),n}_loadMetadata(e){const n=_w(e);let i=this._metadataPromises.get(n);if(!i){const r=this.fontRepository+n+"/METADATA.pb";i=fetch(r).then(s=>{if(!s.ok)throw new Error("Could not load font metadata. Response status: "+s.status+", url: "+r);return s}).then(s=>s.text()).then(s=>s6(s)).catch(s=>{console.warn(s.message)}),this._metadataPromises.set(n,i)}return i}getDefaultFont(){return this._defaultFontEntry}_createTexture(e){const n=this._webGLHelper.gl;return new Promise((i,r)=>{Ds(n,{src:e,min:n.LINEAR},(s,o,a)=>{s?r(s):i(o)})})}_createTextureNow(e){const n=this._webGLHelper.gl;let i;const r=new Promise((s,o)=>{i=Ds(n,{src:e,min:n.LINEAR},(a,l,c)=>{a?o(a):s(l)})});return this._promises.push(r),i}}function _w(t){return t.toLowerCase().replaceAll(/[^\w]/g,"")}function s6(t){const e=t.split(`
|
|
639
|
+
`),n=[];let i;for(const r of e)if(r.startsWith("fonts {")&&(i={name:void 0,style:void 0,weight:void 0,filename:void 0,post_script_name:void 0,full_name:void 0,copyright:void 0}),r.startsWith("}")&&(n.push(i),i=void 0),i){let s=r.match(/^\s*([A-Za-z_]+):[ ]?"(.*)"$/);if(s){const o=s[1];i[o]=s[2]}if(s=r.match(/^\s*([A-Za-z_]+):[ ]?(\d+)$/),s){const o=s[1];i[o]=+s[2]}}return n}function o6(t,e){let n,i=Number.POSITIVE_INFINITY;for(const r of t)if(e.family.localeCompare(r.name,void 0,{sensitivity:"accent"})==0&&e.style==r.style){const s=Math.abs(e.weight-r.weight);s<i&&(i=s,n=r)}return n?.filename}function a6(t,e){const n=[];let i;for(const r of t.split(`
|
|
640
|
+
`))if(r.startsWith(">"))i={identifier:r.match(/>(\S+)/)[1],sequence:""},n.push(i);else if(i)i.sequence+=r.trim();else throw new Error("Invalid fasta file!");return n}const zw=new Map,c6={Organism:"Homo sapiens"};async function l6(t,e,n={}){const i=t.symbol,r={...c6,GENE:i};for(const[o,a]of Object.entries(n))typeof a=="string"&&(r[o]=a);let s=zw.get(i)??await h6(r);return s?(zw.set(i,s),ae`
|
|
633
641
|
<div class="title">
|
|
634
642
|
<strong>${s.name}</strong>
|
|
635
643
|
${s.description}
|
|
636
644
|
</div>
|
|
637
645
|
<p class="summary">${s.summary}</p>
|
|
638
646
|
<p class="source">Source: NCBI RefSeq Gene</p>
|
|
639
|
-
`):null}async function
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
647
|
+
`):null}async function u6(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:A6(t),sort:"relevance",retmax:"1",retmode:"json"}).toString();const r=(await fetch(n.toString(),e).then(s=>s.json())).esearchresult.idlist[0];if(r){const s=new URL("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi");return s.search=new URLSearchParams({db:"gene",id:r,retmode:"json"}).toString(),(await fetch(s.toString(),e).then(l=>l.json())).result[r]}else return null}const f6=sa(u6,500);function h6(t){return f6(t)}function A6(t){return Object.entries(t).filter(([e,n])=>n&&n.length>0).map(([e,n])=>`("${n}"[${e}])`).join(" AND ")}const d6=He(".4~r"),g6=He(".4~e");function Gw(t){return t==null?ae` <span class="na">NA</span> `:le(t)?t.substring(0,30):Number.isInteger(t)?""+t:qe(t)?Math.abs(t)>Math.pow(10,8)||Math.abs(t)<Math.pow(10,-8)?g6(t):d6(t):qr(t)?t?"True":"False":be(t)?ae`${t.map((e,n)=>[Gw(e),n<t.length-1?", ":Ie])}`:"?"+typeof t+" "+t}function Hw(t){const e=[];return Yw(Object.entries(t),e),e}function Yw(t,e,n){for(const[i,r]of t)i.startsWith("_")||(r!==null&&typeof r=="object"&&!Array.isArray(r)?Yw(Object.entries(r),e,(n||"")+i+"."):e.push({key:(n||"")+i,value:r}))}const p6={x:"x2",y:"y2"},m6=new Set(["auto","locus","interval","endpoints","disabled"]),Vw=new WeakMap;function Jw(t,e,n){const i=w6(e),r=Kw("x",t,e,i,$w(n,"x")),s=Kw("y",t,e,i,$w(n,"y")),o=r.rows.length>0&&s.rows.length>0,a=[...o?qw("x",r.rows):r.rows,...o?qw("y",s.rows):s.rows],l=new Set;for(const c of[r,s])for(const u of c.usedLinearizedFields){const f=i.get(u);if(!f||f.ambiguous)continue;x6(t,u,f,e)&&(l.add(f.chrom),l.add(f.pos))}return{hiddenRowKeys:[...l],genomicRows:a,flattenDatumRows:()=>Hw(t),formatGenomicLocus:(c,u)=>dc(e,c,u),formatGenomicInterval:(c,u)=>Zw(e,c,u)}}function w6(t){const e=Vw.get(t);if(e)return e;const n=E6(t);return Vw.set(t,n),n}function qw(t,e){const n=t.toUpperCase()+" ";return e.map(i=>({key:n+i.key,value:i.value}))}function Kw(t,e,n,i,r){const s=new Set;if(r==="disabled")return{rows:[],usedLinearizedFields:s};const o=Xw(n,t,e);if(!o)return{rows:[],usedLinearizedFields:s};o.field&&s.add(o.field);const a=Xw(n,p6[t],e);a?.field&&s.add(a.field);const l=r==="auto"?y6(o,a,i):r;if(l==="endpoints"&&a){const[c,u]=C6(o,a,i);return{rows:[{key:"Endpoint 1",value:dc(n,t,c.value)??String(c.value)},{key:"Endpoint 2",value:dc(n,t,u.value)??String(u.value)}],usedLinearizedFields:s}}return l==="interval"&&a?{rows:[{key:"Interval",value:Zw(n,t,[o.value,a.value])??o.value+" - "+a.value}],usedLinearizedFields:s}:{rows:[{key:"Coordinate",value:dc(n,t,o.value)??String(o.value)}],usedLinearizedFields:s}}function y6(t,e,n){if(!e)return"locus";const i=jw(t.field,n),r=jw(e.field,n);return i&&r&&i!==r?"endpoints":"interval"}function jw(t,e){const n=t?e.get(t):void 0;return n&&!n.ambiguous?n.groupId:void 0}function C6(t,e,n){const i=Ww(t.field,n),r=Ww(e.field,n);return i===2&&r!==2?[e,t]:r===1&&i!==1?[e,t]:i===2&&r===1?[e,t]:[t,e]}function Ww(t,e){const n=t?e.get(t):void 0,i=[n?.pos,n?.chrom,t];let r;for(const s of i){const o=b6(s);if(o!==void 0){if(r===void 0)r=o;else if(r!==o)return}}return r}function b6(t){if(!t)return;const e=t.toLowerCase(),n=e.match(/(?:^|[^0-9])(1|2)$/);if(n)return n[1]==="1"?1:2;const i=e.match(/(?:^|[_-])(first|second)(?:[_-]|$)/);if(i)return i[1]==="first"?1:2}function Xw(t,e,n){const i=t.encoders?.[e];if(i?.scale?.type!=="locus")return;const r=i.dataAccessor;if(!r)return;const s=+r(n);if(Number.isFinite(s))return{value:s,field:r.fields?.length===1?r.fields[0]:void 0}}function E6(t){const e=new Map;let n=0,r=t.unitView?.getCollector?.()?.parent;for(;r;){const s=r.params;if(s?.type==="linearizeGenomicCoordinate"){const o=Me(s.as),a=Me(s.pos),l=I6(s.offset,a.length),c="g"+n++,u=s.channel==="y"?"y":"x";for(let f=0;f<o.length;f++){if(f>=a.length)continue;const h=e.get(o[f]);h?h.ambiguous=!0:e.set(o[f],{groupId:c,chrom:s.chrom,pos:a[f],offset:l[f],channel:u,ambiguous:!1})}}r=r.parent}return e}function I6(t,e){const n=Me(t);return n.length===0?new Array(e).fill(0):n.length===1?new Array(e).fill(n[0]):n.length===e?n:new Array(e).fill(0)}function dc(t,e,n){return Zf(t,e)?.formatLocus(n)}function Zw(t,e,n){return Zf(t,e)?.formatInterval(n)}function Zf(t,e){const n=t.encoders?.[e]?.scale;return n?.type==="locus"&&"genome"in n?n.genome():void 0}function $w(t,e){const n=t?.genomicCoordinates?.[e],i=typeof n=="string"?n:n?.mode??"auto";if(!m6.has(i))throw new Error('Unknown genomic coordinate display mode: "'+i+'"');return i}function x6(t,e,n,i){const r=Zf(i,n.channel);if(!r)return!1;const s=t[n.chrom],o=t[n.pos],a=t[e];if(s===void 0||o===void 0||a===void 0)return!1;const l=+o,c=+a;if(!Number.isFinite(l)||!Number.isFinite(c))return!1;let u;try{u=r.toContinuous(s,l-n.offset)}catch{return!1}return Math.abs(u-c)<1e-6}async function v6(t,e,n,i){const r=p=>IA(p).join("."),s=p=>p!=null&&!(typeof p=="number"&&Number.isNaN(p)),o=(p,w,C)=>{for(const[y,I]of Object.entries(e.encoders)){const x=I?.dataAccessor?.fields;if(x&&x.some(E=>E===p||r(E)===p))switch(y){case"color":case"fill":case"stroke":{const E=I(C);return E!=null?ae`
|
|
648
|
+
<span
|
|
649
|
+
class="color-legend"
|
|
650
|
+
style=${"background-color: "+String(E)}
|
|
651
|
+
></span>
|
|
652
|
+
`:s(w)?ae`
|
|
653
|
+
<span
|
|
654
|
+
class="color-legend color-legend-unmapped"
|
|
655
|
+
></span>
|
|
656
|
+
`:""}}}return""},a=i??Jw(t,e,n),l=a.flattenDatumRows?a.flattenDatumRows():Hw(t),c=a.genomicRows??[],u=new Set(a.hiddenRowKeys??[]),f=l.filter(p=>!u.has(p.key)),h=[...c,...f];if(!h.length)return;const A=h.map(p=>{const w=Gw(p.value),C=o(p.key,p.value,t);return ae`
|
|
645
657
|
<tr>
|
|
646
|
-
<th>${
|
|
647
|
-
<td>${
|
|
658
|
+
<th>${p.key}</th>
|
|
659
|
+
<td>${w} ${C}</td>
|
|
648
660
|
</tr>
|
|
649
|
-
`}),
|
|
661
|
+
`}),d=ae`
|
|
650
662
|
<table class="attributes">
|
|
651
|
-
${
|
|
663
|
+
${A}
|
|
652
664
|
</table>
|
|
653
|
-
`,
|
|
665
|
+
`,g=e.unitView.getTitleText(),m=g?ae`
|
|
654
666
|
<div class="title">
|
|
655
|
-
<strong>${
|
|
667
|
+
<strong>${g}</strong>
|
|
656
668
|
</div>
|
|
657
|
-
`:"";return ce`${d}${h}`}class no extends e1{#e=new Map;constructor(e,n,i,r,s,o){super(e,n,i,r,s,o),this.spec=e}async initializeChildren(){}getNextAutoName(e){const n=this.#e.get(e)??0;return this.#e.set(e,n+1),e+n}*[Symbol.iterator](){}visit(e){let n;try{n=e(this)}catch(i){throw i.view=this,i}if(n===Ar)return n;if(n!==On){e.beforeChildren&&e.beforeChildren(this);for(const i of this){const r=i.visit(e);if(r===Ar)return r}e.afterChildren&&e.afterChildren(this),e.postOrder&&e.postOrder(this)}}findDescendantByPath(e){let n=this;for(let i=0;i<e.length;i++){if(!(n instanceof no))return;const r=n.#t(e[i]);if(!r)return;if(i===e.length-1)return r;n=r}}#t(e){for(const n of this)if(n.name===e)return n}findDescendantByName(e){let n;return this.visit(i=>{if(i.name==e)return n=i,Ar}),n}getDefaultResolution(e,n){return"shared"}}function k6(t){IF(t),bF(t)}function P1(t){t.getDescendants().forEach(e=>e.configureViewOpacity())}class L1{constructor(e,n){this.container=e,this.options=n}async addChildSpec(e,n){const{specs:i,insertAt:r}=this.options.getChildSpecs(),s=n??i.length,o=this.options.defaultName?.(s,e)??this.container.getNextAutoName("child"),a=await this.container.context.createOrImportView(e,this.container,this.container,o);r(s,e);const l=this.options.insertView(a,s);this.options.prepareView&&await this.options.prepareView(a,s,l),P1(a);const c=h=>h.isConfiguredVisible(),{dataSources:f,graphicsPromises:u}=_u(a,this.container.context.dataFlow,c);return await Gu(a,f),await Nu(u),this.options.requestLayout!==!1&&(this.container.invalidateSizeCache(),this.container.context.requestLayoutReflow()),a}async removeChildAt(e){const{removeAt:n}=this.options.getChildSpecs();this.options.removeView(e),n(e),this.options.afterRemove&&await this.options.afterRemove(e),this.options.requestLayout!==!1&&(this.container.invalidateSizeCache(),this.container.context.requestLayoutReflow())}}const O1=.5;function Yu(t){return"multiscale"in t&&Ce(t.multiscale)}function F6(t){if(!t.multiscale.length)throw new Error('"multiscale" must contain at least one child view.');const e=R6(t.stops,t.multiscale.length),n=t.multiscale.map((r,s)=>t.multiscale.length===1?r:{opacity:N6(s,t.multiscale.length,e),layer:[r]}),i={...t};return delete i.multiscale,delete i.stops,{...i,layer:n}}function R6(t,e){let n="unitsPerPixel",i,r="auto",s=O1;if(Ce(t))i=U1(t,e,"stops");else if(Ge(t))n=t.metric??"unitsPerPixel",i=U1(t.values,e,"stops.values"),r=t.channel??"auto",s=t.fade??O1;else throw new Error('"stops" must be an array or an object with "values".');if(n!=="unitsPerPixel")throw new Error('Only "unitsPerPixel" is supported for "stops.metric" in multiscale.');if(!["x","y","auto"].includes(r))throw new Error('"stops.channel" must be one of "x", "y", or "auto".');if(!Number.isFinite(s)||s<0||s>.5)throw new Error('"stops.fade" must be a finite number in range [0, 0.5].');if(i.forEach((o,a)=>{if(!Ee(o)&&(!Number.isFinite(o)||o<=0))throw new Error("Invalid stop value at index "+a+". Stop values must be positive finite numbers.")}),!i.some(Ee)){const o=i;for(let a=1;a<o.length;a++)if(o[a-1]<=o[a])throw new Error('"stops.values" must be strictly decreasing for "unitsPerPixel".');for(let a=0;a<o.length-1;a++){const l=o[a]*(1-s),c=o[a+1]*(1+s);if(l<=c)throw new Error("Adjacent transitions overlap. Reduce fade or increase stop spacing.")}}return{metric:n,values:i,channel:r,fade:s}}function U1(t,e,n){if(!Ce(t))throw new Error('"'+n+'" must be an array of numbers or ExprRefs.');const i=e-1;if(t.length!==i)throw new Error("Invalid stop count for multiscale. Expected "+i+", got "+t.length+".");for(const r of t)if(!Ee(r)&&!Number.isFinite(r))throw new Error('"'+n+'" must contain only numbers or ExprRefs.');return t}function N6(t,e,n){let i,r;const s=n.values.map(o=>({hi:_1(o,1+n.fade),lo:_1(o,1-n.fade)}));if(t===0)i=[s[0].hi,s[0].lo];else if(t===e-1){const o=s.at(-1);i=[o.hi,o.lo]}else{const o=s[t-1],a=s[t];i=[o.hi,o.lo,a.hi,a.lo]}return t===0?r=[1,0]:t===e-1?r=[0,1]:r=[0,1,1,0],{channel:n.channel,unitsPerPixel:i,values:r}}function _1(t,e){return Ee(t)?{expr:"("+t.expr+") * "+e}:t*e}function Vu(t){return"mark"in t&&(le(t.mark)||Ge(t.mark))}function Ju(t){return"layer"in t&&Ge(t.layer)}function G1(t){return"import"in t}function io(t){return"vconcat"in t&&Ce(t.vconcat)}function z1(t){return"hconcat"in t&&Ce(t.hconcat)}function lc(t){return"concat"in t&&Ce(t.concat)}class Ei extends no{#e=[];constructor(e,n,i,r,s,o){super(e,n,i,r,s,{layersChildren:!0,...o}),this.spec=e,this.needsAxes={x:!0,y:!0}}async initializeChildren(){this.#e=await Promise.all(this.spec.layer.map(e=>this.context.createOrImportView(e,this,this,this.getNextAutoName("layer"),n=>{if(!Ju(n)&&!Vu(n)&&!Yu(n))throw new He("LayerView accepts only unit, layer, or multiscale specs as children!",this)})))}async addChildSpec(e,n){return this.#t().addChildSpec(e,n)}async removeChildAt(e){await this.#t().removeChildAt(e)}#t(){return new L1(this,{getChildSpecs:()=>({specs:this.spec.layer,insertAt:(e,n)=>{this.spec.layer.splice(e,0,n)},removeAt:e=>{this.spec.layer.splice(e,1)}}),insertView:(e,n)=>(e.layoutParent??=this,this.#e.splice(n,0,e),e),removeView:e=>{const n=this.#e[e];if(!n)throw new Error("Child index out of range!");n.disposeSubtree(),this.#e.splice(e,1)},defaultName:()=>this.getNextAutoName("layer")})}get children(){return this.#e.slice()}*[Symbol.iterator](){for(const e of this.#e)yield e}render(e,n,i={}){if(super.render(e,n,i),!!this.isConfiguredVisible()){e.pushView(this,n);for(const r of this.#e)r.render(e,n,i);e.popView(this)}}propagateInteractionEvent(e){this.handleInteractionEvent(void 0,e,!0);for(let n=this.#e.length-1;n>=0;n--)if(this.#e[n].propagateInteractionEvent(e),e.stopped)return;this.handleInteractionEvent(void 0,e,!1)}}class H1{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,i=this.nRows;for(let r=0;r<i;r++){const s=[];e.push(s);for(let o=0;o<n;o++){const a=r*n+o;a<this.n&&s.push(a)}}return e}get colIndices(){const e=[],n=this.nCols,i=this.nRows;for(let r=0;r<n;r++){const s=[];e.push(s);for(let o=0;o<i;o++){const a=o*n+r;a<this.n&&s.push(a)}}return e}getCellIndex(e,n){let i=0;if(this.maxCols==1/0)i=n==0?e:void 0;else{if(e>=this.maxCols)return;i=n*this.nCols+e}return i<this.n?i:void 0}getCellCoords(e){if(!(e<0||e>=this.n))return[e%this.nCols,Math.floor(e/this.nCols)]}}function cn(t){return()=>t}class ve{static create(e,n,i,r){return new ve(cn(e),cn(n),cn(i),cn(r))}static ZERO=ve.create(0,0,0,0);_offset(e,n){const i=this["_"+e];if(n===0)return i;switch(typeof n){case"number":return()=>i()+n;case"function":return()=>i()+n();default:throw new Error("Not a number of function")}}_passThrough(e){return this._offset(e,0)}constructor(e,n,i,r){this._x=e,this._y=n,this._width=i,this._height=r}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=i=>{const r=e[i];return typeof r=="number"?cn(r):typeof r=="function"?r:this._passThrough(i)};return new ve(n("x"),n("y"),n("width"),n("height"))}translate(e,n){return e===0&&n===0?this:new ve(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 ve(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 ve(()=>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 ve(()=>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 ve(cn(this.x),cn(this.y),cn(this.width),cn(this.height))}containsPoint(e,n){return e>=this.x&&e<this.x2&&n>=this.y&&n<this.y2}normalizePoint(e,n,i=!1){const r={x:(e-this.x)/this.width,y:(n-this.y)/this.height};return i&&(r.y=1-r.y),r}denormalizePoint(e,n,i=!1){return i&&(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)}`}}const hr=new WeakMap,qu=new WeakMap;function M6(t,e){if(e!==null&&typeof e!="string")throw new Error("Import scope name must be a string or null.");hr.set(t,{name:e})}function ln(t,e={}){const i=e.skipSubtree??!1?"excludeSubtree":"exclude";qu.set(t,i)}function Ku(t){const e=t.getDataAncestors(),n=[];for(let i=e.length-1;i>=0;i-=1){const r=hr.get(e[i]);r&&typeof r.name=="string"&&n.push(r.name)}return n}function T6(t){const e=[];for(const n of P6(t)){const i=L6(n);O6(t,i,e),U6(t,i,e)}return e}function Y1(t){return t.persist===!1?!1:zl(t)?!0:e0(t)?!!t.bind:!1}function P6(t){const e=new Set([t]);return t.visit(n=>{const i=hr.get(n);i&&typeof i.name=="string"&&e.add(n)}),Array.from(e)}function L6(t){return Ku(t)}function V1(t){return t.length?"import scope ["+t.join(" / ")+"]":"import scope (root)"}function O6(t,e,n){const i=new Map;J1(t,e,r=>{for(const[s,o]of r.paramRuntime.paramConfigs){if(!Y1(o))continue;const a=i.get(s);a?a.push(r):i.set(s,[r])}});for(const[r,s]of i){if(s.length<=1)continue;const o=s.map(a=>a.getPathString()).join(", ");n.push({message:'Bookmarkable parameter "'+r+'" is not unique within '+V1(e)+". Found in: "+o+".",scope:e})}}function U6(t,e,n){const i=_6(t,e);if(!i.length)return;const r=i.filter(o=>G6(o));if(r.length<=1)return;const s=new Map;for(const o of r){const a=hr.get(o),l=a?a.name:void 0;typeof l!="string"||!l.length||s.set(l,(s.get(l)??0)+1)}for(const[o,a]of s)a>1&&n.push({message:'Import instance name "'+o+'" is used multiple times for addressable instances in '+V1(e)+".",scope:e})}function _6(t,e){const n=[];return J1(t,e,i=>{if(Ku(i).length!==e.length+1)return;const s=hr.get(i);!s||typeof s.name!="string"||n.push(i)},{includeNamedImportRoots:!0}),n}function G6(t){let e=!1;return t.visit(n=>{const i=qu.get(n);if(i==="excludeSubtree")return On;if(i!=="exclude"){for(const r of n.paramRuntime.paramConfigs.values())if(Y1(r))return e=!0,Ar}}),e}function J1(t,e,n,i={}){const r=i.includeNamedImportRoots??!1;t.visit(s=>{const o=hr.get(s),a=qu.get(s);if(a==="excludeSubtree")return On;if(a!=="exclude"&&z6(s,e,o,r))return n(s)})}function z6(t,e,n,i){const r=Ku(t);return H6(r,e)?!0:!i||!n||typeof n.name!="string"||r.length!==e.length+1?!1:q1(e,r)}function H6(t,e){return t.length!==e.length?!1:q1(t,e)}function q1(t,e){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}const Y6="chromosome_ticks_and_labels",V6={x:"width",y:"height"};function ju(t){return t=="x"?"y":"x"}const fc={x:["bottom","top"],y:["left","right"]},Wu=Object.fromEntries(Object.entries(fc).map(([t,e])=>e.map(n=>[n,t])).flat(1));function Un(t){return Wu[t]}class K1 extends Ei{constructor(e,n,i,r,s,o){const a=n=="locus",l={...a?q6:j1,...J6(n,e),...e};super(a?K6(l,n):W1(l,n),i,r,s,`axis_${e.orient}`,{blockEncodingInheritance:!0,...o}),this.axisProps=l,ln(this,{skipSubtree:!0})}getSize(){const e={px:this.getPerpendicularSize()},n={grow:1};return Wu[this.axisProps.orient]=="x"?new Pn(n,e):new Pn(e,n)}getPerpendicularSize(){return Xu(this.axisProps)}isPickingSupported(){return!1}}function Xu(t){const e=Un(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 j1={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 J6(t,e){const n=e.orient,i=t=="nominal"||t=="ordinal";let r="center",s="middle",o=e.labelAngle??((n=="top"||n=="bottom")&&i?-90:0);switch(n){case"left":r="right";break;case"right":r="left";break;case"top":case"bottom":Math.abs(o)>30?(r=o>0==(n=="bottom")?"left":"right",s="middle"):s=n=="top"?"alphabetic":"top";break}return{labelAlign:r,labelAngle:o,labelBaseline:s}}function W1(t,e){const n={...t,extent:Xu(t)},i=Un(n.orient),r=ju(i),s=n.orient=="bottom"||n.orient=="right"?1:-1,o=n.orient=="bottom"||n.orient=="left"?1:0,a=()=>({field:"value",type:e}),l=()=>({name:"domain",data:{values:[{}]},mark:{type:"rule",clip:!1,strokeDash:n.domainDash,strokeCap:n.domainCap,color:n.domainColor,[r]:o,size:n.domainWidth}}),c=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[r+"Offset"]:(n.tickSize+n.labelPadding)*s,[r]:o,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[i]:a(),text:{field:"label"}}}),f=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[r]:{value:o},[r+"2"]:{value:o-n.tickSize/n.extent*(o?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,[i]:.5,[r]:1-o}}),h=()=>{const d={name:"ticks_and_labels",encoding:{[i]:a()},layer:[]};return n.ticks&&d.layer.push(f()),n.labels&&d.layer.push(c()),d},A={resolve:{scale:{[i]:"forced"}},domainInert:!0,[V6[ju(i)]]:n.extent,data:{lazy:{type:"axisTicks",channel:i,axis:t}},layer:[]};return n.domain&&A.layer.push(l()),(n.ticks||n.labels)&&A.layer.push(h()),n.title&&A.layer.push(u()),A}const q6={...j1,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 K6(t,e){const n={...t,extent:Xu(t)},i=Un(n.orient),r=ju(i),s=n.orient=="bottom"||n.orient=="left"?1:0,o=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:t.chromTickDash,strokeDashOffset:t.chromTickDashOffset,[r]:s,[r+"2"]:s-n.chromTickSize/n.extent*(s?1:-1),color:t.chromTickColor,size:n.chromTickWidth}}),a=()=>{let f;switch(n.orient){case"top":f={y:0,angle:0,paddingX:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"bottom":f={y:1,angle:0,paddingX:4,dy:n.chromLabelPadding+n.chromLabelFontSize*.73,viewportEdgeFadeWidthLeft:20,viewportEdgeFadeWidthRight:20,viewportEdgeFadeDistanceRight:-10,viewportEdgeFadeDistanceLeft:-20};break;case"left":f={x:1,angle:-90,paddingY:4,dy:-n.chromLabelPadding,viewportEdgeFadeWidthBottom:20,viewportEdgeFadeWidthTop:20,viewportEdgeFadeDistanceBottom:-20,viewportEdgeFadeDistanceTop:-10};break;case"right":f={x:0,angle:90,align:"right",paddingY:4,dy:-n.chromLabelPadding};break;default:f={}}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,...f},encoding:{[i+"2"]:{field:"continuousEnd",type:e},text:{field:"name"}}}};let l;switch(n.orient){case"bottom":case"top":l={};break;case"left":l={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":l={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:l={}}const c=W1({...t,...l},e);if(t.chromTicks||t.chromLabels){const f={name:Y6,data:{lazy:{type:"axisGenome",channel:Un(n.orient)}},encoding:{[i]:{field:"continuousStart",type:e,band:0}},layer:[]};if(t.chromTicks&&f.layer.push(o()),t.chromLabels){f.layer.push(a());let u;c.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(A=>A.name=="labels").forEach(A=>{u=A.mark})),u&&(n.orient=="top"||n.orient=="bottom"?(u.viewportEdgeFadeWidthLeft=30,u.viewportEdgeFadeDistanceLeft=40):(u.viewportEdgeFadeWidthBottom=30,u.viewportEdgeFadeDistanceBottom=40))}c.layer.push(f)}return c}class j6{#e;#t=0;#n=0;constructor(e){this.#e=new Array(e)}push(e){this.#e[this.#t]=e,this.#t=(this.#t+1)%this.size,this.#n=Math.min(this.#n+1,this.size)}get(){const e=this.#e;return this.#n<this.size?e.slice(0,this.#n):e.slice(this.#t,this.size).concat(e.slice(0,this.#t))}get size(){return this.#e.length}get length(){return this.#n}}class lt{static fromMouseEvent(e){return new lt(e.clientX,e.clientY)}constructor(e,n){this.x=e,this.y=n}subtract(e){return new lt(this.x-e.x,this.y-e.y)}add(e){return new lt(this.x-e.x,this.y-e.y)}multiply(e){return new lt(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}}let ro,X1=0;function Z1(){X1=performance.now()}function $1(){return performance.now()-X1<50}function W6(t){return function(...e){Z1(),t(...e)}}function X6(t,e,n,i,r){if(n=W6(n),t.type=="wheel"){t.uiEvent.preventDefault();const s=t.uiEvent,o=s.deltaMode?120:1;if(!s.deltaX&&!s.deltaY)return;ro?.stop();let{x:a,y:l}=t.point;if(i){const c=i.mark.encoders;c.x&&!c.x2&&!c.x.constant&&(a=+c.x(i.datum)*e.width+e.x),c.y&&!c.y2&&!c.y.constant&&(l=(1-+c.y(i.datum))*e.height+e.y)}Math.abs(s.deltaX)<Math.abs(s.deltaY)?n({x:a,y:l,xDelta:0,yDelta:0,zDelta:s.deltaY*o/300}):n({x:a,y:l,xDelta:-s.deltaX*o,yDelta:0,zDelta:0})}else if(t.type=="mousedown"&&t.mouseEvent.button===0){ro&&ro.stop();const s=new j6(30),o=t.mouseEvent;o.preventDefault();let a=lt.fromMouseEvent(o);const l=u=>{const h=lt.fromMouseEvent(u);s.push({point:h,timestamp:performance.now()});const A=h.subtract(a);n({x:a.x,y:a.y,xDelta:A.x,yDelta:A.y,zDelta:0}),a=h},c=()=>{const h=performance.now(),A=s.get().filter(C=>h-C.timestamp<160);if(A.length<5||!r||Z6(A))return;const d=A.at(-1),g=A[0],m=d.point.subtract(g.point).multiply(1/(d.timestamp-g.timestamp));let p=a.x,w=a.y;ro=zu(r,C=>{n({x:C.x,y:C.y,xDelta:p-C.x,yDelta:w-C.y,zDelta:0}),p=C.x,w=C.y},150,.5,{x:p,y:w}),ro({x:a.x-m.x*250,y:a.y-m.y*250})},f=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",f),c()};document.addEventListener("mouseup",f,!1),document.addEventListener("mousemove",l,!1)}}function Z6(t){const e=t[Math.floor(t.length/2)],n=e.point.subtract(t[0].point).multiply(e.timestamp-t[0].timestamp),i=t.at(-1).point.subtract(e.point).multiply(t.at(-1).timestamp-e.timestamp),r=n.length;return i.length/r<.4}class $6 extends Ei{constructor(e,n,i,r,s,o){const l={...n=="locus"?eN:ew,...e};super(rN(l,n),i,r,s,`axisGrid_${e.orient}`,{blockEncodingInheritance:!0,...o}),this.axisProps=l,ln(this,{skipSubtree:!0})}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const ew={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},eN={...ew,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function tN(t,e){const n=t,i=Un(n.orient);return{name:"grid_lines",data:{lazy:{type:"axisTicks",channel:i,axis:t}},mark:{type:"rule",strokeDash:n.gridDash,strokeCap:n.gridCap,color:n.gridColor,size:n.gridWidth,opacity:n.gridOpacity,minBufferSize:300},encoding:{[i]:{field:"value",type:e}}}}function nN(t,e){const n=t,i=Un(n.orient);return{name:"chromosome_lines",data:{lazy:{type:"axisGenome",channel:i}},mark:{type:"rule",strokeDash:n.chromGridDash,strokeCap:n.chromGridCap,color:n.chromGridColor,size:n.chromGridWidth,opacity:n.chromGridOpacity},encoding:{[i]:{field:"continuousStart",type:e,band:0}}}}function iN(t,e){const n=t,i=Un(n.orient);return{name:"chromosome_fill",data:{lazy:{type:"axisGenome",channel:i}},mark:{type:"rect"},encoding:{[i]:{field:"continuousStart",type:e,band:0},[i+"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 rN(t,e){const n={...t},i=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&i.push(iN(n,e)),n.chromGrid&&n.chromGridOpacity>0&&i.push(nN(n,e)),n.grid&&n.gridOpacity>0&&i.push(tN(n,e)),{name:"grid_layers",resolve:{scale:{[Un(t.orient)]:"forced",fill:"independent",opacity:"independent"}},domainInert:!0,layer:i}}const tw={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"},sN={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},oN={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},aN={start:0,middle:.5,end:1},cN={start:"left",middle:"center",end:"right"};function lN(t){if(!t)return;const e=le(t)?{text:t}:t;if(!e.text||e.orient=="none")return;const n={"track-title":sN,overlay:oN}[e.style]??{},i={...tw,...n,...e};let r={},s={x:0,y:0};const o=aN[i.anchor??"middle"];switch(i.orient){case"top":s={x:o,y:1},r={baseline:"alphabetic",angle:0};break;case"right":s={x:1,y:1-o},r={baseline:"alphabetic",angle:90};break;case"bottom":s={x:o,y:0},r={baseline:"top",angle:0};break;case"left":s={x:0,y:o},r={baseline:"alphabetic",angle:-90};break}const a={...tw,...r,...n,...e},l={xOffset:0,yOffset:0};switch(i.orient){case"top":l.yOffset=-a.offset;break;case"right":l.xOffset=a.offset;break;case"bottom":l.yOffset=a.offset;break;case"left":l.xOffset=-a.offset;break}return{data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...s,...l,text:a.text,align:a.align??cN[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 nw extends nt{#e;#t=ve.ZERO;#n=ve.ZERO;#i=ve.ZERO;viewportOffset=0;#s;constructor(e,n,i={}){const r={scrollbarSize:8,scrollbarPadding:2,scrollbarMinLength:20};super({params:[{name:"scrollbarOpacity",value:1}],opacity:{expr:"scrollbarOpacity"},data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1}},e.layoutParent.context,e.layoutParent,e.view,"scrollbar-"+n,{blockEncodingInheritance:!0}),ln(this,{skipSubtree:!0}),this.config=r,this.#e=n,this.#s=i.onViewportOffsetChange;const s=this.config.scrollbarPadding,o=this.config.scrollbarSize;this.#t=this.#e=="vertical"?new ve(()=>this.#n.x+this.#n.width-o-s,()=>this.#n.y+s+this.scrollOffset,()=>o,()=>this.#a()):new ve(()=>this.#n.x+s+this.scrollOffset,()=>this.#n.y+this.#n.height-o-s,()=>this.#a(),()=>o),this.#A(this.viewportOffset),this.addInteractionEventListener("mousedown",(a,l)=>{if(l.stopPropagation(),this.#c()<=0)return;const c=d=>n=="vertical"?d.clientY:d.clientX;l.mouseEvent.preventDefault();const f=this.scrollOffset,u=c(l.mouseEvent),h=d=>{const g=this.#c();if(g<=0)return;const m=tr(c(d)-u+f,0,g);this.interpolateViewportOffset({x:this.#f(m)})},A=()=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",A)};document.addEventListener("mouseup",A,!1),document.addEventListener("mousemove",h,!1)})}get scrollOffset(){return this.#l(this.viewportOffset)}setViewportOffset(e,{notify:n=!0,syncSmoother:i=!1}={}){this.viewportOffset=tr(e,0,this.#u()),i&&this.#A(this.viewportOffset),n&&this.#s&&this.#s(this.viewportOffset)}#o(){const e=this.#e=="horizontal"?"width":"height",n=this.#n[e],i=this.#i[e];return i>0?Math.min(1,n/i):1}#r(){const e=this.#e=="horizontal"?"width":"height";return Math.max(0,this.#n[e]-2*this.config.scrollbarPadding)}#a(){const e=this.#r(),n=this.#o()*e,i=this.config.scrollbarMinLength;return Math.min(e,Math.max(i,n))}#c(){return Math.max(0,this.#r()-this.#a())}#l(e){const n=this.#u(),i=this.#c();return n<=0||i<=0?0:e/n*i}#f(e){const n=this.#u(),i=this.#c();return n<=0||i<=0?0:e/i*n}#u(){const e=this.#e=="horizontal"?"width":"height";return Math.max(0,this.#i[e]-this.#n[e])}render(e,n,i){super.render(e,this.#t,i)}updateScrollbar(e,n){this.#n=e.flatten(),this.#i=n,this.setViewportOffset(this.viewportOffset,{notify:!1,syncSmoother:!0})}#A(e){this.interpolateViewportOffset=zu(this.context.animator,n=>{this.setViewportOffset(n.x,{notify:!0,syncSmoother:!1})},35,.4,{x:e})}}class fN extends Ei{constructor(e,n,i={}){const r=n(),s=Object.keys(r.intervals);if(ii.every(f=>!s.includes(f)))throw new Error("SelectionRect requires at least one of the channels 'x' or 'y' to be present in the selection.");const o={name:"selectionRect",domainInert:!0,resolve:{scale:{x:"forced",y:"forced"}},data:{values:iw(n())},encoding:{},layer:[]};s.includes("x")&&(o.encoding.x={field:"_x",type:null,title:null},o.encoding.x2={field:"_x2"}),s.includes("y")&&(o.encoding.y={field:"_y",type:null,title:null},o.encoding.y2={field:"_y2"}),o.layer.push({name:"selectionRectRect",mark:{type:"rect",clip:!0,fill:"#808080",fillOpacity:.05,stroke:"black",strokeWidth:1,strokeOpacity:.2,...i}});const a=f=>{const u=e.view.getScaleResolution(f);return`format(datum._${f}2 - datum._${f}, '.3s')`+(u.type==="locus"?" + 'b'":"")},l=i.measure=="inside"?9:i.measure=="outside"?-9:0;s.includes("x")&&l!=0&&o.layer.push({name:"selectionRectTextX",mark:{type:"text",align:"center",paddingX:5,dy:l,tooltip:null},encoding:{text:{expr:a("x")},y:s.includes("y")?{field:"_y2",type:null,title:null}:{value:1},y2:null}}),s.includes("y")&&l!=0&&o.layer.push({name:"selectionRectTextY",mark:{type:"text",align:"center",paddingY:5,dy:l,tooltip:null,angle:-90},encoding:{text:{expr:a("y")},x2:null}}),super(o,e.layoutParent.context,e.layoutParent,e.view,"selectionRect",{blockEncodingInheritance:!0}),ln(this,{skipSubtree:!0});const c=()=>{const f=n(),u=this.flowHandle?.dataSource;if(!u)throw new Error("Cannot find selection rect data source handle!");u.updateDynamicData(iw(f))};this.registerDisposer(n.subscribe(c))}}function iw(t){const e=t.intervals.x,n=t.intervals.y;return!e&&!n?[]:[{_x:e?.[0],_x2:e?.[1],_y:n?.[0],_y2:n?.[1]}]}class uN{constructor(e,n,i){if(this.layoutParent=n,this.view=e,this.serial=i,this.background=void 0,this.backgroundStroke=void 0,this.axes={},this.gridLines={},this.scrollbars={},this.selectionRect=void 0,this.title=void 0,this.coords=ve.ZERO,e.needsAxes.x||e.needsAxes.y){const r=e.spec,s="view"in r?r?.view:void 0,o=AN(s);o&&(this.background=new nt(o,n.context,n,e,"background"+i,{blockEncodingInheritance:!0}),ln(this.background,{skipSubtree:!0}));const a=hN(s);a&&(this.backgroundStroke=new nt(a,n.context,n,e,"backgroundStroke"+i,{blockEncodingInheritance:!0}),ln(this.backgroundStroke,{skipSubtree:!0}));const l=lN(e.spec.title);if(l){const c=new nt(l,n.context,n,e,"title"+i,{blockEncodingInheritance:!0});this.title=c,ln(this.title,{skipSubtree:!0})}}e.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new nw(this,"horizontal")),e.spec.viewportHeight!=null&&(this.scrollbars.vertical=new nw(this,"vertical")),this.#e()}#e(){const e=this.view,n=i=>{this.view.context.glHelper.canvas.style.cursor=i};for(const[i,r]of e.paramRuntime.paramConfigs){if(!("select"in r))continue;const s=sa(r.select);if(!Xd(s))continue;const o=s.encodings,a=Object.fromEntries(o.map(C=>{const y=this.view.getScaleResolution(C),b=y?.getScale();if(!b||!Pe(b.type))throw new Error(`No continuous scale found for interval selection param "${i}" on channel "${C}"! Scale type is "${b?.type??"none"}".`);return[C,y]}));if(this.selectionRect)throw new Error("Only one interval selection per container is currently allowed!");let l=!1,c=!1,f=!1,u=null;const h=(C,y)=>Object.fromEntries(o.map(b=>[b,[Math.min(C[b],y[b]),Math.max(C[b],y[b])]])),A=e.paramRuntime.createExpression(i),d=C=>{e.paramRuntime.setValue(i,C)};r.value&&d({type:"interval",intervals:r.value});const g=()=>{d(Kd(o)),n(null)};this.selectionRect=new fN(this,A,s.mark),this.selectionRect.initializeChildren();const m=C=>{const y={x:0,y:0},b=e.coords.normalizePoint(C.x,C.y,!0);for(const x of o){const I=a[x].getScale(),S=I.invert(x=="x"?b.x:b.y);y[x]=S+(["index","locus"].includes(I.type)?.5:0)}return y},p=C=>{const{intervals:y}=C,b=(S,Q,v)=>{const F=(O,z)=>z==null?null:a[O].getScale()(z),R=F("x",S)??v,M=F("y",Q)??v;return e.coords.denormalizePoint(R,M,!0)},x=b(y.x?.[0],y.y?.[0],0),I=b(y.x?.[1],y.y?.[1],1);return ve.create(x.x,x.y,I.x-x.x,I.y-x.y)};e.addInteractionEventListener("mousedown",(C,y)=>{if(y.mouseEvent.button!=0)return;if(u=l?p(A()):null,u)n("grabbing"),c=!0;else{const Q=y.point;if(Zd(A())&&(c=!0),y.mouseEvent.shiftKey)g(),f=!0;else if(Zd(A())){const F=(R,M)=>{e.removeInteractionEventListener("mouseup",F);const O=M.point;Q.subtract(O).length<2&&g()};e.addInteractionEventListener("mouseup",F);return}else return}y.stopPropagation();const b=y.point,x=lt.fromMouseEvent(y.mouseEvent).subtract(b),I=Q=>{const v=lt.fromMouseEvent(Q).subtract(x);let F;if(u){const R=v.subtract(b),M=u.translate(R.x,R.y);F=h(m(new lt(M.x,M.y)),m(new lt(M.x2,M.y2)))}else F=h(m(b),m(v));for(const R of o){const M=a[R],{zoomExtent:O,scale:z}=M,_=F[R];if(["index","locus"].includes(z.type)&&(_[0]=Math.ceil(_[0]),_[1]=Math.ceil(_[1])),u){const Y=_[1]-_[0],te=O[0],oe=O[1];_[0]<te&&(_[0]=te,_[1]=te+Y),_[1]>oe&&(_[1]=oe,_[0]=oe-Y)}else _[0]=Math.max(O[0],_[0]),_[1]=Math.min(O[1],_[1]);_[1]=Math.min(O[1],_[1])}d({type:"interval",intervals:F})},S=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",S),f=!1,u&&(n("move"),u=null)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",S)}),e.addInteractionEventListener("click",(C,y)=>{y.mouseEvent.button==0&&c&&(y.stopPropagation(),c=!1)},!0);const w=C=>Zx(A(),m(C));e.addInteractionEventListener("dblclick",(C,y)=>{w(y.point)&&(g(),y.stopPropagation())},!0),e.addInteractionEventListener("mousemove",(C,y)=>{w(y.point)?f||(l=!0,u||n("move")):(l=!1,u||n(null))})}}*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(){this.disposeAxisViews();const{view:e,axes:n,gridLines:i}=this,r=(a,l)=>{const c=a.getAxisProps();if(c===null)return;const f=c?{...c}:{};if(!f.orient){for(const u of fc[l])if(!n[u]){f.orient=u;break}if(!f.orient)throw new Error("No slots available for an axis! Perhaps a LayerView has more than two children?")}if(f.title??=a.getTitle(),!fc[l].includes(f.orient))throw new Error(`Invalid axis orientation "${f.orient}" on channel "${l}"!`);return f},s=async(a,l,c)=>{const f=r(a,l);if(f){if(n[f.orient])throw new Error(`An axis with the orient "${f.orient}" already exists!`);const u=new K1(f,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,c);n[f.orient]=u,await u.initializeChildren()}},o=async(a,l,c)=>{const f=r(a,l);if(f&&(f.grid||f.chromGrid)){const u=new $6(f,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,c);i[f.orient]=u,await u.initializeChildren()}};for(const a of["x","y"])if(e.needsAxes[a]){const l=e.resolutions.axis[a];if(!l)continue;await s(l,a,e)}for(const a of["x","y"])if(e.needsAxes[a]&&e.getConfiguredOrDefaultResolution(a,"axis")!="excluded"){const l=e.getAxisResolution(a);if(!l)continue;await o(l,a,e)}if(e instanceof Ei){for(const a of e)for(const[l,c]of Object.entries(a.resolutions.axis)){const f=c.getAxisProps();f&&f.orient&&await s(c,l,a)}for(const a of e)for(const[l,c]of Object.entries(a.resolutions.axis)){const f=c.getAxisProps();f&&!f.orient&&await s(c,l,a)}}[...Object.values(n),...Object.values(i)].forEach(a=>a.visit(l=>{l instanceof nt&&l.resolve("scale")}))}disposeAxisViews(){for(const e of Object.values(this.axes))e.disposeSubtree();for(const e of Object.values(this.gridLines))e.disposeSubtree();this.axes={},this.gridLines={}}getOverhang(){const e=n=>{const i=this.axes[n];return i?Math.max(i.getPerpendicularSize()+(i.axisProps.offset??0),0):0};return new qe(e("top"),e("right"),e("bottom"),e("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}function AN(t){if(t?.fill||t?.fillOpacity||t?.shadowOpacity)return{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 hN(t){if(!(!t||!t.stroke||t.strokeWidth===0||t.strokeOpacity===0))return{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"}}}}const dN={pan:{baseSpeed:1,maxExtraSpeed:3,pressHalfLifeMs:30,releaseHalfLifeMs:100,holdGrowthHalfLifeMs:800,stopVelocity:.01},zoom:{baseSpeed:3,maxExtraSpeed:15,pressHalfLifeMs:10,releaseHalfLifeMs:100,holdGrowthHalfLifeMs:600,stopVelocity:.01}};class gN{#e;#t;#n;#i;#s;constructor(e=dN){this.#i=e.pan,this.#s=e.zoom,this.#e={KeyW:!1,KeyA:!1,KeyS:!1,KeyD:!1},this.#t={velocity:0,holdMs:0,direction:0},this.#n={velocity:0,holdMs:0,direction:0}}isNavigationKey(e){return e==="KeyW"||e==="KeyA"||e==="KeyS"||e==="KeyD"}handleKeyDown(e){return this.#o(e,!0)}handleKeyUp(e){return this.#o(e,!1)}reset(){this.#e.KeyW=!1,this.#e.KeyA=!1,this.#e.KeyS=!1,this.#e.KeyD=!1,this.#t.velocity=0,this.#t.holdMs=0,this.#t.direction=0,this.#n.velocity=0,this.#n.holdMs=0,this.#n.direction=0}step(e){if(e<=0)return{panDelta:0,zoomDelta:0,active:this.isActive()};{const n=rw(this.#e.KeyD,this.#e.KeyA),i=rw(this.#e.KeyW,this.#e.KeyS),r=sw(this.#t,n,e,this.#i),s=sw(this.#n,i,e,this.#s),o=e/1e3;return{panDelta:r*o,zoomDelta:s*o,active:this.isActive()}}}isActive(){return this.#e.KeyW||this.#e.KeyA||this.#e.KeyS||this.#e.KeyD?!0:this.#t.velocity!==0||this.#n.velocity!==0}#o(e,n){if(this.isNavigationKey(e)){const i=e;return this.#e[i]===n?!1:(this.#e[i]=n,!0)}else return!1}}function rw(t,e){return t===e?0:e?1:-1}function sw(t,e,n,i){if(e!==0){t.direction!==e&&(t.holdMs=0),t.holdMs+=n;const r=i.maxExtraSpeed*(1-Math.pow(2,-t.holdMs/i.holdGrowthHalfLifeMs)),s=e*(i.baseSpeed+r);t.velocity=ow(t.velocity,s,n,i.pressHalfLifeMs)}else t.holdMs=0,t.velocity=ow(t.velocity,0,n,i.releaseHalfLifeMs),Math.abs(t.velocity)<i.stopVelocity&&(t.velocity=0);return t.direction=e,t.velocity}function ow(t,e,n,i){return e+(t-e)*Math.pow(2,-n/i)}function aw(t){const e={x:new Set,y:new Set};return t.visit(n=>{for(const[i,r]of Object.entries(e)){const s=n.getScaleResolution(i);s&&s.isZoomable()&&r.add(s)}}),e}function Zu(t){const e=aw(t).x;if(e.size===1){const n=e.values().next().value,i=t.getScaleResolution("x");return!i||i!==n?void 0:n}}class pN{#e;#t;#n=.5;#i=new gN;#s=!1;#o=0;#r=e=>{if(!this.#s)return;const n=Zu(this.#t);if(!n){this.#i.reset(),this.#s=!1,this.#o=0;return}const i=Math.max(0,e-this.#o);this.#o=e;const r=this.#i.step(i);(r.panDelta!==0||r.zoomDelta!==0)&&n.zoom(2**r.zoomDelta,this.#n,r.panDelta)&&(Z1(),this.#e.animator.requestRender()),r.active?this.#e.animator.requestTransition(this.#r):(this.#s=!1,this.#o=0)};constructor({context:e,viewRoot:n}){this.#e=e,this.#t=n,this.#a()}handlePointerEvent(e,n){if(e){const i=e.view;if(typeof i.getKeyboardZoomAnchorX=="function"){const r=i.getKeyboardZoomAnchorX(n.point);Number.isFinite(r)&&(this.#n=Math.max(0,Math.min(1,r)))}else{const r=e.coords.normalizePoint(n.point.x,n.point.y);this.#n=r.x}}else return}#a(){const e=this.#e.addKeyboardListener;typeof e=="function"&&(e("keydown",n=>{mN(n)||!this.#i.isNavigationKey(n.code)||!Zu(this.#t)||!this.#i.handleKeyDown(n.code)||(n.preventDefault(),this.#c())}),e("keyup",n=>{!this.#i.isNavigationKey(n.code)||!this.#i.handleKeyUp(n.code)||!Zu(this.#t)||(n.preventDefault(),this.#c())}))}#c(){this.#s||(this.#s=!0,this.#o=performance.now(),this.#e.animator.requestTransition(this.#r))}}function mN(t){return!!(t.altKey||t.ctrlKey||t.metaKey||wN(t.target))}function wN(t){if(!t||typeof t!="object")return!1;const e=t;if(e.isContentEditable)return!0;if(typeof e.nodeName=="string"){const n=e.nodeName.toLowerCase();return n==="input"||n==="textarea"||n==="select"}return!1}const uc=Object.freeze({size:1,color:"#ccc",opacity:1,strokeDash:[4,4],strokeCap:"butt"});class yN{#e;#t;#n;#i=[];#s=[];#o={x:[0,0],y:[0,0]};constructor({direction:e,props:n,context:i,layoutParent:r,dataParent:s,getName:o}){this.#e=e,this.#t=n.includePlotMargin??!0;const a={...n};delete a.includePlotMargin,this.#n=this.#c(a,i,r,s,o)}get view(){return this.#n}update(e,n,i,r,s,o){this.#r(e,n,r,s),this.#a(i,o)}render(e,n,i){this.#n.render(e,n,i)}#r(e,n,i,r){if(this.#s.length=0,n<2)return;const s=this.#e==="vertical"?"column":"row",o=r?3:2;for(let a=1;a<n;a++){const c=i(s,a)-o,f=e[c],u=f?f.location:0,h=f?f.size:0;this.#s.push(u+h/2)}}#a(e,n){const i=this.#t?0:n.left,r=this.#t?e.width:e.width-n.right,s=this.#t?0:n.bottom,o=this.#t?e.height:e.height-n.top;this.#i.length=this.#s.length;for(let f=0;f<this.#s.length;f++){const u=this.#s[f],h=this.#i[f]??{};if(this.#e==="vertical")h.x=u,h.x2=u,h.y=s,h.y2=o;else{const A=e.height-u;h.x=i,h.x2=r,h.y=A,h.y2=A}this.#i[f]=h}const a=this.#n.flowHandle?.dataSource;if(!a)return;a.updateDynamicData(this.#i),this.#o.x[1]=e.width,this.#o.y[1]=e.height;const l=this.#n.getScaleResolution("x")?.getScale();l&&l.domain(this.#o.x);const c=this.#n.getScaleResolution("y")?.getScale();c&&c.domain(this.#o.y)}#c(e,n,i,r,s){const o=EN(e),a=this.#e==="horizontal"?s("separatorHorizontal"):s("separatorVertical"),l=new nt(o,n,i,r,a,{blockEncodingInheritance:!0});return ln(l,{skipSubtree:!0}),l}}function CN(t){if(!t)return null;const e=t===!0?{...uc}:{...uc,...t};return e.strokeDash===uc.strokeDash&&(e.strokeDash=uc.strokeDash.slice()),e}function EN(t){return{domainInert:!0,data:{values:[]},resolve:{scale:{x:"excluded",y:"excluded"},axis:{x:"excluded",y:"excluded"}},mark:{...t,type:"rule",clip:t.clip??!1,tooltip:null},encoding:{x:{field:"x",type:"quantitative",scale:{nice:!1,zero:!1}},y:{field:"y",type:"quantitative",scale:{nice:!1,zero:!1}},x2:{field:"x2"},y2:{field:"y2"}}}}class IN extends no{#e=1/0;#t=10;#n=[];#i={};#s=0;#o={};#r=null;constructor(e,n,i,r,s,o,a){super(e,n,i,r,s,a),this.spec=e,this.#t=e.spacing??10,this.#e=o,this.#n=[],this.wrappingFacet=!1;const l=CN(e.separator);if(l)for(const c of xN(e))this.#o[c]=new yN({direction:c,props:l,context:this.context,layoutParent:this,dataParent:this,getName:f=>this.getNextAutoName(f)});this.layoutParent||(this.#r=new pN({context:this.context,viewRoot:this}))}appendChild(e){this.appendChildView(e)}appendChildView(e){return this.insertChildViewAt(e,this.#n.length)}insertChildViewAt(e,n){e.layoutParent??=this;const i=new uN(e,this,this.#s);return this.#s++,this.#n.splice(n,0,i),this.invalidateSizeCache(),i}removeChildView(e){const n=this.#n.findIndex(i=>i.view===e);if(n<0)throw new Error("Not my child view!");this.removeChildAt(n)}removeChildAt(e){const n=this.#n[e];if(!n)throw new Error("Child index out of range!");this.#l(n),this.#n.splice(e,1),this.invalidateSizeCache()}get#a(){return this.#n.filter(e=>e.view.isConfiguredVisible())}get#c(){return new H1(this.#a.length,this.#e??1/0)}setChildren(e){for(const n of this.#n)this.#l(n);this.#n=[];for(const n of e)this.appendChild(n);this.invalidateSizeCache()}#l(e){e.disposeAxisViews();for(const n of e.getChildren())n.disposeSubtree()}get children(){return this.#n.map(e=>e.view)}get childCount(){return this.#n.length}async createAxes(){await this.syncSharedAxes(),await Promise.all(this.#n.map(e=>e.createAxes()))}async syncSharedAxes(){for(const n of Object.values(this.#i))n.disposeSubtree();this.#i={};const e=[];for(const n of ii){const i=this.resolutions.axis[n];if(!i)continue;const r=i.getAxisProps();if(!r)continue;const s={title:i.getTitle(),orient:fc[n][0],...r},o=new K1(s,i.scaleResolution.type,this.context,this,this);e.push(o.initializeChildren()),this.#i[n]=o}await Promise.all(e)}*[Symbol.iterator](){for(const e of this.#n)yield*e.getChildren();for(const e of Object.values(this.#o))yield e.view;for(const e of Object.values(this.#i))yield e}#f(e){const n=e=="column"?"width":"height",i=(r,s)=>r.map(o=>{const l=this.#a[o].getOverhangAndPadding();return e=="column"?s?l.right:l.left:s?l.bottom:l.top}).reduce((o,a)=>Math.max(o,a),0);return this._cache(`size/directionSizes/${e}`,()=>this.#c[e=="column"?"colIndices":"rowIndices"].map(r=>({axisBefore:i(r,0),axisAfter:i(r,1),view:Vk(r.map(s=>this.#a[s].view.getViewportSize()[n]))})))}#u(e){const n=this.#f(e),i=[];i.push(Js);for(const[r,s]of n.entries())r>0&&i.push({px:this.#t,grow:0}),(r==0||this.wrappingFacet)&&i.push(Js),i.push({px:s.axisBefore,grow:0}),i.push(s.view),i.push({px:s.axisAfter,grow:0}),(r==n.length-1||this.wrappingFacet)&&i.push(Js);return i}#A(e){let n=0,i=0;const r=e=="row"?this.spec.height:this.spec.width;if(r||r===0)return Sm(r);const s=this.#f(e);for(const[o,a]of s.entries())o>0&&(i+=this.#t),(o==0||this.wrappingFacet)&&(i+=0),i+=a.axisBefore,i+=a.view.px??0,n+=a.view.grow??0,i+=a.axisAfter,(o==s.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:n}}#h(e,n){return e=="row"&&this.wrappingFacet?1+6*n+2:2+4*n+1}getOverhang(){return this.#d().union(this.#g())}#d(){const e=this.#f("column"),n=this.#f("row");return!e.length||!n.length?qe.zero():new qe(n.at(0).axisBefore,e.at(-1).axisAfter,n.at(-1).axisAfter,e.at(0).axisBefore)}#g(){const e=n=>{const i=Wu[n],r=this.#i[i];return r?.axisProps.orient!==n?0:Math.max(r.getPerpendicularSize()+(r.axisProps.offset??0),0)};return new qe(e("top"),e("right"),e("bottom"),e("left"))}getSize(){return this._cache("size",()=>new Pn(this.#A("column"),this.#A("row")).addPadding(this.#g()))}render(e,n,i={}){if(super.render(e,n,i),!this.isConfiguredVisible())return;this.layoutParent||(n=n.shrink(this.getPadding())),n=n.shrink(this.#g()),e.pushView(this,n);const r=e.getDevicePixelRatio(),s={devicePixelRatio:r},o=Bm(this.#u("column"),n.width,s),a=Bm(this.#u("row"),n.height,s),l=new H1(this.#a.length,this.#e??1/0),c=d=>Math.round(d*r)/r,f=[];for(const[d,g]of this.#a.entries()){const{view:m,axes:p,gridLines:w,background:C,backgroundStroke:y,title:b,selectionRect:x}=g,[I,S]=l.getCellCoords(d),Q=o[this.#h("column",I)],v=a[this.#h("row",S)],F=m.getViewportSize(),R=m.getSize(),M=m.getOverhang(),O=Q.location-M.left,z=v.location-M.top,_=(U,K)=>(U[K].grow?(K=="width"?Q:v).size:U[K].px)+M[K],Y=_(F,"width"),te=_(F,"height"),oe=_(R,"width"),ne=_(R,"height"),_e=g.scrollbars.horizontal,Kt=g.scrollbars.vertical,xo=_e?()=>c(_e.viewportOffset):()=>0,Ur=Kt?()=>c(Kt.viewportOffset):()=>0,hn=new ve(()=>n.x+O,()=>n.y+z,()=>Y,()=>te),Ni=m.isScrollable(),Bo=Ni?new ve(()=>n.x+O-xo(),()=>n.y+z-Ur(),()=>oe,()=>ne):hn;g.coords=hn;const _r=i.clipRect?hn.intersect(i.clipRect):hn;f.push({col:I,row:S,view:m,axes:p,gridLines:w,background:C,backgroundStroke:y,title:b,selectionRect:x,viewportCoords:hn,viewCoords:Bo,clippedChildCoords:_r,viewWidth:oe,viewHeight:ne,scrollable:Ni,gridChild:g})}for(const d of f)d.background?.render(e,d.clippedChildCoords,{...i,clipRect:void 0});const u=this.#d(),h=this.#o.vertical;h&&(h.update(o,l.nCols,n,(d,g)=>this.#h(d,g),this.wrappingFacet,u),h.render(e,n,i));const A=this.#o.horizontal;A&&(A.update(a,l.nRows,n,(d,g)=>this.#h(d,g),this.wrappingFacet,u),A.render(e,n,i));for(const d of f){const{view:g,axes:m,gridLines:p,backgroundStroke:w,title:C,selectionRect:y,viewportCoords:b,viewCoords:x,clippedChildCoords:I,viewWidth:S,viewHeight:Q,scrollable:v,gridChild:F,col:R,row:M}=d;for(const z of Object.values(p))z.render(e,b,i);const O=bN(g)||v;O&&g.render(e,x,{...i,clipRect:I}),w?.render(e,I,{...i,clipRect:void 0});for(const[z,_]of Object.entries(m)){const Y=z=="left"||z=="right"?"vertical":"horizontal",te=F.scrollbars[Y],oe=te?b.modify(Y=="vertical"?{y:()=>x.y,height:Q}:{x:()=>x.x,width:S}):b,ne=cw(oe,z,_);let _e=i.clipRect;te&&(_e=ne.intersect(_e).intersect(te?b.modify(Y=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),_.render(e,ne,{...i,clipRect:_e})}for(const z of Object.values(this.#i)){const Y=z.axisProps.orient;(Y=="left"&&R==0||Y=="right"&&R==l.nCols-1||Y=="top"&&M==0||Y=="bottom"&&M==l.nRows-1)&&z.render(e,cw(b.shrink(F.view.getOverhang()),Y,z),i)}O||g.render(e,x,i),y?.render(e,x,i);for(const z of Object.values(F.scrollbars))z.updateScrollbar(b,x),z.render(e,n,i);C?.render(e,b,i)}e.popView(this)}propagateInteractionEvent(e){if(this.handleInteractionEvent(void 0,e,!0),e.stopped)return;const n=this.#a.find(r=>r.coords.containsPoint(e.point.x,e.point.y));this.#r?.handlePointerEvent(n,e);for(const r of Object.values(n?.scrollbars??{}))if(r.coords.containsPoint(e.point.x,e.point.y)&&(r.propagateInteractionEvent(e),e.stopped))return;const i=n?.view;if(i){if(i.propagateInteractionEvent(e),e.stopped)return;(i instanceof nt||i instanceof Ei)&&X6(e,n.coords,r=>this.#p(n.coords,n.view,r),this.context.getCurrentHover(),this.context.animator)}e.stopped||this.handleInteractionEvent(void 0,e,!1)}#p(e,n,i){for(const[r,s]of Object.entries(aw(n))){if(s.size<=0)continue;const o=e.normalizePoint(i.x,i.y),a=e.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:a.x-o.x,y:a.y-o.y};for(const c of s)c.zoom(2**i.zDelta,r=="y"?1-o[r]:o[r],r=="x"?l.x:-l.y)}this.context.animator.requestRender()}getDefaultResolution(e,n){return"independent"}}function bN(t){let e=!0;return t.visit(n=>{n instanceof nt&&(e&&=n.mark.properties.clip===!0)}),e}function xN(t){return"vconcat"in t?["horizontal"]:"hconcat"in t?["vertical"]:["horizontal","vertical"]}function cw(t,e,n){const i=n.axisProps,r=n.getPerpendicularSize();if(e=="bottom")return t.translate(0,t.height+i.offset).modify({height:r});if(e=="top")return t.translate(0,-r-i.offset).modify({height:r});if(e=="left")return t.translate(-r-i.offset,0).modify({width:r});if(e=="right")return t.translate(t.width+i.offset,0).modify({width:r})}class $u extends IN{constructor(e,n,i,r,s){super(e,n,i,r,s,lc(e)?e.columns:io(e)?1:1/0),this.spec=e}async initializeChildren(){const e=this.spec,n=lc(e)?e.concat:io(e)?e.vconcat:e.hconcat;this.setChildren(await Promise.all(n.map(i=>this.context.createOrImportView(i,this,this,this.getNextAutoName("grid"))))),await this.createAxes()}async addChildSpec(e,n){return this.#t().addChildSpec(e,n)}async removeChildAt(e){await this.#t().removeChildAt(e)}getDefaultResolution(e,n){return n=="axis"?"independent":io(this.spec)&&e==="x"||z1(this.spec)&&e==="y"?"shared":"independent"}#e(){const e=this.spec;let n;return lc(e)?n=e.concat:io(e)?n=e.vconcat:n=e.hconcat,{specs:n,insertAt:(i,r)=>{n.splice(i,0,r)},removeAt:i=>{n.splice(i,1)}}}#t(){return new L1(this,{getChildSpecs:this.#e.bind(this),insertView:(e,n)=>this.insertChildViewAt(e,n),removeView:e=>super.removeChildAt(e),prepareView:async(e,n,i)=>{await i.createAxes(),await this.syncSharedAxes()},afterRemove:async()=>{await this.syncSharedAxes()},defaultName:()=>this.getNextAutoName("grid")})}}const lw="viewRoot";class BN{#e=new Map;constructor(e={}){this.options={allowImport:!0,wrapRoot:!0,...e};const n=i=>(r,s,o,a,l)=>new i(r,s,o,a,l);this.addViewType(Ju,n(Ei)),this.addViewType(Yu,((i,r,s,o,a)=>new Ei(F6(i),r,s,o,a))),this.addViewType(Vu,n(nt)),this.addViewType(io,n($u)),this.addViewType(z1,n($u)),this.addViewType(lc,n($u))}addViewType(e,n){this.#e.set(e,n)}createView(e,n,i,r,s){for(const[o,a]of this.#e)if(o(e))return a(e,n,i,r,s);throw SN(e)?new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!"):new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(e)]))}isViewSpec(e){const n=[...this.#e.keys()].filter(i=>i(e));if(n.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return n.length==1}async createOrImportView(e,n,i,r,s,o){let a;const l=G1(e)?e.name??null:void 0;if(G1(e)){let h;if("url"in e.import)if(this.options.allowImport)h=await xF(e,r.getBaseUrl(),n);else throw new He("Importing views is not allowed!",i);else if("template"in e.import)h=fw(e.import.template,r);else throw new Error("Invalid import: "+JSON.stringify(e));o?.(h),vN(h,e),a=h}else a=e;const c=h=>h?.params?.some(A=>zl(A)&&sa(A.select).type=="interval");let f=!1;!r&&this.options.wrapRoot&&(Vu(a)||Ju(a)||Yu(a)||c(a))&&s===lw&&(a={name:"implicitRoot",vconcat:[a]},f=!0);const u=this.createView(a,n,i,r,s);return l!==void 0&&M6(u,l),f&&ln(u),u instanceof no&&await u.initializeChildren(),u.registerStepSizeInvalidation(),u}}function fw(t,e){const n=e.spec?.templates?.[t];if(n)return structuredClone(n);if(e.dataParent)return fw(t,e.dataParent);throw new Error(`Cannot find template "${t}" in current view or its ancestors!`)}function vN(t,e){e.name!=null&&(t.name=e.name),e.visible!=null&&(t.visible=e.visible);const n=Ce(e.params)?e.params:Ge(e.params)?Object.entries(e.params).map(([i,r])=>({name:i,value:r})):[];if(n.length){t.params??=[];for(const i of n){const r=t.params.findIndex(s=>s.name==i.name);r>=0&&(t.params[r]=i)}for(const i of n)t.params.some(r=>r.name==i.name)||t.params.push(i)}}function SN(t){return"samples"in t&&Ge(t.samples)&&"spec"in t&&Ge(t.spec)}class QN{#e;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 proxiedMouseEvent(){return this.#e||(this.#e=DN(this.mouseEvent)),this.#e}get mouseEvent(){if(this.uiEvent instanceof MouseEvent)return this.uiEvent;throw new Error("Not a MouseEvent!")}}function DN(t){const e=i=>i===null||typeof i!="object"&&typeof i!="function",n={get(i,r,s){const o=Reflect.get(i,r,i);if(!e(o))throw new Error(`Access to non-primitive property "${String(r)}" is not allowed.`);return o},getPrototypeOf(){return null},ownKeys(i){return Reflect.ownKeys(i).filter(s=>e(i[s])).map(s=>typeof s=="symbol"?s:String(s))},getOwnPropertyDescriptor(i,r){const s=Reflect.getOwnPropertyDescriptor(i,r);if(s&&!("get"in s||"set"in s)&&e(s.value))return{value:s.value,writable:!!s.writable,enumerable:!!s.enumerable,configurable:!!s.configurable}},has(i,r){return r in i?e(i[r]):!1}};return new Proxy(t,n)}class kN{constructor(e,n){this.animator=e,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=zu(e,i=>{const r=i.x-this.lastValue;this.lastValue=i.x,this.callback?.(r)},40,.1,{x:0})}cancel(){this.lastValue!==this.targetValue&&(this.targetValue=wh([this.lastValue,this.targetValue],.3),this.smoother({x:this.targetValue}))}setMomentum(e,n){if(this.disabled){n(e);return}this.callback=n;const i=tr(this.targetValue+e-this.lastValue,-this.maxDistance,this.maxDistance);this.targetValue=this.lastValue+i,this.smoother({x:this.targetValue})}}function FN(t){const e={},n=["string","number","boolean"],i=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const r in t){const s=r;!i.includes(r)&&n.includes(typeof t[s])&&(e[s]=t[s])}return e}class RN{#e;#t;#n;#i;#s;#o;#r;#a;#c;#l;#f;#u;constructor({viewRoot:e,glHelper:n,tooltip:i,animator:r,emitEvent:s,tooltipHandlers:o,renderPickingFramebuffer:a,getDevicePixelRatio:l}){this.#e=e,this.#t=n,this.#n=i,this.#i=r,this.#s=s,this.#o=o,this.#r=a,this.#a=l,this.#c=void 0,this.#l=new kN(this.#i),this.#f=void 0,this.#u=!1}getCurrentHover(){return this.#c}registerMouseEvents(){const e=this.#t.canvas;let n=performance.now(),i=!1;const r=s=>{const o=performance.now(),a=o-n<200;if(s instanceof MouseEvent){const l=e.getBoundingClientRect(),c=new lt(s.clientX-l.left-e.clientLeft,s.clientY-l.top-e.clientTop);s.type=="mousemove"&&!a&&(this.#n.handleMouseMove(s),this.#u=!1,s.buttons==0&&!$1()&&(this.#r(),this.#A(c.x,c.y)));const f=u=>{this.#e.propagateInteractionEvent(new QN(c,u)),this.#u||this.#n.clear()};if(s.type!="wheel"&&this.#l.cancel(),(s.type=="mousedown"||s.type=="mouseup")&&!$1())this.#r();else if(s.type=="wheel"){n=o,this.#u=!1;const u=s;if(Math.abs(u.deltaX)>Math.abs(u.deltaY))this.#c=null,this.#l.cancel();else{const h=FN(u);this.#l.setMomentum(u.deltaY*(u.deltaMode?80:1),A=>{const d=new WheelEvent("wheel",{...h,deltaMode:0,deltaX:0,deltaY:A});f(d)}),u.preventDefault();return}}if(s.type=="click"){if(i)return;const u=this.#c?{type:s.type,viewPath:this.#c.mark.unitView.getLayoutAncestors().map(h=>h.name).reverse(),datum:this.#c.datum}:{type:s.type,viewPath:null,datum:null};this.#s("click",u)}(s.type!="click"||this.#f?.subtract(lt.fromMouseEvent(s)).length<3)&&f(s)}};["mousedown","mouseup","wheel","click","mousemove","gesturechange","contextmenu","dblclick"].forEach(s=>e.addEventListener(s,r)),e.addEventListener("mousedown",s=>{this.#f=lt.fromMouseEvent(s),this.#n.sticky?(this.#n.sticky=!1,this.#n.clear(),i=!0):i=!1;const o=()=>{document.addEventListener("mouseup",()=>this.#n.popEnabledState(),{once:!0}),this.#n.pushEnabledState(!1)};if(s.button==2||s.shiftKey||s.ctrlKey||s.metaKey)o();else if(this.#n.visible){const a=setTimeout(()=>{i=!0,this.#n.sticky=!0},400),l=()=>clearTimeout(a);document.addEventListener("mouseup",l,{once:!0}),document.addEventListener("mousemove",l,{once:!0})}}),e.addEventListener("dragstart",s=>s.stopPropagation()),e.addEventListener("mouseout",()=>{this.#n.clear(),this.#c=null})}#A(e,n){const i=this.#a(),r=ND(this.#t.gl,this.#t._pickingBufferInfo,e*i,n*i),s=r[0]|r[1]<<8|r[2]<<16|r[3]<<24;if(s==0){this.#c=null;return}if(s!==this.#c?.uniqueId&&(this.#c=null),this.#c||this.#e.visit(o=>{if(o instanceof nt){if(o.mark.isPickingParticipant()&&[...o.facetCoords.values()].some(a=>a.containsPoint(e,n))){const a=o.getCollector().findDatumByUniqueId(s);a&&(this.#c={mark:o.mark,datum:a,uniqueId:s})}if(this.#c)return Ar}}),this.#c){const o=this.#c.mark;this.updateTooltip(this.#c.datum,async a=>{if(!o.isPickingParticipant())return;const l=o.properties.tooltip;if(l!==null){const c=l?.handler??"default",f=this.#o[c];if(!f)throw new Error("No such tooltip handler: "+c);const u=Q1(a,o,l?.params);return f(a,o,l?.params,u)}})}}updateTooltip(e,n){if(!this.#u||!e)this.#n.updateWithDatum(e,n),this.#u=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}}class uw{constructor(e){this.globalOptions=e}pushView(e,n){}popView(e){}renderMark(e,n){}getDevicePixelRatio(){return 1}}class eA extends uw{#e=[0,0,0,0];#t;#n=[];#i;#s;#o=new Set;#r=void 0;#a=1;#c={width:0,height:0};constructor(e,n){if(super(e),this.#s=n.webGLHelper,this.#i=n.framebufferInfo,this.#a=n.devicePixelRatio,this.#c=n.canvasSize,n.clearColor){const i=Rn(n.clearColor).rgb();this.#e=[i.r/255,i.g/255,i.b/255,i.opacity]}}getDevicePixelRatio(){return this.#a}pushView(e,n){this.#o.add(e),this.#r=n}renderMark(e,n){if(this.globalOptions.picking&&!e.isPickingParticipant())return;const i=e.render(n);i&&this.#n.push({mark:e,callback:i,coords:this.#r,clipRect:n.clipRect})}render(){if(this.#t||this.#l(),this.#t.length==0)return;const e=this.#s.gl,n=this.#i;n?(e.bindFramebuffer(e.FRAMEBUFFER,n.framebuffer),e.viewport(0,0,n.width,n.height)):e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),e.disable(e.SCISSOR_TEST),e.clearColor(...this.#e),e.clear(e.COLOR_BUFFER_BIT);for(const i of this.#o)i.onBeforeRender();for(const i of this.#t)i();this.#i&&e.bindFramebuffer(e.FRAMEBUFFER,null)}#l(){this.#t=[];let e=!0,n=!0;const i=o=>()=>{e&&o()},r=o=>()=>{e&&n&&o()},s=Oo(this.#n.reverse(),o=>o.mark);for(const[o,a]of[...s.entries()].reverse()){if(!o.isReady())continue;this.#t.push(()=>{e=o.unitView.getEffectiveOpacity()>0}),this.#t.push(...o.prepareRender(this.globalOptions).map(c=>i(c)));let l;for(const c of a){const f=c.coords;f.equals(l)||this.#t.push(i(()=>{n=o.setViewport(this.#c,this.#a,f,c.clipRect)})),this.#t.push(r(c.callback)),l=c.coords}}}}class NN extends uw{constructor(...e){super({}),this.contexts=e}pushView(e,n){for(const i of this.contexts)i.pushView(e,n)}popView(e){for(const n of this.contexts)n.popView(e)}renderMark(e,n){for(const i of this.contexts)i.renderMark(e,n)}}class MN{#e;#t;#n;#i;#s;#o;#r;#a;constructor({viewRoot:e,glHelper:n,getBackground:i,broadcast:r,onLayoutComputed:s}){this.#e=e,this.#t=n,this.#n=i,this.#i=r,this.#s=s,this.#o=void 0,this.#r=void 0,this.#a=!1}computeLayout(){const e=this.#e;if(!e)return;this.#i("layout");const n=this.#t.getLogicalCanvasSize();if(isNaN(n.width)||isNaN(n.height)){console.log(`NaN in canvas size: ${n.width}x${n.height}. Skipping computeLayout().`);return}const i={webGLHelper:this.#t,canvasSize:n,devicePixelRatio:window.devicePixelRatio??1};this.#o=new eA({picking:!1},{...i,clearColor:this.#n()}),this.#r=new eA({picking:!0},{...i,framebufferInfo:this.#t._pickingBufferInfo}),e.render(new NN(this.#o,this.#r),ve.create(0,0,n.width,n.height)),this.#s(),this.#i("layoutComputed")}renderAll(){this.#o?.render(),this.#a=!0}renderPickingFramebuffer(){this.#a&&(this.#r.render(),this.#a=!1)}}function TN(t){const e=o=>{throw new Error("ViewContext."+o+" is not configured.")},n={dataFlow:t.dataFlow??e("dataFlow"),glHelper:t.glHelper??e("glHelper"),animator:t.animator??e("animator"),genomeStore:t.genomeStore,fontManager:t.fontManager??e("fontManager"),createOrImportView:async function(o,a,l,c,f){const u=t.createOrImportViewWithContext;return u?u(n,o,a,l,c,f):Promise.reject(new Error("ViewContext.createOrImportView is not configured."))}},i=["requestLayoutReflow","updateTooltip","getNamedDataFromProvider","getCurrentHover","addKeyboardListener","addBroadcastListener","removeBroadcastListener","highlightView","isViewConfiguredVisible","isViewSpec"],r=t,s=n;for(const o of i)s[o]=r[o]??(()=>e(o));return n}function PN({glHelper:t,viewRoot:e,logicalWidth:n,logicalHeight:i,devicePixelRatio:r,clearColor:s="white"}){n??=t.getLogicalCanvasSize().width,i??=t.getLogicalCanvasSize().height,r??=window.devicePixelRatio??1;const o=t.gl,a=Math.floor(n*r),l=Math.floor(i*r),c=dg(o,[{format:o.RGBA,type:o.UNSIGNED_BYTE,minMag:o.LINEAR,wrap:o.CLAMP_TO_EDGE}],a,l),f=new eA({picking:!1},{webGLHelper:t,canvasSize:{width:n,height:i},devicePixelRatio:r,clearColor:s,framebufferInfo:c});return e.render(f,ve.create(0,0,n,i)),f.render(),MD(o,c,"image/png")}async function LN(){const{parquetReadObjects:t}=await Promise.resolve().then(()=>_P);return t}async function Aw(t){const e=await LN(),n=t instanceof Uint8Array?t.buffer:t;return await e({file:n})}Aw.responseType="arrayBuffer",ea("fasta",u6),ea("parquet",Aw);class hw{#e=[];#t;#n;#i;#s;#o;#r;#a=new Lx;#c=new Rd;#l=new Rd;constructor(e,n,i={}){this.container=e,this.options=i,i.inputBindingContainer??="default",this.spec=n,this.viewFactory=new BN,this.namedDataProviders=[],this.animator=new r6(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=r=>r.isVisibleInSpec(),this.tooltipHandlers={default:D6,refseqgene:h6,...i.tooltipHandlers??{}},this.viewRoot=void 0,this.#s=new eB(e,i),this.dpr=window.devicePixelRatio}get#f(){return this.container.querySelector(".canvas-wrapper")}#u(){this.#s.initialize(this.viewRoot)}registerNamedDataProvider(e){this.namedDataProviders.unshift(e)}getNamedDataFromProvider(e){for(const n of this.namedDataProviders){const i=n(e);if(i)return i}}updateNamedData(e,n){const i=this.viewRoot.context.dataFlow.findNamedDataSource(e);if(!i)throw new Error("No such named data source: "+e);i.dataSource.updateDynamicData(n),this.animator.requestRender()}addEventListener(e,n){this.#c.add(e,n)}removeEventListener(e,n){this.#c.remove(e,n)}broadcast(e,n){const i={type:e,payload:n};this.viewRoot.visit(r=>r.handleBroadcast(i)),this.#l.emit(e,i)}#A(){const e=this.viewRoot.paramRuntime.allocateSetter("devicePixelRatio",this.dpr),n=()=>{this.#r.invalidateSize(),this.dpr=window.devicePixelRatio,e(this.dpr),this.computeLayout(),this.renderAll()};if(this.viewRoot.getSize().isGrowing()){const s=new ResizeObserver(n);s.observe(this.container),this.#e.push(()=>s.disconnect())}let i=null;const r=()=>{i!=null&&(i(),n());const s=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);s.addEventListener("change",r),i=()=>{s.removeEventListener("change",r)}};r(),i&&this.#e.push(i)}#h(){const{canvasWrapper:e,loadingIndicatorsElement:n,tooltip:i}=Dx(this.container);this.#r=new kD(e,()=>this.viewRoot?BF(this.viewRoot):{width:void 0,height:void 0},{powerPreference:this.options.powerPreference??"default"}),e.appendChild(n),this.tooltip=i,this.#i=new Fd,this.#n=new Tx(n,this.#i)}destroy(){const e=this.#f;for(this.container.classList.remove("genome-spy"),e.classList.remove("loading"),this.#a.removeAll(),this.#e.forEach(n=>n()),this.#r.finalize(),this.#s.remove(),this.#n.destroy();this.container.firstChild;)this.container.firstChild.remove()}async#d(){await this.#g();const e=this.#p();await this.#y(e),await $R(this.viewRoot,e.dataFlow,e.fontManager,n=>this.broadcast("dataFlowBuilt",n)),this.#C(e)}async#g(){this.spec.genome&&(this.genomeStore=new s6(this.spec.baseUrl),await this.genomeStore.initialize(this.spec.genome))}#p(){const e=new m1;return e.loadingStatusRegistry=this.#i,TN({dataFlow:e,glHelper:this.#r,animator:this.animator,genomeStore:this.genomeStore,fontManager:new c6(this.#r),updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this.#o.getCurrentHover(),addKeyboardListener:(n,i)=>{this.#a.add(n,r=>{this.#w(n,r)&&i(r)})},addBroadcastListener:(n,i)=>this.#l.add(n,i),removeBroadcastListener:(n,i)=>this.#l.remove(n,i),isViewConfiguredVisible:this.viewVisibilityPredicate,isViewSpec:n=>this.viewFactory.isViewSpec(n),createOrImportViewWithContext:(n,i,r,s,o,a)=>this.viewFactory.createOrImportView(i,n,r,s,o,a),highlightView:Px(this.container)})}#w(e,n){if(e==="keyup")return!0;const i=document.activeElement;return i&&i!==document.body?this.container.contains(i):this.container.matches(":hover")}async#y(e){const n=this.spec;n.datasets&&this.registerNamedDataProvider(i=>n.datasets[i]),this.viewRoot=await e.createOrImportView(n,null,null,lw),this.#i.set(this.viewRoot,"loading"),this.#f.style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",this.#u(),k6(this.viewRoot),P1(this.viewRoot),this.#m(),this.#r.invalidateSize(),this.#t=new MN({viewRoot:this.viewRoot,glHelper:this.#r,getBackground:()=>this.spec.background,broadcast:this.broadcast.bind(this),onLayoutComputed:()=>this.#n.updateLayout()}),e.requestLayoutReflow=this.computeLayout.bind(this),this.#A()}#m(){const e=T6(this.viewRoot);if(e.length)for(const n of e)console.warn("Selector constraints warning:",n.message)}#C(e){e.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(n=>_s(n,"size")),this.#r.invalidateSize(),this.#o=new RN({viewRoot:this.viewRoot,glHelper:this.#r,tooltip:this.tooltip,animator:this.animator,emitEvent:this.#c.emit.bind(this.#c),tooltipHandlers:this.tooltipHandlers,renderPickingFramebuffer:this.renderPickingFramebuffer.bind(this),getDevicePixelRatio:()=>this.dpr})}async launch(){let e=!1;try{return this.#h(),await this.#d(),this.registerMouseEvents(),this.computeLayout(),this.animator.requestRender(),e=!0,!0}catch(n){const i=`${n.view?`At "${n.view.getPathString()}": `:""}${n.toString()}`;return console.error(n.stack),this.options.onError?.(n,this.container)||kx(this.container,i),this.viewRoot&&this.#i.set(this.viewRoot,"error",i),!1}finally{this.#f.classList.remove("loading"),e&&this.viewRoot&&this.#i.set(this.viewRoot,"complete")}}async initializeVisibleViewData(){this.viewRoot&&(await e6(this.viewRoot,this.viewRoot.context.dataFlow,this.viewRoot.context.fontManager),this.viewRoot._invalidateCacheByPrefix("size","progeny"),this.#r.invalidateSize(),this.computeLayout(),this.animator.requestRender())}registerMouseEvents(){this.#o.registerMouseEvents()}updateTooltip(e,n){this.#o.updateTooltip(e,n)}exportCanvas(e,n,i,r="white"){const s=PN({glHelper:this.#r,viewRoot:this.viewRoot,logicalWidth:e,logicalHeight:n,devicePixelRatio:i,clearColor:r});return this.computeLayout(),this.renderAll(),s}getLogicalCanvasSize(){return this.#r.getLogicalCanvasSize()}computeLayout(){this.#t.computeLayout()}renderAll(){this.#t.renderAll()}renderPickingFramebuffer(){this.#t.renderPickingFramebuffer()}getSearchableViews(){const e=[];return this.viewRoot.visit(n=>{n instanceof nt&&n.getSearchAccessors().length>0&&e.push(n)}),e}getNamedScaleResolutions(){const e=new Map;return this.viewRoot.visit(n=>{for(const i of Object.values(n.resolutions.scale))i.name&&e.set(i.name,i)}),e}}const ON="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",UN="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 _N(t,e,n={}){let i;if(le(t)){if(i=document.querySelector(t),!i)throw new Error(`No such element: ${t}`)}else if(t instanceof HTMLElement)i=t;else throw new Error(`Invalid element: ${t}`);let r;try{const s=Ge(e)?e:await dw(e);if(s.baseUrl??="",s.width??="container",s.padding??=10,i==document.body){const o=document.createElement("div");o.style.position="fixed",o.style.inset="0",o.style.overflow="hidden",i.appendChild(o),i=o}r=new hw(i,s,n),GN(r,n),await r.launch()}catch(s){i.innerText=s.toString(),console.error(s)}return{finalize(){for(r.destroy();i.firstChild;)i.firstChild.remove()},addEventListener(s,o){r.addEventListener(s,o)},removeEventListener(s,o){r.removeEventListener(s,o)},getScaleResolutionByName(s){return r.getNamedScaleResolutions().get(s)},updateNamedData:r.updateNamedData.bind(r),exportCanvas:r.exportCanvas.bind(r)}}function GN(t,e){e.namedDataProvider&&t.registerNamedDataProvider(e.namedDataProvider)}async function dw(t){let e;try{e=await n1(t)}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}class zN{constructor(e){this.blob=e}async read(e,n=0){if(!e)return new Uint8Array(0);const i=n,r=i+e,s=this.blob.slice(i,r);return s.bytes?s.bytes():new Uint8Array(await s.arrayBuffer())}async readFile(e){const n=typeof e=="string"?e:e?.encoding;if(n==="utf8")return this.blob.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.blob.bytes?this.blob.bytes():new Uint8Array(await this.blob.arrayBuffer())}async stat(){return{size:this.blob.size}}async close(){}}function HN(t){return(typeof t=="object"&&t!==null&&"message"in t?t.message:`${t}`).replace(/\.$/,"")}class Yt{constructor(e,n={}){this.baseOverrides={},this.url=e;const i=n.fetch||globalThis.fetch.bind(globalThis);n.overrides&&(this.baseOverrides=n.overrides),this.fetchImplementation=i}async fetch(e,n){const i=s=>new Error(`${HN(s)} fetching ${e}`,{cause:s});let r;try{r=await this.fetchImplementation(e,n)}catch(s){if(`${s}`.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(o){throw i(o)}}else throw i(s)}return r}async read(e,n,i={}){if(e===0)return new Uint8Array(0);const{headers:r={},signal:s,overrides:o={}}=i;e<1/0?r.range=`bytes=${n}-${n+e-1}`:e===1/0&&n!==0&&(r.range=`bytes=${n}-`);const a=await this.fetch(this.url,{...this.baseOverrides,...o,headers:{...this.baseOverrides.headers,...o.headers,...r},method:"GET",redirect:"follow",mode:"cors",signal:s});if(!a.ok)throw new Error(`HTTP ${a.status} fetching ${this.url}`);if(a.status===200&&n===0||a.status===206){const l=a.headers.get("content-range"),c=/\/(\d+)$/.exec(l||"");c?.[1]&&(this._stat={size:parseInt(c[1],10)});const f=a.bytes?await a.bytes():new Uint8Array(await a.arrayBuffer());return f.byteLength<=e?f:f.subarray(0,e)}throw new Error(a.status===200?`${this.url} fetch returned status 200, expected 206`:`HTTP ${a.status} fetching ${this.url}`)}async readFile(e={}){let n,i;if(typeof e=="string")n=e,i={};else{n=e.encoding;const{encoding:l,...c}=e;i=c}const{headers:r={},signal:s,overrides:o={}}=i,a=await this.fetch(this.url,{...this.baseOverrides,...o,headers:{...this.baseOverrides.headers,...o.headers,...r},method:"GET",redirect:"follow",mode:"cors",signal:s});if(!a.ok)throw new Error(`HTTP ${a.status} fetching ${this.url}`);if(n==="utf8")return a.text();if(n)throw new Error(`unsupported encoding: ${n}`);return a.bytes?a.bytes():new Uint8Array(await a.arrayBuffer())}async stat(){if(!this._stat&&(await this.read(10,0),!this._stat))throw new Error(`unable to determine size of file at ${this.url}`);return this._stat}async close(){}}class We{readFile(){throw new Error("unimplemented")}read(){throw new Error("unimplemented")}close(){throw new Error("unimplemented")}}const so=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:zN,LocalFile:We,RemoteFile:Yt},Symbol.toStringTag,{value:"Module"})),gw=65536,YN=gw*gw;function tA(t,e=0){const n=t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24;return((t[e+4]|t[e+5]<<8|t[e+6]<<16|t[e+7]<<24)>>>0)*YN+(n>>>0)}const Ac=1;function pw(t,e,n){const i=e[Ac],r=n?n[Ac]:1/0;return i<=t&&r>t?0:i<t?-1:1}class VN{filehandle;index;constructor({filehandle:e}){this.filehandle=e}_getIndex(){return this.index||(this.index=this._readIndex().catch(e=>{throw this.index=void 0,e})),this.index}async _readIndex(){const e=await this.filehandle.read(8,0),n=tA(e);if(!n)return[[0,0]];const i=new Array(n+1);i[0]=[0,0];const r=16*n;if(r>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");const s=await this.filehandle.read(r,8);for(let o=0;o<n;o+=1){const a=tA(s,o*16),l=tA(s,o*16+8);i[o+1]=[a,l]}return i}async getLastBlock(){return(await this._getIndex()).at(-1)}async getRelevantBlocksForRead(e,n){const i=n+e;if(e===0)return[];const r=await this._getIndex(),s=[];let o=0,a=r.length-1,l=Math.floor(r.length/2),c=pw(n,r[l],r[l+1]);for(;c!==0;)c>0?a=l-1:c<0&&(o=l+1),l=Math.ceil((a-o)/2)+o,c=pw(n,r[l],r[l+1]);s.push(r[l]);let f=l+1;for(;f<r.length&&(s.push(r[f]),!(r[f][Ac]>=i));f+=1);return s[s.length-1][Ac]<i&&s.push([]),s}}var mw=0,nA=2,hc=4,Ii=0,dc=1,JN=2,qN=-5;function KN(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function jN(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(var i in n)KN(n,i)&&(t[i]=n[i])}}return t}function ww(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)}var oo={arraySet:function(t,e,n,i,r){if(e.subarray&&t.subarray){t.set(e.subarray(n,n+i),r);return}for(var s=0;s<i;s++)t[r+s]=e[n+s]},flattenChunks:function(t){var e,n,i,r,s,o;for(i=0,e=0,n=t.length;e<n;e++)i+=t[e].length;for(o=new Uint8Array(i),r=0,e=0,n=t.length;e<n;e++)s=t[e],o.set(s,r),r+=s.length;return o},Buf8:function(t){return new Uint8Array(t)},Buf16:function(t){return new Uint16Array(t)},Buf32:function(t){return new Int32Array(t)}},ao={arraySet:function(t,e,n,i,r){for(var s=0;s<i;s++)t[r+s]=e[n+s]},flattenChunks:function(t){return[].concat.apply([],t)},Buf8:function(t){return new Array(t)},Buf16:function(t){return new Array(t)},Buf32:function(t){return new Array(t)}};let dr=()=>{const t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";return dr=()=>t,t},_n=(t,e,n,i,r)=>(_n=dr()?oo.arraySet:ao.arraySet,_n(t,e,n,i,r)),iA=t=>(iA=dr()?oo.flattenChunks:ao.flattenChunks,iA(t)),gr=t=>(gr=dr()?oo.Buf8:ao.Buf8,gr(t)),pr=t=>(pr=dr()?oo.Buf16:ao.Buf16,pr(t)),mr=t=>(mr=dr()?oo.Buf32:ao.Buf32,mr(t)),yw=function(){let t=!0;try{String.fromCharCode.apply(null,[0])}catch{t=!1}return yw=()=>t,t},Cw=function(){let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{t=!1}return Cw=()=>t,t},rA=function(t){for(var e=gr(256),n=0;n<256;n++)e[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;return e[254]=e[254]=1,rA=i=>e[i],e[t]};function Ew(t){var e,n,i,r,s,o=t.length,a=0;for(r=0;r<o;r++)n=t.charCodeAt(r),(n&64512)===55296&&r+1<o&&(i=t.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(a),s=0,r=0;s<a;r++)n=t.charCodeAt(r),(n&64512)===55296&&r+1<o&&(i=t.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),n<128?e[s++]=n:n<2048?(e[s++]=192|n>>>6,e[s++]=128|n&63):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|n&63):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|n&63);return e}function WN(t,e){if(e<65534&&(t.subarray&&Cw()||!t.subarray&&yw()))return String.fromCharCode.apply(null,ww(t,e));for(var n="",i=0;i<e;i++)n+=String.fromCharCode(t[i]);return n}function XN(t){for(var e=new Uint8Array(t.length),n=0,i=e.length;n<i;n++)e[n]=t.charCodeAt(n);return e}function ZN(t,e){var n,i,r,s,o=e||t.length,a=new Array(o*2);for(i=0,n=0;n<o;){if(r=t[n++],r<128){a[i++]=r;continue}if(s=rA(r),s>4){a[i++]=65533,n+=s-1;continue}for(r&=s===2?31:s===3?15:7;s>1&&n<o;)r=r<<6|t[n++]&63,s--;if(s>1){a[i++]=65533;continue}r<65536?a[i++]=r:(r-=65536,a[i++]=55296|r>>10&1023,a[i++]=56320|r&1023)}return WN(a,i)}function $N(t,e){var n;for(e=e||t.length,e>t.length&&(e=t.length),n=e-1;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+rA(t[n])>e?n:e}function eM(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}function sA(t,e,n,i){for(var r=t&65535|0,s=t>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do r=r+e[i++]|0,s=s+r|0;while(--o);r%=65521,s%=65521}return r|s<<16|0}function tM(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e}let Iw=function(){const t=tM();return Iw=()=>t,t};function Vt(t,e,n,i){var r=Iw(),s=i+n;t^=-1;for(var o=i;o<s;o++)t=t>>>8^r[(t^e[o])&255];return t^-1}var gc=30,nM=12;function iM(t,e){var n,i,r,s,o,a,l,c,f,u,h,A,d,g,m,p,w,C,y,b,x,I,S,Q,v;n=t.state,i=t.next_in,Q=t.input,r=i+(t.avail_in-5),s=t.next_out,v=t.output,o=s-(e-t.avail_out),a=s+(t.avail_out-257),l=n.dmax,c=n.wsize,f=n.whave,u=n.wnext,h=n.window,A=n.hold,d=n.bits,g=n.lencode,m=n.distcode,p=(1<<n.lenbits)-1,w=(1<<n.distbits)-1;e:do{d<15&&(A+=Q[i++]<<d,d+=8,A+=Q[i++]<<d,d+=8),C=g[A&p];t:for(;;){if(y=C>>>24,A>>>=y,d-=y,y=C>>>16&255,y===0)v[s++]=C&65535;else if(y&16){b=C&65535,y&=15,y&&(d<y&&(A+=Q[i++]<<d,d+=8),b+=A&(1<<y)-1,A>>>=y,d-=y),d<15&&(A+=Q[i++]<<d,d+=8,A+=Q[i++]<<d,d+=8),C=m[A&w];n:for(;;){if(y=C>>>24,A>>>=y,d-=y,y=C>>>16&255,y&16){if(x=C&65535,y&=15,d<y&&(A+=Q[i++]<<d,d+=8,d<y&&(A+=Q[i++]<<d,d+=8)),x+=A&(1<<y)-1,x>l){t.msg="invalid distance too far back",n.mode=gc;break e}if(A>>>=y,d-=y,y=s-o,x>y){if(y=x-y,y>f&&n.sane){t.msg="invalid distance too far back",n.mode=gc;break e}if(I=0,S=h,u===0){if(I+=c-y,y<b){b-=y;do v[s++]=h[I++];while(--y);I=s-x,S=v}}else if(u<y){if(I+=c+u-y,y-=u,y<b){b-=y;do v[s++]=h[I++];while(--y);if(I=0,u<b){y=u,b-=y;do v[s++]=h[I++];while(--y);I=s-x,S=v}}}else if(I+=u-y,y<b){b-=y;do v[s++]=h[I++];while(--y);I=s-x,S=v}for(;b>2;)v[s++]=S[I++],v[s++]=S[I++],v[s++]=S[I++],b-=3;b&&(v[s++]=S[I++],b>1&&(v[s++]=S[I++]))}else{I=s-x;do v[s++]=v[I++],v[s++]=v[I++],v[s++]=v[I++],b-=3;while(b>2);b&&(v[s++]=v[I++],b>1&&(v[s++]=v[I++]))}}else if((y&64)===0){C=m[(C&65535)+(A&(1<<y)-1)];continue n}else{t.msg="invalid distance code",n.mode=gc;break e}break}}else if((y&64)===0){C=g[(C&65535)+(A&(1<<y)-1)];continue t}else if(y&32){n.mode=nM;break e}else{t.msg="invalid literal/length code",n.mode=gc;break e}break}}while(i<r&&s<a);b=d>>3,i-=b,d-=b<<3,A&=(1<<d)-1,t.next_in=i,t.next_out=s,t.avail_in=i<r?5+(r-i):5-(i-r),t.avail_out=s<a?257+(a-s):257-(s-a),n.hold=A,n.bits=d}var wr=15,bw=852,xw=592,Bw=0,oA=1,vw=2,rM=[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],sM=[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],oM=[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],aM=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function co(t,e,n,i,r,s,o,a){var l=a.bits,c=0,f=0,u=0,h=0,A=0,d=0,g=0,m=0,p=0,w=0,C,y,b,x,I,S=null,Q=0,v,F=pr(wr+1),R=pr(wr+1),M=null,O=0,z,_,Y;for(c=0;c<=wr;c++)F[c]=0;for(f=0;f<i;f++)F[e[n+f]]++;for(A=l,h=wr;h>=1&&F[h]===0;h--);if(A>h&&(A=h),h===0)return r[s++]=1<<24|64<<16|0,r[s++]=1<<24|64<<16|0,a.bits=1,0;for(u=1;u<h&&F[u]===0;u++);for(A<u&&(A=u),m=1,c=1;c<=wr;c++)if(m<<=1,m-=F[c],m<0)return-1;if(m>0&&(t===Bw||h!==1))return-1;for(R[1]=0,c=1;c<wr;c++)R[c+1]=R[c]+F[c];for(f=0;f<i;f++)e[n+f]!==0&&(o[R[e[n+f]]++]=f);if(t===Bw?(S=M=o,v=19):t===oA?(S=rM,Q-=257,M=sM,O-=257,v=256):(S=oM,M=aM,v=-1),w=0,f=0,c=u,I=s,d=A,g=0,b=-1,p=1<<A,x=p-1,t===oA&&p>bw||t===vw&&p>xw)return 1;for(;;){z=c-g,o[f]<v?(_=0,Y=o[f]):o[f]>v?(_=M[O+o[f]],Y=S[Q+o[f]]):(_=96,Y=0),C=1<<c-g,y=1<<d,u=y;do y-=C,r[I+(w>>g)+y]=z<<24|_<<16|Y|0;while(y!==0);for(C=1<<c-1;w&C;)C>>=1;if(C!==0?(w&=C-1,w+=C):w=0,f++,--F[c]===0){if(c===h)break;c=e[n+o[f]]}if(c>A&&(w&x)!==b){for(g===0&&(g=A),I+=u,d=c-g,m=1<<d;d+g<h&&(m-=F[d+g],!(m<=0));)d++,m<<=1;if(p+=1<<d,t===oA&&p>bw||t===vw&&p>xw)return 1;b=w&x,r[b]=A<<24|d<<16|I-s|0}}return w!==0&&(r[I+w]=c-g<<24|64<<16|0),a.bits=A,0}var cM=0,Sw=1,Qw=2,Dw=4,bi=0,lM=1,fM=2,wt=-2,kw=-3,Fw=-4,uM=-5,Rw=8,Nw=1,Mw=2,Tw=3,Pw=4,Lw=5,Ow=6,Uw=7,_w=8,Gw=9,zw=10,pc=11,fn=12,aA=13,Hw=14,cA=15,Yw=16,Vw=17,Jw=18,qw=19,mc=20,wc=21,Kw=22,jw=23,Ww=24,Xw=25,Zw=26,lA=27,$w=28,ey=29,pe=30,ty=31,AM=32,hM=852,dM=592;function ny(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function gM(){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=pr(320),this.work=pr(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function pM(t){var e;return!t||!t.state?wt:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=Nw,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=mr(hM),e.distcode=e.distdyn=mr(dM),e.sane=1,e.back=-1,bi)}function mM(t){var e;return!t||!t.state?wt:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,pM(t))}function wM(t,e){var n,i;return!t||!t.state||(i=t.state,e<0?(n=0,e=-e):(n=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?wt:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=n,i.wbits=e,mM(t))}function yM(t,e){var n,i;return t?(i=new gM,t.state=i,i.window=null,n=wM(t,e),n!==bi&&(t.state=null),n):wt}var iy=!0,fA,uA;function CM(t){if(iy){var e;for(fA=mr(512),uA=mr(32),e=0;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(co(Sw,t.lens,0,288,fA,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;co(Qw,t.lens,0,32,uA,0,t.work,{bits:5}),iy=!1}t.lencode=fA,t.lenbits=9,t.distcode=uA,t.distbits=5}function ry(t,e,n,i){var r,s=t.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=gr(s.wsize)),i>=s.wsize?(_n(s.window,e,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(r=s.wsize-s.wnext,r>i&&(r=i),_n(s.window,e,n-i,r,s.wnext),i-=r,i?(_n(s.window,e,n-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=r))),0}function EM(t,e){var n,i,r,s,o,a,l,c,f,u,h,A,d,g,m=0,p,w,C,y,b,x,I,S,Q=gr(4),v,F,R=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&t.avail_in!==0)return wt;n=t.state,n.mode===fn&&(n.mode=aA),o=t.next_out,r=t.output,l=t.avail_out,s=t.next_in,i=t.input,a=t.avail_in,c=n.hold,f=n.bits,u=a,h=l,S=bi;e:for(;;)switch(n.mode){case Nw:if(n.wrap===0){n.mode=aA;break}for(;f<16;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(n.wrap&2&&c===35615){n.check=0,Q[0]=c&255,Q[1]=c>>>8&255,n.check=Vt(n.check,Q,2,0),c=0,f=0,n.mode=Mw;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",n.mode=pe;break}if((c&15)!==Rw){t.msg="unknown compression method",n.mode=pe;break}if(c>>>=4,f-=4,I=(c&15)+8,n.wbits===0)n.wbits=I;else if(I>n.wbits){t.msg="invalid window size",n.mode=pe;break}n.dmax=1<<I,t.adler=n.check=1,n.mode=c&512?zw:fn,c=0,f=0;break;case Mw:for(;f<16;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(n.flags=c,(n.flags&255)!==Rw){t.msg="unknown compression method",n.mode=pe;break}if(n.flags&57344){t.msg="unknown header flags set",n.mode=pe;break}n.head&&(n.head.text=c>>8&1),n.flags&512&&(Q[0]=c&255,Q[1]=c>>>8&255,n.check=Vt(n.check,Q,2,0)),c=0,f=0,n.mode=Tw;case Tw:for(;f<32;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.head&&(n.head.time=c),n.flags&512&&(Q[0]=c&255,Q[1]=c>>>8&255,Q[2]=c>>>16&255,Q[3]=c>>>24&255,n.check=Vt(n.check,Q,4,0)),c=0,f=0,n.mode=Pw;case Pw:for(;f<16;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&(Q[0]=c&255,Q[1]=c>>>8&255,n.check=Vt(n.check,Q,2,0)),c=0,f=0,n.mode=Lw;case Lw:if(n.flags&1024){for(;f<16;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&(Q[0]=c&255,Q[1]=c>>>8&255,n.check=Vt(n.check,Q,2,0)),c=0,f=0}else n.head&&(n.head.extra=null);n.mode=Ow;case Ow:if(n.flags&1024&&(A=n.length,A>a&&(A=a),A&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),_n(n.head.extra,i,s,A,I)),n.flags&512&&(n.check=Vt(n.check,i,A,s)),a-=A,s+=A,n.length-=A),n.length))break e;n.length=0,n.mode=Uw;case Uw:if(n.flags&2048){if(a===0)break e;A=0;do I=i[s+A++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&A<a);if(n.flags&512&&(n.check=Vt(n.check,i,A,s)),a-=A,s+=A,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=_w;case _w:if(n.flags&4096){if(a===0)break e;A=0;do I=i[s+A++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&A<a);if(n.flags&512&&(n.check=Vt(n.check,i,A,s)),a-=A,s+=A,I)break e}else n.head&&(n.head.comment=null);n.mode=Gw;case Gw:if(n.flags&512){for(;f<16;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(c!==(n.check&65535)){t.msg="header crc mismatch",n.mode=pe;break}c=0,f=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=fn;break;case zw:for(;f<32;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}t.adler=n.check=ny(c),c=0,f=0,n.mode=pc;case pc:if(n.havedict===0)return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=f,fM;t.adler=n.check=1,n.mode=fn;case fn:case aA:if(n.last){c>>>=f&7,f-=f&7,n.mode=lA;break}for(;f<3;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}switch(n.last=c&1,c>>>=1,f-=1,c&3){case 0:n.mode=Hw;break;case 1:CM(n),n.mode=mc;break;case 2:n.mode=Vw;break;case 3:t.msg="invalid block type",n.mode=pe}c>>>=2,f-=2;break;case Hw:for(c>>>=f&7,f-=f&7;f<32;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if((c&65535)!==(c>>>16^65535)){t.msg="invalid stored block lengths",n.mode=pe;break}n.length=c&65535,c=0,f=0,n.mode=cA;case cA:n.mode=Yw;case Yw:if(A=n.length,A){if(A>a&&(A=a),A>l&&(A=l),A===0)break e;_n(r,i,s,A,o),a-=A,s+=A,l-=A,o+=A,n.length-=A;break}n.mode=fn;break;case Vw:for(;f<14;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(n.nlen=(c&31)+257,c>>>=5,f-=5,n.ndist=(c&31)+1,c>>>=5,f-=5,n.ncode=(c&15)+4,c>>>=4,f-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=pe;break}n.have=0,n.mode=Jw;case Jw:for(;n.have<n.ncode;){for(;f<3;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.lens[R[n.have++]]=c&7,c>>>=3,f-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,v={bits:n.lenbits},S=co(cM,n.lens,0,19,n.lencode,0,n.work,v),n.lenbits=v.bits,S){t.msg="invalid code lengths set",n.mode=pe;break}n.have=0,n.mode=qw;case qw:for(;n.have<n.nlen+n.ndist;){for(;m=n.lencode[c&(1<<n.lenbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=f);){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(C<16)c>>>=p,f-=p,n.lens[n.have++]=C;else{if(C===16){for(F=p+2;f<F;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(c>>>=p,f-=p,n.have===0){t.msg="invalid bit length repeat",n.mode=pe;break}I=n.lens[n.have-1],A=3+(c&3),c>>>=2,f-=2}else if(C===17){for(F=p+3;f<F;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}c>>>=p,f-=p,I=0,A=3+(c&7),c>>>=3,f-=3}else{for(F=p+7;f<F;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}c>>>=p,f-=p,I=0,A=11+(c&127),c>>>=7,f-=7}if(n.have+A>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=pe;break}for(;A--;)n.lens[n.have++]=I}}if(n.mode===pe)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=pe;break}if(n.lenbits=9,v={bits:n.lenbits},S=co(Sw,n.lens,0,n.nlen,n.lencode,0,n.work,v),n.lenbits=v.bits,S){t.msg="invalid literal/lengths set",n.mode=pe;break}if(n.distbits=6,n.distcode=n.distdyn,v={bits:n.distbits},S=co(Qw,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,v),n.distbits=v.bits,S){t.msg="invalid distances set",n.mode=pe;break}n.mode=mc;case mc:n.mode=wc;case wc:if(a>=6&&l>=258){t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=f,iM(t,h),o=t.next_out,r=t.output,l=t.avail_out,s=t.next_in,i=t.input,a=t.avail_in,c=n.hold,f=n.bits,n.mode===fn&&(n.back=-1);break}for(n.back=0;m=n.lencode[c&(1<<n.lenbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=f);){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(w&&(w&240)===0){for(y=p,b=w,x=C;m=n.lencode[x+((c&(1<<y+b)-1)>>y)],p=m>>>24,w=m>>>16&255,C=m&65535,!(y+p<=f);){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}c>>>=y,f-=y,n.back+=y}if(c>>>=p,f-=p,n.back+=p,n.length=C,w===0){n.mode=Zw;break}if(w&32){n.back=-1,n.mode=fn;break}if(w&64){t.msg="invalid literal/length code",n.mode=pe;break}n.extra=w&15,n.mode=Kw;case Kw:if(n.extra){for(F=n.extra;f<F;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,f-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=jw;case jw:for(;m=n.distcode[c&(1<<n.distbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=f);){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if((w&240)===0){for(y=p,b=w,x=C;m=n.distcode[x+((c&(1<<y+b)-1)>>y)],p=m>>>24,w=m>>>16&255,C=m&65535,!(y+p<=f);){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}c>>>=y,f-=y,n.back+=y}if(c>>>=p,f-=p,n.back+=p,w&64){t.msg="invalid distance code",n.mode=pe;break}n.offset=C,n.extra=w&15,n.mode=Ww;case Ww:if(n.extra){for(F=n.extra;f<F;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,f-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=pe;break}n.mode=Xw;case Xw:if(l===0)break e;if(A=h-l,n.offset>A){if(A=n.offset-A,A>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=pe;break}A>n.wnext?(A-=n.wnext,d=n.wsize-A):d=n.wnext-A,A>n.length&&(A=n.length),g=n.window}else g=r,d=o-n.offset,A=n.length;A>l&&(A=l),l-=A,n.length-=A;do r[o++]=g[d++];while(--A);n.length===0&&(n.mode=wc);break;case Zw:if(l===0)break e;r[o++]=n.length,l--,n.mode=wc;break;case lA:if(n.wrap){for(;f<32;){if(a===0)break e;a--,c|=i[s++]<<f,f+=8}if(h-=l,t.total_out+=h,n.total+=h,h&&(t.adler=n.check=n.flags?Vt(n.check,r,h,o-h):sA(n.check,r,h,o-h)),h=l,(n.flags?c:ny(c))!==n.check){t.msg="incorrect data check",n.mode=pe;break}c=0,f=0}n.mode=$w;case $w:if(n.wrap&&n.flags){for(;f<32;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(c!==(n.total&4294967295)){t.msg="incorrect length check",n.mode=pe;break}c=0,f=0}n.mode=ey;case ey:S=lM;break e;case pe:S=kw;break e;case ty:return Fw;case AM:default:return wt}return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=f,(n.wsize||h!==t.avail_out&&n.mode<pe&&(n.mode<lA||e!==Dw))&&ry(t,t.output,t.next_out,h-t.avail_out),u-=t.avail_in,h-=t.avail_out,t.total_in+=u,t.total_out+=h,n.total+=h,n.wrap&&h&&(t.adler=n.check=n.flags?Vt(n.check,r,h,t.next_out-h):sA(n.check,r,h,t.next_out-h)),t.data_type=n.bits+(n.last?64:0)+(n.mode===fn?128:0)+(n.mode===mc||n.mode===cA?256:0),(u===0&&h===0||e===Dw)&&S===bi&&(S=uM),S}function IM(t){if(!t||!t.state)return wt;var e=t.state;return e.window&&(e.window=null),t.state=null,bi}function bM(t,e){var n;return!t||!t.state||(n=t.state,(n.wrap&2)===0)?wt:(n.head=e,e.done=!1,bi)}function sy(t,e){var n=e.length,i,r,s;return!t||!t.state||(i=t.state,i.wrap!==0&&i.mode!==pc)?wt:i.mode===pc&&(r=1,r=sA(r,e,n,0),r!==i.check)?kw:(s=ry(t,e,n,n),s?(i.mode=ty,Fw):(i.havedict=1,bi))}const AA={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function xM(){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 hA=Object.prototype.toString;let oy=class uh{constructor(e){if(!(this instanceof uh))return new uh(e);this.options=jN({chunkSize:16384,windowBits:0,to:""},e||{});var n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(e&&e.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new xM,this.strm.avail_out=0;var i=yM(this.strm,n.windowBits);if(i!==Ii)throw new Error(AA[i]);if(this.header=new eM,bM(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=Ew(n.dictionary):hA.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(i=sy(this.strm,n.dictionary),i!==Ii)))throw new Error(AA[i])}push(e,n){var i=this.strm,r=this.options.chunkSize,s=this.options.dictionary,o,a,l,c,f,u,h=!1;if(this.ended)return!1;a=n===~~n?n:n===!0?hc:mw,typeof e=="string"?i.input=XN(e):hA.call(e)==="[object ArrayBuffer]"?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(i.avail_out===0&&(i.output=gr(r),i.next_out=0,i.avail_out=r),o=EM(i,mw),o===JN&&s&&(typeof s=="string"?u=Ew(s):hA.call(s)==="[object ArrayBuffer]"?u=new Uint8Array(s):u=s,o=sy(this.strm,u)),o===qN&&h===!0&&(o=Ii,h=!1),o!==dc&&o!==Ii)return this.onEnd(o),this.ended=!0,!1;i.next_out&&(i.avail_out===0||o===dc||i.avail_in===0&&(a===hc||a===nA))&&(this.options.to==="string"?(l=$N(i.output,i.next_out),c=i.next_out-l,f=ZN(i.output,l),i.next_out=c,i.avail_out=r-c,c&&_n(i.output,i.output,l,c,0),this.onData(f)):this.onData(ww(i.output,i.next_out))),i.avail_in===0&&i.avail_out===0&&(h=!0)}while((i.avail_in>0||i.avail_out===0)&&o!==dc);return o===dc&&(a=hc),a===hc?(o=IM(this.strm),this.onEnd(o),this.ended=!0,o===Ii):(a===nA&&(this.onEnd(Ii),i.avail_out=0),!0)}onData(e){this.chunks.push(e)}onEnd(e){e===Ii&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=iA(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}};function BM(t,e){var n=new oy(e);if(n.push(t,!0),n.err)throw n.msg||AA[n.err];return n.result}function vM(t,e){return e=e||{},e.raw=!0,BM(t,e)}function SM(t){let e=0;for(const n of t)e+=n.length;return e}function ay(t,e){const n=new Uint8Array(e??SM(t));let i=0;for(const r of t)n.set(r,i),i+=r.length;return n}async function QM(t){try{let e,n=0,i;const r=[];let s=0;do{const o=t.subarray(n);if(i=new oy(void 0),{strm:e}=i,i.push(o,nA),i.err)throw new Error(i.msg);n+=e.next_in;const a=i.result;r.push(a),s+=a.length}while(e.avail_in);return ay(r,s)}catch(e){throw/incorrect header check/.exec(`${e}`)?new Error("problem decompressing block: incorrect gzip header check"):e}}class cy{filehandle;gzi;constructor({filehandle:e,gziFilehandle:n}){this.filehandle=e,this.gzi=new VN({filehandle:n})}async _readAndUncompressBlock(e,n){let i=n;i||(i=(await this.filehandle.stat()).size);const r=i-e,s=await this.filehandle.read(r,e);return QM(s)}async read(e,n){const i=await this.gzi.getRelevantBlocksForRead(e,n),r=[];for(let s=0;s<i.length-1;s+=1){const o=await this._readAndUncompressBlock(i[s][0],i[s+1][0]),[,a]=i[s],l=a>=n?0:n-a,c=Math.min(n+e,a+o.length)-a;l>=0&&l<o.length&&r.push(o.subarray(l,c))}return ay(r)}}function ly(t,e){return t.offset+t.lineBytes*Math.floor(e/t.lineLength)+e%t.lineLength}async function DM(t,e={}){const n=new TextDecoder("utf8");return Object.fromEntries(n.decode(await t.readFile(e)).split(/\r?\n/).map(i=>i.trim()).filter(i=>!!i).map(i=>i.split(" ")).map(i=>{if(i[0]?.startsWith(">"))throw new Error("found > in sequence name, might have supplied FASTA file for the FASTA index");return[i[0],{name:i[0],length:+i[1],start:0,end:+i[1],offset:+i[2],lineLength:+i[3],lineBytes:+i[4]}]}))}class fy{constructor({fasta:e,fai:n,path:i,faiPath:r}){if(e)this.fasta=e;else if(i)this.fasta=new We(i);else throw new Error("Need to pass filehandle for fasta or path to localfile");if(n)this.fai=n;else if(r)this.fai=new We(r);else if(i)this.fai=new We(`${i}.fai`);else throw new Error("Need to pass filehandle for or path to localfile")}async _getIndexes(e){return this.indexes||(this.indexes=DM(this.fai,e).catch(n=>{throw this.indexes=void 0,n})),this.indexes}async getSequenceNames(e){return Object.keys(await this._getIndexes(e))}async getSequenceSizes(e){const n={},i=await this._getIndexes(e);for(const r of Object.values(i))n[r.name]=r.length;return n}async getSequenceSize(e,n){return(await this._getIndexes(n))[e]?.length}async hasReferenceSequence(e,n){return!!(await this._getIndexes(n))[e]}async getResiduesByName(e,n,i,r){const s=(await this._getIndexes(r))[e];return s?this._fetchFromIndexEntry(s,n,i,r):void 0}async getSequence(e,n,i,r){return this.getResiduesByName(e,n,i,r)}async _fetchFromIndexEntry(e,n=0,i,r){let s=i;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((s===void 0||s>e.length)&&(s=e.length),n>=s)return"";const o=ly(e,n),a=ly(e,s)-o,c=new TextDecoder("utf8").decode(await this.fasta.read(a,o,r)).replace(/\s+/g,"");if(/[^\x20-\x7e]/.test(c.slice(0,1e3)))throw new Error("Non-ASCII characters detected in sequence. The file may be gzip compressed. Use BgzipIndexedFasta for bgzip files, or decompress the file.");return c}}class kM extends fy{constructor({fasta:e,path:n,fai:i,faiPath:r,gzi:s,gziPath:o}){super({fasta:e,path:n,fai:i,faiPath:r}),e&&s?this.fasta=new cy({filehandle:e,gziFilehandle:s}):n&&o&&(this.fasta=new cy({filehandle:new We(n),gziFilehandle:new We(o)}))}}function uy(t){return t.split(">").filter(e=>/\S/.test(e)).map(e=>{const[n,...i]=e.split(`
|
|
658
|
-
`),[r,...s]=n.split(" "),o=i.join("").replace(/\s/g,"");return{id:r,description:s.join(" "),sequence:o}})}class
|
|
669
|
+
`:"";return ae`${m}${d}`}class ao extends Aw{#e=new Map;constructor(e,n,i,r,s,o){super(e,n,i,r,s,o),this.spec=e}async initializeChildren(){}getNextAutoName(e){const n=this.#e.get(e)??0;return this.#e.set(e,n+1),e+n}*[Symbol.iterator](){}visit(e){let n;try{n=e(this)}catch(i){throw i.view=this,i}if(n===pr)return n;if(n!==fn){e.beforeChildren&&e.beforeChildren(this);for(const i of this){const r=i.visit(e);if(r===pr)return r}e.afterChildren&&e.afterChildren(this),e.postOrder&&e.postOrder(this)}}findDescendantByPath(e){let n=this;for(let i=0;i<e.length;i++){if(!(n instanceof ao))return;const r=n.#t(e[i]);if(!r)return;if(i===e.length-1)return r;n=r}}#t(e){for(const n of this)if(n.name===e)return n}findDescendantByName(e){let n;return this.visit(i=>{if(i.name==e)return n=i,pr}),n}getDefaultResolution(e,n){return"shared"}}function B6(t){aF(t),cF(t)}function ey(t){t.getDescendants().forEach(e=>e.configureViewOpacity())}const wr=new WeakMap,gc=new WeakMap;function S6(t,e){if(e!==null&&typeof e!="string")throw new Error("Import scope name must be a string or null.");wr.set(t,{name:e})}function hn(t,e={}){const i=e.skipSubtree??!1?"excludeSubtree":"exclude";gc.set(t,i)}function $f(t){const e=t.getDataAncestors(),n=[];for(let i=e.length-1;i>=0;i-=1){const r=wr.get(e[i]);r&&typeof r.name=="string"&&n.push(r.name)}return n}function D6(t,e){t.visit(n=>{const i=gc.get(n);if(i==="excludeSubtree")return fn;if(i!=="exclude")return e(n)})}function Q6(t){const e=[];for(const n of k6(t)){const i=R6(n);F6(t,i,e),N6(t,i,e)}return e}function ty(t){return t.persist===!1?!1:Zl(t)?!0:u0(t)?!!t.bind:!1}function k6(t){const e=new Set([t]);return t.visit(n=>{const i=wr.get(n);i&&typeof i.name=="string"&&e.add(n)}),Array.from(e)}function R6(t){return $f(t)}function ny(t){return t.length?"import scope ["+t.join(" / ")+"]":"import scope (root)"}function F6(t,e,n){const i=new Map;iy(t,e,r=>{for(const[s,o]of r.paramRuntime.paramConfigs){if(!ty(o))continue;const a=i.get(s);a?a.push(r):i.set(s,[r])}});for(const[r,s]of i){if(s.length<=1)continue;const o=s.map(a=>a.getPathString()).join(", ");n.push({message:'Bookmarkable parameter "'+r+'" is not unique within '+ny(e)+". Found in: "+o+".",scope:e})}}function N6(t,e,n){const i=M6(t,e);if(!i.length)return;const r=i.filter(o=>T6(o));if(r.length<=1)return;const s=new Map;for(const o of r){const a=wr.get(o),l=a?a.name:void 0;typeof l!="string"||!l.length||s.set(l,(s.get(l)??0)+1)}for(const[o,a]of s)a>1&&n.push({message:'Import instance name "'+o+'" is used multiple times for addressable instances in '+ny(e)+".",scope:e})}function M6(t,e){const n=[];return iy(t,e,i=>{if($f(i).length!==e.length+1)return;const s=wr.get(i);!s||typeof s.name!="string"||n.push(i)},{includeNamedImportRoots:!0}),n}function T6(t){let e=!1;return t.visit(n=>{const i=gc.get(n);if(i==="excludeSubtree")return fn;if(i!=="exclude"){for(const r of n.paramRuntime.paramConfigs.values())if(ty(r))return e=!0,pr}}),e}function iy(t,e,n,i={}){const r=i.includeNamedImportRoots??!1;t.visit(s=>{const o=wr.get(s),a=gc.get(s);if(a==="excludeSubtree")return fn;if(a!=="exclude"&&P6(s,e,o,r))return n(s)})}function P6(t,e,n,i){const r=$f(t);return L6(r,e)?!0:!i||!n||typeof n.name!="string"||r.length!==e.length+1?!1:ry(e,r)}function L6(t,e){return t.length!==e.length?!1:ry(t,e)}function ry(t,e){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function O6(t){const e=[];let n=!1;const i=U6(t);for(const r of i){const s=r.getAssemblyRequirement();s.assembly&&e.push(s.assembly),s.needsDefaultAssembly&&(n=!0)}return{assemblies:e,needsDefaultAssembly:n}}async function sy(t,e){const{assemblies:n,needsDefaultAssembly:i}=O6(t);if(i){const r=e.getDefaultAssemblyName();if(!r)throw new Error("No default assembly has been configured. Set root `assembly`, define exactly one entry in root `genomes`, or set `scale.assembly` on each locus scale.");n.push(r)}await e.ensureAssemblies(n)}function U6(t){const e=new Set,n=["x","y"],i=r=>{for(const s of n){const o=r.getScaleResolution(s);o&&e.add(o)}};return i(t),D6(t,i),e}class oy{constructor(e,n){this.container=e,this.options=n}async addChildSpec(e,n){const{specs:i,insertAt:r}=this.options.getChildSpecs(),s=n??i.length,o=this.options.defaultName?.(s,e)??this.container.getNextAutoName("child"),a=await this.container.context.createOrImportView(e,this.container,this.container,o);await sy(a,this.container.context.genomeStore),r(s,e);const l=this.options.insertView(a,s);this.options.prepareView&&await this.options.prepareView(a,s,l),ey(a);const c=h=>h.isConfiguredVisible(),{dataSources:u,graphicsPromises:f}=jf(a,this.container.context.dataFlow,c);return await Wf(a,u),await Hf(f),this.options.requestLayout!==!1&&(this.container.invalidateSizeCache(),this.container.context.requestLayoutReflow()),a}async removeChildAt(e){const{removeAt:n}=this.options.getChildSpecs();this.options.removeView(e),n(e),this.options.afterRemove&&await this.options.afterRemove(e),this.options.requestLayout!==!1&&(this.container.invalidateSizeCache(),this.container.context.requestLayoutReflow())}}const ay=.5;function eh(t){return"multiscale"in t&&be(t.multiscale)}function _6(t){if(!t.multiscale.length)throw new Error('"multiscale" must contain at least one child view.');const e=z6(t.stops,t.multiscale.length),n=t.multiscale.map((r,s)=>t.multiscale.length===1?r:{opacity:G6(s,t.multiscale.length,e),layer:[r]}),i={...t};return delete i.multiscale,delete i.stops,{...i,layer:n}}function z6(t,e){let n="unitsPerPixel",i,r="auto",s=ay;if(be(t))i=cy(t,e,"stops");else if(Ge(t))n=t.metric??"unitsPerPixel",i=cy(t.values,e,"stops.values"),r=t.channel??"auto",s=t.fade??ay;else throw new Error('"stops" must be an array or an object with "values".');if(n!=="unitsPerPixel")throw new Error('Only "unitsPerPixel" is supported for "stops.metric" in multiscale.');if(!["x","y","auto"].includes(r))throw new Error('"stops.channel" must be one of "x", "y", or "auto".');if(!Number.isFinite(s)||s<0||s>.5)throw new Error('"stops.fade" must be a finite number in range [0, 0.5].');if(i.forEach((o,a)=>{if(!Ee(o)&&(!Number.isFinite(o)||o<=0))throw new Error("Invalid stop value at index "+a+". Stop values must be positive finite numbers.")}),!i.some(Ee)){const o=i;for(let a=1;a<o.length;a++)if(o[a-1]<=o[a])throw new Error('"stops.values" must be strictly decreasing for "unitsPerPixel".');for(let a=0;a<o.length-1;a++){const l=o[a]*(1-s),c=o[a+1]*(1+s);if(l<=c)throw new Error("Adjacent transitions overlap. Reduce fade or increase stop spacing.")}}return{metric:n,values:i,channel:r,fade:s}}function cy(t,e,n){if(!be(t))throw new Error('"'+n+'" must be an array of numbers or ExprRefs.');const i=e-1;if(t.length!==i)throw new Error("Invalid stop count for multiscale. Expected "+i+", got "+t.length+".");for(const r of t)if(!Ee(r)&&!Number.isFinite(r))throw new Error('"'+n+'" must contain only numbers or ExprRefs.');return t}function G6(t,e,n){let i,r;const s=n.values.map(o=>({hi:ly(o,1+n.fade),lo:ly(o,1-n.fade)}));if(t===0)i=[s[0].hi,s[0].lo];else if(t===e-1){const o=s.at(-1);i=[o.hi,o.lo]}else{const o=s[t-1],a=s[t];i=[o.hi,o.lo,a.hi,a.lo]}return t===0?r=[1,0]:t===e-1?r=[0,1]:r=[0,1,1,0],{channel:n.channel,unitsPerPixel:i,values:r}}function ly(t,e){return Ee(t)?{expr:"("+t.expr+") * "+e}:t*e}function th(t){return"mark"in t&&(le(t.mark)||Ge(t.mark))}function nh(t){return"layer"in t&&Ge(t.layer)}function uy(t){return"import"in t}function co(t){return"vconcat"in t&&be(t.vconcat)}function fy(t){return"hconcat"in t&&be(t.hconcat)}function pc(t){return"concat"in t&&be(t.concat)}class Bi extends ao{#e=[];constructor(e,n,i,r,s,o){super(e,n,i,r,s,{layersChildren:!0,...o}),this.spec=e,this.needsAxes={x:!0,y:!0}}async initializeChildren(){this.#e=await Promise.all(this.spec.layer.map(e=>this.context.createOrImportView(e,this,this,this.getNextAutoName("layer"),n=>{if(!nh(n)&&!th(n)&&!eh(n))throw new Ye("LayerView accepts only unit, layer, or multiscale specs as children!",this)})))}async addChildSpec(e,n){return this.#t().addChildSpec(e,n)}async removeChildAt(e){await this.#t().removeChildAt(e)}#t(){return new oy(this,{getChildSpecs:()=>({specs:this.spec.layer,insertAt:(e,n)=>{this.spec.layer.splice(e,0,n)},removeAt:e=>{this.spec.layer.splice(e,1)}}),insertView:(e,n)=>(e.layoutParent??=this,this.#e.splice(n,0,e),e),removeView:e=>{const n=this.#e[e];if(!n)throw new Error("Child index out of range!");n.disposeSubtree(),this.#e.splice(e,1)},defaultName:()=>this.getNextAutoName("layer")})}get children(){return this.#e.slice()}*[Symbol.iterator](){for(const e of this.#e)yield e}render(e,n,i={}){if(super.render(e,n,i),!!this.isConfiguredVisible()){e.pushView(this,n);for(const r of this.#e)r.render(e,n,i);e.popView(this)}}propagateInteractionEvent(e){this.handleInteractionEvent(void 0,e,!0);for(let n=this.#e.length-1;n>=0;n--)if(this.#e[n].propagateInteractionEvent(e),e.stopped)return;this.handleInteractionEvent(void 0,e,!1)}}class hy{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,i=this.nRows;for(let r=0;r<i;r++){const s=[];e.push(s);for(let o=0;o<n;o++){const a=r*n+o;a<this.n&&s.push(a)}}return e}get colIndices(){const e=[],n=this.nCols,i=this.nRows;for(let r=0;r<n;r++){const s=[];e.push(s);for(let o=0;o<i;o++){const a=o*n+r;a<this.n&&s.push(a)}}return e}getCellIndex(e,n){let i=0;if(this.maxCols==1/0)i=n==0?e:void 0;else{if(e>=this.maxCols)return;i=n*this.nCols+e}return i<this.n?i:void 0}getCellCoords(e){if(!(e<0||e>=this.n))return[e%this.nCols,Math.floor(e/this.nCols)]}}function An(t){return()=>t}class Se{static create(e,n,i,r){return new Se(An(e),An(n),An(i),An(r))}static ZERO=Se.create(0,0,0,0);_offset(e,n){const i=this["_"+e];if(n===0)return i;switch(typeof n){case"number":return()=>i()+n;case"function":return()=>i()+n();default:throw new Error("Not a number of function")}}_passThrough(e){return this._offset(e,0)}constructor(e,n,i,r){this._x=e,this._y=n,this._width=i,this._height=r}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=i=>{const r=e[i];return typeof r=="number"?An(r):typeof r=="function"?r:this._passThrough(i)};return new Se(n("x"),n("y"),n("width"),n("height"))}translate(e,n){return e===0&&n===0?this:new Se(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 Se(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 Se(()=>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 Se(()=>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 Se(An(this.x),An(this.y),An(this.width),An(this.height))}containsPoint(e,n){return e>=this.x&&e<this.x2&&n>=this.y&&n<this.y2}normalizePoint(e,n,i=!1){const r={x:(e-this.x)/this.width,y:(n-this.y)/this.height};return i&&(r.y=1-r.y),r}denormalizePoint(e,n,i=!1){return i&&(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)}`}}const H6="chromosome_ticks_and_labels",Y6={x:"width",y:"height"};function ih(t){return t=="x"?"y":"x"}const mc={x:["bottom","top"],y:["left","right"]},rh=Object.fromEntries(Object.entries(mc).map(([t,e])=>e.map(n=>[n,t])).flat(1));function Yn(t){return rh[t]}class Ay extends Bi{constructor(e,n,i,r,s,o){const a=n=="locus",l={...a?J6:dy,...V6(n,e),...e};super(a?q6(l,n):gy(l,n),i,r,s,`axis_${e.orient}`,{blockEncodingInheritance:!0,...o}),this.axisProps=l,hn(this,{skipSubtree:!0})}getSize(){const e={px:this.getPerpendicularSize()},n={grow:1};return rh[this.axisProps.orient]=="x"?new Gn(n,e):new Gn(e,n)}getPerpendicularSize(){return sh(this.axisProps)}isPickingSupported(){return!1}}function sh(t){const e=Yn(t.orient);let n=t.ticks&&t.tickSize||0;return t.labels&&(n+=t.labelPadding,e=="x"?n+=t.labelFontSize:n+=30),t.title&&(n+=t.titlePadding+t.titleFontSize),n=Math.min(t.maxExtent||1/0,Math.max(t.minExtent||0,n)),n}const dy={values:null,minExtent:20,maxExtent:1/0,offset:0,domain:!0,domainWidth:1,domainColor:"gray",domainDash:null,domainDashOffset:0,domainCap:"square",ticks:!0,tickSize:5,tickWidth:1,tickColor:"gray",tickDash:null,tickDashOffset:0,tickCap:"square",tickCount:null,tickMinStep:null,labels:!0,labelAlign:"center",labelBaseline:"middle",labelPadding:4,labelFontSize:10,labelLimit:180,labelColor:"black",format:null,titleColor:"black",titleFont:"sans-serif",titleFontSize:10,titlePadding:3};function V6(t,e){const n=e.orient,i=t=="nominal"||t=="ordinal";let r="center",s="middle",o=e.labelAngle??((n=="top"||n=="bottom")&&i?-90:0);switch(n){case"left":r="right";break;case"right":r="left";break;case"top":case"bottom":Math.abs(o)>30?(r=o>0==(n=="bottom")?"left":"right",s="middle"):s=n=="top"?"alphabetic":"top";break}return{labelAlign:r,labelAngle:o,labelBaseline:s}}function gy(t,e){const n={...t,extent:sh(t)},i=Yn(n.orient),r=ih(i),s=n.orient=="bottom"||n.orient=="right"?1:-1,o=n.orient=="bottom"||n.orient=="left"?1:0,a=()=>({field:"value",type:e}),l=()=>({name:"domain",data:{values:[{}]},mark:{type:"rule",clip:!1,strokeDash:n.domainDash,strokeCap:n.domainCap,color:n.domainColor,[r]:o,size:n.domainWidth}}),c=()=>({name:"labels",mark:{type:"text",clip:!1,align:n.labelAlign,angle:n.labelAngle,baseline:n.labelBaseline,[r+"Offset"]:(n.tickSize+n.labelPadding)*s,[r]:o,size:n.labelFontSize,color:n.labelColor,minBufferSize:1500},encoding:{[i]:a(),text:{field:"label"}}}),u=()=>({name:"ticks",mark:{type:"rule",clip:!1,strokeDash:n.tickDash,strokeCap:n.tickCap,color:n.tickColor,size:n.tickWidth,minBufferSize:300},encoding:{[r]:{value:o},[r+"2"]:{value:o-n.tickSize/n.extent*(o?1:-1)}}}),f=()=>({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,[i]:.5,[r]:1-o}}),h=()=>{const d={name:"ticks_and_labels",encoding:{[i]:a()},layer:[]};return n.ticks&&d.layer.push(u()),n.labels&&d.layer.push(c()),d},A={resolve:{scale:{[i]:"forced"}},domainInert:!0,[Y6[ih(i)]]:n.extent,data:{lazy:{type:"axisTicks",channel:i,axis:t}},layer:[]};return n.domain&&A.layer.push(l()),(n.ticks||n.labels)&&A.layer.push(h()),n.title&&A.layer.push(f()),A}const J6={...dy,chromTicks:!0,chromTickSize:18,chromTickWidth:1,chromTickColor:"#989898",chromTickDash:[4,2],chromTickDashOffset:1,chromLabels:!0,chromLabelFontSize:13,chromLabelFontWeight:"normal",chromLabelFontStyle:"normal",chromLabelColor:"black",chromLabelAlign:"left",chromLabelPadding:7};function q6(t,e){const n={...t,extent:sh(t)},i=Yn(n.orient),r=ih(i),s=n.orient=="bottom"||n.orient=="left"?1:0,o=()=>({name:"chromosome_ticks",mark:{type:"rule",strokeDash:t.chromTickDash,strokeDashOffset:t.chromTickDashOffset,[r]:s,[r+"2"]:s-n.chromTickSize/n.extent*(s?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:{[i+"2"]:{field:"continuousEnd",type:e},text:{field:"name"}}}};let l;switch(n.orient){case"bottom":case"top":l={};break;case"left":l={labelAngle:-90,labelAlign:"center",labelPadding:6};break;case"right":l={labelAngle:90,labelAlign:"center",labelPadding:6};break;default:l={}}const c=gy({...t,...l},e);if(t.chromTicks||t.chromLabels){const u={name:H6,data:{lazy:{type:"axisGenome",channel:Yn(n.orient)}},encoding:{[i]:{field:"continuousStart",type:e,band:0}},layer:[]};if(t.chromTicks&&u.layer.push(o()),t.chromLabels){u.layer.push(a());let f;c.layer.filter(h=>h.name=="ticks_and_labels").forEach(h=>h.layer.filter(A=>A.name=="labels").forEach(A=>{f=A.mark})),f&&(n.orient=="top"||n.orient=="bottom"?(f.viewportEdgeFadeWidthLeft=30,f.viewportEdgeFadeDistanceLeft=40):(f.viewportEdgeFadeWidthBottom=30,f.viewportEdgeFadeDistanceBottom=40))}c.layer.push(u)}return c}class oh{#e;#t=0;#n=0;constructor(e){this.#e=new Array(e)}push(e){this.#e[this.#t]=e,this.#t=(this.#t+1)%this.size,this.#n=Math.min(this.#n+1,this.size)}get(){const e=this.#e;return this.#n<this.size?e.slice(0,this.#n):e.slice(this.#t,this.size).concat(e.slice(0,this.#t))}get size(){return this.#e.length}get length(){return this.#n}}function K6(t){if(!t||typeof t!="object")return!1;const e=t;return e.type==="touchgesture"&&(e.phase==="move"||e.phase==="end")&&(e.pointerCount===1||e.pointerCount===2)&&Number.isFinite(e.xDelta)&&Number.isFinite(e.yDelta)&&Number.isFinite(e.zDelta)}class j6{#e;constructor(e,n){this.point=e,this.uiEvent=n,this.stopped=!1,this.wheelClaimed=!1,this.target=void 0}stopPropagation(){this.stopped=!0}claimWheel(){if(this.type!=="wheel"&&this.type!=="wheelclaimprobe")throw new Error("Can claim wheel only for wheel events!");this.wheelClaimed=!0}get type(){return this.uiEvent.type}get proxiedMouseEvent(){return this.#e||(this.#e=py(this.mouseEvent)),this.#e}get mouseEvent(){if(this.uiEvent instanceof MouseEvent)return this.uiEvent;throw new Error("Not a MouseEvent!")}}function py(t){const e=i=>i===null||typeof i!="object"&&typeof i!="function",n={get(i,r,s){const o=Reflect.get(i,r,i);if(!e(o))throw new Error(`Access to non-primitive property "${String(r)}" is not allowed.`);return o},getPrototypeOf(){return null},ownKeys(i){return Reflect.ownKeys(i).filter(s=>e(i[s])).map(s=>typeof s=="symbol"?s:String(s))},getOwnPropertyDescriptor(i,r){const s=Reflect.getOwnPropertyDescriptor(i,r);if(s&&!("get"in s||"set"in s)&&e(s.value))return{value:s.value,writable:!!s.writable,enumerable:!!s.enumerable,configurable:!!s.configurable}},has(i,r){return r in i?e(i[r]):!1}};return new Proxy(t,n)}class Ze{static fromMouseEvent(e){return new Ze(e.clientX,e.clientY)}constructor(e,n){this.x=e,this.y=n}subtract(e){return new Ze(this.x-e.x,this.y-e.y)}add(e){return new Ze(this.x-e.x,this.y-e.y)}multiply(e){return new Ze(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}}let my=0;const wy=new WeakMap,W6=Ey(),yy=6;function Cy(){my=performance.now()}function by(){return performance.now()-my<50}function X6(t){return function(...e){return Cy(),t(...e)}}function Z6(t,e,n,i,r){n=X6(n);const s=tM(r);if(t.type=="wheel"){const o=t.uiEvent,a=o.deltaMode?120:1;if(!o.deltaX&&!o.deltaY)return;s.smoother?.stop();let{x:l,y:c}=t.point;if(i){const f=$6(t.point,e,i);if(f)f.x!==void 0&&(l=f.x),f.y!==void 0&&(c=f.y);else{const h=i.mark.encoders;h.x&&!h.x2&&!h.x.constant&&(l=yr(h.x,i.datum)*e.width+e.x),h.y&&!h.y2&&!h.y.constant&&(c=(1-yr(h.y,i.datum))*e.height+e.y)}}let u=!1;Math.abs(o.deltaX)<Math.abs(o.deltaY)?u=n({x:l,y:c,xDelta:0,yDelta:0,zDelta:o.deltaY*a/300})===!0:u=n({x:l,y:c,xDelta:-o.deltaX*a,yDelta:0,zDelta:0})===!0,u&&o.preventDefault()}else if(t.type=="mousedown"&&t.mouseEvent.button===0){s.smoother&&s.smoother.stop();const o=new oh(30),a=t.mouseEvent;a.preventDefault();let l=Ze.fromMouseEvent(a);const c=f=>{const h=Ze.fromMouseEvent(f);o.push({point:h,timestamp:performance.now()});const A=h.subtract(l);n({x:l.x,y:l.y,xDelta:A.x,yDelta:A.y,zDelta:0}),l=h},u=()=>{document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",u),xy(s,o,l,n,r,{minSampleCount:5})};document.addEventListener("mouseup",u,!1),document.addEventListener("mousemove",c,!1)}else if(t.type=="touchgesture"){if(!K6(t.uiEvent))return;const o=t.uiEvent,{xDelta:a,yDelta:l,zDelta:c}=o;if(o.phase==="end"){o.pointerCount===1&&xy(s,s.touchPanEventBuffer,s.touchPanLastPoint,n,r,{minSampleCount:2,minVelocityPxPerMs:.03}),Iy(s);return}s.touchPanPointerCount!==o.pointerCount&&(Iy(s),s.touchPanPointerCount=o.pointerCount);const u=new Ze(t.point.x+a,t.point.y+l);if(s.touchPanLastPoint=u,o.pointerCount===1&&(a!==0||l!==0)&&s.touchPanEventBuffer.push({point:u,timestamp:performance.now()}),a===0&&l===0&&c===0)return;s.smoother?.stop(),n({x:t.point.x,y:t.point.y,xDelta:a,yDelta:l,zDelta:c})}}function $6(t,e,n){if(n.mark.getType()!=="link")return;const i=n.mark.encoders;if(!(i.x&&i.y&&i.x2&&i.y2))return;const r=!i.x.constant&&!i.x2.constant,s=!i.y.constant&&!i.y2.constant;if(!r&&!s)return;const o=yr(i.x,n.datum)*e.width+e.x,a=(1-yr(i.y,n.datum))*e.height+e.y,l=yr(i.x2,n.datum)*e.width+e.x,c=(1-yr(i.y2,n.datum))*e.height+e.y;let u=0,f=0;r&&(u+=(t.x-o)**2,f+=(t.x-l)**2),s&&(u+=(t.y-a)**2,f+=(t.y-c)**2);const h=i.size?+i.size(n.datum):0,A=Number.isFinite(h)?Math.max(h,yy):yy,d=A*A;if(!(Math.min(u,f)>d))return u<=f?{x:r?o:void 0,y:s?a:void 0}:{x:r?l:void 0,y:s?c:void 0}}function yr(t,e){const n=+t(e),i=t.scale;if(!i)return n;const r=eM(t.channelDef);if(i.type==="band"||i.type==="point")return Number.isFinite(r)?n+i.bandwidth()*r:n;if(i.type==="index"||i.type==="locus"){if(!Number.isFinite(r))return n;const s=i;return n+s.step()*(r-s.align())}else return n}function eM(t){return t&&"band"in t?t.band??.5:.5}function Ey(){return{smoother:void 0,touchPanEventBuffer:new oh(30),touchPanLastPoint:void 0,touchPanPointerCount:0}}function tM(t){if(!t)return W6;let e=wy.get(t);return e||(e=Ey(),wy.set(t,e)),e}function Iy(t){t.touchPanEventBuffer=new oh(30),t.touchPanLastPoint=void 0,t.touchPanPointerCount=0}function xy(t,e,n,i,r,s={}){if(!r||!n)return;const o=s.minSampleCount??5,a=s.minVelocityPxPerMs??0,l=160,c=performance.now(),u=e.get().filter(m=>c-m.timestamp<l);if(u.length<o||u.length>=5&&nM(u))return;const f=u.at(-1),h=u[0],A=f.point.subtract(h.point).multiply(1/(f.timestamp-h.timestamp));if(!Number.isFinite(A.x)||!Number.isFinite(A.y)||A.length<a)return;let d=n.x,g=n.y;t.smoother=Xf(r,m=>{i({x:m.x,y:m.y,xDelta:d-m.x,yDelta:g-m.y,zDelta:0}),d=m.x,g=m.y},150,.5,{x:d,y:g}),t.smoother({x:n.x-A.x*250,y:n.y-A.y*250})}function nM(t){const e=t[Math.floor(t.length/2)],n=e.point.subtract(t[0].point).multiply(e.timestamp-t[0].timestamp),i=t.at(-1).point.subtract(e.point).multiply(t.at(-1).timestamp-e.timestamp),r=n.length;return i.length/r<.4}class iM extends Bi{constructor(e,n,i,r,s,o){const l={...n=="locus"?rM:vy,...e};super(cM(l,n),i,r,s,`axisGrid_${e.orient}`,{blockEncodingInheritance:!0,...o}),this.axisProps=l,hn(this,{skipSubtree:!0})}getOrient(){return this.axisProps.orient}isPickingSupported(){return!1}}const vy={values:null,grid:!1,gridCap:"butt",gridColor:"lightgray",gridDash:null,gridOpacity:1,gridWidth:1,tickCount:null,tickMinStep:null},rM={...vy,chromGrid:!1,chromGridCap:"butt",chromGridColor:"gray",chromGridDash:[1,5],chromGridOpacity:1,chromGridWidth:1};function sM(t,e){const n=t,i=Yn(n.orient);return{name:"grid_lines",data:{lazy:{type:"axisTicks",channel:i,axis:t}},mark:{type:"rule",strokeDash:n.gridDash,strokeCap:n.gridCap,color:n.gridColor,size:n.gridWidth,opacity:n.gridOpacity,minBufferSize:300},encoding:{[i]:{field:"value",type:e}}}}function oM(t,e){const n=t,i=Yn(n.orient);return{name:"chromosome_lines",data:{lazy:{type:"axisGenome",channel:i}},mark:{type:"rule",strokeDash:n.chromGridDash,strokeCap:n.chromGridCap,color:n.chromGridColor,size:n.chromGridWidth,opacity:n.chromGridOpacity},encoding:{[i]:{field:"continuousStart",type:e,band:0}}}}function aM(t,e){const n=t,i=Yn(n.orient);return{name:"chromosome_fill",data:{lazy:{type:"axisGenome",channel:i}},mark:{type:"rect"},encoding:{[i]:{field:"continuousStart",type:e,band:0},[i+"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 cM(t,e){const n={...t},i=[];return n.chromGrid&&(n.chromGridFillOdd||n.chromGridFillEven)&&i.push(aM(n,e)),n.chromGrid&&n.chromGridOpacity>0&&i.push(oM(n,e)),n.grid&&n.gridOpacity>0&&i.push(sM(n,e)),{name:"grid_layers",resolve:{scale:{[Yn(t.orient)]:"forced",fill:"independent",opacity:"independent"}},domainInert:!0,layer:i}}const By={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"},lM={orient:"left",anchor:"middle",align:"right",baseline:"middle",angle:0,fontSize:12},uM={orient:"top",anchor:"start",align:"left",baseline:"top",offset:-10,dx:10,fontSize:12},fM={start:0,middle:.5,end:1},hM={start:"left",middle:"center",end:"right"};function AM(t){if(!t)return;const e=le(t)?{text:t}:t;if(!e.text||e.orient=="none")return;const n={"track-title":lM,overlay:uM}[e.style]??{},i={...By,...n,...e};let r={},s={x:0,y:0};const o=fM[i.anchor??"middle"];switch(i.orient){case"top":s={x:o,y:1},r={baseline:"alphabetic",angle:0};break;case"right":s={x:1,y:1-o},r={baseline:"alphabetic",angle:90};break;case"bottom":s={x:o,y:0},r={baseline:"top",angle:0};break;case"left":s={x:0,y:o},r={baseline:"alphabetic",angle:-90};break}const a={...By,...r,...n,...e},l={xOffset:0,yOffset:0};switch(i.orient){case"top":l.yOffset=-a.offset;break;case"right":l.xOffset=a.offset;break;case"bottom":l.yOffset=a.offset;break;case"left":l.xOffset=-a.offset;break}return{data:{values:[{}]},mark:{type:"text",tooltip:null,clip:!1,...s,...l,text:a.text,align:a.align??hM[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 Sy extends Je{#e;#t=Se.ZERO;#n=Se.ZERO;#i=Se.ZERO;viewportOffset=0;#r;constructor(e,n,i={}){const r={scrollbarSize:8,scrollbarPadding:2,scrollbarMinLength:20};super({params:[{name:"scrollbarOpacity",value:1}],opacity:{expr:"scrollbarOpacity"},data:{values:[{}]},mark:{type:"rect",fill:"#b0b0b0",fillOpacity:.6,stroke:"white",strokeWidth:1,strokeOpacity:1,cornerRadius:5,clip:!1}},e.layoutParent.context,e.layoutParent,e.view,"scrollbar-"+n,{blockEncodingInheritance:!0}),hn(this,{skipSubtree:!0}),this.config=r,this.#e=n,this.#r=i.onViewportOffsetChange;const s=this.config.scrollbarPadding,o=this.config.scrollbarSize;this.#t=this.#e=="vertical"?new Se(()=>this.#n.x+this.#n.width-o-s,()=>this.#n.y+s+this.scrollOffset,()=>o,()=>this.#c()):new Se(()=>this.#n.x+s+this.scrollOffset,()=>this.#n.y+this.#n.height-o-s,()=>this.#c(),()=>o),this.#A(this.viewportOffset),this.addInteractionEventListener("mousedown",(a,l)=>{if(l.stopPropagation(),this.#a()<=0)return;const c=d=>n=="vertical"?d.clientY:d.clientX;l.mouseEvent.preventDefault();const u=this.scrollOffset,f=c(l.mouseEvent),h=d=>{const g=this.#a();if(g<=0)return;const m=sr(c(d)-f+u,0,g);this.interpolateViewportOffset({x:this.#u(m)})},A=()=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",A)};document.addEventListener("mouseup",A,!1),document.addEventListener("mousemove",h,!1)})}get scrollOffset(){return this.#l(this.viewportOffset)}setViewportOffset(e,{notify:n=!0,syncSmoother:i=!1}={}){this.viewportOffset=sr(e,0,this.#f()),i&&this.#A(this.viewportOffset),n&&this.#r&&this.#r(this.viewportOffset)}#o(){const e=this.#e=="horizontal"?"width":"height",n=this.#n[e],i=this.#i[e];return i>0?Math.min(1,n/i):1}#s(){const e=this.#e=="horizontal"?"width":"height";return Math.max(0,this.#n[e]-2*this.config.scrollbarPadding)}#c(){const e=this.#s(),n=this.#o()*e,i=this.config.scrollbarMinLength;return Math.min(e,Math.max(i,n))}#a(){return Math.max(0,this.#s()-this.#c())}#l(e){const n=this.#f(),i=this.#a();return n<=0||i<=0?0:e/n*i}#u(e){const n=this.#f(),i=this.#a();return n<=0||i<=0?0:e/i*n}#f(){const e=this.#e=="horizontal"?"width":"height";return Math.max(0,this.#i[e]-this.#n[e])}render(e,n,i){super.render(e,this.#t,i)}updateScrollbar(e,n){this.#n=e.flatten(),this.#i=n,this.setViewportOffset(this.viewportOffset,{notify:!1,syncSmoother:!0})}#A(e){this.interpolateViewportOffset=Xf(this.context.animator,n=>{this.setViewportOffset(n.x,{notify:!0,syncSmoother:!1})},35,.4,{x:e})}}class dM extends Bi{constructor(e,n,i={}){const r=n(),s=Object.keys(r.intervals);if(li.every(u=>!s.includes(u)))throw new Error("SelectionRect requires at least one of the channels 'x' or 'y' to be present in the selection.");const o={name:"selectionRect",domainInert:!0,resolve:{scale:{x:"forced",y:"forced"}},data:{values:Dy(n())},encoding:{},layer:[]};s.includes("x")&&(o.encoding.x={field:"_x",type:null,title:null},o.encoding.x2={field:"_x2"}),s.includes("y")&&(o.encoding.y={field:"_y",type:null,title:null},o.encoding.y2={field:"_y2"}),o.layer.push({name:"selectionRectRect",mark:{type:"rect",clip:!0,fill:"#808080",fillOpacity:.05,stroke:"black",strokeWidth:1,strokeOpacity:.2,...i}});const a=u=>{const f=e.view.getScaleResolution(u);return`format(datum._${u}2 - datum._${u}, '.3s')`+(f.type==="locus"?" + 'b'":"")},l=i.measure=="inside"?9:i.measure=="outside"?-9:0;s.includes("x")&&l!=0&&o.layer.push({name:"selectionRectTextX",mark:{type:"text",align:"center",paddingX:5,dy:l,tooltip:null},encoding:{text:{expr:a("x")},y:s.includes("y")?{field:"_y2",type:null,title:null}:{value:1},y2:null}}),s.includes("y")&&l!=0&&o.layer.push({name:"selectionRectTextY",mark:{type:"text",align:"center",paddingY:5,dy:l,tooltip:null,angle:-90},encoding:{text:{expr:a("y")},x2:null}}),super(o,e.layoutParent.context,e.layoutParent,e.view,"selectionRect",{blockEncodingInheritance:!0}),hn(this,{skipSubtree:!0});const c=()=>{const u=n(),f=this.flowHandle?.dataSource;if(!f)throw new Error("Cannot find selection rect data source handle!");f.updateDynamicData(Dy(u))};this.registerDisposer(n.subscribe(c))}}function Dy(t){const e=t.intervals.x,n=t.intervals.y;return!e&&!n?[]:[{_x:e?.[0],_x2:e?.[1],_y:n?.[0],_y2:n?.[1]}]}class gM{constructor(e,n,i){if(this.layoutParent=n,this.view=e,this.serial=i,this.background=void 0,this.backgroundStroke=void 0,this.axes={},this.gridLines={},this.scrollbars={},this.selectionRect=void 0,this.title=void 0,this.coords=Se.ZERO,e.needsAxes.x||e.needsAxes.y){const r=e.spec,s="view"in r?r?.view:void 0,o=mM(s);o&&(this.background=new Je(o,n.context,n,e,"background"+i,{blockEncodingInheritance:!0}),hn(this.background,{skipSubtree:!0}));const a=wM(s);a&&(this.backgroundStroke=new Je(a,n.context,n,e,"backgroundStroke"+i,{blockEncodingInheritance:!0}),hn(this.backgroundStroke,{skipSubtree:!0}));const l=AM(e.spec.title);if(l){const c=new Je(l,n.context,n,e,"title"+i,{blockEncodingInheritance:!0});this.title=c,hn(this.title,{skipSubtree:!0})}}e.spec.viewportWidth!=null&&(this.scrollbars.horizontal=new Sy(this,"horizontal")),e.spec.viewportHeight!=null&&(this.scrollbars.vertical=new Sy(this,"vertical")),this.#e()}#e(){const e=this.view,n=i=>{this.view.context.glHelper.canvas.style.cursor=i};for(const[i,r]of e.paramRuntime.paramConfigs){if(!("select"in r))continue;const s=la(r.select);if(!l0(s))continue;const o=s.encodings,a=Object.fromEntries(o.map(S=>{const D=this.view.getScaleResolution(S),B=D?.getScale();if(!B||!Le(B.type))throw new Error(`No continuous scale found for interval selection param "${i}" on channel "${S}"! Scale type is "${B?.type??"none"}".`);return[S,D]})),l=o.some(S=>a[S].isZoomable()),c=s.on??(l?{type:"mousedown",filter:"event.shiftKey"}:{type:"mousedown"});if(c.type!=="mousedown")throw new Error(`Interval selection param "${i}" currently supports only "mousedown" in "on".`);const u=c.filter?lc(c.filter):()=>!0,f=pM(s.zoom,l,i),h=f?.filter?lc(f.filter):()=>!0;if(this.selectionRect)throw new Error("Only one interval selection per container is currently allowed!");let A=!1,d=!1,g=!1,m=null;const p=(S,D)=>Object.fromEntries(o.map(B=>[B,[Math.min(S[B],D[B]),Math.max(S[B],D[B])]])),w=e.paramRuntime.createExpression(i),C=S=>{e.paramRuntime.setValue(i,S)};r.value&&C({type:"interval",intervals:r.value});const y=()=>{C(a0(o)),n(null)};this.selectionRect=new dM(this,w,s.mark),this.selectionRect.initializeChildren();const I=S=>{const D={x:0,y:0},B=e.coords.normalizePoint(S.x,S.y,!0);for(const k of o){const F=a[k].getScale(),M=F.invert(k=="x"?B.x:B.y);D[k]=M+(["index","locus"].includes(F.type)?.5:0)}return D},x=S=>{const{intervals:D}=S,B=(M,O,_)=>{const H=(Z,Y)=>Y==null?null:a[Z].getScale()(Y),G=H("x",M)??_,q=H("y",O)??_;return e.coords.denormalizePoint(G,q,!0)},k=B(D.x?.[0],D.y?.[0],0),F=B(D.x?.[1],D.y?.[1],1);return Se.create(k.x,k.y,F.x-k.x,F.y-k.y)};e.addInteractionEventListener("mousedown",(S,D)=>{if(D.mouseEvent.button!=0)return;if(m=A?x(w()):null,m)n("grabbing"),d=!0;else{const O=D.point;if(Wl(w())&&(d=!0),u(D.proxiedMouseEvent))y(),g=!0;else if(Wl(w())){const H=(G,q)=>{e.removeInteractionEventListener("mouseup",H);const Z=q.point;O.subtract(Z).length<2&&y()};e.addInteractionEventListener("mouseup",H);return}else return}D.stopPropagation();const B=D.point,k=Ze.fromMouseEvent(D.mouseEvent).subtract(B),F=O=>{const _=Ze.fromMouseEvent(O).subtract(k);let H;if(m){const G=_.subtract(B),q=m.translate(G.x,G.y);H=p(I(new Ze(q.x,q.y)),I(new Ze(q.x2,q.y2)))}else H=p(I(B),I(_));for(const G of o){const q=a[G],{zoomExtent:Z}=q,Y=H[G];if(m){const ze=Y[1]-Y[0],mn=Z[0],jt=Z[1];Y[0]<mn&&(Y[0]=mn,Y[1]=mn+ze),Y[1]>jt&&(Y[1]=jt,Y[0]=jt-ze)}const we=Qy(q,Y);we?(Y[0]=we[0],Y[1]=we[1]):(Y[0]=Z[0],Y[1]=Z[0])}C({type:"interval",intervals:H})},M=()=>{document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",M),g=!1,m&&(n("move"),m=null)};document.addEventListener("mousemove",F),document.addEventListener("mouseup",M)}),e.addInteractionEventListener("click",(S,D)=>{D.mouseEvent.button==0&&d&&(D.stopPropagation(),d=!1)},!0);const E=S=>Rv(w(),I(S));e.addInteractionEventListener("dblclick",(S,D)=>{E(D.point)&&(y(),D.stopPropagation())},!0),e.addInteractionEventListener("wheel",(S,D)=>{const B=D.uiEvent;if(!(B instanceof WheelEvent)||!f||!h(py(B))||Math.abs(B.deltaX)>=Math.abs(B.deltaY)||!E(D.point))return;const k=w();if(!Wl(k))return;const F=B.deltaMode?120:1,M=2**(B.deltaY*F/300),O=I(D.point),_={...k.intervals};let H=!1;for(const G of o){const q=_[G];if(!q||q.length!==2)continue;const Z=a[G],Y=Z.getScale(),we=Om(Y,[...q],O[G],M,{onUnsupported:"identity"}),ze=Qy(Z,we);ze&&(ze[0]!==q[0]||ze[1]!==q[1])&&(_[G]=ze,H=!0)}H&&(C({...k,type:"interval",intervals:_}),B.preventDefault(),D.stopPropagation())}),e.addInteractionEventListener("mousemove",(S,D)=>{E(D.point)?g||(A=!0,m||n("move")):(A=!1,m||n(null))})}}*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(){this.disposeAxisViews();const{view:e,axes:n,gridLines:i}=this,r=(a,l)=>{const c=a.getAxisProps();if(c===null)return;const u=c?{...c}:{};if(!u.orient){for(const f of mc[l])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??=a.getTitle(),!mc[l].includes(u.orient))throw new Error(`Invalid axis orientation "${u.orient}" on channel "${l}"!`);return u},s=async(a,l,c)=>{const u=r(a,l);if(u){if(n[u.orient])throw new Error(`An axis with the orient "${u.orient}" already exists!`);const f=new Ay(u,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,c);n[u.orient]=f,await f.initializeChildren()}},o=async(a,l,c)=>{const u=r(a,l);if(u&&(u.grid||u.chromGrid)){const f=new iM(u,a.scaleResolution.type,this.layoutParent.context,this.layoutParent,c);i[u.orient]=f,await f.initializeChildren()}};for(const a of["x","y"])if(e.needsAxes[a]){const l=e.resolutions.axis[a];if(!l)continue;await s(l,a,e)}for(const a of["x","y"])if(e.needsAxes[a]&&e.getConfiguredOrDefaultResolution(a,"axis")!="excluded"){const l=e.getAxisResolution(a);if(!l)continue;await o(l,a,e)}if(e instanceof Bi){for(const a of e)for(const[l,c]of Object.entries(a.resolutions.axis)){const u=c.getAxisProps();u&&u.orient&&await s(c,l,a)}for(const a of e)for(const[l,c]of Object.entries(a.resolutions.axis)){const u=c.getAxisProps();u&&!u.orient&&await s(c,l,a)}}[...Object.values(n),...Object.values(i)].forEach(a=>a.visit(l=>{l instanceof Je&&l.resolve("scale")}))}disposeAxisViews(){for(const e of Object.values(this.axes))e.disposeSubtree();for(const e of Object.values(this.gridLines))e.disposeSubtree();this.axes={},this.gridLines={}}getOverhang(){const e=n=>{const i=this.axes[n];return i?Math.max(i.getPerpendicularSize()+(i.axisProps.offset??0),0):0};return new je(e("top"),e("right"),e("bottom"),e("left")).add(this.view.getOverhang())}getOverhangAndPadding(){return this.getOverhang().add(this.view.getPadding())}}function pM(t,e,n){const r=t===void 0?!e:t;if(r===!1)return;if(r===!0)return{type:"wheel"};const s=Xl(r);if(s.type!=="wheel")throw new Error(`Interval selection param "${n}" currently supports only "wheel" in "zoom".`);return s}function Qy(t,e){const n=t.getScale();return Tm(e,t.zoomExtent,{roundToIntegers:n.type==="index"||n.type==="locus"})}function mM(t){if(t?.fill||t?.fillOpacity||t?.shadowOpacity)return{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 wM(t){if(!(!t||!t.stroke||t.strokeWidth===0||t.strokeOpacity===0))return{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"}}}}const yM={pan:{baseSpeed:1,maxExtraSpeed:3,pressHalfLifeMs:30,releaseHalfLifeMs:100,holdGrowthHalfLifeMs:800,stopVelocity:.01},zoom:{baseSpeed:3,maxExtraSpeed:15,pressHalfLifeMs:10,releaseHalfLifeMs:100,holdGrowthHalfLifeMs:600,stopVelocity:.01}};class CM{#e;#t;#n;#i;#r;constructor(e=yM){this.#i=e.pan,this.#r=e.zoom,this.#e={KeyW:!1,KeyA:!1,KeyS:!1,KeyD:!1},this.#t={velocity:0,holdMs:0,direction:0},this.#n={velocity:0,holdMs:0,direction:0}}isNavigationKey(e){return e==="KeyW"||e==="KeyA"||e==="KeyS"||e==="KeyD"}handleKeyDown(e){return this.#o(e,!0)}handleKeyUp(e){return this.#o(e,!1)}reset(){this.#e.KeyW=!1,this.#e.KeyA=!1,this.#e.KeyS=!1,this.#e.KeyD=!1,this.#t.velocity=0,this.#t.holdMs=0,this.#t.direction=0,this.#n.velocity=0,this.#n.holdMs=0,this.#n.direction=0}step(e){if(e<=0)return{panDelta:0,zoomDelta:0,active:this.isActive()};{const n=ky(this.#e.KeyD,this.#e.KeyA),i=ky(this.#e.KeyW,this.#e.KeyS),r=Ry(this.#t,n,e,this.#i),s=Ry(this.#n,i,e,this.#r),o=e/1e3;return{panDelta:r*o,zoomDelta:s*o,active:this.isActive()}}}isActive(){return this.#e.KeyW||this.#e.KeyA||this.#e.KeyS||this.#e.KeyD?!0:this.#t.velocity!==0||this.#n.velocity!==0}#o(e,n){if(this.isNavigationKey(e)){const i=e;return this.#e[i]===n?!1:(this.#e[i]=n,!0)}else return!1}}function ky(t,e){return t===e?0:e?1:-1}function Ry(t,e,n,i){if(e!==0){t.direction!==e&&(t.holdMs=0),t.holdMs+=n;const r=i.maxExtraSpeed*(1-Math.pow(2,-t.holdMs/i.holdGrowthHalfLifeMs)),s=e*(i.baseSpeed+r);t.velocity=Fy(t.velocity,s,n,i.pressHalfLifeMs)}else t.holdMs=0,t.velocity=Fy(t.velocity,0,n,i.releaseHalfLifeMs),Math.abs(t.velocity)<i.stopVelocity&&(t.velocity=0);return t.direction=e,t.velocity}function Fy(t,e,n,i){return e+(t-e)*Math.pow(2,-n/i)}function ah(t){const e={x:new Set,y:new Set};return t.visit(n=>{for(const[i,r]of Object.entries(e)){const s=n.getScaleResolution(i);s&&s.isZoomable()&&r.add(s)}}),e}function ch(t){const e=ah(t).x;if(e.size===1){const n=e.values().next().value,i=t.getScaleResolution("x");return!i||i!==n?void 0:n}}class bM{#e;#t;#n=.5;#i=new CM;#r=!1;#o=0;#s=e=>{if(!this.#r)return;const n=ch(this.#t);if(!n){this.#i.reset(),this.#r=!1,this.#o=0;return}const i=Math.max(0,e-this.#o);this.#o=e;const r=this.#i.step(i);(r.panDelta!==0||r.zoomDelta!==0)&&n.zoom(2**r.zoomDelta,this.#n,r.panDelta)&&(Cy(),this.#e.animator.requestRender()),r.active?this.#e.animator.requestTransition(this.#s):(this.#r=!1,this.#o=0)};constructor({context:e,viewRoot:n}){this.#e=e,this.#t=n,this.#c()}handlePointerEvent(e,n){if(e){const i=e.view;if(typeof i.getKeyboardZoomAnchorX=="function"){const r=i.getKeyboardZoomAnchorX(n.point);Number.isFinite(r)&&(this.#n=Math.max(0,Math.min(1,r)))}else{const r=e.coords.normalizePoint(n.point.x,n.point.y);this.#n=r.x}}else return}#c(){const e=this.#e.addKeyboardListener;typeof e=="function"&&(e("keydown",n=>{EM(n)||!this.#i.isNavigationKey(n.code)||!ch(this.#t)||!this.#i.handleKeyDown(n.code)||(n.preventDefault(),this.#a())}),e("keyup",n=>{!this.#i.isNavigationKey(n.code)||!this.#i.handleKeyUp(n.code)||!ch(this.#t)||(n.preventDefault(),this.#a())}))}#a(){this.#r||(this.#r=!0,this.#o=performance.now(),this.#e.animator.requestTransition(this.#s))}}function EM(t){return!!(t.altKey||t.ctrlKey||t.metaKey||IM(t.target))}function IM(t){if(!t||typeof t!="object")return!1;const e=t;if(e.isContentEditable)return!0;if(typeof e.nodeName=="string"){const n=e.nodeName.toLowerCase();return n==="input"||n==="textarea"||n==="select"}return!1}const wc=Object.freeze({size:1,color:"#ccc",opacity:1,strokeDash:[4,4],strokeCap:"butt"});class xM{#e;#t;#n;#i=[];#r=[];#o={x:[0,0],y:[0,0]};constructor({direction:e,props:n,context:i,layoutParent:r,dataParent:s,getName:o}){this.#e=e,this.#t=n.includePlotMargin??!0;const a={...n};delete a.includePlotMargin,this.#n=this.#a(a,i,r,s,o)}get view(){return this.#n}update(e,n,i,r,s,o){this.#s(e,n,r,s),this.#c(i,o)}render(e,n,i){this.#n.render(e,n,i)}#s(e,n,i,r){if(this.#r.length=0,n<2)return;const s=this.#e==="vertical"?"column":"row",o=r?3:2;for(let a=1;a<n;a++){const c=i(s,a)-o,u=e[c],f=u?u.location:0,h=u?u.size:0;this.#r.push(f+h/2)}}#c(e,n){const i=this.#t?0:n.left,r=this.#t?e.width:e.width-n.right,s=this.#t?0:n.bottom,o=this.#t?e.height:e.height-n.top;this.#i.length=this.#r.length;for(let u=0;u<this.#r.length;u++){const f=this.#r[u],h=this.#i[u]??{};if(this.#e==="vertical")h.x=f,h.x2=f,h.y=s,h.y2=o;else{const A=e.height-f;h.x=i,h.x2=r,h.y=A,h.y2=A}this.#i[u]=h}const a=this.#n.flowHandle?.dataSource;if(!a)return;a.updateDynamicData(this.#i),this.#o.x[1]=e.width,this.#o.y[1]=e.height;const l=this.#n.getScaleResolution("x")?.getScale();l&&l.domain(this.#o.x);const c=this.#n.getScaleResolution("y")?.getScale();c&&c.domain(this.#o.y)}#a(e,n,i,r,s){const o=BM(e),a=this.#e==="horizontal"?s("separatorHorizontal"):s("separatorVertical"),l=new Je(o,n,i,r,a,{blockEncodingInheritance:!0});return hn(l,{skipSubtree:!0}),l}}function vM(t){if(!t)return null;const e=t===!0?{...wc}:{...wc,...t};return e.strokeDash===wc.strokeDash&&(e.strokeDash=wc.strokeDash.slice()),e}function BM(t){return{domainInert:!0,data:{values:[]},resolve:{scale:{x:"excluded",y:"excluded"},axis:{x:"excluded",y:"excluded"}},mark:{...t,type:"rule",clip:t.clip??!1,tooltip:null},encoding:{x:{field:"x",type:"quantitative",scale:{nice:!1,zero:!1}},y:{field:"y",type:"quantitative",scale:{nice:!1,zero:!1}},x2:{field:"x2"},y2:{field:"y2"}}}}class SM extends ao{#e=1/0;#t=10;#n=[];#i={};#r=0;#o={};#s=null;constructor(e,n,i,r,s,o,a){super(e,n,i,r,s,a),this.spec=e,this.#t=e.spacing??10,this.#e=o,this.#n=[],this.wrappingFacet=!1;const l=vM(e.separator);if(l)for(const c of kM(e))this.#o[c]=new xM({direction:c,props:l,context:this.context,layoutParent:this,dataParent:this,getName:u=>this.getNextAutoName(u)});this.layoutParent||(this.#s=new bM({context:this.context,viewRoot:this}))}appendChild(e){this.appendChildView(e)}appendChildView(e){return this.insertChildViewAt(e,this.#n.length)}insertChildViewAt(e,n){e.layoutParent??=this;const i=new gM(e,this,this.#r);return this.#r++,this.#n.splice(n,0,i),this.invalidateSizeCache(),i}removeChildView(e){const n=this.#n.findIndex(i=>i.view===e);if(n<0)throw new Error("Not my child view!");this.removeChildAt(n)}removeChildAt(e){const n=this.#n[e];if(!n)throw new Error("Child index out of range!");this.#l(n),this.#n.splice(e,1),this.invalidateSizeCache()}get#c(){return this.#n.filter(e=>e.view.isConfiguredVisible())}get#a(){return new hy(this.#c.length,this.#e??1/0)}setChildren(e){for(const n of this.#n)this.#l(n);this.#n=[];for(const n of e)this.appendChild(n);this.invalidateSizeCache()}#l(e){e.disposeAxisViews();for(const n of e.getChildren())n.disposeSubtree()}get children(){return this.#n.map(e=>e.view)}get childCount(){return this.#n.length}async createAxes(){await this.syncSharedAxes(),await Promise.all(this.#n.map(e=>e.createAxes()))}async syncSharedAxes(){for(const n of Object.values(this.#i))n.disposeSubtree();this.#i={};const e=[];for(const n of li){const i=this.resolutions.axis[n];if(!i)continue;const r=i.getAxisProps();if(!r)continue;const s={title:i.getTitle(),orient:mc[n][0],...r},o=new Ay(s,i.scaleResolution.type,this.context,this,this);e.push(o.initializeChildren()),this.#i[n]=o}await Promise.all(e)}*[Symbol.iterator](){for(const e of this.#n)yield*e.getChildren();for(const e of Object.values(this.#o))yield e.view;for(const e of Object.values(this.#i))yield e}#u(e){const n=e=="column"?"width":"height",i=(r,s)=>r.map(o=>{const l=this.#c[o].getOverhangAndPadding();return e=="column"?s?l.right:l.left:s?l.bottom:l.top}).reduce((o,a)=>Math.max(o,a),0);return this._cache(`size/directionSizes/${e}`,()=>this.#a[e=="column"?"colIndices":"rowIndices"].map(r=>({axisBefore:i(r,0),axisAfter:i(r,1),view:k8(r.map(s=>this.#c[s].view.getViewportSize()[n]))})))}#f(e){const n=this.#u(e),i=[];i.push(Zs);for(const[r,s]of n.entries())r>0&&i.push({px:this.#t,grow:0}),(r==0||this.wrappingFacet)&&i.push(Zs),i.push({px:s.axisBefore,grow:0}),i.push(s.view),i.push({px:s.axisAfter,grow:0}),(r==n.length-1||this.wrappingFacet)&&i.push(Zs);return i}#A(e){let n=0,i=0;const r=e=="row"?this.spec.height:this.spec.width;if(r||r===0)return zm(r);const s=this.#u(e);for(const[o,a]of s.entries())o>0&&(i+=this.#t),(o==0||this.wrappingFacet)&&(i+=0),i+=a.axisBefore,i+=a.view.px??0,n+=a.view.grow??0,i+=a.axisAfter,(o==s.length-1||this.wrappingFacet)&&(i+=0);return{px:i,grow:n}}#g(e,n){return e=="row"&&this.wrappingFacet?1+6*n+2:2+4*n+1}getOverhang(){return this.#h().union(this.#d())}#h(){const e=this.#u("column"),n=this.#u("row");return!e.length||!n.length?je.zero():new je(n.at(0).axisBefore,e.at(-1).axisAfter,n.at(-1).axisAfter,e.at(0).axisBefore)}#d(){const e=n=>{const i=rh[n],r=this.#i[i];return r?.axisProps.orient!==n?0:Math.max(r.getPerpendicularSize()+(r.axisProps.offset??0),0)};return new je(e("top"),e("right"),e("bottom"),e("left"))}getSize(){return this._cache("size",()=>new Gn(this.#A("column"),this.#A("row")).addPadding(this.#d()))}render(e,n,i={}){if(super.render(e,n,i),!this.isConfiguredVisible())return;this.layoutParent||(n=n.shrink(this.getPadding())),n=n.shrink(this.#d()),e.pushView(this,n);const r=e.getDevicePixelRatio(),s={devicePixelRatio:r},o=Um(this.#f("column"),n.width,s),a=Um(this.#f("row"),n.height,s),l=new hy(this.#c.length,this.#e??1/0),c=d=>Math.round(d*r)/r,u=[];for(const[d,g]of this.#c.entries()){const{view:m,axes:p,gridLines:w,background:C,backgroundStroke:y,title:I,selectionRect:x}=g,[E,S]=l.getCellCoords(d),D=o[this.#g("column",E)],B=a[this.#g("row",S)],k=m.getViewportSize(),F=m.getSize(),M=m.getOverhang(),O=D.location-M.left,_=B.location-M.top,H=(U,W)=>(U[W].grow?(W=="width"?D:B).size:U[W].px)+M[W],G=H(k,"width"),q=H(k,"height"),Z=H(F,"width"),Y=H(F,"height"),we=g.scrollbars.horizontal,ze=g.scrollbars.vertical,mn=we?()=>c(we.viewportOffset):()=>0,jt=ze?()=>c(ze.viewportOffset):()=>0,wn=new Se(()=>n.x+O,()=>n.y+_,()=>G,()=>q),Oi=m.isScrollable(),Qo=Oi?new Se(()=>n.x+O-mn(),()=>n.y+_-jt(),()=>Z,()=>Y):wn;g.coords=wn;const Vr=i.clipRect?wn.intersect(i.clipRect):wn;u.push({col:E,row:S,view:m,axes:p,gridLines:w,background:C,backgroundStroke:y,title:I,selectionRect:x,viewportCoords:wn,viewCoords:Qo,clippedChildCoords:Vr,viewWidth:Z,viewHeight:Y,scrollable:Oi,gridChild:g})}for(const d of u)d.background?.render(e,d.clippedChildCoords,{...i,clipRect:void 0});const f=this.#h(),h=this.#o.vertical;h&&(h.update(o,l.nCols,n,(d,g)=>this.#g(d,g),this.wrappingFacet,f),h.render(e,n,i));const A=this.#o.horizontal;A&&(A.update(a,l.nRows,n,(d,g)=>this.#g(d,g),this.wrappingFacet,f),A.render(e,n,i));for(const d of u){const{view:g,axes:m,gridLines:p,backgroundStroke:w,title:C,selectionRect:y,viewportCoords:I,viewCoords:x,clippedChildCoords:E,viewWidth:S,viewHeight:D,scrollable:B,gridChild:k,col:F,row:M}=d;for(const _ of Object.values(p))_.render(e,I,i);const O=DM(g)||B;O&&g.render(e,x,{...i,clipRect:E}),w?.render(e,E,{...i,clipRect:void 0});for(const[_,H]of Object.entries(m)){const G=_=="left"||_=="right"?"vertical":"horizontal",q=k.scrollbars[G],Z=q?I.modify(G=="vertical"?{y:()=>x.y,height:D}:{x:()=>x.x,width:S}):I,Y=My(Z,_,H);let we=i.clipRect;q&&(we=Y.intersect(we).intersect(q?I.modify(G=="vertical"?{x:-1e5,width:2e5}:{y:-1e5,height:2e5}):void 0)),H.render(e,Y,{...i,clipRect:we})}for(const _ of Object.values(this.#i)){const G=_.axisProps.orient;(G=="left"&&F==0||G=="right"&&F==l.nCols-1||G=="top"&&M==0||G=="bottom"&&M==l.nRows-1)&&_.render(e,My(I.shrink(k.view.getOverhang()),G,_),i)}O||g.render(e,x,i),y?.render(e,x,i);for(const _ of Object.values(k.scrollbars))_.updateScrollbar(I,x),_.render(e,n,i);C?.render(e,I,i)}e.popView(this)}propagateInteractionEvent(e){if(this.handleInteractionEvent(void 0,e,!0),e.stopped)return;const n=this.#c.find(r=>r.coords.containsPoint(e.point.x,e.point.y)),i=n?.view;if(e.type==="wheelclaimprobe"){if(!i)return;Ny(i)?QM(i)&&e.claimWheel():i.propagateInteractionEvent(e);return}this.#s?.handlePointerEvent(n,e);for(const r of Object.values(n?.scrollbars??{}))if(r.coords.containsPoint(e.point.x,e.point.y)&&(r.propagateInteractionEvent(e),e.stopped))return;if(i){if(i.propagateInteractionEvent(e),e.stopped)return;Ny(i)&&Z6(e,n.coords,r=>this.#p(n.coords,n.view,r),this.context.getCurrentHover(),this.context.animator)}e.stopped||this.handleInteractionEvent(void 0,e,!1)}#p(e,n,i){let r=!1,s=!1;const o=e.normalizePoint(i.x,i.y),a=e.normalizePoint(i.x+i.xDelta,i.y+i.yDelta),l={x:a.x-o.x,y:a.y-o.y};for(const[c,u]of Object.entries(ah(n)))if(!(u.size<=0)){r=!0;for(const f of u)s=f.zoom(2**i.zDelta,c=="y"?1-o[c]:o[c],c=="x"?l.x:-l.y)||s}return s&&this.context.animator.requestRender(),r}getDefaultResolution(e,n){return"independent"}}function DM(t){let e=!0;return t.visit(n=>{n instanceof Je&&(e&&=n.mark.properties.clip===!0)}),e}function QM(t){const e=ah(t);return e.x.size>0||e.y.size>0}function Ny(t){return t instanceof Je||t instanceof Bi}function kM(t){return"vconcat"in t?["horizontal"]:"hconcat"in t?["vertical"]:["horizontal","vertical"]}function My(t,e,n){const i=n.axisProps,r=n.getPerpendicularSize();if(e=="bottom")return t.translate(0,t.height+i.offset).modify({height:r});if(e=="top")return t.translate(0,-r-i.offset).modify({height:r});if(e=="left")return t.translate(-r-i.offset,0).modify({width:r});if(e=="right")return t.translate(t.width+i.offset,0).modify({width:r})}class lh extends SM{constructor(e,n,i,r,s){super(e,n,i,r,s,pc(e)?e.columns:co(e)?1:1/0),this.spec=e}async initializeChildren(){const e=this.spec,n=pc(e)?e.concat:co(e)?e.vconcat:e.hconcat;this.setChildren(await Promise.all(n.map(i=>this.context.createOrImportView(i,this,this,this.getNextAutoName("grid"))))),await this.createAxes()}async addChildSpec(e,n){return this.#t().addChildSpec(e,n)}async removeChildAt(e){await this.#t().removeChildAt(e)}getDefaultResolution(e,n){return n=="axis"?"independent":co(this.spec)&&e==="x"||fy(this.spec)&&e==="y"?"shared":"independent"}#e(){const e=this.spec;let n;return pc(e)?n=e.concat:co(e)?n=e.vconcat:n=e.hconcat,{specs:n,insertAt:(i,r)=>{n.splice(i,0,r)},removeAt:i=>{n.splice(i,1)}}}#t(){return new oy(this,{getChildSpecs:this.#e.bind(this),insertView:(e,n)=>this.insertChildViewAt(e,n),removeView:e=>super.removeChildAt(e),prepareView:async(e,n,i)=>{await i.createAxes(),await this.syncSharedAxes()},afterRemove:async()=>{await this.syncSharedAxes()},defaultName:()=>this.getNextAutoName("grid")})}}const Ty="viewRoot";class RM{#e=new Map;constructor(e={}){this.options={allowImport:!0,wrapRoot:!0,...e};const n=i=>(r,s,o,a,l)=>new i(r,s,o,a,l);this.addViewType(nh,n(Bi)),this.addViewType(eh,((i,r,s,o,a)=>new Bi(_6(i),r,s,o,a))),this.addViewType(th,n(Je)),this.addViewType(co,n(lh)),this.addViewType(fy,n(lh)),this.addViewType(pc,n(lh))}addViewType(e,n){this.#e.set(e,n)}createView(e,n,i,r,s){for(const[o,a]of this.#e)if(o(e))return a(e,n,i,r,s);throw NM(e)?new Error("SampleView is not supported by the @genome-spy/core package. Use @genome-spy/app instead!"):new Error("Invalid spec, cannot figure out the view type from the properties: "+JSON.stringify([...Object.keys(e)]))}isViewSpec(e){const n=[...this.#e.keys()].filter(i=>i(e));if(n.length>1)throw new Error("Ambiguous spec. Cannot create a view!");return n.length==1}async createOrImportView(e,n,i,r,s,o){let a;const l=uy(e)?e.name??null:void 0;if(uy(e)){let h;if("url"in e.import)if(this.options.allowImport)h=await lF(e,r.getBaseUrl(),n);else throw new Ye("Importing views is not allowed!",i);else if("template"in e.import)h=Py(e.import.template,r);else throw new Error("Invalid import: "+JSON.stringify(e));o?.(h),FM(h,e),a=h}else a=e;const c=h=>h?.params?.some(A=>Zl(A)&&la(A.select).type=="interval");let u=!1;!r&&this.options.wrapRoot&&(th(a)||nh(a)||eh(a)||c(a))&&s===Ty&&(a={name:"implicitRoot",vconcat:[a]},u=!0);const f=this.createView(a,n,i,r,s);return l!==void 0&&S6(f,l),u&&hn(f),f instanceof ao&&await f.initializeChildren(),f.registerStepSizeInvalidation(),f}}function Py(t,e){const n=e.spec?.templates?.[t];if(n)return structuredClone(n);if(e.dataParent)return Py(t,e.dataParent);throw new Error(`Cannot find template "${t}" in current view or its ancestors!`)}function FM(t,e){e.name!=null&&(t.name=e.name),e.visible!=null&&(t.visible=e.visible);const n=be(e.params)?e.params:Ge(e.params)?Object.entries(e.params).map(([i,r])=>({name:i,value:r})):[];if(n.length){t.params??=[];for(const i of n){const r=t.params.findIndex(s=>s.name==i.name);r>=0&&(t.params[r]=i)}for(const i of n)t.params.some(r=>r.name==i.name)||t.params.push(i)}}function NM(t){return"samples"in t&&Ge(t.samples)&&"spec"in t&&Ge(t.spec)}class MM{constructor(e,n){this.animator=e,this.disabled=!!n,this.maxDistance=500,this.callback=null,this.targetValue=0,this.lastValue=0,this.smoother=Xf(e,i=>{const r=i.x-this.lastValue;this.lastValue=i.x,this.callback?.(r)},40,.1,{x:0})}cancel(){this.lastValue!==this.targetValue&&(this.targetValue=RA([this.lastValue,this.targetValue],.3),this.smoother({x:this.targetValue}))}setMomentum(e,n){if(this.disabled){n(e);return}this.callback=n;const i=sr(this.targetValue+e-this.lastValue,-this.maxDistance,this.maxDistance);this.targetValue=this.lastValue+i,this.smoother({x:this.targetValue})}}function TM(t){const e={},n=["string","number","boolean"],i=["wheelDelta","wheelDeltaX","wheelDeltaY"];for(const r in t){const s=r;!i.includes(r)&&n.includes(typeof t[s])&&(e[s]=t[s])}return e}class PM{#e;#t;#n;#i;#r;#o;#s;#c;#a;#l;#u;#f;constructor({viewRoot:e,glHelper:n,tooltip:i,animator:r,emitEvent:s,tooltipHandlers:o,renderPickingFramebuffer:a,getDevicePixelRatio:l}){this.#e=e,this.#t=n,this.#n=i,this.#i=r,this.#r=s,this.#o=o,this.#s=a,this.#c=l,this.#a=void 0,this.#l=new MM(this.#i),this.#u=void 0,this.#f=!1}getCurrentHover(){return this.#a}registerInteractionEvents(){const e=this.#t.canvas;let n=performance.now(),i=!1,r;const s=(h,A)=>{const d=new j6(h,A);return this.#e.propagateInteractionEvent(d),this.#f||this.#n.clear(),d},o=h=>{const A=performance.now(),d=A-n<200;if(h instanceof MouseEvent){const g=e.getBoundingClientRect(),m=new Ze(h.clientX-g.left-e.clientLeft,h.clientY-g.top-e.clientTop);h.type=="mousemove"&&!d&&(this.#n.handleMouseMove(h),this.#f=!1,h.buttons==0&&!by()&&(this.#s(),this.#A(m.x,m.y)));const p=w=>{s(m,w)};if(h.type!="wheel"&&this.#l.cancel(),(h.type=="mousedown"||h.type=="mouseup")&&!by())this.#s();else if(h.type=="wheel"){n=A,this.#f=!1;const w=h;if(Math.abs(w.deltaX)>Math.abs(w.deltaY))this.#a=null,this.#l.cancel();else if(s(m,{type:"wheelclaimprobe"}).wheelClaimed){const y=TM(w);this.#l.setMomentum(w.deltaY*(w.deltaMode?80:1),I=>{const x=new WheelEvent("wheel",{...y,deltaMode:0,deltaX:0,deltaY:I});p(x)}),w.preventDefault();return}else this.#l.cancel()}if(h.type=="click"){if(i)return;const w=this.#a?{type:h.type,viewPath:this.#a.mark.unitView.getLayoutAncestors().map(C=>C.name).reverse(),datum:this.#a.datum}:{type:h.type,viewPath:null,datum:null};this.#r("click",w)}(h.type!="click"||this.#u?.subtract(Ze.fromMouseEvent(h)).length<3)&&p(h)}};["mousedown","mouseup","wheel","click","mousemove","contextmenu","dblclick"].forEach(h=>e.addEventListener(h,o));const a=(h,A)=>{const d=e.getBoundingClientRect();return new Ze(h-d.left-e.clientLeft,A-d.top-e.clientTop)},l=h=>{if(h.length<=0)return;const A=h[0];if(h.length===1)return{pointerCount:1,centerX:A.clientX,centerY:A.clientY,distance:0};const d=h[1];return{pointerCount:2,centerX:(A.clientX+d.clientX)/2,centerY:(A.clientY+d.clientY)/2,distance:LM(A,d)}},c=(h,A,d,g,m,p,w)=>{const C=a(h,A);s(C,{type:"touchgesture",phase:d,pointerCount:g,xDelta:m,yDelta:p,zDelta:w})},u=h=>{h.preventDefault(),this.#l.cancel(),this.#f=!1;const A=l(h.touches);if(!A){r=void 0;return}if(!r||r.pointerCount!==A.pointerCount){r=A;return}const d=A.centerX-r.centerX,g=A.centerY-r.centerY,m=A.pointerCount===2?OM(r.distance,A.distance):0;(d!==0||g!==0||m!==0)&&Number.isFinite(d)&&Number.isFinite(g)&&Number.isFinite(m)&&c(r.centerX,r.centerY,"move",A.pointerCount,d,g,m),r=A},f=h=>{h.preventDefault(),this.#f=!1,r&&h.touches.length===0&&c(r.centerX,r.centerY,"end",r.pointerCount,0,0,0),r=l(h.touches)};e.addEventListener("touchstart",u,{passive:!1}),e.addEventListener("touchmove",u,{passive:!1}),e.addEventListener("touchend",f,{passive:!1}),e.addEventListener("touchcancel",f,{passive:!1}),e.addEventListener("mousedown",h=>{this.#u=Ze.fromMouseEvent(h),this.#n.sticky?(this.#n.sticky=!1,this.#n.clear(),i=!0):i=!1;const A=()=>{document.addEventListener("mouseup",()=>this.#n.popEnabledState(),{once:!0}),this.#n.pushEnabledState(!1)};if(h.button==2||h.shiftKey||h.ctrlKey||h.metaKey)A();else if(this.#n.visible){const d=setTimeout(()=>{i=!0,this.#n.sticky=!0},400),g=()=>clearTimeout(d);document.addEventListener("mouseup",g,{once:!0}),document.addEventListener("mousemove",g,{once:!0})}}),e.addEventListener("dragstart",h=>h.stopPropagation()),e.addEventListener("mouseout",()=>{this.#n.clear(),this.#a=null})}#A(e,n){const i=this.#c(),r=Ak(this.#t.gl,this.#t._pickingBufferInfo,e*i,n*i),s=r[0]|r[1]<<8|r[2]<<16|r[3]<<24;if(s==0){this.#a=null;return}if(s!==this.#a?.uniqueId&&(this.#a=null),this.#a||this.#e.visit(o=>{if(o instanceof Je){if(o.mark.isPickingParticipant()&&[...o.facetCoords.values()].some(a=>a.containsPoint(e,n))){const a=o.getCollector().findDatumByUniqueId(s);a&&(this.#a={mark:o.mark,datum:a,uniqueId:s})}if(this.#a)return pr}}),this.#a){const o=this.#a.mark;this.updateTooltip(this.#a.datum,async a=>{if(!o.isPickingParticipant())return;const l=o.properties.tooltip;if(l!==null){const c=l?.handler??"default",u=this.#o[c];if(!u)throw new Error("No such tooltip handler: "+c);const f=Jw(a,o,l?.params);return u(a,o,l?.params,f)}})}}updateTooltip(e,n){if(!this.#f||!e)this.#n.updateWithDatum(e,n),this.#f=!0;else throw new Error("Tooltip has already been updated! Duplicate event handler?")}}function LM(t,e){const n=e.clientX-t.clientX,i=e.clientY-t.clientY;return Math.hypot(n,i)}function OM(t,e){return t<=0||e<=0?0:Math.log2(t/e)}class Ly{constructor(e){this.globalOptions=e}pushView(e,n){}popView(e){}renderMark(e,n){}getDevicePixelRatio(){return 1}}class uh extends Ly{#e=[0,0,0,0];#t;#n=[];#i;#r;#o=new Set;#s=void 0;#c=1;#a={width:0,height:0};constructor(e,n){if(super(e),this.#r=n.webGLHelper,this.#i=n.framebufferInfo,this.#c=n.devicePixelRatio,this.#a=n.canvasSize,n.clearColor){const i=Ln(n.clearColor).rgb();this.#e=[i.r/255,i.g/255,i.b/255,i.opacity]}}getDevicePixelRatio(){return this.#c}pushView(e,n){this.#o.add(e),this.#s=n}renderMark(e,n){if(this.globalOptions.picking&&!e.isPickingParticipant())return;const i=e.render(n);i&&this.#n.push({mark:e,callback:i,coords:this.#s,clipRect:n.clipRect})}render(){if(this.#t||this.#l(),this.#t.length==0)return;const e=this.#r.gl,n=this.#i;n?(e.bindFramebuffer(e.FRAMEBUFFER,n.framebuffer),e.viewport(0,0,n.width,n.height)):e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),e.disable(e.SCISSOR_TEST),e.clearColor(...this.#e),e.clear(e.COLOR_BUFFER_BIT);for(const i of this.#o)i.onBeforeRender();for(const i of this.#t)i();this.#i&&e.bindFramebuffer(e.FRAMEBUFFER,null)}#l(){this.#t=[];let e=!0,n=!0;const i=o=>()=>{e&&o()},r=o=>()=>{e&&n&&o()},s=Go(this.#n.reverse(),o=>o.mark);for(const[o,a]of[...s.entries()].reverse()){if(!o.isReady())continue;this.#t.push(()=>{e=o.unitView.getEffectiveOpacity()>0}),this.#t.push(...o.prepareRender(this.globalOptions).map(c=>i(c)));let l;for(const c of a){const u=c.coords;u.equals(l)||this.#t.push(i(()=>{n=o.setViewport(this.#a,this.#c,u,c.clipRect)})),this.#t.push(r(c.callback)),l=c.coords}}}}class UM extends Ly{constructor(...e){super({}),this.contexts=e}pushView(e,n){for(const i of this.contexts)i.pushView(e,n)}popView(e){for(const n of this.contexts)n.popView(e)}renderMark(e,n){for(const i of this.contexts)i.renderMark(e,n)}}class _M{#e;#t;#n;#i;#r;#o;#s;#c;constructor({viewRoot:e,glHelper:n,getBackground:i,broadcast:r,onLayoutComputed:s}){this.#e=e,this.#t=n,this.#n=i,this.#i=r,this.#r=s,this.#o=void 0,this.#s=void 0,this.#c=!1}computeLayout(){const e=this.#e;if(!e)return;this.#i("layout");const n=this.#t.getLogicalCanvasSize();if(isNaN(n.width)||isNaN(n.height)){console.log(`NaN in canvas size: ${n.width}x${n.height}. Skipping computeLayout().`);return}const i={webGLHelper:this.#t,canvasSize:n,devicePixelRatio:this.#t.getDevicePixelRatio(n)};this.#o=new uh({picking:!1},{...i,clearColor:this.#n()}),this.#s=new uh({picking:!0},{...i,framebufferInfo:this.#t._pickingBufferInfo}),e.render(new UM(this.#o,this.#s),Se.create(0,0,n.width,n.height)),this.#r(),this.#i("layoutComputed")}renderAll(){this.#o?.render(),this.#c=!0}renderPickingFramebuffer(){this.#c&&(this.#s.render(),this.#c=!1)}}function zM(t){const e=o=>{throw new Error("ViewContext."+o+" is not configured.")},n={dataFlow:t.dataFlow??e("dataFlow"),glHelper:t.glHelper??e("glHelper"),animator:t.animator??e("animator"),genomeStore:t.genomeStore,fontManager:t.fontManager??e("fontManager"),createOrImportView:async function(o,a,l,c,u){const f=t.createOrImportViewWithContext;return f?f(n,o,a,l,c,u):Promise.reject(new Error("ViewContext.createOrImportView is not configured."))}},i=["requestLayoutReflow","updateTooltip","getNamedDataFromProvider","getCurrentHover","addKeyboardListener","addBroadcastListener","removeBroadcastListener","highlightView","isViewConfiguredVisible","isViewSpec"],r=t,s=n;for(const o of i)s[o]=r[o]??(()=>e(o));return n}function GM({glHelper:t,viewRoot:e,logicalWidth:n,logicalHeight:i,devicePixelRatio:r,clearColor:s="white"}){n??=t.getLogicalCanvasSize().width,i??=t.getLogicalCanvasSize().height,r??=window.devicePixelRatio??1;const o=t.gl,a=Math.floor(n*r),l=Math.floor(i*r),c=xg(o,[{format:o.RGBA,type:o.UNSIGNED_BYTE,minMag:o.LINEAR,wrap:o.CLAMP_TO_EDGE}],a,l),u=new uh({picking:!1},{webGLHelper:t,canvasSize:{width:n,height:i},devicePixelRatio:r,clearColor:s,framebufferInfo:c});return e.render(u,Se.create(0,0,n,i)),u.render(),dk(o,c,"image/png")}async function HM(){const{parquetReadObjects:t}=await Promise.resolve().then(()=>f7);return t}async function Oy(t){const e=await HM(),n=t instanceof Uint8Array?t.buffer:t;return await e({file:n})}Oy.responseType="arrayBuffer";const YM=/^\s*$/,VM=/^\s*(?:browser\b|track\b|#)/;let Uy;async function JM(){return Uy??=Promise.resolve().then(()=>SC).then(t=>t.default),Uy}async function qM(t){const e=await JM(),n=new e;let i=!1;const r=[],s=t.split(/\r?\n/);for(let o=0;o<s.length;o++){const a=s[o];if(a.length!=0){if(!i){if(YM.test(a)||VM.test(a))continue;i=!0}try{r.push(n.parseLine(a))}catch(l){throw new Error(`Cannot parse BED line ${o+1}: ${l.message}`)}}}return r}const _y=/^\s*$/,KM=/^\s*(?:browser\b|track\b|#)/,zy=["chrom1","start1","end1","chrom2","start2","end2","name","score","strand1","strand2"],lo=zy.slice(0,6),Gy=t=>t,fh=t=>t=="."?null:t,Hy=t=>t=="+"?1:t=="-"?-1:0,yc=t=>{if(t=="."||t=="-1"||t=="")return null;const e=Number(t);return Number.isInteger(e)?e:null},jM={chrom1:fh,chrom2:fh,name:fh,strand1:Hy,strand2:Hy,start1:yc,end1:yc,start2:yc,end2:yc,score:t=>{if(t=="."||t=="")return null;const e=Number(t);return Number.isNaN(e)?t:e}};function WM(t){if(t.length<lo.length)return!1;for(let e=0;e<lo.length;e++)if(t[e]!=lo[e])return!1;return!0}function XM(t,e={}){const n=t.split(/\r?\n/),i=e.columns;let r=!1,s=!1,o=0;const a=[],l=[],c=[];for(const u of n){if(o++,u.length==0)continue;if(!r){if(_y.test(u)||KM.test(u))continue;r=!0}if(_y.test(u))continue;const f=u.split(" ");if(!s){const A=i||(WM(f)?f:zy);for(const d of A)a.push(d),l.push(jM[d]??Gy);if(s=!0,!i&&A==f)continue}for(;a.length<f.length;)a.push("field"+(a.length+1)),l.push(Gy);if(f.length<lo.length)throw new Error(`BEDPE line ${o} has ${f.length} columns, expected at least ${lo.length}.`);const h={};for(let A=0;A<f.length;A++){const d=a[A];h[d]=l[A](f[A])}c.push(h)}return c}function ZM(t){if(t.genome&&t.genomes)throw new Error("Do not mix deprecated `genome` with `genomes`. Use only `genomes` and `assembly`.");if(t.genome&&t.assembly)throw new Error("Do not mix deprecated `genome` with root `assembly`. Use `genomes` and `assembly`.");if(t.genome){const{name:i,...r}=t.genome;return{genomesByName:new Map([[i,r]]),defaultAssembly:i,deprecationWarning:$M()}}const e=new Map;for(const[i,r]of Object.entries(t.genomes??{}))e.set(i,r??{});let n=t.assembly;if(!n&&e.size===1&&(n=e.keys().next().value),n&&!e.has(n)&&!eT(n))throw new Error(`Root assembly "${n}" is neither defined in \`genomes\` nor a built-in assembly.`);return{genomesByName:e,defaultAssembly:n,deprecationWarning:void 0}}function $M(){return'Root `genome` is deprecated and will be removed in a future version. Use root `genomes` and `assembly` instead. Built-in migration example: {"genome":{"name":"hg38"}} -> {"assembly":"hg38"}.'}function eT(t){try{return wm(t),!0}catch{return!1}}function tT(t,e,n){const i=iT(t,n);if(!i.size)return!0;for(const r of i)if(!rT(r))return!1;return!0}function nT(t,e,n,i,r){const s=r??(o=>o.isConfiguredVisible());return new Promise((o,a)=>{const l=new Set,c=new Set,u=()=>{A(),h()},f=()=>{for(const g of l)g();l.clear(),t.removeBroadcastListener("subtreeDataReady",u),i&&i.removeEventListener("abort",d)},h=()=>{tT(e,n,s)&&(f(),o())},A=()=>{e.visit(g=>{if(!(g instanceof Je)||!s(g))return;const m=g.flowHandle?.collector;m&&(c.has(m)||(c.add(m),l.add(m.observe(h))))})},d=()=>{f(),a(new Error("Lazy subtree readiness was aborted."))};if(A(),h(),t.addBroadcastListener("subtreeDataReady",u),i){if(i.aborted){d();return}i.addEventListener("abort",d,{once:!0})}})}function iT(t,e){const n=e??(r=>r.isConfiguredVisible()),i=new Set;return t.visit(r=>{if(!(r instanceof Je)||!n(r))return;let s=r;for(;s&&!(s.flowHandle&&s.flowHandle.dataSource);)s=s.dataParent;if(!s||!s.flowHandle)return;const o=s.flowHandle.dataSource;o instanceof hc&&i.add(o)}),i}function rT(t,e){const n={[t.channel]:Array.from(t.scaleResolution.getDomain())};return t.isDataReadyForDomain(n)}ci("fasta",a6),ci("parquet",Oy),ci("bed",qM),ci("bedpe",XM);class Yy{#e=[];#t;#n;#i;#r;#o;#s;#c=new pv;#a=new Vd;#l=new Vd;constructor(e,n,i={}){this.container=e,this.options=i,i.inputBindingContainer??="default",this.spec=n,this.viewFactory=new RM,this.namedDataProviders=[],this.animator=new $N(()=>this.renderAll()),this.genomeStore=void 0,this.viewVisibilityPredicate=r=>r.isVisibleInSpec(),this.tooltipHandlers={default:v6,refseqgene:l6,...i.tooltipHandlers??{}},this.viewRoot=void 0,this.#r=new Nv(e,i),this.dpr=window.devicePixelRatio}get#u(){return this.container.querySelector(".canvas-wrapper")}#f(){this.#r.initialize(this.viewRoot)}registerNamedDataProvider(e){this.namedDataProviders.unshift(e)}getNamedDataFromProvider(e){for(const n of this.namedDataProviders){const i=n(e);if(i)return i}}updateNamedData(e,n){const i=this.viewRoot.context.dataFlow.findNamedDataSource(e);if(!i)throw new Error("No such named data source: "+e);i.dataSource.updateDynamicData(n),this.animator.requestRender()}addEventListener(e,n){this.#a.add(e,n)}removeEventListener(e,n){this.#a.remove(e,n)}broadcast(e,n){const i={type:e,payload:n};this.viewRoot.visit(r=>r.handleBroadcast(i)),this.#l.emit(e,i)}#A(){this.dpr=this.#s.getDevicePixelRatio();const e=this.viewRoot.paramRuntime.allocateSetter("devicePixelRatio",this.dpr),n=()=>{this.#s.invalidateSize(),this.dpr=this.#s.getDevicePixelRatio(),e(this.dpr),this.computeLayout(),this.renderAll()};if(this.viewRoot.getSize().isGrowing()){const s=new ResizeObserver(n);s.observe(this.container),this.#e.push(()=>s.disconnect())}let i=null;const r=()=>{i!=null&&(i(),n());const s=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);s.addEventListener("change",r),i=()=>{s.removeEventListener("change",r)}};r(),i&&this.#e.push(i)}#g(){const{canvasWrapper:e,loadingIndicatorsElement:n,tooltip:i}=cv(this.container);this.#s=new uk(e,()=>this.viewRoot?uF(this.viewRoot):{width:void 0,height:void 0},{powerPreference:this.options.powerPreference??"default"}),e.appendChild(n),this.tooltip=i,this.#i=new Yd,this.#n=new dv(n,this.#i)}destroy(){const e=this.#u;for(this.container.classList.remove("genome-spy"),e.classList.remove("loading"),this.#c.removeAll(),this.#e.forEach(n=>n()),this.#s.finalize(),this.#r.remove(),this.#n.destroy();this.container.firstChild;)this.container.firstChild.remove()}async#h(){await this.#d();const e=this.#p();await this.#m(e),await KN(this.viewRoot,e.dataFlow,e.fontManager,n=>this.broadcast("dataFlowBuilt",n)),this.#w(e)}async#d(){this.genomeStore=new e6(this.spec.baseUrl);const{genomesByName:e,defaultAssembly:n,deprecationWarning:i}=ZM(this.spec);this.genomeStore.configureGenomes(e,n),i&&console.warn(i)}#p(){const e=new Tw;return e.loadingStatusRegistry=this.#i,zM({dataFlow:e,glHelper:this.#s,animator:this.animator,genomeStore:this.genomeStore,fontManager:new r6(this.#s),updateTooltip:this.updateTooltip.bind(this),getNamedDataFromProvider:this.getNamedDataFromProvider.bind(this),getCurrentHover:()=>this.#o.getCurrentHover(),addKeyboardListener:(n,i)=>{this.#c.add(n,r=>{this.#y(n,r)&&i(r)})},addBroadcastListener:(n,i)=>this.#l.add(n,i),removeBroadcastListener:(n,i)=>this.#l.remove(n,i),isViewConfiguredVisible:this.viewVisibilityPredicate,isViewSpec:n=>this.viewFactory.isViewSpec(n),createOrImportViewWithContext:(n,i,r,s,o,a)=>this.viewFactory.createOrImportView(i,n,r,s,o,a),highlightView:gv(this.container)})}#y(e,n){if(e==="keyup")return!0;const i=document.activeElement;return i&&i!==document.body?this.container.contains(i):this.container.matches(":hover")}async#m(e){const n=this.spec;n.datasets&&this.registerNamedDataProvider(i=>n.datasets[i]),this.viewRoot=await e.createOrImportView(n,null,null,Ty),await sy(this.viewRoot,this.genomeStore),this.#i.set(this.viewRoot,"loading"),this.#u.style.flexGrow=this.viewRoot.getSize().height.grow>0?"1":"0",this.#f(),B6(this.viewRoot),ey(this.viewRoot),this.#C(),this.#s.invalidateSize(),this.#t=new _M({viewRoot:this.viewRoot,glHelper:this.#s,getBackground:()=>this.spec.background,broadcast:this.broadcast.bind(this),onLayoutComputed:()=>this.#n.updateLayout()}),e.requestLayoutReflow=this.computeLayout.bind(this),this.#A()}#C(){const e=Q6(this.viewRoot);if(e.length)for(const n of e)console.warn("Selector constraints warning:",n.message)}#w(e){e.requestLayoutReflow=this.computeLayout.bind(this),this.viewRoot.visit(n=>Vs(n,"size")),this.#s.invalidateSize(),this.#o=new PM({viewRoot:this.viewRoot,glHelper:this.#s,tooltip:this.tooltip,animator:this.animator,emitEvent:this.#a.emit.bind(this.#a),tooltipHandlers:this.tooltipHandlers,renderPickingFramebuffer:this.renderPickingFramebuffer.bind(this),getDevicePixelRatio:()=>this.dpr})}async launch(){let e=!1;try{return this.#g(),await this.#h(),this.#o.registerInteractionEvents(),this.computeLayout(),this.animator.requestRender(),e=!0,!0}catch(n){const i=`${n.view?`At "${n.view.getPathString()}": `:""}${n.toString()}`;return console.error(n.stack),this.options.onError?.(n,this.container)||lv(this.container,i),this.viewRoot&&this.#i.set(this.viewRoot,"error",i),!1}finally{this.#u.classList.remove("loading"),e&&this.viewRoot&&this.#i.set(this.viewRoot,"complete")}}async initializeVisibleViewData(){this.viewRoot&&(await jN(this.viewRoot,this.viewRoot.context.dataFlow,this.viewRoot.context.fontManager),this.viewRoot._invalidateCacheByPrefix("size","progeny"),this.#s.invalidateSize(),this.computeLayout(),this.animator.requestRender())}async awaitVisibleLazyData(e){this.viewRoot&&await nT(this.viewRoot.context,this.viewRoot,void 0,e,n=>n.isConfiguredVisible()&&sT(n))}updateTooltip(e,n){this.#o.updateTooltip(e,n)}exportCanvas(e,n,i,r="white"){const s=GM({glHelper:this.#s,viewRoot:this.viewRoot,logicalWidth:e,logicalHeight:n,devicePixelRatio:i,clearColor:r});return this.computeLayout(),this.renderAll(),s}getLogicalCanvasSize(){return this.#s.getLogicalCanvasSize()}getRenderedBounds(){const e={width:void 0,height:void 0};return this.viewRoot.visit(n=>{for(const i of n.facetCoords.values())e.width=Math.max(e.width??0,i.x2),e.height=Math.max(e.height??0,i.y2)}),e}computeLayout(){this.#t.computeLayout()}renderAll(){this.#t.renderAll()}renderPickingFramebuffer(){this.#t.renderPickingFramebuffer()}getSearchableViews(){const e=[];return this.viewRoot.visit(n=>{n instanceof Je&&n.getSearchAccessors().length>0&&e.push(n)}),e}getNamedScaleResolutions(){const e=new Map;return this.viewRoot.visit(n=>{for(const i of Object.values(n.resolutions.scale))i.name&&e.set(i.name,i)}),e}}function sT(t){let e=t;for(;e;){const n=e.flowHandle?.dataSource;if(n)return n instanceof mr;e=e.dataParent}return!1}const oT="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",aT="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",cT=[["/docs/examples/","/docs/examples/"],["/examples/core/","/examples/"],["/examples/docs/","/examples/"],["/examples/app/","/examples/"]],lT=/^(?:[a-z]+:)?\/\//i,Vy="https://example.invalid";function Jy(t){return lT.test(t)?"external":t.startsWith("/")?"root":"relative"}function uT(t){const e=new URL(t,Vy),n=cT.find(([i])=>e.pathname.startsWith(i));if(n)return qy(n[1],e,Jy(t))}function fT(t){const e=uT(t);if(e)return e;const n=new URL(t,Vy),i=new URL("./",n);return qy(i.pathname,n,Jy(t))}function qy(t,e,n){return n==="external"?e.origin+t:n==="root"?t:t.slice(1)}async function hT(t,e,n={}){let i;if(le(t)){if(i=document.querySelector(t),!i)throw new Error(`No such element: ${t}`)}else if(t instanceof HTMLElement)i=t;else throw new Error(`Invalid element: ${t}`);let r;try{const s=Ge(e)?e:await Ky(e);if(s.baseUrl??="",s.width??="container",s.padding??=10,i==document.body){const o=document.createElement("div");o.style.position="fixed",o.style.inset="0",o.style.overflow="hidden",i.appendChild(o),i=o}r=new Yy(i,s,n),AT(r,n),await r.launch()}catch(s){i.innerText=s.toString(),console.error(s)}return{finalize(){for(r.destroy();i.firstChild;)i.firstChild.remove()},addEventListener(s,o){r.addEventListener(s,o)},removeEventListener(s,o){r.removeEventListener(s,o)},getScaleResolutionByName(s){return r.getNamedScaleResolutions().get(s)},awaitVisibleLazyData:r.awaitVisibleLazyData.bind(r),getRenderedBounds:r.getRenderedBounds.bind(r),updateNamedData:r.updateNamedData.bind(r),getLogicalCanvasSize:r.getLogicalCanvasSize.bind(r),exportCanvas:r.exportCanvas.bind(r)}}function AT(t,e){e.namedDataProvider&&t.registerNamedDataProvider(e.namedDataProvider)}async function Ky(t){let e;try{e=await gw(t)}catch(n){throw new Error(`Could not load or parse configuration: ${t}, reason: ${n.message}`)}return e.baseUrl||(e.baseUrl=fT(t)),e}class dT{constructor(e){this.blob=e}async read(e,n=0){if(!e)return new Uint8Array(0);const i=n,r=i+e,s=this.blob.slice(i,r);return s.bytes?s.bytes():new Uint8Array(await s.arrayBuffer())}async readFile(e){const n=typeof e=="string"?e:e?.encoding;if(n==="utf8")return this.blob.text();if(n)throw new Error(`unsupported encoding: ${n}`);return this.blob.bytes?this.blob.bytes():new Uint8Array(await this.blob.arrayBuffer())}async stat(){return{size:this.blob.size}}async close(){}}function gT(t){return(typeof t=="object"&&t!==null&&"message"in t?t.message:`${t}`).replace(/\.$/,"")}class Vt{constructor(e,n={}){this.baseOverrides={},this.url=e;const i=n.fetch||globalThis.fetch.bind(globalThis);n.overrides&&(this.baseOverrides=n.overrides),this.fetchImplementation=i}async fetch(e,n){const i=s=>new Error(`${gT(s)} fetching ${e}`,{cause:s});let r;try{r=await this.fetchImplementation(e,n)}catch(s){if(`${s}`.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(o){throw i(o)}}else throw i(s)}return r}async read(e,n,i={}){if(e===0)return new Uint8Array(0);const{headers:r={},signal:s,overrides:o={}}=i;e<1/0?r.range=`bytes=${n}-${n+e-1}`:e===1/0&&n!==0&&(r.range=`bytes=${n}-`);const a=await this.fetch(this.url,{...this.baseOverrides,...o,headers:{...this.baseOverrides.headers,...o.headers,...r},method:"GET",redirect:"follow",mode:"cors",signal:s});if(!a.ok)throw new Error(`HTTP ${a.status} fetching ${this.url}`);if(a.status===200&&n===0||a.status===206){const l=a.headers.get("content-range"),c=/\/(\d+)$/.exec(l||"");c?.[1]&&(this._stat={size:parseInt(c[1],10)});const u=a.bytes?await a.bytes():new Uint8Array(await a.arrayBuffer());return u.byteLength<=e?u:u.subarray(0,e)}throw new Error(a.status===200?`${this.url} fetch returned status 200, expected 206`:`HTTP ${a.status} fetching ${this.url}`)}async readFile(e={}){let n,i;if(typeof e=="string")n=e,i={};else{n=e.encoding;const{encoding:l,...c}=e;i=c}const{headers:r={},signal:s,overrides:o={}}=i,a=await this.fetch(this.url,{...this.baseOverrides,...o,headers:{...this.baseOverrides.headers,...o.headers,...r},method:"GET",redirect:"follow",mode:"cors",signal:s});if(!a.ok)throw new Error(`HTTP ${a.status} fetching ${this.url}`);if(n==="utf8")return a.text();if(n)throw new Error(`unsupported encoding: ${n}`);return a.bytes?a.bytes():new Uint8Array(await a.arrayBuffer())}async stat(){if(!this._stat&&(await this.read(10,0),!this._stat))throw new Error(`unable to determine size of file at ${this.url}`);return this._stat}async close(){}}class $e{readFile(){throw new Error("unimplemented")}read(){throw new Error("unimplemented")}close(){throw new Error("unimplemented")}}const uo=Object.freeze(Object.defineProperty({__proto__:null,BlobFile:dT,LocalFile:$e,RemoteFile:Vt},Symbol.toStringTag,{value:"Module"})),jy=65536,pT=jy*jy;function hh(t,e=0){const n=t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24;return((t[e+4]|t[e+5]<<8|t[e+6]<<16|t[e+7]<<24)>>>0)*pT+(n>>>0)}const Cc=1;function Wy(t,e,n){const i=e[Cc],r=n?n[Cc]:1/0;return i<=t&&r>t?0:i<t?-1:1}class mT{filehandle;index;constructor({filehandle:e}){this.filehandle=e}_getIndex(){return this.index||(this.index=this._readIndex().catch(e=>{throw this.index=void 0,e})),this.index}async _readIndex(){const e=await this.filehandle.read(8,0),n=hh(e);if(!n)return[[0,0]];const i=new Array(n+1);i[0]=[0,0];const r=16*n;if(r>Number.MAX_SAFE_INTEGER)throw new TypeError("integer overflow");const s=await this.filehandle.read(r,8);for(let o=0;o<n;o+=1){const a=hh(s,o*16),l=hh(s,o*16+8);i[o+1]=[a,l]}return i}async getLastBlock(){return(await this._getIndex()).at(-1)}async getRelevantBlocksForRead(e,n){const i=n+e;if(e===0)return[];const r=await this._getIndex(),s=[];let o=0,a=r.length-1,l=Math.floor(r.length/2),c=Wy(n,r[l],r[l+1]);for(;c!==0;)c>0?a=l-1:c<0&&(o=l+1),l=Math.ceil((a-o)/2)+o,c=Wy(n,r[l],r[l+1]);s.push(r[l]);let u=l+1;for(;u<r.length&&(s.push(r[u]),!(r[u][Cc]>=i));u+=1);return s[s.length-1][Cc]<i&&s.push([]),s}}var Xy=0,Ah=2,bc=4,Si=0,Ec=1,wT=2,yT=-5;function CT(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function bT(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(var i in n)CT(n,i)&&(t[i]=n[i])}}return t}function Zy(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)}var fo={arraySet:function(t,e,n,i,r){if(e.subarray&&t.subarray){t.set(e.subarray(n,n+i),r);return}for(var s=0;s<i;s++)t[r+s]=e[n+s]},flattenChunks:function(t){var e,n,i,r,s,o;for(i=0,e=0,n=t.length;e<n;e++)i+=t[e].length;for(o=new Uint8Array(i),r=0,e=0,n=t.length;e<n;e++)s=t[e],o.set(s,r),r+=s.length;return o},Buf8:function(t){return new Uint8Array(t)},Buf16:function(t){return new Uint16Array(t)},Buf32:function(t){return new Int32Array(t)}},ho={arraySet:function(t,e,n,i,r){for(var s=0;s<i;s++)t[r+s]=e[n+s]},flattenChunks:function(t){return[].concat.apply([],t)},Buf8:function(t){return new Array(t)},Buf16:function(t){return new Array(t)},Buf32:function(t){return new Array(t)}};let Cr=()=>{const t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";return Cr=()=>t,t},Vn=(t,e,n,i,r)=>(Vn=Cr()?fo.arraySet:ho.arraySet,Vn(t,e,n,i,r)),dh=t=>(dh=Cr()?fo.flattenChunks:ho.flattenChunks,dh(t)),br=t=>(br=Cr()?fo.Buf8:ho.Buf8,br(t)),Er=t=>(Er=Cr()?fo.Buf16:ho.Buf16,Er(t)),Ir=t=>(Ir=Cr()?fo.Buf32:ho.Buf32,Ir(t)),$y=function(){let t=!0;try{String.fromCharCode.apply(null,[0])}catch{t=!1}return $y=()=>t,t},e1=function(){let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{t=!1}return e1=()=>t,t},gh=function(t){for(var e=br(256),n=0;n<256;n++)e[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;return e[254]=e[254]=1,gh=i=>e[i],e[t]};function t1(t){var e,n,i,r,s,o=t.length,a=0;for(r=0;r<o;r++)n=t.charCodeAt(r),(n&64512)===55296&&r+1<o&&(i=t.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(a),s=0,r=0;s<a;r++)n=t.charCodeAt(r),(n&64512)===55296&&r+1<o&&(i=t.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),n<128?e[s++]=n:n<2048?(e[s++]=192|n>>>6,e[s++]=128|n&63):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|n&63):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|n&63);return e}function ET(t,e){if(e<65534&&(t.subarray&&e1()||!t.subarray&&$y()))return String.fromCharCode.apply(null,Zy(t,e));for(var n="",i=0;i<e;i++)n+=String.fromCharCode(t[i]);return n}function IT(t){for(var e=new Uint8Array(t.length),n=0,i=e.length;n<i;n++)e[n]=t.charCodeAt(n);return e}function xT(t,e){var n,i,r,s,o=e||t.length,a=new Array(o*2);for(i=0,n=0;n<o;){if(r=t[n++],r<128){a[i++]=r;continue}if(s=gh(r),s>4){a[i++]=65533,n+=s-1;continue}for(r&=s===2?31:s===3?15:7;s>1&&n<o;)r=r<<6|t[n++]&63,s--;if(s>1){a[i++]=65533;continue}r<65536?a[i++]=r:(r-=65536,a[i++]=55296|r>>10&1023,a[i++]=56320|r&1023)}return ET(a,i)}function vT(t,e){var n;for(e=e||t.length,e>t.length&&(e=t.length),n=e-1;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+gh(t[n])>e?n:e}function BT(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}function ph(t,e,n,i){for(var r=t&65535|0,s=t>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do r=r+e[i++]|0,s=s+r|0;while(--o);r%=65521,s%=65521}return r|s<<16|0}function ST(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e}let n1=function(){const t=ST();return n1=()=>t,t};function Jt(t,e,n,i){var r=n1(),s=i+n;t^=-1;for(var o=i;o<s;o++)t=t>>>8^r[(t^e[o])&255];return t^-1}var Ic=30,DT=12;function QT(t,e){var n,i,r,s,o,a,l,c,u,f,h,A,d,g,m,p,w,C,y,I,x,E,S,D,B;n=t.state,i=t.next_in,D=t.input,r=i+(t.avail_in-5),s=t.next_out,B=t.output,o=s-(e-t.avail_out),a=s+(t.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,f=n.wnext,h=n.window,A=n.hold,d=n.bits,g=n.lencode,m=n.distcode,p=(1<<n.lenbits)-1,w=(1<<n.distbits)-1;e:do{d<15&&(A+=D[i++]<<d,d+=8,A+=D[i++]<<d,d+=8),C=g[A&p];t:for(;;){if(y=C>>>24,A>>>=y,d-=y,y=C>>>16&255,y===0)B[s++]=C&65535;else if(y&16){I=C&65535,y&=15,y&&(d<y&&(A+=D[i++]<<d,d+=8),I+=A&(1<<y)-1,A>>>=y,d-=y),d<15&&(A+=D[i++]<<d,d+=8,A+=D[i++]<<d,d+=8),C=m[A&w];n:for(;;){if(y=C>>>24,A>>>=y,d-=y,y=C>>>16&255,y&16){if(x=C&65535,y&=15,d<y&&(A+=D[i++]<<d,d+=8,d<y&&(A+=D[i++]<<d,d+=8)),x+=A&(1<<y)-1,x>l){t.msg="invalid distance too far back",n.mode=Ic;break e}if(A>>>=y,d-=y,y=s-o,x>y){if(y=x-y,y>u&&n.sane){t.msg="invalid distance too far back",n.mode=Ic;break e}if(E=0,S=h,f===0){if(E+=c-y,y<I){I-=y;do B[s++]=h[E++];while(--y);E=s-x,S=B}}else if(f<y){if(E+=c+f-y,y-=f,y<I){I-=y;do B[s++]=h[E++];while(--y);if(E=0,f<I){y=f,I-=y;do B[s++]=h[E++];while(--y);E=s-x,S=B}}}else if(E+=f-y,y<I){I-=y;do B[s++]=h[E++];while(--y);E=s-x,S=B}for(;I>2;)B[s++]=S[E++],B[s++]=S[E++],B[s++]=S[E++],I-=3;I&&(B[s++]=S[E++],I>1&&(B[s++]=S[E++]))}else{E=s-x;do B[s++]=B[E++],B[s++]=B[E++],B[s++]=B[E++],I-=3;while(I>2);I&&(B[s++]=B[E++],I>1&&(B[s++]=B[E++]))}}else if((y&64)===0){C=m[(C&65535)+(A&(1<<y)-1)];continue n}else{t.msg="invalid distance code",n.mode=Ic;break e}break}}else if((y&64)===0){C=g[(C&65535)+(A&(1<<y)-1)];continue t}else if(y&32){n.mode=DT;break e}else{t.msg="invalid literal/length code",n.mode=Ic;break e}break}}while(i<r&&s<a);I=d>>3,i-=I,d-=I<<3,A&=(1<<d)-1,t.next_in=i,t.next_out=s,t.avail_in=i<r?5+(r-i):5-(i-r),t.avail_out=s<a?257+(a-s):257-(s-a),n.hold=A,n.bits=d}var xr=15,i1=852,r1=592,s1=0,mh=1,o1=2,kT=[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],RT=[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],FT=[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],NT=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function Ao(t,e,n,i,r,s,o,a){var l=a.bits,c=0,u=0,f=0,h=0,A=0,d=0,g=0,m=0,p=0,w=0,C,y,I,x,E,S=null,D=0,B,k=Er(xr+1),F=Er(xr+1),M=null,O=0,_,H,G;for(c=0;c<=xr;c++)k[c]=0;for(u=0;u<i;u++)k[e[n+u]]++;for(A=l,h=xr;h>=1&&k[h]===0;h--);if(A>h&&(A=h),h===0)return r[s++]=1<<24|64<<16|0,r[s++]=1<<24|64<<16|0,a.bits=1,0;for(f=1;f<h&&k[f]===0;f++);for(A<f&&(A=f),m=1,c=1;c<=xr;c++)if(m<<=1,m-=k[c],m<0)return-1;if(m>0&&(t===s1||h!==1))return-1;for(F[1]=0,c=1;c<xr;c++)F[c+1]=F[c]+k[c];for(u=0;u<i;u++)e[n+u]!==0&&(o[F[e[n+u]]++]=u);if(t===s1?(S=M=o,B=19):t===mh?(S=kT,D-=257,M=RT,O-=257,B=256):(S=FT,M=NT,B=-1),w=0,u=0,c=f,E=s,d=A,g=0,I=-1,p=1<<A,x=p-1,t===mh&&p>i1||t===o1&&p>r1)return 1;for(;;){_=c-g,o[u]<B?(H=0,G=o[u]):o[u]>B?(H=M[O+o[u]],G=S[D+o[u]]):(H=96,G=0),C=1<<c-g,y=1<<d,f=y;do y-=C,r[E+(w>>g)+y]=_<<24|H<<16|G|0;while(y!==0);for(C=1<<c-1;w&C;)C>>=1;if(C!==0?(w&=C-1,w+=C):w=0,u++,--k[c]===0){if(c===h)break;c=e[n+o[u]]}if(c>A&&(w&x)!==I){for(g===0&&(g=A),E+=f,d=c-g,m=1<<d;d+g<h&&(m-=k[d+g],!(m<=0));)d++,m<<=1;if(p+=1<<d,t===mh&&p>i1||t===o1&&p>r1)return 1;I=w&x,r[I]=A<<24|d<<16|E-s|0}}return w!==0&&(r[E+w]=c-g<<24|64<<16|0),a.bits=A,0}var MT=0,a1=1,c1=2,l1=4,Di=0,TT=1,PT=2,yt=-2,u1=-3,f1=-4,LT=-5,h1=8,A1=1,d1=2,g1=3,p1=4,m1=5,w1=6,y1=7,C1=8,b1=9,E1=10,xc=11,dn=12,wh=13,I1=14,yh=15,x1=16,v1=17,B1=18,S1=19,vc=20,Bc=21,D1=22,Q1=23,k1=24,R1=25,F1=26,Ch=27,N1=28,M1=29,pe=30,T1=31,OT=32,UT=852,_T=592;function P1(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function zT(){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=Er(320),this.work=Er(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function GT(t){var e;return!t||!t.state?yt:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=A1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=Ir(UT),e.distcode=e.distdyn=Ir(_T),e.sane=1,e.back=-1,Di)}function HT(t){var e;return!t||!t.state?yt:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,GT(t))}function YT(t,e){var n,i;return!t||!t.state||(i=t.state,e<0?(n=0,e=-e):(n=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?yt:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=n,i.wbits=e,HT(t))}function VT(t,e){var n,i;return t?(i=new zT,t.state=i,i.window=null,n=YT(t,e),n!==Di&&(t.state=null),n):yt}var L1=!0,bh,Eh;function JT(t){if(L1){var e;for(bh=Ir(512),Eh=Ir(32),e=0;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(Ao(a1,t.lens,0,288,bh,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Ao(c1,t.lens,0,32,Eh,0,t.work,{bits:5}),L1=!1}t.lencode=bh,t.lenbits=9,t.distcode=Eh,t.distbits=5}function O1(t,e,n,i){var r,s=t.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=br(s.wsize)),i>=s.wsize?(Vn(s.window,e,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(r=s.wsize-s.wnext,r>i&&(r=i),Vn(s.window,e,n-i,r,s.wnext),i-=r,i?(Vn(s.window,e,n-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=r))),0}function qT(t,e){var n,i,r,s,o,a,l,c,u,f,h,A,d,g,m=0,p,w,C,y,I,x,E,S,D=br(4),B,k,F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&t.avail_in!==0)return yt;n=t.state,n.mode===dn&&(n.mode=wh),o=t.next_out,r=t.output,l=t.avail_out,s=t.next_in,i=t.input,a=t.avail_in,c=n.hold,u=n.bits,f=a,h=l,S=Di;e:for(;;)switch(n.mode){case A1:if(n.wrap===0){n.mode=wh;break}for(;u<16;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(n.wrap&2&&c===35615){n.check=0,D[0]=c&255,D[1]=c>>>8&255,n.check=Jt(n.check,D,2,0),c=0,u=0,n.mode=d1;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",n.mode=pe;break}if((c&15)!==h1){t.msg="unknown compression method",n.mode=pe;break}if(c>>>=4,u-=4,E=(c&15)+8,n.wbits===0)n.wbits=E;else if(E>n.wbits){t.msg="invalid window size",n.mode=pe;break}n.dmax=1<<E,t.adler=n.check=1,n.mode=c&512?E1:dn,c=0,u=0;break;case d1:for(;u<16;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(n.flags=c,(n.flags&255)!==h1){t.msg="unknown compression method",n.mode=pe;break}if(n.flags&57344){t.msg="unknown header flags set",n.mode=pe;break}n.head&&(n.head.text=c>>8&1),n.flags&512&&(D[0]=c&255,D[1]=c>>>8&255,n.check=Jt(n.check,D,2,0)),c=0,u=0,n.mode=g1;case g1:for(;u<32;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.head&&(n.head.time=c),n.flags&512&&(D[0]=c&255,D[1]=c>>>8&255,D[2]=c>>>16&255,D[3]=c>>>24&255,n.check=Jt(n.check,D,4,0)),c=0,u=0,n.mode=p1;case p1:for(;u<16;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&(D[0]=c&255,D[1]=c>>>8&255,n.check=Jt(n.check,D,2,0)),c=0,u=0,n.mode=m1;case m1:if(n.flags&1024){for(;u<16;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&(D[0]=c&255,D[1]=c>>>8&255,n.check=Jt(n.check,D,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=w1;case w1:if(n.flags&1024&&(A=n.length,A>a&&(A=a),A&&(n.head&&(E=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Vn(n.head.extra,i,s,A,E)),n.flags&512&&(n.check=Jt(n.check,i,A,s)),a-=A,s+=A,n.length-=A),n.length))break e;n.length=0,n.mode=y1;case y1:if(n.flags&2048){if(a===0)break e;A=0;do E=i[s+A++],n.head&&E&&n.length<65536&&(n.head.name+=String.fromCharCode(E));while(E&&A<a);if(n.flags&512&&(n.check=Jt(n.check,i,A,s)),a-=A,s+=A,E)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=C1;case C1:if(n.flags&4096){if(a===0)break e;A=0;do E=i[s+A++],n.head&&E&&n.length<65536&&(n.head.comment+=String.fromCharCode(E));while(E&&A<a);if(n.flags&512&&(n.check=Jt(n.check,i,A,s)),a-=A,s+=A,E)break e}else n.head&&(n.head.comment=null);n.mode=b1;case b1:if(n.flags&512){for(;u<16;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(c!==(n.check&65535)){t.msg="header crc mismatch",n.mode=pe;break}c=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=dn;break;case E1:for(;u<32;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}t.adler=n.check=P1(c),c=0,u=0,n.mode=xc;case xc:if(n.havedict===0)return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=u,PT;t.adler=n.check=1,n.mode=dn;case dn:case wh:if(n.last){c>>>=u&7,u-=u&7,n.mode=Ch;break}for(;u<3;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}switch(n.last=c&1,c>>>=1,u-=1,c&3){case 0:n.mode=I1;break;case 1:JT(n),n.mode=vc;break;case 2:n.mode=v1;break;case 3:t.msg="invalid block type",n.mode=pe}c>>>=2,u-=2;break;case I1:for(c>>>=u&7,u-=u&7;u<32;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){t.msg="invalid stored block lengths",n.mode=pe;break}n.length=c&65535,c=0,u=0,n.mode=yh;case yh:n.mode=x1;case x1:if(A=n.length,A){if(A>a&&(A=a),A>l&&(A=l),A===0)break e;Vn(r,i,s,A,o),a-=A,s+=A,l-=A,o+=A,n.length-=A;break}n.mode=dn;break;case v1:for(;u<14;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(n.nlen=(c&31)+257,c>>>=5,u-=5,n.ndist=(c&31)+1,c>>>=5,u-=5,n.ncode=(c&15)+4,c>>>=4,u-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=pe;break}n.have=0,n.mode=B1;case B1:for(;n.have<n.ncode;){for(;u<3;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.lens[F[n.have++]]=c&7,c>>>=3,u-=3}for(;n.have<19;)n.lens[F[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},S=Ao(MT,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,S){t.msg="invalid code lengths set",n.mode=pe;break}n.have=0,n.mode=S1;case S1:for(;n.have<n.nlen+n.ndist;){for(;m=n.lencode[c&(1<<n.lenbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=u);){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(C<16)c>>>=p,u-=p,n.lens[n.have++]=C;else{if(C===16){for(k=p+2;u<k;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(c>>>=p,u-=p,n.have===0){t.msg="invalid bit length repeat",n.mode=pe;break}E=n.lens[n.have-1],A=3+(c&3),c>>>=2,u-=2}else if(C===17){for(k=p+3;u<k;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}c>>>=p,u-=p,E=0,A=3+(c&7),c>>>=3,u-=3}else{for(k=p+7;u<k;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}c>>>=p,u-=p,E=0,A=11+(c&127),c>>>=7,u-=7}if(n.have+A>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=pe;break}for(;A--;)n.lens[n.have++]=E}}if(n.mode===pe)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=pe;break}if(n.lenbits=9,B={bits:n.lenbits},S=Ao(a1,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,S){t.msg="invalid literal/lengths set",n.mode=pe;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},S=Ao(c1,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,S){t.msg="invalid distances set",n.mode=pe;break}n.mode=vc;case vc:n.mode=Bc;case Bc:if(a>=6&&l>=258){t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=u,QT(t,h),o=t.next_out,r=t.output,l=t.avail_out,s=t.next_in,i=t.input,a=t.avail_in,c=n.hold,u=n.bits,n.mode===dn&&(n.back=-1);break}for(n.back=0;m=n.lencode[c&(1<<n.lenbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=u);){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(w&&(w&240)===0){for(y=p,I=w,x=C;m=n.lencode[x+((c&(1<<y+I)-1)>>y)],p=m>>>24,w=m>>>16&255,C=m&65535,!(y+p<=u);){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}c>>>=y,u-=y,n.back+=y}if(c>>>=p,u-=p,n.back+=p,n.length=C,w===0){n.mode=F1;break}if(w&32){n.back=-1,n.mode=dn;break}if(w&64){t.msg="invalid literal/length code",n.mode=pe;break}n.extra=w&15,n.mode=D1;case D1:if(n.extra){for(k=n.extra;u<k;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Q1;case Q1:for(;m=n.distcode[c&(1<<n.distbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=u);){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if((w&240)===0){for(y=p,I=w,x=C;m=n.distcode[x+((c&(1<<y+I)-1)>>y)],p=m>>>24,w=m>>>16&255,C=m&65535,!(y+p<=u);){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}c>>>=y,u-=y,n.back+=y}if(c>>>=p,u-=p,n.back+=p,w&64){t.msg="invalid distance code",n.mode=pe;break}n.offset=C,n.extra=w&15,n.mode=k1;case k1:if(n.extra){for(k=n.extra;u<k;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=pe;break}n.mode=R1;case R1:if(l===0)break e;if(A=h-l,n.offset>A){if(A=n.offset-A,A>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=pe;break}A>n.wnext?(A-=n.wnext,d=n.wsize-A):d=n.wnext-A,A>n.length&&(A=n.length),g=n.window}else g=r,d=o-n.offset,A=n.length;A>l&&(A=l),l-=A,n.length-=A;do r[o++]=g[d++];while(--A);n.length===0&&(n.mode=Bc);break;case F1:if(l===0)break e;r[o++]=n.length,l--,n.mode=Bc;break;case Ch:if(n.wrap){for(;u<32;){if(a===0)break e;a--,c|=i[s++]<<u,u+=8}if(h-=l,t.total_out+=h,n.total+=h,h&&(t.adler=n.check=n.flags?Jt(n.check,r,h,o-h):ph(n.check,r,h,o-h)),h=l,(n.flags?c:P1(c))!==n.check){t.msg="incorrect data check",n.mode=pe;break}c=0,u=0}n.mode=N1;case N1:if(n.wrap&&n.flags){for(;u<32;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(c!==(n.total&4294967295)){t.msg="incorrect length check",n.mode=pe;break}c=0,u=0}n.mode=M1;case M1:S=TT;break e;case pe:S=u1;break e;case T1:return f1;case OT:default:return yt}return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=u,(n.wsize||h!==t.avail_out&&n.mode<pe&&(n.mode<Ch||e!==l1))&&O1(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&&h&&(t.adler=n.check=n.flags?Jt(n.check,r,h,t.next_out-h):ph(n.check,r,h,t.next_out-h)),t.data_type=n.bits+(n.last?64:0)+(n.mode===dn?128:0)+(n.mode===vc||n.mode===yh?256:0),(f===0&&h===0||e===l1)&&S===Di&&(S=LT),S}function KT(t){if(!t||!t.state)return yt;var e=t.state;return e.window&&(e.window=null),t.state=null,Di}function jT(t,e){var n;return!t||!t.state||(n=t.state,(n.wrap&2)===0)?yt:(n.head=e,e.done=!1,Di)}function U1(t,e){var n=e.length,i,r,s;return!t||!t.state||(i=t.state,i.wrap!==0&&i.mode!==xc)?yt:i.mode===xc&&(r=1,r=ph(r,e,n,0),r!==i.check)?u1:(s=O1(t,e,n,n),s?(i.mode=T1,f1):(i.havedict=1,Di))}const Ih={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function WT(){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 xh=Object.prototype.toString;let _1=class EA{constructor(e){if(!(this instanceof EA))return new EA(e);this.options=bT({chunkSize:16384,windowBits:0,to:""},e||{});var n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(e&&e.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new WT,this.strm.avail_out=0;var i=VT(this.strm,n.windowBits);if(i!==Si)throw new Error(Ih[i]);if(this.header=new BT,jT(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=t1(n.dictionary):xh.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(i=U1(this.strm,n.dictionary),i!==Si)))throw new Error(Ih[i])}push(e,n){var i=this.strm,r=this.options.chunkSize,s=this.options.dictionary,o,a,l,c,u,f,h=!1;if(this.ended)return!1;a=n===~~n?n:n===!0?bc:Xy,typeof e=="string"?i.input=IT(e):xh.call(e)==="[object ArrayBuffer]"?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(i.avail_out===0&&(i.output=br(r),i.next_out=0,i.avail_out=r),o=qT(i,Xy),o===wT&&s&&(typeof s=="string"?f=t1(s):xh.call(s)==="[object ArrayBuffer]"?f=new Uint8Array(s):f=s,o=U1(this.strm,f)),o===yT&&h===!0&&(o=Si,h=!1),o!==Ec&&o!==Si)return this.onEnd(o),this.ended=!0,!1;i.next_out&&(i.avail_out===0||o===Ec||i.avail_in===0&&(a===bc||a===Ah))&&(this.options.to==="string"?(l=vT(i.output,i.next_out),c=i.next_out-l,u=xT(i.output,l),i.next_out=c,i.avail_out=r-c,c&&Vn(i.output,i.output,l,c,0),this.onData(u)):this.onData(Zy(i.output,i.next_out))),i.avail_in===0&&i.avail_out===0&&(h=!0)}while((i.avail_in>0||i.avail_out===0)&&o!==Ec);return o===Ec&&(a=bc),a===bc?(o=KT(this.strm),this.onEnd(o),this.ended=!0,o===Si):(a===Ah&&(this.onEnd(Si),i.avail_out=0),!0)}onData(e){this.chunks.push(e)}onEnd(e){e===Si&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=dh(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}};function XT(t,e){var n=new _1(e);if(n.push(t,!0),n.err)throw n.msg||Ih[n.err];return n.result}function ZT(t,e){return e=e||{},e.raw=!0,XT(t,e)}function $T(t){let e=0;for(const n of t)e+=n.length;return e}function z1(t,e){const n=new Uint8Array(e??$T(t));let i=0;for(const r of t)n.set(r,i),i+=r.length;return n}async function e5(t){try{let e,n=0,i;const r=[];let s=0;do{const o=t.subarray(n);if(i=new _1(void 0),{strm:e}=i,i.push(o,Ah),i.err)throw new Error(i.msg);n+=e.next_in;const a=i.result;r.push(a),s+=a.length}while(e.avail_in);return z1(r,s)}catch(e){throw/incorrect header check/.exec(`${e}`)?new Error("problem decompressing block: incorrect gzip header check"):e}}class G1{filehandle;gzi;constructor({filehandle:e,gziFilehandle:n}){this.filehandle=e,this.gzi=new mT({filehandle:n})}async _readAndUncompressBlock(e,n){let i=n;i||(i=(await this.filehandle.stat()).size);const r=i-e,s=await this.filehandle.read(r,e);return e5(s)}async read(e,n){const i=await this.gzi.getRelevantBlocksForRead(e,n),r=[];for(let s=0;s<i.length-1;s+=1){const o=await this._readAndUncompressBlock(i[s][0],i[s+1][0]),[,a]=i[s],l=a>=n?0:n-a,c=Math.min(n+e,a+o.length)-a;l>=0&&l<o.length&&r.push(o.subarray(l,c))}return z1(r)}}function H1(t,e){return t.offset+t.lineBytes*Math.floor(e/t.lineLength)+e%t.lineLength}async function t5(t,e={}){const n=new TextDecoder("utf8");return Object.fromEntries(n.decode(await t.readFile(e)).split(/\r?\n/).map(i=>i.trim()).filter(i=>!!i).map(i=>i.split(" ")).map(i=>{if(i[0]?.startsWith(">"))throw new Error("found > in sequence name, might have supplied FASTA file for the FASTA index");return[i[0],{name:i[0],length:+i[1],start:0,end:+i[1],offset:+i[2],lineLength:+i[3],lineBytes:+i[4]}]}))}class Y1{constructor({fasta:e,fai:n,path:i,faiPath:r}){if(e)this.fasta=e;else if(i)this.fasta=new $e(i);else throw new Error("Need to pass filehandle for fasta or path to localfile");if(n)this.fai=n;else if(r)this.fai=new $e(r);else if(i)this.fai=new $e(`${i}.fai`);else throw new Error("Need to pass filehandle for or path to localfile")}async _getIndexes(e){return this.indexes||(this.indexes=t5(this.fai,e).catch(n=>{throw this.indexes=void 0,n})),this.indexes}async getSequenceNames(e){return Object.keys(await this._getIndexes(e))}async getSequenceSizes(e){const n={},i=await this._getIndexes(e);for(const r of Object.values(i))n[r.name]=r.length;return n}async getSequenceSize(e,n){return(await this._getIndexes(n))[e]?.length}async hasReferenceSequence(e,n){return!!(await this._getIndexes(n))[e]}async getResiduesByName(e,n,i,r){const s=(await this._getIndexes(r))[e];return s?this._fetchFromIndexEntry(s,n,i,r):void 0}async getSequence(e,n,i,r){return this.getResiduesByName(e,n,i,r)}async _fetchFromIndexEntry(e,n=0,i,r){let s=i;if(n<0)throw new TypeError("regionStart cannot be less than 0");if((s===void 0||s>e.length)&&(s=e.length),n>=s)return"";const o=H1(e,n),a=H1(e,s)-o,c=new TextDecoder("utf8").decode(await this.fasta.read(a,o,r)).replace(/\s+/g,"");if(/[^\x20-\x7e]/.test(c.slice(0,1e3)))throw new Error("Non-ASCII characters detected in sequence. The file may be gzip compressed. Use BgzipIndexedFasta for bgzip files, or decompress the file.");return c}}class n5 extends Y1{constructor({fasta:e,path:n,fai:i,faiPath:r,gzi:s,gziPath:o}){super({fasta:e,path:n,fai:i,faiPath:r}),e&&s?this.fasta=new G1({filehandle:e,gziFilehandle:s}):n&&o&&(this.fasta=new G1({filehandle:new $e(n),gziFilehandle:new $e(o)}))}}function V1(t){return t.split(">").filter(e=>/\S/.test(e)).map(e=>{const[n,...i]=e.split(`
|
|
670
|
+
`),[r,...s]=n.split(" "),o=i.join("").replace(/\s/g,"");return{id:r,description:s.join(" "),sequence:o}})}class i5{constructor({fasta:e,path:n}){if(e)this.fasta=e;else if(n)this.fasta=new $e(n);else throw new Error("Need to pass fasta or path");this.data=this.fasta.readFile().then(i=>{const s=new TextDecoder("utf8").decode(i);return V1(s)})}async fetch(e,n,i){const s=(await this.data).find(a=>a.id===e),o=i-n;if(!s)throw new Error(`no sequence with id ${e} exists`);return s.sequence.slice(n,o)}async getSequenceNames(){return(await this.data).map(n=>n.id)}}const r5=Object.freeze(Object.defineProperty({__proto__:null,BgzipIndexedFasta:n5,FetchableSmallFasta:i5,IndexedFasta:Y1,parseSmallFasta:V1},Symbol.toStringTag,{value:"Module"})),J1=BigInt(32);function s5(t,e,n){const i=+!!n,r=+!n;return BigInt(t.getInt32(e,n)*r+t.getInt32(e+4,n)*i)<<J1|BigInt(t.getUint32(e,n)*i+t.getUint32(e+4,n)*r)}function o5(t,e,n){const i=t.getUint32(e,n),r=t.getUint32(e+4,n),s=+!!n,o=+!n;return BigInt(i*o+r*s)<<J1|BigInt(i*s+r*o)}"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(t,e){return s5(this,t,e)}),"getBigUint64"in DataView||(DataView.prototype.getBigUint64=function(t,e){return o5(this,t,e)});var vh=function(t,e){return vh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},vh(t,e)};function Bh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");vh(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function a5(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(u){try{c(i.next(u))}catch(f){o(f)}}function l(u){try{c(i.throw(u))}catch(f){o(f)}}function c(u){u.done?s(u.value):r(u.value).then(a,l)}c((i=i.apply(t,e||[])).next())})}function q1(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,r,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(u){return l([c,u])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(n=0)),n;)try{if(i=1,r&&(s=c[0]&2?r.return:c[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,c[1])).done)return s;switch(r=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,r=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){n.label=c[1];break}if(c[0]===6&&n.label<s[1]){n.label=s[1],s=c;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(c);break}s[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(u){c=[6,u],r=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function go(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Sh(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,s=[],o;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function Dh(t,e,n){if(n||arguments.length===2)for(var i=0,r=e.length,s;i<r;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))}function vr(t){return this instanceof vr?(this.v=t,this):new vr(t)}function c5(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n.apply(t,e||[]),r,s=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),r[Symbol.asyncIterator]=function(){return this},r;function o(A){return function(d){return Promise.resolve(d).then(A,f)}}function a(A,d){i[A]&&(r[A]=function(g){return new Promise(function(m,p){s.push([A,g,m,p])>1||l(A,g)})},d&&(r[A]=d(r[A])))}function l(A,d){try{c(i[A](d))}catch(g){h(s[0][3],g)}}function c(A){A.value instanceof vr?Promise.resolve(A.value.v).then(u,f):h(s[0][2],A)}function u(A){l("next",A)}function f(A){l("throw",A)}function h(A,d){A(d),s.shift(),s.length&&l(s[0][0],s[0][1])}}function l5(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 go=="function"?go(t):t[Symbol.iterator](),n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n);function i(s){n[s]=t[s]&&function(o){return new Promise(function(a,l){o=t[s](o),r(a,l,o.done,o.value)})}}function r(s,o,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},o)}}typeof SuppressedError=="function"&&SuppressedError;function Re(t){return typeof t=="function"}function K1(t){var e=function(i){Error.call(i),i.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Qh=K1(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
659
671
|
`+n.map(function(i,r){return r+1+") "+i.toString()}).join(`
|
|
660
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function gy(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var yA=(function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,i,r,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=lo(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(g){e={error:g}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}else o.remove(this);var f=this.initialTeardown;if(ke(f))try{f()}catch(g){s=g instanceof wA?g.errors:[g]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var h=lo(u),A=h.next();!A.done;A=h.next()){var d=A.value;try{my(d)}catch(g){s=s??[],g instanceof wA?s=mA(mA([],pA(s)),pA(g.errors)):s.push(g)}}}catch(g){i={error:g}}finally{try{A&&!A.done&&(r=h.return)&&r.call(h)}finally{if(i)throw i.error}}}if(s)throw new wA(s)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)my(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)&&gy(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&gy(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=(function(){var e=new t;return e.closed=!0,e})(),t})();yA.EMPTY;function py(t){return t instanceof yA||t&&"closed"in t&&ke(t.remove)&&ke(t.add)&&ke(t.unsubscribe)}function my(t){ke(t)?t():t.unsubscribe()}var OM={Promise:void 0},UM={setTimeout:function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return setTimeout.apply(void 0,mA([t,e],pA(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function wy(t){UM.setTimeout(function(){throw t})}function yy(){}function _M(t){t()}var CA=(function(t){gA(e,t);function e(n){var i=t.call(this)||this;return i.isStopped=!1,n?(i.destination=n,py(n)&&n.add(i)):i.destination=HM,i}return e.create=function(n,i,r){return new yc(n,i,r)},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})(yA),GM=(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(i){Cc(i)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(i){Cc(i)}else Cc(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Cc(n)}},t})(),yc=(function(t){gA(e,t);function e(n,i,r){var s=t.call(this)||this,o;return ke(n)||!n?o={next:n??void 0,error:i??void 0,complete:r??void 0}:o=n,s.destination=new GM(o),s}return e})(CA);function Cc(t){wy(t)}function zM(t){throw t}var HM={closed:!0,next:yy,error:zM,complete:yy},EA=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Cy(t){return t}function YM(t){return t.length===0?Cy:t.length===1?t[0]:function(n){return t.reduce(function(i,r){return r(i)},n)}}var yt=(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,i){var r=this,s=JM(e)?e:new yc(e,n,i);return _M(function(){var o=r,a=o.operator,l=o.source;s.add(a?a.call(s,l):l?r._subscribe(s):r._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var i=this;return n=Ey(n),new n(function(r,s){var o=new yc({next:function(a){try{e(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:r});i.subscribe(o)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[EA]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return YM(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Ey(e),new e(function(i,r){var s;n.subscribe(function(o){return s=o},function(o){return r(o)},function(){return i(s)})})},t.create=function(e){return new t(e)},t})();function Ey(t){var e;return(e=t??OM.Promise)!==null&&e!==void 0?e:Promise}function VM(t){return t&&ke(t.next)&&ke(t.error)&&ke(t.complete)}function JM(t){return t&&t instanceof CA||VM(t)&&py(t)}function qM(t){return ke(t?.lift)}function Cr(t){return function(e){if(qM(e))return e.lift(function(n){try{return t(n,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function fo(t,e,n,i,r){return new KM(t,e,n,i,r)}var KM=(function(t){gA(e,t);function e(n,i,r,s,o,a){var l=t.call(this,n)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=i?function(c){try{i(c)}catch(f){n.error(f)}}:t.prototype._next,l._error=s?function(c){try{s(c)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,l._complete=r?function(){try{r()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,l}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;t.prototype.unsubscribe.call(this),!i&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e})(CA),jM=new yt(function(t){return t.complete()});function WM(t){return t&&ke(t.schedule)}function Iy(t){return t[t.length-1]}function XM(t){return WM(Iy(t))?t.pop():void 0}function ZM(t,e){return typeof Iy(t)=="number"?t.pop():e}var by=(function(t){return t&&typeof t.length=="number"&&typeof t!="function"});function xy(t){return ke(t?.then)}function By(t){return ke(t[EA])}function vy(t){return Symbol.asyncIterator&&ke(t?.[Symbol.asyncIterator])}function Sy(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 $M(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Qy=$M();function Dy(t){return ke(t?.[Qy])}function ky(t){return PM(this,arguments,function(){var n,i,r,s;return hy(this,function(o){switch(o.label){case 0:n=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,yr(n.read())];case 3:return i=o.sent(),r=i.value,s=i.done,s?[4,yr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,yr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Fy(t){return ke(t?.getReader)}function Er(t){if(t instanceof yt)return t;if(t!=null){if(By(t))return eT(t);if(by(t))return tT(t);if(xy(t))return nT(t);if(vy(t))return Ry(t);if(Dy(t))return iT(t);if(Fy(t))return rT(t)}throw Sy(t)}function eT(t){return new yt(function(e){var n=t[EA]();if(ke(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function tT(t){return new yt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function nT(t){return new yt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,wy)})}function iT(t){return new yt(function(e){var n,i;try{for(var r=lo(t),s=r.next();!s.done;s=r.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(a){n={error:a}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}e.complete()})}function Ry(t){return new yt(function(e){sT(t,e).catch(function(n){return e.error(n)})})}function rT(t){return Ry(ky(t))}function sT(t,e){var n,i,r,s;return TM(this,void 0,void 0,function(){var o,a;return hy(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=LM(t),l.label=1;case 1:return[4,n.next()];case 2:if(i=l.sent(),!!i.done)return[3,4];if(o=i.value,e.next(o),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),r={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),i&&!i.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(r)throw r.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function xi(t,e,n,i,r){i===void 0&&(i=0),r===void 0&&(r=!1);var s=e.schedule(function(){n(),r?t.add(this.schedule(null,i)):this.unsubscribe()},i);if(t.add(s),!r)return s}function Ny(t,e){return e===void 0&&(e=0),Cr(function(n,i){n.subscribe(fo(i,function(r){return xi(i,t,function(){return i.next(r)},e)},function(){return xi(i,t,function(){return i.complete()},e)},function(r){return xi(i,t,function(){return i.error(r)},e)}))})}function My(t,e){return e===void 0&&(e=0),Cr(function(n,i){i.add(t.schedule(function(){return n.subscribe(i)},e))})}function oT(t,e){return Er(t).pipe(My(e),Ny(e))}function aT(t,e){return Er(t).pipe(My(e),Ny(e))}function cT(t,e){return new yt(function(n){var i=0;return e.schedule(function(){i===t.length?n.complete():(n.next(t[i++]),n.closed||this.schedule())})})}function lT(t,e){return new yt(function(n){var i;return xi(n,e,function(){i=t[Qy](),xi(n,e,function(){var r,s,o;try{r=i.next(),s=r.value,o=r.done}catch(a){n.error(a);return}o?n.complete():n.next(s)},0,!0)}),function(){return ke(i?.return)&&i.return()}})}function Ty(t,e){if(!t)throw new Error("Iterable cannot be null");return new yt(function(n){xi(n,e,function(){var i=t[Symbol.asyncIterator]();xi(n,e,function(){i.next().then(function(r){r.done?n.complete():n.next(r.value)})},0,!0)})})}function fT(t,e){return Ty(ky(t),e)}function uT(t,e){if(t!=null){if(By(t))return oT(t,e);if(by(t))return cT(t,e);if(xy(t))return aT(t,e);if(vy(t))return Ty(t,e);if(Dy(t))return lT(t,e);if(Fy(t))return fT(t,e)}throw Sy(t)}function AT(t,e){return e?uT(t,e):Er(t)}var hT=dy(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Py(t,e){return new Promise(function(n,i){var r=new yc({next:function(s){n(s),r.unsubscribe()},error:i,complete:function(){i(new hT)}});t.subscribe(r)})}function Ly(t,e){return Cr(function(n,i){var r=0;n.subscribe(fo(i,function(s){i.next(t.call(e,s,r++))}))})}function dT(t,e,n,i,r,s,o,a){var l=[],c=0,f=0,u=!1,h=function(){u&&!l.length&&!c&&e.complete()},A=function(g){return c<i?d(g):l.push(g)},d=function(g){c++;var m=!1;Er(n(g,f++)).subscribe(fo(e,function(p){e.next(p)},function(){m=!0},void 0,function(){if(m)try{c--;for(var p=function(){var w=l.shift();o||d(w)};l.length&&c<i;)p();h()}catch(w){e.error(w)}}))};return t.subscribe(fo(e,A,function(){u=!0,h()})),function(){}}function Oy(t,e,n){return n===void 0&&(n=1/0),ke(e)?Oy(function(i,r){return Ly(function(s,o){return e(i,s,r,o)})(Er(t(i,r)))},n):(typeof e=="number"&&(n=e),Cr(function(i,r){return dT(i,r,t,n)}))}function gT(t){return t===void 0&&(t=1/0),Oy(Cy,t)}function pT(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=XM(t),i=ZM(t,1/0),r=t;return r.length?r.length===1?Er(r[0]):gT(i)(AT(r,n)):jM}function mT(t,e,n,i,r){return function(s,o){var a=n,l=e,c=0;s.subscribe(fo(o,function(f){var u=c++;l=a?t(l,f,u):(a=!0,f)},(function(){a&&o.next(l),o.complete()})))}}function Uy(t,e){return Cr(mT(t,e,arguments.length>=2,!1,!0))}var wT=function(t,e){return t.push(e),t};function yT(){return Cr(function(t,e){Uy(wT,[])(t).subscribe(e)})}class CT{}class ET{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(e=new CT){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 IT{constructor(){this.callbacks=new Set}addCallback(e=()=>{}){this.callbacks.add(e),this.currentMessage&&e(this.currentMessage)}callback(e){this.currentMessage=e;for(const n of this.callbacks)n(e)}}class Ir{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,i,r){const s=new ET,o=new IT;o.addCallback(r);const a={aborter:s,promise:this.fillCallback(n,s.signal,l=>{o.callback(l)}),settled:!1,statusReporter:o,get aborted(){return this.aborter.signal.aborted}};a.aborter.addSignal(i),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(l=>{throw console.error(l),l}),this.cache.set(e,a)}static checkSinglePromise(e,n){function i(){if(n?.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return e.then(r=>(i(),r),r=>{throw i(),r})}has(e){return this.cache.has(e)}get(e,n,i,r){if(!i&&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 s=this.cache.get(e);return s?s.aborted&&!s.settled?(this.evict(e,s),this.get(e,n,i,r)):s.settled?s.promise:(s.aborter.addSignal(i),s.statusReporter.addCallback(r),Ir.checkSinglePromise(s.promise,i)):(this.fill(e,n,i,r),Ir.checkSinglePromise(this.cache.get(e).promise,i))}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 i=e.next();!i.done;i=e.next())this.delete(i.value),n+=1;return n}}function bT(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var IA,_y;function xT(){if(_y)return IA;_y=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,i){this.cache.set(n,i),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 i=this.oldCache.get(n);return this.oldCache.delete(n),this._set(n,i),i}}set(n,i){return this.cache.has(n)?this.cache.set(n,i):this._set(n,i),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 i=this.cache.delete(n);return i&&this._size--,this.oldCache.delete(n)||i}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[i]=n;this.cache.has(i)||(yield n)}}get size(){let n=0;for(const i of this.oldCache.keys())this.cache.has(i)||n++;return this._size+n}}return IA=t,IA}var BT=xT();const Gy=bT(BT);class br{ranges;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 br([{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((s,o)=>s.min<o.min?-1:s.min>o.min?1:s.max<o.max?-1:o.max>s.max?1:0),i=[];let r=n[0];for(const s of n)s.min>r.max+1?(i.push(r),r=s):s.max>r.max&&(r=new br([{min:r.min,max:s.max}]));return i.push(r),i.length===1?i[0]:new br(i)}}function vT(t){return vM(t.subarray(2),void 0)}class ST extends Error{code;constructor(e){super(e),this.code="ERR_ABORTED"}}function QT(t){t.sort((r,s)=>r.offset-s.offset);const e=[];let n,i;for(const r of t)n&&i&&r.offset-i<=2e3?(n.length=n.length+r.length-i+r.offset,n.blocks.push(r)):e.push(n={blocks:[r],length:r.length,offset:r.offset}),i=n.offset+n.length;return e}function Ec(t){if(t&&t.aborted)if(typeof DOMException>"u"){const e=new ST("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}const DT=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function bA(t,e,n,i){return t<i&&e>=n}class zy{bbi;refsByName;cirTreeOffset;isCompressed;blockType;cirTreePromise;featureCache=new Ir({cache:new Gy({maxSize:1e3}),fill:async({length:e,offset:n},i)=>this.bbi.read(e,n,{signal:i})});constructor(e,n,i,r,s){if(this.bbi=e,this.refsByName=n,this.cirTreeOffset=i,this.isCompressed=r,this.blockType=s,!(i>=0))throw new Error("invalid cirTreeOffset!")}async readWigData(e,n,i,r,s){try{const o=this.refsByName[e];o===void 0&&r.complete();const a={chrId:o,start:n,end:i};this.cirTreePromise||(this.cirTreePromise=this.bbi.read(48,this.cirTreeOffset,s));const l=await this.cirTreePromise,f=new DataView(l.buffer).getUint32(4,!0);let u=[],h=0;const A=(p,w,C)=>{try{const b=p.subarray(w),x=new DataView(b.buffer,b.byteOffset,b.length);let I=0;const S=x.getUint8(I);I+=2;const Q=x.getUint16(I,!0);if(I+=2,S===1){const v=[];for(let F=0;F<Q;F++){const R=x.getUint32(I,!0);I+=4;const M=x.getUint32(I,!0);I+=4;const O=x.getUint32(I,!0);I+=4;const z=x.getUint32(I,!0);I+=4;const _=Number(x.getBigUint64(I,!0));I+=8;const Y=Number(x.getBigUint64(I,!0));I+=8,v.push({startChrom:R,startBase:M,endBase:z,endChrom:O,blockOffset:_,blockSize:Y,offset:I})}u=u.concat(v.filter(F=>d(F)).map(F=>({offset:F.blockOffset,length:F.blockSize})))}else if(S===0){const v=[];for(let R=0;R<Q;R++){const M=x.getUint32(I,!0);I+=4;const O=x.getUint32(I,!0);I+=4;const z=x.getUint32(I,!0);I+=4;const _=x.getUint32(I,!0);I+=4;const Y=Number(x.getBigUint64(I,!0));I+=8,v.push({startChrom:M,startBase:O,endChrom:z,endBase:_,blockOffset:Y,offset:I})}const F=v.filter(R=>d(R)).map(R=>R.blockOffset);F.length>0&&m(F,C+1)}}catch(y){r.error(y)}},d=p=>{const{startChrom:w,startBase:C,endChrom:y,endBase:b}=p;return(w<o||w===o&&C<=i)&&(y>o||y===o&&b>=n)},g=async(p,w,C)=>{try{const y=w.max-w.min,b=w.min,x=await this.featureCache.get(`${y}_${b}`,{length:y,offset:b},s?.signal);for(const I of p)w.contains(I)&&(A(x,I-b,C),h-=1,h===0&&this.readFeatures(r,u,{...s,request:a}).catch(S=>{r.error(S)}))}catch(y){r.error(y)}},m=(p,w)=>{try{h+=p.length;const C=4+f*32;let y=new br([{min:p[0],max:p[0]+C}]);for(let b=1;b<p.length;b+=1){const x=new br([{min:p[b],max:p[b]+C}]);y=y.union(x)}y.getRanges().map(b=>g(p,b,w))}catch(C){r.error(C)}};m([this.cirTreeOffset+48],1);return}catch(o){r.error(o)}}parseSummaryBlock(e,n,i){const r=[];let s=n;const o=new DataView(e.buffer,e.byteOffset,e.length);for(;s<e.byteLength;){const a=o.getUint32(s,!0);s+=4;const l=o.getUint32(s,!0);s+=4;const c=o.getUint32(s,!0);s+=4;const f=o.getUint32(s,!0);s+=4;const u=o.getFloat32(s,!0);s+=4;const h=o.getFloat32(s,!0);s+=4;const A=o.getFloat32(s,!0);s+=4,s+=4,(!i||a===i.chrId&&bA(l,c,i.start,i.end))&&r.push({start:l,end:c,maxScore:h,minScore:u,summary:!0,score:A/(f||1)})}return r}parseBigBedBlock(e,n,i,r){const s=[];let o=n;const a=e,l=new DataView(a.buffer,a.byteOffset,a.length);for(;o<e.byteLength;){const c=o,f=l.getUint32(o,!0);o+=4;const u=l.getInt32(o,!0);o+=4;const h=l.getInt32(o,!0);o+=4;let A=o;for(;A<e.length&&e[A]!==0;A++);const d=e.subarray(o,A),g=DT?.decode(d)??d.toString();o=A+1,s.push({chromId:f,start:u,end:h,rest:g,uniqueId:`bb-${i+c}`})}return r?s.filter(c=>bA(c.start,c.end,r.start,r.end)):s}parseBigWigBlock(e,n,i){const r=e.subarray(n),s=new DataView(r.buffer,r.byteOffset,r.length);let o=0;o+=4;const a=s.getInt32(o,!0);o+=8;const l=s.getUint32(o,!0);o+=4;const c=s.getUint32(o,!0);o+=4;const f=s.getUint8(o);o+=2;const u=s.getUint16(o,!0);o+=2;const h=new Array(u);switch(f){case 1:{for(let A=0;A<u;A++){const d=s.getInt32(o,!0);o+=4;const g=s.getInt32(o,!0);o+=4;const m=s.getFloat32(o,!0);o+=4,h[A]={start:d,end:g,score:m}}break}case 2:{for(let A=0;A<u;A++){const d=s.getInt32(o,!0);o+=4;const g=s.getFloat32(o,!0);o+=4,h[A]={score:g,start:d,end:d+c}}break}case 3:{for(let A=0;A<u;A++){const d=s.getFloat32(o,!0);o+=4;const g=a+A*l;h[A]={score:d,start:g,end:g+c}}break}}return i?h.filter(A=>bA(A.start,A.end,i.start,i.end)):h}async readFeatures(e,n,i={}){try{const{blockType:r,isCompressed:s}=this,{signal:o,request:a}=i,l=QT(n);Ec(o),await Promise.all(l.map(async c=>{Ec(o);const{length:f,offset:u}=c,h=await this.featureCache.get(`${f}_${u}`,c,o);for(const A of c.blocks){Ec(o);let d=h.subarray(A.offset-c.offset);switch(s&&(d=vT(d)),Ec(o),r){case"summary":{e.next(this.parseSummaryBlock(d,0,a));break}case"bigwig":{e.next(this.parseBigWigBlock(d,0,a));break}case"bigbed":{e.next(this.parseBigBedBlock(d,0,A.offset*256,a));break}default:console.warn(`Don't know what to do with ${r}`)}}})),e.complete()}catch(r){e.error(r)}}}const kT=-2003829722,Hy=-2021002517;function xr(t){return new DataView(t.buffer,t.byteOffset,t.length)}class Yy{bbi;headerP;renameRefSeqs;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:i=o=>o,path:r,url:s}=e;if(this.renameRefSeqs=i,n)this.bbi=n;else if(s)this.bbi=new Yt(s);else if(r)this.bbi=new We(r);else throw new Error("no file given")}async _getHeader(e){const n=await this._getMainHeader(e),i=await this._readChromTree(n,e);return{...n,...i}}async _getMainHeader(e,n=2e3){const i=await this.bbi.read(n,0,e),r=xr(i),s=r.getInt32(0,!0);if(s!==kT&&s!==Hy)throw new Error("not a BigWig/BigBed file");let o=0;const a=r.getInt32(o,!0);o+=4;const l=r.getUint16(o,!0);o+=2;const c=r.getUint16(o,!0);o+=2;const f=Number(r.getBigUint64(o,!0));o+=8;const u=Number(r.getBigUint64(o,!0));o+=8;const h=Number(r.getBigUint64(o,!0));o+=8;const A=r.getUint16(o,!0);o+=2;const d=r.getUint16(o,!0);o+=2;const g=Number(r.getBigUint64(o,!0));o+=8;const m=Number(r.getBigUint64(o,!0));o+=8;const p=r.getUint32(o,!0);o+=4;const w=Number(r.getBigUint64(o,!0));o+=8;const C=[];for(let I=0;I<c;I++){const S=r.getUint32(o,!0);o+=4;const Q=r.getUint32(o,!0);o+=4;const v=Number(r.getBigUint64(o,!0));o+=8;const F=Number(r.getBigUint64(o,!0));o+=8,C.push({reductionLevel:S,reserved:Q,dataOffset:v,indexOffset:F})}const y=a===Hy?"bigbed":"bigwig";if(g>n||m>n-40)return this._getMainHeader(e,n*2);let b;if(m){const I=i.subarray(m);let S=0;const Q=xr(I),v=Number(Q.getBigUint64(S,!0));S+=8;const F=Q.getFloat64(S,!0);S+=8;const R=Q.getFloat64(S,!0);S+=8;const M=Q.getFloat64(S,!0);S+=8;const O=Q.getFloat64(S,!0);S+=8,b={scoreMin:F,scoreMax:R,scoreSum:M,scoreSumSquares:O,basesCovered:v}}else throw new Error("no stats");const x=new TextDecoder("utf8");return{zoomLevels:C,magic:a,extHeaderOffset:w,numZoomLevels:c,fieldCount:A,totalSummary:b,definedFieldCount:d,uncompressBufSize:p,asOffset:g,chromTreeOffset:f,totalSummaryOffset:m,unzoomedDataOffset:u,unzoomedIndexOffset:h,fileType:y,version:l,autoSql:g?x.decode(i.subarray(g,i.indexOf(0,g))):""}}async _readChromTree(e,n){const i=[],r={},s=e.chromTreeOffset,o=xr(await this.bbi.read(32,s,n));let a=0;a+=4,a+=4;const l=o.getUint32(a,!0);a+=4;const c=o.getUint32(a,!0);a+=4,a+=8;const f=new TextDecoder("utf8"),u=async h=>{const A=await this.bbi.read(4,h),d=xr(A);let g=0;const m=d.getUint8(g);g+=1,g+=1;const p=d.getUint16(g,!0);if(g+=2,m){const w=await this.bbi.read(p*(l+c),h+g),C=xr(w);g=0;for(let y=0;y<p;y++){const b=f.decode(w.subarray(g,g+l)).replaceAll("\0","");g+=l;const x=C.getUint32(g,!0);g+=4;const I=C.getUint32(g,!0);g+=4,r[this.renameRefSeqs(b)]=x,i[x]={name:b,id:x,length:I}}}else{const w=[],C=xr(await this.bbi.read(p*(l+8),h+g));g=0;for(let y=0;y<p;y++){g+=l;const b=Number(C.getBigUint64(g,!0));g+=8,w.push(u(b))}await Promise.all(w)}};return await u(s+32),{refsByName:r,refsByNumber:i}}async getUnzoomedView(e){const{unzoomedIndexOffset:n,refsByName:i,uncompressBufSize:r,fileType:s}=await this.getHeader(e);return new zy(this.bbi,i,n,r>0,s)}async getFeatureStream(e,n,i,r){await this.getHeader(r);const s=this.renameRefSeqs(e);let o;const{basesPerSpan:a,scale:l}=r||{};return a?o=await this.getView(1/a,r):l?o=await this.getView(l,r):o=await this.getView(1,r),new yt(c=>{o.readWigData(s,n,i,c,r).catch(f=>{c.error(f)})})}async getFeatures(e,n,i,r){const s=await this.getFeatureStream(e,n,i,r);return(await Py(s.pipe(yT()))).flat()}}class FT extends Yy{async getView(e,n){const{zoomLevels:i,refsByName:r,uncompressBufSize:s}=await this.getHeader(n),o=1/e,a=i.length-1;for(let l=a;l>=0;l-=1){const c=i[l];if(c&&c.reductionLevel<=2*o)return new zy(this.bbi,r,c.indexOffset,s>0,"summary")}return this.getUnzoomedView(n)}}function RT(t){return t.filter(e=>!!e)}class NT extends Yy{readIndicesCache=new Ir({cache:new Gy({maxSize:1}),fill:(e,n)=>this._readIndices({...e,signal:n})});readIndices(e={}){const{signal:n,...i}=e;return this.readIndicesCache.get(JSON.stringify(i),e,n)}async getView(e,n){return this.getUnzoomedView(n)}async _readIndices(e){const{extHeaderOffset:n}=await this.getHeader(e),i=await this.bbi.read(64,n),r=new DataView(i.buffer,i.byteOffset,i.length);let s=0;s+=2;const o=r.getUint16(s,!0);s+=2;const a=Number(r.getBigUint64(s,!0));if(s+=8,o===0)return[];const l=20,c=l*o,f=await this.bbi.read(c,a),u=[];for(let h=0;h<o;h+=1){const A=f.subarray(h*l),d=new DataView(A.buffer,A.byteOffset,A.length);let g=0;const m=d.getInt16(g,!0);g+=2;const p=d.getInt16(g,!0);g+=2;const w=Number(d.getBigUint64(g,!0));g+=12;const C=d.getInt16(g,!0);u.push({type:m,fieldcount:p,offset:w,field:C})}return u}async searchExtraIndexBlocks(e,n={}){const i=await this.readIndices(n);if(i.length===0)return[];const r=new TextDecoder("utf8"),s=i.map(async o=>{const{offset:a,field:l}=o,c=await this.bbi.read(32,a,n),f=new DataView(c.buffer,c.byteOffset,c.length);let u=0;u+=4;const h=f.getInt32(u,!0);u+=4;const A=f.getInt32(u,!0);u+=4;const d=f.getInt32(u,!0);u+=4,u+=8;const g=async m=>{const p=m,w=4+h*(A+d),y=await this.bbi.read(w,p,n),b=new DataView(y.buffer,y.byteOffset,y.length);let x=0;const I=b.getInt8(x);x+=2;const S=b.getInt16(x,!0);x+=2;const Q=[];if(I===0){const v=[];for(let R=0;R<S;R++){const M=r.decode(y.subarray(x,x+A)).replaceAll("\0","");x+=A;const O=Number(b.getBigUint64(x,!0));x+=8,v.push({key:M,offset:O})}let F=0;for(const{key:R,offset:M}of v){if(e.localeCompare(R)<0&&F)return g(F);F=M}return g(F)}else if(I===1){for(let v=0;v<S;v++){const F=r.decode(y.subarray(x,x+A)).replaceAll("\0","");x+=A;const R=Number(b.getBigUint64(x,!0));x+=8;const M=b.getUint32(x,!0);x+=4;const O=b.getUint32(x,!0);x+=4,Q.push({key:F,offset:R,length:M,reserved:O})}for(const v of Q)if(v.key===e)return{...v,field:l};return}};return g(a+32)});return RT(await Promise.all(s))}async searchExtraIndex(e,n={}){const i=await this.searchExtraIndexBlocks(e,n);if(i.length===0)return[];const r=await this.getUnzoomedView(n),s=i.map(a=>new yt(l=>{r.readFeatures(l,[a],n).catch(c=>{l.error(c)})}).pipe(Uy((l,c)=>l.concat(c)),Ly(l=>{for(const c of l)c.field=a.field;return l})));return(await Py(pT(...s))).filter(a=>a.rest?.split(" ")[(a.field||0)-3]===e)}}const Vy=Object.freeze(Object.defineProperty({__proto__:null,BigBed:NT,BigWig:FT},Symbol.toStringTag,{value:"Module"}));function MT(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function Br(t,e,n,i){this.message=t,this.expected=e,this.found=n,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Br)}MT(Br,Error),Br.buildMessage=function(t,e){var n={literal:function(c){return'"'+r(c.text)+'"'},class:function(c){var f="",u;for(u=0;u<c.parts.length;u++)f+=c.parts[u]instanceof Array?s(c.parts[u][0])+"-"+s(c.parts[u][1]):s(c.parts[u]);return"["+(c.inverted?"^":"")+f+"]"},any:function(c){return"any character"},end:function(c){return"end of input"},other:function(c){return c.description}};function i(c){return c.charCodeAt(0).toString(16).toUpperCase()}function r(c){return c.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(f){return"\\x0"+i(f)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(f){return"\\x"+i(f)})}function s(c){return c.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(f){return"\\x0"+i(f)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(f){return"\\x"+i(f)})}function o(c){return n[c.type](c)}function a(c){var f=new Array(c.length),u,h;for(u=0;u<c.length;u++)f[u]=o(c[u]);if(f.sort(),f.length>0){for(u=1,h=1;u<f.length;u++)f[u-1]!==f[u]&&(f[h]=f[u],h++);f.length=h}switch(f.length){case 1:return f[0];case 2:return f[0]+" or "+f[1];default:return f.slice(0,-1).join(", ")+", or "+f[f.length-1]}}function l(c){return c?'"'+r(c)+'"':"end of input"}return"Expected "+a(t)+" but "+l(e)+" found."};function TT(t,e){e=e!==void 0?e:{};var n={},i={declaration:lI},r=lI,s="(",o=ae("(",!1),a=")",l=ae(")",!1),c=function(E,D,T,L){return{type:E,name:D,comment:T,fields:L}},f="simple",u=ae("simple",!1),h="object",A=ae("object",!1),d="table",g=ae("table",!1),m="auto",p=ae("auto",!1),w="primary",C=ae("primary",!1),y="index",b=ae("index",!1),x="unique",I=ae("unique",!1),S=function(E,D){return D},Q=function(E,D){return E.name&&D.unshift(E),D},v="#",F=ae("#",!1),R=";",M=ae(";",!1),O=function(E,D,T){return{type:E,name:D,comment:T}},z="[",_=ae("[",!1),Y="]",te=ae("]",!1),oe=function(E,D,T,L){return{type:E,size:D,name:T,comment:L}},ne=function(E,D,T,L){return{type:E,vals:D,name:T,comment:L}},_e=",",Kt=ae(",",!1),xo=function(E,D){return D.unshift(E),D},Ur="int",hn=ae("int",!1),Ni="uint",Bo=ae("uint",!1),_r="short",U=ae("short",!1),K="ushort",W=ae("ushort",!1),N="byte",Ze=ae("byte",!1),se="ubyte",it=ae("ubyte",!1),$e="float",dn=ae("float",!1),vo="char",GP=ae("char",!1),VE="string",zP=ae("string",!1),JE="lstring",HP=ae("lstring",!1),qE="enum",YP=ae("enum",!1),KE="double",VP=ae("double",!1),jE="bigint",JP=ae("bigint",!1),WE="set",qP=ae("set",!1),KP=function(E,D){return E+" "+D},jP=/^[a-zA-Z_]/,WP=So([["a","z"],["A","Z"],"_"],!1,!1),XE=/^[a-zA-Z0-9_]/,ZE=So([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),XP=function(E){return sI()},$E=/^[^\n\r]/,eI=So([`
|
|
661
|
-
`,"\r"],!0,!1),
|
|
662
|
-
`,"\r"],!1,!1),
|
|
672
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function j1(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var kh=(function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,i,r,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=go(o),l=a.next();!l.done;l=a.next()){var c=l.value;c.remove(this)}}catch(g){e={error:g}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}else o.remove(this);var u=this.initialTeardown;if(Re(u))try{u()}catch(g){s=g instanceof Qh?g.errors:[g]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=go(f),A=h.next();!A.done;A=h.next()){var d=A.value;try{X1(d)}catch(g){s=s??[],g instanceof Qh?s=Dh(Dh([],Sh(s)),Sh(g.errors)):s.push(g)}}}catch(g){i={error:g}}finally{try{A&&!A.done&&(r=h.return)&&r.call(h)}finally{if(i)throw i.error}}}if(s)throw new Qh(s)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)X1(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)&&j1(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&j1(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=(function(){var e=new t;return e.closed=!0,e})(),t})();kh.EMPTY;function W1(t){return t instanceof kh||t&&"closed"in t&&Re(t.remove)&&Re(t.add)&&Re(t.unsubscribe)}function X1(t){Re(t)?t():t.unsubscribe()}var u5={Promise:void 0},f5={setTimeout:function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return setTimeout.apply(void 0,Dh([t,e],Sh(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Z1(t){f5.setTimeout(function(){throw t})}function $1(){}function h5(t){t()}var Rh=(function(t){Bh(e,t);function e(n){var i=t.call(this)||this;return i.isStopped=!1,n?(i.destination=n,W1(n)&&n.add(i)):i.destination=g5,i}return e.create=function(n,i,r){return new Sc(n,i,r)},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})(kh),A5=(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(i){Dc(i)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(i){Dc(i)}else Dc(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Dc(n)}},t})(),Sc=(function(t){Bh(e,t);function e(n,i,r){var s=t.call(this)||this,o;return Re(n)||!n?o={next:n??void 0,error:i??void 0,complete:r??void 0}:o=n,s.destination=new A5(o),s}return e})(Rh);function Dc(t){Z1(t)}function d5(t){throw t}var g5={closed:!0,next:$1,error:d5,complete:$1},Fh=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function eC(t){return t}function p5(t){return t.length===0?eC:t.length===1?t[0]:function(n){return t.reduce(function(i,r){return r(i)},n)}}var Ct=(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,i){var r=this,s=w5(e)?e:new Sc(e,n,i);return h5(function(){var o=r,a=o.operator,l=o.source;s.add(a?a.call(s,l):l?r._subscribe(s):r._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var i=this;return n=tC(n),new n(function(r,s){var o=new Sc({next:function(a){try{e(a)}catch(l){s(l),o.unsubscribe()}},error:s,complete:r});i.subscribe(o)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Fh]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return p5(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=tC(e),new e(function(i,r){var s;n.subscribe(function(o){return s=o},function(o){return r(o)},function(){return i(s)})})},t.create=function(e){return new t(e)},t})();function tC(t){var e;return(e=t??u5.Promise)!==null&&e!==void 0?e:Promise}function m5(t){return t&&Re(t.next)&&Re(t.error)&&Re(t.complete)}function w5(t){return t&&t instanceof Rh||m5(t)&&W1(t)}function y5(t){return Re(t?.lift)}function Br(t){return function(e){if(y5(e))return e.lift(function(n){try{return t(n,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function po(t,e,n,i,r){return new C5(t,e,n,i,r)}var C5=(function(t){Bh(e,t);function e(n,i,r,s,o,a){var l=t.call(this,n)||this;return l.onFinalize=o,l.shouldUnsubscribe=a,l._next=i?function(c){try{i(c)}catch(u){n.error(u)}}:t.prototype._next,l._error=s?function(c){try{s(c)}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._error,l._complete=r?function(){try{r()}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._complete,l}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;t.prototype.unsubscribe.call(this),!i&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e})(Rh),b5=new Ct(function(t){return t.complete()});function E5(t){return t&&Re(t.schedule)}function nC(t){return t[t.length-1]}function I5(t){return E5(nC(t))?t.pop():void 0}function x5(t,e){return typeof nC(t)=="number"?t.pop():e}var iC=(function(t){return t&&typeof t.length=="number"&&typeof t!="function"});function rC(t){return Re(t?.then)}function sC(t){return Re(t[Fh])}function oC(t){return Symbol.asyncIterator&&Re(t?.[Symbol.asyncIterator])}function aC(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 v5(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var cC=v5();function lC(t){return Re(t?.[cC])}function uC(t){return c5(this,arguments,function(){var n,i,r,s;return q1(this,function(o){switch(o.label){case 0:n=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,vr(n.read())];case 3:return i=o.sent(),r=i.value,s=i.done,s?[4,vr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,vr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function fC(t){return Re(t?.getReader)}function Sr(t){if(t instanceof Ct)return t;if(t!=null){if(sC(t))return B5(t);if(iC(t))return S5(t);if(rC(t))return D5(t);if(oC(t))return hC(t);if(lC(t))return Q5(t);if(fC(t))return k5(t)}throw aC(t)}function B5(t){return new Ct(function(e){var n=t[Fh]();if(Re(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function S5(t){return new Ct(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function D5(t){return new Ct(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Z1)})}function Q5(t){return new Ct(function(e){var n,i;try{for(var r=go(t),s=r.next();!s.done;s=r.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(a){n={error:a}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}e.complete()})}function hC(t){return new Ct(function(e){R5(t,e).catch(function(n){return e.error(n)})})}function k5(t){return hC(uC(t))}function R5(t,e){var n,i,r,s;return a5(this,void 0,void 0,function(){var o,a;return q1(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=l5(t),l.label=1;case 1:return[4,n.next()];case 2:if(i=l.sent(),!!i.done)return[3,4];if(o=i.value,e.next(o),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=l.sent(),r={error:a},[3,11];case 6:return l.trys.push([6,,9,10]),i&&!i.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(r)throw r.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Qi(t,e,n,i,r){i===void 0&&(i=0),r===void 0&&(r=!1);var s=e.schedule(function(){n(),r?t.add(this.schedule(null,i)):this.unsubscribe()},i);if(t.add(s),!r)return s}function AC(t,e){return e===void 0&&(e=0),Br(function(n,i){n.subscribe(po(i,function(r){return Qi(i,t,function(){return i.next(r)},e)},function(){return Qi(i,t,function(){return i.complete()},e)},function(r){return Qi(i,t,function(){return i.error(r)},e)}))})}function dC(t,e){return e===void 0&&(e=0),Br(function(n,i){i.add(t.schedule(function(){return n.subscribe(i)},e))})}function F5(t,e){return Sr(t).pipe(dC(e),AC(e))}function N5(t,e){return Sr(t).pipe(dC(e),AC(e))}function M5(t,e){return new Ct(function(n){var i=0;return e.schedule(function(){i===t.length?n.complete():(n.next(t[i++]),n.closed||this.schedule())})})}function T5(t,e){return new Ct(function(n){var i;return Qi(n,e,function(){i=t[cC](),Qi(n,e,function(){var r,s,o;try{r=i.next(),s=r.value,o=r.done}catch(a){n.error(a);return}o?n.complete():n.next(s)},0,!0)}),function(){return Re(i?.return)&&i.return()}})}function gC(t,e){if(!t)throw new Error("Iterable cannot be null");return new Ct(function(n){Qi(n,e,function(){var i=t[Symbol.asyncIterator]();Qi(n,e,function(){i.next().then(function(r){r.done?n.complete():n.next(r.value)})},0,!0)})})}function P5(t,e){return gC(uC(t),e)}function L5(t,e){if(t!=null){if(sC(t))return F5(t,e);if(iC(t))return M5(t,e);if(rC(t))return N5(t,e);if(oC(t))return gC(t,e);if(lC(t))return T5(t,e);if(fC(t))return P5(t,e)}throw aC(t)}function O5(t,e){return e?L5(t,e):Sr(t)}var U5=K1(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function pC(t,e){return new Promise(function(n,i){var r=new Sc({next:function(s){n(s),r.unsubscribe()},error:i,complete:function(){i(new U5)}});t.subscribe(r)})}function mC(t,e){return Br(function(n,i){var r=0;n.subscribe(po(i,function(s){i.next(t.call(e,s,r++))}))})}function _5(t,e,n,i,r,s,o,a){var l=[],c=0,u=0,f=!1,h=function(){f&&!l.length&&!c&&e.complete()},A=function(g){return c<i?d(g):l.push(g)},d=function(g){c++;var m=!1;Sr(n(g,u++)).subscribe(po(e,function(p){e.next(p)},function(){m=!0},void 0,function(){if(m)try{c--;for(var p=function(){var w=l.shift();o||d(w)};l.length&&c<i;)p();h()}catch(w){e.error(w)}}))};return t.subscribe(po(e,A,function(){f=!0,h()})),function(){}}function wC(t,e,n){return n===void 0&&(n=1/0),Re(e)?wC(function(i,r){return mC(function(s,o){return e(i,s,r,o)})(Sr(t(i,r)))},n):(typeof e=="number"&&(n=e),Br(function(i,r){return _5(i,r,t,n)}))}function z5(t){return t===void 0&&(t=1/0),wC(eC,t)}function G5(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=I5(t),i=x5(t,1/0),r=t;return r.length?r.length===1?Sr(r[0]):z5(i)(O5(r,n)):b5}function H5(t,e,n,i,r){return function(s,o){var a=n,l=e,c=0;s.subscribe(po(o,function(u){var f=c++;l=a?t(l,u,f):(a=!0,u)},(function(){a&&o.next(l),o.complete()})))}}function yC(t,e){return Br(H5(t,e,arguments.length>=2,!1,!0))}var Y5=function(t,e){return t.push(e),t};function V5(){return Br(function(t,e){yC(Y5,[])(t).subscribe(e)})}class J5{}class q5{constructor(){this.signals=new Set,this.abortController=new AbortController}addSignal(e=new J5){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 K5{constructor(){this.callbacks=new Set}addCallback(e=()=>{}){this.callbacks.add(e),this.currentMessage&&e(this.currentMessage)}callback(e){this.currentMessage=e;for(const n of this.callbacks)n(e)}}class Dr{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,i,r){const s=new q5,o=new K5;o.addCallback(r);const a={aborter:s,promise:this.fillCallback(n,s.signal,l=>{o.callback(l)}),settled:!1,statusReporter:o,get aborted(){return this.aborter.signal.aborted}};a.aborter.addSignal(i),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(l=>{throw console.error(l),l}),this.cache.set(e,a)}static checkSinglePromise(e,n){function i(){if(n?.aborted)throw Object.assign(new Error("aborted"),{code:"ERR_ABORTED"})}return e.then(r=>(i(),r),r=>{throw i(),r})}has(e){return this.cache.has(e)}get(e,n,i,r){if(!i&&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 s=this.cache.get(e);return s?s.aborted&&!s.settled?(this.evict(e,s),this.get(e,n,i,r)):s.settled?s.promise:(s.aborter.addSignal(i),s.statusReporter.addCallback(r),Dr.checkSinglePromise(s.promise,i)):(this.fill(e,n,i,r),Dr.checkSinglePromise(this.cache.get(e).promise,i))}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 i=e.next();!i.done;i=e.next())this.delete(i.value),n+=1;return n}}function j5(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Nh,CC;function W5(){if(CC)return Nh;CC=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,i){this.cache.set(n,i),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 i=this.oldCache.get(n);return this.oldCache.delete(n),this._set(n,i),i}}set(n,i){return this.cache.has(n)?this.cache.set(n,i):this._set(n,i),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 i=this.cache.delete(n);return i&&this._size--,this.oldCache.delete(n)||i}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[i]=n;this.cache.has(i)||(yield n)}}get size(){let n=0;for(const i of this.oldCache.keys())this.cache.has(i)||n++;return this._size+n}}return Nh=t,Nh}var X5=W5();const bC=j5(X5);class Qr{ranges;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 Qr([{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((s,o)=>s.min<o.min?-1:s.min>o.min?1:s.max<o.max?-1:o.max>s.max?1:0),i=[];let r=n[0];for(const s of n)s.min>r.max+1?(i.push(r),r=s):s.max>r.max&&(r=new Qr([{min:r.min,max:s.max}]));return i.push(r),i.length===1?i[0]:new Qr(i)}}function Z5(t){return ZT(t.subarray(2),void 0)}class $5 extends Error{code;constructor(e){super(e),this.code="ERR_ABORTED"}}function eP(t){t.sort((r,s)=>r.offset-s.offset);const e=[];let n,i;for(const r of t)n&&i&&r.offset-i<=2e3?(n.length=n.length+r.length-i+r.offset,n.blocks.push(r)):e.push(n={blocks:[r],length:r.length,offset:r.offset}),i=n.offset+n.length;return e}function Qc(t){if(t&&t.aborted)if(typeof DOMException>"u"){const e=new $5("aborted");throw e.code="ERR_ABORTED",e}else throw new DOMException("aborted","AbortError")}const tP=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Mh(t,e,n,i){return t<i&&e>=n}class EC{bbi;refsByName;cirTreeOffset;isCompressed;blockType;cirTreePromise;featureCache=new Dr({cache:new bC({maxSize:1e3}),fill:async({length:e,offset:n},i)=>this.bbi.read(e,n,{signal:i})});constructor(e,n,i,r,s){if(this.bbi=e,this.refsByName=n,this.cirTreeOffset=i,this.isCompressed=r,this.blockType=s,!(i>=0))throw new Error("invalid cirTreeOffset!")}async readWigData(e,n,i,r,s){try{const o=this.refsByName[e];o===void 0&&r.complete();const a={chrId:o,start:n,end:i};this.cirTreePromise||(this.cirTreePromise=this.bbi.read(48,this.cirTreeOffset,s));const l=await this.cirTreePromise,u=new DataView(l.buffer).getUint32(4,!0);let f=[],h=0;const A=(p,w,C)=>{try{const I=p.subarray(w),x=new DataView(I.buffer,I.byteOffset,I.length);let E=0;const S=x.getUint8(E);E+=2;const D=x.getUint16(E,!0);if(E+=2,S===1){const B=[];for(let k=0;k<D;k++){const F=x.getUint32(E,!0);E+=4;const M=x.getUint32(E,!0);E+=4;const O=x.getUint32(E,!0);E+=4;const _=x.getUint32(E,!0);E+=4;const H=Number(x.getBigUint64(E,!0));E+=8;const G=Number(x.getBigUint64(E,!0));E+=8,B.push({startChrom:F,startBase:M,endBase:_,endChrom:O,blockOffset:H,blockSize:G,offset:E})}f=f.concat(B.filter(k=>d(k)).map(k=>({offset:k.blockOffset,length:k.blockSize})))}else if(S===0){const B=[];for(let F=0;F<D;F++){const M=x.getUint32(E,!0);E+=4;const O=x.getUint32(E,!0);E+=4;const _=x.getUint32(E,!0);E+=4;const H=x.getUint32(E,!0);E+=4;const G=Number(x.getBigUint64(E,!0));E+=8,B.push({startChrom:M,startBase:O,endChrom:_,endBase:H,blockOffset:G,offset:E})}const k=B.filter(F=>d(F)).map(F=>F.blockOffset);k.length>0&&m(k,C+1)}}catch(y){r.error(y)}},d=p=>{const{startChrom:w,startBase:C,endChrom:y,endBase:I}=p;return(w<o||w===o&&C<=i)&&(y>o||y===o&&I>=n)},g=async(p,w,C)=>{try{const y=w.max-w.min,I=w.min,x=await this.featureCache.get(`${y}_${I}`,{length:y,offset:I},s?.signal);for(const E of p)w.contains(E)&&(A(x,E-I,C),h-=1,h===0&&this.readFeatures(r,f,{...s,request:a}).catch(S=>{r.error(S)}))}catch(y){r.error(y)}},m=(p,w)=>{try{h+=p.length;const C=4+u*32;let y=new Qr([{min:p[0],max:p[0]+C}]);for(let I=1;I<p.length;I+=1){const x=new Qr([{min:p[I],max:p[I]+C}]);y=y.union(x)}y.getRanges().map(I=>g(p,I,w))}catch(C){r.error(C)}};m([this.cirTreeOffset+48],1);return}catch(o){r.error(o)}}parseSummaryBlock(e,n,i){const r=[];let s=n;const o=new DataView(e.buffer,e.byteOffset,e.length);for(;s<e.byteLength;){const a=o.getUint32(s,!0);s+=4;const l=o.getUint32(s,!0);s+=4;const c=o.getUint32(s,!0);s+=4;const u=o.getUint32(s,!0);s+=4;const f=o.getFloat32(s,!0);s+=4;const h=o.getFloat32(s,!0);s+=4;const A=o.getFloat32(s,!0);s+=4,s+=4,(!i||a===i.chrId&&Mh(l,c,i.start,i.end))&&r.push({start:l,end:c,maxScore:h,minScore:f,summary:!0,score:A/(u||1)})}return r}parseBigBedBlock(e,n,i,r){const s=[];let o=n;const a=e,l=new DataView(a.buffer,a.byteOffset,a.length);for(;o<e.byteLength;){const c=o,u=l.getUint32(o,!0);o+=4;const f=l.getInt32(o,!0);o+=4;const h=l.getInt32(o,!0);o+=4;let A=o;for(;A<e.length&&e[A]!==0;A++);const d=e.subarray(o,A),g=tP?.decode(d)??d.toString();o=A+1,s.push({chromId:u,start:f,end:h,rest:g,uniqueId:`bb-${i+c}`})}return r?s.filter(c=>Mh(c.start,c.end,r.start,r.end)):s}parseBigWigBlock(e,n,i){const r=e.subarray(n),s=new DataView(r.buffer,r.byteOffset,r.length);let o=0;o+=4;const a=s.getInt32(o,!0);o+=8;const l=s.getUint32(o,!0);o+=4;const c=s.getUint32(o,!0);o+=4;const u=s.getUint8(o);o+=2;const f=s.getUint16(o,!0);o+=2;const h=new Array(f);switch(u){case 1:{for(let A=0;A<f;A++){const d=s.getInt32(o,!0);o+=4;const g=s.getInt32(o,!0);o+=4;const m=s.getFloat32(o,!0);o+=4,h[A]={start:d,end:g,score:m}}break}case 2:{for(let A=0;A<f;A++){const d=s.getInt32(o,!0);o+=4;const g=s.getFloat32(o,!0);o+=4,h[A]={score:g,start:d,end:d+c}}break}case 3:{for(let A=0;A<f;A++){const d=s.getFloat32(o,!0);o+=4;const g=a+A*l;h[A]={score:d,start:g,end:g+c}}break}}return i?h.filter(A=>Mh(A.start,A.end,i.start,i.end)):h}async readFeatures(e,n,i={}){try{const{blockType:r,isCompressed:s}=this,{signal:o,request:a}=i,l=eP(n);Qc(o),await Promise.all(l.map(async c=>{Qc(o);const{length:u,offset:f}=c,h=await this.featureCache.get(`${u}_${f}`,c,o);for(const A of c.blocks){Qc(o);let d=h.subarray(A.offset-c.offset);switch(s&&(d=Z5(d)),Qc(o),r){case"summary":{e.next(this.parseSummaryBlock(d,0,a));break}case"bigwig":{e.next(this.parseBigWigBlock(d,0,a));break}case"bigbed":{e.next(this.parseBigBedBlock(d,0,A.offset*256,a));break}default:console.warn(`Don't know what to do with ${r}`)}}})),e.complete()}catch(r){e.error(r)}}}const nP=-2003829722,IC=-2021002517;function kr(t){return new DataView(t.buffer,t.byteOffset,t.length)}class xC{bbi;headerP;renameRefSeqs;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:i=o=>o,path:r,url:s}=e;if(this.renameRefSeqs=i,n)this.bbi=n;else if(s)this.bbi=new Vt(s);else if(r)this.bbi=new $e(r);else throw new Error("no file given")}async _getHeader(e){const n=await this._getMainHeader(e),i=await this._readChromTree(n,e);return{...n,...i}}async _getMainHeader(e,n=2e3){const i=await this.bbi.read(n,0,e),r=kr(i),s=r.getInt32(0,!0);if(s!==nP&&s!==IC)throw new Error("not a BigWig/BigBed file");let o=0;const a=r.getInt32(o,!0);o+=4;const l=r.getUint16(o,!0);o+=2;const c=r.getUint16(o,!0);o+=2;const u=Number(r.getBigUint64(o,!0));o+=8;const f=Number(r.getBigUint64(o,!0));o+=8;const h=Number(r.getBigUint64(o,!0));o+=8;const A=r.getUint16(o,!0);o+=2;const d=r.getUint16(o,!0);o+=2;const g=Number(r.getBigUint64(o,!0));o+=8;const m=Number(r.getBigUint64(o,!0));o+=8;const p=r.getUint32(o,!0);o+=4;const w=Number(r.getBigUint64(o,!0));o+=8;const C=[];for(let E=0;E<c;E++){const S=r.getUint32(o,!0);o+=4;const D=r.getUint32(o,!0);o+=4;const B=Number(r.getBigUint64(o,!0));o+=8;const k=Number(r.getBigUint64(o,!0));o+=8,C.push({reductionLevel:S,reserved:D,dataOffset:B,indexOffset:k})}const y=a===IC?"bigbed":"bigwig";if(g>n||m>n-40)return this._getMainHeader(e,n*2);let I;if(m){const E=i.subarray(m);let S=0;const D=kr(E),B=Number(D.getBigUint64(S,!0));S+=8;const k=D.getFloat64(S,!0);S+=8;const F=D.getFloat64(S,!0);S+=8;const M=D.getFloat64(S,!0);S+=8;const O=D.getFloat64(S,!0);S+=8,I={scoreMin:k,scoreMax:F,scoreSum:M,scoreSumSquares:O,basesCovered:B}}else throw new Error("no stats");const x=new TextDecoder("utf8");return{zoomLevels:C,magic:a,extHeaderOffset:w,numZoomLevels:c,fieldCount:A,totalSummary:I,definedFieldCount:d,uncompressBufSize:p,asOffset:g,chromTreeOffset:u,totalSummaryOffset:m,unzoomedDataOffset:f,unzoomedIndexOffset:h,fileType:y,version:l,autoSql:g?x.decode(i.subarray(g,i.indexOf(0,g))):""}}async _readChromTree(e,n){const i=[],r={},s=e.chromTreeOffset,o=kr(await this.bbi.read(32,s,n));let a=0;a+=4,a+=4;const l=o.getUint32(a,!0);a+=4;const c=o.getUint32(a,!0);a+=4,a+=8;const u=new TextDecoder("utf8"),f=async h=>{const A=await this.bbi.read(4,h),d=kr(A);let g=0;const m=d.getUint8(g);g+=1,g+=1;const p=d.getUint16(g,!0);if(g+=2,m){const w=await this.bbi.read(p*(l+c),h+g),C=kr(w);g=0;for(let y=0;y<p;y++){const I=u.decode(w.subarray(g,g+l)).replaceAll("\0","");g+=l;const x=C.getUint32(g,!0);g+=4;const E=C.getUint32(g,!0);g+=4,r[this.renameRefSeqs(I)]=x,i[x]={name:I,id:x,length:E}}}else{const w=[],C=kr(await this.bbi.read(p*(l+8),h+g));g=0;for(let y=0;y<p;y++){g+=l;const I=Number(C.getBigUint64(g,!0));g+=8,w.push(f(I))}await Promise.all(w)}};return await f(s+32),{refsByName:r,refsByNumber:i}}async getUnzoomedView(e){const{unzoomedIndexOffset:n,refsByName:i,uncompressBufSize:r,fileType:s}=await this.getHeader(e);return new EC(this.bbi,i,n,r>0,s)}async getFeatureStream(e,n,i,r){await this.getHeader(r);const s=this.renameRefSeqs(e);let o;const{basesPerSpan:a,scale:l}=r||{};return a?o=await this.getView(1/a,r):l?o=await this.getView(l,r):o=await this.getView(1,r),new Ct(c=>{o.readWigData(s,n,i,c,r).catch(u=>{c.error(u)})})}async getFeatures(e,n,i,r){const s=await this.getFeatureStream(e,n,i,r);return(await pC(s.pipe(V5()))).flat()}}class iP extends xC{async getView(e,n){const{zoomLevels:i,refsByName:r,uncompressBufSize:s}=await this.getHeader(n),o=1/e,a=i.length-1;for(let l=a;l>=0;l-=1){const c=i[l];if(c&&c.reductionLevel<=2*o)return new EC(this.bbi,r,c.indexOffset,s>0,"summary")}return this.getUnzoomedView(n)}}function rP(t){return t.filter(e=>!!e)}class sP extends xC{readIndicesCache=new Dr({cache:new bC({maxSize:1}),fill:(e,n)=>this._readIndices({...e,signal:n})});readIndices(e={}){const{signal:n,...i}=e;return this.readIndicesCache.get(JSON.stringify(i),e,n)}async getView(e,n){return this.getUnzoomedView(n)}async _readIndices(e){const{extHeaderOffset:n}=await this.getHeader(e),i=await this.bbi.read(64,n),r=new DataView(i.buffer,i.byteOffset,i.length);let s=0;s+=2;const o=r.getUint16(s,!0);s+=2;const a=Number(r.getBigUint64(s,!0));if(s+=8,o===0)return[];const l=20,c=l*o,u=await this.bbi.read(c,a),f=[];for(let h=0;h<o;h+=1){const A=u.subarray(h*l),d=new DataView(A.buffer,A.byteOffset,A.length);let g=0;const m=d.getInt16(g,!0);g+=2;const p=d.getInt16(g,!0);g+=2;const w=Number(d.getBigUint64(g,!0));g+=12;const C=d.getInt16(g,!0);f.push({type:m,fieldcount:p,offset:w,field:C})}return f}async searchExtraIndexBlocks(e,n={}){const i=await this.readIndices(n);if(i.length===0)return[];const r=new TextDecoder("utf8"),s=i.map(async o=>{const{offset:a,field:l}=o,c=await this.bbi.read(32,a,n),u=new DataView(c.buffer,c.byteOffset,c.length);let f=0;f+=4;const h=u.getInt32(f,!0);f+=4;const A=u.getInt32(f,!0);f+=4;const d=u.getInt32(f,!0);f+=4,f+=8;const g=async m=>{const p=m,w=4+h*(A+d),y=await this.bbi.read(w,p,n),I=new DataView(y.buffer,y.byteOffset,y.length);let x=0;const E=I.getInt8(x);x+=2;const S=I.getInt16(x,!0);x+=2;const D=[];if(E===0){const B=[];for(let F=0;F<S;F++){const M=r.decode(y.subarray(x,x+A)).replaceAll("\0","");x+=A;const O=Number(I.getBigUint64(x,!0));x+=8,B.push({key:M,offset:O})}let k=0;for(const{key:F,offset:M}of B){if(e.localeCompare(F)<0&&k)return g(k);k=M}return g(k)}else if(E===1){for(let B=0;B<S;B++){const k=r.decode(y.subarray(x,x+A)).replaceAll("\0","");x+=A;const F=Number(I.getBigUint64(x,!0));x+=8;const M=I.getUint32(x,!0);x+=4;const O=I.getUint32(x,!0);x+=4,D.push({key:k,offset:F,length:M,reserved:O})}for(const B of D)if(B.key===e)return{...B,field:l};return}};return g(a+32)});return rP(await Promise.all(s))}async searchExtraIndex(e,n={}){const i=await this.searchExtraIndexBlocks(e,n);if(i.length===0)return[];const r=await this.getUnzoomedView(n),s=i.map(a=>new Ct(l=>{r.readFeatures(l,[a],n).catch(c=>{l.error(c)})}).pipe(yC((l,c)=>l.concat(c)),mC(l=>{for(const c of l)c.field=a.field;return l})));return(await pC(G5(...s))).filter(a=>a.rest?.split(" ")[(a.field||0)-3]===e)}}const vC=Object.freeze(Object.defineProperty({__proto__:null,BigBed:sP,BigWig:iP},Symbol.toStringTag,{value:"Module"}));function oP(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function Rr(t,e,n,i){this.message=t,this.expected=e,this.found=n,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Rr)}oP(Rr,Error),Rr.buildMessage=function(t,e){var n={literal:function(c){return'"'+r(c.text)+'"'},class:function(c){var u="",f;for(f=0;f<c.parts.length;f++)u+=c.parts[f]instanceof Array?s(c.parts[f][0])+"-"+s(c.parts[f][1]):s(c.parts[f]);return"["+(c.inverted?"^":"")+u+"]"},any:function(c){return"any character"},end:function(c){return"end of input"},other:function(c){return c.description}};function i(c){return c.charCodeAt(0).toString(16).toUpperCase()}function r(c){return c.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(u){return"\\x0"+i(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+i(u)})}function s(c){return c.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(u){return"\\x0"+i(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+i(u)})}function o(c){return n[c.type](c)}function a(c){var u=new Array(c.length),f,h;for(f=0;f<c.length;f++)u[f]=o(c[f]);if(u.sort(),u.length>0){for(f=1,h=1;f<u.length;f++)u[f-1]!==u[f]&&(u[h]=u[f],h++);u.length=h}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+r(c)+'"':"end of input"}return"Expected "+a(t)+" but "+l(e)+" found."};function aP(t,e){e=e!==void 0?e:{};var n={},i={declaration:YE},r=YE,s="(",o=ce("(",!1),a=")",l=ce(")",!1),c=function(b,Q,T,L){return{type:b,name:Q,comment:T,fields:L}},u="simple",f=ce("simple",!1),h="object",A=ce("object",!1),d="table",g=ce("table",!1),m="auto",p=ce("auto",!1),w="primary",C=ce("primary",!1),y="index",I=ce("index",!1),x="unique",E=ce("unique",!1),S=function(b,Q){return Q},D=function(b,Q){return b.name&&Q.unshift(b),Q},B="#",k=ce("#",!1),F=";",M=ce(";",!1),O=function(b,Q,T){return{type:b,name:Q,comment:T}},_="[",H=ce("[",!1),G="]",q=ce("]",!1),Z=function(b,Q,T,L){return{type:b,size:Q,name:T,comment:L}},Y=function(b,Q,T,L){return{type:b,vals:Q,name:T,comment:L}},we=",",ze=ce(",",!1),mn=function(b,Q){return Q.unshift(b),Q},jt="int",wn=ce("int",!1),Oi="uint",Qo=ce("uint",!1),Vr="short",U=ce("short",!1),W="ushort",$=ce("ushort",!1),N="byte",tt=ce("byte",!1),oe="ubyte",st=ce("ubyte",!1),nt="float",yn=ce("float",!1),ko="char",h7=ce("char",!1),BE="string",A7=ce("string",!1),SE="lstring",d7=ce("lstring",!1),DE="enum",g7=ce("enum",!1),QE="double",p7=ce("double",!1),kE="bigint",m7=ce("bigint",!1),RE="set",w7=ce("set",!1),y7=function(b,Q){return b+" "+Q},C7=/^[a-zA-Z_]/,b7=Ro([["a","z"],["A","Z"],"_"],!1,!1),FE=/^[a-zA-Z0-9_]/,NE=Ro([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),E7=function(b){return _E()},ME=/^[^\n\r]/,TE=Ro([`
|
|
673
|
+
`,"\r"],!0,!1),I7=function(b){return b.join("").replace(/^"/,"").replace(/"$/,"")},x7=zE("integer"),PE=/^[0-9]/,LE=Ro([["0","9"]],!1,!1),v7=function(){return parseInt(_E(),10)},B7=zE("whitespace"),OE=/^[ \t\n\r]/,UE=Ro([" "," ",`
|
|
674
|
+
`,"\r"],!1,!1),v=0,ot=0,rl=[{line:1,column:1}],Wt=0,yA=[],J=0,sl;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');r=i[e.startRule]}function _E(){return t.substring(ot,v)}function ce(b,Q){return{type:"literal",text:b,ignoreCase:Q}}function Ro(b,Q,T){return{type:"class",parts:b,inverted:Q,ignoreCase:T}}function S7(){return{type:"end"}}function zE(b){return{type:"other",description:b}}function GE(b){var Q=rl[b],T;if(Q)return Q;for(T=b-1;!rl[T];)T--;for(Q=rl[T],Q={line:Q.line,column:Q.column};T<b;)t.charCodeAt(T)===10?(Q.line++,Q.column=1):Q.column++,T++;return rl[b]=Q,Q}function HE(b,Q){var T=GE(b),L=GE(Q);return{start:{offset:b,line:T.line,column:T.column},end:{offset:Q,line:L.line,column:L.column}}}function K(b){v<Wt||(v>Wt&&(Wt=v,yA=[]),yA.push(b))}function D7(b,Q,T){return new Rr(Rr.buildMessage(b,Q),b,Q,T)}function YE(){var b,Q,T,L,V,he,ye,It,jn,Cn,Wn,bn,Xn,En;return b=v,Q=ee(),Q!==n?(T=VE(),T!==n?(L=ee(),L!==n?(V=JE(),V!==n?(he=ee(),he!==n?(ye=ol(),ye!==n?(It=ee(),It!==n?(t.charCodeAt(v)===40?(jn=s,v++):(jn=n,J===0&&K(o)),jn!==n?(Cn=ee(),Cn!==n?(Wn=Q7(),Wn!==n?(bn=ee(),bn!==n?(t.charCodeAt(v)===41?(Xn=a,v++):(Xn=n,J===0&&K(l)),Xn!==n?(En=ee(),En!==n?(ot=b,Q=c(T,V,ye,Wn),b=Q):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n),b}function VE(){var b;return t.substr(v,6)===u?(b=u,v+=6):(b=n,J===0&&K(f)),b===n&&(t.substr(v,6)===h?(b=h,v+=6):(b=n,J===0&&K(A)),b===n&&(t.substr(v,5)===d?(b=d,v+=5):(b=n,J===0&&K(g)))),b}function JE(){var b,Q,T,L;return b=Ft(),b===n&&(b=v,Q=Ft(),Q!==n?(T=qE(),T!==n?(Q=[Q,T],b=Q):(v=b,b=n)):(v=b,b=n),b===n&&(b=v,Q=Ft(),Q!==n?(t.substr(v,4)===m?(T=m,v+=4):(T=n,J===0&&K(p)),T!==n?(Q=[Q,T],b=Q):(v=b,b=n)):(v=b,b=n),b===n&&(b=v,Q=Ft(),Q!==n?(T=qE(),T!==n?(t.substr(v,4)===m?(L=m,v+=4):(L=n,J===0&&K(p)),L!==n?(Q=[Q,T,L],b=Q):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)))),b}function qE(){var b;return t.substr(v,7)===w?(b=w,v+=7):(b=n,J===0&&K(C)),b===n&&(t.substr(v,5)===y?(b=y,v+=5):(b=n,J===0&&K(I)),b===n&&(t.substr(v,6)===x?(b=x,v+=6):(b=n,J===0&&K(E)))),b}function ol(){var b;return b=KE(),b===n&&(b=ee()),b}function Q7(){var b,Q,T,L,V,he,ye;if(b=v,Q=CA(),Q!==n)if(T=ee(),T!==n){for(L=[],V=v,he=ee(),he!==n?(ye=CA(),ye!==n?(ot=V,he=S(Q,ye),V=he):(v=V,V=n)):(v=V,V=n);V!==n;)L.push(V),V=v,he=ee(),he!==n?(ye=CA(),ye!==n?(ot=V,he=S(Q,ye),V=he):(v=V,V=n)):(v=V,V=n);L!==n?(V=ee(),V!==n?(ot=b,Q=D(Q,L),b=Q):(v=b,b=n)):(v=b,b=n)}else v=b,b=n;else v=b,b=n;return b}function k7(){var b;return t.charCodeAt(v)===35?(b=B,v++):(b=n,J===0&&K(k)),b}function R7(){var b,Q,T,L,V;return b=v,Q=ee(),Q!==n?(T=k7(),T!==n?(L=KE(),L!==n?(V=ee(),V!==n?(Q=[Q,T,L,V],b=Q):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n),b}function CA(){var b,Q,T,L,V,he,ye,It,jn,Cn,Wn,bn,Xn,En;return b=v,Q=bA(),Q!==n?(T=ee(),T!==n?(L=Ft(),L!==n?(V=ee(),V!==n?(t.charCodeAt(v)===59?(he=F,v++):(he=n,J===0&&K(M)),he!==n?(ye=ee(),ye!==n?(It=ol(),It!==n?(ot=b,Q=O(Q,L,It),b=Q):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n),b===n&&(b=v,Q=bA(),Q!==n?(T=ee(),T!==n?(t.charCodeAt(v)===91?(L=_,v++):(L=n,J===0&&K(H)),L!==n?(V=ee(),V!==n?(he=N7(),he!==n?(ye=ee(),ye!==n?(t.charCodeAt(v)===93?(It=G,v++):(It=n,J===0&&K(q)),It!==n?(jn=ee(),jn!==n?(Cn=Ft(),Cn!==n?(Wn=ee(),Wn!==n?(t.charCodeAt(v)===59?(bn=F,v++):(bn=n,J===0&&K(M)),bn!==n?(Xn=ee(),Xn!==n?(En=ol(),En!==n?(ot=b,Q=Z(Q,he,Cn,En),b=Q):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n),b===n&&(b=v,Q=bA(),Q!==n?(T=ee(),T!==n?(t.charCodeAt(v)===40?(L=s,v++):(L=n,J===0&&K(o)),L!==n?(V=ee(),V!==n?(he=F7(),he!==n?(ye=ee(),ye!==n?(t.charCodeAt(v)===41?(It=a,v++):(It=n,J===0&&K(l)),It!==n?(jn=ee(),jn!==n?(Cn=Ft(),Cn!==n?(Wn=ee(),Wn!==n?(t.charCodeAt(v)===59?(bn=F,v++):(bn=n,J===0&&K(M)),bn!==n?(Xn=ee(),Xn!==n?(En=ol(),En!==n?(ot=b,Q=Y(Q,he,Cn,En),b=Q):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n)):(v=b,b=n),b===n&&(b=R7()))),b}function F7(){var b,Q,T,L,V,he,ye;if(b=v,Q=Ft(),Q!==n){for(T=[],L=v,t.charCodeAt(v)===44?(V=we,v++):(V=n,J===0&&K(ze)),V!==n?(he=ee(),he!==n?(ye=Ft(),ye!==n?(ot=L,V=S(Q,ye),L=V):(v=L,L=n)):(v=L,L=n)):(v=L,L=n);L!==n;)T.push(L),L=v,t.charCodeAt(v)===44?(V=we,v++):(V=n,J===0&&K(ze)),V!==n?(he=ee(),he!==n?(ye=Ft(),ye!==n?(ot=L,V=S(Q,ye),L=V):(v=L,L=n)):(v=L,L=n)):(v=L,L=n);T!==n?(ot=b,Q=mn(Q,T),b=Q):(v=b,b=n)}else v=b,b=n;return b}function bA(){var b,Q,T,L;return t.substr(v,3)===jt?(b=jt,v+=3):(b=n,J===0&&K(wn)),b===n&&(t.substr(v,4)===Oi?(b=Oi,v+=4):(b=n,J===0&&K(Qo)),b===n&&(t.substr(v,5)===Vr?(b=Vr,v+=5):(b=n,J===0&&K(U)),b===n&&(t.substr(v,6)===W?(b=W,v+=6):(b=n,J===0&&K($)),b===n&&(t.substr(v,4)===N?(b=N,v+=4):(b=n,J===0&&K(tt)),b===n&&(t.substr(v,5)===oe?(b=oe,v+=5):(b=n,J===0&&K(st)),b===n&&(t.substr(v,5)===nt?(b=nt,v+=5):(b=n,J===0&&K(yn)),b===n&&(t.substr(v,4)===ko?(b=ko,v+=4):(b=n,J===0&&K(h7)),b===n&&(t.substr(v,6)===BE?(b=BE,v+=6):(b=n,J===0&&K(A7)),b===n&&(t.substr(v,7)===SE?(b=SE,v+=7):(b=n,J===0&&K(d7)),b===n&&(t.substr(v,4)===DE?(b=DE,v+=4):(b=n,J===0&&K(g7)),b===n&&(t.substr(v,6)===QE?(b=QE,v+=6):(b=n,J===0&&K(p7)),b===n&&(t.substr(v,6)===kE?(b=kE,v+=6):(b=n,J===0&&K(m7)),b===n&&(t.substr(v,3)===RE?(b=RE,v+=3):(b=n,J===0&&K(w7)),b===n&&(b=v,Q=VE(),Q!==n?(T=ee(),T!==n?(L=JE(),L!==n?(ot=b,Q=y7(Q,L),b=Q):(v=b,b=n)):(v=b,b=n)):(v=b,b=n))))))))))))))),b}function N7(){var b;return b=M7(),b===n&&(b=Ft()),b}function Ft(){var b,Q,T,L,V;if(b=v,Q=v,C7.test(t.charAt(v))?(T=t.charAt(v),v++):(T=n,J===0&&K(b7)),T!==n){for(L=[],FE.test(t.charAt(v))?(V=t.charAt(v),v++):(V=n,J===0&&K(NE));V!==n;)L.push(V),FE.test(t.charAt(v))?(V=t.charAt(v),v++):(V=n,J===0&&K(NE));L!==n?(T=[T,L],Q=T):(v=Q,Q=n)}else v=Q,Q=n;return Q!==n&&(ot=b,Q=E7()),b=Q,b}function KE(){var b,Q,T;for(b=v,Q=[],ME.test(t.charAt(v))?(T=t.charAt(v),v++):(T=n,J===0&&K(TE));T!==n;)Q.push(T),ME.test(t.charAt(v))?(T=t.charAt(v),v++):(T=n,J===0&&K(TE));return Q!==n&&(ot=b,Q=I7(Q)),b=Q,b}function M7(){var b,Q,T,L;if(J++,b=v,Q=ee(),Q!==n){if(T=[],PE.test(t.charAt(v))?(L=t.charAt(v),v++):(L=n,J===0&&K(LE)),L!==n)for(;L!==n;)T.push(L),PE.test(t.charAt(v))?(L=t.charAt(v),v++):(L=n,J===0&&K(LE));else T=n;T!==n?(ot=b,Q=v7(),b=Q):(v=b,b=n)}else v=b,b=n;return J--,b===n&&(Q=n,J===0&&K(x7)),b}function ee(){var b,Q;for(J++,b=[],OE.test(t.charAt(v))?(Q=t.charAt(v),v++):(Q=n,J===0&&K(UE));Q!==n;)b.push(Q),OE.test(t.charAt(v))?(Q=t.charAt(v),v++):(Q=n,J===0&&K(UE));return J--,b===n&&(Q=n,J===0&&K(B7)),b}if(sl=r(),sl!==n&&v===t.length)return sl;throw sl!==n&&v<t.length&&K(S7()),D7(yA,Wt<t.length?t.charAt(Wt):null,Wt<t.length?HE(Wt,Wt+1):HE(Wt,Wt))}const BC={SyntaxError:Rr,parse:aP},Th=Object.fromEntries(Object.entries(Object.freeze(Object.defineProperty({__proto__:null,bigChain:`table bigChain
|
|
663
675
|
"bigChain pairwise alignment"
|
|
664
676
|
(
|
|
665
677
|
string chrom; "Reference sequence chromosome or scaffold"
|
|
@@ -818,19 +830,19 @@ chrM 16299`};function G4(t){if(!(t in am))throw new Error(`Unknown assembly: ${t
|
|
|
818
830
|
float score; "Floating point score."
|
|
819
831
|
char[1] leftStatus; "Gap/break annotation for preceding block"
|
|
820
832
|
char[1] rightStatus; "Gap/break annotation for following block"
|
|
821
|
-
)`},Symbol.toStringTag,{value:"Module"}))).map(([t,e])=>[t,Jy.parse(e.trim())]));function BA(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 PT={".":0,"-":-1,"+":1};function LT(t){return t.length>=12&&!Number.isNaN(Number.parseInt(t[9],10))&&t[10]?.split(",").filter(e=>!!e).length===Number.parseInt(t[9],10)}class OT{constructor(e={}){if(e.autoSql)this.autoSql=BA(Jy.parse(e.autoSql));else if(e.type){if(!xA[e.type])throw new Error("Type not found");this.autoSql=BA(xA[e.type])}else this.autoSql=BA(xA.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(e,n={}){const{autoSql:i}=this,{uniqueId:r}=n,s=Array.isArray(e)?e:e.split(" ");let o={};if(!this.attemptDefaultBed||this.attemptDefaultBed&<(s))for(let a=0;a<i.fields.length;a++){const l=i.fields[a];let c=s[a];const{isNumeric:f,isArray:u,arrayIsNumeric:h,name:A}=l;if(c==null)break;if(c!=="."){if(f){const d=Number(c);c=Number.isNaN(d)?c:d}else u&&(c=c.split(","),c.at(-1)===""&&c.pop(),h&&(c=c.map(Number)));o[A]=c}}else{const a=["chrom","chromStart","chromEnd","name"];o=Object.fromEntries(s.map((l,c)=>[a[c]||"field"+c,l])),o.chromStart=+o.chromStart,o.chromEnd=+o.chromEnd,Number.isNaN(Number.parseFloat(o.field4))||(o.score=+o.field4,delete o.field4),(o.field5==="+"||o.field5==="-")&&(o.strand=o.field5,delete o.field5)}return r&&(o.uniqueId=r),o.strand=PT[o.strand]||0,o.chrom=decodeURIComponent(o.chrom),o}}const UT=Object.freeze(Object.defineProperty({__proto__:null,default:OT},Symbol.toStringTag,{value:"Module"}));var Fe=function(t,e,n,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(t,n):r?r.value=n:e.set(t,n),n},P=function(t,e,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(t):i?i.value:e.get(t)},fe,ft,ue,ye,Bi,uo,vi,Ic,kt,qy,vA,SA,QA,Ky,bc;class Ao extends Map{constructor(e={}){if(super(),fe.add(this),ft.set(this,0),ue.set(this,new Map),ye.set(this,new Map),Bi.set(this,void 0),uo.set(this,void 0),vi.set(this,void 0),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");Fe(this,Bi,e.maxSize,"f"),Fe(this,uo,e.maxAge||Number.POSITIVE_INFINITY,"f"),Fe(this,vi,e.onEviction,"f")}get __oldCache(){return P(this,ye,"f")}get(e){if(P(this,ue,"f").has(e)){const n=P(this,ue,"f").get(e);return P(this,fe,"m",vA).call(this,e,n)}if(P(this,ye,"f").has(e)){const n=P(this,ye,"f").get(e);if(!P(this,fe,"m",kt).call(this,e,n))return P(this,fe,"m",Ky).call(this,e,n),n.value}}set(e,n,{maxAge:i=P(this,uo,"f")}={}){const r=typeof i=="number"&&i!==Number.POSITIVE_INFINITY?Date.now()+i:void 0;return P(this,ue,"f").has(e)?P(this,ue,"f").set(e,{value:n,expiry:r}):P(this,fe,"m",QA).call(this,e,{value:n,expiry:r}),this}has(e){return P(this,ue,"f").has(e)?!P(this,fe,"m",kt).call(this,e,P(this,ue,"f").get(e)):P(this,ye,"f").has(e)?!P(this,fe,"m",kt).call(this,e,P(this,ye,"f").get(e)):!1}peek(e){if(P(this,ue,"f").has(e))return P(this,fe,"m",SA).call(this,e,P(this,ue,"f"));if(P(this,ye,"f").has(e))return P(this,fe,"m",SA).call(this,e,P(this,ye,"f"))}expiresIn(e){const n=P(this,ue,"f").get(e)??P(this,ye,"f").get(e);if(n)return n.expiry?n.expiry-Date.now():Number.POSITIVE_INFINITY}delete(e){var n;const i=P(this,ue,"f").delete(e);return i&&Fe(this,ft,(n=P(this,ft,"f"),n--,n),"f"),P(this,ye,"f").delete(e)||i}clear(){P(this,ue,"f").clear(),P(this,ye,"f").clear(),Fe(this,ft,0,"f")}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");const n=[...P(this,fe,"m",bc).call(this)],i=n.length-e;i<0?(Fe(this,ue,new Map(n),"f"),Fe(this,ye,new Map,"f"),Fe(this,ft,n.length,"f")):(i>0&&P(this,fe,"m",Ic).call(this,n.slice(0,i)),Fe(this,ye,new Map(n.slice(i)),"f"),Fe(this,ue,new Map,"f"),Fe(this,ft,0,"f")),Fe(this,Bi,e,"f")}evict(e=1){const n=e;if(!n||n<=0)return;const i=[...P(this,fe,"m",bc).call(this)],r=Math.trunc(Math.min(n,Math.max(i.length-1,0)));r<=0||(P(this,fe,"m",Ic).call(this,i.slice(0,r)),Fe(this,ye,new Map(i.slice(r)),"f"),Fe(this,ue,new Map,"f"),Fe(this,ft,0,"f"))}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[(ft=new WeakMap,ue=new WeakMap,ye=new WeakMap,Bi=new WeakMap,uo=new WeakMap,vi=new WeakMap,fe=new WeakSet,Ic=function(n){if(typeof P(this,vi,"f")=="function")for(const[i,r]of n)P(this,vi,"f").call(this,i,r.value)},kt=function(n,i){return typeof i.expiry=="number"&&i.expiry<=Date.now()?(typeof P(this,vi,"f")=="function"&&P(this,vi,"f").call(this,n,i.value),this.delete(n)):!1},qy=function(n,i){if(!P(this,fe,"m",kt).call(this,n,i))return i.value},vA=function(n,i){return i.expiry?P(this,fe,"m",qy).call(this,n,i):i.value},SA=function(n,i){const r=i.get(n);return P(this,fe,"m",vA).call(this,n,r)},QA=function(n,i){var r;P(this,ue,"f").set(n,i),Fe(this,ft,(r=P(this,ft,"f"),r++,r),"f"),P(this,ft,"f")>=P(this,Bi,"f")&&(Fe(this,ft,0,"f"),P(this,fe,"m",Ic).call(this,P(this,ye,"f")),Fe(this,ye,P(this,ue,"f"),"f"),Fe(this,ue,new Map,"f"))},Ky=function(n,i){P(this,ye,"f").delete(n),P(this,fe,"m",QA).call(this,n,i)},bc=function*(){for(const n of P(this,ye,"f")){const[i,r]=n;P(this,ue,"f").has(i)||P(this,fe,"m",kt).call(this,i,r)||(yield n)}for(const n of P(this,ue,"f")){const[i,r]=n;P(this,fe,"m",kt).call(this,i,r)||(yield n)}},Symbol.iterator)](){for(const e of P(this,ue,"f")){const[n,i]=e;P(this,fe,"m",kt).call(this,n,i)||(yield[n,i.value])}for(const e of P(this,ye,"f")){const[n,i]=e;P(this,ue,"f").has(n)||P(this,fe,"m",kt).call(this,n,i)||(yield[n,i.value])}}*entriesDescending(){let e=[...P(this,ue,"f")];for(let n=e.length-1;n>=0;--n){const i=e[n],[r,s]=i;P(this,fe,"m",kt).call(this,r,s)||(yield[r,s.value])}e=[...P(this,ye,"f")];for(let n=e.length-1;n>=0;--n){const i=e[n],[r,s]=i;P(this,ue,"f").has(r)||P(this,fe,"m",kt).call(this,r,s)||(yield[r,s.value])}}*entriesAscending(){for(const[e,n]of P(this,fe,"m",bc).call(this))yield[e,n.value]}get size(){if(!P(this,ft,"f"))return P(this,ye,"f").size;let e=0;for(const n of P(this,ye,"f").keys())P(this,ue,"f").has(n)||e++;return Math.min(P(this,ft,"f")+e,P(this,Bi,"f"))}get maxSize(){return P(this,Bi,"f")}get maxAge(){return P(this,uo,"f")}entries(){return this.entriesAscending()}forEach(e,n=this){for(const[i,r]of this.entriesAscending())e.call(n,r,i,this)}get[Symbol.toStringTag](){return"QuickLRU"}toString(){return`QuickLRU(${this.size}/${this.maxSize})`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}let jy=class{constructor(e,n,i,r){this.minv=e,this.maxv=n,this.bin=i,this._fetchedSize=r}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}};const Wy=65536,_T=Wy*Wy;function GT(t,e=0){const n=t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24;return((t[e+4]|t[e+5]<<8|t[e+6]<<16|t[e+7]<<24)>>>0)*_T+(n>>>0)}function zT(t={}){return"aborted"in t?{signal:t}:t}function DA(t,e){const n=t.length;if(n===0)return t;let i;if(e){const l=e.blockPosition,c=e.dataPosition;i=[];for(let f=0;f<n;f++){const u=t[f],h=u.maxv;(h.blockPosition-l||h.dataPosition-c)>0&&i.push(u)}if(i.length===0)return i}else i=t;i.sort((l,c)=>{const f=l.minv.blockPosition-c.minv.blockPosition;return f!==0?f:l.minv.dataPosition-c.minv.dataPosition});const r=[];let s=i[0];r.push(s);let o=s.minv.blockPosition,a=s.maxv.blockPosition;for(let l=1;l<i.length;l++){const c=i[l],f=c.minv.blockPosition,u=c.maxv.blockPosition;if(f-a<65e3&&u-o<5e6){const h=c.maxv,A=s.maxv;(u-a||h.dataPosition-A.dataPosition)>0&&(s.maxv=h,a=u)}else r.push(c),s=c,o=f,a=u}return r}function Xy(t,e){return{lineCount:GT(t,e)}}function ho(t,e){return t?t.compareTo(e)>0?e:t:e}function HT(t,e=n=>n){let n=0,i=0;const r=[],s={};for(let o=0;o<t.length;o+=1)if(!t[o]){if(i<o){let a="";for(let l=i;l<o;l++)a+=String.fromCharCode(t[l]);a=e(a),r[n]=a,s[a]=n}i=o+1,n+=1}return{refNameToId:s,refIdToName:r}}function YT(t){let e=0;for(const r of t)e+=r.length;const n=new Uint8Array(e);let i=0;for(const r of t)n.set(r,i),i+=r.length;return n}function VT(t,e,n){return!!((t&e)!==e||t&n)}function JT(t,e){return e==="*"?t===void 0:`${t}`!=`${e}`}function qT(t){if(!t)return"";const{flagInclude:e=0,flagExclude:n=0,tagFilter:i}=t,r=i?`:${i.tag}=${i.value??"*"}`:"";return`:f${e}x${n}${r}`}let Zy=class{constructor({filehandle:e,renameRefSeq:n=i=>i}){this.filehandle=e,this.renameRefSeq=n}async estimatedBytesForRegions(e,n){const i=await Promise.all(e.map(o=>this.blocksForRange(o.refId,o.start,o.end,n))),r=DA(i.flat());let s=0;for(const o of r)s+=o.fetchedSize();return s}},$y=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}};function Gn(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new $y(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])}const KT=21578050;function jT(t,e){return t-t%e}function WT(t,e){return t-t%e+e}function XT(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 vr extends Zy{async lineCount(e,n){return(await this.parse(n)).indices(e)?.stats?.lineCount||0}async _parse(e){const n=await this.filehandle.readFile(),i=new DataView(n.buffer);if(i.getUint32(0,!0)!==KT)throw new Error("Not a BAI file");const r=i.getInt32(4,!0),o=((1<<(5+1)*3)-1)/7;let a=8,l;const c=[];for(let h=0;h<r;h++){c.push(a);const A=i.getInt32(a,!0);a+=4;for(let m=0;m<A;m+=1){const p=i.getUint32(a,!0);if(a+=4,p===o+1)a+=4,a+=32;else{if(p>o+1)throw new Error("bai index contains too many bins, please use CSI");{const w=i.getInt32(a,!0);a+=4;for(let C=0;C<w;C++)a+=8,a+=8}}}const d=i.getInt32(a,!0);a+=4;const g=new Array(d);for(let m=0;m<d;m++){const p=Gn(n,a);a+=8,l=ho(l,p),g[m]=p}}const f=new Ao({maxSize:5});function u(h){let A=c[h];if(A===void 0)return;const d=i.getInt32(A,!0);let g;A+=4;const m={};for(let C=0;C<d;C+=1){const y=i.getUint32(A,!0);if(A+=4,y===o+1)A+=4,g=Xy(n,A+16),A+=32;else{if(y>o+1)throw new Error("bai index contains too many bins, please use CSI");{const b=i.getInt32(A,!0);A+=4;const x=new Array(b);for(let I=0;I<b;I++){const S=Gn(n,A);A+=8;const Q=Gn(n,A);A+=8,l=ho(l,S),x[I]=new jy(S,Q,y)}m[y]=x}}}const p=i.getInt32(A,!0);A+=4;const w=new Array(p);for(let C=0;C<p;C++){const y=Gn(n,A);A+=8,l=ho(l,y),w[C]=y}return{binIndex:m,linearIndex:w,stats:g}}return{bai:!0,firstDataLine:l,maxBlockSize:65536,indices:h=>{if(!f.has(h)){const A=u(h);return A&&f.set(h,A),A}return f.get(h)},refCount:r}}async indexCov(e,n,i,r){const o=n!==void 0,l=(await this.parse(r)).indices(e);if(!l)return[];const{linearIndex:c,stats:f}=l;if(c.length===0)return[];const u=i===void 0?(c.length-1)*16384:WT(i,16384),h=n===void 0?0:jT(n,16384),A=o?new Array((u-h)/16384):new Array(c.length-1),d=c[c.length-1].blockPosition;if(u>(c.length-1)*16384)throw new Error("query outside of range of linear index");let g=c[h/16384].blockPosition;for(let m=h/16384,p=0;m<u/16384;m++,p++)A[p]={score:c[m+1].blockPosition-g,start:m*16384,end:m*16384+16384},g=c[m+1].blockPosition;return A.map(m=>({...m,score:m.score*(f?.lineCount||0)/d}))}async blocksForRange(e,n,i,r={}){n<0&&(n=0);const s=await this.parse(r);if(!s)return[];const o=s.indices(e);if(!o)return[];const a=XT(n,i),l=[],{binIndex:c}=o;for(const[d,g]of a)for(let m=d;m<=g;m++){const p=c[m];if(p)for(let w=0,C=p.length;w<C;w++)l.push(p[w])}const{linearIndex:f}=o,u=f.length,h=Math.min(n>>14,u-1),A=f[h];return DA(l,A)}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={}){return!!(await this.parse(n)).indices(e)?.binIndex}}var eC=0,tC=2,xc=4,Si=0,Bc=1,ZT=2,$T=-5;function e5(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function t5(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(var i in n)e5(n,i)&&(t[i]=n[i])}}return t}function nC(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)}var go={arraySet:function(t,e,n,i,r){if(e.subarray&&t.subarray){t.set(e.subarray(n,n+i),r);return}for(var s=0;s<i;s++)t[r+s]=e[n+s]},flattenChunks:function(t){var e,n,i,r,s,o;for(i=0,e=0,n=t.length;e<n;e++)i+=t[e].length;for(o=new Uint8Array(i),r=0,e=0,n=t.length;e<n;e++)s=t[e],o.set(s,r),r+=s.length;return o},Buf8:function(t){return new Uint8Array(t)},Buf16:function(t){return new Uint16Array(t)},Buf32:function(t){return new Int32Array(t)}},po={arraySet:function(t,e,n,i,r){for(var s=0;s<i;s++)t[r+s]=e[n+s]},flattenChunks:function(t){return[].concat.apply([],t)},Buf8:function(t){return new Array(t)},Buf16:function(t){return new Array(t)},Buf32:function(t){return new Array(t)}};let Sr=()=>{const t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";return Sr=()=>t,t},zn=(t,e,n,i,r)=>(zn=Sr()?go.arraySet:po.arraySet,zn(t,e,n,i,r)),kA=t=>(kA=Sr()?go.flattenChunks:po.flattenChunks,kA(t)),Qr=t=>(Qr=Sr()?go.Buf8:po.Buf8,Qr(t)),Dr=t=>(Dr=Sr()?go.Buf16:po.Buf16,Dr(t)),kr=t=>(kr=Sr()?go.Buf32:po.Buf32,kr(t)),iC=function(){let t=!0;try{String.fromCharCode.apply(null,[0])}catch{t=!1}return iC=()=>t,t},rC=function(){let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{t=!1}return rC=()=>t,t},FA=function(t){for(var e=Qr(256),n=0;n<256;n++)e[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;return e[254]=e[254]=1,FA=i=>e[i],e[t]};function sC(t){var e,n,i,r,s,o=t.length,a=0;for(r=0;r<o;r++)n=t.charCodeAt(r),(n&64512)===55296&&r+1<o&&(i=t.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(a),s=0,r=0;s<a;r++)n=t.charCodeAt(r),(n&64512)===55296&&r+1<o&&(i=t.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),n<128?e[s++]=n:n<2048?(e[s++]=192|n>>>6,e[s++]=128|n&63):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|n&63):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|n&63);return e}function n5(t,e){if(e<65534&&(t.subarray&&rC()||!t.subarray&&iC()))return String.fromCharCode.apply(null,nC(t,e));for(var n="",i=0;i<e;i++)n+=String.fromCharCode(t[i]);return n}function i5(t){for(var e=new Uint8Array(t.length),n=0,i=e.length;n<i;n++)e[n]=t.charCodeAt(n);return e}function r5(t,e){var n,i,r,s,o=e||t.length,a=new Array(o*2);for(i=0,n=0;n<o;){if(r=t[n++],r<128){a[i++]=r;continue}if(s=FA(r),s>4){a[i++]=65533,n+=s-1;continue}for(r&=s===2?31:s===3?15:7;s>1&&n<o;)r=r<<6|t[n++]&63,s--;if(s>1){a[i++]=65533;continue}r<65536?a[i++]=r:(r-=65536,a[i++]=55296|r>>10&1023,a[i++]=56320|r&1023)}return n5(a,i)}function s5(t,e){var n;for(e=e||t.length,e>t.length&&(e=t.length),n=e-1;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+FA(t[n])>e?n:e}function o5(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}function RA(t,e,n,i){for(var r=t&65535|0,s=t>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do r=r+e[i++]|0,s=s+r|0;while(--o);r%=65521,s%=65521}return r|s<<16|0}function a5(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e}let oC=function(){const t=a5();return oC=()=>t,t};function Jt(t,e,n,i){var r=oC(),s=i+n;t^=-1;for(var o=i;o<s;o++)t=t>>>8^r[(t^e[o])&255];return t^-1}var vc=30,c5=12;function l5(t,e){var n,i,r,s,o,a,l,c,f,u,h,A,d,g,m,p,w,C,y,b,x,I,S,Q,v;n=t.state,i=t.next_in,Q=t.input,r=i+(t.avail_in-5),s=t.next_out,v=t.output,o=s-(e-t.avail_out),a=s+(t.avail_out-257),l=n.dmax,c=n.wsize,f=n.whave,u=n.wnext,h=n.window,A=n.hold,d=n.bits,g=n.lencode,m=n.distcode,p=(1<<n.lenbits)-1,w=(1<<n.distbits)-1;e:do{d<15&&(A+=Q[i++]<<d,d+=8,A+=Q[i++]<<d,d+=8),C=g[A&p];t:for(;;){if(y=C>>>24,A>>>=y,d-=y,y=C>>>16&255,y===0)v[s++]=C&65535;else if(y&16){b=C&65535,y&=15,y&&(d<y&&(A+=Q[i++]<<d,d+=8),b+=A&(1<<y)-1,A>>>=y,d-=y),d<15&&(A+=Q[i++]<<d,d+=8,A+=Q[i++]<<d,d+=8),C=m[A&w];n:for(;;){if(y=C>>>24,A>>>=y,d-=y,y=C>>>16&255,y&16){if(x=C&65535,y&=15,d<y&&(A+=Q[i++]<<d,d+=8,d<y&&(A+=Q[i++]<<d,d+=8)),x+=A&(1<<y)-1,x>l){t.msg="invalid distance too far back",n.mode=vc;break e}if(A>>>=y,d-=y,y=s-o,x>y){if(y=x-y,y>f&&n.sane){t.msg="invalid distance too far back",n.mode=vc;break e}if(I=0,S=h,u===0){if(I+=c-y,y<b){b-=y;do v[s++]=h[I++];while(--y);I=s-x,S=v}}else if(u<y){if(I+=c+u-y,y-=u,y<b){b-=y;do v[s++]=h[I++];while(--y);if(I=0,u<b){y=u,b-=y;do v[s++]=h[I++];while(--y);I=s-x,S=v}}}else if(I+=u-y,y<b){b-=y;do v[s++]=h[I++];while(--y);I=s-x,S=v}for(;b>2;)v[s++]=S[I++],v[s++]=S[I++],v[s++]=S[I++],b-=3;b&&(v[s++]=S[I++],b>1&&(v[s++]=S[I++]))}else{I=s-x;do v[s++]=v[I++],v[s++]=v[I++],v[s++]=v[I++],b-=3;while(b>2);b&&(v[s++]=v[I++],b>1&&(v[s++]=v[I++]))}}else if((y&64)===0){C=m[(C&65535)+(A&(1<<y)-1)];continue n}else{t.msg="invalid distance code",n.mode=vc;break e}break}}else if((y&64)===0){C=g[(C&65535)+(A&(1<<y)-1)];continue t}else if(y&32){n.mode=c5;break e}else{t.msg="invalid literal/length code",n.mode=vc;break e}break}}while(i<r&&s<a);b=d>>3,i-=b,d-=b<<3,A&=(1<<d)-1,t.next_in=i,t.next_out=s,t.avail_in=i<r?5+(r-i):5-(i-r),t.avail_out=s<a?257+(a-s):257-(s-a),n.hold=A,n.bits=d}var Fr=15,aC=852,cC=592,lC=0,NA=1,fC=2,f5=[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],u5=[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],A5=[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],h5=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function mo(t,e,n,i,r,s,o,a){var l=a.bits,c=0,f=0,u=0,h=0,A=0,d=0,g=0,m=0,p=0,w=0,C,y,b,x,I,S=null,Q=0,v,F=Dr(Fr+1),R=Dr(Fr+1),M=null,O=0,z,_,Y;for(c=0;c<=Fr;c++)F[c]=0;for(f=0;f<i;f++)F[e[n+f]]++;for(A=l,h=Fr;h>=1&&F[h]===0;h--);if(A>h&&(A=h),h===0)return r[s++]=1<<24|64<<16|0,r[s++]=1<<24|64<<16|0,a.bits=1,0;for(u=1;u<h&&F[u]===0;u++);for(A<u&&(A=u),m=1,c=1;c<=Fr;c++)if(m<<=1,m-=F[c],m<0)return-1;if(m>0&&(t===lC||h!==1))return-1;for(R[1]=0,c=1;c<Fr;c++)R[c+1]=R[c]+F[c];for(f=0;f<i;f++)e[n+f]!==0&&(o[R[e[n+f]]++]=f);if(t===lC?(S=M=o,v=19):t===NA?(S=f5,Q-=257,M=u5,O-=257,v=256):(S=A5,M=h5,v=-1),w=0,f=0,c=u,I=s,d=A,g=0,b=-1,p=1<<A,x=p-1,t===NA&&p>aC||t===fC&&p>cC)return 1;for(;;){z=c-g,o[f]<v?(_=0,Y=o[f]):o[f]>v?(_=M[O+o[f]],Y=S[Q+o[f]]):(_=96,Y=0),C=1<<c-g,y=1<<d,u=y;do y-=C,r[I+(w>>g)+y]=z<<24|_<<16|Y|0;while(y!==0);for(C=1<<c-1;w&C;)C>>=1;if(C!==0?(w&=C-1,w+=C):w=0,f++,--F[c]===0){if(c===h)break;c=e[n+o[f]]}if(c>A&&(w&x)!==b){for(g===0&&(g=A),I+=u,d=c-g,m=1<<d;d+g<h&&(m-=F[d+g],!(m<=0));)d++,m<<=1;if(p+=1<<d,t===NA&&p>aC||t===fC&&p>cC)return 1;b=w&x,r[b]=A<<24|d<<16|I-s|0}}return w!==0&&(r[I+w]=c-g<<24|64<<16|0),a.bits=A,0}var d5=0,uC=1,AC=2,hC=4,Qi=0,g5=1,p5=2,Ct=-2,dC=-3,gC=-4,m5=-5,pC=8,mC=1,wC=2,yC=3,CC=4,EC=5,IC=6,bC=7,xC=8,BC=9,vC=10,Sc=11,un=12,MA=13,SC=14,TA=15,QC=16,DC=17,kC=18,FC=19,Qc=20,Dc=21,RC=22,NC=23,MC=24,TC=25,PC=26,PA=27,LC=28,OC=29,me=30,UC=31,w5=32,y5=852,C5=592;function _C(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function E5(){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=Dr(320),this.work=Dr(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function I5(t){var e;return!t||!t.state?Ct:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=mC,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=kr(y5),e.distcode=e.distdyn=kr(C5),e.sane=1,e.back=-1,Qi)}function b5(t){var e;return!t||!t.state?Ct:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,I5(t))}function x5(t,e){var n,i;return!t||!t.state||(i=t.state,e<0?(n=0,e=-e):(n=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?Ct:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=n,i.wbits=e,b5(t))}function B5(t,e){var n,i;return t?(i=new E5,t.state=i,i.window=null,n=x5(t,e),n!==Qi&&(t.state=null),n):Ct}var GC=!0,LA,OA;function v5(t){if(GC){var e;for(LA=kr(512),OA=kr(32),e=0;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(mo(uC,t.lens,0,288,LA,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;mo(AC,t.lens,0,32,OA,0,t.work,{bits:5}),GC=!1}t.lencode=LA,t.lenbits=9,t.distcode=OA,t.distbits=5}function zC(t,e,n,i){var r,s=t.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=Qr(s.wsize)),i>=s.wsize?(zn(s.window,e,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(r=s.wsize-s.wnext,r>i&&(r=i),zn(s.window,e,n-i,r,s.wnext),i-=r,i?(zn(s.window,e,n-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=r))),0}function S5(t,e){var n,i,r,s,o,a,l,c,f,u,h,A,d,g,m=0,p,w,C,y,b,x,I,S,Q=Qr(4),v,F,R=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&t.avail_in!==0)return Ct;n=t.state,n.mode===un&&(n.mode=MA),o=t.next_out,r=t.output,l=t.avail_out,s=t.next_in,i=t.input,a=t.avail_in,c=n.hold,f=n.bits,u=a,h=l,S=Qi;e:for(;;)switch(n.mode){case mC:if(n.wrap===0){n.mode=MA;break}for(;f<16;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(n.wrap&2&&c===35615){n.check=0,Q[0]=c&255,Q[1]=c>>>8&255,n.check=Jt(n.check,Q,2,0),c=0,f=0,n.mode=wC;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",n.mode=me;break}if((c&15)!==pC){t.msg="unknown compression method",n.mode=me;break}if(c>>>=4,f-=4,I=(c&15)+8,n.wbits===0)n.wbits=I;else if(I>n.wbits){t.msg="invalid window size",n.mode=me;break}n.dmax=1<<I,t.adler=n.check=1,n.mode=c&512?vC:un,c=0,f=0;break;case wC:for(;f<16;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(n.flags=c,(n.flags&255)!==pC){t.msg="unknown compression method",n.mode=me;break}if(n.flags&57344){t.msg="unknown header flags set",n.mode=me;break}n.head&&(n.head.text=c>>8&1),n.flags&512&&(Q[0]=c&255,Q[1]=c>>>8&255,n.check=Jt(n.check,Q,2,0)),c=0,f=0,n.mode=yC;case yC:for(;f<32;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.head&&(n.head.time=c),n.flags&512&&(Q[0]=c&255,Q[1]=c>>>8&255,Q[2]=c>>>16&255,Q[3]=c>>>24&255,n.check=Jt(n.check,Q,4,0)),c=0,f=0,n.mode=CC;case CC:for(;f<16;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&(Q[0]=c&255,Q[1]=c>>>8&255,n.check=Jt(n.check,Q,2,0)),c=0,f=0,n.mode=EC;case EC:if(n.flags&1024){for(;f<16;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&(Q[0]=c&255,Q[1]=c>>>8&255,n.check=Jt(n.check,Q,2,0)),c=0,f=0}else n.head&&(n.head.extra=null);n.mode=IC;case IC:if(n.flags&1024&&(A=n.length,A>a&&(A=a),A&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),zn(n.head.extra,i,s,A,I)),n.flags&512&&(n.check=Jt(n.check,i,A,s)),a-=A,s+=A,n.length-=A),n.length))break e;n.length=0,n.mode=bC;case bC:if(n.flags&2048){if(a===0)break e;A=0;do I=i[s+A++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I));while(I&&A<a);if(n.flags&512&&(n.check=Jt(n.check,i,A,s)),a-=A,s+=A,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=xC;case xC:if(n.flags&4096){if(a===0)break e;A=0;do I=i[s+A++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I));while(I&&A<a);if(n.flags&512&&(n.check=Jt(n.check,i,A,s)),a-=A,s+=A,I)break e}else n.head&&(n.head.comment=null);n.mode=BC;case BC:if(n.flags&512){for(;f<16;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(c!==(n.check&65535)){t.msg="header crc mismatch",n.mode=me;break}c=0,f=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=un;break;case vC:for(;f<32;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}t.adler=n.check=_C(c),c=0,f=0,n.mode=Sc;case Sc:if(n.havedict===0)return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=f,p5;t.adler=n.check=1,n.mode=un;case un:case MA:if(n.last){c>>>=f&7,f-=f&7,n.mode=PA;break}for(;f<3;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}switch(n.last=c&1,c>>>=1,f-=1,c&3){case 0:n.mode=SC;break;case 1:v5(n),n.mode=Qc;break;case 2:n.mode=DC;break;case 3:t.msg="invalid block type",n.mode=me}c>>>=2,f-=2;break;case SC:for(c>>>=f&7,f-=f&7;f<32;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if((c&65535)!==(c>>>16^65535)){t.msg="invalid stored block lengths",n.mode=me;break}n.length=c&65535,c=0,f=0,n.mode=TA;case TA:n.mode=QC;case QC:if(A=n.length,A){if(A>a&&(A=a),A>l&&(A=l),A===0)break e;zn(r,i,s,A,o),a-=A,s+=A,l-=A,o+=A,n.length-=A;break}n.mode=un;break;case DC:for(;f<14;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(n.nlen=(c&31)+257,c>>>=5,f-=5,n.ndist=(c&31)+1,c>>>=5,f-=5,n.ncode=(c&15)+4,c>>>=4,f-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=me;break}n.have=0,n.mode=kC;case kC:for(;n.have<n.ncode;){for(;f<3;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.lens[R[n.have++]]=c&7,c>>>=3,f-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,v={bits:n.lenbits},S=mo(d5,n.lens,0,19,n.lencode,0,n.work,v),n.lenbits=v.bits,S){t.msg="invalid code lengths set",n.mode=me;break}n.have=0,n.mode=FC;case FC:for(;n.have<n.nlen+n.ndist;){for(;m=n.lencode[c&(1<<n.lenbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=f);){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(C<16)c>>>=p,f-=p,n.lens[n.have++]=C;else{if(C===16){for(F=p+2;f<F;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(c>>>=p,f-=p,n.have===0){t.msg="invalid bit length repeat",n.mode=me;break}I=n.lens[n.have-1],A=3+(c&3),c>>>=2,f-=2}else if(C===17){for(F=p+3;f<F;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}c>>>=p,f-=p,I=0,A=3+(c&7),c>>>=3,f-=3}else{for(F=p+7;f<F;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}c>>>=p,f-=p,I=0,A=11+(c&127),c>>>=7,f-=7}if(n.have+A>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=me;break}for(;A--;)n.lens[n.have++]=I}}if(n.mode===me)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=me;break}if(n.lenbits=9,v={bits:n.lenbits},S=mo(uC,n.lens,0,n.nlen,n.lencode,0,n.work,v),n.lenbits=v.bits,S){t.msg="invalid literal/lengths set",n.mode=me;break}if(n.distbits=6,n.distcode=n.distdyn,v={bits:n.distbits},S=mo(AC,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,v),n.distbits=v.bits,S){t.msg="invalid distances set",n.mode=me;break}n.mode=Qc;case Qc:n.mode=Dc;case Dc:if(a>=6&&l>=258){t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=f,l5(t,h),o=t.next_out,r=t.output,l=t.avail_out,s=t.next_in,i=t.input,a=t.avail_in,c=n.hold,f=n.bits,n.mode===un&&(n.back=-1);break}for(n.back=0;m=n.lencode[c&(1<<n.lenbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=f);){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(w&&(w&240)===0){for(y=p,b=w,x=C;m=n.lencode[x+((c&(1<<y+b)-1)>>y)],p=m>>>24,w=m>>>16&255,C=m&65535,!(y+p<=f);){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}c>>>=y,f-=y,n.back+=y}if(c>>>=p,f-=p,n.back+=p,n.length=C,w===0){n.mode=PC;break}if(w&32){n.back=-1,n.mode=un;break}if(w&64){t.msg="invalid literal/length code",n.mode=me;break}n.extra=w&15,n.mode=RC;case RC:if(n.extra){for(F=n.extra;f<F;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,f-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=NC;case NC:for(;m=n.distcode[c&(1<<n.distbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=f);){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if((w&240)===0){for(y=p,b=w,x=C;m=n.distcode[x+((c&(1<<y+b)-1)>>y)],p=m>>>24,w=m>>>16&255,C=m&65535,!(y+p<=f);){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}c>>>=y,f-=y,n.back+=y}if(c>>>=p,f-=p,n.back+=p,w&64){t.msg="invalid distance code",n.mode=me;break}n.offset=C,n.extra=w&15,n.mode=MC;case MC:if(n.extra){for(F=n.extra;f<F;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,f-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=me;break}n.mode=TC;case TC:if(l===0)break e;if(A=h-l,n.offset>A){if(A=n.offset-A,A>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=me;break}A>n.wnext?(A-=n.wnext,d=n.wsize-A):d=n.wnext-A,A>n.length&&(A=n.length),g=n.window}else g=r,d=o-n.offset,A=n.length;A>l&&(A=l),l-=A,n.length-=A;do r[o++]=g[d++];while(--A);n.length===0&&(n.mode=Dc);break;case PC:if(l===0)break e;r[o++]=n.length,l--,n.mode=Dc;break;case PA:if(n.wrap){for(;f<32;){if(a===0)break e;a--,c|=i[s++]<<f,f+=8}if(h-=l,t.total_out+=h,n.total+=h,h&&(t.adler=n.check=n.flags?Jt(n.check,r,h,o-h):RA(n.check,r,h,o-h)),h=l,(n.flags?c:_C(c))!==n.check){t.msg="incorrect data check",n.mode=me;break}c=0,f=0}n.mode=LC;case LC:if(n.wrap&&n.flags){for(;f<32;){if(a===0)break e;a--,c+=i[s++]<<f,f+=8}if(c!==(n.total&4294967295)){t.msg="incorrect length check",n.mode=me;break}c=0,f=0}n.mode=OC;case OC:S=g5;break e;case me:S=dC;break e;case UC:return gC;case w5:default:return Ct}return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=f,(n.wsize||h!==t.avail_out&&n.mode<me&&(n.mode<PA||e!==hC))&&zC(t,t.output,t.next_out,h-t.avail_out),u-=t.avail_in,h-=t.avail_out,t.total_in+=u,t.total_out+=h,n.total+=h,n.wrap&&h&&(t.adler=n.check=n.flags?Jt(n.check,r,h,t.next_out-h):RA(n.check,r,h,t.next_out-h)),t.data_type=n.bits+(n.last?64:0)+(n.mode===un?128:0)+(n.mode===Qc||n.mode===TA?256:0),(u===0&&h===0||e===hC)&&S===Qi&&(S=m5),S}function Q5(t){if(!t||!t.state)return Ct;var e=t.state;return e.window&&(e.window=null),t.state=null,Qi}function D5(t,e){var n;return!t||!t.state||(n=t.state,(n.wrap&2)===0)?Ct:(n.head=e,e.done=!1,Qi)}function HC(t,e){var n=e.length,i,r,s;return!t||!t.state||(i=t.state,i.wrap!==0&&i.mode!==Sc)?Ct:i.mode===Sc&&(r=1,r=RA(r,e,n,0),r!==i.check)?dC:(s=zC(t,e,n,n),s?(i.mode=UC,gC):(i.havedict=1,Qi))}const UA={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function k5(){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 _A=Object.prototype.toString;class kc{constructor(e){if(!(this instanceof kc))return new kc(e);this.options=t5({chunkSize:16384,windowBits:0,to:""},e||{});var n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(e&&e.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k5,this.strm.avail_out=0;var i=B5(this.strm,n.windowBits);if(i!==Si)throw new Error(UA[i]);if(this.header=new o5,D5(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=sC(n.dictionary):_A.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(i=HC(this.strm,n.dictionary),i!==Si)))throw new Error(UA[i])}push(e,n){var i=this.strm,r=this.options.chunkSize,s=this.options.dictionary,o,a,l,c,f,u,h=!1;if(this.ended)return!1;a=n===~~n?n:n===!0?xc:eC,typeof e=="string"?i.input=i5(e):_A.call(e)==="[object ArrayBuffer]"?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(i.avail_out===0&&(i.output=Qr(r),i.next_out=0,i.avail_out=r),o=S5(i,eC),o===ZT&&s&&(typeof s=="string"?u=sC(s):_A.call(s)==="[object ArrayBuffer]"?u=new Uint8Array(s):u=s,o=HC(this.strm,u)),o===$T&&h===!0&&(o=Si,h=!1),o!==Bc&&o!==Si)return this.onEnd(o),this.ended=!0,!1;i.next_out&&(i.avail_out===0||o===Bc||i.avail_in===0&&(a===xc||a===tC))&&(this.options.to==="string"?(l=s5(i.output,i.next_out),c=i.next_out-l,f=r5(i.output,l),i.next_out=c,i.avail_out=r-c,c&&zn(i.output,i.output,l,c,0),this.onData(f)):this.onData(nC(i.output,i.next_out))),i.avail_in===0&&i.avail_out===0&&(h=!0)}while((i.avail_in>0||i.avail_out===0)&&o!==Bc);return o===Bc&&(a=xc),a===xc?(o=Q5(this.strm),this.onEnd(o),this.ended=!0,o===Si):(a===tC&&(this.onEnd(Si),i.avail_out=0),!0)}onData(e){this.chunks.push(e)}onEnd(e){e===Si&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=kA(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}}function F5(t,e){var n=new kc(e);if(n.push(t,!0),n.err)throw n.msg||UA[n.err];return n.result}var R5=F5,Di={};Di.d=(t,e)=>{for(var n in e)Di.o(e,n)&&!Di.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},Di.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Di.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var GA={};Di.r(GA),Di.d(GA,{ChunkSliceResult:()=>Nr,DecompressResult:()=>Mr,__wbg_Error_52673b7de5a0ca89:()=>G5,__wbg___wbindgen_throw_dd24417ed36fc46e:()=>z5,__wbg_set_wasm:()=>YC,decompress_all:()=>jC,decompress_block:()=>_5,decompress_chunk_slice:()=>WC});const N5="data:application/wasm;base64,AGFzbQEAAAABfRFgAABgAAF/YAF/AGABfwF/YAJ/fwBgAn9/AX9gA39/fwBgA39/fwF/YAR/f39/AGAEf39/fwF/YAV/f39/fwBgBX9/f39/AX9gBn9/f39/fwBgBn9/f39/fwF/YAd/f39/f39/AGAHf39/f39/fwF/YAh/f39/f39/fwF/Am4CES4vYmd6Zl93YXNtX2JnLmpzJ19fd2JnX19fd2JpbmRnZW5fdGhyb3dfZGQyNDQxN2VkMzZmYzQ2ZQAEES4vYmd6Zl93YXNtX2JnLmpzHF9fd2JnX0Vycm9yXzUyNjczYjdkZTVhMGNhODkABQNsawMPEA4FCQ0CBwcGCAQFBAQFBQYEBAoEBAQEDgYGBAQKBAICBQwICAQGBgYGBgYDBQQDBwIFAwQIBgsCBQICBgQCBQQDAQUEAgYCBAQEBQYNAgcJBQQGBAMFBQQABAAEBAUEBQICAgQBBQAABAUBcAEYGAUDAQARBgkBfwFBgIDAAAsH2gIOBm1lbW9yeQIAG19fd2JnX2NodW5rc2xpY2VyZXN1bHRfZnJlZQAZG19fd2JnX2RlY29tcHJlc3NyZXN1bHRfZnJlZQAgF2NodW5rc2xpY2VyZXN1bHRfYnVmZmVyABobY2h1bmtzbGljZXJlc3VsdF9jcG9zaXRpb25zABUbY2h1bmtzbGljZXJlc3VsdF9kcG9zaXRpb25zABYOZGVjb21wcmVzc19hbGwAHhBkZWNvbXByZXNzX2Jsb2NrABQWZGVjb21w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AELIAFB+AFxIgJBqJ7AAGohASACQbCewABqKAIAIQILIAEgADYCCCACIAA2AgwgACABNgIMIAAgAjYCCA8LQQAgADYCxKBAQQBBACgCvKBAIAFqIgE2ArygQCAAIAFBAXI2AgQgAEEAKALAoEBHDQFBAEEANgK4oEBBAEEANgLAoEAPC0EAIAA2AsCgQEEAQQAoArigQCABaiIBNgK4oEAgACABQQFyNgIEIAAgAWogATYCAA8LC+8CAQV/QQAhAgJAIAFBzf97IABBECAAQRBLGyIAa08NACAAQRAgAUELakF4cSABQQtJGyIDakEMahACIgFFDQAgAUF4aiECAkACQCAAQX9qIgQgAXENACACIQAMAQsgAUF8aiIFKAIAIgZBeHEgBCABakEAIABrcUF4aiIBQQAgACABIAJrQRBLG2oiACACayIBayEEAkAgBkEDcUUNACAAIAQgACgCBEEBcXJBAnI2AgQgACAEaiIEIAQoAgRBAXI2AgQgBSABIAUoAgBBAXFyQQJyNgIAIAIgAWoiBCAEKAIEQQFyNgIEIAIgARAODAELIAIoAgAhAiAAIAQ2AgQgACACIAFqNgIACwJAIAAoAgQiAUEDcUUNACABQXhxIgIgA0EQak0NACAAIAMgAUEBcXJBAnI2AgQgACADaiIBIAIgA2siA0EDcjYCBCAAIAJqIgIgAigCBEEBcjYCBCABIAMQDgsgAEEIaiECCyACC4kDAQR/IAAoAgwhAgJAAkACQAJAIAFBgAJJDQAgACgCGCEDAkACQAJAIAIgAEcNACAAQRRBECAAKAIUIgIbaigCACIBDQFBACECDAILIAAoAggiASACNgIMIAIgATYCCAwBCyAAQRRqIABBEGogAhshBANAIAQhBSABIgJBFGogAkEQaiACKAIUIgEbIQQgAkEUQRAgARtqKAIAIgENAAsgBUEANgIACyADRQ0CAkACQCAAIAAoAhxBAnRBmJ3AAGoiASgCAEYNACADKAIQIABGDQEgAyACNgIUIAINAwwECyABIAI2AgAgAkUNBAwCCyADIAI2AhAgAg0BDAILAkAgAiAAKAIIIgRGDQAgBCACNgIMIAIgBDYCCA8LQQBBACgCsKBAQX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JCgYCAgBA3AgAgAiAHKQIMNwIMIAJBFGogB0EMakEIaikCADcCACACQRxqIAdBHGopAgA3AgAgAkEkaiAHQSRqKQIANwIAIAJBLGogB0EsaigCADYCACACQQhqIQILIAAgATYCCCAAIAJBACABGzYCBCAAQQAgAiABGzYCACAHQTBqJAAPC0EEQTAQYQALyQEBBH8jAEEgayIDJAACQAJAAkAgAiABaiIBIAJPDQBBACEEDAELQQAhBCABIAAoAgAiBUEBdCICIAEgAksbIgJBCCACQQhLGyICQQBIDQBBACEBAkAgBUUNACADIAU2AhwgAyAAKAIENgIUQQEhAQsgAyABNgIYIANBCGpBASACIANBFGoQJyADKAIIQQFHDQEgAygCECEGIAMoAgwhBAsgBCAGQbCFwAAQSgALIAMoAgwhASAAIAI2AgAgACABNgIEIANBIGokAAvRAQEDfyMAQRBrIgMkACADQQRqIAEgAhAMAkAgAkUNACABIAJBARBXCwJAAkACQCADKAIEIgRBgICAgHhHDQBBASEEQQAhASADKAIIIQVBACECDAELIAMoAgghBQJAAkAgBCADKAIMIgJLDQAgBSEBDAELAkAgAg0AQQEhASAFIARBARBXDAELIAUgBEEBIAIQVCIBRQ0CC0EAIQVBACEECyAAIAQ2AgwgACAFNgIIIAAgAjYCBCAAIAE2AgAgA0EQaiQADwtBASACQaiIwAAQSgALygEBBn8jAEEgayICJABBACEDAkAgACgCACIEQf////8BTQ0AQQBBACABEEoACwJAAkAgBEEBdCIFQQQgBUEESxsiBkECdCIFQfz///8HSw0AQQAhAwJAIARFDQAgAiAEQQJ0NgIcIAIgACgCBDYCFEEEIQMLIAIgAzYCGCACQQhqQQQgBSACQRRqECcgAigCCEEBRw0BIAIoAhAhByACKAIMIQMLIAMgByABEEoACyACKAIMIQQgACAGNgIAIAAgBDYCBCACQSBqJAALwAEBA38jAEEQayICJAACQAJAAkACQCABDQAgAEUNASAAQXhqIgEoAgBBAUcNAiAAKAIIIQMgACgCBCEEIAFBADYCAAJAIAFBf0YNACAAQXxqIgAgACgCAEF/aiIANg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HAQICfwJ+IwBBIGsiAiQAAkACQCAAKAIAQYCAgIB4Rg0AIAEgACgCBCAAKAIIEFMhAAwBCyABKAIEIQMgASgCACEBIAAoAgwoAgAiACkCACEEIAApAgghBSACIAApAhA3AhggAiAFNwIQIAIgBDcCCCABIAMgAkEIahALIQALIAJBIGokACAAC4QBAQJ/IwBBEGsiBiQAQQAhByAGQQA2AgwCQAJAAkACQAJAIAEoAgAgAiADIAQgBSAGQQxqEFEOBAECAAMAC0HEicAAQewAQbCKwAAQQAALIAAgBigCDDYCBAwCCyAAQQA6AAFBASEHDAELQQEhByAAQQE6AAELIAAgBzoAACAGQRBqJAALdgEBfwJAAkACQAJAIAMoAgRFDQACQCADKAIIIgQNACACDQJBACEDDAQLIAMoAgAgBCABIAIQVCEDDAILIAINAEEAIQMMAgsQayACIAEQWiEDCyADIAEgAxshASADRSEDCyAAIAI2AgggACABNgIEIAAgAzYCAAt2AQF/AkACQAJAAkAgAygCBEUNAAJAIAMoAggiBA0AIAINAkEAIQMMBAsgAygCACAEIAEgAhBUIQMMAgsgAg0AQQAhAwwCCxBrIAIgARBaIQMLIAMgASADGyEBIANFIQMLIAAgAjYCCCAAIAE2AgQgACADNgIAC2gBAX8jAEEwayICJAACQBBpQf8BcQ0AIAJBMGokAA8LIAJBAjYCDCACQdSWwAA2AgggAkIBNwIUIAIgATYCLCACQQStQiCGIAJBLGqthDcDICACIAJBIGo2AhAgAkEIakHklsAAEEEAC2gCAX8BfiMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBAjYCDCADQcicwAA2AgggA0ICNwIUIANBBK1CIIYiBCADrYQ3AyggAyAEIANBBGqthDcDICADIANBIGo2AhAgA0EIaiACEEEAC2gCAX8BfiMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBAjYCDCADQYScwAA2AgggA0ICNwIUIANBBK1CIIYiBCADQQRqrYQ3AyggAyAEIAOthDcDICADIANBIGo2AhAgA0EIaiACEEEAC2gCAX8BfiMAQTBrIgMkACADIAE2AgQ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IAIgBBDGooAgAiAUUNACAAQRBqKAIAIAFBARBXCwJAIABBf0YNACAAIAAoAgRBf2oiATYCBCABDQAgAEEcQQQQVwsLRQACQAJAIAFBCUkNACABIAAQDyEBDAELIAAQAiEBCwJAIAFFDQAgAUF8ai0AAEEDcUUNACAARQ0AIAFBACAA/AsACyABC1IBAn9BACEBQQBBACgC6KBAIgJBAWo2AuigQAJAIAJBAEgNAEEBIQFBAC0A5KBADQBBACAAOgDkoEBBAEEAKALgoEBBAWo2AuCgQEECIQELIAELRwECfyABKAIEIQIgASgCACEDEGsCQEEIQQQQWiIBDQBBBEEIEGEACyABIAI2AgQgASADNgIAIABB8JfAADYCBCAAIAE2AgALOAACQAJAIAAgAksNACABIAJLDQEgACABTQ0BIAAgASADECsACyAAIAIgAxAsAAsgASACIAMQLQALQQEBfyMAQSBrIgMkACADQQA2AhAgA0EBNgIEIANCBDcCCCADIAE2AhwgAyAANgIYIAMgA0EYajYCACADIAIQQQALOQACQCACQYCAxABGDQAgACACIAEoAhARBQBFDQBBAQ8LAkAgAw0AQQAPCyAAIAMgBCABKAIMEQcACzYBAX8jAEEgayIBJAAgAUEANgIYIAFBATYCDCABQaSZwAA2AgggAUIENwIQIAFBCGogABBBAAsnAAJAIAAgARBPRQ0AAkAgAEUNABBrIAAgARBaIgFFDQELIAEPCwALLAIBfwF+IwBBEGsiASQAIAApAgAhAiABIAA2AgwgASACNwIEIAFBBGoQZgALLQEBfyMAQRBrIgEkACABIAApAgA3AgggAUEIakH0lsAAIAAoAghBAUEAECEACyoBAX8jAEEQayIDJAAgAyACNgIMIAMgATYCCCADIAA2AgQgA0EEahBnAAsqAQF/IwBBEGsiAiQAIAJBATsBDCACIAE2AgggAiAANgIEIAJBBGoQPgALKQEBfwJAIAAoAgAiAUGAgICAeHJBgICAgHhGDQAgACgCBCABQQEQVwsLHgEBfwJAIAAoAgAiAkUNACABIAIgACgCBBBTDwsACyAAAkAgASgCAEUNACAAQfCXwAA2AgQgACABNgIADwsACxs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5MDkxOTI5Mzk0OTU5Njk3OTg5OQEAAAAAAAAAcmFuZ2Ugc3RhcnQgaW5kZXggIG91dCBvZiByYW5nZSBmb3Igc2xpY2Ugb2YgbGVuZ3RoIHwNEAASAAAAjg0QACIAAAByYW5nZSBlbmQgaW5kZXggwA0QABAAAACODRAAIgAAAHNsaWNlIGluZGV4IHN0YXJ0cyBhdCAgYnV0IGVuZHMgYXQgAOANEAAWAAAA9g0QAA0AAABpbmRleCBvdXQgb2YgYm91bmRzOiB0aGUgbGVuIGlzICBidXQgdGhlIGluZGV4IGlzIAAAFA4QACAAAAA0DhAAEgAAAFJlZkNlbGwgYWxyZWFkeSBib3Jyb3dlZABB8JzAAAsEBAAAAAApBG5hbWUBIgFZH19fd2JpbmRnZW5fYWRkX3RvX3N0YWNrX3BvaW50ZXIAPAlwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQIGd2FscnVzBjAuMjQuNAx3YXNtLWJpbmRnZW4HMC4yLjEwNg==";let j;function YC(t){j=t}function M5(t){wo===An.length&&An.push(An.length+1);const e=wo;return wo=An[e],An[e]=t,e}function T5(t){t<132||(An[t]=wo,wo=t)}function VC(t,e){return t=t>>>0,P5().subarray(t/4,t/4+e)}function zA(t,e){return t=t>>>0,HA().subarray(t/1,t/1+e)}let Rr=null;function Oe(){return(Rr===null||Rr.buffer.detached===!0||Rr.buffer.detached===void 0&&Rr.buffer!==j.memory.buffer)&&(Rr=new DataView(j.memory.buffer)),Rr}function JC(t,e){return t=t>>>0,U5(t,e)}let Fc=null;function P5(){return(Fc===null||Fc.byteLength===0)&&(Fc=new Uint32Array(j.memory.buffer)),Fc}let Rc=null;function HA(){return(Rc===null||Rc.byteLength===0)&&(Rc=new Uint8Array(j.memory.buffer)),Rc}function L5(t){return An[t]}let An=new Array(128).fill(void 0);An.push(void 0,null,!0,!1);let wo=An.length;function YA(t,e){const n=e(t.length*1,1)>>>0;return HA().set(t,n/1),Mc=t.length,n}function VA(t){const e=L5(t);return T5(t),e}let Nc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Nc.decode();const O5=2146435072;let JA=0;function U5(t,e){return JA+=e,JA>=O5&&(Nc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Nc.decode(),JA=e),Nc.decode(HA().subarray(t,t+e))}let Mc=0;const qC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>j.__wbg_chunksliceresult_free(t>>>0,1)),KC=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>j.__wbg_decompressresult_free(t>>>0,1));class Nr{static __wrap(e){e=e>>>0;const n=Object.create(Nr.prototype);return n.__wbg_ptr=e,qC.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,qC.unregister(this),e}free(){const e=this.__destroy_into_raw();j.__wbg_chunksliceresult_free(e,0)}get cpositions(){try{const r=j.__wbindgen_add_to_stack_pointer(-16);j.chunksliceresult_cpositions(r,this.__wbg_ptr);var e=Oe().getInt32(r+0,!0),n=Oe().getInt32(r+4,!0),i=VC(e,n).slice();return j.__wbindgen_export(e,n*4,4),i}finally{j.__wbindgen_add_to_stack_pointer(16)}}get dpositions(){try{const r=j.__wbindgen_add_to_stack_pointer(-16);j.chunksliceresult_dpositions(r,this.__wbg_ptr);var e=Oe().getInt32(r+0,!0),n=Oe().getInt32(r+4,!0),i=VC(e,n).slice();return j.__wbindgen_export(e,n*4,4),i}finally{j.__wbindgen_add_to_stack_pointer(16)}}get buffer(){try{const r=j.__wbindgen_add_to_stack_pointer(-16);j.chunksliceresult_buffer(r,this.__wbg_ptr);var e=Oe().getInt32(r+0,!0),n=Oe().getInt32(r+4,!0),i=zA(e,n).slice();return j.__wbindgen_export(e,n*1,1),i}finally{j.__wbindgen_add_to_stack_pointer(16)}}}Symbol.dispose&&(Nr.prototype[Symbol.dispose]=Nr.prototype.free);class Mr{static __wrap(e){e=e>>>0;const n=Object.create(Mr.prototype);return n.__wbg_ptr=e,KC.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,KC.unregister(this),e}free(){const e=this.__destroy_into_raw();j.__wbg_decompressresult_free(e,0)}get bytes_read(){return j.decompressresult_bytes_read(this.__wbg_ptr)>>>0}get data(){try{const r=j.__wbindgen_add_to_stack_pointer(-16);j.decompressresult_data(r,this.__wbg_ptr);var e=Oe().getInt32(r+0,!0),n=Oe().getInt32(r+4,!0),i=zA(e,n).slice();return j.__wbindgen_export(e,n*1,1),i}finally{j.__wbindgen_add_to_stack_pointer(16)}}}Symbol.dispose&&(Mr.prototype[Symbol.dispose]=Mr.prototype.free);function jC(t){try{const o=j.__wbindgen_add_to_stack_pointer(-16),a=YA(t,j.__wbindgen_export2),l=Mc;j.decompress_all(o,a,l);var e=Oe().getInt32(o+0,!0),n=Oe().getInt32(o+4,!0),i=Oe().getInt32(o+8,!0),r=Oe().getInt32(o+12,!0);if(r)throw VA(i);var s=zA(e,n).slice();return j.__wbindgen_export(e,n*1,1),s}finally{j.__wbindgen_add_to_stack_pointer(16)}}function _5(t){try{const r=j.__wbindgen_add_to_stack_pointer(-16),s=YA(t,j.__wbindgen_export2),o=Mc;j.decompress_block(r,s,o);var e=Oe().getInt32(r+0,!0),n=Oe().getInt32(r+4,!0),i=Oe().getInt32(r+8,!0);if(i)throw VA(n);return Mr.__wrap(e)}finally{j.__wbindgen_add_to_stack_pointer(16)}}function WC(t,e,n,i,r){try{const l=j.__wbindgen_add_to_stack_pointer(-16),c=YA(t,j.__wbindgen_export2),f=Mc;j.decompress_chunk_slice(l,c,f,e,n,i,r);var s=Oe().getInt32(l+0,!0),o=Oe().getInt32(l+4,!0),a=Oe().getInt32(l+8,!0);if(a)throw VA(o);return Nr.__wrap(s)}finally{j.__wbindgen_add_to_stack_pointer(16)}}function G5(t,e){const n=Error(JC(t,e));return M5(n)}function z5(t,e){throw new Error(JC(t,e))}let yo=null,qA=null;async function XC(){return yo||(qA||(qA=(async()=>{const e=await(await fetch(N5)).arrayBuffer(),{instance:n}=await WebAssembly.instantiate(e,{"./bgzf_wasm_bg.js":GA});return yo=n.exports,YC(yo),yo})()),qA)}async function H5(t){return await XC(),jC(t)}async function Y5(t,e,n,i,r){await XC();const s=WC(t,e,n,i,r),o=s.buffer,a=[...s.cpositions],l=[...s.dpositions];return s.free(),{buffer:o,cpositions:a,dpositions:l}}function V5(t){return t.length>=2&&t[0]===31&&t[1]===139}async function J5(t){if(typeof DecompressionStream<"u"){const e=new DecompressionStream("gzip"),n=e.writable.getWriter(),i=n.write(t).then(()=>n.close()),r=[],s=e.readable.getReader();for(;;){const{done:c,value:f}=await s.read();if(c)break;r.push(f)}await i;const o=r.reduce((c,f)=>c+f.length,0),a=new Uint8Array(o);let l=0;for(const c of r)a.set(c,l),l+=c.length;return a}else return R5(t,void 0)}async function Tr(t){try{return await H5(t)}catch(e){if(/invalid bgzf header/.exec(`${e}`)){if(V5(t))return J5(t);throw new Error("problem decompressing block: not a valid bgzf or gzip block")}throw/invalid gzip header/.exec(`${e}`)?new Error("problem decompressing block: incorrect gzip header check"):e}}async function ZC(t,e,n){try{const{minv:i,maxv:r}=e,s=await Y5(t,i.blockPosition,i.dataPosition,r.blockPosition,r.dataPosition);return{buffer:s.buffer,cpositions:s.cpositions,dpositions:s.dpositions}}catch(i){throw/invalid gzip header/.exec(`${i}`)?new Error("problem decompressing block: incorrect gzip header check"):i}}let KA=[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"&&(KA=new Int32Array(KA));const q5=(t,e)=>{let n=-1;for(let i=0;i<t.length;i++)n=KA[(n^t[i])&255]^n>>>8;return n^-1},K5=21582659,j5=38359875;function W5(t,e){return t*2**e}function $C(t,e){return Math.floor(t/2**e)}let Tc=class extends Zy{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(e,n){return(await this.parse(n)).indices(e)?.stats?.lineCount||0}async indexCov(){return[]}parseAuxData(e,n){const i=new DataView(e.buffer),r=i.getUint32(n,!0),s=r&65536?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:i.getInt32(n+4,!0),start:i.getInt32(n+8,!0),end:i.getInt32(n+12,!0)},l=i.getInt32(n+16,!0),c=l?String.fromCharCode(l):"",f=i.getInt32(n+20,!0),u=i.getInt32(n+24,!0);return{columnNumbers:a,coordinateType:s,metaValue:l,metaChar:c,skipLines:f,format:o,formatFlags:r,...HT(e.subarray(n+28,n+28+u),this.renameRefSeq)}}async _parse(e){const n=await this.filehandle.readFile(e),i=await Tr(n),r=new DataView(i.buffer);let s;const o=r.getUint32(0,!0);if(o===K5)s=1;else if(o===j5)s=2;else throw new Error(`Not a CSI file ${o}`);this.minShift=r.getInt32(4,!0),this.depth=r.getInt32(8,!0),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const a=this.maxBinNumber,l=r.getInt32(12,!0),c=l>=30?this.parseAuxData(i,16):void 0,f=r.getInt32(16+l,!0);let u=16+l+4,h;const A=[];for(let m=0;m<f;m++){A.push(u);const p=r.getInt32(u,!0);u+=4;for(let w=0;w<p;w++){const C=r.getUint32(u,!0);if(u+=4,C>this.maxBinNumber)u+=44;else{u+=8;const y=r.getInt32(u,!0);u+=4;for(let b=0;b<y;b+=1){const x=Gn(i,u);u+=8,u+=8,h=ho(h,x)}}}}const d=new Ao({maxSize:5});function g(m){let p=A[m];if(p===void 0)return;const w=r.getInt32(p,!0);p+=4;const C={};let y;for(let b=0;b<w;b++){const x=r.getUint32(p,!0);if(p+=4,x>a)y=Xy(i,p+28),p+=44;else{h=ho(h,Gn(i,p)),p+=8;const I=r.getInt32(p,!0);p+=4;const S=new Array(I);for(let Q=0;Q<I;Q+=1){const v=Gn(i,p);p+=8;const F=Gn(i,p);p+=8,S[Q]=new jy(v,F,x)}C[x]=S}}return{binIndex:C,stats:y}}return{csiVersion:s,firstDataLine:h,indices:m=>{if(!d.has(m)){const p=g(m);return p&&d.set(m,p),p}return d.get(m)},refCount:f,csi:!0,maxBlockSize:65536,...c}}async blocksForRange(e,n,i,r={}){n<0&&(n=0);const o=(await this.parse(r)).indices(e);if(!o)return[];const a=this.reg2bins(n,i);if(a.length===0)return[];const l=[],{binIndex:c}=o;for(const[f,u]of a)for(let h=f;h<=u;h++){const A=c[h];if(A)for(let d=0,g=A.length;d<g;d++)l.push(A[d])}return DA(l,new $y(0,0))}reg2bins(e,n){e-=1,e<1&&(e=1),n>2**50&&(n=2**34),n-=1;let i=0,r=0,s=this.minShift+this.depth*3;const o=[];for(;i<=this.depth;s-=3,r+=W5(1,i*3),i+=1){const a=r+$C(e,s),l=r+$C(n,s);if(l-a+o.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`);o.push([a,l])}return o}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={}){return!!(await this.parse(n)).indices(e)?.binIndex}};class X5{read(){throw new Error("never called")}stat(){throw new Error("never called")}readFile(){throw new Error("never called")}close(){throw new Error("never called")}}const Z5=3,$5=4,Et={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},Co="=ACMGRSVTWYHKDBN".split(""),e9=[77,73,68,78,83,72,80,61,88,63,63,63,63,63,63,63],eE=461;class tE{constructor(e){this.bytes=e.bytes,this.fileOffset=e.fileOffset,this._dataView=new DataView(this.bytes.byteArray.buffer)}get byteArray(){return this.bytes.byteArray}get flags(){return this._cachedFlags===void 0&&(this._cachedFlags=(this._dataView.getInt32(this.bytes.start+16,!0)&4294901760)>>16),this._cachedFlags}get ref_id(){return this._cachedRefId===void 0&&(this._cachedRefId=this._dataView.getInt32(this.bytes.start+4,!0)),this._cachedRefId}get start(){return this._cachedStart===void 0&&(this._cachedStart=this._dataView.getInt32(this.bytes.start+8,!0)),this._cachedStart}get end(){return this._cachedEnd===void 0&&(this._cachedEnd=this.start+this.length_on_ref),this._cachedEnd}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 null;{const e=this.b0+this.read_name_length+this.num_cigar_bytes+this.num_seq_bytes;return this.byteArray.subarray(e,e+this.seq_length)}}get strand(){return this.isReverseComplemented()?-1:1}get b0(){return this.bytes.start+36}get tagsStart(){return this._cachedTagsStart===void 0&&(this._cachedTagsStart=this.b0+this.read_name_length+this.num_cigar_bytes+this.num_seq_bytes+this.seq_length),this._cachedTagsStart}get name(){const e=this.read_name_length-1,n=this.b0,i=this.byteArray,r=new Array(e);for(let s=0;s<e;s++)r[s]=i[n+s];return String.fromCharCode(...r)}get NUMERIC_MD(){if(this._cachedNUMERIC_MD===void 0){const e=this.getTagRaw("MD");this._cachedNUMERIC_MD=e instanceof Uint8Array?e:null}return this._cachedNUMERIC_MD===null?void 0:this._cachedNUMERIC_MD}get tags(){return this._cachedTags===void 0&&(this._cachedTags=this._computeTags()),this._cachedTags}getTag(e){return this._cachedTags!==void 0?this._cachedTags[e]:this._findTag(e,!1)}getTagRaw(e){return this._findTag(e,!0)}_findTag(e,n){const i=e.charCodeAt(0),r=e.charCodeAt(1);let s=this.tagsStart;const o=this.bytes.end,a=this.byteArray;for(;s<o;){const l=a[s],c=a[s+1],f=a[s+2];s+=3;const u=l===i&&c===r;switch(f){case 65:if(u)return String.fromCharCode(a[s]);s+=1;break;case 105:if(u)return this._dataView.getInt32(s,!0);s+=4;break;case 73:if(u)return this._dataView.getUint32(s,!0);s+=4;break;case 99:if(u)return this._dataView.getInt8(s);s+=1;break;case 67:if(u)return this._dataView.getUint8(s);s+=1;break;case 115:if(u)return this._dataView.getInt16(s,!0);s+=2;break;case 83:if(u)return this._dataView.getUint16(s,!0);s+=2;break;case 102:if(u)return this._dataView.getFloat32(s,!0);s+=4;break;case 90:case 72:{if(u){const h=s;for(;s<o&&a[s]!==0;)s++;if(n)return a.subarray(h,s);const A=[];for(let d=h;d<s;d++)A.push(String.fromCharCode(a[d]));return A.join("")}for(;s<=o&&a[s++]!==0;);break}case 66:{const h=a[s++],A=this._dataView.getInt32(s,!0);s+=4;const d=a.byteOffset+s;if(u)if(h===105){if(d%4===0)return new Int32Array(a.buffer,d,A);const g=new Array(A);for(let m=0;m<A;m++)g[m]=this._dataView.getInt32(s+m*4,!0);return g}else if(h===73){if(d%4===0)return new Uint32Array(a.buffer,d,A);const g=new Array(A);for(let m=0;m<A;m++)g[m]=this._dataView.getUint32(s+m*4,!0);return g}else if(h===115){if(d%2===0)return new Int16Array(a.buffer,d,A);const g=new Array(A);for(let m=0;m<A;m++)g[m]=this._dataView.getInt16(s+m*2,!0);return g}else if(h===83){if(d%2===0)return new Uint16Array(a.buffer,d,A);const g=new Array(A);for(let m=0;m<A;m++)g[m]=this._dataView.getUint16(s+m*2,!0);return g}else{if(h===99)return new Int8Array(a.buffer,d,A);if(h===67)return new Uint8Array(a.buffer,d,A);if(h===102){if(d%4===0)return new Float32Array(a.buffer,d,A);const g=new Array(A);for(let m=0;m<A;m++)g[m]=this._dataView.getFloat32(s+m*4,!0);return g}}h===105||h===73||h===102?s+=A<<2:h===115||h===83?s+=A<<1:(h===99||h===67)&&(s+=A);break}}}}_computeTags(){let e=this.tagsStart;const n=this.bytes.end,i=this.byteArray,r={};for(;e<n;){const s=String.fromCharCode(i[e],i[e+1]),o=i[e+2];switch(e+=3,o){case 65:r[s]=String.fromCharCode(i[e]),e+=1;break;case 105:r[s]=this._dataView.getInt32(e,!0),e+=4;break;case 73:r[s]=this._dataView.getUint32(e,!0),e+=4;break;case 99:r[s]=this._dataView.getInt8(e),e+=1;break;case 67:r[s]=this._dataView.getUint8(e),e+=1;break;case 115:r[s]=this._dataView.getInt16(e,!0),e+=2;break;case 83:r[s]=this._dataView.getUint16(e,!0),e+=2;break;case 102:r[s]=this._dataView.getFloat32(e,!0),e+=4;break;case 90:case 72:{const a=[];for(;e<=n;){const l=i[e++];if(l!==0)a.push(String.fromCharCode(l));else break}r[s]=a.join("");break}case 66:{const a=i[e++],l=this._dataView.getInt32(e,!0);e+=4;const c=i.byteOffset+e;if(a===105){if(c%4===0)r[s]=new Int32Array(i.buffer,c,l);else{const f=new Array(l);for(let u=0;u<l;u++)f[u]=this._dataView.getInt32(e+u*4,!0);r[s]=f}e+=l<<2}else if(a===73){if(c%4===0)r[s]=new Uint32Array(i.buffer,c,l);else{const f=new Array(l);for(let u=0;u<l;u++)f[u]=this._dataView.getUint32(e+u*4,!0);r[s]=f}e+=l<<2}else if(a===115){if(c%2===0)r[s]=new Int16Array(i.buffer,c,l);else{const f=new Array(l);for(let u=0;u<l;u++)f[u]=this._dataView.getInt16(e+u*2,!0);r[s]=f}e+=l<<1}else if(a===83){if(c%2===0)r[s]=new Uint16Array(i.buffer,c,l);else{const f=new Array(l);for(let u=0;u<l;u++)f[u]=this._dataView.getUint16(e+u*2,!0);r[s]=f}e+=l<<1}else if(a===99)r[s]=new Int8Array(i.buffer,c,l),e+=l;else if(a===67)r[s]=new Uint8Array(i.buffer,c,l),e+=l;else if(a===102){if(c%4===0)r[s]=new Float32Array(i.buffer,c,l);else{const f=new Array(l);for(let u=0;u<l;u++)f[u]=this._dataView.getFloat32(e+u*4,!0);r[s]=f}e+=l<<2}break}default:console.error("Unknown BAM tag type",o);break}}return r}isPaired(){return!!(this.flags&Et.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&Et.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&Et.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&Et.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&Et.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&Et.BAM_FMREVERSE)}isRead1(){return!!(this.flags&Et.BAM_FREAD1)}isRead2(){return!!(this.flags&Et.BAM_FREAD2)}isSecondary(){return!!(this.flags&Et.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&Et.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&Et.BAM_FDUP)}isSupplementary(){return!!(this.flags&Et.BAM_FSUPPLEMENTARY)}get cigarAndLength(){return this._cachedCigarAndLength===void 0&&(this._cachedCigarAndLength=this._computeCigarAndLength()),this._cachedCigarAndLength}_computeCigarAndLength(){if(this.isSegmentUnmapped())return{length_on_ref:0,NUMERIC_CIGAR:new Uint32Array(0)};const e=this.num_cigar_ops;let n=this.b0+this.read_name_length;const i=this._dataView.getInt32(n,!0),r=i>>4;if((i&15)===$5&&r===this.seq_length){n+=4;const f=this._dataView.getInt32(n,!0),u=f>>4;return(f&15)!==Z5&&console.warn("CG tag with no N tag"),{NUMERIC_CIGAR:this.tags.CG,length_on_ref:u}}const o=this.byteArray.byteOffset+n;if(o%4===0&&e>50){const f=new Uint32Array(this.byteArray.buffer,o,e);let u=0;for(let h=0;h<e;++h){const A=f[h];u+=(A>>4)*(eE>>(A&15)&1)}return{NUMERIC_CIGAR:f,length_on_ref:u}}const l=new Array(e);let c=0;for(let f=0;f<e;++f){const u=this._dataView.getInt32(n+f*4,!0)|0;l[f]=u,c+=(u>>4)*(eE>>(u&15)&1)}return{NUMERIC_CIGAR:l,length_on_ref:c}}get length_on_ref(){return this.cigarAndLength.length_on_ref}get NUMERIC_CIGAR(){return this.cigarAndLength.NUMERIC_CIGAR}get CIGAR(){const e=this.NUMERIC_CIGAR;let n="";for(let i=0,r=e.length;i<r;i++){const s=e[i],o=s>>4,a=e9[s&15];n+=o+String.fromCharCode(a)}return n}get num_cigar_ops(){return this.flag_nc&65535}get num_cigar_bytes(){return this.num_cigar_ops<<2}get read_name_length(){return this.bin_mq_nl&255}get num_seq_bytes(){return this.seq_length+1>>1}get NUMERIC_SEQ(){const e=this.b0+this.read_name_length+this.num_cigar_bytes;return this.byteArray.subarray(e,e+this.num_seq_bytes)}get seq(){const e=this.NUMERIC_SEQ,n=this.seq_length,i=new Array(n);let r=0;const s=n>>1;for(let o=0;o<s;++o){const a=e[o];i[r++]=Co[(a&240)>>4],i[r++]=Co[a&15]}if(r<n){const o=e[s];i[r]=Co[(o&240)>>4]}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 i=" ",r=" ";return this.isRead1()?(i="1",r="2"):this.isRead2()&&(i="2",r="1"),this.template_length>0?`${e}${i}${n}${r}`:`${n}${r}${e}${i}`}}get bin_mq_nl(){return this._dataView.getInt32(this.bytes.start+12,!0)}get flag_nc(){return this._dataView.getInt32(this.bytes.start+16,!0)}get seq_length(){return this._dataView.getInt32(this.bytes.start+20,!0)}get next_refid(){return this._dataView.getInt32(this.bytes.start+24,!0)}get next_pos(){return this._dataView.getInt32(this.bytes.start+28,!0)}get template_length(){return this._dataView.getInt32(this.bytes.start+32,!0)}seqAt(e){if(e<this.seq_length){const n=e>>1,i=this.byteArray[this.b0+this.read_name_length+this.num_cigar_bytes+n];return e%2===0?Co[(i&240)>>4]:Co[i&15]}else return}toJSON(){const e={};for(const n of Object.keys(this))n.startsWith("_")||n==="bytes"||(e[n]=this[n]);return e}}function nE(t){const e=t.split(/\r?\n/),n=[];for(const i of e){const[r,...s]=i.split(/\t/);r&&n.push({tag:r.slice(1),data:s.map(o=>{const a=o.indexOf(":"),l=o.slice(0,a),c=o.slice(a+1);return{tag:l,value:c}})})}return n}const iE=21840194,t9=65536;class rE{constructor({bamFilehandle:e,bamPath:n,bamUrl:i,baiPath:r,baiFilehandle:s,baiUrl:o,csiPath:a,csiFilehandle:l,csiUrl:c,htsget:f,renameRefSeqs:u=A=>A,recordClass:h}){if(this.htsget=!1,this.chunkFeatureCache=new Ao({maxSize:100}),this.renameRefSeq=u,this.RecordClass=h??tE,e)this.bam=e;else if(n)this.bam=new We(n);else if(i)this.bam=new Yt(i);else if(f)this.htsget=!0,this.bam=new X5;else throw new Error("unable to initialize bam");if(l)this.index=new Tc({filehandle:l});else if(a)this.index=new Tc({filehandle:new We(a)});else if(c)this.index=new Tc({filehandle:new Yt(c)});else if(s)this.index=new vr({filehandle:s});else if(r)this.index=new vr({filehandle:new We(r)});else if(o)this.index=new vr({filehandle:new Yt(o)});else if(n)this.index=new vr({filehandle:new We(`${n}.bai`)});else if(i)this.index=new vr({filehandle:new Yt(`${i}.bai`)});else if(f)this.htsget=!0;else throw new Error("unable to infer index format")}async getHeaderPre(e){const n=zT(e);if(!this.index)return;const i=await this.index.parse(n),r=i.firstDataLine===void 0?await this.bam.readFile():await this.bam.read(i.firstDataLine.blockPosition+t9,0),s=await Tr(r),o=new DataView(s.buffer);if(o.getInt32(0,!0)!==iE)throw new Error("Not a BAM file");const a=o.getInt32(4,!0),l=new TextDecoder("utf8");this.header=l.decode(s.subarray(8,8+a));const{chrToIndex:c,indexToChr:f}=this._parseRefSeqs(s,a+8);return this.chrToIndex=c,this.indexToChr=f,nE(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}_parseRefSeqs(e,n){const i=new DataView(e.buffer),r=i.getInt32(n,!0);let s=n+4;const o={},a=[],l=new TextDecoder("utf8");for(let c=0;c<r;c+=1){if(s+8>e.length)throw new Error(`Insufficient data for reference sequences: need more than ${e.length} bytes`);const f=i.getInt32(s,!0),u=this.renameRefSeq(l.decode(e.subarray(s+4,s+4+f-1))),h=i.getInt32(s+f+4,!0);o[u]=c,a.push({refName:u,length:h}),s=s+8+f}return{chrToIndex:o,indexToChr:a}}async getRecordsForRange(e,n,i,r){await this.getHeader(r);const s=this.chrToIndex?.[e];if(s===void 0||!this.index)return[];const o=await this.index.blocksForRange(s,n-1,i,r);return this._fetchChunkFeaturesDirect(o,s,n,i,r)}chunkCacheKey(e,n){const{minv:i,maxv:r}=e;return`${i.blockPosition}:${i.dataPosition}-${r.blockPosition}:${r.dataPosition}${qT(n)}`}blocksOverlap(e,n,i,r){return e<=r&&n>=i}evictOverlappingChunks(e,n){for(const[i,r]of this.chunkFeatureCache)this.blocksOverlap(e,n,r.minBlock,r.maxBlock)&&this.chunkFeatureCache.delete(i)}async _fetchChunkFeaturesDirect(e,n,i,r,s={}){const{viewAsPairs:o,filterBy:a}=s,{flagInclude:l=0,flagExclude:c=0,tagFilter:f}=a||{},u=[];for(let h=0,A=e.length;h<A;h++){const d=e[h],g=this.chunkCacheKey(d,a),m=d.minv.blockPosition,p=d.maxv.blockPosition;let w;const C=this.chunkFeatureCache.get(g);if(C)w=C.features;else{this.evictOverlappingChunks(m,p);const{data:b,cpositions:x,dpositions:I}=await this._readChunk({chunk:d,opts:s}),S=await this.readBamFeatures(b,x,I,d);if(a){w=[];for(let Q=0,v=S.length;Q<v;Q++){const F=S[Q];VT(F.flags,l,c)||f&&JT(F.tags[f.tag],f.value)||w.push(F)}}else w=S;this.chunkFeatureCache.set(g,{minBlock:m,maxBlock:p,features:w})}let y=!1;for(let b=0,x=w.length;b<x;b++){const I=w[b];if(I.ref_id===n)if(I.start>=r){y=!0;break}else I.end>=i&&u.push(I)}if(y)break}if(o){const h=await this.fetchPairs(n,u,s);for(let A=0,d=h.length;A<d;A++)u.push(h[A])}return u}async fetchPairs(e,n,i){const{pairAcrossChr:r,maxInsertSize:s=2e5}=i,o={},a={};for(let h=0,A=n.length;h<A;h++){const d=n[h],g=d.name;o[g]=(o[g]||0)+1,a[d.fileOffset]=1}const l=[];for(let h=0,A=n.length;h<A;h++){const d=n[h],g=d.name;this.index&&o[g]===1&&(r||d.next_refid===e&&Math.abs(d.start-d.next_pos)<s)&&l.push(this.index.blocksForRange(d.next_refid,d.next_pos,d.next_pos+1,i))}const c=new Map,f=await Promise.all(l);for(let h=0,A=f.length;h<A;h++){const d=f[h];for(let g=0,m=d.length;g<m;g++){const p=d[g],w=p.toString();c.has(w)||c.set(w,p)}}return(await Promise.all([...c.values()].map(async h=>{const{data:A,cpositions:d,dpositions:g,chunk:m}=await this._readChunk({chunk:h,opts:i}),p=[],w=await this.readBamFeatures(A,d,g,m);for(let C=0,y=w.length;C<y;C++){const b=w[C];o[b.name]===1&&!a[b.fileOffset]&&p.push(b)}return p}))).flat()}async _readChunk({chunk:e,opts:n}){const i=await this.bam.read(e.fetchedSize(),e.minv.blockPosition,n),{buffer:r,cpositions:s,dpositions:o}=await ZC(i,e);return{data:r,cpositions:s,dpositions:o,chunk:e}}async readBamFeatures(e,n,i,r){let s=0;const o=[];let a=0;const l=new DataView(e.buffer),c=i.length>0,f=n.length>0;for(;s+4<e.length;){const u=l.getInt32(s,!0),h=s+4+u-1;if(c){for(;s+r.minv.dataPosition>=i[a++];);a--}if(h<e.length){const A=new this.RecordClass({bytes:{byteArray:e,start:s,end:h},fileOffset:f?n[a]*256+(s-i[a])+r.minv.dataPosition+1:q5(e.subarray(s,h))>>>0});o.push(A)}s=h+1}return o}async hasRefSeq(e){const n=this.chrToIndex?.[e];return n===void 0?!1:this.index?.hasRefSeq(n)}async lineCount(e){const n=this.chrToIndex?.[e];return n===void 0||!this.index?0:this.index.lineCount(n)}async indexCov(e,n,i){if(!this.index)return[];await this.index.parse();const r=this.chrToIndex?.[e];return r===void 0?[]:this.index.indexCov(r,n,i)}async blocksForRange(e,n,i,r){if(!this.index)return[];await this.index.parse();const s=this.chrToIndex?.[e];return s===void 0?[]:this.index.blocksForRange(s,n,i,r)}clearFeatureCache(){this.chunkFeatureCache.clear()}async estimatedBytesForRegions(e,n){if(!this.index)return 0;if(await this.getHeader(n),!this.chrToIndex)throw new Error("Header not yet parsed");return this.index.estimatedBytesForRegions(e.map(i=>{const r=this.chrToIndex[i.refName];if(r===void 0)throw new Error(`Unknown reference name: ${i.refName}`);return{refId:r,start:i.start,end:i.end}}),n)}}async function sE(t,e){const n=await Promise.all(t.map(async i=>{const{url:r,headers:s}=i;if(r.startsWith("data:")){const o=await fetch(r);if(!o.ok)throw new Error("failed to decode base64");const a=await o.arrayBuffer();return new Uint8Array(a)}else{const{referer:o,...a}=s,l=await fetch(r,{...e,headers:{...e?.headers,...a}});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${r}: ${await l.text()}`);return new Uint8Array(await l.arrayBuffer())}}));return YT(await Promise.all(n.map(i=>Tr(i))))}class n9 extends rE{constructor(e){super({htsget:!0,recordClass:e.recordClass}),this.baseUrl=e.baseUrl,this.trackId=e.trackId}async getRecordsForRange(e,n,i,r){const o=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${e}&start=${n}&end=${i}&format=BAM`,a=this.chrToIndex?.[e];if(a===void 0)return[];const l=await fetch(o,{...r});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${o}: ${await l.text()}`);const c=await l.json(),f=await sE(c.htsget.urls.slice(1),r),u=await this.readBamFeatures(f,[],[],{minv:{dataPosition:0,blockPosition:0},maxv:{dataPosition:0,blockPosition:0}}),h=[];for(let A=0,d=u.length;A<d;A++){const g=u[A];if(g.ref_id===a){if(g.start>=i)break;g.end>=n&&h.push(g)}}return h}async getHeader(e={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,i=await fetch(n,e);if(!i.ok)throw new Error(`HTTP ${i.status} fetching ${n}: ${await i.text()}`);const r=await i.json(),s=await sE(r.htsget.urls,e),o=new DataView(s.buffer);if(o.getInt32(0,!0)!==iE)throw new Error("Not a BAM file");const a=o.getInt32(4,!0),c=new TextDecoder("utf8").decode(s.subarray(8,8+a)),f=nE(c),u=[],h={},A=f.filter(d=>d.tag==="SQ");for(const[d,g]of A.entries()){let m="",p=0;for(const w of g.data)w.tag==="SN"?m=w.value:w.tag==="LN"&&(p=+w.value);h[m]=d,u[d]={refName:m,length:p}}return this.chrToIndex=h,this.indexToChr=u,f}}const i9=Object.freeze(Object.defineProperty({__proto__:null,BAI:vr,BamFile:rE,BamRecord:tE,CSI:Tc,HtsgetFile:n9},Symbol.toStringTag,{value:"Module"}));class Pc{constructor(e,n,i,r){this.minv=e,this.maxv=n,this.bin=i,this._fetchedSize=r}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 oE{constructor({filehandle:e,renameRefSeqs:n=i=>i}){this.filehandle=e,this.renameRefSeq=n}async getMetadata(e={}){const{indices:n,...i}=await this.parse(e);return i}_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={}){return!!(await this.parse(n)).indices[e]?.binIndex}_parseNameBytes(e){let n=0,i=0;const r=[],s={},o=new TextDecoder("utf8");for(let a=0;a<e.length;a+=1)if(!e[a]){if(i<a){const l=this.renameRefSeq(o.decode(e.subarray(i,a)));r[n]=l,s[l]=n}i=a+1,n+=1}return{refNameToId:s,refIdToName:r}}}const aE=65536,r9=aE*aE;function cE(t,e=0){const n=t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24;return((t[e+4]|t[e+5]<<8|t[e+6]<<16|t[e+7]<<24)>>>0)*r9+(n>>>0)}function s9(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function lE(t,e){const n=[];let i;if(t.length===0)return t;t.sort(function(r,s){const o=r.minv.blockPosition-s.minv.blockPosition;return o===0?r.minv.dataPosition-s.minv.dataPosition:o});for(const r of t)(!e||r.maxv.compareTo(e)>0)&&(i===void 0?(n.push(r),i=r):s9(i,r)?r.maxv.compareTo(i.maxv)>0&&(i.maxv=r.maxv):(n.push(r),i=r));return n}class jA{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 Pr(t,e=0){return new jA(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])}const o9=21582659,a9=38359875,c9={0:"generic",1:"SAM",2:"VCF"};function l9(t,e){return t*2**e}function fE(t,e){return Math.floor(t/2**e)}class Lc extends oE{constructor(e){super(e),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(e,n={}){const i=await this.parse(n),r=i.refNameToId[e];if(r===void 0||!i.indices[r])return-1;const{stats:o}=i.indices[r];return o?o.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(e,n){const i=new DataView(e.buffer),r=i.getInt32(n,!0),s=r&65536?"zero-based-half-open":"1-based-closed",o=c9[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:i.getInt32(n+4,!0),start:i.getInt32(n+8,!0),end:i.getInt32(n+12,!0)},l=i.getInt32(n+16,!0),c=l?String.fromCharCode(l):void 0,f=i.getInt32(n+20,!0),u=i.getInt32(n+24,!0),{refIdToName:h,refNameToId:A}=this._parseNameBytes(e.subarray(n+28,n+28+u));return{refIdToName:h,refNameToId:A,skipLines:f,metaChar:c,columnNumbers:a,format:o,coordinateType:s}}async _parse(e={}){const n=await Tr(await this.filehandle.readFile(e)),i=new DataView(n.buffer);let r;if(i.getUint32(0,!0)===o9)r=1;else if(i.getUint32(0,!0)===a9)r=2;else throw new Error("Not a CSI file");this.minShift=i.getInt32(4,!0),this.depth=i.getInt32(8,!0),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const s=2**(this.minShift+this.depth*3),o=i.getInt32(12,!0),a=o&&o>=30?this.parseAuxData(n,16):{refIdToName:[],refNameToId:{},metaChar:void 0,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},l=i.getInt32(16+o,!0);let c,f=16+o+4;const u=new Array(l).fill(0).map(()=>{const h=i.getInt32(f,!0);f+=4;const A={};let d;for(let g=0;g<h;g+=1){const m=i.getUint32(f,!0);if(m>this.maxBinNumber)d=this.parsePseudoBin(n,f+4),f+=48;else{const p=Pr(n,f+4);c=this._findFirstData(c,p);const w=i.getInt32(f+12,!0);f+=16;const C=new Array(w);for(let y=0;y<w;y+=1){const b=Pr(n,f),x=Pr(n,f+8);f+=16,C[y]=new Pc(b,x,m)}A[m]=C}}return{binIndex:A,stats:d}});return{...a,csi:!0,refCount:l,maxBlockSize:65536,firstDataLine:c,csiVersion:r,indices:u,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:s}}parsePseudoBin(e,n){return{lineCount:cE(e,n+28)}}async blocksForRange(e,n,i,r={}){n<0&&(n=0);const s=await this.parse(r),o=s.refNameToId[e];if(o===void 0)return[];const a=s.indices[o];if(!a)return[];const l=this.reg2bins(n,i),c=[];for(const[f,u]of l)for(let h=f;h<=u;h++)if(a.binIndex[h])for(const A of a.binIndex[h])c.push(new Pc(A.minv,A.maxv,h));return lE(c,new jA(0,0))}reg2bins(e,n){e-=1,e<1&&(e=1),n>2**50&&(n=2**34),n-=1;let i=0,r=0,s=this.minShift+this.depth*3;const o=[];for(;i<=this.depth;s-=3,r+=l9(1,i*3),i+=1){const a=r+fE(e,s),l=r+fE(n,s);if(l-a+o.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`);o.push([a,l])}return o}}const f9=21578324,uE=14;function u9(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 Lr extends oE{async lineCount(e,n={}){const i=await this.parse(n),r=i.refNameToId[e];return r===void 0||!i.indices[r]?-1:i.indices[r].stats?.lineCount??-1}async _parse(e={}){const n=await this.filehandle.readFile(e),i=await Tr(n),r=new DataView(i.buffer);if(r.getUint32(0,!0)!==f9)throw new Error("Not a TBI file");const o=r.getUint32(4,!0),a=r.getUint32(8,!0),l=a&65536?"zero-based-half-open":"1-based-closed",f={0:"generic",1:"SAM",2:"VCF"}[a&15];if(!f)throw new Error(`invalid Tabix preset format flags ${a}`);const u={ref:r.getInt32(12,!0),start:r.getInt32(16,!0),end:r.getInt32(20,!0)},h=r.getInt32(24,!0),A=5,d=((1<<(A+1)*3)-1)/7,g=2**(14+A*3),m=h?String.fromCharCode(h):void 0,p=r.getInt32(28,!0),w=r.getInt32(32,!0),{refNameToId:C,refIdToName:y}=this._parseNameBytes(i.slice(36,36+w));let b=36+w,x;return{indices:new Array(o).fill(0).map(()=>{const S=r.getInt32(b,!0);b+=4;const Q={};let v;for(let M=0;M<S;M+=1){const O=r.getUint32(b,!0);if(b+=4,O>d+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(O===d+1){const z=r.getInt32(b,!0);b+=4,z===2&&(v=this.parsePseudoBin(i,b)),b+=16*z}else{const z=r.getInt32(b,!0);b+=4;const _=new Array(z);for(let Y=0;Y<z;Y+=1){const te=Pr(i,b),oe=Pr(i,b+8);b+=16,x=this._findFirstData(x,te),_[Y]=new Pc(te,oe,O)}Q[O]=_}}const F=r.getInt32(b,!0);b+=4;const R=new Array(F);for(let M=0;M<F;M+=1)R[M]=Pr(i,b),b+=8,x=this._findFirstData(x,R[M]);return{binIndex:Q,linearIndex:R,stats:v}}),metaChar:m,maxBinNumber:d,maxRefLength:g,skipLines:p,firstDataLine:x,columnNumbers:u,coordinateType:l,format:f,refIdToName:y,refNameToId:C,maxBlockSize:65536}}parsePseudoBin(e,n){return{lineCount:cE(e,n+16)}}async blocksForRange(e,n,i,r={}){n<0&&(n=0);const s=await this.parse(r),o=s.refNameToId[e];if(o===void 0)return[];const a=s.indices[o];if(!a)return[];(a.linearIndex.length>0?a.linearIndex[n>>uE>=a.linearIndex.length?a.linearIndex.length-1:n>>uE]:new jA(0,0))||console.warn("querying outside of possible tabix range");const c=u9(n,i),f=[];for(const[g,m]of c)for(let p=g;p<=m;p++)if(a.binIndex[p])for(const w of a.binIndex[p])f.push(new Pc(w.minv,w.maxv,p));const u=a.linearIndex.length;let h;const A=Math.min(n>>14,u-1),d=Math.min(i>>14,u-1);for(let g=A;g<=d;++g){const m=a.linearIndex[g];m&&(!h||m.compareTo(h)<0)&&(h=m)}return lE(f,h)}}class A9{constructor({path:e,filehandle:n,url:i,tbiPath:r,tbiUrl:s,tbiFilehandle:o,csiPath:a,csiUrl:l,csiFilehandle:c,renameRefSeqs:f,chunkCacheSize:u=5*2**20}){this.cache=new Ao({maxSize:1e3});const h=f??(A=>A);if(n)this.filehandle=n;else if(e)this.filehandle=new We(e);else if(i)this.filehandle=new Yt(i);else throw new TypeError("must provide either filehandle or path");if(o)this.index=new Lr({filehandle:o,renameRefSeqs:h});else if(c)this.index=new Lc({filehandle:c,renameRefSeqs:h});else if(r)this.index=new Lr({filehandle:new We(r),renameRefSeqs:h});else if(a)this.index=new Lc({filehandle:new We(a),renameRefSeqs:h});else if(e)this.index=new Lr({filehandle:new We(`${e}.tbi`),renameRefSeqs:h});else if(l)this.index=new Lc({filehandle:new Yt(l)});else if(s)this.index=new Lr({filehandle:new Yt(s)});else if(i)this.index=new Lr({filehandle:new Yt(`${i}.tbi`)});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.renameRefSeq=h,this.hasCustomRenameRefSeq=f!==void 0,this.chunkCache=new Ir({cache:new Ao({maxSize:Math.floor(u/65536)}),fill:(A,d)=>this.readChunk(A,{signal:d})})}calculateFileOffset(e,n,i,r,s){return e[i]*256+(r-n[i])+s+1}async getLines(e,n,i,r){let s,o={},a;typeof r=="function"?a=r:(o=r,a=r.lineCallback,s=r.signal);const l=await this.index.getMetadata(o),c=n??0,f=i??l.maxRefLength;if(!(c<=f))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(c===f)return;const u=await this.index.blocksForRange(e,c,f,o),h=new TextDecoder("utf8"),A=l.format==="VCF",d={ref:l.columnNumbers.ref||0,start:l.columnNumbers.start||0,end:A?8:l.columnNumbers.end||0},g=Math.max(d.ref,d.start,d.end),m=l.metaChar?.charCodeAt(0),p=l.coordinateType==="1-based-closed"?-1:0,w=!this.hasCustomRenameRefSeq;for(const C of u){const{buffer:y,cpositions:b,dpositions:x}=await this.chunkCache.get(C.toString(),C,s);let I=0,S=0;const Q=h.decode(y);if(y.length==Q.length)for(;I<Q.length;){const F=Q.indexOf(`
|
|
822
|
-
`,
|
|
833
|
+
)`},Symbol.toStringTag,{value:"Module"}))).map(([t,e])=>[t,BC.parse(e.trim())]));function Ph(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 cP={".":0,"-":-1,"+":1};function lP(t){return t.length>=12&&!Number.isNaN(Number.parseInt(t[9],10))&&t[10]?.split(",").filter(e=>!!e).length===Number.parseInt(t[9],10)}class uP{constructor(e={}){if(e.autoSql)this.autoSql=Ph(BC.parse(e.autoSql));else if(e.type){if(!Th[e.type])throw new Error("Type not found");this.autoSql=Ph(Th[e.type])}else this.autoSql=Ph(Th.defaultBedSchema),this.attemptDefaultBed=!0}parseLine(e,n={}){const{autoSql:i}=this,{uniqueId:r}=n,s=Array.isArray(e)?e:e.split(" ");let o={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&lP(s))for(let a=0;a<i.fields.length;a++){const l=i.fields[a];let c=s[a];const{isNumeric:u,isArray:f,arrayIsNumeric:h,name:A}=l;if(c==null)break;if(c!=="."){if(u){const d=Number(c);c=Number.isNaN(d)?c:d}else f&&(c=c.split(","),c.at(-1)===""&&c.pop(),h&&(c=c.map(Number)));o[A]=c}}else{const a=["chrom","chromStart","chromEnd","name"];o=Object.fromEntries(s.map((l,c)=>[a[c]||"field"+c,l])),o.chromStart=+o.chromStart,o.chromEnd=+o.chromEnd,Number.isNaN(Number.parseFloat(o.field4))||(o.score=+o.field4,delete o.field4),(o.field5==="+"||o.field5==="-")&&(o.strand=o.field5,delete o.field5)}return r&&(o.uniqueId=r),o.strand=cP[o.strand]||0,o.chrom=decodeURIComponent(o.chrom),o}}const SC=Object.freeze(Object.defineProperty({__proto__:null,default:uP},Symbol.toStringTag,{value:"Module"}));var Fe=function(t,e,n,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(t,n):r?r.value=n:e.set(t,n),n},P=function(t,e,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(t):i?i.value:e.get(t)},ue,ft,fe,Ce,ki,mo,Ri,kc,Rt,DC,Lh,Oh,Uh,QC,Rc;class wo extends Map{constructor(e={}){if(super(),ue.add(this),ft.set(this,0),fe.set(this,new Map),Ce.set(this,new Map),ki.set(this,void 0),mo.set(this,void 0),Ri.set(this,void 0),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");Fe(this,ki,e.maxSize,"f"),Fe(this,mo,e.maxAge||Number.POSITIVE_INFINITY,"f"),Fe(this,Ri,e.onEviction,"f")}get __oldCache(){return P(this,Ce,"f")}get(e){if(P(this,fe,"f").has(e)){const n=P(this,fe,"f").get(e);return P(this,ue,"m",Lh).call(this,e,n)}if(P(this,Ce,"f").has(e)){const n=P(this,Ce,"f").get(e);if(!P(this,ue,"m",Rt).call(this,e,n))return P(this,ue,"m",QC).call(this,e,n),n.value}}set(e,n,{maxAge:i=P(this,mo,"f")}={}){const r=typeof i=="number"&&i!==Number.POSITIVE_INFINITY?Date.now()+i:void 0;return P(this,fe,"f").has(e)?P(this,fe,"f").set(e,{value:n,expiry:r}):P(this,ue,"m",Uh).call(this,e,{value:n,expiry:r}),this}has(e){return P(this,fe,"f").has(e)?!P(this,ue,"m",Rt).call(this,e,P(this,fe,"f").get(e)):P(this,Ce,"f").has(e)?!P(this,ue,"m",Rt).call(this,e,P(this,Ce,"f").get(e)):!1}peek(e){if(P(this,fe,"f").has(e))return P(this,ue,"m",Oh).call(this,e,P(this,fe,"f"));if(P(this,Ce,"f").has(e))return P(this,ue,"m",Oh).call(this,e,P(this,Ce,"f"))}expiresIn(e){const n=P(this,fe,"f").get(e)??P(this,Ce,"f").get(e);if(n)return n.expiry?n.expiry-Date.now():Number.POSITIVE_INFINITY}delete(e){var n;const i=P(this,fe,"f").delete(e);return i&&Fe(this,ft,(n=P(this,ft,"f"),n--,n),"f"),P(this,Ce,"f").delete(e)||i}clear(){P(this,fe,"f").clear(),P(this,Ce,"f").clear(),Fe(this,ft,0,"f")}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");const n=[...P(this,ue,"m",Rc).call(this)],i=n.length-e;i<0?(Fe(this,fe,new Map(n),"f"),Fe(this,Ce,new Map,"f"),Fe(this,ft,n.length,"f")):(i>0&&P(this,ue,"m",kc).call(this,n.slice(0,i)),Fe(this,Ce,new Map(n.slice(i)),"f"),Fe(this,fe,new Map,"f"),Fe(this,ft,0,"f")),Fe(this,ki,e,"f")}evict(e=1){const n=e;if(!n||n<=0)return;const i=[...P(this,ue,"m",Rc).call(this)],r=Math.trunc(Math.min(n,Math.max(i.length-1,0)));r<=0||(P(this,ue,"m",kc).call(this,i.slice(0,r)),Fe(this,Ce,new Map(i.slice(r)),"f"),Fe(this,fe,new Map,"f"),Fe(this,ft,0,"f"))}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[(ft=new WeakMap,fe=new WeakMap,Ce=new WeakMap,ki=new WeakMap,mo=new WeakMap,Ri=new WeakMap,ue=new WeakSet,kc=function(n){if(typeof P(this,Ri,"f")=="function")for(const[i,r]of n)P(this,Ri,"f").call(this,i,r.value)},Rt=function(n,i){return typeof i.expiry=="number"&&i.expiry<=Date.now()?(typeof P(this,Ri,"f")=="function"&&P(this,Ri,"f").call(this,n,i.value),this.delete(n)):!1},DC=function(n,i){if(!P(this,ue,"m",Rt).call(this,n,i))return i.value},Lh=function(n,i){return i.expiry?P(this,ue,"m",DC).call(this,n,i):i.value},Oh=function(n,i){const r=i.get(n);return P(this,ue,"m",Lh).call(this,n,r)},Uh=function(n,i){var r;P(this,fe,"f").set(n,i),Fe(this,ft,(r=P(this,ft,"f"),r++,r),"f"),P(this,ft,"f")>=P(this,ki,"f")&&(Fe(this,ft,0,"f"),P(this,ue,"m",kc).call(this,P(this,Ce,"f")),Fe(this,Ce,P(this,fe,"f"),"f"),Fe(this,fe,new Map,"f"))},QC=function(n,i){P(this,Ce,"f").delete(n),P(this,ue,"m",Uh).call(this,n,i)},Rc=function*(){for(const n of P(this,Ce,"f")){const[i,r]=n;P(this,fe,"f").has(i)||P(this,ue,"m",Rt).call(this,i,r)||(yield n)}for(const n of P(this,fe,"f")){const[i,r]=n;P(this,ue,"m",Rt).call(this,i,r)||(yield n)}},Symbol.iterator)](){for(const e of P(this,fe,"f")){const[n,i]=e;P(this,ue,"m",Rt).call(this,n,i)||(yield[n,i.value])}for(const e of P(this,Ce,"f")){const[n,i]=e;P(this,fe,"f").has(n)||P(this,ue,"m",Rt).call(this,n,i)||(yield[n,i.value])}}*entriesDescending(){let e=[...P(this,fe,"f")];for(let n=e.length-1;n>=0;--n){const i=e[n],[r,s]=i;P(this,ue,"m",Rt).call(this,r,s)||(yield[r,s.value])}e=[...P(this,Ce,"f")];for(let n=e.length-1;n>=0;--n){const i=e[n],[r,s]=i;P(this,fe,"f").has(r)||P(this,ue,"m",Rt).call(this,r,s)||(yield[r,s.value])}}*entriesAscending(){for(const[e,n]of P(this,ue,"m",Rc).call(this))yield[e,n.value]}get size(){if(!P(this,ft,"f"))return P(this,Ce,"f").size;let e=0;for(const n of P(this,Ce,"f").keys())P(this,fe,"f").has(n)||e++;return Math.min(P(this,ft,"f")+e,P(this,ki,"f"))}get maxSize(){return P(this,ki,"f")}get maxAge(){return P(this,mo,"f")}entries(){return this.entriesAscending()}forEach(e,n=this){for(const[i,r]of this.entriesAscending())e.call(n,r,i,this)}get[Symbol.toStringTag](){return"QuickLRU"}toString(){return`QuickLRU(${this.size}/${this.maxSize})`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}let kC=class{constructor(e,n,i,r){this.minv=e,this.maxv=n,this.bin=i,this._fetchedSize=r}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}};const RC=65536,fP=RC*RC;function hP(t,e=0){const n=t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24;return((t[e+4]|t[e+5]<<8|t[e+6]<<16|t[e+7]<<24)>>>0)*fP+(n>>>0)}function AP(t={}){return"aborted"in t?{signal:t}:t}function _h(t,e){const n=t.length;if(n===0)return t;let i;if(e){const l=e.blockPosition,c=e.dataPosition;i=[];for(let u=0;u<n;u++){const f=t[u],h=f.maxv;(h.blockPosition-l||h.dataPosition-c)>0&&i.push(f)}if(i.length===0)return i}else i=t;i.sort((l,c)=>{const u=l.minv.blockPosition-c.minv.blockPosition;return u!==0?u:l.minv.dataPosition-c.minv.dataPosition});const r=[];let s=i[0];r.push(s);let o=s.minv.blockPosition,a=s.maxv.blockPosition;for(let l=1;l<i.length;l++){const c=i[l],u=c.minv.blockPosition,f=c.maxv.blockPosition;if(u-a<65e3&&f-o<5e6){const h=c.maxv,A=s.maxv;(f-a||h.dataPosition-A.dataPosition)>0&&(s.maxv=h,a=f)}else r.push(c),s=c,o=u,a=f}return r}function FC(t,e){return{lineCount:hP(t,e)}}function yo(t,e){return t?t.compareTo(e)>0?e:t:e}function dP(t,e=n=>n){let n=0,i=0;const r=[],s={};for(let o=0;o<t.length;o+=1)if(!t[o]){if(i<o){let a="";for(let l=i;l<o;l++)a+=String.fromCharCode(t[l]);a=e(a),r[n]=a,s[a]=n}i=o+1,n+=1}return{refNameToId:s,refIdToName:r}}function gP(t){let e=0;for(const r of t)e+=r.length;const n=new Uint8Array(e);let i=0;for(const r of t)n.set(r,i),i+=r.length;return n}function pP(t,e,n){return!!((t&e)!==e||t&n)}function mP(t,e){return e==="*"?t===void 0:`${t}`!=`${e}`}function wP(t){if(!t)return"";const{flagInclude:e=0,flagExclude:n=0,tagFilter:i}=t,r=i?`:${i.tag}=${i.value??"*"}`:"";return`:f${e}x${n}${r}`}let NC=class{constructor({filehandle:e,renameRefSeq:n=i=>i}){this.filehandle=e,this.renameRefSeq=n}async estimatedBytesForRegions(e,n){const i=await Promise.all(e.map(o=>this.blocksForRange(o.refId,o.start,o.end,n))),r=_h(i.flat());let s=0;for(const o of r)s+=o.fetchedSize();return s}},MC=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}};function Jn(t,e=0,n=!1){if(n)throw new Error("big-endian virtual file offsets not implemented");return new MC(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])}const yP=21578050;function CP(t,e){return t-t%e}function bP(t,e){return t-t%e+e}function EP(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 Fr extends NC{async lineCount(e,n){return(await this.parse(n)).indices(e)?.stats?.lineCount||0}async _parse(e){const n=await this.filehandle.readFile(),i=new DataView(n.buffer);if(i.getUint32(0,!0)!==yP)throw new Error("Not a BAI file");const r=i.getInt32(4,!0),o=((1<<(5+1)*3)-1)/7;let a=8,l;const c=[];for(let h=0;h<r;h++){c.push(a);const A=i.getInt32(a,!0);a+=4;for(let m=0;m<A;m+=1){const p=i.getUint32(a,!0);if(a+=4,p===o+1)a+=4,a+=32;else{if(p>o+1)throw new Error("bai index contains too many bins, please use CSI");{const w=i.getInt32(a,!0);a+=4;for(let C=0;C<w;C++)a+=8,a+=8}}}const d=i.getInt32(a,!0);a+=4;const g=new Array(d);for(let m=0;m<d;m++){const p=Jn(n,a);a+=8,l=yo(l,p),g[m]=p}}const u=new wo({maxSize:5});function f(h){let A=c[h];if(A===void 0)return;const d=i.getInt32(A,!0);let g;A+=4;const m={};for(let C=0;C<d;C+=1){const y=i.getUint32(A,!0);if(A+=4,y===o+1)A+=4,g=FC(n,A+16),A+=32;else{if(y>o+1)throw new Error("bai index contains too many bins, please use CSI");{const I=i.getInt32(A,!0);A+=4;const x=new Array(I);for(let E=0;E<I;E++){const S=Jn(n,A);A+=8;const D=Jn(n,A);A+=8,l=yo(l,S),x[E]=new kC(S,D,y)}m[y]=x}}}const p=i.getInt32(A,!0);A+=4;const w=new Array(p);for(let C=0;C<p;C++){const y=Jn(n,A);A+=8,l=yo(l,y),w[C]=y}return{binIndex:m,linearIndex:w,stats:g}}return{bai:!0,firstDataLine:l,maxBlockSize:65536,indices:h=>{if(!u.has(h)){const A=f(h);return A&&u.set(h,A),A}return u.get(h)},refCount:r}}async indexCov(e,n,i,r){const o=n!==void 0,l=(await this.parse(r)).indices(e);if(!l)return[];const{linearIndex:c,stats:u}=l;if(c.length===0)return[];const f=i===void 0?(c.length-1)*16384:bP(i,16384),h=n===void 0?0:CP(n,16384),A=o?new Array((f-h)/16384):new Array(c.length-1),d=c[c.length-1].blockPosition;if(f>(c.length-1)*16384)throw new Error("query outside of range of linear index");let g=c[h/16384].blockPosition;for(let m=h/16384,p=0;m<f/16384;m++,p++)A[p]={score:c[m+1].blockPosition-g,start:m*16384,end:m*16384+16384},g=c[m+1].blockPosition;return A.map(m=>({...m,score:m.score*(u?.lineCount||0)/d}))}async blocksForRange(e,n,i,r={}){n<0&&(n=0);const s=await this.parse(r);if(!s)return[];const o=s.indices(e);if(!o)return[];const a=EP(n,i),l=[],{binIndex:c}=o;for(const[d,g]of a)for(let m=d;m<=g;m++){const p=c[m];if(p)for(let w=0,C=p.length;w<C;w++)l.push(p[w])}const{linearIndex:u}=o,f=u.length,h=Math.min(n>>14,f-1),A=u[h];return _h(l,A)}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={}){return!!(await this.parse(n)).indices(e)?.binIndex}}var TC=0,PC=2,Fc=4,Fi=0,Nc=1,IP=2,xP=-5;function vP(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function BP(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(var i in n)vP(n,i)&&(t[i]=n[i])}}return t}function LC(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)}var Co={arraySet:function(t,e,n,i,r){if(e.subarray&&t.subarray){t.set(e.subarray(n,n+i),r);return}for(var s=0;s<i;s++)t[r+s]=e[n+s]},flattenChunks:function(t){var e,n,i,r,s,o;for(i=0,e=0,n=t.length;e<n;e++)i+=t[e].length;for(o=new Uint8Array(i),r=0,e=0,n=t.length;e<n;e++)s=t[e],o.set(s,r),r+=s.length;return o},Buf8:function(t){return new Uint8Array(t)},Buf16:function(t){return new Uint16Array(t)},Buf32:function(t){return new Int32Array(t)}},bo={arraySet:function(t,e,n,i,r){for(var s=0;s<i;s++)t[r+s]=e[n+s]},flattenChunks:function(t){return[].concat.apply([],t)},Buf8:function(t){return new Array(t)},Buf16:function(t){return new Array(t)},Buf32:function(t){return new Array(t)}};let Nr=()=>{const t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";return Nr=()=>t,t},qn=(t,e,n,i,r)=>(qn=Nr()?Co.arraySet:bo.arraySet,qn(t,e,n,i,r)),zh=t=>(zh=Nr()?Co.flattenChunks:bo.flattenChunks,zh(t)),Mr=t=>(Mr=Nr()?Co.Buf8:bo.Buf8,Mr(t)),Tr=t=>(Tr=Nr()?Co.Buf16:bo.Buf16,Tr(t)),Pr=t=>(Pr=Nr()?Co.Buf32:bo.Buf32,Pr(t)),OC=function(){let t=!0;try{String.fromCharCode.apply(null,[0])}catch{t=!1}return OC=()=>t,t},UC=function(){let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{t=!1}return UC=()=>t,t},Gh=function(t){for(var e=Mr(256),n=0;n<256;n++)e[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;return e[254]=e[254]=1,Gh=i=>e[i],e[t]};function _C(t){var e,n,i,r,s,o=t.length,a=0;for(r=0;r<o;r++)n=t.charCodeAt(r),(n&64512)===55296&&r+1<o&&(i=t.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(a),s=0,r=0;s<a;r++)n=t.charCodeAt(r),(n&64512)===55296&&r+1<o&&(i=t.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),n<128?e[s++]=n:n<2048?(e[s++]=192|n>>>6,e[s++]=128|n&63):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|n&63):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|n&63);return e}function SP(t,e){if(e<65534&&(t.subarray&&UC()||!t.subarray&&OC()))return String.fromCharCode.apply(null,LC(t,e));for(var n="",i=0;i<e;i++)n+=String.fromCharCode(t[i]);return n}function DP(t){for(var e=new Uint8Array(t.length),n=0,i=e.length;n<i;n++)e[n]=t.charCodeAt(n);return e}function QP(t,e){var n,i,r,s,o=e||t.length,a=new Array(o*2);for(i=0,n=0;n<o;){if(r=t[n++],r<128){a[i++]=r;continue}if(s=Gh(r),s>4){a[i++]=65533,n+=s-1;continue}for(r&=s===2?31:s===3?15:7;s>1&&n<o;)r=r<<6|t[n++]&63,s--;if(s>1){a[i++]=65533;continue}r<65536?a[i++]=r:(r-=65536,a[i++]=55296|r>>10&1023,a[i++]=56320|r&1023)}return SP(a,i)}function kP(t,e){var n;for(e=e||t.length,e>t.length&&(e=t.length),n=e-1;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+Gh(t[n])>e?n:e}function RP(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}function Hh(t,e,n,i){for(var r=t&65535|0,s=t>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do r=r+e[i++]|0,s=s+r|0;while(--o);r%=65521,s%=65521}return r|s<<16|0}function FP(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e}let zC=function(){const t=FP();return zC=()=>t,t};function qt(t,e,n,i){var r=zC(),s=i+n;t^=-1;for(var o=i;o<s;o++)t=t>>>8^r[(t^e[o])&255];return t^-1}var Mc=30,NP=12;function MP(t,e){var n,i,r,s,o,a,l,c,u,f,h,A,d,g,m,p,w,C,y,I,x,E,S,D,B;n=t.state,i=t.next_in,D=t.input,r=i+(t.avail_in-5),s=t.next_out,B=t.output,o=s-(e-t.avail_out),a=s+(t.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,f=n.wnext,h=n.window,A=n.hold,d=n.bits,g=n.lencode,m=n.distcode,p=(1<<n.lenbits)-1,w=(1<<n.distbits)-1;e:do{d<15&&(A+=D[i++]<<d,d+=8,A+=D[i++]<<d,d+=8),C=g[A&p];t:for(;;){if(y=C>>>24,A>>>=y,d-=y,y=C>>>16&255,y===0)B[s++]=C&65535;else if(y&16){I=C&65535,y&=15,y&&(d<y&&(A+=D[i++]<<d,d+=8),I+=A&(1<<y)-1,A>>>=y,d-=y),d<15&&(A+=D[i++]<<d,d+=8,A+=D[i++]<<d,d+=8),C=m[A&w];n:for(;;){if(y=C>>>24,A>>>=y,d-=y,y=C>>>16&255,y&16){if(x=C&65535,y&=15,d<y&&(A+=D[i++]<<d,d+=8,d<y&&(A+=D[i++]<<d,d+=8)),x+=A&(1<<y)-1,x>l){t.msg="invalid distance too far back",n.mode=Mc;break e}if(A>>>=y,d-=y,y=s-o,x>y){if(y=x-y,y>u&&n.sane){t.msg="invalid distance too far back",n.mode=Mc;break e}if(E=0,S=h,f===0){if(E+=c-y,y<I){I-=y;do B[s++]=h[E++];while(--y);E=s-x,S=B}}else if(f<y){if(E+=c+f-y,y-=f,y<I){I-=y;do B[s++]=h[E++];while(--y);if(E=0,f<I){y=f,I-=y;do B[s++]=h[E++];while(--y);E=s-x,S=B}}}else if(E+=f-y,y<I){I-=y;do B[s++]=h[E++];while(--y);E=s-x,S=B}for(;I>2;)B[s++]=S[E++],B[s++]=S[E++],B[s++]=S[E++],I-=3;I&&(B[s++]=S[E++],I>1&&(B[s++]=S[E++]))}else{E=s-x;do B[s++]=B[E++],B[s++]=B[E++],B[s++]=B[E++],I-=3;while(I>2);I&&(B[s++]=B[E++],I>1&&(B[s++]=B[E++]))}}else if((y&64)===0){C=m[(C&65535)+(A&(1<<y)-1)];continue n}else{t.msg="invalid distance code",n.mode=Mc;break e}break}}else if((y&64)===0){C=g[(C&65535)+(A&(1<<y)-1)];continue t}else if(y&32){n.mode=NP;break e}else{t.msg="invalid literal/length code",n.mode=Mc;break e}break}}while(i<r&&s<a);I=d>>3,i-=I,d-=I<<3,A&=(1<<d)-1,t.next_in=i,t.next_out=s,t.avail_in=i<r?5+(r-i):5-(i-r),t.avail_out=s<a?257+(a-s):257-(s-a),n.hold=A,n.bits=d}var Lr=15,GC=852,HC=592,YC=0,Yh=1,VC=2,TP=[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],PP=[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],LP=[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],OP=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function Eo(t,e,n,i,r,s,o,a){var l=a.bits,c=0,u=0,f=0,h=0,A=0,d=0,g=0,m=0,p=0,w=0,C,y,I,x,E,S=null,D=0,B,k=Tr(Lr+1),F=Tr(Lr+1),M=null,O=0,_,H,G;for(c=0;c<=Lr;c++)k[c]=0;for(u=0;u<i;u++)k[e[n+u]]++;for(A=l,h=Lr;h>=1&&k[h]===0;h--);if(A>h&&(A=h),h===0)return r[s++]=1<<24|64<<16|0,r[s++]=1<<24|64<<16|0,a.bits=1,0;for(f=1;f<h&&k[f]===0;f++);for(A<f&&(A=f),m=1,c=1;c<=Lr;c++)if(m<<=1,m-=k[c],m<0)return-1;if(m>0&&(t===YC||h!==1))return-1;for(F[1]=0,c=1;c<Lr;c++)F[c+1]=F[c]+k[c];for(u=0;u<i;u++)e[n+u]!==0&&(o[F[e[n+u]]++]=u);if(t===YC?(S=M=o,B=19):t===Yh?(S=TP,D-=257,M=PP,O-=257,B=256):(S=LP,M=OP,B=-1),w=0,u=0,c=f,E=s,d=A,g=0,I=-1,p=1<<A,x=p-1,t===Yh&&p>GC||t===VC&&p>HC)return 1;for(;;){_=c-g,o[u]<B?(H=0,G=o[u]):o[u]>B?(H=M[O+o[u]],G=S[D+o[u]]):(H=96,G=0),C=1<<c-g,y=1<<d,f=y;do y-=C,r[E+(w>>g)+y]=_<<24|H<<16|G|0;while(y!==0);for(C=1<<c-1;w&C;)C>>=1;if(C!==0?(w&=C-1,w+=C):w=0,u++,--k[c]===0){if(c===h)break;c=e[n+o[u]]}if(c>A&&(w&x)!==I){for(g===0&&(g=A),E+=f,d=c-g,m=1<<d;d+g<h&&(m-=k[d+g],!(m<=0));)d++,m<<=1;if(p+=1<<d,t===Yh&&p>GC||t===VC&&p>HC)return 1;I=w&x,r[I]=A<<24|d<<16|E-s|0}}return w!==0&&(r[E+w]=c-g<<24|64<<16|0),a.bits=A,0}var UP=0,JC=1,qC=2,KC=4,Ni=0,_P=1,zP=2,bt=-2,jC=-3,WC=-4,GP=-5,XC=8,ZC=1,$C=2,eb=3,tb=4,nb=5,ib=6,rb=7,sb=8,ob=9,ab=10,Tc=11,gn=12,Vh=13,cb=14,Jh=15,lb=16,ub=17,fb=18,hb=19,Pc=20,Lc=21,Ab=22,db=23,gb=24,pb=25,mb=26,qh=27,wb=28,yb=29,me=30,Cb=31,HP=32,YP=852,VP=592;function bb(t){return(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24)}function JP(){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=Tr(320),this.work=Tr(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function qP(t){var e;return!t||!t.state?bt:(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=ZC,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=Pr(YP),e.distcode=e.distdyn=Pr(VP),e.sane=1,e.back=-1,Ni)}function KP(t){var e;return!t||!t.state?bt:(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,qP(t))}function jP(t,e){var n,i;return!t||!t.state||(i=t.state,e<0?(n=0,e=-e):(n=(e>>4)+1,e<48&&(e&=15)),e&&(e<8||e>15))?bt:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=n,i.wbits=e,KP(t))}function WP(t,e){var n,i;return t?(i=new JP,t.state=i,i.window=null,n=jP(t,e),n!==Ni&&(t.state=null),n):bt}var Eb=!0,Kh,jh;function XP(t){if(Eb){var e;for(Kh=Pr(512),jh=Pr(32),e=0;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(Eo(JC,t.lens,0,288,Kh,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Eo(qC,t.lens,0,32,jh,0,t.work,{bits:5}),Eb=!1}t.lencode=Kh,t.lenbits=9,t.distcode=jh,t.distbits=5}function Ib(t,e,n,i){var r,s=t.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=Mr(s.wsize)),i>=s.wsize?(qn(s.window,e,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(r=s.wsize-s.wnext,r>i&&(r=i),qn(s.window,e,n-i,r,s.wnext),i-=r,i?(qn(s.window,e,n-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=r))),0}function ZP(t,e){var n,i,r,s,o,a,l,c,u,f,h,A,d,g,m=0,p,w,C,y,I,x,E,S,D=Mr(4),B,k,F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&t.avail_in!==0)return bt;n=t.state,n.mode===gn&&(n.mode=Vh),o=t.next_out,r=t.output,l=t.avail_out,s=t.next_in,i=t.input,a=t.avail_in,c=n.hold,u=n.bits,f=a,h=l,S=Ni;e:for(;;)switch(n.mode){case ZC:if(n.wrap===0){n.mode=Vh;break}for(;u<16;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(n.wrap&2&&c===35615){n.check=0,D[0]=c&255,D[1]=c>>>8&255,n.check=qt(n.check,D,2,0),c=0,u=0,n.mode=$C;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",n.mode=me;break}if((c&15)!==XC){t.msg="unknown compression method",n.mode=me;break}if(c>>>=4,u-=4,E=(c&15)+8,n.wbits===0)n.wbits=E;else if(E>n.wbits){t.msg="invalid window size",n.mode=me;break}n.dmax=1<<E,t.adler=n.check=1,n.mode=c&512?ab:gn,c=0,u=0;break;case $C:for(;u<16;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(n.flags=c,(n.flags&255)!==XC){t.msg="unknown compression method",n.mode=me;break}if(n.flags&57344){t.msg="unknown header flags set",n.mode=me;break}n.head&&(n.head.text=c>>8&1),n.flags&512&&(D[0]=c&255,D[1]=c>>>8&255,n.check=qt(n.check,D,2,0)),c=0,u=0,n.mode=eb;case eb:for(;u<32;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.head&&(n.head.time=c),n.flags&512&&(D[0]=c&255,D[1]=c>>>8&255,D[2]=c>>>16&255,D[3]=c>>>24&255,n.check=qt(n.check,D,4,0)),c=0,u=0,n.mode=tb;case tb:for(;u<16;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&(D[0]=c&255,D[1]=c>>>8&255,n.check=qt(n.check,D,2,0)),c=0,u=0,n.mode=nb;case nb:if(n.flags&1024){for(;u<16;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&(D[0]=c&255,D[1]=c>>>8&255,n.check=qt(n.check,D,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=ib;case ib:if(n.flags&1024&&(A=n.length,A>a&&(A=a),A&&(n.head&&(E=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),qn(n.head.extra,i,s,A,E)),n.flags&512&&(n.check=qt(n.check,i,A,s)),a-=A,s+=A,n.length-=A),n.length))break e;n.length=0,n.mode=rb;case rb:if(n.flags&2048){if(a===0)break e;A=0;do E=i[s+A++],n.head&&E&&n.length<65536&&(n.head.name+=String.fromCharCode(E));while(E&&A<a);if(n.flags&512&&(n.check=qt(n.check,i,A,s)),a-=A,s+=A,E)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=sb;case sb:if(n.flags&4096){if(a===0)break e;A=0;do E=i[s+A++],n.head&&E&&n.length<65536&&(n.head.comment+=String.fromCharCode(E));while(E&&A<a);if(n.flags&512&&(n.check=qt(n.check,i,A,s)),a-=A,s+=A,E)break e}else n.head&&(n.head.comment=null);n.mode=ob;case ob:if(n.flags&512){for(;u<16;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(c!==(n.check&65535)){t.msg="header crc mismatch",n.mode=me;break}c=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=gn;break;case ab:for(;u<32;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}t.adler=n.check=bb(c),c=0,u=0,n.mode=Tc;case Tc:if(n.havedict===0)return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=u,zP;t.adler=n.check=1,n.mode=gn;case gn:case Vh:if(n.last){c>>>=u&7,u-=u&7,n.mode=qh;break}for(;u<3;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}switch(n.last=c&1,c>>>=1,u-=1,c&3){case 0:n.mode=cb;break;case 1:XP(n),n.mode=Pc;break;case 2:n.mode=ub;break;case 3:t.msg="invalid block type",n.mode=me}c>>>=2,u-=2;break;case cb:for(c>>>=u&7,u-=u&7;u<32;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){t.msg="invalid stored block lengths",n.mode=me;break}n.length=c&65535,c=0,u=0,n.mode=Jh;case Jh:n.mode=lb;case lb:if(A=n.length,A){if(A>a&&(A=a),A>l&&(A=l),A===0)break e;qn(r,i,s,A,o),a-=A,s+=A,l-=A,o+=A,n.length-=A;break}n.mode=gn;break;case ub:for(;u<14;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(n.nlen=(c&31)+257,c>>>=5,u-=5,n.ndist=(c&31)+1,c>>>=5,u-=5,n.ncode=(c&15)+4,c>>>=4,u-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=me;break}n.have=0,n.mode=fb;case fb:for(;n.have<n.ncode;){for(;u<3;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.lens[F[n.have++]]=c&7,c>>>=3,u-=3}for(;n.have<19;)n.lens[F[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},S=Eo(UP,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,S){t.msg="invalid code lengths set",n.mode=me;break}n.have=0,n.mode=hb;case hb:for(;n.have<n.nlen+n.ndist;){for(;m=n.lencode[c&(1<<n.lenbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=u);){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(C<16)c>>>=p,u-=p,n.lens[n.have++]=C;else{if(C===16){for(k=p+2;u<k;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(c>>>=p,u-=p,n.have===0){t.msg="invalid bit length repeat",n.mode=me;break}E=n.lens[n.have-1],A=3+(c&3),c>>>=2,u-=2}else if(C===17){for(k=p+3;u<k;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}c>>>=p,u-=p,E=0,A=3+(c&7),c>>>=3,u-=3}else{for(k=p+7;u<k;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}c>>>=p,u-=p,E=0,A=11+(c&127),c>>>=7,u-=7}if(n.have+A>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=me;break}for(;A--;)n.lens[n.have++]=E}}if(n.mode===me)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=me;break}if(n.lenbits=9,B={bits:n.lenbits},S=Eo(JC,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,S){t.msg="invalid literal/lengths set",n.mode=me;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},S=Eo(qC,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,S){t.msg="invalid distances set",n.mode=me;break}n.mode=Pc;case Pc:n.mode=Lc;case Lc:if(a>=6&&l>=258){t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=u,MP(t,h),o=t.next_out,r=t.output,l=t.avail_out,s=t.next_in,i=t.input,a=t.avail_in,c=n.hold,u=n.bits,n.mode===gn&&(n.back=-1);break}for(n.back=0;m=n.lencode[c&(1<<n.lenbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=u);){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(w&&(w&240)===0){for(y=p,I=w,x=C;m=n.lencode[x+((c&(1<<y+I)-1)>>y)],p=m>>>24,w=m>>>16&255,C=m&65535,!(y+p<=u);){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}c>>>=y,u-=y,n.back+=y}if(c>>>=p,u-=p,n.back+=p,n.length=C,w===0){n.mode=mb;break}if(w&32){n.back=-1,n.mode=gn;break}if(w&64){t.msg="invalid literal/length code",n.mode=me;break}n.extra=w&15,n.mode=Ab;case Ab:if(n.extra){for(k=n.extra;u<k;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=db;case db:for(;m=n.distcode[c&(1<<n.distbits)-1],p=m>>>24,w=m>>>16&255,C=m&65535,!(p<=u);){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if((w&240)===0){for(y=p,I=w,x=C;m=n.distcode[x+((c&(1<<y+I)-1)>>y)],p=m>>>24,w=m>>>16&255,C=m&65535,!(y+p<=u);){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}c>>>=y,u-=y,n.back+=y}if(c>>>=p,u-=p,n.back+=p,w&64){t.msg="invalid distance code",n.mode=me;break}n.offset=C,n.extra=w&15,n.mode=gb;case gb:if(n.extra){for(k=n.extra;u<k;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=me;break}n.mode=pb;case pb:if(l===0)break e;if(A=h-l,n.offset>A){if(A=n.offset-A,A>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=me;break}A>n.wnext?(A-=n.wnext,d=n.wsize-A):d=n.wnext-A,A>n.length&&(A=n.length),g=n.window}else g=r,d=o-n.offset,A=n.length;A>l&&(A=l),l-=A,n.length-=A;do r[o++]=g[d++];while(--A);n.length===0&&(n.mode=Lc);break;case mb:if(l===0)break e;r[o++]=n.length,l--,n.mode=Lc;break;case qh:if(n.wrap){for(;u<32;){if(a===0)break e;a--,c|=i[s++]<<u,u+=8}if(h-=l,t.total_out+=h,n.total+=h,h&&(t.adler=n.check=n.flags?qt(n.check,r,h,o-h):Hh(n.check,r,h,o-h)),h=l,(n.flags?c:bb(c))!==n.check){t.msg="incorrect data check",n.mode=me;break}c=0,u=0}n.mode=wb;case wb:if(n.wrap&&n.flags){for(;u<32;){if(a===0)break e;a--,c+=i[s++]<<u,u+=8}if(c!==(n.total&4294967295)){t.msg="incorrect length check",n.mode=me;break}c=0,u=0}n.mode=yb;case yb:S=_P;break e;case me:S=jC;break e;case Cb:return WC;case HP:default:return bt}return t.next_out=o,t.avail_out=l,t.next_in=s,t.avail_in=a,n.hold=c,n.bits=u,(n.wsize||h!==t.avail_out&&n.mode<me&&(n.mode<qh||e!==KC))&&Ib(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&&h&&(t.adler=n.check=n.flags?qt(n.check,r,h,t.next_out-h):Hh(n.check,r,h,t.next_out-h)),t.data_type=n.bits+(n.last?64:0)+(n.mode===gn?128:0)+(n.mode===Pc||n.mode===Jh?256:0),(f===0&&h===0||e===KC)&&S===Ni&&(S=GP),S}function $P(t){if(!t||!t.state)return bt;var e=t.state;return e.window&&(e.window=null),t.state=null,Ni}function e9(t,e){var n;return!t||!t.state||(n=t.state,(n.wrap&2)===0)?bt:(n.head=e,e.done=!1,Ni)}function xb(t,e){var n=e.length,i,r,s;return!t||!t.state||(i=t.state,i.wrap!==0&&i.mode!==Tc)?bt:i.mode===Tc&&(r=1,r=Hh(r,e,n,0),r!==i.check)?jC:(s=Ib(t,e,n,n),s?(i.mode=Cb,WC):(i.havedict=1,Ni))}const Wh={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function t9(){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 Xh=Object.prototype.toString;class Oc{constructor(e){if(!(this instanceof Oc))return new Oc(e);this.options=BP({chunkSize:16384,windowBits:0,to:""},e||{});var n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(e&&e.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new t9,this.strm.avail_out=0;var i=WP(this.strm,n.windowBits);if(i!==Fi)throw new Error(Wh[i]);if(this.header=new RP,e9(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=_C(n.dictionary):Xh.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(i=xb(this.strm,n.dictionary),i!==Fi)))throw new Error(Wh[i])}push(e,n){var i=this.strm,r=this.options.chunkSize,s=this.options.dictionary,o,a,l,c,u,f,h=!1;if(this.ended)return!1;a=n===~~n?n:n===!0?Fc:TC,typeof e=="string"?i.input=DP(e):Xh.call(e)==="[object ArrayBuffer]"?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(i.avail_out===0&&(i.output=Mr(r),i.next_out=0,i.avail_out=r),o=ZP(i,TC),o===IP&&s&&(typeof s=="string"?f=_C(s):Xh.call(s)==="[object ArrayBuffer]"?f=new Uint8Array(s):f=s,o=xb(this.strm,f)),o===xP&&h===!0&&(o=Fi,h=!1),o!==Nc&&o!==Fi)return this.onEnd(o),this.ended=!0,!1;i.next_out&&(i.avail_out===0||o===Nc||i.avail_in===0&&(a===Fc||a===PC))&&(this.options.to==="string"?(l=kP(i.output,i.next_out),c=i.next_out-l,u=QP(i.output,l),i.next_out=c,i.avail_out=r-c,c&&qn(i.output,i.output,l,c,0),this.onData(u)):this.onData(LC(i.output,i.next_out))),i.avail_in===0&&i.avail_out===0&&(h=!0)}while((i.avail_in>0||i.avail_out===0)&&o!==Nc);return o===Nc&&(a=Fc),a===Fc?(o=$P(this.strm),this.onEnd(o),this.ended=!0,o===Fi):(a===PC&&(this.onEnd(Fi),i.avail_out=0),!0)}onData(e){this.chunks.push(e)}onEnd(e){e===Fi&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=zh(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}}function n9(t,e){var n=new Oc(e);if(n.push(t,!0),n.err)throw n.msg||Wh[n.err];return n.result}var i9=n9,Mi={};Mi.d=(t,e)=>{for(var n in e)Mi.o(e,n)&&!Mi.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},Mi.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Mi.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var Zh={};Mi.r(Zh),Mi.d(Zh,{ChunkSliceResult:()=>Ur,DecompressResult:()=>_r,__wbg_Error_52673b7de5a0ca89:()=>h9,__wbg___wbindgen_throw_dd24417ed36fc46e:()=>A9,__wbg_set_wasm:()=>vb,decompress_all:()=>kb,decompress_block:()=>f9,decompress_chunk_slice:()=>Rb});const r9="data:application/wasm;base64,AGFzbQEAAAABfRFgAABgAAF/YAF/AGABfwF/YAJ/fwBgAn9/AX9gA39/fwBgA39/fwF/YAR/f39/AGAEf39/fwF/YAV/f39/fwBgBX9/f39/AX9gBn9/f39/fwBgBn9/f39/fwF/YAd/f39/f39/AGAHf39/f39/fwF/YAh/f39/f39/fwF/Am4CES4vYmd6Zl93YXNtX2JnLmpzJ19fd2JnX19fd2JpbmRnZW5fdGhyb3dfZGQyNDQxN2VkMzZmYzQ2ZQAEES4vYmd6Zl93YXNtX2JnLmpzHF9fd2JnX0Vycm9yXzUyNjczYjdkZTVhMGNhODkABQNsawMPEA4FCQ0CBwcGCAQFBAQFBQYEBAoEBAQEDgYGBAQKBAICBQwICAQGBgYGBgYDBQ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KQTAgCSgCEBEFAEUNAAwECwtBASEMIAogCSAIIAIgAxA7DQIgCiAEIAUgCSgCDBEHAA0CQQAhASANIAtrQf//A3EhAANAIAFB//8DcSICIABJIQwgAiAATw0DIAFBAWohASAKIAYgCSgCEBEFAEUNAAwDCwtBASEMIAogBCAFIAkoAgwRBwANASAAIA43AghBAA8LQQEhDCAAKAIAIgEgACgCBCIKIAggAiADEDsNACABIAQgBSAKKAIMEQcAIQwLIAwLjgYBBX8gAEF4aiIBIABBfGooAgAiAkF4cSIAaiEDAkACQCACQQFxDQAgAkECcUUNASABKAIAIgIgAGohAAJAIAEgAmsiAUEAKALAoEBHDQAgAygCBEEDcUEDRw0BQQAgADYCuKBAIAMgAygCBEF+cTYCBCABIABBAXI2AgQgAyAANgIADwsgASACEBALAkACQAJAAkACQAJAIAMoAgQiAkECcQ0AIANBACgCxKBARg0CIANBACgCwKBARg0DIAMgAkF4cSICEBAgASACIABqIgBBAXI2AgQgASAAaiAANgIAIAFBACgCwKBARw0BQQAgADYCuKBADwsgAyACQX5xNgIEIAEgAEEBcjYCBCABIABqIAA2AgALIABBgAJJDQIgASAAEBFBACEBQQBBACgC2KBAQX9qIgA2AtigQCAADQQCQEEAKAKgnkAiAEUNAEEAIQEDQCABQQFqIQEgACgCCCIADQALC0EAIAFB/x8gAUH/H0sbNgLYoEAPC0EAIAE2AsSgQEEAQQAoArygQCAAaiIANgK8oEAgASAAQQFyNgIEAkAgAUEAKALAoEBHDQBBAEEANgK4oEBBAEEANgLAoEALIABBACgC0KBAIgRNDQNBACgCxKBAIgBFDQNBACECQQAoArygQCIFQSlJDQJBmJ7AACEBA0ACQCABKAIAIgMgAEsNACAAIAMgASgCBGpJDQQLIAEoAgghAQwACwtBACABNgLAoEBBAEEAKAK4oEAgAGoiADYCuKBAIAEgAEEBcjYCBCABIABqIAA2AgAPCwJAAkBBACgCsKBAIgNBASAAQQN2dCICcQ0AQQAgAyACcjYCsKBAIABB+AFxQaiewABqIgAhAwwBCyAAQ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kCADcDCCAAQZCXwAAgAkEIahALIQEgAkEgaiQAIAELWQECfyABKAIAIQIgAUEANgIAAkACQCACRQ0AIAEoAgQhAxBrQQhBBBBaIgFFDQEgASADNgIEIAEgAjYCACAAQfCXwAA2AgQgACABNgIADwsAC0EEQQgQYQALTgEDfwJAAkACQCAARQ0AIABBeGoiASABKAIAIgJBAWoiAzYCACADRQ0BIAAoAgBBf0YNAiAAKAIQIQAgASACNgIAIAAPCxBdCwALEF8AC1ABAX8CQCACIAAoAgAgACgCCCIDa00NACAAIAMgAkEBQQEQFyAAKAIIIQMLAkAgAkUNACAAKAIEIANqIAEgAvwKAAALIAAgAyACajYCCEEAC0wBAX8CQCAAKAIAIgBBDGooAgAiAUUNACAAQRBqKAIAIAFBARBXCwJAIABBf0YNACAAIAAoAgRBf2oiATYCBCABDQAgAEEcQQQQVwsLRQACQAJAIAFBCUkNACABIAAQDyEBDAELIAAQAiEBCwJAIAFFDQAgAUF8ai0AAEEDcUUNACAARQ0AIAFBACAA/AsACyABC1IBAn9BACEBQQBBACgC6KBAIgJBAWo2AuigQAJAIAJBAEgNAEEBIQFBAC0A5KBADQBBACAAOgDkoEBBAEEAKALgoEBBAWo2AuCgQEECIQELIAELRwECfyABKAIEIQIgASgCACEDEGsCQEEIQQQQWiIBDQBBBEEIEGEACyABIAI2AgQgASADNgIAIABB8JfAADYCBCAAIAE2AgALOAACQAJAIAAgAksNACABIAJLDQEgACABTQ0BIAAgASADECsACyAAIAIgAxAsAAsgASACIAMQLQALQQEBfyMAQSBrIgMkACADQQA2AhAgA0EBNgIEIANCBDcCCCADIAE2AhwgAyAANgIYIAMgA0EYajYCACADIAIQQQALOQACQCACQYCAxABGDQAgACACIAEoAhARBQBFDQBBAQ8LAkAgAw0AQQAPCyAAIAMgBCABKAIMEQcACzYBAX8jAEEgayIBJAAgAUEANgIYIAFBATYCDCABQaSZwAA2AgggAUIENwIQIAFBCGogABBBAAsnAAJAIAAgARBPRQ0AAkAgAEUNABBrIAAgARBaIgFFDQELIAEPCwALLAIBfwF+IwBBEGsiASQAIAApAgAhAiABIAA2AgwgASACNwIEIAFBBGoQZgALLQEBfyMAQRBrIgEkACABIAApAgA3AgggAUEIakH0lsAAIAAoAghBAUEAECEACyoBAX8jAEEQayIDJAAgAyACNgIMIAMgATYCCCADIAA2AgQgA0EEahBnAAsqAQF/IwBBEGsiAiQAIAJBATsBDCACIAE2AgggAiAANgIEIAJBBGoQPgALKQEBfwJAIAAoAgAiAUGAgICAeHJBgICAgHhGDQAgACgCBCABQQEQVwsLHgEBfwJAIAAoAgAiAkUNACABIAIgACgCBBBTDwsACyAAAkAgASgCAEUNACAAQfCXwAA2AgQgACABNgIADwsACxsBAX8QayAAQQRqQQQQWiIBIAA2AgAgAUEEagsjAQF/AkBBjIvAABAwIgANAEHAisAAQTpB/IrAABBAAAsgAAsXAAJAIAFBCUkNACABIAAQDw8LIAAQAgsfAAJAIABBgICAgHhyQYCAgIB4Rg0AIAEgAEEBEFcLCxwBAX8CQCAAKAIAIgFFDQAgACgCBCABQQEQVwsLFgACQCAARQ0AIAAgARBhAAsgAhA8AAsVACAAQXxqIgAgACgCAEEEakEEEFcLGgEBfyABIABBACgC3KBAIgJBAyACGxEEAAALHQAgAEEIakEAKQKYlkA3AgAgAEEAKQKQlkA3AgALHQAgAEEIakEAKQKolkA3AgAgAEEAKQKglkA3AgALFQAgAWlBAUYgAEGAgICAeCABa01xCxIAAkAgAUUNACAAIAEgAhBXCwsSACAAIAEgAiADIARBACAFEAMLFQACQCAARQ0AIAAgACgCqFoRAgALCxYAIAAoAgAgASACIAAoAgQoAgwRBwALDQAgACABIAIgAxAHDwsQACABIAAoAgAgACgCBBBTCxMAIABB8JfAADYCBCAAIAE2AgALCwAgACABIAIQLw8LCgAgACABEGoaAAsLACAAIwBqJAAjAAsJACAAIAEQRw8LCQAgACABEDYPCwkAIAAgARBMDwsMAEG4iMAAQRsQXgALCQAgACABEGMACw0AQdOIwABBzwAQXgALDAAgACABKQIANwMACwk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Bwc2l6ZSA8PSBzaXplICsgbWF4X292ZXJoZWFkAAAMAhAAKgAAALcEAAANAAAACQAAAAwAAAAEAAAAFgAAAGNhcGFjaXR5IG92ZXJmbG93AAAAkAwQABEAAAAwMDAxMDIwMzA0MDUwNjA3MDgwOTEwMTExMjEzMTQxNTE2MTcxODE5MjAyMTIyMjMyNDI1MjYyNzI4MjkzMDMxMzIzMzM0MzUzNjM3MzgzOTQwNDE0MjQzNDQ0NTQ2NDc0ODQ5NTA1MTUyNTM1NDU1NTY1NzU4NTk2MDYxNjI2MzY0NjU2NjY3Njg2OTcwNzE3MjczNzQ3NTc2Nzc3ODc5ODA4MTgyODM4NDg1ODY4Nzg4ODk5MDkxOTI5Mzk0OTU5Njk3OTg5OQEAAAAAAAAAcmFuZ2Ugc3RhcnQgaW5kZXggIG91dCBvZiByYW5nZSBmb3Igc2xpY2Ugb2YgbGVuZ3RoIHwNEAASAAAAjg0QACIAAAByYW5nZSBlbmQgaW5kZXggwA0QABAAAACODRAAIgAAAHNsaWNlIGluZGV4IHN0YXJ0cyBhdCAgYnV0IGVuZHMgYXQgAOANEAAWAAAA9g0QAA0AAABpbmRleCBvdXQgb2YgYm91bmRzOiB0aGUgbGVuIGlzICBidXQgdGhlIGluZGV4IGlzIAAAFA4QACAAAAA0DhAAEgAAAFJlZkNlbGwgYWxyZWFkeSBib3Jyb3dlZABB8JzAAAsEBAAAAAApBG5hbWUBIgFZH19fd2JpbmRnZW5fYWRkX3RvX3N0YWNrX3BvaW50ZXIAPAlwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQIGd2FscnVzBjAuMjQuNAx3YXNtLWJpbmRnZW4HMC4yLjEwNg==";let X;function vb(t){X=t}function s9(t){Io===pn.length&&pn.push(pn.length+1);const e=Io;return Io=pn[e],pn[e]=t,e}function o9(t){t<132||(pn[t]=Io,Io=t)}function Bb(t,e){return t=t>>>0,a9().subarray(t/4,t/4+e)}function $h(t,e){return t=t>>>0,eA().subarray(t/1,t/1+e)}let Or=null;function Ue(){return(Or===null||Or.buffer.detached===!0||Or.buffer.detached===void 0&&Or.buffer!==X.memory.buffer)&&(Or=new DataView(X.memory.buffer)),Or}function Sb(t,e){return t=t>>>0,u9(t,e)}let Uc=null;function a9(){return(Uc===null||Uc.byteLength===0)&&(Uc=new Uint32Array(X.memory.buffer)),Uc}let _c=null;function eA(){return(_c===null||_c.byteLength===0)&&(_c=new Uint8Array(X.memory.buffer)),_c}function c9(t){return pn[t]}let pn=new Array(128).fill(void 0);pn.push(void 0,null,!0,!1);let Io=pn.length;function tA(t,e){const n=e(t.length*1,1)>>>0;return eA().set(t,n/1),Gc=t.length,n}function nA(t){const e=c9(t);return o9(t),e}let zc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});zc.decode();const l9=2146435072;let iA=0;function u9(t,e){return iA+=e,iA>=l9&&(zc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),zc.decode(),iA=e),zc.decode(eA().subarray(t,t+e))}let Gc=0;const Db=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>X.__wbg_chunksliceresult_free(t>>>0,1)),Qb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>X.__wbg_decompressresult_free(t>>>0,1));class Ur{static __wrap(e){e=e>>>0;const n=Object.create(Ur.prototype);return n.__wbg_ptr=e,Db.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Db.unregister(this),e}free(){const e=this.__destroy_into_raw();X.__wbg_chunksliceresult_free(e,0)}get cpositions(){try{const r=X.__wbindgen_add_to_stack_pointer(-16);X.chunksliceresult_cpositions(r,this.__wbg_ptr);var e=Ue().getInt32(r+0,!0),n=Ue().getInt32(r+4,!0),i=Bb(e,n).slice();return X.__wbindgen_export(e,n*4,4),i}finally{X.__wbindgen_add_to_stack_pointer(16)}}get dpositions(){try{const r=X.__wbindgen_add_to_stack_pointer(-16);X.chunksliceresult_dpositions(r,this.__wbg_ptr);var e=Ue().getInt32(r+0,!0),n=Ue().getInt32(r+4,!0),i=Bb(e,n).slice();return X.__wbindgen_export(e,n*4,4),i}finally{X.__wbindgen_add_to_stack_pointer(16)}}get buffer(){try{const r=X.__wbindgen_add_to_stack_pointer(-16);X.chunksliceresult_buffer(r,this.__wbg_ptr);var e=Ue().getInt32(r+0,!0),n=Ue().getInt32(r+4,!0),i=$h(e,n).slice();return X.__wbindgen_export(e,n*1,1),i}finally{X.__wbindgen_add_to_stack_pointer(16)}}}Symbol.dispose&&(Ur.prototype[Symbol.dispose]=Ur.prototype.free);class _r{static __wrap(e){e=e>>>0;const n=Object.create(_r.prototype);return n.__wbg_ptr=e,Qb.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Qb.unregister(this),e}free(){const e=this.__destroy_into_raw();X.__wbg_decompressresult_free(e,0)}get bytes_read(){return X.decompressresult_bytes_read(this.__wbg_ptr)>>>0}get data(){try{const r=X.__wbindgen_add_to_stack_pointer(-16);X.decompressresult_data(r,this.__wbg_ptr);var e=Ue().getInt32(r+0,!0),n=Ue().getInt32(r+4,!0),i=$h(e,n).slice();return X.__wbindgen_export(e,n*1,1),i}finally{X.__wbindgen_add_to_stack_pointer(16)}}}Symbol.dispose&&(_r.prototype[Symbol.dispose]=_r.prototype.free);function kb(t){try{const o=X.__wbindgen_add_to_stack_pointer(-16),a=tA(t,X.__wbindgen_export2),l=Gc;X.decompress_all(o,a,l);var e=Ue().getInt32(o+0,!0),n=Ue().getInt32(o+4,!0),i=Ue().getInt32(o+8,!0),r=Ue().getInt32(o+12,!0);if(r)throw nA(i);var s=$h(e,n).slice();return X.__wbindgen_export(e,n*1,1),s}finally{X.__wbindgen_add_to_stack_pointer(16)}}function f9(t){try{const r=X.__wbindgen_add_to_stack_pointer(-16),s=tA(t,X.__wbindgen_export2),o=Gc;X.decompress_block(r,s,o);var e=Ue().getInt32(r+0,!0),n=Ue().getInt32(r+4,!0),i=Ue().getInt32(r+8,!0);if(i)throw nA(n);return _r.__wrap(e)}finally{X.__wbindgen_add_to_stack_pointer(16)}}function Rb(t,e,n,i,r){try{const l=X.__wbindgen_add_to_stack_pointer(-16),c=tA(t,X.__wbindgen_export2),u=Gc;X.decompress_chunk_slice(l,c,u,e,n,i,r);var s=Ue().getInt32(l+0,!0),o=Ue().getInt32(l+4,!0),a=Ue().getInt32(l+8,!0);if(a)throw nA(o);return Ur.__wrap(s)}finally{X.__wbindgen_add_to_stack_pointer(16)}}function h9(t,e){const n=Error(Sb(t,e));return s9(n)}function A9(t,e){throw new Error(Sb(t,e))}let xo=null,rA=null;async function Fb(){return xo||(rA||(rA=(async()=>{const e=await(await fetch(r9)).arrayBuffer(),{instance:n}=await WebAssembly.instantiate(e,{"./bgzf_wasm_bg.js":Zh});return xo=n.exports,vb(xo),xo})()),rA)}async function d9(t){return await Fb(),kb(t)}async function g9(t,e,n,i,r){await Fb();const s=Rb(t,e,n,i,r),o=s.buffer,a=[...s.cpositions],l=[...s.dpositions];return s.free(),{buffer:o,cpositions:a,dpositions:l}}function p9(t){return t.length>=2&&t[0]===31&&t[1]===139}async function m9(t){if(typeof DecompressionStream<"u"){const e=new DecompressionStream("gzip"),n=e.writable.getWriter(),i=n.write(t).then(()=>n.close()),r=[],s=e.readable.getReader();for(;;){const{done:c,value:u}=await s.read();if(c)break;r.push(u)}await i;const o=r.reduce((c,u)=>c+u.length,0),a=new Uint8Array(o);let l=0;for(const c of r)a.set(c,l),l+=c.length;return a}else return i9(t,void 0)}async function zr(t){try{return await d9(t)}catch(e){if(/invalid bgzf header/.exec(`${e}`)){if(p9(t))return m9(t);throw new Error("problem decompressing block: not a valid bgzf or gzip block")}throw/invalid gzip header/.exec(`${e}`)?new Error("problem decompressing block: incorrect gzip header check"):e}}async function Nb(t,e,n){try{const{minv:i,maxv:r}=e,s=await g9(t,i.blockPosition,i.dataPosition,r.blockPosition,r.dataPosition);return{buffer:s.buffer,cpositions:s.cpositions,dpositions:s.dpositions}}catch(i){throw/invalid gzip header/.exec(`${i}`)?new Error("problem decompressing block: incorrect gzip header check"):i}}let sA=[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"&&(sA=new Int32Array(sA));const w9=(t,e)=>{let n=-1;for(let i=0;i<t.length;i++)n=sA[(n^t[i])&255]^n>>>8;return n^-1},y9=21582659,C9=38359875;function b9(t,e){return t*2**e}function Mb(t,e){return Math.floor(t/2**e)}let Hc=class extends NC{constructor(){super(...arguments),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(e,n){return(await this.parse(n)).indices(e)?.stats?.lineCount||0}async indexCov(){return[]}parseAuxData(e,n){const i=new DataView(e.buffer),r=i.getUint32(n,!0),s=r&65536?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:i.getInt32(n+4,!0),start:i.getInt32(n+8,!0),end:i.getInt32(n+12,!0)},l=i.getInt32(n+16,!0),c=l?String.fromCharCode(l):"",u=i.getInt32(n+20,!0),f=i.getInt32(n+24,!0);return{columnNumbers:a,coordinateType:s,metaValue:l,metaChar:c,skipLines:u,format:o,formatFlags:r,...dP(e.subarray(n+28,n+28+f),this.renameRefSeq)}}async _parse(e){const n=await this.filehandle.readFile(e),i=await zr(n),r=new DataView(i.buffer);let s;const o=r.getUint32(0,!0);if(o===y9)s=1;else if(o===C9)s=2;else throw new Error(`Not a CSI file ${o}`);this.minShift=r.getInt32(4,!0),this.depth=r.getInt32(8,!0),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const a=this.maxBinNumber,l=r.getInt32(12,!0),c=l>=30?this.parseAuxData(i,16):void 0,u=r.getInt32(16+l,!0);let f=16+l+4,h;const A=[];for(let m=0;m<u;m++){A.push(f);const p=r.getInt32(f,!0);f+=4;for(let w=0;w<p;w++){const C=r.getUint32(f,!0);if(f+=4,C>this.maxBinNumber)f+=44;else{f+=8;const y=r.getInt32(f,!0);f+=4;for(let I=0;I<y;I+=1){const x=Jn(i,f);f+=8,f+=8,h=yo(h,x)}}}}const d=new wo({maxSize:5});function g(m){let p=A[m];if(p===void 0)return;const w=r.getInt32(p,!0);p+=4;const C={};let y;for(let I=0;I<w;I++){const x=r.getUint32(p,!0);if(p+=4,x>a)y=FC(i,p+28),p+=44;else{h=yo(h,Jn(i,p)),p+=8;const E=r.getInt32(p,!0);p+=4;const S=new Array(E);for(let D=0;D<E;D+=1){const B=Jn(i,p);p+=8;const k=Jn(i,p);p+=8,S[D]=new kC(B,k,x)}C[x]=S}}return{binIndex:C,stats:y}}return{csiVersion:s,firstDataLine:h,indices:m=>{if(!d.has(m)){const p=g(m);return p&&d.set(m,p),p}return d.get(m)},refCount:u,csi:!0,maxBlockSize:65536,...c}}async blocksForRange(e,n,i,r={}){n<0&&(n=0);const o=(await this.parse(r)).indices(e);if(!o)return[];const a=this.reg2bins(n,i);if(a.length===0)return[];const l=[],{binIndex:c}=o;for(const[u,f]of a)for(let h=u;h<=f;h++){const A=c[h];if(A)for(let d=0,g=A.length;d<g;d++)l.push(A[d])}return _h(l,new MC(0,0))}reg2bins(e,n){e-=1,e<1&&(e=1),n>2**50&&(n=2**34),n-=1;let i=0,r=0,s=this.minShift+this.depth*3;const o=[];for(;i<=this.depth;s-=3,r+=b9(1,i*3),i+=1){const a=r+Mb(e,s),l=r+Mb(n,s);if(l-a+o.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`);o.push([a,l])}return o}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={}){return!!(await this.parse(n)).indices(e)?.binIndex}};class E9{read(){throw new Error("never called")}stat(){throw new Error("never called")}readFile(){throw new Error("never called")}close(){throw new Error("never called")}}const I9=3,x9=4,Et={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},vo="=ACMGRSVTWYHKDBN".split(""),v9=[77,73,68,78,83,72,80,61,88,63,63,63,63,63,63,63],Tb=461;class Pb{constructor(e){this.bytes=e.bytes,this.fileOffset=e.fileOffset,this._dataView=new DataView(this.bytes.byteArray.buffer)}get byteArray(){return this.bytes.byteArray}get flags(){return this._cachedFlags===void 0&&(this._cachedFlags=(this._dataView.getInt32(this.bytes.start+16,!0)&4294901760)>>16),this._cachedFlags}get ref_id(){return this._cachedRefId===void 0&&(this._cachedRefId=this._dataView.getInt32(this.bytes.start+4,!0)),this._cachedRefId}get start(){return this._cachedStart===void 0&&(this._cachedStart=this._dataView.getInt32(this.bytes.start+8,!0)),this._cachedStart}get end(){return this._cachedEnd===void 0&&(this._cachedEnd=this.start+this.length_on_ref),this._cachedEnd}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 null;{const e=this.b0+this.read_name_length+this.num_cigar_bytes+this.num_seq_bytes;return this.byteArray.subarray(e,e+this.seq_length)}}get strand(){return this.isReverseComplemented()?-1:1}get b0(){return this.bytes.start+36}get tagsStart(){return this._cachedTagsStart===void 0&&(this._cachedTagsStart=this.b0+this.read_name_length+this.num_cigar_bytes+this.num_seq_bytes+this.seq_length),this._cachedTagsStart}get name(){const e=this.read_name_length-1,n=this.b0,i=this.byteArray,r=new Array(e);for(let s=0;s<e;s++)r[s]=i[n+s];return String.fromCharCode(...r)}get NUMERIC_MD(){if(this._cachedNUMERIC_MD===void 0){const e=this.getTagRaw("MD");this._cachedNUMERIC_MD=e instanceof Uint8Array?e:null}return this._cachedNUMERIC_MD===null?void 0:this._cachedNUMERIC_MD}get tags(){return this._cachedTags===void 0&&(this._cachedTags=this._computeTags()),this._cachedTags}getTag(e){return this._cachedTags!==void 0?this._cachedTags[e]:this._findTag(e,!1)}getTagRaw(e){return this._findTag(e,!0)}_findTag(e,n){const i=e.charCodeAt(0),r=e.charCodeAt(1);let s=this.tagsStart;const o=this.bytes.end,a=this.byteArray;for(;s<o;){const l=a[s],c=a[s+1],u=a[s+2];s+=3;const f=l===i&&c===r;switch(u){case 65:if(f)return String.fromCharCode(a[s]);s+=1;break;case 105:if(f)return this._dataView.getInt32(s,!0);s+=4;break;case 73:if(f)return this._dataView.getUint32(s,!0);s+=4;break;case 99:if(f)return this._dataView.getInt8(s);s+=1;break;case 67:if(f)return this._dataView.getUint8(s);s+=1;break;case 115:if(f)return this._dataView.getInt16(s,!0);s+=2;break;case 83:if(f)return this._dataView.getUint16(s,!0);s+=2;break;case 102:if(f)return this._dataView.getFloat32(s,!0);s+=4;break;case 90:case 72:{if(f){const h=s;for(;s<o&&a[s]!==0;)s++;if(n)return a.subarray(h,s);const A=[];for(let d=h;d<s;d++)A.push(String.fromCharCode(a[d]));return A.join("")}for(;s<=o&&a[s++]!==0;);break}case 66:{const h=a[s++],A=this._dataView.getInt32(s,!0);s+=4;const d=a.byteOffset+s;if(f)if(h===105){if(d%4===0)return new Int32Array(a.buffer,d,A);const g=new Array(A);for(let m=0;m<A;m++)g[m]=this._dataView.getInt32(s+m*4,!0);return g}else if(h===73){if(d%4===0)return new Uint32Array(a.buffer,d,A);const g=new Array(A);for(let m=0;m<A;m++)g[m]=this._dataView.getUint32(s+m*4,!0);return g}else if(h===115){if(d%2===0)return new Int16Array(a.buffer,d,A);const g=new Array(A);for(let m=0;m<A;m++)g[m]=this._dataView.getInt16(s+m*2,!0);return g}else if(h===83){if(d%2===0)return new Uint16Array(a.buffer,d,A);const g=new Array(A);for(let m=0;m<A;m++)g[m]=this._dataView.getUint16(s+m*2,!0);return g}else{if(h===99)return new Int8Array(a.buffer,d,A);if(h===67)return new Uint8Array(a.buffer,d,A);if(h===102){if(d%4===0)return new Float32Array(a.buffer,d,A);const g=new Array(A);for(let m=0;m<A;m++)g[m]=this._dataView.getFloat32(s+m*4,!0);return g}}h===105||h===73||h===102?s+=A<<2:h===115||h===83?s+=A<<1:(h===99||h===67)&&(s+=A);break}}}}_computeTags(){let e=this.tagsStart;const n=this.bytes.end,i=this.byteArray,r={};for(;e<n;){const s=String.fromCharCode(i[e],i[e+1]),o=i[e+2];switch(e+=3,o){case 65:r[s]=String.fromCharCode(i[e]),e+=1;break;case 105:r[s]=this._dataView.getInt32(e,!0),e+=4;break;case 73:r[s]=this._dataView.getUint32(e,!0),e+=4;break;case 99:r[s]=this._dataView.getInt8(e),e+=1;break;case 67:r[s]=this._dataView.getUint8(e),e+=1;break;case 115:r[s]=this._dataView.getInt16(e,!0),e+=2;break;case 83:r[s]=this._dataView.getUint16(e,!0),e+=2;break;case 102:r[s]=this._dataView.getFloat32(e,!0),e+=4;break;case 90:case 72:{const a=[];for(;e<=n;){const l=i[e++];if(l!==0)a.push(String.fromCharCode(l));else break}r[s]=a.join("");break}case 66:{const a=i[e++],l=this._dataView.getInt32(e,!0);e+=4;const c=i.byteOffset+e;if(a===105){if(c%4===0)r[s]=new Int32Array(i.buffer,c,l);else{const u=new Array(l);for(let f=0;f<l;f++)u[f]=this._dataView.getInt32(e+f*4,!0);r[s]=u}e+=l<<2}else if(a===73){if(c%4===0)r[s]=new Uint32Array(i.buffer,c,l);else{const u=new Array(l);for(let f=0;f<l;f++)u[f]=this._dataView.getUint32(e+f*4,!0);r[s]=u}e+=l<<2}else if(a===115){if(c%2===0)r[s]=new Int16Array(i.buffer,c,l);else{const u=new Array(l);for(let f=0;f<l;f++)u[f]=this._dataView.getInt16(e+f*2,!0);r[s]=u}e+=l<<1}else if(a===83){if(c%2===0)r[s]=new Uint16Array(i.buffer,c,l);else{const u=new Array(l);for(let f=0;f<l;f++)u[f]=this._dataView.getUint16(e+f*2,!0);r[s]=u}e+=l<<1}else if(a===99)r[s]=new Int8Array(i.buffer,c,l),e+=l;else if(a===67)r[s]=new Uint8Array(i.buffer,c,l),e+=l;else if(a===102){if(c%4===0)r[s]=new Float32Array(i.buffer,c,l);else{const u=new Array(l);for(let f=0;f<l;f++)u[f]=this._dataView.getFloat32(e+f*4,!0);r[s]=u}e+=l<<2}break}default:console.error("Unknown BAM tag type",o);break}}return r}isPaired(){return!!(this.flags&Et.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&Et.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&Et.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&Et.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&Et.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&Et.BAM_FMREVERSE)}isRead1(){return!!(this.flags&Et.BAM_FREAD1)}isRead2(){return!!(this.flags&Et.BAM_FREAD2)}isSecondary(){return!!(this.flags&Et.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&Et.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&Et.BAM_FDUP)}isSupplementary(){return!!(this.flags&Et.BAM_FSUPPLEMENTARY)}get cigarAndLength(){return this._cachedCigarAndLength===void 0&&(this._cachedCigarAndLength=this._computeCigarAndLength()),this._cachedCigarAndLength}_computeCigarAndLength(){if(this.isSegmentUnmapped())return{length_on_ref:0,NUMERIC_CIGAR:new Uint32Array(0)};const e=this.num_cigar_ops;let n=this.b0+this.read_name_length;const i=this._dataView.getInt32(n,!0),r=i>>4;if((i&15)===x9&&r===this.seq_length){n+=4;const u=this._dataView.getInt32(n,!0),f=u>>4;return(u&15)!==I9&&console.warn("CG tag with no N tag"),{NUMERIC_CIGAR:this.tags.CG,length_on_ref:f}}const o=this.byteArray.byteOffset+n;if(o%4===0&&e>50){const u=new Uint32Array(this.byteArray.buffer,o,e);let f=0;for(let h=0;h<e;++h){const A=u[h];f+=(A>>4)*(Tb>>(A&15)&1)}return{NUMERIC_CIGAR:u,length_on_ref:f}}const l=new Array(e);let c=0;for(let u=0;u<e;++u){const f=this._dataView.getInt32(n+u*4,!0)|0;l[u]=f,c+=(f>>4)*(Tb>>(f&15)&1)}return{NUMERIC_CIGAR:l,length_on_ref:c}}get length_on_ref(){return this.cigarAndLength.length_on_ref}get NUMERIC_CIGAR(){return this.cigarAndLength.NUMERIC_CIGAR}get CIGAR(){const e=this.NUMERIC_CIGAR;let n="";for(let i=0,r=e.length;i<r;i++){const s=e[i],o=s>>4,a=v9[s&15];n+=o+String.fromCharCode(a)}return n}get num_cigar_ops(){return this.flag_nc&65535}get num_cigar_bytes(){return this.num_cigar_ops<<2}get read_name_length(){return this.bin_mq_nl&255}get num_seq_bytes(){return this.seq_length+1>>1}get NUMERIC_SEQ(){const e=this.b0+this.read_name_length+this.num_cigar_bytes;return this.byteArray.subarray(e,e+this.num_seq_bytes)}get seq(){const e=this.NUMERIC_SEQ,n=this.seq_length,i=new Array(n);let r=0;const s=n>>1;for(let o=0;o<s;++o){const a=e[o];i[r++]=vo[(a&240)>>4],i[r++]=vo[a&15]}if(r<n){const o=e[s];i[r]=vo[(o&240)>>4]}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 i=" ",r=" ";return this.isRead1()?(i="1",r="2"):this.isRead2()&&(i="2",r="1"),this.template_length>0?`${e}${i}${n}${r}`:`${n}${r}${e}${i}`}}get bin_mq_nl(){return this._dataView.getInt32(this.bytes.start+12,!0)}get flag_nc(){return this._dataView.getInt32(this.bytes.start+16,!0)}get seq_length(){return this._dataView.getInt32(this.bytes.start+20,!0)}get next_refid(){return this._dataView.getInt32(this.bytes.start+24,!0)}get next_pos(){return this._dataView.getInt32(this.bytes.start+28,!0)}get template_length(){return this._dataView.getInt32(this.bytes.start+32,!0)}seqAt(e){if(e<this.seq_length){const n=e>>1,i=this.byteArray[this.b0+this.read_name_length+this.num_cigar_bytes+n];return e%2===0?vo[(i&240)>>4]:vo[i&15]}else return}toJSON(){const e={};for(const n of Object.keys(this))n.startsWith("_")||n==="bytes"||(e[n]=this[n]);return e}}function Lb(t){const e=t.split(/\r?\n/),n=[];for(const i of e){const[r,...s]=i.split(/\t/);r&&n.push({tag:r.slice(1),data:s.map(o=>{const a=o.indexOf(":"),l=o.slice(0,a),c=o.slice(a+1);return{tag:l,value:c}})})}return n}const Ob=21840194,B9=65536;class Ub{constructor({bamFilehandle:e,bamPath:n,bamUrl:i,baiPath:r,baiFilehandle:s,baiUrl:o,csiPath:a,csiFilehandle:l,csiUrl:c,htsget:u,renameRefSeqs:f=A=>A,recordClass:h}){if(this.htsget=!1,this.chunkFeatureCache=new wo({maxSize:100}),this.renameRefSeq=f,this.RecordClass=h??Pb,e)this.bam=e;else if(n)this.bam=new $e(n);else if(i)this.bam=new Vt(i);else if(u)this.htsget=!0,this.bam=new E9;else throw new Error("unable to initialize bam");if(l)this.index=new Hc({filehandle:l});else if(a)this.index=new Hc({filehandle:new $e(a)});else if(c)this.index=new Hc({filehandle:new Vt(c)});else if(s)this.index=new Fr({filehandle:s});else if(r)this.index=new Fr({filehandle:new $e(r)});else if(o)this.index=new Fr({filehandle:new Vt(o)});else if(n)this.index=new Fr({filehandle:new $e(`${n}.bai`)});else if(i)this.index=new Fr({filehandle:new Vt(`${i}.bai`)});else if(u)this.htsget=!0;else throw new Error("unable to infer index format")}async getHeaderPre(e){const n=AP(e);if(!this.index)return;const i=await this.index.parse(n),r=i.firstDataLine===void 0?await this.bam.readFile():await this.bam.read(i.firstDataLine.blockPosition+B9,0),s=await zr(r),o=new DataView(s.buffer);if(o.getInt32(0,!0)!==Ob)throw new Error("Not a BAM file");const a=o.getInt32(4,!0),l=new TextDecoder("utf8");this.header=l.decode(s.subarray(8,8+a));const{chrToIndex:c,indexToChr:u}=this._parseRefSeqs(s,a+8);return this.chrToIndex=c,this.indexToChr=u,Lb(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}_parseRefSeqs(e,n){const i=new DataView(e.buffer),r=i.getInt32(n,!0);let s=n+4;const o={},a=[],l=new TextDecoder("utf8");for(let c=0;c<r;c+=1){if(s+8>e.length)throw new Error(`Insufficient data for reference sequences: need more than ${e.length} bytes`);const u=i.getInt32(s,!0),f=this.renameRefSeq(l.decode(e.subarray(s+4,s+4+u-1))),h=i.getInt32(s+u+4,!0);o[f]=c,a.push({refName:f,length:h}),s=s+8+u}return{chrToIndex:o,indexToChr:a}}async getRecordsForRange(e,n,i,r){await this.getHeader(r);const s=this.chrToIndex?.[e];if(s===void 0||!this.index)return[];const o=await this.index.blocksForRange(s,n-1,i,r);return this._fetchChunkFeaturesDirect(o,s,n,i,r)}chunkCacheKey(e,n){const{minv:i,maxv:r}=e;return`${i.blockPosition}:${i.dataPosition}-${r.blockPosition}:${r.dataPosition}${wP(n)}`}blocksOverlap(e,n,i,r){return e<=r&&n>=i}evictOverlappingChunks(e,n){for(const[i,r]of this.chunkFeatureCache)this.blocksOverlap(e,n,r.minBlock,r.maxBlock)&&this.chunkFeatureCache.delete(i)}async _fetchChunkFeaturesDirect(e,n,i,r,s={}){const{viewAsPairs:o,filterBy:a}=s,{flagInclude:l=0,flagExclude:c=0,tagFilter:u}=a||{},f=[];for(let h=0,A=e.length;h<A;h++){const d=e[h],g=this.chunkCacheKey(d,a),m=d.minv.blockPosition,p=d.maxv.blockPosition;let w;const C=this.chunkFeatureCache.get(g);if(C)w=C.features;else{this.evictOverlappingChunks(m,p);const{data:I,cpositions:x,dpositions:E}=await this._readChunk({chunk:d,opts:s}),S=await this.readBamFeatures(I,x,E,d);if(a){w=[];for(let D=0,B=S.length;D<B;D++){const k=S[D];pP(k.flags,l,c)||u&&mP(k.tags[u.tag],u.value)||w.push(k)}}else w=S;this.chunkFeatureCache.set(g,{minBlock:m,maxBlock:p,features:w})}let y=!1;for(let I=0,x=w.length;I<x;I++){const E=w[I];if(E.ref_id===n)if(E.start>=r){y=!0;break}else E.end>=i&&f.push(E)}if(y)break}if(o){const h=await this.fetchPairs(n,f,s);for(let A=0,d=h.length;A<d;A++)f.push(h[A])}return f}async fetchPairs(e,n,i){const{pairAcrossChr:r,maxInsertSize:s=2e5}=i,o={},a={};for(let h=0,A=n.length;h<A;h++){const d=n[h],g=d.name;o[g]=(o[g]||0)+1,a[d.fileOffset]=1}const l=[];for(let h=0,A=n.length;h<A;h++){const d=n[h],g=d.name;this.index&&o[g]===1&&(r||d.next_refid===e&&Math.abs(d.start-d.next_pos)<s)&&l.push(this.index.blocksForRange(d.next_refid,d.next_pos,d.next_pos+1,i))}const c=new Map,u=await Promise.all(l);for(let h=0,A=u.length;h<A;h++){const d=u[h];for(let g=0,m=d.length;g<m;g++){const p=d[g],w=p.toString();c.has(w)||c.set(w,p)}}return(await Promise.all([...c.values()].map(async h=>{const{data:A,cpositions:d,dpositions:g,chunk:m}=await this._readChunk({chunk:h,opts:i}),p=[],w=await this.readBamFeatures(A,d,g,m);for(let C=0,y=w.length;C<y;C++){const I=w[C];o[I.name]===1&&!a[I.fileOffset]&&p.push(I)}return p}))).flat()}async _readChunk({chunk:e,opts:n}){const i=await this.bam.read(e.fetchedSize(),e.minv.blockPosition,n),{buffer:r,cpositions:s,dpositions:o}=await Nb(i,e);return{data:r,cpositions:s,dpositions:o,chunk:e}}async readBamFeatures(e,n,i,r){let s=0;const o=[];let a=0;const l=new DataView(e.buffer),c=i.length>0,u=n.length>0;for(;s+4<e.length;){const f=l.getInt32(s,!0),h=s+4+f-1;if(c){for(;s+r.minv.dataPosition>=i[a++];);a--}if(h<e.length){const A=new this.RecordClass({bytes:{byteArray:e,start:s,end:h},fileOffset:u?n[a]*256+(s-i[a])+r.minv.dataPosition+1:w9(e.subarray(s,h))>>>0});o.push(A)}s=h+1}return o}async hasRefSeq(e){const n=this.chrToIndex?.[e];return n===void 0?!1:this.index?.hasRefSeq(n)}async lineCount(e){const n=this.chrToIndex?.[e];return n===void 0||!this.index?0:this.index.lineCount(n)}async indexCov(e,n,i){if(!this.index)return[];await this.index.parse();const r=this.chrToIndex?.[e];return r===void 0?[]:this.index.indexCov(r,n,i)}async blocksForRange(e,n,i,r){if(!this.index)return[];await this.index.parse();const s=this.chrToIndex?.[e];return s===void 0?[]:this.index.blocksForRange(s,n,i,r)}clearFeatureCache(){this.chunkFeatureCache.clear()}async estimatedBytesForRegions(e,n){if(!this.index)return 0;if(await this.getHeader(n),!this.chrToIndex)throw new Error("Header not yet parsed");return this.index.estimatedBytesForRegions(e.map(i=>{const r=this.chrToIndex[i.refName];if(r===void 0)throw new Error(`Unknown reference name: ${i.refName}`);return{refId:r,start:i.start,end:i.end}}),n)}}async function _b(t,e){const n=await Promise.all(t.map(async i=>{const{url:r,headers:s}=i;if(r.startsWith("data:")){const o=await fetch(r);if(!o.ok)throw new Error("failed to decode base64");const a=await o.arrayBuffer();return new Uint8Array(a)}else{const{referer:o,...a}=s,l=await fetch(r,{...e,headers:{...e?.headers,...a}});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${r}: ${await l.text()}`);return new Uint8Array(await l.arrayBuffer())}}));return gP(await Promise.all(n.map(i=>zr(i))))}class S9 extends Ub{constructor(e){super({htsget:!0,recordClass:e.recordClass}),this.baseUrl=e.baseUrl,this.trackId=e.trackId}async getRecordsForRange(e,n,i,r){const o=`${`${this.baseUrl}/${this.trackId}`}?referenceName=${e}&start=${n}&end=${i}&format=BAM`,a=this.chrToIndex?.[e];if(a===void 0)return[];const l=await fetch(o,{...r});if(!l.ok)throw new Error(`HTTP ${l.status} fetching ${o}: ${await l.text()}`);const c=await l.json(),u=await _b(c.htsget.urls.slice(1),r),f=await this.readBamFeatures(u,[],[],{minv:{dataPosition:0,blockPosition:0},maxv:{dataPosition:0,blockPosition:0}}),h=[];for(let A=0,d=f.length;A<d;A++){const g=f[A];if(g.ref_id===a){if(g.start>=i)break;g.end>=n&&h.push(g)}}return h}async getHeader(e={}){const n=`${this.baseUrl}/${this.trackId}?referenceName=na&class=header`,i=await fetch(n,e);if(!i.ok)throw new Error(`HTTP ${i.status} fetching ${n}: ${await i.text()}`);const r=await i.json(),s=await _b(r.htsget.urls,e),o=new DataView(s.buffer);if(o.getInt32(0,!0)!==Ob)throw new Error("Not a BAM file");const a=o.getInt32(4,!0),c=new TextDecoder("utf8").decode(s.subarray(8,8+a)),u=Lb(c),f=[],h={},A=u.filter(d=>d.tag==="SQ");for(const[d,g]of A.entries()){let m="",p=0;for(const w of g.data)w.tag==="SN"?m=w.value:w.tag==="LN"&&(p=+w.value);h[m]=d,f[d]={refName:m,length:p}}return this.chrToIndex=h,this.indexToChr=f,u}}const D9=Object.freeze(Object.defineProperty({__proto__:null,BAI:Fr,BamFile:Ub,BamRecord:Pb,CSI:Hc,HtsgetFile:S9},Symbol.toStringTag,{value:"Module"}));class Yc{constructor(e,n,i,r){this.minv=e,this.maxv=n,this.bin=i,this._fetchedSize=r}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 zb{constructor({filehandle:e,renameRefSeqs:n=i=>i}){this.filehandle=e,this.renameRefSeq=n}async getMetadata(e={}){const{indices:n,...i}=await this.parse(e);return i}_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={}){return!!(await this.parse(n)).indices[e]?.binIndex}_parseNameBytes(e){let n=0,i=0;const r=[],s={},o=new TextDecoder("utf8");for(let a=0;a<e.length;a+=1)if(!e[a]){if(i<a){const l=this.renameRefSeq(o.decode(e.subarray(i,a)));r[n]=l,s[l]=n}i=a+1,n+=1}return{refNameToId:s,refIdToName:r}}}const Gb=65536,Q9=Gb*Gb;function Hb(t,e=0){const n=t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24;return((t[e+4]|t[e+5]<<8|t[e+6]<<16|t[e+7]<<24)>>>0)*Q9+(n>>>0)}function k9(t,e){return e.minv.blockPosition-t.maxv.blockPosition<65e3&&e.maxv.blockPosition-t.minv.blockPosition<5e6}function Yb(t,e){const n=[];let i;if(t.length===0)return t;t.sort(function(r,s){const o=r.minv.blockPosition-s.minv.blockPosition;return o===0?r.minv.dataPosition-s.minv.dataPosition:o});for(const r of t)(!e||r.maxv.compareTo(e)>0)&&(i===void 0?(n.push(r),i=r):k9(i,r)?r.maxv.compareTo(i.maxv)>0&&(i.maxv=r.maxv):(n.push(r),i=r));return n}class oA{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 Gr(t,e=0){return new oA(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])}const R9=21582659,F9=38359875,N9={0:"generic",1:"SAM",2:"VCF"};function M9(t,e){return t*2**e}function Vb(t,e){return Math.floor(t/2**e)}class Vc extends zb{constructor(e){super(e),this.maxBinNumber=0,this.depth=0,this.minShift=0}async lineCount(e,n={}){const i=await this.parse(n),r=i.refNameToId[e];if(r===void 0||!i.indices[r])return-1;const{stats:o}=i.indices[r];return o?o.lineCount:-1}indexCov(){throw new Error("CSI indexes do not support indexcov")}parseAuxData(e,n){const i=new DataView(e.buffer),r=i.getInt32(n,!0),s=r&65536?"zero-based-half-open":"1-based-closed",o=N9[r&15];if(!o)throw new Error(`invalid Tabix preset format flags ${r}`);const a={ref:i.getInt32(n+4,!0),start:i.getInt32(n+8,!0),end:i.getInt32(n+12,!0)},l=i.getInt32(n+16,!0),c=l?String.fromCharCode(l):void 0,u=i.getInt32(n+20,!0),f=i.getInt32(n+24,!0),{refIdToName:h,refNameToId:A}=this._parseNameBytes(e.subarray(n+28,n+28+f));return{refIdToName:h,refNameToId:A,skipLines:u,metaChar:c,columnNumbers:a,format:o,coordinateType:s}}async _parse(e={}){const n=await zr(await this.filehandle.readFile(e)),i=new DataView(n.buffer);let r;if(i.getUint32(0,!0)===R9)r=1;else if(i.getUint32(0,!0)===F9)r=2;else throw new Error("Not a CSI file");this.minShift=i.getInt32(4,!0),this.depth=i.getInt32(8,!0),this.maxBinNumber=((1<<(this.depth+1)*3)-1)/7;const s=2**(this.minShift+this.depth*3),o=i.getInt32(12,!0),a=o&&o>=30?this.parseAuxData(n,16):{refIdToName:[],refNameToId:{},metaChar:void 0,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},l=i.getInt32(16+o,!0);let c,u=16+o+4;const f=new Array(l).fill(0).map(()=>{const h=i.getInt32(u,!0);u+=4;const A={};let d;for(let g=0;g<h;g+=1){const m=i.getUint32(u,!0);if(m>this.maxBinNumber)d=this.parsePseudoBin(n,u+4),u+=48;else{const p=Gr(n,u+4);c=this._findFirstData(c,p);const w=i.getInt32(u+12,!0);u+=16;const C=new Array(w);for(let y=0;y<w;y+=1){const I=Gr(n,u),x=Gr(n,u+8);u+=16,C[y]=new Yc(I,x,m)}A[m]=C}}return{binIndex:A,stats:d}});return{...a,csi:!0,refCount:l,maxBlockSize:65536,firstDataLine:c,csiVersion:r,indices:f,depth:this.depth,maxBinNumber:this.maxBinNumber,maxRefLength:s}}parsePseudoBin(e,n){return{lineCount:Hb(e,n+28)}}async blocksForRange(e,n,i,r={}){n<0&&(n=0);const s=await this.parse(r),o=s.refNameToId[e];if(o===void 0)return[];const a=s.indices[o];if(!a)return[];const l=this.reg2bins(n,i),c=[];for(const[u,f]of l)for(let h=u;h<=f;h++)if(a.binIndex[h])for(const A of a.binIndex[h])c.push(new Yc(A.minv,A.maxv,h));return Yb(c,new oA(0,0))}reg2bins(e,n){e-=1,e<1&&(e=1),n>2**50&&(n=2**34),n-=1;let i=0,r=0,s=this.minShift+this.depth*3;const o=[];for(;i<=this.depth;s-=3,r+=M9(1,i*3),i+=1){const a=r+Vb(e,s),l=r+Vb(n,s);if(l-a+o.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`);o.push([a,l])}return o}}const T9=21578324,Jb=14;function P9(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 Hr extends zb{async lineCount(e,n={}){const i=await this.parse(n),r=i.refNameToId[e];return r===void 0||!i.indices[r]?-1:i.indices[r].stats?.lineCount??-1}async _parse(e={}){const n=await this.filehandle.readFile(e),i=await zr(n),r=new DataView(i.buffer);if(r.getUint32(0,!0)!==T9)throw new Error("Not a TBI file");const o=r.getUint32(4,!0),a=r.getUint32(8,!0),l=a&65536?"zero-based-half-open":"1-based-closed",u={0:"generic",1:"SAM",2:"VCF"}[a&15];if(!u)throw new Error(`invalid Tabix preset format flags ${a}`);const f={ref:r.getInt32(12,!0),start:r.getInt32(16,!0),end:r.getInt32(20,!0)},h=r.getInt32(24,!0),A=5,d=((1<<(A+1)*3)-1)/7,g=2**(14+A*3),m=h?String.fromCharCode(h):void 0,p=r.getInt32(28,!0),w=r.getInt32(32,!0),{refNameToId:C,refIdToName:y}=this._parseNameBytes(i.slice(36,36+w));let I=36+w,x;return{indices:new Array(o).fill(0).map(()=>{const S=r.getInt32(I,!0);I+=4;const D={};let B;for(let M=0;M<S;M+=1){const O=r.getUint32(I,!0);if(I+=4,O>d+1)throw new Error("tabix index contains too many bins, please use a CSI index");if(O===d+1){const _=r.getInt32(I,!0);I+=4,_===2&&(B=this.parsePseudoBin(i,I)),I+=16*_}else{const _=r.getInt32(I,!0);I+=4;const H=new Array(_);for(let G=0;G<_;G+=1){const q=Gr(i,I),Z=Gr(i,I+8);I+=16,x=this._findFirstData(x,q),H[G]=new Yc(q,Z,O)}D[O]=H}}const k=r.getInt32(I,!0);I+=4;const F=new Array(k);for(let M=0;M<k;M+=1)F[M]=Gr(i,I),I+=8,x=this._findFirstData(x,F[M]);return{binIndex:D,linearIndex:F,stats:B}}),metaChar:m,maxBinNumber:d,maxRefLength:g,skipLines:p,firstDataLine:x,columnNumbers:f,coordinateType:l,format:u,refIdToName:y,refNameToId:C,maxBlockSize:65536}}parsePseudoBin(e,n){return{lineCount:Hb(e,n+16)}}async blocksForRange(e,n,i,r={}){n<0&&(n=0);const s=await this.parse(r),o=s.refNameToId[e];if(o===void 0)return[];const a=s.indices[o];if(!a)return[];(a.linearIndex.length>0?a.linearIndex[n>>Jb>=a.linearIndex.length?a.linearIndex.length-1:n>>Jb]:new oA(0,0))||console.warn("querying outside of possible tabix range");const c=P9(n,i),u=[];for(const[g,m]of c)for(let p=g;p<=m;p++)if(a.binIndex[p])for(const w of a.binIndex[p])u.push(new Yc(w.minv,w.maxv,p));const f=a.linearIndex.length;let h;const A=Math.min(n>>14,f-1),d=Math.min(i>>14,f-1);for(let g=A;g<=d;++g){const m=a.linearIndex[g];m&&(!h||m.compareTo(h)<0)&&(h=m)}return Yb(u,h)}}class L9{constructor({path:e,filehandle:n,url:i,tbiPath:r,tbiUrl:s,tbiFilehandle:o,csiPath:a,csiUrl:l,csiFilehandle:c,renameRefSeqs:u,chunkCacheSize:f=5*2**20}){this.cache=new wo({maxSize:1e3});const h=u??(A=>A);if(n)this.filehandle=n;else if(e)this.filehandle=new $e(e);else if(i)this.filehandle=new Vt(i);else throw new TypeError("must provide either filehandle or path");if(o)this.index=new Hr({filehandle:o,renameRefSeqs:h});else if(c)this.index=new Vc({filehandle:c,renameRefSeqs:h});else if(r)this.index=new Hr({filehandle:new $e(r),renameRefSeqs:h});else if(a)this.index=new Vc({filehandle:new $e(a),renameRefSeqs:h});else if(e)this.index=new Hr({filehandle:new $e(`${e}.tbi`),renameRefSeqs:h});else if(l)this.index=new Vc({filehandle:new Vt(l)});else if(s)this.index=new Hr({filehandle:new Vt(s)});else if(i)this.index=new Hr({filehandle:new Vt(`${i}.tbi`)});else throw new TypeError("must provide one of tbiFilehandle, tbiPath, csiFilehandle, csiPath, tbiUrl, csiUrl");this.renameRefSeq=h,this.hasCustomRenameRefSeq=u!==void 0,this.chunkCache=new Dr({cache:new wo({maxSize:Math.floor(f/65536)}),fill:(A,d)=>this.readChunk(A,{signal:d})})}calculateFileOffset(e,n,i,r,s){return e[i]*256+(r-n[i])+s+1}async getLines(e,n,i,r){let s,o={},a;typeof r=="function"?a=r:(o=r,a=r.lineCallback,s=r.signal);const l=await this.index.getMetadata(o),c=n??0,u=i??l.maxRefLength;if(!(c<=u))throw new TypeError("invalid start and end coordinates. start must be less than or equal to end");if(c===u)return;const f=await this.index.blocksForRange(e,c,u,o),h=new TextDecoder("utf8"),A=l.format==="VCF",d={ref:l.columnNumbers.ref||0,start:l.columnNumbers.start||0,end:A?8:l.columnNumbers.end||0},g=Math.max(d.ref,d.start,d.end),m=l.metaChar?.charCodeAt(0),p=l.coordinateType==="1-based-closed"?-1:0,w=!this.hasCustomRenameRefSeq;for(const C of f){const{buffer:y,cpositions:I,dpositions:x}=await this.chunkCache.get(C.toString(),C,s);let E=0,S=0;const D=h.decode(y);if(y.length==D.length)for(;E<D.length;){const k=D.indexOf(`
|
|
834
|
+
`,E);if(k===-1)break;const F=D.slice(E,k);if(x){const O=E+C.minv.dataPosition;for(;S<x.length&&O>=x[S];)S++}const M=this.checkLine(e,c,u,F,d.ref,d.start,d.end,g,m,p,A,w);if(M===null)return;M!==void 0&&a(F,this.calculateFileOffset(I,x,S,E,C.minv.dataPosition),M.start,M.end),E=k+1}else for(;E<y.length;){const k=y.indexOf(10,E);if(k===-1)break;const F=y.slice(E,k),M=h.decode(F);if(x){const _=E+C.minv.dataPosition;for(;S<x.length&&_>=x[S];)S++}const O=this.checkLine(e,c,u,M,d.ref,d.start,d.end,g,m,p,A,w);if(O===null)return;O!==void 0&&a(M,this.calculateFileOffset(I,x,S,E,C.minv.dataPosition),O.start,O.end),E=k+1}}}async getMetadata(e={}){return this.index.getMetadata(e)}async getHeaderBuffer(e={}){const{firstDataLine:n,metaChar:i,maxBlockSize:r}=await this.getMetadata(e),s=(n?.blockPosition||0)+r,o=await this.filehandle.read(s,0,e),a=await zr(o);if(i){let l=-1;const c=10,u=i.charCodeAt(0);for(let f=0,h=a.length;f<h;f++){const A=a[f];if(f===l+1&&A!==u)break;A===c&&(l=f)}return a.subarray(0,l+1)}return a}async getHeader(e={}){const n=new TextDecoder("utf8"),i=await this.getHeaderBuffer(e);return n.decode(i)}async getReferenceSequenceNames(e={}){return(await this.getMetadata(e)).refIdToName}checkLine(e,n,i,r,s,o,a,l,c,u,f,h){if(c!==void 0&&r.charCodeAt(0)===c)return;if(r.length<500){const C=r.split(" "),y=C[s-1];if(!(h?y===e:this.renameRefSeq(y)===e))return;const x=+C[o-1]+u;if(x>=i)return null;let E;return a===0||a===o?E=x+1:f?E=this._getVcfEnd(x,C[3],C[a-1]):E=+C[a-1],E<=n?void 0:{start:x,end:E}}let A=-1;const d=[-1];for(let C=0;C<l;C++){const y=r.indexOf(" ",A+1);if(y===-1){d.push(r.length);break}d.push(y),A=y}const g=r.slice(d[s-1]+1,d[s]);if(!(h?g===e:this.renameRefSeq(g)===e))return;const p=+r.slice(d[o-1]+1,d[o])+u;if(p>=i)return null;let w;if(a===0||a===o?w=p+1:f?w=this._getVcfEnd(p,r.slice(d[3]+1,d[4]),r.slice(d[a-1]+1,d[a])):w=+r.slice(d[a-1]+1,d[a]),!(w<=n))return{start:p,end:w}}_getVcfEnd(e,n,i){let r=e+n.length;if(i.includes("SVTYPE=TRA"))return e+1;if(i[0]!=="."){const o=i.indexOf("END=");if(o!==-1&&(o===0||i[o-1]===";")){const a=o+4;let l=i.indexOf(";",a);l===-1&&(l=i.length),r=Number.parseInt(i.slice(a,l),10)}}return r}async lineCount(e,n={}){return this.index.lineCount(e,n)}async readChunk(e,n={}){const i=await this.filehandle.read(e.fetchedSize(),e.minv.blockPosition,n);return Nb(i,e,this.cache)}}const O9=Object.freeze(Object.defineProperty({__proto__:null,CSI:Vc,TBI:Hr,TabixIndexedFile:L9},Symbol.toStringTag,{value:"Module"})),U9=/%([0-9A-Fa-f]{2})/g,_9=/^\s*##\s*(\S+)\s*(.*)/,z9=/\r?\n$/,qb=/\s+/,Kb=/\D/g;function Jc(t){return t.includes("%")?t.replaceAll(U9,(e,n)=>String.fromCharCode(parseInt(n,16))):t}function G9(t){if(!t.length||t===".")return{};const e={};let n=t;n.endsWith(`
|
|
823
835
|
`)&&(n=n.slice(0,n.endsWith(`\r
|
|
824
|
-
`)?-2:-1));for(const i of n.split(";")){const r=i.indexOf("=");if(r===-1)continue;const s=i.slice(r+1);if(!s.length)continue;const o=i.slice(0,r).trim();let a=e[o];a||(a=[],e[o]=a);for(const l of s.split(","))a.push(
|
|
836
|
+
`)?-2:-1));for(const i of n.split(";")){const r=i.indexOf("=");if(r===-1)continue;const s=i.slice(r+1);if(!s.length)continue;const o=i.slice(0,r).trim();let a=e[o];a||(a=[],e[o]=a);for(const l of s.split(","))a.push(Jc(l.trim()))}return e}function H9(t){if(!t.length||t===".")return{};const e={};let n=t;n.endsWith(`
|
|
825
837
|
`)&&(n=n.slice(0,n.endsWith(`\r
|
|
826
|
-
`)?-2:-1));for(const i of n.split(";")){const r=i.indexOf("=");if(r===-1)continue;const s=i.slice(r+1);if(!s.length)continue;const o=i.slice(0,r).trim();let a=e[o];a||(a=[],e[o]=a);for(const l of s.split(","))a.push(l.trim())}return e}function y9(t){return WA(t.split(" "))}function Ue(t){return t==="."||t===""||t===void 0?null:t}function WA(t){const e=Ue(t[0]),n=Ue(t[1]),i=Ue(t[2]),r=Ue(t[3]),s=Ue(t[4]),o=Ue(t[5]),a=Ue(t[6]),l=Ue(t[7]),c=Ue(t[8]);return{seq_id:e?Oc(e):null,source:n?Oc(n):null,type:i?Oc(i):null,start:r===null?null:parseInt(r,10),end:s===null?null:parseInt(s,10),score:o===null?null:parseFloat(o),strand:a,phase:l,attributes:c===null?null:m9(c)}}function C9(t){const e=Ue(t[0]),n=Ue(t[1]),i=Ue(t[2]),r=Ue(t[3]),s=Ue(t[4]),o=Ue(t[5]),a=Ue(t[6]),l=Ue(t[7]),c=Ue(t[8]);return{seq_id:e,source:n,type:i,start:r===null?null:parseInt(r,10),end:s===null?null:parseInt(s,10),score:o===null?null:parseFloat(o),strand:a,phase:l,attributes:c===null?null:w9(c)}}function E9(t){const e=g9.exec(t);if(!e)return null;const[,n]=e;let[,,i]=e;const r={directive:n};if(i.length&&(i=i.replace(p9,""),r.value=i),n==="sequence-region"){const s=i.split(AE,3);return{...r,seq_id:s[0],start:s[1]?.replaceAll(hE,""),end:s[2]?.replaceAll(hE,"")}}else if(n==="genome-build"){const[s,o]=i.split(AE,2);return{...r,source:s,buildName:o}}return r}const I9=/^\s*[^#\s>]/,b9=/^\s*(#+)(.*)/,x9=/^\s*$/,B9=/^\s*>/,v9=/\r?\n?$/g;class Uc{featureCallback;endCallback;commentCallback;errorCallback;disableDerivesFromReferences;directiveCallback;bufferSize;eof=!1;lineNumber=0;_underConstructionTopLevel=[];_underConstructionById={};_completedReferences={};_underConstructionOrphans={};constructor(e){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.disableDerivesFromReferences=e.disableDerivesFromReferences||!1,this.bufferSize=e.bufferSize===void 0?1/0:e.bufferSize}addLine(e){if(this.eof)return;if(this.lineNumber+=1,I9.test(e)){this._bufferLine(e);return}const n=b9.exec(e);if(n){const[,i]=n;let[,,r]=n;if(i.length===3)this._emitAllUnderConstructionFeatures();else if(i.length===2){const s=E9(e);s&&(s.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0):this._emitItem(s))}else this._emitItem({comment:r.trimStart()})}else if(!x9.test(e))if(B9.test(e))this._emitAllUnderConstructionFeatures(),this.eof=!0;else{const i=e.replaceAll(v9,"");throw new Error(`GFF3 parse error. Cannot parse '${i}'.`)}}addParsedFeatureLine(e){this.eof||(this.lineNumber+=1,this._bufferParsedLine(e))}finish(){this._emitAllUnderConstructionFeatures(),this.endCallback()}_emitItem(e){Array.isArray(e)?this.featureCallback(e):"directive"in e?this.directiveCallback(e):"comment"in e&&this.commentCallback(e)}_enforceBufferSizeLimit(e=0){const n=i=>{i&&Array.isArray(i)&&i[0].attributes?.ID?.[0]&&(i[0].attributes.ID.forEach(s=>{delete this._underConstructionById[s],delete this._completedReferences[s]}),i.forEach(s=>{s.child_features&&s.child_features.forEach(o=>{n(o)}),s.derived_features&&s.derived_features.forEach(o=>{n(o)})}))};for(;this._underConstructionTopLevel.length+e>this.bufferSize;){const i=this._underConstructionTopLevel.shift();i&&(this._emitItem(i),n(i))}}_emitAllUnderConstructionFeatures(){this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={};const e=Object.keys(this._underConstructionOrphans);if(e.length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${e.join(",")}`)}_bufferLine(e){this._bufferParsedLine(y9(e))}_bufferParsedLine(e){const n=e;n.child_features=[],n.derived_features=[];const i=n.attributes?.ID||[],r=n.attributes?.Parent||[],s=this.disableDerivesFromReferences?[]:n.attributes?.Derives_from||[];if(!i.length&&!r.length&&!s.length){this._emitItem([n]);return}let o;i.forEach(a=>{const l=this._underConstructionById[a];l?(l[l.length-1].type!==n.type&&this._parseError(`multi-line feature "${a}" has inconsistent types: "${n.type}", "${l[l.length-1].type}"`),l.push(n),o=l):(o=[n],this._enforceBufferSizeLimit(1),!r.length&&!s.length&&this._underConstructionTopLevel.push(o),this._underConstructionById[a]=o,this._resolveReferencesTo(o,a))}),this._resolveReferencesFrom(o||[n],{Parent:r,Derives_from:s},i)}_resolveReferencesTo(e,n){const i=this._underConstructionOrphans[n];if(i){for(const r of e)r.child_features.push(...i.Parent),r.derived_features.push(...i.Derives_from);delete this._underConstructionOrphans[n]}}_parseError(e){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${e}`)}_resolveReferencesFrom(e,n,i){for(const r of n.Parent){const s=this._underConstructionById[r];if(s){let o=!1;for(const a of i){const l=`Parent,${r}`,c=this._completedReferences[a]||(this._completedReferences[a]={});c[l]&&(o=!0),c[l]=!0}if(!o)for(const a of s)a.child_features.push(e)}else{let o=this._underConstructionOrphans[r];o||(o={Parent:[],Derives_from:[]},this._underConstructionOrphans[r]=o),o.Parent.push(e)}}for(const r of n.Derives_from){const s=this._underConstructionById[r];if(s){let o=!1;for(const a of i){const l=`Derives_from,${r}`,c=this._completedReferences[a]||(this._completedReferences[a]={});c[l]&&(o=!0),c[l]=!0}if(!o)for(const a of s)a.derived_features.push(e)}else{let o=this._underConstructionOrphans[r];o||(o={Parent:[],Derives_from:[]},this._underConstructionOrphans[r]=o),o.Derives_from.push(e)}}}}function S9(t){const e=[],n=new Uc({featureCallback:i=>e.push(i),disableDerivesFromReferences:!0,errorCallback:i=>{throw new Error(i)}});for(const i of t.split(/\r?\n/))n.addLine(i);return n.finish(),e}function Q9(t){const e=[],n=new Uc({featureCallback:i=>e.push(i),disableDerivesFromReferences:!0,errorCallback:i=>{throw new Error(i)}});for(const i of t)n.addLine(i);return n.finish(),e}function D9(t){const e=[],n=new Uc({featureCallback:i=>e.push(i),disableDerivesFromReferences:!0,errorCallback:i=>{throw new Error(i)}});for(const i of t){const r=WA(i.fields);i.lineHash!==void 0&&(r.attributes||(r.attributes={}),r.attributes._lineHash=[String(i.lineHash)]),n.addParsedFeatureLine(r)}return n.finish(),e}function k9(t,e){const n=[],i=new Uc({featureCallback:s=>n.push(s),disableDerivesFromReferences:!0,errorCallback:s=>{throw new Error(s)}}),r=e?WA:C9;for(const s of t){const o=r(s.fields);s.lineHash!==void 0&&(o.attributes||(o.attributes={}),o.attributes._lineHash=[String(s.lineHash)]),i.addParsedFeatureLine(o)}return i.finish(),n}const F9=Object.freeze(Object.defineProperty({__proto__:null,parseArraySync:Q9,parseRecordsSync:D9,parseRecordsSyncFast:k9,parseStringSync:S9},Symbol.toStringTag,{value:"Module"}));function R9(t,e,n){const i=Object.create(null),r=n.length,s=e.length,o=9,a=58;let l=0;if(t==="GT"){for(let u=0;u<r;u++){const h=l;for(;l<s&&e.charCodeAt(l)!==o;)l++;i[n[u]]=e.slice(h,l),l++}return i}const c=t.indexOf("GT");if(c===-1)return i;if(c===0){for(let u=0;u<r;u++){const h=l;for(;l<s&&e.charCodeAt(l)!==a&&e.charCodeAt(l)!==o;)l++;for(i[n[u]]=e.slice(h,l);l<s&&e.charCodeAt(l)!==o;)l++;l++}return i}let f=0;for(let u=0;u<c;u++)t.charCodeAt(u)===a&&f++;for(let u=0;u<r;u++){const h=l;let A=l;for(;A<s&&e.charCodeAt(A)!==o;)A++;let d=0,g=h;for(let m=h;m<=A;m++)if(m===A||e.charCodeAt(m)===a){if(d===f){i[n[u]]=e.slice(g,m);break}d++,g=m+1}l=A+1}return i}function N9(t){const e=[],n=[];let i=!1,r=!1;const s=t.length;for(let o=0;o<s;o++){const a=t[o];a==='"'?(i=!i,n.push(a)):a==="["?(r=!0,n.push(a)):a==="]"?(r=!1,n.push(a)):a===","&&!i&&!r?(e.push(n.join("").trim()),n.length=0):n.push(a)}return n.length>0&&e.push(n.join("").trim()),e}function M9(t,e){const n=t.indexOf(e);return[t.slice(0,n),t.slice(n+1)]}function T9(t){const e=t.slice(1,-1),n=N9(e),i=[];for(let r=0;r<n.length;r++){const s=n[r],[o,a]=M9(s,"=");if(a&&a.startsWith("[")&&a.endsWith("]")){const l=a.slice(1,-1).split(",");for(let c=0;c<l.length;c++)l[c]=l[c].trim();i.push([o,l])}else a&&a.startsWith('"')&&a.endsWith('"')?i.push([o,a.slice(1,-1)]):i.push([o,a])}return Object.fromEntries(i)}const _c={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 P9(t){try{return decodeURIComponent(t)}catch{return t}}class L9{constructor({header:e="",strict:n=!0}){if(!e.length)throw new Error("empty header received");const i=e.split(/[\r\n]+/).filter(Boolean);if(!i.length)throw new Error("no non-empty header lines specified");this.strict=n,this.metadata={INFO:{..._c.InfoFields},FORMAT:{..._c.GenotypeFields},ALT:{..._c.AltTypes},FILTER:{..._c.FilterTypes}};let r;for(let l=0;l<i.length;l++){const c=i[l];if(c.startsWith("#"))c.startsWith("##")?this.parseMetadata(c):r=c;else throw new Error(`Bad line in header:
|
|
838
|
+
`)?-2:-1));for(const i of n.split(";")){const r=i.indexOf("=");if(r===-1)continue;const s=i.slice(r+1);if(!s.length)continue;const o=i.slice(0,r).trim();let a=e[o];a||(a=[],e[o]=a);for(const l of s.split(","))a.push(l.trim())}return e}function Y9(t){return aA(t.split(" "))}function _e(t){return t==="."||t===""||t===void 0?null:t}function aA(t){const e=_e(t[0]),n=_e(t[1]),i=_e(t[2]),r=_e(t[3]),s=_e(t[4]),o=_e(t[5]),a=_e(t[6]),l=_e(t[7]),c=_e(t[8]);return{seq_id:e?Jc(e):null,source:n?Jc(n):null,type:i?Jc(i):null,start:r===null?null:parseInt(r,10),end:s===null?null:parseInt(s,10),score:o===null?null:parseFloat(o),strand:a,phase:l,attributes:c===null?null:G9(c)}}function V9(t){const e=_e(t[0]),n=_e(t[1]),i=_e(t[2]),r=_e(t[3]),s=_e(t[4]),o=_e(t[5]),a=_e(t[6]),l=_e(t[7]),c=_e(t[8]);return{seq_id:e,source:n,type:i,start:r===null?null:parseInt(r,10),end:s===null?null:parseInt(s,10),score:o===null?null:parseFloat(o),strand:a,phase:l,attributes:c===null?null:H9(c)}}function J9(t){const e=_9.exec(t);if(!e)return null;const[,n]=e;let[,,i]=e;const r={directive:n};if(i.length&&(i=i.replace(z9,""),r.value=i),n==="sequence-region"){const s=i.split(qb,3);return{...r,seq_id:s[0],start:s[1]?.replaceAll(Kb,""),end:s[2]?.replaceAll(Kb,"")}}else if(n==="genome-build"){const[s,o]=i.split(qb,2);return{...r,source:s,buildName:o}}return r}const q9=/^\s*[^#\s>]/,K9=/^\s*(#+)(.*)/,j9=/^\s*$/,W9=/^\s*>/,X9=/\r?\n?$/g;class qc{featureCallback;endCallback;commentCallback;errorCallback;disableDerivesFromReferences;directiveCallback;bufferSize;eof=!1;lineNumber=0;_underConstructionTopLevel=[];_underConstructionById={};_completedReferences={};_underConstructionOrphans={};constructor(e){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.disableDerivesFromReferences=e.disableDerivesFromReferences||!1,this.bufferSize=e.bufferSize===void 0?1/0:e.bufferSize}addLine(e){if(this.eof)return;if(this.lineNumber+=1,q9.test(e)){this._bufferLine(e);return}const n=K9.exec(e);if(n){const[,i]=n;let[,,r]=n;if(i.length===3)this._emitAllUnderConstructionFeatures();else if(i.length===2){const s=J9(e);s&&(s.directive==="FASTA"?(this._emitAllUnderConstructionFeatures(),this.eof=!0):this._emitItem(s))}else this._emitItem({comment:r.trimStart()})}else if(!j9.test(e))if(W9.test(e))this._emitAllUnderConstructionFeatures(),this.eof=!0;else{const i=e.replaceAll(X9,"");throw new Error(`GFF3 parse error. Cannot parse '${i}'.`)}}addParsedFeatureLine(e){this.eof||(this.lineNumber+=1,this._bufferParsedLine(e))}finish(){this._emitAllUnderConstructionFeatures(),this.endCallback()}_emitItem(e){Array.isArray(e)?this.featureCallback(e):"directive"in e?this.directiveCallback(e):"comment"in e&&this.commentCallback(e)}_enforceBufferSizeLimit(e=0){const n=i=>{i&&Array.isArray(i)&&i[0].attributes?.ID?.[0]&&(i[0].attributes.ID.forEach(s=>{delete this._underConstructionById[s],delete this._completedReferences[s]}),i.forEach(s=>{s.child_features&&s.child_features.forEach(o=>{n(o)}),s.derived_features&&s.derived_features.forEach(o=>{n(o)})}))};for(;this._underConstructionTopLevel.length+e>this.bufferSize;){const i=this._underConstructionTopLevel.shift();i&&(this._emitItem(i),n(i))}}_emitAllUnderConstructionFeatures(){this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={};const e=Object.keys(this._underConstructionOrphans);if(e.length)throw new Error(`some features reference other features that do not exist in the file (or in the same '###' scope). ${e.join(",")}`)}_bufferLine(e){this._bufferParsedLine(Y9(e))}_bufferParsedLine(e){const n=e;n.child_features=[],n.derived_features=[];const i=n.attributes?.ID||[],r=n.attributes?.Parent||[],s=this.disableDerivesFromReferences?[]:n.attributes?.Derives_from||[];if(!i.length&&!r.length&&!s.length){this._emitItem([n]);return}let o;i.forEach(a=>{const l=this._underConstructionById[a];l?(l[l.length-1].type!==n.type&&this._parseError(`multi-line feature "${a}" has inconsistent types: "${n.type}", "${l[l.length-1].type}"`),l.push(n),o=l):(o=[n],this._enforceBufferSizeLimit(1),!r.length&&!s.length&&this._underConstructionTopLevel.push(o),this._underConstructionById[a]=o,this._resolveReferencesTo(o,a))}),this._resolveReferencesFrom(o||[n],{Parent:r,Derives_from:s},i)}_resolveReferencesTo(e,n){const i=this._underConstructionOrphans[n];if(i){for(const r of e)r.child_features.push(...i.Parent),r.derived_features.push(...i.Derives_from);delete this._underConstructionOrphans[n]}}_parseError(e){this.eof=!0,this.errorCallback(`${this.lineNumber}: ${e}`)}_resolveReferencesFrom(e,n,i){for(const r of n.Parent){const s=this._underConstructionById[r];if(s){let o=!1;for(const a of i){const l=`Parent,${r}`,c=this._completedReferences[a]||(this._completedReferences[a]={});c[l]&&(o=!0),c[l]=!0}if(!o)for(const a of s)a.child_features.push(e)}else{let o=this._underConstructionOrphans[r];o||(o={Parent:[],Derives_from:[]},this._underConstructionOrphans[r]=o),o.Parent.push(e)}}for(const r of n.Derives_from){const s=this._underConstructionById[r];if(s){let o=!1;for(const a of i){const l=`Derives_from,${r}`,c=this._completedReferences[a]||(this._completedReferences[a]={});c[l]&&(o=!0),c[l]=!0}if(!o)for(const a of s)a.derived_features.push(e)}else{let o=this._underConstructionOrphans[r];o||(o={Parent:[],Derives_from:[]},this._underConstructionOrphans[r]=o),o.Derives_from.push(e)}}}}function Z9(t){const e=[],n=new qc({featureCallback:i=>e.push(i),disableDerivesFromReferences:!0,errorCallback:i=>{throw new Error(i)}});for(const i of t.split(/\r?\n/))n.addLine(i);return n.finish(),e}function $9(t){const e=[],n=new qc({featureCallback:i=>e.push(i),disableDerivesFromReferences:!0,errorCallback:i=>{throw new Error(i)}});for(const i of t)n.addLine(i);return n.finish(),e}function eL(t){const e=[],n=new qc({featureCallback:i=>e.push(i),disableDerivesFromReferences:!0,errorCallback:i=>{throw new Error(i)}});for(const i of t){const r=aA(i.fields);i.lineHash!==void 0&&(r.attributes||(r.attributes={}),r.attributes._lineHash=[String(i.lineHash)]),n.addParsedFeatureLine(r)}return n.finish(),e}function tL(t,e){const n=[],i=new qc({featureCallback:s=>n.push(s),disableDerivesFromReferences:!0,errorCallback:s=>{throw new Error(s)}}),r=e?aA:V9;for(const s of t){const o=r(s.fields);s.lineHash!==void 0&&(o.attributes||(o.attributes={}),o.attributes._lineHash=[String(s.lineHash)]),i.addParsedFeatureLine(o)}return i.finish(),n}const nL=Object.freeze(Object.defineProperty({__proto__:null,parseArraySync:$9,parseRecordsSync:eL,parseRecordsSyncFast:tL,parseStringSync:Z9},Symbol.toStringTag,{value:"Module"}));function iL(t,e,n){const i=Object.create(null),r=n.length,s=e.length,o=9,a=58;let l=0;if(t==="GT"){for(let f=0;f<r;f++){const h=l;for(;l<s&&e.charCodeAt(l)!==o;)l++;i[n[f]]=e.slice(h,l),l++}return i}const c=t.indexOf("GT");if(c===-1)return i;if(c===0){for(let f=0;f<r;f++){const h=l;for(;l<s&&e.charCodeAt(l)!==a&&e.charCodeAt(l)!==o;)l++;for(i[n[f]]=e.slice(h,l);l<s&&e.charCodeAt(l)!==o;)l++;l++}return i}let u=0;for(let f=0;f<c;f++)t.charCodeAt(f)===a&&u++;for(let f=0;f<r;f++){const h=l;let A=l;for(;A<s&&e.charCodeAt(A)!==o;)A++;let d=0,g=h;for(let m=h;m<=A;m++)if(m===A||e.charCodeAt(m)===a){if(d===u){i[n[f]]=e.slice(g,m);break}d++,g=m+1}l=A+1}return i}function rL(t){const e=[],n=[];let i=!1,r=!1;const s=t.length;for(let o=0;o<s;o++){const a=t[o];a==='"'?(i=!i,n.push(a)):a==="["?(r=!0,n.push(a)):a==="]"?(r=!1,n.push(a)):a===","&&!i&&!r?(e.push(n.join("").trim()),n.length=0):n.push(a)}return n.length>0&&e.push(n.join("").trim()),e}function sL(t,e){const n=t.indexOf(e);return[t.slice(0,n),t.slice(n+1)]}function oL(t){const e=t.slice(1,-1),n=rL(e),i=[];for(let r=0;r<n.length;r++){const s=n[r],[o,a]=sL(s,"=");if(a&&a.startsWith("[")&&a.endsWith("]")){const l=a.slice(1,-1).split(",");for(let c=0;c<l.length;c++)l[c]=l[c].trim();i.push([o,l])}else a&&a.startsWith('"')&&a.endsWith('"')?i.push([o,a.slice(1,-1)]):i.push([o,a])}return Object.fromEntries(i)}const Kc={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 aL(t){try{return decodeURIComponent(t)}catch{return t}}class cL{constructor({header:e="",strict:n=!0}){if(!e.length)throw new Error("empty header received");const i=e.split(/[\r\n]+/).filter(Boolean);if(!i.length)throw new Error("no non-empty header lines specified");this.strict=n,this.metadata={INFO:{...Kc.InfoFields},FORMAT:{...Kc.GenotypeFields},ALT:{...Kc.AltTypes},FILTER:{...Kc.FilterTypes}};let r;for(let l=0;l<i.length;l++){const c=i[l];if(c.startsWith("#"))c.startsWith("##")?this.parseMetadata(c):r=c;else throw new Error(`Bad line in header:
|
|
827
839
|
${c}`)}if(!r)throw new Error("No format line found in header");const s=r.trim().split(" "),o=s.slice(0,8),a=["#CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO"];if(s.length<8)throw new Error(`VCF header missing columns:
|
|
828
840
|
${r}`);if(o.length!==a.length||!o.every((l,c)=>l===a[c]))throw new Error(`VCF column headers not correct:
|
|
829
|
-
${r}`);this.samples=s.slice(9)}parseInfo(e){const n={},i=e.includes("%"),r=e.split(";"),s=this.metadata.INFO,o=r.length;for(let a=0;a<o;a++){const l=r[a],c=l.indexOf("="),f=c===-1?l:l.slice(0,c),u=c===-1?void 0:l.slice(c+1),h=s[f]?.Type;if(h==="Flag")n[f]=!0;else if(!u)n[f]=!0;else{const A=h==="Integer"||h==="Float",d=u.split(","),g=d.length;if(i){const m=[];for(let p=0;p<g;p++){const w=d[p];if(w===".")m.push(void 0);else{const C=P9(w);m.push(A?Number(C):C)}}n[f]=m}else{const m=[];for(let p=0;p<g;p++){const w=d[p];w==="."?m.push(void 0):m.push(A?Number(w):w)}n[f]=m}}}return n}parseSamples(e,n){const i={};if(e){const r=n.split(" "),s=e.split(":"),o=this.metadata.FORMAT,a=[];for(let f=0;f<s.length;f++){const u=o[s[f]]?.Type;a.push(u==="Integer"||u==="Float")}const l=s.length,c=this.samples.length;for(let f=0;f<c;f++){const u=this.samples[f],h={},A=r[f],d=A.length;let g=0,m=0;for(let p=0;p<=d;p++)if(p===d||A[p]===":"){const w=A.slice(g,p);if(w===""||w===".")h[s[m]]=void 0;else{const C=w.split(","),y=[];if(a[m])for(let b=0;b<C.length;b++){const x=C[b];y.push(x==="."?void 0:+x)}else for(let b=0;b<C.length;b++){const x=C[b];y.push(x==="."?void 0:x)}h[s[m]]=y}if(g=p+1,m+=1,m>=l)break}i[u]=h}}return i}parseMetadata(e){const n=/^##(.+?)=(.*)/.exec(e.trim());if(!n)throw new Error(`Line is not a valid metadata line: ${e}`);const[i,r]=n.slice(1,3),s=i;if(r?.startsWith("<")){s in this.metadata||(this.metadata[s]={});const[o,a]=this.parseStructuredMetaVal(r);o?this.metadata[s][o]=a:this.metadata[s]=a}else this.metadata[s]=r}parseStructuredMetaVal(e){const n=T9(e),i=n.ID;return delete n.ID,"Number"in n&&(Number.isNaN(Number(n.Number))||(n.Number=Number(n.Number))),[i,n]}getMetadata(...e){let n=this.metadata;const i=e.length;for(let r=0;r<i;r++)if(n=n[e[r]],!n)return n;return n}parseLine(e){let n=0,i=0;for(;n<e.length&&i<9;)e[n]===" "&&(i+=1),n+=1;const r=i===9?n-1:n,s=e.slice(0,r).split(" "),o=e.slice(r+1),[a,l,c,f,u,h,A]=s,d=a,g=+l,m=c==="."?void 0:c.split(";"),p=f,w=u==="."?void 0:u.split(","),C=h==="."?void 0:+h,y=A==="."?void 0:A.split(";"),b=s[8];if(this.strict&&!s[7])throw new Error("no INFO field specified, must contain at least a '.' (turn off strict mode to allow)");const x=s[7]===void 0||s[7]==="."?{}:this.parseInfo(s[7]);return{CHROM:d,POS:g,ALT:w,INFO:x,REF:p,FILTER:y?.length===1&&y[0]==="PASS"?"PASS":y,ID:m,QUAL:C,FORMAT:b,SAMPLES:()=>this.parseSamples(s[8]??"",o),GENOTYPES:()=>R9(s[8]??"",o,this.samples)}}}const O9=Object.freeze(Object.defineProperty({__proto__:null,default:L9},Symbol.toStringTag,{value:"Module"})),dE=["BOOLEAN","INT32","INT64","INT96","FLOAT","DOUBLE","BYTE_ARRAY","FIXED_LEN_BYTE_ARRAY"],ki=["PLAIN","GROUP_VAR_INT","PLAIN_DICTIONARY","RLE","BIT_PACKED","DELTA_BINARY_PACKED","DELTA_LENGTH_BYTE_ARRAY","DELTA_BYTE_ARRAY","RLE_DICTIONARY","BYTE_STREAM_SPLIT"],U9=["REQUIRED","OPTIONAL","REPEATED"],_9=["UTF8","MAP","MAP_KEY_VALUE","LIST","ENUM","DECIMAL","DATE","TIME_MILLIS","TIME_MICROS","TIMESTAMP_MILLIS","TIMESTAMP_MICROS","UINT_8","UINT_16","UINT_32","UINT_64","INT_8","INT_16","INT_32","INT_64","JSON","BSON","INTERVAL"],G9=["UNCOMPRESSED","SNAPPY","GZIP","LZO","BROTLI","LZ4","ZSTD","LZ4_RAW"],gE=["DATA_PAGE","INDEX_PAGE","DICTIONARY_PAGE","DATA_PAGE_V2"],z9=["SPHERICAL","VINCENTY","THOMAS","ANDOYER","KARNEY"];function XA(t){const e=Gc(t);if(e.type===1)return{type:"Point",coordinates:ZA(t,e)};if(e.type===2)return{type:"LineString",coordinates:$A(t,e)};if(e.type===3)return{type:"Polygon",coordinates:pE(t,e)};if(e.type===4){const n=[];for(let i=0;i<e.count;i++)n.push(ZA(t,Gc(t)));return{type:"MultiPoint",coordinates:n}}else if(e.type===5){const n=[];for(let i=0;i<e.count;i++)n.push($A(t,Gc(t)));return{type:"MultiLineString",coordinates:n}}else if(e.type===6){const n=[];for(let i=0;i<e.count;i++)n.push(pE(t,Gc(t)));return{type:"MultiPolygon",coordinates:n}}else if(e.type===7){const n=[];for(let i=0;i<e.count;i++)n.push(XA(t));return{type:"GeometryCollection",geometries:n}}else throw new Error(`Unsupported geometry type: ${e.type}`)}function Gc(t){const{view:e}=t,n=e.getUint8(t.offset++)===1,i=e.getUint32(t.offset,n);t.offset+=4;const r=i%1e3,s=Math.floor(i/1e3);let o=0;r>1&&r<=7&&(o=e.getUint32(t.offset,n),t.offset+=4);let a=2;return s&&a++,s===3&&a++,{littleEndian:n,type:r,dim:a,count:o}}function ZA(t,e){const n=[];for(let i=0;i<e.dim;i++){const r=t.view.getFloat64(t.offset,e.littleEndian);t.offset+=8,n.push(r)}return n}function $A(t,e){const n=[];for(let i=0;i<e.count;i++)n.push(ZA(t,e));return n}function pE(t,e){const{view:n}=t,i=[];for(let r=0;r<e.count;r++){const s=n.getUint32(t.offset,e.littleEndian);t.offset+=4,i.push($A(t,{...e,count:s}))}return i}const mE=new TextDecoder,zc={timestampFromMilliseconds(t){return new Date(Number(t))},timestampFromMicroseconds(t){return new Date(Number(t/1000n))},timestampFromNanoseconds(t){return new Date(Number(t/1000000n))},dateFromDays(t){return new Date(t*864e5)},stringFromBytes(t){return t&&mE.decode(t)},geometryFromBytes(t){return t&&XA({view:new DataView(t.buffer,t.byteOffset,t.byteLength),offset:0})},geographyFromBytes(t){return t&&XA({view:new DataView(t.buffer,t.byteOffset,t.byteLength),offset:0})}};function wE(t,e,n,i){if(e&&n.endsWith("_DICTIONARY")){let r=t;t instanceof Uint8Array&&!(e instanceof Uint8Array)&&(r=new e.constructor(t.length));for(let s=0;s<t.length;s++)r[s]=e[t[s]];return r}else return yE(t,i)}function yE(t,e){const{element:n,parsers:i,utf8:r=!0,schemaPath:s}=e,{type:o,converted_type:a,logical_type:l}=n;if(s?.some(f=>f.element.logical_type?.type==="VARIANT")&&o==="BYTE_ARRAY"&&a!=="UTF8"&&l?.type!=="STRING")return t;if(a==="DECIMAL"){const u=10**-(n.scale||0),h=new Array(t.length);for(let A=0;A<h.length;A++)t[A]instanceof Uint8Array?h[A]=CE(t[A])*u:h[A]=Number(t[A])*u;return h}if(!a&&o==="INT96")return Array.from(t).map(f=>i.timestampFromNanoseconds(H9(f)));if(a==="DATE")return Array.from(t).map(f=>i.dateFromDays(f));if(a==="TIMESTAMP_MILLIS")return Array.from(t).map(f=>i.timestampFromMilliseconds(f));if(a==="TIMESTAMP_MICROS")return Array.from(t).map(f=>i.timestampFromMicroseconds(f));if(a==="JSON")return t.map(f=>JSON.parse(mE.decode(f)));if(a==="BSON")throw new Error("parquet bson not supported");if(a==="INTERVAL")throw new Error("parquet interval not supported");if(l?.type==="GEOMETRY")return t.map(f=>i.geometryFromBytes(f));if(l?.type==="GEOGRAPHY")return t.map(f=>i.geographyFromBytes(f));if(a==="UTF8"||l?.type==="STRING"||r&&o==="BYTE_ARRAY")return t.map(f=>i.stringFromBytes(f));if(a==="UINT_64"||l?.type==="INTEGER"&&l.bitWidth===64&&!l.isSigned){if(t instanceof BigInt64Array)return new BigUint64Array(t.buffer,t.byteOffset,t.length);const f=new BigUint64Array(t.length);for(let u=0;u<f.length;u++)f[u]=BigInt(t[u]);return f}if(a==="UINT_32"||l?.type==="INTEGER"&&l.bitWidth===32&&!l.isSigned){if(t instanceof Int32Array)return new Uint32Array(t.buffer,t.byteOffset,t.length);const f=new Uint32Array(t.length);for(let u=0;u<f.length;u++)f[u]=t[u];return f}if(l?.type==="FLOAT16")return Array.from(t).map(EE);if(l?.type==="TIMESTAMP"){const{unit:f}=l;let u=i.timestampFromMilliseconds;f==="MICROS"&&(u=i.timestampFromMicroseconds),f==="NANOS"&&(u=i.timestampFromNanoseconds);const h=new Array(t.length);for(let A=0;A<h.length;A++)h[A]=u(t[A]);return h}return t}function CE(t){if(!t.length)return 0;let e=0n;for(const i of t)e=e*256n+BigInt(i);const n=t.length*8;return e>=2n**BigInt(n-1)&&(e-=2n**BigInt(n)),Number(e)}function H9(t){const e=(t>>64n)-2440588n,n=t&0xffffffffffffffffn;return e*86400000000000n+n}function EE(t){if(!t)return;const e=t[1]<<8|t[0],n=e>>15?-1:1,i=e>>10&31,r=e&1023;return i===0?n*2**-14*(r/1024):i===31?r?NaN:n*(1/0):n*2**(i-15)*(1+r/1024)}function IE(t,e,n){const i=t[e],r=[];let s=1;if(i.num_children)for(;r.length<i.num_children;){const o=t[e+s],a=IE(t,e+s,[...n,o.name]);s+=a.count,r.push(a)}return{count:s,element:i,children:r,path:n}}function bE(t,e){let n=IE(t,0,[]);const i=[n];for(const r of e){const s=n.children.find(o=>o.element.name===r);if(!s)throw new Error(`parquet schema element not found: ${e}`);i.push(s),n=s}return i}function Y9(t){const e=[];function n(i){if(i.children.length)for(const r of i.children)n(r);else e.push(i.path.join("."))}return n(t),e}function xE(t){let e=0;for(const{element:n}of t)n.repetition_type==="REPEATED"&&e++;return e}function eh(t){let e=0;for(const{element:n}of t.slice(1))n.repetition_type!=="REQUIRED"&&e++;return e}function V9(t){if(!t||t.element.converted_type!=="LIST"||t.children.length>1)return!1;const e=t.children[0];return!(e.children.length>1||e.element.repetition_type!=="REPEATED")}function J9(t){if(!t||t.element.converted_type!=="MAP"||t.children.length>1)return!1;const e=t.children[0];return!(e.children.length!==2||e.element.repetition_type!=="REPEATED"||e.children.find(r=>r.element.name==="key")?.element.repetition_type==="REPEATED"||e.children.find(r=>r.element.name==="value")?.element.repetition_type==="REPEATED")}function BE(t){if(t.length!==2)return!1;const[,e]=t;return!(e.element.repetition_type==="REPEATED"||e.children.length)}const Xe={STOP:0,TRUE:1,FALSE:2,BYTE:3,I16:4,I32:5,I64:6,DOUBLE:7,BINARY:8,LIST:9,STRUCT:12};function th(t){let e=0;const n={};for(;t.offset<t.view.byteLength;){const[i,r,s]=SE(t,e);if(e=s,i===Xe.STOP)break;n[`field_${r}`]=Hc(t,i)}return n}function Hc(t,e){switch(e){case Xe.TRUE:return!0;case Xe.FALSE:return!1;case Xe.BYTE:return t.view.getInt8(t.offset++);case Xe.I16:case Xe.I32:return vE(t);case Xe.I64:return nh(t);case Xe.DOUBLE:{const n=t.view.getFloat64(t.offset,!0);return t.offset+=8,n}case Xe.BINARY:{const n=Fi(t),i=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,n);return t.offset+=n,i}case Xe.LIST:{const n=t.view.getUint8(t.offset++),i=n&15;let r=n>>4;r===15&&(r=Fi(t));const s=i===Xe.TRUE||i===Xe.FALSE,o=new Array(r);for(let a=0;a<r;a++)o[a]=s?Hc(t,Xe.BYTE)===1:Hc(t,i);return o}case Xe.STRUCT:{const n={};let i=0;for(;;){const[r,s,o]=SE(t,i);if(i=o,r===Xe.STOP)break;n[`field_${s}`]=Hc(t,r)}return n}default:throw new Error(`thrift unhandled type: ${e}`)}}function Fi(t){let e=0,n=0;for(;;){const i=t.view.getUint8(t.offset++);if(e|=(i&127)<<n,!(i&128))return e;n+=7}}function q9(t){let e=0n,n=0n;for(;;){const i=t.view.getUint8(t.offset++);if(e|=BigInt(i&127)<<n,!(i&128))return e;n+=7n}}function vE(t){const e=Fi(t);return e>>>1^-(e&1)}function nh(t){const e=q9(t);return e>>1n^-(e&1n)}function SE(t,e){const n=t.view.getUint8(t.offset++),i=n&15;if(i===Xe.STOP)return[0,0,e];const r=n>>4,s=r?e+r:vE(t);return[i,s,s]}function K9(t,e){const n=new Map,i=e?.find(({key:s})=>s==="geo")?.value,r=(i&&JSON.parse(i)?.columns)??{};for(const[s,o]of Object.entries(r)){if(o.encoding!=="WKB")continue;const a=o.edges==="spherical"?"GEOGRAPHY":"GEOMETRY",l=o.crs?.id??o.crs?.ids?.[0],c=l?`${l.authority}:${l.code.toString()}`:void 0;n.set(s,{type:a,crs:c})}for(let s=1;s<t.length;s++){const o=t[s],{logical_type:a,name:l,num_children:c,repetition_type:f,type:u}=o;if(c){s+=c;continue}u==="BYTE_ARRAY"&&a===void 0&&f!=="REPEATED"&&(o.logical_type=n.get(l))}}const j9=1<<19,W9=new TextDecoder;function qt(t){return t&&W9.decode(t)}async function X9(t,{parsers:e,initialFetchSize:n=j9,geoparquet:i=!0}={}){if(!t||!(t.byteLength>=0))throw new Error("parquet expected AsyncBuffer");const r=Math.max(0,t.byteLength-n),s=await t.slice(r,t.byteLength),o=new DataView(s);if(o.getUint32(s.byteLength-4,!0)!==827474256)throw new Error("parquet file invalid (footer != PAR1)");const a=o.getUint32(s.byteLength-8,!0);if(a>t.byteLength-8)throw new Error(`parquet metadata length ${a} exceeds available buffer ${t.byteLength-8}`);if(a+8>n){const l=t.byteLength-a-8,c=await t.slice(l,r),f=new ArrayBuffer(a+8),u=new Uint8Array(f);return u.set(new Uint8Array(c)),u.set(new Uint8Array(s),r-l),QE(f,{parsers:e,geoparquet:i})}else return QE(s,{parsers:e,geoparquet:i})}function QE(t,{parsers:e,geoparquet:n=!0}={}){if(!(t instanceof ArrayBuffer))throw new Error("parquet expected ArrayBuffer");const i=new DataView(t);if(e={...zc,...e},i.byteLength<8)throw new Error("parquet file is too short");if(i.getUint32(i.byteLength-4,!0)!==827474256)throw new Error("parquet file invalid (footer != PAR1)");const r=i.byteLength-8,s=i.getUint32(r,!0);if(s>i.byteLength-8)throw new Error(`parquet metadata length ${s} exceeds available buffer ${i.byteLength-8}`);const o=r-s,l=th({view:i,offset:o}),c=l.field_1,f=l.field_2.map(m=>({type:dE[m.field_1],type_length:m.field_2,repetition_type:U9[m.field_3],name:qt(m.field_4),num_children:m.field_5,converted_type:_9[m.field_6],scale:m.field_7,precision:m.field_8,field_id:m.field_9,logical_type:Z9(m.field_10)})),u=f.filter(m=>m.type),h=l.field_3,A=l.field_4.map(m=>({columns:m.field_1.map((p,w)=>({file_path:qt(p.field_1),file_offset:p.field_2,meta_data:p.field_3&&{type:dE[p.field_3.field_1],encodings:p.field_3.field_2?.map(C=>ki[C]),path_in_schema:p.field_3.field_3.map(qt),codec:G9[p.field_3.field_4],num_values:p.field_3.field_5,total_uncompressed_size:p.field_3.field_6,total_compressed_size:p.field_3.field_7,key_value_metadata:p.field_3.field_8?.map(C=>({key:qt(C.field_1),value:qt(C.field_2)})),data_page_offset:p.field_3.field_9,index_page_offset:p.field_3.field_10,dictionary_page_offset:p.field_3.field_11,statistics:$9(p.field_3.field_12,u[w],e),encoding_stats:p.field_3.field_13?.map(C=>({page_type:gE[C.field_1],encoding:ki[C.field_2],count:C.field_3})),bloom_filter_offset:p.field_3.field_14,bloom_filter_length:p.field_3.field_15,size_statistics:p.field_3.field_16&&{unencoded_byte_array_data_bytes:p.field_3.field_16.field_1,repetition_level_histogram:p.field_3.field_16.field_2,definition_level_histogram:p.field_3.field_16.field_3},geospatial_statistics:p.field_3.field_17&&{bbox:p.field_3.field_17.field_1&&{xmin:p.field_3.field_17.field_1.field_1,xmax:p.field_3.field_17.field_1.field_2,ymin:p.field_3.field_17.field_1.field_3,ymax:p.field_3.field_17.field_1.field_4,zmin:p.field_3.field_17.field_1.field_5,zmax:p.field_3.field_17.field_1.field_6,mmin:p.field_3.field_17.field_1.field_7,mmax:p.field_3.field_17.field_1.field_8},geospatial_types:p.field_3.field_17.field_2}},offset_index_offset:p.field_4,offset_index_length:p.field_5,column_index_offset:p.field_6,column_index_length:p.field_7,crypto_metadata:p.field_8,encrypted_column_metadata:p.field_9})),total_byte_size:m.field_2,num_rows:m.field_3,sorting_columns:m.field_4?.map(p=>({column_idx:p.field_1,descending:p.field_2,nulls_first:p.field_3})),file_offset:m.field_5,total_compressed_size:m.field_6,ordinal:m.field_7})),d=l.field_5?.map(m=>({key:qt(m.field_1),value:qt(m.field_2)})),g=qt(l.field_6);return n&&K9(f,d),{version:c,schema:f,num_rows:h,row_groups:A,key_value_metadata:d,created_by:g,metadata_length:s}}function DE({schema:t}){return bE(t,[])[0]}function Z9(t){return t?.field_1?{type:"STRING"}:t?.field_2?{type:"MAP"}:t?.field_3?{type:"LIST"}:t?.field_4?{type:"ENUM"}:t?.field_5?{type:"DECIMAL",scale:t.field_5.field_1,precision:t.field_5.field_2}:t?.field_6?{type:"DATE"}:t?.field_7?{type:"TIME",isAdjustedToUTC:t.field_7.field_1,unit:kE(t.field_7.field_2)}:t?.field_8?{type:"TIMESTAMP",isAdjustedToUTC:t.field_8.field_1,unit:kE(t.field_8.field_2)}:t?.field_10?{type:"INTEGER",bitWidth:t.field_10.field_1,isSigned:t.field_10.field_2}:t?.field_11?{type:"NULL"}:t?.field_12?{type:"JSON"}:t?.field_13?{type:"BSON"}:t?.field_14?{type:"UUID"}:t?.field_15?{type:"FLOAT16"}:t?.field_16?{type:"VARIANT",specification_version:t.field_16.field_1}:t?.field_17?{type:"GEOMETRY",crs:qt(t.field_17.field_1)}:t?.field_18?{type:"GEOGRAPHY",crs:qt(t.field_18.field_1),algorithm:z9[t.field_18.field_2]}:t}function kE(t){if(t.field_1)return"MILLIS";if(t.field_2)return"MICROS";if(t.field_3)return"NANOS";throw new Error("parquet time unit required")}function $9(t,e,n){return t&&{max:Yc(t.field_1,e,n),min:Yc(t.field_2,e,n),null_count:t.field_3,distinct_count:t.field_4,max_value:Yc(t.field_5,e,n),min_value:Yc(t.field_6,e,n),is_max_value_exact:t.field_7,is_min_value_exact:t.field_8}}function Yc(t,e,n){const{type:i,converted_type:r,logical_type:s}=e;if(t===void 0)return t;if(i==="BOOLEAN")return t[0]===1;if(i==="BYTE_ARRAY")return n.stringFromBytes(t);const o=new DataView(t.buffer,t.byteOffset,t.byteLength);return i==="FLOAT"&&o.byteLength===4?o.getFloat32(0,!0):i==="DOUBLE"&&o.byteLength===8?o.getFloat64(0,!0):i==="INT32"&&r==="DATE"?n.dateFromDays(o.getInt32(0,!0)):i==="INT64"&&r==="TIMESTAMP_MILLIS"?n.timestampFromMilliseconds(o.getBigInt64(0,!0)):i==="INT64"&&r==="TIMESTAMP_MICROS"?n.timestampFromMicroseconds(o.getBigInt64(0,!0)):i==="INT64"&&s?.type==="TIMESTAMP"&&s?.unit==="NANOS"?n.timestampFromNanoseconds(o.getBigInt64(0,!0)):i==="INT64"&&s?.type==="TIMESTAMP"&&s?.unit==="MICROS"?n.timestampFromMicroseconds(o.getBigInt64(0,!0)):i==="INT64"&&s?.type==="TIMESTAMP"?n.timestampFromMilliseconds(o.getBigInt64(0,!0)):i==="INT32"&&o.byteLength===4?o.getInt32(0,!0):i==="INT64"&&o.byteLength===8?o.getBigInt64(0,!0):r==="DECIMAL"?CE(t)*10**-(e.scale||0):s?.type==="FLOAT16"?EE(t):t}function FE(t,e){for(let i=0;i<e.length;i+=1e4)t.push(...e.slice(i,i+1e4))}function Or(t,e,n=!0){if(n?t===e:t==e)return!0;if(t instanceof Uint8Array&&e instanceof Uint8Array)return Or(Array.from(t),Array.from(e),n);if(!t||!e||typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!Or(t[r],e[r],n))return!1;return!0}if(typeof t!="object")return!1;const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!1;for(const r of i)if(!Or(t[r],e[r],n))return!1;return!0}function eP(t){if(!t)return[];if(t.length===1)return t[0];const e=[];for(const n of t)FE(e,n);return e}function ih({rowGroup:t,physicalColumns:e,filter:n,strict:i=!0}){if(!n)return!1;if("$and"in n&&Array.isArray(n.$and))return n.$and.some(r=>ih({rowGroup:t,physicalColumns:e,filter:r,strict:i}));if("$or"in n&&Array.isArray(n.$or))return n.$or.every(r=>ih({rowGroup:t,physicalColumns:e,filter:r,strict:i}));if("$nor"in n&&Array.isArray(n.$nor))return!1;for(const[r,s]of Object.entries(n)){const o=e.indexOf(r);if(o===-1)continue;const a=t.columns[o].meta_data?.statistics;if(!a)continue;const{min:l,max:c,min_value:f,max_value:u}=a,h=f!==void 0?f:l,A=u!==void 0?u:c;if(!(h===void 0||A===void 0)){for(const[d,g]of Object.entries(s||{}))if(d==="$gt"&&A<=g||d==="$gte"&&A<g||d==="$lt"&&h>=g||d==="$lte"&&h>g||d==="$eq"&&(g<h||g>A)||d==="$ne"&&Or(h,A,i)&&Or(h,g,i)||d==="$in"&&Array.isArray(g)&&g.every(m=>m<h||m>A)||d==="$nin"&&Array.isArray(g)&&Or(h,A,i)&&g.includes(h))return!0}}return!1}const tP=1<<21;function nP({metadata:t,rowStart:e=0,rowEnd:n=1/0,columns:i,filter:r,filterStrict:s=!0,useOffsetIndex:o=!1}){if(!t)throw new Error("parquetPlan requires metadata");const a=[],l=[],c=[],f=Y9(DE(t));let u=0;for(const h of t.row_groups){const A=Number(h.num_rows),d=u+A;if(A>0&&d>e&&u<n&&!ih({rowGroup:h,physicalColumns:f,filter:r,strict:s})){const g=[];for(const C of h.columns){const y=C.meta_data;if(C.file_path)throw new Error("parquet file_path not supported");if(!y)throw new Error("parquet column metadata is undefined");if(!i||i.includes(y.path_in_schema[0])){const b=y.dictionary_page_offset||y.data_page_offset,x=Number(b),I=Number(b+y.total_compressed_size);if(o&&C.offset_index_offset&&C.offset_index_length){const S=Number(C.offset_index_offset);g.push({columnMetadata:y,offsetIndex:{startByte:S,endByte:S+C.offset_index_length},bounds:{startByte:x,endByte:I}})}else g.push({columnMetadata:y,range:{startByte:x,endByte:I}})}}const m=Math.max(e-u,0),p=Math.min(n-u,A);a.push({chunks:g,rowGroup:h,groupStart:u,groupRows:A,selectStart:m,selectEnd:p});let w;for(const C of g)if("offsetIndex"in C)c.push(C.offsetIndex);else{const{range:y}=C;i?l.push(y):w&&y.endByte-w.startByte<=tP?w.endByte=y.endByte:(w&&l.push(w),w={...y})}w&&l.push(w)}u=d}return isFinite(n)||(n=u),l.push(...c),{metadata:t,rowStart:e,rowEnd:n,columns:i,fetches:l,groups:a}}function iP(t,{fetches:e}){const n=e.map(({startByte:i,endByte:r})=>t.slice(i,r));return{byteLength:t.byteLength,slice(i,r=t.byteLength){const s=e.findIndex(({startByte:o,endByte:a})=>o<=i&&r<=a);if(s<0)return t.slice(i,r);if(e[s].startByte!==i||e[s].endByte!==r){const o=i-e[s].startByte,a=r-e[s].startByte;return n[s]instanceof Promise?n[s].then(l=>l.slice(o,a)):n[s].slice(o,a)}else return n[s]}}}const rh=new TextDecoder,RE=new WeakMap;function NE(t,e=zc){if(Array.isArray(t))return t.map(n=>NE(n,e));if(typeof t!="object")return t;if("metadata"in t){const n=rP(t.metadata),i=t.typed_value&&Vc(t.typed_value,n,e),r=t.value&&Eo(Jc(t.value),n,e);return i&&r?{...r,...i}:i??r}return t}function Vc(t,e,n){if(t&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Uint8Array)){if("typed_value"in t)return Vc(t.typed_value,e,n);if("value"in t&&t.value instanceof Uint8Array)return Eo(Jc(t.value),e,n);const i={};for(const[r,s]of Object.entries(t))i[r]=Vc(s,e,n);return i}return t instanceof Uint8Array?Eo(Jc(t),e,n):Array.isArray(t)?t.map(i=>Vc(i,e,n)):t}function Jc(t){return{view:new DataView(t.buffer,t.byteOffset,t.byteLength),offset:0}}function rP(t){let e=RE.get(t.buffer);e||(e=new Map,RE.set(t.buffer,e));const n=`${t.byteOffset}:${t.byteLength}`,i=e.get(n);if(i)return i;const r=Jc(t),s=r.view.getUint8(r.offset++),o=s&15;if(o!==1)throw new Error(`parquet unsupported variant metadata version: ${o}`);const a=(s>>4&1)===1,l=(s>>6&3)+1,c=Ri(r,l),f=new Array(c+1);for(let d=0;d<f.length;d++)f[d]=Ri(r,l);const u=r.offset,h=new Array(c);for(let d=0;d<c;d++){const g=f[d],m=f[d+1],p=new Uint8Array(t.buffer,t.byteOffset+u+g,m-g);h[d]=rh.decode(p)}const A={dictionary:h,sorted:a};return e.set(n,A),A}function Ri(t,e){let n=0;for(let i=0;i<e;i++)n|=t.view.getUint8(t.offset+i)<<i*8;return t.offset+=e,n}function Eo(t,e,n){const i=t.view.getUint8(t.offset++),r=i&3,s=i>>2;if(r===0)return sP(t,s,n);if(r===2)return oP(t,s,e,n);if(r===3)return aP(t,s,e,n);const o=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,s);return t.offset+=s,rh.decode(o)}function sP(t,e,n){switch(e){case 0:return null;case 1:return!0;case 2:return!1;case 3:{const i=t.view.getInt8(t.offset);return t.offset+=1,i}case 4:{const i=t.view.getInt16(t.offset,!0);return t.offset+=2,i}case 5:{const i=t.view.getInt32(t.offset,!0);return t.offset+=4,i}case 6:{const i=t.view.getBigInt64(t.offset,!0);return t.offset+=8,i}case 7:{const i=t.view.getFloat64(t.offset,!0);return t.offset+=8,i}case 8:return sh(t,4);case 9:return sh(t,8);case 10:return sh(t,16);case 11:{const i=t.view.getInt32(t.offset,!0);return t.offset+=4,n.dateFromDays(i)}case 12:case 13:{const i=t.view.getBigInt64(t.offset,!0);return t.offset+=8,n.timestampFromMicroseconds(i)}case 14:{const i=t.view.getFloat32(t.offset,!0);return t.offset+=4,i}case 15:return ME(t);case 16:{const i=ME(t);return rh.decode(i)}case 17:{const i=t.view.getBigInt64(t.offset,!0);return t.offset+=8,i}case 18:case 19:{const i=t.view.getBigInt64(t.offset,!0);return t.offset+=8,n.timestampFromNanoseconds(i)}case 20:{const i=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,16);t.offset+=16;const r=Array.from(i,s=>s.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}default:throw new Error(`parquet unsupported variant primitive type: ${e}`)}}function oP(t,e,n,i){const r=(e&3)+1,s=(e>>2&3)+1,a=e>>4&1?Ri(t,4):t.view.getUint8(t.offset++),l=new Array(a);for(let u=0;u<a;u++)l[u]=Ri(t,s);const c=new Array(a+1);for(let u=0;u<c.length;u++)c[u]=Ri(t,r);const f={};for(let u=0;u<a;u++){const h=n.dictionary[l[u]],A={view:t.view,offset:t.offset+c[u]};f[h]=Eo(A,n,i)}return t.offset+=c[c.length-1],f}function aP(t,e,n,i){const r=e&3,s=e>>2&1,o=r+1,a=Ri(t,s?4:1),l=new Array(a+1);for(let u=0;u<l.length;u++)l[u]=Ri(t,o);const c=t.offset,f=new Array(a);for(let u=0;u<a;u++){const h={view:t.view,offset:c+l[u]};f[u]=Eo(h,n,i)}return t.offset=c+l[l.length-1],f}function sh(t,e){const n=t.view.getUint8(t.offset);t.offset+=1;let i;if(e===4)i=BigInt(t.view.getInt32(t.offset,!0)),t.offset+=4;else if(e===8)i=t.view.getBigInt64(t.offset,!0),t.offset+=8;else{const r=t.view.getBigUint64(t.offset,!0);i=t.view.getBigInt64(t.offset+8,!0)<<64n|r,t.offset+=16}return Number(i)*10**-n}function ME(t){const e=t.view.getUint32(t.offset,!0);t.offset+=4;const n=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,e);return t.offset+=e,n}function TE(t,e,n,i,r){const s=eh(r);if(!e?.length&&!n.length){if(!s||!i.length)return i;e=new Array(i.length).fill(s)}const o=e?.length||n.length,a=r.map(({element:d})=>d.repetition_type);let l=0;const c=[t];let f=t,u=0,h=0,A=0;if(n[0])for(;u<a.length-2&&A<n[0];)u++,a[u]!=="REQUIRED"&&(f=f.at(-1),c.push(f),h++),a[u]==="REPEATED"&&A++;for(let d=0;d<o;d++){const g=e?.length?e[d]:s,m=n[d];for(;u&&(m<A||a[u]!=="REPEATED");)a[u]!=="REQUIRED"&&(c.pop(),h--),a[u]==="REPEATED"&&A--,u--;for(f=c.at(-1);(u<a.length-2||a[u+1]==="REPEATED")&&(h<g||a[u+1]==="REQUIRED");){if(u++,a[u]!=="REQUIRED"){const p=[];f.push(p),f=p,c.push(p),h++}a[u]==="REPEATED"&&A++}g===s?f.push(i[l++]):u===a.length-2?f.push(null):f.push([])}if(!t.length)for(let d=0;d<s;d++){const g=[];f.push(g),f=g}return t}function Io(t,e,n,i=0){const r=e.path.join("."),s=e.element.repetition_type==="OPTIONAL",o=s?i+1:i;if(V9(e)){let a=e.children[0],l=o;a.children.length===1&&(a=a.children[0],l++),Io(t,a,n,l);const c=a.path.join("."),f=t.get(c);if(!f)throw new Error("parquet list column missing values");s&&qc(f,i),t.set(r,f),t.delete(c);return}if(J9(e)){const a=e.children[0].element.name;Io(t,e.children[0].children[0],n,o+1),Io(t,e.children[0].children[1],n,o+1);const l=t.get(`${r}.${a}.key`),c=t.get(`${r}.${a}.value`);if(!l)throw new Error("parquet map column missing keys");if(!c)throw new Error("parquet map column missing values");if(l.length!==c.length)throw new Error("parquet map column key/value length mismatch");const f=PE(l,c,o);s&&qc(f,i),t.delete(`${r}.${a}.key`),t.delete(`${r}.${a}.value`),t.set(r,f);return}if(e.children.length){const a=e.element.repetition_type==="REQUIRED"?i:i+1,l={};for(const f of e.children){Io(t,f,n,a);const u=t.get(f.path.join("."));if(!u)throw new Error("parquet struct missing child data");l[f.element.name]=u}for(const f of e.children)t.delete(f.path.join("."));let c=LE(l,a);e.element.logical_type?.type==="VARIANT"&&(c=NE(c,n)),s&&qc(c,i),t.set(r,c)}}function qc(t,e){for(let n=0;n<t.length;n++)e?qc(t[n],e-1):t[n]=t[n][0]}function PE(t,e,n){const i=[];for(let r=0;r<t.length;r++)if(n)i.push(PE(t[r],e[r],n-1));else if(t[r]){const s={};for(let o=0;o<t[r].length;o++){const a=e[r][o];s[t[r][o]]=a===void 0?null:a}i.push(s)}else i.push(void 0);return i}function LE(t,e){const n=Object.keys(t),i=t[n[0]]?.length,r=[];for(let s=0;s<i;s++){const o={};for(const a of n){if(t[a].length!==i)throw new Error("parquet struct parsing error");o[a]=t[a][s]}e?r.push(LE(o,e-1)):r.push(o)}return r}function bo(t,e,n){const i=n instanceof Int32Array,r=Fi(t),s=Fi(t);Fi(t);let o=nh(t),a=0;n[a++]=i?Number(o):o;const l=r/s;for(;a<e;){const c=nh(t),f=new Uint8Array(s);for(let u=0;u<s;u++)f[u]=t.view.getUint8(t.offset++);for(let u=0;u<s&&a<e;u++){const h=BigInt(f[u]);if(h){let A=0n,d=l;const g=(1n<<h)-1n;for(;d&&a<e;){let m=BigInt(t.view.getUint8(t.offset))>>A&g;for(A+=h;A>=8;)A-=8n,t.offset++,A&&(m|=BigInt(t.view.getUint8(t.offset))<<h-A&g);const p=c+m;o+=p,n[a++]=i?Number(o):o,d--}d&&(t.offset+=Math.ceil((d*Number(h)+Number(A))/8))}else for(let A=0;A<l&&a<e;A++)o+=c,n[a++]=i?Number(o):o}}}function OE(t,e,n){const i=new Int32Array(e);bo(t,e,i);for(let r=0;r<e;r++)n[r]=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,i[r]),t.offset+=i[r]}function cP(t,e,n){const i=new Int32Array(e);bo(t,e,i);const r=new Int32Array(e);bo(t,e,r);for(let s=0;s<e;s++){const o=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,r[s]);i[s]?(n[s]=new Uint8Array(i[s]+r[s]),n[s].set(n[s-1].subarray(0,i[s])),n[s].set(o,i[s])):n[s]=o,t.offset+=r[s]}}function Kc(t){return 32-Math.clz32(t)}function Hn(t,e,n,i){i===void 0&&(i=t.view.getUint32(t.offset,!0),t.offset+=4);const r=t.offset;let s=0;for(;s<n.length;){const o=Fi(t);if(o&1)s=fP(t,o,e,n,s);else{const a=o>>>1;lP(t,a,e,n,s),s+=a}}t.offset=r+i}function lP(t,e,n,i,r){const s=n+7>>3;let o=0;for(let a=0;a<s;a++)o|=t.view.getUint8(t.offset++)<<(a<<3);for(let a=0;a<e;a++)i[r+a]=o}function fP(t,e,n,i,r){let s=e>>1<<3;const o=(1<<n)-1;let a=0;if(t.offset<t.view.byteLength)a=t.view.getUint8(t.offset++);else if(o)throw new Error(`parquet bitpack offset ${t.offset} out of range`);let l=8,c=0;for(;s;)c>8?(c-=8,l-=8,a>>>=8):l-c<n?(a|=t.view.getUint8(t.offset)<<l,t.offset++,l+=8):(r<i.length&&(i[r++]=a>>c&o),s--,c+=n);return r}function UE(t,e,n,i){const r=uP(n,i),s=new Uint8Array(e*r);for(let o=0;o<r;o++)for(let a=0;a<e;a++)s[a*r+o]=t.view.getUint8(t.offset++);if(n==="FLOAT")return new Float32Array(s.buffer);if(n==="DOUBLE")return new Float64Array(s.buffer);if(n==="INT32")return new Int32Array(s.buffer);if(n==="INT64")return new BigInt64Array(s.buffer);if(n==="FIXED_LEN_BYTE_ARRAY"){const o=new Array(e);for(let a=0;a<e;a++)o[a]=s.subarray(a*r,(a+1)*r);return o}throw new Error(`parquet byte_stream_split unsupported type: ${n}`)}function uP(t,e){switch(t){case"INT32":case"FLOAT":return 4;case"INT64":case"DOUBLE":return 8;case"FIXED_LEN_BYTE_ARRAY":if(!e)throw new Error("parquet byteWidth missing type_length");return e;default:throw new Error(`parquet unsupported type: ${t}`)}}function oh(t,e,n,i){if(n===0)return[];if(e==="BOOLEAN")return AP(t,n);if(e==="INT32")return hP(t,n);if(e==="INT64")return dP(t,n);if(e==="INT96")return gP(t,n);if(e==="FLOAT")return pP(t,n);if(e==="DOUBLE")return mP(t,n);if(e==="BYTE_ARRAY")return wP(t,n);if(e==="FIXED_LEN_BYTE_ARRAY"){if(!i)throw new Error("parquet missing fixed length");return yP(t,n,i)}else throw new Error(`parquet unhandled type: ${e}`)}function AP(t,e){const n=new Array(e);for(let i=0;i<e;i++){const r=t.offset+(i/8|0),s=i%8,o=t.view.getUint8(r);n[i]=(o&1<<s)!==0}return t.offset+=Math.ceil(e/8),n}function hP(t,e){const n=(t.view.byteOffset+t.offset)%4?new Int32Array(jc(t.view.buffer,t.view.byteOffset+t.offset,e*4)):new Int32Array(t.view.buffer,t.view.byteOffset+t.offset,e);return t.offset+=e*4,n}function dP(t,e){const n=(t.view.byteOffset+t.offset)%8?new BigInt64Array(jc(t.view.buffer,t.view.byteOffset+t.offset,e*8)):new BigInt64Array(t.view.buffer,t.view.byteOffset+t.offset,e);return t.offset+=e*8,n}function gP(t,e){const n=new Array(e);for(let i=0;i<e;i++){const r=t.view.getBigInt64(t.offset+i*12,!0),s=t.view.getInt32(t.offset+i*12+8,!0);n[i]=BigInt(s)<<64n|r}return t.offset+=e*12,n}function pP(t,e){const n=(t.view.byteOffset+t.offset)%4?new Float32Array(jc(t.view.buffer,t.view.byteOffset+t.offset,e*4)):new Float32Array(t.view.buffer,t.view.byteOffset+t.offset,e);return t.offset+=e*4,n}function mP(t,e){const n=(t.view.byteOffset+t.offset)%8?new Float64Array(jc(t.view.buffer,t.view.byteOffset+t.offset,e*8)):new Float64Array(t.view.buffer,t.view.byteOffset+t.offset,e);return t.offset+=e*8,n}function wP(t,e){const n=new Array(e);for(let i=0;i<e;i++){const r=t.view.getUint32(t.offset,!0);t.offset+=4,n[i]=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,r),t.offset+=r}return n}function yP(t,e,n){const i=new Array(e);for(let r=0;r<e;r++)i[r]=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,n),t.offset+=n;return i}function jc(t,e,n){const i=new ArrayBuffer(n);return new Uint8Array(i).set(new Uint8Array(t,e,n)),i}const CP=[0,255,65535,16777215,4294967295];function _E(t,e,n,i,r){for(let s=0;s<r;s++)n[i+s]=t[e+s]}function EP(t,e){const n=t.byteLength,i=e.byteLength;let r=0,s=0;for(;r<n;){const o=t[r];if(r++,o<128)break}if(i&&r>=n)throw new Error("invalid snappy length header");for(;r<n;){const o=t[r];let a=0;if(r++,r>=n)throw new Error("missing eof marker");if((o&3)===0){let l=(o>>>2)+1;if(l>60){if(r+3>=n)throw new Error("snappy error literal pos + 3 >= inputLength");const c=l-60;l=t[r]+(t[r+1]<<8)+(t[r+2]<<16)+(t[r+3]<<24),l=(l&CP[c])+1,r+=c}if(r+l>n)throw new Error("snappy error literal exceeds input length");_E(t,r,e,s,l),r+=l,s+=l}else{let l=0;switch(o&3){case 1:a=(o>>>2&7)+4,l=t[r]+(o>>>5<<8),r++;break;case 2:if(n<=r+1)throw new Error("snappy error end of input");a=(o>>>2)+1,l=t[r]+(t[r+1]<<8),r+=2;break;case 3:if(n<=r+3)throw new Error("snappy error end of input");a=(o>>>2)+1,l=t[r]+(t[r+1]<<8)+(t[r+2]<<16)+(t[r+3]<<24),r+=4;break}if(l===0||isNaN(l))throw new Error(`invalid offset ${l} pos ${r} inputLength ${n}`);if(l>s)throw new Error("cannot copy from before start of buffer");_E(e,s-l,e,s,a),s+=a}}if(s!==i)throw new Error("premature end of input")}function IP(t,e,{type:n,element:i,schemaPath:r}){const s=new DataView(t.buffer,t.byteOffset,t.byteLength),o={view:s,offset:0};let a;const l=bP(o,e,r),{definitionLevels:c,numNulls:f}=xP(o,e,r),u=e.num_values-f;if(e.encoding==="PLAIN")a=oh(o,n,u,i.type_length);else if(e.encoding==="PLAIN_DICTIONARY"||e.encoding==="RLE_DICTIONARY"||e.encoding==="RLE"){const h=n==="BOOLEAN"?1:s.getUint8(o.offset++);h?(a=new Array(u),n==="BOOLEAN"?(Hn(o,h,a),a=a.map(A=>!!A)):Hn(o,h,a,s.byteLength-o.offset)):a=new Uint8Array(u)}else if(e.encoding==="BYTE_STREAM_SPLIT")a=UE(o,u,n,i.type_length);else if(e.encoding==="DELTA_BINARY_PACKED")a=n==="INT32"?new Int32Array(u):new BigInt64Array(u),bo(o,u,a);else if(e.encoding==="DELTA_LENGTH_BYTE_ARRAY")a=new Array(u),OE(o,u,a);else throw new Error(`parquet unsupported encoding: ${e.encoding}`);return{definitionLevels:c,repetitionLevels:l,dataPage:a}}function bP(t,e,n){if(n.length>1){const i=xE(n);if(i){const r=new Array(e.num_values);return Hn(t,Kc(i),r),r}}return[]}function xP(t,e,n){const i=eh(n);if(!i)return{definitionLevels:[],numNulls:0};const r=new Array(e.num_values);Hn(t,Kc(i),r);let s=e.num_values;for(const o of r)o===i&&s--;return s===0&&(r.length=0),{definitionLevels:r,numNulls:s}}function ah(t,e,n,i){let r;const s=i?.[n];if(n==="UNCOMPRESSED")r=t;else if(s)r=s(t,e);else if(n==="SNAPPY")r=new Uint8Array(e),EP(t,r);else throw new Error(`parquet unsupported compression codec: ${n}`);if(r?.length!==e)throw new Error(`parquet decompressed page length ${r?.length} does not match header ${e}`);return r}function BP(t,e,n){const r={view:new DataView(t.buffer,t.byteOffset,t.byteLength),offset:0},{type:s,element:o,schemaPath:a,codec:l,compressors:c}=n,f=e.data_page_header_v2;if(!f)throw new Error("parquet data page header v2 is undefined");const u=vP(r,f,a);r.offset=f.repetition_levels_byte_length;const h=SP(r,f,a),A=e.uncompressed_page_size-f.definition_levels_byte_length-f.repetition_levels_byte_length;let d=t.subarray(r.offset);f.is_compressed!==!1&&(d=ah(d,A,l,c));const g=new DataView(d.buffer,d.byteOffset,d.byteLength),m={view:g,offset:0};let p;const w=f.num_values-f.num_nulls;if(f.encoding==="PLAIN")p=oh(m,s,w,o.type_length);else if(f.encoding==="RLE")p=new Array(w),Hn(m,1,p),p=p.map(C=>!!C);else if(f.encoding==="PLAIN_DICTIONARY"||f.encoding==="RLE_DICTIONARY"){const C=g.getUint8(m.offset++);p=new Array(w),Hn(m,C,p,A-1)}else if(f.encoding==="DELTA_BINARY_PACKED")p=s==="INT32"?new Int32Array(w):new BigInt64Array(w),bo(m,w,p);else if(f.encoding==="DELTA_LENGTH_BYTE_ARRAY")p=new Array(w),OE(m,w,p);else if(f.encoding==="DELTA_BYTE_ARRAY")p=new Array(w),cP(m,w,p);else if(f.encoding==="BYTE_STREAM_SPLIT")p=UE(m,w,s,o.type_length);else throw new Error(`parquet unsupported encoding: ${f.encoding}`);return{definitionLevels:h,repetitionLevels:u,dataPage:p}}function vP(t,e,n){const i=xE(n);if(!i)return[];const r=new Array(e.num_values);return Hn(t,Kc(i),r,e.repetition_levels_byte_length),r}function SP(t,e,n){const i=eh(n);if(i){const r=new Array(e.num_values);return Hn(t,Kc(i),r,e.definition_levels_byte_length),r}}function GE(t,{groupStart:e,selectStart:n,selectEnd:i},r,s){const{pathInSchema:o,schemaPath:a}=r,l=BE(a),c=[];let f,u,h=0,A=0;const d=s&&(()=>{u&&s({pathInSchema:o,columnData:u,rowStart:e+h-u.length,rowEnd:e+h})});for(;(l?h<i:t.offset<t.view.byteLength-1)&&!(t.offset>=t.view.byteLength-1);){const g=QP(t);if(g.type==="DICTIONARY_PAGE"){const{data:m}=zE(t,g,r,f,void 0,0);m&&(f=yE(m,r))}else{const m=u?.length||0,p=zE(t,g,r,f,u,n-h);p.skipped?(c.length||(A+=p.skipped),h+=p.skipped):p.data&&u===p.data?h+=p.data.length-m:p.data&&p.data.length&&(d?.(),c.push(p.data),h+=p.data.length,u=p.data)}}return d?.(),{data:c,skipped:A}}function zE(t,e,n,i,r,s){const{type:o,element:a,schemaPath:l,codec:c,compressors:f}=n,u=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,e.compressed_page_size);if(t.offset+=e.compressed_page_size,e.type==="DATA_PAGE"){const h=e.data_page_header;if(!h)throw new Error("parquet data page header is undefined");if(s>h.num_values&&BE(l))return{skipped:h.num_values};const A=ah(u,Number(e.uncompressed_page_size),c,f),{definitionLevels:d,repetitionLevels:g,dataPage:m}=IP(A,h,n),p=wE(m,i,h.encoding,n),w=Array.isArray(r)?r:[];return{skipped:0,data:TE(w,d,g,p,l)}}else if(e.type==="DATA_PAGE_V2"){const h=e.data_page_header_v2;if(!h)throw new Error("parquet data page header v2 is undefined");if(s>h.num_rows)return{skipped:h.num_values};const{definitionLevels:A,repetitionLevels:d,dataPage:g}=BP(u,e,n),m=wE(g,i,h.encoding,n),p=Array.isArray(r)?r:[];return{skipped:0,data:TE(p,A,d,m,l)}}else if(e.type==="DICTIONARY_PAGE"){const h=e.dictionary_page_header;if(!h)throw new Error("parquet dictionary page header is undefined");const A=ah(u,Number(e.uncompressed_page_size),c,f),d={view:new DataView(A.buffer,A.byteOffset,A.byteLength),offset:0};return{skipped:0,data:oh(d,o,h.num_values,a.type_length)}}else throw new Error(`parquet unsupported page type: ${e.type}`)}function QP(t){const e=th(t),n=gE[e.field_1],i=e.field_2,r=e.field_3,s=e.field_4,o=e.field_5&&{num_values:e.field_5.field_1,encoding:ki[e.field_5.field_2],definition_level_encoding:ki[e.field_5.field_3],repetition_level_encoding:ki[e.field_5.field_4],statistics:e.field_5.field_5&&{max:e.field_5.field_5.field_1,min:e.field_5.field_5.field_2,null_count:e.field_5.field_5.field_3,distinct_count:e.field_5.field_5.field_4,max_value:e.field_5.field_5.field_5,min_value:e.field_5.field_5.field_6}},a=e.field_6,l=e.field_7&&{num_values:e.field_7.field_1,encoding:ki[e.field_7.field_2],is_sorted:e.field_7.field_3},c=e.field_8&&{num_values:e.field_8.field_1,num_nulls:e.field_8.field_2,num_rows:e.field_8.field_3,encoding:ki[e.field_8.field_4],definition_levels_byte_length:e.field_8.field_5,repetition_levels_byte_length:e.field_8.field_6,is_compressed:e.field_8.field_7===void 0?!0:e.field_8.field_7,statistics:e.field_8.field_8};return{type:n,uncompressed_page_size:i,compressed_page_size:r,crc:s,data_page_header:o,index_page_header:a,dictionary_page_header:l,data_page_header_v2:c}}function DP(t){const e=th(t);return{page_locations:e.field_1.map(kP),unencoded_byte_array_data_bytes:e.field_2}}function kP(t){return{offset:t.field_1,compressed_page_size:t.field_2,first_row_index:t.field_3}}function FP(t,{metadata:e},n){const{file:i,compressors:r,utf8:s}=t,o=[],a={...zc,...t.parsers};for(const l of n.chunks){const{columnMetadata:c}=l,f=bE(e.schema,c.path_in_schema),u={pathInSchema:c.path_in_schema,type:c.type,element:f[f.length-1].element,schemaPath:f,codec:c.codec,parsers:a,compressors:r,utf8:s};if(!("offsetIndex"in l)){o.push({pathInSchema:c.path_in_schema,data:Promise.resolve(i.slice(l.range.startByte,l.range.endByte)).then(h=>{const A={view:new DataView(h),offset:0};return GE(A,n,u,t.onPage)})});continue}o.push({pathInSchema:c.path_in_schema,data:Promise.resolve(i.slice(l.offsetIndex.startByte,l.offsetIndex.endByte)).then(async h=>{const A=DP({view:new DataView(h),offset:0}),{selectStart:d,selectEnd:g}=n,m=A.page_locations;let p=NaN,w=NaN,C=0;for(let Q=0;Q<m.length;Q++){const v=m[Q],F=Number(v.first_row_index),R=Q+1<m.length?Number(m[Q+1].first_row_index):n.groupRows;F<g&&R>d&&(Number.isNaN(p)&&(p=Number(v.offset),C=F),w=Number(v.offset)+v.compressed_page_size)}const y=await i.slice(p,w),b={view:new DataView(y),offset:0},x=C?{...n,groupStart:n.groupStart+C,selectStart:n.selectStart-C,selectEnd:n.selectEnd-C}:n,{data:I,skipped:S}=GE(b,x,u,t.onPage);return{data:I,skipped:C+S}})})}return{groupStart:n.groupStart,groupRows:n.groupRows,asyncColumns:o}}function RP(t,e,n){const{asyncColumns:i}=t;n={...zc,...n};const r=[];for(const s of e.children)if(s.children.length){const o=i.filter(c=>c.pathInSchema[0]===s.element.name);if(!o.length)continue;const a=new Map,l=Promise.all(o.map(c=>c.data.then(({data:f})=>{a.set(c.pathInSchema.join("."),eP(f))}))).then(()=>{Io(a,s,n);const c=a.get(s.path.join("."));if(!c)throw new Error("parquet column data not assembled");return{data:[c],skipped:0}});r.push({pathInSchema:s.path,data:l})}else{const o=i.find(a=>a.pathInSchema[0]===s.element.name);o&&r.push(o)}return{...t,asyncColumns:r}}const HE=new Map,NP=200;function MP(t){if(!t.metadata)throw new Error("parquet requires metadata");const e=nP(t);return t.file=iP(t.file,e),e.groups.map(n=>FP(t,e,n))}function TP(t){if(!t)return[];if(t.length===1)return t[0];let e=0;for(const r of t)e+=r.length;const n=Array(e);let i=0;for(const r of t){for(let s=0;s<r.length;s++)n[i+s]=r[s];i+=r.length}return n}function PP(t){const e=t.join(""),n=HE.get(e);if(n)return n;const i=t.map((s,o)=>JSON.stringify(s)+": columnData["+o+"][row - columnSkipped["+o+"]]").join(`,
|
|
841
|
+
${r}`);this.samples=s.slice(9)}parseInfo(e){const n={},i=e.includes("%"),r=e.split(";"),s=this.metadata.INFO,o=r.length;for(let a=0;a<o;a++){const l=r[a],c=l.indexOf("="),u=c===-1?l:l.slice(0,c),f=c===-1?void 0:l.slice(c+1),h=s[u]?.Type;if(h==="Flag")n[u]=!0;else if(!f)n[u]=!0;else{const A=h==="Integer"||h==="Float",d=f.split(","),g=d.length;if(i){const m=[];for(let p=0;p<g;p++){const w=d[p];if(w===".")m.push(void 0);else{const C=aL(w);m.push(A?Number(C):C)}}n[u]=m}else{const m=[];for(let p=0;p<g;p++){const w=d[p];w==="."?m.push(void 0):m.push(A?Number(w):w)}n[u]=m}}}return n}parseSamples(e,n){const i={};if(e){const r=n.split(" "),s=e.split(":"),o=this.metadata.FORMAT,a=[];for(let u=0;u<s.length;u++){const f=o[s[u]]?.Type;a.push(f==="Integer"||f==="Float")}const l=s.length,c=this.samples.length;for(let u=0;u<c;u++){const f=this.samples[u],h={},A=r[u],d=A.length;let g=0,m=0;for(let p=0;p<=d;p++)if(p===d||A[p]===":"){const w=A.slice(g,p);if(w===""||w===".")h[s[m]]=void 0;else{const C=w.split(","),y=[];if(a[m])for(let I=0;I<C.length;I++){const x=C[I];y.push(x==="."?void 0:+x)}else for(let I=0;I<C.length;I++){const x=C[I];y.push(x==="."?void 0:x)}h[s[m]]=y}if(g=p+1,m+=1,m>=l)break}i[f]=h}}return i}parseMetadata(e){const n=/^##(.+?)=(.*)/.exec(e.trim());if(!n)throw new Error(`Line is not a valid metadata line: ${e}`);const[i,r]=n.slice(1,3),s=i;if(r?.startsWith("<")){s in this.metadata||(this.metadata[s]={});const[o,a]=this.parseStructuredMetaVal(r);o?this.metadata[s][o]=a:this.metadata[s]=a}else this.metadata[s]=r}parseStructuredMetaVal(e){const n=oL(e),i=n.ID;return delete n.ID,"Number"in n&&(Number.isNaN(Number(n.Number))||(n.Number=Number(n.Number))),[i,n]}getMetadata(...e){let n=this.metadata;const i=e.length;for(let r=0;r<i;r++)if(n=n[e[r]],!n)return n;return n}parseLine(e){let n=0,i=0;for(;n<e.length&&i<9;)e[n]===" "&&(i+=1),n+=1;const r=i===9?n-1:n,s=e.slice(0,r).split(" "),o=e.slice(r+1),[a,l,c,u,f,h,A]=s,d=a,g=+l,m=c==="."?void 0:c.split(";"),p=u,w=f==="."?void 0:f.split(","),C=h==="."?void 0:+h,y=A==="."?void 0:A.split(";"),I=s[8];if(this.strict&&!s[7])throw new Error("no INFO field specified, must contain at least a '.' (turn off strict mode to allow)");const x=s[7]===void 0||s[7]==="."?{}:this.parseInfo(s[7]);return{CHROM:d,POS:g,ALT:w,INFO:x,REF:p,FILTER:y?.length===1&&y[0]==="PASS"?"PASS":y,ID:m,QUAL:C,FORMAT:I,SAMPLES:()=>this.parseSamples(s[8]??"",o),GENOTYPES:()=>iL(s[8]??"",o,this.samples)}}}const lL=Object.freeze(Object.defineProperty({__proto__:null,default:cL},Symbol.toStringTag,{value:"Module"})),jb=["BOOLEAN","INT32","INT64","INT96","FLOAT","DOUBLE","BYTE_ARRAY","FIXED_LEN_BYTE_ARRAY"],Ti=["PLAIN","GROUP_VAR_INT","PLAIN_DICTIONARY","RLE","BIT_PACKED","DELTA_BINARY_PACKED","DELTA_LENGTH_BYTE_ARRAY","DELTA_BYTE_ARRAY","RLE_DICTIONARY","BYTE_STREAM_SPLIT"],uL=["REQUIRED","OPTIONAL","REPEATED"],fL=["UTF8","MAP","MAP_KEY_VALUE","LIST","ENUM","DECIMAL","DATE","TIME_MILLIS","TIME_MICROS","TIMESTAMP_MILLIS","TIMESTAMP_MICROS","UINT_8","UINT_16","UINT_32","UINT_64","INT_8","INT_16","INT_32","INT_64","JSON","BSON","INTERVAL"],hL=["UNCOMPRESSED","SNAPPY","GZIP","LZO","BROTLI","LZ4","ZSTD","LZ4_RAW"],Wb=["DATA_PAGE","INDEX_PAGE","DICTIONARY_PAGE","DATA_PAGE_V2"],AL=["SPHERICAL","VINCENTY","THOMAS","ANDOYER","KARNEY"];function cA(t){const e=jc(t);if(e.type===1)return{type:"Point",coordinates:lA(t,e)};if(e.type===2)return{type:"LineString",coordinates:uA(t,e)};if(e.type===3)return{type:"Polygon",coordinates:Xb(t,e)};if(e.type===4){const n=[];for(let i=0;i<e.count;i++)n.push(lA(t,jc(t)));return{type:"MultiPoint",coordinates:n}}else if(e.type===5){const n=[];for(let i=0;i<e.count;i++)n.push(uA(t,jc(t)));return{type:"MultiLineString",coordinates:n}}else if(e.type===6){const n=[];for(let i=0;i<e.count;i++)n.push(Xb(t,jc(t)));return{type:"MultiPolygon",coordinates:n}}else if(e.type===7){const n=[];for(let i=0;i<e.count;i++)n.push(cA(t));return{type:"GeometryCollection",geometries:n}}else throw new Error(`Unsupported geometry type: ${e.type}`)}function jc(t){const{view:e}=t,n=e.getUint8(t.offset++)===1,i=e.getUint32(t.offset,n);t.offset+=4;const r=i%1e3,s=Math.floor(i/1e3);let o=0;r>1&&r<=7&&(o=e.getUint32(t.offset,n),t.offset+=4);let a=2;return s&&a++,s===3&&a++,{littleEndian:n,type:r,dim:a,count:o}}function lA(t,e){const n=[];for(let i=0;i<e.dim;i++){const r=t.view.getFloat64(t.offset,e.littleEndian);t.offset+=8,n.push(r)}return n}function uA(t,e){const n=[];for(let i=0;i<e.count;i++)n.push(lA(t,e));return n}function Xb(t,e){const{view:n}=t,i=[];for(let r=0;r<e.count;r++){const s=n.getUint32(t.offset,e.littleEndian);t.offset+=4,i.push(uA(t,{...e,count:s}))}return i}const Zb=new TextDecoder,Wc={timestampFromMilliseconds(t){return new Date(Number(t))},timestampFromMicroseconds(t){return new Date(Number(t/1000n))},timestampFromNanoseconds(t){return new Date(Number(t/1000000n))},dateFromDays(t){return new Date(t*864e5)},stringFromBytes(t){return t&&Zb.decode(t)},geometryFromBytes(t){return t&&cA({view:new DataView(t.buffer,t.byteOffset,t.byteLength),offset:0})},geographyFromBytes(t){return t&&cA({view:new DataView(t.buffer,t.byteOffset,t.byteLength),offset:0})}};function $b(t,e,n,i){if(e&&n.endsWith("_DICTIONARY")){let r=t;t instanceof Uint8Array&&!(e instanceof Uint8Array)&&(r=new e.constructor(t.length));for(let s=0;s<t.length;s++)r[s]=e[t[s]];return r}else return eE(t,i)}function eE(t,e){const{element:n,parsers:i,utf8:r=!0,schemaPath:s}=e,{type:o,converted_type:a,logical_type:l}=n;if(s?.some(u=>u.element.logical_type?.type==="VARIANT")&&o==="BYTE_ARRAY"&&a!=="UTF8"&&l?.type!=="STRING")return t;if(a==="DECIMAL"){const f=10**-(n.scale||0),h=new Array(t.length);for(let A=0;A<h.length;A++)t[A]instanceof Uint8Array?h[A]=tE(t[A])*f:h[A]=Number(t[A])*f;return h}if(!a&&o==="INT96")return Array.from(t).map(u=>i.timestampFromNanoseconds(dL(u)));if(a==="DATE")return Array.from(t).map(u=>i.dateFromDays(u));if(a==="TIMESTAMP_MILLIS")return Array.from(t).map(u=>i.timestampFromMilliseconds(u));if(a==="TIMESTAMP_MICROS")return Array.from(t).map(u=>i.timestampFromMicroseconds(u));if(a==="JSON")return t.map(u=>JSON.parse(Zb.decode(u)));if(a==="BSON")throw new Error("parquet bson not supported");if(a==="INTERVAL")throw new Error("parquet interval not supported");if(l?.type==="GEOMETRY")return t.map(u=>i.geometryFromBytes(u));if(l?.type==="GEOGRAPHY")return t.map(u=>i.geographyFromBytes(u));if(a==="UTF8"||l?.type==="STRING"||r&&o==="BYTE_ARRAY")return t.map(u=>i.stringFromBytes(u));if(a==="UINT_64"||l?.type==="INTEGER"&&l.bitWidth===64&&!l.isSigned){if(t instanceof BigInt64Array)return new BigUint64Array(t.buffer,t.byteOffset,t.length);const u=new BigUint64Array(t.length);for(let f=0;f<u.length;f++)u[f]=BigInt(t[f]);return u}if(a==="UINT_32"||l?.type==="INTEGER"&&l.bitWidth===32&&!l.isSigned){if(t instanceof Int32Array)return new Uint32Array(t.buffer,t.byteOffset,t.length);const u=new Uint32Array(t.length);for(let f=0;f<u.length;f++)u[f]=t[f];return u}if(l?.type==="FLOAT16")return Array.from(t).map(nE);if(l?.type==="TIMESTAMP"){const{unit:u}=l;let f=i.timestampFromMilliseconds;u==="MICROS"&&(f=i.timestampFromMicroseconds),u==="NANOS"&&(f=i.timestampFromNanoseconds);const h=new Array(t.length);for(let A=0;A<h.length;A++)h[A]=f(t[A]);return h}return t}function tE(t){if(!t.length)return 0;let e=0n;for(const i of t)e=e*256n+BigInt(i);const n=t.length*8;return e>=2n**BigInt(n-1)&&(e-=2n**BigInt(n)),Number(e)}function dL(t){const e=(t>>64n)-2440588n,n=t&0xffffffffffffffffn;return e*86400000000000n+n}function nE(t){if(!t)return;const e=t[1]<<8|t[0],n=e>>15?-1:1,i=e>>10&31,r=e&1023;return i===0?n*2**-14*(r/1024):i===31?r?NaN:n*(1/0):n*2**(i-15)*(1+r/1024)}function iE(t,e,n){const i=t[e],r=[];let s=1;if(i.num_children)for(;r.length<i.num_children;){const o=t[e+s],a=iE(t,e+s,[...n,o.name]);s+=a.count,r.push(a)}return{count:s,element:i,children:r,path:n}}function rE(t,e){let n=iE(t,0,[]);const i=[n];for(const r of e){const s=n.children.find(o=>o.element.name===r);if(!s)throw new Error(`parquet schema element not found: ${e}`);i.push(s),n=s}return i}function gL(t){const e=[];function n(i){if(i.children.length)for(const r of i.children)n(r);else e.push(i.path.join("."))}return n(t),e}function sE(t){let e=0;for(const{element:n}of t)n.repetition_type==="REPEATED"&&e++;return e}function fA(t){let e=0;for(const{element:n}of t.slice(1))n.repetition_type!=="REQUIRED"&&e++;return e}function pL(t){if(!t||t.element.converted_type!=="LIST"||t.children.length>1)return!1;const e=t.children[0];return!(e.children.length>1||e.element.repetition_type!=="REPEATED")}function mL(t){if(!t||t.element.converted_type!=="MAP"||t.children.length>1)return!1;const e=t.children[0];return!(e.children.length!==2||e.element.repetition_type!=="REPEATED"||e.children.find(r=>r.element.name==="key")?.element.repetition_type==="REPEATED"||e.children.find(r=>r.element.name==="value")?.element.repetition_type==="REPEATED")}function oE(t){if(t.length!==2)return!1;const[,e]=t;return!(e.element.repetition_type==="REPEATED"||e.children.length)}const et={STOP:0,TRUE:1,FALSE:2,BYTE:3,I16:4,I32:5,I64:6,DOUBLE:7,BINARY:8,LIST:9,STRUCT:12};function hA(t){let e=0;const n={};for(;t.offset<t.view.byteLength;){const[i,r,s]=cE(t,e);if(e=s,i===et.STOP)break;n[`field_${r}`]=Xc(t,i)}return n}function Xc(t,e){switch(e){case et.TRUE:return!0;case et.FALSE:return!1;case et.BYTE:return t.view.getInt8(t.offset++);case et.I16:case et.I32:return aE(t);case et.I64:return AA(t);case et.DOUBLE:{const n=t.view.getFloat64(t.offset,!0);return t.offset+=8,n}case et.BINARY:{const n=Pi(t),i=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,n);return t.offset+=n,i}case et.LIST:{const n=t.view.getUint8(t.offset++),i=n&15;let r=n>>4;r===15&&(r=Pi(t));const s=i===et.TRUE||i===et.FALSE,o=new Array(r);for(let a=0;a<r;a++)o[a]=s?Xc(t,et.BYTE)===1:Xc(t,i);return o}case et.STRUCT:{const n={};let i=0;for(;;){const[r,s,o]=cE(t,i);if(i=o,r===et.STOP)break;n[`field_${s}`]=Xc(t,r)}return n}default:throw new Error(`thrift unhandled type: ${e}`)}}function Pi(t){let e=0,n=0;for(;;){const i=t.view.getUint8(t.offset++);if(e|=(i&127)<<n,!(i&128))return e;n+=7}}function wL(t){let e=0n,n=0n;for(;;){const i=t.view.getUint8(t.offset++);if(e|=BigInt(i&127)<<n,!(i&128))return e;n+=7n}}function aE(t){const e=Pi(t);return e>>>1^-(e&1)}function AA(t){const e=wL(t);return e>>1n^-(e&1n)}function cE(t,e){const n=t.view.getUint8(t.offset++),i=n&15;if(i===et.STOP)return[0,0,e];const r=n>>4,s=r?e+r:aE(t);return[i,s,s]}function yL(t,e){const n=new Map,i=e?.find(({key:s})=>s==="geo")?.value,r=(i&&JSON.parse(i)?.columns)??{};for(const[s,o]of Object.entries(r)){if(o.encoding!=="WKB")continue;const a=o.edges==="spherical"?"GEOGRAPHY":"GEOMETRY",l=o.crs?.id??o.crs?.ids?.[0],c=l?`${l.authority}:${l.code.toString()}`:void 0;n.set(s,{type:a,crs:c})}for(let s=1;s<t.length;s++){const o=t[s],{logical_type:a,name:l,num_children:c,repetition_type:u,type:f}=o;if(c){s+=c;continue}f==="BYTE_ARRAY"&&a===void 0&&u!=="REPEATED"&&(o.logical_type=n.get(l))}}const CL=1<<19,bL=new TextDecoder;function Kt(t){return t&&bL.decode(t)}async function EL(t,{parsers:e,initialFetchSize:n=CL,geoparquet:i=!0}={}){if(!t||!(t.byteLength>=0))throw new Error("parquet expected AsyncBuffer");const r=Math.max(0,t.byteLength-n),s=await t.slice(r,t.byteLength),o=new DataView(s);if(o.getUint32(s.byteLength-4,!0)!==827474256)throw new Error("parquet file invalid (footer != PAR1)");const a=o.getUint32(s.byteLength-8,!0);if(a>t.byteLength-8)throw new Error(`parquet metadata length ${a} exceeds available buffer ${t.byteLength-8}`);if(a+8>n){const l=t.byteLength-a-8,c=await t.slice(l,r),u=new ArrayBuffer(a+8),f=new Uint8Array(u);return f.set(new Uint8Array(c)),f.set(new Uint8Array(s),r-l),lE(u,{parsers:e,geoparquet:i})}else return lE(s,{parsers:e,geoparquet:i})}function lE(t,{parsers:e,geoparquet:n=!0}={}){if(!(t instanceof ArrayBuffer))throw new Error("parquet expected ArrayBuffer");const i=new DataView(t);if(e={...Wc,...e},i.byteLength<8)throw new Error("parquet file is too short");if(i.getUint32(i.byteLength-4,!0)!==827474256)throw new Error("parquet file invalid (footer != PAR1)");const r=i.byteLength-8,s=i.getUint32(r,!0);if(s>i.byteLength-8)throw new Error(`parquet metadata length ${s} exceeds available buffer ${i.byteLength-8}`);const o=r-s,l=hA({view:i,offset:o}),c=l.field_1,u=l.field_2.map(m=>({type:jb[m.field_1],type_length:m.field_2,repetition_type:uL[m.field_3],name:Kt(m.field_4),num_children:m.field_5,converted_type:fL[m.field_6],scale:m.field_7,precision:m.field_8,field_id:m.field_9,logical_type:IL(m.field_10)})),f=u.filter(m=>m.type),h=l.field_3,A=l.field_4.map(m=>({columns:m.field_1.map((p,w)=>({file_path:Kt(p.field_1),file_offset:p.field_2,meta_data:p.field_3&&{type:jb[p.field_3.field_1],encodings:p.field_3.field_2?.map(C=>Ti[C]),path_in_schema:p.field_3.field_3.map(Kt),codec:hL[p.field_3.field_4],num_values:p.field_3.field_5,total_uncompressed_size:p.field_3.field_6,total_compressed_size:p.field_3.field_7,key_value_metadata:p.field_3.field_8?.map(C=>({key:Kt(C.field_1),value:Kt(C.field_2)})),data_page_offset:p.field_3.field_9,index_page_offset:p.field_3.field_10,dictionary_page_offset:p.field_3.field_11,statistics:xL(p.field_3.field_12,f[w],e),encoding_stats:p.field_3.field_13?.map(C=>({page_type:Wb[C.field_1],encoding:Ti[C.field_2],count:C.field_3})),bloom_filter_offset:p.field_3.field_14,bloom_filter_length:p.field_3.field_15,size_statistics:p.field_3.field_16&&{unencoded_byte_array_data_bytes:p.field_3.field_16.field_1,repetition_level_histogram:p.field_3.field_16.field_2,definition_level_histogram:p.field_3.field_16.field_3},geospatial_statistics:p.field_3.field_17&&{bbox:p.field_3.field_17.field_1&&{xmin:p.field_3.field_17.field_1.field_1,xmax:p.field_3.field_17.field_1.field_2,ymin:p.field_3.field_17.field_1.field_3,ymax:p.field_3.field_17.field_1.field_4,zmin:p.field_3.field_17.field_1.field_5,zmax:p.field_3.field_17.field_1.field_6,mmin:p.field_3.field_17.field_1.field_7,mmax:p.field_3.field_17.field_1.field_8},geospatial_types:p.field_3.field_17.field_2}},offset_index_offset:p.field_4,offset_index_length:p.field_5,column_index_offset:p.field_6,column_index_length:p.field_7,crypto_metadata:p.field_8,encrypted_column_metadata:p.field_9})),total_byte_size:m.field_2,num_rows:m.field_3,sorting_columns:m.field_4?.map(p=>({column_idx:p.field_1,descending:p.field_2,nulls_first:p.field_3})),file_offset:m.field_5,total_compressed_size:m.field_6,ordinal:m.field_7})),d=l.field_5?.map(m=>({key:Kt(m.field_1),value:Kt(m.field_2)})),g=Kt(l.field_6);return n&&yL(u,d),{version:c,schema:u,num_rows:h,row_groups:A,key_value_metadata:d,created_by:g,metadata_length:s}}function uE({schema:t}){return rE(t,[])[0]}function IL(t){return t?.field_1?{type:"STRING"}:t?.field_2?{type:"MAP"}:t?.field_3?{type:"LIST"}:t?.field_4?{type:"ENUM"}:t?.field_5?{type:"DECIMAL",scale:t.field_5.field_1,precision:t.field_5.field_2}:t?.field_6?{type:"DATE"}:t?.field_7?{type:"TIME",isAdjustedToUTC:t.field_7.field_1,unit:fE(t.field_7.field_2)}:t?.field_8?{type:"TIMESTAMP",isAdjustedToUTC:t.field_8.field_1,unit:fE(t.field_8.field_2)}:t?.field_10?{type:"INTEGER",bitWidth:t.field_10.field_1,isSigned:t.field_10.field_2}:t?.field_11?{type:"NULL"}:t?.field_12?{type:"JSON"}:t?.field_13?{type:"BSON"}:t?.field_14?{type:"UUID"}:t?.field_15?{type:"FLOAT16"}:t?.field_16?{type:"VARIANT",specification_version:t.field_16.field_1}:t?.field_17?{type:"GEOMETRY",crs:Kt(t.field_17.field_1)}:t?.field_18?{type:"GEOGRAPHY",crs:Kt(t.field_18.field_1),algorithm:AL[t.field_18.field_2]}:t}function fE(t){if(t.field_1)return"MILLIS";if(t.field_2)return"MICROS";if(t.field_3)return"NANOS";throw new Error("parquet time unit required")}function xL(t,e,n){return t&&{max:Zc(t.field_1,e,n),min:Zc(t.field_2,e,n),null_count:t.field_3,distinct_count:t.field_4,max_value:Zc(t.field_5,e,n),min_value:Zc(t.field_6,e,n),is_max_value_exact:t.field_7,is_min_value_exact:t.field_8}}function Zc(t,e,n){const{type:i,converted_type:r,logical_type:s}=e;if(t===void 0)return t;if(i==="BOOLEAN")return t[0]===1;if(i==="BYTE_ARRAY")return n.stringFromBytes(t);const o=new DataView(t.buffer,t.byteOffset,t.byteLength);return i==="FLOAT"&&o.byteLength===4?o.getFloat32(0,!0):i==="DOUBLE"&&o.byteLength===8?o.getFloat64(0,!0):i==="INT32"&&r==="DATE"?n.dateFromDays(o.getInt32(0,!0)):i==="INT64"&&r==="TIMESTAMP_MILLIS"?n.timestampFromMilliseconds(o.getBigInt64(0,!0)):i==="INT64"&&r==="TIMESTAMP_MICROS"?n.timestampFromMicroseconds(o.getBigInt64(0,!0)):i==="INT64"&&s?.type==="TIMESTAMP"&&s?.unit==="NANOS"?n.timestampFromNanoseconds(o.getBigInt64(0,!0)):i==="INT64"&&s?.type==="TIMESTAMP"&&s?.unit==="MICROS"?n.timestampFromMicroseconds(o.getBigInt64(0,!0)):i==="INT64"&&s?.type==="TIMESTAMP"?n.timestampFromMilliseconds(o.getBigInt64(0,!0)):i==="INT32"&&o.byteLength===4?o.getInt32(0,!0):i==="INT64"&&o.byteLength===8?o.getBigInt64(0,!0):r==="DECIMAL"?tE(t)*10**-(e.scale||0):s?.type==="FLOAT16"?nE(t):t}function hE(t,e){for(let i=0;i<e.length;i+=1e4)t.push(...e.slice(i,i+1e4))}function Yr(t,e,n=!0){if(n?t===e:t==e)return!0;if(t instanceof Uint8Array&&e instanceof Uint8Array)return Yr(Array.from(t),Array.from(e),n);if(!t||!e||typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!Yr(t[r],e[r],n))return!1;return!0}if(typeof t!="object")return!1;const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!1;for(const r of i)if(!Yr(t[r],e[r],n))return!1;return!0}function vL(t){if(!t)return[];if(t.length===1)return t[0];const e=[];for(const n of t)hE(e,n);return e}function dA({rowGroup:t,physicalColumns:e,filter:n,strict:i=!0}){if(!n)return!1;if("$and"in n&&Array.isArray(n.$and))return n.$and.some(r=>dA({rowGroup:t,physicalColumns:e,filter:r,strict:i}));if("$or"in n&&Array.isArray(n.$or))return n.$or.every(r=>dA({rowGroup:t,physicalColumns:e,filter:r,strict:i}));if("$nor"in n&&Array.isArray(n.$nor))return!1;for(const[r,s]of Object.entries(n)){const o=e.indexOf(r);if(o===-1)continue;const a=t.columns[o].meta_data?.statistics;if(!a)continue;const{min:l,max:c,min_value:u,max_value:f}=a,h=u!==void 0?u:l,A=f!==void 0?f:c;if(!(h===void 0||A===void 0)){for(const[d,g]of Object.entries(s||{}))if(d==="$gt"&&A<=g||d==="$gte"&&A<g||d==="$lt"&&h>=g||d==="$lte"&&h>g||d==="$eq"&&(g<h||g>A)||d==="$ne"&&Yr(h,A,i)&&Yr(h,g,i)||d==="$in"&&Array.isArray(g)&&g.every(m=>m<h||m>A)||d==="$nin"&&Array.isArray(g)&&Yr(h,A,i)&&g.includes(h))return!0}}return!1}const BL=1<<21;function SL({metadata:t,rowStart:e=0,rowEnd:n=1/0,columns:i,filter:r,filterStrict:s=!0,useOffsetIndex:o=!1}){if(!t)throw new Error("parquetPlan requires metadata");const a=[],l=[],c=[],u=gL(uE(t));let f=0;for(const h of t.row_groups){const A=Number(h.num_rows),d=f+A;if(A>0&&d>e&&f<n&&!dA({rowGroup:h,physicalColumns:u,filter:r,strict:s})){const g=[];for(const C of h.columns){const y=C.meta_data;if(C.file_path)throw new Error("parquet file_path not supported");if(!y)throw new Error("parquet column metadata is undefined");if(!i||i.includes(y.path_in_schema[0])){const I=y.dictionary_page_offset||y.data_page_offset,x=Number(I),E=Number(I+y.total_compressed_size);if(o&&C.offset_index_offset&&C.offset_index_length){const S=Number(C.offset_index_offset);g.push({columnMetadata:y,offsetIndex:{startByte:S,endByte:S+C.offset_index_length},bounds:{startByte:x,endByte:E}})}else g.push({columnMetadata:y,range:{startByte:x,endByte:E}})}}const m=Math.max(e-f,0),p=Math.min(n-f,A);a.push({chunks:g,rowGroup:h,groupStart:f,groupRows:A,selectStart:m,selectEnd:p});let w;for(const C of g)if("offsetIndex"in C)c.push(C.offsetIndex);else{const{range:y}=C;i?l.push(y):w&&y.endByte-w.startByte<=BL?w.endByte=y.endByte:(w&&l.push(w),w={...y})}w&&l.push(w)}f=d}return isFinite(n)||(n=f),l.push(...c),{metadata:t,rowStart:e,rowEnd:n,columns:i,fetches:l,groups:a}}function DL(t,{fetches:e}){const n=e.map(({startByte:i,endByte:r})=>t.slice(i,r));return{byteLength:t.byteLength,slice(i,r=t.byteLength){const s=e.findIndex(({startByte:o,endByte:a})=>o<=i&&r<=a);if(s<0)return t.slice(i,r);if(e[s].startByte!==i||e[s].endByte!==r){const o=i-e[s].startByte,a=r-e[s].startByte;return n[s]instanceof Promise?n[s].then(l=>l.slice(o,a)):n[s].slice(o,a)}else return n[s]}}}const gA=new TextDecoder,AE=new WeakMap;function dE(t,e=Wc){if(Array.isArray(t))return t.map(n=>dE(n,e));if(typeof t!="object")return t;if("metadata"in t){const n=QL(t.metadata),i=t.typed_value&&$c(t.typed_value,n,e),r=t.value&&Bo(el(t.value),n,e);return i&&r?{...r,...i}:i??r}return t}function $c(t,e,n){if(t&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Uint8Array)){if("typed_value"in t)return $c(t.typed_value,e,n);if("value"in t&&t.value instanceof Uint8Array)return Bo(el(t.value),e,n);const i={};for(const[r,s]of Object.entries(t))i[r]=$c(s,e,n);return i}return t instanceof Uint8Array?Bo(el(t),e,n):Array.isArray(t)?t.map(i=>$c(i,e,n)):t}function el(t){return{view:new DataView(t.buffer,t.byteOffset,t.byteLength),offset:0}}function QL(t){let e=AE.get(t.buffer);e||(e=new Map,AE.set(t.buffer,e));const n=`${t.byteOffset}:${t.byteLength}`,i=e.get(n);if(i)return i;const r=el(t),s=r.view.getUint8(r.offset++),o=s&15;if(o!==1)throw new Error(`parquet unsupported variant metadata version: ${o}`);const a=(s>>4&1)===1,l=(s>>6&3)+1,c=Li(r,l),u=new Array(c+1);for(let d=0;d<u.length;d++)u[d]=Li(r,l);const f=r.offset,h=new Array(c);for(let d=0;d<c;d++){const g=u[d],m=u[d+1],p=new Uint8Array(t.buffer,t.byteOffset+f+g,m-g);h[d]=gA.decode(p)}const A={dictionary:h,sorted:a};return e.set(n,A),A}function Li(t,e){let n=0;for(let i=0;i<e;i++)n|=t.view.getUint8(t.offset+i)<<i*8;return t.offset+=e,n}function Bo(t,e,n){const i=t.view.getUint8(t.offset++),r=i&3,s=i>>2;if(r===0)return kL(t,s,n);if(r===2)return RL(t,s,e,n);if(r===3)return FL(t,s,e,n);const o=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,s);return t.offset+=s,gA.decode(o)}function kL(t,e,n){switch(e){case 0:return null;case 1:return!0;case 2:return!1;case 3:{const i=t.view.getInt8(t.offset);return t.offset+=1,i}case 4:{const i=t.view.getInt16(t.offset,!0);return t.offset+=2,i}case 5:{const i=t.view.getInt32(t.offset,!0);return t.offset+=4,i}case 6:{const i=t.view.getBigInt64(t.offset,!0);return t.offset+=8,i}case 7:{const i=t.view.getFloat64(t.offset,!0);return t.offset+=8,i}case 8:return pA(t,4);case 9:return pA(t,8);case 10:return pA(t,16);case 11:{const i=t.view.getInt32(t.offset,!0);return t.offset+=4,n.dateFromDays(i)}case 12:case 13:{const i=t.view.getBigInt64(t.offset,!0);return t.offset+=8,n.timestampFromMicroseconds(i)}case 14:{const i=t.view.getFloat32(t.offset,!0);return t.offset+=4,i}case 15:return gE(t);case 16:{const i=gE(t);return gA.decode(i)}case 17:{const i=t.view.getBigInt64(t.offset,!0);return t.offset+=8,i}case 18:case 19:{const i=t.view.getBigInt64(t.offset,!0);return t.offset+=8,n.timestampFromNanoseconds(i)}case 20:{const i=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,16);t.offset+=16;const r=Array.from(i,s=>s.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}default:throw new Error(`parquet unsupported variant primitive type: ${e}`)}}function RL(t,e,n,i){const r=(e&3)+1,s=(e>>2&3)+1,a=e>>4&1?Li(t,4):t.view.getUint8(t.offset++),l=new Array(a);for(let f=0;f<a;f++)l[f]=Li(t,s);const c=new Array(a+1);for(let f=0;f<c.length;f++)c[f]=Li(t,r);const u={};for(let f=0;f<a;f++){const h=n.dictionary[l[f]],A={view:t.view,offset:t.offset+c[f]};u[h]=Bo(A,n,i)}return t.offset+=c[c.length-1],u}function FL(t,e,n,i){const r=e&3,s=e>>2&1,o=r+1,a=Li(t,s?4:1),l=new Array(a+1);for(let f=0;f<l.length;f++)l[f]=Li(t,o);const c=t.offset,u=new Array(a);for(let f=0;f<a;f++){const h={view:t.view,offset:c+l[f]};u[f]=Bo(h,n,i)}return t.offset=c+l[l.length-1],u}function pA(t,e){const n=t.view.getUint8(t.offset);t.offset+=1;let i;if(e===4)i=BigInt(t.view.getInt32(t.offset,!0)),t.offset+=4;else if(e===8)i=t.view.getBigInt64(t.offset,!0),t.offset+=8;else{const r=t.view.getBigUint64(t.offset,!0);i=t.view.getBigInt64(t.offset+8,!0)<<64n|r,t.offset+=16}return Number(i)*10**-n}function gE(t){const e=t.view.getUint32(t.offset,!0);t.offset+=4;const n=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,e);return t.offset+=e,n}function pE(t,e,n,i,r){const s=fA(r);if(!e?.length&&!n.length){if(!s||!i.length)return i;e=new Array(i.length).fill(s)}const o=e?.length||n.length,a=r.map(({element:d})=>d.repetition_type);let l=0;const c=[t];let u=t,f=0,h=0,A=0;if(n[0])for(;f<a.length-2&&A<n[0];)f++,a[f]!=="REQUIRED"&&(u=u.at(-1),c.push(u),h++),a[f]==="REPEATED"&&A++;for(let d=0;d<o;d++){const g=e?.length?e[d]:s,m=n[d];for(;f&&(m<A||a[f]!=="REPEATED");)a[f]!=="REQUIRED"&&(c.pop(),h--),a[f]==="REPEATED"&&A--,f--;for(u=c.at(-1);(f<a.length-2||a[f+1]==="REPEATED")&&(h<g||a[f+1]==="REQUIRED");){if(f++,a[f]!=="REQUIRED"){const p=[];u.push(p),u=p,c.push(p),h++}a[f]==="REPEATED"&&A++}g===s?u.push(i[l++]):f===a.length-2?u.push(null):u.push([])}if(!t.length)for(let d=0;d<s;d++){const g=[];u.push(g),u=g}return t}function So(t,e,n,i=0){const r=e.path.join("."),s=e.element.repetition_type==="OPTIONAL",o=s?i+1:i;if(pL(e)){let a=e.children[0],l=o;a.children.length===1&&(a=a.children[0],l++),So(t,a,n,l);const c=a.path.join("."),u=t.get(c);if(!u)throw new Error("parquet list column missing values");s&&tl(u,i),t.set(r,u),t.delete(c);return}if(mL(e)){const a=e.children[0].element.name;So(t,e.children[0].children[0],n,o+1),So(t,e.children[0].children[1],n,o+1);const l=t.get(`${r}.${a}.key`),c=t.get(`${r}.${a}.value`);if(!l)throw new Error("parquet map column missing keys");if(!c)throw new Error("parquet map column missing values");if(l.length!==c.length)throw new Error("parquet map column key/value length mismatch");const u=mE(l,c,o);s&&tl(u,i),t.delete(`${r}.${a}.key`),t.delete(`${r}.${a}.value`),t.set(r,u);return}if(e.children.length){const a=e.element.repetition_type==="REQUIRED"?i:i+1,l={};for(const u of e.children){So(t,u,n,a);const f=t.get(u.path.join("."));if(!f)throw new Error("parquet struct missing child data");l[u.element.name]=f}for(const u of e.children)t.delete(u.path.join("."));let c=wE(l,a);e.element.logical_type?.type==="VARIANT"&&(c=dE(c,n)),s&&tl(c,i),t.set(r,c)}}function tl(t,e){for(let n=0;n<t.length;n++)e?tl(t[n],e-1):t[n]=t[n][0]}function mE(t,e,n){const i=[];for(let r=0;r<t.length;r++)if(n)i.push(mE(t[r],e[r],n-1));else if(t[r]){const s={};for(let o=0;o<t[r].length;o++){const a=e[r][o];s[t[r][o]]=a===void 0?null:a}i.push(s)}else i.push(void 0);return i}function wE(t,e){const n=Object.keys(t),i=t[n[0]]?.length,r=[];for(let s=0;s<i;s++){const o={};for(const a of n){if(t[a].length!==i)throw new Error("parquet struct parsing error");o[a]=t[a][s]}e?r.push(wE(o,e-1)):r.push(o)}return r}function Do(t,e,n){const i=n instanceof Int32Array,r=Pi(t),s=Pi(t);Pi(t);let o=AA(t),a=0;n[a++]=i?Number(o):o;const l=r/s;for(;a<e;){const c=AA(t),u=new Uint8Array(s);for(let f=0;f<s;f++)u[f]=t.view.getUint8(t.offset++);for(let f=0;f<s&&a<e;f++){const h=BigInt(u[f]);if(h){let A=0n,d=l;const g=(1n<<h)-1n;for(;d&&a<e;){let m=BigInt(t.view.getUint8(t.offset))>>A&g;for(A+=h;A>=8;)A-=8n,t.offset++,A&&(m|=BigInt(t.view.getUint8(t.offset))<<h-A&g);const p=c+m;o+=p,n[a++]=i?Number(o):o,d--}d&&(t.offset+=Math.ceil((d*Number(h)+Number(A))/8))}else for(let A=0;A<l&&a<e;A++)o+=c,n[a++]=i?Number(o):o}}}function yE(t,e,n){const i=new Int32Array(e);Do(t,e,i);for(let r=0;r<e;r++)n[r]=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,i[r]),t.offset+=i[r]}function NL(t,e,n){const i=new Int32Array(e);Do(t,e,i);const r=new Int32Array(e);Do(t,e,r);for(let s=0;s<e;s++){const o=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,r[s]);i[s]?(n[s]=new Uint8Array(i[s]+r[s]),n[s].set(n[s-1].subarray(0,i[s])),n[s].set(o,i[s])):n[s]=o,t.offset+=r[s]}}function nl(t){return 32-Math.clz32(t)}function Kn(t,e,n,i){i===void 0&&(i=t.view.getUint32(t.offset,!0),t.offset+=4);const r=t.offset;let s=0;for(;s<n.length;){const o=Pi(t);if(o&1)s=TL(t,o,e,n,s);else{const a=o>>>1;ML(t,a,e,n,s),s+=a}}t.offset=r+i}function ML(t,e,n,i,r){const s=n+7>>3;let o=0;for(let a=0;a<s;a++)o|=t.view.getUint8(t.offset++)<<(a<<3);for(let a=0;a<e;a++)i[r+a]=o}function TL(t,e,n,i,r){let s=e>>1<<3;const o=(1<<n)-1;let a=0;if(t.offset<t.view.byteLength)a=t.view.getUint8(t.offset++);else if(o)throw new Error(`parquet bitpack offset ${t.offset} out of range`);let l=8,c=0;for(;s;)c>8?(c-=8,l-=8,a>>>=8):l-c<n?(a|=t.view.getUint8(t.offset)<<l,t.offset++,l+=8):(r<i.length&&(i[r++]=a>>c&o),s--,c+=n);return r}function CE(t,e,n,i){const r=PL(n,i),s=new Uint8Array(e*r);for(let o=0;o<r;o++)for(let a=0;a<e;a++)s[a*r+o]=t.view.getUint8(t.offset++);if(n==="FLOAT")return new Float32Array(s.buffer);if(n==="DOUBLE")return new Float64Array(s.buffer);if(n==="INT32")return new Int32Array(s.buffer);if(n==="INT64")return new BigInt64Array(s.buffer);if(n==="FIXED_LEN_BYTE_ARRAY"){const o=new Array(e);for(let a=0;a<e;a++)o[a]=s.subarray(a*r,(a+1)*r);return o}throw new Error(`parquet byte_stream_split unsupported type: ${n}`)}function PL(t,e){switch(t){case"INT32":case"FLOAT":return 4;case"INT64":case"DOUBLE":return 8;case"FIXED_LEN_BYTE_ARRAY":if(!e)throw new Error("parquet byteWidth missing type_length");return e;default:throw new Error(`parquet unsupported type: ${t}`)}}function mA(t,e,n,i){if(n===0)return[];if(e==="BOOLEAN")return LL(t,n);if(e==="INT32")return OL(t,n);if(e==="INT64")return UL(t,n);if(e==="INT96")return _L(t,n);if(e==="FLOAT")return zL(t,n);if(e==="DOUBLE")return GL(t,n);if(e==="BYTE_ARRAY")return HL(t,n);if(e==="FIXED_LEN_BYTE_ARRAY"){if(!i)throw new Error("parquet missing fixed length");return YL(t,n,i)}else throw new Error(`parquet unhandled type: ${e}`)}function LL(t,e){const n=new Array(e);for(let i=0;i<e;i++){const r=t.offset+(i/8|0),s=i%8,o=t.view.getUint8(r);n[i]=(o&1<<s)!==0}return t.offset+=Math.ceil(e/8),n}function OL(t,e){const n=(t.view.byteOffset+t.offset)%4?new Int32Array(il(t.view.buffer,t.view.byteOffset+t.offset,e*4)):new Int32Array(t.view.buffer,t.view.byteOffset+t.offset,e);return t.offset+=e*4,n}function UL(t,e){const n=(t.view.byteOffset+t.offset)%8?new BigInt64Array(il(t.view.buffer,t.view.byteOffset+t.offset,e*8)):new BigInt64Array(t.view.buffer,t.view.byteOffset+t.offset,e);return t.offset+=e*8,n}function _L(t,e){const n=new Array(e);for(let i=0;i<e;i++){const r=t.view.getBigInt64(t.offset+i*12,!0),s=t.view.getInt32(t.offset+i*12+8,!0);n[i]=BigInt(s)<<64n|r}return t.offset+=e*12,n}function zL(t,e){const n=(t.view.byteOffset+t.offset)%4?new Float32Array(il(t.view.buffer,t.view.byteOffset+t.offset,e*4)):new Float32Array(t.view.buffer,t.view.byteOffset+t.offset,e);return t.offset+=e*4,n}function GL(t,e){const n=(t.view.byteOffset+t.offset)%8?new Float64Array(il(t.view.buffer,t.view.byteOffset+t.offset,e*8)):new Float64Array(t.view.buffer,t.view.byteOffset+t.offset,e);return t.offset+=e*8,n}function HL(t,e){const n=new Array(e);for(let i=0;i<e;i++){const r=t.view.getUint32(t.offset,!0);t.offset+=4,n[i]=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,r),t.offset+=r}return n}function YL(t,e,n){const i=new Array(e);for(let r=0;r<e;r++)i[r]=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,n),t.offset+=n;return i}function il(t,e,n){const i=new ArrayBuffer(n);return new Uint8Array(i).set(new Uint8Array(t,e,n)),i}const VL=[0,255,65535,16777215,4294967295];function bE(t,e,n,i,r){for(let s=0;s<r;s++)n[i+s]=t[e+s]}function JL(t,e){const n=t.byteLength,i=e.byteLength;let r=0,s=0;for(;r<n;){const o=t[r];if(r++,o<128)break}if(i&&r>=n)throw new Error("invalid snappy length header");for(;r<n;){const o=t[r];let a=0;if(r++,r>=n)throw new Error("missing eof marker");if((o&3)===0){let l=(o>>>2)+1;if(l>60){if(r+3>=n)throw new Error("snappy error literal pos + 3 >= inputLength");const c=l-60;l=t[r]+(t[r+1]<<8)+(t[r+2]<<16)+(t[r+3]<<24),l=(l&VL[c])+1,r+=c}if(r+l>n)throw new Error("snappy error literal exceeds input length");bE(t,r,e,s,l),r+=l,s+=l}else{let l=0;switch(o&3){case 1:a=(o>>>2&7)+4,l=t[r]+(o>>>5<<8),r++;break;case 2:if(n<=r+1)throw new Error("snappy error end of input");a=(o>>>2)+1,l=t[r]+(t[r+1]<<8),r+=2;break;case 3:if(n<=r+3)throw new Error("snappy error end of input");a=(o>>>2)+1,l=t[r]+(t[r+1]<<8)+(t[r+2]<<16)+(t[r+3]<<24),r+=4;break}if(l===0||isNaN(l))throw new Error(`invalid offset ${l} pos ${r} inputLength ${n}`);if(l>s)throw new Error("cannot copy from before start of buffer");bE(e,s-l,e,s,a),s+=a}}if(s!==i)throw new Error("premature end of input")}function qL(t,e,{type:n,element:i,schemaPath:r}){const s=new DataView(t.buffer,t.byteOffset,t.byteLength),o={view:s,offset:0};let a;const l=KL(o,e,r),{definitionLevels:c,numNulls:u}=jL(o,e,r),f=e.num_values-u;if(e.encoding==="PLAIN")a=mA(o,n,f,i.type_length);else if(e.encoding==="PLAIN_DICTIONARY"||e.encoding==="RLE_DICTIONARY"||e.encoding==="RLE"){const h=n==="BOOLEAN"?1:s.getUint8(o.offset++);h?(a=new Array(f),n==="BOOLEAN"?(Kn(o,h,a),a=a.map(A=>!!A)):Kn(o,h,a,s.byteLength-o.offset)):a=new Uint8Array(f)}else if(e.encoding==="BYTE_STREAM_SPLIT")a=CE(o,f,n,i.type_length);else if(e.encoding==="DELTA_BINARY_PACKED")a=n==="INT32"?new Int32Array(f):new BigInt64Array(f),Do(o,f,a);else if(e.encoding==="DELTA_LENGTH_BYTE_ARRAY")a=new Array(f),yE(o,f,a);else throw new Error(`parquet unsupported encoding: ${e.encoding}`);return{definitionLevels:c,repetitionLevels:l,dataPage:a}}function KL(t,e,n){if(n.length>1){const i=sE(n);if(i){const r=new Array(e.num_values);return Kn(t,nl(i),r),r}}return[]}function jL(t,e,n){const i=fA(n);if(!i)return{definitionLevels:[],numNulls:0};const r=new Array(e.num_values);Kn(t,nl(i),r);let s=e.num_values;for(const o of r)o===i&&s--;return s===0&&(r.length=0),{definitionLevels:r,numNulls:s}}function wA(t,e,n,i){let r;const s=i?.[n];if(n==="UNCOMPRESSED")r=t;else if(s)r=s(t,e);else if(n==="SNAPPY")r=new Uint8Array(e),JL(t,r);else throw new Error(`parquet unsupported compression codec: ${n}`);if(r?.length!==e)throw new Error(`parquet decompressed page length ${r?.length} does not match header ${e}`);return r}function WL(t,e,n){const r={view:new DataView(t.buffer,t.byteOffset,t.byteLength),offset:0},{type:s,element:o,schemaPath:a,codec:l,compressors:c}=n,u=e.data_page_header_v2;if(!u)throw new Error("parquet data page header v2 is undefined");const f=XL(r,u,a);r.offset=u.repetition_levels_byte_length;const h=ZL(r,u,a),A=e.uncompressed_page_size-u.definition_levels_byte_length-u.repetition_levels_byte_length;let d=t.subarray(r.offset);u.is_compressed!==!1&&(d=wA(d,A,l,c));const g=new DataView(d.buffer,d.byteOffset,d.byteLength),m={view:g,offset:0};let p;const w=u.num_values-u.num_nulls;if(u.encoding==="PLAIN")p=mA(m,s,w,o.type_length);else if(u.encoding==="RLE")p=new Array(w),Kn(m,1,p),p=p.map(C=>!!C);else if(u.encoding==="PLAIN_DICTIONARY"||u.encoding==="RLE_DICTIONARY"){const C=g.getUint8(m.offset++);p=new Array(w),Kn(m,C,p,A-1)}else if(u.encoding==="DELTA_BINARY_PACKED")p=s==="INT32"?new Int32Array(w):new BigInt64Array(w),Do(m,w,p);else if(u.encoding==="DELTA_LENGTH_BYTE_ARRAY")p=new Array(w),yE(m,w,p);else if(u.encoding==="DELTA_BYTE_ARRAY")p=new Array(w),NL(m,w,p);else if(u.encoding==="BYTE_STREAM_SPLIT")p=CE(m,w,s,o.type_length);else throw new Error(`parquet unsupported encoding: ${u.encoding}`);return{definitionLevels:h,repetitionLevels:f,dataPage:p}}function XL(t,e,n){const i=sE(n);if(!i)return[];const r=new Array(e.num_values);return Kn(t,nl(i),r,e.repetition_levels_byte_length),r}function ZL(t,e,n){const i=fA(n);if(i){const r=new Array(e.num_values);return Kn(t,nl(i),r,e.definition_levels_byte_length),r}}function EE(t,{groupStart:e,selectStart:n,selectEnd:i},r,s){const{pathInSchema:o,schemaPath:a}=r,l=oE(a),c=[];let u,f,h=0,A=0;const d=s&&(()=>{f&&s({pathInSchema:o,columnData:f,rowStart:e+h-f.length,rowEnd:e+h})});for(;(l?h<i:t.offset<t.view.byteLength-1)&&!(t.offset>=t.view.byteLength-1);){const g=$L(t);if(g.type==="DICTIONARY_PAGE"){const{data:m}=IE(t,g,r,u,void 0,0);m&&(u=eE(m,r))}else{const m=f?.length||0,p=IE(t,g,r,u,f,n-h);p.skipped?(c.length||(A+=p.skipped),h+=p.skipped):p.data&&f===p.data?h+=p.data.length-m:p.data&&p.data.length&&(d?.(),c.push(p.data),h+=p.data.length,f=p.data)}}return d?.(),{data:c,skipped:A}}function IE(t,e,n,i,r,s){const{type:o,element:a,schemaPath:l,codec:c,compressors:u}=n,f=new Uint8Array(t.view.buffer,t.view.byteOffset+t.offset,e.compressed_page_size);if(t.offset+=e.compressed_page_size,e.type==="DATA_PAGE"){const h=e.data_page_header;if(!h)throw new Error("parquet data page header is undefined");if(s>h.num_values&&oE(l))return{skipped:h.num_values};const A=wA(f,Number(e.uncompressed_page_size),c,u),{definitionLevels:d,repetitionLevels:g,dataPage:m}=qL(A,h,n),p=$b(m,i,h.encoding,n),w=Array.isArray(r)?r:[];return{skipped:0,data:pE(w,d,g,p,l)}}else if(e.type==="DATA_PAGE_V2"){const h=e.data_page_header_v2;if(!h)throw new Error("parquet data page header v2 is undefined");if(s>h.num_rows)return{skipped:h.num_values};const{definitionLevels:A,repetitionLevels:d,dataPage:g}=WL(f,e,n),m=$b(g,i,h.encoding,n),p=Array.isArray(r)?r:[];return{skipped:0,data:pE(p,A,d,m,l)}}else if(e.type==="DICTIONARY_PAGE"){const h=e.dictionary_page_header;if(!h)throw new Error("parquet dictionary page header is undefined");const A=wA(f,Number(e.uncompressed_page_size),c,u),d={view:new DataView(A.buffer,A.byteOffset,A.byteLength),offset:0};return{skipped:0,data:mA(d,o,h.num_values,a.type_length)}}else throw new Error(`parquet unsupported page type: ${e.type}`)}function $L(t){const e=hA(t),n=Wb[e.field_1],i=e.field_2,r=e.field_3,s=e.field_4,o=e.field_5&&{num_values:e.field_5.field_1,encoding:Ti[e.field_5.field_2],definition_level_encoding:Ti[e.field_5.field_3],repetition_level_encoding:Ti[e.field_5.field_4],statistics:e.field_5.field_5&&{max:e.field_5.field_5.field_1,min:e.field_5.field_5.field_2,null_count:e.field_5.field_5.field_3,distinct_count:e.field_5.field_5.field_4,max_value:e.field_5.field_5.field_5,min_value:e.field_5.field_5.field_6}},a=e.field_6,l=e.field_7&&{num_values:e.field_7.field_1,encoding:Ti[e.field_7.field_2],is_sorted:e.field_7.field_3},c=e.field_8&&{num_values:e.field_8.field_1,num_nulls:e.field_8.field_2,num_rows:e.field_8.field_3,encoding:Ti[e.field_8.field_4],definition_levels_byte_length:e.field_8.field_5,repetition_levels_byte_length:e.field_8.field_6,is_compressed:e.field_8.field_7===void 0?!0:e.field_8.field_7,statistics:e.field_8.field_8};return{type:n,uncompressed_page_size:i,compressed_page_size:r,crc:s,data_page_header:o,index_page_header:a,dictionary_page_header:l,data_page_header_v2:c}}function e7(t){const e=hA(t);return{page_locations:e.field_1.map(t7),unencoded_byte_array_data_bytes:e.field_2}}function t7(t){return{offset:t.field_1,compressed_page_size:t.field_2,first_row_index:t.field_3}}function n7(t,{metadata:e},n){const{file:i,compressors:r,utf8:s}=t,o=[],a={...Wc,...t.parsers};for(const l of n.chunks){const{columnMetadata:c}=l,u=rE(e.schema,c.path_in_schema),f={pathInSchema:c.path_in_schema,type:c.type,element:u[u.length-1].element,schemaPath:u,codec:c.codec,parsers:a,compressors:r,utf8:s};if(!("offsetIndex"in l)){o.push({pathInSchema:c.path_in_schema,data:Promise.resolve(i.slice(l.range.startByte,l.range.endByte)).then(h=>{const A={view:new DataView(h),offset:0};return EE(A,n,f,t.onPage)})});continue}o.push({pathInSchema:c.path_in_schema,data:Promise.resolve(i.slice(l.offsetIndex.startByte,l.offsetIndex.endByte)).then(async h=>{const A=e7({view:new DataView(h),offset:0}),{selectStart:d,selectEnd:g}=n,m=A.page_locations;let p=NaN,w=NaN,C=0;for(let D=0;D<m.length;D++){const B=m[D],k=Number(B.first_row_index),F=D+1<m.length?Number(m[D+1].first_row_index):n.groupRows;k<g&&F>d&&(Number.isNaN(p)&&(p=Number(B.offset),C=k),w=Number(B.offset)+B.compressed_page_size)}const y=await i.slice(p,w),I={view:new DataView(y),offset:0},x=C?{...n,groupStart:n.groupStart+C,selectStart:n.selectStart-C,selectEnd:n.selectEnd-C}:n,{data:E,skipped:S}=EE(I,x,f,t.onPage);return{data:E,skipped:C+S}})})}return{groupStart:n.groupStart,groupRows:n.groupRows,asyncColumns:o}}function i7(t,e,n){const{asyncColumns:i}=t;n={...Wc,...n};const r=[];for(const s of e.children)if(s.children.length){const o=i.filter(c=>c.pathInSchema[0]===s.element.name);if(!o.length)continue;const a=new Map,l=Promise.all(o.map(c=>c.data.then(({data:u})=>{a.set(c.pathInSchema.join("."),vL(u))}))).then(()=>{So(a,s,n);const c=a.get(s.path.join("."));if(!c)throw new Error("parquet column data not assembled");return{data:[c],skipped:0}});r.push({pathInSchema:s.path,data:l})}else{const o=i.find(a=>a.pathInSchema[0]===s.element.name);o&&r.push(o)}return{...t,asyncColumns:r}}const xE=new Map,r7=200;function s7(t){if(!t.metadata)throw new Error("parquet requires metadata");const e=SL(t);return t.file=DL(t.file,e),e.groups.map(n=>n7(t,e,n))}function o7(t){if(!t)return[];if(t.length===1)return t[0];let e=0;for(const r of t)e+=r.length;const n=Array(e);let i=0;for(const r of t){for(let s=0;s<r.length;s++)n[i+s]=r[s];i+=r.length}return n}function a7(t){const e=t.join(""),n=xE.get(e);if(n)return n;const i=t.map((s,o)=>JSON.stringify(s)+": columnData["+o+"][row - columnSkipped["+o+"]]").join(`,
|
|
830
842
|
`),r=new Function("groupData","selectStart","selectCount","columnData","columnSkipped",`for (let selectRow = 0; selectRow < selectCount; selectRow++) {
|
|
831
843
|
const row = selectStart + selectRow;
|
|
832
844
|
groupData[selectRow] = {
|
|
833
845
|
`+i+`
|
|
834
846
|
};
|
|
835
847
|
}
|
|
836
|
-
return groupData;`);return
|
|
848
|
+
return groupData;`);return xE.set(e,r),r}function c7(t,e,n,i,r,s){for(let o=0;o<n;o++){const a=e+o,l={};for(let c=0;c<i.length;c++)l[i[c]]=r[c][a-s[c]];t[o]=l}return t}async function l7({asyncColumns:t},e,n){const i=await Promise.all(t.map(f=>f.data)),r=t.length,s=Array(r),o=Array(r),a=Array(r);for(let f=0;f<r;f++)s[f]=t[f].pathInSchema[0],o[f]=o7(i[f].data),a[f]=i[f].skipped;const l=n-e,c=Array(l);return r>r7?c7(c,e,l,s,o,a):a7(s)(c,e,l,o,a)}async function vE(t){if("rowFormat"in t)throw new Error('parquetRead supports only object rows; use rowFormat: "object" implicitly');if("filter"in t||"filterStrict"in t)throw new Error("parquetRead does not support filtering");t.metadata??=await EL(t.file,t);const{rowStart:e=0,rowEnd:n,onChunk:i,onComplete:r}=t,s=s7(t);if(!r&&!i){for(const{asyncColumns:l}of s)for(const{data:c}of l)await c;return}const o=uE(t.metadata),a=s.map(l=>i7(l,o,t.parsers));if(i)for(const l of a)for(const c of l.asyncColumns)c.data.then(u=>{let f=l.groupStart+u.skipped;for(const h of u.data)i({columnName:c.pathInSchema[0],columnData:h,rowStart:f,rowEnd:f+h.length}),f+=h.length});if(r){const l=[];for(const c of a){const u=Math.max(e-c.groupStart,0),f=Math.min((n??1/0)-c.groupStart,c.groupRows),h=await l7(c,u,f);hE(l,h)}r(l)}else for(const{asyncColumns:l}of a)for(const{data:c}of l)await c}function u7(t){return new Promise((e,n)=>{vE({...t,onComplete:e}).catch(n)})}const f7=Object.freeze(Object.defineProperty({__proto__:null,parquetRead:vE,parquetReadObjects:u7},Symbol.toStringTag,{value:"Module"}));xt.GenomeSpy=Yy,xt.embed=hT,xt.favIcon=aT,xt.html=ae,xt.icon=oT,xt.loadSpec=Ky,Object.defineProperty(xt,Symbol.toStringTag,{value:"Module"})}));
|