semiotic 3.8.4 → 3.8.6
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/CLAUDE.md +9 -5
- package/README.md +52 -46
- package/ai/behaviorContracts.cjs +2 -2
- package/ai/componentMetadata.cjs +2 -2
- package/ai/dist/mcp-server.js +6 -2
- package/ai/examples.md +211 -2
- package/ai/schema.json +1388 -14
- package/ai/surface-manifest.json +8 -4
- package/ai/system-prompt.md +1 -1
- package/dist/chunk-chartContainerDataAudit-FEOD5GTQ.module.min.js +2 -0
- package/dist/chunk-chunk-2CHN2TA3.module.min.js +1 -0
- package/dist/chunk-chunk-2JGJ5GUG.module.min.js +1 -0
- package/dist/chunk-chunk-3NGIKFD6.module.min.js +1 -0
- package/dist/chunk-chunk-3SHB24AG.module.min.js +1 -0
- package/dist/chunk-chunk-4MMOOYTX.module.min.js +2 -0
- package/dist/chunk-chunk-75OTQSXS.module.min.js +1 -0
- package/dist/chunk-chunk-A5GRQUOF.module.min.js +1 -0
- package/dist/chunk-chunk-AAF5LZAU.module.min.js +2 -0
- package/dist/{chunk-chunk-LQBSXO7K.module.min.js → chunk-chunk-ARZGA4LJ.module.min.js} +1 -1
- package/dist/chunk-chunk-CAFLML4L.module.min.js +2 -0
- package/dist/chunk-chunk-CO5KQMGH.module.min.js +1 -0
- package/dist/chunk-chunk-FHBN7OEB.module.min.js +2 -0
- package/dist/{chunk-chunk-KQ546MKE.module.min.js → chunk-chunk-GFTVACTO.module.min.js} +1 -1
- package/dist/chunk-chunk-IP2UE74X.module.min.js +1 -0
- package/dist/chunk-chunk-ITDWLZXV.module.min.js +2 -0
- package/dist/chunk-chunk-LPSPATPC.module.min.js +1 -0
- package/dist/chunk-chunk-OM6NWS4H.module.min.js +2 -0
- package/dist/chunk-chunk-PX5YQGDP.module.min.js +2 -0
- package/dist/chunk-chunk-Q2BS46W2.module.min.js +2 -0
- package/dist/{chunk-chunk-FBGHXL72.module.min.js → chunk-chunk-RA7JCG7D.module.min.js} +1 -1
- package/dist/chunk-chunk-RNUHEXZA.module.min.js +2 -0
- package/dist/chunk-chunk-ROZWKEUG.module.min.js +1 -0
- package/dist/chunk-chunk-SMVD3EQJ.module.min.js +2 -0
- package/dist/chunk-chunk-T2FKJD4O.module.min.js +2 -0
- package/dist/chunk-chunk-UDREYOLV.module.min.js +1 -0
- package/dist/chunk-chunk-VOWE3SAP.module.min.js +2 -0
- package/dist/chunk-chunk-VQPNBUSW.module.min.js +2 -0
- package/dist/{chunk-chunk-7RYBCTK5.module.min.js → chunk-chunk-WAWCIHFJ.module.min.js} +1 -1
- package/dist/{chunk-chunk-F7WFPD4O.module.min.js → chunk-chunk-WYARAXHR.module.min.js} +1 -1
- package/dist/{chunk-chunk-JDXT6ORT.module.min.js → chunk-chunk-XP3OHHFX.module.min.js} +1 -1
- package/dist/chunk-chunk-XV3KGYTR.module.min.js +2 -0
- package/dist/chunk-chunk-YC2IVEPX.module.min.js +1 -0
- package/dist/chunk-chunk-ZXIXAPRE.module.min.js +2 -0
- package/dist/components/ChartContainer.d.ts +10 -0
- package/dist/components/ai/chartCapabilities.d.ts +3 -1
- package/dist/components/ai/chartCapabilityTypes.d.ts +14 -0
- package/dist/components/chartContainerDataAudit.d.ts +10 -0
- package/dist/components/charts/custom/XYCustomChart.d.ts +3 -0
- package/dist/components/charts/geo/DistanceCartogram.d.ts +30 -4
- package/dist/components/charts/index.d.ts +4 -0
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +36 -1
- package/dist/components/charts/ordinal/BarChart.d.ts +7 -14
- package/dist/components/charts/ordinal/GaugeChart.d.ts +3 -0
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +3 -0
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +3 -0
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -14
- package/dist/components/charts/physics/CrucibleChart.capability.d.ts +8 -0
- package/dist/components/charts/physics/CrucibleChart.d.ts +63 -0
- package/dist/components/charts/physics/crucibleBodyRenderers.d.ts +27 -0
- package/dist/components/charts/physics/crucibleChartProps.d.ts +90 -0
- package/dist/components/charts/physics/crucibleChrome.d.ts +47 -0
- package/dist/components/charts/physics/crucibleController.d.ts +59 -0
- package/dist/components/charts/physics/crucibleEffects.d.ts +30 -0
- package/dist/components/charts/physics/cruciblePhysics.d.ts +54 -0
- package/dist/components/charts/physics/crucibleProgram.d.ts +38 -0
- package/dist/components/charts/physics/crucibleTypes.d.ts +415 -0
- package/dist/components/charts/shared/chartSpecCore.d.ts +10 -4
- package/dist/components/charts/shared/crucibleWireSchema.d.ts +5 -0
- package/dist/components/charts/shared/diagnoseTypes.d.ts +10 -0
- package/dist/components/charts/shared/gaugeGradient.d.ts +4 -8
- package/dist/components/charts/shared/gradient.d.ts +35 -0
- package/dist/components/charts/shared/hatchFill.d.ts +3 -10
- package/dist/components/charts/shared/hooks.d.ts +2 -50
- package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +1 -2
- package/dist/components/charts/shared/useChartLegend.d.ts +58 -0
- package/dist/components/charts/shared/useChartSetup.d.ts +5 -0
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +6 -1
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +1 -0
- package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
- package/dist/components/charts/xy/AreaChart.d.ts +25 -42
- package/dist/components/charts/xy/BumpChart.capability.d.ts +11 -0
- package/dist/components/charts/xy/BumpChart.d.ts +161 -0
- package/dist/components/charts/xy/DifferenceChart.d.ts +3 -10
- package/dist/components/charts/xy/Heatmap.d.ts +3 -0
- package/dist/components/charts/xy/LineChart.d.ts +6 -8
- package/dist/components/data/auditData.d.ts +51 -0
- package/dist/components/data/dataAuditPresentation.d.ts +18 -0
- package/dist/components/data/dataAuditSources.d.ts +9 -0
- package/dist/components/data/numericContracts.d.ts +59 -0
- package/dist/components/data/numericFieldProfiler.d.ts +23 -0
- package/dist/components/geometry/bumpRibbonGeometry.d.ts +36 -0
- package/dist/components/legendLayout.d.ts +19 -1
- package/dist/components/recipes/netEnsembleLayout.d.ts +167 -0
- package/dist/components/recipes/netEnsembleOverlays.d.ts +20 -0
- package/dist/components/recipes/wordTrails.d.ts +156 -0
- package/dist/components/recipes/wordTrailsProgressiveReveal.d.ts +42 -0
- package/dist/components/semiotic-ai-core.d.ts +3 -0
- package/dist/components/semiotic-ai-data-audit.d.ts +4 -0
- package/dist/components/semiotic-ai.d.ts +9 -6
- package/dist/components/semiotic-geo.d.ts +1 -0
- package/dist/components/semiotic-network.d.ts +1 -0
- package/dist/components/semiotic-ordinal.d.ts +2 -0
- package/dist/components/semiotic-physics.d.ts +2 -0
- package/dist/components/semiotic-realtime-core.d.ts +1 -0
- package/dist/components/semiotic-recipes-core.d.ts +4 -0
- package/dist/components/semiotic-server-edge.d.ts +1 -1
- package/dist/components/semiotic-server.d.ts +1 -1
- package/dist/components/semiotic-utils-core.d.ts +3 -0
- package/dist/components/semiotic-xy.d.ts +4 -0
- package/dist/components/semiotic.d.ts +5 -5
- package/dist/components/server/renderEvidence.d.ts +27 -0
- package/dist/components/server/serverChartConfigs.d.ts +2 -0
- package/dist/components/server/serverChartConfigsPhysics.d.ts +9 -0
- package/dist/components/server/serverChartConfigsXY.d.ts +1 -0
- package/dist/components/server/staticAnnotations.d.ts +12 -0
- package/dist/components/server/staticLegend.d.ts +4 -2
- package/dist/components/server/staticSVGChrome.d.ts +4 -4
- package/dist/components/stream/GeoPipelineStore.d.ts +1 -0
- package/dist/components/stream/GeoSVGOverlay.d.ts +11 -10
- package/dist/components/stream/NetworkSVGOverlay.d.ts +2 -6
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +2 -6
- package/dist/components/stream/SVGOverlay.d.ts +2 -6
- package/dist/components/stream/StalenessBadge.d.ts +2 -6
- package/dist/components/stream/geoCartogram.d.ts +7 -0
- package/dist/components/stream/geoTypes.d.ts +20 -8
- package/dist/components/stream/legendRenderer.d.ts +2 -6
- package/dist/components/stream/networkFrameHandleTypes.d.ts +4 -0
- package/dist/components/stream/ordinalTypes.d.ts +7 -31
- package/dist/components/stream/physics/PhysicsKernel.d.ts +1 -0
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +2 -6
- package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +8 -0
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +2 -6
- package/dist/components/stream/pipelineConfig.d.ts +7 -15
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +9 -69
- package/dist/components/stream/renderers/cornerRadii.d.ts +2 -9
- package/dist/components/stream/renderers/thresholdLineSegments.d.ts +12 -0
- package/dist/components/stream/sceneToSVGShared.d.ts +3 -5
- package/dist/components/stream/types.d.ts +32 -56
- package/dist/components/stream/xySceneBuilders/areaGradient.d.ts +4 -20
- package/dist/components/stream/xySceneBuilders/types.d.ts +6 -6
- package/dist/components/types/legendTypes.d.ts +15 -6
- package/dist/components/useChartContainerDataAudit.d.ts +7 -0
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/physicsWorker.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai-core.d.ts +3 -0
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +9 -6
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-experimental.min.js +1 -1
- package/dist/semiotic-experimental.module.min.js +1 -1
- package/dist/semiotic-geo.d.ts +1 -0
- package/dist/semiotic-network.d.ts +1 -0
- package/dist/semiotic-ordinal.d.ts +2 -0
- package/dist/semiotic-physics.d.ts +2 -0
- package/dist/semiotic-realtime-core.d.ts +1 -0
- package/dist/semiotic-realtime-core.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-recipes-core.d.ts +4 -0
- package/dist/semiotic-recipes-core.min.js +1 -1
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-server-edge.d.ts +1 -1
- package/dist/semiotic-server-edge.min.js +1 -1
- package/dist/semiotic-server-edge.module.min.js +1 -1
- package/dist/semiotic-server-node.min.js +1 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-server.d.ts +1 -1
- package/dist/semiotic-utils-core.d.ts +3 -0
- package/dist/semiotic-utils-core.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +4 -0
- package/dist/semiotic.d.ts +5 -5
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-chunk-3ILKBVVQ.module.min.js +0 -1
- package/dist/chunk-chunk-6TPGFL7M.module.min.js +0 -2
- package/dist/chunk-chunk-7KZJUTKP.module.min.js +0 -2
- package/dist/chunk-chunk-ANYDWOZF.module.min.js +0 -1
- package/dist/chunk-chunk-AQPQN2HH.module.min.js +0 -2
- package/dist/chunk-chunk-ASKSE5F5.module.min.js +0 -1
- package/dist/chunk-chunk-AVBI6GDT.module.min.js +0 -1
- package/dist/chunk-chunk-B3DRZPBK.module.min.js +0 -2
- package/dist/chunk-chunk-BFHUYEOS.module.min.js +0 -2
- package/dist/chunk-chunk-C57LR3YG.module.min.js +0 -1
- package/dist/chunk-chunk-F5V4UIE6.module.min.js +0 -2
- package/dist/chunk-chunk-FP44FHFO.module.min.js +0 -2
- package/dist/chunk-chunk-HKXUAEPJ.module.min.js +0 -2
- package/dist/chunk-chunk-ICEXPNDC.module.min.js +0 -2
- package/dist/chunk-chunk-JMVEIZXP.module.min.js +0 -1
- package/dist/chunk-chunk-KHCOJMGK.module.min.js +0 -1
- package/dist/chunk-chunk-LRIFN2HK.module.min.js +0 -1
- package/dist/chunk-chunk-MFHF4J2Z.module.min.js +0 -1
- package/dist/chunk-chunk-N6VKKF3A.module.min.js +0 -2
- package/dist/chunk-chunk-NEVE562N.module.min.js +0 -1
- package/dist/chunk-chunk-NKZ75IM5.module.min.js +0 -2
- package/dist/chunk-chunk-PLIDPQNG.module.min.js +0 -2
- package/dist/chunk-chunk-QGZGZI4X.module.min.js +0 -1
- package/dist/chunk-chunk-RP7WTID5.module.min.js +0 -1
- package/dist/chunk-chunk-S7KLNUO6.module.min.js +0 -1
- package/dist/chunk-chunk-SR4ZXOWR.module.min.js +0 -2
- package/dist/chunk-statisticalOverlays-QGDLRUHX.module.min.js +0 -1
- package/dist/chunk-statisticalOverlays-T77OKLDY.module.min.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{bandFromAge as t,defaultTooltipStyle as e,normalizeTooltip as n,opacityFromAge as r,resolveCanvasFill as o}from"./chunk-chunk-BFHUYEOS.module.min.js";import{drawGlyphParts as a,glyphFractionClipRect as s,glyphHitGeometry as l,glyphPlacement as c}from"./chunk-chunk-KTWEBFMX.module.min.js";function i(t,e){const n={...t};return e.provenance&&(n.provenance=e.provenance),e.lifecycle&&(n.lifecycle=e.lifecycle),n}function u(){return(new Date).toISOString()}function f(t,e={}){const n=t.provenance;return{...t,provenance:{...n,...e,createdAt:e.createdAt??n?.createdAt??u()}}}function d(t){if(null==t)return null;if("number"==typeof t)return t;if(t instanceof Date)return t.getTime();const e=Date.parse(t);return Number.isFinite(e)?e:null}function p(t){const e=d(t?.now);if(null!=e)return e;const n=t?.dataExtent;if(n)if(Array.isArray(n)){const t=d(n[n.length-1]);if(null!=t)return t}else if("max"in n){const t=d(n.max);if(null!=t)return t}return Date.now()}function h(e,n,r={}){const o=e?.lifecycle?.freshness,a=d(e?.provenance?.createdAt),s=function(t){if(null==t)return null;if("number"==typeof t)return t;const e=function(t){const e=/^P(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/.exec(t);return e?1e3*(3600*(24*parseInt(e[1]||"0",10)+parseInt(e[2]||"0",10))+60*parseInt(e[3]||"0",10)+parseInt(e[4]||"0",10)):0}(t);return e>0?e:null}(e?.lifecycle?.ttlHint);return null==a||null==s?o??"fresh":t(n-a,s,r)}function y(t,e={}){const n=p(e);return t.map(t=>{const r=h(t,n,e.thresholds);return{...t,lifecycle:{...t.lifecycle,freshness:r}}})}var g={fresh:null,aging:.55,stale:.35,expired:.2},m={fresh:null,aging:null,stale:"4 4",expired:"2 4"};function x(t,e,n){return t&&n in t?t[n]:e[n]}function b(t,e={}){const n=p(e),r=!0===e.showExpiredAnnotations,o=[];for(const a of t){const t=h(a,n,e.thresholds);if("expired"===t&&!r)continue;const s=x(e.opacity,g,t),l=x(e.strokeDasharray,m,t),c=e.labelSuffix?.[t],i={...a,lifecycle:{...a.lifecycle,freshness:t}};null!=s&&null==i.opacity&&(i.opacity=s),null!=l&&null==i.strokeDasharray&&(i.strokeDasharray=l),c&&"string"==typeof i.label&&(i.label=i.label+c);const u=a.lifecycle?.anchor;u&&null==i.anchor&&(i.anchor=u),o.push(i)}return o}var v={proposed:.7,accepted:null,disputed:.7,retracted:.25},w={proposed:"3 3",accepted:null,disputed:"2 3",retracted:"2 4"},A={proposed:" (proposed)",accepted:"",disputed:" (?)",retracted:""};function k(t,e,n){return t&&n in t?t[n]:e[n]}function I(t,e={}){const n=!0===e.showRetractedAnnotations,r=!0===e.showSupersededAnnotations,o=new Set;for(const e of t){const t=e?.lifecycle?.supersedes;t&&"retracted"!==e?.lifecycle?.status&&o.add(t)}return t.filter(t=>{if("retracted"===t?.lifecycle?.status&&!n)return!1;const e=t?.provenance?.stableId;return!(e&&o.has(e)&&!r)})}function _(t,e={}){const n=[];for(const r of I(t,e)){const t=r?.lifecycle?.status;if(!t){n.push(r);continue}const o=k(e.opacity,v,t),a=k(e.strokeDasharray,w,t),s=e.labelSuffix?.[t]??A[t],l={...r};null!=o&&(l.opacity=("number"==typeof l.opacity?l.opacity:1)*o),null!=a&&null==l.strokeDasharray&&(l.strokeDasharray=a),s&&"string"==typeof l.label&&(l.label=l.label+s),n.push(l)}return n}import{jsx as M,jsxs as S}from"react/jsx-runtime";function D(t){return"string"==typeof t?t:"value"}function O(t){return null==t?"–":"number"==typeof t?Math.abs(t)>9999?t.toLocaleString():t+"":t instanceof Date?t.toLocaleDateString():t+""}function E(t,e){if(!e)return O(t);try{const n=e(t);return null==n?O(t):n}catch{return O(t)}}function R(t,e){return"function"==typeof e?e(t):t[e]}function P(t,e){if(!t)return[];const n=[];return(Array.isArray(t)?t:[t]).forEach((t,r)=>{const o="string"==typeof t?.y0Accessor?t.y0Accessor:"low",a="string"==typeof t?.y1Accessor?t.y1Accessor:"high";n.push({label:o,accessor:t=>t.bands?.[r]?.y0??(0===r?t.band?.y0:void 0),format:e}),n.push({label:a,accessor:t=>t.bands?.[r]?.y1??(0===r?t.band?.y1:void 0),format:e})}),n}function j(t){const n=t.find(t=>"title"===t.role),r=t.filter(t=>"title"!==t.role);return t=>{const o=t.data;if(!o)return null;const a=n?E(R(o,n.accessor),n.format):null;return S("div",{className:"semiotic-tooltip",style:e,children:[null!=a&&M("div",{style:{fontWeight:"bold",marginBottom:r.length>0?4:0},children:a}),r.map((t,e)=>{const n=E(R(o,t.accessor),t.format);return S("div",{style:e>0?{marginTop:2}:void 0,children:[S("span",{style:{opacity:.7},children:[t.label,": "]}),M("span",{children:n})]},e)})]})}}function C({categoryAccessor:t,valueAccessor:n,groupAccessor:r,groupLabel:o,pieData:a=!1,valueFormat:s}){return l=>{const c=a?l.data?.[0]||l.data||l:l.data||l,i=R(c,t),u=R(c,n),f=r?R(c,r):void 0;return S("div",{className:"semiotic-tooltip",style:e,children:[M("div",{style:{fontWeight:"bold"},children:O(i)}),M("div",{style:{marginTop:4},children:E(u,s)}),null!=f&&S("div",{style:{marginTop:2,opacity:.8},children:[o||D(r),": ",O(f)]})]})}}import*as T from"react";function L(...t){const e=t.filter(t=>null!=t);return 0===e.length?null:1===e.length?e[0]:T.createElement(T.Fragment,null,...e)}import{useEffect as z,useRef as H}from"react";function $(t,e,n,r){z(()=>{t.current?.updateConfig(e),n.current=!0,r()},[e,r,t,n])}function N(t,e,n,r){const o=H(null);z(()=>{const a=t.current;if(!a)return;const s=e??null;o.current!==s&&(o.current=s,a.setLayoutSelection(s),a.hasCustomRestyle?a.restyleScene(s):n.current=!0,r())},[e,r,t,n])}var U={fresh:1,aging:.7,stale:.45,expired:.25},B={alpha:1,band:"fresh",isStale:!1};function G(e,n){if(!e||0>=n)return B;const r=null!=e.threshold&&e.threshold>0?e.threshold:5e3,o=e.graded;if(o){const e="object"==typeof o?o:{},a=t(n,r,e.thresholds);return{alpha:{...U,...e.opacities??{}}[a],band:a,isStale:"fresh"!==a}}return n>r?{alpha:e.dimOpacity??.5,band:"stale",isStale:!0}:B}import{useEffect as W,useRef as F}from"react";function V(t,e,n,r,o,a){const s=F("fresh");W(()=>{if(!t)return;const l=setInterval(()=>{const l=e.current;if(!l||0===l.lastIngestTime)return;const c="undefined"!=typeof performance?performance.now():Date.now(),i=G(t,c-l.lastIngestTime);i.band===s.current&&i.isStale===o||(s.current=i.band,i.isStale!==o&&a(i.isStale),n.current=!0,r())},1e3);return()=>clearInterval(l)},[t,o,r,e,a,n])}import{jsx as Y}from"react/jsx-runtime";function K({isStale:t,position:e}){return Y("div",{className:"stream-staleness-badge",style:{position:"absolute",..."top-left"===e?{top:4,left:4}:"bottom-left"===e?{bottom:4,left:4}:"bottom-right"===e?{bottom:4,right:4}:{top:4,right:4},padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,pointerEvents:"none",zIndex:3,background:t?"#dc3545":"#28a745",color:"white"},children:t?"STALE":"LIVE"})}import{useRef as X}from"react";function q(t){const e=X(t);return function(t,e){if(Object.is(t,e))return!0;if(Array.isArray(t)&&Array.isArray(e))return Q(t,e);if(!Z(t)||!Z(e))return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const r of n){if(!Object.prototype.hasOwnProperty.call(e,r))return!1;const n=t[r],o=e[r];if(!Object.is(n,o))if(Array.isArray(n)&&Array.isArray(o)){if(!Q(n,o))return!1}else{if(!Z(n)||!Z(o))return!1;if(!J(n,o))return!1}}return!0}(e.current,t)||(e.current=t),e.current}function J(t,e){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const r of n){if(!Object.prototype.hasOwnProperty.call(e,r))return!1;if(!Object.is(t[r],e[r]))return!1}return!0}function Q(t,e){if(t.length!==e.length)return!1;for(let n=0;t.length>n;n++)if(!Object.is(t[n],e[n]))return!1;return!0}function Z(t){if(null===t||"object"!=typeof t)return!1;if(Array.isArray(t))return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function tt(t,e,n,r,l){if(0>=e.size)return;const i=e.glyph;if(!i||!i.parts?.length)return;const u=c(i,e.size);if(0>=u.scale)return;const f=(e.style.opacity??1)*(e._decayOpacity??1);if(0>=f)return;const d=e=>{const n=o(t,e,e);return"string"==typeof n?n:e},p=e.color??("string"==typeof e.style.fill?e.style.fill:void 0);t.save(),t.translate(n,r),e.rotation&&t.rotate(e.rotation),t.translate(u.offsetX,u.offsetY),t.scale(u.scale,u.scale),t.globalAlpha=l*f*(e.style.fillOpacity??1);const h=s(i,e.fraction??1,e.fractionStart??0,e.fractionDirection??"horizontal");h&&e.ghostColor&&a(t,i,p,e.accent,e.ghostColor,d),h&&(t.beginPath(),t.rect(h.x,h.y,h.width,h.height),t.clip()),a(t,i,p,e.accent,void 0,d),t.restore()}var et=(t,e)=>{const n=t.globalAlpha;for(const r of e)"glyph"===r.type&&tt(t,r,r.x,r.y,n);t.globalAlpha=n};function nt(t,e){const n=t.globalAlpha;for(const r of e)"glyph"===r.type&&tt(t,r,r.cx,r.cy,n);t.globalAlpha=n}var rt=new Set;function ot(t,e){const n="function"==typeof t?t(e.datum??null,e):t;return(r=n)&&"object"==typeof r&&"string"==typeof r.id&&"function"==typeof r.cacheKey&&"function"==typeof r.drawCanvas&&"function"==typeof r.renderStaticSVG?n:void 0;var r}function at(t,e){if("undefined"!=typeof process&&"production"===process.env?.NODE_ENV)return;const n=`${t}:${e}`;rt.has(n)||(rt.add(n),console.warn(`[Semiotic] Render backend "${t}" does not support scene node "${e}"; using the built-in renderer.`))}function st(t){const{context:e,nodes:n,renderMode:r,pixelRatio:o,paintBuiltIn:a}=t;if(!r||"sketchy"===r)return void a(n);let s=[];const l=()=>{s.length&&(a(s),s=[])};for(const t of n){const n=ot(r,t);if(!n){s.push(t);continue}let c;l(),e.save();try{c=n.drawCanvas({context:e,node:t,style:t.style??{},pixelRatio:o})}finally{e.restore()}c||(at(n.id,t.type??"unknown"),a([t]))}l()}function lt(t){const{node:e,index:n,renderMode:r,fallback:o}=t,a=ot(r,e);if(!a)return o();const s=a.renderStaticSVG({node:e,style:e.style??{},key:`${a.id}-${n}`});return null!=s?s:(at(a.id,e.type??"unknown"),o())}function ct(t){const e=new Map;for(const n of t){const t=n.group??"_default";let r=e.get(t);r||(r=[],e.set(t,r)),r.push(n)}for(const t of e.values()){t.sort((t,e)=>t.x-e.x||t.y-e.y);for(let e=0;t.length>e;e++)t[e]._groupIndex=e}const n=Array.from(e.keys()).sort((t,n)=>{const r=e.get(t),o=e.get(n);return(r.length>0?r[0].y:0)-(o.length>0?o[0].y:0)}),r=Array.from(e.values()).flat();r.sort((t,e)=>t.x-e.x||t.y-e.y);const o=new Map;for(let t=0;r.length>t;t++){r[t]._flatIndex=t;const e=r[t].datum?.id;null!=e&&o.set(e+"",t)}return{flat:r,groups:n,byGroup:e,idToIdx:o}}function it(t,e){if(0===t.flat.length)return{flatIndex:-1,group:"_default",indexInGroup:-1};const n=Math.max(0,Math.min(e,t.flat.length-1)),r=t.flat[n];return{flatIndex:n,group:r.group??"_default",indexInGroup:r._groupIndex??0}}function ut(t,e,n){const{group:r,indexInGroup:o}=e,a=n.byGroup.get(r);switch(t){case"ArrowRight":return a.length-1>o?a[o+1]._flatIndex:e.flatIndex;case"ArrowLeft":return o>0?a[o-1]._flatIndex:e.flatIndex;case"ArrowDown":{const t=n.groups.indexOf(r);return n.groups.length-1>t?ft(n,n.groups[t+1],a[o]):e.flatIndex}case"ArrowUp":{const t=n.groups.indexOf(r);return t>0?ft(n,n.groups[t-1],a[o]):e.flatIndex}case"PageDown":return Math.min(e.flatIndex+Math.max(1,Math.floor(.1*n.flat.length)),n.flat.length-1);case"PageUp":return Math.max(e.flatIndex-Math.max(1,Math.floor(.1*n.flat.length)),0);case"Home":return 0;case"End":return n.flat.length-1;case"Escape":return-1;default:return null}}function ft(t,e,n){const r=t.byGroup.get(e);let o=0,a=Math.abs(r[0].x-n.x);for(let t=1;r.length>t;t++){const e=Math.abs(r[t].x-n.x);a>e&&(a=e,o=t)}return r[o]._flatIndex}function dt(t){const e=[];for(const n of t)switch(n.type){case"point":e.push({x:n.x,y:n.y,datum:n.datum,shape:"circle",group:"_default"});break;case"symbol":if(0>=n.size)break;e.push({x:n.x,y:n.y,datum:n.datum,shape:"circle",group:"_default"});break;case"glyph":{if(0>=n.size||null==n.datum)break;const t=l(n.glyph,n.size);e.push({x:n.x+t.centerDx,y:n.y+t.centerDy,datum:n.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight,group:"_default"});break}case"line":{const t=n,r=Array.isArray(t.datum)?t.datum:[],o=t.group??"_default";for(let n=0;t.path.length>n&&r.length>n;n++)e.push({x:t.path[n][0],y:t.path[n][1],datum:r[n],shape:"circle",group:o});break}case"area":{const t=n,r=Array.isArray(t.datum)?t.datum:[],o=t.group??"_default";for(let n=0;t.topPath.length>n&&r.length>n;n++)e.push({x:t.topPath[n][0],y:t.topPath[n][1],datum:r[n],shape:"circle",group:o});break}case"rect":e.push({x:n.x+n.w/2,y:n.y+n.h/2,datum:n.datum,shape:"rect",w:n.w,h:n.h,group:n.group??"_default"});break;case"heatcell":e.push({x:n.x+n.w/2,y:n.y+n.h/2,datum:n.datum,shape:"rect",w:n.w,h:n.h,group:"_default"})}return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function pt(t){const e=[];for(const n of t)if("rect"===n.type&&null!=n.x){if(null==n.datum)continue;e.push({x:n.x+n.w/2,y:n.y+n.h/2,datum:n.datum,shape:"rect",w:n.w,h:n.h,group:n.group??n.datum?.category??""})}else if("point"===n.type)e.push({x:n.x,y:n.y,datum:n.datum,shape:"circle",group:"_default"});else if("symbol"===n.type){if(0>=n.size)continue;e.push({x:n.x,y:n.y,datum:n.datum,shape:"circle",group:"_default"})}else if("glyph"===n.type){if(0>=n.size||null==n.datum)continue;const t=l(n.glyph,n.size);e.push({x:n.x+t.centerDx,y:n.y+t.centerDy,datum:n.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight,group:"_default"})}else if("wedge"===n.type&&null!=n.cx){if(null===n.datum)continue;const t=((n.startAngle||0)+(n.endAngle||0))/2,r=((n.innerRadius||0)+(n.outerRadius||50))/2;e.push({x:n.cx+Math.cos(t)*r,y:n.cy+Math.sin(t)*r,datum:n.datum,shape:"wedge",group:"_default"})}return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function ht(t){const e=[];for(const n of t)if("circle"===n.type&&null!=n.cx){if(0>=n.r)continue;e.push({x:n.cx,y:n.cy,datum:n.datum,shape:"circle",group:n.datum?.id??"_default"})}else if("rect"===n.type&&null!=n.x){if(0>=n.w||0>=n.h)continue;e.push({x:n.x+n.w/2,y:n.y+n.h/2,datum:n.datum,shape:"rect",w:n.w,h:n.h,group:n.datum?.id??"_default"})}else if("arc"===n.type&&null!=n.cx)e.push({x:n.cx,y:n.cy,datum:n.datum,shape:"circle",group:n.datum?.id??"_default"});else if("symbol"===n.type&&null!=n.cx){if(0>=n.size)continue;e.push({x:n.cx,y:n.cy,datum:n.datum,shape:"circle",group:n.datum?.id??"_default"})}else if("glyph"===n.type&&null!=n.cx){if(0>=n.size||null==n.datum)continue;const t=l(n.glyph,n.size);e.push({x:n.cx+t.centerDx,y:n.cy+t.centerDy,datum:n.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight,group:n.datum?.id??"_default"})}return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function yt(t,e,n,r,o){const a=n.flat[e.flatIndex];if(!a)return ut(t,e,n);const s=a.datum?.id;switch(t){case"ArrowRight":case"ArrowLeft":case"ArrowDown":case"ArrowUp":{const r=function(t,e,n){let r=null,o=1/0;for(let a=0;t.flat.length>a;a++){const s=t.flat[a];if(s===e)continue;const l=s.x-e.x,c=s.y-e.y;let i=!1;switch(n){case"right":i=l>0&&Math.abs(l)>=Math.abs(c);break;case"left":i=0>l&&Math.abs(l)>=Math.abs(c);break;case"down":i=c>0&&Math.abs(c)>=Math.abs(l);break;case"up":i=0>c&&Math.abs(c)>=Math.abs(l)}if(!i)continue;const u=l*l+c*c;o>u&&(o=u,r=a)}return r}(n,a,"ArrowRight"===t?"right":"ArrowLeft"===t?"left":"ArrowDown"===t?"down":"up")??e.flatIndex;return r!==e.flatIndex&&(o.current=-1),r}case"Enter":{if(null==s)return e.flatIndex;const t=function(t,e){const n=t+"",r=[];for(const t of e){const e=t.datum??t,o=gt(e.source),a=gt(e.target),s=null!=o,l=null!=a;s&&o+""===n&&l?r.push(a+""):l&&a+""===n&&s&&r.push(o+"")}return r}(s,r);if(0===t.length)return e.flatIndex;const a=n.idToIdx.get(t[(o.current+1)%t.length])??-1;return 0>a?e.flatIndex:(o.current=-1,a)}default:{const r=ut(t,e,n);return null!==r&&r!==e.flatIndex&&(o.current=-1),r}}}function gt(t){return"object"==typeof t&&null!==t&&"id"in t?t.id:t}function mt(t){const e=[];for(const n of t)if("point"===n.type&&null!=n.x)e.push({x:n.x,y:n.y,datum:n.datum,shape:"circle"});else if("glyph"===n.type){if(0>=n.size||null==n.datum)continue;const t=l(n.glyph,n.size);e.push({x:n.x+t.centerDx,y:n.y+t.centerDy,datum:n.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight})}else"geoarea"===n.type&&n.centroid&&!1!==n.interactive&&e.push({x:n.centroid[0],y:n.centroid[1],datum:n.datum,shape:"geoarea",pathData:n.pathData});return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function xt(t,e,n){switch(t){case"ArrowRight":case"ArrowDown":return n-1>e?e+1:e;case"ArrowLeft":case"ArrowUp":return e>0?e-1:e;case"PageDown":return Math.min(e+Math.max(1,Math.floor(.1*n)),n-1);case"PageUp":return Math.max(e-Math.max(1,Math.floor(.1*n)),0);case"Home":return 0;case"End":return n-1;case"Escape":return-1;default:return null}}function bt(t){return{data:t.datum||{},x:t.x,y:t.y,__semioticHoverData:!0}}function vt(t){const{title:e,description:n,summary:r,accessibleTable:o,className:a,animate:s,axisExtent:l,autoPlaceAnnotations:c}=t,i={};return e&&(i.title=e),n&&(i.description=n),r&&(i.summary=r),void 0!==o&&(i.accessibleTable=o),a&&(i.className=a),null!=s&&(i.animate=s),void 0!==l&&(i.axisExtent=l),void 0!==c&&(i.autoPlaceAnnotations=c),i}function wt(t){const{linkedHover:e,selection:n,onObservation:r,onClick:o,hoverRadius:a,hoverHighlight:s,forceHoverBehavior:l,forceClickBehavior:c,mobileInteraction:i,customHoverBehavior:u,customClickBehavior:f,linkedHoverInClickPredicate:d=!0}=t,p={};r&&(p.annotationObservationCallback=r);const h=i?.enabled?Math.max(a??30,Math.ceil((i.targetSize||44)/2),24):a;return(l||e||r||o||s)&&(p.customHoverBehavior=u),f&&(c||(d?r||o||e:r||o)||i?.enabled&&(i.tapToSelect||i.tapToLockTooltip)&&(e||s||n))&&(p.customClickBehavior=f),null!=h&&(p.hoverRadius=h),p}function At(t){const{tooltip:e,defaultTooltipContent:r}=t;return{tooltipContent:!1===e?()=>null:n(e)||r}}function kt(t,e,n){if(1>=n)return 1;const o=n-1;return r({age:o-e,extent:o,type:t.type,halfLife:t.halfLife??n/2,threshold:t.stepThreshold??.5*n,minOpacity:t.minOpacity??.1})}function It(t){const e=new Map;for(let n=0;t.length>n;n++)e.set(t[n],n);return e}function _t(t,e,n,r=It(n)){const o=n.length;if(o>1)for(const n of e){if("line"===n.type){const e=Array.isArray(n.datum)?n.datum:[];if(2>e.length)continue;const a=Array(e.length);let s=!1;for(let n=0;e.length>n;n++){const l=r.get(e[n]);null!=l?(a[n]=kt(t,l,o),1>a[n]&&(s=!0)):a[n]=1}s&&(n._decayOpacities=a);continue}if("area"===n.type){const e=Array.isArray(n.datum)?n.datum:[],a=n.topPath?n.topPath.length:e.length;if(2>a)continue;if(e.length===a){const s=Array(a);let l=!1;for(let n=0;e.length>n;n++){const a=r.get(e[n]);null!=a?(s[n]=kt(t,a,o),1>s[n]&&(l=!0)):s[n]=1}l&&(n._decayOpacities=s)}else{let s=1;for(const n of e){const e=r.get(n);if(null!=e){const n=kt(t,e,o);s>n&&(s=n)}}if(1>s){const t=Array(a);t.fill(s),n._decayOpacities=t}}continue}const e=r.get(n.datum);if(null==e)continue;const a=kt(t,e,o);"heatcell"===n.type?n.style={opacity:a}:"candlestick"===n.type?n._decayOpacity=a:n.style={...n.style,opacity:(n.style?.opacity??1)*a}}}function Mt(t){if("production"===process.env.NODE_ENV)return;const{label:e,nodes:n,overlays:r,warned:o}=t;St(r)&&0===n.length&&Dt(o,"overlay-only",`[semiotic] ${e} returned overlays but no data-bearing scene nodes. Overlays do not participate in hover, selection, transitions, SSR evidence, or accessibility tables. Emit at least one scene node with a datum, or mark the overlay-only chart as intentionally decorative.`),n.length>0&&n.every(t=>null==t.datum)&&Dt(o,"null-datums",`[semiotic] ${e} returned scene nodes, but every scene-node datum is null. Hover, callbacks, selection, and tooltip helpers need data-bearing nodes. Attach a user-facing datum to each interactive node, or set interactive overlays outside the chart.`)}function St(t){return null!=t&&!1!==t&&""!==t&&(!Array.isArray(t)||t.some(St))}function Dt(t,e,n){t.has(e)||(t.add(e),console.warn(n))}function Ot(t,e,n,r){const o=function(t){if(t instanceof Error)return{name:t.name||"Error",message:t.message||"Custom layout threw."};if("string"==typeof t)return{name:"Error",message:t};if(null==t)return{name:"Error",message:"Custom layout threw a nullish value."};try{return{name:"Error",message:t+""}}catch{return{name:"Error",message:"Custom layout threw a non-stringifiable value."}}}(e),a="network"===t?"customNetworkLayout":"customLayout";return{code:"CUSTOM_LAYOUT_ERROR",severity:"error",phase:"layout",component:t,source:a,message:`Semiotic ${t} ${a} failed: ${o.message}`,error:o,recovery:n?"preserved-last-good-scene":"empty-scene",preservedLastGoodScene:n,affectedRevision:r}}var Et=new WeakMap;function Rt(){return this.updateResults.last}function Pt(){return this.updateResults.last}function jt(t){return this.updateResults.subscribe(t)}function Ct(t){this.config.layoutSelection=t}function Tt(){Et.set(this,!0)}function Lt(){const t=!0===Et.get(this);return Et.delete(this),t}function zt(t){Object.assign(t.prototype,{getLastUpdateResult:Rt,getUpdateSnapshot:Pt,subscribeUpdateResult:jt,setLayoutSelection:Ct,markStylePaintPending:Tt,consumeStylePaintPending:Lt})}function Ht(t,e,n){return n.x>t||t>n.x+n.w||n.y>e||e>n.y+n.h?{hit:!1,cx:0,cy:0}:{hit:!0,cx:n.x+n.w/2,cy:n.y+n.h/2}}function $t(t,e=30){return Math.max((t??4)+5,12,e)}function Nt(t){return t instanceof Date?t:"number"==typeof t&&t>1e9?new Date(t):null}function Ut(t,e){const n=Nt(t);if(!n)return!1;const r=Nt(e);return!r||n.getFullYear()!==r.getFullYear()||n.getMonth()!==r.getMonth()}function Bt(t){let e=t%(2*Math.PI);return 0>e&&(e+=2*Math.PI),e}function Gt(t,e,n,r,o,a=t=>t.x,s=t=>t.y,l=t=>t.r){const c=Math.max(r,o+5,12),i=e-c,u=e+c,f=n-c,d=n+c;let p=null,h=1/0;return t.visit((t,o,c,y,g)=>{if(o>u||i>y||c>d||f>g)return!0;if(!t.length){let o=t;do{const t=o.data,c=a(t)-e,i=s(t)-n,u=Math.sqrt(c*c+i*i);$t(l(t),r)>=u&&h>u&&(p=t,h=u),o=o.next}while(o)}return!1}),p?{node:p,distance:h}:null}function Wt(t){return!(!t._pulseIntensity||0>=t._pulseIntensity)}function Ft(t,e,n=.3){Wt(e)&&(t.globalAlpha=e._pulseIntensity*n,t.fillStyle=e._pulseColor||"rgba(255,255,255,0.6)",t.fillRect(e.x,e.y,e.w,e.h))}function Vt(t,e,n=.6){if(!Wt(e))return;const r=e.r+(e._pulseGlowRadius??4)*e._pulseIntensity,o=e.cx??e.x??0,a=e.cy??e.y??0;t.beginPath(),t.arc(o,a,r,0,2*Math.PI),t.strokeStyle=e._pulseColor||"rgba(255,255,255,0.6)",t.lineWidth=2*e._pulseIntensity,t.globalAlpha=e._pulseIntensity*n,t.stroke()}function Yt(t,e,n,r=.35){Wt(e)&&(t.globalAlpha=e._pulseIntensity*r,t.fillStyle=e._pulseColor||"rgba(255,255,255,0.6)",n?t.fill(n):t.fill())}export{kt as computeDecayOpacity,It as buildDatumIndexMap,_t as applyDecay,Mt as warnCustomLayoutDiagnostics,Ot as createCustomLayoutFailureDiagnostic,zt as attachUpdateResultStore,L as composeOverlays,$ as useConfigSync,N as useLayoutSelectionSync,Ht as hitTestRect,$t as getHitRadius,Ut as isTimeLandmark,Bt as normalizeAngle,Gt as findHitPointInQuadtree,G as resolveStaleness,V as useStalenessCheck,K as StalenessBadge,i as withProvenance,u as currentTimestamp,f as withCurrentProvenance,h as annotationFreshnessFor,y as computeAnnotationFreshness,b as applyAnnotationLifecycle,I as filterAnnotationsByStatus,_ as applyAnnotationStatus,q as useStableShallow,Ft as renderRectPulse,Vt as renderCirclePulse,Yt as renderPathPulse,et as glyphCanvasRenderer,nt as networkGlyphRenderer,st as paintSceneWithBackend,lt as renderSceneWithBackend,D as accessorName,O as formatVal,P as bandTooltipFields,j as buildDefaultTooltip,C as buildOrdinalTooltip,ct as buildNavGraph,it as resolvePosition,ut as nextGraphIndex,dt as extractXYNavPoints,pt as extractOrdinalNavPoints,ht as extractNetworkNavPoints,yt as nextNetworkIndex,mt as extractGeoNavPoints,xt as nextIndex,bt as navPointToHover,vt as buildBaseMetadataProps,wt as buildCustomBehaviorProps,At as buildTooltipProps};
|
|
2
|
+
import{bandFromAge as t,defaultTooltipStyle as e,normalizeTooltip as n,opacityFromAge as r,resolveCanvasFill as o}from"./chunk-chunk-PX5YQGDP.module.min.js";import{drawGlyphParts as a,glyphFractionClipRect as s,glyphHitGeometry as l,glyphPlacement as c}from"./chunk-chunk-KTWEBFMX.module.min.js";function i(t,e){const n={...t};return e.provenance&&(n.provenance=e.provenance),e.lifecycle&&(n.lifecycle=e.lifecycle),n}function u(){return(new Date).toISOString()}function f(t,e={}){const n=t.provenance;return{...t,provenance:{...n,...e,createdAt:e.createdAt??n?.createdAt??u()}}}function d(t){if(null==t)return null;if("number"==typeof t)return t;if(t instanceof Date)return t.getTime();const e=Date.parse(t);return Number.isFinite(e)?e:null}function p(t){const e=d(t?.now);if(null!=e)return e;const n=t?.dataExtent;if(n)if(Array.isArray(n)){const t=d(n[n.length-1]);if(null!=t)return t}else if("max"in n){const t=d(n.max);if(null!=t)return t}return Date.now()}function h(e,n,r={}){const o=e?.lifecycle?.freshness,a=d(e?.provenance?.createdAt),s=function(t){if(null==t)return null;if("number"==typeof t)return t;const e=function(t){const e=/^P(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/.exec(t);return e?1e3*(3600*(24*parseInt(e[1]||"0",10)+parseInt(e[2]||"0",10))+60*parseInt(e[3]||"0",10)+parseInt(e[4]||"0",10)):0}(t);return e>0?e:null}(e?.lifecycle?.ttlHint);return null==a||null==s?o??"fresh":t(n-a,s,r)}function y(t,e={}){const n=p(e);return t.map(t=>{const r=h(t,n,e.thresholds);return{...t,lifecycle:{...t.lifecycle,freshness:r}}})}var g={fresh:null,aging:.55,stale:.35,expired:.2},m={fresh:null,aging:null,stale:"4 4",expired:"2 4"};function x(t,e,n){return t&&n in t?t[n]:e[n]}function b(t,e={}){const n=p(e),r=!0===e.showExpiredAnnotations,o=[];for(const a of t){const t=h(a,n,e.thresholds);if("expired"===t&&!r)continue;const s=x(e.opacity,g,t),l=x(e.strokeDasharray,m,t),c=e.labelSuffix?.[t],i={...a,lifecycle:{...a.lifecycle,freshness:t}};null!=s&&null==i.opacity&&(i.opacity=s),null!=l&&null==i.strokeDasharray&&(i.strokeDasharray=l),c&&"string"==typeof i.label&&(i.label=i.label+c);const u=a.lifecycle?.anchor;u&&null==i.anchor&&(i.anchor=u),o.push(i)}return o}var v={proposed:.7,accepted:null,disputed:.7,retracted:.25},w={proposed:"3 3",accepted:null,disputed:"2 3",retracted:"2 4"},A={proposed:" (proposed)",accepted:"",disputed:" (?)",retracted:""};function k(t,e,n){return t&&n in t?t[n]:e[n]}function I(t,e={}){const n=!0===e.showRetractedAnnotations,r=!0===e.showSupersededAnnotations,o=new Set;for(const e of t){const t=e?.lifecycle?.supersedes;t&&"retracted"!==e?.lifecycle?.status&&o.add(t)}return t.filter(t=>{if("retracted"===t?.lifecycle?.status&&!n)return!1;const e=t?.provenance?.stableId;return!(e&&o.has(e)&&!r)})}function _(t,e={}){const n=[];for(const r of I(t,e)){const t=r?.lifecycle?.status;if(!t){n.push(r);continue}const o=k(e.opacity,v,t),a=k(e.strokeDasharray,w,t),s=e.labelSuffix?.[t]??A[t],l={...r};null!=o&&(l.opacity=("number"==typeof l.opacity?l.opacity:1)*o),null!=a&&null==l.strokeDasharray&&(l.strokeDasharray=a),s&&"string"==typeof l.label&&(l.label=l.label+s),n.push(l)}return n}import{jsx as M,jsxs as S}from"react/jsx-runtime";function D(t){return"string"==typeof t?t:"value"}function O(t){return null==t?"–":"number"==typeof t?Math.abs(t)>9999?t.toLocaleString():t+"":t instanceof Date?t.toLocaleDateString():t+""}function E(t,e){if(!e)return O(t);try{const n=e(t);return null==n?O(t):n}catch{return O(t)}}function R(t,e){return"function"==typeof e?e(t):t[e]}function P(t,e){if(!t)return[];const n=[];return(Array.isArray(t)?t:[t]).forEach((t,r)=>{const o="string"==typeof t?.y0Accessor?t.y0Accessor:"low",a="string"==typeof t?.y1Accessor?t.y1Accessor:"high";n.push({label:o,accessor:t=>t.bands?.[r]?.y0??(0===r?t.band?.y0:void 0),format:e}),n.push({label:a,accessor:t=>t.bands?.[r]?.y1??(0===r?t.band?.y1:void 0),format:e})}),n}function j(t){const n=t.find(t=>"title"===t.role),r=t.filter(t=>"title"!==t.role);return t=>{const o=t.data;if(!o)return null;const a=n?E(R(o,n.accessor),n.format):null;return S("div",{className:"semiotic-tooltip",style:e,children:[null!=a&&M("div",{style:{fontWeight:"bold",marginBottom:r.length>0?4:0},children:a}),r.map((t,e)=>{const n=E(R(o,t.accessor),t.format);return S("div",{style:e>0?{marginTop:2}:void 0,children:[S("span",{style:{opacity:.7},children:[t.label,": "]}),M("span",{children:n})]},e)})]})}}function C({categoryAccessor:t,valueAccessor:n,groupAccessor:r,groupLabel:o,pieData:a=!1,valueFormat:s}){return l=>{const c=a?l.data?.[0]||l.data||l:l.data||l,i=R(c,t),u=R(c,n),f=r?R(c,r):void 0;return S("div",{className:"semiotic-tooltip",style:e,children:[M("div",{style:{fontWeight:"bold"},children:O(i)}),M("div",{style:{marginTop:4},children:E(u,s)}),null!=f&&S("div",{style:{marginTop:2,opacity:.8},children:[o||D(r),": ",O(f)]})]})}}import*as T from"react";function L(...t){const e=t.filter(t=>null!=t);return 0===e.length?null:1===e.length?e[0]:T.createElement(T.Fragment,null,...e)}import{useEffect as z,useRef as H}from"react";function $(t,e,n,r){z(()=>{t.current?.updateConfig(e),n.current=!0,r()},[e,r,t,n])}function G(t,e,n,r){const o=H(null);z(()=>{const a=t.current;if(!a)return;const s=e??null;o.current!==s&&(o.current=s,a.setLayoutSelection(s),a.hasCustomRestyle?a.restyleScene(s):n.current=!0,r())},[e,r,t,n])}var N={fresh:1,aging:.7,stale:.45,expired:.25},U={alpha:1,band:"fresh",isStale:!1};function W(e,n){if(!e||0>=n)return U;const r=null!=e.threshold&&e.threshold>0?e.threshold:5e3,o=e.graded;if(o){const e="object"==typeof o?o:{},a=t(n,r,e.thresholds);return{alpha:{...N,...e.opacities??{}}[a],band:a,isStale:"fresh"!==a}}return n>r?{alpha:e.dimOpacity??.5,band:"stale",isStale:!0}:U}import{useEffect as B,useRef as F}from"react";function V(t,e,n,r,o,a){const s=F("fresh");B(()=>{if(!t)return;const l=setInterval(()=>{const l=e.current;if(!l||0===l.lastIngestTime)return;const c="undefined"!=typeof performance?performance.now():Date.now(),i=W(t,c-l.lastIngestTime);i.band===s.current&&i.isStale===o||(s.current=i.band,i.isStale!==o&&a(i.isStale),n.current=!0,r())},1e3);return()=>clearInterval(l)},[t,o,r,e,a,n])}import{jsx as Y}from"react/jsx-runtime";function X({isStale:t,position:e}){return Y("div",{className:"stream-staleness-badge",style:{position:"absolute",..."top-left"===e?{top:4,left:4}:"bottom-left"===e?{bottom:4,left:4}:"bottom-right"===e?{bottom:4,right:4}:{top:4,right:4},padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,pointerEvents:"none",zIndex:3,background:t?"#dc3545":"#28a745",color:"white"},children:t?"STALE":"LIVE"})}import{useRef as K}from"react";function q(t){const e=K(t);return function(t,e){if(Object.is(t,e))return!0;if(Array.isArray(t)&&Array.isArray(e))return J(t,e);if(!Z(t)||!Z(e))return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const r of n){if(!Object.prototype.hasOwnProperty.call(e,r))return!1;const n=t[r],o=e[r];if(!Object.is(n,o))if(Array.isArray(n)&&Array.isArray(o)){if(!J(n,o))return!1}else{if(!Z(n)||!Z(o))return!1;if(!Q(n,o))return!1}}return!0}(e.current,t)||(e.current=t),e.current}function Q(t,e){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const r of n){if(!Object.prototype.hasOwnProperty.call(e,r))return!1;if(!Object.is(t[r],e[r]))return!1}return!0}function J(t,e){if(t.length!==e.length)return!1;for(let n=0;t.length>n;n++)if(!Object.is(t[n],e[n]))return!1;return!0}function Z(t){if(null===t||"object"!=typeof t)return!1;if(Array.isArray(t))return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function tt(t,e,n,r,l){if(0>=e.size)return;const i=e.glyph;if(!i||!i.parts?.length)return;const u=c(i,e.size);if(0>=u.scale)return;const f=(e.style.opacity??1)*(e._decayOpacity??1);if(0>=f)return;const d=e=>{const n=o(t,e,e);return"string"==typeof n?n:e},p=e.color??("string"==typeof e.style.fill?e.style.fill:void 0);t.save(),t.translate(n,r),e.rotation&&t.rotate(e.rotation),t.translate(u.offsetX,u.offsetY),t.scale(u.scale,u.scale),t.globalAlpha=l*f*(e.style.fillOpacity??1);const h=s(i,e.fraction??1,e.fractionStart??0,e.fractionDirection??"horizontal");h&&e.ghostColor&&a(t,i,p,e.accent,e.ghostColor,d),h&&(t.beginPath(),t.rect(h.x,h.y,h.width,h.height),t.clip()),a(t,i,p,e.accent,void 0,d),t.restore()}var et=(t,e)=>{const n=t.globalAlpha;for(const r of e)"glyph"===r.type&&tt(t,r,r.x,r.y,n);t.globalAlpha=n};function nt(t,e){const n=t.globalAlpha;for(const r of e)"glyph"===r.type&&tt(t,r,r.cx,r.cy,n);t.globalAlpha=n}var rt=new Set;function ot(t,e){const n="function"==typeof t?t(e.datum??null,e):t;return(r=n)&&"object"==typeof r&&"string"==typeof r.id&&"function"==typeof r.cacheKey&&"function"==typeof r.drawCanvas&&"function"==typeof r.renderStaticSVG?n:void 0;var r}function at(t,e){if("undefined"!=typeof process&&"production"===process.env?.NODE_ENV)return;const n=`${t}:${e}`;rt.has(n)||(rt.add(n),console.warn(`[Semiotic] Render backend "${t}" does not support scene node "${e}"; using the built-in renderer.`))}function st(t){const{context:e,nodes:n,renderMode:r,pixelRatio:o,paintBuiltIn:a}=t;if(!r||"sketchy"===r)return void a(n);let s=[];const l=()=>{s.length&&(a(s),s=[])};for(const t of n){const n=ot(r,t);if(!n){s.push(t);continue}let c;l(),e.save();try{c=n.drawCanvas({context:e,node:t,style:t.style??{},pixelRatio:o})}finally{e.restore()}c||(at(n.id,t.type??"unknown"),a([t]))}l()}function lt(t){const{node:e,index:n,renderMode:r,fallback:o}=t,a=ot(r,e);if(!a)return o();const s=a.renderStaticSVG({node:e,style:e.style??{},key:`${a.id}-${n}`});return null!=s?s:(at(a.id,e.type??"unknown"),o())}function ct(t){const e=new Map;for(const n of t){const t=n.group??"_default";let r=e.get(t);r||(r=[],e.set(t,r)),r.push(n)}for(const t of e.values()){t.sort((t,e)=>t.x-e.x||t.y-e.y);for(let e=0;t.length>e;e++)t[e]._groupIndex=e}const n=Array.from(e.keys()).sort((t,n)=>{const r=e.get(t),o=e.get(n);return(r.length>0?r[0].y:0)-(o.length>0?o[0].y:0)}),r=Array.from(e.values()).flat();r.sort((t,e)=>t.x-e.x||t.y-e.y);const o=new Map;for(let t=0;r.length>t;t++){r[t]._flatIndex=t;const e=r[t].datum?.id;null!=e&&o.set(e+"",t)}return{flat:r,groups:n,byGroup:e,idToIdx:o}}function it(t,e){if(0===t.flat.length)return{flatIndex:-1,group:"_default",indexInGroup:-1};const n=Math.max(0,Math.min(e,t.flat.length-1)),r=t.flat[n];return{flatIndex:n,group:r.group??"_default",indexInGroup:r._groupIndex??0}}function ut(t,e,n){const{group:r,indexInGroup:o}=e,a=n.byGroup.get(r);switch(t){case"ArrowRight":return a.length-1>o?a[o+1]._flatIndex:e.flatIndex;case"ArrowLeft":return o>0?a[o-1]._flatIndex:e.flatIndex;case"ArrowDown":{const t=n.groups.indexOf(r);return n.groups.length-1>t?ft(n,n.groups[t+1],a[o]):e.flatIndex}case"ArrowUp":{const t=n.groups.indexOf(r);return t>0?ft(n,n.groups[t-1],a[o]):e.flatIndex}case"PageDown":return Math.min(e.flatIndex+Math.max(1,Math.floor(.1*n.flat.length)),n.flat.length-1);case"PageUp":return Math.max(e.flatIndex-Math.max(1,Math.floor(.1*n.flat.length)),0);case"Home":return 0;case"End":return n.flat.length-1;case"Escape":return-1;default:return null}}function ft(t,e,n){const r=t.byGroup.get(e);let o=0,a=Math.abs(r[0].x-n.x);for(let t=1;r.length>t;t++){const e=Math.abs(r[t].x-n.x);a>e&&(a=e,o=t)}return r[o]._flatIndex}function dt(t){const e=[];for(const n of t)switch(n.type){case"point":e.push({x:n.x,y:n.y,datum:n.datum,shape:"circle",group:"_default"});break;case"symbol":if(0>=n.size)break;e.push({x:n.x,y:n.y,datum:n.datum,shape:"circle",group:"_default"});break;case"glyph":{if(0>=n.size||null==n.datum)break;const t=l(n.glyph,n.size);e.push({x:n.x+t.centerDx,y:n.y+t.centerDy,datum:n.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight,group:"_default"});break}case"line":{const t=n,r=Array.isArray(t.datum)?t.datum:[],o=t.group??"_default";for(let n=0;t.path.length>n&&r.length>n;n++)e.push({x:t.path[n][0],y:t.path[n][1],datum:r[n],shape:"circle",group:o});break}case"area":{const t=n,r=Array.isArray(t.datum)?t.datum:[],o=t.group??"_default";for(let n=0;t.topPath.length>n&&r.length>n;n++)e.push({x:t.topPath[n][0],y:t.topPath[n][1],datum:r[n],shape:"circle",group:o});break}case"rect":e.push({x:n.x+n.w/2,y:n.y+n.h/2,datum:n.datum,shape:"rect",w:n.w,h:n.h,group:n.group??"_default"});break;case"heatcell":e.push({x:n.x+n.w/2,y:n.y+n.h/2,datum:n.datum,shape:"rect",w:n.w,h:n.h,group:"_default"})}return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function pt(t){const e=[];for(const n of t)if("rect"===n.type&&null!=n.x){if(null==n.datum)continue;e.push({x:n.x+n.w/2,y:n.y+n.h/2,datum:n.datum,shape:"rect",w:n.w,h:n.h,group:n.group??n.datum?.category??""})}else if("point"===n.type)e.push({x:n.x,y:n.y,datum:n.datum,shape:"circle",group:"_default"});else if("symbol"===n.type){if(0>=n.size)continue;e.push({x:n.x,y:n.y,datum:n.datum,shape:"circle",group:"_default"})}else if("glyph"===n.type){if(0>=n.size||null==n.datum)continue;const t=l(n.glyph,n.size);e.push({x:n.x+t.centerDx,y:n.y+t.centerDy,datum:n.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight,group:"_default"})}else if("wedge"===n.type&&null!=n.cx){if(null===n.datum)continue;const t=((n.startAngle||0)+(n.endAngle||0))/2,r=((n.innerRadius||0)+(n.outerRadius||50))/2;e.push({x:n.cx+Math.cos(t)*r,y:n.cy+Math.sin(t)*r,datum:n.datum,shape:"wedge",group:"_default"})}return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function ht(t){const e=[];for(const n of t)if("circle"===n.type&&null!=n.cx){if(0>=n.r)continue;e.push({x:n.cx,y:n.cy,datum:n.datum,shape:"circle",group:n.datum?.id??"_default"})}else if("rect"===n.type&&null!=n.x){if(0>=n.w||0>=n.h)continue;e.push({x:n.x+n.w/2,y:n.y+n.h/2,datum:n.datum,shape:"rect",w:n.w,h:n.h,group:n.datum?.id??"_default"})}else if("arc"===n.type&&null!=n.cx)e.push({x:n.cx,y:n.cy,datum:n.datum,shape:"circle",group:n.datum?.id??"_default"});else if("symbol"===n.type&&null!=n.cx){if(0>=n.size)continue;e.push({x:n.cx,y:n.cy,datum:n.datum,shape:"circle",group:n.datum?.id??"_default"})}else if("glyph"===n.type&&null!=n.cx){if(0>=n.size||null==n.datum)continue;const t=l(n.glyph,n.size);e.push({x:n.cx+t.centerDx,y:n.cy+t.centerDy,datum:n.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight,group:n.datum?.id??"_default"})}return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function yt(t,e,n,r,o){const a=n.flat[e.flatIndex];if(!a)return ut(t,e,n);const s=a.datum?.id;switch(t){case"ArrowRight":case"ArrowLeft":case"ArrowDown":case"ArrowUp":{const r=function(t,e,n){let r=null,o=1/0;for(let a=0;t.flat.length>a;a++){const s=t.flat[a];if(s===e)continue;const l=s.x-e.x,c=s.y-e.y;let i=!1;switch(n){case"right":i=l>0&&Math.abs(l)>=Math.abs(c);break;case"left":i=0>l&&Math.abs(l)>=Math.abs(c);break;case"down":i=c>0&&Math.abs(c)>=Math.abs(l);break;case"up":i=0>c&&Math.abs(c)>=Math.abs(l)}if(!i)continue;const u=l*l+c*c;o>u&&(o=u,r=a)}return r}(n,a,"ArrowRight"===t?"right":"ArrowLeft"===t?"left":"ArrowDown"===t?"down":"up")??e.flatIndex;return r!==e.flatIndex&&(o.current=-1),r}case"Enter":{if(null==s)return e.flatIndex;const t=function(t,e){const n=t+"",r=[];for(const t of e){const e=t.datum??t,o=gt(e.source),a=gt(e.target),s=null!=o,l=null!=a;s&&o+""===n&&l?r.push(a+""):l&&a+""===n&&s&&r.push(o+"")}return r}(s,r);if(0===t.length)return e.flatIndex;const a=n.idToIdx.get(t[(o.current+1)%t.length])??-1;return 0>a?e.flatIndex:(o.current=-1,a)}default:{const r=ut(t,e,n);return null!==r&&r!==e.flatIndex&&(o.current=-1),r}}}function gt(t){return"object"==typeof t&&null!==t&&"id"in t?t.id:t}function mt(t){const e=[];for(const n of t)if("point"===n.type&&null!=n.x)e.push({x:n.x,y:n.y,datum:n.datum,shape:"circle"});else if("glyph"===n.type){if(0>=n.size||null==n.datum)continue;const t=l(n.glyph,n.size);e.push({x:n.x+t.centerDx,y:n.y+t.centerDy,datum:n.datum,shape:"rect",w:2*t.halfWidth,h:2*t.halfHeight})}else"geoarea"===n.type&&n.centroid&&!1!==n.interactive&&e.push({x:n.centroid[0],y:n.centroid[1],datum:n.datum,shape:"geoarea",pathData:n.pathData});return e.sort((t,e)=>t.x-e.x||t.y-e.y),e}function xt(t,e,n){switch(t){case"ArrowRight":case"ArrowDown":return n-1>e?e+1:e;case"ArrowLeft":case"ArrowUp":return e>0?e-1:e;case"PageDown":return Math.min(e+Math.max(1,Math.floor(.1*n)),n-1);case"PageUp":return Math.max(e-Math.max(1,Math.floor(.1*n)),0);case"Home":return 0;case"End":return n-1;case"Escape":return-1;default:return null}}function bt(t){return{data:t.datum||{},x:t.x,y:t.y,__semioticHoverData:!0}}function vt(t){const{title:e,description:n,summary:r,accessibleTable:o,className:a,animate:s,axisExtent:l,autoPlaceAnnotations:c}=t,i={};return e&&(i.title=e),n&&(i.description=n),r&&(i.summary=r),void 0!==o&&(i.accessibleTable=o),a&&(i.className=a),null!=s&&(i.animate=s),void 0!==l&&(i.axisExtent=l),void 0!==c&&(i.autoPlaceAnnotations=c),i}function wt(t){const{linkedHover:e,selection:n,onObservation:r,onClick:o,hoverRadius:a,hoverHighlight:s,forceHoverBehavior:l,forceClickBehavior:c,mobileInteraction:i,customHoverBehavior:u,customClickBehavior:f,linkedHoverInClickPredicate:d=!0}=t,p={};r&&(p.annotationObservationCallback=r);const h=i?.enabled?Math.max(a??30,Math.ceil((i.targetSize||44)/2),24):a;return(l||e||r||o||s)&&(p.customHoverBehavior=u),f&&(c||(d?r||o||e:r||o)||i?.enabled&&(i.tapToSelect||i.tapToLockTooltip)&&(e||s||n))&&(p.customClickBehavior=f),null!=h&&(p.hoverRadius=h),p}function At(t){const{tooltip:e,defaultTooltipContent:r}=t;return{tooltipContent:!1===e?()=>null:n(e)||r}}function kt(t,e,n){if(1>=n)return 1;const o=n-1;return r({age:o-e,extent:o,type:t.type,halfLife:t.halfLife??n/2,threshold:t.stepThreshold??.5*n,minOpacity:t.minOpacity??.1})}function It(t){const e=new Map;for(let n=0;t.length>n;n++)e.set(t[n],n);return e}function _t(t,e,n,r=It(n)){const o=n.length;if(o>1)for(const n of e){if("line"===n.type){const e=Array.isArray(n.datum)?n.datum:[];if(2>e.length)continue;const a=Array(e.length);let s=!1;for(let n=0;e.length>n;n++){const l=r.get(e[n]);null!=l?(a[n]=kt(t,l,o),1>a[n]&&(s=!0)):a[n]=1}s&&(n._decayOpacities=a);continue}if("area"===n.type){const e=Array.isArray(n.datum)?n.datum:[],a=n.topPath?n.topPath.length:e.length;if(2>a)continue;if(e.length===a){const s=Array(a);let l=!1;for(let n=0;e.length>n;n++){const a=r.get(e[n]);null!=a?(s[n]=kt(t,a,o),1>s[n]&&(l=!0)):s[n]=1}l&&(n._decayOpacities=s)}else{let s=1;for(const n of e){const e=r.get(n);if(null!=e){const n=kt(t,e,o);s>n&&(s=n)}}if(1>s){const t=Array(a);t.fill(s),n._decayOpacities=t}}continue}const e=r.get(n.datum);if(null==e)continue;const a=kt(t,e,o);"heatcell"===n.type?n.style={opacity:a}:"candlestick"===n.type?n._decayOpacity=a:n.style={...n.style,opacity:(n.style?.opacity??1)*a}}}function Mt(t){if("production"===process.env.NODE_ENV)return;const{label:e,nodes:n,overlays:r,warned:o}=t;St(r)&&0===n.length&&Dt(o,"overlay-only",`[semiotic] ${e} returned overlays but no data-bearing scene nodes. Overlays do not participate in hover, selection, transitions, SSR evidence, or accessibility tables. Emit at least one scene node with a datum, or mark the overlay-only chart as intentionally decorative.`),n.length>0&&n.every(t=>null==t.datum)&&Dt(o,"null-datums",`[semiotic] ${e} returned scene nodes, but every scene-node datum is null. Hover, callbacks, selection, and tooltip helpers need data-bearing nodes. Attach a user-facing datum to each interactive node, or set interactive overlays outside the chart.`)}function St(t){return null!=t&&!1!==t&&""!==t&&(!Array.isArray(t)||t.some(St))}function Dt(t,e,n){t.has(e)||(t.add(e),console.warn(n))}function Ot(t,e,n,r){const o=function(t){if(t instanceof Error)return{name:t.name||"Error",message:t.message||"Custom layout threw."};if("string"==typeof t)return{name:"Error",message:t};if(null==t)return{name:"Error",message:"Custom layout threw a nullish value."};try{return{name:"Error",message:t+""}}catch{return{name:"Error",message:"Custom layout threw a non-stringifiable value."}}}(e),a="network"===t?"customNetworkLayout":"customLayout";return{code:"CUSTOM_LAYOUT_ERROR",severity:"error",phase:"layout",component:t,source:a,message:`Semiotic ${t} ${a} failed: ${o.message}`,error:o,recovery:n?"preserved-last-good-scene":"empty-scene",preservedLastGoodScene:n,affectedRevision:r}}var Et=new WeakMap;function Rt(){return this.updateResults.last}function Pt(){return this.updateResults.last}function jt(t){return this.updateResults.subscribe(t)}function Ct(t){this.config.layoutSelection=t}function Tt(){Et.set(this,!0)}function Lt(){const t=!0===Et.get(this);return Et.delete(this),t}function zt(t){Object.assign(t.prototype,{getLastUpdateResult:Rt,getUpdateSnapshot:Pt,subscribeUpdateResult:jt,setLayoutSelection:Ct,markStylePaintPending:Tt,consumeStylePaintPending:Lt})}function Ht(t,e,n){return n.x>t||t>n.x+n.w||n.y>e||e>n.y+n.h?{hit:!1,cx:0,cy:0}:{hit:!0,cx:n.x+n.w/2,cy:n.y+n.h/2}}function $t(t,e=30){return Math.max((t??4)+5,12,e)}function Gt(t){return t instanceof Date?t:"number"==typeof t&&t>1e9?new Date(t):null}function Nt(t,e){const n=Gt(t);if(!n)return!1;const r=Gt(e);return!r||n.getFullYear()!==r.getFullYear()||n.getMonth()!==r.getMonth()}function Ut(t){let e=t%(2*Math.PI);return 0>e&&(e+=2*Math.PI),e}function Wt(t,e,n,r,o,a=t=>t.x,s=t=>t.y,l=t=>t.r){const c=Math.max(r,o+5,12),i=e-c,u=e+c,f=n-c,d=n+c;let p=null,h=1/0;return t.visit((t,o,c,y,g)=>{if(o>u||i>y||c>d||f>g)return!0;if(!t.length){let o=t;do{const t=o.data,c=a(t)-e,i=s(t)-n,u=Math.sqrt(c*c+i*i);$t(l(t),r)>=u&&h>u&&(p=t,h=u),o=o.next}while(o)}return!1}),p?{node:p,distance:h}:null}function Bt(t){return!(!t._pulseIntensity||0>=t._pulseIntensity)}function Ft(t,e,n=.3){Bt(e)&&(t.globalAlpha=e._pulseIntensity*n,t.fillStyle=e._pulseColor||"rgba(255,255,255,0.6)",t.fillRect(e.x,e.y,e.w,e.h))}function Vt(t,e,n=.6){if(!Bt(e))return;const r=e.r+(e._pulseGlowRadius??4)*e._pulseIntensity,o=e.cx??e.x??0,a=e.cy??e.y??0;t.beginPath(),t.arc(o,a,r,0,2*Math.PI),t.strokeStyle=e._pulseColor||"rgba(255,255,255,0.6)",t.lineWidth=2*e._pulseIntensity,t.globalAlpha=e._pulseIntensity*n,t.stroke()}function Yt(t,e,n,r=.35){Bt(e)&&(t.globalAlpha=e._pulseIntensity*r,t.fillStyle=e._pulseColor||"rgba(255,255,255,0.6)",n?t.fill(n):t.fill())}export{kt as computeDecayOpacity,It as buildDatumIndexMap,_t as applyDecay,Mt as warnCustomLayoutDiagnostics,Ot as createCustomLayoutFailureDiagnostic,zt as attachUpdateResultStore,L as composeOverlays,$ as useConfigSync,G as useLayoutSelectionSync,Ht as hitTestRect,$t as getHitRadius,Nt as isTimeLandmark,Ut as normalizeAngle,Wt as findHitPointInQuadtree,W as resolveStaleness,V as useStalenessCheck,X as StalenessBadge,i as withProvenance,u as currentTimestamp,f as withCurrentProvenance,h as annotationFreshnessFor,y as computeAnnotationFreshness,b as applyAnnotationLifecycle,I as filterAnnotationsByStatus,_ as applyAnnotationStatus,q as useStableShallow,Ft as renderRectPulse,Vt as renderCirclePulse,Yt as renderPathPulse,et as glyphCanvasRenderer,nt as networkGlyphRenderer,st as paintSceneWithBackend,lt as renderSceneWithBackend,D as accessorName,O as formatVal,P as bandTooltipFields,j as buildDefaultTooltip,C as buildOrdinalTooltip,ct as buildNavGraph,it as resolvePosition,ut as nextGraphIndex,dt as extractXYNavPoints,pt as extractOrdinalNavPoints,ht as extractNetworkNavPoints,yt as nextNetworkIndex,mt as extractGeoNavPoints,xt as nextIndex,bt as navPointToHover,vt as buildBaseMetadataProps,wt as buildCustomBehaviorProps,At as buildTooltipProps};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{forceLayout as n}from"./chunk-chunk-
|
|
2
|
+
import{forceLayout as n}from"./chunk-chunk-T2FKJD4O.module.min.js";import{canUseForceWorker as t,runForceLayoutWorker as e,shouldUseForceWorker as o}from"./chunk-chunk-ARZGA4LJ.module.min.js";import{useWasHydratingFromSSR as r}from"./chunk-chunk-ACLDBMRH.module.min.js";import{useEffect as i,useMemo as s,useRef as u,useState as a}from"react";var d=new WeakMap;function l(n){const t=[];for(const e of Object.keys(n).sort()){const o=n[e];if(void 0!==o){if("function"==typeof o)return null;t.push(`${e}:${o+""}`)}}return t.join("|")}function c(n,t,e){return null==e?null:d.get(n)?.get(t)?.get(e)??null}function p(n,t,e,o){if(null==e)return;let r=d.get(n);r||(r=new WeakMap,d.set(n,r));let i=r.get(t);if(i||(i=new Map,r.set(t,i)),!i.has(e)&&i.size>=16){const n=i.keys().next().value;void 0!==n&&i.delete(n)}i.set(e,o)}function f(d,f,m={}){const h=r(),{seed:g,iterations:k,repulsion:y,linkDistance:w,linkStrength:R,centerStrength:b,damping:j,nodeRadius:v,nodePadding:A,inset:x,execution:D,workerThreshold:E}=m,M=s(()=>({seed:g,iterations:k,repulsion:y,linkDistance:w,linkStrength:R,centerStrength:b,damping:j,nodeRadius:v,nodePadding:A,inset:x,execution:D,workerThreshold:E}),[g,k,y,w,R,b,j,v,A,x,D,E]),O=u(h),[S,T]=a(()=>{if("undefined"==typeof window||h){const t=n(d,f,M);return p(d,f,l(M),t),{positions:t,status:"ready",error:null}}const t=c(d,f,l(M));return t?{positions:t,status:"ready",error:null}:{positions:null,status:"pending",error:null}});return i(()=>{if(O.current)return void(O.current=!1);const r=l(M),i=c(d,f,r);if(i)return void T(n=>"ready"===n.status&&n.positions===i?n:{positions:i,status:"ready",error:null});const s=new AbortController;return T(n=>({positions:n.positions,status:"pending",error:null})),async function(r,i,s={}){const{execution:u="auto",signal:a,workerThreshold:d,nodeRadius:l,...c}=s,p=c.iterations??260;if(!t()||!o(u,r.length,i.length,p,d))return n(r,i,{...c,nodeRadius:l});const f={kind:"normalized",nodes:r.map(n=>({...n})),edges:i.map(n=>({...n})),options:c,nodeRadii:"function"==typeof l?Object.fromEntries(r.map(n=>[n.id,l(n)])):null==l?void 0:Object.fromEntries(r.map(n=>[n.id,l]))};try{return(await e(f,a)).positions}catch(t){if("AbortError"===t?.name)throw t;return n(r,i,{...c,nodeRadius:l})}}(d,f,{...M,signal:s.signal}).then(n=>{p(d,f,r,n),T({positions:n,status:"ready",error:null})}).catch(n=>{"AbortError"!==n.name&&T(t=>({positions:t.positions,status:"error",error:n}))}),()=>s.abort()},[d,f,M]),S}export{f as useForceLayout};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{renderRectPulse as t}from"./chunk-chunk-WYARAXHR.module.min.js";import{buildLinearFillGradient as e,clampCornerRadii as n,filterSparseArray as s,hasAnyCornerRadius as o,resolveCSSColor as i,resolveCanvasFill as r,symbolPathString as l}from"./chunk-chunk-PX5YQGDP.module.min.js";var c=class{constructor(){this._min=1/0,this._max=-1/0,this._dirty=!1}push(t){Number.isFinite(t)&&(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}evict(t){t!==this._min&&t!==this._max||(this._dirty=!0)}recalculate(t,e){this._min=1/0,this._max=-1/0;for(const n of t){const t=e?e(n):n;Number.isFinite(t)&&(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}this._dirty=!1}clear(){this._min=1/0,this._max=-1/0,this._dirty=!1}get extent(){return[this._min,this._max]}get min(){return this._min}get max(){return this._max}get dirty(){return this._dirty}},a=class{constructor(t,e){this.lastBoundedData=null,this.chunkTimer=0,this.pushBuffer=[],this.flushScheduled=!1,this.callback=t,this.chunkThreshold=e?.chunkThreshold??5e3,this.chunkSize=e?.chunkSize??5e3}updateChunkOptions(t){null!=t.chunkThreshold&&(this.chunkThreshold=t.chunkThreshold),null!=t.chunkSize&&(this.chunkSize=t.chunkSize)}clearLastData(){this.lastBoundedData=null,this.pushBuffer=[],this.flushScheduled=!1,this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=0)}setBoundedData(t){if(t=s(t),this.lastBoundedData===t)return;if(this.lastBoundedData=t,this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=0),this.chunkThreshold>=t.length)return void this.callback({inserts:t,bounded:!0});this.callback({inserts:t.slice(0,this.chunkSize),bounded:!0,totalSize:t.length});let e=this.chunkSize;const n=()=>{if(e>=t.length)return void(this.chunkTimer=0);if(t!==this.lastBoundedData)return void(this.chunkTimer=0);const s=Math.min(e+this.chunkSize,t.length);this.callback({inserts:t.slice(e,s),bounded:!1}),e=s,this.chunkTimer=t.length>e?requestAnimationFrame(n):0};this.chunkTimer=requestAnimationFrame(n)}setReplacementData(t){if(t=s(t),this.lastBoundedData=t,this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=0),this.pushBuffer=[],this.flushScheduled=!1,this.chunkThreshold>=t.length)return void this.callback({inserts:t,bounded:!0,preserveCategoryOrder:!0});this.callback({inserts:t.slice(0,this.chunkSize),bounded:!0,preserveCategoryOrder:!0,totalSize:t.length});let e=this.chunkSize;const n=()=>{if(e>=t.length)return void(this.chunkTimer=0);if(t!==this.lastBoundedData)return void(this.chunkTimer=0);const s=Math.min(e+this.chunkSize,t.length);this.callback({inserts:t.slice(e,s),bounded:!1}),e=s,this.chunkTimer=t.length>e?requestAnimationFrame(n):0};this.chunkTimer=requestAnimationFrame(n)}flushPushBuffer(){if(this.flushScheduled=!1,0===this.pushBuffer.length)return;const t=this.pushBuffer;this.pushBuffer=[],this.callback({inserts:t,bounded:!1})}scheduleFlush(){this.flushScheduled||(this.flushScheduled=!0,queueMicrotask(()=>this.flushPushBuffer()))}push(t){null!=t&&"object"==typeof t&&(this.pushBuffer.push(t),this.scheduleFlush())}pushMany(t){if(0===t.length)return;let e=0;for(let n=0;t.length>n;n++){const s=t[n];null!=s&&"object"==typeof s&&(this.pushBuffer.push(s),e++)}0!==e&&this.scheduleFlush()}flush(){this.flushPushBuffer()}clear(){this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=0),this.lastBoundedData=null,this.pushBuffer=[],this.flushScheduled=!1}};function u(t,e){return t===e}function h(t,e){if("function"==typeof t)return e=>+t(e);const n=t||e;return t=>+t[n]}function f(t,e){if("function"==typeof t)return t;const n=t||e;return t=>t[n]}function y(t,e){return"function"==typeof t?t:t?e=>e[t]+"":e?t=>t[e]+"":void 0}var d={stops:[{offset:0,opacity:.8},{offset:1,opacity:.05}]};function p(t,e=d){if(t)return!0===t?e:"stops"in t?Array.isArray(t.stops)?t:void 0:"colorStops"in t?Array.isArray(t.colorStops)?{stops:t.colorStops.map(({offset:t,color:e})=>({offset:t,color:e}))}:void 0:{stops:[{offset:0,opacity:t.topOpacity??e.stops[0]?.opacity??.8},{offset:1,opacity:t.bottomOpacity??e.stops.at(-1)?.opacity??.05}]}}function m(t){return t?p(t):void 0}function k(t){if(t)return Array.isArray(t)?{stops:t.map(({at:t,color:e,opacity:n})=>({offset:t/100,color:e,...null!=n&&{opacity:n}}))}:Array.isArray(t.stops)?t:void 0}function g(t){return{stops:t.stops.map(t=>({...t,offset:1-t.offset})).sort((t,e)=>t.offset-e.offset)}}function T(t,e,n,s){return"function"==typeof t?t({size:e,margin:n,scales:s}):t}function x(t,e,n,s){return"string"==typeof t?{key:t,fn:null}:"function"==typeof t?{key:n,fn:t}:"string"==typeof e?{key:e,fn:null}:"function"==typeof e?{key:s,fn:e}:{key:void 0,fn:null}}function b(t,e,n){return s=>{if(!s||!n||!t.fn&&!e.fn)return s;let o=!1;const i=s.map(n=>{const s=t.fn&&t.key&&!(t.key in n),i=e.fn&&e.key&&!(e.key in n);if(!s&&!i)return n;o=!0;const r={...n};return s&&(r[t.key]=t.fn(n)),i&&(r[e.key]=e.fn(n)),r});return o?i:s}}function w(t){return new Set(Array.isArray(t)?t:[t])}function v(t,e,n){return"exact"===n?function(t,e){const n=t.domain(),s=n[0],o=n[n.length-1],i=s instanceof Date,r=s instanceof Date?s.getTime():s,l=o instanceof Date?o.getTime():o;if(2>e||r===l)return i?[new Date(r),new Date(l)]:[r,l];const c=(l-r)/(e-1),a=Array(e);for(let t=0;e>t;t++){const n=t===e-1?l:r+t*c;a[t]=i?new Date(n):n}return a}(t,e):t.ticks(e)}var A=new Map;function S(t){try{if(t.path)return new Path2D(t.path);const e=`${t.symbolType??"circle"}:${Math.round(t.size)}`;let n=A.get(e);return n||(n=new Path2D(l(t.symbolType,t.size)),A.size>256&&A.clear(),A.set(e,n)),n}catch{return null}}var F=(t,e)=>{const n=t.globalAlpha;for(const s of e){if("symbol"!==s.type)continue;const e=s;if(0>=e.size)continue;const o=S(e);if(!o)continue;t.save(),t.translate(e.x,e.y),e.rotation&&t.rotate(e.rotation);const i=(e.style.opacity??1)*(e._decayOpacity??1);e.style.fill&&(t.globalAlpha=n*i*(e.style.fillOpacity??1),t.fillStyle=r(t,e.style.fill,"#4e79a7"),t.fill(o)),e.style.stroke&&"none"!==e.style.stroke&&(t.globalAlpha=n*i,t.strokeStyle=r(t,e.style.stroke,e.style.stroke),t.lineWidth=e.style.strokeWidth??1,t.stroke(o)),t.restore()}t.globalAlpha=n};function _(t,e){const{x:s,y:o,w:i,h:r}=e,{tl:l,tr:c,br:a,bl:u}=n(e);t.beginPath(),t.moveTo(s+l,o),t.lineTo(s+i-c,o),c>0&&t.arcTo(s+i,o,s+i,o+c,c),t.lineTo(s+i,o+r-a),a>0&&t.arcTo(s+i,o+r,s+i-a,o+r,a),t.lineTo(s+u,o+r),u>0&&t.arcTo(s,o+r,s,o+r-u,u),t.lineTo(s,o+l),l>0&&t.arcTo(s,o,s+l,o,l),t.closePath()}function B(t){switch(t.roundedEdge){case"bottom":return{x0:t.x,y0:t.y+t.h,x1:t.x,y1:t.y};case"right":return{x0:t.x+t.w,y0:t.y,x1:t.x,y1:t.y};case"left":return{x0:t.x,y0:t.y,x1:t.x+t.w,y1:t.y};default:return{x0:t.x,y0:t.y,x1:t.x,y1:t.y+t.h}}}var z=(n,s,l,c)=>{const a=s.filter(t=>"rect"===t.type);for(const s of a){if(null!=s.style.opacity&&(n.globalAlpha=s.style.opacity),s.style.icon)D(n,s);else if(s.cornerRadii&&o(s.cornerRadii)){const t=r(n,s.style.fill,i(n,"var(--semiotic-primary, #007bff)")),o=B(s),l=s.fillGradient&&"string"==typeof t?e(n,s.fillGradient,t,o.x0,o.y0,o.x1,o.y1):null;n.fillStyle=l||t,_(n,s),n.fill(),s.style.stroke&&"none"!==s.style.stroke&&(n.strokeStyle=i(n,s.style.stroke)||s.style.stroke,n.lineWidth=s.style.strokeWidth||1,n.stroke())}else if(s.roundedTop&&s.roundedTop>0){const t=r(n,s.style.fill,i(n,"var(--semiotic-primary, #007bff)")),o=B(s),l=s.fillGradient&&"string"==typeof t?e(n,s.fillGradient,t,o.x0,o.y0,o.x1,o.y1):null;n.fillStyle=l||t;const c=Math.min(s.roundedTop,s.w/2,s.h/2);n.beginPath();const{x:a,y:u,w:h,h:f}=s;switch(s.roundedEdge){case"right":n.moveTo(a,u),n.lineTo(a+h-c,u),n.arcTo(a+h,u,a+h,u+c,c),n.lineTo(a+h,u+f-c),n.arcTo(a+h,u+f,a+h-c,u+f,c),n.lineTo(a,u+f);break;case"left":n.moveTo(a+h,u),n.lineTo(a+c,u),n.arcTo(a,u,a,u+c,c),n.lineTo(a,u+f-c),n.arcTo(a,u+f,a+c,u+f,c),n.lineTo(a+h,u+f);break;case"bottom":n.moveTo(a,u),n.lineTo(a+h,u),n.lineTo(a+h,u+f-c),n.arcTo(a+h,u+f,a+h-c,u+f,c),n.lineTo(a+c,u+f),n.arcTo(a,u+f,a,u+f-c,c);break;default:n.moveTo(a,u+f),n.lineTo(a,u+c),n.arcTo(a,u,a+c,u,c),n.lineTo(a+h-c,u),n.arcTo(a+h,u,a+h,u+c,c),n.lineTo(a+h,u+f)}n.closePath(),n.fill(),s.style.stroke&&"none"!==s.style.stroke&&(n.strokeStyle=i(n,s.style.stroke)||s.style.stroke,n.lineWidth=s.style.strokeWidth||1,n.stroke())}else{const t=r(n,s.style.fill,i(n,"var(--semiotic-primary, #007bff)")),o=B(s),l=s.fillGradient&&"string"==typeof t?e(n,s.fillGradient,t,o.x0,o.y0,o.x1,o.y1):null;n.fillStyle=l||t,n.fillRect(s.x,s.y,s.w,s.h),s.style.stroke&&"none"!==s.style.stroke&&(n.strokeStyle=i(n,s.style.stroke)||s.style.stroke,n.lineWidth=s.style.strokeWidth||1,n.strokeRect(s.x,s.y,s.w,s.h))}t(n,s),n.globalAlpha=1}};function D(t,e){const n=e.style.icon,s=e.style.iconPadding||2,o=Math.min(e.w,e.h)-s;if(0>=o)return;const i=e.h>e.w;if(t.save(),t.beginPath(),t.rect(e.x,e.y,e.w,e.h),t.clip(),i){const i=o+s,r=e.x+(e.w-o)/2;for(let s=e.y+e.h-o;s>=e.y-o;s-=i)t.drawImage(n,r,s,o,o)}else{const i=o+s,r=e.y+(e.h-o)/2;for(let s=e.x;e.x+e.w>s;s+=i)t.drawImage(n,s,r,o,o)}t.restore()}function M(t,e,n,s,o,i){const r=[];for(const o of t){const t=n(o),i=s(o);Number.isFinite(t)&&Number.isFinite(i)&&r.push({px:e.x(t),py:e.y(i),rawY:i,d:o})}r.sort((t,e)=>t.px-e.px);const l=Array(r.length),c=Array(r.length),a=Array(r.length);for(let t=0;r.length>t;t++){const e=r[t];l[t]=[e.px,e.py],c[t]=e.rawY,a[t]=e.d}return{type:"line",path:l,rawValues:c,style:o,datum:a,group:i}}function P(t,e,n,s,o,i,r,l){const c=[];for(const i of t){const t=n(i),r=s(i);if(!Number.isFinite(t)||!Number.isFinite(r))continue;const a=e.x(t),u=l?l(i):o;c.push({px:a,topY:e.y(r),botY:e.y(u),rawY:r})}c.sort((t,e)=>t.px-e.px);const a=Array(c.length),u=Array(c.length),h=Array(c.length);for(let t=0;c.length>t;t++){const e=c[t];a[t]=[e.px,e.topY],u[t]=[e.px,e.botY],h[t]=e.rawY}return{type:"area",topPath:a,bottomPath:u,rawValues:h,style:i,datum:t,group:r}}function N(t,e,n,s){const o=new Map;if("silhouette"===s)for(const s of t){let t=0;for(const o of e)t+=n(o,s)||0;o.set(s,-t/2)}else if("wiggle"===s){t.length>0&&o.set(t[0],0);for(let s=1;t.length>s;s++){const i=t[s-1],r=t[s];let l=0,c=0,a=0;for(const t of e){const e=n(t,r)||0;l+=(2*a+e)*(e-(n(t,i)||0)),c+=e,a+=e}const u=o.get(i)??0;o.set(r,u-(c>0?l/(2*c):0))}if(t.length>0){let s=0;for(const i of t){let t=0;for(const s of e)t+=n(s,i)||0;s+=(o.get(i)??0)+t/2}const i=s/t.length;for(const e of t)o.set(e,(o.get(e)??0)-i)}}else for(const e of t)o.set(e,0);return o}function Y(t,e,n){let s=0,o=0;for(const i of t){let t=0,r=0;for(const s of e){const e=n(s,i)||0;0>e?r+=e:t+=e}s>r&&(s=r),t>o&&(o=t)}return[s,o]}function W(t,e,n,s,o,i,r,l="zero"){const c=new Set;for(const e of t)for(const t of e.data){const e=n(t);Number.isFinite(e)&&c.add(e)}const a=Array.from(c).sort((t,e)=>t-e),u=new Map;for(const e of t){const t=new Map;for(const o of e.data){const e=n(o),i=s(o);Number.isFinite(e)&&Number.isFinite(i)&&t.set(e,(t.get(e)||0)+i)}u.set(e.key,t)}let h;if(i){h=new Map;for(const e of a){let n=0;for(const s of t)n+=u.get(s.key)?.get(e)||0;h.set(e,n||1)}}const f=N(a,t.map(t=>t.key),(t,e)=>u.get(t)?.get(e)||0,l),y="diverging"===l&&!i,d=[],p=new Map,m=new Map,k=new Map,g=new Map;for(const t of a)m.set(t,f.get(t)??0),k.set(t,0),g.set(t,0);for(const n of t){const t=u.get(n.key),s=new Map;let l=[],c=[];const f=()=>{if(l.length>=2){const t={type:"area",topPath:l,bottomPath:c,style:o(n.key,n.data[0]),datum:n.data,group:n.key};r&&(t.curve=r),d.push(t)}l=[],c=[]};for(const n of a){const o=t.has(n);let r,a,u=o?t.get(n):0;if(i&&o&&(u/=h.get(n)),!o||!Number.isFinite(u)||0===u){f();continue}y?u>0?(r=k.get(n),a=r+u,k.set(n,a)):(r=g.get(n),a=r+u,g.set(n,a)):(r=m.get(n),a=r+u,m.set(n,a));const d=e.x(n);c.push([d,e.y(r)]),l.push([d,e.y(a)]),s.set(n,a)}f(),p.set(n.key,s)}return{nodes:d,stackedTops:p}}function G(t,e,n,s,o,i,r){const l=n(t),c=s(t);if(!Number.isFinite(l)||!Number.isFinite(c))return null;const a={type:"point",x:e.x(l),y:e.y(c),r:o,style:i,datum:t};return void 0!==r&&(a.pointId=r),a}function O(t,e,n,s,o,i,r,l){const c=n(t),a=s(t);if(!Number.isFinite(c)||!Number.isFinite(a))return null;const u={type:"symbol",x:e.x(c),y:e.y(a),size:o,symbolType:i,style:r,datum:t};return void 0!==l&&(u.pointId=l),u}function R(t,e,n,s,o,i,r){return{type:"rect",x:t,y:e,w:n,h:s,style:o,datum:i,group:r}}function q(t,e,n,s,o,i,r){const l={type:"heatcell",x:t,y:e,w:n,h:s,fill:o,datum:i};return r?.showValues&&(l.showValues=!0,l.value=r.value,r.valueFormat&&(l.valueFormat=r.valueFormat)),l}export{a as DataSourceAdapter,c as IncrementalExtent,u as accessorsEquivalent,h as resolveAccessor,f as resolveRawAccessor,y as resolveStringAccessor,w as toIdSet,M as buildLineNode,P as buildAreaNode,N as computeStackOffsets,Y as computeDivergingStackExtent,W as buildStackedAreaNodes,G as buildPointNode,O as buildSymbolNode,R as buildRectNode,q as buildHeatcellNode,p as normalizeGradient,m as normalizeColorGradient,k as normalizeSemanticGradient,g as reverseGradient,v as ticksForMode,T as resolveFrameGraphics,x as resolveAnnotationAccessor,b as buildEnrichAnnotationData,F as symbolCanvasRenderer,z as barCanvasRenderer};
|