@genome-spy/app 0.69.0 → 0.69.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -17393,13 +17393,15 @@ function pj(e) {
17393
17393
  let r = () => 1, s = [];
17394
17394
  const o = () => {
17395
17395
  const l = ES(
17396
- s.map((f) => f()),
17396
+ s.map((h) => h()),
17397
17397
  "opacity.unitsPerPixel",
17398
17398
  e
17399
- );
17400
- mj(l, i, e);
17401
- const u = Hx().domain(l).range(i).clamp(!0);
17402
- r = (f) => u(f);
17399
+ ), u = mj(
17400
+ l,
17401
+ i,
17402
+ e
17403
+ ), f = Hx().domain(u.unitsPerPixel).range(u.values).clamp(!0);
17404
+ r = (h) => f(h);
17403
17405
  };
17404
17406
  s = t.unitsPerPixel.map((l) => {
17405
17407
  if (Oe(l)) {
@@ -17462,19 +17464,29 @@ function mj(e, t, n) {
17462
17464
  '"opacity.unitsPerPixel" and "opacity.values" must have the same length.',
17463
17465
  n
17464
17466
  );
17465
- e.forEach((i, r) => {
17466
- if (i <= 0)
17467
+ e.forEach((o, a) => {
17468
+ if (o <= 0)
17467
17469
  throw new mt(
17468
- "Invalid opacity.unitsPerPixel value at index " + r + ". Stop values must be positive.",
17470
+ "Invalid opacity.unitsPerPixel value at index " + a + ". Stop values must be positive.",
17469
17471
  n
17470
17472
  );
17471
17473
  });
17472
- for (let i = 1; i < e.length; i++)
17473
- if (e[i - 1] <= e[i])
17474
+ const i = e.map((o, a) => ({
17475
+ stop: o,
17476
+ value: t[a]
17477
+ }));
17478
+ i.sort((o, a) => a.stop - o.stop);
17479
+ const r = i.map((o) => o.stop), s = i.map((o) => o.value);
17480
+ for (let o = 1; o < e.length; o++)
17481
+ if (r[o - 1] <= r[o])
17474
17482
  throw new mt(
17475
17483
  '"opacity.unitsPerPixel" must be strictly decreasing.',
17476
17484
  n
17477
17485
  );
17486
+ return {
17487
+ unitsPerPixel: r,
17488
+ values: s
17489
+ };
17478
17490
  }
17479
17491
  function ES(e, t, n) {
17480
17492
  if (!Ve(e))
@@ -47506,7 +47518,7 @@ function yre(e, t = {}) {
47506
47518
  }
47507
47519
  );
47508
47520
  }
47509
- const bre = "@genome-spy/app", wre = "GenomeSpy-based visualization tool for analyzing multiple biological samples.", xre = { name: "Kari Lavikka", email: "kari.lavikka@helsinki.fi" }, vre = [], Are = "MIT", Sre = "https://genomespy.app/", Ere = "0.69.0", Cre = "dist/index.js", kre = "module", Tre = { ".": "./dist/index.js", "./schema.json": "./dist/schema.json" }, Ire = ["dist/"], Dre = { type: "git", url: "github:genome-spy/genome-spy", directory: "packages/app" }, Mre = { dev: "node dev-server.mjs", build: "rm -rf dist && mkdir -p dist && vite build && npm run build:schema", "build:schema": "mkdir -p dist && ts-json-schema-generator --path 'src/spec/*.d.ts' --type AppRootSpec > dist/schema.json", "test:tsc": "tsc -p tsconfig.json --noEmit", storybook: "storybook dev -p 6006", "build-storybook": "storybook build", prepublishOnly: "npm run build" }, Pre = { "@floating-ui/dom": "^1.6.1", "@fortawesome/fontawesome-free": "^6.4.2", "@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.2", "@genome-spy/core": "^0.69.0", "@reduxjs/toolkit": "^2.11.0", "d3-color": "^3.1.0", idb: "^7.1.1", lit: "^3.3.0", "lz-string": "^1.4.4", mapsort: "^1.0.5", micromark: "^4.0.0", "redux-undo": "^1.0.1" }, Rre = "bfb9bd98ceb875f90a458b876208b15b6c12c9f3", $i = {
47521
+ const bre = "@genome-spy/app", wre = "GenomeSpy-based visualization tool for analyzing multiple biological samples.", xre = { name: "Kari Lavikka", email: "kari.lavikka@helsinki.fi" }, vre = [], Are = "MIT", Sre = "https://genomespy.app/", Ere = "0.69.1", Cre = "dist/index.js", kre = "module", Tre = { ".": "./dist/index.js", "./schema.json": "./dist/schema.json" }, Ire = ["dist/"], Dre = { type: "git", url: "github:genome-spy/genome-spy", directory: "packages/app" }, Mre = { dev: "node dev-server.mjs", build: "rm -rf dist && mkdir -p dist && vite build && npm run build:schema", "build:schema": "mkdir -p dist && ts-json-schema-generator --path 'src/spec/*.d.ts' --type AppRootSpec > dist/schema.json", "test:tsc": "tsc -p tsconfig.json --noEmit", storybook: "storybook dev -p 6006", "build-storybook": "storybook build", prepublishOnly: "npm run build" }, Pre = { "@floating-ui/dom": "^1.6.1", "@fortawesome/fontawesome-free": "^6.4.2", "@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/free-solid-svg-icons": "^6.4.2", "@genome-spy/core": "^0.69.1", "@reduxjs/toolkit": "^2.11.0", "d3-color": "^3.1.0", idb: "^7.1.1", lit: "^3.3.0", "lz-string": "^1.4.4", mapsort: "^1.0.5", micromark: "^4.0.0", "redux-undo": "^1.0.1" }, Rre = "bbbc1860a0730070d0a7c1ca7a9923d4a5d25366", $i = {
47510
47522
  name: bre,
47511
47523
  description: wre,
47512
47524
  author: xre,
package/dist/index.js CHANGED
@@ -2329,7 +2329,7 @@ chrM 16299`};function YY(t){if(!(t in sD))throw new Error(`Unknown assembly: ${t
2329
2329
  return !!(${e.code});
2330
2330
  } catch (e) {
2331
2331
  throw new Error("Error evaluating expression: " + ${JSON.stringify(t)} + ", " + e.message, e);
2332
- }`)}catch(n){throw new Error(`Invalid expression: ${t}, ${n.message}`)}}function vK(t,n={}){return wK(t,n)}function $D(t,n){const e={},i=vK(t,e),r=new Map;for(const o of i.globals){if(r.has(o))continue;const a=n(o);if(!a)throw new Error('Unknown variable "'+o+'" in expression: '+t);r.set(o,a),Object.defineProperty(e,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 c=!0;const l=()=>{c&&(c=!1,s.delete(l),a.forEach(u=>u()))};return s.add(l),l},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 CK{constructor(){S(this,yc,new sJ);S(this,ts,new rJ({lifecycleRegistry:g(this,yc)}));S(this,mn,new oJ)}createScope(n){const e=g(this,yc).createOwner("scope",n??"root");return n?g(this,mn).createChildScope(e,n):g(this,mn).createRootScope(e)}disposeScope(n){const e=g(this,mn).getOwnerId(n);g(this,yc).disposeOwner(e),g(this,mn).clearScope(n)}addScopeDisposer(n,e){const i=g(this,mn).getOwnerId(n);g(this,yc).addDisposer(i,e)}registerBase(n,e,i,r){const s=g(this,mn).getOwnerId(n),o=g(this,ts).createWritable(s,e,"base",i,r);return g(this,mn).register(n,e,o)}registerSelection(n,e,i,r){const s=g(this,mn).getOwnerId(n),o=g(this,ts).createWritable(s,e,"selection",i,r);return g(this,mn).register(n,e,o)}registerDerived(n,e,i){const{expression:r,dependencies:s}=$D(i,c=>this.resolve(n,c)),o=g(this,mn).getOwnerId(n),a=g(this,ts).computed(o,e,s,()=>r(null));return g(this,mn).register(n,e,a)}createExpression(n,e){const{expression:i}=$D(e,r=>this.resolve(n,r));return i}resolve(n,e){return g(this,mn).resolve(n,e)}runInTransaction(n){return g(this,ts).runInTransaction(n)}flushNow(){g(this,ts).flushNow()}whenPropagated(n){return g(this,ts).whenPropagated(n)}}yc=new WeakMap,ts=new WeakMap,mn=new WeakMap;class EK{constructor(n){S(this,_A);S(this,dt);S(this,_n);S(this,ai,new Map);S(this,Ti,new Map);S(this,bo,new Map);S(this,Zu);S(this,UA,!1);Q(this,Zu,n??(()=>{}));const e=g(this,Zu).call(this);e?(Q(this,dt,g(e,dt)),Q(this,_n,g(this,dt).createScope(g(e,_n)))):(Q(this,dt,new CK),Q(this,_n,g(this,dt).createScope()))}registerParam(n){const e=n.name;if(Yi(e),g(this,bo).has(e))throw new Error('Parameter "'+e+'" already registered in this scope.');if("value"in n&&"expr"in n)throw new Error(`The parameter "${e}" must not have both value and expr properties!`);let i,r;if(n.push=="outer"){const s=this.findRuntimeForParam(e);if(!s)throw new Error(`Parameter "${e}" not found in outer scope!`);const o=s.paramConfigs.get(e);if(!o)throw new Error(`Outer parameter "${e}" exists as a value but has no registered config.`);if("expr"in o||"select"in o)throw new Error(`The outer parameter "${e}" must not have expr or select properties!`);i=a=>{s.setValue(e,a)},g(this,ai).set(e,i)}else if("value"in n)r=_p(n,this),i=v(this,_A,nI).call(this,e,r);else if("expr"in n){const s=g(this,dt).registerDerived(g(this,_n),e,n.expr);g(this,Ti).set(e,s),i=()=>{throw new Error('Cannot set derived parameter "'+e+'".')}}else r=_p(n,this),i=v(this,_A,nI).call(this,e,r);if("select"in n){if(r??(r=_p(n,this)),!g(this,ai).has(e)){const s=g(this,dt).registerSelection(g(this,_n),e,r);g(this,Ti).set(e,s),g(this,ai).set(e,o=>{s.set(o),g(this,dt).flushNow()}),i=g(this,ai).get(e)}i(r)}return g(this,bo).set(e,n),i}allocateSetter(n,e,i=!1){if(Yi(n),g(this,ai).has(n))throw new Error("Setter already allocated for parameter: "+n);const r=g(this,dt).registerBase(g(this,_n),n,e,{notify:!i});g(this,Ti).set(n,r);const s=o=>{r.set(o),g(this,dt).flushNow()};return g(this,ai).set(n,s),s}setValue(n,e){Yi(n);const i=g(this,ai).get(n);if(!i)throw new Error("Writable parameter not found in this scope: "+n);i(e)}getValue(n){var e;return(e=g(this,Ti).get(n))==null?void 0:e.get()}subscribe(n,e){Yi(n);const i=this.findRuntimeForParam(n);if(!i)throw new Error("Parameter not found: "+n);const r=g(i,Ti).get(n);if(!r)throw new Error("Parameter found without local reference: "+n);return r.subscribe(e)}findValue(n){const e=this.findRuntimeForParam(n);return e==null?void 0:e.getValue(n)}get paramConfigs(){return g(this,bo)}findRuntimeForParam(n){var e;return g(this,Ti).has(n)?this:(e=g(this,Zu).call(this))==null?void 0:e.findRuntimeForParam(n)}createExpression(n){return g(this,dt).createExpression(g(this,_n),n)}watchExpression(n,e,i={}){var o;const r=this.createExpression(n),s=r.subscribe(e);return(i.scopeOwned??!0)&&g(this,dt).addScopeDisposer(g(this,_n),s),(o=i.registerDisposer)==null||o.call(i,s),r}evaluateAndGet(n){return this.createExpression(n)()}runInTransaction(n){return g(this,dt).runInTransaction(n)}flushNow(){g(this,dt).flushNow()}whenPropagated(n){return g(this,dt).whenPropagated(n)}dispose(){g(this,UA)||(Q(this,UA,!0),g(this,dt).disposeScope(g(this,_n)),g(this,ai).clear(),g(this,Ti).clear(),g(this,bo).clear())}hasPointSelections(){for(const n of g(this,bo).values())if(qi(n)){const e=n.select;if(Qe(e)){if(e=="point")return!0}else if(e.type=="point")return!0}return!1}}dt=new WeakMap,_n=new WeakMap,ai=new WeakMap,Ti=new WeakMap,bo=new WeakMap,Zu=new WeakMap,UA=new WeakMap,_A=new WeakSet,nI=function(n,e){const i=g(this,dt).registerBase(g(this,_n),n,e);g(this,Ti).set(n,i);const r=s=>{i.set(s),g(this,dt).flushNow()};return g(this,ai).set(n,r),r};function Ma(t,n){return!n||/^(data:|([A-Za-z]+:)?\/\/)/.test(t)||t.startsWith("/")?t:(n.endsWith("/")||(n+="/"),n+t)}function IK(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 Bn="VISIT_SKIP",xi="VISIT_STOP",qD=t=>t;class YD{constructor(n,e,i,r,s,o={}){S(this,Gn);S(this,ef);S(this,wc,{});S(this,tf,{});S(this,nf,{});S(this,GA);S(this,HA);S(this,rf,!1);$(this,"opacityFunction",qD);S(this,sf,[]);S(this,of,"none");$(this,"facetCoords",new Ir([],JSON.stringify));var a;if(!n)throw new Error("View spec must be defined!");if(this.context=e,this.layoutParent=i,this.dataParent=r,Q(this,ef,s),this.spec=n,this.resolutions={scale:{},axis:{}},J4(this),this.options={blockEncodingInheritance:!1,...o},this.flowHandle=void 0,this.needsAxes={x:!1,y:!1},this.paramRuntime=new EK(()=>{var c;return(c=this.dataParent)==null?void 0:c.paramRuntime}),n.params)for(const c of n.params)this.paramRuntime.registerParam(c);if(!((a=this.layoutParent)!=null&&a.options.layeredChildren)){const c=l=>this.paramRuntime.findRuntimeForParam(l)?void 0:this.paramRuntime.allocateSetter(l,0);Q(this,HA,c("height")),Q(this,GA,c("width"))}}get name(){return this.spec.name??g(this,ef)}get explicitName(){return this.spec.name}get defaultName(){return g(this,ef)}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>Pt.createFromConfig(this.spec.padding))}getOverhang(){return Pt.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Pr(v(this,Gn,Xg).call(this,"width"),v(this,Gn,Xg).call(this,"height")):wD)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return wD;const n=this.getSize();return new Pr(v(this,Gn,Xg).call(this,"viewportWidth")??n.width,v(this,Gn,Xg).call(this,"viewportHeight")??n.height)}registerStepSizeInvalidation(){v(this,Gn,iI).call(this,"width","x"),v(this,Gn,iI).call(this,"height","y")}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(n=>n.isConfiguredVisible())}isDomainInert(){if(this.spec.domainInert)return!0;const n=this.dataParent;return n?n.isDomainInert():!1}getDataInitializationState(){return g(this,of)}_setDataInitializationState(n){Q(this,of,n)}isDataInitialized(){return g(this,of)==="ready"}getEffectiveOpacity(){var n;return this.opacityFunction(((n=this.layoutParent)==null?void 0:n.getEffectiveOpacity())??1)}getPathString(){return this.getLayoutAncestors().map(n=>n.name).reverse().join("/")}getLayoutAncestors(){return v(this,Gn,rI).call(this,"layoutParent")}getDataAncestors(){return v(this,Gn,rI).call(this,"dataParent")}handleBroadcast(n){for(const e of g(this,wc)[n.type]||[])e(n)}_addBroadcastHandler(n,e){let i=g(this,wc)[n];return i||(i=[],g(this,wc)[n]=i),i.push(e),()=>{const r=g(this,wc)[n];if(!r)return;const s=r.indexOf(e);s>=0&&r.splice(s,1)}}handleInteractionEvent(n,e,i){const r=i?g(this,tf):g(this,nf);for(const s of r[e.type]||[])s(n,e)}addInteractionEventListener(n,e,i){const r=i?g(this,tf):g(this,nf);let s=r[n];s||(s=[],r[n]=s),s.push(e)}removeInteractionEventListener(n,e,i){const r=i?g(this,tf):g(this,nf);let s=r==null?void 0:r[n];if(s){const o=s.indexOf(e);o>=0&&s.splice(o,1)}}visit(n){try{const e=n(this);if(n.postOrder&&n.postOrder(this),e!==xi)return e}catch(e){throw e.view=this,e}}getDescendants(){const n=[];return this.visit(e=>{n.push(e)}),n}dispose(){for(const e of g(this,sf))e();g(this,sf).length=0;const n=this.flowHandle;n!=null&&n.collector&&(this.context.dataFlow.pruneCollectorBranch(n.collector),this.context.dataFlow.removeCollector(n.collector)),n!=null&&n.dataSource&&n.dataSource.view===this&&!n.dataSource.identifier&&this.context.dataFlow.removeDataSource(n.dataSource),this.paramRuntime.dispose(),this.context.dataFlow.loadingStatusRegistry.delete(this),this.flowHandle=void 0}registerDisposer(n){g(this,sf).push(n)}disposeSubtree(){const n=()=>{};n.postOrder=e=>{e.dispose()},this.visit(n)}configureViewOpacity(){(!this.opacityFunction||this.opacityFunction===qD)&&(this.opacityFunction=BK(this))}onBeforeRender(){g(this,rf)||Q(this,rf,!0)}hasRendered(){return g(this,rf)}render(n,e,i={}){var r,s;i.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(i.facetId,i.clipRect?e.intersect(i.clipRect):e),(r=g(this,GA))==null||r.call(this,e.width),(s=g(this,HA))==null||s.call(this,e.height)}getEncoding(){const n=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},e=this.spec.encoding||{},i={...n,...e};for(const[r,s]of Object.entries(i))s===null&&delete i[r];return i}getFacetAccessor(n){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(n){var i;const e=this.getEncoding().sample;return Ai(e)?[e.field]:(i=this.layoutParent)==null?void 0:i.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(n){const e=ks(n);return this.getDataAncestors().map(i=>i.resolutions.scale[e]).find(i=>i)}getAxisResolution(n){const e=ks(n);return this.getDataAncestors().map(i=>i.resolutions.axis[e]).find(i=>i)}getConfiguredResolution(n,e){var i,r;return(r=(i=this.spec.resolve)==null?void 0:i[e])==null?void 0:r[n]}getConfiguredOrDefaultResolution(n,e){return this.getConfiguredResolution(n,e)??this.getConfiguredResolution("default",e)??this.getDefaultResolution(n,e)}getDefaultResolution(n,e){return"independent"}getBaseUrl(){return ka(()=>{var n;return(n=this.dataParent)==null?void 0:n.getBaseUrl()},IK(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const n=this.spec.title;if(n)return Qe(n)?n:at(n.text)?this.paramRuntime.evaluateAndGet(n.text.expr):n.text}_cache(n,e){return T0(this,n,e)}_invalidateCacheByPrefix(n,e="self"){switch(e){case"self":ud(this,n);break;case"ancestors":for(const i of this.getLayoutAncestors())ud(i,n);break;case"progeny":this.visit(i=>ud(i,n));break}}invalidateSizeCache(){ud(this,"size"),this._invalidateCacheByPrefix("size","ancestors")}propagateInteractionEvent(n){}}ef=new WeakMap,wc=new WeakMap,tf=new WeakMap,nf=new WeakMap,GA=new WeakMap,HA=new WeakMap,rf=new WeakMap,sf=new WeakMap,of=new WeakMap,Gn=new WeakSet,Xg=function(n){var s;let e=this.spec[n];const i=v2(e),r=n=="viewportWidth"||n=="viewportHeight";if(i){if(r)throw new Vt(`Cannot use step-based size with "${n}"!`,this);const o=e.step,a=(s=this.getScaleResolution(n=="width"?"x":"y"))==null?void 0:s.getScale();if(a){let c=0;if(yi(a.type))c=a.domain().length;else if(["locus","index"].includes(a.type)){const u=a.domain();c=Vi(u)-u[0]}else throw new Vt(`Cannot use step-based size with "${a.type}" scale!`,this);const l=a;return c=Hw(c,l.paddingInner(),l.paddingOuter()),{px:c*o,grow:0}}else throw new Vt(`Cannot use step-based size with "${n}"!`,this)}else return(e&&xD(e))??(r?void 0:{px:0,grow:1})},iI=function(n,e){const i=this.spec[n];if(!v2(i))return;const r=this.getScaleResolution(e);if(!r)throw new Vt("Cannot use 'step' size without a scale!",this);const s=()=>this.invalidateSizeCache();r.addEventListener("domain",s),this.registerDisposer(()=>r.removeEventListener("domain",s))},rI=function(n){const e=[];let i=this;do e.push(i),i=i[n];while(i);return e};function SK(t){return"unitsPerPixel"in t}function BK(t){const n="opacity"in t.spec?t.spec.opacity:void 0;if(n!==void 0){if(pt(n))return e=>e*n;if(SK(n)){const e=l=>{const u=t.getScaleResolution(l),f=u==null?void 0:u.getScale();if(["linear","index","locus"].includes(f==null?void 0:f.type))return{scale:f,scaleResolution:u}},i=jD(n.values,"opacity.values",t);if(!ot(n.unitsPerPixel))throw new Vt('"opacity.unitsPerPixel" must be an array.',t);let r=()=>1,s=[];const o=()=>{const l=jD(s.map(f=>f()),"opacity.unitsPerPixel",t);kK(l,i,t);const u=Nw().domain(l).range(i).clamp(!0);r=f=>u(f)};s=n.unitsPerPixel.map(l=>{if(at(l)){const u=t.paramRuntime.watchExpression(l.expr,()=>{o(),t.context.animator.requestRender()});return()=>u(null)}else return()=>l}),o();const a=l=>{const f=l.scaleResolution.getAxisLength()||1e3;return uh(l.scale.domain())/f};let c;if(n.channel==="auto"){const l=e("x"),u=e("y");if(l&&u)c=()=>(a(l)+a(u))/2;else if(l)c=()=>a(l);else if(u)c=()=>a(u);else throw new Vt("Cannot find a resolved quantitative x or y scale for dynamic opacity!",t)}else{const l=n.channel?e(n.channel):e("x")??e("y");if(!l)throw new Vt("Cannot find a resolved quantitative scale for dynamic opacity!",t);c=()=>a(l)}return l=>r(c())*l}else if(at(n)){const e=t.paramRuntime.watchExpression(n.expr,()=>t.context.animator.requestRender());return i=>e(null)*i}}return e=>e}function kK(t,n,e){if(!t.length)throw new Vt('"opacity.unitsPerPixel" must contain at least one stop.',e);if(t.length!==n.length)throw new Vt('"opacity.unitsPerPixel" and "opacity.values" must have the same length.',e);t.forEach((i,r)=>{if(i<=0)throw new Vt("Invalid opacity.unitsPerPixel value at index "+r+". Stop values must be positive.",e)});for(let i=1;i<t.length;i++)if(t[i-1]<=t[i])throw new Vt('"opacity.unitsPerPixel" must be strictly decreasing.',e)}function jD(t,n,e){if(!ot(t))throw new Vt('"'+n+'" must evaluate to an array.',e);return t.map((i,r)=>{if(!pt(i)||!Number.isFinite(i))throw new Vt("Invalid "+n+" value at index "+r+". Expected a finite number.",e);return i})}const v2=t=>!!(t!=null&&t.step);function DK(t){return JD(t==null?void 0:t.key,"key")}function QK(t){return JD(t==null?void 0:t.search,"search")}function JD(t,n){if(!t)return;const e=Array.isArray(t)?t:[t];if(e.length===0)throw new Error("The "+n+" channel array must not be empty.");const i=[];for(const r of e){if(!r||typeof r!="object"||!("field"in r))throw new Error("The "+n+" channel must be a field definition or an array of field definitions.");const s=r.field;if(typeof s!="string")throw new Error("The "+n+" channel field definition must include a string field name.");i.push(s)}return i}const TK={point:kY,rect:CY,rule:RY,link:zY,text:$Y};class $e extends YD{constructor(e,i,r,s,o,a){super(e,i,r,s,o,a);S(this,X1);S(this,VA);S(this,$A,!1);S(this,af,null);this.spec=e;const c=TK[this.getMarkType()];if(c)this.mark=new c(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),Q(this,VA,this.paramRuntime.allocateSetter("zoomLevel",1));for(const l of["x","y"]){const u=this.getScaleResolution(l);if(u){const f=()=>{g(this,VA).call(this,Math.sqrt(this.getZoomLevel()))};u.addEventListener("domain",f),this.registerDisposer(()=>u.removeEventListener("domain",f))}}this.needsAxes={x:!0,y:!0},v(this,X1,e9).call(this)}render(e,i,r={}){super.render(e,i,r),this.isConfiguredVisible()&&(e.pushView(this,i),e.renderMark(this.mark,r),e.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}getEncoding(){const e=super.getEncoding(),i=this.mark.getSupportedChannels();for(const r of Object.keys(e))r!=="key"&&(i.includes(r)||delete e[r]);return e}resolve(e){if(!e){this.resolve("scale"),this.resolve("axis");return}const i=this.mark.encoding;for(const[r,s]of Object.entries(i)){if(!s||Array.isArray(s))continue;let o;if(jn(s))o=s;else if(Qy(s)){const l=s.condition;if(!Array.isArray(l)&&jn(l))o=l;else continue}else continue;const a=ks(o.resolutionChannel??r);if(!zh(a)||e=="axis"&&!Oh(a))continue;let c=this;for(;(c.getConfiguredOrDefaultResolution(a,e)=="forced"||c.dataParent&&["shared","excluded","forced"].includes(c.dataParent.getConfiguredOrDefaultResolution(a,e)))&&c.getConfiguredOrDefaultResolution(a,e)!="excluded";)c=c.dataParent;if(e=="axis"&&Oh(r)&&Ty(a)){c.resolutions[e][a]||(c.resolutions[e][a]=new Zj(a));const l=c.resolutions[e][a],u=l.registerMember({view:this,channel:r,channelDef:o});this.registerDisposer(()=>{u()&&c.resolutions[e][a]===l&&delete c.resolutions[e][a]})}else if(e=="scale"&&zh(r)){if(!c.resolutions[e][a]){const d=new Xj(a);c.resolutions[e][a]=d;const h=A=>{var p;(p=this.context.glHelper)==null||p.createRangeTexture(A.scaleResolution,!0)};d.addEventListener("range",h),d.addEventListener("domain",h),this.registerDisposer(()=>{d.removeEventListener("range",h),d.removeEventListener("domain",h)})}const l=!this.isDomainInert(),u=c.resolutions[e][a],f=u.registerMember({view:this,channel:r,channelDef:o,contributesToDomain:l});this.registerDisposer(()=>{f()&&c.resolutions[e][a]===u&&(u.dispose(),delete c.resolutions[e][a])})}}}dispose(){super.dispose(),this.mark.dispose()}getDataAccessor(e){var r;const i=this.mark.encoders;if(i)return(r=i[e])==null?void 0:r.dataAccessor}getSearchAccessors(){if(!g(this,af)){const e=QK(this.getEncoding())??[];Q(this,af,e.map(i=>ve(i)))}return g(this,af)}getFacetAccessor(e){const i=this.getDataAccessor("sample");return i||super.getFacetAccessor(this)}getCollector(){var e;return(e=this.flowHandle)==null?void 0:e.collector}registerDomainSubscriptions(){if(g(this,$A)||this.isDomainInert())return;const e=this.getCollector();if(!e)return;const i=this.mark.encoders;if(!i)throw new Error("Encoders are not initialized!");Q(this,$A,!0);const r=new Map;for(const s of Object.values(i)){if(!s)continue;const o=s.accessors??[];if(o.length!==0)for(const a of o){if(!OS(a)||a.channelDef.domainInert)continue;const c=this.getScaleResolution(a.scaleChannel);if(!c)throw new Error("Missing scale resolution for channel: "+a.scaleChannel);let l=r.get(c);l||(l=new Set,r.set(c,l)),l.add(a)}}for(const[s,o]of r){if(o.size===0)continue;const a=s.registerCollectorSubscriptions(e,o);this.registerDisposer(a)}}getZoomLevel(){const e=i=>{var r;return((r=this.getScaleResolution(i))==null?void 0:r.getZoomLevel())??1};return pa.map(e).reduce((i,r)=>i*r,1)}propagateInteractionEvent(e){this.handleInteractionEvent(void 0,e,!0),e.target=this,!e.stopped&&this.handleInteractionEvent(void 0,e,!1)}getDefaultResolution(e,i){return e=="x"?"shared":"independent"}}VA=new WeakMap,$A=new WeakMap,af=new WeakMap,X1=new WeakSet,e9=function(){for(const[e,i]of this.paramRuntime.paramConfigs){if(!("select"in i))continue;const r=Qr(i.select),s=r.on,o=r.clear;if(Qs(r)){let c=0;const l=h=>{this.paramRuntime.setValue(e,h)},u=()=>{var A;const h=this.context.getCurrentHover();return((A=h==null?void 0:h.mark)==null?void 0:A.unitView)===this?h.datum:null},f=s.filter?VD(s.filter):()=>!0,d=(h,A)=>{if(!f(A.proxiedMouseEvent))return;const p=u(),b=p?p[Yn]:0;let m;if(r.toggle)if(A.mouseEvent.shiftKey){if(p){const x=this.paramRuntime.getValue(e);m=d_(x,{toggle:[p]})}}else m=Op(p?[p]:null);else b!=c&&(c=b,m=Lp(p));m!==void 0&&l(m)};if(this.addInteractionEventListener(["mouseover","pointerover"].includes(s.type)?"mousemove":s.type,d),o){const h=o.filter?VD(o.filter):()=>!0,A=(p,b)=>{if(!h(b.proxiedMouseEvent))return;c=0;const m=r.toggle?Op():Lp(null);l(m)};this.addInteractionEventListener(o.type,A)}}}};function KD(t){const n=new Set;t.visit(e=>{for(const i of Object.values(e.resolutions.scale)){const r=i.name;if(r&&n.has(r))throw new Error(`The same scale name "${r}" occurs in multiple scale resolutions!`);n.add(r)}})}function RK(t){for(const n of pa){const e=t.getScaleResolution(n);e&&!e.name&&e.isZoomable()&&(e.name=`${n}_at_root`)}}function H0(t,n=()=>!0){return Promise.allSettled(t).then(e=>{if(n())for(const i of e)"value"in i?i.value.finalizeGraphicsInitialization():"reason"in i&&console.error(i.reason)})}function MK(t){const n=[];return t.visit(e=>{if(e instanceof $e){const i=e.getEncoding();for(const[r,s]of Object.entries(i))!Array.isArray(s)&&Ai(s)&&"type"in s&&n.push({view:e,channel:r,field:s.field,type:s.type});return Bn}}),n}async function FK(t,n,e){const i=t.import;if(!("url"in i))throw new Error("Not an url import: "+JSON.stringify(i));const r=ka(n,i.url);let s;try{const o=await fetch(r);if(!o.ok)throw new Error(`${o.status} ${o.statusText}`);s=await o.json()}catch(o){throw new Error(`Could not load imported view spec: ${r}. Reason: ${o.message}`)}if(e.isViewSpec(s))return s.baseUrl=ka(oD(i.url),s.baseUrl),s;throw new Error(`The imported spec "${r}" is not a view spec: ${JSON.stringify(t)}`)}function NK(t){const n=t.getSize(),e=t.getPadding(),i=(r,s)=>r.grow>0?void 0:r.px+s;return{width:i(n.width,e.horizontalTotal),height:i(n.height,e.verticalTotal)}}function*C2(t,n=[]){for(const[e,i]of t.entries())if(i instanceof Map)for(const r of C2(i,[...n,e]))yield r;else yield[[...n,e],i]}const WD=2147483647,PK=XD([WD]);function XD(t){let n=0;for(let e=0,i=t.length;e<i;e++)n=Math.max(n,t[e]);return Math.floor(Math.log2(n)/4)+1}function LK(t){const n=XD(t);let e=Array.from({length:t.length},(s,o)=>o),i=new Array(t.length);const r=new Array(16);for(let s=0;s<n;s++){r.fill(0);const o=s*4,a=Math.pow(16,s),c=l=>{const u=t[e[l]];return s>=PK?u>WD?Math.floor(u/a)%16:0:u>>o&15};for(let l=0;l<t.length;l++)r[c(l)]++;for(let l=1;l<16;l++)r[l]+=r[l-1];for(let l=t.length-1;l>=0;l--)i[--r[c(l)]]=e[l];[e,i]=[i,e]}return e}const V0="|",E2="\\";class OK{constructor(){S(this,lf);S(this,xc,null);S(this,ns,null);S(this,cf,!1)}invalidate(){Q(this,xc,null),Q(this,ns,null),Q(this,cf,!1)}findDatum(n,e,i){if(!n||n.length===0)return;const r=n.join(", ");if(n.length!==e.length)throw new Error(`Key tuple length ${e.length} does not match fields [${r}]`);(!g(this,xc)||!v(this,lf,n9).call(this,n))&&v(this,lf,t9).call(this,n,i);const s=g(this,ns);let o;if(g(this,cf)){let a="";for(let c=0;c<e.length;c++){c>0&&(a+=V0);const l=s[c],u=$0(e[c],l);a+=ZD(u)}o=a}else{const a=s[0];o=$0(e[0],a)}return g(this,xc).get(o)}}xc=new WeakMap,ns=new WeakMap,cf=new WeakMap,lf=new WeakSet,t9=function(n,e){const i=n.map(a=>ve(a)),r=new Map,s=n.join(", "),o=n.length!==1;if(o)for(const a of e)for(let c=0,l=a.length;c<l;c++){const u=a[c];let f="";for(let h=0;h<i.length;h++){h>0&&(f+=V0);const A=n[h],p=$0(i[h](u),A);f+=ZD(p)}if(r.get(f)!==void 0){const h=i.map(A=>A(u));throw new Error(`Duplicate key detected for fields [${s}]: ${JSON.stringify(h)}`)}r.set(f,u)}else{const a=i[0],c=n[0];for(const l of e)for(let u=0,f=l.length;u<f;u++){const d=l[u],h=$0(a(d),c);if(r.get(h)!==void 0)throw new Error(`Duplicate key detected for fields [${s}]: ${JSON.stringify(h)}`);r.set(h,d)}}Q(this,xc,r),Q(this,ns,[...n]),Q(this,cf,o)},n9=function(n){if(!g(this,ns)||g(this,ns).length!==n.length)return!1;for(let e=0;e<n.length;e++)if(g(this,ns)[e]!==n[e])return!1;return!0};function $0(t,n){if(t===void 0)throw new Error(`Key field "${n}" is undefined. Ensure all key fields are present in the data.`);if(t===null)throw new Error(`Key field "${n}" 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 "${n}" must be a scalar value (string, number, or boolean).`);return t}function zK(t){if(!(t.indexOf(E2)!==-1||t.indexOf(V0)!==-1))return t;let e="";for(let i=0;i<t.length;i++){const r=t[i];(r===E2||r===V0)&&(e+=E2),e+=r}return e}function ZD(t){return typeof t=="string"?zK(t):String(t)}class Id extends Lh{constructor(e){var i;super();S(this,jt);S(this,is,[]);S(this,qA,ve(Yn));S(this,yo,[]);S(this,uf,new OK);S(this,vc);S(this,ff);S(this,wo,new UK);this.params=e??{type:"collect"},this.observers=new Set,this.facetBatches=new Ir([],JSON.stringify),Q(this,ff,GK((i=this.params)==null?void 0:i.sort)),v(this,jt,sI).call(this)}get behavior(){return By}get label(){return"collect"}reset(){super.reset(),v(this,jt,sI).call(this)}handle(e){g(this,is).push(e)}beginBatch(e){g(this,uf).invalidate(),ZU(e)&&(Q(this,is,[]),this.facetBatches.set(Ye(e.facetId),g(this,is)))}complete(){var e;if(Q(this,is,[]),(e=this.params.groupby)!=null&&e.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const i=this.facetBatches.get(void 0),r=this.params.groupby.map(o=>ve(o)),s=r.length>1?hh(i,...r):_K(i,r[0]);this.facetBatches.clear();for(const[o,a]of C2(s))this.facetBatches.set(o,a)}if(g(this,ff))for(const i of this.facetBatches.values())i.sort(g(this,ff));v(this,jt,i9).call(this),v(this,jt,oI).call(this),super.complete(),v(this,jt,aI).call(this);for(const i of this.observers)i(this)}observe(e){return this.observers.add(e),()=>{this.observers.delete(e)}}repropagate(){for(const e of this.children)e.reset();v(this,jt,oI).call(this);for(const e of this.children)e.complete();v(this,jt,aI).call(this)}getDomain(e,i,r){return g(this,wo).getDomain(e,()=>{const s=N0(i);if(r.constant)s.extend(r({}));else if(this.completed)for(const o of this.facetBatches.values())for(let a=0,c=o.length;a<c;a++)s.extend(r(o[a]));return s})}subscribeDomainChanges(e,i){return g(this,wo).subscribe(e,i)}getData(){switch(v(this,jt,kb).call(this),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const e=this.facetBatches;return{[Symbol.iterator]:function*(){for(const r of e.values())yield*r}}}}}visitData(e){v(this,jt,kb).call(this);for(const i of this.facetBatches.values())for(let r=0;r<i.length;r++)e(i[r])}getItemCount(){let e=0;for(const i of this.facetBatches.values())e+=i.length;return e}findDatumByUniqueId(e){if(!g(this,yo).length)return;const i=ra(c=>c.start).right,r=g(this,qA),s=ra(c=>r(o(c))).left,o=c=>{const l=i(g(this,vc),c),u=g(this,vc)[l-1];return!u||c>=u.stop?void 0:this.facetBatches.get(u.facetId)[c-u.start]},a=s(g(this,yo),e);if(a>=0){const c=o(g(this,yo)[a]);if(c&&r(c)===e)return c}}findDatumByKey(e,i){return v(this,jt,kb).call(this),g(this,uf).findDatum(e,i,this.facetBatches.values())}}is=new WeakMap,qA=new WeakMap,yo=new WeakMap,uf=new WeakMap,vc=new WeakMap,ff=new WeakMap,wo=new WeakMap,jt=new WeakSet,sI=function(){Q(this,is,[]),Q(this,yo,[]),g(this,uf).invalidate(),this.facetBatches.clear(),this.facetBatches.set(void 0,g(this,is))},oI=function(){if(this.children.length)for(const[e,i]of this.facetBatches.entries()){if(e){const r={type:"facet",facetId:e};for(const s of this.children)s.beginBatch(r)}for(let r=0,s=i.length;r<s;r++)this._propagate(i[r])}},kb=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},aI=function(){g(this,wo).hasCachedDomains()&&g(this,wo).clear(),g(this,wo).notify()},i9=function(){var o;Q(this,vc,[]);const e=(o=this.facetBatches.values().next().value)==null?void 0:o[0];if(e==null||!(Yn in e))return;let i=0;const r=[],s=g(this,qA);for(const[a,c]of this.facetBatches){g(this,vc).push({start:i,stop:i+c.length,facetId:a}),i+=c.length;for(let l=0,u=c.length;l<u;l++)r.push(s(c[l]))}Q(this,yo,LK(r))};class UK{constructor(){S(this,Cc,new Map);S(this,rs,new Map)}hasCachedDomains(){return g(this,Cc).size>0}clear(){g(this,Cc).clear()}getDomain(n,e){const i=g(this,Cc).get(n);if(i)return i;{const r=e();return g(this,Cc).set(n,r),r}}subscribe(n,e){let i=g(this,rs).get(n);return i||(i=new Set,g(this,rs).set(n,i)),i.add(e),()=>{const r=g(this,rs).get(n);r&&(r.delete(e),r.size===0&&g(this,rs).delete(n))}}notify(){if(g(this,rs).size===0)return;const n=new Set;for(const e of g(this,rs).values())for(const i of e)n.add(i);for(const e of n)e()}}Cc=new WeakMap,rs=new WeakMap;function _K(t,n){const e=new Map;for(let i=0,r=t.length;i<r;i++){const s=t[i],o=n(s);let a=e.get(o);a||(a=[],e.set(o,a)),a.push(s)}return e}function GK(t){if(t!=null&&t.field){const n=Ye(t.field);if(n.length==1&&!n[0].includes(".")){const e=Ye(t.order)[0]??"ascending",i=JSON.stringify(n[0]);return new Function("a","b",`return a[${i}] ${e==="ascending"?"-":"+"} b[${i}];`)}return d3(t.field,t.order)}}class HK extends Ct{get behavior(){return $i}constructor(n){super(n),this.params=n,this.startAccessor=ve(n.start),this.endAccessor=ve(n.end),this.chromAccessor=n.chrom?ve(n.chrom):e=>{},this.weightAccessor=n.weight?ve(n.weight):e=>1,this.as={coverage:n.as??"coverage",start:n.asStart??n.start,end:n.asEnd??n.end,chrom:n.asChrom??n.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([e,i])=>i).map(([e,i])=>`${JSON.stringify(i)}: ${e}`).join(", ")+"};"),this.ends=new Da}reset(){super.reset(),this.initialize()}initialize(){const n=this.as.coverage,e=this.as.end,i=this.as.chrom,r=this.startAccessor,s=this.endAccessor,o=this.chromAccessor,a=this.weightAccessor;let c,l,u,f=0,d=NaN;const h=this.ends;h.clear();const A=m=>{this._propagate(m),c=null},p=(m,w,x)=>{if(m==w)return;let y=!1;c&&(c[n]===x?(c[e]=w,y=!0):c[n]!=0&&A(c)),y||(c=this.createSegment(m,w,x,u))},b=()=>{let m=0;for(;(m=h.peekValue())!==void 0;)p(d,m,f),d=m,f-=h.pop();d=NaN,c&&A(c)};this.handle=m=>{const w=r(m);let x=0;for(;(x=h.peekValue())!==void 0&&x<w;)p(d,x,f),d=x,f-=h.pop();if(i){let E=o(m);E!==l&&(b(),u=E,l=u)}isNaN(d)||p(d,w,f),d=w;const y=a(m);f+=y,h.push(y,s(m))},this.complete=()=>{b(),super.complete()},this.beginBatch=m=>{b(),l=null,super.beginBatch(m)}}}function VK(t,n,e=s=>+s,i=0,r=t.length){const s=new Da,o=r-i;let a;for(a=0;a<n&&a<o;a++)s.push(a,e(t[i+a]));for(;a<o;a++){const u=e(t[i+a]);u>=s.peekValue()&&(s.push(a,u),s.pop())}const c=[];let l;for(;(l=s.pop())!==void 0;)c.push(t[i+l]);return c.reverse()}class $K{constructor(n,e=-1/0,i=1/0){this.maxSize=n,this.lowerLimit=e,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(n,e,i=0){if(n>=this.lowerLimits[i]&&e<=this.upperLimits[i]){const r=this.lowerChildren[i];if(r){const s=this._findSlot(n,e,r);return s>=0?s:this._findSlot(n,e,this.upperChildren[i])}else return i}else return-1}reserve(n,e){if(e-n<=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(n,e);if(i<0)return!1;const r=this.n++,s=this.n++;return this.lowerLimits[r]=this.lowerLimits[i],this.upperLimits[r]=n,this.lowerLimits[s]=e,this.upperLimits[s]=this.upperLimits[i],this.lowerChildren[i]=r,this.upperChildren[i]=s,!0}}class qK extends Ct{get behavior(){return By}constructor(n,e){if(super(n),this.params=n,this._data=[],this.channel=n.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.startPosAccessor=ve(this.params.pos),this.endPosAccessor=ve(this.params.pos2??this.params.pos),this.startPosBisector=ra(this.startPosAccessor),this.endPosBisector=ra(this.endPosAccessor),this.scoreAccessor=ve(this.params.score),this.widthAccessor=ve(this.params.width),this.laneAccessor=this.params.lane?ve(this.params.lane):o=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=e.getScaleResolution(this.channel);const i=()=>this._filterAndPropagate();this.schedule=()=>e.context.animator.requestTransition(i);const r=()=>this.schedule();this.resolution.addEventListener("domain",r),this.registerDisposer(()=>this.resolution.removeEventListener("domain",r));const s=e._addBroadcastHandler("layoutComputed",()=>this.schedule());this.registerDisposer(s)}complete(){const n=this.startPosAccessor;this._data.sort((e,i)=>n(e)-n(i));for(const e of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(e,new $K(200));this.schedule(),super.complete()}_filterAndPropagate(){super.reset();const n=this.resolution.getScale(),e=this.resolution.getAxisLength();if(!e)return;for(const o of this.reservationMaps.values())o.reset();const i=n.domain(),s=VK(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=n(this.startPosAccessor(o))*e,c=n(this.endPosAccessor(o))*e;const l=c-a,u=this.widthAccessor(o)+this.padding*2;let f=(a+c)/2;const d=Math.max(0,(l-u)/2);if(d>0){const h=Math.max(0,u/2-f);f+=Math.min(h,d);const A=Math.max(0,u/2+f-e);f-=Math.min(A,d)}if(this.reservationMaps.get(this.laneAccessor(o)).reserve(f-u/2,f+u/2))if(this.params.asMidpoint){const h=Object.assign({},o);h[this.params.asMidpoint]=n.invert(f/e),this._propagate(h)}else this._propagate(o)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(n){this._data.push(n)}}class YK extends Ct{constructor(n,e){super(n,e),this.params=n,this.predicate=void 0}initialize(){let n="";if(jK(this.params))n=this.params.expr;else if(JK(this.params)){const e=this.paramRuntime.findValue(this.params.param);if(!e)throw new Error(`Cannot initialize filter transform. Selection parameter "${this.params.param}" not found!`);n=A_(this.params,e)}else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramRuntime.watchExpression(n,()=>this.repropagate(),{scopeOwned:!1,registerDisposer:e=>this.registerDisposer(e)})}handle(n){this.predicate(n)&&this._propagate(n)}}function jK(t){return"expr"in t}function JK(t){return"param"in t}class KK extends Ct{get behavior(){return $i}constructor(n){super(n),this.params=n;const e=n.index;if(n.fields){const i=Ye(n.fields).map(s=>ve(s)),r=Ye(n.as||n.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((c,l)=>c(s)??[]),a=o[0].length;for(let c=0;c<a;c++){const l=Object.assign({},s);for(let u=0;u<i.length;u++)l[r[u]]=c<o[u].length?o[u][c]:null;e&&(l[e]=c),this._propagate(l)}}}else this.handle=i=>{for(let r=0;r<i.length;r++){const s=Object.assign({},i[r]);e&&(s[e]=r),this._propagate(s)}}}}const WK=48;function*XK(t,n=","){const e=n.charCodeAt(0);let i=0;for(let r=0;r<t.length;r++){const s=t.charCodeAt(r);s==e?(yield i,i=0):i=i*10+s-WK}yield i}class ZK extends Ct{get behavior(){return $i}constructor(n){super(n);const e=ve(n.exons??"exons"),i=ve(n.start??"start"),[r,s]=n.as||["exonStart","exonEnd"];this.handle=o=>{let a=i(o),c=a,l=!0;const u=e(o);for(const f of XK(u)){if(l)c=a+f;else{a=c+f;const d=Object.assign({},o);d[r]=c,d[s]=a,this._propagate(d)}l=!l}}}}class eW extends Ct{get behavior(){return $i}constructor(n){super(n);const e=Ye(n.field).map(s=>ve(s)),i=Ye(n.separator),r=Ye(n.as||n.field);if(e.length!==i.length||e.length!==r.length)throw new Error(`Lengths of "separator" (${i.length}), "fields" (${e.length}), and "as" (${r.length}) do not match!`);this.handle=s=>{if(e.some(c=>!c(s)))return;const o=e.map((c,l)=>c(s).split(i[l]));tW(o,s);const a=o[0].length;for(let c=0;c<a;c++){const l=Object.assign({},s);for(let u=0;u<e.length;u++)l[r[u]]=o[u][c];this._propagate(l)}}}}function tW(t,n){const e=t.map(i=>i.length);if(!e.every(i=>i==e[0]))throw new Error("Mismatching number of elements in the fields to be split: "+JSON.stringify(n))}class nW extends Ct{get behavior(){return Bs}constructor(n,e){super(n,e),this.params=n,this.as=n.as,this.fn=void 0}initialize(){this.fn=this.paramRuntime.watchExpression(this.params.expr,()=>this.repropagate(),{scopeOwned:!1,registerDisposer:n=>this.registerDisposer(n)})}handle(n){n[this.as]=this.fn(n),this._propagate(n)}}class e5 extends Ct{get behavior(){return Bs}constructor(n,e){n={channel:"x",...n},super(n),this.params=n;const i=n.channel;if(!["x","y"].includes(i))throw new Error("Invalid channel: "+i);const r=e.getScaleResolution(i).getScale(),s="genome"in r?r.genome():void 0;if(!s)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const o=ve(n.chrom),a=Ye(n.pos).map(p=>ve(p)),c=Ye(n.as);if(a.length!=c.length)throw new Error('The number of "pos" and "as" elements must be equal!');const l=Ye(n.offset);let u;if(l.length==0)u=new Array(a.length).fill(0);else if(l.length==1)u=new Array(a.length).fill(l[0]);else if(l.length==a.length)u=l;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(n.offset)}!`);const f=new Function("datum","chromOffset","posAccessors",c.map((p,b)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${b}](datum) - ${u[b]};`).join(`
2332
+ }`)}catch(n){throw new Error(`Invalid expression: ${t}, ${n.message}`)}}function vK(t,n={}){return wK(t,n)}function $D(t,n){const e={},i=vK(t,e),r=new Map;for(const o of i.globals){if(r.has(o))continue;const a=n(o);if(!a)throw new Error('Unknown variable "'+o+'" in expression: '+t);r.set(o,a),Object.defineProperty(e,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 c=!0;const l=()=>{c&&(c=!1,s.delete(l),a.forEach(u=>u()))};return s.add(l),l},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 CK{constructor(){S(this,yc,new sJ);S(this,ts,new rJ({lifecycleRegistry:g(this,yc)}));S(this,mn,new oJ)}createScope(n){const e=g(this,yc).createOwner("scope",n??"root");return n?g(this,mn).createChildScope(e,n):g(this,mn).createRootScope(e)}disposeScope(n){const e=g(this,mn).getOwnerId(n);g(this,yc).disposeOwner(e),g(this,mn).clearScope(n)}addScopeDisposer(n,e){const i=g(this,mn).getOwnerId(n);g(this,yc).addDisposer(i,e)}registerBase(n,e,i,r){const s=g(this,mn).getOwnerId(n),o=g(this,ts).createWritable(s,e,"base",i,r);return g(this,mn).register(n,e,o)}registerSelection(n,e,i,r){const s=g(this,mn).getOwnerId(n),o=g(this,ts).createWritable(s,e,"selection",i,r);return g(this,mn).register(n,e,o)}registerDerived(n,e,i){const{expression:r,dependencies:s}=$D(i,c=>this.resolve(n,c)),o=g(this,mn).getOwnerId(n),a=g(this,ts).computed(o,e,s,()=>r(null));return g(this,mn).register(n,e,a)}createExpression(n,e){const{expression:i}=$D(e,r=>this.resolve(n,r));return i}resolve(n,e){return g(this,mn).resolve(n,e)}runInTransaction(n){return g(this,ts).runInTransaction(n)}flushNow(){g(this,ts).flushNow()}whenPropagated(n){return g(this,ts).whenPropagated(n)}}yc=new WeakMap,ts=new WeakMap,mn=new WeakMap;class EK{constructor(n){S(this,_A);S(this,dt);S(this,_n);S(this,ai,new Map);S(this,Ti,new Map);S(this,bo,new Map);S(this,Zu);S(this,UA,!1);Q(this,Zu,n??(()=>{}));const e=g(this,Zu).call(this);e?(Q(this,dt,g(e,dt)),Q(this,_n,g(this,dt).createScope(g(e,_n)))):(Q(this,dt,new CK),Q(this,_n,g(this,dt).createScope()))}registerParam(n){const e=n.name;if(Yi(e),g(this,bo).has(e))throw new Error('Parameter "'+e+'" already registered in this scope.');if("value"in n&&"expr"in n)throw new Error(`The parameter "${e}" must not have both value and expr properties!`);let i,r;if(n.push=="outer"){const s=this.findRuntimeForParam(e);if(!s)throw new Error(`Parameter "${e}" not found in outer scope!`);const o=s.paramConfigs.get(e);if(!o)throw new Error(`Outer parameter "${e}" exists as a value but has no registered config.`);if("expr"in o||"select"in o)throw new Error(`The outer parameter "${e}" must not have expr or select properties!`);i=a=>{s.setValue(e,a)},g(this,ai).set(e,i)}else if("value"in n)r=_p(n,this),i=v(this,_A,nI).call(this,e,r);else if("expr"in n){const s=g(this,dt).registerDerived(g(this,_n),e,n.expr);g(this,Ti).set(e,s),i=()=>{throw new Error('Cannot set derived parameter "'+e+'".')}}else r=_p(n,this),i=v(this,_A,nI).call(this,e,r);if("select"in n){if(r??(r=_p(n,this)),!g(this,ai).has(e)){const s=g(this,dt).registerSelection(g(this,_n),e,r);g(this,Ti).set(e,s),g(this,ai).set(e,o=>{s.set(o),g(this,dt).flushNow()}),i=g(this,ai).get(e)}i(r)}return g(this,bo).set(e,n),i}allocateSetter(n,e,i=!1){if(Yi(n),g(this,ai).has(n))throw new Error("Setter already allocated for parameter: "+n);const r=g(this,dt).registerBase(g(this,_n),n,e,{notify:!i});g(this,Ti).set(n,r);const s=o=>{r.set(o),g(this,dt).flushNow()};return g(this,ai).set(n,s),s}setValue(n,e){Yi(n);const i=g(this,ai).get(n);if(!i)throw new Error("Writable parameter not found in this scope: "+n);i(e)}getValue(n){var e;return(e=g(this,Ti).get(n))==null?void 0:e.get()}subscribe(n,e){Yi(n);const i=this.findRuntimeForParam(n);if(!i)throw new Error("Parameter not found: "+n);const r=g(i,Ti).get(n);if(!r)throw new Error("Parameter found without local reference: "+n);return r.subscribe(e)}findValue(n){const e=this.findRuntimeForParam(n);return e==null?void 0:e.getValue(n)}get paramConfigs(){return g(this,bo)}findRuntimeForParam(n){var e;return g(this,Ti).has(n)?this:(e=g(this,Zu).call(this))==null?void 0:e.findRuntimeForParam(n)}createExpression(n){return g(this,dt).createExpression(g(this,_n),n)}watchExpression(n,e,i={}){var o;const r=this.createExpression(n),s=r.subscribe(e);return(i.scopeOwned??!0)&&g(this,dt).addScopeDisposer(g(this,_n),s),(o=i.registerDisposer)==null||o.call(i,s),r}evaluateAndGet(n){return this.createExpression(n)()}runInTransaction(n){return g(this,dt).runInTransaction(n)}flushNow(){g(this,dt).flushNow()}whenPropagated(n){return g(this,dt).whenPropagated(n)}dispose(){g(this,UA)||(Q(this,UA,!0),g(this,dt).disposeScope(g(this,_n)),g(this,ai).clear(),g(this,Ti).clear(),g(this,bo).clear())}hasPointSelections(){for(const n of g(this,bo).values())if(qi(n)){const e=n.select;if(Qe(e)){if(e=="point")return!0}else if(e.type=="point")return!0}return!1}}dt=new WeakMap,_n=new WeakMap,ai=new WeakMap,Ti=new WeakMap,bo=new WeakMap,Zu=new WeakMap,UA=new WeakMap,_A=new WeakSet,nI=function(n,e){const i=g(this,dt).registerBase(g(this,_n),n,e);g(this,Ti).set(n,i);const r=s=>{i.set(s),g(this,dt).flushNow()};return g(this,ai).set(n,r),r};function Ma(t,n){return!n||/^(data:|([A-Za-z]+:)?\/\/)/.test(t)||t.startsWith("/")?t:(n.endsWith("/")||(n+="/"),n+t)}function IK(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 Bn="VISIT_SKIP",xi="VISIT_STOP",qD=t=>t;class YD{constructor(n,e,i,r,s,o={}){S(this,Gn);S(this,ef);S(this,wc,{});S(this,tf,{});S(this,nf,{});S(this,GA);S(this,HA);S(this,rf,!1);$(this,"opacityFunction",qD);S(this,sf,[]);S(this,of,"none");$(this,"facetCoords",new Ir([],JSON.stringify));var a;if(!n)throw new Error("View spec must be defined!");if(this.context=e,this.layoutParent=i,this.dataParent=r,Q(this,ef,s),this.spec=n,this.resolutions={scale:{},axis:{}},J4(this),this.options={blockEncodingInheritance:!1,...o},this.flowHandle=void 0,this.needsAxes={x:!1,y:!1},this.paramRuntime=new EK(()=>{var c;return(c=this.dataParent)==null?void 0:c.paramRuntime}),n.params)for(const c of n.params)this.paramRuntime.registerParam(c);if(!((a=this.layoutParent)!=null&&a.options.layeredChildren)){const c=l=>this.paramRuntime.findRuntimeForParam(l)?void 0:this.paramRuntime.allocateSetter(l,0);Q(this,HA,c("height")),Q(this,GA,c("width"))}}get name(){return this.spec.name??g(this,ef)}get explicitName(){return this.spec.name}get defaultName(){return g(this,ef)}get coords(){return this.facetCoords.values().next().value}getPadding(){return this._cache("size/padding",()=>Pt.createFromConfig(this.spec.padding))}getOverhang(){return Pt.zero()}isScrollable(){return this.spec.viewportWidth!=null||this.spec.viewportHeight!=null}getSize(){return this._cache("size/size",()=>this.isConfiguredVisible()?new Pr(v(this,Gn,Xg).call(this,"width"),v(this,Gn,Xg).call(this,"height")):wD)}getViewportSize(){if(!this.isScrollable())return this.getSize();if(!this.isConfiguredVisible())return wD;const n=this.getSize();return new Pr(v(this,Gn,Xg).call(this,"viewportWidth")??n.width,v(this,Gn,Xg).call(this,"viewportHeight")??n.height)}registerStepSizeInvalidation(){v(this,Gn,iI).call(this,"width","x"),v(this,Gn,iI).call(this,"height","y")}isConfiguredVisible(){return this.context.isViewConfiguredVisible(this)}isVisibleInSpec(){return this.spec.visible??!0}isVisible(){return this.getLayoutAncestors().every(n=>n.isConfiguredVisible())}isDomainInert(){if(this.spec.domainInert)return!0;const n=this.dataParent;return n?n.isDomainInert():!1}getDataInitializationState(){return g(this,of)}_setDataInitializationState(n){Q(this,of,n)}isDataInitialized(){return g(this,of)==="ready"}getEffectiveOpacity(){var n;return this.opacityFunction(((n=this.layoutParent)==null?void 0:n.getEffectiveOpacity())??1)}getPathString(){return this.getLayoutAncestors().map(n=>n.name).reverse().join("/")}getLayoutAncestors(){return v(this,Gn,rI).call(this,"layoutParent")}getDataAncestors(){return v(this,Gn,rI).call(this,"dataParent")}handleBroadcast(n){for(const e of g(this,wc)[n.type]||[])e(n)}_addBroadcastHandler(n,e){let i=g(this,wc)[n];return i||(i=[],g(this,wc)[n]=i),i.push(e),()=>{const r=g(this,wc)[n];if(!r)return;const s=r.indexOf(e);s>=0&&r.splice(s,1)}}handleInteractionEvent(n,e,i){const r=i?g(this,tf):g(this,nf);for(const s of r[e.type]||[])s(n,e)}addInteractionEventListener(n,e,i){const r=i?g(this,tf):g(this,nf);let s=r[n];s||(s=[],r[n]=s),s.push(e)}removeInteractionEventListener(n,e,i){const r=i?g(this,tf):g(this,nf);let s=r==null?void 0:r[n];if(s){const o=s.indexOf(e);o>=0&&s.splice(o,1)}}visit(n){try{const e=n(this);if(n.postOrder&&n.postOrder(this),e!==xi)return e}catch(e){throw e.view=this,e}}getDescendants(){const n=[];return this.visit(e=>{n.push(e)}),n}dispose(){for(const e of g(this,sf))e();g(this,sf).length=0;const n=this.flowHandle;n!=null&&n.collector&&(this.context.dataFlow.pruneCollectorBranch(n.collector),this.context.dataFlow.removeCollector(n.collector)),n!=null&&n.dataSource&&n.dataSource.view===this&&!n.dataSource.identifier&&this.context.dataFlow.removeDataSource(n.dataSource),this.paramRuntime.dispose(),this.context.dataFlow.loadingStatusRegistry.delete(this),this.flowHandle=void 0}registerDisposer(n){g(this,sf).push(n)}disposeSubtree(){const n=()=>{};n.postOrder=e=>{e.dispose()},this.visit(n)}configureViewOpacity(){(!this.opacityFunction||this.opacityFunction===qD)&&(this.opacityFunction=BK(this))}onBeforeRender(){g(this,rf)||Q(this,rf,!0)}hasRendered(){return g(this,rf)}render(n,e,i={}){var r,s;i.firstFacet&&this.facetCoords.clear(),this.facetCoords.set(i.facetId,i.clipRect?e.intersect(i.clipRect):e),(r=g(this,GA))==null||r.call(this,e.width),(s=g(this,HA))==null||s.call(this,e.height)}getEncoding(){const n=this.dataParent&&!this.options.blockEncodingInheritance?this.dataParent.getEncoding():{},e=this.spec.encoding||{},i={...n,...e};for(const[r,s]of Object.entries(i))s===null&&delete i[r];return i}getFacetAccessor(n){if(this.layoutParent)return this.layoutParent.getFacetAccessor(this)}getFacetFields(n){var i;const e=this.getEncoding().sample;return Ai(e)?[e.field]:(i=this.layoutParent)==null?void 0:i.getFacetFields(this)}getSampleFacetTexture(){}getScaleResolution(n){const e=ks(n);return this.getDataAncestors().map(i=>i.resolutions.scale[e]).find(i=>i)}getAxisResolution(n){const e=ks(n);return this.getDataAncestors().map(i=>i.resolutions.axis[e]).find(i=>i)}getConfiguredResolution(n,e){var i,r;return(r=(i=this.spec.resolve)==null?void 0:i[e])==null?void 0:r[n]}getConfiguredOrDefaultResolution(n,e){return this.getConfiguredResolution(n,e)??this.getConfiguredResolution("default",e)??this.getDefaultResolution(n,e)}getDefaultResolution(n,e){return"independent"}getBaseUrl(){return ka(()=>{var n;return(n=this.dataParent)==null?void 0:n.getBaseUrl()},IK(this.spec.baseUrl))}isPickingSupported(){return!0}getTitleText(){const n=this.spec.title;if(n)return Qe(n)?n:at(n.text)?this.paramRuntime.evaluateAndGet(n.text.expr):n.text}_cache(n,e){return T0(this,n,e)}_invalidateCacheByPrefix(n,e="self"){switch(e){case"self":ud(this,n);break;case"ancestors":for(const i of this.getLayoutAncestors())ud(i,n);break;case"progeny":this.visit(i=>ud(i,n));break}}invalidateSizeCache(){ud(this,"size"),this._invalidateCacheByPrefix("size","ancestors")}propagateInteractionEvent(n){}}ef=new WeakMap,wc=new WeakMap,tf=new WeakMap,nf=new WeakMap,GA=new WeakMap,HA=new WeakMap,rf=new WeakMap,sf=new WeakMap,of=new WeakMap,Gn=new WeakSet,Xg=function(n){var s;let e=this.spec[n];const i=v2(e),r=n=="viewportWidth"||n=="viewportHeight";if(i){if(r)throw new Vt(`Cannot use step-based size with "${n}"!`,this);const o=e.step,a=(s=this.getScaleResolution(n=="width"?"x":"y"))==null?void 0:s.getScale();if(a){let c=0;if(yi(a.type))c=a.domain().length;else if(["locus","index"].includes(a.type)){const u=a.domain();c=Vi(u)-u[0]}else throw new Vt(`Cannot use step-based size with "${a.type}" scale!`,this);const l=a;return c=Hw(c,l.paddingInner(),l.paddingOuter()),{px:c*o,grow:0}}else throw new Vt(`Cannot use step-based size with "${n}"!`,this)}else return(e&&xD(e))??(r?void 0:{px:0,grow:1})},iI=function(n,e){const i=this.spec[n];if(!v2(i))return;const r=this.getScaleResolution(e);if(!r)throw new Vt("Cannot use 'step' size without a scale!",this);const s=()=>this.invalidateSizeCache();r.addEventListener("domain",s),this.registerDisposer(()=>r.removeEventListener("domain",s))},rI=function(n){const e=[];let i=this;do e.push(i),i=i[n];while(i);return e};function SK(t){return"unitsPerPixel"in t}function BK(t){const n="opacity"in t.spec?t.spec.opacity:void 0;if(n!==void 0){if(pt(n))return e=>e*n;if(SK(n)){const e=l=>{const u=t.getScaleResolution(l),f=u==null?void 0:u.getScale();if(["linear","index","locus"].includes(f==null?void 0:f.type))return{scale:f,scaleResolution:u}},i=jD(n.values,"opacity.values",t);if(!ot(n.unitsPerPixel))throw new Vt('"opacity.unitsPerPixel" must be an array.',t);let r=()=>1,s=[];const o=()=>{const l=jD(s.map(d=>d()),"opacity.unitsPerPixel",t),u=kK(l,i,t),f=Nw().domain(u.unitsPerPixel).range(u.values).clamp(!0);r=d=>f(d)};s=n.unitsPerPixel.map(l=>{if(at(l)){const u=t.paramRuntime.watchExpression(l.expr,()=>{o(),t.context.animator.requestRender()});return()=>u(null)}else return()=>l}),o();const a=l=>{const f=l.scaleResolution.getAxisLength()||1e3;return uh(l.scale.domain())/f};let c;if(n.channel==="auto"){const l=e("x"),u=e("y");if(l&&u)c=()=>(a(l)+a(u))/2;else if(l)c=()=>a(l);else if(u)c=()=>a(u);else throw new Vt("Cannot find a resolved quantitative x or y scale for dynamic opacity!",t)}else{const l=n.channel?e(n.channel):e("x")??e("y");if(!l)throw new Vt("Cannot find a resolved quantitative scale for dynamic opacity!",t);c=()=>a(l)}return l=>r(c())*l}else if(at(n)){const e=t.paramRuntime.watchExpression(n.expr,()=>t.context.animator.requestRender());return i=>e(null)*i}}return e=>e}function kK(t,n,e){if(!t.length)throw new Vt('"opacity.unitsPerPixel" must contain at least one stop.',e);if(t.length!==n.length)throw new Vt('"opacity.unitsPerPixel" and "opacity.values" must have the same length.',e);t.forEach((o,a)=>{if(o<=0)throw new Vt("Invalid opacity.unitsPerPixel value at index "+a+". Stop values must be positive.",e)});const i=t.map((o,a)=>({stop:o,value:n[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 Vt('"opacity.unitsPerPixel" must be strictly decreasing.',e);return{unitsPerPixel:r,values:s}}function jD(t,n,e){if(!ot(t))throw new Vt('"'+n+'" must evaluate to an array.',e);return t.map((i,r)=>{if(!pt(i)||!Number.isFinite(i))throw new Vt("Invalid "+n+" value at index "+r+". Expected a finite number.",e);return i})}const v2=t=>!!(t!=null&&t.step);function DK(t){return JD(t==null?void 0:t.key,"key")}function QK(t){return JD(t==null?void 0:t.search,"search")}function JD(t,n){if(!t)return;const e=Array.isArray(t)?t:[t];if(e.length===0)throw new Error("The "+n+" channel array must not be empty.");const i=[];for(const r of e){if(!r||typeof r!="object"||!("field"in r))throw new Error("The "+n+" channel must be a field definition or an array of field definitions.");const s=r.field;if(typeof s!="string")throw new Error("The "+n+" channel field definition must include a string field name.");i.push(s)}return i}const TK={point:kY,rect:CY,rule:RY,link:zY,text:$Y};class $e extends YD{constructor(e,i,r,s,o,a){super(e,i,r,s,o,a);S(this,X1);S(this,VA);S(this,$A,!1);S(this,af,null);this.spec=e;const c=TK[this.getMarkType()];if(c)this.mark=new c(this);else throw new Error(`No such mark: ${this.getMarkType()}`);this.resolve(),Q(this,VA,this.paramRuntime.allocateSetter("zoomLevel",1));for(const l of["x","y"]){const u=this.getScaleResolution(l);if(u){const f=()=>{g(this,VA).call(this,Math.sqrt(this.getZoomLevel()))};u.addEventListener("domain",f),this.registerDisposer(()=>u.removeEventListener("domain",f))}}this.needsAxes={x:!0,y:!0},v(this,X1,e9).call(this)}render(e,i,r={}){super.render(e,i,r),this.isConfiguredVisible()&&(e.pushView(this,i),e.renderMark(this.mark,r),e.popView(this))}getMarkType(){return typeof this.spec.mark=="object"?this.spec.mark.type:this.spec.mark}getEncoding(){const e=super.getEncoding(),i=this.mark.getSupportedChannels();for(const r of Object.keys(e))r!=="key"&&(i.includes(r)||delete e[r]);return e}resolve(e){if(!e){this.resolve("scale"),this.resolve("axis");return}const i=this.mark.encoding;for(const[r,s]of Object.entries(i)){if(!s||Array.isArray(s))continue;let o;if(jn(s))o=s;else if(Qy(s)){const l=s.condition;if(!Array.isArray(l)&&jn(l))o=l;else continue}else continue;const a=ks(o.resolutionChannel??r);if(!zh(a)||e=="axis"&&!Oh(a))continue;let c=this;for(;(c.getConfiguredOrDefaultResolution(a,e)=="forced"||c.dataParent&&["shared","excluded","forced"].includes(c.dataParent.getConfiguredOrDefaultResolution(a,e)))&&c.getConfiguredOrDefaultResolution(a,e)!="excluded";)c=c.dataParent;if(e=="axis"&&Oh(r)&&Ty(a)){c.resolutions[e][a]||(c.resolutions[e][a]=new Zj(a));const l=c.resolutions[e][a],u=l.registerMember({view:this,channel:r,channelDef:o});this.registerDisposer(()=>{u()&&c.resolutions[e][a]===l&&delete c.resolutions[e][a]})}else if(e=="scale"&&zh(r)){if(!c.resolutions[e][a]){const d=new Xj(a);c.resolutions[e][a]=d;const h=A=>{var p;(p=this.context.glHelper)==null||p.createRangeTexture(A.scaleResolution,!0)};d.addEventListener("range",h),d.addEventListener("domain",h),this.registerDisposer(()=>{d.removeEventListener("range",h),d.removeEventListener("domain",h)})}const l=!this.isDomainInert(),u=c.resolutions[e][a],f=u.registerMember({view:this,channel:r,channelDef:o,contributesToDomain:l});this.registerDisposer(()=>{f()&&c.resolutions[e][a]===u&&(u.dispose(),delete c.resolutions[e][a])})}}}dispose(){super.dispose(),this.mark.dispose()}getDataAccessor(e){var r;const i=this.mark.encoders;if(i)return(r=i[e])==null?void 0:r.dataAccessor}getSearchAccessors(){if(!g(this,af)){const e=QK(this.getEncoding())??[];Q(this,af,e.map(i=>ve(i)))}return g(this,af)}getFacetAccessor(e){const i=this.getDataAccessor("sample");return i||super.getFacetAccessor(this)}getCollector(){var e;return(e=this.flowHandle)==null?void 0:e.collector}registerDomainSubscriptions(){if(g(this,$A)||this.isDomainInert())return;const e=this.getCollector();if(!e)return;const i=this.mark.encoders;if(!i)throw new Error("Encoders are not initialized!");Q(this,$A,!0);const r=new Map;for(const s of Object.values(i)){if(!s)continue;const o=s.accessors??[];if(o.length!==0)for(const a of o){if(!OS(a)||a.channelDef.domainInert)continue;const c=this.getScaleResolution(a.scaleChannel);if(!c)throw new Error("Missing scale resolution for channel: "+a.scaleChannel);let l=r.get(c);l||(l=new Set,r.set(c,l)),l.add(a)}}for(const[s,o]of r){if(o.size===0)continue;const a=s.registerCollectorSubscriptions(e,o);this.registerDisposer(a)}}getZoomLevel(){const e=i=>{var r;return((r=this.getScaleResolution(i))==null?void 0:r.getZoomLevel())??1};return pa.map(e).reduce((i,r)=>i*r,1)}propagateInteractionEvent(e){this.handleInteractionEvent(void 0,e,!0),e.target=this,!e.stopped&&this.handleInteractionEvent(void 0,e,!1)}getDefaultResolution(e,i){return e=="x"?"shared":"independent"}}VA=new WeakMap,$A=new WeakMap,af=new WeakMap,X1=new WeakSet,e9=function(){for(const[e,i]of this.paramRuntime.paramConfigs){if(!("select"in i))continue;const r=Qr(i.select),s=r.on,o=r.clear;if(Qs(r)){let c=0;const l=h=>{this.paramRuntime.setValue(e,h)},u=()=>{var A;const h=this.context.getCurrentHover();return((A=h==null?void 0:h.mark)==null?void 0:A.unitView)===this?h.datum:null},f=s.filter?VD(s.filter):()=>!0,d=(h,A)=>{if(!f(A.proxiedMouseEvent))return;const p=u(),b=p?p[Yn]:0;let m;if(r.toggle)if(A.mouseEvent.shiftKey){if(p){const x=this.paramRuntime.getValue(e);m=d_(x,{toggle:[p]})}}else m=Op(p?[p]:null);else b!=c&&(c=b,m=Lp(p));m!==void 0&&l(m)};if(this.addInteractionEventListener(["mouseover","pointerover"].includes(s.type)?"mousemove":s.type,d),o){const h=o.filter?VD(o.filter):()=>!0,A=(p,b)=>{if(!h(b.proxiedMouseEvent))return;c=0;const m=r.toggle?Op():Lp(null);l(m)};this.addInteractionEventListener(o.type,A)}}}};function KD(t){const n=new Set;t.visit(e=>{for(const i of Object.values(e.resolutions.scale)){const r=i.name;if(r&&n.has(r))throw new Error(`The same scale name "${r}" occurs in multiple scale resolutions!`);n.add(r)}})}function RK(t){for(const n of pa){const e=t.getScaleResolution(n);e&&!e.name&&e.isZoomable()&&(e.name=`${n}_at_root`)}}function H0(t,n=()=>!0){return Promise.allSettled(t).then(e=>{if(n())for(const i of e)"value"in i?i.value.finalizeGraphicsInitialization():"reason"in i&&console.error(i.reason)})}function MK(t){const n=[];return t.visit(e=>{if(e instanceof $e){const i=e.getEncoding();for(const[r,s]of Object.entries(i))!Array.isArray(s)&&Ai(s)&&"type"in s&&n.push({view:e,channel:r,field:s.field,type:s.type});return Bn}}),n}async function FK(t,n,e){const i=t.import;if(!("url"in i))throw new Error("Not an url import: "+JSON.stringify(i));const r=ka(n,i.url);let s;try{const o=await fetch(r);if(!o.ok)throw new Error(`${o.status} ${o.statusText}`);s=await o.json()}catch(o){throw new Error(`Could not load imported view spec: ${r}. Reason: ${o.message}`)}if(e.isViewSpec(s))return s.baseUrl=ka(oD(i.url),s.baseUrl),s;throw new Error(`The imported spec "${r}" is not a view spec: ${JSON.stringify(t)}`)}function NK(t){const n=t.getSize(),e=t.getPadding(),i=(r,s)=>r.grow>0?void 0:r.px+s;return{width:i(n.width,e.horizontalTotal),height:i(n.height,e.verticalTotal)}}function*C2(t,n=[]){for(const[e,i]of t.entries())if(i instanceof Map)for(const r of C2(i,[...n,e]))yield r;else yield[[...n,e],i]}const WD=2147483647,PK=XD([WD]);function XD(t){let n=0;for(let e=0,i=t.length;e<i;e++)n=Math.max(n,t[e]);return Math.floor(Math.log2(n)/4)+1}function LK(t){const n=XD(t);let e=Array.from({length:t.length},(s,o)=>o),i=new Array(t.length);const r=new Array(16);for(let s=0;s<n;s++){r.fill(0);const o=s*4,a=Math.pow(16,s),c=l=>{const u=t[e[l]];return s>=PK?u>WD?Math.floor(u/a)%16:0:u>>o&15};for(let l=0;l<t.length;l++)r[c(l)]++;for(let l=1;l<16;l++)r[l]+=r[l-1];for(let l=t.length-1;l>=0;l--)i[--r[c(l)]]=e[l];[e,i]=[i,e]}return e}const V0="|",E2="\\";class OK{constructor(){S(this,lf);S(this,xc,null);S(this,ns,null);S(this,cf,!1)}invalidate(){Q(this,xc,null),Q(this,ns,null),Q(this,cf,!1)}findDatum(n,e,i){if(!n||n.length===0)return;const r=n.join(", ");if(n.length!==e.length)throw new Error(`Key tuple length ${e.length} does not match fields [${r}]`);(!g(this,xc)||!v(this,lf,n9).call(this,n))&&v(this,lf,t9).call(this,n,i);const s=g(this,ns);let o;if(g(this,cf)){let a="";for(let c=0;c<e.length;c++){c>0&&(a+=V0);const l=s[c],u=$0(e[c],l);a+=ZD(u)}o=a}else{const a=s[0];o=$0(e[0],a)}return g(this,xc).get(o)}}xc=new WeakMap,ns=new WeakMap,cf=new WeakMap,lf=new WeakSet,t9=function(n,e){const i=n.map(a=>ve(a)),r=new Map,s=n.join(", "),o=n.length!==1;if(o)for(const a of e)for(let c=0,l=a.length;c<l;c++){const u=a[c];let f="";for(let h=0;h<i.length;h++){h>0&&(f+=V0);const A=n[h],p=$0(i[h](u),A);f+=ZD(p)}if(r.get(f)!==void 0){const h=i.map(A=>A(u));throw new Error(`Duplicate key detected for fields [${s}]: ${JSON.stringify(h)}`)}r.set(f,u)}else{const a=i[0],c=n[0];for(const l of e)for(let u=0,f=l.length;u<f;u++){const d=l[u],h=$0(a(d),c);if(r.get(h)!==void 0)throw new Error(`Duplicate key detected for fields [${s}]: ${JSON.stringify(h)}`);r.set(h,d)}}Q(this,xc,r),Q(this,ns,[...n]),Q(this,cf,o)},n9=function(n){if(!g(this,ns)||g(this,ns).length!==n.length)return!1;for(let e=0;e<n.length;e++)if(g(this,ns)[e]!==n[e])return!1;return!0};function $0(t,n){if(t===void 0)throw new Error(`Key field "${n}" is undefined. Ensure all key fields are present in the data.`);if(t===null)throw new Error(`Key field "${n}" 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 "${n}" must be a scalar value (string, number, or boolean).`);return t}function zK(t){if(!(t.indexOf(E2)!==-1||t.indexOf(V0)!==-1))return t;let e="";for(let i=0;i<t.length;i++){const r=t[i];(r===E2||r===V0)&&(e+=E2),e+=r}return e}function ZD(t){return typeof t=="string"?zK(t):String(t)}class Id extends Lh{constructor(e){var i;super();S(this,jt);S(this,is,[]);S(this,qA,ve(Yn));S(this,yo,[]);S(this,uf,new OK);S(this,vc);S(this,ff);S(this,wo,new UK);this.params=e??{type:"collect"},this.observers=new Set,this.facetBatches=new Ir([],JSON.stringify),Q(this,ff,GK((i=this.params)==null?void 0:i.sort)),v(this,jt,sI).call(this)}get behavior(){return By}get label(){return"collect"}reset(){super.reset(),v(this,jt,sI).call(this)}handle(e){g(this,is).push(e)}beginBatch(e){g(this,uf).invalidate(),ZU(e)&&(Q(this,is,[]),this.facetBatches.set(Ye(e.facetId),g(this,is)))}complete(){var e;if(Q(this,is,[]),(e=this.params.groupby)!=null&&e.length){if(this.facetBatches.size>1)throw new Error("TODO: Support faceted data!");const i=this.facetBatches.get(void 0),r=this.params.groupby.map(o=>ve(o)),s=r.length>1?hh(i,...r):_K(i,r[0]);this.facetBatches.clear();for(const[o,a]of C2(s))this.facetBatches.set(o,a)}if(g(this,ff))for(const i of this.facetBatches.values())i.sort(g(this,ff));v(this,jt,i9).call(this),v(this,jt,oI).call(this),super.complete(),v(this,jt,aI).call(this);for(const i of this.observers)i(this)}observe(e){return this.observers.add(e),()=>{this.observers.delete(e)}}repropagate(){for(const e of this.children)e.reset();v(this,jt,oI).call(this);for(const e of this.children)e.complete();v(this,jt,aI).call(this)}getDomain(e,i,r){return g(this,wo).getDomain(e,()=>{const s=N0(i);if(r.constant)s.extend(r({}));else if(this.completed)for(const o of this.facetBatches.values())for(let a=0,c=o.length;a<c;a++)s.extend(r(o[a]));return s})}subscribeDomainChanges(e,i){return g(this,wo).subscribe(e,i)}getData(){switch(v(this,jt,kb).call(this),this.facetBatches.size){case 0:return[];case 1:return[...this.facetBatches.values()][0];default:{const e=this.facetBatches;return{[Symbol.iterator]:function*(){for(const r of e.values())yield*r}}}}}visitData(e){v(this,jt,kb).call(this);for(const i of this.facetBatches.values())for(let r=0;r<i.length;r++)e(i[r])}getItemCount(){let e=0;for(const i of this.facetBatches.values())e+=i.length;return e}findDatumByUniqueId(e){if(!g(this,yo).length)return;const i=ra(c=>c.start).right,r=g(this,qA),s=ra(c=>r(o(c))).left,o=c=>{const l=i(g(this,vc),c),u=g(this,vc)[l-1];return!u||c>=u.stop?void 0:this.facetBatches.get(u.facetId)[c-u.start]},a=s(g(this,yo),e);if(a>=0){const c=o(g(this,yo)[a]);if(c&&r(c)===e)return c}}findDatumByKey(e,i){return v(this,jt,kb).call(this),g(this,uf).findDatum(e,i,this.facetBatches.values())}}is=new WeakMap,qA=new WeakMap,yo=new WeakMap,uf=new WeakMap,vc=new WeakMap,ff=new WeakMap,wo=new WeakMap,jt=new WeakSet,sI=function(){Q(this,is,[]),Q(this,yo,[]),g(this,uf).invalidate(),this.facetBatches.clear(),this.facetBatches.set(void 0,g(this,is))},oI=function(){if(this.children.length)for(const[e,i]of this.facetBatches.entries()){if(e){const r={type:"facet",facetId:e};for(const s of this.children)s.beginBatch(r)}for(let r=0,s=i.length;r<s;r++)this._propagate(i[r])}},kb=function(){if(!this.completed)throw new Error("Data propagation is not completed! No data are available.")},aI=function(){g(this,wo).hasCachedDomains()&&g(this,wo).clear(),g(this,wo).notify()},i9=function(){var o;Q(this,vc,[]);const e=(o=this.facetBatches.values().next().value)==null?void 0:o[0];if(e==null||!(Yn in e))return;let i=0;const r=[],s=g(this,qA);for(const[a,c]of this.facetBatches){g(this,vc).push({start:i,stop:i+c.length,facetId:a}),i+=c.length;for(let l=0,u=c.length;l<u;l++)r.push(s(c[l]))}Q(this,yo,LK(r))};class UK{constructor(){S(this,Cc,new Map);S(this,rs,new Map)}hasCachedDomains(){return g(this,Cc).size>0}clear(){g(this,Cc).clear()}getDomain(n,e){const i=g(this,Cc).get(n);if(i)return i;{const r=e();return g(this,Cc).set(n,r),r}}subscribe(n,e){let i=g(this,rs).get(n);return i||(i=new Set,g(this,rs).set(n,i)),i.add(e),()=>{const r=g(this,rs).get(n);r&&(r.delete(e),r.size===0&&g(this,rs).delete(n))}}notify(){if(g(this,rs).size===0)return;const n=new Set;for(const e of g(this,rs).values())for(const i of e)n.add(i);for(const e of n)e()}}Cc=new WeakMap,rs=new WeakMap;function _K(t,n){const e=new Map;for(let i=0,r=t.length;i<r;i++){const s=t[i],o=n(s);let a=e.get(o);a||(a=[],e.set(o,a)),a.push(s)}return e}function GK(t){if(t!=null&&t.field){const n=Ye(t.field);if(n.length==1&&!n[0].includes(".")){const e=Ye(t.order)[0]??"ascending",i=JSON.stringify(n[0]);return new Function("a","b",`return a[${i}] ${e==="ascending"?"-":"+"} b[${i}];`)}return d3(t.field,t.order)}}class HK extends Ct{get behavior(){return $i}constructor(n){super(n),this.params=n,this.startAccessor=ve(n.start),this.endAccessor=ve(n.end),this.chromAccessor=n.chrom?ve(n.chrom):e=>{},this.weightAccessor=n.weight?ve(n.weight):e=>1,this.as={coverage:n.as??"coverage",start:n.asStart??n.start,end:n.asEnd??n.end,chrom:n.asChrom??n.chrom},this.createSegment=new Function("start","end","coverage","chrom","return {"+Object.entries(this.as).filter(([e,i])=>i).map(([e,i])=>`${JSON.stringify(i)}: ${e}`).join(", ")+"};"),this.ends=new Da}reset(){super.reset(),this.initialize()}initialize(){const n=this.as.coverage,e=this.as.end,i=this.as.chrom,r=this.startAccessor,s=this.endAccessor,o=this.chromAccessor,a=this.weightAccessor;let c,l,u,f=0,d=NaN;const h=this.ends;h.clear();const A=m=>{this._propagate(m),c=null},p=(m,w,x)=>{if(m==w)return;let y=!1;c&&(c[n]===x?(c[e]=w,y=!0):c[n]!=0&&A(c)),y||(c=this.createSegment(m,w,x,u))},b=()=>{let m=0;for(;(m=h.peekValue())!==void 0;)p(d,m,f),d=m,f-=h.pop();d=NaN,c&&A(c)};this.handle=m=>{const w=r(m);let x=0;for(;(x=h.peekValue())!==void 0&&x<w;)p(d,x,f),d=x,f-=h.pop();if(i){let E=o(m);E!==l&&(b(),u=E,l=u)}isNaN(d)||p(d,w,f),d=w;const y=a(m);f+=y,h.push(y,s(m))},this.complete=()=>{b(),super.complete()},this.beginBatch=m=>{b(),l=null,super.beginBatch(m)}}}function VK(t,n,e=s=>+s,i=0,r=t.length){const s=new Da,o=r-i;let a;for(a=0;a<n&&a<o;a++)s.push(a,e(t[i+a]));for(;a<o;a++){const u=e(t[i+a]);u>=s.peekValue()&&(s.push(a,u),s.pop())}const c=[];let l;for(;(l=s.pop())!==void 0;)c.push(t[i+l]);return c.reverse()}class $K{constructor(n,e=-1/0,i=1/0){this.maxSize=n,this.lowerLimit=e,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(n,e,i=0){if(n>=this.lowerLimits[i]&&e<=this.upperLimits[i]){const r=this.lowerChildren[i];if(r){const s=this._findSlot(n,e,r);return s>=0?s:this._findSlot(n,e,this.upperChildren[i])}else return i}else return-1}reserve(n,e){if(e-n<=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(n,e);if(i<0)return!1;const r=this.n++,s=this.n++;return this.lowerLimits[r]=this.lowerLimits[i],this.upperLimits[r]=n,this.lowerLimits[s]=e,this.upperLimits[s]=this.upperLimits[i],this.lowerChildren[i]=r,this.upperChildren[i]=s,!0}}class qK extends Ct{get behavior(){return By}constructor(n,e){if(super(n),this.params=n,this._data=[],this.channel=n.channel??"x",!["x","y"].includes(this.channel))throw new Error("Invalid channel: "+this.channel);this.startPosAccessor=ve(this.params.pos),this.endPosAccessor=ve(this.params.pos2??this.params.pos),this.startPosBisector=ra(this.startPosAccessor),this.endPosBisector=ra(this.endPosAccessor),this.scoreAccessor=ve(this.params.score),this.widthAccessor=ve(this.params.width),this.laneAccessor=this.params.lane?ve(this.params.lane):o=>0,this.padding=this.params.padding??0,this.reservationMaps=new Map,this.resolution=e.getScaleResolution(this.channel);const i=()=>this._filterAndPropagate();this.schedule=()=>e.context.animator.requestTransition(i);const r=()=>this.schedule();this.resolution.addEventListener("domain",r),this.registerDisposer(()=>this.resolution.removeEventListener("domain",r));const s=e._addBroadcastHandler("layoutComputed",()=>this.schedule());this.registerDisposer(s)}complete(){const n=this.startPosAccessor;this._data.sort((e,i)=>n(e)-n(i));for(const e of new Set(this._data.map(this.laneAccessor)))this.reservationMaps.set(e,new $K(200));this.schedule(),super.complete()}_filterAndPropagate(){super.reset();const n=this.resolution.getScale(),e=this.resolution.getAxisLength();if(!e)return;for(const o of this.reservationMaps.values())o.reset();const i=n.domain(),s=VK(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=n(this.startPosAccessor(o))*e,c=n(this.endPosAccessor(o))*e;const l=c-a,u=this.widthAccessor(o)+this.padding*2;let f=(a+c)/2;const d=Math.max(0,(l-u)/2);if(d>0){const h=Math.max(0,u/2-f);f+=Math.min(h,d);const A=Math.max(0,u/2+f-e);f-=Math.min(A,d)}if(this.reservationMaps.get(this.laneAccessor(o)).reserve(f-u/2,f+u/2))if(this.params.asMidpoint){const h=Object.assign({},o);h[this.params.asMidpoint]=n.invert(f/e),this._propagate(h)}else this._propagate(o)}super.complete()}reset(){super.reset(),this._data=[],this.groups=new Map}handle(n){this._data.push(n)}}class YK extends Ct{constructor(n,e){super(n,e),this.params=n,this.predicate=void 0}initialize(){let n="";if(jK(this.params))n=this.params.expr;else if(JK(this.params)){const e=this.paramRuntime.findValue(this.params.param);if(!e)throw new Error(`Cannot initialize filter transform. Selection parameter "${this.params.param}" not found!`);n=A_(this.params,e)}else throw new Error("Invalid filter params: "+JSON.stringify(this.params));this.predicate=this.paramRuntime.watchExpression(n,()=>this.repropagate(),{scopeOwned:!1,registerDisposer:e=>this.registerDisposer(e)})}handle(n){this.predicate(n)&&this._propagate(n)}}function jK(t){return"expr"in t}function JK(t){return"param"in t}class KK extends Ct{get behavior(){return $i}constructor(n){super(n),this.params=n;const e=n.index;if(n.fields){const i=Ye(n.fields).map(s=>ve(s)),r=Ye(n.as||n.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((c,l)=>c(s)??[]),a=o[0].length;for(let c=0;c<a;c++){const l=Object.assign({},s);for(let u=0;u<i.length;u++)l[r[u]]=c<o[u].length?o[u][c]:null;e&&(l[e]=c),this._propagate(l)}}}else this.handle=i=>{for(let r=0;r<i.length;r++){const s=Object.assign({},i[r]);e&&(s[e]=r),this._propagate(s)}}}}const WK=48;function*XK(t,n=","){const e=n.charCodeAt(0);let i=0;for(let r=0;r<t.length;r++){const s=t.charCodeAt(r);s==e?(yield i,i=0):i=i*10+s-WK}yield i}class ZK extends Ct{get behavior(){return $i}constructor(n){super(n);const e=ve(n.exons??"exons"),i=ve(n.start??"start"),[r,s]=n.as||["exonStart","exonEnd"];this.handle=o=>{let a=i(o),c=a,l=!0;const u=e(o);for(const f of XK(u)){if(l)c=a+f;else{a=c+f;const d=Object.assign({},o);d[r]=c,d[s]=a,this._propagate(d)}l=!l}}}}class eW extends Ct{get behavior(){return $i}constructor(n){super(n);const e=Ye(n.field).map(s=>ve(s)),i=Ye(n.separator),r=Ye(n.as||n.field);if(e.length!==i.length||e.length!==r.length)throw new Error(`Lengths of "separator" (${i.length}), "fields" (${e.length}), and "as" (${r.length}) do not match!`);this.handle=s=>{if(e.some(c=>!c(s)))return;const o=e.map((c,l)=>c(s).split(i[l]));tW(o,s);const a=o[0].length;for(let c=0;c<a;c++){const l=Object.assign({},s);for(let u=0;u<e.length;u++)l[r[u]]=o[u][c];this._propagate(l)}}}}function tW(t,n){const e=t.map(i=>i.length);if(!e.every(i=>i==e[0]))throw new Error("Mismatching number of elements in the fields to be split: "+JSON.stringify(n))}class nW extends Ct{get behavior(){return Bs}constructor(n,e){super(n,e),this.params=n,this.as=n.as,this.fn=void 0}initialize(){this.fn=this.paramRuntime.watchExpression(this.params.expr,()=>this.repropagate(),{scopeOwned:!1,registerDisposer:n=>this.registerDisposer(n)})}handle(n){n[this.as]=this.fn(n),this._propagate(n)}}class e5 extends Ct{get behavior(){return Bs}constructor(n,e){n={channel:"x",...n},super(n),this.params=n;const i=n.channel;if(!["x","y"].includes(i))throw new Error("Invalid channel: "+i);const r=e.getScaleResolution(i).getScale(),s="genome"in r?r.genome():void 0;if(!s)throw new Error("LinearizeGenomicCoordinate transform requires a locus scale!");const o=ve(n.chrom),a=Ye(n.pos).map(p=>ve(p)),c=Ye(n.as);if(a.length!=c.length)throw new Error('The number of "pos" and "as" elements must be equal!');const l=Ye(n.offset);let u;if(l.length==0)u=new Array(a.length).fill(0);else if(l.length==1)u=new Array(a.length).fill(l[0]);else if(l.length==a.length)u=l;else throw new Error(`Invalid "offset" parameter: ${JSON.stringify(n.offset)}!`);const f=new Function("datum","chromOffset","posAccessors",c.map((p,b)=>`datum[${JSON.stringify(p)}] = chromOffset + +posAccessors[${b}](datum) - ${u[b]};`).join(`
2333
2333
  `));let d,h=0;const A=p=>{if(p!==d){if(h=s.cumulativeChromPositions.get(p),h===void 0)return;d=p}return h};this.handle=p=>{const b=o(p),m=A(b);if(m===void 0)throw new Error(`Unknown chromosome/contig "${b}" in datum: ${JSON.stringify(p)}`);f(p,m,a),this._propagate(p)}}}const t5={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 iW extends Ct{get behavior(){return Bs}constructor(n,e){super(n,e),this.params=n;const i=hw(t5),r=ve(n.field),s=n.as;let o=0;if(at(n.fontSize)){const a=e.paramRuntime.watchExpression(n.fontSize.expr,()=>{o=a(),this.repropagate()},{scopeOwned:!1,registerDisposer:c=>this.registerDisposer(c)});o=a()}else o=n.fontSize;this.handle=a=>{const c=r(a);c!==void 0?a[s]=i.measureWidth(c,o):a[s]=0,this._propagate(a)}}}const rW=65536;class sW extends Ct{get behavior(){return Bs}constructor(n){super(n),this.params=n}reset(){super.reset(),this.initialize()}initialize(){const n=this.params,e=n.as||"lane",i=pt(n.spacing)?n.spacing:1,r=ve(n.start),s=ve(n.end);if(!n.preference!=!n.preferredOrder)throw new Error('Must specify both "preference" and "preferredOrder"');if(n.preference){const o=new Float64Array(rW),a=ve(n.preference),c=n.preferredOrder;let l=1/0;this.handle=u=>{const f=r(u);f<l&&o.fill(-1/0),l=f;const d=c.indexOf(a(u));let h=-1;if(d>=0&&o[d]<f)h=d;else{const A=r(u);for(h=0;h<o.length&&!(o[h]<A);h++);if(h>=o.length)throw new Error("Out of lanes!")}o[h]=s(u)+i,u[e]=h,this._propagate(u)}}else{const o=new Da,a=new Da;let c=-1/0,l=0;this.handle=u=>{const f=r(u);for(;o.length&&(o.peekValue()<=f||f<c);){const h=o.pop();a.push(h,h)}c=f;let d=a.pop();d===void 0&&(d=l++),u[e]=d,this._propagate(u),o.push(d,s(u)+i)}}}}class oW extends Ct{get behavior(){return $i}constructor(n){if(super(n),this.params=n,n.as&&n.as.length!=n.fields.length)throw new Error('"fields" and "as" have unequal lengths!');const e=n.fields.map(r=>ve(r)),i=n.as?n.as:e.map(tt);this.handle=r=>{const s={};for(let o=0;o<e.length;o++)s[i[o]]=e[o](r);this._propagate(s)}}}class aW extends Ct{get behavior(){return Bs}constructor(n){super(n),this.params=n;const e=new RegExp(n.regex),i=typeof n.as=="string"?[n.as]:n.as,r=ve(n.field);this.handle=s=>{const o=r(s);if(Qe(o)){const a=o.match(e);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 c=0;c<i.length;c++)s[i[c]]=a[c+1]}else if(n.skipInvalidInput)for(let c=0;c<i.length;c++)s[i[c]]=void 0;else throw new Error(`"${o}" does not match the given regex: ${e.toString()}`)}else if(!n.skipInvalidInput)throw new Error(`Trying to match a non-string field. Encountered type: ${typeof o}, field content: "${o}".`);this._propagate(s)}}}class cW extends Ct{get behavior(){return $i}constructor(n){super(n),this.params=n;const e=Ye(n.columnRegex).map(d=>new RegExp(d));for(const d of e)if(RegExp("|"+d.source).exec("").length-1!=1)throw new Error(`Regex ${d.toString()} must have exactly one capturing group!`);const i=Ye(n.asValue);if(e.length!=i.length)throw new Error('Lengths of "columnRegex" and "as" are not equal!');const r=n.skipRegex?new RegExp(n.skipRegex):void 0,s=n.asKey||"sample";let o,a,c;const l=d=>{var b;const h=Object.keys(d);for(const m of e)if(!h.some(w=>m.test(w)))throw new Error(`No columns matching the regex ${m.toString()} found in the data!`);const A=new Map;for(const[m,w]of e.entries())for(const x of h){const y=(b=w.exec(x))==null?void 0:b[1];if(y!==void 0){let E=A.get(y);E||(E=[],A.set(y,E)),E[m]=x}}o=[...A.entries()],a=h.filter(m=>!e.some(w=>w.test(m))&&!(r&&r.test(m)));const p=[...a.map(m=>JSON.stringify(m)+": datum["+JSON.stringify(m)+"]"),JSON.stringify(s)+": sampleId",...i.map((m,w)=>JSON.stringify(m)+`: datum[attrs[${w}]]`)];c=new Function("datum","sampleId","attrs",`return {
2334
2334
  `+p.join(`,
2335
2335
  `)+`
@@ -5666,7 +5666,7 @@ ${JSON.stringify(n.stats.first,null,2)}</pre
5666
5666
  }
5667
5667
  }
5668
5668
  }
5669
- `]);let vC=qo;customElements.define("gs-dataflow-inspector",vC);function eue(t,n={}){return qt("gs-dataflow-inspector",e=>{e.dataFlow=t,e.options=n})}const jr={name:"@genome-spy/app",description:"GenomeSpy-based visualization tool for analyzing multiple biological samples.",author:{name:"Kari Lavikka",email:"kari.lavikka@helsinki.fi"},contributors:[],license:"MIT",homepage:"https://genomespy.app/",version:"0.69.0",main:"dist/index.js",type:"module",exports:{".":"./dist/index.js","./schema.json":"./dist/schema.json"},files:["dist/"],repository:{type:"git",url:"github:genome-spy/genome-spy",directory:"packages/app"},scripts:{dev:"node dev-server.mjs",build:"rm -rf dist && mkdir -p dist && vite build && npm run build:schema","build:schema":"mkdir -p dist && ts-json-schema-generator --path 'src/spec/*.d.ts' --type AppRootSpec > dist/schema.json","test:tsc":"tsc -p tsconfig.json --noEmit",storybook:"storybook dev -p 6006","build-storybook":"storybook build",prepublishOnly:"npm run build"},dependencies:{"@floating-ui/dom":"^1.6.1","@fortawesome/fontawesome-free":"^6.4.2","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@genome-spy/core":"^0.69.0","@reduxjs/toolkit":"^2.11.0","d3-color":"^3.1.0",idb:"^7.1.1",lit:"^3.3.0","lz-string":"^1.4.4",mapsort:"^1.0.5",micromark:"^4.0.0","redux-undo":"^1.0.1"},gitHead:"bfb9bd98ceb875f90a458b876208b15b6c12c9f3"};class tue extends ct{constructor(){super(),this.dialogTitle="About GenomeSpy"}renderBody(){var n;return k` <div style="display: flex; gap: 1em">
5669
+ `]);let vC=qo;customElements.define("gs-dataflow-inspector",vC);function eue(t,n={}){return qt("gs-dataflow-inspector",e=>{e.dataFlow=t,e.options=n})}const jr={name:"@genome-spy/app",description:"GenomeSpy-based visualization tool for analyzing multiple biological samples.",author:{name:"Kari Lavikka",email:"kari.lavikka@helsinki.fi"},contributors:[],license:"MIT",homepage:"https://genomespy.app/",version:"0.69.1",main:"dist/index.js",type:"module",exports:{".":"./dist/index.js","./schema.json":"./dist/schema.json"},files:["dist/"],repository:{type:"git",url:"github:genome-spy/genome-spy",directory:"packages/app"},scripts:{dev:"node dev-server.mjs",build:"rm -rf dist && mkdir -p dist && vite build && npm run build:schema","build:schema":"mkdir -p dist && ts-json-schema-generator --path 'src/spec/*.d.ts' --type AppRootSpec > dist/schema.json","test:tsc":"tsc -p tsconfig.json --noEmit",storybook:"storybook dev -p 6006","build-storybook":"storybook build",prepublishOnly:"npm run build"},dependencies:{"@floating-ui/dom":"^1.6.1","@fortawesome/fontawesome-free":"^6.4.2","@fortawesome/fontawesome-svg-core":"^6.4.2","@fortawesome/free-solid-svg-icons":"^6.4.2","@genome-spy/core":"^0.69.1","@reduxjs/toolkit":"^2.11.0","d3-color":"^3.1.0",idb:"^7.1.1",lit:"^3.3.0","lz-string":"^1.4.4",mapsort:"^1.0.5",micromark:"^4.0.0","redux-undo":"^1.0.1"},gitHead:"bbbc1860a0730070d0a7c1ca7a9923d4a5d25366"};class tue extends ct{constructor(){super(),this.dialogTitle="About GenomeSpy"}renderBody(){var n;return k` <div style="display: flex; gap: 1em">
5670
5670
  <div style="width: 8em">
5671
5671
  <img title="GenomeSpy" alt="GenomeSpy" src="${q2}" />
5672
5672
  </div>
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "contributors": [],
9
9
  "license": "MIT",
10
10
  "homepage": "https://genomespy.app/",
11
- "version": "0.69.0",
11
+ "version": "0.69.1",
12
12
  "main": "dist/index.js",
13
13
  "type": "module",
14
14
  "exports": {
@@ -37,7 +37,7 @@
37
37
  "@fortawesome/fontawesome-free": "^6.4.2",
38
38
  "@fortawesome/fontawesome-svg-core": "^6.4.2",
39
39
  "@fortawesome/free-solid-svg-icons": "^6.4.2",
40
- "@genome-spy/core": "^0.69.0",
40
+ "@genome-spy/core": "^0.69.1",
41
41
  "@reduxjs/toolkit": "^2.11.0",
42
42
  "d3-color": "^3.1.0",
43
43
  "idb": "^7.1.1",
@@ -47,5 +47,5 @@
47
47
  "micromark": "^4.0.0",
48
48
  "redux-undo": "^1.0.1"
49
49
  },
50
- "gitHead": "bfb9bd98ceb875f90a458b876208b15b6c12c9f3"
50
+ "gitHead": "bbbc1860a0730070d0a7c1ca7a9923d4a5d25366"
51
51
  }