semiotic 3.13.0 → 3.13.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/README.md +53 -41
- package/ai/artifact-surface-inventory.json +1 -1
- package/ai/dist/mcp-server.js +132 -106
- package/ai/reference.md +12 -4
- package/ai/schema.json +16 -2
- package/ai/surface-manifest.json +1 -1
- package/ai/task-packets/compare-category-totals.json +5 -5
- package/ai/task-packets/compare-category-totals.md +2 -2
- package/ai/task-packets/correct-published-chart.json +5 -5
- package/ai/task-packets/correct-published-chart.md +2 -2
- package/ai/task-packets/index.json +6 -6
- package/ai/task-packets/update-live-chart.json +5 -5
- package/ai/task-packets/update-live-chart.md +2 -2
- package/dist/{c-CRKR5M42.min.js → c-2M2OPWVA.min.js} +37 -37
- package/dist/c-3GIPT46Z.min.js +1 -0
- package/dist/c-3UXQGCQT.min.js +1 -0
- package/dist/{c-MHNU6KYQ.min.js → c-4P2EM44G.min.js} +3 -3
- package/dist/c-4RVDKSMQ.min.js +1 -0
- package/dist/{c-6MEEA5VY.min.js → c-4YPPVFZH.min.js} +1 -1
- package/dist/{c-6MPP6QF5.min.js → c-62JIVHK5.min.js} +1 -1
- package/dist/{c-KYRH3XKJ.min.js → c-6QCSRJSC.min.js} +1 -1
- package/dist/c-6WJKNYIG.min.js +1 -0
- package/dist/c-7BVQDXFU.min.js +1 -0
- package/dist/c-7UN2WUMI.min.js +1 -0
- package/dist/c-AQUX6L2O.min.js +1 -0
- package/dist/c-BR5QDUCR.min.js +1 -0
- package/dist/c-C3YQVUB6.min.js +1 -0
- package/dist/{c-RQ2XZHWY.min.js → c-COP4OISO.min.js} +1 -1
- package/dist/c-ENRZPF5E.min.js +1 -0
- package/dist/c-HBLICBM6.min.js +1 -0
- package/dist/{c-EQVM754Z.min.js → c-HGWITEJI.min.js} +1 -1
- package/dist/{c-3K2FJDLE.min.js → c-I54V24WG.min.js} +1 -1
- package/dist/c-IDCFMBA4.min.js +2 -0
- package/dist/{c-TPL7X32J.min.js → c-ISHYKYII.min.js} +1 -1
- package/dist/c-KSSS3HSA.min.js +1 -0
- package/dist/c-LEICSI5V.min.js +1 -0
- package/dist/c-LJ4XY3Z3.min.js +1 -0
- package/dist/c-MBE6PPHN.min.js +1 -0
- package/dist/c-MOK4RWNO.min.js +1 -0
- package/dist/c-N2TVSOYL.min.js +2 -0
- package/dist/{c-EAAKQIUZ.min.js → c-NHZ2E3CI.min.js} +1 -1
- package/dist/{c-MDY3ULP6.min.js → c-OBA7XSLH.min.js} +1 -1
- package/dist/c-OIJL2WZH.min.js +1 -0
- package/dist/c-ONOWKUUZ.min.js +1 -0
- package/dist/{c-CPJR4LHF.min.js → c-OSLNYZ3Q.min.js} +17 -17
- package/dist/c-PBFRYNKM.min.js +1 -0
- package/dist/c-QUAEYF34.min.js +1 -0
- package/dist/c-RDFFLRKC.min.js +1 -0
- package/dist/c-SDGGMIYI.min.js +1 -0
- package/dist/c-SQQZPFVY.min.js +1 -0
- package/dist/c-SU6Z75M2.min.js +1 -0
- package/dist/{c-BWM7MU2Y.min.js → c-SX4TPG3Z.min.js} +1 -1
- package/dist/{c-DTYG34WG.min.js → c-VGHU2LTF.min.js} +2 -2
- package/dist/c-VLWWXOM5.min.js +1 -0
- package/dist/c-VZNIIKL6.min.js +1 -0
- package/dist/{c-GBO32OML.min.js → c-W5ATXREF.min.js} +1 -1
- package/dist/c-WSWMQDFZ.min.js +1 -0
- package/dist/{c-3SDC7AQQ.min.js → c-XM76UG3P.min.js} +1 -1
- package/dist/c-XORVM6C5.min.js +1 -0
- package/dist/{c-MYRI7NF2.min.js → c-XZJWL7UL.min.js} +1 -1
- package/dist/c-Y43GTKGR.min.js +1 -0
- package/dist/c-YGTMWEEF.min.js +1 -0
- package/dist/c-ZFIURPZA.min.js +1 -0
- package/dist/c-ZWJDTDEV.min.js +1 -0
- package/dist/c-ZYMXDR42.min.js +1 -0
- package/dist/components/ai/chartClinic.d.ts +4 -0
- package/dist/components/ai/evaluateChart.d.ts +3 -1
- package/dist/components/ai/generativeChart.d.ts +13 -0
- package/dist/components/ai/renderEvidenceMemoKey.d.ts +9 -0
- package/dist/components/ai/reportRenderError.d.ts +2 -0
- package/dist/components/charts/physics/eventDropSources.d.ts +1 -1
- package/dist/components/evidence/claimReferences.d.ts +9 -0
- package/dist/components/realtime/BinAccumulator.d.ts +5 -0
- package/dist/components/recipes/atlas/dependencyEvidence.d.ts +5 -0
- package/dist/components/recipes/atlas/support.d.ts +5 -0
- package/dist/components/server/staticXYAxisTicks.d.ts +1 -1
- package/dist/components/stream/MarginalGraphics.d.ts +4 -2
- package/dist/components/stream/PipelineStore.d.ts +6 -18
- package/dist/components/stream/axisTickUtils.d.ts +1 -1
- package/dist/components/stream/countNoun.d.ts +2 -0
- package/dist/components/stream/heatmapBandTicks.d.ts +68 -0
- package/dist/components/stream/pipelineDomainResolution.d.ts +52 -3
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +8 -0
- package/dist/components/stream/uniqueRegionLabel.d.ts +6 -0
- package/dist/components/stream/xyAxisTicks.d.ts +8 -1
- package/dist/components/stream/xyFrameAxisTypes.d.ts +4 -2
- package/dist/components/stream/xySceneBuilders/types.d.ts +6 -0
- package/dist/geo.min.js +152 -152
- package/dist/geo.module.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/physicsWorker.js +1 -1
- package/dist/processSankeyLayoutWorker.js +1 -1
- package/dist/semiotic-access.module.min.js +2 -2
- package/dist/semiotic-ai-core.min.js +5 -5
- package/dist/semiotic-ai-core.module.min.js +4 -4
- package/dist/semiotic-ai.module.min.js +2 -2
- package/dist/semiotic-artifact.min.js +6 -6
- package/dist/semiotic-artifact.module.min.js +2 -2
- package/dist/semiotic-atlas-core.min.js +1 -1
- package/dist/semiotic-atlas-core.module.min.js +1 -1
- package/dist/semiotic-atlas-selection.module.min.js +1 -1
- package/dist/semiotic-client-cjs-shared.min.js +1023 -1023
- package/dist/semiotic-evidence.min.js +4 -4
- package/dist/semiotic-evidence.module.min.js +3 -3
- package/dist/semiotic-experimental-auxiliary.module.min.js +1 -1
- package/dist/semiotic-experimental-node-auxiliary.module.min.js +1 -1
- package/dist/semiotic-experimental-react-shared.module.min.js +1 -1
- package/dist/semiotic-experimental-vacp.min.js +1 -1
- package/dist/semiotic-experimental-vacp.module.min.js +1 -1
- package/dist/semiotic-line.module.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-recipes-core-cjs-base.min.js +101 -101
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-server-edge-node.module.min.js +3 -3
- package/dist/semiotic-server-edge.min.js +397 -397
- package/dist/semiotic-server-edge.module.min.js +3 -3
- package/dist/semiotic-server-node.min.js +397 -397
- package/dist/semiotic-utils-core.min.js +11 -11
- package/dist/semiotic-utils-core.module.min.js +3 -3
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +397 -397
- package/dist/server.module.min.js +3 -3
- package/dist/xy.module.min.js +1 -1
- package/package.json +2 -2
- package/dist/c-3OBJLOXI.min.js +0 -1
- package/dist/c-4VFGNUWG.min.js +0 -1
- package/dist/c-5BN7GWJH.min.js +0 -1
- package/dist/c-65GMYND6.min.js +0 -1
- package/dist/c-AGRMJIUH.min.js +0 -1
- package/dist/c-BJKGYOPX.min.js +0 -1
- package/dist/c-C332PFY6.min.js +0 -1
- package/dist/c-DDZ5TZ7P.min.js +0 -1
- package/dist/c-F4DZ3NMI.min.js +0 -1
- package/dist/c-GZJ2XEQ5.min.js +0 -1
- package/dist/c-HFQ3Z65X.min.js +0 -1
- package/dist/c-HNW73MXJ.min.js +0 -1
- package/dist/c-HWFZB7SD.min.js +0 -1
- package/dist/c-IIV4DB7T.min.js +0 -1
- package/dist/c-J2QH3PEI.min.js +0 -1
- package/dist/c-JZNWRFVJ.min.js +0 -2
- package/dist/c-KHLBCSIO.min.js +0 -1
- package/dist/c-L7FQHKGH.min.js +0 -1
- package/dist/c-LYPOBMKC.min.js +0 -1
- package/dist/c-NGMMPKNJ.min.js +0 -1
- package/dist/c-NOME4L5M.min.js +0 -1
- package/dist/c-OKIJBK5K.min.js +0 -2
- package/dist/c-OXV4W7YX.min.js +0 -1
- package/dist/c-P73SQZEP.min.js +0 -1
- package/dist/c-PD5EZI24.min.js +0 -1
- package/dist/c-RAL7HCTV.min.js +0 -1
- package/dist/c-S4OGXAVO.min.js +0 -1
- package/dist/c-UWE3VZEO.min.js +0 -1
- package/dist/c-VP7WX6QI.min.js +0 -1
- package/dist/c-VW7ZSLDC.min.js +0 -1
- package/dist/c-WDVYLMCM.min.js +0 -1
- package/dist/c-XEACLH4B.min.js +0 -1
- package/dist/c-YJDGSPNB.min.js +0 -1
- package/dist/c-ZYBEKQCT.min.js +0 -1
package/dist/c-DDZ5TZ7P.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e,h as t,f as i,c as r,e as s,a as n,d as a}from"./c-UWE3VZEO.min.js";import{a as o}from"./c-ORLEBW72.min.js";import{a as l}from"./c-ZYBEKQCT.min.js";import{b as c,a as u}from"./c-KQEOKGYV.min.js";import{a as h}from"./c-TDPGVYQW.min.js";import{a as d}from"./c-QAVFOEUY.min.js";import{d as f,f as p,e as g,h as y,k as m,c as x,i as v,j as b,b as k}from"./c-6MEEA5VY.min.js";import{c as A,d as w,k as S,j as C}from"./c-YJDGSPNB.min.js";import{c as M,a as R,g as P,f as T,h as D,e as E,i as L,k as $,l as B,j as _}from"./c-RAL7HCTV.min.js";import{e as I}from"./c-5XCN6BMT.min.js";import{a as F}from"./c-FBV4S363.min.js";import{a as z,b as N}from"./c-L3WAZ53J.min.js";import{b as O}from"./c-V4XMSLC3.min.js";import{a as Y}from"./c-2N7IU2NY.min.js";import{b as W,d as V,c as j,a as X}from"./c-YLZIV3VS.min.js";import{f as G,e as H,d as U,a as q,b as J,c as K,o as Q,l as Z,j as ee,k as te,s as ie,v as re,t as se,u as ne,m as ae,y as oe,B as le,h as ce,i as ue,O as he,p as de,C as fe,q as pe,w as ge,D as ye,g as me,r as xe}from"./c-GBO32OML.min.js";import{c as ve}from"./c-363Q2L4Z.min.js";import{k as be,l as ke,p as Ae,q as we,E as Se,u as Ce,t as Me,K as Re,Q as Pe,J as Te,S as De,R as Ee,U as Le,A as $e,Z as Be,W as _e,ai as Ie,ab as Fe,Y as ze,aa as Ne,X as Oe,ac as Ye,H as We,am as Ve,aJ as je,aS as Xe,ag as Ge,aX as He,aB as Ue,aj as qe,ak as Je,b as Ke,m as Qe,aF as Ze,ae as et,ah as tt,G as it,aT as rt,ad as st,aE as nt,aC as at,aD as ot,at as lt,az as ct,av as ut,ax as ht,o as dt,an as ft,aG as pt,bi as gt}from"./c-VW7ZSLDC.min.js";import{d as yt}from"./c-KLJDKRD5.min.js";import{c as mt,a as xt,d as vt}from"./c-SIQVOV6A.min.js";import{s as bt,o as kt,p as At}from"./c-WPL6PGP3.min.js";import{o as wt,a as St,i as Ct,k as Mt,m as Rt,s as Pt,q as Tt,e as Dt}from"./c-BJKGYOPX.min.js";import{b as Et,i as Lt}from"./c-ELGOCAEY.min.js";import{m as $t,y as Bt,t as _t,s as It,z as Ft,h as zt}from"./c-TC47SNSI.min.js";import{f as Nt}from"./c-5PCO2P5Q.min.js";import{d as Ot}from"./c-I4BEWAKT.min.js";import*as Yt from"react";import{useCallback as Wt,useImperativeHandle as Vt,useRef as jt,useState as Xt,useEffect as Gt,useMemo as Ht,useId as Ut,memo as qt,forwardRef as Jt}from"react";import{jsx as Kt,jsxs as Qt,Fragment as Zt}from"react/jsx-runtime";import{scaleLog as ei,scaleSymlog as ti,scaleUtc as ii,scaleTime as ri,scaleLinear as si}from"d3-scale";import{quadtree as ni}from"d3-quadtree";import{line as ai,area as oi}from"d3-shape";var li=null,ci=null;function ui(e){let[t,i]=Yt.useState(()=>li);return Yt.useEffect(()=>{if(t)return;let e=!1;return(li?Promise.resolve(li):(ci||(ci=import("./c-5BN7GWJH.min.js").then(e=>li=e.XYBrushOverlay).catch(e=>{throw ci=null,e})),ci)).then(t=>{e||i(()=>t)}),()=>{e=!0}},[t]),t?Kt(t,{...e}):null}var hi=null,di=null;function fi(){return hi}function pi(){return hi?Promise.resolve(hi):(di??(di=import("./c-ZDCTFRA6.min.js").then(e=>hi=e.xyTransitionEngine).catch(e=>{throw di=null,e})),di)}var gi=/*#__PURE__*/new Set;function yi(e,t){let i="function"==typeof e?e:i=>i[e||t];return e=>{let t=i(e);return null==t?Number.NaN:+t}}function mi(e){let t=[],i=["bar","swarm","waterfall"].includes(e.chartType)||"streaming"===e.runtimeMode,r=yi(i&&e.valueAccessor||e.yAccessor,i?"value":"y");if(e.boundsAccessor){let i=W(e.boundsAccessor,"bounds");t.push({kind:"bounds",getTop:e=>{let t=r(e);if(!Number.isFinite(t))return Number.NaN;let s=i(e);return Number.isFinite(s)&&0!==s?t+s:t},getBottom:e=>{let t=r(e);if(!Number.isFinite(t))return Number.NaN;let s=i(e);return Number.isFinite(s)&&0!==s?t-s:t},style:e.boundsStyle,perSeries:!0,interactive:!1})}if(e.band){let i=Array.isArray(e.band)?e.band:[e.band];for(let e of i)t.push({kind:"band",getTop:yi(e.y1Accessor,"y1"),getBottom:yi(e.y0Accessor,"y0"),style:e.style,perSeries:!1!==e.perSeries,interactive:!0===e.interactive})}return t}function xi(e,t){return t?[t[0]??e[0],t[1]??e[1]]:e}function vi(e,t,i){if("log"===e){let e=[Math.max(t[0],1e-6),Math.max(t[1],1e-6)];return ei().domain(e).range(i).clamp(!0)}return"symlog"===e?ti().domain(t).range(i):"time"===e||"utc"===e?("utc"===e?ii():ri()).domain([new Date(t[0]),new Date(t[1])]).range(i):si().domain(t).range(i)}var bi="_default";function ki(e,t){return e&&"object"==typeof e&&!Array.isArray(e)?bt(e,t):void 0}var Ai=["data","domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],wi=["scene-style","data-paint","accessibility","evidence"],Si=(e,t)=>({retainedData:e,invalidations:t}),Ci=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Mi=["layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Ri=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Pi=["layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Ti=["scene-geometry","data-paint","accessibility","evidence"],Di=["scene-style","data-paint","accessibility","evidence"],Ei=["overlay","accessibility","evidence"],Li=[],$i={chartType:/*#__PURE__*/Si("rebuild",Ci),runtimeMode:/*#__PURE__*/Si("rebuild",Ci),xAccessor:/*#__PURE__*/Si("rebuild",Ci),yAccessor:/*#__PURE__*/Si("rebuild",Ci),timeAccessor:/*#__PURE__*/Si("rebuild",Ci),valueAccessor:/*#__PURE__*/Si("rebuild",Ci),y0Accessor:/*#__PURE__*/Si("rebuild",Ci),boundsAccessor:/*#__PURE__*/Si("rebuild",Ci),band:/*#__PURE__*/Si("rebuild",Ci),openAccessor:/*#__PURE__*/Si("rebuild",Ci),highAccessor:/*#__PURE__*/Si("rebuild",Ci),lowAccessor:/*#__PURE__*/Si("rebuild",Ci),closeAccessor:/*#__PURE__*/Si("rebuild",Ci),candlestickRangeMode:/*#__PURE__*/Si("rebuild",Ci),accessorRevision:/*#__PURE__*/Si("rebuild",Ci),groupAccessor:/*#__PURE__*/Si("rebuild",Mi),categoryAccessor:/*#__PURE__*/Si("rebuild",Mi),lineDataAccessor:/*#__PURE__*/Si("rebuild",Mi),colorAccessor:/*#__PURE__*/Si("rebuild",Di),sizeAccessor:/*#__PURE__*/Si("rebuild",Ti),symbolAccessor:/*#__PURE__*/Si("rebuild",Ti),pointIdAccessor:/*#__PURE__*/Si("rebuild",Ti),xScaleType:/*#__PURE__*/Si("preserve",Ri),yScaleType:/*#__PURE__*/Si("preserve",Ri),xExtent:/*#__PURE__*/Si("preserve",Ri),invertY:/*#__PURE__*/Si("preserve",Ri),yExtent:/*#__PURE__*/Si("preserve",Ri),extentPadding:/*#__PURE__*/Si("preserve",Ri),scalePadding:/*#__PURE__*/Si("preserve",Ri),axisExtent:/*#__PURE__*/Si("preserve",Ri),yAxisExtent:/*#__PURE__*/Si("preserve",Ri),binSize:/*#__PURE__*/Si("preserve",Ri),binAlign:/*#__PURE__*/Si("preserve",Ri),normalize:/*#__PURE__*/Si("preserve",Ri),heatmapAggregation:/*#__PURE__*/Si("preserve",Ri),heatmapXBins:/*#__PURE__*/Si("preserve",Ri),heatmapYBins:/*#__PURE__*/Si("preserve",Ri),arrowOfTime:/*#__PURE__*/Si("preserve",Pi),baseline:/*#__PURE__*/Si("preserve",Pi),stackOrder:/*#__PURE__*/Si("preserve",Pi),sizeRange:/*#__PURE__*/Si("preserve",Pi),curve:/*#__PURE__*/Si("preserve",Pi),areaGroups:/*#__PURE__*/Si("preserve",Pi),customLayout:/*#__PURE__*/Si("preserve",Pi),layoutConfig:/*#__PURE__*/Si("preserve",Pi),layoutMargin:/*#__PURE__*/Si("preserve",Pi),symbolMap:/*#__PURE__*/Si("preserve",Ti),showValues:/*#__PURE__*/Si("preserve",Ti),heatmapValueFormat:/*#__PURE__*/Si("preserve",Ti),trackHoverRows:/*#__PURE__*/Si("preserve",Ti),lineStyle:/*#__PURE__*/Si("preserve",Di),pointStyle:/*#__PURE__*/Si("preserve",Di),areaStyle:/*#__PURE__*/Si("preserve",Di),barStyle:/*#__PURE__*/Si("preserve",Di),swarmStyle:/*#__PURE__*/Si("preserve",Di),waterfallStyle:/*#__PURE__*/Si("preserve",Di),candlestickStyle:/*#__PURE__*/Si("preserve",Di),boundsStyle:/*#__PURE__*/Si("preserve",Di),gradientFill:/*#__PURE__*/Si("preserve",Di),lineGradient:/*#__PURE__*/Si("preserve",Di),semanticLineStops:/*#__PURE__*/Si("preserve",Di),colorScheme:/*#__PURE__*/Si("preserve",Di),themeCategorical:/*#__PURE__*/Si("preserve",Di),themeSemantic:/*#__PURE__*/Si("preserve",Di),themeSequential:/*#__PURE__*/Si("preserve",Di),themeDiverging:/*#__PURE__*/Si("preserve",Di),barColors:/*#__PURE__*/Si("preserve",Di),decay:/*#__PURE__*/Si("preserve",Di),pulse:/*#__PURE__*/Si("preserve",Di),staleness:/*#__PURE__*/Si("preserve",Di),layoutSelection:/*#__PURE__*/Si("preserve",Di),annotations:/*#__PURE__*/Si("preserve",Ei),windowSize:/*#__PURE__*/Si("preserve",Li),windowMode:/*#__PURE__*/Si("preserve",Li),maxCapacity:/*#__PURE__*/Si("preserve",Li),clock:/*#__PURE__*/Si("preserve",Li),transition:/*#__PURE__*/Si("preserve",Li),introAnimation:/*#__PURE__*/Si("preserve",Li),onLayoutError:/*#__PURE__*/Si("preserve",Li)},Bi=/*#__PURE__*/Si("preserve",Pi),_i=class{constructor(){this.tracker=new ke}get last(){return this.tracker.last}subscribe(e){return this.tracker.subscribe(e)}recordData(e,t){return this.tracker.record({kind:e,...void 0===t?{}:{count:t}},Ai)}recordNoop(e){return this.tracker.record({kind:e,..."restyle"===e?{}:{count:0}},[])}recordRestyle(e){return e?this.tracker.record({kind:"restyle"},wi):this.recordNoop("restyle")}recordConfig(e,t=!1){let i=function(e){let t="preserve",i=new Set;for(let r of e){let e=Object.prototype.hasOwnProperty.call($i,r)?$i[r]:Bi;"rebuild"===e.retainedData&&(t="rebuild");for(let t of e.invalidations)i.add(t)}return{retainedData:t,invalidations:i}}(e);return this.tracker.record({kind:"config",keys:e},t?new Set([...i.invalidations,...Ti]):i.invalidations)}},Ii=class{constructor(){this.maxRadius=0,this.tree=null}get quadtree(){return this.tree}get maxPointRadius(){return this.maxRadius}clear(){this.tree=null,this.maxRadius=0}rebuild(e,t){if("scatter"!==e&&"bubble"!==e&&"custom"!==e)return void this.clear();let i=0,r=0;for(let e of t)"point"===e.type&&!1!==e.interactive&&(i++,e.r>r&&(r=e.r));if(this.maxRadius=r,i<=500)return void(this.tree=null);let s=new Array(i),n=0;for(let e of t)"point"===e.type&&!1!==e.interactive&&(s[n++]=e);this.tree=ni().x(e=>e.x).y(e=>e.y).addAll(s)}},Fi=class extends G{constructor(e){super(),this.xExtent=new f,this.yExtent=new f,this.growingCapacityWarned=!1,this.windowSizeWarned=!1,this.resolvedRibbons=[],this.timestampBuffer=null,this.activeTransition=null,this._hasRenderedOnce=!1,this.prevPositionMap=new Map,this.prevPathMap=new Map,this.exitNodes=[],this.lastIngestTime=0,this._colorMapCache=null,this._groupDataCache=null,this._groupColorMap=new Map,this._groupColorCounter=0,this._barCategoryCache=null,this._binBoundaries=[],this._stackExtentCache=null,this._ingestVersion=0,this._datumIndexCache=null,this._bufferArrayCache=null,this._bufferDirty=!0,this.needsFullRebuild=!0,this.lastLayout=null,this.updateResults=new _i,this.scales=null,this.scene=[],this.version=0,this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customLayoutFailedThisBuild=!1,this._customLayoutDiagnosticsWarned=new Set,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this.xIsDate=!1,this.xTypeDetected=!1,this.spatialIndex=new Ii,this._lastBoundedInsertsRef=null,this.applyPulse=(e,t,i)=>!(!this.config.pulse||!this.timestampBuffer)&&M(this.config.pulse,e,t,this.timestampBuffer,this.getDatumIndexMap(t),i),this.config=e,this.buffer=new R(e.windowSize),this.growingCap=e.windowSize;let t=["bar","swarm","waterfall"].includes(e.chartType)||"streaming"===e.runtimeMode;if(this.resolveXAccessor(),this.getY=t?W(e.valueAccessor||e.yAccessor,"value"):W(e.yAccessor,"y"),this.getGroup=V(e.groupAccessor),this.getCategory=V(e.categoryAccessor),this.getSize=e.sizeAccessor?W(e.sizeAccessor,"size"):void 0,this.getColor=V(e.colorAccessor),this.getSymbol=V(e.symbolAccessor),this.getY0=e.y0Accessor?W(e.y0Accessor,"y0"):void 0,this.resolvedRibbons=mi(e),this.getPointId=V(e.pointIdAccessor),"candlestick"===e.chartType){let t=null!=e.openAccessor,i=null!=e.closeAccessor;this.getOpen=t?W(e.openAccessor,"open"):void 0,this.getHigh=W(e.highAccessor,"high"),this.getLow=W(e.lowAccessor,"low"),this.getClose=i?W(e.closeAccessor,"close"):void 0,this.config.candlestickRangeMode=!t&&!i}e.pulse&&(this.timestampBuffer=new R(e.windowSize))}currentTime(){return this.config.clock?.()??Ot()}resolveXAccessor(e=this.buffer){let t=["bar","swarm","waterfall"].includes(this.config.chartType)||"streaming"===this.config.runtimeMode,i=t&&this.config.timeAccessor||this.config.xAccessor,r=j(i,t?"time":"x");this.xIsDate=!1,this.xTypeDetected=!1;for(let t of e){let e=r(t);if(null==e||""===e)continue;let i=e instanceof Date&&Number.isFinite(e.getTime())||"string"==typeof e&&Number.isFinite(z(e));if(i||Number.isFinite(Number(e))){this.xIsDate=i,this.xTypeDetected=!0;break}}this.getX=this.xIsDate?e=>N(r(e)):e=>+r(e)}syncPulseTimestampBuffer(){this.config.pulse?null!=this.timestampBuffer&&this.timestampBuffer.capacity===this.buffer.capacity&&this.timestampBuffer.size===this.buffer.size||(this.timestampBuffer=P(this.buffer,this.currentTime())):this.timestampBuffer=null}pushDatumYExtent(e){if("candlestick"===this.config.chartType&&this.getHigh&&this.getLow)return this.yExtent.push(this.getHigh(e)),void this.yExtent.push(this.getLow(e));this.yExtent.push(this.getY(e)),this.getY0&&this.yExtent.push(this.getY0(e));for(let t of this.resolvedRibbons){let i=t.getTop(e),r=t.getBottom(e);Number.isFinite(i)&&this.yExtent.push(i),Number.isFinite(r)&&this.yExtent.push(r)}}evictDatumYExtent(e){if("candlestick"===this.config.chartType&&this.getHigh&&this.getLow)return this.yExtent.evict(this.getHigh(e)),void this.yExtent.evict(this.getLow(e));this.yExtent.evict(this.getY(e)),this.getY0&&this.yExtent.evict(this.getY0(e));for(let t of this.resolvedRibbons){let i=t.getTop(e),r=t.getBottom(e);Number.isFinite(i)&&this.yExtent.evict(i),Number.isFinite(r)&&this.yExtent.evict(r)}}rebuildYExtent(){this.yExtent.clear();for(let e of this.buffer)this.pushDatumYExtent(e)}rebuildExtents(){this.xExtent.clear(),this.yExtent.clear();for(let e of this.buffer)this.xExtent.push(this.getX(e)),this.pushDatumYExtent(e)}ingest(e){if(e.bounded&&this._lastBoundedInsertsRef===e.inserts)return this.updateResults.recordNoop("replace"),!1;let t=this.currentTime();if(this.lastIngestTime=t,this.needsFullRebuild=!0,this._bufferDirty=!0,this._ingestVersion++,e.bounded){this._lastBoundedInsertsRef=e.inserts,this.buffer.clear(),this.xExtent.clear(),this.yExtent.clear(),this.timestampBuffer&&this.timestampBuffer.clear(),this.resolveXAccessor(e.inserts);let i=e.totalSize||e.inserts.length;T(this.buffer,i,this.timestampBuffer);for(let i of e.inserts)D(this.buffer,i,this.timestampBuffer,t),this.xExtent.push(this.getX(i)),this.pushDatumYExtent(i)}else{this.xTypeDetected||this.resolveXAccessor(e.inserts);for(let i of e.inserts){if("growing"===this.config.windowMode&&this.buffer.full){let e=this.config.maxCapacity??1e5;this.growingCap<e&&(this.growingCap=Math.min(2*this.growingCap,e),this.buffer.resize(this.growingCap),this.timestampBuffer&&this.timestampBuffer.resize(this.growingCap),"production"!==process.env.NODE_ENV&&!this.growingCapacityWarned&&this.growingCap>=5e4&&(this.growingCapacityWarned=!0,console.warn(`[Semiotic] Growing window buffer reached ${this.growingCap} points (cap ${e}). Large canvas scenes are expensive — prefer a sliding window, aggregation, or an explicit maxCapacity if this is intentional.`)))}let e=D(this.buffer,i,this.timestampBuffer,t);this.xExtent.push(this.getX(i)),this.pushDatumYExtent(i),null!=e&&(this.xExtent.evict(this.getX(e)),this.evictDatumYExtent(e))}}return this.updateResults.recordData(e.bounded?"replace":"ingest",e.inserts.length),!0}ingestWithResult(e){return this.ingest(e),this.updateResults.last}computeScene(e){let{config:r,buffer:s}=this,n=this.scales,a=this.lastLayout;if(!(e.width>0&&e.height>0&&Number.isFinite(e.width)&&Number.isFinite(e.height)))return void(this.needsFullRebuild=!0);if(!this.needsFullRebuild&&!r.customLayout&&!this.activeTransition&&"bar"!==r.chartType&&"waterfall"!==r.chartType&&"candlestick"!==r.chartType&&this.lastLayout&&this.lastLayout.width>0&&this.lastLayout.height>0&&this.scene.length>0&&this.scales&&(this.config.scalePadding??0)<=0&&(this.lastLayout.width!==e.width||this.lastLayout.height!==e.height))return this.scales=function(e,t,i,r){let s=r.width/i.width,n=r.height/i.height;for(let t of e)switch(t.type){case"line":for(let e of t.path)e[0]*=s,e[1]*=n;break;case"area":for(let e of t.topPath)e[0]*=s,e[1]*=n;for(let e of t.bottomPath)e[0]*=s,e[1]*=n;t.clipRect&&(t.clipRect={x:t.clipRect.x*s,y:t.clipRect.y*n,width:t.clipRect.width*s,height:t.clipRect.height*n}),t.strokeColorBands&&(t.strokeColorBands=t.strokeColorBands.map(e=>({...e,y:e.y*n,height:e.height*n})));break;case"point":case"symbol":case"glyph":t.x*=s,t.y*=n;break;case"rect":case"heatcell":t.x*=s,t.y*=n,t.w*=s,t.h*=n}return{x:t.x.copy().range(t.x.range().map(e=>e*s)),y:t.y.copy().range(t.y.range().map(e=>e*n))}}(this.scene,this.scales,this.lastLayout,e),this.lastLayout={width:e.width,height:e.height},this.spatialIndex.rebuild(r.chartType,this.scene),void this.version++;this.xExtent.dirty&&this.xExtent.recalculate(s,this.getX),this.yExtent.dirty&&this.rebuildYExtent();let o=this.getBufferArray(),l=this.xExtent.extent,c=this.yExtent.extent,u="waterfall"===r.chartType&&s.size>0?function(e,t,i,r,s){let n=Array.from(new Set(e.map(t).filter(e=>Number.isFinite(e)))).sort((e,t)=>e-t);if(n.length<2)return xi(i,r);let a=n[0],o=n[1],l=n[n.length-1],c=n[n.length-2];return xi("log"===s&&a>0?[a/Math.sqrt(o/a),l*Math.sqrt(l/c)]:[a-(o-a)/2,l+(l-c)/2],r)}(o,this.getX,l,r.xExtent,r.xScaleType):xi(l,r.xExtent);var h,d,f;"bar"===r.chartType&&r.binSize&&"center"===r.binAlign&&(h=l,d=r.binSize,f=r.xExtent,u=h.every(Number.isFinite)?xi([i(h[0],d,"center"),i(h[1],d,"center")+d],f):xi(h,f));let p=xi(c,r.yExtent),g=!(!(m=r.yExtent)||null==m[0]||null==m[1]),y="exact"===(r.yAxisExtent??r.axisExtent);var m;if("stackedarea"===r.chartType&&!g&&s.size>0){let e=function(e){let{config:t,groups:i,getX:r,getY:s}=e,n="exact"===(t.yAxisExtent??t.axisExtent);if(t.normalize){let i=[0,n?1:1+t.extentPadding];return{yDomain:i,stackExtentCache:{key:`${e.bufferSize}:${e.ingestVersion}:norm`,yDomain:i}}}let a=`${e.bufferSize}:${e.ingestVersion}:${t.baseline??"zero"}:${t.stackOrder??"key"}`;if(e.stackExtentCache&&e.stackExtentCache.key===a)return{yDomain:e.stackExtentCache.yDomain,stackExtentCache:e.stackExtentCache};let o=new Map,l=new Set,c=0,u=new Map,h=new Map;for(let e of i){let t=new Map,i=0;for(let n of e.data){let e=r(n),a=s(n);if(!Number.isFinite(e)||!Number.isFinite(a))continue;t.set(e,(t.get(e)||0)+a),l.add(e),i+=a;let o=(u.get(e)||0)+a;u.set(e,o),o>c&&(c=o)}o.set(e.key,t),h.set(e.key,i)}let d,f,p=t.stackOrder??"key",g=(e,t)=>e<t?-1:e>t?1:0;if("input"===p)d=i.map(e=>e.key);else if("insideOut"===p){let e=[...i].map(e=>e.key).sort((e,t)=>{let i=(h.get(t)??0)-(h.get(e)??0);return 0!==i?i:g(e,t)}),t=[],r=[],s=0,n=0;for(let i of e)s<n?(t.push(i),s+=h.get(i)??0):(r.push(i),n+=h.get(i)??0);d=[...r.reverse(),...t]}else d="asc"===p?i.map(e=>e.key).sort((e,t)=>{let i=(h.get(e)??0)-(h.get(t)??0);return 0!==i?i:g(e,t)}):"desc"===p?i.map(e=>e.key).sort((e,t)=>{let i=(h.get(t)??0)-(h.get(e)??0);return 0!==i?i:g(e,t)}):i.map(e=>e.key).sort(g);if("wiggle"===t.baseline||"silhouette"===t.baseline){let e=Array.from(l).sort((e,t)=>e-t),i=A(e,d,(e,t)=>o.get(e)?.get(t)||0,t.baseline),r=1/0,s=-1/0;for(let t of e){let e=i.get(t)??0,n=u.get(t)??0;e<r&&(r=e),e+n>s&&(s=e+n)}(!Number.isFinite(r)||!Number.isFinite(s))&&(r=0,s=0);let a=s-r,c=n?0:a>0?a*t.extentPadding:1;f=[r-c,s+c]}else if("diverging"===t.baseline){let e=Array.from(l).sort((e,t)=>e-t),[i,r]=w(e,d,(e,t)=>o.get(e)?.get(t)||0),s=r-i,a=n?0:s>0?s*t.extentPadding:1;f=[i-a,r+a]}else f=[0,c+(n?0:c>0?c*t.extentPadding:1)];return{yDomain:f,stackExtentCache:{key:a,yDomain:f}}}({config:r,groups:this.groupData(o),getX:this.getX,getY:this.getY,bufferSize:s.size,ingestVersion:this._ingestVersion,stackExtentCache:this._stackExtentCache});p=e.yDomain,this._stackExtentCache=e.stackExtentCache}else"bar"===r.chartType&&r.binSize&&!g&&s.size>0?p=function(e,i,r,s,n,a,o,l="start"){let[,c]=t(e,i,r,s,n,l);return[0,o?c:c+c*a]}(s,this.getX,this.getY,r.binSize,this.getCategory,r.extentPadding,y,r.binAlign):"waterfall"===r.chartType&&!g&&s.size>0?p=function(e,t,i,r){let[s,n]=function(e,t){let i=0,r=0,s=0;for(let n of e){let e=t(n);null==e||Number.isNaN(e)||(s+=e,s<i&&(i=s),s>r&&(r=s))}return[i,r]}(e,t),a=n-s,o=r?0:a>0?a*i:1;return[Math.min(0,s-Math.abs(o)),Math.max(0,n+Math.abs(o))]}(s,this.getY,r.extentPadding,y):!g&&p[0]!==1/0&&(p=function(e,t,i){if(!i.length)return e;let[r,s]=e;for(let e of t)for(let t of i){let i=t.getTop(e),n=t.getBottom(e);Number.isFinite(i)&&(i<r&&(r=i),i>s&&(s=i)),Number.isFinite(n)&&(n<r&&(r=n),n>s&&(s=n))}return[r,s]}(p,o,this.resolvedRibbons),p=function(e,t){let i=e[1]-e[0],r=t.exactMode?0:i>0?i*t.extentPadding:1,s=[null!=t.userMin?e[0]:e[0]-r,null!=t.userMax?e[1]:e[1]+r];if("log"===t.yScaleType&&s[0]<=0&&t.dataYDomain[0]>0&&!t.exactMode){let e=1+t.extentPadding;null==t.userMin&&(s[0]=t.dataYDomain[0]/e)}return s}(p,{exactMode:y,extentPadding:r.extentPadding,userMin:r.yExtent?.[0],userMax:r.yExtent?.[1],yScaleType:r.yScaleType,dataYDomain:c}));p=function(e,t,i){if(!t||i)return e;let r=t[0],s=t[1];return null==r&&null==s?e:[r??e[0],s??e[1]]}(p,r.yExtent,!!g),({xDomain:u,yDomain:p}=function(e,t,i){let r=e,s=t;return(r[0]===1/0||r[1]===-1/0)&&(r="time"===i?[0,864e5]:[0,1]),(s[0]===1/0||s[1]===-1/0)&&(s=[0,1]),{xDomain:r,yDomain:s}}(u,p,r.xScaleType)),this.scales=function(e){let{config:t,layout:i,xDomain:r}=e,s=t.xScaleType??(e.xIsDate?"utc":void 0),n=t.invertY?[e.yDomain[1],e.yDomain[0]]:e.yDomain,a="streaming"===t.runtimeMode,o=t.scalePadding||0,l=Math.max(0,Math.min(o,Math.min(i.width,i.height)/2-1));return a?{x:vi(s,r,"left"===t.arrowOfTime?[i.width-l,l]:[l,i.width-l]),y:vi(t.yScaleType,n,[i.height-l,l])}:{x:vi(s,r,[l,i.width-l]),y:vi(t.yScaleType,n,[i.height-l,l])}}({config:r,layout:e,xDomain:u,yDomain:p,xIsDate:this.xIsDate}),this._customLayoutFailedThisBuild=!1;let x=this.buildSceneNodes(e,o);if(this._customLayoutFailedThisBuild)return!0===this.lastCustomLayoutFailure?.preservedLastGoodScene?(this.scales=n,this.lastLayout=a):(this.scene=[],this.spatialIndex.rebuild(this.config.chartType,this.scene)),void(this.needsFullRebuild=!0);let v=this.config.transition?fi():null;v&&this.scene.length>0&&this.snapshotPositions(),this.scene=x,this.config.decay&&this.applyDecay(this.scene,o),this.config.pulse&&this.applyPulse(this.scene,o,this.currentTime()),this.config.transition&&!this._hasRenderedOnce&&this.scene.length>0&&(this.config.introAnimation&&v&&this.synthesizeIntroPositions(),this._hasRenderedOnce=!0),v&&(this.prevPositionMap.size>0||this.prevPathMap.size>0)&&this.startTransition(),this.spatialIndex.rebuild(this.config.chartType,this.scene),this.needsFullRebuild=!1,this.lastLayout={width:e.width,height:e.height},this.version++}get quadtree(){return this.spatialIndex.quadtree}get maxPointRadius(){return this.spatialIndex.maxPointRadius}buildSceneNodes(t,i){let{config:n,scales:a}=this;if(!a)return[];if(n.customLayout){let e=n.layoutMargin??{top:0,right:0,bottom:0,left:0},r={data:i,scales:a,dimensions:{width:t.width,height:t.height,margin:e,plot:{x:0,y:0,width:t.width,height:t.height}},theme:{semantic:n.themeSemantic??{},categorical:n.themeCategorical??At},resolveColor:(e,t)=>{let i=this.resolveGroupColor(e);if(i)return i;let r=this.resolveLineStyle(e,t);return r.stroke?r.stroke:"string"==typeof r.fill?r.fill:n.themeSemantic?.primary??"#4e79a7"},config:n.layoutConfig??{},selection:n.layoutSelection??null},s=H({family:"xy",logLabel:"customLayout",revision:this.version,hasPreviousResult:null!==this.lastCustomLayoutResult,onLayoutError:n.onLayoutError,run:()=>n.customLayout(r)});if("failure"===s.kind)return this.lastCustomLayoutFailure=s.diagnostic,this._customLayoutFailedThisBuild=!0,s.preservedLastGoodScene?this.scene:(this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,[]);let o=s.result;this.customLayoutOverlays=o.overlays??null,this.lastCustomLayoutResult=o,this.lastCustomLayoutFailure=null;let l=o.nodes??[];if(this._customRestyle=o.restyle,this.hasCustomRestyle=!!o.restyle,this.hasCustomRestyle){this._baseStyles=new WeakMap;for(let e of l)e.style&&this._baseStyles.set(e,e.style);this.applyCustomRestyle(l,n.layoutSelection??null)}return U({label:"customLayout",nodes:l,overlays:this.customLayoutOverlays,warned:this._customLayoutDiagnosticsWarned}),l}if(this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,0===i.length)return[];let o={scales:a,config:n,getX:this.getX,getY:this.getY,getY0:this.getY0,getSize:this.getSize,getColor:this.getColor,getSymbol:this.getSymbol,getGroup:this.getGroup,getCategory:this.getCategory,getPointId:this.getPointId,ribbons:this.resolvedRibbons,getOpen:this.getOpen,getHigh:this.getHigh,getLow:this.getLow,getClose:this.getClose,resolveLineStyle:(e,t)=>this.resolveLineStyle(e,t),resolveAreaStyle:(e,t)=>this.resolveAreaStyle(e,t),resolveBoundsStyle:(e,t)=>this.resolveBoundsStyle(e,t),resolveColorMap:e=>this.resolveColorMap(e),resolveGroupColor:e=>this.resolveGroupColor(e),groupData:e=>this.groupData(e),barCategoryCache:this._barCategoryCache},l=r(n.chartType);if(!l)return c=n.chartType,e(c)||be&&(gi.has(c)||(gi.add(c),console.warn(`[semiotic] StreamXYFrame: no XY plugin registered for "${c}" during SSR. Import a chart HOC, or call registerBuiltInXYPlugins() from "semiotic/xy" or "semiotic/realtime/core" before render.`))),[];var c;let u=s(l(o,i,t));return"bar"===n.chartType&&(this._barCategoryCache=o.barCategoryCache??null,this._binBoundaries=u.binBoundaries),u.nodes}resolveBoundsStyle(e,t){return function(e,t,i,r){let s=e.boundsStyle;if("function"==typeof s)return s(i||{},t);if(s&&"object"==typeof s)return s;let n=r(t,i);return{fill:n.stroke||e.themeSemantic?.primary||"#4e79a7",fillOpacity:.2,...null!=n.opacity&&{opacity:n.opacity},stroke:"none",cursor:n.cursor}}(this.config,e,t,(e,t)=>this.resolveLineStyle(e,t))}computeDecayOpacity(e,t){let i=this.config.decay;return!i||t<=1?1:q(i,e,t)}getDatumIndexMap(e){if(this._datumIndexCache&&this._datumIndexCache.version===this._ingestVersion)return this._datumIndexCache.map;let t=J(e);return this._datumIndexCache={version:this._ingestVersion,map:t},t}applyDecay(e,t){this.config.decay&&K(this.config.decay,e,t,this.getDatumIndexMap(t))}refreshPulse(e){return!0!==this.lastCustomLayoutFailure?.preservedLastGoodScene&&this.applyPulse(this.scene,this.getBufferArray(),e)}hasActivePulsesAt(e){return!!this.config.pulse&&E(this.config.pulse,this.timestampBuffer,e)}get hasActivePulses(){return this.hasActivePulsesAt(this.currentTime())}get transitionContext(){return{runtimeMode:this.config.runtimeMode,getX:this.getX,getY:this.getY,getCategory:this.getCategory,getPointId:this.getPointId}}get hasRenderedOnce(){return this._hasRenderedOnce}snapshotPositions(){fi()?.snapshotPositions(this.transitionContext,this.scene,this.prevPositionMap,this.prevPathMap)}synthesizeIntroPositions(){this.prevPositionMap.clear(),this.prevPathMap.clear();let e=this.scales?.y(0)??0,t=fi();if(t)for(let i=0;i<this.scene.length;i++){let r=this.scene[i],s=t.getNodeIdentity(this.transitionContext,r,i);s&&("point"===r.type?this.prevPositionMap.set(s,{x:r.x,y:r.y,r:0,opacity:0}):"rect"===r.type?this.prevPositionMap.set(s,{x:r.x,y:e,w:r.w,h:0,opacity:r.style.opacity??1}):"heatcell"===r.type?this.prevPositionMap.set(s,{x:r.x,y:r.y,w:r.w,h:r.h,opacity:0}):"line"===r.type?(r._introClipFraction=0,this.prevPathMap.set(s,{path:r.path.map(e=>[e[0],e[1]]),pathIds:r.pathIds?.slice(),opacity:r.style.opacity})):"area"===r.type&&(r._introClipFraction=0,this.prevPathMap.set(s,{topPath:r.topPath.map(e=>[e[0],e[1]]),bottomPath:r.bottomPath.map(e=>[e[0],e[1]]),pathIds:r.pathIds?.slice(),opacity:r.style.opacity})))}}startTransition(){let e=fi();if(!this.config.transition||!e)return;let t=e.startTransition(this.transitionContext,this.config.transition,{scene:this.scene,exitNodes:this.exitNodes,activeTransition:this.activeTransition},this.prevPositionMap,this.prevPathMap,this.currentTime());this.scene=t.scene,this.exitNodes=t.exitNodes,this.activeTransition=t.activeTransition}advanceTransition(e){let t=fi();if(!this.activeTransition||!this.config.transition||!t)return!1;let i={scene:this.scene,exitNodes:this.exitNodes,activeTransition:this.activeTransition},r=t.advanceTransition(e,this.config.transition,i,this.prevPositionMap,this.prevPathMap);return this.scene=i.scene,this.exitNodes=i.exitNodes,this.activeTransition=i.activeTransition,r}cancelIntroAnimation(){this.prevPositionMap.clear(),this.prevPathMap.clear(),this.activeTransition=null,p(this.scene),this.exitNodes=[]}groupData(e){let{result:t,cache:i}=function(e,t,i,r){if(r&&r.version===i&&r.group===t&&r.data===e)return{result:r.result,cache:r};let s;if(t){let i=new Map;for(let r of e){let e=t(r);i.has(e)||i.set(e,[]),i.get(e).push(r)}s=Array.from(i.entries()).map(([e,t])=>({key:e,data:t}))}else s=[{key:bi,data:e}];return{result:s,cache:{version:i,group:t,data:e,result:s}}}(e,this.getGroup,this._ingestVersion,this._groupDataCache);return this._groupDataCache=i,t}resolveColorMap(e){let{map:t,cache:i}=function(e,t,i,r,s){if(s&&s.version===r)return{map:s.map,cache:s};let n=new Set;if(t)for(let i of e){let e=t(i);e&&n.add(e)}let a=Array.from(n).sort(),o=a.join("\0");if(s&&s.key===o){let e={...s,version:r};return{map:e.map,cache:e}}let l=kt(i.colorScheme,i.themeCategorical,At),c=new Map;for(let e=0;e<a.length;e++)c.set(a[e],ki(i.colorScheme,a[e])??l[e%l.length]);return{map:c,cache:{key:o,map:c,version:r}}}(e,this.getColor,this.config,this._ingestVersion,this._colorMapCache);return this._colorMapCache=i,t}resolveLineStyle(e,t){return function(e,t,i,r){let s=e.lineStyle;if("function"==typeof s){let e=s(i||{},t);if(e&&!e.stroke&&t){let i=r(t);if(i)return{...e,stroke:i}}return e}let n=e.themeSemantic?.primary;return s&&"object"==typeof s?{stroke:s.stroke||n||"#007bff",strokeWidth:s.strokeWidth??2,strokeDasharray:s.strokeDasharray,fill:s.fill,fillOpacity:s.fillOpacity,opacity:s.opacity,cursor:s.cursor}:{stroke:r(t)||n||"#007bff",strokeWidth:2}}(this.config,e,t,e=>this.resolveGroupColor(e))}resolveAreaStyle(e,t){return function(e,t,i,r){if(e.areaStyle){let s=e.areaStyle(i||{});if(s&&!s.fill&&t){let e=r(t);if(e)return{...s,fill:e,stroke:s.stroke||e}}return s}let s=e.lineStyle;if("function"==typeof s){let e=s(i||{},t);if(e&&!e.fill&&t){let i=r(t);if(i)return{...e,fill:i,stroke:e.stroke||i}}return e}let n=e.themeSemantic?.primary;if(s&&"object"==typeof s)return{fill:s.fill||s.stroke||n||"#4e79a7",fillOpacity:s.fillOpacity??.7,stroke:s.stroke||n||"#4e79a7",strokeWidth:s.strokeWidth??2,cursor:s.cursor};let a=r(t)||n||"#4e79a7";return{fill:a,fillOpacity:.7,stroke:a,strokeWidth:2}}(this.config,e,t,e=>this.resolveGroupColor(e))}resolveGroupColor(e){let{color:t,groupColorCounter:i}=function(e){let{group:t,colorMapCache:i,groupColorMap:r,groupColorMapCap:s,config:n}=e,{groupColorCounter:a}=e,o=ki(n.colorScheme,t);if(o)return{color:o,groupColorCounter:a};if(i){let e=i.map.get(t);if(e)return{color:e,groupColorCounter:a}}let l=r.get(t);if(l)return{color:l,groupColorCounter:a};let c=kt(n.colorScheme,n.themeCategorical,At);if(0===c.length)return{color:null,groupColorCounter:a};let u=c[a%c.length];if(a++,r.set(t,u),r.size>s){let e=r.keys().next().value;void 0!==e&&r.delete(e)}return{color:u,groupColorCounter:a}}({group:e,colorMapCache:this._colorMapCache,groupColorMap:this._groupColorMap,groupColorCounter:this._groupColorCounter,groupColorMapCap:1e3,config:this.config});return this._groupColorCounter=i,t}getBufferArray(){return(this._bufferDirty||!this._bufferArrayCache)&&(this._bufferArrayCache=this.buffer.toArray(),this._bufferDirty=!1),this._bufferArrayCache}getData(){return this.getBufferArray()}remove(e){if(!this.getPointId)throw new Error("remove() requires pointIdAccessor to be configured");this.config.transition&&this.scene.length>0&&fi()&&this.snapshotPositions();let t=g(e),i=this.getPointId,r=e=>t.has(i(e));L(this.buffer,this.timestampBuffer,r);let s=this.buffer.remove(r);if(0===s.length)return this.updateResults.recordNoop("remove"),s;for(let e of s)this.xExtent.evict(this.getX(e)),this.evictDatumYExtent(e);return this.needsFullRebuild=!0,this._bufferDirty=!0,this._ingestVersion++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("remove",s.length),s}update(e,t){if(!this.getPointId)throw new Error("update() requires pointIdAccessor to be configured");let i=g(e),r=this.getPointId,s=new Set;this.buffer.forEach((e,t)=>{i.has(r(e))&&s.add(t)});let n=this.buffer.update(e=>i.has(r(e)),t);if(0===n.length)return this.updateResults.recordNoop("update"),n;for(let e of n)this.xExtent.evict(this.getX(e)),this.evictDatumYExtent(e);return this.buffer.forEach((e,t)=>{s.has(t)&&(this.xExtent.push(this.getX(e)),this.pushDatumYExtent(e))}),this.needsFullRebuild=!0,this._bufferDirty=!0,this._ingestVersion++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("update",n.length),n}getBinBoundaries(){return this._binBoundaries}getExtents(){return this.xExtent.min===1/0?null:{x:this.xExtent.extent,y:this.yExtent.extent}}clear(){this.buffer.clear(),this.resolveXAccessor(),this.xExtent.clear(),this.yExtent.clear(),this._hasRenderedOnce=!1,this.timestampBuffer&&this.timestampBuffer.clear(),this.prevPositionMap.clear(),this.prevPathMap.clear(),this.exitNodes=[],this.activeTransition=null,this.lastIngestTime=0,this._lastBoundedInsertsRef=null,this.needsFullRebuild=!0,this._bufferDirty=!0,this._bufferArrayCache=null,this._datumIndexCache=null,this.lastLayout=null,this.scales=null,this.scene=[],this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this.spatialIndex.clear(),this._colorMapCache=null,this._groupDataCache=null,this._groupColorMap=new Map,this._groupColorCounter=0,this._barCategoryCache=null,this._binBoundaries=[],this._stackExtentCache=null,this.version++,this.updateResults.recordData("clear")}get size(){return this.buffer.size}getBuffer(){return this.buffer}getXAccessor(){return this.getX}getYAccessor(){return this.getY}getCategoryAccessor(){return this.getCategory}applyCustomRestyle(e,t){let i=this._customRestyle;if(i)for(let r of e){let e=this._baseStyles.get(r)??r.style??{},s=i(r,t);r.style=s?{...e,...s}:e}}restyleScene(e){this._customRestyle?(this.applyCustomRestyle(this.scene,e),this.markStylePaintPending(),this.updateResults.recordRestyle(!0)):this.updateResults.recordRestyle(!1)}updateConfig(e){let t={...this.config},i=Object.keys(e).filter(i=>e[i]!==t[i]);"production"!==process.env.NODE_ENV&&!this.windowSizeWarned&&"windowSize"in e&&e.windowSize!==t.windowSize&&(this.windowSizeWarned=!0,console.warn(`[Semiotic] windowSize changed after mount (${t.windowSize} → ${e.windowSize}) but it is a mount-only setting — the ring buffer keeps its original capacity. Remount the chart (e.g. via a React key) to apply a new windowSize.`)),("colorScheme"in e||"themeCategorical"in e||"colorAccessor"in e)&&(this._colorMapCache=null,this._groupColorMap=new Map,this._groupColorCounter=0),("barColors"in e||"colorScheme"in e)&&(this._barCategoryCache=null),("normalize"in e||"extentPadding"in e||"xAccessor"in e||"yAccessor"in e||"timeAccessor"in e||"valueAccessor"in e||"boundsAccessor"in e||"band"in e||"y0Accessor"in e||"openAccessor"in e||"highAccessor"in e||"lowAccessor"in e||"closeAccessor"in e||"groupAccessor"in e||"categoryAccessor"in e||"chartType"in e||"runtimeMode"in e)&&(this._stackExtentCache=null);let r=!1,s=!1;Object.assign(this.config,e),"pulse"in e&&this.syncPulseTimestampBuffer();let n="chartType"in e&&e.chartType!==t.chartType||"runtimeMode"in e&&e.runtimeMode!==t.runtimeMode;if(n||"xAccessor"in e||"yAccessor"in e||"timeAccessor"in e||"valueAccessor"in e){let e=["bar","swarm","waterfall"].includes(this.config.chartType)||"streaming"===this.config.runtimeMode,i=e&&this.config.timeAccessor||this.config.xAccessor,a=e&&t.timeAccessor||t.xAccessor,o=e&&this.config.valueAccessor||this.config.yAccessor,l=e&&t.valueAccessor||t.yAccessor,c=n||!X(i,a),u=n||!X(o,l);(c||u)&&(c&&this.resolveXAccessor(),this.getY=e?W(this.config.valueAccessor||this.config.yAccessor,"value"):W(this.config.yAccessor,"y"),u&&this.resolvedRibbons.some(e=>"bounds"===e.kind)&&(this.resolvedRibbons=mi(this.config)),r=!0,s=!0)}if("groupAccessor"in e&&!X(e.groupAccessor,t.groupAccessor)&&(this.getGroup=null!=this.config.groupAccessor?V(this.config.groupAccessor):void 0,r=!0),"categoryAccessor"in e&&!X(e.categoryAccessor,t.categoryAccessor)&&(this.getCategory=null!=this.config.categoryAccessor?V(this.config.categoryAccessor):void 0,r=!0),"sizeAccessor"in e&&!X(e.sizeAccessor,t.sizeAccessor)&&(this.getSize=this.config.sizeAccessor?W(this.config.sizeAccessor,"size"):void 0,r=!0),"symbolAccessor"in e&&!X(e.symbolAccessor,t.symbolAccessor)&&(this.getSymbol=null!=this.config.symbolAccessor?V(this.config.symbolAccessor):void 0,r=!0),"colorAccessor"in e&&!X(e.colorAccessor,t.colorAccessor)&&(this.getColor=null!=this.config.colorAccessor?V(this.config.colorAccessor):void 0,r=!0),"y0Accessor"in e&&!X(e.y0Accessor,t.y0Accessor)&&(this.getY0=this.config.y0Accessor?W(this.config.y0Accessor,"y0"):void 0,r=!0,s=!0),("boundsAccessor"in e&&!X(e.boundsAccessor,t.boundsAccessor)||"band"in e&&e.band!==t.band||"boundsStyle"in e&&e.boundsStyle!==t.boundsStyle)&&(this.resolvedRibbons=mi(this.config),r=!0,s=!0),"pointIdAccessor"in e&&!X(e.pointIdAccessor,t.pointIdAccessor)&&(this.getPointId=null!=this.config.pointIdAccessor?V(this.config.pointIdAccessor):void 0,r=!0),"candlestick"===this.config.chartType&&(n||"openAccessor"in e&&!X(e.openAccessor,t.openAccessor)||"closeAccessor"in e&&!X(e.closeAccessor,t.closeAccessor)||"highAccessor"in e&&!X(e.highAccessor,t.highAccessor)||"lowAccessor"in e&&!X(e.lowAccessor,t.lowAccessor))){let e=null!=this.config.openAccessor,t=null!=this.config.closeAccessor;this.getOpen=e?W(this.config.openAccessor,"open"):void 0,this.getHigh=W(this.config.highAccessor,"high"),this.getLow=W(this.config.lowAccessor,"low"),this.getClose=t?W(this.config.closeAccessor,"close"):void 0,this.config.candlestickRangeMode=!e&&!t,r=!0,s=!0}if("accessorRevision"in e&&e.accessorRevision!==t.accessorRevision&&(this.resolveXAccessor(),r=!0,s=!0),!r){let i=Object.keys(e).filter(e=>!e.endsWith("Accessor")&&"timeAccessor"!==e&&"valueAccessor"!==e);for(let s of i)if(e[s]!==t[s]){r=!0;break}}r&&(s&&this.rebuildExtents(),this.needsFullRebuild=!0),this.updateResults.recordConfig(i,("bar"===this.config.chartType||"heatmap"===this.config.chartType)&&!this.config.trackHoverRows&&Nt(t.areaStyle)!==Nt(this.config.areaStyle))}updateConfigWithResult(e){return this.updateConfig(e),this.updateResults.last}},zi=/*#__PURE__*/new WeakMap;function Ni(e,t){let i=wt(t);if(!i)return e;let r=zi.get(e),s=r?.get(i);if(s)return s;let n=function(e,t,i=8){if(!t||e.length<2)return e.map(([e,t])=>[e,t]);let r=[],s=null,n={moveTo(e,t){s=[e,t],r.push([e,t])},lineTo(e,t){s=[e,t],r.push([e,t])},bezierCurveTo(e,t,n,a,o,l){if(!s)return s=[o,l],void r.push([o,l]);let[c,u]=s;for(let s=1;s<=i;s++){let h=s/i,d=1-h,f=d*d*d*c+3*d*d*h*e+3*d*h*h*n+h*h*h*o,p=d*d*d*u+3*d*d*h*t+3*d*h*h*a+h*h*h*l;r.push([f,p])}s=[o,l]},closePath(){},arc(){},rect(){},arcTo(){},quadraticCurveTo(e,t,i,n){s=[i,n],r.push([i,n])}};return ai().x(e=>e[0]).y(e=>e[1]).curve(t).context(n)(e),r}(e,i);return r||(r=new Map,zi.set(e,r)),r.set(i,n),n}function Oi(e,t,i,r=30,s,n=0){let a=null;if(s){let e=Q(s,t,i,r,n);e&&!1!==e.node.interactive&&(a={node:e.node,datum:e.node.datum,x:e.node.x,y:e.node.y,distance:e.distance})}for(let n of e){let e=null;switch(n.type){case"point":if(!1===n.interactive||s)break;e=Wi(n,t,i,r);break;case"symbol":e=Vi(n,t,i,r);break;case"glyph":e=ji(n,t,i,r);break;case"line":e=Xi(n,t,i,r);break;case"rect":if(null==n.datum)break;e=Gi(n,t,i);break;case"heatcell":e=Hi(n,t,i);break;case"area":if(!1===n.interactive)break;e=qi(n,t,i,r);break;case"candlestick":e=Ui(n,t,i)}e&&(!a||e.distance<a.distance||0===e.distance&&0===a.distance&&"area"===n.type&&n._hitArea&&"area"===a.node.type&&a.node._hitArea)&&(a=e)}return a}function Yi(e,t,i){if(0===e.length)return null;let r=e[0][0],s=e[e.length-1][0];if(t<r||t>s)return null;let n=Ji(e,t);if(n<0||Math.abs(e[n][0]-t)>i)return null;let a=n,o=n;n>0&&e[n][0]>=t?(a=n-1,o=n):n<e.length-1&&(a=n,o=n+1);let[l,c]=e[a],[u,h]=e[o];return u===l?c:c+Math.max(0,Math.min(1,(t-l)/(u-l)))*(h-c)}function Wi(e,t,i,r=30){let s=t-e.x,n=i-e.y,a=Math.sqrt(s*s+n*n);return a>Z(e.r,r)?null:{node:e,datum:e.datum,x:e.x,y:e.y,distance:a}}function Vi(e,t,i,r=30){let s=t-e.x,n=i-e.y,a=Math.sqrt(s*s+n*n);return a>Z(Et(e.size),r)?null:{node:e,datum:e.datum,x:e.x,y:e.y,distance:a}}function ji(e,t,i,r=30){if(null==e.datum)return null;let s=Lt(e.glyph,e.size),n=e.x+s.centerDx,a=e.y+s.centerDy,o=t-n,l=i-a,c=Math.sqrt(o*o+l*l);return c>Z(s.radius,r)?null:{node:e,datum:e.datum,x:n,y:a,distance:c}}function Xi(e,t,i,r=30){if(0===e.path.length)return null;let s=Ji(e.path,t);if(s<0)return null;let n,[a,o]=e.path[s];if(e.path.length>1){let r=1/0,a=Math.max(0,s-1),o=Math.min(e.path.length-2,s);for(let s=a;s<=o;s++){let[n,a]=e.path[s],[o,l]=e.path[s+1],c=ee(t,i,n,a,o,l);c<r&&(r=c)}n=r}else{let e=t-a,r=i-o;n=Math.sqrt(e*e+r*r)}let l=e.style,c=l.strokeWidth??l.lineWidth??1;return n>Math.max(5,c/2+2,r)?null:{node:e,datum:Array.isArray(e.datum)&&e.datum[s]?e.datum[s]:e.datum,x:a,y:o,distance:n}}function Gi(e,t,i){let r=te(t,i,e);return r.hit?{node:e,datum:e.datum,x:r.cx,y:r.cy,distance:0}:null}function Hi(e,t,i){let r=te(t,i,e);return r.hit?{node:e,datum:e.datum,x:r.cx,y:r.cy,distance:0}:null}function Ui(e,t,i){let r=e.bodyWidth/2,s=Math.min(e.openY,e.closeY),n=Math.max(e.openY,e.closeY),a=Math.max(n-s,1);if(t>=e.x-r-3&&t<=e.x+r+3&&i>=e.highY-3&&i<=e.lowY+3){let r=s+a/2,n=t-e.x,o=i-r;return{node:e,datum:e.datum,x:e.x,y:r,distance:Math.sqrt(n*n+o*o)}}return null}function qi(e,t,i,r){if(0===e.topPath.length||e.clipRect&&(t<e.clipRect.x||t>e.clipRect.x+e.clipRect.width||i<e.clipRect.y||i>e.clipRect.y+e.clipRect.height))return null;if(e._hitArea){let r=Yi(Ni(e.topPath,e.curve),t,1/0),s=Yi(Ni(e.bottomPath,e.curve),t,1/0);if(null!==r&&null!==s&&i>=Math.min(r,s)&&i<=Math.max(r,s)){let r=Ji(e.topPath,t,e.bottomPath);return{node:e,datum:Array.isArray(e.datum)?e.datum[r]??e.datum:e.datum,x:t,y:i,distance:0}}}let s,n=Ni(e.topPath,e.curve),a=Ji(n,t),o=Ji(e.topPath,t);if(a<0||o<0)return null;if(n.length>1){let e=1/0,r=Math.max(0,a-1),o=Math.min(n.length-2,a);for(let s=r;s<=o;s++){let[r,a]=n[s],[o,l]=n[s+1];e=Math.min(e,ee(t,i,r,a,o,l))}s=e}else{let e=t-n[0][0],r=i-n[0][1];s=Math.sqrt(e*e+r*r)}if(s>r)return null;let[l,c]=e.topPath[o];return{node:e,datum:Array.isArray(e.datum)&&e.datum[o]?e.datum[o]:e.datum,x:l,y:c,distance:s}}function Ji(e,t,i){if(0===e.length)return-1;let r=t=>i?(e[t][0]+i[t][0])/2:e[t][0],s=0,n=e.length-1;for(;s<n;){let e=s+n>>1;r(e)<t?s=e+1:n=e}if(s>0){let e=Math.abs(r(s)-t);if(Math.abs(r(s-1)-t)<=e)return s-1}return s}function Ki(t,i,r,s){let{scene:n,scales:a}=i;if(0===n.length||!a)return t;let o=e(s.chartType)?.multiHover;if(o)return o(t,i,r,s);let l=function(e,t){let i=1/0,r=-1/0;for(let t of e){let e;if("line"===t.type){let i=t;i.path.length>=2&&(e=Ni(i.path,i.curve))}else if("area"===t.type){let i=t;!1!==i.interactive&&i.topPath.length>=2&&(e=Ni(i.topPath,i.curve))}if(!e||0===e.length)continue;let s=e[0][0],n=e[e.length-1][0];i=Math.min(i,s,n),r=Math.max(r,s,n)}return i>r?t:Math.min(r,Math.max(i,t))}(n,r),c=function(e,t,i=30){let r=[];for(let s of e)if("line"===s.type){let e=s;if(e.path.length<2)continue;let n=Yi(Ni(e.path,e.curve),t,i);if(null===n)continue;let a=Ji(e.path,t),o=Array.isArray(e.datum)&&e.datum[a]?e.datum[a]:e.datum;r.push({node:s,datum:o,x:e.path[a][0],y:n,group:e.group,color:e.style.stroke})}else if("area"===s.type){let e=s;if(!1===e.interactive||e.topPath.length<2)continue;let n=Ni(e.topPath,e.curve),a=Ni(e.bottomPath,e.curve),o=Yi(n,t,i);if(null===o)continue;let l=Yi(a,t,i),c=Ji(e.topPath,t),u=Array.isArray(e.datum)&&e.datum[c]?e.datum[c]:e.datum,h="string"==typeof e.style.stroke?e.style.stroke:"string"==typeof e.style.fill?e.style.fill:void 0;r.push({node:s,datum:u,x:e.topPath[c][0],y:o,y0:l??void 0,group:e.group,color:h})}return r}(n,l,s.maxXDistance);if(0===c.length)return t;let u,h=a.x?.invert,d="function"==typeof h?h(l):l;if(s.hasHit)u={...t,xValue:d,xPx:l};else{let e={xValue:d};"string"==typeof s.xAccessor&&(e[s.xAccessor]=d),u=mt(e,t.x,t.y,{xValue:d,xPx:l})}let f=a.y.invert;return u.allSeries=c.map(e=>{let t=f?f(e.y):e.y,r=null!=e.y0?f?f(e.y0):e.y0:void 0,n="stackedarea"===s.chartType&&null!=r?t-r:t;return{group:null==e.group||e.group===bi?"":e.group,value:n,valuePx:e.y,color:e.color||s.fallbackColor,datum:I(e.datum,i.resolvedRibbons)}}),u}function Qi(e,t,i="x",r="y"){let s="function"==typeof i?i:e=>e[i],n="function"==typeof r?r:e=>e[r],a="function"==typeof t.colorBy?t.colorBy:e=>e[t.colorBy],o=new Map;for(let i of e){let e=a(i)??(i.parentLine&&a(i.parentLine));if(null==e||""===String(e))continue;let r=String(e),n=o.get(r);(!n||("end"===t.position?Number(s(i))>Number(s(n)):Number(s(i))<Number(s(n))))&&o.set(r,i)}return[...o].map(([e,a])=>({type:"text",label:e,["string"==typeof i?i:"x"]:s(a),["string"==typeof r?r:"y"]:n(a),x:s(a),y:n(a),_directLabel:{id:e,position:t.position},color:t.color(e),fontSize:t.fontSize}))}function Zi(e=[]){let t=e.filter(e=>e._directLabel);return t.length?` Series endpoints: ${t.map(e=>`${e.label}: x ${String(e.x)}, y ${String(e.y)}`).join("; ")}.`:""}var er={status:"not-assessed",checked:0,unsupported:0,collisions:0,overflows:0,findings:[]};function tr(e,t,i){if("edges"===e){if(t)return"start";if(i)return"end"}return"middle"}function ir(e,t,i){if("edges"===e){if(t)return"hanging";if(i)return"auto"}return"middle"}function rr(e){if(0===e.length)return{min:null,max:null};let t=1/0,i=-1/0;for(let r of e)r.pixel<t&&(t=r.pixel),r.pixel>i&&(i=r.pixel);return{min:t,max:i}}function sr(e){if(e)return"object"==typeof e?e.strokeDasharray:"dashed"===e?"6,4":"dotted"===e?"2,4":e}function nr(e,t){return e&&"string"!=typeof e?{stroke:e.stroke??t.stroke,strokeWidth:e.strokeWidth??t.strokeWidth,...null!=e.strokeOpacity&&{strokeOpacity:e.strokeOpacity},...e.strokeDasharray&&{strokeDasharray:e.strokeDasharray}}:{...t,..."string"==typeof e&&{strokeDasharray:sr(e)}}}function ar(e,t,i){if("left"===e||"right"===e){let r="left"===e?i:0,s="left"===e?-1:1,n=Math.ceil(t/8),a=`M0,${r}`;for(let e=0;e<n;e++){let i=8*e+4,n=8*(e+1);a+=`L${Math.min(i,t)},${r+4*s}`,a+=`L${Math.min(n,t)},${r}`}return a}let r="bottom"===e?0:t,s="bottom"===e?1:-1,n=Math.ceil(i/8),a=`M${r},0`;for(let e=0;e<n;e++){let t=8*e+4,n=8*(e+1);a+=`L${r+4*s},${Math.min(t,i)}`,a+=`L${r},${Math.min(n,i)}`}return a}function or({axes:e,xTicks:t,yTicks:i,width:r,height:s}){let{xAxis:n,yAxis:a}=Ae(e);return Kt("g",{className:"stream-grid",children:[n,a].map((e,n)=>{if(!1===e?.grid)return null;let a=0===n,o=nr(e?.gridStyle,{stroke:"var(--semiotic-grid, #e0e0e0)",strokeWidth:1});return(a?t:i).map((t,i)=>Kt("line",{x1:a?t.pixel:0,y1:a?0:t.pixel,x2:a?t.pixel:r,y2:a?s:t.pixel,...o,strokeDasharray:sr(e?.gridStyle)??o.strokeDasharray},`${n}-${i}`))})})}var lr=null,cr=null;function ur(e){lr=e}function hr(e,t,i){let r="function"==typeof t?t:e=>e[t||"x"],s="function"==typeof i?i:e=>e[i||"y"],n=[],a=[];for(let t of e){let e=r(t),i=s(t);"number"==typeof e&&isFinite(e)&&n.push(e),"number"==typeof i&&isFinite(i)&&a.push(i)}return{xValues:n,yValues:a}}function dr(e){let[t,i]=Yt.useState(()=>lr);return Yt.useEffect(()=>{if(t)return;let e=!1;return(lr?Promise.resolve(lr):(cr||(cr=import("./c-XUJHKJQ6.min.js").then(e=>lr=e.MarginalGraphics).catch(e=>{throw cr=null,e})),cr)).then(t=>{e||i(()=>t)}),()=>{e=!0}},[t]),t?Kt(t,{...e}):null}var fr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pr(e){let t=new Date(e instanceof Date?e.valueOf():e);return`${fr[t.getUTCMonth()]} ${t.getUTCDate()}`}function gr(e){let t=Math.abs(e[1]-e[0]);return t<864e5?e=>{let i=new Date(e instanceof Date?e.valueOf():e),r=`${String(i.getUTCHours()).padStart(2,"0")}:${String(i.getUTCMinutes()).padStart(2,"0")}`;return t<3e5&&(r+=`:${String(i.getUTCSeconds()).padStart(2,"0")}`),t<1e4&&(r+=`.${String(i.getUTCMilliseconds()).padStart(3,"0")}`),r}:t<3156e7?pr:t<1578e8?e=>{let t=new Date(e instanceof Date?e.valueOf():e);return`${fr[t.getUTCMonth()]} ${t.getUTCFullYear()}`}:e=>String(new Date(e instanceof Date?e.valueOf():e).getUTCFullYear())}function yr(e){return"string"==typeof e||"number"==typeof e?6.5*String(e).length:60}function mr(e){let{scale:t,axis:i,size:r,horizontal:s=!1,axisExtent:n}=e,a=i?.extent??n,o=t.domain(),l=function(e){return e?.ticks??e?.tickCount??5}(i),c=Math.max(2,Math.floor(r/(s?70:30))),u="exact"===a?Math.max(2,l):Math.min(l,c),h=i?.tickValues??y(t,u,a),d=h.map(e=>e.valueOf()),f=i?.tickFormat||e.format||(o[0]instanceof Date||h[0]instanceof Date?gr([o[0].valueOf(),o[o.length-1].valueOf()]):we(d)),p=(e,t)=>s?f(e,t,d):f(e),g=h.map((e,i)=>({value:e,pixel:t(e),label:p(e,i)})),m=22;if(s){let e=g.reduce((e,t)=>Math.max(e,yr(t.label)),0);m=i?.autoRotate?Math.max(20,Math.min(e+8,55)):Math.max(55,e+8)}let x=s&&(i?.tickFormat||e.format)?e=>{let t=e.map(e=>e.value.valueOf());return e.map((e,i)=>({...e,label:f(e.value,i,t)}))}:void 0,v=function(e,t){if(e.length<=2)return e;let i=[e[0]];for(let r=1;r<e.length-1;r++)Math.abs(e[r].pixel-i[i.length-1].pixel)>=t&&i.push(e[r]);let r=e[e.length-1];return Math.abs(r.pixel-i[i.length-1].pixel)>=t?i.push(r):i[i.length-1]=r,i}(g,m);if(x&&(v=x(v)),v.length>1&&(v=v.filter((e,t)=>0===t||!function(e,t){return!("string"!=typeof e&&"number"!=typeof e||"string"!=typeof t&&"number"!=typeof t||String(e)!==String(t))}(e.label,v[t-1].label))),i?.includeMax&&v.length>0&&"exact"!==a&&!i.tickValues){let e=o[o.length-1];if(null!=e){let i=t(e),r=Math.abs(i-v[v.length-1].pixel);if(r>1){let t=p(e,v.length);r<m&&v.length>1&&(v=v.slice(0,-1)),v=[...v,{value:e,pixel:i,label:t}]}}}return x?x(v):v}function xr(e){let{width:t,height:i,totalWidth:r,totalHeight:s,margin:n,scales:a,showAxes:o,axes:l,showGrid:c,xFormat:u,yFormat:h,axisExtent:d}=e,f=Ht(()=>{if(!a||!c)return[];let e=l?.find(e=>"bottom"===e.orient)??l?.find(e=>"top"===e.orient);return mr({scale:a.x,axis:e,size:t,horizontal:!0,format:u,axisExtent:d})},[a,l,u,t,d,c]),p=Ht(()=>{if(!a||!c)return[];let e=l?.find(e=>"left"===e.orient)??l?.find(e=>"right"===e.orient);return mr({scale:a.y,axis:e,size:i,format:h,axisExtent:d})},[a,l,h,i,d,c]),g=c&&a,y=o&&a;if(!g&&!y)return null;let{xAxis:m,yAxis:x,xOrient:v,yOrient:b}=Ae(l),k="top"===v?0:i,A="right"===b?t:0,w=y&&!1!==m?.visible&&(!m||!1!==m.baseline),S=y&&!1!==x?.visible&&(!x||!1!==x.baseline),C=m?.jaggedBase||!1,M=x?.jaggedBase||!1,R=nr(m?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),P=nr(x?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1});return Kt("svg",{role:"presentation",width:r,height:s,style:{position:"absolute",top:0,left:0,pointerEvents:"none"},children:Qt("g",{transform:`translate(${n.left},${n.top})`,children:[g&&Kt(or,{axes:l,xTicks:f,yTicks:p,width:t,height:i}),w&&!C&&Kt("line",{x1:0,y1:k,x2:t,y2:k,...R}),y&&!1!==m?.visible&&C&&Kt("path",{d:ar(v,t,i),fill:"none",...R}),S&&!M&&Kt("line",{x1:A,y1:0,x2:A,y2:i,...P}),y&&!1!==x?.visible&&M&&Kt("path",{d:ar(b,t,i),fill:"none",...P})]})})}function vr(e){let{width:t,height:i,totalWidth:r,totalHeight:s,margin:n,scales:a,showAxes:o,axes:l,xLabel:f,yLabel:p,yLabelRight:g,xFormat:y,yFormat:m,axisExtent:x,showGrid:v,title:b,description:k,idPrefix:A,decorative:w=!1,directLabelDescriptionId:S,legend:C,legendHoverBehavior:M,legendClickBehavior:R,legendHighlightedCategory:P,legendIsolatedCategories:T,legendPosition:D="right",legendLayout:E,foregroundGraphics:L,marginalGraphics:$,xValues:B,yValues:_,annotations:I,onAnnotationActivate:F,onObservation:z,chartId:N,chartType:O,autoPlaceAnnotations:Y,svgAnnotationRules:W,annotationFrame:V,xAccessor:j,yAccessor:X,annotationData:G,pointNodes:H,curve:U,underlayRendered:q,canvasObscuresUnderlay:J=!0,linkedCrosshairName:K,linkedCrosshairSourceId:Q,children:Z}=e,ee=Se({onAnnotationActivate:F,onObservation:z,chartId:N,chartType:O}),te=Ce({showAxes:o,xLabel:f,yLabel:p,yLabelRight:g,axes:l}),oe=Me(E,te.leftAxis),le=Me(E,te.rightAxis),ce=C&&"left"===D&&oe>0?oe:n.left,ue=C&&"right"===D&&le>0?le:n.right,he=Ht(()=>{if(!o&&!v||!a)return[];let e=l?.find(e=>"bottom"===e.orient)??l?.find(e=>"top"===e.orient);return mr({scale:a.x,axis:e,size:t,horizontal:!0,format:y,axisExtent:x})},[o,v,a,l,y,t,x]),de=Ht(()=>!(!(l?.find(e=>"bottom"===e.orient)??l?.find(e=>"top"===e.orient))?.autoRotate||!function(e){for(let t=1;t<e.length;t++){let i=e[t-1],r=e[t];if(Math.abs(r.pixel-i.pixel)<(yr(i.label)+yr(r.label))/2+8)return!0}return!1}(he)),[l,he]),fe=Ht(()=>{if(!o&&!v||!a)return[];let e=l?.find(e=>"left"===e.orient)??l?.find(e=>"right"===e.orient);return mr({scale:a.y,axis:e,size:i,format:m,axisExtent:x})},[o,v,a,l,m,i,x]),pe=Ht(()=>{if(!o||!a||!l?.some(e=>"left"===e.orient))return[];let e=l?.find(e=>"right"===e.orient);return e?mr({scale:a.y,axis:e,size:i,format:m,axisExtent:x}):[]},[o,a,l,m,i,x]),ge=jt(new Map),ye=jt(I?.length??0),me=I?.length??0;ye.current!==me&&(ye.current=me,ge.current=new Map);let xe=$t(e=>e.theme),ve=!!I?.some(e=>e._directLabel||e._directLabelRequest),be=function(e){let[t,i]=Xt();return Gt(()=>{if(!e)return;let t=!0,r=()=>{};return import("./c-3J55HZFJ.min.js").then(({browserLabelMeasurer:e})=>{if(!t)return;let s=()=>i(()=>e());s(),r=St(s)}),()=>{t=!1,r()}},[e]),e?t:void 0}(ve),ke=Ht(()=>ve?function(e,t=[],i,r){return e.flatMap(e=>e._directLabelRequest?Qi(t,e._directLabelRequest,i,r):[e])}(I||[],G,j,X):I,[ve,I,G,j,X]),we=Ht(()=>function(e,t){let i=e.filter(e=>e._directLabel);if(!i.length)return{node:null};let r=i[0]._directLabel.position,s=t.measure??h,n=i.map(e=>({family:t.fontFamily||"sans-serif",version:t.fontVersion??0,weight:400,size:e.fontSize||11})),a=i.map((e,i)=>{let r=(e,t)=>{if(null==e||!t)return NaN;try{return t(Number(e))}catch{return NaN}};return{id:String(e._directLabel.id),anchor:{x:r(e.x,t.scales?.x),y:r(e.y,t.scales?.y)},measurement:s(String(e.label),n[i])}}),o=Math.max(0,(t.margin?.["end"===r?"right":"left"]??0)-10),l=c(a,{x:"end"===r?t.width+6:-o-6,y:0,width:o,height:t.height},r),d=l.dispositions.map((e,r)=>{if("omitted"===e.status)return null;let s=e.box,o=e.connector,c=i[r],h=Qt("g",{"data-direct-label-id":e.id,children:[o&&Kt("line",{...o,stroke:c.color,strokeWidth:.75}),Kt("text",{x:s.x+(a[r].measurement.left??0),y:s.y+a[r].measurement.ascent,fontFamily:n[r].family,fontWeight:n[r].weight,fontSize:n[r].size,fill:c.color,textAnchor:"start",children:c.label})]},e.id),d=t.renderLabel?t.renderLabel({...c,dx:s.x+(a[r].measurement.left??0)-a[r].anchor.x,dy:s.y+a[r].measurement.ascent-a[r].anchor.y,fontFamily:n[r].family},r,h):h;if(!d){let t=l.evidence;t.rendered--,t.omitted++,t.omittedIds.length<20&&t.omittedIds.push(e.id),Math.abs(e.offset.y)>.01&&t.displaced--,t.displacedIds=t.displacedIds.filter(t=>t!==e.id);for(let i of["RENDER_FAILURE","LABEL_OMITTED"]){let r=t.findings.find(e=>e.code===i);r||(r={code:i,count:0,labelIds:[],remedy:u[i]},t.findings.push(r)),r.count++,r.labelIds.length<20&&r.labelIds.push(e.id)}}if(d!==h&&(l.evidence.status="incomplete",d)){let t=l.evidence.findings.find(e=>"UNSUPPORTED_GEOMETRY"===e.code);t||(t={code:"UNSUPPORTED_GEOMETRY",count:0,labelIds:[],remedy:u.UNSUPPORTED_GEOMETRY},l.evidence.findings.push(t)),t.count++,t.labelIds.length<20&&t.labelIds.push(e.id)}return d?Kt(Yt.Fragment,{children:d},e.id):null}),f=Kt("g",{role:"list","aria-label":"Series endpoints","data-direct-label-fallback":"accessible-series-list",children:i.map((e,t)=>Kt("g",{role:"listitem","aria-label":`${e.label}: x ${String(e.x)}, y ${String(e.y)}`,children:Kt("title",{children:`${e.label}: x ${String(e.x)}, y ${String(e.y)}`})},a[t].id))});return{evidence:l.evidence,node:Qt("g",{className:"semiotic-direct-labels","data-label-layout":JSON.stringify(l.evidence),children:[d,f]},"direct-labels")}}(ke||[],{width:t,height:i,margin:n,scales:a,measure:be,fontFamily:xe.typography.fontFamily,...W?{renderLabel:(e,r,s)=>W(e,r,{width:t,height:i,scales:a?{...a,time:a.x,value:a.y}:null,frameType:"xy",xAccessor:j,yAccessor:X,data:G})??s}:{}}),[ke,t,i,n,a,be,xe,W,j,X,G]),Be=Ht(()=>{if(!I||0===I.length)return null;let e=ie(I).filter(e=>!e._directLabel&&!e._directLabelRequest),r=Re("xy",ee,!0),s={scales:a?{x:a.x,y:a.y,time:a.x,value:a.y}:null,timeAxis:"x",xAccessor:j,yAccessor:X,width:t,height:i,data:G,frameType:"xy",pointNodes:H,curve:U,stickyPositionCache:ge.current},n=Y?Pe({annotations:e,context:s,..."object"==typeof Y?Y:{}}):e;return Te(n,r,W,s)},[I,Y,W,t,i,j,X,G,a,H,U,ee]),_e=De(K),{unlockCrosshair:Ie,handlesEscape:Fe}=Ee();Gt(()=>{if(Fe||!_e?.locked||!K)return;let e=e=>{"Escape"===e.key&&Ie(K)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[_e?.locked,K,Ie,Fe]);let ze=we.node||o||b||k||C||L||$||Be&&Be.length>0||v||Z||_e,Ne=Ht(()=>({width:t,height:i,xTicks:he,yTicks:fe,yTicksRight:pe,labelMeasurer:be,axes:l}),[t,i,he,fe,pe,be,l]),Oe=function(e,t){let i=jt(null),[r,s]=Xt(er);return Gt(()=>{let t=i.current;if(!e||!t)return;let r=!0,n=()=>{};return import("./c-Q54EFOEN.min.js").then(({readAxisLabelAssessment:e})=>{if(!r)return;let i=()=>{let i=e(t);s(e=>JSON.stringify(e)===JSON.stringify(i)?e:i)};i(),n=St(i)}),()=>{r=!1,n()}},[e,t]),{ref:i,assessment:e?r:er}}(ve&&!!be,Ne),Ye=Ut(),{titleId:We,descId:Ve,labelledBy:je}=re(A||N||Ye);return ze?Qt("svg",{"data-semiotic-overlay":"",ref:Oe.ref,"data-axis-label-layout":ve?JSON.stringify(Oe.assessment):void 0,role:w?"presentation":"img","aria-labelledby":w?void 0:je,width:r,height:s,overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:[w&&S&&Kt("desc",{id:S,children:Zi(ke)}),!w&&Qt(Zt,{children:[Kt("title",{id:We,children:se(b,"XY Chart")}),Qt("desc",{id:Ve,children:[ne(b,k,{familyPhrase:"XY data visualization",fallback:"XY data visualization"}),Zi(ke)]})]}),Qt("g",{transform:`translate(${n.left},${n.top})`,children:[v&&a&&(!q||J)&&Kt(or,{axes:l,xTicks:he,yTicks:fe,width:t,height:i}),o&&a&&(()=>{let{xAxis:e,yAxis:r,xOrient:s,yOrient:n,leftAxis:a}=Ae(l),o="top"===s?0:i,c="right"===n?t:0,u="top"===s?-1:1,h="right"===n?1:-1,d=!e||!1!==e.baseline,y=!r||!1!==r.baseline,m=e?.jaggedBase||!1,x=r?.jaggedBase||!1,v=e?.landmarkTicks,b=r?.landmarkTicks,k=nr(e?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),A=nr(r?.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),w="var(--semiotic-text-secondary, var(--semiotic-text, #666))",S="var(--semiotic-text, #333)",C=de,M={fontSize:"var(--semiotic-tick-font-size, 12px)"},R={fontSize:"calc(var(--semiotic-tick-font-size, 12px) + 1px)"},P={fontSize:"var(--semiotic-axis-label-font-size, 12px)"},T=e?.tickAnchor,D=r?.tickAnchor,E=e?.label??f,L=r?.label??("right"===n?g??p:p),$="right"===n?t+ue-15:15-ce,B=rr(he),_=rr(fe);return Qt("g",{className:"stream-axes",style:{fontFamily:"var(--semiotic-font-family, sans-serif)"},children:[!1!==e?.visible&&Qt("g",{className:`semiotic-axis semiotic-axis-${s}`,"data-orient":s,children:[(!q||J)&&d&&!m&&Kt("line",{x1:0,y1:o,x2:t,y2:o,...k}),(!q||J)&&m&&Kt("path",{d:ar(s,t,i),fill:"none",...k}),he.map((e,t)=>{let i=!!v&&("function"==typeof v?v(e.value,t):ae(e.value,t>0?he[t-1].value:void 0));return Qt("g",{transform:`translate(${e.pixel},${o})`,children:[Kt("line",{y2:5*u,...k}),"string"==typeof e.label||"number"==typeof e.label?Kt("text",{y:u*(C?12:18),textAnchor:C?"end":tr(T,e.pixel===B.min,e.pixel===B.max),fontWeight:i?600:400,fill:w,fontSize:i?13:12,className:"semiotic-axis-tick",style:{userSelect:"none",...i?R:M},transform:C?"top"===s?"rotate(45)":"rotate(-45)":void 0,children:e.label}):Kt("foreignObject",{x:-30,y:"top"===s?-30:6,width:60,height:24,style:{overflow:"visible"},children:Kt("div",{style:{textAlign:"center",userSelect:"none",...M},children:e.label})})]},`xtick-${t}`)}),E&&Kt("text",{x:t/2,y:"top"===s?-(C?58:40):i+(C?58:40),textAnchor:"middle",fill:S,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...P},children:E})]}),!1!==r?.visible&&Qt("g",{className:`semiotic-axis semiotic-axis-${n}`,"data-orient":n,children:[(!q||J)&&y&&!x&&Kt("line",{x1:c,y1:0,x2:c,y2:i,...A}),(!q||J)&&x&&Kt("path",{d:ar(n,t,i),fill:"none",...A}),fe.map((e,t)=>{let i=!!b&&("function"==typeof b?b(e.value,t):ae(e.value,t>0?fe[t-1].value:void 0));return Qt("g",{transform:`translate(${c},${e.pixel})`,children:[Kt("line",{x2:5*h,...A}),"string"==typeof e.label||"number"==typeof e.label?Kt("text",{x:8*h,textAnchor:"right"===n?"start":"end",dominantBaseline:ir(D,e.pixel===_.min,e.pixel===_.max),fontWeight:i?600:400,fill:w,fontSize:i?13:12,className:"semiotic-axis-tick",style:{userSelect:"none",...i?R:M},children:e.label}):Kt("foreignObject",{x:"right"===n?8:-68,y:-12,width:60,height:24,style:{overflow:"visible"},children:Kt("div",{style:{textAlign:"right"===n?"left":"right",userSelect:"none",...M},children:e.label})})]},`ytick-${t}`)}),L&&Kt("text",{x:$,y:i/2,textAnchor:"middle",fill:S,transform:`rotate(${"right"===n?90:-90}, ${$}, ${i/2})`,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...P},children:L})]}),(()=>{let e=l?.find(e=>"right"===e.orient);if(!a||!e||!1===e.visible||0===pe.length)return null;let r=!1!==e.baseline,s=e.landmarkTicks,n=e.label||g,o=e.tickAnchor,c=nr(e.axisStyle,{stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),u=rr(pe);return Qt("g",{className:"semiotic-axis semiotic-axis-right","data-orient":"right",children:[r&&!e.jaggedBase&&Kt("line",{x1:t,y1:0,x2:t,y2:i,...c}),e.jaggedBase&&Kt("path",{d:ar("right",t,i),fill:"none",...c}),pe.map((e,i)=>{let r=!!s&&("function"==typeof s?s(e.value,i):ae(e.value,i>0?pe[i-1].value:void 0));return Qt("g",{transform:`translate(${t},${e.pixel})`,children:[Kt("line",{x2:5,...c}),"string"==typeof e.label||"number"==typeof e.label?Kt("text",{x:8,textAnchor:"start",dominantBaseline:ir(o,e.pixel===u.min,e.pixel===u.max),fontWeight:r?600:400,fill:w,fontSize:r?13:12,className:"semiotic-axis-tick",style:{userSelect:"none",...r?R:M},children:e.label}):Kt("foreignObject",{x:8,y:-12,width:60,height:24,style:{overflow:"visible"},children:Kt("div",{style:{textAlign:"left",userSelect:"none",...M},children:e.label})})]},`ytick-r-${i}`)}),n&&Kt("text",{x:t+ue-15,y:i/2,textAnchor:"middle",fill:S,transform:`rotate(90, ${t+ue-15}, ${i/2})`,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...P},children:n})]})})()]})})(),Be,we.node,$&&a&&B&&_&&Qt(Zt,{children:[$.top&&Kt("g",{transform:"translate(0, 0)",children:Kt(dr,{orient:"top",config:d($.top),values:B,scale:a.x,size:n.top,length:t})}),$.bottom&&Kt("g",{transform:`translate(0, ${i})`,children:Kt(dr,{orient:"bottom",config:d($.bottom),values:B,scale:a.x,size:n.bottom,length:t})}),$.left&&Kt("g",{transform:"translate(0, 0)",children:Kt(dr,{orient:"left",config:d($.left),values:_,scale:a.y,size:n.left,length:i})}),$.right&&Kt("g",{transform:`translate(${t}, 0)`,children:Kt(dr,{orient:"right",config:d($.right),values:_,scale:a.y,size:n.right,length:i})})]}),L,_e&&(_e.locked||_e.sourceId!==Q)&&a?.x&&(()=>{let e=a.x(_e.xValue);if(null==e||e<0||e>t)return null;let r=_e.locked,s={x1:e,y1:0,x2:e,y2:i,strokeDasharray:r?"6,3":"4,4"};return Qt("g",{pointerEvents:"none","aria-hidden":"true",children:[Kt("line",{...s,stroke:"var(--semiotic-surface, #fff)",strokeWidth:r?3.5:3}),Kt("line",{...s,"data-semiotic-crosshair":r?"locked":"hover",stroke:r?"var(--semiotic-text, #333)":"var(--semiotic-text-secondary, #666)",strokeWidth:r?1.5:1})]})})(),Z]}),Kt(Le,{title:b,totalWidth:r,marginTop:n.top}),$e({legend:C,totalWidth:r,totalHeight:s,margin:n,legendPosition:D,title:b,legendLayout:E,axisChrome:te,legendHoverBehavior:M,legendClickBehavior:R,legendHighlightedCategory:P,legendIsolatedCategories:T})]}):null}function br(e,t,i,r){if(!e||t.length<2)return null;let s=Be(e.stops,r);return s?Kt("linearGradient",{id:i,gradientUnits:"userSpaceOnUse",x1:t[0][0],y1:0,x2:t[t.length-1][0],y2:0,children:s}):null}var kr="var(--semiotic-primary, #6366f1)";function Ar(e){return"under"===e.layer&&("band"===e.type||"x-band"===e.type)}function wr(e,t,i,r){let s="band"===e.type,n=s?t.y:t.x;if("function"!=typeof n)return null;let a=n.domain?.(),o=n((s?e.y0:e.x0)??a?.[0]),l=n((s?e.y1:e.x1)??a?.[1]);if(!Number.isFinite(o)||!Number.isFinite(l))return null;let c=s?r:i,u=Math.min(c,Math.max(0,Math.min(o,l))),h=Math.max(0,Math.min(c,Math.max(o,l))-u);return s?{x:0,y:u,width:i,height:h}:{x:u,y:0,width:h,height:r}}function Sr(e){return"band"===e.type?"vertical":"horizontal"}function Cr(e){return(t,i,r,s)=>{let n=t.globalAlpha;for(let i of e){let e=wr(i,r,s.width,s.height);if(!e)continue;let a=i.fill??i.color,o="string"==typeof a&&a?a:kr,l=Rt(i.gradient,Sr(i),o),c="horizontal"===l?.direction;t.globalAlpha=n*(i.opacity??1)*(i.fillOpacity??.1),t.fillStyle=l&&Pt(t,l,o,e.x,e.y,c?e.x+e.width:e.x,c?e.y:e.y+e.height)||Tt(t,a,kr),t.fillRect(e.x,e.y,e.width,e.height)}t.globalAlpha=n}}function Mr(e,t="under-band",i=kr){return(r,s,n)=>e.map((e,r)=>{let a=wr(e,s,n.width,n.height);if(!a)return null;let o=We(e,`${t}-${r}`,Sr(e),i);return Qt("g",{opacity:e.opacity,children:[o.def&&Kt("defs",{children:o.def}),Kt("rect",{...a,fill:o.fill,fillOpacity:e.fillOpacity??.1})]},`${t}-${r}`)})}var Rr={axisStroke:"#ccc",tickText:"#666",crosshair:"rgba(0, 0, 0, 0.25)",hoverFill:"rgba(255, 255, 255, 0.3)",hoverStroke:"rgba(0, 0, 0, 0.4)",pointRing:"white",primary:"#007bff",background:""};function Pr(e,t){let i=e.trim();if(/^#[0-9a-f]{3}$/i.test(i)){let e=i[1],r=i[2],s=i[3];return`#${e}${e}${r}${r}${s}${s}${t}`}if(/^#[0-9a-f]{6}$/i.test(i))return`${i}${t}`;let r=i.match(/^rgb\s*\(\s*([^)]+?)\s*\)$/i);if(r){let e=parseInt(t,16)/255;return`rgba(${r[1]}, ${e.toFixed(3)})`}return i}function Tr(e){if(!e)return;let t=[];for(let i of e)if("point"===i.type)t.push(i);else if("symbol"===i.type)t.push({pointId:i.pointId,x:i.x,y:i.y,r:Et(i.size)});else if("glyph"===i.type){let e=Lt(i.glyph,i.size);t.push({pointId:i.pointId,x:i.x+e.centerDx,y:i.y+e.centerDy,r:e.radius})}return t}function Dr(e){return null==e?"":"number"==typeof e?Number.isInteger(e)?String(e):e.toFixed(2):e instanceof Date?e.toLocaleString():String(e)}var Er=/*#__PURE__*/Bt(function({hover:e}){let t=e.data??{},i=t.__aggregateValue??t.y??t.value,r=t.x??t.time;if(void 0===i&&void 0===r){let e=je(t);if(null!=e.title||e.entries.length>0)return Qt("div",{className:"semiotic-tooltip",style:_t,children:[null!=e.title&&Kt("div",{style:{fontWeight:600,marginBottom:e.entries.length?2:0},children:String(e.title)}),e.entries.map(e=>Qt("div",{style:{opacity:.7,fontSize:11},children:[e.key,":"," ",Kt("span",{style:{fontWeight:600},children:Dr(e.value)})]},e.key))]})}return Qt("div",{className:"semiotic-tooltip",style:_t,children:[Kt("div",{style:{fontWeight:600,marginBottom:2},children:Dr(i)}),Kt("div",{style:{opacity:.7,fontSize:11},children:Dr(r)})]})});function Lr({enabled:e,hoverPoint:t,tooltipContent:i,...r}){if(!e||!t)return null;let s=i?i(t):Kt(Er,{hover:t});return It(s)?Kt(Xe,{...r,contentOwnsChrome:Ft(i),x:t.x,y:t.y,className:"stream-frame-tooltip",children:s}):null}function $r(e,t){if(!t||0===e.length||!e.some(e=>null!=e&&"object"==typeof e&&Array.isArray(e[t])))return e;let i=[];for(let r of e){if(null==r||"object"!=typeof r)continue;let e=r[t];if(!Array.isArray(e))continue;let s=r.label??r.id??r.key;for(let t of e)null==t||"object"!=typeof t||i.push(null==s?t:{...t,_lineGroup:s})}return i}var Br=Y,_r=Rr;function Ir(e){if(e)return"x"===e.dimension?"pan-y":"y"===e.dimension?"pan-x":"none"}var Fr=/*#__PURE__*/He(/*#__PURE__*/qt(/*#__PURE__*/Jt(function(t,i){let{chartType:r,runtimeMode:s,data:c,chunkThreshold:u,chunkSize:h,xAccessor:d,yAccessor:f,accessorRevision:p,colorAccessor:g,sizeAccessor:y,symbolAccessor:A,symbolMap:w,groupAccessor:M,lineDataAccessor:R,curve:P,normalize:T,baseline:D,stackOrder:E,binSize:L,binAlign:z,valueAccessor:N,arrowOfTime:Y="right",windowMode:W,capacityMode:V,windowSize:j,capacity:X,timeAccessor:G,xExtent:H,yExtent:U,invertY:q,extentPadding:J=.1,scalePadding:K,sizeRange:Q,size:Z=[500,300],responsiveWidth:ee,responsiveHeight:te,margin:re,className:se,background:ne,maxDevicePixelRatio:ae,renderMode:ke,lineStyle:Ae,pointStyle:we,areaStyle:Se,barStyle:Ce,waterfallStyle:Me,swarmStyle:Re,barColors:Pe,colorScheme:Te,boundsAccessor:De,boundsStyle:Ee,y0Accessor:Le,band:$e,gradientFill:We,lineGradient:je,semanticLineStops:Xe,areaGroups:He,openAccessor:gt,highAccessor:yt,lowAccessor:bt,closeAccessor:kt,candlestickStyle:At,showAxes:Rt=!0,axes:Pt,xLabel:Tt,yLabel:Et,yLabelRight:Lt,xFormat:$t,yFormat:Bt,axisExtent:_t,tickFormatTime:It,tickFormatValue:Ft,hoverAnnotation:Nt,tooltipContent:Ot,customHoverBehavior:qt,customClickBehavior:Jt,onObservation:Zt,annotationObservationCallback:ei,chartId:ti,enableHover:ii,hoverRadius:ri=30,tooltipMode:si,annotations:ni,onAnnotationActivate:li,autoPlaceAnnotations:ci,svgAnnotationRules:hi,showGrid:di,legend:gi,legendHoverBehavior:yi,legendClickBehavior:mi,legendHighlightedCategory:xi,legendIsolatedCategories:vi,legendPosition:bi,legendLayout:ki,legendCategoryAccessor:Ai,onCategoriesChange:wi,backgroundGraphics:Si,foregroundGraphics:Ci,interactiveGraphics:Mi,interactiveGraphicsLabel:Ri,canvasPreRenderers:Pi,svgPreRenderers:Ti,title:Di,categoryAccessor:Ei,brush:Li,onBrush:$i,decay:Bi,pulse:_i,transition:Ii,animate:zi,staleness:Ni,frameScheduler:Yi,clock:Wi,random:Vi,seed:ji,paused:Xi=!1,suspendWhenHidden:Gi=!0,heatmapAggregation:Hi,heatmapXBins:Ui,heatmapYBins:qi,showValues:Ji,heatmapValueFormat:Qi,heatmapColorScale:Zi,onColorDomainChange:er,marginalGraphics:tr,pointIdAccessor:ir,xScaleType:rr,yScaleType:sr,accessibleTable:nr=!0,description:ar,summary:or,linkedCrosshairName:lr,linkedCrosshairSourceId:cr,customLayout:ur,onLayoutError:dr,layoutConfig:fr,layoutSelection:pr}=t,{canvasPreRenderers:yr,svgPreRenderers:mr}=function(e,t,i){let r=`under-band-${Yt.useId().replace(/:/g,"")}`,s=Ve(Yt.useMemo(()=>Object.assign({},ie(e??[]).filter(Ar)),[e])),n=Yt.useMemo(()=>Object.values(s),[s]);return Yt.useMemo(()=>0===n.length?{canvasPreRenderers:t,svgPreRenderers:i}:{canvasPreRenderers:[Cr(n),...t??[]],svgPreRenderers:[Mr(n,r),...i??[]]},[n,t,i,r])}(ni,Pi,Ti),kr=W??V??"sliding",wr=j??X??200,{customHoverBehavior:Sr,customClickBehavior:Dr,hasClickBehavior:Er}=$({customHoverBehavior:qt,customClickBehavior:Jt,onObservation:Zt,chartId:ti,chartType:"StreamXYFrame"}),Fr=Ut().replace(/:/g,""),zr=jt(!1),Nr=jt({w:-1,h:-1}),Or=jt(!1),Yr=Ue({sizeProp:Z,responsiveWidth:ee,responsiveHeight:te,userMargin:re,marginDefault:Br,title:Di,legend:gi,legendPosition:bi,...m(t,gi),animate:zi,transitionProp:Ii,frameScheduler:Yi,clock:Wi,random:Vi,seed:ji,paused:Xi,suspendWhenHidden:Gi,themeDirtyRef:zr}),Wr=qe(),Vr=Je(),{reducedMotionRef:jr,responsiveRef:Xr,size:Gr,currentTheme:Hr,transition:Ur,introEnabled:qr,tableId:Jr,rafRef:Kr,renderFnRef:Qr,scheduleRender:Zr,frameRuntime:es}=Yr;Gt(()=>St(()=>{zr.current=!0,Zr()}),[Zr]);let ts=Yr.margin;if(tr){let e={...Yr.margin};tr.top&&e.top<60&&(e.top=60),tr.bottom&&e.bottom<60&&(e.bottom=60),tr.left&&e.left<60&&(e.left=60),tr.right&&e.right<60&&(e.right=60),ts=e}let is=Math.max(1,Gr[0]-ts.left-ts.right),rs=Math.max(1,Gr[1]-ts.top-ts.bottom),ss=(Pt?.find(e=>"left"===e.orient)??Pt?.find(e=>"right"===e.orient))?.extent??_t,ns=Ht(()=>Ke(c),[c]),as=Nt??ii,[os,ls]=Xt(0),cs=jt(0),[us,hs]=Xt(null),ds=oe(Ci,Gr,ts,us),fs=oe(Si,Gr,ts,us),ps=jt(null),gs=jt(!1),ys=jt(null),ms=jt(void 0),[xs,vs]=Xt(null),bs=jt(_r.primary),ks=jt(function(){let e=-1,t=Rr;return{resolve(i){if(!i)return Rr;let r=Dt();return r===e||(t=function(e){if(!e)return Rr;let t=getComputedStyle(e),i=t.getPropertyValue("--semiotic-border").trim(),r=t.getPropertyValue("--semiotic-text-secondary").trim(),s=t.getPropertyValue("--semiotic-bg").trim(),n=t.getPropertyValue("--semiotic-primary").trim(),a=r||t.getPropertyValue("--text-secondary").trim(),o=t.getPropertyValue("--text-primary").trim(),l=i||t.getPropertyValue("--surface-3").trim(),c=s||t.getPropertyValue("--surface-0").trim();return a||o||i||n?{axisStroke:l||Rr.axisStroke,tickText:a||Rr.tickText,crosshair:a?Pr(a,"66"):Rr.crosshair,hoverFill:c?Pr(c,"4D"):Rr.hoverFill,hoverStroke:a?Pr(a,"99"):Rr.hoverStroke,pointRing:c||Rr.pointRing,primary:n||Rr.primary,background:c||Rr.background}:Rr}(i),e=r),t},invalidate(){e=-1}}}()),As=jt(!1),ws=Qe("StreamXYFrame"),[Ss,Cs]=Xt(!1),Ms="streaming"===s||["bar","swarm","waterfall"].includes(r),Rs=!!Sr,Ps=Ht(()=>({chartType:r,runtimeMode:Ms?"streaming":"bounded",windowSize:wr,windowMode:kr,arrowOfTime:Ms?Y:"right",extentPadding:J,scalePadding:K,axisExtent:_t,yAxisExtent:ss,xAccessor:d,yAccessor:f,accessorRevision:p,timeAccessor:Ms?G:void 0,valueAccessor:N,colorAccessor:g,sizeAccessor:y,symbolAccessor:A,symbolMap:w,groupAccessor:M||(R?"_lineGroup":void 0),categoryAccessor:Ei,lineDataAccessor:R,xScaleType:rr,yScaleType:sr,xExtent:H,yExtent:U,invertY:q,sizeRange:Q,binSize:L,binAlign:z,normalize:T,baseline:D,stackOrder:E,boundsAccessor:De,boundsStyle:Ee,y0Accessor:Le,band:$e,gradientFill:C(We),areaGroups:He?new Set(He):void 0,lineGradient:S(je),semanticLineStops:Xe,openAccessor:gt,highAccessor:yt,lowAccessor:bt,closeAccessor:kt,candlestickStyle:At,lineStyle:Ae,trackHoverRows:Rs,pointStyle:we,areaStyle:Se,swarmStyle:Re,waterfallStyle:Me,colorScheme:Te,barColors:Pe,barStyle:Ce,annotations:ni,decay:Bi,pulse:_i,transition:Ur,introAnimation:qr,staleness:Ni,clock:es.now,heatmapAggregation:Hi,heatmapXBins:Ui,heatmapYBins:qi,showValues:Ji,heatmapValueFormat:Qi,heatmapColorScale:Zi,pointIdAccessor:ir,curve:P,themeCategorical:Hr?.colors?.categorical,themeSemantic:zt(Hr),themeSequential:Hr?.colors?.sequential,themeDiverging:Hr?.colors?.diverging,customLayout:ur,onLayoutError:dr,layoutConfig:fr,layoutMargin:ts}),[r,Ms,wr,kr,Y,J,K,_t,ss,d,f,p,G,N,g,y,A,w,M,R,Ei,rr,sr,H,U,q,Q,L,z,T,D,E,De,Ee,Le,$e,We,He,je,Xe,gt,yt,bt,kt,At,Ae,Rs,we,Se,Re,Me,Te,Pe,Ce,ni,Bi,_i,Ur,qr,Ni,es.now,Hi,Ui,qi,Ji,Qi,Zi,ir,P,Hr,ur,dr,fr,ts]),Ts=Ve(Ps),Ds=jt(null);Ds.current||(Ds.current=new Fi(Ts));let Es=le(Ds,Ai,wi,e=>e.getData()),Ls=jt({onColorDomainChange:er,chartType:r}),$s=jt(void 0);Ls.current={onColorDomainChange:er,chartType:r};let Bs=Wt(()=>{let{onColorDomainChange:e,chartType:t}=Ls.current;if(!e||"heatmap"!==t)return;let i=1/0,r=-1/0;for(let e of Ds.current?.scene??[]){if("heatcell"!==e.type)continue;let t=Number(e.value??e.datum?.value);Number.isFinite(t)&&(t<i&&(i=t),t>r&&(r=t))}let s=Number.isFinite(i)&&Number.isFinite(r)?[i,r]:null,n=$s.current;null===n&&null===s||n&&s&&n[0]===s[0]&&n[1]===s[1]||($s.current=s,e(s))},[]);(function(t,i,r,s,a){Gt(()=>{let o=i?"custom":t;return e(o)?.canvasRenderers.length||!i&&"custom"===o?void 0:F(i?()=>import("./c-J2QH3PEI.min.js").then(e=>{n(e.customXYPlugin)}):()=>import("./c-WDVYLMCM.min.js").then(e=>{e.registerBuiltInXYPlugins()}),()=>{i?a.current?.markStylePaintPending():r.current=!0,s()},`StreamXYFrame painters for "${t}"`)},[t,i,r,s,a])})(r,ur,zr,Zr,Ds),ce(Ds,Ts,zr,Zr);let _s=function(e,t){let i=jt(!1),r=jt(!1);e||(r.current=!1),i.current=e&&!be&&!r.current&&!fi();let s=jt(t);return s.current=t,Gt(()=>{if(!e||be||fi())return;let t=()=>{i.current=!1,s.current()};return F(pi,t,"XY transition engine",()=>{r.current=!0,t()})},[e]),i}(!!Ur,()=>{zr.current=!0,Zr()});ue(Ds,pr,zr,Zr);let Is=jt(null);Is.current||(Is.current=new x(e=>{let t=Ds.current;t&&t.ingest(e)&&(zr.current=!0,Zr())},{chunkThreshold:u,chunkSize:h})),Gt(()=>{Is.current?.updateChunkOptions({chunkThreshold:u,chunkSize:h})},[u,h]),function(e,{storeRef:t,adapterRef:i,dirtyRef:r,scheduleRender:s,hoverRef:n,setHoverPoint:a}){let o=Wt(e=>{i.current?.push(e)},[i]),l=Wt(e=>{i.current?.pushMany(e)},[i]),c=Wt(()=>{i.current?.clear(),t.current?.clear(),r.current=!0,s()},[i,t,r,s]);Vt(e,()=>({push:o,pushMany:l,remove:e=>{i.current?.flush();let o=t.current?.remove(e)??[];return o.length>0&&(n.current&&o.some(e=>e===n.current?.data)&&(n.current=null,a(null)),r.current=!0,s()),o},update:(e,n)=>{i.current?.flush();let a=t.current?.update(e,n)??[];return a.length>0&&(r.current=!0,s()),a},clear:c,getData:()=>(i.current?.flush(),t.current?.getData()??[]),getScales:()=>t.current?.scales??null,getExtents:()=>t.current?.getExtents()??null,getCustomLayout:()=>t.current?.lastCustomLayoutResult??null,getLayoutFailure:()=>t.current?.lastCustomLayoutFailure??null}),[o,l,c,s,i,t,r,n,a])}(i,{storeRef:Ds,adapterRef:Is,dirtyRef:zr,scheduleRender:Zr,hoverRef:ps,setHoverPoint:vs}),Gt(()=>{c&&Is.current?.setBoundedData($r(ns,R))},[c,ns,R]);let{marginalXValues:Fs,marginalYValues:zs,refreshMarginalValues:Ns}=function(e,t,i,r,s){let[n,a]=Xt([]),[o,l]=Xt([]),c=null!=t,u=c?[t.top,t.bottom,t.left,t.right].join("|"):"",h=Wt((t=e.current?.getData()??[])=>{let i=hr(t,r,s);a(i.xValues),l(i.yValues)},[e,r,s]);return Gt(()=>{if(!c)return a([]),void l([]);h()},[i,c,u,h]),{marginalXValues:n,marginalYValues:o,refreshMarginalValues:h}}(Ds,tr,ns,d,f),{canvasRef:Os,interactionCanvasRef:Ys,resolutionDirtyRef:Ws}=Ze(Yr,{storeRef:Ds,dirtyRef:zr,hydrated:Wr,wasHydratingFromSSR:Vr,cleanup:()=>Is.current?.clear(),maxDevicePixelRatio:ae,canvasPaintDependencies:[r,is,rs,Rt,ne,Si,Ae,ke,yr,Zr]}),{hoverHandlerRef:Vs,hoverLeaveRef:js,onPointerMove:Xs,onPointerLeave:Gs,flushPointerMove:Hs,pointerStateRef:Us}=Yr;Vs.current=e=>{let t=Os.current;if(!t)return;let i=t.getBoundingClientRect(),s=e.clientX-i.left-ts.left,n=e.clientY-i.top-ts.top;if(s<0||s>is||n<0||n>rs){if(et(t),!as)return;return void(ps.current&&(ps.current=null,ys.current=null,vs(null),Sr?.(null),Zr()))}let a=Ds.current;if(!a||0===a.scene.length)return void et(t);let o=xt(ri,e.pointerType),l=Oi(a.scene,s,n,o,a.quadtree,a.maxPointRadius);if(et(t,Ye(l?.node)),!as)return;let c="multi"===si,u=()=>{ps.current&&(ps.current=null,ys.current=null,vs(null),Sr&&Sr(null),Zr())};if(!l&&!c)return void u();let h=c||!l?s:l.x,f=c||!l?n:l.y,p=l?.datum?I(l.datum,a.resolvedRibbons):{},g=a.scales?.x?.invert,y="function"==typeof g?g(h):void 0,m="bar"===r?vt(p,y):y,x=mt(p,h,f,null!=m?{xValue:m,xPx:h}:void 0);c&&(x=Ki(x,a,h,{chartType:r,xAccessor:d,fallbackColor:bs.current,maxXDistance:Math.max(o,is),hasHit:!!l})),l||x.allSeries?.length?(ps.current=x,ys.current=l?.node??null,vs(x),Sr?.(x),Zr()):u()},js.current=()=>{et(Os.current),ps.current&&(ps.current=null,ys.current=null,vs(null),Sr?.(null),Zr())},tt(Os);let qs=jt(()=>{});qs.current=e=>{if(it(e.target)||!Dr)return;Hs();let t=Os.current;if(!t)return;let i=t.getBoundingClientRect(),s=e.clientX-i.left-ts.left,n=e.clientY-i.top-ts.top;if(s<0||s>is||n<0||n>rs)return void Dr(null);let a=Ds.current;if(!a||0===a.scene.length)return void Dr(null);let o=xt(ri,ms.current),l=Oi(a.scene,s,n,o,a.quadtree,a.maxPointRadius);if(!l)return void Dr(null);let c=l.datum||{},u=a.scales?.x?.invert,h="function"==typeof u?u(l.x):void 0,d="bar"===r?vt(c,h):h;Dr(mt(c,l.x,l.y,null!=d?{xValue:d,xPx:l.x}:void 0),{type:"activate",inputType:rt(ms.current)})};let Js=Wt(e=>qs.current(e),[]),{kbFocusIndexRef:Ks,focusedNavPointRef:Qs,onKeyDown:Zs,refreshKeyboardFocus:en}=B({clearPointerHover:Gs,storeRef:Ds,hoverRef:ps,hoveredNodeRef:ys,setHoverPoint:vs,customHoverBehavior:Sr,customClickBehavior:Dr,scheduleRender:Zr,decorateHover:"multi"===si||"bar"===r?(e,t)=>("bar"===r&&(e={...e,xValue:vt(e.data,t.scales?.x.invert?.(e.x)),xPx:e.x}),"multi"===si?Ki(e,t,e.x,{chartType:r,xAccessor:d,fallbackColor:bs.current,maxXDistance:is,hasHit:!0}):e):void 0}),tn=Wt(e=>{he(Us,e,!!as,gs.current,Os.current)&&(ms.current=e.pointerType,Ks.current=-1,Qs.current=null,Xs(e))},[Os,as,Qs,Ks,Xs,Us]),rn=Wt(e=>{he(Us,e,!!as,gs.current,Os.current,"mouse")&&(ms.current="mouse",Ks.current=-1,Qs.current=null,Xs({clientX:e.clientX,clientY:e.clientY,pointerType:"mouse"}))},[Os,as,Qs,Ks,Xs,Us]),sn=Wt(e=>{ms.current=e.pointerType},[]);Qr.current=()=>{if(Kr.current=null,!es.isActive)return;let e=Os.current,t=Ys.current;if(!e||!t)return;let i=Ds.current;if(!i||_s.current&&(!Vr||-1!==Nr.current.w))return;let s=es.now(),n=null!=i.activeTransition,l=i.advanceTransition(jr.current?s+1e6:s),c=!jr.current&&l,u=Nr.current.w!==is||Nr.current.h!==rs,h=Ws.current,d=zr.current||n||u,f=n&&!l,p=i.consumeStylePaintPending(),g=!1,y=i.getLastUpdateResult(),m=ws.current.beforeCompute(y,c);(zr.current||u)&&(!c||u)&&(i.computeScene({width:is,height:rs}),en(),Nr.current={w:is,h:rs},g=!0,Es(),Bs()),(g||p)&&(gs.current=st(i.scene),gs.current||et(e)),gs.current&&(n||g||p)&&function(e){let{canvas:t,pointer:i,store:r,margin:s,width:n,height:a}=e;Ge(t,i,i=>{let o=t.getBoundingClientRect(),l=i.clientX-o.left-s.left,c=i.clientY-o.top-s.top;if(l<0||l>n||c<0||c>a)return;let u=Oi(r.scene,l,c,xt(e.hoverRadius,i.pointerType),e.geometryMoved?null:r.quadtree,r.maxPointRadius);return Ye(u?.node)})}({canvas:e,pointer:Us.current,store:i,margin:ts,width:is,height:rs,hoverRadius:ri,geometryMoved:n||g}),ws.current.afterCompute(m,g,u);let x=_(i,s,g,Or),v=nt(ae,Gr),{resized:b}=at(e,Gr,v);at(t,Gr,v);let k=ks.current.resolve(e);bs.current=k.primary;let A=i.lastIngestTime>0?s-i.lastIngestTime:0,w=de(Ni,A),S=Ni&&w.isStale;if(d||p||x.changed||h||b){let t=ot(e,Gr,ts,v);if(t){t.clearRect(-ts.left,-ts.top,Gr[0],Gr[1]),Ni&&w.alpha<1&&(t.globalAlpha=w.alpha),t.save(),"function"==typeof t.rect&&(t.beginPath(),t.rect(0,0,is,rs),t.clip()),function(e,t,i,r,s){if(t&&r)for(let n of t)e.save(),n(e,i,r,s),e.restore()}(t,yr,i.scene,i.scales,{width:is,height:rs});let e=a(r,!!ur);fe({context:t,nodes:i.scene,renderMode:ke,pixelRatio:v,paintBuiltIn:r=>{if(e&&i.scales)for(let s of e)s(t,r,i.scales,{width:is,height:rs})}}),t.restore(),Ni&&w.alpha<1&&(t.globalAlpha=1)}}let C=!!(as&&ps.current&&i.scales),M=!!(ys.current&&Array.isArray(Nt)&&Nt.some(e=>e&&"object"==typeof e&&"highlight"===e.type)),R=C||M;if(O(R,As.current)){let e=ot(t,Gr,ts,v);if(e){if(e.clearRect(-ts.left,-ts.top,Gr[0],Gr[1]),C&&ps.current){let t="object"==typeof as?as:{};!function(e,t,i,r,s,n,a){if(!1===s.crosshair)return;let l=t.allSeries,c=l&&l.length>0,u=t.xPx??t.x;e.save();let h="object"==typeof s.crosshair?s.crosshair:{};e.strokeStyle=h.stroke||a.crosshair;let d=h.strokeWidth??1;if(h.strokeDasharray?e.setLineDash(h.strokeDasharray.split(/[\s,]+/).map(Number)):e.setLineDash([4,4]),d>0&&(e.lineWidth=d,e.beginPath(),e.moveTo(c?u:t.x,0),e.lineTo(c?u:t.x,r),e.stroke(),c||(e.beginPath(),e.moveTo(0,t.y),e.lineTo(i,t.y),e.stroke())),e.restore(),c){e.lineWidth=2,e.strokeStyle=a.pointRing;for(let t of l)null!=t.valuePx&&(e.beginPath(),e.arc(u,t.valuePx,4,0,2*Math.PI),e.fillStyle=t.color||a.primary,e.fill(),e.stroke())}else{let i=s.pointColor||o(n)||a.primary;e.beginPath(),e.arc(t.x,t.y,4,0,2*Math.PI),e.fillStyle=i,e.fill(),e.strokeStyle=a.pointRing,e.lineWidth=2,e.stroke()}}(e,ps.current,is,rs,t,ys.current,k)}if(M&&ys.current&&Array.isArray(Nt)){let t=Nt.find(e=>e&&"object"==typeof e&&"highlight"===e.type);t&&function(e,t,i,r,s){if(!i)return;let n="group"in i?i.group:void 0;if(void 0!==n)for(let i of t){if("line"!==i.type||i.group!==n||i.path.length<2)continue;let t="function"==typeof r.style?i.datum?r.style(i.datum):{}:r.style||{};e.save(),e.beginPath(),e.moveTo(i.path[0][0],i.path[0][1]);for(let t=1;t<i.path.length;t++)e.lineTo(i.path[t][0],i.path[t][1]);e.strokeStyle=t.stroke||i.style.stroke||s.primary;let a=t.strokeWidth??(i.style.strokeWidth??2)+2;a<=0||(e.lineWidth=a,e.globalAlpha=t.opacity??1,e.stroke()),e.restore()}}(e,i.scene,ys.current,t,k)}}As.current=R}d&&e&&e.setAttribute("aria-label",lt(i.scene,r+" chart"));let P=zr.current;zr.current=P&&c&&!g,Ws.current=!1,P&&i.scales&&(us!==i.scales&&hs(i.scales),tr&&Ns(i.getData())),(ni&&ni.length>0||ur)&&(g||n)&&(g||f||s-cs.current>=33)&&(ls(e=>e+1),cs.current=s),Ni?.showBadge&&Cs(!!S),(c||null!=i.activeTransition||x.pending)&&Zr()},pe(Ni,Ds,zr,Zr,es.now,Ss,Cs);let nn=Ht(()=>{if(!$t&&!It&&Ds.current?.xIsDate&&us)return gr(us.x.domain())},[$t,It,us]),an=$t||It||nn,on=Qs.current,ln=Kt(ct,{active:Ks.current>=0,hoverPoint:xs,margin:ts,size:Gr,shape:on?.shape,width:on?.w,height:on?.h}),cn=v(d,G,"__semiotic_resolvedX","__semiotic_resolvedTime"),un=v(f,N,"__semiotic_resolvedY","__semiotic_resolvedValue"),hn=cn.key,dn=un.key,fn=ni&&ni.length>0||!1,pn=b(cn,un,fn),gn=ni?.some(e=>e._directLabel||e._directLabelRequest)?`${Jr}-direct-labels`:void 0;if(be||!Wr&&Vr){let e=Ds.current;e&&c&&(e.ingest({inserts:$r(ns,R),bounded:!0}),e.computeScene({width:is,height:rs}),e.cancelIntroAnimation());let t=e?.scene??[],i=e?.scales??null,s=oe(Ci,Gr,ts,i),n=oe(Si,Gr,ts,i),a=ge({background:ne,hasBackgroundGraphics:!!Si,themeBackground:Hr?.colors.background}),o=`${Fr}-plot-clip`,u=an||(()=>{if(e?.xIsDate&&i)return gr(i.x.domain())})(),h=ar||("string"==typeof Di?Di:"XY chart"),p=tr&&e?hr(e.getData(),d,f):{xValues:[],yValues:[]};return Qt("div",{ref:Xr,className:"stream-xy-frame"+(se?` ${se}`:""),role:"group","aria-label":h,style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:ee?"100%":Gr[0],height:te?"100%":Gr[1]},children:[Kt(ut,{accessibleTable:nr,scene:t,chartType:r+" chart",tableId:Jr,chartTitle:"string"==typeof Di?Di:void 0}),Kt(ht,{summary:or}),Qt("div",{role:"img","aria-label":h,"aria-describedby":gn,children:[Qt("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",width:Gr[0],height:Gr[1],style:{position:"absolute",left:0,top:0},children:[Kt("defs",{children:Kt("clipPath",{id:o,children:Kt("rect",{width:is,height:rs})})}),a&&Kt("rect",{x:0,y:0,width:Gr[0],height:Gr[1],fill:a}),Kt("g",{transform:`translate(${ts.left},${ts.top})`,children:n}),Qt("g",{transform:`translate(${ts.left},${ts.top})`,clipPath:`url(#${o})`,children:[mr&&i&&mr.map((e,r)=>Kt(Yt.Fragment,{children:e(t,i,{width:is,height:rs})},`svgpre-${r}`)),t.map((e,t)=>ye({node:e,index:t,renderMode:ke,fallback:()=>function(e,t,i,r=30){let s=function(e,t,i,r=30){switch(e.type){case"line":{let r=e;if(0===r.path.length)return null;let s=wt(r.curve),n=s?ai().x(([e])=>e).y(([,e])=>e).curve(s)(r.path)??"":"M"+r.path.map(([e,t])=>`${e},${t}`).join("L"),a=Oe(`${i?`${i}-`:""}line-${t}-stroke-gradient`),o=br(r.strokeGradient,r.path,a,r.style.stroke||"#4e79a7");return Qt(Yt.Fragment,{children:[o&&Kt("defs",{children:o}),Kt("path",{d:n,fill:"none",stroke:o?`url(#${a})`:r.style.stroke||"#4e79a7",strokeWidth:r.style.strokeWidth??2,strokeDasharray:r.style.strokeDasharray,opacity:r.style.opacity})]},`line-${t}`)}case"area":{let s=e;if(0===s.topPath.length)return null;let n=wt(s.curve),a=n&&s.topPath.length>=2&&s.bottomPath.length>=2?oi().x(([e])=>e).y0((e,t)=>s.bottomPath[t][1]).y1(([,e])=>e).curve(n)(s.topPath)??"":(()=>{let e=s.topPath.map(([e,t])=>`${e},${t}`).join("L"),t=[...s.bottomPath].reverse().map(([e,t])=>`${e},${t}`).join("L");return`M${e}L${t}Z`})(),o=`${i?`${i}-`:""}area-${t}-hatch`,c=Ct(s.style.fill)?Mt(s.style.fill,o):void 0,u=Oe(`${i?`${i}-`:""}area-${t}-gradient`),h=function(e,t){let i=e.fillGradient;if(!i||"object"!=typeof i)return null;let r=1/0,s=-1/0;if(e.fillGradientSpan)[r,s]=e.fillGradientSpan;else{for(let[,t]of e.topPath)r=Math.min(r,t);for(let[,t]of e.bottomPath)s=Math.max(s,t)}if(!Number.isFinite(r)||!Number.isFinite(s))return null;let n=Be(i.stops,_e(e.style.fill));return n?Kt("linearGradient",{id:t,gradientUnits:"userSpaceOnUse",x1:0,y1:r,x2:0,y2:s,children:n}):null}(s,u),d=h?`url(#${u})`:c?`url(#${o})`:_e(s.style.fill),f=h?void 0:s.style.fillOpacity??.7,p=n?ai().x(([e])=>e).y(([,e])=>e).curve(n)(s.topPath)??"":"M"+s.topPath.map(([e,t])=>`${e},${t}`).join("L"),g=Ye(s),y=g&&r>=0?Kt("path",{d:p,fill:"none",stroke:"transparent",strokeWidth:Math.max(1,2*r),strokeLinecap:"round",pointerEvents:"stroke",style:{cursor:g},"data-semiotic-mark-cursor":g,"data-semiotic-cursor-hit-target":"area-top-path","aria-hidden":"true"},`area-${t}-cursor-target`):null,m=Oe(`${i?`${i}-`:""}area-${t}-stroke-gradient`),x=!(!s.colorThresholds?.length||!s.rawValues||s.rawValues.length!==s.topPath.length),v=!!s.strokeColorBands?.length,b=x||v?null:br(s.strokeGradient,s.topPath,m,s.style.stroke||"#4e79a7"),k=s.style.strokeWidth??2,A=1/0,w=-1/0;for(let[e]of s.topPath)e<A&&(A=e),e>w&&(w=e);let S=v?s.strokeColorBands.map((e,r)=>Oe(`${i?`${i}-`:""}area-${t}-stroke-band-${r}`)):[],C=v?s.strokeColorBands.map((e,t)=>Kt("clipPath",{id:S[t],children:Kt("rect",{x:A-k,y:e.y,width:w-A+2*k,height:e.height})},S[t])):null,M=s.style.stroke&&"none"!==s.style.stroke?v?s.strokeColorBands.map((e,i)=>Kt("path",{d:p,fill:"none",stroke:e.color??_e(s.style.stroke),strokeWidth:k,opacity:(s.style.opacity??1)*(e.opacity??1),clipPath:`url(#${S[i]})`},`area-${t}-stroke-band-${i}`)):x?l(s.topPath,s.rawValues,s.colorThresholds,_e(s.style.stroke)).map((e,i)=>Kt("path",{d:"M"+e.path.map(([e,t])=>`${e},${t}`).join("L"),fill:"none",stroke:e.color,strokeWidth:k,opacity:s.style.opacity},`area-${t}-threshold-${i}`)):Kt("path",{d:p,fill:"none",stroke:b?`url(#${m})`:_e(s.style.stroke),strokeWidth:k,opacity:s.style.opacity}):null;if(s.clipRect){let e=`${i?`${i}-`:""}area-clip-${t}`;return Qt("g",{children:[Qt("defs",{children:[h,!h&&c,b,C,Kt("clipPath",{id:e,children:Kt("rect",{x:s.clipRect.x,y:s.clipRect.y,width:s.clipRect.width,height:s.clipRect.height})})]}),Qt("g",{clipPath:`url(#${e})`,children:[Kt("path",{d:a,fill:d,fillOpacity:f,opacity:s.style.opacity,stroke:"none"}),M,y]})]},`area-${t}`)}return Qt(Yt.Fragment,{children:[(h||c||b||C)&&Qt("defs",{children:[h,!h&&c,b,C]}),Kt("path",{d:a,fill:d,fillOpacity:f,opacity:s.style.opacity,stroke:"none"}),M,y]},`area-${t}`)}case"point":case"rect":return Fe(e,t,i);case"symbol":return Ne(e,t);case"glyph":{let r=e;return ze(r,r.x,r.y,`${i??""}glyph-${r.pointId??t}`)}case"heatcell":{let i=e,r={x:i.x,y:i.y,width:i.w,height:i.h,fill:i.fill,stroke:i.style?.stroke,strokeWidth:i.style?.strokeWidth,...null!=i.style?.opacity&&{opacity:i.style.opacity}};if(i.showValues&&null!=i.value&&i.w>=20&&i.h>=20){let e=i.valueFormat?i.valueFormat(i.value):Number.isInteger(i.value)?String(i.value):Math.abs(i.value)>=100?i.value.toFixed(0):Math.abs(i.value)>=1?i.value.toFixed(1):i.value.toPrecision(3),[s,n,a]=function(e){if(e.startsWith("#")){let t=e.slice(1);if(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),6===t.length)return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}let t=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return t?[+t[1],+t[2],+t[3]]:[128,128,128]}(i.fill),o=.299*s+.587*n+.114*a>128?"#000":"#fff",l=Math.max(10,Math.min(16,.3*Math.min(i.w,i.h)));return Qt("g",{children:[Kt("rect",{...r}),Kt("text",{className:"semiotic-heatmap-value",x:i.x+i.w/2,y:i.y+i.h/2,textAnchor:"middle",dominantBaseline:"middle",fill:o,fontSize:`${l}px`,fontFamily:"var(--semiotic-font-family, sans-serif)",children:e})]},`heatcell-${t}`)}return Kt("rect",{...r},`heatcell-${t}`)}case"candlestick":{let r=e,s=`${i?`${i}-`:""}candle-${t}-hatch`,n=Ct(r.style?.fill)?Mt(r.style.fill,s):void 0,a=n?`url(#${s})`:void 0,{fill:o,...l}=r.style??{};if(r.isRange){let e=r.dotRadius??Math.max(2,r.bodyWidth/2),i=a??r.wickColor;return Qt(Yt.Fragment,{children:[n&&Kt("defs",{children:n}),Qt("g",{style:l,children:[Kt("line",{x1:r.x,y1:r.highY,x2:r.x,y2:r.lowY,stroke:r.wickColor,strokeWidth:r.wickWidth,opacity:r.style?.opacity}),Kt("circle",{cx:r.x,cy:r.highY,r:e,fill:i,opacity:r.style?.opacity}),Kt("circle",{cx:r.x,cy:r.lowY,r:e,fill:i,opacity:r.style?.opacity})]})]},`candle-${t}`)}let c=Math.min(r.openY,r.closeY),u=Math.max(Math.abs(r.openY-r.closeY),1),h=r.isUp?r.upColor:r.downColor,d=a??h;return Qt(Yt.Fragment,{children:[n&&Kt("defs",{children:n}),Qt("g",{style:l,children:[Kt("line",{x1:r.x,y1:r.highY,x2:r.x,y2:r.lowY,stroke:r.wickColor,strokeWidth:r.wickWidth,opacity:r.style?.opacity}),Kt("rect",{x:r.x-r.bodyWidth/2,y:c,width:r.bodyWidth,height:u,fill:d,stroke:a?r.wickColor:h,strokeWidth:1,opacity:r.style?.opacity})]})]},`candle-${t}`)}default:return null}}(e,t,i,r);return"area"===e.type?s:Ie(s,e,`xy-cursor-${t}`)}(e,t,Fr,ri)})).filter(Boolean)]})]}),Kt(vr,{decorative:!0,directLabelDescriptionId:gn,width:is,height:rs,totalWidth:Gr[0],totalHeight:Gr[1],margin:ts,scales:i,showAxes:Rt,axes:Pt,xLabel:Tt,yLabel:Et,yLabelRight:Lt,xFormat:u,yFormat:Bt||Ft,axisExtent:_t,showGrid:di,title:Di,description:ar,legend:gi,legendHoverBehavior:yi,legendClickBehavior:mi,legendHighlightedCategory:xi,legendIsolatedCategories:vi,legendPosition:bi,legendLayout:ki,foregroundGraphics:me(s,ve(Ds.current?.customLayoutOverlays,pr??null)),marginalGraphics:tr,xValues:p.xValues,yValues:p.yValues,annotations:ni,onAnnotationActivate:li,onObservation:ei??Zt,chartId:ti,chartType:"StreamXYFrame",autoPlaceAnnotations:ci,svgAnnotationRules:hi,annotationFrame:0,xAccessor:hn,yAccessor:dn,annotationData:pn(Ds.current?.getData()),pointNodes:Tr(Ds.current?.scene),curve:"string"==typeof P?P:void 0,linkedCrosshairName:lr,linkedCrosshairSourceId:cr})]})]})}return Qt("div",{ref:Xr,className:"stream-xy-frame"+(se?` ${se}`:""),role:"group","aria-label":ar||("string"==typeof Di?Di:"XY chart"),tabIndex:0,style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:ee?"100%":Gr[0],height:te?"100%":Gr[1],overflow:"visible",touchAction:Ir(Li)},onKeyDown:Zs,children:["production"!==process.env.NODE_ENV&&Ds.current&&Kt(dt,{store:Ds.current,diagnostics:ws.current}),Kt(ut,{accessibleTable:nr,sceneRevision:Ds.current?.getUpdateSnapshot().revisions.accessibility,scene:Ds.current?.scene??[],chartType:r+" chart",tableId:Jr,chartTitle:"string"==typeof Di?Di:void 0}),Kt(ht,{summary:or}),Kt(ft,{active:Ks.current>=0,hoverPoint:xs}),Qt("div",{role:"img","aria-label":ar||("string"==typeof Di?Di:"XY chart"),"aria-describedby":gn,style:{position:"relative",width:"100%",height:"100%"},onPointerMove:tn,onMouseMove:rn,onPointerLeave:Gs,onMouseLeave:Gs,onPointerDown:as||Er?sn:void 0,onClick:Er?Js:void 0,children:[Kt(pt,{size:Gr,margin:ts,backdropFill:ge({background:ne,hasBackgroundGraphics:!!Si,themeBackground:`var(--semiotic-bg, ${Hr.colors.background})`})??void 0,children:fs}),Kt(xr,{width:is,height:rs,totalWidth:Gr[0],totalHeight:Gr[1],margin:ts,scales:us,showAxes:Rt,axes:Pt,showGrid:di,xFormat:an,yFormat:Bt||Ft,axisExtent:_t}),Kt("canvas",{"aria-hidden":"true",ref:Os,"aria-label":lt(Ds.current?.scene??[],r+" chart"),style:{position:"absolute",left:0,top:0,width:Gr[0],height:Gr[1]}}),Kt("canvas",{ref:Ys,style:{position:"absolute",left:0,top:0,width:Gr[0],height:Gr[1],pointerEvents:"none"}}),Kt(vr,{decorative:!0,directLabelDescriptionId:gn,width:is,height:rs,totalWidth:Gr[0],totalHeight:Gr[1],margin:ts,scales:us,showAxes:Rt,axes:Pt,xLabel:Tt,yLabel:Et,yLabelRight:Lt,xFormat:an,yFormat:Bt||Ft,axisExtent:_t,showGrid:di,title:Di,description:ar,legend:gi,legendHoverBehavior:yi,legendClickBehavior:mi,legendHighlightedCategory:xi,legendIsolatedCategories:vi,legendPosition:bi,legendLayout:ki,foregroundGraphics:me(ds,ve(Ds.current?.customLayoutOverlays,pr??null)),marginalGraphics:tr,xValues:Fs,yValues:zs,annotations:ni,onAnnotationActivate:li,onObservation:ei??Zt,chartId:ti,chartType:"StreamXYFrame",autoPlaceAnnotations:ci,svgAnnotationRules:hi,annotationFrame:os,xAccessor:hn,yAccessor:dn,annotationData:pn(Ds.current?.getData()),pointNodes:Tr(Ds.current?.scene),curve:"string"==typeof P?P:void 0,underlayRendered:!0,canvasObscuresUnderlay:!1,linkedCrosshairName:lr,linkedCrosshairSourceId:cr}),(Li||$i)&&Kt(ui,{width:is,height:rs,totalWidth:Gr[0],totalHeight:Gr[1],margin:ts,dimension:Li?.dimension??"xy",scales:us,onBrush:$i??(()=>{}),binSize:L,snap:Li?.snap,binBoundaries:Li?.binBoundaries??("bar"===r?Ds.current?.getBinBoundaries():void 0),snapDuring:Li?.snapDuring,streaming:"streaming"===s}),Ni?.showBadge&&Kt(xe,{isStale:Ss,position:Ni.badgePosition,state:Ni.state,settling:Ni.settling}),ln,Kt(Lr,{enabled:!!as,hoverPoint:xs,tooltipContent:Ot,containerWidth:is,containerHeight:rs,margin:ts})]}),Kt(k,{graphics:Mi,size:Gr,margin:ts,scales:us,label:Ri})]})})),"StreamXYFrame"),zr=Fr;function Nr({brush:e,onBrush:t,linkedBrush:i,xAccessor:r,yAccessor:s,defaultDimension:n="xy"}){let a=yt(i),o=!!e||!!a||!!t,l=a?.xField||("string"==typeof r?r:void 0),c=a?.yField||("string"==typeof s?s:void 0),u="y"!==n||a?.xField?l:void 0,h="x"!==n||a?.yField?c:void 0,d=gt({name:a?.name||"__unused_brush__",xField:u,yField:h}),f=a?"xyBrush"===d.brushInteraction.brush?"xy":"xBrush"===d.brushInteraction.brush?"x":"y":n,p=jt(d.brushInteraction);p.current=d.brushInteraction;let g=Wt(e=>{let i=p.current;if(!e)return a&&i.end(null),void t?.(null);a&&("xyBrush"===i.brush?i.end([[e.x[0],e.y[0]],[e.x[1],e.y[1]]]):"xBrush"===i.brush?i.end(e.x):i.end(e.y)),t?.(e)},[a,t]);return o?{brushStreamProps:{brush:{dimension:f},onBrush:g}}:{brushStreamProps:{}}}export{Qi as a,ur as b,pr as c,gr as d,Er as e,zr as f,Nr as g};
|
package/dist/c-F4DZ3NMI.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){let t=f(e=>e.theme.colors.selectionOpacity);return L(()=>{if(void 0!==e||void 0!==t)return{name:e?.name??"",...e,unselectedOpacity:e?.unselectedOpacity??t}},[e,t])}function t(t){let{data:r,rawData:f,colorBy:k,colorScheme:H,legendInteraction:M,legendPosition:P,selection:F,linkedHover:b,fallbackFields:D,unwrapData:B=!1,onObservation:w,chartType:A,chartId:I,showLegend:N,legend:T,legendLayout:R,frameLegend:x,userMargin:O,marginDefaults:j,onClick:_,hoverHighlight:W,mobileInteraction:G,mobileSemantics:V,loading:Z,loadingContent:q,emptyContent:z,width:E,height:J,hasTitle:K,axisChrome:Q}=t,U=void 0===f,X=L(()=>n(r),[r]),[Y,$]=C([]),ee=S(e=>{$(t=>t.length===e.length&&t.every((t,r)=>t===e[r])?t:e)},[]),te="string"==typeof k?k:void 0,re=L(()=>o(G,{width:E,mobileSemantics:V}),[G,E,V]),{activeSelectionHook:ne,hoverSelectionHook:oe,customHoverBehavior:ae,customClickBehavior:le,crosshairSourceId:ie}=a({selection:F,linkedHover:b,fallbackFields:D,unwrapData:B,onObservation:w,chartType:A,chartId:I,onClick:_,hoverHighlight:W,colorByField:te,mobileInteraction:re}),ue=l(b,ie),ce=i(X,k,H),ge=L(()=>u(X,k),[X,k]),se=L(()=>U&&Y.length>0?Y:ge,[U,Y,ge]),de=c(M,k,se),he=L(()=>oe||(de.legendSelectionHook?de.legendSelectionHook:ne),[oe,de.legendSelectionHook,ne]),ye=e(F),me=g(),pe=s(null!=H),ve=L(()=>{if(ce&&(!U||0===se.length))return ce;if(!k||0===se.length)return;let e=Array.isArray(H)&&H.length>0||"string"==typeof H&&H.length>0?H:me&&me.length>0?me:m,t="__streamCat",r=se.map(e=>({[t]:e})),n=p(r,t,e);return e=>(pe?v(pe,e):void 0)??(H&&"object"==typeof H&&!Array.isArray(H)?v(H,e):void 0)??n(e)??"#999"},[ce,U,k,se,H,me,pe]),{legend:fe,margin:Le,legendPosition:Ce,legendLayout:Se,legendMarginReserved:ke}=d({data:X,colorBy:k,colorScale:ve,showLegend:N,legendPosition:P,userMargin:O,defaults:j,categories:se,additionalLegend:T,chartWidth:E,chartHeight:J,legendLayout:R,frameLegend:x,hasTitle:K,axisChrome:Q}),He=L(()=>{let e={};return fe&&(e.legend=fe,e.legendPosition=Ce,ke&&(e.__legendMarginReservedFor=fe),Se&&(e.legendLayout=Se)),M&&"none"!==M&&(e.legendHoverBehavior=de.onLegendHover,e.legendClickBehavior=de.onLegendClick,e.legendHighlightedCategory=de.highlightedCategory,e.legendIsolatedCategories=de.isolatedCategories),U&&k&&(e.legendCategoryAccessor=k,e.onCategoriesChange=ee),e},[fe,Ce,Se,ke,M,de.onLegendHover,de.onLegendClick,de.highlightedCategory,de.isolatedCategories,U,k,ee]),Me=h(Z,E,J,q,t.responsive),Pe=Me?null:y(f,E,J,z,t.responsive);return{data:X,colorScale:ve,categoryColorScale:ve,allCategories:se,legendState:de,effectiveSelectionHook:he,activeSelectionHook:ne,customHoverBehavior:ae,customClickBehavior:le,mobileInteraction:re,legend:fe,margin:Le,legendPosition:Ce,earlyReturn:Me||Pe||null,legendBehaviorProps:He,crosshairProps:ue,resolvedSelection:ye}}function r(e,t){let{variant:r,frameRef:n,overrides:o}=t,a=k(o);a.current=o,H(e,()=>{let e=function(e,t){if("xy"===e){let e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>e.current?.remove(t)??[],update:(t,r)=>e.current?.update(t,r)??[],replace:t=>e.current?.replace?.(t),clear:()=>e.current?.clear(),getData:()=>e.current?.getData()??[],getScales:()=>e.current?.getScales()??null,getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}if("network"===e){let e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>{let r=Array.isArray(t)?t:[t];if(e.current?.removeNodes)return e.current.removeNodes(r);let n=e.current?.getTopology()?.nodes??[],o=[];for(let t of r){let r=n.find(e=>e.id===t);r&&o.push({...r.data??{},id:t}),e.current?.removeNode(t)}return o},update:(t,r)=>{let n=Array.isArray(t)?t:[t];return e.current?.updateNodes?e.current.updateNodes(n,r):n.flatMap(t=>{let n=e.current?.updateNode(t,r);return n?[{...n,id:t}]:[]})},clear:()=>e.current?.clear(),getData:()=>e.current?.getTopology()?.nodes?.map(e=>e.data)??[],getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}if("geo-points"===e){let e=t;return{push:t=>e.current?.push(t),pushMany:t=>e.current?.pushMany(t),remove:t=>e.current?.removePoint(t)??[],update:(t,r)=>{let n=e.current?.removePoint(t)??[];for(let t of n)e.current?.push(r(t));return n},clear:()=>e.current?.clear(),getData:()=>e.current?.getData()??[],getCustomLayout:()=>e.current?.getCustomLayout?.()??null,getLayoutFailure:()=>e.current?.getLayoutFailure?.()??null}}let r=t;return{push:e=>r.current?.pushLine(e),pushMany:e=>r.current?.pushManyLines(e),remove:e=>r.current?.removeLine(e)??[],update:(e,t)=>{let n=r.current?.removeLine(e)??[];for(let e of n)r.current?.pushLine(t(e));return n},clear:()=>r.current?.clear(),getData:()=>r.current?.getLines()??[],getCustomLayout:()=>r.current?.getCustomLayout?.()??null,getLayoutFailure:()=>r.current?.getLayoutFailure?.()??null}}(r,n);return new Proxy(e,{get(e,t,r){if("string"==typeof t){let e=a.current?.[t];if("function"==typeof e)return e}return Reflect.get(e,t,r)},has:(e,t)=>!("string"!=typeof t||!a.current||!(t in a.current))||Reflect.has(e,t)})},[])}import{b as n,bm as o,bF as a,bG as l,bD as i,bw as u,by as c,bA as g,bc as s,bx as d,ba as h,a_ as y}from"./c-VW7ZSLDC.min.js";import{p as m,t as p,s as v}from"./c-WPL6PGP3.min.js";import{m as f}from"./c-TC47SNSI.min.js";import{useMemo as L,useState as C,useCallback as S,useRef as k,useImperativeHandle as H}from"react";export{e as a,t as b,r as c};
|
package/dist/c-GZJ2XEQ5.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,d as t}from"./c-HNW73MXJ.min.js";import{a}from"./c-TPL7X32J.min.js";import{c as l,k as n,m as s}from"./c-LYPOBMKC.min.js";import*as r from"react";import{jsxs as o,Fragment as i,jsx as g}from"react/jsx-runtime";function u(e){return null==e||"object"!=typeof e||Array.isArray(e)?{}:e}function d(e){return null!=e&&"object"==typeof e?u(e).id:e}function m(e){let t=u(e.datum);return{source:d(t.source??e.source),target:d(t.target??e.target)}}function c(t,a){let n=new Map,s=[],r=!1,o=a.flatMap(e=>{let t=u(e?.datum).__chordEdges;return Array.isArray(t)?t.map(t=>({...e,datum:t,accessibleDatum:u(t).data??t})):[e]});for(let e=0;e<o.length;e++){let t=o[e];if(!t||"object"!=typeof t)continue;let a=u(t.datum),{source:i,target:g}=m(t),d="number"==typeof a.value&&Number.isFinite(a.value),c=d?a.value:0;r||(r=d);for(let[e,t,a]of[[i,1,3],[g,0,2]]){if(null==e||""===e)continue;let l=String(e),s=n.get(l)??[0,0,0,0];s[t]++,s[a]+=c,n.set(l,s)}let h=null!=i||null!=g?`${null==i?"?":String(i)} → ${null==g?"?":String(g)}`:`Edge ${e+1}`;s.push(l(t,h))}let i=[],g=0,d=0;for(let e=0;e<t.length;e++){let a=t[e];if(!a||"object"!=typeof a||null===a.datum)continue;let s=u(a.datum).id??a.id,r=null!=s?String(s):`node-${e}`,[o,m,c,h]=n.get(r)??[0,0,0,0],p=o+m;g+=p,p>d&&(d=p),i.push({id:r,degree:p,inDeg:o,outDeg:m,wDegree:c+h,wInDeg:c,wOutDeg:h,semantic:l(a,r)})}i.sort((e,t)=>t.degree-e.degree);let c=[`${i.length} nodes, ${s.length} edges.`];return i.length>0&&c.push(`Mean degree: ${e(g/i.length)}, max degree: ${d}.`),{nodeRows:i,edgeRows:s,hasWeights:r,summary:c.join(" ")}}function h({nodes:e,edges:l,sceneRevision:u,chartType:d,revealRows:m}){let[h,p]=r.useState(5),[b,f]=r.useState(5),y=r.useMemo(()=>c(e,l),[u??e,u??l]),{nodeRows:w,edgeRows:$,hasWeights:v,summary:j}=y,D=Math.min(h,w.length),M=w.slice(0,D),R=w.length-D,x=Math.min(b,$.length),A=$.slice(0,x),S=$.length-x,T=[{label:"degree",values:M.map(e=>e.degree)},{label:"in",values:M.map(e=>e.inDeg)},{label:"out",values:M.map(e=>e.outDeg)},...v?[{label:"w. degree",values:M.map(e=>e.wDegree)},{label:"w. in",values:M.map(e=>e.wInDeg)},{label:"w. out",values:M.map(e=>e.wOutDeg)}]:[]];return o(i,{children:[g("div",{className:"semiotic-accessible-data-table-summary",role:"note",style:n,children:j}),w.length>0&&g(t,{rows:M.map(e=>e.semantic),label:`Node data and degree summary for ${d}`,typeLabel:"node",labelRows:!0,extraColumns:T,caption:R>0?`Top ${D} of ${w.length} nodes by degree`:`All ${w.length} nodes by degree`}),g(a,{remaining:R,onClick:e=>{m(e.currentTarget,D,Math.min(D+25,w.length),w.length,"nodes"),p(e=>e+25)},kind:"node"}),$.length>0&&g(t,{rows:A,label:`Edge data for ${d}`,typeLabel:"edge",labelRows:!0,className:"semiotic-accessible-data-table-table semiotic-accessible-data-table-edges",style:{...s,marginTop:12},caption:S>0?`First ${x} of ${$.length} edges`:`All ${$.length} edges`}),g(a,{remaining:S,onClick:e=>{m(e.currentTarget,x,Math.min(x+25,$.length),$.length,"edges"),f(e=>e+25)},kind:"edge"})]})}export{h as default};
|
package/dist/c-HFQ3Z65X.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a(){p(M),p(e),p(s),p(j),p(m),p(i),p(o),p(r),p(c),p(f),p(n),p(t)}import{a as s,b as m,c as i,d as o,e as r,f as c,g as f,h as n}from"./c-NOME4L5M.min.js";import{e as t}from"./c-NGMMPKNJ.min.js";import{a as p,i as M,k as e,l as j}from"./c-UWE3VZEO.min.js";export{a};
|
package/dist/c-HNW73MXJ.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,n as t,o as n,m as a}from"./c-LYPOBMKC.min.js";import{jsxs as l,jsx as r}from"react/jsx-runtime";var i=e=>{if(null==e)return"";let t=Math.round(100*e)/100;return Number.isNaN(t)?"":String(t)};function s(e){return null==e||""===e?"—":"number"==typeof e?Number.isNaN(e)?"—":i(e):"boolean"==typeof e?e?"true":"false":"object"==typeof e?"—":String(e)}function o(e){let t=new Map;for(let n of e??[])for(let[e,a]of Object.entries(n?.values??{})){if(null==a||""===a)continue;let n=t.get(e);if(n||(n={count:0,min:1/0,max:-1/0,sum:0,strings:new Set},t.set(e,n)),"number"==typeof a){if(!Number.isFinite(a))continue;n.count++,n.sum+=a,a<n.min&&(n.min=a),a>n.max&&(n.max=a)}else"object"!=typeof a&&"function"!=typeof a&&n.strings.add(String(a))}return Array.from(t,([e,t])=>{if(t.count)return{name:e,count:t.count,numeric:!0,min:t.min,max:t.max,mean:t.sum/t.count};let n=Array.from(t.strings);return{name:e,count:n.length,numeric:!1,uniqueValues:n.slice(0,5)}}).filter(e=>e.count>0)}function u(e,t){let n=[`${e} data points.`];for(let e of t)if(e.numeric)n.push(`${e.name}: ${i(e.min)} to ${i(e.max)}, mean ${i(e.mean)}.`);else{let t=e.uniqueValues,a=t.length<=3?t.join(", "):`${t.slice(0,3).join(", ")}… (${e.count} unique)`;n.push(`${e.name}: ${a}.`)}return n.join(" ")}function m({rows:i,label:o,caption:u,typeLabel:m,labelRows:c=!1,className:f="semiotic-accessible-data-table-table",style:b,extraColumns:d=[]}){let p=Array.from(new Set(i.flatMap(e=>Object.keys(e.values))));return l("table",{className:f,role:"table","aria-label":o,style:b??a,children:[r("caption",{className:"semiotic-accessible-data-table-caption",style:e,children:u}),r("thead",{children:r("tr",{children:[m,...p,...d.map(e=>e.label)].map((e,n)=>r("th",{style:t,children:e},n))})}),r("tbody",{children:i.map((e,t)=>l("tr",{tabIndex:-1,"aria-label":c?e.label:void 0,children:[r("td",{style:n,children:e.label}),p.map(t=>r("td",{style:n,children:s(e.values[t])},t)),d.map((e,a)=>r("td",{style:n,children:s(e.values[t])},a))]},t))})]})}export{i as a,o as b,u as c,m as d};
|
package/dist/c-HWFZB7SD.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){let t=new Map(e.nodes.map(e=>[e.id,[]])),n=new Map(e.nodes.map(e=>[e.id,[]]));for(let o of e.edges)t.get(o.source).push(o),n.get(o.target).push(o);return{outgoing:t,incoming:n}}function t(e,t){let n=new Set,o=[];for(let r of t){if(n.has(r))continue;n.add(r);let t=[{node:r,next:0}];for(;t.length;){let r=t[t.length-1],i=e[r.node][r.next++];void 0===i?(o.push(r.node),t.pop()):n.has(i)||(n.add(i),t.push({node:i,next:0}))}}return o}function n(e){let n=e.nodes.map(e=>e.id).sort(),o=new Map(n.map((e,t)=>[e,t])),r=n.map(()=>[]),i=n.map(()=>[]);for(let t of e.edges){let e=o.get(t.source),n=o.get(t.target);r[e].push(n),i[n].push(e)}let s=new Set,a=[];for(let e of t(r,n.map((e,t)=>t)).reverse()){if(s.has(e))continue;let t=[],o=[e];for(s.add(e);o.length;){let e=o.pop();t.push(n[e]);for(let t of i[e])s.has(t)||(s.add(t),o.push(t))}a.push(t.sort())}return a.sort((e,t)=>e[0].localeCompare(t[0]))}function o(t,n,o="rooted-traversal:id-asc"){let{outgoing:r}=e(t),i=o.endsWith("id-desc")?-1:1;for(let e of r.values())e.sort((e,t)=>i*e.id.localeCompare(t.id));let s=new Set(n),a=[],d=[...new Set(n)],c=e=>{let t=[{node:e,next:0}];for(;t.length;){let e=t[t.length-1],n=r.get(e.node)?.[e.next++];n?s.has(n.target)||(s.add(n.target),a.push([n.target,n.id]),t.push({node:n.target,next:0})):t.pop()}};for(let e of d)c(e);for(let e of t.nodes.map(e=>e.id).sort())s.has(e)||(d.push(e),s.add(e),c(e));let l=a.map(([,e])=>e),u=new Set(l);return{forest:{kind:"rooted-backbone",roots:d,rankingPolicyId:o,backboneEdgeIds:l,primaryParentEdgeIdByNode:Object.fromEntries(a)},residual:{originalEdgeIds:t.edges.map(e=>e.id),residualEdgeIds:t.edges.filter(e=>!u.has(e.id)).map(e=>e.id)}}}function r(e,t,n){if("ordinal"!==t.coordinate.kind)return!0;let o=e.nodes.find(e=>e.id===n);return!(!o?.sectionId||!t.coordinate.sectionIds.includes(o.sectionId))}function i(e,t){return[...e].sort((e,n)=>"id-asc"===t?e.id.localeCompare(n.id):n.id.localeCompare(e.id))}function s(e,t){let n=new Set(e.originalEdgeIds),o=new Set(t.backboneEdgeIds),r=new Set(e.residualEdgeIds);if(o.size!==t.backboneEdgeIds.length)throw new Error("duplicate backbone edge id");if(r.size!==e.residualEdgeIds.length)throw new Error("duplicate residual edge id");for(let e of o){if(r.has(e))throw new Error(`edge ${e} is both backbone and residual`);if(!n.has(e))throw new Error(`backbone edge ${e} is not original`)}for(let e of r)if(!n.has(e))throw new Error(`residual edge ${e} is not original`);if(o.size+r.size!==n.size)throw new Error("original edge IDs != backbone ⊎ residual")}function a(e,t){return e.sectionByNode.get(t)}function d(e,t){let n=new Set,o=[];for(let r of t){let t=a(e,r);!t||n.has(t)||(n.add(t),o.push(t))}return o}function c(e,t,n){return e.pairs.get(t)?.get(n)??[]}function l(e){return e.entityCount??1}function u(e,t){let n=[],o=0;for(let r of e)!r.nodePath.includes(t)||r.missingPrehistory||(n.push(r.entityId),o+=l(r));return{entityIds:n,entityCount:o}}function f(e,t,n,o,r,i){if(n.length<2)return;let{kept:s,truncation:a}=function(e,t){return null==t||e.length<=t?{kept:e}:{kept:e.slice(0,t),truncation:{disclosed:!0,omitted:e.length-t,fullCount:e.length}}}(n,i),l=[t,...s],f=[];for(let n of s){let o="fan-out"===e?c(r,t,n):c(r,n,t);f.push(...o)}let p=d(r,[t,...n]),g=u(o.occurrences??[],t);return{id:`${e}:${t}`,template:e,roles:"fan-out"===e?{source:t,destinations:s}:{destination:t,sources:s},nodePath:l,edgeIds:f,startSectionId:p[0],completionSectionId:p[p.length-1],intersectSectionIds:p,entityIds:g.entityIds,entityWeights:j(),entityCount:g.entityCount,flags:{occurrence:g.entityIds.length>0,temporal:!1,trajectorySupported:g.entityIds.length>0,enriched:!1},truncation:a}}function p(e,t,n){return 1===t.length&&1===n.length}function g(e){return e.entityCount??1}function m(e,t,n){let o=t??"";e.partitionCounts.set(o,(e.partitionCounts.get(o)??0)+n)}function h(e,n){let o=e.nodes.map(e=>e.id).sort(),r=new Map(o.map((e,t)=>[e,t])),i=o.length,s=Array.from({length:o.length+1},()=>[]),a=s.map(()=>[]),d=(e,t)=>{s[e].push(t),a[t].push(e)};for(let t of e.edges)d(r.get(t.source),r.get(t.target));for(let e of n.roots)d(i,r.get(e));let c=t(s,[i]).reverse(),l=new Map(c.map((e,t)=>[e,t])),u=new Map([[i,i]]),f=(e,t)=>{for(;e!==t;)l.get(e)>l.get(t)?e=u.get(e):t=u.get(t);return e},p=!0;for(;p;){p=!1;for(let e of c.slice(1)){let t=a[e].filter(e=>u.has(e)).reduce(f);u.get(e)!==t&&(u.set(e,t),p=!0)}}return{...n,roots:[...new Set(n.roots)].sort(),status:e.nodes.some(e=>e.completeness&&"known"!==e.completeness)?"incomplete":"exact",immediateDominatorByNode:Object.fromEntries(o.flatMap((e,t)=>u.has(t)?[[e,u.get(t)===i?null:o[u.get(t)]]]:[])),reachableNodeIds:o.filter((e,t)=>u.has(t)),unreachableNodeIds:o.filter((e,t)=>!u.has(t))}}function y(e){return!(null===e||"object"!=typeof e||Array.isArray(e)||e instanceof Date||e instanceof Map||e instanceof Set)}function I(e,t){return Array.isArray(t)?t.includes(e):"strings"===t?Array.isArray(e)&&Array.from(e).every(e=>"string"==typeof e):"object"===t?y(e):"count"===t||"budget"===t?"number"==typeof e&&Number.isFinite(e)&&e>=0&&("budget"!==t||Number.isSafeInteger(e)):typeof e===t}function b(e,t,n,o){e.push({kind:t,severity:"fatal",message:n,id:o})}function k(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function w(e,t){let n=function(e,t){let n=[],o=(e,t,o)=>{n.push({kind:e,severity:"fatal",message:`${t} must be ${o}`})},r=(e,t,n)=>{if(!y(e))return o(n,n,"an object"),!1;for(let[r,i]of Object.entries(t)){let t=r.endsWith("?"),s=t?r.slice(0,-1):r;t&&void 0===e[s]||I(e[s],i)||o(n,s,Array.isArray(i)?i.join(" or "):String(i))}return!0};if(!r(e,{relations:"object",coordinate:"object",forest:"object",measures:"object",motifs:"object",temporal:"object",dataRevision:"string",evidencePolicyId:"string"},"input-shape")||!r(t,{graphRef:"string",revision:"string"},"source-shape")||n.length)return n;let i=e,s=t,{coordinate:a,forest:d,measures:c,motifs:l,temporal:u}=i;"ordinal"===a.kind&&r(a,{sectionIds:"strings"},"coordinate"),r(d.display,{"roots?":"strings","rankingPolicyId?":"string","referencePartition?":"string"},"forest")&&"rooted-backbone"===d.display.kind&&(r(d.display,{roots:"strings"},"missing-root"),r(d.display,{rankingPolicyId:"string"},"forest")),void 0!==d.requiredPaths&&r(d.requiredPaths,{roots:"strings"},"required-path-roots"),void 0!==i.comparison&&r(i.comparison,{partitions:"strings",denominatorMeasureId:"string","referencePartition?":"string"},"comparison");for(let e of Object.values(c))r(e,{unitKind:["stock","rate","capacity"],countUnit:R,"timeDenominator?":"string","description?":"string"},"measures");r(l,{catalogId:"string",catalogVersion:"string",countUnit:R,anchor:["completion"],"denominatorRef?":"string","timeWindowMs?":"count","matchBudget?":"budget"},"motifs"),r(u,{kind:["snapshot","window"]},"temporal"),"window"===u.kind&&(!Number.isFinite(u.start)||!Number.isFinite(u.end)||u.end<u.start)&&o("temporal","window bounds","finite and ordered");for(let e of["nodes","edges","measureValues","occurrences"]){let t=s[e];if("occurrences"===e&&void 0===t)continue;if(!Array.isArray(t)){o("source-shape",e,"an array");continue}let n="nodes"===e?{id:"string","sectionId?":"string","completeness?":["known","unknown","incomplete","truncated","unsupported-template"]}:"edges"===e?{id:"string",source:"string",target:"string"}:"measureValues"===e?{measureId:"string",subjectId:"string",status:["exact","estimated","unknown","incomplete"]}:{id:"string",entityId:"string",complete:"boolean","missingPrehistory?":"boolean","entityCount?":"count","partition?":"string"};for(let i of t)r(i,n,"occurrences"===e?"occurrence":"source-shape")&&"occurrences"===e&&(r(i,{nodePath:"strings"},"occurrence-node"),void 0!==i.groupKeys&&(!y(i.groupKeys)||Object.values(i.groupKeys).some(e=>"string"!=typeof e))&&o("occurrence","groupKeys","a string map"))}return n}(e,t);if(n.length)return{ok:!1,issues:n};"0.2"!==e.schemaVersion&&b(n,"schema-version","expected schemaVersion 0.2"),(!0!==e.relations.directed||!0!==e.relations.edgeIdRequired||"keep-by-id"!==e.relations.parallelEdges||"keep-by-id"!==e.relations.selfLoops)&&b(n,"relations","Phase 1 requires directed edges, preserving parallel edges and self-loops by id"),"rooted-backbone"!==e.forest.display.kind&&"observed-prefix"!==e.forest.display.kind&&b(n,"forest","supported display kinds: rooted-backbone, observed-prefix"),"ordinal"!==e.coordinate.kind&&b(n,"coordinate","Phase 1 kernel uses ordinal sections");let o=j();for(let r of t.nodes)r.id?(o[r.id]&&b(n,"duplicate-node","duplicate node id",r.id),C(o,r.id,!0),"ordinal"===e.coordinate.kind&&r.sectionId&&!e.coordinate.sectionIds.includes(r.sectionId)&&b(n,"section-membership",`node section ${r.sectionId} is not in the coordinate`,r.id)):b(n,"node-id","node is missing id");let r=j();for(let e of t.edges)e.id?(r[e.id]&&b(n,"duplicate-edge","duplicate edge id",e.id),C(r,e.id,!0),o[e.source]||b(n,"dangling-source","edge source is not a node",e.id),o[e.target]||b(n,"dangling-target","edge target is not a node",e.id)):b(n,"edge-id","edge is missing id");for(let t of e.forest.display.roots??[])o[t]||b(n,"missing-root","display root is not a node",t);let i=e.forest.requiredPaths;if(i)if("directed-admitted"!==i.relationScopeId&&b(n,"required-path-scope","required paths use the full directed-admitted relation scope"),Array.isArray(i.roots)&&0!==i.roots.length)for(let e of i.roots)o[e]||b(n,"required-path-roots","required-path root is not a node",e);else b(n,"required-path-roots","required paths need declared roots");if("rooted-backbone"===e.forest.display.kind&&0===e.forest.display.roots.length&&b(n,"missing-root","rooted-backbone requires at least one root"),e.comparison&&(e.comparison.partitions.length<2&&b(n,"comparison","comparison requires at least two partitions"),S(e.measures,e.comparison.denominatorMeasureId)||b(n,"comparison-denominator","comparison denominatorMeasureId is not a declared measure")),k(e.measures))for(let[t,o]of Object.entries(e.measures))"rate"===o.unitKind&&!o.timeDenominator&&b(n,"rate-denominator","rate measures require a timeDenominator",t);else b(n,"measures","measures must be an object");for(let o of t.measureValues)S(e.measures,o.measureId)?Number.isFinite(o.value)||b(n,"non-finite-measure","measure value is not finite",o.measureId):b(n,"unknown-measure","measureValue refers to an undeclared measure",o.measureId);for(let e of t.occurrences??[])if(e.id&&e.entityId){void 0!==e.stepEntityCounts&&(!Array.isArray(e.stepEntityCounts)||e.stepEntityCounts.length!==e.nodePath.length||Array.from(e.stepEntityCounts).some(e=>!Number.isFinite(e)||e<0))&&b(n,"occurrence-step-counts","stepEntityCounts must contain one finite, nonnegative count per nodePath step",e.id);for(let t of e.nodePath)o[t]||b(n,"occurrence-node","occurrence path references a missing node",e.id)}else b(n,"occurrence","occurrence needs id and entityId");return{ok:n.every(e=>"fatal"!==e.severity),issues:n}}function P(e,t,n){let o=k(n?.measures)?S(n.measures,e):void 0,r=k(n?.measures)?S(n.measures,t):void 0;if(!k(o)||!k(r))return{ok:!1,reason:"unknown-measure"};if(o.countUnit!==r.countUnit)return{ok:!1,reason:"count-unit-mismatch"};if("rate"===o.unitKind||"rate"===r.unitKind){if(o.unitKind!==r.unitKind)return{ok:!1,reason:"stock-or-capacity-cannot-compare-to-rate"};if(o.timeDenominator!==r.timeDenominator)return{ok:!1,reason:"rate-time-denominator-mismatch"}}return{ok:!0}}function v(e,t,n={}){let I=w(e,t);if(!I.ok)return{ok:!1,issues:I.issues};if(!y(n)||void 0!==n.generation&&(!Number.isSafeInteger(n.generation)||n.generation<0))return{ok:!1,issues:[{kind:"generation",severity:"fatal",message:"generation must be a nonnegative safe integer"}]};let b,k=n.generation??1;try{b=function(e,t,n){return JSON.stringify([n,t.graphRef,t.revision,e],(e,t)=>t&&"object"==typeof t&&!Array.isArray(t)?Object.fromEntries(Object.keys(t).sort().map(e=>[e,t[e]])):t)}(e,t,k)}catch{return{ok:!1,issues:[{kind:"spec-serialization",severity:"fatal",message:"atlas spec must be serializable as JSON"}]}}let P=function(e,t){if("ordinal"!==e.coordinate.kind)return{kind:"ordinal",sectionIds:[],nodeIdsBySection:j()};let n=j();for(let t of e.coordinate.sectionIds)C(n,t,[]);for(let e of t.nodes){if(!e.sectionId)continue;let t=n[e.sectionId];t&&t.push(e.id)}return{kind:"ordinal",sectionIds:[...e.coordinate.sectionIds],nodeIdsBySection:n}}(e,t),v=function(e,t){let n=e.motifs.matchBudget,o=function(e){let t=new Map(e.nodes.map(e=>[e.id,new Set])),n=new Map(e.nodes.map(e=>[e.id,new Set])),o=new Map;for(let r of e.edges){t.get(r.target)?.add(r.source),n.get(r.source)?.add(r.target);let e=o.get(r.source);e||o.set(r.source,e=new Map);let i=e.get(r.target);i?i.push(r.id):e.set(r.target,[r.id])}return{incoming:new Map([...t].map(([e,t])=>[e,[...t]])),outgoing:new Map([...n].map(([e,t])=>[e,[...t]])),sectionByNode:new Map(e.nodes.map(e=>[e.id,e.sectionId])),pairs:o}}(t),r=[];for(let e of t.nodes){let i=f("fan-out",e.id,o.outgoing.get(e.id)??[],t,o,n);i&&r.push(i);let s=f("fan-in",e.id,o.incoming.get(e.id)??[],t,o,n);s&&r.push(s)}r.push(...function(e,t){let n=t.incoming,o=t.outgoing,r=[];for(let i of e.nodes){let s=n.get(i.id)??[],a=o.get(i.id)??[];if(1!==a.length)continue;let l=1===s.length&&p(s[0],n.get(s[0])??[],o.get(s[0])??[]);if(p(i.id,s,a)&&l)continue;let f=[i.id],g=i.id,m=new Set([g]);for(;;){let e=(o.get(g)??[])[0];if(!e||m.has(e)||(f.push(e),m.add(e),!p(0,n.get(e)??[],o.get(e)??[])))break;g=e}if(f.length<2)continue;let h=[];for(let e=0;e<f.length-1;e++)h.push(...c(t,f[e],f[e+1]));let y=d(t,f),I=u(e.occurrences??[],f[0]);r.push({id:`serial-chain:${f.join(">")}`,template:"serial-chain",roles:{nodes:f,start:f[0],end:f[f.length-1]},nodePath:f,edgeIds:h,startSectionId:y[0],completionSectionId:y[y.length-1],intersectSectionIds:y,entityIds:I.entityIds,entityWeights:j(),entityCount:I.entityCount,flags:{occurrence:I.entityIds.length>0,temporal:!1,trajectorySupported:I.entityIds.length>0,enriched:!1}})}return r}(t,o)),r.push(...function(e,t){let n=[];for(let o of e.occurrences??[]){if(o.missingPrehistory)continue;let e=new Map,r=new Set;for(let[i,s]of o.nodePath.entries()){let c=e.get(s);if(null==c){e.set(s,i);continue}if(r.has(s))continue;r.add(s);let u=o.nodePath.slice(c,i+1),f=d(t,u),p=j();C(p,o.entityId,l(o)),n.push({id:`repeated-state-episode:${o.id}:${s}`,template:"repeated-state-episode",roles:{state:s,occurrence:o.id},nodePath:u,edgeIds:[],startSectionId:a(t,u[0]),completionSectionId:a(t,u[u.length-1]),intersectSectionIds:f,entityIds:[o.entityId],entityWeights:p,entityCount:l(o),flags:{occurrence:!0,temporal:!1,trajectorySupported:!0,enriched:!1}})}}return n}(t,o)),function(e,t){let n=t.occurrences??[];if(0!==n.length)for(let t of e){if("repeated-state-episode"===t.template)continue;let e=t.nodePath,o=j();for(let t of n)t.missingPrehistory||!e.some(e=>t.nodePath.includes(e))||C(o,t.entityId,l(t));let r=Object.keys(o);t.entityIds=r,t.entityWeights=o,t.entityCount=r.reduce((e,t)=>e+(o[t]??0),0),t.flags={...t.flags,occurrence:r.length>0,trajectorySupported:r.length>0}}}(r,t);let i=[];for(let e of t.occurrences??[])e.missingPrehistory&&(i.push({template:"serial-chain",occurrenceId:e.id,reason:"missing-prehistory"}),i.push({template:"repeated-state-episode",occurrenceId:e.id,reason:"missing-prehistory"}));let s=N.filter(e=>!O.includes(e));return{catalogId:e.motifs.catalogId,catalogVersion:e.motifs.catalogVersion,matches:r,incompleteCandidates:i,unsupportedTemplates:s}}(e,t),S=function(e,t){if(e.forest.display.rankingPolicyId?.startsWith("rooted-traversal"))return o(t,e.forest.display.roots??[],e.forest.display.rankingPolicyId);let n=t.edges.map(e=>e.id),s=e.forest.display.rankingPolicyId??"main-transport",{mode:a,order:d}=function(e){let[t,n]=e.split(":");return{mode:"tree-only"===t?"tree-only":"main-transport",order:"id-desc"===n?"id-desc":"id-asc"}}(s),c=n=>r(t,e,n.source)&&r(t,e,n.target),l=new Map;for(let e of t.nodes)l.set(e.id,[]);for(let e of t.edges)l.has(e.target)||l.set(e.target,[]),l.get(e.target).push(e);let u,f=j(),p=e.forest.display.roots&&e.forest.display.roots.length>0?e.forest.display.roots:t.nodes[0]?[t.nodes[0].id]:[],g=new Set(p);for(let e of t.nodes){if(g.has(e.id))continue;let t=i(l.get(e.id)??[],d),n=t.find(e=>c(e))??t[0];n&&C(f,e.id,n.id)}u="tree-only"===a?Object.values(f):t.edges.filter(e=>c(e)).map(e=>e.id);let m=new Set(u),h=n.filter(e=>!m.has(e));return{forest:{kind:"rooted-backbone",roots:[...p],rankingPolicyId:s,backboneEdgeIds:u,primaryParentEdgeIdByNode:f},residual:{residualEdgeIds:h,originalEdgeIds:n}}}(e,t);s(S.residual,S.forest);let q=M(e,t,P),$=function(e,t){let n=j();for(let t of e.nodes)C(n,t.id,t.completeness??"known");let o=j();for(let e of t.unsupportedTemplates)C(o,e,"unsupported-template");if(t.incompleteCandidates.length>0){let e=new Set(t.incompleteCandidates.map(e=>e.template));for(let t of e)C(o,t,"incomplete")}let r=t.matches.find(e=>e.truncation),i={nodes:n,motifs:o,traces:e.occurrences?.some(e=>e.missingPrehistory||!1===e.complete)?"incomplete":e.nodes.some(e=>"unknown"===e.completeness)?"unknown":"known"};return r?.truncation&&(i.truncation={disclosed:!0,template:r.template,omitted:r.truncation.omitted}),i}(t,v),R=A(t),V="observed-prefix"===e.forest.display.kind||(t.occurrences?.length??0)>0?function(e,t={}){function n(e){let t=[...e.children.keys()];return t.sort((t,n)=>{let o=e.children.get(t),r=e.children.get(n),i=s?o.partitionCounts.get(s)??0:1;return i>0!=(s?r.partitionCounts.get(s)??0:1)>0?i>0?-1:1:t.localeCompare(n)}),t}let o={id:"",stateId:"",prefix:[],children:new Map,occurrenceIds:[],entityCount:0,partitionCounts:new Map};for(let t of e){if(t.missingPrehistory)continue;let e=g(t),n=o;n.occurrenceIds.push(t.id),n.entityCount+=e,m(n,t.partition,e);for(let o of t.nodePath){let r=[...n.prefix,o],i=E(r,r.length-1),s=n.children.get(o);s||(s={id:i,stateId:o,prefix:r,children:new Map,occurrenceIds:[],entityCount:0,partitionCounts:new Map},n.children.set(o,s)),s.occurrenceIds.push(t.id),s.entityCount+=e,m(s,t.partition,e),n=s}}let r=[],i=[],s=t.referencePartition;return function e(t,o){if(t.id){let e=j();for(let[n,o]of t.partitionCounts)C(e,n,o);r.push({id:t.id,stateId:t.stateId,prefix:t.prefix,parentId:o,childIds:n(t).map(e=>t.children.get(e).id),entityCount:t.entityCount,occurrenceIds:[...t.occurrenceIds],partitionCounts:e}),i.push(t.id)}for(let o of n(t))e(t.children.get(o),t.id||null)}(o,null),{kind:"observed-prefix",rootIds:n(o).map(e=>o.children.get(e).id),nodes:r,order:i,referencePartition:s}}(t.occurrences??[],{referencePartition:"observed-prefix"===e.forest.display.kind?e.forest.display.referencePartition??e.comparison?.referencePartition:e.comparison?.referencePartition}):void 0,K={sourceGraphRef:t.graphRef,analysisRevision:b,spec:e,source:t,sections:P,motifs:v,forest:S.forest,residualEdges:S.residual,ports:R,ledger:q,completeness:$,provenance:{sourceRevision:t.revision,analysisRevision:b,generation:k,relationScope:"directed-admitted",motifCatalogVersion:e.motifs.catalogVersion,coordinatePolicy:"ordinal"===e.coordinate.kind?`ordinal:${e.coordinate.sectionIds.join(",")}`:`numeric:${e.coordinate.field}`,forestRoots:[...e.forest.display.roots??S.forest.roots],rankingPolicyId:S.forest.rankingPolicyId,population:e.motifs.countUnit,temporalHorizon:e.temporal.kind,evidencePolicyId:e.evidencePolicyId},prefixForest:V,...e.forest.requiredPaths&&{requiredPaths:h(t,e.forest.requiredPaths)}};return K.comparison=x(K),{ok:!0,atlas:K,issues:I.issues}}import{b as S,c as C,d as j,e as E,f as M,h as x,l as A}from"./c-PD5EZI24.min.js";var q="0.2",N=["serial-chain","repeated-state-episode","fan-out","fan-in","split-rejoin-diamond","shared-upstream-source","connector-bypass"],$=["serial-chain","fan-out","fan-in"],O=[...$,"repeated-state-episode"],R=["entity","occurrence","embedding","work-item"];export{q as a,N as b,$ as c,O as d,e,n as f,o as g,s as h,w as i,P as j,v as k};
|
package/dist/c-IIV4DB7T.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){let t=e.trim();if(!t||!Number.isNaN(Number(t)))return NaN;let a=fe.exec(t);if(a){let e=Number(a[1]),t=Number(a[2])-1,r=Number(a[3]??1),n=new Date(0);return n.setUTCFullYear(e,t,r),n.getUTCFullYear()===e&&n.getUTCMonth()===t&&n.getUTCDate()===r?n.getTime():NaN}if(t.length<10)return NaN;let r=Date.parse(t);return Number.isFinite(r)?r:NaN}function t(t){if(t instanceof Date)return t.getTime();if("number"==typeof t)return Number.isFinite(t)?t:NaN;if("string"!=typeof t||!t.trim())return NaN;let a=t.trim(),r=Number(a);if(!Number.isNaN(r))return Number.isFinite(r)?r:NaN;if(/^\d{4}-\d{1,2}(?:-\d{1,2})?$/.test(a))return e(a);let n=/^(\d{4}-\d{2}-\d{2})[Tt ](\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)([Zz]|[+-]\d{2}:?\d{2})?$/.exec(a);return n&&Number.isFinite(e(n[1]))?Date.parse(`${n[1]}T${n[2]}${n[3]||"Z"}`):NaN}function a(e,t){if("function"==typeof e)return e;let a=e||t;return e=>e[a]}function r(e){return!(null===e||"object"!=typeof e||Array.isArray(e)||e instanceof Date||e instanceof Map||e instanceof Set)}function n(e){let t=(e.length<=3?Array.from(e):[e[0],e[Math.floor(e.length/2)],e[e.length-1]]).filter(r);return t.length?t:e.filter(r)}function l(e){return[...new Set(n(e).flatMap(Object.keys))]}function i(e){if(!Array.isArray(e))return[];for(let t of e)if(!r(t))return e.filter(r);return e}function o(e){let t=e;for(let a of["data","nodes","edges","points","areas","lines","flows","spawns","projectionRows","annotations"]){if(!Array.isArray(e[a]))continue;let r=i(e[a]);r!==e[a]&&(t===e&&(t={...e}),t[a]=r)}return t}function s(e){return e instanceof Date?e.getTime():"number"==typeof e?e:"string"==typeof e&&""!==e.trim()?Number(e):NaN}function c(e){return e instanceof Date?Number.isFinite(e.getTime())?e.toISOString():void 0:null!=e&&"object"!=typeof e&&"function"!=typeof e?String(e):void 0}function u(e,t){let r=a(e,t);return e=>s(r(e))}function h(e,t){return ge.has(e)||$e.has(e)||"SwimlaneChart"===e||"GaugeChart"===e?{measure:t.valueAccessor,measureFallback:"value",dimension:t.categoryAccessor??t.stepAccessor,dimensionFallback:"category"}:{measure:t.yAccessor??t.valueAccessor,measureFallback:"y",dimension:t.xAccessor,dimensionFallback:"x"}}function d(e){for(let t of["lineBy","areaBy","stackBy","groupBy","colorBy"]){let a=e[t];if("string"==typeof a&&a)return a}}function m(e,t){return null==e?"—":e instanceof Date?c(e)?.slice(0,10)??"—":"number"==typeof e?t(e):c(e)??"—"}function f(e,t={}){let a=!0===t.showRetractedAnnotations,r=!0===t.showSupersededAnnotations,n=new Set;for(let t of e){let e=t?.lifecycle?.supersedes;e&&"retracted"!==t?.lifecycle?.status&&n.add(e)}return e.filter(e=>{if("retracted"===e?.lifecycle?.status&&!a)return!1;let t=e?.provenance?.stableId;return!(t&&n.has(t)&&!r)})}function p(e,t,a){return"function"==typeof t?t(e):e["string"==typeof t&&t?t:a]}function g(e,t="—"){let a;for(;null!==e&&"object"==typeof e&&!(e instanceof Date);){if(a??(a=new Set),a.has(e))return t;a.add(e);let r=e;e=r.id??r.name??r.label}return c(e)||t}function $(e){let t=s(e);return Number.isFinite(t)?t:void 0}function b(e){return(g(e,"unknown").toLowerCase().match(/[a-z0-9]+/g)||[]).join("-")||"unknown"}function v(e,t){return`${e.linkedHover||e.selection||e.linkedBrush?` ${t}`:""}${e.enableHover||e.tooltip?" Hover or focus a mark for its details.":""}`}function y(e,t){return i(p(e,t,"children"))}function w(){let e=globalThis;return e[ve]||(e[ve]={recipes:new Map,capabilities:new Map,layouts:new Map}),e[ve]}function C(e){return w().recipes.get(e)}function A(e){let t=w().layouts.get(e)?.identity;return t?{...t}:void 0}function k(e){return"string"==typeof e?C(e):e&&"object"==typeof e&&"string"==typeof e.id?e:void 0}function x(e){return"string"==typeof e?e:e.id??e.name}function S(e){return e.layoutConfig&&"object"==typeof e.layoutConfig?e.layoutConfig:{}}function M(e){return Array.isArray(e.data)?i(e.data):Array.isArray(e.nodes)?i(e.nodes):Array.isArray(e.points)?i(e.points):Array.isArray(e.areas)?i(e.areas):[]}function N(e,t,a){return a??k(t.recipe)??k(t.recipeId)??C(e)}function F(e,t,a=[]){let r=e.accessor?t[e.accessor]:void 0;if("string"==typeof r&&r)return r;if(e.field)return e.field;let n=a.find(e=>e&&"object"==typeof e);if(!n)return;let l=Object.entries(n).filter(([e,t])=>!e.startsWith("_")&&null!=t);return"quantitative"===e.semanticType?l.find(([,e])=>"number"==typeof e)?.[0]:"identifier"===e.semanticType?["id","key","name"].find(e=>Object.prototype.hasOwnProperty.call(n,e)):l.find(([,e])=>"string"==typeof e)?.[0]}function P(e,t){return e.dataRoles.find(e=>e.role===t)}function D(e,t){return e.dataRoles.find(e=>t.includes(e.semanticType))}function j(e,t,a,r,n,l={}){let i=Object.assign(Object.create(null),l);if(t)for(let[e,a]of Object.entries(t))i[e]=a;for(let e of a.dataRoles){let a=F(e,r,n),l=t&&a?t[a]:a;void 0!==l&&(i[e.role]=l)}return e.replace(/\{([^}]+)\}/g,(e,t)=>g(i[t],`{${t}}`))}function L(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function T(e){function t(){a=a+1831565813|0;let e=Math.imul(a^a>>>15,1|a);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}let a=e>>>0;return t.getState=()=>a>>>0,t}function B(e,t,a){return"function"==typeof a?a(e,t):e[a]}function R(e){if(e instanceof Date){let t=e.getTime();return Number.isFinite(t)?t:null}let t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:null}function I(e,t,a=0){let r=new Set(e.filter(e=>null!=e.id).map(e=>String(e.id))),n=new Map;for(let l of e){let e=null==l.id?`${t}-${a++}`:String(l.id);for(;null==l.id&&r.has(e);)e=`${t}-${a++}`;r.add(e),n.set(e,null==l.id?{...l,id:e}:l)}return{seed:e,rows:Array.from(n.values()),nextId:a}}function O(e={}){let t=(e.categories?.length?e.categories:["Intake","Review","Build","Ship"]).map(e=>String(e).trim()).filter(Boolean),a=t.length?t:["Intake"],r=Math.max(a.length,Math.round(e.count??Math.max(48,12*a.length))),n=function(e){let t=R(e);return null!=t&&t>0?t:1}(e.unitValue),l=T(e.seed??1),i=e.idPrefix??"mechanical-pile",o=a.map(()=>.65+.9*l()),s=o.reduce((e,t)=>e+t,0)||1,c=r-a.length,u=o.map(e=>e/s*c),h=u.map(e=>1+Math.floor(e)),d=r-h.reduce((e,t)=>e+t,0),m=u.map((e,t)=>({index:t,fraction:e-Math.floor(e)})).sort((e,t)=>t.fraction-e.fraction);for(let e=0;d>0;e=(e+1)%m.length)h[m[e].index]+=1,d-=1;return a.map((e,t)=>({id:`${i}-${t}`,category:e,value:h[t]*n,mechanical:!0,unitCount:h[t],unitValue:n,share:h[t]/r}))}function E(e,t){let a=e/t,r=Math.round(a);return Math.ceil(r>0&&Math.abs(a-r)<=Number.EPSILON*a*4?r:a)}function z(e){return{...e,bySource:Object.fromEntries(Object.entries(e.bySource).map(([e,t])=>[e,{...t}]))}}function G(e){let t="number"==typeof e?e:"string"==typeof e?Number(e):NaN;return Number.isFinite(t)?t:void 0}function U(e,t){let a=e.physics&&"object"==typeof e.physics?e.physics:null,r=e.settledProjection&&"object"==typeof e.settledProjection?e.settledProjection:null,n=[e.settledProjectionRows,e.projectionRows,r?.rows,a?.settledProjectionRows,a?.projectionRows,a?.settledProjection&&"object"==typeof a.settledProjection?a.settledProjection.rows:void 0].find(e=>Array.isArray(e));return Array.isArray(n)?n.map((e,a)=>{if(!e||"object"!=typeof e)return null;let r=e,n=G(r.count??r.value??r.total??r.bodies??r.events);if(null==n)return null;let l=r.label??r.id??r.name??`container ${a+1}`,i=G(r.secondary??r.secondaryCount),o=G(r.observed??r.observedCount);return{label:m(l,t),count:n,...null!=i?{secondary:i}:{},..."string"==typeof r.secondaryLabel&&r.secondaryLabel?{secondaryLabel:r.secondaryLabel}:{},...null!=o?{observed:o}:{}}}).filter(e=>null!=e):null}function W(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:`${t}s`}function H(e){return Object.prototype.hasOwnProperty.call(we,e)?we[e]:`${function(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase()}(e)} chart`}function V(e,t){let a=function(e){if(e){if("fits"in e||"buildProps"in e){let t=e,a={};for(let[e,r]of Object.entries(t.intentScores))"number"==typeof r&&Number.isFinite(r)&&(a[e]=r);return{family:t.family,intentScores:Object.keys(a).length?a:void 0}}return e}}(t);if(a?.act)return a.act;if(a?.intentScores){let e=function(e){let t,a=0;for(let[r,n]of Object.entries(e))if("number"==typeof n&&n>0){if(n>a){t=r,a=n;continue}if(n===a&&void 0!==t){let e=Me.indexOf(r),a=Me.indexOf(t);-1!==e&&(-1===a||e<a)&&(t=r)}}return t}(a.intentScores);if(e&&Object.prototype.hasOwnProperty.call(xe,e)&&(a.intentScores[e]??0)>=3)return xe[e]}return a?.family&&Object.prototype.hasOwnProperty.call(Se,a.family)?Se[a.family]:function(e){return"BumpChart"===e?"ranking":$e.has(e)||"StackedAreaChart"===e?"apportioning":ke.has(e)?"relating":ge.has(e)?"comparing":be.has(e)?"characterizing":pe.has(e)?"tracking":Ce.has(e)?"tracing":"BigNumber"===e?"presenting":void 0}(e)}function q(e){let t=e.annotations;return!!Array.isArray(t)&&t.some(e=>{if(!e||"object"!=typeof e)return!1;let t=e;if("string"!=typeof t.type||!Fe.has(t.type))return!1;let a=t.provenance;return!(!a||"object"!=typeof a)&&(Pe.has(a.authorKind)||De.has(a.source)||je.has(a.basis))})}function Q(e="en"){let t,a;try{t=new Intl.NumberFormat(e,{notation:"compact",maximumFractionDigits:1}),a=new Intl.NumberFormat(e,{maximumFractionDigits:2})}catch{t=new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}),a=new Intl.NumberFormat("en",{maximumFractionDigits:2})}return e=>Number.isFinite(e)?Math.abs(e)>=1e4?t.format(e):a.format(e):String(e)}function Z(e){let t="string"==typeof e.type?e.type:"annotation",a=Object.prototype.hasOwnProperty.call(Le,t)?Le[t]:"an annotation",r=function(e){let t=e.provenance&&"object"==typeof e.provenance?e.provenance:null,a=t?.authorKind??t?.source??t?.basis;return"watcher"===a?"a watcher-flagged ":"agent"===a||"ai"===a||"llm-inference"===a?"an AI-suggested ":""}(e),n=r?r+a.replace(/^an? /,""):a,l="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:void 0;return l?`${n} labeled "${l}"`:n}function K(e){let t=Array.isArray(e.annotations)?e.annotations:null;if(!t||0===t.length)return;let a=f(t.filter(e=>!!e&&"object"==typeof e));if(0===a.length)return;let r=a.map(Z),n=r.slice(0,5),l=r.length-n.length,i=function(e){return e.length<=1?e[0]??"":2===e.length?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`}(n)+(l>0?`, and ${l} more`:""),o=a.length;return`The author has marked ${1===o?"one feature":`${o} features`} on this chart: ${i}.`}function Y(e,t,r={}){t=o(t);let n=void 0!==r.levels,l=new Set(r.levels??["l1","l2","l3"]);!n&&(r.capability||q(t))&&l.add("l4");let i=N(e,t,r.recipe);if(i){let e=["l1","l2","l3","l4"].filter(e=>l.has(e));!n&&!e.includes("l4")&&e.push("l4");let a=function(e,t,a={}){let r=M(t),n=S(t),l=a.locale??"en",i=("function"==typeof e.description?e.description({data:r,config:n,locale:l}):void 0)?.levels??function(e,t,a,r){let n=D(e,["nominal","ordinal"]),l=D(e,["quantitative"]),i=n?F(n,a,t):void 0,o=l?F(l,a,t):void 0,c=n?.role??i??"category",u=l?.role??o??"value",h=e.encodings??[],d=h.length?h.slice(0,3).map(e=>e.meaning.replace(/\.$/,"")).join("; "):`${c} and ${u} are mapped through the recipe's declared visual semantics`,{number:m,percent:f}=function(e){try{return{number:new Intl.NumberFormat(e,{maximumFractionDigits:2}),percent:new Intl.NumberFormat(e,{style:"percent",maximumFractionDigits:1})}}catch{return{number:new Intl.NumberFormat("en",{maximumFractionDigits:2}),percent:new Intl.NumberFormat("en",{style:"percent",maximumFractionDigits:1})}}}(r),p=new Map;if(i&&o)for(let e of t){let t=g(e[i],"Uncategorized"),a=s(e[o]);Number.isFinite(a)&&p.set(t,(p.get(t)??0)+a)}let $=[...p].sort((e,t)=>t[1]-e[1]),b=$.reduce((e,[,t])=>e+t,0),v=$[0],y=$[1],w=b>0?((v?.[1]??0)+(y?.[1]??0))/b:0,C=e.intents.map(e=>({id:x(e),strength:"string"==typeof e?void 0:e.strength})).sort((e,t)=>"primary"===e.strength?-1:"primary"===t.strength?1:0)[0]?.id,A=e.audience?.primary??e.audienceFit?.find(e=>"strong"===e.fit)?.audience;return{l1:`A ${e.name.toLowerCase()} encodes ${c} and ${u}. ${L(d)}.`,l2:$.length>0?`${$.length} categories total ${m.format(b)}. ${v[0]} accounts for ${m.format(v[1])}${b>0?` (${f.format(v[1]/b)})`:""}${y?`, followed by ${y[0]} at ${m.format(y[1])}`:""}.`:`${t.length} data ${1===t.length?"item is":"items are"} represented.`,l3:$.length>=2?w>=.5?`Most of the total is concentrated in ${v[0]} and ${y[0]}, which together account for ${f.format(w)}.`:`The total is distributed across ${$.length} categories without the first two forming a majority.`:v?`${v[0]} is the only represented category.`:"No quantitative pattern can be derived from the available data.",l4:`The chart is intended for ${C??"explanation"}${A?` with a ${A} audience`:""}: ${e.designContract.whyCustom}`}}(e,r,n,l),o=a.levels??["l1","l2","l3","l4"],c={};for(let e of o)i[e]&&(c[e]=i[e]);let u=["l1","l2","l3","l4"].map(e=>c[e]).filter(e=>!!e).join(" "),h=a.includeCaveats?[...e.reception?.risks??[],...e.caveats??[],...(e.designContract.misuse??[]).map(e=>`Misuse: ${e}`)]:void 0;return{text:u,levels:c,...h?.length?{caveats:h}:{}}}(i,t,{levels:e,locale:r.locale,audience:r.audience,includeCaveats:r.includeCaveats}),o=K(t);return{...a,text:o?`${o} ${a.text}`.trim():a.text,...o?{annotations:o}:{}}}let c=Q(r.locale??"en"),f=H(e),p=Array.isArray(t.data)?t.data:null,$=d(t),b=Ae.has(e)?U(t,c):null,v=Ae.has(e)&&null===b?function(e,t){let a="mechanical"===(t.simulationMode??t.mode)&&("GaltonBoardChart"===e||"UnitPileChart"===e);if(!Array.isArray(t.data)&&!a)return null;let r=Array.isArray(t.data)?t.data:[],n=Math.max(2,Math.round(R(t.bins)??21)),l=Math.max(1,Math.round(R(t.pegRows)??n-1));if(a&&(r="GaltonBoardChart"===e?function(e){let t=Math.max(2,Math.round(e.bins)),a=Math.max(1,Math.round(e.pegRows??t-1)),r=Math.max(1,Math.round(e.count??Math.max(64,4*t))),n=function(e){return Math.max(0,Math.min(1,e))}(Number.isFinite(e.branchProbability)?e.branchProbability??.5:.5),l=T(e.seed??1),i=e.idPrefix??"mechanical";return Array.from({length:r},(e,t)=>{let r=0;for(let e=0;e<a;e+=1)l()<n&&(r+=1);let o=a/2;return{id:`${i}-${t}`,value:r,mechanical:!0,pegRows:a,branchProbability:n,pathRights:r,side:r<o?"left":r>o?"right":"center"}})}({bins:n,count:t.mechanicalCount,pegRows:l,branchProbability:t.branchProbability,seed:t.seed}):O({count:t.mechanicalCount,categories:t.mechanicalCategories,unitValue:t.unitValue,seed:t.seed})),r=I(r,"UnitPileChart"===e?"pile":"GaltonBoardChart"===e?"galton":"EventDropChart"===e?"event":"collision-swarm").rows,"UnitPileChart"===e){let e=new Map,n=t.valueAccessor??(a?"value":void 0);return r.forEach((a,r)=>{let l=g(B(a,r,t.categoryAccessor??"category"),"unknown"),i=n?R(B(a,r,n)):1;e.set(l,(e.get(l)??0)+Math.max(0,i??0))}),{generated:a,rows:Array.from(e,([e,t])=>({label:e,value:t}))}}if("GaltonBoardChart"===e){let e=r.map((e,a)=>R(B(e,a,t.valueAccessor??"value"))).filter(e=>null!=e),i=a?[0,l]:function(e){if(!e)return;let t=R(e[0]),a=R(e[1]);return null!=t&&null!=a?t<=a?[t,a]:[a,t]:void 0}(t.valueExtent),[o,s]=i??(e.length?me(e):[0,1]),c=o===s?1:s-o,u=Array.from({length:n},(e,t)=>({label:String(t+1),value:0}));for(let t of e)u[Math.max(0,Math.min(n-1,Math.floor((t-o)/c*n)))].value+=1;return{generated:a,rows:u}}if("CollisionSwarmChart"===e){let e=new Map;return r.forEach((a,r)=>{if(null==R(B(a,r,t.xAccessor??"x")))return;let n=t.groupAccessor?g(B(a,r,t.groupAccessor),"All"):"All";e.set(n,(e.get(n)??0)+1)}),{generated:a,rows:Array.from(e,([e,t])=>({label:e,value:t}))}}if("EventDropChart"===e){let e=R(t.windows?.size??10);if(null==e||e<=0)return null;let{events:n}=function(e){let{windowSize:t,watermark:a,watermarkAtArrivalAccessor:r}=e;if(!(Number.isFinite(t)&&t>0))throw new RangeError("EventDrop windows.size must be a finite positive number");let{rows:n}=I(e.data,"event"),l=n.flatMap((t,a)=>{let r=R(B(t,a,e.timeAccessor));return null==r?[]:[{datum:t,index:a,eventTime:r,arrivalTime:R(B(t,a,e.arrivalAccessor))??r,watermarkAtArrival:0,late:!1}]}),i="function"==typeof a?null:R(a?.value),o="function"==typeof a?t:R(a?.delay)??t,s=new ye(t,a,e.sourceIds);for(let t of l.slice().sort((e,t)=>e.arrivalTime-t.arrivalTime||e.index-t.index)){let a=r?R(B(t.datum,t.index,r)):null,n=s.append({eventTime:t.eventTime,arrivalTime:t.arrivalTime,source:String(B(t.datum,t.index,e.sourceAccessor??"source")??""),watermarkAtArrival:a??void 0});t.watermarkAtArrival=n.watermarkAtArrival,t.late=n.late}return{events:l,watermarkValue:l.length?s.getWatermark():i??-o,ledger:s.getLedger(),lifecycleEvents:s.drainEvents()}}({data:r,timeAccessor:t.timeAccessor??"time",arrivalAccessor:t.arrivalAccessor??"arrivalTime",windowSize:e,watermark:t.watermark,watermarkAtArrivalAccessor:t.watermarkAtArrivalAccessor}),l=n.map(e=>e.eventTime),[i,o]=l.length?me(l):[0,e],s=Math.min(R(t.timeExtent?.[0])??i,i),c=Math.max(R(t.timeExtent?.[1])??o,o),u=Math.floor(s/e)*e,h=Math.max(1,Math.ceil((c-u+e)/e)),d=Array.from({length:h},(t,a)=>({label:`${u+a*e}-${u+(a+1)*e}`,value:0,secondary:0,secondaryLabel:"late"}));for(let t of n){let a=d[Math.max(0,Math.min(h-1,Math.floor((t.eventTime-u)/e)))];t.late?a.secondary+=1:a.value+=1}return{generated:a,rows:d}}return null}(e,t):null,{measure:y,measureFallback:w,dimension:C,dimensionFallback:A}=h(e,t),k="string"==typeof y&&y?y:w,P="string"==typeof C&&C?C:A,j={};if(Ae.has(e)&&function(e,t,a,r,n,l,i=null){let o=function(e){return"EventDropChart"===e?"time window":"GaltonBoardChart"===e?"bin":"CollisionSwarmChart"===e?"group lane":"PacketFlowChart"===e?"flow node":"CrucibleChart"===e?"result group":"container"}(e),s=i&&"EventDropChart"===e?"accepted event":function(e){return"EventDropChart"===e?"event":"GaltonBoardChart"===e?"sample":"CollisionSwarmChart"===e?"point":"PacketFlowChart"===e?"packet":"CrucibleChart"===e?"settled item":"UnitPileChart"===e?"unit":"body"}(e),c=i?i.generated?"The generated sample projection":"The source projection":"The settled projection";if(n.has("l1")&&(r.l1=function(e,t){return"EventDropChart"===e?"An event-drop physics chart that collapses moving events into a settled projection by event-time window.":"GaltonBoardChart"===e?"A Galton board chart that collapses falling samples into a settled histogram projection.":"UnitPileChart"===e?"A physics pile chart that collapses moving bodies into a settled bar-style projection by container.":"CollisionSwarmChart"===e?"A collision swarm chart that separates overlapping points while preserving their quantitative axis position.":"PacketFlowChart"===e?"A physical flow chart that keeps authored routes visible while packet bodies show throughput and proximity events.":"CrucibleChart"===e?"A crucible physics chart that replays authored phases and events into declared products and outlets; the settled ledger, not collisions, determines the result.":`A ${t} whose accessible reading is the settled projection rather than individual trajectories.`}(e,t)),!n.has("l2")&&!n.has("l3"))return;if(!a||0===a.length)return void(n.has("l2")&&(r.l2=i?"No valid source records are available.":"No settled projection is loaded yet."));let u=a.reduce((e,t)=>e+t.count,0),h=a.filter(e=>e.count>0).sort((e,t)=>t.count-e.count),d=h[0]??a.slice().sort((e,t)=>t.count-e.count)[0];if(!d)return;let m=a.reduce((e,t)=>e+(t.secondary??0),0),f=a.find(e=>e.secondaryLabel)?.secondaryLabel??"secondary";if(n.has("l2"))if(i&&"EventDropChart"===e)r.l2=`${c} classifies ${l(u+m)} ${W(u+m,"event")} across ${a.length} ${W(a.length,o)}: ${l(u)} accepted and ${l(m)} late.`;else if(0===h.length)r.l2=`${c} contains ${l(u)} ${W(u,s)} across ${a.length} ${W(a.length,o)}; no ${W(2,o)} are non-empty yet.`;else{let e=m>0?` ${l(m)} ${W(m,s)} ${1===m?"is":"are"} marked ${f}.`:"";r.l2=`${c} contains ${l(u)} ${W(u,s)} across ${a.length} ${W(a.length,o)}; ${h.length} ${W(h.length,o)} ${1===h.length?"is":"are"} non-empty. The largest ${o} is ${d.label} with ${l(d.count)} ${W(d.count,s)}.${e}`}if(n.has("l3")&&u>0&&h.length>0){let e=h.find(e=>e!==d),t=function(e,t){if(!(t>0))return"0%";let a=e/t*100;return`${a>=10?Math.round(a):Math.round(10*a)/10}%`}(d.count,u);r.l3=e?`${c} is most concentrated in ${d.label}, which holds ${l(d.count)} ${W(d.count,s)} (${t}); ${e.label} follows with ${l(e.count)} ${W(e.count,s)}.`:`${c} is concentrated in ${d.label}, which holds all ${l(d.count)} ${W(d.count,s)}.`}}(e,f,b??(v?U({projectionRows:v.rows},c):null),j,l,c,v),l.has("l1")&&!Ae.has(e))if("BumpChart"===e)j.l1=`A ${f} ranking ${$??"series"} by ${k} across ${P}.`;else if(pe.has(e)||ge.has(e))j.l1=`A ${f} of ${k} by ${P}`+($?`, split by ${$}.`:".");else if($e.has(e))j.l1=`A ${f} showing ${k} across ${P} categories.`;else if(be.has(e))j.l1=`A ${f} of the distribution of ${k}`+($?` by ${$}.`:".");else if(Ce.has(e)){let e=Array.isArray(t.nodes)?t.nodes.length:void 0,a=Array.isArray(t.edges)?t.edges.length:void 0,r=[null!=e?`${e} ${_(e,"node")}`:null,null!=a?`${a} ${_(a,"edge")}`:null].filter(Boolean);j.l1=`A ${f}${r.length?` with ${r.join(" and ")}`:""}.`}else if("BigNumber"===e){let e="string"==typeof t.label?t.label:k;j.l1=`A single value${e?` for ${e}`:""}.`}else j.l1=`A ${f}.`;let E=pe.has(e)||"BumpChart"===e||ge.has(e)||$e.has(e)||be.has(e),z=null;if((l.has("l2")||l.has("l3")||l.has("l4"))&&E&&p&&p.length>0&&(z=function(e,t,a,r){let n=0,l=0,i=1/0,o=-1/0,s=null,c=null,u=0,h=0,d=null,f=null,p=NaN,g=NaN;for(let a of e){let e=t(a);Number.isFinite(e)&&(0===n&&(p=e,d=a),g=e,f=a,e<i&&(i=e,s=a,u=n),e>o&&(o=e,c=a,h=n),n++,l+=e)}return 0===n?null:{count:n,min:i,max:o,mean:l/n,minLabel:m(null!=s?a(s):null,r),maxLabel:m(null!=c?a(c):null,r),first:p,last:g,firstLabel:m(null!=d?a(d):null,r),lastLabel:m(null!=f?a(f):null,r),minIndex:u,maxIndex:h}}(p,u(y,w),a(C,A),c)),l.has("l2")&&E&&(p&&0!==p.length?z&&($e.has(e)?j.l2=`${z.count} segments totaling ${c(function(e){return e.mean*e.count}(z))}. Largest is ${z.maxLabel} at ${c(z.max)}; smallest is ${z.minLabel} at ${c(z.min)}.`:j.l2=`${k} ranges from ${c(z.min)} (${z.minLabel}) to ${c(z.max)} (${z.maxLabel}), with a mean of ${c(z.mean)} across ${z.count} points.`):j.l2="No data is loaded yet."),l.has("l3")&&z&&!$&&pe.has(e)?j.l3=function(e,t,a){let{first:r,last:n,min:l,max:i,maxLabel:o,minLabel:s,firstLabel:c,lastLabel:u,minIndex:h,maxIndex:d,count:m}=e,f=i-l,p=n-r;if(0===f)return`${X(t)} is constant at ${a(r)} across the series.`;if(f/(Math.abs(e.mean)||1)<.04)return`${X(t)} ends roughly where it started (${a(r)} at ${c} to ${a(n)} at ${u}), ranging between ${a(l)} and ${a(i)}.`;let g=d>0&&d<m-1,$=h>0&&h<m-1,b=(i-Math.max(r,n))/f,v=(Math.min(r,n)-l)/f;return g&&b>.15?`Overall ${t} climbs to a peak of ${a(i)} (${o}), then falls to ${a(n)} (${u}).`:$&&v>.15?`Overall ${t} drops to a low of ${a(l)} (${s}), then recovers to ${a(n)} (${u}).`:Math.abs(p)/f<.05?`${X(t)} ends roughly where it started (${a(r)} at ${c} to ${a(n)} at ${u}), ranging between ${a(l)} and ${a(i)}.`:p>0?d===m-1?`Overall ${t} rises from ${a(r)} (${c}) to a peak of ${a(n)} (${u}).`:`Overall ${t} rises from ${a(r)} (${c}) to ${a(n)} (${u}), after peaking at ${a(i)} (${o}).`:h===m-1?`Overall ${t} falls from ${a(r)} (${c}) to a low of ${a(n)} (${u}).`:`Overall ${t} falls from ${a(r)} (${c}) to ${a(n)} (${u}), after dipping to ${a(l)} (${s}).`}(z,k,c):l.has("l3")&&z&&!$&&ge.has(e)&&(j.l3=`The highest ${P} is ${z.maxLabel} and the lowest is ${z.minLabel}.`),l.has("l4")){let a=q(t)?"alerting":V(e,r.capability);if(a){let n=$?null:z;j.l4=function(e,t,a,r,n,l,i,o){let s,c,u=Ne[e],h=/^[aeiou]/i.test(u)?"an":"a";switch(e){case"locating":s="This is a map",c="read values by location";break;case"presenting":s="This is a single-value display",c=`read ${"string"==typeof a.label&&a.label?a.label:n} as the headline number`;break;case"tracing":s=`This is ${h} ${u} chart`,c="follow the movement between states";break;case"nesting":s=`This is ${h} ${u} chart`,c="read it for nested structure and how children sum into their parents";break;case"relating":s=`This is ${h} ${u} chart`,c=`read it for whether ${l} and ${n} move together`;break;default:s=`This is ${h} ${u} chart`,c=function(e,t,a,r,n,l){if(!t)switch(e){case"alerting":return"watch for points that break from the rest";case"tracking":return`read it for the overall direction of ${a}`;case"comparing":return`compare ${a} across ${r}`;case"ranking":return`read it top to bottom by ${a}`;case"apportioning":return`read each ${r}'s share of the whole`;case"characterizing":return`read it for the spread and shape of ${a}`;default:return"read the highlighted features"}switch(e){case"alerting":return function(e,t,a){if(ge.has(a)||$e.has(a))return`${e.maxLabel} stands out at ${t(e.max)} — check it first`;let{first:r,last:n,min:l,max:i,minLabel:o,maxLabel:s,lastLabel:c,minIndex:u,maxIndex:h,count:d}=e,m=i-l;if(m>0){let e=h>0&&h<d-1,a=u>0&&u<d-1,f=(i-Math.max(r,n))/m,p=(Math.min(r,n)-l)/m;if(e&&f>.15)return`the peak of ${t(i)} at ${s} is the point to investigate`;if(a&&p>.15)return`the dip to ${t(l)} at ${o} is the point to investigate`;if(n>=i)return`the climb to ${t(n)} at ${c} warrants a closer look`;if(n<=l)return`the drop to ${t(n)} at ${c} warrants a closer look`}return`the extremes — ${s} (${t(i)}) and ${o} (${t(l)}) — are the points to check`}(t,n,l);case"tracking":return`read it for the trajectory of ${a}, which ${function(e){let t=e.max-e.min,a=e.last-e.first;return 0===t||Math.abs(a)/t<.05?"holds roughly steady":a>0?"rises":"falls"}(t)} from ${n(t.first)} (${t.firstLabel}) to ${n(t.last)} (${t.lastLabel})`;case"comparing":return`compare ${a} across ${r}; ${t.maxLabel} leads at ${n(t.max)}`;case"ranking":return`read it top to bottom by ${a}; ${t.maxLabel} ranks highest at ${n(t.max)}`;case"apportioning":{let e=t.mean*t.count,a=e>0?Math.round(t.max/e*100):null;return`read each ${r}'s share of the ${n(e)} total; ${t.maxLabel} is the largest at ${n(t.max)}${null!=a?` (${a}%)`:""}`}case"characterizing":return`read it for the spread of ${a}, from ${n(t.min)} to ${n(t.max)}`;default:return"read the highlighted features"}}(e,r,n,l,i,t)}return`${s}; ${c}.${function(e,t){if(!t)return"";let a=t.familiarity?.[e];return"number"==typeof a&&a<=2?` This ${H(e)} may be unfamiliar${t.name?` to ${t.name.toLowerCase()} readers`:""} — lean on this description.`:""}(t,o)}`}(a,e,t,n,k,P,c,r.audience)}}let G=["l1","l2","l3","l4"].filter(e=>l.has(e)&&j[e]).map(e=>j[e]).join(" "),Z=K(t);return{text:Z?`${Z} ${G}`.trim():G,levels:j,...Z?{annotations:Z}:{}}}function X(e){return e.length?e[0].toUpperCase()+e.slice(1):e}function _(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:`${t}s`}function J(e){return b(e)}function ee(e,t,a){return`${e} ${1===e?t:a}`}function te(e,t){if(0===e.numericLeaves)return"";let a=t(e.leafTotal);return e.numericLeaves===e.leaves?`, leaf total ${a}`:`, known leaf total ${a} across ${ee(e.numericLeaves,"valued leaf","valued leaves")}`}function ae(e){return"TreeDiagram"===e?"tree":"Treemap"===e?"treemap":"CirclePack"===e?"circle-packing":"orbit"}function re(e,t,a){let r=p(e,t,a);if(void 0!==r)return r;let n=e.properties;return n&&"object"==typeof n?p(n,t,a):void 0}function ne(e,t,a){return g(re(e,t,"id")??re(e,"name","name")??re(e,"NAME","NAME")??re(e,"label","label"),a)}function le(e){let t=0,a=1/0,r=-1/0,n=0;for(let l of e)null!=l.value&&(t+=1,a=Math.min(a,l.value),r=Math.max(r,l.value),n+=l.value);return 0===t?null:{count:t,min:a,max:r,total:n,average:n/t}}function ie(e,t){let a=le(e);return a?`range ${t(a.min)} to ${t(a.max)}, average ${t(a.average)}, total ${t(a.total)}`:"no numeric values"}function oe(e,t={},a={}){return!!N(e,t,a.recipe)||Te.has(e)||Be.has(e)||Re.has(e)||pe.has(e)||ge.has(e)||$e.has(e)||be.has(e)}function se(e,t){t&&e.children?.push(t)}function ce(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function ue(e,t,n={}){t=o(t);let l=n.locale??"en",s=Math.max(1,n.maxLeaves??200),c=Q(l),w=N(e,t,n.recipe);if(w)return function(e,t,a={}){let r=M(t),n=S(t),l=Math.max(1,a.maxLeaves??200),i=a.locale??"en";if("function"==typeof e.navigation)return e.navigation({data:r,config:n,locale:i});let o=function(e){return!!e&&"object"==typeof e}(e.navigation)?e.navigation:void 0,s=(o?.groupByRole?P(e,o.groupByRole):void 0)??(o?.groupBy?.[0]?P(e,o.groupBy[0])??e.dataRoles.find(e=>e.field===o.groupBy?.[0]):void 0)??D(e,["nominal","ordinal"]),c=s?F(s,n,r):void 0,u=(o?.idRole?P(e,o.idRole):void 0)??D(e,["identifier"]),h=u?F(u,n,r):void 0,d={id:"root",role:"chart",label:o?.summaryTemplate?j(o.summaryTemplate,void 0,e,n,r,{count:r.length}):`${e.name}: ${r.length} ${1===r.length?"item":"items"} represented.`,level:1,children:[]},m=0,f=(t,a,l)=>{let i=h?t[h]:void 0,s=o?.itemLabelTemplate?j(o.itemLabelTemplate,t,e,n,r,{count:r.length}):function(e,t,a,r){let n=D(t,["nominal","ordinal"]),l=t.dataRoles.filter(e=>"quantitative"===e.semanticType),i=n?F(n,a,r):void 0,o=[];i&&null!=e[i]&&o.push(g(e[i]));for(let t of l){let n=F(t,a,r);n&&null!=e[n]&&o.push(`${t.role}: ${g(e[n])}`)}return o.length>0?o.join(", "):"Data item"}(t,e,n,r);return{id:`datum-${J(i??a)}`,role:"datum",label:s,level:l,datum:t}};if(c){let e=new Map;for(let t of r){let a=g(t[c],"Uncategorized"),r=e.get(a);r?r.push(t):e.set(a,[t])}d.children=[...e].map(([e,t],a)=>{let r=Math.max(0,l-m),n=t.slice(0,r);m+=n.length;let i=n.map((e,t)=>f(e,1e5*a+t,3));return n.length<t.length&&i.push({id:`more-${J(e)}`,role:"datum",label:`…and ${t.length-n.length} more items`,level:3}),{id:`group-${J(e)}`,role:"series",label:`${e}: ${t.length} ${1===t.length?"item":"items"}.`,level:2,children:i}})}else{let e=r.slice(0,l);d.children=e.map((e,t)=>f(e,t,2)),e.length<r.length&&d.children.push({id:"more",role:"datum",label:`…and ${r.length-e.length} more items`,level:2})}return d}(w,t,{maxLeaves:s,locale:l});let C={id:"root",role:"chart",label:Y(e,t,{locale:l}).text||"Chart.",level:1,children:[]},A=function(e,t){let a=Array.isArray(e.annotations)?e.annotations:null;if(!a)return null;let r=f(a.filter(e=>!!e&&"object"==typeof e));if(0===r.length)return null;let n=0,l=r.slice(0,t).map(e=>{let t=e.lifecycle?.status,a=t&&"accepted"!==t?` (${t})`:"";return{id:"annotation-"+n++,role:"annotation",level:3,label:`${ce(Z(e))}${a}.`,datum:e}});r.length>t&&l.push({id:"annotation-"+n++,role:"annotation",level:3,label:`…and ${r.length-t} more annotations.`});let i=r.length;return{id:"annotations",role:"annotation",level:2,label:`Annotations: ${1===i?"one marked feature":`${i} marked features`}.`,children:l}}(t,s);if(Te.has(e)){let a=function(e,t,a,r){t=o(t);let n=Array.isArray(t.nodes)?t.nodes:[],l=Array.isArray(t.edges)?t.edges:Array.isArray(t.flows)?t.flows:[],i=t.nodeIdAccessor??t.nodeIDAccessor,s=t.sourceAccessor??"source",c=t.targetAccessor??"target",u=t.valueAccessor??"value",h=e=>g(p(e,i,"id"),"unknown"),d=(e,t)=>g(p(e,t,""),"unknown"),m=new Set;for(let e of l)m.add(d(e,s)),m.add(d(e,c));let f=n.length>0?n:[...m].map(e=>({id:e})),y=new Map;for(let e of f)y.set(h(e),{links:0,value:0});for(let e of l){let t=d(e,s),a=d(e,c),r=$(p(e,u,"value"))??0;for(let e of[t,a]){let t=y.get(e)??{links:0,value:0};t.links+=1,t.value+=r,y.set(e,t)}}let w={id:"root",role:"chart",level:1,label:`A ${"SankeyDiagram"===e||"ProcessSankey"===e?"flow diagram":"ChordDiagram"===e?"chord diagram":"network graph"} with ${f.length} nodes and ${l.length} links.${v(t,"Use linked highlighting to trace related marks.")}`,children:[]},C=0,A=new Map,k=t.colorBy??"group";for(let e of f){let t=g(p(e,k,"group"),"Ungrouped"),a=A.get(t);a?a.push(e):A.set(t,[e])}let x=[...A].map(([e,t],n)=>{let l=[];for(let[e,i]of t.entries()){if(C>=a)break;C+=1;let t=h(i),o=y.get(t)??{links:0,value:0},s=o.value>0?`, ${r(o.value)} total flow`:"";l.push({id:`node-${n}-${e}-${b(t)}`,role:"datum",level:3,label:`${t}: ${o.links} ${1===o.links?"link":"links"}${s}.`,value:o.value>0?o.value:void 0,datum:i})}return{id:`nodes-${n}-${b(e)}`,role:"series",level:2,label:`${e}: ${t.length} ${1===t.length?"node":"nodes"}.`,children:l}});x.length>0&&w.children?.push(...x);let S=l.slice(0,a).map((e,t)=>{let a=d(e,s),n=d(e,c),l=$(p(e,u,"value"));return{id:`link-${b(a)}-${b(n)}-${t}`,role:"datum",level:3,label:`${a} to ${n}${null==l?"":`: ${r(l)}`}.`,value:l,datum:e}});return l.length>a&&S.push({id:"links-more",role:"datum",level:3,label:`…and ${l.length-a} more links.`,value:void 0}),S.length>0&&w.children?.push({id:"links",role:"series",level:2,label:`Links: ${l.length} ${1===l.length?"connection":"connections"}.`,children:S}),w}(e,t,s,c);return se(a,A),a}if(Be.has(e)){let a=function(e,t,a,n){let l=r(t.data)?t.data:null,i=t.childrenAccessor,o=t.valueAccessor,s=t.nodeLabel??t.nodeIdAccessor,c=new WeakMap,u=e=>{let t=c.get(e);if(void 0!==t)return t??{descendants:0,depth:0,leaves:0,numericLeaves:0,leafTotal:0};c.set(e,null);let a=y(e,i),r=0===a.length,n=r?$(p(e,o,"value")):void 0,l={descendants:0,depth:1,leaves:r?1:0,numericLeaves:null==n?0:1,leafTotal:n??0};for(let e of a){let t=u(e);l.descendants+=1+t.descendants,l.depth=Math.max(l.depth,t.depth+1),l.leaves+=t.leaves,l.numericLeaves+=t.numericLeaves,l.leafTotal+=t.leafTotal}return c.set(e,l),l},h=0,d=new WeakSet,m=(e,t,r)=>{let l=g(p(e,s,"name"),`item ${r}`);if(d.has(e))return{id:`hierarchy-${b(r)}-cycle`,role:"datum",level:t,label:`Repeated hierarchy reference to ${l}; branch omitted.`};let c=y(e,i),f=u(e);if(0===c.length){if(h>=a)return null;h+=1;let i=$(p(e,o,"value"));return{id:`hierarchy-${b(r)}-${b(l)}`,role:"datum",level:t,label:`${l}${null==i?"":`: ${n(i)}`}.`,...null==i?{}:{value:i},datum:e}}d.add(e);let v=[],w=0;for(let[e,n]of c.entries()){if(h>=a){w+=u(n).leaves;continue}let l=m(n,t+1,`${r}-${e}`);l&&v.push(l)}return d.delete(e),w>0&&v.push({id:`hierarchy-${b(r)}-more`,role:"datum",level:t+1,label:`${ee(w,"more leaf","more leaves")} in ${l} not shown; navigation is capped at ${a}.`}),{id:`hierarchy-${b(r)}-${b(l)}`,role:"series",level:t,label:`${l}: ${ee(c.length,"direct child","direct children")}, ${ee(f.descendants,"total descendant","total descendants")}, ${ee(f.leaves,"leaf","leaves")}${te(f,n)}.`,datum:e,children:v}},f=l?u(l):null,v={id:"root",role:"chart",level:1,label:l?`A ${ae(e)} chart with ${ee(f.leaves,"leaf","leaves")} and ${ee(f.descendants,"total descendant","total descendants")} across ${ee(f.depth,"hierarchy level","hierarchy levels")}${te(f,n)}.`:"A hierarchy chart with no hierarchy data loaded.",children:[]};if(l){let e=m(l,2,"root");if(e){let t=g(p(l,s,"name"),"");v.children="series"===e.role&&""===t?e.children:[e]}}return v}(e,t,s,c);return se(a,A),a}if(Re.has(e)){let a=function(e,t,a,r){let n=function(e){if(Array.isArray(e))return i(e);if(!e||"object"!=typeof e)return[];let t=e;return Array.isArray(t.features)?i(t.features):"Feature"===t.type?[t]:[]}(t.areas),l="FlowMap"===e&&Array.isArray(t.nodes)?t.nodes:Array.isArray(t.points)?t.points:[],o=Array.isArray(t.flows)?t.flows:[],s=Array.isArray(t.lines)?t.lines:[],c=t.valueAccessor??t.sizeBy??t.costAccessor??"value",u=t.pointIdAccessor??t.nodeIdAccessor??"id",h=("ChoroplethMap"===e?n:l).map((a,r)=>({datum:a,index:r,label:ne(a,"ChoroplethMap"===e?t.idAccessor:u,`${"ChoroplethMap"===e?"region":"location"} ${r+1}`),value:$(re(a,c,"value"))})),d=h.filter(e=>null!=e.value),m={id:"root",role:"chart",level:1,label:`${"ChoroplethMap"===e?`A choropleth map with ${n.length} regions.${d.length>0?` Values are available for ${d.length} of ${n.length} regions; ${ie(d,r)}.`:" No regions have numeric values."}`:"FlowMap"===e?`A flow map with ${o.length} flows and ${l.length} locations.`:"DistanceCartogram"===e?`A distance cartogram with ${l.length} locations and ${s.length} routes.`:`A proportional-symbol map with ${l.length} locations.`}${v(t,"Use linked highlighting to compare related locations.")}`,children:[]};if("ChoroplethMap"===e)m.children=function(e,t,a){let r,n=e.filter(e=>null!=e.value).sort((e,t)=>t.value-e.value||e.index-t.index),l=new Map,i=0;for(let[e,t]of n.entries())r!==t.value&&(i=e+1,r=t.value),l.set(t.index,i);let o=0;return function(e){let t=e.filter(e=>null!=e.value),a=e.filter(e=>null==e.value),r=[],n=le(t);if(n)if(n.min===n.max)r.push({id:"equal",label:"Equal values",rows:t});else{let e=n.min+(n.max-n.min)/3,a=n.min+2*(n.max-n.min)/3,l=t.filter(e=>e.value>=a),i=t.filter(t=>t.value>=e&&t.value<a),o=t.filter(t=>t.value<e);l.length>0&&r.push({id:"highest",label:"Highest values",rows:l}),i.length>0&&r.push({id:"middle",label:"Middle values",rows:i}),o.length>0&&r.push({id:"lowest",label:"Lowest values",rows:o})}return a.length>0&&r.push({id:"missing",label:"No numeric value",rows:a}),r}(e).map(e=>{let r=Math.max(0,t-o),i=e.rows.slice(0,r);o+=i.length;let s=i.map(e=>{let t=l.get(e.index),r=null==t||n.length<2?"":`, rank ${t} of ${n.length}`;return{id:`geo-${b(e.label)}-${e.index}`,role:"datum",level:3,label:null==e.value?`${e.label}: no numeric value.`:`${e.label}: ${a(e.value)}${r}.`,...null==e.value?{}:{value:e.value},datum:e.datum}}),c=e.rows.length-i.length;return c>0&&s.push({id:`geo-${e.id}-more`,role:"datum",level:3,label:`${c} more ${1===c?"region":"regions"} in ${e.label.toLowerCase()} not shown; navigation is capped at ${t}.`}),{id:`regions-${e.id}`,role:"series",level:2,label:`${e.label}: ${e.rows.length} ${1===e.rows.length?"region":"regions"}, ${ie(e.rows,a)}.`,children:s}})}(h,a,r);else if(h.length>0){let e=h.slice(0,a).map(e=>({id:`geo-${b(e.label)}-${e.index}`,role:"datum",level:3,label:`${e.label}${null==e.value?"":`: ${r(e.value)}`}.`,...null==e.value?{}:{value:e.value},datum:e.datum}));h.length>a&&e.push({id:"geo-more",role:"datum",level:3,label:`…and ${h.length-a} more locations.`}),m.children?.push({id:"locations",role:"series",level:2,label:`Locations: ${h.length} marks.`,children:e})}let f="FlowMap"===e?o:s;if(f.length>0){let e=f.slice(0,a).map((e,t)=>{let a=g(e.source,"unknown"),n=g(e.target,"unknown"),l=$(p(e,c,"value"));return{id:`route-${b(a)}-${b(n)}-${t}`,role:"datum",level:3,label:`${a} to ${n}${null==l?"":`: ${r(l)}`}.`,...null==l?{}:{value:l},datum:e}});m.children?.push({id:"routes",role:"series",level:2,label:`Routes: ${f.length} ${1===f.length?"route":"routes"}.`,children:e})}return m}(e,t,s,c);return se(a,A),a}let k=Array.isArray(t.data)?t.data:null,x=oe(e,t,n);if(!k||0===k.length||!x)return A&&(C.children=[A]),C;let{measure:L,measureFallback:T,dimension:B,dimensionFallback:R}=h(e,t),I=u(L,T),O=a(B,R),E="string"==typeof L&&L?L:T,z="string"==typeof B&&B?B:R,G=d(t),U=0,W=e=>`${e}-${U++}`,H=(e,t)=>{let a=e.slice(0,s).map(e=>((e,t)=>{let a=I(e),r=m(O(e),c);return{id:W("datum"),role:"datum",level:t,label:`${r}: ${Number.isFinite(a)?c(a):"—"}`,value:Number.isFinite(a)?a:void 0,datum:e}})(e,t));return e.length>s&&a.push({id:W("more"),role:"datum",level:t,label:`…and ${e.length-s} more points`}),a},V=[];if(pe.has(e)||ge.has(e)){let t=1/0,a=-1/0,r=1/0,n=-1/0,l=[],i=!0;for(let e of k){let o=I(e);Number.isFinite(o)&&(o<t&&(t=o),o>a&&(a=o));let s=O(e);l.push(s),"number"==typeof s&&Number.isFinite(s)?(s<r&&(r=s),s>n&&(n=s)):i=!1}let o=new Set,s=[];for(let e of l){let t=g(e);o.has(t)||(o.add(t),s.push(e))}let u=i?`${c(r)} to ${c(n)}`:`${m(s[0],c)} to ${m(s[s.length-1],c)} (${ge.has(e)?`${s.length} categories`:`${k.length} points`})`;V.push({id:W("axis"),role:"axis",level:2,label:`${ge.has(e)?"Category axis":"X axis"}: ${z}, ${u}.`}),a>=t&&V.push({id:W("axis"),role:"axis",level:2,label:`Value axis: ${E}, ${c(t)} to ${c(a)}.`})}if(G){let r=a(G,G),n=new Map;for(let e of k){let t=g(r(e)),a=n.get(t);a?a.push(e):n.set(t,[e])}let i=[];for(let[a,r]of n){let n=Y(e,{...t,data:r},{levels:["l2","l3"],locale:l}).text;i.push({id:W("series"),role:"series",level:2,label:`Series ${a}: ${n}`,children:H(r,3)})}C.children=[...V,...i]}else C.children=[...V,...H(k,2)];return A&&C.children.push(A),C}function he(e){return Oe.has(e)}function de(e,t){return he(e)&&!Ee[t].includes(e)}import{a as me}from"./c-5H6IMPPV.min.js";var fe=/^(\d{4})-(\d{1,2})(?:-(\d{1,2}))?$/,pe=/*#__PURE__*/new Set(["LineChart","AreaChart","StackedAreaChart","DifferenceChart","Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","MultiAxisLineChart","MinimapChart"]),ge=/*#__PURE__*/new Set(["BarChart","StackedBarChart","GroupedBarChart","DotPlot"]),$e=/*#__PURE__*/new Set(["PieChart","DonutChart","FunnelChart"]),be=/*#__PURE__*/new Set(["Histogram","BoxPlot","ViolinPlot","RidgelinePlot","SwarmPlot"]),ve=/*#__PURE__*/Symbol.for("semiotic.chartRecipeRegistry"),ye=class{constructor(e,t={},a=[]){if(this.windowSize=e,this.policy=t,this.windows=new Map,this.openWindows=new Set,this.sources=new Map,this.latest=-1/0,this.frontier=-1/0,this.value=-1/0,this.pending=[],!Number.isFinite(e)||e<=0)throw new RangeError("EventDrop windows.size must be a finite positive number");for(let e of a)this.sources.set(e,{latest:-1/0,arrival:-1/0,idle:!1});this.validatePolicy(t)}validatePolicy(e){if("function"!=typeof e){for(let t of["delay","idleTimeout","allowedLateness"]){let a=e[t];if(null!=a&&(!Number.isFinite(a)||a<0))throw new RangeError(`watermark.${t} must be finite and nonnegative`)}if(null!=e.value&&!Number.isFinite(e.value))throw new RangeError("watermark.value must be finite")}}setWatermark(e){this.validatePolicy(e),this.policy=e}getWatermark(){return this.value}getLatestEventTime(){return this.latest}getArrivalFrontier(){return this.frontier}getLedger(){return Array.from(this.windows.values(),z).sort((e,t)=>e.start-t.start)}drainEvents(){let e=this.pending;return this.pending=[],e}snapshot(){return this.state(this.getLedger())}drainDelta(){let e=Array.from(this.changedWindows??[],e=>z(this.windows.get(e)));return this.changedWindows=new Set,this.state(e)}state(e){return{windows:e,sources:Array.from(this.sources,([e,t])=>[e,{...t}]),latest:this.latest,frontier:this.frontier,value:this.value,heldBy:this.heldBy}}restore(e){this.applySnapshot(e,!0)}applyDelta(e){this.applySnapshot(e,!1)}applySnapshot(e,t){let a=e=>Number.isFinite(e)||e===-1/0,r=e=>Number.isSafeInteger(e)&&e>=0;if(![e.latest,e.frontier,e.value].every(a)||new Set(e.windows.map(e=>e.windowId)).size!==e.windows.length||new Set(e.sources.map(([e])=>e)).size!==e.sources.length||e.sources.some(([,e])=>!a(e.latest)||!a(e.arrival))||e.windows.some(e=>!Number.isFinite(e.start)||!Number.isFinite(e.end)||e.end<=e.start||!r(e.accepted)||!r(e.late)||Object.values(e.bySource).some(e=>!r(e.accepted)||!r(e.late))||Object.values(e.bySource).reduce((e,t)=>e+t.accepted,0)!==e.accepted||Object.values(e.bySource).reduce((e,t)=>e+t.late,0)!==e.late))throw new RangeError("Invalid EventDrop ledger snapshot");t&&(this.windows.clear(),this.openWindows.clear());for(let t of e.windows){let e=this.windows.get(t.windowId);e&&this.openWindows.delete(e);let a=z(t);Object.setPrototypeOf(a.bySource,null),this.windows.set(t.windowId,a),a.open&&this.openWindows.add(a)}this.changedWindows?.clear(),this.sources=new Map(e.sources.map(([e,t])=>[e,{...t}])),this.latest=e.latest,this.frontier=e.frontier,this.value=e.value,this.heldBy=e.heldBy,this.pending=[]}advance(e,t="external"){if(!Number.isFinite(e))return;this.frontier=Math.max(this.frontier,e);let a,r=this.policy;if("function"==typeof r)a=r(this.latest);else if(r.external)a=r.external();else if(null!=r.value)a=r.value;else{let t=this.latest;if(r.perSource){let a;t=1/0;for(let[n,l]of this.sources){Number.isFinite(l.arrival)||(l.arrival=e);let i=null!=r.idleTimeout&&e-l.arrival>=r.idleTimeout;i&&!l.idle&&this.pending.push({type:"physics-source-idle",sourceId:n}),l.idle=i,!i&&l.latest<t&&(t=l.latest,a=n)}a&&a!==this.heldBy&&t<this.latest&&this.pending.push({type:"physics-watermark-held",sourceId:a}),this.heldBy=a,t===1/0&&(t=this.latest)}a=t-(r.delay??this.windowSize)}if(!Number.isFinite(a)||a<=this.value)return;let n=this.value;this.value=a,this.pending.push({type:"physics-watermark-advance",from:n,to:a,cause:t});for(let t of this.openWindows)t.end<=this.value&&this.close(t,e)}close(e,t){this.changedWindows?.add(e.windowId),e.open=!1,e.closedAt=t,e.watermarkAtClose=this.value,this.openWindows.delete(e),this.pending.push({type:"physics-window-close",...z(e),watermark:this.value})}append(e){var t;let{eventTime:a,arrivalTime:r,source:n=""}=e;if(!Number.isFinite(a)||!Number.isFinite(r))throw new RangeError("Event and arrival times must be finite");if(r<this.frontier)throw new RangeError("Incremental admissions require nondecreasing arrival times");this.latest=Math.max(this.latest,a);let l=this.sources.get(n);this.sources.set(n,{latest:Math.max(l?.latest??-1/0,a),arrival:r,idle:!1}),this.advance(r,"arrival");let i=Math.floor(a/this.windowSize)*this.windowSize,o=i+this.windowSize,s=`${i}-${o}`,c=this.windows.get(s);c||(c={windowId:s,start:i,end:o,accepted:0,late:0,bySource:Object.create(null),open:!0},this.windows.set(s,c),this.openWindows.add(c),this.pending.push({type:"physics-window-open",windowId:s,start:i,end:o}));let u=e.watermarkAtArrival??this.value,h=o+("function"==typeof this.policy?0:this.policy.allowedLateness??0)<=u,d=(t=c.bySource)[n]??(t[n]={accepted:0,late:0}),m=h?"late":"accepted";return c[m]++,this.changedWindows?.add(s),d[m]++,!c.open&&!h&&this.pending.push({type:"physics-window-update",windowId:s,accepted:c.accepted,late:c.late,bySource:z(c).bySource,watermark:this.value,retractions:1}),c.open&&o<=this.value&&this.close(c,r),{windowId:s,start:i,end:o,late:h,watermarkAtArrival:u}}},we={LineChart:"line chart",AreaChart:"area chart",StackedAreaChart:"stacked area chart",DifferenceChart:"difference chart",Scatterplot:"scatter plot",BubbleChart:"bubble chart",ConnectedScatterplot:"connected scatter plot",QuadrantChart:"quadrant chart",MultiAxisLineChart:"dual-axis line chart",CandlestickChart:"candlestick chart",BumpChart:"bump chart",Heatmap:"heatmap",MinimapChart:"line chart",BarChart:"bar chart",StackedBarChart:"stacked bar chart",GroupedBarChart:"grouped bar chart",DotPlot:"dot plot",Histogram:"histogram",BoxPlot:"box plot",ViolinPlot:"violin plot",RidgelinePlot:"ridgeline plot",SwarmPlot:"swarm plot",PieChart:"pie chart",DonutChart:"donut chart",FunnelChart:"funnel chart",GaugeChart:"gauge",LikertChart:"Likert chart",SwimlaneChart:"swimlane chart",ForceDirectedGraph:"network graph",SankeyDiagram:"Sankey diagram",ProcessSankey:"temporal Sankey diagram",ChordDiagram:"chord diagram",TreeDiagram:"tree diagram",Treemap:"treemap",CirclePack:"circle-packing chart",OrbitDiagram:"orbit diagram",ChoroplethMap:"choropleth map",ProportionalSymbolMap:"proportional-symbol map",FlowMap:"flow map",DistanceCartogram:"distance cartogram",BigNumber:"single value",StreamPhysicsFrame:"physics stream frame",EventDropChart:"event-drop physics chart",GaltonBoardChart:"Galton board chart",UnitPileChart:"physics pile chart",CollisionSwarmChart:"collision swarm chart",PacketFlowChart:"physical flow chart",ProcessFlowChart:"process flow physics chart",CrucibleChart:"crucible physics chart",PhysicsCustomChart:"custom physics chart"},Ce=/*#__PURE__*/new Set(["ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram"]),Ae=/*#__PURE__*/new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart","PhysicsCustomChart"]),ke=/*#__PURE__*/new Set(["Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","ScatterplotMatrix"]),xe={"outlier-detection":"alerting","change-detection":"alerting",trend:"tracking","composition-over-time":"apportioning","compare-series":"comparing","compare-categories":"comparing",rank:"ranking","part-to-whole":"apportioning",distribution:"characterizing",correlation:"relating",flow:"tracing",hierarchy:"nesting",geo:"locating"},Se={"time-series":"tracking",categorical:"comparing",distribution:"characterizing",relationship:"relating",flow:"tracing",network:"tracing",hierarchy:"nesting",geo:"locating",realtime:"tracking",value:"presenting",custom:"presenting"},Me=["trend","compare-series","compare-categories","rank","part-to-whole","distribution","correlation","flow","hierarchy","geo","composition-over-time","change-detection","outlier-detection"],Ne={alerting:"alerting",tracking:"trend",comparing:"comparison",ranking:"ranking",apportioning:"composition",characterizing:"distribution",relating:"correlation",tracing:"flow",nesting:"hierarchy",locating:"locator",presenting:"single-value"},Fe=/*#__PURE__*/new Set(["y-threshold","x-threshold","band","x-band","callout","label"]),Pe=/*#__PURE__*/new Set(["system","agent","watcher"]),De=/*#__PURE__*/new Set(["ai","agent","system","computed","dbt","great-expectations"]),je=/*#__PURE__*/new Set(["rule","statistical-test","llm-inference","computed"]),Le={"y-threshold":"a threshold line","x-threshold":"a threshold line",band:"a highlighted band","x-band":"a highlighted band",label:"a label",callout:"a callout","callout-circle":"a callout","callout-rect":"a callout",text:"a text note",bracket:"a bracket",enclose:"an enclosure","rect-enclose":"an enclosure",highlight:"a highlight",widget:"a widget",trend:"a trend line",envelope:"an envelope","anomaly-band":"an anomaly band",forecast:"a forecast","category-highlight":"a category highlight"},Te=/*#__PURE__*/new Set(["ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram"]),Be=/*#__PURE__*/new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),Re=/*#__PURE__*/new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]),Ie=["MotifBraidChart","DependencyForestChart","FlowCircuitChart","BarChart","StackedBarChart","GroupedBarChart","SwarmPlot","BoxPlot","Histogram","ViolinPlot","RidgelinePlot","DotPlot","PieChart","DonutChart","GaugeChart","FunnelChart","RadarChart","SwimlaneChart","LikertChart","LineChart","BumpChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","BubbleChart","Heatmap","QuadrantChart","MultiAxisLineChart","WaterfallChart","CandlestickChart","ConnectedScatterplot","ScatterplotMatrix","MinimapChart","ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram","TreeDiagram","Treemap","CirclePack","OrbitDiagram","ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram","RealtimeLineChart","RealtimeHistogram","TemporalHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","GauntletChart","CrucibleChart","ProcessFlowChart","PacketFlowChart","ChainReactionChart","BigNumber"],Oe=/*#__PURE__*/new Set(Ie),Ee={title:["BigNumber"],description:[],summary:[]};export{r as a,n as b,l as c,o as d,e,t as f,g,y as h,C as i,A as j,k,x as l,R as m,I as n,O as o,E as p,V as q,Y as r,oe as s,ue as t,Ie as u,he as v,de as w};
|
package/dist/c-J2QH3PEI.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{e as customXYPlugin}from"./c-NGMMPKNJ.min.js";
|