@svgrid/grid-wc 3.0.49 → 3.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GridFind-B5zpfGlk.js +39 -0
- package/dist/GridFooter-CSzuZWPH.js +142 -0
- package/dist/GridMenus-DGR1VkZL.js +1480 -0
- package/dist/PinSplitter-BbQwf4Eh.js +178 -0
- package/dist/{SvChartMenu-CztABicV.js → SvChartMenu-CFvrEIJf.js} +132 -132
- package/dist/{SvDateRangeInput-ByR-LFgf.js → SvDateRangeInput-B8uPcD0z.js} +107 -107
- package/dist/{SvDateTimePicker-8nq26l0z.js → SvDateTimePicker-D9MnooXn.js} +316 -316
- package/dist/{SvField-CtzxdF7J.js → SvField--1Px2j7E.js} +105 -105
- package/dist/SvGridCellEditor-BzLvoGRp.js +594 -0
- package/dist/SvGridChart-rvB4vvCB.js +3684 -0
- package/dist/{SvGridChartBuilder-BMPDRY0A.js → SvGridChartBuilder-C0HbpZhw.js} +385 -385
- package/dist/SvGridChartPanel-CftDsgLi.js +1689 -0
- package/dist/{SvGridChartView-D0Mk0N4Q.js → SvGridChartView-BMJf1fCo.js} +12 -12
- package/dist/SvGridDropdown-CZRv-0Cw.js +258 -0
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +4 -2
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
- package/dist/angular/types/svgrid-grid-wc-angular.d.ts +2 -1
- package/dist/{chart-export-pdf-COD2Ugv7.js → chart-export-pdf-CFq7Y-pq.js} +1 -1
- package/dist/{shadow/client-OtsRxGjS.js → client-DeNKZvIV.js} +593 -581
- package/dist/{date-format-DngG1HJ5.js → date-format-B1XMOxlA.js} +309 -309
- package/dist/{grid-extension.svelte-DToFhcZv.js → grid-extension.svelte-B_gzYJQQ.js} +8 -8
- package/dist/{range-commit-C6Rogxem.js → range-commit-BriJZw_M.js} +1 -1
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.js +1 -1
- package/dist/{shadow/row-drag-DLQMyiV3.js → row-drag-DevACK09.js} +1 -1
- package/dist/shadow/GridFind-CVqPCjPK.js +39 -0
- package/dist/shadow/GridFooter-DY9numnH.js +142 -0
- package/dist/shadow/GridMenus-Bl11jIy6.js +1480 -0
- package/dist/shadow/PinSplitter-DNjnUtbi.js +178 -0
- package/dist/shadow/{SvChartMenu-CFlDiKdq.js → SvChartMenu-Ca2hVFUA.js} +132 -132
- package/dist/shadow/{SvDateRangeInput-9Wq4E64y.js → SvDateRangeInput-CNXId95j.js} +107 -107
- package/dist/shadow/{SvDateTimePicker-J65ZmtSw.js → SvDateTimePicker-B6lwKYFq.js} +316 -316
- package/dist/shadow/{SvField-DGPj2clt.js → SvField-1OiD5dJA.js} +105 -105
- package/dist/shadow/SvGridCellEditor-CRImfWTE.js +594 -0
- package/dist/shadow/SvGridChart-_GY1Mgr4.js +3684 -0
- package/dist/shadow/{SvGridChartBuilder-BY64S-Zw.js → SvGridChartBuilder-Ci_GlCg3.js} +385 -385
- package/dist/shadow/SvGridChartPanel-BHczMJAe.js +1689 -0
- package/dist/shadow/{SvGridChartView-DwchQygE.js → SvGridChartView-BJEpaO8h.js} +12 -12
- package/dist/shadow/SvGridDropdown-giyKVcC0.js +258 -0
- package/dist/shadow/{chart-export-pdf-D9OfzqwS.js → chart-export-pdf-Ne0ET-JM.js} +1 -1
- package/dist/{client-OtsRxGjS.js → shadow/client-DeNKZvIV.js} +593 -581
- package/dist/shadow/{date-format-C9UkbCig.js → date-format-VCW-gATr.js} +309 -309
- package/dist/shadow/{grid-extension.svelte-DToFhcZv.js → grid-extension.svelte-B_gzYJQQ.js} +8 -8
- package/dist/shadow/{range-commit-C6Rogxem.js → range-commit-BriJZw_M.js} +1 -1
- package/dist/{row-drag-DLQMyiV3.js → shadow/row-drag-DevACK09.js} +1 -1
- package/dist/shadow/sv-grid-scrollbar-yHMClECS.js +228 -0
- package/dist/shadow/sv-grid-shadow-element.d.ts +2 -0
- package/dist/shadow/sv-grid-shadow-element.js +5686 -5829
- package/dist/{svelte-virtualizer.svelte-DWvD9wvL.js → shadow/svelte-virtualizer.svelte-D8oCAQUc.js} +4 -4
- package/dist/sv-grid-element.d.ts +2 -0
- package/dist/sv-grid-element.js +5668 -5811
- package/dist/sv-grid-scrollbar-yHMClECS.js +228 -0
- package/dist/{shadow/svelte-virtualizer.svelte-DWvD9wvL.js → svelte-virtualizer.svelte-D8oCAQUc.js} +4 -4
- package/dist/vue/index.d.ts +2 -1
- package/dist/vue/index.js +1 -1
- package/package.json +3 -3
- package/dist/GridFind-C1YbloFh.js +0 -39
- package/dist/GridFooter-DOR8m9GQ.js +0 -142
- package/dist/GridMenus-ac4ROLfR.js +0 -1461
- package/dist/PinSplitter-Du4ZF8T3.js +0 -178
- package/dist/SvGridCellEditor-3jq3ec38.js +0 -594
- package/dist/SvGridChart-CHMHUQto.js +0 -3684
- package/dist/SvGridChartPanel-Bk_xFAwN.js +0 -1689
- package/dist/SvGridDropdown-CnCQuXaI.js +0 -258
- package/dist/shadow/GridFind-CcoKoisE.js +0 -39
- package/dist/shadow/GridFooter-CDq71ytl.js +0 -142
- package/dist/shadow/GridMenus-hIMzQt3E.js +0 -1461
- package/dist/shadow/PinSplitter-BAYTAZtm.js +0 -178
- package/dist/shadow/SvGridCellEditor-DA5l3ENL.js +0 -594
- package/dist/shadow/SvGridChart-DgCuTYRq.js +0 -3684
- package/dist/shadow/SvGridChartPanel-CuRtOxSk.js +0 -1689
- package/dist/shadow/SvGridDropdown-B_5kqHQE.js +0 -258
|
@@ -0,0 +1,3684 @@
|
|
|
1
|
+
(function(){try{var c=".sv-grid-chart.svelte-kvdein{background:var(--sg-chart-bg,transparent);flex-direction:column;gap:8px;width:100%;display:flex;position:relative}.sv-grid-chart.is-legend-top.svelte-kvdein .sv-grid-chart-toolbar:where(.svelte-kvdein){order:-2}.sv-grid-chart.is-legend-top.svelte-kvdein .sv-grid-chart-legend:where(.svelte-kvdein){order:-1}.sv-grid-chart.is-legend-left.svelte-kvdein,.sv-grid-chart.is-legend-right.svelte-kvdein{grid-template-rows:auto 1fr auto;align-items:start;display:grid}.sv-grid-chart.is-legend-left.svelte-kvdein{grid-template-columns:auto minmax(0,1fr);grid-template-areas:\"tb tb\"\"lg svg\"\"lg br\"}.sv-grid-chart.is-legend-right.svelte-kvdein{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:\"tb tb\"\"svg lg\"\"br lg\"}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-toolbar:where(.svelte-kvdein),.sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-toolbar:where(.svelte-kvdein){grid-area:tb}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-svg:where(.svelte-kvdein),.sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-svg:where(.svelte-kvdein){grid-area:svg}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-brush-host:where(.svelte-kvdein),.sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-brush-host:where(.svelte-kvdein){grid-area:br}.sv-grid-chart-brush-host.svelte-kvdein{min-width:0;display:block}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-legend:where(.svelte-kvdein),.sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-legend:where(.svelte-kvdein){grid-area:lg}.sv-grid-chart-legend.is-vertical.svelte-kvdein{flex-direction:column;align-items:flex-start;gap:4px;max-width:180px;padding-top:6px}.sv-grid-chart.is-autosize.svelte-kvdein{min-height:0}.sv-grid-chart.is-autosize.svelte-kvdein .sv-grid-chart-svg:where(.svelte-kvdein){flex:none;min-height:0}.sv-grid-chart-svg.svelte-kvdein{width:100%;height:auto;display:block}.sv-grid-chart-title.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-size:calc(14px * var(--sg-chart-font-scale,1));font-family:inherit;font-weight:600}.sv-grid-chart-subtitle.svelte-kvdein{fill:var(--sg-muted,#64748b);font-size:calc(11.5px * var(--sg-chart-font-scale,1));font-family:inherit}.sv-grid-chart-caption.svelte-kvdein{fill:var(--sg-muted,#64748b);font-size:calc(10px * var(--sg-chart-font-scale,1));font-family:inherit}.sv-grid-chart-refband.svelte-kvdein{pointer-events:none}.sv-grid-chart-wipe.svelte-kvdein{animation:.7s cubic-bezier(.2,.7,.2,1) both svelte-kvdein-sv-grid-chart-wipe}@keyframes svelte-kvdein-sv-grid-chart-wipe{0%{width:0}}.sv-grid-chart-marks.is-enter-grow.svelte-kvdein .sv-grid-chart-bar:where(.svelte-kvdein){transform-box:fill-box;transform-origin:50% 100%;animation:.5s cubic-bezier(.2,.7,.2,1) both svelte-kvdein-sv-grid-chart-grow}@keyframes svelte-kvdein-sv-grid-chart-grow{0%{transform:scaleY(.02)}}.sv-grid-chart-marks.is-enter-none.svelte-kvdein :where(.svelte-kvdein),.sv-grid-chart-marks.is-enter-none.svelte-kvdein{animation:none!important}.sv-grid-chart-svg.is-pannable.svelte-kvdein{cursor:grab}.sv-grid-chart-svg.is-pannable.svelte-kvdein:active{cursor:grabbing}.sv-grid-chart-presets.svelte-kvdein{gap:2px;margin-right:6px;display:inline-flex}.sv-grid-chart-crumbs.svelte-kvdein{font-size:calc(11.5px * var(--sg-chart-font-scale,1));align-items:center;gap:2px;margin-right:8px;display:inline-flex}.sv-grid-chart-crumb.is-current.svelte-kvdein{color:var(--sg-fg,#0f172a);padding:0 4px;font-weight:600}.sv-grid-chart-crumb-sep.svelte-kvdein{color:var(--sg-muted,#64748b)}.sv-grid-chart-arc.is-drillable.svelte-kvdein,.sv-grid-chart-slice.is-drillable.svelte-kvdein{cursor:zoom-in}.sv-grid-chart-bar.is-selected.svelte-kvdein,.sv-grid-chart-slice.is-selected.svelte-kvdein,.sv-grid-chart-arc.is-selected.svelte-kvdein{stroke:var(--sg-fg,#0f172a);stroke-width:2px}.sv-grid-chart-dot.is-selected.svelte-kvdein{stroke:var(--sg-fg,#0f172a);stroke-width:2px;r:5}.sv-grid-chart-scatter.is-selected.svelte-kvdein{stroke:var(--sg-fg,#0f172a);stroke-width:2px;fill-opacity:1}.sv-grid-chart-preset.svelte-kvdein{padding-inline:6px}.sv-grid-chart-arc-track.svelte-kvdein{fill:var(--sg-border,#e2e8f0);opacity:.45;pointer-events:none}.sv-grid-chart-arc.svelte-kvdein{transition:opacity .1s;animation:.3s both svelte-kvdein-sv-grid-chart-in}.sv-grid-chart-ribbon.svelte-kvdein{transition:opacity .1s}.sv-grid-chart-stem.svelte-kvdein line:where(.svelte-kvdein){stroke-linecap:round}.sv-grid-chart-dot.is-stroked.svelte-kvdein{fill:none}.sv-grid-chart-tooltip.is-custom.svelte-kvdein{color:inherit;box-shadow:none;background:0 0;border:0;padding:0}.sv-grid-chart-gridline.svelte-kvdein{stroke:var(--sg-border,#e2e8f0);stroke-width:1px;opacity:.6}.sv-grid-chart-gridline.is-zero.svelte-kvdein{stroke:var(--sg-muted,#94a3b8);opacity:.9}.sv-grid-chart-axis.svelte-kvdein{fill:var(--sg-muted,#64748b);font-size:calc(10px * var(--sg-chart-font-scale,1));font-family:inherit}.sv-grid-chart-axis-title.svelte-kvdein{fill:var(--sg-muted,#64748b);font-size:calc(11px * var(--sg-chart-font-scale,1));font-family:inherit;font-weight:600}.sv-grid-chart-group-label.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-weight:600}.sv-grid-chart-crosshair.svelte-kvdein{stroke:var(--sg-accent,#2563eb);stroke-width:1px;stroke-dasharray:3 3;opacity:.65;pointer-events:none}.sv-grid-chart-callout.svelte-kvdein{opacity:.8;pointer-events:none}.sv-grid-chart-callout-label.svelte-kvdein{font-size:calc(10.5px * var(--sg-chart-font-scale,1));fill:var(--sg-fg,#0f172a);pointer-events:none;font-family:inherit}.sv-grid-chart-crosshair-label.svelte-kvdein rect:where(.svelte-kvdein){fill:var(--sg-fg,#0f172a);opacity:.85}.sv-grid-chart-crosshair-label.svelte-kvdein text:where(.svelte-kvdein){fill:var(--sg-bg,#fff);font-size:calc(9.5px * var(--sg-chart-font-scale,1));font-family:inherit;font-weight:600}.sv-grid-chart-refline.svelte-kvdein{stroke-width:1.5px;opacity:.9;pointer-events:none}.sv-grid-chart-reflabel.svelte-kvdein{font-size:calc(9.5px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:700}.sv-grid-chart-overlay.svelte-kvdein{opacity:.85;pointer-events:none}.sv-grid-chart-annotation-marker.svelte-kvdein{pointer-events:none}.sv-grid-chart-annotation-marker.has-text.svelte-kvdein{pointer-events:auto;cursor:help}.sv-grid-chart-annotation-marker.svelte-kvdein:focus-visible{outline:2px solid var(--sg-accent,#2563eb);outline-offset:2px}.sv-grid-chart-annotation-label.svelte-kvdein{font-size:calc(10px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:700}.sv-grid-chart-serieslabel.svelte-kvdein{font-size:calc(10.5px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:600}.sv-grid-chart-annotation-flagtext.svelte-kvdein{font-size:calc(9px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:700}.sv-grid-chart-refpill.svelte-kvdein text:where(.svelte-kvdein){font-size:calc(9.5px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:700}.sv-grid-chart-drawing-hit.svelte-kvdein{stroke:#0000;stroke-width:10px;fill:#0000;pointer-events:stroke}.sv-grid-chart-drawing.is-fib.svelte-kvdein .sv-grid-chart-drawing-hit:where(.svelte-kvdein),.sv-grid-chart-drawing.is-rect.svelte-kvdein rect:where(.svelte-kvdein),.sv-grid-chart-drawing.is-text.svelte-kvdein text:where(.svelte-kvdein){pointer-events:all}.sv-grid-chart-drawing[role=button].svelte-kvdein{cursor:pointer}.sv-grid-chart-drawing.svelte-kvdein:focus-visible{outline:none}.sv-grid-chart-drawing.is-selected.svelte-kvdein line:where(.svelte-kvdein),.sv-grid-chart-drawing.is-selected.svelte-kvdein rect:where(.svelte-kvdein),.sv-grid-chart-drawing.svelte-kvdein:focus-visible line:where(.svelte-kvdein),.sv-grid-chart-drawing.svelte-kvdein:focus-visible rect:where(.svelte-kvdein){filter:drop-shadow(0 0 2px var(--sg-accent,#2563eb))}.sv-grid-chart-drawing-label.svelte-kvdein{font-size:calc(9px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:600}.sv-grid-chart-drawing-text.svelte-kvdein{font-size:calc(11px * var(--sg-chart-font-scale,1));font-family:inherit;font-weight:600}.sv-grid-chart-drawing-handle.svelte-kvdein{cursor:move}.sv-grid-chart-textdraft.svelte-kvdein{z-index:11;width:160px;font:inherit;font-size:calc(12px * var(--sg-chart-font-scale,1));border:1px solid var(--sg-accent,#2563eb);background:var(--sg-bg,#fff);color:var(--sg-fg,#0f172a);border-radius:4px;padding:3px 6px;position:absolute;transform:translateY(-50%);box-shadow:0 4px 12px #00000026}.sv-grid-chart-svg.is-drawing.svelte-kvdein{cursor:crosshair}.sv-grid-chart-drawtools.svelte-kvdein{border-right:1px solid var(--sg-border,#e2e8f0);gap:2px;margin-right:2px;padding-right:6px;display:inline-flex}.sv-grid-chart-heatcell.svelte-kvdein{stroke:var(--sg-border,#cbd5e1);stroke-width:1px;cursor:default;transition:opacity .1s}.sv-grid-chart-svg.is-clickable.svelte-kvdein .sv-grid-chart-heatcell:where(.svelte-kvdein){cursor:pointer}.sv-grid-chart-heatcell.svelte-kvdein:hover{opacity:.85}.sv-grid-chart-heatlabel.svelte-kvdein{font-size:calc(10px * var(--sg-chart-font-scale,1));pointer-events:none;-webkit-user-select:none;user-select:none;font-family:inherit;font-weight:600}.sv-grid-chart-heatlegend.svelte-kvdein{stroke:var(--sg-border,#cbd5e1);stroke-width:1px}.sv-grid-chart-funnel-seg.svelte-kvdein{stroke:var(--sg-bg,#fff);stroke-width:2px;cursor:default;transition:opacity .1s}.sv-grid-chart-svg.is-clickable.svelte-kvdein .sv-grid-chart-funnel-seg:where(.svelte-kvdein){cursor:pointer}.sv-grid-chart-funnel-seg.svelte-kvdein:hover{opacity:.88}.sv-grid-chart-funnel-label.svelte-kvdein{font-size:calc(11px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:700}.sv-grid-chart-funnel-value.svelte-kvdein{font-size:calc(10px * var(--sg-chart-font-scale,1));opacity:.85;pointer-events:none;font-family:inherit}.sv-grid-chart-radar-ring.svelte-kvdein{fill:none;stroke:var(--sg-border,#e2e8f0);stroke-width:1px;opacity:.6}.sv-grid-chart-radar-spoke.svelte-kvdein{stroke:var(--sg-border,#e2e8f0);stroke-width:1px;opacity:.6}.sv-grid-chart-radar-poly.svelte-kvdein{pointer-events:none;transition:opacity .1s}.sv-grid-chart-radar-dot.svelte-kvdein{cursor:default;transition:r .1s}.sv-grid-chart-radar-dot.svelte-kvdein:hover{r:4.5}.sv-grid-chart-calendar-cell.svelte-kvdein{stroke:var(--sg-border,#e2e8f0);stroke-width:.5px;cursor:default;transition:opacity .1s}.sv-grid-chart-calendar-cell.is-blank.svelte-kvdein{stroke-opacity:.5}.sv-grid-chart-calendar-cell.svelte-kvdein:hover{opacity:.85}.sv-grid-chart-calendar-legend.svelte-kvdein{stroke:var(--sg-border,#cbd5e1);stroke-width:.5px}.sv-grid-chart-gauge-value.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-size:calc(22px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:800}.sv-grid-chart-gauge-tick.svelte-kvdein{stroke:var(--sg-muted,#94a3b8);stroke-width:1px;opacity:.4}.sv-grid-chart-gauge-tick.is-major.svelte-kvdein{stroke-width:2px;opacity:.7}.sv-grid-chart-gauge-needle.svelte-kvdein{fill:var(--sg-fg,#0f172a);stroke:var(--sg-bg,#fff);stroke-width:.75px;stroke-linejoin:round}.sv-grid-chart-gauge-hub.svelte-kvdein{fill:var(--sg-fg,#0f172a);stroke:var(--sg-bg,#fff);stroke-width:2px}.sv-grid-chart-gauge-hub-dot.svelte-kvdein{fill:var(--sg-bg,#fff)}.sv-grid-chart-treemap-cell.svelte-kvdein{stroke:var(--sg-bg,#fff);stroke-width:1px;cursor:default;transition:opacity .1s}.sv-grid-chart-svg.is-clickable.svelte-kvdein .sv-grid-chart-treemap-cell:where(.svelte-kvdein){cursor:pointer}.sv-grid-chart-treemap-cell.svelte-kvdein:hover{opacity:.88}.sv-grid-chart-treemap-label.svelte-kvdein{font-size:calc(11px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:600}.sv-grid-chart-treemap-value.svelte-kvdein{font-size:calc(10px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit}.sv-grid-chart-sankey-node.svelte-kvdein{cursor:default;transition:opacity .1s}.sv-grid-chart-sankey-node.svelte-kvdein:hover{opacity:.88}.sv-grid-chart-sankey-link.svelte-kvdein{cursor:default;transition:stroke-opacity .1s}.sv-grid-chart-sankey-link.svelte-kvdein:hover{stroke-opacity:.6}.sv-grid-chart-sankey-label.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-size:calc(11px * var(--sg-chart-font-scale,1));pointer-events:none;font-family:inherit;font-weight:600}.sv-grid-chart-brush.svelte-kvdein{border-top:1px solid var(--sg-border,#e2e8f0);-webkit-user-select:none;user-select:none;touch-action:none;width:100%;height:auto;margin-top:4px;display:block}.sv-grid-chart-brush-mask.svelte-kvdein{fill:var(--sg-bg,#fff);fill-opacity:.65;pointer-events:none}.sv-grid-chart-brush-window.svelte-kvdein{fill:var(--sg-accent,#2563eb);fill-opacity:.1;stroke:var(--sg-accent,#2563eb);stroke-width:1px;cursor:grab}.sv-grid-chart-brush-window.svelte-kvdein:active{cursor:grabbing}.sv-grid-chart-brush-handle.svelte-kvdein{fill:var(--sg-accent,#2563eb);fill-opacity:.4;cursor:ew-resize}.sv-grid-chart-brush-handle.svelte-kvdein:hover{fill-opacity:.7}.sv-grid-chart-scatter.svelte-kvdein{stroke-width:1px;transition:opacity .2s}.is-clickable.svelte-kvdein .sv-grid-chart-scatter:where(.svelte-kvdein),.sv-grid-chart-scatter.svelte-kvdein:hover{cursor:pointer}.sv-grid-chart-cat-hit.svelte-kvdein{fill:#0000}.sv-grid-chart-cat-hit.svelte-kvdein:focus-visible,.sv-grid-chart-slice.svelte-kvdein:focus-visible,.sv-grid-chart-arc.svelte-kvdein:focus-visible,.sv-grid-chart-heatcell.svelte-kvdein:focus-visible,.sv-grid-chart-funnel-seg.svelte-kvdein:focus-visible,.sv-grid-chart-treemap-cell.svelte-kvdein:focus-visible,.sv-grid-chart-sankey-node.svelte-kvdein:focus-visible,.sv-grid-chart-sankey-link.svelte-kvdein:focus-visible,.sv-grid-chart-calendar-cell.svelte-kvdein:focus-visible,.sv-grid-chart-radar-dot.svelte-kvdein:focus-visible,.sv-grid-chart-scatter.svelte-kvdein:focus-visible,.sv-grid-chart-brush.svelte-kvdein:focus-visible{outline:2px solid var(--sg-accent,#2563eb);outline-offset:1px}.sv-grid-chart-datalabel.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-size:calc(9.5px * var(--sg-chart-font-scale,1));font-variant-numeric:tabular-nums;pointer-events:none;font-weight:600}.sv-grid-chart-datalabel-leader.svelte-kvdein{stroke:var(--sg-muted,#64748b);stroke-width:1px;pointer-events:none}.sv-grid-chart-datalabel.on-bar.svelte-kvdein{fill:#fff}.sv-grid-chart-donut-total.svelte-kvdein{fill:var(--sg-fg,#0f172a);font-size:calc(16px * var(--sg-chart-font-scale,1));font-variant-numeric:tabular-nums;font-weight:800}.sv-grid-chart-donut-label.svelte-kvdein{fill:var(--sg-muted,#64748b);font-size:calc(10px * var(--sg-chart-font-scale,1))}.sv-grid-chart-bar.svelte-kvdein{transition:x .3s,y .3s,width .3s,height .3s}.sv-grid-chart-dot.svelte-kvdein{transition:cx .3s,cy .3s}.sv-grid-chart-candle.svelte-kvdein{stroke-width:1px;transition:x .3s,y .3s,width .3s,height .3s}.sv-grid-chart-wick.svelte-kvdein,.sv-grid-chart-ohlc.svelte-kvdein{stroke-width:1px;shape-rendering:crispedges}.sv-grid-chart-box.svelte-kvdein{stroke-width:1px;transition:x .3s,y .3s,width .3s,height .3s}.sv-grid-chart-whisker.svelte-kvdein,.sv-grid-chart-errorbar.svelte-kvdein{stroke-width:1px;shape-rendering:crispedges}.sv-grid-chart-median.svelte-kvdein{stroke-width:2px;shape-rendering:crispedges}.sv-grid-chart-outlier.svelte-kvdein{stroke-width:1px}.is-clickable.svelte-kvdein .sv-grid-chart-cat-hit:where(.svelte-kvdein),.is-clickable.svelte-kvdein .sv-grid-chart-slice:where(.svelte-kvdein){cursor:pointer}.sv-grid-chart-empty.svelte-kvdein{color:var(--sg-muted,#94a3b8);font-size:calc(13px * var(--sg-chart-font-scale,1));pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.sv-grid-chart-toolbar.svelte-kvdein{flex-wrap:wrap;justify-content:flex-end;gap:4px;display:flex}.sv-grid-chart-tool.svelte-kvdein{border:1px solid var(--sg-border,#cbd5e1);background:var(--sg-bg,#fff);color:var(--sg-fg,#1e293b);font-size:calc(11px * var(--sg-chart-font-scale,1));cursor:pointer;border-radius:4px;align-items:center;gap:4px;padding:3px 8px;font-weight:500;transition:background-color .1s,border-color .1s;display:inline-flex}.sv-grid-chart-tool.svelte-kvdein:hover{background:var(--sg-row-hover-bg,#f1f5f9);border-color:var(--sg-accent,#2563eb)}.sv-grid-chart-tool.is-on.svelte-kvdein{background:var(--sg-accent,#2563eb);border-color:var(--sg-accent,#2563eb);color:var(--sg-on-accent,#fff)}.sv-grid-chart-svg.is-annotating.svelte-kvdein{cursor:copy}.sv-grid-chart-annotation-marker.is-removable.svelte-kvdein{cursor:pointer}.sv-grid-chart-svg.is-zoomable.svelte-kvdein{cursor:crosshair}.sv-grid-chart-svg.is-dragging.svelte-kvdein{cursor:crosshair;-webkit-user-select:none;user-select:none}.sv-grid-chart-zoom-rect.svelte-kvdein{fill:var(--sg-accent,#2563eb);fill-opacity:.12;stroke:var(--sg-accent,#2563eb);stroke-width:1px;stroke-dasharray:3 3;pointer-events:none}.sv-grid-chart-tooltip.svelte-kvdein{z-index:10;pointer-events:none;white-space:nowrap;background:var(--sg-fg,#0f172a);color:var(--sg-bg,#fff);font-size:calc(11.5px * var(--sg-chart-font-scale,1));border-radius:6px;flex-direction:column;gap:1px;padding:6px 9px;line-height:1.4;display:flex;position:absolute;transform:translate(-50%,calc(-100% - 12px));box-shadow:0 6px 18px #00000047}.sv-grid-chart-tooltip.is-below.svelte-kvdein{transform:translate(-50%,16px)}.sv-grid-chart-tooltip.is-fixed.svelte-kvdein{transform:none}.sv-grid-chart-tooltip.is-fixed.is-right.svelte-kvdein{transform:translate(-100%)}.sv-grid-chart-tooltip.is-fixed.is-bottom.svelte-kvdein{transform:translateY(-100%)}.sv-grid-chart-tooltip.is-fixed.is-right.is-bottom.svelte-kvdein{transform:translate(-100%,-100%)}.sv-grid-chart-tooltip.is-pinned.svelte-kvdein{pointer-events:auto;-webkit-user-select:text;user-select:text;box-shadow:0 0 0 2px var(--sg-accent,#2563eb), 0 6px 18px #00000047}.sv-grid-chart-tooltip-title.svelte-kvdein{opacity:.75;font-size:calc(10.5px * var(--sg-chart-font-scale,1));margin-bottom:1px}.sv-grid-chart-tooltip-row.svelte-kvdein{align-items:center;gap:6px;display:flex}.sv-grid-chart-tooltip-dot.svelte-kvdein{border-radius:2px;flex-shrink:0;width:8px;height:8px}.sv-grid-chart-tooltip-row-label.svelte-kvdein{opacity:.85}.sv-grid-chart-tooltip-row-value.svelte-kvdein{font-variant-numeric:tabular-nums;margin-left:auto;padding-left:10px;font-weight:700}.sv-grid-chart-legend.svelte-kvdein{font-size:calc(12px * var(--sg-chart-font-scale,1));color:var(--sg-fg,#0f172a);flex-wrap:wrap;gap:6px 12px;display:flex}.sv-grid-chart-legend-item.svelte-kvdein{color:inherit;font:inherit;cursor:pointer;background:0 0;border:0;border-radius:4px;align-items:center;gap:6px;padding:1px 2px;display:inline-flex}.sv-grid-chart-legend-item.svelte-kvdein:disabled{cursor:default}.sv-grid-chart-legend-item.is-off.svelte-kvdein{color:var(--sg-muted,#94a3b8);text-decoration:line-through}.sv-grid-chart-legend-item.is-isolated.svelte-kvdein{background:var(--sg-header-bg,#f1f5f9);font-weight:700}.sv-grid-chart-legend-more.svelte-kvdein{border:1px dashed var(--sg-border,#cbd5e1);color:var(--sg-muted,#64748b);font:inherit;font-size:calc(11px * var(--sg-chart-font-scale,1));cursor:pointer;background:0 0;border-radius:999px;padding:1px 7px}.sv-grid-chart-legend-more.svelte-kvdein:hover{color:var(--sg-fg,#0f172a);border-color:var(--sg-accent,#2563eb)}.sv-grid-chart-sr-only.svelte-kvdein{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.sv-grid-chart-swatch.svelte-kvdein{box-sizing:border-box;border:1.5px solid #0000;border-radius:3px;width:12px;height:12px;display:inline-block}@keyframes svelte-kvdein-sv-grid-chart-in{0%{opacity:0}to{opacity:1}}.sv-grid-chart-bar.svelte-kvdein,.sv-grid-chart-linepath.svelte-kvdein,.sv-grid-chart-area.svelte-kvdein,.sv-grid-chart-slice.svelte-kvdein,.sv-grid-chart-candle.svelte-kvdein,.sv-grid-chart-box.svelte-kvdein,.sv-grid-chart-funnel-seg.svelte-kvdein,.sv-grid-chart-heatcell.svelte-kvdein,.sv-grid-chart-treemap-cell.svelte-kvdein{animation:.3s ease-out both svelte-kvdein-sv-grid-chart-in}@media (prefers-reduced-motion:reduce){.sv-grid-chart-bar.svelte-kvdein,.sv-grid-chart-dot.svelte-kvdein,.sv-grid-chart-candle.svelte-kvdein,.sv-grid-chart-box.svelte-kvdein{transition:none}.sv-grid-chart-bar.svelte-kvdein,.sv-grid-chart-linepath.svelte-kvdein,.sv-grid-chart-area.svelte-kvdein,.sv-grid-chart-slice.svelte-kvdein,.sv-grid-chart-candle.svelte-kvdein,.sv-grid-chart-box.svelte-kvdein,.sv-grid-chart-funnel-seg.svelte-kvdein,.sv-grid-chart-heatcell.svelte-kvdein,.sv-grid-chart-treemap-cell.svelte-kvdein{animation:none}}@media (forced-colors:active){.sv-grid-chart-svg.svelte-kvdein,.sv-grid-chart-brush.svelte-kvdein,.sv-grid-chart-swatch.svelte-kvdein{forced-color-adjust:none}.sv-grid-chart-axis.svelte-kvdein,.sv-grid-chart-axis-title.svelte-kvdein,.sv-grid-chart-title.svelte-kvdein,.sv-grid-chart-subtitle.svelte-kvdein,.sv-grid-chart-caption.svelte-kvdein,.sv-grid-chart-datalabel.svelte-kvdein,.sv-grid-chart-callout-label.svelte-kvdein,.sv-grid-chart-donut-total.svelte-kvdein,.sv-grid-chart-donut-label.svelte-kvdein,.sv-grid-chart-sankey-label.svelte-kvdein,.sv-grid-chart-annotation-label.svelte-kvdein{fill:canvastext}.sv-grid-chart-gridline.svelte-kvdein{stroke:graytext;opacity:1}.sv-grid-chart-crosshair.svelte-kvdein{stroke:highlight;opacity:1}.sv-grid-chart-crosshair-label.svelte-kvdein rect:where(.svelte-kvdein),.sv-grid-chart-refpill.svelte-kvdein rect:where(.svelte-kvdein){fill:highlight;opacity:1}.sv-grid-chart-crosshair-label.svelte-kvdein text:where(.svelte-kvdein),.sv-grid-chart-refpill.svelte-kvdein text:where(.svelte-kvdein){fill:highlighttext}.sv-grid-chart-cat-hit.svelte-kvdein:focus-visible,.sv-grid-chart-slice.svelte-kvdein:focus-visible,.sv-grid-chart-arc.svelte-kvdein:focus-visible,.sv-grid-chart-heatcell.svelte-kvdein:focus-visible,.sv-grid-chart-funnel-seg.svelte-kvdein:focus-visible,.sv-grid-chart-treemap-cell.svelte-kvdein:focus-visible,.sv-grid-chart-sankey-node.svelte-kvdein:focus-visible,.sv-grid-chart-sankey-link.svelte-kvdein:focus-visible,.sv-grid-chart-calendar-cell.svelte-kvdein:focus-visible,.sv-grid-chart-radar-dot.svelte-kvdein:focus-visible,.sv-grid-chart-scatter.svelte-kvdein:focus-visible,.sv-grid-chart-brush.svelte-kvdein:focus-visible,.sv-grid-chart-annotation-marker.svelte-kvdein:focus-visible{outline:3px solid highlight}.sv-grid-chart-slice.is-selected.svelte-kvdein,.sv-grid-chart-arc.is-selected.svelte-kvdein{stroke:highlight;stroke-width:3px}.sv-grid-chart-brush-mask.svelte-kvdein{fill:canvas;fill-opacity:.7}.sv-grid-chart-brush-window.svelte-kvdein{stroke:highlight;fill:highlight;fill-opacity:.2}.sv-grid-chart-brush-handle.svelte-kvdein{fill:highlight}.sv-grid-chart-tooltip.svelte-kvdein{border:1px solid canvastext}.sv-grid-chart-legend-item.is-off.svelte-kvdein .sv-grid-chart-swatch:where(.svelte-kvdein){forced-color-adjust:auto}}\n",g=globalThis;if(typeof g!=='undefined'){var f=(g.__SVGRID_WC_ADD_CSS_BY_BUILD__||{})["grid"];if(typeof f==='function')f(c);else{var q=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__||{};(q["grid"]=q["grid"]||[]).push(c);}}if(typeof document==='undefined')return;var x=document.querySelectorAll('style[data-svgrid-grid-wc-chunk]');for(var i=0;i<x.length;i++)if(x[i].getAttribute('data-svgrid-grid-wc-chunk')==="grid:SvGridChart-rvB4vvCB.js"||x[i].textContent===c)return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"grid:SvGridChart-rvB4vvCB.js");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
|
|
2
|
+
import { C as e, D as t, E as n, O as r, T as i, _ as a, a as o, b as s, d as c, g as l, i as u, j as d, n as ee, t as te, v as ne, w as re, x as ie, y as f } from "./chart-CVOJXX1_.js";
|
|
3
|
+
import { $ as p, A as m, B as h, E as g, G as ae, H as oe, I as se, J as _, L as ce, M as v, N as y, O as b, P as x, Q as le, R as S, S as ue, T as C, U as de, V as fe, W as w, X as T, Y as E, Z as D, at as pe, b as O, c as me, ct as k, et as A, f as he, j, k as ge, n as M, nt as N, o as _e, ot as ve, p as P, s as ye, st as be, w as xe, y as F, z as I } from "./client-DeNKZvIV.js";
|
|
4
|
+
import { t as Se } from "./csv-injection-Cxf6dMrr.js";
|
|
5
|
+
import { a as Ce } from "./editor-contract-peBDxir_.js";
|
|
6
|
+
import "./sv-grid-element.js";
|
|
7
|
+
//#region ../grid/dist/chart-zoom.js
|
|
8
|
+
function we(e, t, n) {
|
|
9
|
+
if (n <= 0) return null;
|
|
10
|
+
let r = Math.max(0, Math.min(n - 1, Math.round(e))), i = Math.max(0, Math.min(n - 1, Math.round(t)));
|
|
11
|
+
return i < r && ([r, i] = [i, r]), r === 0 && i === n - 1 ? null : {
|
|
12
|
+
i0: r,
|
|
13
|
+
i1: i
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function Te(e, t, n, r) {
|
|
17
|
+
if (t <= 2) return null;
|
|
18
|
+
let i = e ? e.i0 : 0, a = e ? e.i1 : t - 1, o = a - i + 1, s = Math.max(2, Math.min(t, Math.round(o * r)));
|
|
19
|
+
if (s === o) return e;
|
|
20
|
+
let c = o > 1 ? (Math.max(i, Math.min(a, n)) - i) / (o - 1) : .5, l = Math.round(n - c * (s - 1));
|
|
21
|
+
return l = Math.max(0, Math.min(t - s, l)), we(l, l + s - 1, t);
|
|
22
|
+
}
|
|
23
|
+
function Ee(e, t, n) {
|
|
24
|
+
if (!e || !n) return e;
|
|
25
|
+
let r = e.i1 - e.i0, i = e.i0 + Math.round(n);
|
|
26
|
+
return i = Math.max(0, Math.min(t - 1 - r, i)), we(i, i + r, t);
|
|
27
|
+
}
|
|
28
|
+
function De(e, t, n, r) {
|
|
29
|
+
return !Number.isFinite(r) || r <= 0 ? e : Te(e, t, n, 1 / r);
|
|
30
|
+
}
|
|
31
|
+
function Oe(e, t, n) {
|
|
32
|
+
let r = e.length;
|
|
33
|
+
if (!r) return null;
|
|
34
|
+
let i = e.map((e) => Date.parse(e)), a = [...i].reverse().find(Number.isFinite);
|
|
35
|
+
if (a == null) return null;
|
|
36
|
+
let o = n ?? a, s = 864e5, c, l = o;
|
|
37
|
+
if (typeof t == "object") {
|
|
38
|
+
if (t.from) c = Date.parse(t.from);
|
|
39
|
+
else if (t.days) c = o - t.days * s;
|
|
40
|
+
else return null;
|
|
41
|
+
t.to && (l = Date.parse(t.to));
|
|
42
|
+
} else switch (t) {
|
|
43
|
+
case "1W":
|
|
44
|
+
c = o - 7 * s;
|
|
45
|
+
break;
|
|
46
|
+
case "1M":
|
|
47
|
+
c = L(o, -1);
|
|
48
|
+
break;
|
|
49
|
+
case "3M":
|
|
50
|
+
c = L(o, -3);
|
|
51
|
+
break;
|
|
52
|
+
case "6M":
|
|
53
|
+
c = L(o, -6);
|
|
54
|
+
break;
|
|
55
|
+
case "1Y":
|
|
56
|
+
c = L(o, -12);
|
|
57
|
+
break;
|
|
58
|
+
case "YTD": {
|
|
59
|
+
let e = new Date(o);
|
|
60
|
+
c = Date.UTC(e.getUTCFullYear(), 0, 1);
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
default: return null;
|
|
64
|
+
}
|
|
65
|
+
if (!Number.isFinite(c) || !Number.isFinite(l)) return null;
|
|
66
|
+
let u = -1, d = -1;
|
|
67
|
+
for (let e = 0; e < r; e += 1) {
|
|
68
|
+
let t = i[e];
|
|
69
|
+
Number.isFinite(t) && (t >= c && u < 0 && (u = e), t <= l && (d = e));
|
|
70
|
+
}
|
|
71
|
+
return u < 0 || d < 0 || d < u ? null : we(u, d, r);
|
|
72
|
+
}
|
|
73
|
+
function L(e, t) {
|
|
74
|
+
let n = new Date(e);
|
|
75
|
+
return Date.UTC(n.getUTCFullYear(), n.getUTCMonth() + t, n.getUTCDate(), n.getUTCHours(), n.getUTCMinutes());
|
|
76
|
+
}
|
|
77
|
+
function ke(e, t) {
|
|
78
|
+
let n = -1, r = Infinity;
|
|
79
|
+
for (let i = 0; i < e.length; i += 1) {
|
|
80
|
+
let a = Date.parse(e[i]);
|
|
81
|
+
if (!Number.isFinite(a)) continue;
|
|
82
|
+
let o = Math.abs(a - t);
|
|
83
|
+
o < r && (r = o, n = i);
|
|
84
|
+
}
|
|
85
|
+
return n;
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region ../grid/dist/chart-sync.svelte.js
|
|
89
|
+
var Ae = /* @__PURE__ */ new Map();
|
|
90
|
+
function je(e) {
|
|
91
|
+
let t = Ae.get(e);
|
|
92
|
+
if (t) return t;
|
|
93
|
+
let n = le({
|
|
94
|
+
hover: null,
|
|
95
|
+
zoom: null
|
|
96
|
+
});
|
|
97
|
+
return Ae.set(e, n), n;
|
|
98
|
+
}
|
|
99
|
+
function Me(e, t) {
|
|
100
|
+
je(e).hover = t;
|
|
101
|
+
}
|
|
102
|
+
function Ne(e, t, n, r, i = null) {
|
|
103
|
+
je(e).zoom = {
|
|
104
|
+
window: t,
|
|
105
|
+
count: n,
|
|
106
|
+
from: r,
|
|
107
|
+
labels: i
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region ../grid/dist/chart-motion.js
|
|
112
|
+
var R = (e, t, n) => e + (t - e) * n, z = (e) => Math.round(e * 100) / 100;
|
|
113
|
+
function Pe(e, t, n) {
|
|
114
|
+
return n >= 1 ? t : n <= 0 && e.type === t.type ? e : e.type === t.type ? {
|
|
115
|
+
...t,
|
|
116
|
+
bars: Ie(e.bars, t.bars, n, t.plot.y + t.plot.h),
|
|
117
|
+
lines: Le(e.lines, t.lines, n),
|
|
118
|
+
candles: ze(e.candles, t.candles, n),
|
|
119
|
+
slices: Be(e.slices, t.slices, n),
|
|
120
|
+
arcs: He(e.arcs, t.arcs, n),
|
|
121
|
+
yTicks: t.yTicks.map((t) => {
|
|
122
|
+
let r = e.yTicks.find((e) => e.value === t.value);
|
|
123
|
+
return r ? {
|
|
124
|
+
...t,
|
|
125
|
+
y: z(R(r.y, t.y, n))
|
|
126
|
+
} : t;
|
|
127
|
+
})
|
|
128
|
+
} : t;
|
|
129
|
+
}
|
|
130
|
+
var Fe = (e) => `${e.series}\u0000${e.label}`;
|
|
131
|
+
function Ie(e, t, n, r) {
|
|
132
|
+
if (!e.length && !t.length) return t;
|
|
133
|
+
let i = new Map(e.map((e) => [Fe(e), e])), a = /* @__PURE__ */ new Set(), o = t.map((e) => {
|
|
134
|
+
let t = Fe(e);
|
|
135
|
+
a.add(t);
|
|
136
|
+
let o = i.get(t);
|
|
137
|
+
if (!o) {
|
|
138
|
+
let t = R(r, e.y, n);
|
|
139
|
+
return {
|
|
140
|
+
...e,
|
|
141
|
+
y: z(t),
|
|
142
|
+
h: z(Math.max(0, R(0, e.h, n)))
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
...e,
|
|
147
|
+
x: z(R(o.x, e.x, n)),
|
|
148
|
+
y: z(R(o.y, e.y, n)),
|
|
149
|
+
w: z(R(o.w, e.w, n)),
|
|
150
|
+
h: z(R(o.h, e.h, n))
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
for (let t of e) a.has(Fe(t)) || o.push({
|
|
154
|
+
...t,
|
|
155
|
+
y: z(R(t.y, r, n)),
|
|
156
|
+
h: z(Math.max(0, R(t.h, 0, n)))
|
|
157
|
+
});
|
|
158
|
+
return o;
|
|
159
|
+
}
|
|
160
|
+
function Le(e, t, n) {
|
|
161
|
+
if (!e.length) return t;
|
|
162
|
+
let r = new Map(e.map((e) => [e.label, e]));
|
|
163
|
+
return t.map((e) => {
|
|
164
|
+
let t = r.get(e.label);
|
|
165
|
+
if (!t || t.points.length !== e.points.length) return e;
|
|
166
|
+
let i = e.points.map((e, r) => {
|
|
167
|
+
let i = t.points[r];
|
|
168
|
+
return !e.defined || !i.defined ? e : {
|
|
169
|
+
...e,
|
|
170
|
+
x: z(R(i.x, e.x, n)),
|
|
171
|
+
y: z(R(i.y, e.y, n))
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
return {
|
|
175
|
+
...e,
|
|
176
|
+
points: i,
|
|
177
|
+
path: f(i, !!e.smooth, { step: e.step })
|
|
178
|
+
};
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
var Re = (e) => `${e.series}\u0000${e.label}`;
|
|
182
|
+
function ze(e, t, n) {
|
|
183
|
+
if (!e.length) return t;
|
|
184
|
+
let r = new Map(e.map((e) => [Re(e), e]));
|
|
185
|
+
return t.map((e) => {
|
|
186
|
+
let t = r.get(Re(e));
|
|
187
|
+
if (!t) return e;
|
|
188
|
+
let i = R(t.yOpen, e.yOpen, n), a = R(t.yClose, e.yClose, n);
|
|
189
|
+
return {
|
|
190
|
+
...e,
|
|
191
|
+
x: z(R(t.x, e.x, n)),
|
|
192
|
+
xCenter: z(R(t.xCenter, e.xCenter, n)),
|
|
193
|
+
yOpen: z(i),
|
|
194
|
+
yClose: z(a),
|
|
195
|
+
yHigh: z(R(t.yHigh, e.yHigh, n)),
|
|
196
|
+
yLow: z(R(t.yLow, e.yLow, n)),
|
|
197
|
+
bodyY: z(Math.min(i, a)),
|
|
198
|
+
bodyH: z(Math.max(1, Math.abs(a - i)))
|
|
199
|
+
};
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function Be(e, t, n) {
|
|
203
|
+
if (!e.length || t.some((e) => !e.arc)) return t;
|
|
204
|
+
let r = new Map(e.map((e) => [e.label, e]));
|
|
205
|
+
return t.map((e) => {
|
|
206
|
+
let t = r.get(e.label);
|
|
207
|
+
if (!t?.arc || !e.arc) return e;
|
|
208
|
+
let i = R(t.arc.a0, e.arc.a0, n), a = R(t.arc.a1, e.arc.a1, n), o = (i + a) / 2, s = (e.arc.r + e.arc.ir) / 2 || e.arc.r * .6;
|
|
209
|
+
return {
|
|
210
|
+
...e,
|
|
211
|
+
path: ne(e.arc.cx, e.arc.cy, e.arc.ir, e.arc.r, i, a),
|
|
212
|
+
cx: z(e.arc.cx + s * Math.cos(o)),
|
|
213
|
+
cy: z(e.arc.cy + s * Math.sin(o)),
|
|
214
|
+
arc: {
|
|
215
|
+
...e.arc,
|
|
216
|
+
a0: i,
|
|
217
|
+
a1: a
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
var Ve = (e) => e.nodePath ? e.nodePath.join("/") : `${e.series}\u0000${e.label}`;
|
|
223
|
+
function He(e, t, n) {
|
|
224
|
+
if (!e.length) return t;
|
|
225
|
+
let r = new Map(e.map((e) => [Ve(e), e]));
|
|
226
|
+
return t.map((e) => {
|
|
227
|
+
let t = r.get(Ve(e));
|
|
228
|
+
if (!t) return e;
|
|
229
|
+
let i = R(t.a0, e.a0, n), a = R(t.a1, e.a1, n), o = R(t.r0, e.r0, n), s = R(t.r1, e.r1, n), c = (i + a) / 2, l = (o + s) / 2;
|
|
230
|
+
return {
|
|
231
|
+
...e,
|
|
232
|
+
a0: i,
|
|
233
|
+
a1: a,
|
|
234
|
+
r0: o,
|
|
235
|
+
r1: s,
|
|
236
|
+
path: ne(e.cx, e.cy, o, s, i, a),
|
|
237
|
+
lx: z(e.cx + l * Math.cos(c)),
|
|
238
|
+
ly: z(e.cy + l * Math.sin(c))
|
|
239
|
+
};
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
//#endregion
|
|
243
|
+
//#region ../grid/dist/chart-export.js
|
|
244
|
+
function Ue(e) {
|
|
245
|
+
return e instanceof SVGSVGElement ? e : e.querySelector("svg.sv-grid-chart-svg") ?? e.querySelector("svg");
|
|
246
|
+
}
|
|
247
|
+
function We(e, t, n) {
|
|
248
|
+
return getComputedStyle(e).getPropertyValue(t).trim() || n;
|
|
249
|
+
}
|
|
250
|
+
function Ge(e, t = {}) {
|
|
251
|
+
let n = Ue(e);
|
|
252
|
+
if (!n) throw Error("chartToSvgString: no <svg> found");
|
|
253
|
+
let r = We(n, "--sg-fg", "#0f172a"), i = We(n, "--sg-muted", "#64748b"), a = We(n, "--sg-border", "#e2e8f0"), o = t.background ?? We(n, "--sg-bg", "#ffffff"), s = n.viewBox.baseVal, c = s && s.width ? s.width : n.clientWidth || 520, l = s && s.height ? s.height : n.clientHeight || 300, u = n.cloneNode(!0);
|
|
254
|
+
u.setAttribute("width", String(c)), u.setAttribute("height", String(l)), u.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
255
|
+
let d = [
|
|
256
|
+
"fill",
|
|
257
|
+
"fill-opacity",
|
|
258
|
+
"stroke",
|
|
259
|
+
"stroke-width",
|
|
260
|
+
"stroke-opacity",
|
|
261
|
+
"stroke-dasharray",
|
|
262
|
+
"stroke-linecap",
|
|
263
|
+
"stroke-linejoin",
|
|
264
|
+
"opacity",
|
|
265
|
+
"font-size",
|
|
266
|
+
"font-family",
|
|
267
|
+
"font-weight",
|
|
268
|
+
"text-anchor"
|
|
269
|
+
], ee = n.querySelectorAll("*"), te = u.querySelectorAll("*");
|
|
270
|
+
for (let e = 0; e < ee.length; e += 1) {
|
|
271
|
+
let t = te[e];
|
|
272
|
+
if (!t || !t.style) continue;
|
|
273
|
+
let n = getComputedStyle(ee[e]);
|
|
274
|
+
for (let e of d) {
|
|
275
|
+
let r = n.getPropertyValue(e);
|
|
276
|
+
r && r !== "normal" && t.style.setProperty(e, r);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
u.querySelectorAll(".sv-grid-chart-hit").forEach((e) => e.remove());
|
|
280
|
+
let ne = document.createElementNS("http://www.w3.org/2000/svg", "style");
|
|
281
|
+
ne.textContent = `
|
|
282
|
+
.sv-grid-chart-axis { fill: ${i}; font-size: 10px; font-family: sans-serif; }
|
|
283
|
+
.sv-grid-chart-gridline { stroke: ${a}; stroke-width: 1; opacity: 0.6; }
|
|
284
|
+
.sv-grid-chart-gridline.is-zero { stroke: ${i}; opacity: 0.9; }
|
|
285
|
+
.sv-grid-chart-datalabel { fill: ${r}; font-size: 9.5px; font-weight: 600; font-family: sans-serif; }
|
|
286
|
+
.sv-grid-chart-datalabel.on-bar { fill: #fff; }
|
|
287
|
+
.sv-grid-chart-donut-total { fill: ${r}; font-size: 16px; font-weight: 800; font-family: sans-serif; }
|
|
288
|
+
.sv-grid-chart-donut-label { fill: ${i}; font-size: 10px; font-family: sans-serif; }
|
|
289
|
+
`, u.insertBefore(ne, u.firstChild);
|
|
290
|
+
let re = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
291
|
+
return re.setAttribute("x", "0"), re.setAttribute("y", "0"), re.setAttribute("width", String(c)), re.setAttribute("height", String(l)), re.setAttribute("fill", o), u.insertBefore(re, ne.nextSibling), new XMLSerializer().serializeToString(u);
|
|
292
|
+
}
|
|
293
|
+
function Ke(e, t) {
|
|
294
|
+
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
295
|
+
r.href = n, r.download = t, document.body.appendChild(r), r.click(), r.remove(), setTimeout(() => URL.revokeObjectURL(n), 1e3);
|
|
296
|
+
}
|
|
297
|
+
function qe(e, t = "chart.svg", n = {}) {
|
|
298
|
+
Ke(new Blob([Ge(e, n)], { type: "image/svg+xml" }), t);
|
|
299
|
+
}
|
|
300
|
+
function Je(e, t = {}) {
|
|
301
|
+
let n = Ge(e, t), r = t.scale ?? 2, i = Ue(e), a = i.viewBox.baseVal, o = (a && a.width ? a.width : i.clientWidth || 520) * r, s = (a && a.height ? a.height : i.clientHeight || 300) * r;
|
|
302
|
+
return new Promise((e, t) => {
|
|
303
|
+
let r = URL.createObjectURL(new Blob([n], { type: "image/svg+xml" })), i = new Image();
|
|
304
|
+
i.onload = () => {
|
|
305
|
+
let n = document.createElement("canvas");
|
|
306
|
+
n.width = Math.round(o), n.height = Math.round(s);
|
|
307
|
+
let a = n.getContext("2d");
|
|
308
|
+
if (!a) {
|
|
309
|
+
URL.revokeObjectURL(r), t(/* @__PURE__ */ Error("canvas 2d context unavailable"));
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
a.drawImage(i, 0, 0, n.width, n.height), URL.revokeObjectURL(r), n.toBlob((n) => n ? e(n) : t(/* @__PURE__ */ Error("toBlob failed")), "image/png");
|
|
313
|
+
}, i.onerror = () => {
|
|
314
|
+
URL.revokeObjectURL(r), t(/* @__PURE__ */ Error("failed to rasterize chart SVG"));
|
|
315
|
+
}, i.src = r;
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
async function Ye(e, t = "chart.png", n = {}) {
|
|
319
|
+
Ke(await Je(e, n), t);
|
|
320
|
+
}
|
|
321
|
+
var B = (e) => {
|
|
322
|
+
let t = e == null || typeof e == "number" && !Number.isFinite(e) ? "" : String(e);
|
|
323
|
+
return typeof e == "string" && t !== "" && (t = Se(t)), /[",\n\r]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
324
|
+
};
|
|
325
|
+
function Xe(e) {
|
|
326
|
+
let t = e.series ?? [];
|
|
327
|
+
if (t.some((e) => e.points?.length)) {
|
|
328
|
+
let e = [
|
|
329
|
+
"Series",
|
|
330
|
+
"X",
|
|
331
|
+
"Y",
|
|
332
|
+
"Size",
|
|
333
|
+
"Label"
|
|
334
|
+
].map(B).join(","), n = [];
|
|
335
|
+
for (let e of t) for (let t of e.points ?? []) n.push([
|
|
336
|
+
e.label,
|
|
337
|
+
t.x,
|
|
338
|
+
t.y,
|
|
339
|
+
t.r ?? "",
|
|
340
|
+
t.label ?? ""
|
|
341
|
+
].map(B).join(","));
|
|
342
|
+
return n.length ? [e, ...n].join("\n") : "";
|
|
343
|
+
}
|
|
344
|
+
let n = e.categories ?? [];
|
|
345
|
+
if (!n.length || !t.length) return "";
|
|
346
|
+
let r = ["Category"];
|
|
347
|
+
for (let e of t) e.ohlc ? r.push(`${e.label} Open`, `${e.label} High`, `${e.label} Low`, `${e.label} Close`, ...e.volumes ? [`${e.label} Volume`] : []) : e.boxes ? r.push(`${e.label} Min`, `${e.label} Q1`, `${e.label} Median`, `${e.label} Q3`, `${e.label} Max`, `${e.label} Outliers`) : e.errors ? r.push(e.label, `${e.label} Low`, `${e.label} High`) : e.lowValues ? r.push(`${e.label} low`, `${e.label} high`) : e.targets ? r.push(e.label, `${e.label} target`) : r.push(e.label);
|
|
348
|
+
let i = n.map((e, n) => {
|
|
349
|
+
let r = [e];
|
|
350
|
+
for (let e of t) if (e.ohlc) {
|
|
351
|
+
let t = e.ohlc[n];
|
|
352
|
+
r.push(t?.o ?? "", t?.h ?? "", t?.l ?? "", t?.c ?? ""), e.volumes && r.push(e.volumes[n] ?? "");
|
|
353
|
+
} else if (e.boxes) {
|
|
354
|
+
let t = e.boxes[n];
|
|
355
|
+
r.push(t?.min ?? "", t?.q1 ?? "", t?.median ?? "", t?.q3 ?? "", t?.max ?? "", t?.outliers?.join(" ") ?? "");
|
|
356
|
+
} else if (e.errors) {
|
|
357
|
+
let t = e.values[n], i = e.errors[n], a = i == null ? "" : typeof i == "number" ? (t ?? 0) - Math.abs(i) : Math.min(i.lo, i.hi), o = i == null ? "" : typeof i == "number" ? (t ?? 0) + Math.abs(i) : Math.max(i.lo, i.hi);
|
|
358
|
+
r.push(t ?? "", a, o);
|
|
359
|
+
} else e.lowValues ? r.push(e.lowValues[n] ?? "", e.values[n] ?? "") : e.targets ? r.push(e.values[n] ?? "", e.targets[n] ?? "") : r.push(e.values[n] ?? "");
|
|
360
|
+
return r.map(B).join(",");
|
|
361
|
+
});
|
|
362
|
+
return [r.map(B).join(","), ...i].join("\n");
|
|
363
|
+
}
|
|
364
|
+
function Ze(e) {
|
|
365
|
+
let t = e.series ?? [];
|
|
366
|
+
return t.some((e) => e.points?.length) ? !0 : !!(e.categories?.length && t.length);
|
|
367
|
+
}
|
|
368
|
+
function Qe(e, t = "chart.csv") {
|
|
369
|
+
let n = Xe(e);
|
|
370
|
+
return n ? (Ke(new Blob([n], { type: "text/csv;charset=utf-8" }), t), !0) : !1;
|
|
371
|
+
}
|
|
372
|
+
//#endregion
|
|
373
|
+
//#region ../grid/dist/chart-messages.js
|
|
374
|
+
var $e = {
|
|
375
|
+
chartLabel: "{type} chart",
|
|
376
|
+
dataTable: "{type} chart data",
|
|
377
|
+
dataTableCapped: ", first {shown} of {total} rows",
|
|
378
|
+
noData: "No data",
|
|
379
|
+
noValue: "no value",
|
|
380
|
+
seriesAtCategory: "{series}: {value} at {category}",
|
|
381
|
+
densePoints: "{count} points, {from} to {to}. Arrow keys step through values.",
|
|
382
|
+
drillIn: ", drill in",
|
|
383
|
+
sankeyNode: "{label}: in {in}, out {out}",
|
|
384
|
+
total: "Total",
|
|
385
|
+
rSquared: "R² {value}",
|
|
386
|
+
describeChart: "Describe chart",
|
|
387
|
+
describeCopied: "Description copied",
|
|
388
|
+
drillPath: "Drilldown path",
|
|
389
|
+
drillRoot: "All",
|
|
390
|
+
dateRange: "Date range",
|
|
391
|
+
showLast: "Show the last {preset}",
|
|
392
|
+
pan: "Pan",
|
|
393
|
+
panTitle: "Drag the plot to pan the zoomed window",
|
|
394
|
+
resetZoom: "Reset zoom",
|
|
395
|
+
resetZoomTitle: "Reset zoom (or double-click the plot)",
|
|
396
|
+
annotate: "Annotate",
|
|
397
|
+
annotateOnTitle: "Click the plot to pin a note, or a marker to remove it",
|
|
398
|
+
annotateOffTitle: "Pin notes on the chart",
|
|
399
|
+
drawingTools: "Drawing tools",
|
|
400
|
+
draw: "Draw: {tool}",
|
|
401
|
+
toolTrend: "Trend",
|
|
402
|
+
toolRay: "Ray",
|
|
403
|
+
toolFib: "Fib",
|
|
404
|
+
toolRect: "Rect",
|
|
405
|
+
toolArrow: "Arrow",
|
|
406
|
+
toolText: "Text",
|
|
407
|
+
drawing: "{tool} drawing",
|
|
408
|
+
deleteDrawing: "Delete",
|
|
409
|
+
deleteDrawingTitle: "Remove the selected drawing (Delete)",
|
|
410
|
+
clearDrawings: "Clear",
|
|
411
|
+
clearDrawingsTitle: "Remove every drawing",
|
|
412
|
+
noteText: "Note text",
|
|
413
|
+
removeNote: "Remove note: {label}",
|
|
414
|
+
png: "PNG",
|
|
415
|
+
downloadPng: "Download PNG",
|
|
416
|
+
svg: "SVG",
|
|
417
|
+
downloadSvg: "Download SVG",
|
|
418
|
+
pdf: "PDF",
|
|
419
|
+
downloadPdf: "Download PDF",
|
|
420
|
+
pdfCannotDraw: "No PDF: its font cannot draw \"{text}\". Download PNG or SVG.",
|
|
421
|
+
downloadCsv: "Download CSV",
|
|
422
|
+
print: "Print",
|
|
423
|
+
printTitle: "Print the chart",
|
|
424
|
+
copy: "Copy",
|
|
425
|
+
copied: "✓ Copied",
|
|
426
|
+
copyTitle: "Copy chart as image",
|
|
427
|
+
copyAsImage: "Copy as image",
|
|
428
|
+
range: "Range",
|
|
429
|
+
series: "Series",
|
|
430
|
+
showSeries: "Show",
|
|
431
|
+
hideSeries: "Hide",
|
|
432
|
+
isolateHint: "double-click to isolate",
|
|
433
|
+
showMore: "+{n} more",
|
|
434
|
+
showLess: "Show less",
|
|
435
|
+
rangeBrush: "Range brush",
|
|
436
|
+
brushRange: "{from} to {to}"
|
|
437
|
+
};
|
|
438
|
+
function et(e) {
|
|
439
|
+
return Ce($e, e);
|
|
440
|
+
}
|
|
441
|
+
function V(e, t) {
|
|
442
|
+
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : e);
|
|
443
|
+
}
|
|
444
|
+
//#endregion
|
|
445
|
+
//#region ../grid/dist/SvGridChart.svelte
|
|
446
|
+
var tt = y("<span class=\"sv-grid-chart-crumb is-current svelte-kvdein\" aria-current=\"page\"> </span>"), nt = y("<button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-crumb svelte-kvdein\"> </button>"), rt = y("<span class=\"sv-grid-chart-crumb-sep svelte-kvdein\" aria-hidden=\"true\">/</span> <!>", 1), it = y("<nav class=\"sv-grid-chart-crumbs svelte-kvdein\"><button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-crumb svelte-kvdein\"> </button> <!></nav>"), at = y("<button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-preset svelte-kvdein\"> </button>"), ot = y("<span class=\"sv-grid-chart-presets svelte-kvdein\" role=\"group\"></span>"), st = y("<button type=\"button\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 9l-3 3 3 3\"></path><path d=\"M9 5l3-3 3 3\"></path><path d=\"M15 19l-3 3-3-3\"></path><path d=\"M19 9l3 3-3 3\"></path><path d=\"M2 12h20\"></path><path d=\"M12 2v20\"></path></svg> </button>"), ct = y("<button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 7v6h6\"></path><path d=\"M21 17a9 9 0 0 0-15-6.7L3 13\"></path></svg> </button>"), lt = y("<button type=\"button\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2v6\"></path><circle cx=\"12\" cy=\"11\" r=\"3\"></circle><path d=\"M12 14v8\"></path></svg> </button>"), ut = y("<button type=\"button\"> </button>"), dt = y("<button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button>", 1), ft = y("<span class=\"sv-grid-chart-drawtools svelte-kvdein\" role=\"group\"><!> <!></span>"), pt = y("<div class=\"sv-grid-chart-toolbar svelte-kvdein\" role=\"toolbar\"><!> <!> <!> <!> <!> <!> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button></div>"), mt = y("<div class=\"sv-grid-chart-toolbar is-crumbs-only svelte-kvdein\" role=\"toolbar\"><!></div>"), ht = x("<clipPath><rect></rect></clipPath>"), gt = x("<linearGradient x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\"></stop><stop offset=\"1\"></stop></linearGradient>"), _t = x("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(45)\"><rect width=\"6\" height=\"6\"></rect><rect width=\"3\" height=\"6\" fill=\"rgba(255,255,255,0.35)\"></rect></pattern>"), vt = x("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\"><rect width=\"6\" height=\"6\"></rect><path d=\"M0 0L6 6 M6 0L0 6\" stroke=\"rgba(255,255,255,0.45)\" stroke-width=\"1\"></path></pattern>"), yt = x("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\"><rect width=\"6\" height=\"6\"></rect><circle cx=\"3\" cy=\"3\" r=\"1.2\" fill=\"rgba(255,255,255,0.55)\"></circle></pattern>"), bt = x("<pattern width=\"8\" height=\"8\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(-45)\"><rect width=\"8\" height=\"8\"></rect><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"8\" stroke=\"rgba(0,0,0,0.18)\" stroke-width=\"2\"></line></pattern>"), xt = x("<defs><!><!><!></defs>"), St = x("<text class=\"sv-grid-chart-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), Ct = x("<text class=\"sv-grid-chart-subtitle svelte-kvdein\" text-anchor=\"middle\"> </text>"), wt = x("<text class=\"sv-grid-chart-caption svelte-kvdein\" text-anchor=\"start\"> </text>"), Tt = x("<line class=\"sv-grid-chart-gridline svelte-kvdein\"></line>"), Et = x("<!><text class=\"sv-grid-chart-axis is-x svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), Dt = x("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"end\"> </text>"), Ot = x("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), kt = x("<!><!><!><!><!>", 1), At = x("<line></line>"), jt = x("<!><!>", 1), Mt = x("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>"), Nt = x("<text class=\"sv-grid-chart-axis is-x svelte-kvdein\"> </text>"), Pt = x("<text class=\"sv-grid-chart-axis is-x svelte-kvdein\" text-anchor=\"middle\"> </text>"), Ft = x("<line class=\"sv-grid-chart-gridline svelte-kvdein\" opacity=\"0.5\"></line>"), It = x("<line class=\"sv-grid-chart-gridline svelte-kvdein\"></line><!><text class=\"sv-grid-chart-axis sv-grid-chart-group-label svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), Lt = x("<!><!><!><!><!><!><!><!>", 1), Rt = x("<text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"end\"> </text>"), zt = x("<text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"middle\"> </text>"), Bt = x("<rect class=\"sv-grid-chart-refband svelte-kvdein\"></rect><!>", 1), Vt = x("<path class=\"sv-grid-chart-band svelte-kvdein\" fill-opacity=\"0.12\" stroke=\"none\"></path>"), Ht = x("<path class=\"sv-grid-chart-area svelte-kvdein\" stroke=\"none\"></path>"), Ut = x("<circle class=\"sv-grid-chart-dot is-active svelte-kvdein\" r=\"4\"></circle>"), Wt = x("<circle></circle>"), Gt = x("<path fill=\"none\" stroke-width=\"1.5\"></path>"), Kt = x("<path></path>"), qt = x("<g class=\"svelte-kvdein\"><!><!><path class=\"sv-grid-chart-linepath svelte-kvdein\" fill=\"none\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path><!></g>"), Jt = x("<rect rx=\"1\"></rect>"), Yt = x("<circle class=\"sv-grid-chart-dot svelte-kvdein\" fill-opacity=\"0.55\"></circle>"), Xt = x("<g class=\"sv-grid-chart-stem svelte-kvdein\"><line class=\"svelte-kvdein\"></line><!><circle class=\"sv-grid-chart-dot svelte-kvdein\"></circle></g>"), Zt = x("<line class=\"sv-grid-chart-ohlc svelte-kvdein\"></line><line class=\"sv-grid-chart-ohlc svelte-kvdein\"></line><line class=\"sv-grid-chart-ohlc svelte-kvdein\"></line>", 1), Qt = x("<line class=\"sv-grid-chart-wick svelte-kvdein\"></line><rect class=\"sv-grid-chart-candle svelte-kvdein\"></rect>", 1), $t = x("<circle class=\"sv-grid-chart-outlier svelte-kvdein\" r=\"2\" fill=\"none\"></circle>"), en = x("<line class=\"sv-grid-chart-whisker svelte-kvdein\"></line><line class=\"sv-grid-chart-whisker svelte-kvdein\"></line><line class=\"sv-grid-chart-whisker svelte-kvdein\"></line><rect class=\"sv-grid-chart-box svelte-kvdein\" fill-opacity=\"0.25\"></rect><line class=\"sv-grid-chart-median svelte-kvdein\"></line><!>", 1), tn = x("<line class=\"sv-grid-chart-errorbar svelte-kvdein\"></line><line class=\"sv-grid-chart-errorbar svelte-kvdein\"></line><line class=\"sv-grid-chart-errorbar svelte-kvdein\"></line>", 1), nn = x("<circle fill-opacity=\"0.7\"></circle>"), rn = x("<g class=\"sv-grid-chart-refpill svelte-kvdein\"><rect height=\"16\" rx=\"3\" class=\"svelte-kvdein\"></rect><text text-anchor=\"middle\" fill=\"#fff\" class=\"svelte-kvdein\"> </text></g>"), an = x("<line class=\"sv-grid-chart-refline svelte-kvdein\"></line><!>", 1), on = x("<line class=\"sv-grid-chart-refline svelte-kvdein\"></line><text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"start\"> </text>", 1), sn = x("<path class=\"sv-grid-chart-overlay-band svelte-kvdein\" fill-opacity=\"0.1\" stroke-opacity=\"0.35\" stroke-width=\"1\"></path>"), cn = x("<!><path class=\"sv-grid-chart-overlay svelte-kvdein\" fill=\"none\" stroke-width=\"2\" stroke-dasharray=\"6 4\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path>", 1), ln = x("<line class=\"sv-grid-chart-datalabel-leader svelte-kvdein\"></line>"), un = x("<!><text> </text>", 1), dn = x("<text class=\"sv-grid-chart-serieslabel svelte-kvdein\" text-anchor=\"start\"> </text>"), fn = x("<line stroke-width=\"1.5\"></line><rect height=\"13\" rx=\"2\"></rect><text class=\"sv-grid-chart-annotation-flagtext svelte-kvdein\" text-anchor=\"middle\" fill=\"#fff\"> </text>", 1), pn = x("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.2\"></path><text class=\"sv-grid-chart-annotation-flagtext svelte-kvdein\" text-anchor=\"middle\" fill=\"#fff\"> </text><text class=\"sv-grid-chart-annotation-label svelte-kvdein\"> </text>", 1), mn = x("<rect width=\"9\" height=\"9\" stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></rect><text class=\"sv-grid-chart-annotation-label svelte-kvdein\"> </text>", 1), hn = x("<circle stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle><text class=\"sv-grid-chart-annotation-label svelte-kvdein\"> </text>", 1), gn = x("<g><!></g>"), _n = x("<path class=\"svelte-kvdein\"></path>"), vn = x("<line class=\"sv-grid-chart-drawing-hit svelte-kvdein\"></line><line stroke-width=\"1.5\" class=\"svelte-kvdein\"></line><!>", 1), yn = x("<rect fill-opacity=\"0.08\" stroke-width=\"1.2\" class=\"svelte-kvdein\"></rect>"), bn = x("<line class=\"sv-grid-chart-drawing-hit svelte-kvdein\"></line><line stroke-width=\"1.2\" stroke-dasharray=\"4 3\" class=\"svelte-kvdein\"></line><text class=\"sv-grid-chart-drawing-label svelte-kvdein\" text-anchor=\"end\"> </text>", 1), xn = x("<line stroke-width=\"1\" class=\"svelte-kvdein\"></line><text class=\"sv-grid-chart-drawing-label svelte-kvdein\"> </text>", 1), Sn = x("<!><rect class=\"sv-grid-chart-drawing-hit svelte-kvdein\"></rect>", 1), Cn = x("<text class=\"sv-grid-chart-drawing-text svelte-kvdein\"> </text>"), wn = x("<circle class=\"sv-grid-chart-drawing-handle svelte-kvdein\" r=\"5\" fill=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle>"), Tn = x("<g><!><!></g>"), En = x("<rect fill=\"var(--sg-accent, #2563eb)\" fill-opacity=\"0.08\" stroke=\"var(--sg-accent, #2563eb)\" stroke-dasharray=\"4 3\"></rect>"), Dn = x("<line stroke=\"var(--sg-accent, #2563eb)\" stroke-width=\"1.5\" stroke-dasharray=\"4 3\"></line>"), On = x("<circle r=\"3.5\" fill=\"var(--sg-accent, #2563eb)\"></circle><!>", 1), kn = x("<g class=\"sv-grid-chart-drawings\"><!><!></g>"), An = x("<line class=\"sv-grid-chart-crosshair svelte-kvdein\"></line>"), jn = x("<g class=\"sv-grid-chart-crosshair-label svelte-kvdein\" pointer-events=\"none\"><rect height=\"15\" rx=\"3\" class=\"svelte-kvdein\"></rect><text text-anchor=\"middle\" class=\"svelte-kvdein\"> </text></g>"), Mn = x("<g class=\"sv-grid-chart-crosshair-label svelte-kvdein\" pointer-events=\"none\"><rect height=\"15\" rx=\"3\" class=\"svelte-kvdein\"></rect><text text-anchor=\"middle\" class=\"svelte-kvdein\"> </text></g><!>", 1), Nn = x("<line class=\"sv-grid-chart-crosshair svelte-kvdein\"></line><!>", 1), Pn = x("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"middle\"> </text>"), Fn = x("<text class=\"sv-grid-chart-heatlabel svelte-kvdein\" text-anchor=\"middle\"> </text>"), In = x("<rect class=\"sv-grid-chart-heatcell svelte-kvdein\"></rect><!>", 1), Ln = x("<stop></stop>"), Rn = x("<defs><linearGradient x1=\"0\" y1=\"1\" x2=\"0\" y2=\"0\"></linearGradient></defs><rect class=\"sv-grid-chart-heatlegend svelte-kvdein\" width=\"10\"></rect><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>", 1), zn = x("<!><!><!><!>", 1), Bn = x("<text class=\"sv-grid-chart-funnel-label svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-funnel-value svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), Vn = x("<path class=\"sv-grid-chart-funnel-seg svelte-kvdein\"></path><!>", 1), Hn = x("<circle class=\"sv-grid-chart-radar-ring svelte-kvdein\"></circle>"), Un = x("<line class=\"sv-grid-chart-radar-spoke svelte-kvdein\"></line><text class=\"sv-grid-chart-axis svelte-kvdein\"> </text>", 1), Wn = x("<circle class=\"sv-grid-chart-radar-dot svelte-kvdein\" r=\"3\" role=\"img\"></circle>"), Gn = x("<path class=\"sv-grid-chart-radar-poly svelte-kvdein\" fill-opacity=\"0.18\" stroke-width=\"2\"></path><!>", 1), Kn = x("<!><!><!>", 1), qn = x("<rect rx=\"2\" role=\"img\"></rect>"), Jn = x("<rect class=\"sv-grid-chart-calendar-legend svelte-kvdein\" width=\"10\" height=\"10\" rx=\"2\"></rect><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>", 1), Yn = x("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\">Less</text><!><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\">More</text>", 1), Xn = x("<path fill=\"none\" stroke-width=\"4\" stroke-linecap=\"butt\" opacity=\"0.7\"></path>"), Zn = x("<line stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\" stroke-linecap=\"round\"></line>"), Qn = x("<!><path fill=\"none\" stroke=\"var(--sg-border, #e2e8f0)\" stroke-width=\"16\" stroke-linecap=\"round\"></path><!><path fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\"></path><!><path class=\"sv-grid-chart-gauge-needle svelte-kvdein\"></path><circle class=\"sv-grid-chart-gauge-hub svelte-kvdein\"></circle><circle class=\"sv-grid-chart-gauge-hub-dot svelte-kvdein\" r=\"2.5\"></circle><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-gauge-value svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), $n = x("<text class=\"sv-grid-chart-treemap-label svelte-kvdein\"> </text>"), er = x("<text class=\"sv-grid-chart-treemap-value svelte-kvdein\" opacity=\"0.85\"> </text>"), tr = x("<rect class=\"sv-grid-chart-treemap-cell svelte-kvdein\"></rect><!><!>", 1), nr = x("<path class=\"sv-grid-chart-sankey-link svelte-kvdein\" fill=\"none\" stroke-opacity=\"0.35\" role=\"img\"></path>"), rr = x("<rect class=\"sv-grid-chart-sankey-node svelte-kvdein\" role=\"img\"></rect><text class=\"sv-grid-chart-sankey-label svelte-kvdein\"> </text>", 1), ir = x("<circle class=\"sv-grid-chart-gridline svelte-kvdein\" fill=\"none\"></circle>"), ar = x("<text class=\"sv-grid-chart-axis svelte-kvdein\"> </text>"), or = x("<path class=\"sv-grid-chart-arc-track svelte-kvdein\"></path>"), sr = x("<path class=\"sv-grid-chart-ribbon svelte-kvdein\" fill-opacity=\"0.45\" stroke-opacity=\"0.6\"></path>"), cr = x("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path>"), lr = x("<text class=\"sv-grid-chart-datalabel on-bar svelte-kvdein\" text-anchor=\"middle\" dominant-baseline=\"middle\" pointer-events=\"none\"> </text>"), ur = x("<!><!><!><!><!><!>", 1), dr = x("<rect></rect>"), fr = x("<line class=\"sv-grid-chart-bullet-target\" stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\"></line>"), pr = x("<g class=\"sv-grid-chart-bullet\"><!><rect class=\"sv-grid-chart-bar svelte-kvdein\"></rect><!></g>"), mr = x("<polyline class=\"sv-grid-chart-callout svelte-kvdein\" fill=\"none\" stroke-width=\"1\"></polyline><text class=\"sv-grid-chart-callout-label svelte-kvdein\"> </text>", 1), hr = x("<text class=\"sv-grid-chart-datalabel on-bar svelte-kvdein\" text-anchor=\"middle\" dominant-baseline=\"middle\"> </text>"), gr = x("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path><!>", 1), _r = x("<text class=\"sv-grid-chart-donut-total svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-donut-label svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), vr = x("<rect class=\"sv-grid-chart-cat-hit svelte-kvdein\" data-dense=\"true\"></rect>"), yr = x("<rect class=\"sv-grid-chart-cat-hit svelte-kvdein\"></rect>"), br = x("<rect class=\"sv-grid-chart-zoom-rect svelte-kvdein\"></rect>"), xr = x("<path fill-opacity=\"0.10\" stroke=\"none\"></path>"), Sr = x("<!><path fill=\"none\" stroke-width=\"1.2\" opacity=\"0.75\"></path>", 1), Cr = x("<rect opacity=\"0.55\"></rect>"), wr = y("<div class=\"sv-grid-chart-brush-host svelte-kvdein\"><svg class=\"sv-grid-chart-brush svelte-kvdein\" width=\"100%\" role=\"slider\" tabindex=\"0\" aria-orientation=\"horizontal\"><!><!><rect class=\"sv-grid-chart-brush-mask svelte-kvdein\"></rect><rect class=\"sv-grid-chart-brush-mask svelte-kvdein\"></rect><rect class=\"sv-grid-chart-brush-window svelte-kvdein\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-kvdein\" width=\"8\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-kvdein\" width=\"8\"></rect></svg></div>"), Tr = y("<div class=\"sv-grid-chart-empty svelte-kvdein\"> </div>"), Er = y("<input class=\"sv-grid-chart-textdraft svelte-kvdein\" type=\"text\"/>"), Dr = y("<span class=\"sv-grid-chart-tooltip-dot svelte-kvdein\"></span>"), Or = y("<span class=\"sv-grid-chart-tooltip-row-label svelte-kvdein\"> </span>"), kr = y("<span class=\"sv-grid-chart-tooltip-row svelte-kvdein\"><!> <!> <span class=\"sv-grid-chart-tooltip-row-value svelte-kvdein\"> </span></span>"), Ar = y("<span class=\"sv-grid-chart-tooltip-title svelte-kvdein\"> </span> <!>", 1), jr = y("<div role=\"tooltip\"><!></div>"), Mr = y("<span class=\"sv-grid-chart-swatch svelte-kvdein\"></span> ", 1), Nr = y("<button type=\"button\"><!></button>"), Pr = y("<button type=\"button\" class=\"sv-grid-chart-legend-more svelte-kvdein\"> </button>"), Fr = y("<div><!> <!></div>"), Ir = y("<div class=\"sv-grid-chart-live sv-grid-chart-sr-only svelte-kvdein\" aria-live=\"polite\" aria-atomic=\"true\"> </div>"), Lr = y("<th> </th>"), Rr = y("<td> </td>"), zr = y("<tr></tr>"), Br = y("<div><!> <svg width=\"100%\"><!><!><!><!><!><!><g><!><!><!><!><!><!><!><!></g><!><!><g></g><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!></svg> <!> <!> <!> <!> <!> <!> <!> <div class=\"sv-grid-chart-sr-only svelte-kvdein\"><table><caption> <!><!></caption><thead><tr></tr></thead><tbody></tbody></table></div></div>");
|
|
447
|
+
function Vr(ne, f) {
|
|
448
|
+
ve(f, !0);
|
|
449
|
+
let ce = M(f, "legend", 3, !0), y = M(f, "interactive", 3, !0), x = M(f, "tooltipMode", 3, "shared"), Se = M(f, "tooltipPosition", 3, "follow"), Ce = M(f, "tooltipSticky", 3, !1), we = M(f, "zoomable", 3, !1), L = M(f, "zoom", 15, null), Ae = M(f, "rangePresets", 3, !1), R = M(f, "contextMenu", 3, !1), z = M(f, "animate", 3, !1), Fe = M(f, "drillable", 3, !1), Ie = M(f, "drillPath", 31, () => le([])), Le = M(f, "selectable", 3, !1), Re = M(f, "selected", 31, () => le([])), ze = M(f, "announce", 3, !0), Be = M(f, "describe", 3, !0), Ve = M(f, "live", 3, !1), He = M(f, "hoverHighlight", 3, !0), Ue = M(f, "crosshairLabels", 3, !0), We = M(f, "brush", 3, !1), Ge = M(f, "brushHeight", 3, 88), qe = M(f, "autosize", 3, !1), Je = M(f, "annotatable", 3, !1), Ye = M(f, "drawable", 3, !1), B = N(() => et(f.localeText)), Xe = A("");
|
|
450
|
+
ae(() => {
|
|
451
|
+
if (!Be()) {
|
|
452
|
+
p(Xe, "");
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
let e = h(K), t = !0;
|
|
456
|
+
return import("./chart-summary-B52586F9.js").then(({ chartSummary: n }) => {
|
|
457
|
+
t && p(Xe, n(e), !0);
|
|
458
|
+
}), () => {
|
|
459
|
+
t = !1;
|
|
460
|
+
};
|
|
461
|
+
});
|
|
462
|
+
async function $e() {
|
|
463
|
+
if (h(Xe)) {
|
|
464
|
+
try {
|
|
465
|
+
await navigator.clipboard?.writeText(h(Xe));
|
|
466
|
+
} catch {}
|
|
467
|
+
p(Oo, `${h(B).describeCopied}. ${h(Xe)}`);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
let Vr = A(0), Hr = A(0), Ur = N(() => f.width ?? (qe() && h(Vr) > 24 ? h(Vr) : f.spec.width ?? 520)), Wr = N(() => f.height ?? (qe() && h(Hr) > 24 ? h(Hr) : f.spec.height ?? 300)), Gr = N(() => {
|
|
471
|
+
if (!f.spec.responsive?.length) return;
|
|
472
|
+
let e;
|
|
473
|
+
for (let t of u(f.spec.responsive, h(Ur), h(Wr))) t.legend !== void 0 && (e = t.legend);
|
|
474
|
+
return e;
|
|
475
|
+
}), H = N(() => {
|
|
476
|
+
if (!f.spec.responsive?.length) return f.spec;
|
|
477
|
+
let { responsive: e, ...t } = o(f.spec, h(Ur), h(Wr));
|
|
478
|
+
return t;
|
|
479
|
+
}), Kr = N(() => h(Gr) ?? ce()), qr = N(() => h(Kr) === !0 ? "bottom" : h(Kr) === !1 ? null : h(Kr)), Jr = N(() => h(qr) === "left" || h(qr) === "right"), Yr = A(0), Xr = A(0), Zr = A(0), Qr = A(0), $r = N(() => {
|
|
480
|
+
if (!qe() || h(Vr) <= 24) return null;
|
|
481
|
+
let e = h(ai) ? h(Yr) : 0, t = h(qr) ? h(Zr) : 0, n = h(qr) ? h(Xr) : 0, r = We() && !va.has(f.spec.type) ? h(Qr) : 0, i = Math.max(120, Math.round(h(Vr) - (h(Jr) ? n + 8 : 0))), a = e + (h(Jr) ? 0 : t) + r, o = h(Jr) ? 16 : (e ? 8 : 0) + (t ? 8 : 0) + (r ? 8 : 0);
|
|
482
|
+
return {
|
|
483
|
+
width: i,
|
|
484
|
+
height: h(Hr) > 24 ? Math.max(120, Math.round(h(Hr) - a - o)) : void 0
|
|
485
|
+
};
|
|
486
|
+
}), ei = N(() => f.width ?? h($r)?.width), ti = N(() => f.height ?? h($r)?.height), ni = N(() => typeof f.dataLabels == "object" ? {
|
|
487
|
+
show: !0,
|
|
488
|
+
...f.dataLabels
|
|
489
|
+
} : f.dataLabels === void 0 ? h(H).dataLabels ? {
|
|
490
|
+
show: h(H).dataLabels.show !== !1,
|
|
491
|
+
...h(H).dataLabels
|
|
492
|
+
} : { show: !1 } : { show: !!f.dataLabels }), ri = N(() => we() ? we() === !0 ? {
|
|
493
|
+
drag: !0,
|
|
494
|
+
wheel: !1,
|
|
495
|
+
pinch: !1,
|
|
496
|
+
pan: !1,
|
|
497
|
+
axis: "x"
|
|
498
|
+
} : {
|
|
499
|
+
drag: we().drag !== !1,
|
|
500
|
+
wheel: we().wheel ?? !1,
|
|
501
|
+
pinch: we().pinch ?? !!we().wheel,
|
|
502
|
+
pan: we().pan ?? !1,
|
|
503
|
+
axis: we().axis ?? "x"
|
|
504
|
+
} : null), ii = A(!1), ai = N(() => f.toolbar ?? (!!we() || !!f.onDrill || Je() || !!Ae() || Fe() || !!Ye())), oi = A(!1), U = (e) => f.formatValue ? f.formatValue(e) : h(H).valueFormat ? d(e, h(H).valueFormat, h(H)) : Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e), si = N(() => {
|
|
505
|
+
let e = h(H).y2Axis;
|
|
506
|
+
return f.formatValue ? f.formatValue : e?.formatter ? (t) => e.formatter(t, -1) : e?.format ? (t) => d(t, e.format, h(H)) : (e) => Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e);
|
|
507
|
+
}), ci = N(() => new Set(h(H).series.filter((e) => e.axis === "right").map((e) => e.label))), li = (e) => e && h(ci).has(e) ? h(si) : U, ui = A(le(new Set(f.spec.series.filter((e) => e.visible === !1).map((e) => e.label)))), di = A(null), fi = A(null), pi = A(null), mi = N(() => h(H).palette ?? h(fi) ?? n), hi = `svgc-${Math.random().toString(36).slice(2, 8)}`, gi = N(() => h(H).series.map((e, t) => ({
|
|
508
|
+
...e,
|
|
509
|
+
color: e.color ?? h(mi)[t % h(mi).length]
|
|
510
|
+
}))), _i = N(() => h(H).series.map((e, t) => e.pattern ? e.pattern : h(H).patternFallback ? [
|
|
511
|
+
"stripe",
|
|
512
|
+
"crosshatch",
|
|
513
|
+
"dots",
|
|
514
|
+
"diagonal"
|
|
515
|
+
][t % 4] : "solid")), vi = N(() => {
|
|
516
|
+
let e = {};
|
|
517
|
+
return h(gi).forEach((t, n) => {
|
|
518
|
+
let r = h(_i)[n];
|
|
519
|
+
e[t.label] = r === "solid" || !r ? t.color : `url(#${hi}-pat-${n})`;
|
|
520
|
+
}), e;
|
|
521
|
+
}), yi = N(() => h(gi).map((e, t) => ({
|
|
522
|
+
id: `${hi}-pat-${t}`,
|
|
523
|
+
color: e.color,
|
|
524
|
+
kind: h(_i)[t] ?? "solid"
|
|
525
|
+
})).filter((e) => e.kind !== "solid")), bi = N(() => {
|
|
526
|
+
if (h(di) == null) return h(ui);
|
|
527
|
+
let e = h(H).type === "pie" ? h(Na) : h(H).series.map((e) => e.label);
|
|
528
|
+
return new Set(e.filter((e) => e !== h(di)));
|
|
529
|
+
}), xi = N(() => L() !== null);
|
|
530
|
+
function Si(e) {
|
|
531
|
+
if (!(e === null && L() === null || e !== null && L() !== null && e.i0 === L().i0 && e.i1 === L().i1 && (e.y?.min ?? null) === (L().y?.min ?? null) && (e.y?.max ?? null) === (L().y?.max ?? null)) && (L(e), f.onZoom?.(e), f.syncGroup && !wi)) {
|
|
532
|
+
let t = h(H).categories.length;
|
|
533
|
+
Ne(f.syncGroup, e, t, Ci, e ? [h(H).categories[e.i0] ?? "", h(H).categories[e.i1] ?? ""] : null);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
let Ci = Symbol("svchart"), wi = !1, Ti = N(() => f.syncGroup ? je(f.syncGroup) : null), Ei = A(!1);
|
|
537
|
+
function Di(e) {
|
|
538
|
+
Si(e);
|
|
539
|
+
}
|
|
540
|
+
function Oi() {
|
|
541
|
+
Si(null);
|
|
542
|
+
}
|
|
543
|
+
function ki(e, t) {
|
|
544
|
+
let n = go(e, t);
|
|
545
|
+
return n == null ? null : (L() ? L().i0 : 0) + n;
|
|
546
|
+
}
|
|
547
|
+
function Ai(e) {
|
|
548
|
+
if (!h(ri)?.wheel || !h(J) || h(oi) || h(ri).wheel === "modifier" && !(e.ctrlKey || e.metaKey)) return;
|
|
549
|
+
let t = zi(e);
|
|
550
|
+
if (!t || t.x < h(q).plot.x || t.x > h(q).plot.x + h(q).plot.w) return;
|
|
551
|
+
e.preventDefault();
|
|
552
|
+
let n = ki(e.clientX, e.currentTarget) ?? 0, r = e.deltaY > 0 ? 1.25 : .8;
|
|
553
|
+
Si(Te(L(), h(H).categories.length, n, r));
|
|
554
|
+
}
|
|
555
|
+
let ji = /* @__PURE__ */ new Map(), Mi = null, Ni = null, Pi = (e) => !!h(ri)?.pan && h(xi) && (h(ii) || (h(ri).pan === "shift" || h(ri).pan === !0) && e.shiftKey), Fi = A(null), Ii = A(null), Li = A(null), Ri = N(() => {
|
|
556
|
+
if (!h(Ii) || !h(Li)) return null;
|
|
557
|
+
let e = Math.min(h(Ii).x, h(Li).x), t = Math.min(h(Ii).y, h(Li).y), n = Math.abs(h(Li).x - h(Ii).x), r = Math.abs(h(Li).y - h(Ii).y);
|
|
558
|
+
return n > 4 && r > 4 ? {
|
|
559
|
+
x: e,
|
|
560
|
+
y: t,
|
|
561
|
+
w: n,
|
|
562
|
+
h: r
|
|
563
|
+
} : null;
|
|
564
|
+
});
|
|
565
|
+
function zi(e) {
|
|
566
|
+
if (!h(Fi)) return null;
|
|
567
|
+
let t = h(Fi).getBoundingClientRect();
|
|
568
|
+
return {
|
|
569
|
+
x: (e.clientX - t.left) / t.width * h(q).width,
|
|
570
|
+
y: (e.clientY - t.top) / t.height * h(q).height
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
function Bi(e) {
|
|
574
|
+
let t = h(co) ? e.y - h(q).plot.y : e.x - h(q).plot.x, n = Math.floor(t / h(lo));
|
|
575
|
+
return Math.max(0, Math.min(h(K).categories.length - 1, n));
|
|
576
|
+
}
|
|
577
|
+
function Vi(e) {
|
|
578
|
+
if (h(oi) || h(Ji) || h(ea) || !h(ri) || !h(J)) return;
|
|
579
|
+
let t = zi(e);
|
|
580
|
+
if (t && !(t.x < h(q).plot.x || t.x > h(q).plot.x + h(q).plot.w || t.y < h(q).plot.y || t.y > h(q).plot.y + h(q).plot.h)) {
|
|
581
|
+
if (e.target.setPointerCapture?.(e.pointerId), h(ri).pinch && (ji.set(e.pointerId, t), ji.size === 2)) {
|
|
582
|
+
let [e, t] = [...ji.values()];
|
|
583
|
+
Mi = {
|
|
584
|
+
dist: Math.hypot(e.x - t.x, e.y - t.y) || 1,
|
|
585
|
+
mid: Bi({
|
|
586
|
+
x: (e.x + t.x) / 2,
|
|
587
|
+
y: (e.y + t.y) / 2
|
|
588
|
+
}) + (L() ? L().i0 : 0),
|
|
589
|
+
start: L()
|
|
590
|
+
}, p(Ii, null), p(Li, null);
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
if (Pi(e)) {
|
|
594
|
+
Ni = {
|
|
595
|
+
startIndex: Bi(t),
|
|
596
|
+
start: L()
|
|
597
|
+
};
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
h(ri).drag && (p(Ii, t, !0), p(Li, t, !0));
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
function Hi(e) {
|
|
604
|
+
if (Mi && ji.has(e.pointerId)) {
|
|
605
|
+
let t = zi(e);
|
|
606
|
+
t && ji.set(e.pointerId, t);
|
|
607
|
+
let [n, r] = [...ji.values()];
|
|
608
|
+
if (n && r) {
|
|
609
|
+
let e = Math.hypot(n.x - r.x, n.y - r.y) || 1;
|
|
610
|
+
Si(De(Mi.start, h(H).categories.length, Mi.mid, e / Mi.dist));
|
|
611
|
+
}
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
if (Ni) {
|
|
615
|
+
let t = zi(e);
|
|
616
|
+
if (!t) return;
|
|
617
|
+
let n = Ni.startIndex - Bi(t);
|
|
618
|
+
Si(Ee(Ni.start, h(H).categories.length, n));
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
h(Ii) && p(Li, zi(e), !0);
|
|
622
|
+
}
|
|
623
|
+
function Ui(e) {
|
|
624
|
+
if (e && ji.delete(e.pointerId), Mi) {
|
|
625
|
+
ji.size < 2 && (Mi = null);
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
if (Ni) {
|
|
629
|
+
Ni = null;
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
if (!h(Ii) || !h(Li)) {
|
|
633
|
+
p(Ii, null), p(Li, null);
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
let t = h(Ri);
|
|
637
|
+
if (t) {
|
|
638
|
+
let e = h(ri)?.axis ?? "x", n = Bi({
|
|
639
|
+
x: t.x,
|
|
640
|
+
y: t.y
|
|
641
|
+
}), r = Bi({
|
|
642
|
+
x: t.x + t.w,
|
|
643
|
+
y: t.y + t.h
|
|
644
|
+
}), i = L() ? L().i0 : 0, a = e === "y" ? L()?.i0 ?? 0 : i + Math.min(n, r), o = e === "y" ? L()?.i1 ?? h(H).categories.length - 1 : i + Math.max(n, r), s;
|
|
645
|
+
if (e !== "x" && h(Ya) && !h(co)) {
|
|
646
|
+
let e = h(Ya).yInvert(t.y), n = h(Ya).yInvert(t.y + t.h);
|
|
647
|
+
Number.isFinite(e) && Number.isFinite(n) && e !== n && (s = {
|
|
648
|
+
min: Math.min(e, n),
|
|
649
|
+
max: Math.max(e, n)
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
(o > a || s) && Si({
|
|
653
|
+
i0: a,
|
|
654
|
+
i1: Math.max(a, o),
|
|
655
|
+
...s ? { y: s } : {}
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
p(Ii, null), p(Li, null);
|
|
659
|
+
}
|
|
660
|
+
function Wi() {
|
|
661
|
+
we() && h(xi) && Oi();
|
|
662
|
+
}
|
|
663
|
+
let Gi = [
|
|
664
|
+
"trend",
|
|
665
|
+
"hray",
|
|
666
|
+
"fib",
|
|
667
|
+
"rect",
|
|
668
|
+
"arrow",
|
|
669
|
+
"text"
|
|
670
|
+
], Ki = N(() => ({
|
|
671
|
+
trend: h(B).toolTrend,
|
|
672
|
+
hray: h(B).toolRay,
|
|
673
|
+
fib: h(B).toolFib,
|
|
674
|
+
rect: h(B).toolRect,
|
|
675
|
+
arrow: h(B).toolArrow,
|
|
676
|
+
text: h(B).toolText
|
|
677
|
+
})), qi = N(() => Ye() ? Ye() === !0 ? Gi : Ye() : []), Ji = A(null), W = A(null), Yi = A(null), Xi = A(null), Zi = A(null), Qi = A("");
|
|
678
|
+
function $i() {
|
|
679
|
+
let e = h(Zi), t = h(Qi).trim();
|
|
680
|
+
p(Zi, null), p(Qi, ""), !(!e || !t) && aa([...na(), {
|
|
681
|
+
id: `d${Date.now().toString(36)}${ta++}`,
|
|
682
|
+
kind: "text",
|
|
683
|
+
points: [{
|
|
684
|
+
x: e.x,
|
|
685
|
+
y: e.y
|
|
686
|
+
}],
|
|
687
|
+
text: t
|
|
688
|
+
}]);
|
|
689
|
+
}
|
|
690
|
+
let ea = A(null), ta = 0, na = () => h(H).drawings ?? [];
|
|
691
|
+
function ra(e) {
|
|
692
|
+
if (!h(Ya)) return null;
|
|
693
|
+
let t = h(q).axes?.x;
|
|
694
|
+
if (t?.type === "number") return h(Ya).xInvertValue(e);
|
|
695
|
+
if (t?.type === "time") return new Date(h(Ya).xInvertValue(e)).toISOString();
|
|
696
|
+
let n = Math.round(h(Ya).xInvert(e));
|
|
697
|
+
return h(K).categories[n] ?? null;
|
|
698
|
+
}
|
|
699
|
+
function ia(e) {
|
|
700
|
+
let t = zi(e);
|
|
701
|
+
if (!t || !h(Ya) || t.x < h(q).plot.x || t.x > h(q).plot.x + h(q).plot.w || t.y < h(q).plot.y || t.y > h(q).plot.y + h(q).plot.h) return null;
|
|
702
|
+
let n = ra(t.x);
|
|
703
|
+
if (n == null) return null;
|
|
704
|
+
let r = h(Ya).yInvert(t.y);
|
|
705
|
+
return Number.isFinite(r) ? {
|
|
706
|
+
x: n,
|
|
707
|
+
y: Math.round(r * 1e3) / 1e3,
|
|
708
|
+
px: t.x,
|
|
709
|
+
py: t.y
|
|
710
|
+
} : null;
|
|
711
|
+
}
|
|
712
|
+
function aa(e) {
|
|
713
|
+
f.onDrawingsChange?.(e);
|
|
714
|
+
}
|
|
715
|
+
function oa(e) {
|
|
716
|
+
p(Ji, h(Ji) === e ? null : e, !0), p(W, null), p(Yi, null), p(Zi, null);
|
|
717
|
+
}
|
|
718
|
+
function sa(e) {
|
|
719
|
+
if (!h(Ji)) return;
|
|
720
|
+
let t = ia(e);
|
|
721
|
+
if (!t) return;
|
|
722
|
+
if (h(Ji) === "text") {
|
|
723
|
+
let n = h(Jo)?.getBoundingClientRect();
|
|
724
|
+
p(Qi, ""), p(Zi, {
|
|
725
|
+
x: t.x,
|
|
726
|
+
y: t.y,
|
|
727
|
+
left: n ? e.clientX - n.left : 0,
|
|
728
|
+
top: n ? e.clientY - n.top : 0
|
|
729
|
+
}, !0);
|
|
730
|
+
return;
|
|
731
|
+
}
|
|
732
|
+
if (h(Ji) === "hray") {
|
|
733
|
+
aa([...na(), {
|
|
734
|
+
id: `d${Date.now().toString(36)}${ta++}`,
|
|
735
|
+
kind: h(Ji),
|
|
736
|
+
points: [{
|
|
737
|
+
x: t.x,
|
|
738
|
+
y: t.y
|
|
739
|
+
}]
|
|
740
|
+
}]);
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
if (!h(W)) {
|
|
744
|
+
p(W, t, !0), p(Yi, {
|
|
745
|
+
x: t.px,
|
|
746
|
+
y: t.py
|
|
747
|
+
}, !0);
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
let n = h(W);
|
|
751
|
+
p(W, null), p(Yi, null), aa([...na(), {
|
|
752
|
+
id: `d${Date.now().toString(36)}${ta++}`,
|
|
753
|
+
kind: h(Ji),
|
|
754
|
+
points: [{
|
|
755
|
+
x: n.x,
|
|
756
|
+
y: n.y
|
|
757
|
+
}, {
|
|
758
|
+
x: t.x,
|
|
759
|
+
y: t.y
|
|
760
|
+
}]
|
|
761
|
+
}]);
|
|
762
|
+
}
|
|
763
|
+
function ca(e) {
|
|
764
|
+
if (h(ea)) {
|
|
765
|
+
let t = ia(e);
|
|
766
|
+
if (!t) return;
|
|
767
|
+
let { id: n, index: r } = h(ea);
|
|
768
|
+
aa(na().map((e) => e.id === n ? {
|
|
769
|
+
...e,
|
|
770
|
+
points: e.points.map((e, n) => n === r ? {
|
|
771
|
+
x: t.x,
|
|
772
|
+
y: t.y
|
|
773
|
+
} : e)
|
|
774
|
+
} : e));
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
if (h(W)) {
|
|
778
|
+
let t = zi(e);
|
|
779
|
+
t && p(Yi, t, !0);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
function la(e) {
|
|
783
|
+
aa(na().filter((t) => t.id !== e)), h(Xi) === e && p(Xi, null);
|
|
784
|
+
}
|
|
785
|
+
function ua(e, t) {
|
|
786
|
+
(e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), la(t));
|
|
787
|
+
}
|
|
788
|
+
function da(e) {
|
|
789
|
+
if (e.key === "Escape") {
|
|
790
|
+
if (h(Zo)) {
|
|
791
|
+
fa();
|
|
792
|
+
return;
|
|
793
|
+
}
|
|
794
|
+
h(Ji) && (h(W) ? (p(W, null), p(Yi, null)) : p(Ji, null));
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
function fa() {
|
|
798
|
+
p(Zo, null), Q();
|
|
799
|
+
}
|
|
800
|
+
function pa(e) {
|
|
801
|
+
if (!(!Ce() || !h(Xo))) {
|
|
802
|
+
if (h(Zo) && h(Zo).index === e) {
|
|
803
|
+
fa();
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
p(Zo, {
|
|
807
|
+
index: e,
|
|
808
|
+
series: h(Xo).ctx.series ?? null
|
|
809
|
+
}, !0);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
ae(() => {
|
|
813
|
+
if (!h(Zo) || typeof document > "u") return;
|
|
814
|
+
let e = (e) => {
|
|
815
|
+
h(Jo) && e.target instanceof Node && h(Jo).contains(e.target) || fa();
|
|
816
|
+
};
|
|
817
|
+
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
818
|
+
});
|
|
819
|
+
let ma = (e) => {
|
|
820
|
+
e.focus();
|
|
821
|
+
}, ha = N(() => h(H).type === "candlestick" || h(H).type === "ohlc"), ga = N(() => h(H).type === "ohlc"), _a = N(() => Math.max(50, (h(ei) ?? h(H).width ?? 520) - 60)), va = /* @__PURE__ */ new Set([
|
|
822
|
+
"pie",
|
|
823
|
+
"heatmap",
|
|
824
|
+
"funnel",
|
|
825
|
+
"radar",
|
|
826
|
+
"calendar",
|
|
827
|
+
"gauge",
|
|
828
|
+
"treemap",
|
|
829
|
+
"sankey",
|
|
830
|
+
"sunburst",
|
|
831
|
+
"radial-bar",
|
|
832
|
+
"radial-column",
|
|
833
|
+
"nightingale",
|
|
834
|
+
"chord",
|
|
835
|
+
"bullet"
|
|
836
|
+
]), ya = /* @__PURE__ */ new Set([
|
|
837
|
+
"lollipop",
|
|
838
|
+
"dumbbell",
|
|
839
|
+
"range-area",
|
|
840
|
+
"range-bar",
|
|
841
|
+
"stream",
|
|
842
|
+
"pareto"
|
|
843
|
+
]), ba = N(() => We() && !va.has(h(H).type)), xa = N(() => ({
|
|
844
|
+
...h(H),
|
|
845
|
+
width: h(ei) ?? h(H).width,
|
|
846
|
+
height: Ge(),
|
|
847
|
+
title: void 0,
|
|
848
|
+
subtitle: void 0,
|
|
849
|
+
caption: void 0,
|
|
850
|
+
yAxisTitle: void 0,
|
|
851
|
+
y2AxisTitle: void 0,
|
|
852
|
+
xAxisTitle: void 0,
|
|
853
|
+
xAxis: {
|
|
854
|
+
...h(H).xAxis,
|
|
855
|
+
title: void 0,
|
|
856
|
+
labels: !1
|
|
857
|
+
},
|
|
858
|
+
yAxis: {
|
|
859
|
+
...h(H).yAxis,
|
|
860
|
+
title: void 0,
|
|
861
|
+
labels: !1
|
|
862
|
+
},
|
|
863
|
+
y2Axis: {
|
|
864
|
+
...h(H).y2Axis,
|
|
865
|
+
title: void 0,
|
|
866
|
+
labels: !1
|
|
867
|
+
},
|
|
868
|
+
referenceLines: void 0,
|
|
869
|
+
referenceBands: void 0,
|
|
870
|
+
annotations: void 0,
|
|
871
|
+
drawings: void 0,
|
|
872
|
+
seriesLabels: void 0,
|
|
873
|
+
dataLabels: { show: !1 },
|
|
874
|
+
type: h(ha) || h(H).type === "boxplot" || ya.has(h(H).type) ? "line" : h(H).type === "histogram" ? "bar" : h(H).type,
|
|
875
|
+
stackOffset: void 0,
|
|
876
|
+
series: h(gi).filter((e) => !h(bi).has(e.label)).map((e) => e.ohlc || e.boxes ? {
|
|
877
|
+
...e,
|
|
878
|
+
ohlc: void 0,
|
|
879
|
+
boxes: void 0,
|
|
880
|
+
errors: void 0,
|
|
881
|
+
type: "line"
|
|
882
|
+
} : e.errors || e.type && ya.has(e.type) || e.type === "scatter" ? {
|
|
883
|
+
...e,
|
|
884
|
+
errors: void 0,
|
|
885
|
+
type: e.type && (ya.has(e.type) || e.type === "scatter") ? "line" : e.type
|
|
886
|
+
} : e)
|
|
887
|
+
})), G = N(() => h(ba) ? te(re(h(xa), h(_a))) : null), Sa = N(() => {
|
|
888
|
+
let e = h(H).categories.length;
|
|
889
|
+
return !L() || e === 0 ? {
|
|
890
|
+
t0: 0,
|
|
891
|
+
t1: 1
|
|
892
|
+
} : {
|
|
893
|
+
t0: L().i0 / e,
|
|
894
|
+
t1: (L().i1 + 1) / e
|
|
895
|
+
};
|
|
896
|
+
}), Ca = A(null);
|
|
897
|
+
function wa(e, t) {
|
|
898
|
+
let n = t.getBoundingClientRect();
|
|
899
|
+
return h(G) ? (e.clientX - n.left) / n.width * h(G).width : 0;
|
|
900
|
+
}
|
|
901
|
+
function Ta(e, t) {
|
|
902
|
+
if (!h(G)) return;
|
|
903
|
+
let n = e.currentTarget, r = wa(e, n.ownerSVGElement ?? n);
|
|
904
|
+
p(Ca, {
|
|
905
|
+
mode: t,
|
|
906
|
+
startX: r,
|
|
907
|
+
startT0: h(Sa).t0,
|
|
908
|
+
startT1: h(Sa).t1
|
|
909
|
+
}, !0), e.currentTarget.setPointerCapture?.(e.pointerId), e.stopPropagation();
|
|
910
|
+
}
|
|
911
|
+
function Ea(e) {
|
|
912
|
+
if (!h(Ca) || !h(G)) return;
|
|
913
|
+
let t = (wa(e, e.currentTarget.ownerSVGElement ?? e.currentTarget) - h(Ca).startX) / h(G).plot.w, n = h(H).categories.length;
|
|
914
|
+
if (n === 0) return;
|
|
915
|
+
let r = h(Ca).startT0, i = h(Ca).startT1;
|
|
916
|
+
if (h(Ca).mode === "move") {
|
|
917
|
+
let e = i - r;
|
|
918
|
+
r = Math.max(0, Math.min(1 - e, r + t)), i = r + e;
|
|
919
|
+
} else h(Ca).mode === "left" ? r = Math.max(0, Math.min(i - 1 / n, r + t)) : i = Math.min(1, Math.max(r + 1 / n, i + t));
|
|
920
|
+
let a = Math.max(0, Math.floor(r * n)), o = Math.min(n - 1, Math.ceil(i * n) - 1);
|
|
921
|
+
a === 0 && o === n - 1 ? Si(null) : Si({
|
|
922
|
+
i0: a,
|
|
923
|
+
i1: Math.max(a, o),
|
|
924
|
+
...L()?.y ? { y: L().y } : {}
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
function Da(e) {
|
|
928
|
+
p(Ca, null), e.currentTarget.releasePointerCapture?.(e.pointerId);
|
|
929
|
+
}
|
|
930
|
+
let Oa = N(() => h(H).tree ?? h(H).treemap ?? null), ka = N(() => Fe() && !!h(Oa) && (h(H).type === "sunburst" || h(H).type === "treemap" || h(H).type === "pie")), Aa = N(() => h(ka) && Ie().length ? l(h(Oa), Ie()) : h(Oa)), ja = (e) => e.value ?? (e.children ?? []).reduce((e, t) => e + ja(t), 0), Ma = N(() => h(H).type === "pie" && h(ka) && h(Aa) ? h(Aa) : null), Na = N(() => h(Ma) ? (h(Ma).children ?? []).map((e) => e.name) : h(H).categories), Pa = (e) => !!h(Ma) && !!h(Ma).children?.find((t) => t.name === e)?.children?.length;
|
|
931
|
+
function Fa(e) {
|
|
932
|
+
Ie(e);
|
|
933
|
+
}
|
|
934
|
+
function Ia(e) {
|
|
935
|
+
return !h(ka) || !e || !h(Oa) || !l(h(Oa), e)?.children?.length ? !1 : (Fa(e), !0);
|
|
936
|
+
}
|
|
937
|
+
let K = N(() => {
|
|
938
|
+
if (h(Ma)) {
|
|
939
|
+
let e = h(Ma).children ?? [], t = h(H).series[0]?.label ?? h(Ma).name, n = e.map((e) => h(bi).has(e.name) ? 0 : ja(e)), r = e.map((e) => e.color ?? null);
|
|
940
|
+
return {
|
|
941
|
+
...h(H),
|
|
942
|
+
categories: h(Na),
|
|
943
|
+
series: [{
|
|
944
|
+
label: t,
|
|
945
|
+
values: n,
|
|
946
|
+
...r.some(Boolean) ? { colors: r } : {}
|
|
947
|
+
}]
|
|
948
|
+
};
|
|
949
|
+
}
|
|
950
|
+
if (h(ka) && h(Aa) && Ie().length) {
|
|
951
|
+
let e = {
|
|
952
|
+
...h(H),
|
|
953
|
+
tree: h(Aa),
|
|
954
|
+
treemap: h(Aa)
|
|
955
|
+
};
|
|
956
|
+
return h(H).type === "treemap" ? e : {
|
|
957
|
+
...e,
|
|
958
|
+
series: h(gi)
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
if (h(H).type === "pie" || h($a)) {
|
|
962
|
+
let e = h(gi)[0];
|
|
963
|
+
if (!e) return h(H);
|
|
964
|
+
let t = e.values.map((e, t) => h(bi).has(h(H).categories[t] ?? String(t)) ? 0 : e);
|
|
965
|
+
return {
|
|
966
|
+
...h(H),
|
|
967
|
+
series: [{
|
|
968
|
+
...e,
|
|
969
|
+
values: t
|
|
970
|
+
}]
|
|
971
|
+
};
|
|
972
|
+
}
|
|
973
|
+
let e = h(gi).filter((e) => !h(bi).has(e.label)), t = L() ? c({
|
|
974
|
+
...h(H),
|
|
975
|
+
series: e
|
|
976
|
+
}, L().i0, L().i1) : {
|
|
977
|
+
...h(H),
|
|
978
|
+
series: e
|
|
979
|
+
};
|
|
980
|
+
if (L()?.y) {
|
|
981
|
+
let e = L().y.axis === "right" ? "y2Axis" : "yAxis";
|
|
982
|
+
t = {
|
|
983
|
+
...t,
|
|
984
|
+
[e]: {
|
|
985
|
+
...t[e] ?? {},
|
|
986
|
+
min: L().y.min,
|
|
987
|
+
max: L().y.max,
|
|
988
|
+
nice: !1
|
|
989
|
+
}
|
|
990
|
+
};
|
|
991
|
+
}
|
|
992
|
+
return re(t, h(_a));
|
|
993
|
+
}), La = A(!1), Ra = N(() => te({
|
|
994
|
+
...h(K),
|
|
995
|
+
palette: h(mi),
|
|
996
|
+
...h(ei) || h(ti) ? {
|
|
997
|
+
width: h(ei),
|
|
998
|
+
height: h(ti)
|
|
999
|
+
} : {},
|
|
1000
|
+
...f.dataLabels === void 0 ? {} : { dataLabels: h(ni) }
|
|
1001
|
+
}, h(La) ? "dark" : "light")), za = N(() => z() ? z() === !0 ? {
|
|
1002
|
+
duration: 400,
|
|
1003
|
+
enter: "fade",
|
|
1004
|
+
update: !0
|
|
1005
|
+
} : {
|
|
1006
|
+
duration: z().duration ?? 400,
|
|
1007
|
+
enter: z().enter ?? "fade",
|
|
1008
|
+
update: z().update ?? !0
|
|
1009
|
+
} : null), Ba = A(!1);
|
|
1010
|
+
ae(() => {
|
|
1011
|
+
if (typeof matchMedia != "function") return;
|
|
1012
|
+
let e = matchMedia("(prefers-reduced-motion: reduce)");
|
|
1013
|
+
p(Ba, e.matches, !0);
|
|
1014
|
+
let t = () => p(Ba, e.matches, !0);
|
|
1015
|
+
return e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
|
|
1016
|
+
});
|
|
1017
|
+
let Va = A(null), q = N(() => h(Va) && h(Va).t < 1 ? Pe(h(Va).from, h(Ra), h(Va).t) : h(Ra)), Ha = null, Ua = 0;
|
|
1018
|
+
ae(() => {
|
|
1019
|
+
let e = h(Ra);
|
|
1020
|
+
oe(() => {
|
|
1021
|
+
let t = Ha;
|
|
1022
|
+
if (Ha = e, !t || !h(za)?.update || h(Ba) || h(za).duration <= 0 || Ve() || e.bars.length + e.arcs.length > 600 || e.lines.some((e) => e.points.length > 600) || t.type !== e.type) return;
|
|
1023
|
+
let n = h(Va) && h(Va).t < 1 ? Pe(h(Va).from, t, h(Va).t) : t;
|
|
1024
|
+
cancelAnimationFrame(Ua);
|
|
1025
|
+
let r = performance.now(), i = h(za).duration;
|
|
1026
|
+
p(Va, {
|
|
1027
|
+
from: n,
|
|
1028
|
+
t: 0
|
|
1029
|
+
}, !0);
|
|
1030
|
+
let a = (e) => {
|
|
1031
|
+
let t = Math.min(1, (e - r) / i), o = 1 - (1 - t) ** 3;
|
|
1032
|
+
p(Va, t >= 1 ? null : {
|
|
1033
|
+
from: n,
|
|
1034
|
+
t: o
|
|
1035
|
+
}, !0), t < 1 && (Ua = requestAnimationFrame(a));
|
|
1036
|
+
};
|
|
1037
|
+
Ua = requestAnimationFrame(a);
|
|
1038
|
+
});
|
|
1039
|
+
});
|
|
1040
|
+
let Wa = N(() => h(Ba) || Ve() ? "none" : h(za)?.enter ?? "fade"), Ga = N(() => h(q).lines.flatMap((e, t) => e.style?.gradient ? [{
|
|
1041
|
+
id: `${hi}-grad-${t}`,
|
|
1042
|
+
...e.style.gradient
|
|
1043
|
+
}] : [])), Ka = N(() => h(H).yAxis?.title ?? h(H).yAxisTitle), qa = N(() => h(H).y2Axis?.title ?? h(H).y2AxisTitle), Ja = N(() => h(H).xAxis?.title ?? h(H).xAxisTitle), Ya = N(() => i(h(q))), Xa = N(() => ({
|
|
1044
|
+
geo: h(q),
|
|
1045
|
+
scales: h(Ya),
|
|
1046
|
+
xOf: h(Ya)?.xOf ?? null,
|
|
1047
|
+
yOf: h(Ya)?.yOf ?? null
|
|
1048
|
+
})), J = N(() => !va.has(h(H).type)), Za = N(() => h(H).type === "sunburst" || h(H).type === "radial-bar" || h(H).type === "radial-column" || h(H).type === "nightingale" || h(H).type === "chord"), Qa = N(() => h(H).type === "bullet"), $a = N(() => (h(H).type === "radial-bar" || h(H).type === "radial-column" || h(H).type === "nightingale") && h(H).series.length === 1), eo = N(() => h(H).type === "scatter"), to = N(() => h(H).type === "heatmap"), no = N(() => h(H).type === "funnel"), ro = N(() => h(H).type === "radar"), io = N(() => h(H).type === "calendar"), ao = N(() => h(H).type === "gauge"), oo = N(() => h(H).type === "treemap"), so = N(() => h(H).type === "sankey"), co = N(() => h(q).orientation === "horizontal"), lo = N(() => (h(co) ? h(q).plot.h : h(q).plot.w) / Math.max(1, h(K).categories.length)), uo = N(() => h(J) && !h(eo) && !h(co) && h(lo) < 4 && h(K).categories.length > 1), fo = N(() => L() ? L().i1 - L().i0 + 1 : h(H).categories.length), po = N(() => h(ni).show && h(J) && !h(eo) ? s(h(q), h(ni), (e, t) => li(t)(e), {
|
|
1049
|
+
stacked: !!(h(H).stacked || h(H).stacked100),
|
|
1050
|
+
dense: h(uo),
|
|
1051
|
+
share: !!h(H).stacked100
|
|
1052
|
+
}) : []), mo = 1e3;
|
|
1053
|
+
function ho(e, t, n) {
|
|
1054
|
+
let r = n.ownerSVGElement ?? n;
|
|
1055
|
+
if (!r || typeof r.getBoundingClientRect != "function") return null;
|
|
1056
|
+
let i = r.getBoundingClientRect();
|
|
1057
|
+
if (!i.width || !i.height) return null;
|
|
1058
|
+
let a = r.viewBox?.baseVal, o = a && a.width ? a.width / i.width : 1, s = a && a.height ? a.height / i.height : 1;
|
|
1059
|
+
return {
|
|
1060
|
+
x: (e - i.left) * o + (a ? a.x : 0),
|
|
1061
|
+
y: (t - i.top) * s + (a ? a.y : 0)
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
function go(e, t) {
|
|
1065
|
+
let n = ho(e, 0, t);
|
|
1066
|
+
if (!n) return null;
|
|
1067
|
+
let r = n.x, i = h(q).lines[0]?.points, a = h(K).categories.length;
|
|
1068
|
+
if (!i || i.length !== a) {
|
|
1069
|
+
let e = Math.floor((r - h(q).plot.x) / h(lo));
|
|
1070
|
+
return e >= 0 && e < a ? e : null;
|
|
1071
|
+
}
|
|
1072
|
+
let o = 0, s = i.length - 1;
|
|
1073
|
+
for (; o < s;) {
|
|
1074
|
+
let e = o + s >> 1;
|
|
1075
|
+
i[e].x < r ? o = e + 1 : s = e;
|
|
1076
|
+
}
|
|
1077
|
+
return o > 0 && Math.abs(i[o - 1].x - r) <= Math.abs(i[o].x - r) && --o, o;
|
|
1078
|
+
}
|
|
1079
|
+
let _o = A(0);
|
|
1080
|
+
function vo(e) {
|
|
1081
|
+
if (Ls(e, h(_o)) || Ds(e, h(_o))) return;
|
|
1082
|
+
let t = h(K).categories.length - 1, n = Math.max(1, Math.floor(t / 10)), r = h(_o);
|
|
1083
|
+
switch (e.key) {
|
|
1084
|
+
case "ArrowRight":
|
|
1085
|
+
case "ArrowDown":
|
|
1086
|
+
r = Math.min(t, h(_o) + 1);
|
|
1087
|
+
break;
|
|
1088
|
+
case "ArrowLeft":
|
|
1089
|
+
case "ArrowUp":
|
|
1090
|
+
r = Math.max(0, h(_o) - 1);
|
|
1091
|
+
break;
|
|
1092
|
+
case "Home":
|
|
1093
|
+
r = 0;
|
|
1094
|
+
break;
|
|
1095
|
+
case "End":
|
|
1096
|
+
r = t;
|
|
1097
|
+
break;
|
|
1098
|
+
case "PageDown":
|
|
1099
|
+
r = Math.min(t, h(_o) + n);
|
|
1100
|
+
break;
|
|
1101
|
+
case "PageUp":
|
|
1102
|
+
r = Math.max(0, h(_o) - n);
|
|
1103
|
+
break;
|
|
1104
|
+
case "Enter":
|
|
1105
|
+
case " ":
|
|
1106
|
+
e.preventDefault(), vs(e, h(_o));
|
|
1107
|
+
return;
|
|
1108
|
+
default: return;
|
|
1109
|
+
}
|
|
1110
|
+
e.preventDefault(), p(_o, r, !0), cs(e.currentTarget, r);
|
|
1111
|
+
}
|
|
1112
|
+
let yo = A(null), bo = N(() => h(pi) ?? (He() ? h(yo) : null)), Y = (e) => h(bo) && h(bo) !== e ? .18 : 1, xo = null;
|
|
1113
|
+
function So(e) {
|
|
1114
|
+
f.onHover && (e === xo || e !== null && xo !== null && e.category === xo.category && e.index === xo.index && e.series === xo.series && e.value === xo.value || (xo = e, f.onHover(e)));
|
|
1115
|
+
}
|
|
1116
|
+
let X = N(() => Le() === "multi" ? "multi" : Le() ? "single" : null), Co = (e, t, n, r) => e.category === t && e.series === n && (e.index === void 0 || r === void 0 || e.index === r), wo = (e, t, n) => Re().some((r) => Co(r, e, t, n)), To = (e, t, n) => h(X) && Re().length && !wo(e, t, n) ? .35 : 1;
|
|
1117
|
+
function Eo(e, t, n, r) {
|
|
1118
|
+
if (!h(X)) return;
|
|
1119
|
+
let i = r === void 0 ? {
|
|
1120
|
+
category: e,
|
|
1121
|
+
series: t
|
|
1122
|
+
} : {
|
|
1123
|
+
category: e,
|
|
1124
|
+
series: t,
|
|
1125
|
+
index: r
|
|
1126
|
+
}, a = h(X) === "multi" || !!(n && (n.ctrlKey || n.metaKey || n.shiftKey)), o;
|
|
1127
|
+
o = wo(e, t, r) ? a ? Re().filter((n) => !Co(n, e, t, r)) : [] : a ? [...Re(), i] : [i], Re(o), f.onSelectionChange?.(o);
|
|
1128
|
+
}
|
|
1129
|
+
let Do = A(null), Oo = A(""), ko = N(() => h(H).type === "heatmap" || h(H).type === "calendar" || h(H).type === "gauge" ? [] : h(H).type === "pie" || h($a) ? h(Na).map((e, t) => ({
|
|
1130
|
+
label: e,
|
|
1131
|
+
color: h(H).categoryColors?.[e] ?? h(K).series[0]?.colors?.[t] ?? h(mi)[t % h(mi).length],
|
|
1132
|
+
off: h(ui).has(e)
|
|
1133
|
+
})) : h(H).type === "sunburst" || h(H).type === "chord" ? h(q).legend.map((e) => ({
|
|
1134
|
+
label: e.label,
|
|
1135
|
+
color: e.color,
|
|
1136
|
+
off: !1
|
|
1137
|
+
})) : h(gi).map((e) => ({
|
|
1138
|
+
label: e.label,
|
|
1139
|
+
color: e.color,
|
|
1140
|
+
off: h(ui).has(e.label)
|
|
1141
|
+
}))), Ao = N(() => Ae() ? Ae() === !0 ? [
|
|
1142
|
+
"1W",
|
|
1143
|
+
"1M",
|
|
1144
|
+
"3M",
|
|
1145
|
+
"6M",
|
|
1146
|
+
"YTD",
|
|
1147
|
+
"1Y",
|
|
1148
|
+
"All"
|
|
1149
|
+
] : Ae() : []), jo = N(() => h(Ao).length > 0 && h(J) && (h(H).xType === "time" || h(H).xType === "ordinal-time" || h(H).xAxis?.type === "time" || h(H).xAxis?.type === "ordinal-time")), Mo = (e) => typeof e == "string" ? e : e.label;
|
|
1150
|
+
function No(e) {
|
|
1151
|
+
Si(Oe(h(H).categories, e));
|
|
1152
|
+
}
|
|
1153
|
+
let Po = N(() => h(H).type !== "sunburst" && h(H).type !== "chord"), Fo = A(!1), Io = N(() => h(ko).length > 10), Lo = N(() => h(Io) && !h(Fo) ? h(ko).slice(0, 10) : h(ko)), Ro = N(() => h(H).type === "pie" ? h(q).slices.every((e) => e.value <= 0) : h(H).type === "scatter" ? h(q).scatterPoints.length === 0 : h(H).type === "heatmap" ? h(q).heatmapCells.length === 0 : h(H).type === "funnel" ? h(q).funnelSegments.length === 0 : h(H).type === "radar" ? h(q).radarSeries.length === 0 : h(H).type === "calendar" ? h(q).calendarCells.length === 0 : h(H).type === "gauge" ? !h(q).gauge : h(H).type === "treemap" ? h(q).treemapCells.length === 0 : h(H).type === "sankey" ? h(q).sankeyNodes.length === 0 : h(ha) ? h(q).candles.length === 0 : h(H).type === "boxplot" ? h(q).boxes.length === 0 : h(Za) ? h(q).arcs.length === 0 : h(Qa) ? h(q).bullets.length === 0 : h(q).bars.length === 0 && h(q).stems.length === 0 && h(q).lines.every((e) => e.points.every((e) => !e.defined))), zo = null;
|
|
1154
|
+
function Bo(e) {
|
|
1155
|
+
if (!y() || !h(Po)) return;
|
|
1156
|
+
if (h(di) != null) {
|
|
1157
|
+
zo = {
|
|
1158
|
+
label: h(di),
|
|
1159
|
+
at: Date.now()
|
|
1160
|
+
}, p(di, null);
|
|
1161
|
+
return;
|
|
1162
|
+
}
|
|
1163
|
+
let t = new Set(h(ui));
|
|
1164
|
+
t.has(e) ? t.delete(e) : t.add(e), p(ui, t, !0);
|
|
1165
|
+
}
|
|
1166
|
+
function Vo(e) {
|
|
1167
|
+
if (!y() || !h(Po)) return;
|
|
1168
|
+
let t = zo;
|
|
1169
|
+
zo = null;
|
|
1170
|
+
let n = new Set(h(ui));
|
|
1171
|
+
if (n.delete(e), t && t.label === e && Date.now() - t.at < 600) {
|
|
1172
|
+
p(ui, n, !0);
|
|
1173
|
+
return;
|
|
1174
|
+
}
|
|
1175
|
+
p(ui, n, !0), p(di, h(di) === e ? null : e, !0);
|
|
1176
|
+
}
|
|
1177
|
+
let Ho = (e, t) => Number.isFinite(e) ? li(t)(e) : "", Uo = N(() => {
|
|
1178
|
+
if (h(H).type === "pie") {
|
|
1179
|
+
let e = h(Ma) ? h(K).series[0] : h(gi)[0];
|
|
1180
|
+
return {
|
|
1181
|
+
cols: ["Category", "Value"],
|
|
1182
|
+
rows: h(Na).map((t, n) => [t, Ho(e?.values[n])])
|
|
1183
|
+
};
|
|
1184
|
+
}
|
|
1185
|
+
if (h(eo)) {
|
|
1186
|
+
let e = [];
|
|
1187
|
+
for (let t of h(gi)) for (let n of t.points ?? []) e.push([
|
|
1188
|
+
t.label,
|
|
1189
|
+
U(n.x),
|
|
1190
|
+
U(n.y),
|
|
1191
|
+
n.r == null ? "" : U(n.r)
|
|
1192
|
+
]);
|
|
1193
|
+
return {
|
|
1194
|
+
cols: [
|
|
1195
|
+
"Series",
|
|
1196
|
+
"X",
|
|
1197
|
+
"Y",
|
|
1198
|
+
"Size"
|
|
1199
|
+
],
|
|
1200
|
+
rows: e
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
if (h(Za)) return {
|
|
1204
|
+
cols: [
|
|
1205
|
+
h(H).type === "chord" ? "Group" : "Category",
|
|
1206
|
+
"Series",
|
|
1207
|
+
"Value"
|
|
1208
|
+
],
|
|
1209
|
+
rows: h(q).arcs.map((e) => [
|
|
1210
|
+
e.nodePath ? e.nodePath.join(" / ") : e.label,
|
|
1211
|
+
e.series,
|
|
1212
|
+
U(e.value)
|
|
1213
|
+
])
|
|
1214
|
+
};
|
|
1215
|
+
if (h(Qa)) return {
|
|
1216
|
+
cols: [
|
|
1217
|
+
"Category",
|
|
1218
|
+
"Value",
|
|
1219
|
+
"Target"
|
|
1220
|
+
],
|
|
1221
|
+
rows: h(q).bullets.map((e) => [
|
|
1222
|
+
e.label,
|
|
1223
|
+
U(e.value),
|
|
1224
|
+
e.target == null ? "" : U(e.target)
|
|
1225
|
+
])
|
|
1226
|
+
};
|
|
1227
|
+
if (h(ha)) {
|
|
1228
|
+
let e = [];
|
|
1229
|
+
for (let t of h(gi)) (t.ohlc ?? []).forEach((n, r) => {
|
|
1230
|
+
n && e.push([
|
|
1231
|
+
h(H).categories[r] ?? String(r),
|
|
1232
|
+
t.label,
|
|
1233
|
+
U(n.o),
|
|
1234
|
+
U(n.h),
|
|
1235
|
+
U(n.l),
|
|
1236
|
+
U(n.c)
|
|
1237
|
+
]);
|
|
1238
|
+
});
|
|
1239
|
+
return {
|
|
1240
|
+
cols: [
|
|
1241
|
+
"Date",
|
|
1242
|
+
"Series",
|
|
1243
|
+
"Open",
|
|
1244
|
+
"High",
|
|
1245
|
+
"Low",
|
|
1246
|
+
"Close"
|
|
1247
|
+
],
|
|
1248
|
+
rows: e
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
if (h(H).type === "waterfall") {
|
|
1252
|
+
let e = h(gi)[0];
|
|
1253
|
+
return {
|
|
1254
|
+
cols: ["Category", e?.label ?? "Value"],
|
|
1255
|
+
rows: h(H).categories.map((t, n) => {
|
|
1256
|
+
let r = h(q).bars.find((e) => e.index === n);
|
|
1257
|
+
return [t, r ? U(r.value) : Ho(e?.values[n])];
|
|
1258
|
+
})
|
|
1259
|
+
};
|
|
1260
|
+
}
|
|
1261
|
+
return {
|
|
1262
|
+
cols: ["Category", ...h(gi).map((e) => e.label)],
|
|
1263
|
+
rows: h(H).categories.map((e, t) => [e, ...h(gi).map((e) => Ho(e.values[t], e.label))])
|
|
1264
|
+
};
|
|
1265
|
+
}), Wo = N(() => h(Uo).rows.length > mo), Go = N(() => h(Wo) ? h(Uo).rows.slice(0, mo) : h(Uo).rows);
|
|
1266
|
+
function Ko(e, t = 12) {
|
|
1267
|
+
return e.length > t ? e.slice(0, t - 1) + "…" : e;
|
|
1268
|
+
}
|
|
1269
|
+
let qo = (e, t) => f.formatValue ? f.formatValue(e) : t, Jo = A(null);
|
|
1270
|
+
function Yo(e) {
|
|
1271
|
+
if (!e) return !1;
|
|
1272
|
+
let t = 0, n = 0, r = 0, i = e.trim().startsWith("#") ? e.trim().slice(1) : "";
|
|
1273
|
+
if (i.length === 6) t = parseInt(i.slice(0, 2), 16), n = parseInt(i.slice(2, 4), 16), r = parseInt(i.slice(4, 6), 16);
|
|
1274
|
+
else {
|
|
1275
|
+
let i = /rgba?\(([^)]+)\)/.exec(e);
|
|
1276
|
+
if (!i) return !1;
|
|
1277
|
+
let a = i[1].split(",").map((e) => parseFloat(e));
|
|
1278
|
+
t = a[0] ?? 0, n = a[1] ?? 0, r = a[2] ?? 0;
|
|
1279
|
+
}
|
|
1280
|
+
return .299 * t + .587 * n + .114 * r < 128;
|
|
1281
|
+
}
|
|
1282
|
+
ae(() => {
|
|
1283
|
+
if (!h(Jo) || typeof window > "u") return;
|
|
1284
|
+
let e = h(Jo), t = () => {
|
|
1285
|
+
let t = getComputedStyle(e);
|
|
1286
|
+
p(La, Yo(t.getPropertyValue("--sg-bg")), !0);
|
|
1287
|
+
let r = [];
|
|
1288
|
+
for (let e = 1; e <= 8; e += 1) {
|
|
1289
|
+
let i = t.getPropertyValue(`--sg-chart-${e}`).trim();
|
|
1290
|
+
r.push(i || n[e - 1]);
|
|
1291
|
+
}
|
|
1292
|
+
(!h(fi) || r.some((e, t) => e !== h(fi)[t])) && p(fi, r.some((e, t) => e !== n[t]) ? r : null, !0);
|
|
1293
|
+
};
|
|
1294
|
+
t();
|
|
1295
|
+
let r = new MutationObserver(t);
|
|
1296
|
+
return r.observe(document.documentElement, {
|
|
1297
|
+
attributes: !0,
|
|
1298
|
+
attributeFilter: [
|
|
1299
|
+
"data-theme",
|
|
1300
|
+
"class",
|
|
1301
|
+
"style"
|
|
1302
|
+
]
|
|
1303
|
+
}), () => r.disconnect();
|
|
1304
|
+
});
|
|
1305
|
+
let Xo = A(null), Zo = A(null), Qo = A(null);
|
|
1306
|
+
function Z(e, t, n, r, i) {
|
|
1307
|
+
if (!y() || !h(Jo) || r.length === 0 || h(Zo) && h(Xo)) return;
|
|
1308
|
+
let a = h(Jo).getBoundingClientRect(), o = {
|
|
1309
|
+
category: n,
|
|
1310
|
+
index: -1,
|
|
1311
|
+
rows: r,
|
|
1312
|
+
...i
|
|
1313
|
+
}, s = f.tooltipFormat?.(o), c = Se() !== "follow", l, u;
|
|
1314
|
+
if (c && h(Fi)) {
|
|
1315
|
+
let e = h(Fi).getBoundingClientRect(), t = e.width / (h(q).width || 1), n = e.height / (h(q).height || 1), r = Se() === "top-right" || Se() === "bottom-right", i = Se() === "bottom-left" || Se() === "bottom-right";
|
|
1316
|
+
l = e.left - a.left + (r ? (h(q).plot.x + h(q).plot.w) * t - 8 : h(q).plot.x * t + 8), u = e.top - a.top + (i ? (h(q).plot.y + h(q).plot.h) * n - 8 : h(q).plot.y * n + 8);
|
|
1317
|
+
} else l = Math.max(70, Math.min(a.width - 70, e - a.left)), u = t - a.top;
|
|
1318
|
+
p(Xo, {
|
|
1319
|
+
left: l,
|
|
1320
|
+
top: u,
|
|
1321
|
+
below: !c && u < 44,
|
|
1322
|
+
fixed: c,
|
|
1323
|
+
title: s?.title ?? n,
|
|
1324
|
+
rows: s?.rows ?? r,
|
|
1325
|
+
ctx: o
|
|
1326
|
+
}, !0), So({
|
|
1327
|
+
category: o.category,
|
|
1328
|
+
index: o.index,
|
|
1329
|
+
series: o.series ?? null,
|
|
1330
|
+
value: o.value ?? null
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
function $o(e, t) {
|
|
1334
|
+
let n = null, r = Infinity;
|
|
1335
|
+
for (let i of h(q).lines) {
|
|
1336
|
+
let a = i.points[e];
|
|
1337
|
+
if (!a?.defined) continue;
|
|
1338
|
+
let o = Math.abs(a.y - t);
|
|
1339
|
+
o < r && (r = o, n = i.label);
|
|
1340
|
+
}
|
|
1341
|
+
for (let i of h(q).bars) {
|
|
1342
|
+
if (i.label !== h(K).categories[e]) continue;
|
|
1343
|
+
let a = t < i.y ? i.y - t : t > i.y + i.h ? t - (i.y + i.h) : 0;
|
|
1344
|
+
a < r && (r = a, n = i.series);
|
|
1345
|
+
}
|
|
1346
|
+
for (let i of h(q).candles) {
|
|
1347
|
+
if (i.label !== h(K).categories[e]) continue;
|
|
1348
|
+
let a = t < i.yHigh ? i.yHigh - t : t > i.yLow ? t - i.yLow : 0;
|
|
1349
|
+
a < r && (r = a, n = i.series);
|
|
1350
|
+
}
|
|
1351
|
+
return n === null ? null : {
|
|
1352
|
+
label: n,
|
|
1353
|
+
distance: r
|
|
1354
|
+
};
|
|
1355
|
+
}
|
|
1356
|
+
function es(t) {
|
|
1357
|
+
let n = [];
|
|
1358
|
+
if (h(H).type === "waterfall") {
|
|
1359
|
+
let e = h(q).bars.find((e) => e.index === t), r = h(K).series[0];
|
|
1360
|
+
return e && r && n.push({
|
|
1361
|
+
label: r.label,
|
|
1362
|
+
color: e.color,
|
|
1363
|
+
value: U(e.value)
|
|
1364
|
+
}), n;
|
|
1365
|
+
}
|
|
1366
|
+
for (let e of h(K).series) {
|
|
1367
|
+
let r = e.color, i = e.ohlc?.[t];
|
|
1368
|
+
if (i) {
|
|
1369
|
+
n.push({
|
|
1370
|
+
label: `${e.label} O`,
|
|
1371
|
+
color: r,
|
|
1372
|
+
value: U(i.o)
|
|
1373
|
+
}), n.push({
|
|
1374
|
+
label: `${e.label} H`,
|
|
1375
|
+
value: U(i.h)
|
|
1376
|
+
}), n.push({
|
|
1377
|
+
label: `${e.label} L`,
|
|
1378
|
+
value: U(i.l)
|
|
1379
|
+
}), n.push({
|
|
1380
|
+
label: `${e.label} C`,
|
|
1381
|
+
value: U(i.c)
|
|
1382
|
+
});
|
|
1383
|
+
continue;
|
|
1384
|
+
}
|
|
1385
|
+
let a = e.boxes?.[t];
|
|
1386
|
+
if (a) {
|
|
1387
|
+
n.push({
|
|
1388
|
+
label: `${e.label} max`,
|
|
1389
|
+
color: r,
|
|
1390
|
+
value: U(a.max)
|
|
1391
|
+
}), n.push({
|
|
1392
|
+
label: `${e.label} Q3`,
|
|
1393
|
+
value: U(a.q3)
|
|
1394
|
+
}), n.push({
|
|
1395
|
+
label: `${e.label} median`,
|
|
1396
|
+
value: U(a.median)
|
|
1397
|
+
}), n.push({
|
|
1398
|
+
label: `${e.label} Q1`,
|
|
1399
|
+
value: U(a.q1)
|
|
1400
|
+
}), n.push({
|
|
1401
|
+
label: `${e.label} min`,
|
|
1402
|
+
value: U(a.min)
|
|
1403
|
+
}), a.outliers?.length && n.push({
|
|
1404
|
+
label: `${e.label} outliers`,
|
|
1405
|
+
value: String(a.outliers.length)
|
|
1406
|
+
});
|
|
1407
|
+
continue;
|
|
1408
|
+
}
|
|
1409
|
+
let o = e.values[t], s = li(e.label), c = e.lowValues?.[t];
|
|
1410
|
+
if (Number.isFinite(o) && Number.isFinite(c)) {
|
|
1411
|
+
n.push({
|
|
1412
|
+
label: e.label,
|
|
1413
|
+
color: r,
|
|
1414
|
+
value: `${s(c)} to ${s(o)}`
|
|
1415
|
+
});
|
|
1416
|
+
continue;
|
|
1417
|
+
}
|
|
1418
|
+
let l = e.targets?.[t];
|
|
1419
|
+
if (Number.isFinite(o) && Number.isFinite(l)) {
|
|
1420
|
+
n.push({
|
|
1421
|
+
label: e.label,
|
|
1422
|
+
color: r,
|
|
1423
|
+
value: s(o)
|
|
1424
|
+
}), n.push({
|
|
1425
|
+
label: `${e.label} target`,
|
|
1426
|
+
value: s(l)
|
|
1427
|
+
});
|
|
1428
|
+
continue;
|
|
1429
|
+
}
|
|
1430
|
+
if (Number.isFinite(o)) {
|
|
1431
|
+
n.push({
|
|
1432
|
+
label: e.label,
|
|
1433
|
+
color: r,
|
|
1434
|
+
value: s(o)
|
|
1435
|
+
});
|
|
1436
|
+
let i = e.errors?.[t];
|
|
1437
|
+
if (i != null) {
|
|
1438
|
+
let t = typeof i == "number" ? o - Math.abs(i) : Math.min(i.lo, i.hi), r = typeof i == "number" ? o + Math.abs(i) : Math.max(i.lo, i.hi);
|
|
1439
|
+
Number.isFinite(t) && Number.isFinite(r) && n.push({
|
|
1440
|
+
label: `${e.label} range`,
|
|
1441
|
+
value: `${s(t)} - ${s(r)}`
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
for (let r of h(q).overlays) {
|
|
1447
|
+
let i = r.points[t];
|
|
1448
|
+
if (!i?.defined) continue;
|
|
1449
|
+
let a = h(K).series.find((e) => e.overlay && r.label === `${e.label} (${e.overlay})`);
|
|
1450
|
+
if (!a?.overlay) continue;
|
|
1451
|
+
let o = r.r2 === void 0 ? "" : ` (${V(h(B).rSquared, { value: r.r2.toFixed(2) })})`;
|
|
1452
|
+
n.push({
|
|
1453
|
+
label: `${a.label} ${e(a.overlay)}`,
|
|
1454
|
+
color: r.color,
|
|
1455
|
+
value: `${li(a.label)(i.value)}${o}`
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
return n;
|
|
1459
|
+
}
|
|
1460
|
+
let ts = A(null);
|
|
1461
|
+
function ns(e) {
|
|
1462
|
+
let t = h(q).axes?.y, n = t ? Math.abs(t.max - t.min) : 100, r = n >= 100 ? 0 : n >= 10 ? 1 : n >= 1 ? 2 : 3, i = Number(e.toFixed(r)), a = h(H).yAxis;
|
|
1463
|
+
return a?.formatter ? a.formatter(i, -1) : a?.format ? d(i, a.format, h(H)) : qo(i, U(i));
|
|
1464
|
+
}
|
|
1465
|
+
let rs = N(() => h(H).xType === "time" || h(H).xType === "ordinal-time" || h(H).xAxis?.type === "time" || h(H).xAxis?.type === "ordinal-time"), is = N(() => h(rs) ? t(h(K).categories.map((e) => Date.parse(e))) : "day"), as = (e) => {
|
|
1466
|
+
let t = Date.parse(e);
|
|
1467
|
+
return Number.isFinite(t) ? r(t) : e;
|
|
1468
|
+
};
|
|
1469
|
+
function os(e) {
|
|
1470
|
+
let t = h(K).categories[e] ?? "";
|
|
1471
|
+
if (!h(rs)) return t;
|
|
1472
|
+
let n = Date.parse(t);
|
|
1473
|
+
return Number.isFinite(n) ? h(H).xAxis?.formatter ? h(H).xAxis.formatter(n, e) : r(n, h(is)) : t;
|
|
1474
|
+
}
|
|
1475
|
+
function ss(e, t, n, r) {
|
|
1476
|
+
p(Qo, n, !0);
|
|
1477
|
+
let i = zi({
|
|
1478
|
+
clientX: e,
|
|
1479
|
+
clientY: t
|
|
1480
|
+
})?.y;
|
|
1481
|
+
p(ts, i != null && Number.isFinite(i) && i >= h(q).plot.y && i <= h(q).plot.y + h(q).plot.h ? i : null, !0);
|
|
1482
|
+
let a = h(K).categories[n] ?? "", o = es(n), s, c, l = h(Do) && h(K).series.some((e) => e.label === h(Do)) ? h(Do) : null;
|
|
1483
|
+
if (l) s = l, c = h(K).series.find((e) => e.label === l)?.values[n], o = o.filter((e) => e.label === l || e.label?.startsWith(l + " "));
|
|
1484
|
+
else {
|
|
1485
|
+
let i = r ? ho(e, t, r) : zi({
|
|
1486
|
+
clientX: e,
|
|
1487
|
+
clientY: t
|
|
1488
|
+
}), a = i && Number.isFinite(i.y) ? $o(n, i.y) : null;
|
|
1489
|
+
p(yo, a && a.distance <= 18 ? a.label : null, !0), x() === "single" && a && r && (s = a.label, c = h(K).series.find((e) => e.label === a.label)?.values[n], o = o.filter((e) => e.label === a.label || e.label?.startsWith(a.label + " ")));
|
|
1490
|
+
}
|
|
1491
|
+
if (Z(e, t, os(n), o, {
|
|
1492
|
+
category: a,
|
|
1493
|
+
index: n,
|
|
1494
|
+
series: s,
|
|
1495
|
+
value: c
|
|
1496
|
+
}), f.syncGroup && !h(Ei)) {
|
|
1497
|
+
let e = Date.parse(a);
|
|
1498
|
+
Me(f.syncGroup, {
|
|
1499
|
+
label: a,
|
|
1500
|
+
index: (L() ? L().i0 : 0) + n,
|
|
1501
|
+
time: Number.isFinite(e) ? e : null,
|
|
1502
|
+
from: Ci
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
function cs(e, t) {
|
|
1507
|
+
let n = e.getBoundingClientRect();
|
|
1508
|
+
if (ss(n.left + n.width / 2, n.top + 12, t), !ze()) return;
|
|
1509
|
+
let r = os(t);
|
|
1510
|
+
if (h(Do)) {
|
|
1511
|
+
let e = h(K).series.find((e) => e.label === h(Do))?.values[t];
|
|
1512
|
+
p(Oo, V(h(B).seriesAtCategory, {
|
|
1513
|
+
series: h(Do),
|
|
1514
|
+
value: Number.isFinite(e) ? li(h(Do))(e) : h(B).noValue,
|
|
1515
|
+
category: r
|
|
1516
|
+
}), !0);
|
|
1517
|
+
} else p(Oo, `${r}: ${es(t).map((e) => `${e.label ?? ""} ${e.value}`).join(", ")}`);
|
|
1518
|
+
}
|
|
1519
|
+
function Q() {
|
|
1520
|
+
h(Zo) || (p(Qo, null), p(ts, null), p(yo, null), p(Xo, null), So(null), f.syncGroup && !h(Ei) && h(Ti)?.hover?.from === Ci && Me(f.syncGroup, null));
|
|
1521
|
+
}
|
|
1522
|
+
ae(() => {
|
|
1523
|
+
if (!h(Ti)) return;
|
|
1524
|
+
let e = h(Ti).hover;
|
|
1525
|
+
oe(() => {
|
|
1526
|
+
if (!e) {
|
|
1527
|
+
h(Ei) && (p(Ei, !1), p(Qo, null), p(Xo, null));
|
|
1528
|
+
return;
|
|
1529
|
+
}
|
|
1530
|
+
if (e.from === Ci) return;
|
|
1531
|
+
let t = h(K).categories.indexOf(e.label);
|
|
1532
|
+
if (t < 0 && e.time != null && (t = ke(h(K).categories, e.time)), t < 0 || !h(Fi) || !h(Ya)) return;
|
|
1533
|
+
p(Ei, !0);
|
|
1534
|
+
let n = h(Fi).getBoundingClientRect(), r = n.width / h(q).width, i = n.height / h(q).height, a = h(Ya).xOf(t);
|
|
1535
|
+
ss(n.left + a * r, n.top + (h(q).plot.y + 12) * i, t), p(Ei, !0);
|
|
1536
|
+
});
|
|
1537
|
+
}), ae(() => {
|
|
1538
|
+
if (!h(Ti)) return;
|
|
1539
|
+
let e = h(Ti).zoom;
|
|
1540
|
+
oe(() => {
|
|
1541
|
+
if (!e || e.from === Ci) return;
|
|
1542
|
+
let t = h(H).categories.length, n = e.window;
|
|
1543
|
+
if (n && e.count !== t) {
|
|
1544
|
+
if (!e.labels) return;
|
|
1545
|
+
let r = ke(h(H).categories, Date.parse(e.labels[0])), i = ke(h(H).categories, Date.parse(e.labels[1]));
|
|
1546
|
+
if (r < 0 || i < 0) return;
|
|
1547
|
+
n = r === 0 && i === t - 1 ? null : {
|
|
1548
|
+
i0: Math.min(r, i),
|
|
1549
|
+
i1: Math.max(r, i)
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
wi = !0;
|
|
1553
|
+
try {
|
|
1554
|
+
Si(n);
|
|
1555
|
+
} finally {
|
|
1556
|
+
wi = !1;
|
|
1557
|
+
}
|
|
1558
|
+
});
|
|
1559
|
+
});
|
|
1560
|
+
function ls(e, t, n, r, i) {
|
|
1561
|
+
Z(e, t, n, [{ value: `${U(r)} · ${i.toFixed(1)}%` }], {
|
|
1562
|
+
series: n,
|
|
1563
|
+
value: r
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
function us(t, n, r) {
|
|
1567
|
+
p(yo, r.series, !0);
|
|
1568
|
+
let i = [{
|
|
1569
|
+
label: "x",
|
|
1570
|
+
value: U(r.x)
|
|
1571
|
+
}, {
|
|
1572
|
+
label: "y",
|
|
1573
|
+
value: U(r.y)
|
|
1574
|
+
}], a = h(K).series.find((e) => e.label === r.series && e.overlay), o = a?.overlay ? h(q).overlays.find((e) => e.label === `${a.label} (${a.overlay})`) : void 0;
|
|
1575
|
+
if (a?.overlay && o) {
|
|
1576
|
+
let t = o.r2 === void 0 ? "" : ` (${V(h(B).rSquared, { value: o.r2.toFixed(2) })})`;
|
|
1577
|
+
i.push({
|
|
1578
|
+
label: e(a.overlay),
|
|
1579
|
+
color: o.color,
|
|
1580
|
+
value: `${o.equation ?? ""}${t}`
|
|
1581
|
+
});
|
|
1582
|
+
}
|
|
1583
|
+
Z(t, n, r.label || r.series, i, {
|
|
1584
|
+
series: r.series,
|
|
1585
|
+
value: r.y
|
|
1586
|
+
});
|
|
1587
|
+
}
|
|
1588
|
+
function ds(e, t, n) {
|
|
1589
|
+
Z(e, t, `${n.rowLabel} · ${n.colLabel}`, [{
|
|
1590
|
+
color: n.color,
|
|
1591
|
+
value: U(n.value)
|
|
1592
|
+
}]);
|
|
1593
|
+
}
|
|
1594
|
+
function fs(e, t, n) {
|
|
1595
|
+
let r = [{ value: U(n.value) }, {
|
|
1596
|
+
label: "conversion",
|
|
1597
|
+
value: `${(n.conversion * 100).toFixed(1)}%`
|
|
1598
|
+
}];
|
|
1599
|
+
n.dropoff > 0 && r.push({
|
|
1600
|
+
label: "drop-off",
|
|
1601
|
+
value: `${(n.dropoff * 100).toFixed(1)}%`
|
|
1602
|
+
}), Z(e, t, n.label, r, { value: n.value });
|
|
1603
|
+
}
|
|
1604
|
+
function ps(e, t, n) {
|
|
1605
|
+
p(yo, h($a) || h(H).type === "sunburst" || h(H).type === "chord" ? n.label : n.series, !0), Z(e, t, n.series ? `${n.label} \u00b7 ${n.series}` : n.label, [{
|
|
1606
|
+
color: n.color,
|
|
1607
|
+
value: U(n.value)
|
|
1608
|
+
}], {
|
|
1609
|
+
category: n.label,
|
|
1610
|
+
series: n.series || void 0,
|
|
1611
|
+
value: n.value
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
function ms(e, t, n) {
|
|
1615
|
+
Z(e, t, `${n.source} \u2192 ${n.target}`, [{
|
|
1616
|
+
color: n.color,
|
|
1617
|
+
value: U(n.value)
|
|
1618
|
+
}], {
|
|
1619
|
+
category: n.source,
|
|
1620
|
+
series: n.target,
|
|
1621
|
+
value: n.value
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
function hs(e, t, n) {
|
|
1625
|
+
p(yo, n.series, !0);
|
|
1626
|
+
let r = [{
|
|
1627
|
+
color: n.color,
|
|
1628
|
+
label: n.series,
|
|
1629
|
+
value: U(n.value)
|
|
1630
|
+
}];
|
|
1631
|
+
n.target != null && r.push({
|
|
1632
|
+
label: "target",
|
|
1633
|
+
value: U(n.target)
|
|
1634
|
+
}), Z(e, t, n.label, r, {
|
|
1635
|
+
category: n.label,
|
|
1636
|
+
series: n.series,
|
|
1637
|
+
value: n.value
|
|
1638
|
+
});
|
|
1639
|
+
}
|
|
1640
|
+
function gs(e, t, n) {
|
|
1641
|
+
p(yo, n.series, !0);
|
|
1642
|
+
let r = [{
|
|
1643
|
+
color: n.color,
|
|
1644
|
+
label: n.series,
|
|
1645
|
+
value: n.dumbbell && n.value2 != null ? `${U(n.value2)} to ${U(n.value)}` : U(n.value)
|
|
1646
|
+
}];
|
|
1647
|
+
Z(e, t, n.label, r, {
|
|
1648
|
+
category: n.label,
|
|
1649
|
+
series: n.series,
|
|
1650
|
+
value: n.value
|
|
1651
|
+
});
|
|
1652
|
+
}
|
|
1653
|
+
function _s(e, t, n, r, i, a) {
|
|
1654
|
+
p(yo, n, !0), Z(e, t, `${n} · ${r}`, [{
|
|
1655
|
+
color: a,
|
|
1656
|
+
value: U(i)
|
|
1657
|
+
}], {
|
|
1658
|
+
category: r,
|
|
1659
|
+
series: n,
|
|
1660
|
+
value: i
|
|
1661
|
+
});
|
|
1662
|
+
}
|
|
1663
|
+
function vs(e, t) {
|
|
1664
|
+
if (h(Ji)) return;
|
|
1665
|
+
Ce() && "clientX" in e && !h(oi) && (h(Zo) && h(Zo).index === t ? fa() : (p(Zo, null), ss(e.clientX, e.clientY, t, e.currentTarget), pa(t)));
|
|
1666
|
+
let n = h(K).categories[t] ?? "";
|
|
1667
|
+
if (!h(X)) {
|
|
1668
|
+
ys(n, "", 0, t, e);
|
|
1669
|
+
return;
|
|
1670
|
+
}
|
|
1671
|
+
let r = "clientX" in e ? zi(e) : null, i = r ? $o(t, r.y) : null, a = h(Do) ?? i?.label ?? (h(K).series.length === 1 ? h(K).series[0].label : "");
|
|
1672
|
+
ys(n, a, h(K).series.find((e) => e.label === a)?.values[t] ?? 0, t, e);
|
|
1673
|
+
}
|
|
1674
|
+
function ys(e, t, n, r, i) {
|
|
1675
|
+
if (Eo(e, t, i, r), h(oi) && f.onAnnotate && r !== void 0) {
|
|
1676
|
+
let i = t ? n : h(K).series[0]?.values[r];
|
|
1677
|
+
f.onAnnotate({
|
|
1678
|
+
category: e,
|
|
1679
|
+
index: r,
|
|
1680
|
+
value: Number.isFinite(i) ? i : 0
|
|
1681
|
+
});
|
|
1682
|
+
return;
|
|
1683
|
+
}
|
|
1684
|
+
let a;
|
|
1685
|
+
if (r !== void 0) {
|
|
1686
|
+
let e = [];
|
|
1687
|
+
for (let n of h(K).series) {
|
|
1688
|
+
if (!n.rowIds || t && n.label !== t) continue;
|
|
1689
|
+
let i = n.rowIds[r];
|
|
1690
|
+
i?.length && e.push(i);
|
|
1691
|
+
}
|
|
1692
|
+
e.length && (a = e.flat());
|
|
1693
|
+
}
|
|
1694
|
+
let o = {
|
|
1695
|
+
category: e,
|
|
1696
|
+
series: t,
|
|
1697
|
+
value: n,
|
|
1698
|
+
rowIds: a
|
|
1699
|
+
};
|
|
1700
|
+
f.onSelect?.(o), a && a.length && f.onDrill?.(o);
|
|
1701
|
+
}
|
|
1702
|
+
function bs(e, t) {
|
|
1703
|
+
let n = e.ownerSVGElement ?? e.closest("svg");
|
|
1704
|
+
if (!n) return;
|
|
1705
|
+
let r = n.querySelector(`[data-cat-index="${t}"]`);
|
|
1706
|
+
r && (r.focus?.(), cs(r, t));
|
|
1707
|
+
}
|
|
1708
|
+
function xs(e, t) {
|
|
1709
|
+
if (Ls(e, t)) return;
|
|
1710
|
+
let n = h(K).categories.length - 1, r = e.currentTarget;
|
|
1711
|
+
if (Ds(e, t)) return;
|
|
1712
|
+
let i = h(co) ? "ArrowDown" : "ArrowRight", a = h(co) ? "ArrowUp" : "ArrowLeft", o = h(co) ? "ArrowRight" : "ArrowUp", s = h(co) ? "ArrowLeft" : "ArrowDown";
|
|
1713
|
+
switch (e.key) {
|
|
1714
|
+
case i:
|
|
1715
|
+
e.preventDefault(), bs(r, Math.min(n, t + 1));
|
|
1716
|
+
return;
|
|
1717
|
+
case a:
|
|
1718
|
+
e.preventDefault(), bs(r, Math.max(0, t - 1));
|
|
1719
|
+
return;
|
|
1720
|
+
case o:
|
|
1721
|
+
case s: {
|
|
1722
|
+
e.preventDefault();
|
|
1723
|
+
let n = h(K).series.map((e) => e.label);
|
|
1724
|
+
if (!n.length) return;
|
|
1725
|
+
let i = (h(Do) ? n.indexOf(h(Do)) : -1) + (e.key === s ? 1 : -1);
|
|
1726
|
+
p(Do, i < 0 || i >= n.length ? null : n[i], !0), p(pi, h(Do), !0), cs(r, t);
|
|
1727
|
+
return;
|
|
1728
|
+
}
|
|
1729
|
+
case "Home":
|
|
1730
|
+
e.preventDefault(), bs(r, 0);
|
|
1731
|
+
return;
|
|
1732
|
+
case "End":
|
|
1733
|
+
e.preventDefault(), bs(r, n);
|
|
1734
|
+
return;
|
|
1735
|
+
case "PageDown":
|
|
1736
|
+
e.preventDefault(), bs(r, Math.min(n, t + Math.max(1, Math.floor(n / 10))));
|
|
1737
|
+
return;
|
|
1738
|
+
case "PageUp":
|
|
1739
|
+
e.preventDefault(), bs(r, Math.max(0, t - Math.max(1, Math.floor(n / 10))));
|
|
1740
|
+
return;
|
|
1741
|
+
case "Enter":
|
|
1742
|
+
case " ":
|
|
1743
|
+
if (!f.onSelect && !h(X)) return;
|
|
1744
|
+
e.preventDefault(), vs(e, t);
|
|
1745
|
+
return;
|
|
1746
|
+
case "Escape":
|
|
1747
|
+
h(Do) && (p(Do, null), p(pi, null), cs(r, t));
|
|
1748
|
+
return;
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
let Ss = A(le({
|
|
1752
|
+
sel: "",
|
|
1753
|
+
i: 0
|
|
1754
|
+
})), Cs = (e, t) => y() ? (h(Ss).sel === e ? h(Ss).i : 0) === t ? 0 : -1 : void 0;
|
|
1755
|
+
function ws(e, t) {
|
|
1756
|
+
(h(Ss).sel !== e || h(Ss).i !== t) && p(Ss, {
|
|
1757
|
+
sel: e,
|
|
1758
|
+
i: t
|
|
1759
|
+
}, !0);
|
|
1760
|
+
}
|
|
1761
|
+
function Ts(e, t, n, r, i) {
|
|
1762
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
1763
|
+
r && (e.preventDefault(), r());
|
|
1764
|
+
return;
|
|
1765
|
+
}
|
|
1766
|
+
let a = e.currentTarget, o = a.ownerSVGElement ?? a.closest("svg");
|
|
1767
|
+
if (!o) return;
|
|
1768
|
+
let s = o.querySelectorAll(t), c = s.length;
|
|
1769
|
+
if (!c) return;
|
|
1770
|
+
let l = i && i.colMajor ? i.cols : 1, u = i ? i.colMajor ? 1 : i.cols : 1, d;
|
|
1771
|
+
switch (e.key) {
|
|
1772
|
+
case "ArrowRight":
|
|
1773
|
+
d = n + l;
|
|
1774
|
+
break;
|
|
1775
|
+
case "ArrowLeft":
|
|
1776
|
+
d = n - l;
|
|
1777
|
+
break;
|
|
1778
|
+
case "ArrowDown":
|
|
1779
|
+
d = n + u;
|
|
1780
|
+
break;
|
|
1781
|
+
case "ArrowUp":
|
|
1782
|
+
d = n - u;
|
|
1783
|
+
break;
|
|
1784
|
+
case "Home":
|
|
1785
|
+
d = 0;
|
|
1786
|
+
break;
|
|
1787
|
+
case "End":
|
|
1788
|
+
d = c - 1;
|
|
1789
|
+
break;
|
|
1790
|
+
case "PageDown":
|
|
1791
|
+
d = n + Math.max(1, Math.floor(c / 10));
|
|
1792
|
+
break;
|
|
1793
|
+
case "PageUp":
|
|
1794
|
+
d = n - Math.max(1, Math.floor(c / 10));
|
|
1795
|
+
break;
|
|
1796
|
+
default: return;
|
|
1797
|
+
}
|
|
1798
|
+
e.preventDefault(), d = Math.max(0, Math.min(c - 1, d)), d !== n && (p(Ss, {
|
|
1799
|
+
sel: t,
|
|
1800
|
+
i: d
|
|
1801
|
+
}, !0), s[d].focus?.());
|
|
1802
|
+
}
|
|
1803
|
+
let Es = (e) => {
|
|
1804
|
+
let t = e.getBoundingClientRect();
|
|
1805
|
+
return {
|
|
1806
|
+
x: t.left + t.width / 2,
|
|
1807
|
+
y: t.top
|
|
1808
|
+
};
|
|
1809
|
+
};
|
|
1810
|
+
function Ds(e, t) {
|
|
1811
|
+
if (!h(ri) || !h(J)) return !1;
|
|
1812
|
+
let n = h(H).categories.length, r = (L()?.i0 ?? 0) + t, i, a = h(co) ? "ArrowDown" : "ArrowRight", o = h(co) ? "ArrowUp" : "ArrowLeft";
|
|
1813
|
+
if (e.key === "+" || e.key === "=") i = Te(L(), n, r, .8);
|
|
1814
|
+
else if (e.key === "-" || e.key === "_") i = Te(L(), n, r, 1.25);
|
|
1815
|
+
else if (e.key === "0") i = null;
|
|
1816
|
+
else if (e.shiftKey && L() && (e.key === a || e.key === o)) {
|
|
1817
|
+
let t = L().i1 - L().i0 + 1;
|
|
1818
|
+
i = Ee(L(), n, (e.key === a ? 1 : -1) * Math.max(1, Math.floor(t / 10)));
|
|
1819
|
+
}
|
|
1820
|
+
if (i === void 0) return !1;
|
|
1821
|
+
e.preventDefault(), Si(i);
|
|
1822
|
+
let s = Math.max(0, Math.min(i ? i.i1 - i.i0 : n - 1, r - (i?.i0 ?? 0)));
|
|
1823
|
+
return fe().then(() => {
|
|
1824
|
+
let e = h(Fi)?.querySelector(h(uo) ? "[data-dense=\"true\"]" : `[data-cat-index="${s}"]`);
|
|
1825
|
+
e && (e.focus?.(), h(uo) && p(_o, s, !0), cs(e, s));
|
|
1826
|
+
}), !0;
|
|
1827
|
+
}
|
|
1828
|
+
function Os(e) {
|
|
1829
|
+
let t = h(H).categories.length;
|
|
1830
|
+
if (!t) return;
|
|
1831
|
+
let n = L() ?? {
|
|
1832
|
+
i0: 0,
|
|
1833
|
+
i1: t - 1
|
|
1834
|
+
}, r = n.i1 - n.i0 + 1, i = (n.i0 + n.i1) / 2, a = e.shiftKey ? r : Math.max(1, Math.floor(r / 10)), o;
|
|
1835
|
+
switch (e.key) {
|
|
1836
|
+
case "ArrowRight":
|
|
1837
|
+
o = Ee(L(), t, a);
|
|
1838
|
+
break;
|
|
1839
|
+
case "ArrowLeft":
|
|
1840
|
+
o = Ee(L(), t, -a);
|
|
1841
|
+
break;
|
|
1842
|
+
case "ArrowUp":
|
|
1843
|
+
case "+":
|
|
1844
|
+
case "=":
|
|
1845
|
+
o = Te(L(), t, i, .8);
|
|
1846
|
+
break;
|
|
1847
|
+
case "ArrowDown":
|
|
1848
|
+
case "-":
|
|
1849
|
+
case "_":
|
|
1850
|
+
o = Te(L(), t, i, 1.25);
|
|
1851
|
+
break;
|
|
1852
|
+
case "Home":
|
|
1853
|
+
o = L() ? {
|
|
1854
|
+
...L(),
|
|
1855
|
+
i0: 0,
|
|
1856
|
+
i1: r - 1
|
|
1857
|
+
} : null;
|
|
1858
|
+
break;
|
|
1859
|
+
case "End":
|
|
1860
|
+
o = L() ? {
|
|
1861
|
+
...L(),
|
|
1862
|
+
i0: t - r,
|
|
1863
|
+
i1: t - 1
|
|
1864
|
+
} : null;
|
|
1865
|
+
break;
|
|
1866
|
+
case "0":
|
|
1867
|
+
case "Escape":
|
|
1868
|
+
o = null;
|
|
1869
|
+
break;
|
|
1870
|
+
default: return;
|
|
1871
|
+
}
|
|
1872
|
+
e.preventDefault(), Si(o);
|
|
1873
|
+
}
|
|
1874
|
+
let ks = A("idle"), As = A(null), js = A(null), Ms = A(null), Ns = () => h(Ms) ?? import("./chart-export-pdf-CFq7Y-pq.js").then((e) => p(Ms, e, !0)), Ps = A(!1);
|
|
1875
|
+
function Fs(e) {
|
|
1876
|
+
if (!R()) return;
|
|
1877
|
+
e.preventDefault();
|
|
1878
|
+
let t = h(J) && !h(eo) ? go(e.clientX, e.currentTarget) : null;
|
|
1879
|
+
Is(e.clientX, e.clientY, t);
|
|
1880
|
+
}
|
|
1881
|
+
function Is(e, t, n) {
|
|
1882
|
+
let r = n == null ? {} : {
|
|
1883
|
+
category: h(K).categories[n],
|
|
1884
|
+
index: (L() ? L().i0 : 0) + n,
|
|
1885
|
+
...h(Do) ? {
|
|
1886
|
+
series: h(Do),
|
|
1887
|
+
value: h(K).series.find((e) => e.label === h(Do))?.values[n]
|
|
1888
|
+
} : {}
|
|
1889
|
+
}, i = () => p(As, {
|
|
1890
|
+
x: e,
|
|
1891
|
+
y: t,
|
|
1892
|
+
target: r
|
|
1893
|
+
}, !0);
|
|
1894
|
+
Ns(), h(js) ? i() : import("./SvChartMenu-CFvrEIJf.js").then((e) => {
|
|
1895
|
+
p(js, e.default, !0), i();
|
|
1896
|
+
});
|
|
1897
|
+
}
|
|
1898
|
+
function Ls(e, t) {
|
|
1899
|
+
if (!R() || !(e.key === "ContextMenu" || e.key === "F10" && e.shiftKey)) return !1;
|
|
1900
|
+
e.preventDefault();
|
|
1901
|
+
let n = e.currentTarget.getBoundingClientRect();
|
|
1902
|
+
return Is(n.left + n.width / 2, n.top + Math.min(n.height / 2, 24), t), !0;
|
|
1903
|
+
}
|
|
1904
|
+
let Rs = N(() => {
|
|
1905
|
+
if (!h(As)) return [];
|
|
1906
|
+
let e = [
|
|
1907
|
+
{
|
|
1908
|
+
label: h(B).downloadPng,
|
|
1909
|
+
onSelect: () => {
|
|
1910
|
+
Vs("png");
|
|
1911
|
+
}
|
|
1912
|
+
},
|
|
1913
|
+
{
|
|
1914
|
+
label: h(B).downloadSvg,
|
|
1915
|
+
onSelect: () => {
|
|
1916
|
+
Vs("svg");
|
|
1917
|
+
}
|
|
1918
|
+
},
|
|
1919
|
+
Hs() ? {
|
|
1920
|
+
label: Hs(),
|
|
1921
|
+
disabled: !0
|
|
1922
|
+
} : {
|
|
1923
|
+
label: h(B).downloadPdf,
|
|
1924
|
+
onSelect: () => {
|
|
1925
|
+
Us();
|
|
1926
|
+
}
|
|
1927
|
+
},
|
|
1928
|
+
...Ze(h(H)) ? [{
|
|
1929
|
+
label: h(B).downloadCsv,
|
|
1930
|
+
onSelect: () => {
|
|
1931
|
+
Qe(h(H));
|
|
1932
|
+
}
|
|
1933
|
+
}] : [],
|
|
1934
|
+
{
|
|
1935
|
+
label: h(B).copyAsImage,
|
|
1936
|
+
onSelect: () => {
|
|
1937
|
+
Gs();
|
|
1938
|
+
}
|
|
1939
|
+
},
|
|
1940
|
+
{
|
|
1941
|
+
label: h(B).print,
|
|
1942
|
+
onSelect: () => {
|
|
1943
|
+
Ws();
|
|
1944
|
+
}
|
|
1945
|
+
},
|
|
1946
|
+
...Be() && h(Xe) ? [{
|
|
1947
|
+
label: h(B).describeChart,
|
|
1948
|
+
onSelect: () => {
|
|
1949
|
+
$e();
|
|
1950
|
+
}
|
|
1951
|
+
}] : []
|
|
1952
|
+
];
|
|
1953
|
+
we() && h(xi) && e.push({ separator: !0 }, {
|
|
1954
|
+
label: h(B).resetZoom,
|
|
1955
|
+
onSelect: Oi
|
|
1956
|
+
}), h(jo) && e.push({ separator: !0 }, {
|
|
1957
|
+
label: h(B).range,
|
|
1958
|
+
children: h(Ao).map((e) => ({
|
|
1959
|
+
label: Mo(e),
|
|
1960
|
+
onSelect: () => No(e)
|
|
1961
|
+
}))
|
|
1962
|
+
}), h(Po) && h(ko).length > 1 && e.push({ separator: !0 }, {
|
|
1963
|
+
label: h(B).series,
|
|
1964
|
+
children: h(ko).map((e) => ({
|
|
1965
|
+
label: `${e.off ? " " : "✓"} ${e.label}`,
|
|
1966
|
+
onSelect: () => Bo(e.label)
|
|
1967
|
+
}))
|
|
1968
|
+
});
|
|
1969
|
+
let t = typeof R() == "function" ? R()(h(As).target) : Array.isArray(R()) ? R() : [];
|
|
1970
|
+
return t.length && e.push({ separator: !0 }, ...t), e;
|
|
1971
|
+
});
|
|
1972
|
+
function zs() {
|
|
1973
|
+
if (!h(Fi)) return null;
|
|
1974
|
+
let e = h(Fi).cloneNode(!0);
|
|
1975
|
+
e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.removeAttribute("class");
|
|
1976
|
+
let t = h(Fi).getBoundingClientRect();
|
|
1977
|
+
t.width && e.setAttribute("width", String(Math.round(t.width))), t.height && e.setAttribute("height", String(Math.round(t.height)));
|
|
1978
|
+
let n = document.createElement("style"), r = Array.from(document.styleSheets), i = [];
|
|
1979
|
+
for (let e of r) try {
|
|
1980
|
+
for (let t of Array.from(e.cssRules ?? [])) {
|
|
1981
|
+
let e = t.cssText;
|
|
1982
|
+
e.includes(".sv-grid-chart") && i.push(e);
|
|
1983
|
+
}
|
|
1984
|
+
} catch {}
|
|
1985
|
+
if (n.textContent = i.join("\n"), e.insertBefore(n, e.firstChild), h(Jo) && typeof getComputedStyle == "function") {
|
|
1986
|
+
let t = getComputedStyle(h(Jo)), n = [
|
|
1987
|
+
"--sg-bg",
|
|
1988
|
+
"--sg-fg",
|
|
1989
|
+
"--sg-muted",
|
|
1990
|
+
"--sg-border",
|
|
1991
|
+
"--sg-accent",
|
|
1992
|
+
"--sg-chart-bg",
|
|
1993
|
+
"--sg-chart-font-scale"
|
|
1994
|
+
].map((e) => {
|
|
1995
|
+
let n = t.getPropertyValue(e).trim();
|
|
1996
|
+
return n ? `${e}:${n}` : "";
|
|
1997
|
+
}).filter(Boolean);
|
|
1998
|
+
t.fontFamily && n.push(`font-family:${t.fontFamily}`), n.length && e.setAttribute("style", n.join(";"));
|
|
1999
|
+
}
|
|
2000
|
+
return new XMLSerializer().serializeToString(e);
|
|
2001
|
+
}
|
|
2002
|
+
async function Bs(e) {
|
|
2003
|
+
return new Promise((t) => {
|
|
2004
|
+
let n = h(Fi)?.getBoundingClientRect(), r = Math.max(1, Math.round(n?.width ?? h(q).width)), i = Math.max(1, Math.round(n?.height ?? h(q).height)), a = window.devicePixelRatio || 1, o = document.createElement("canvas");
|
|
2005
|
+
o.width = r * a, o.height = i * a;
|
|
2006
|
+
let s = o.getContext("2d");
|
|
2007
|
+
if (!s) {
|
|
2008
|
+
t(null);
|
|
2009
|
+
return;
|
|
2010
|
+
}
|
|
2011
|
+
let c = new Image();
|
|
2012
|
+
c.onload = () => {
|
|
2013
|
+
s.scale(a, a), s.drawImage(c, 0, 0, r, i), o.toBlob((e) => t(e), "image/png");
|
|
2014
|
+
}, c.onerror = () => t(null), c.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(e);
|
|
2015
|
+
});
|
|
2016
|
+
}
|
|
2017
|
+
async function Vs(e) {
|
|
2018
|
+
let t = zs();
|
|
2019
|
+
if (!t) return;
|
|
2020
|
+
let n = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
2021
|
+
if (e === "svg") {
|
|
2022
|
+
Ke(new Blob([t], { type: "image/svg+xml" }), `chart-${n}.svg`);
|
|
2023
|
+
return;
|
|
2024
|
+
}
|
|
2025
|
+
let r = await Bs(t);
|
|
2026
|
+
r && Ke(r, `chart-${n}.png`);
|
|
2027
|
+
}
|
|
2028
|
+
let Hs = () => {
|
|
2029
|
+
let e = h(Ms)?.pdfUndrawable(h(H).title, h(H).subtitle, h(H).caption);
|
|
2030
|
+
return e ? V(h(B).pdfCannotDraw, { text: e }) : "";
|
|
2031
|
+
};
|
|
2032
|
+
async function Us() {
|
|
2033
|
+
if (!h(Jo)) return;
|
|
2034
|
+
let e = await Ns(), t = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
2035
|
+
Hs() ? (p(Oo, Hs(), !0), p(Ps, !0)) : await e.downloadChartPdf(h(Jo), `chart-${t}.pdf`, {
|
|
2036
|
+
title: h(H).title,
|
|
2037
|
+
subtitle: h(H).subtitle,
|
|
2038
|
+
caption: h(H).caption
|
|
2039
|
+
});
|
|
2040
|
+
}
|
|
2041
|
+
async function Ws() {
|
|
2042
|
+
h(Jo) && (await Ns()).printChart(h(Jo), { title: h(H).title });
|
|
2043
|
+
}
|
|
2044
|
+
async function Gs() {
|
|
2045
|
+
let e = zs();
|
|
2046
|
+
if (!e) {
|
|
2047
|
+
p(ks, "err");
|
|
2048
|
+
return;
|
|
2049
|
+
}
|
|
2050
|
+
try {
|
|
2051
|
+
let t = await Bs(e);
|
|
2052
|
+
if (!t) throw Error("rasterize failed");
|
|
2053
|
+
let n = window.ClipboardItem;
|
|
2054
|
+
n && navigator.clipboard?.write ? await navigator.clipboard.write([new n({ "image/png": t })]) : await navigator.clipboard.writeText(e), p(ks, "ok");
|
|
2055
|
+
} catch {
|
|
2056
|
+
p(ks, "err");
|
|
2057
|
+
}
|
|
2058
|
+
setTimeout(() => p(ks, "idle"), 1500);
|
|
2059
|
+
}
|
|
2060
|
+
var Ks = {
|
|
2061
|
+
zoomTo: Di,
|
|
2062
|
+
resetZoom: Oi
|
|
2063
|
+
}, qs = Br();
|
|
2064
|
+
let Js;
|
|
2065
|
+
{
|
|
2066
|
+
let e = (e) => {
|
|
2067
|
+
var t = it(), n = _(t), r = T(n, !0), i = D(n, 2);
|
|
2068
|
+
C(i, 17, Ie, g, (e, t, n) => {
|
|
2069
|
+
var r = rt(), i = D(E(r), 2), a = (e) => {
|
|
2070
|
+
var n = tt(), r = T(n, !0);
|
|
2071
|
+
w(() => m(r, h(t))), j(e, n);
|
|
2072
|
+
}, o = (e) => {
|
|
2073
|
+
var r = nt(), i = T(r, !0);
|
|
2074
|
+
w(() => m(i, h(t))), S("click", r, () => Fa(Ie().slice(0, n + 1))), j(e, r);
|
|
2075
|
+
};
|
|
2076
|
+
b(i, (e) => {
|
|
2077
|
+
n === Ie().length - 1 ? e(a) : e(o, -1);
|
|
2078
|
+
}), j(e, r);
|
|
2079
|
+
}), k(t), w(() => {
|
|
2080
|
+
P(t, "aria-label", h(B).drillPath), m(r, h(Oa)?.name || h(B).drillRoot);
|
|
2081
|
+
}), S("click", n, () => Fa([])), j(e, t);
|
|
2082
|
+
};
|
|
2083
|
+
var Ys = _(qs), Xs = (t) => {
|
|
2084
|
+
var n = pt(), r = _(n), i = (t) => {
|
|
2085
|
+
e(t);
|
|
2086
|
+
};
|
|
2087
|
+
b(r, (e) => {
|
|
2088
|
+
h(ka) && Ie().length && e(i);
|
|
2089
|
+
});
|
|
2090
|
+
var a = D(r, 2), o = (e) => {
|
|
2091
|
+
var t = ot();
|
|
2092
|
+
C(t, 21, () => h(Ao), (e) => Mo(e), (e, t) => {
|
|
2093
|
+
var n = at(), r = T(n, !0);
|
|
2094
|
+
w((e, t) => {
|
|
2095
|
+
P(n, "title", e), m(r, t);
|
|
2096
|
+
}, [() => V(h(B).showLast, { preset: Mo(h(t)) }), () => Mo(h(t))]), S("click", n, () => No(h(t))), j(e, n);
|
|
2097
|
+
}), k(t), w(() => P(t, "aria-label", h(B).dateRange)), j(e, t);
|
|
2098
|
+
};
|
|
2099
|
+
b(a, (e) => {
|
|
2100
|
+
h(jo) && e(o);
|
|
2101
|
+
});
|
|
2102
|
+
var s = D(a, 2), c = (e) => {
|
|
2103
|
+
var t = st();
|
|
2104
|
+
let n;
|
|
2105
|
+
var r = D(_(t));
|
|
2106
|
+
k(t), w(() => {
|
|
2107
|
+
n = O(t, 1, "sv-grid-chart-tool svelte-kvdein", null, n, { "is-on": h(ii) }), P(t, "aria-pressed", h(ii)), P(t, "title", h(B).panTitle), m(r, ` ${h(B).pan ?? ""}`);
|
|
2108
|
+
}), S("click", t, () => p(ii, !h(ii))), j(e, t);
|
|
2109
|
+
};
|
|
2110
|
+
b(s, (e) => {
|
|
2111
|
+
h(ri) && (h(ri).pan === "mode" || h(ri).pan === !0) && h(xi) && e(c);
|
|
2112
|
+
});
|
|
2113
|
+
var l = D(s, 2), u = (e) => {
|
|
2114
|
+
var t = ct(), n = D(_(t));
|
|
2115
|
+
k(t), w(() => {
|
|
2116
|
+
P(t, "title", h(B).resetZoomTitle), m(n, ` ${h(B).resetZoom ?? ""}`);
|
|
2117
|
+
}), S("click", t, Oi), j(e, t);
|
|
2118
|
+
};
|
|
2119
|
+
b(l, (e) => {
|
|
2120
|
+
we() && h(xi) && e(u);
|
|
2121
|
+
});
|
|
2122
|
+
var d = D(l, 2), ee = (e) => {
|
|
2123
|
+
var t = lt();
|
|
2124
|
+
let n;
|
|
2125
|
+
var r = D(_(t));
|
|
2126
|
+
k(t), w(() => {
|
|
2127
|
+
n = O(t, 1, "sv-grid-chart-tool svelte-kvdein", null, n, { "is-on": h(oi) }), P(t, "aria-pressed", h(oi)), P(t, "title", h(oi) ? h(B).annotateOnTitle : h(B).annotateOffTitle), m(r, ` ${h(B).annotate ?? ""}`);
|
|
2128
|
+
}), S("click", t, () => p(oi, !h(oi))), j(e, t);
|
|
2129
|
+
};
|
|
2130
|
+
b(d, (e) => {
|
|
2131
|
+
Je() && e(ee);
|
|
2132
|
+
});
|
|
2133
|
+
var te = D(d, 2), ne = (e) => {
|
|
2134
|
+
var t = ft(), n = _(t);
|
|
2135
|
+
C(n, 16, () => h(qi), (e) => e, (e, t) => {
|
|
2136
|
+
var n = ut();
|
|
2137
|
+
let r;
|
|
2138
|
+
var i = T(n, !0);
|
|
2139
|
+
w((e) => {
|
|
2140
|
+
r = O(n, 1, "sv-grid-chart-tool sv-grid-chart-drawtool svelte-kvdein", null, r, { "is-on": h(Ji) === t }), P(n, "aria-pressed", h(Ji) === t), P(n, "title", e), m(i, h(Ki)[t]);
|
|
2141
|
+
}, [() => V(h(B).draw, { tool: h(Ki)[t] })]), S("click", n, () => oa(t)), j(e, n);
|
|
2142
|
+
});
|
|
2143
|
+
var r = D(n, 2), i = (e) => {
|
|
2144
|
+
var t = dt(), n = E(t), r = T(n, !0), i = D(n, 2), a = T(i, !0);
|
|
2145
|
+
w(() => {
|
|
2146
|
+
n.disabled = !h(Xi), P(n, "title", h(B).deleteDrawingTitle), m(r, h(B).deleteDrawing), P(i, "title", h(B).clearDrawingsTitle), m(a, h(B).clearDrawings);
|
|
2147
|
+
}), S("click", n, () => h(Xi) && la(h(Xi))), S("click", i, () => aa([])), j(e, t);
|
|
2148
|
+
}, a = N(() => na().length);
|
|
2149
|
+
b(r, (e) => {
|
|
2150
|
+
h(a) && e(i);
|
|
2151
|
+
}), k(t), w(() => P(t, "aria-label", h(B).drawingTools)), j(e, t);
|
|
2152
|
+
};
|
|
2153
|
+
b(te, (e) => {
|
|
2154
|
+
h(qi).length && h(J) && e(ne);
|
|
2155
|
+
});
|
|
2156
|
+
var re = D(te, 2), ie = T(re, !0), f = D(re, 2), g = T(f, !0), ae = D(f, 2), oe = T(ae, !0), se = D(ae, 2), ce = T(se, !0), v = D(se, 2), y = T(v, !0);
|
|
2157
|
+
k(n), w((e, t, n) => {
|
|
2158
|
+
P(re, "title", h(B).downloadPng), m(ie, h(B).png), P(f, "title", h(B).downloadSvg), m(g, h(B).svg), P(ae, "aria-disabled", e), P(ae, "title", t), m(oe, n), P(se, "title", h(B).printTitle), m(ce, h(B).print), P(v, "title", h(B).copyTitle), m(y, h(ks) === "ok" ? h(B).copied : h(B).copy);
|
|
2159
|
+
}, [
|
|
2160
|
+
() => !!Hs(),
|
|
2161
|
+
() => Hs() || h(B).downloadPdf,
|
|
2162
|
+
() => h(Ps) && Hs() || h(B).pdf
|
|
2163
|
+
]), S("click", re, () => Vs("png")), S("click", f, () => Vs("svg")), S("click", ae, Us), I("pointerenter", ae, Ns), I("focus", ae, Ns), S("click", se, Ws), S("click", v, Gs), ye(n, "clientHeight", (e) => p(Yr, e)), j(t, n);
|
|
2164
|
+
}, Zs = (t) => {
|
|
2165
|
+
var n = mt(), r = _(n);
|
|
2166
|
+
e(r), k(n), ye(n, "clientHeight", (e) => p(Yr, e)), j(t, n);
|
|
2167
|
+
};
|
|
2168
|
+
b(Ys, (e) => {
|
|
2169
|
+
h(ai) ? e(Xs) : h(ka) && Ie().length && e(Zs, 1);
|
|
2170
|
+
});
|
|
2171
|
+
var $ = D(Ys, 2);
|
|
2172
|
+
let t, n;
|
|
2173
|
+
var Qs = _($), $s = (e) => {
|
|
2174
|
+
var t = xt(), n = _(t), r = (e) => {
|
|
2175
|
+
var t = ht(), n = _(t);
|
|
2176
|
+
let r;
|
|
2177
|
+
k(t), w(() => {
|
|
2178
|
+
P(t, "id", `${hi}-plot`), P(n, "x", h(q).plot.x - 4), P(n, "y", h(q).plot.y - 4), P(n, "width", h(q).plot.w + 8), P(n, "height", h(q).plot.h + 8), r = O(n, 0, "svelte-kvdein", null, r, { "sv-grid-chart-wipe": h(Wa) === "wipe" });
|
|
2179
|
+
}), j(e, t);
|
|
2180
|
+
};
|
|
2181
|
+
b(n, (e) => {
|
|
2182
|
+
h(J) && e(r);
|
|
2183
|
+
});
|
|
2184
|
+
var i = D(n);
|
|
2185
|
+
C(i, 17, () => h(Ga), (e) => e.id, (e, t) => {
|
|
2186
|
+
var n = gt(), r = _(n), i = D(r);
|
|
2187
|
+
k(n), w(() => {
|
|
2188
|
+
P(n, "id", h(t).id), P(r, "stop-color", h(t).from), P(i, "stop-color", h(t).to === "transparent" ? h(t).from : h(t).to), P(i, "stop-opacity", h(t).to === "transparent" ? 0 : 1);
|
|
2189
|
+
}), j(e, n);
|
|
2190
|
+
});
|
|
2191
|
+
var a = D(i);
|
|
2192
|
+
C(a, 17, () => h(yi), (e) => e.id, (e, t) => {
|
|
2193
|
+
var n = v(), r = E(n), i = (e) => {
|
|
2194
|
+
var n = _t(), r = _(n);
|
|
2195
|
+
be(), k(n), w(() => {
|
|
2196
|
+
P(n, "id", h(t).id), P(r, "fill", h(t).color);
|
|
2197
|
+
}), j(e, n);
|
|
2198
|
+
}, a = (e) => {
|
|
2199
|
+
var n = vt(), r = _(n);
|
|
2200
|
+
be(), k(n), w(() => {
|
|
2201
|
+
P(n, "id", h(t).id), P(r, "fill", h(t).color);
|
|
2202
|
+
}), j(e, n);
|
|
2203
|
+
}, o = (e) => {
|
|
2204
|
+
var n = yt(), r = _(n);
|
|
2205
|
+
be(), k(n), w(() => {
|
|
2206
|
+
P(n, "id", h(t).id), P(r, "fill", h(t).color);
|
|
2207
|
+
}), j(e, n);
|
|
2208
|
+
}, s = (e) => {
|
|
2209
|
+
var n = bt(), r = _(n);
|
|
2210
|
+
be(), k(n), w(() => {
|
|
2211
|
+
P(n, "id", h(t).id), P(r, "fill", h(t).color);
|
|
2212
|
+
}), j(e, n);
|
|
2213
|
+
};
|
|
2214
|
+
b(r, (e) => {
|
|
2215
|
+
h(t).kind === "stripe" ? e(i) : h(t).kind === "crosshatch" ? e(a, 1) : h(t).kind === "dots" ? e(o, 2) : h(t).kind === "diagonal" && e(s, 3);
|
|
2216
|
+
}), j(e, n);
|
|
2217
|
+
}), k(t), j(e, t);
|
|
2218
|
+
};
|
|
2219
|
+
b(Qs, (e) => {
|
|
2220
|
+
(h(yi).length || h(Ga).length || h(J)) && e($s);
|
|
2221
|
+
});
|
|
2222
|
+
var ec = D(Qs), tc = (e) => {
|
|
2223
|
+
var t = St(), n = T(t, !0);
|
|
2224
|
+
w(() => {
|
|
2225
|
+
P(t, "x", h(q).frame.title.x), P(t, "y", h(q).frame.title.y), m(n, h(q).frame.title.text);
|
|
2226
|
+
}), j(e, t);
|
|
2227
|
+
};
|
|
2228
|
+
b(ec, (e) => {
|
|
2229
|
+
h(q).frame.title && e(tc);
|
|
2230
|
+
});
|
|
2231
|
+
var nc = D(ec), rc = (e) => {
|
|
2232
|
+
var t = Ct(), n = T(t, !0);
|
|
2233
|
+
w(() => {
|
|
2234
|
+
P(t, "x", h(q).frame.subtitle.x), P(t, "y", h(q).frame.subtitle.y), m(n, h(q).frame.subtitle.text);
|
|
2235
|
+
}), j(e, t);
|
|
2236
|
+
};
|
|
2237
|
+
b(nc, (e) => {
|
|
2238
|
+
h(q).frame.subtitle && e(rc);
|
|
2239
|
+
});
|
|
2240
|
+
var ic = D(nc), ac = (e) => {
|
|
2241
|
+
var t = wt(), n = T(t, !0);
|
|
2242
|
+
w(() => {
|
|
2243
|
+
P(t, "x", h(q).frame.caption.x), P(t, "y", h(q).frame.caption.y), m(n, h(q).frame.caption.text);
|
|
2244
|
+
}), j(e, t);
|
|
2245
|
+
};
|
|
2246
|
+
b(ic, (e) => {
|
|
2247
|
+
h(q).frame.caption && e(ac);
|
|
2248
|
+
});
|
|
2249
|
+
var oc = D(ic), sc = (e) => {
|
|
2250
|
+
var t = kt(), n = E(t);
|
|
2251
|
+
C(n, 17, () => h(q).valueTicks, (e) => e.label + e.x, (e, t, n, r) => {
|
|
2252
|
+
var i = Et(), a = E(i), o = (e) => {
|
|
2253
|
+
var n = Tt();
|
|
2254
|
+
w(() => {
|
|
2255
|
+
P(n, "x1", h(t).x), P(n, "y1", h(q).plot.y), P(n, "x2", h(t).x), P(n, "y2", h(q).plot.y + h(q).plot.h);
|
|
2256
|
+
}), j(e, n);
|
|
2257
|
+
};
|
|
2258
|
+
b(a, (e) => {
|
|
2259
|
+
h(q).grid.x && e(o);
|
|
2260
|
+
});
|
|
2261
|
+
var s = D(a), c = T(s, !0);
|
|
2262
|
+
w(() => {
|
|
2263
|
+
P(s, "x", h(t).x), P(s, "y", h(q).plot.y + h(q).plot.h + 14), m(c, h(t).label);
|
|
2264
|
+
}), j(e, i);
|
|
2265
|
+
});
|
|
2266
|
+
var r = D(n), i = (e) => {
|
|
2267
|
+
var t = v(), n = E(t);
|
|
2268
|
+
C(n, 17, () => h(q).catTicks, (e) => e.value, (e, t, n, r) => {
|
|
2269
|
+
var i = Tt();
|
|
2270
|
+
w(() => {
|
|
2271
|
+
P(i, "x1", h(q).plot.x), P(i, "y1", h(t).y), P(i, "x2", h(q).plot.x + h(q).plot.w), P(i, "y2", h(t).y);
|
|
2272
|
+
}), j(e, i);
|
|
2273
|
+
}), j(e, t);
|
|
2274
|
+
};
|
|
2275
|
+
b(r, (e) => {
|
|
2276
|
+
h(q).grid.y && e(i);
|
|
2277
|
+
});
|
|
2278
|
+
var a = D(r);
|
|
2279
|
+
C(a, 17, () => h(q).catTicks, (e) => e.value, (e, t, n, r) => {
|
|
2280
|
+
var i = Dt(), a = T(i, !0);
|
|
2281
|
+
w((e) => {
|
|
2282
|
+
P(i, "x", h(q).plot.x - 6), P(i, "y", h(t).y + 3), m(a, e);
|
|
2283
|
+
}, [() => Ko(h(t).label, 18)]), j(e, i);
|
|
2284
|
+
});
|
|
2285
|
+
var o = D(a), s = (e) => {
|
|
2286
|
+
var t = Ot();
|
|
2287
|
+
P(t, "x", 13);
|
|
2288
|
+
var n = T(t, !0);
|
|
2289
|
+
w(() => {
|
|
2290
|
+
P(t, "y", h(q).plot.y + h(q).plot.h / 2), P(t, "transform", `rotate(-90 13 ${h(q).plot.y + h(q).plot.h / 2})`), m(n, h(Ka));
|
|
2291
|
+
}), j(e, t);
|
|
2292
|
+
};
|
|
2293
|
+
b(o, (e) => {
|
|
2294
|
+
h(Ka) && e(s);
|
|
2295
|
+
});
|
|
2296
|
+
var c = D(o), l = (e) => {
|
|
2297
|
+
var t = Ot(), n = T(t, !0);
|
|
2298
|
+
w(() => {
|
|
2299
|
+
P(t, "x", h(q).plot.x + h(q).plot.w / 2), P(t, "y", h(q).height - 3 - h(q).frame.bottom), m(n, h(Ja));
|
|
2300
|
+
}), j(e, t);
|
|
2301
|
+
};
|
|
2302
|
+
b(c, (e) => {
|
|
2303
|
+
h(Ja) && e(l);
|
|
2304
|
+
}), j(e, t);
|
|
2305
|
+
}, cc = (e) => {
|
|
2306
|
+
var t = Lt(), n = E(t);
|
|
2307
|
+
C(n, 17, () => h(q).yTicks, (e) => e.value, (e, t, n, r) => {
|
|
2308
|
+
var i = jt(), a = E(i), o = (e) => {
|
|
2309
|
+
var n = At();
|
|
2310
|
+
let r;
|
|
2311
|
+
w(() => {
|
|
2312
|
+
r = O(n, 0, "sv-grid-chart-gridline svelte-kvdein", null, r, { "is-zero": h(t).value === 0 }), P(n, "x1", h(q).plot.x), P(n, "y1", h(t).y), P(n, "x2", h(q).plot.x + h(q).plot.w), P(n, "y2", h(t).y);
|
|
2313
|
+
}), j(e, n);
|
|
2314
|
+
};
|
|
2315
|
+
b(a, (e) => {
|
|
2316
|
+
(h(q).grid.y || h(t).value === 0) && e(o);
|
|
2317
|
+
});
|
|
2318
|
+
var s = D(a), c = (e) => {
|
|
2319
|
+
var n = Dt(), r = T(n, !0);
|
|
2320
|
+
w((e) => {
|
|
2321
|
+
P(n, "x", h(q).plot.x - 6), P(n, "y", h(t).y + 3), m(r, e);
|
|
2322
|
+
}, [() => qo(h(t).value, h(t).label)]), j(e, n);
|
|
2323
|
+
};
|
|
2324
|
+
b(s, (e) => {
|
|
2325
|
+
h(t).label && e(c);
|
|
2326
|
+
}), j(e, i);
|
|
2327
|
+
});
|
|
2328
|
+
var r = D(n), i = (e) => {
|
|
2329
|
+
var t = v(), n = E(t);
|
|
2330
|
+
C(n, 17, () => h(q).xTicks, (e) => e.label + e.x, (e, t, n, r) => {
|
|
2331
|
+
var i = Tt();
|
|
2332
|
+
w(() => {
|
|
2333
|
+
P(i, "x1", h(t).x), P(i, "y1", h(q).plot.y), P(i, "x2", h(t).x), P(i, "y2", h(q).plot.y + h(q).plot.h);
|
|
2334
|
+
}), j(e, i);
|
|
2335
|
+
}), j(e, t);
|
|
2336
|
+
};
|
|
2337
|
+
b(r, (e) => {
|
|
2338
|
+
h(q).grid.x && e(i);
|
|
2339
|
+
});
|
|
2340
|
+
var a = D(r), o = (e) => {
|
|
2341
|
+
var t = v(), n = E(t);
|
|
2342
|
+
C(n, 17, () => h(q).y2Ticks, (e) => e.value, (e, t, n, r) => {
|
|
2343
|
+
var i = v(), a = E(i), o = (e) => {
|
|
2344
|
+
var n = Mt(), r = T(n, !0);
|
|
2345
|
+
w((e) => {
|
|
2346
|
+
P(n, "x", h(q).plot.x + h(q).plot.w + 6), P(n, "y", h(t).y + 3), m(r, e);
|
|
2347
|
+
}, [() => qo(h(t).value, h(t).label)]), j(e, n);
|
|
2348
|
+
};
|
|
2349
|
+
b(a, (e) => {
|
|
2350
|
+
h(t).label && e(o);
|
|
2351
|
+
}), j(e, i);
|
|
2352
|
+
}), j(e, t);
|
|
2353
|
+
};
|
|
2354
|
+
b(a, (e) => {
|
|
2355
|
+
h(q).hasRightAxis && e(o);
|
|
2356
|
+
});
|
|
2357
|
+
var s = D(a);
|
|
2358
|
+
C(s, 17, () => h(q).xTicks, (e) => e.label + e.x, (e, t, n, r) => {
|
|
2359
|
+
var i = v(), a = E(i), o = (e) => {}, s = (e) => {
|
|
2360
|
+
var n = Nt(), r = T(n, !0);
|
|
2361
|
+
w((e) => {
|
|
2362
|
+
P(n, "x", h(t).x), P(n, "y", h(q).plot.y + h(q).plot.h + 12), P(n, "text-anchor", h(q).xLabelAngle < 0 ? "end" : "start"), P(n, "transform", `rotate(${h(q).xLabelAngle} ${h(t).x} ${h(q).plot.y + h(q).plot.h + 12})`), m(r, e);
|
|
2363
|
+
}, [() => Ko(h(t).label, Math.abs(h(q).xLabelAngle) >= 60 ? 18 : 12)]), j(e, n);
|
|
2364
|
+
}, c = (e) => {
|
|
2365
|
+
var n = Pt(), r = T(n, !0);
|
|
2366
|
+
w((e) => {
|
|
2367
|
+
P(n, "x", h(t).x), P(n, "y", h(q).plot.y + h(q).plot.h + 16), m(r, e);
|
|
2368
|
+
}, [() => Ko(h(t).label, 16)]), j(e, n);
|
|
2369
|
+
};
|
|
2370
|
+
b(a, (e) => {
|
|
2371
|
+
h(t).label ? h(q).xLabelRotated ? e(s, 1) : e(c, -1) : e(o);
|
|
2372
|
+
}), j(e, i);
|
|
2373
|
+
});
|
|
2374
|
+
var c = D(s);
|
|
2375
|
+
C(c, 17, () => h(q).categoryGroupTicks, (e) => e.label + e.x0, (e, t) => {
|
|
2376
|
+
let n = N(() => h(q).plot.y + h(q).plot.h + (h(q).xLabelRotated ? 46 : 32));
|
|
2377
|
+
var r = It(), i = E(r), a = D(i), o = (e) => {
|
|
2378
|
+
var r = Ft();
|
|
2379
|
+
w(() => {
|
|
2380
|
+
P(r, "x1", h(t).x0), P(r, "y1", h(q).plot.y + h(q).plot.h), P(r, "x2", h(t).x0), P(r, "y2", h(n) - 9);
|
|
2381
|
+
}), j(e, r);
|
|
2382
|
+
};
|
|
2383
|
+
b(a, (e) => {
|
|
2384
|
+
h(t).x0 > h(q).plot.x + 1 && e(o);
|
|
2385
|
+
});
|
|
2386
|
+
var s = D(a), c = T(s, !0);
|
|
2387
|
+
w((e) => {
|
|
2388
|
+
P(i, "x1", h(t).x0 + 3), P(i, "y1", h(n) - 9), P(i, "x2", h(t).x1 - 3), P(i, "y2", h(n) - 9), P(s, "x", h(t).xCenter), P(s, "y", h(n)), m(c, e);
|
|
2389
|
+
}, [() => Ko(h(t).label, Math.max(4, Math.floor((h(t).x1 - h(t).x0) / 7)))]), j(e, r);
|
|
2390
|
+
});
|
|
2391
|
+
var l = D(c), u = (e) => {
|
|
2392
|
+
var t = Ot();
|
|
2393
|
+
P(t, "x", 13);
|
|
2394
|
+
var n = T(t, !0);
|
|
2395
|
+
w(() => {
|
|
2396
|
+
P(t, "y", h(q).plot.y + h(q).plot.h / 2), P(t, "transform", `rotate(-90 13 ${h(q).plot.y + h(q).plot.h / 2})`), m(n, h(Ka));
|
|
2397
|
+
}), j(e, t);
|
|
2398
|
+
};
|
|
2399
|
+
b(l, (e) => {
|
|
2400
|
+
h(Ka) && e(u);
|
|
2401
|
+
});
|
|
2402
|
+
var d = D(l), ee = (e) => {
|
|
2403
|
+
var t = Ot(), n = T(t, !0);
|
|
2404
|
+
w(() => {
|
|
2405
|
+
P(t, "x", h(q).width - 12), P(t, "y", h(q).plot.y + h(q).plot.h / 2), P(t, "transform", `rotate(90 ${h(q).width - 12} ${h(q).plot.y + h(q).plot.h / 2})`), m(n, h(qa));
|
|
2406
|
+
}), j(e, t);
|
|
2407
|
+
};
|
|
2408
|
+
b(d, (e) => {
|
|
2409
|
+
h(qa) && e(ee);
|
|
2410
|
+
});
|
|
2411
|
+
var te = D(d), ne = (e) => {
|
|
2412
|
+
var t = Ot(), n = T(t, !0);
|
|
2413
|
+
w(() => {
|
|
2414
|
+
P(t, "x", h(q).plot.x + h(q).plot.w / 2), P(t, "y", h(q).height - 3 - h(q).frame.bottom), m(n, h(Ja));
|
|
2415
|
+
}), j(e, t);
|
|
2416
|
+
};
|
|
2417
|
+
b(te, (e) => {
|
|
2418
|
+
h(Ja) && e(ne);
|
|
2419
|
+
}), j(e, t);
|
|
2420
|
+
};
|
|
2421
|
+
b(oc, (e) => {
|
|
2422
|
+
h(co) ? e(sc) : h(J) && e(cc, 1);
|
|
2423
|
+
});
|
|
2424
|
+
var lc = D(oc);
|
|
2425
|
+
C(lc, 17, () => h(q).referenceBands, g, (e, t) => {
|
|
2426
|
+
var n = Bt(), r = E(n), i = D(r), a = (e) => {
|
|
2427
|
+
var n = v(), r = E(n), i = (e) => {
|
|
2428
|
+
var n = Rt(), r = T(n, !0);
|
|
2429
|
+
w(() => {
|
|
2430
|
+
P(n, "x", h(t).x + h(t).w - 3), P(n, "y", h(t).y + 10), P(n, "fill", h(t).color), m(r, h(t).label);
|
|
2431
|
+
}), j(e, n);
|
|
2432
|
+
}, a = (e) => {
|
|
2433
|
+
var n = zt(), r = T(n, !0);
|
|
2434
|
+
w(() => {
|
|
2435
|
+
P(n, "x", h(t).x + h(t).w / 2), P(n, "y", h(t).y + 10), P(n, "fill", h(t).color), m(r, h(t).label);
|
|
2436
|
+
}), j(e, n);
|
|
2437
|
+
};
|
|
2438
|
+
b(r, (e) => {
|
|
2439
|
+
h(t).axis === "y" ? e(i) : e(a, -1);
|
|
2440
|
+
}), j(e, n);
|
|
2441
|
+
};
|
|
2442
|
+
b(i, (e) => {
|
|
2443
|
+
h(t).label && e(a);
|
|
2444
|
+
}), w(() => {
|
|
2445
|
+
P(r, "x", h(t).x), P(r, "y", h(t).y), P(r, "width", h(t).w), P(r, "height", h(t).h), P(r, "fill", h(t).color), P(r, "fill-opacity", h(t).opacity);
|
|
2446
|
+
}), j(e, n);
|
|
2447
|
+
});
|
|
2448
|
+
var uc = D(lc);
|
|
2449
|
+
let r;
|
|
2450
|
+
var dc = _(uc);
|
|
2451
|
+
C(dc, 19, () => h(q).lines, (e, t) => e.label + t, (e, t, n) => {
|
|
2452
|
+
let r = N(() => h(t).style?.gradient ? `${hi}-grad-${h(n)}` : null);
|
|
2453
|
+
var i = qt(), a = _(i), o = (e) => {
|
|
2454
|
+
var n = Vt();
|
|
2455
|
+
w(() => {
|
|
2456
|
+
P(n, "d", h(t).bandPath), P(n, "fill", h(t).color);
|
|
2457
|
+
}), j(e, n);
|
|
2458
|
+
};
|
|
2459
|
+
b(a, (e) => {
|
|
2460
|
+
h(t).bandPath && e(o);
|
|
2461
|
+
});
|
|
2462
|
+
var s = D(a), c = (e) => {
|
|
2463
|
+
var n = Ht();
|
|
2464
|
+
w(() => {
|
|
2465
|
+
P(n, "d", h(t).areaPath), P(n, "fill", h(r) ? `url(#${h(r)})` : h(vi)[h(t).label] ?? h(t).color), P(n, "fill-opacity", h(r) ? .6 : h(t).range ? .35 : .15);
|
|
2466
|
+
}), j(e, n);
|
|
2467
|
+
};
|
|
2468
|
+
b(s, (e) => {
|
|
2469
|
+
h(t).areaPath && e(c);
|
|
2470
|
+
});
|
|
2471
|
+
var l = D(s), u = D(l), d = (e) => {
|
|
2472
|
+
let n = N(() => h(t).points[h(Qo) ?? -1]);
|
|
2473
|
+
var r = v(), i = E(r), a = (e) => {
|
|
2474
|
+
var r = Ut();
|
|
2475
|
+
w(() => {
|
|
2476
|
+
P(r, "cx", h(n).x), P(r, "cy", h(n).y), P(r, "fill", h(n).marker?.color ?? h(t).color);
|
|
2477
|
+
}), j(e, r);
|
|
2478
|
+
};
|
|
2479
|
+
b(i, (e) => {
|
|
2480
|
+
h(n)?.defined && e(a);
|
|
2481
|
+
}), j(e, r);
|
|
2482
|
+
}, ee = (e) => {
|
|
2483
|
+
var n = v(), r = E(n);
|
|
2484
|
+
C(r, 17, () => h(t).points, g, (e, n, r) => {
|
|
2485
|
+
var i = v(), a = E(i), o = (e) => {
|
|
2486
|
+
let i = N(() => h(n).marker?.shape ?? "circle"), a = N(() => (h(n).marker?.size ?? 3) + +(h(Qo) === r)), o = N(() => h(n).marker?.color ?? h(t).color);
|
|
2487
|
+
var s = v(), c = E(s), l = (e) => {
|
|
2488
|
+
var i = Wt();
|
|
2489
|
+
let s;
|
|
2490
|
+
w((e, t) => {
|
|
2491
|
+
s = O(i, 0, "sv-grid-chart-dot svelte-kvdein", null, s, {
|
|
2492
|
+
"is-active": h(Qo) === r,
|
|
2493
|
+
"is-selected": e
|
|
2494
|
+
}), P(i, "cx", h(n).x), P(i, "cy", h(n).y), P(i, "r", h(a)), P(i, "fill", h(o)), F(i, t);
|
|
2495
|
+
}, [() => wo(h(n).label, h(t).label), () => `opacity:${To(h(n).label, h(t).label)}`]), j(e, i);
|
|
2496
|
+
}, u = (e) => {
|
|
2497
|
+
var t = Gt();
|
|
2498
|
+
let s;
|
|
2499
|
+
w((e) => {
|
|
2500
|
+
s = O(t, 0, "sv-grid-chart-dot is-stroked svelte-kvdein", null, s, { "is-active": h(Qo) === r }), P(t, "d", e), P(t, "stroke", h(o));
|
|
2501
|
+
}, [() => ie(h(i), h(n).x, h(n).y, h(a))]), j(e, t);
|
|
2502
|
+
}, d = (e) => {
|
|
2503
|
+
var t = Kt();
|
|
2504
|
+
let s;
|
|
2505
|
+
w((e) => {
|
|
2506
|
+
s = O(t, 0, "sv-grid-chart-dot svelte-kvdein", null, s, { "is-active": h(Qo) === r }), P(t, "d", e), P(t, "fill", h(o));
|
|
2507
|
+
}, [() => ie(h(i), h(n).x, h(n).y, h(a))]), j(e, t);
|
|
2508
|
+
};
|
|
2509
|
+
b(c, (e) => {
|
|
2510
|
+
h(i) === "circle" ? e(l) : h(i) === "cross" ? e(u, 1) : e(d, -1);
|
|
2511
|
+
}), j(e, s);
|
|
2512
|
+
};
|
|
2513
|
+
b(a, (e) => {
|
|
2514
|
+
h(n).defined && h(n).marker?.shape !== "none" && e(o);
|
|
2515
|
+
}), j(e, i);
|
|
2516
|
+
}), j(e, n);
|
|
2517
|
+
};
|
|
2518
|
+
b(u, (e) => {
|
|
2519
|
+
h(uo) ? e(d) : e(ee, -1);
|
|
2520
|
+
}), k(i), w((e) => {
|
|
2521
|
+
F(i, e), P(l, "d", h(t).path), P(l, "stroke", h(t).color), P(l, "stroke-width", h(t).style?.strokeWidth ?? (h(t).range ? 1 : 2)), P(l, "stroke-dasharray", h(t).style?.dash);
|
|
2522
|
+
}, [() => `opacity:${Y(h(t).label) * (h(t).style?.opacity ?? 1)}`]), j(e, i);
|
|
2523
|
+
});
|
|
2524
|
+
var fc = D(dc), pc = (e) => {
|
|
2525
|
+
var t = v(), n = E(t);
|
|
2526
|
+
ge(n, () => f.underlay, () => h(Xa)), j(e, t);
|
|
2527
|
+
};
|
|
2528
|
+
b(fc, (e) => {
|
|
2529
|
+
f.underlay && e(pc);
|
|
2530
|
+
});
|
|
2531
|
+
var mc = D(fc);
|
|
2532
|
+
C(mc, 17, () => h(q).bars, g, (e, t) => {
|
|
2533
|
+
var n = Jt();
|
|
2534
|
+
let r;
|
|
2535
|
+
w((e, i, a) => {
|
|
2536
|
+
r = O(n, 0, "sv-grid-chart-bar svelte-kvdein", null, r, { "is-selected": e }), P(n, "x", h(t).x), P(n, "y", h(t).y), P(n, "width", h(t).w), P(n, "height", h(t).h), P(n, "fill", i), F(n, a);
|
|
2537
|
+
}, [
|
|
2538
|
+
() => wo(h(t).label, h(t).series, h(t).index),
|
|
2539
|
+
() => h(vi)[h(t).series]?.startsWith("url(") ? h(vi)[h(t).series] : h(t).color,
|
|
2540
|
+
() => `opacity:${Y(h(t).series) * (h(t).opacity ?? 1) * To(h(t).label, h(t).series, h(t).index)}`
|
|
2541
|
+
]), S("click", n, function(...e) {
|
|
2542
|
+
(h(X) ? (e) => {
|
|
2543
|
+
e.stopPropagation(), ys(h(t).label, h(t).series, h(t).value, h(t).index, e);
|
|
2544
|
+
} : void 0)?.apply(this, e);
|
|
2545
|
+
}), j(e, n);
|
|
2546
|
+
});
|
|
2547
|
+
var hc = D(mc);
|
|
2548
|
+
C(hc, 17, () => h(q).stems, g, (e, t) => {
|
|
2549
|
+
var n = Xt(), r = _(n), i = D(r), a = (e) => {
|
|
2550
|
+
var n = Yt();
|
|
2551
|
+
w(() => {
|
|
2552
|
+
P(n, "cx", h(t).xCenter), P(n, "cy", h(t).y0), P(n, "r", h(t).r), P(n, "fill", h(t).color2 ?? h(t).color), P(n, "stroke", h(t).color2 ?? h(t).color);
|
|
2553
|
+
}), j(e, n);
|
|
2554
|
+
};
|
|
2555
|
+
b(i, (e) => {
|
|
2556
|
+
h(t).dumbbell && e(a);
|
|
2557
|
+
});
|
|
2558
|
+
var o = D(i);
|
|
2559
|
+
k(n), w((e) => {
|
|
2560
|
+
F(n, e), P(r, "x1", h(t).xCenter), P(r, "y1", h(t).y0), P(r, "x2", h(t).xCenter), P(r, "y2", h(t).y1), P(r, "stroke", h(t).dumbbell ? "var(--sg-muted, #94a3b8)" : h(t).color), P(r, "stroke-width", h(t).dumbbell ? 2 : 1.5), P(o, "cx", h(t).xCenter), P(o, "cy", h(t).y1), P(o, "r", h(t).r), P(o, "fill", h(t).color);
|
|
2561
|
+
}, [() => `opacity:${Y(h(t).series)}`]), S("mousemove", n, (e) => gs(e.clientX, e.clientY, h(t))), I("mouseleave", n, Q), j(e, n);
|
|
2562
|
+
});
|
|
2563
|
+
var gc = D(hc);
|
|
2564
|
+
C(gc, 17, () => h(q).candles, g, (e, t) => {
|
|
2565
|
+
var n = v(), r = E(n), i = (e) => {
|
|
2566
|
+
var n = Zt(), r = E(n), i = D(r), a = D(i);
|
|
2567
|
+
w((e, n, o) => {
|
|
2568
|
+
P(r, "x1", h(t).xCenter), P(r, "y1", h(t).yHigh), P(r, "x2", h(t).xCenter), P(r, "y2", h(t).yLow), P(r, "stroke", h(t).color), F(r, e), P(i, "x1", h(t).x), P(i, "y1", h(t).yOpen), P(i, "x2", h(t).xCenter), P(i, "y2", h(t).yOpen), P(i, "stroke", h(t).color), F(i, n), P(a, "x1", h(t).xCenter), P(a, "y1", h(t).yClose), P(a, "x2", h(t).x + h(t).w), P(a, "y2", h(t).yClose), P(a, "stroke", h(t).color), F(a, o);
|
|
2569
|
+
}, [
|
|
2570
|
+
() => `opacity:${Y(h(t).series)}`,
|
|
2571
|
+
() => `opacity:${Y(h(t).series)}`,
|
|
2572
|
+
() => `opacity:${Y(h(t).series)}`
|
|
2573
|
+
]), j(e, n);
|
|
2574
|
+
}, a = (e) => {
|
|
2575
|
+
var n = Qt(), r = E(n), i = D(r);
|
|
2576
|
+
w((e, n) => {
|
|
2577
|
+
P(r, "x1", h(t).xCenter), P(r, "y1", h(t).yHigh), P(r, "x2", h(t).xCenter), P(r, "y2", h(t).yLow), P(r, "stroke", h(t).color), F(r, e), P(i, "x", h(t).x), P(i, "y", h(t).bodyY), P(i, "width", h(t).w), P(i, "height", h(t).bodyH), P(i, "fill", h(t).hollow ? "none" : h(t).color), P(i, "stroke", h(t).color), F(i, n);
|
|
2578
|
+
}, [() => `opacity:${Y(h(t).series)}`, () => `opacity:${Y(h(t).series)}`]), j(e, n);
|
|
2579
|
+
};
|
|
2580
|
+
b(r, (e) => {
|
|
2581
|
+
h(ga) ? e(i) : e(a, -1);
|
|
2582
|
+
}), j(e, n);
|
|
2583
|
+
});
|
|
2584
|
+
var _c = D(gc);
|
|
2585
|
+
C(_c, 17, () => h(q).boxes, g, (e, t) => {
|
|
2586
|
+
var n = en(), r = E(n), i = D(r), a = D(i), o = D(a), s = D(o), c = D(s);
|
|
2587
|
+
C(c, 17, () => h(t).outliers, g, (e, n) => {
|
|
2588
|
+
var r = $t();
|
|
2589
|
+
w((e) => {
|
|
2590
|
+
P(r, "cx", h(t).xCenter), P(r, "cy", h(n).y), P(r, "stroke", h(t).color), F(r, e);
|
|
2591
|
+
}, [() => `opacity:${Y(h(t).series)}`]), j(e, r);
|
|
2592
|
+
}), w((e, n, c, l, u) => {
|
|
2593
|
+
P(r, "x1", h(t).xCenter), P(r, "y1", h(t).yMax), P(r, "x2", h(t).xCenter), P(r, "y2", h(t).yMin), P(r, "stroke", h(t).color), F(r, e), P(i, "x1", h(t).x + h(t).w * .25), P(i, "y1", h(t).yMax), P(i, "x2", h(t).x + h(t).w * .75), P(i, "y2", h(t).yMax), P(i, "stroke", h(t).color), F(i, n), P(a, "x1", h(t).x + h(t).w * .25), P(a, "y1", h(t).yMin), P(a, "x2", h(t).x + h(t).w * .75), P(a, "y2", h(t).yMin), P(a, "stroke", h(t).color), F(a, c), P(o, "x", h(t).x), P(o, "y", h(t).boxY), P(o, "width", h(t).w), P(o, "height", h(t).boxH), P(o, "fill", h(t).color), P(o, "stroke", h(t).color), F(o, l), P(s, "x1", h(t).x), P(s, "y1", h(t).yMedian), P(s, "x2", h(t).x + h(t).w), P(s, "y2", h(t).yMedian), P(s, "stroke", h(t).color), F(s, u);
|
|
2594
|
+
}, [
|
|
2595
|
+
() => `opacity:${Y(h(t).series)}`,
|
|
2596
|
+
() => `opacity:${Y(h(t).series)}`,
|
|
2597
|
+
() => `opacity:${Y(h(t).series)}`,
|
|
2598
|
+
() => `opacity:${Y(h(t).series)}`,
|
|
2599
|
+
() => `opacity:${Y(h(t).series)}`
|
|
2600
|
+
]), j(e, n);
|
|
2601
|
+
});
|
|
2602
|
+
var vc = D(_c);
|
|
2603
|
+
C(vc, 17, () => h(q).errorBars, g, (e, t) => {
|
|
2604
|
+
var n = tn(), r = E(n), i = D(r), a = D(i);
|
|
2605
|
+
w((e, n, o) => {
|
|
2606
|
+
P(r, "x1", h(t).xCenter), P(r, "y1", h(t).yHi), P(r, "x2", h(t).xCenter), P(r, "y2", h(t).yLo), P(r, "stroke", h(t).color), F(r, e), P(i, "x1", h(t).xCenter - h(t).cap), P(i, "y1", h(t).yHi), P(i, "x2", h(t).xCenter + h(t).cap), P(i, "y2", h(t).yHi), P(i, "stroke", h(t).color), F(i, n), P(a, "x1", h(t).xCenter - h(t).cap), P(a, "y1", h(t).yLo), P(a, "x2", h(t).xCenter + h(t).cap), P(a, "y2", h(t).yLo), P(a, "stroke", h(t).color), F(a, o);
|
|
2607
|
+
}, [
|
|
2608
|
+
() => `opacity:${Y(h(t).series)}`,
|
|
2609
|
+
() => `opacity:${Y(h(t).series)}`,
|
|
2610
|
+
() => `opacity:${Y(h(t).series)}`
|
|
2611
|
+
]), j(e, n);
|
|
2612
|
+
});
|
|
2613
|
+
var yc = D(vc);
|
|
2614
|
+
C(yc, 17, () => h(q).scatterPoints, g, (e, t, n) => {
|
|
2615
|
+
var r = nn();
|
|
2616
|
+
let i;
|
|
2617
|
+
w((e, n, a, o) => {
|
|
2618
|
+
i = O(r, 0, "sv-grid-chart-scatter svelte-kvdein", null, i, { "is-selected": e }), P(r, "cx", h(t).cx), P(r, "cy", h(t).cy), P(r, "r", h(t).r), P(r, "fill", h(t).color), P(r, "stroke", h(t).color), F(r, n), P(r, "role", h(X) || f.onSelect ? "button" : "img"), P(r, "tabindex", a), P(r, "aria-label", o);
|
|
2619
|
+
}, [
|
|
2620
|
+
() => wo(h(t).label || h(t).series, h(t).series, n),
|
|
2621
|
+
() => `opacity:${Y(h(t).series) * To(h(t).label || h(t).series, h(t).series, n)}`,
|
|
2622
|
+
() => Cs(".sv-grid-chart-scatter", n),
|
|
2623
|
+
() => `${h(t).label || h(t).series}: ${U(h(t).x)}, ${U(h(t).y)}`
|
|
2624
|
+
]), S("mousemove", r, (e) => us(e.clientX, e.clientY, h(t))), I("mouseleave", r, Q), S("click", r, function(...e) {
|
|
2625
|
+
(h(X) || f.onSelect ? (e) => {
|
|
2626
|
+
e.stopPropagation(), ys(h(t).label || h(t).series, h(t).series, h(t).y, n, e);
|
|
2627
|
+
} : void 0)?.apply(this, e);
|
|
2628
|
+
}), I("focus", r, (e) => {
|
|
2629
|
+
ws(".sv-grid-chart-scatter", n);
|
|
2630
|
+
let r = Es(e.currentTarget);
|
|
2631
|
+
us(r.x, r.y, h(t));
|
|
2632
|
+
}), I("blur", r, Q), S("keydown", r, (e) => Ts(e, ".sv-grid-chart-scatter", n, h(X) || f.onSelect ? () => ys(h(t).label || h(t).series, h(t).series, h(t).y, n, e) : null)), j(e, r);
|
|
2633
|
+
}), k(uc);
|
|
2634
|
+
var bc = D(uc);
|
|
2635
|
+
C(bc, 17, () => h(q).referenceLines, g, (e, t) => {
|
|
2636
|
+
var n = an(), r = E(n), i = D(r), a = (e) => {
|
|
2637
|
+
let n = N(() => Math.max(28, h(t).label.length * 6.4 + 10));
|
|
2638
|
+
var r = rn(), i = _(r), a = D(i), o = T(a, !0);
|
|
2639
|
+
k(r), w(() => {
|
|
2640
|
+
P(i, "x", h(q).plot.x + h(q).plot.w - h(n)), P(i, "y", h(t).y - 8), P(i, "width", h(n)), P(i, "fill", h(t).color), P(a, "x", h(q).plot.x + h(q).plot.w - h(n) / 2), P(a, "y", h(t).y + 3.5), m(o, h(t).label);
|
|
2641
|
+
}), j(e, r);
|
|
2642
|
+
}, o = (e) => {
|
|
2643
|
+
var n = Rt(), r = T(n, !0);
|
|
2644
|
+
w(() => {
|
|
2645
|
+
P(n, "x", h(q).plot.x + h(q).plot.w - 3), P(n, "y", h(t).y - 3), P(n, "fill", h(t).color), m(r, h(t).label);
|
|
2646
|
+
}), j(e, n);
|
|
2647
|
+
};
|
|
2648
|
+
b(i, (e) => {
|
|
2649
|
+
h(t).pill ? e(a) : e(o, -1);
|
|
2650
|
+
}), w(() => {
|
|
2651
|
+
P(r, "x1", h(q).plot.x), P(r, "y1", h(t).y), P(r, "x2", h(q).plot.x + h(q).plot.w), P(r, "y2", h(t).y), P(r, "stroke", h(t).color), P(r, "stroke-dasharray", h(t).dashed ? "5 4" : void 0);
|
|
2652
|
+
}), j(e, n);
|
|
2653
|
+
});
|
|
2654
|
+
var xc = D(bc);
|
|
2655
|
+
C(xc, 17, () => h(q).referenceLinesV, g, (e, t) => {
|
|
2656
|
+
var n = on(), r = E(n), i = D(r), a = T(i, !0);
|
|
2657
|
+
w(() => {
|
|
2658
|
+
P(r, "x1", h(t).x), P(r, "y1", h(q).plot.y), P(r, "x2", h(t).x), P(r, "y2", h(q).plot.y + h(q).plot.h), P(r, "stroke", h(t).color), P(r, "stroke-dasharray", h(t).dashed ? "5 4" : void 0), P(i, "x", h(t).x + 3), P(i, "y", h(q).plot.y + 9), P(i, "fill", h(t).color), m(a, h(t).label);
|
|
2659
|
+
}), j(e, n);
|
|
2660
|
+
});
|
|
2661
|
+
var Sc = D(xc);
|
|
2662
|
+
let i;
|
|
2663
|
+
C(Sc, 23, () => h(q).overlays, (e, t) => e.label + t, (e, t) => {
|
|
2664
|
+
var n = cn(), r = E(n), i = (e) => {
|
|
2665
|
+
var n = sn();
|
|
2666
|
+
w(() => {
|
|
2667
|
+
P(n, "d", h(t).bandPath), P(n, "fill", h(t).color), P(n, "stroke", h(t).color);
|
|
2668
|
+
}), j(e, n);
|
|
2669
|
+
};
|
|
2670
|
+
b(r, (e) => {
|
|
2671
|
+
h(t).bandPath && e(i);
|
|
2672
|
+
});
|
|
2673
|
+
var a = D(r);
|
|
2674
|
+
w(() => {
|
|
2675
|
+
P(a, "d", h(t).path), P(a, "stroke", h(t).color);
|
|
2676
|
+
}), j(e, n);
|
|
2677
|
+
}), k(Sc);
|
|
2678
|
+
var Cc = D(Sc);
|
|
2679
|
+
C(Cc, 17, () => h(po), g, (e, t) => {
|
|
2680
|
+
var n = un(), r = E(n), i = (e) => {
|
|
2681
|
+
var n = ln();
|
|
2682
|
+
w((e) => {
|
|
2683
|
+
P(n, "x1", h(t).leader.x1), P(n, "y1", h(t).leader.y1), P(n, "x2", h(t).leader.x2), P(n, "y2", h(t).leader.y2), F(n, e);
|
|
2684
|
+
}, [() => `opacity:${Y(h(t).series)}`]), j(e, n);
|
|
2685
|
+
};
|
|
2686
|
+
b(r, (e) => {
|
|
2687
|
+
h(t).leader && e(i);
|
|
2688
|
+
});
|
|
2689
|
+
var a = D(r);
|
|
2690
|
+
let o;
|
|
2691
|
+
var s = T(a, !0);
|
|
2692
|
+
w((e) => {
|
|
2693
|
+
o = O(a, 0, "sv-grid-chart-datalabel svelte-kvdein", null, o, { "on-bar": h(t).onBar }), P(a, "x", h(t).x), P(a, "y", h(t).y), P(a, "text-anchor", h(t).anchor), P(a, "transform", h(t).angle ? `rotate(${h(t).angle} ${h(t).x} ${h(t).y})` : void 0), F(a, e), m(s, h(t).text);
|
|
2694
|
+
}, [() => `opacity:${Y(h(t).series)}`]), j(e, n);
|
|
2695
|
+
});
|
|
2696
|
+
var wc = D(Cc);
|
|
2697
|
+
C(wc, 17, () => h(q).seriesLabels, (e) => e.series, (e, t) => {
|
|
2698
|
+
var n = dn(), r = T(n, !0);
|
|
2699
|
+
w((e) => {
|
|
2700
|
+
P(n, "x", h(t).x), P(n, "y", h(t).y + 3.5), P(n, "fill", h(t).color), F(n, e), m(r, h(t).text);
|
|
2701
|
+
}, [() => `opacity:${Y(h(t).series)}`]), j(e, n);
|
|
2702
|
+
});
|
|
2703
|
+
var Tc = D(wc), Ec = (e) => {
|
|
2704
|
+
var t = v(), n = E(t);
|
|
2705
|
+
ge(n, () => f.overlay, () => h(Xa)), j(e, t);
|
|
2706
|
+
};
|
|
2707
|
+
b(Tc, (e) => {
|
|
2708
|
+
f.overlay && e(Ec);
|
|
2709
|
+
});
|
|
2710
|
+
var Dc = D(Tc);
|
|
2711
|
+
C(Dc, 19, () => h(q).annotations, (e, t) => e.label + t, (e, t, n) => {
|
|
2712
|
+
let r = N(() => h(t).placement === "left" ? -8 : h(t).placement === "right" ? 8 : 0), i = N(() => h(t).placement === "bottom" ? 14 : h(t).placement === "top" ? -8 : 0), a = N(() => h(t).placement === "left" ? "end" : h(t).placement === "right" ? "start" : "middle"), o = N(() => h(oi) && !!f.onAnnotationRemove), s = N(() => Math.max(14, h(t).label.length * 6.2 + 8));
|
|
2713
|
+
var c = gn();
|
|
2714
|
+
let l;
|
|
2715
|
+
var u = _(c), d = (e) => {
|
|
2716
|
+
var n = fn(), r = E(n), i = D(r), a = D(i), o = T(a, !0);
|
|
2717
|
+
w(() => {
|
|
2718
|
+
P(r, "x1", h(t).x), P(r, "y1", h(t).y), P(r, "x2", h(t).x), P(r, "y2", h(t).y - 24), P(r, "stroke", h(t).color), P(i, "x", h(t).x), P(i, "y", h(t).y - 24), P(i, "width", h(s)), P(i, "fill", h(t).color), P(a, "x", h(t).x + h(s) / 2), P(a, "y", h(t).y - 14.5), m(o, h(t).label);
|
|
2719
|
+
}), j(e, n);
|
|
2720
|
+
}, ee = (e) => {
|
|
2721
|
+
var n = pn(), o = E(n), s = D(o), c = T(s, !0), l = D(s), u = T(l, !0);
|
|
2722
|
+
w((e) => {
|
|
2723
|
+
P(o, "d", `M${h(t).x},${h(t).y} c-7,-9 -8,-13 -8,-16 a8,8 0 1,1 16,0 c0,3 -1,7 -8,16 z`), P(o, "fill", h(t).color), P(s, "x", h(t).x), P(s, "y", h(t).y - 12.5), m(c, e), P(l, "x", h(t).x + h(r)), P(l, "y", h(t).y + h(i)), P(l, "text-anchor", h(a)), P(l, "fill", h(t).color), m(u, h(t).label);
|
|
2724
|
+
}, [() => h(t).label.slice(0, 1)]), j(e, n);
|
|
2725
|
+
}, te = (e) => {
|
|
2726
|
+
var n = mn(), o = E(n), s = D(o), c = T(s, !0);
|
|
2727
|
+
w(() => {
|
|
2728
|
+
P(o, "x", h(t).x - 4.5), P(o, "y", h(t).y - 4.5), P(o, "fill", h(t).color), P(s, "x", h(t).x + h(r)), P(s, "y", h(t).y + h(i)), P(s, "text-anchor", h(a)), P(s, "fill", h(t).color), m(c, h(t).label);
|
|
2729
|
+
}), j(e, n);
|
|
2730
|
+
}, ne = (e) => {
|
|
2731
|
+
var n = hn(), s = E(n), c = D(s), l = T(c, !0);
|
|
2732
|
+
w(() => {
|
|
2733
|
+
P(s, "cx", h(t).x), P(s, "cy", h(t).y), P(s, "r", h(o) ? 6 : 4), P(s, "fill", h(t).color), P(c, "x", h(t).x + h(r)), P(c, "y", h(t).y + h(i)), P(c, "text-anchor", h(a)), P(c, "fill", h(t).color), m(l, h(t).label);
|
|
2734
|
+
}), j(e, n);
|
|
2735
|
+
};
|
|
2736
|
+
b(u, (e) => {
|
|
2737
|
+
h(t).shape === "flag" ? e(d) : h(t).shape === "pin" ? e(ee, 1) : h(t).shape === "square" ? e(te, 2) : e(ne, -1);
|
|
2738
|
+
}), k(c), w((e) => {
|
|
2739
|
+
l = O(c, 0, "sv-grid-chart-annotation-marker svelte-kvdein", null, l, {
|
|
2740
|
+
"is-removable": h(o),
|
|
2741
|
+
"has-text": !!h(t).text
|
|
2742
|
+
}), P(c, "role", h(o) ? "button" : h(t).text ? "img" : void 0), P(c, "tabindex", h(o) || h(t).text ? 0 : void 0), P(c, "aria-label", e);
|
|
2743
|
+
}, [() => h(o) ? V(h(B).removeNote, { label: h(t).label }) : h(t).text ? `${h(t).label}: ${h(t).text}` : void 0]), S("click", c, (e) => {
|
|
2744
|
+
!h(oi) || !f.onAnnotationRemove || (e.stopPropagation(), f.onAnnotationRemove(h(n)));
|
|
2745
|
+
}), S("keydown", c, (e) => {
|
|
2746
|
+
!h(oi) || !f.onAnnotationRemove || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), f.onAnnotationRemove(h(n)));
|
|
2747
|
+
}), I("mouseenter", c, (e) => {
|
|
2748
|
+
h(t).text && Z(e.clientX, e.clientY, h(t).label, [{ value: h(t).text }]);
|
|
2749
|
+
}), I("mouseleave", c, () => {
|
|
2750
|
+
h(t).text && p(Xo, null);
|
|
2751
|
+
}), I("focus", c, () => {
|
|
2752
|
+
if (!h(t).text || !h(Fi)) return;
|
|
2753
|
+
let e = h(Fi).getBoundingClientRect();
|
|
2754
|
+
Z(e.left + h(t).x * e.width / h(q).width, e.top + h(t).y * e.height / h(q).height, h(t).label, [{ value: h(t).text }]);
|
|
2755
|
+
}), I("blur", c, () => {
|
|
2756
|
+
h(t).text && p(Xo, null);
|
|
2757
|
+
}), j(e, c);
|
|
2758
|
+
});
|
|
2759
|
+
var Oc = D(Dc), kc = (e) => {
|
|
2760
|
+
var t = kn(), n = _(t);
|
|
2761
|
+
C(n, 17, () => h(q).drawings, (e) => e.id, (e, t) => {
|
|
2762
|
+
let n = N(() => h(t).points[0]), r = N(() => h(t).points[1]), i = N(() => h(Xi) === h(t).id);
|
|
2763
|
+
var a = Tn();
|
|
2764
|
+
let o;
|
|
2765
|
+
var s = _(a), c = (e) => {
|
|
2766
|
+
let i = N(() => Math.atan2(h(r).y - h(n).y, h(r).x - h(n).x));
|
|
2767
|
+
var a = vn(), o = E(a), s = D(o), c = D(s), l = (e) => {
|
|
2768
|
+
var n = _n();
|
|
2769
|
+
w((e) => {
|
|
2770
|
+
P(n, "d", e), P(n, "fill", h(t).color);
|
|
2771
|
+
}, [() => `M${h(r).x},${h(r).y} L${h(r).x - 10 * Math.cos(h(i) - .45)},${h(r).y - 10 * Math.sin(h(i) - .45)} L${h(r).x - 10 * Math.cos(h(i) + .45)},${h(r).y - 10 * Math.sin(h(i) + .45)} Z`]), j(e, n);
|
|
2772
|
+
};
|
|
2773
|
+
b(c, (e) => {
|
|
2774
|
+
h(t).kind === "arrow" && e(l);
|
|
2775
|
+
}), w(() => {
|
|
2776
|
+
P(o, "x1", h(n).x), P(o, "y1", h(n).y), P(o, "x2", h(r).x), P(o, "y2", h(r).y), P(s, "x1", h(n).x), P(s, "y1", h(n).y), P(s, "x2", h(r).x), P(s, "y2", h(r).y), P(s, "stroke", h(t).color);
|
|
2777
|
+
}), j(e, a);
|
|
2778
|
+
}, l = (e) => {
|
|
2779
|
+
var i = yn();
|
|
2780
|
+
w((e, n, r, a) => {
|
|
2781
|
+
P(i, "x", e), P(i, "y", n), P(i, "width", r), P(i, "height", a), P(i, "fill", h(t).color), P(i, "stroke", h(t).color);
|
|
2782
|
+
}, [
|
|
2783
|
+
() => Math.min(h(n).x, h(r).x),
|
|
2784
|
+
() => Math.min(h(n).y, h(r).y),
|
|
2785
|
+
() => Math.abs(h(r).x - h(n).x),
|
|
2786
|
+
() => Math.abs(h(r).y - h(n).y)
|
|
2787
|
+
]), j(e, i);
|
|
2788
|
+
}, u = (e) => {
|
|
2789
|
+
var r = bn(), i = E(r), a = D(i), o = D(a), s = T(o, !0);
|
|
2790
|
+
w(() => {
|
|
2791
|
+
P(i, "x1", h(n).x), P(i, "y1", h(n).y), P(i, "x2", h(q).plot.x + h(q).plot.w), P(i, "y2", h(n).y), P(a, "x1", h(n).x), P(a, "y1", h(n).y), P(a, "x2", h(q).plot.x + h(q).plot.w), P(a, "y2", h(n).y), P(a, "stroke", h(t).color), P(o, "x", h(q).plot.x + h(q).plot.w - 3), P(o, "y", h(n).y - 3), P(o, "fill", h(t).color), m(s, h(t).label);
|
|
2792
|
+
}), j(e, r);
|
|
2793
|
+
}, d = (e) => {
|
|
2794
|
+
let i = N(() => Math.min(h(n).x, h(r).x)), a = N(() => Math.max(h(n).x, h(r).x));
|
|
2795
|
+
var o = Sn(), s = E(o);
|
|
2796
|
+
C(s, 17, () => h(t).levels, (e) => e.ratio, (e, n) => {
|
|
2797
|
+
var r = xn(), o = E(r), s = D(o), c = T(s, !0);
|
|
2798
|
+
w(() => {
|
|
2799
|
+
P(o, "x1", h(i)), P(o, "y1", h(n).y), P(o, "x2", h(a)), P(o, "y2", h(n).y), P(o, "stroke", h(t).color), P(o, "stroke-dasharray", h(n).ratio === 0 || h(n).ratio === 1 ? void 0 : "3 3"), P(s, "x", h(i) + 3), P(s, "y", h(n).y - 2), P(s, "fill", h(t).color), m(c, h(n).label);
|
|
2800
|
+
}), j(e, r);
|
|
2801
|
+
});
|
|
2802
|
+
var c = D(s);
|
|
2803
|
+
w((e, t) => {
|
|
2804
|
+
P(c, "x", h(i)), P(c, "y", e), P(c, "width", h(a) - h(i)), P(c, "height", t);
|
|
2805
|
+
}, [() => Math.min(h(n).y, h(r).y), () => Math.abs(h(r).y - h(n).y)]), j(e, o);
|
|
2806
|
+
}, ee = (e) => {
|
|
2807
|
+
var r = Cn(), i = T(r, !0);
|
|
2808
|
+
w(() => {
|
|
2809
|
+
P(r, "x", h(n).x), P(r, "y", h(n).y), P(r, "fill", h(t).color), m(i, h(t).text ?? "");
|
|
2810
|
+
}), j(e, r);
|
|
2811
|
+
};
|
|
2812
|
+
b(s, (e) => {
|
|
2813
|
+
(h(t).kind === "trend" || h(t).kind === "arrow") && h(r) ? e(c) : h(t).kind === "rect" && h(r) ? e(l, 1) : h(t).kind === "hray" ? e(u, 2) : h(t).kind === "fib" && h(r) && h(t).levels ? e(d, 3) : h(t).kind === "text" && e(ee, 4);
|
|
2814
|
+
});
|
|
2815
|
+
var te = D(s), ne = (e) => {
|
|
2816
|
+
var n = v(), r = E(n);
|
|
2817
|
+
C(r, 17, () => h(t).points, g, (e, n, r) => {
|
|
2818
|
+
var i = wn();
|
|
2819
|
+
w(() => {
|
|
2820
|
+
P(i, "cx", h(n).x), P(i, "cy", h(n).y), P(i, "stroke", h(t).color);
|
|
2821
|
+
}), S("pointerdown", i, (e) => {
|
|
2822
|
+
e.stopPropagation(), e.preventDefault(), p(ea, {
|
|
2823
|
+
id: h(t).id,
|
|
2824
|
+
index: r
|
|
2825
|
+
}, !0), h(Fi)?.setPointerCapture?.(e.pointerId);
|
|
2826
|
+
}), j(e, i);
|
|
2827
|
+
}), j(e, n);
|
|
2828
|
+
};
|
|
2829
|
+
b(te, (e) => {
|
|
2830
|
+
h(i) && Ye() && e(ne);
|
|
2831
|
+
}), k(a), w((e) => {
|
|
2832
|
+
o = O(a, 0, `sv-grid-chart-drawing is-${h(t).kind}`, "svelte-kvdein", o, { "is-selected": h(i) }), P(a, "role", Ye() ? "button" : void 0), P(a, "tabindex", Ye() ? 0 : void 0), P(a, "aria-label", e);
|
|
2833
|
+
}, [() => Ye() ? `${V(h(B).drawing, { tool: h(Ki)[h(t).kind] })}${h(t).text ? `: ${h(t).text}` : ""}` : void 0]), S("click", a, (e) => {
|
|
2834
|
+
Ye() && !h(Ji) && (e.stopPropagation(), p(Xi, h(i) ? null : h(t).id, !0));
|
|
2835
|
+
}), S("keydown", a, (e) => {
|
|
2836
|
+
Ye() && ua(e, h(t).id);
|
|
2837
|
+
}), j(e, a);
|
|
2838
|
+
});
|
|
2839
|
+
var r = D(n), i = (e) => {
|
|
2840
|
+
var t = On(), n = E(t), r = D(n), i = (e) => {
|
|
2841
|
+
var t = En();
|
|
2842
|
+
w((e, n, r, i) => {
|
|
2843
|
+
P(t, "x", e), P(t, "y", n), P(t, "width", r), P(t, "height", i);
|
|
2844
|
+
}, [
|
|
2845
|
+
() => Math.min(h(W).px, h(Yi).x),
|
|
2846
|
+
() => Math.min(h(W).py, h(Yi).y),
|
|
2847
|
+
() => Math.abs(h(Yi).x - h(W).px),
|
|
2848
|
+
() => Math.abs(h(Yi).y - h(W).py)
|
|
2849
|
+
]), j(e, t);
|
|
2850
|
+
}, a = (e) => {
|
|
2851
|
+
var t = Dn();
|
|
2852
|
+
w(() => {
|
|
2853
|
+
P(t, "x1", h(W).px), P(t, "y1", h(W).py), P(t, "x2", h(Yi).x), P(t, "y2", h(Yi).y);
|
|
2854
|
+
}), j(e, t);
|
|
2855
|
+
};
|
|
2856
|
+
b(r, (e) => {
|
|
2857
|
+
h(Ji) === "rect" ? e(i) : e(a, -1);
|
|
2858
|
+
}), w(() => {
|
|
2859
|
+
P(n, "cx", h(W).px), P(n, "cy", h(W).py);
|
|
2860
|
+
}), j(e, t);
|
|
2861
|
+
};
|
|
2862
|
+
b(r, (e) => {
|
|
2863
|
+
h(W) && h(Yi) && e(i);
|
|
2864
|
+
}), k(t), w(() => P(t, "clip-path", `url(#${hi}-plot)`)), j(e, t);
|
|
2865
|
+
};
|
|
2866
|
+
b(Oc, (e) => {
|
|
2867
|
+
(h(q).drawings.length || h(W)) && e(kc);
|
|
2868
|
+
});
|
|
2869
|
+
var Ac = D(Oc), jc = (e) => {
|
|
2870
|
+
var t = v(), n = E(t), r = (e) => {
|
|
2871
|
+
let t = N(() => h(q).plot.y + h(lo) * h(Qo) + h(lo) / 2);
|
|
2872
|
+
var n = An();
|
|
2873
|
+
w(() => {
|
|
2874
|
+
P(n, "x1", h(q).plot.x), P(n, "y1", h(t)), P(n, "x2", h(q).plot.x + h(q).plot.w), P(n, "y2", h(t));
|
|
2875
|
+
}), j(e, n);
|
|
2876
|
+
}, i = (e) => {
|
|
2877
|
+
let t = N(() => h(q).lines[0]?.points[h(Qo)]), n = N(() => h(t) && Number.isFinite(h(t).x) ? h(t).x : h(q).plot.x + h(lo) * h(Qo) + h(lo) / 2);
|
|
2878
|
+
var r = Nn(), i = E(r), a = D(i), o = (e) => {
|
|
2879
|
+
let t = N(() => Ko(h(Xo)?.title ?? h(K).categories[h(Qo)] ?? "", 16)), r = N(() => Math.max(24, h(t).length * 6.2 + 10));
|
|
2880
|
+
var i = Mn(), a = E(i), o = _(a), s = D(o), c = T(s, !0);
|
|
2881
|
+
k(a);
|
|
2882
|
+
var l = D(a), u = (e) => {
|
|
2883
|
+
let t = N(() => ns(h(Ya).yInvert(h(ts)))), n = N(() => Math.max(24, h(t).length * 6.2 + 10));
|
|
2884
|
+
var r = jn(), i = _(r), a = D(i), o = T(a, !0);
|
|
2885
|
+
k(r), w((e, r) => {
|
|
2886
|
+
P(i, "x", e), P(i, "y", h(ts) - 7.5), P(i, "width", h(n)), P(a, "x", r), P(a, "y", h(ts) + 3.5), m(o, h(t));
|
|
2887
|
+
}, [() => Math.max(0, h(q).plot.x - h(n) - 2), () => Math.max(h(n) / 2, h(q).plot.x - 2 - h(n) / 2)]), j(e, r);
|
|
2888
|
+
};
|
|
2889
|
+
b(l, (e) => {
|
|
2890
|
+
h(ts) != null && h(Ya) && h(q).axes && e(u);
|
|
2891
|
+
}), w((e, n) => {
|
|
2892
|
+
P(o, "x", e), P(o, "y", h(q).plot.y + h(q).plot.h + 2), P(o, "width", h(r)), P(s, "x", n), P(s, "y", h(q).plot.y + h(q).plot.h + 13), m(c, h(t));
|
|
2893
|
+
}, [() => Math.max(0, Math.min(h(q).width - h(r), h(n) - h(r) / 2)), () => Math.max(h(r) / 2, Math.min(h(q).width - h(r) / 2, h(n)))]), j(e, i);
|
|
2894
|
+
};
|
|
2895
|
+
b(a, (e) => {
|
|
2896
|
+
Ue() && e(o);
|
|
2897
|
+
}), w(() => {
|
|
2898
|
+
P(i, "x1", h(n)), P(i, "y1", h(q).plot.y), P(i, "x2", h(n)), P(i, "y2", h(q).plot.y + h(q).plot.h);
|
|
2899
|
+
}), j(e, r);
|
|
2900
|
+
};
|
|
2901
|
+
b(n, (e) => {
|
|
2902
|
+
h(co) ? e(r) : e(i, -1);
|
|
2903
|
+
}), j(e, t);
|
|
2904
|
+
};
|
|
2905
|
+
b(Ac, (e) => {
|
|
2906
|
+
h(J) && h(Qo) !== null && e(jc);
|
|
2907
|
+
});
|
|
2908
|
+
var Mc = D(Ac), Nc = (e) => {
|
|
2909
|
+
var t = zn(), n = E(t);
|
|
2910
|
+
C(n, 17, () => h(q).heatmapRowTicks, (e) => e.value, (e, t, n, r) => {
|
|
2911
|
+
var i = Dt(), a = T(i, !0);
|
|
2912
|
+
w((e) => {
|
|
2913
|
+
P(i, "x", h(q).plot.x - 8), P(i, "y", h(t).y + 3), m(a, e);
|
|
2914
|
+
}, [() => Ko(h(t).label, 22)]), j(e, i);
|
|
2915
|
+
});
|
|
2916
|
+
var r = D(n);
|
|
2917
|
+
C(r, 19, () => h(q).heatmapColTicks, (e, t) => e.label + t, (e, t, n, r) => {
|
|
2918
|
+
var i = Pn(), a = T(i, !0);
|
|
2919
|
+
w((e) => {
|
|
2920
|
+
P(i, "x", h(t).x), P(i, "y", h(q).plot.y + h(q).plot.h + 14), m(a, e);
|
|
2921
|
+
}, [() => Ko(h(t).label, 14)]), j(e, i);
|
|
2922
|
+
});
|
|
2923
|
+
var i = D(r);
|
|
2924
|
+
C(i, 17, () => h(q).heatmapCells, g, (e, t, n) => {
|
|
2925
|
+
var r = In(), i = E(r), a = D(i), o = (e) => {
|
|
2926
|
+
var n = Fn(), r = T(n, !0);
|
|
2927
|
+
w((e) => {
|
|
2928
|
+
P(n, "x", h(t).x + h(t).w / 2), P(n, "y", h(t).y + h(t).h / 2 + 3), P(n, "fill", h(t).textColor), m(r, e);
|
|
2929
|
+
}, [() => U(h(t).value)]), j(e, n);
|
|
2930
|
+
};
|
|
2931
|
+
b(a, (e) => {
|
|
2932
|
+
h(ni).show && h(t).w > 22 && h(t).h > 14 && e(o);
|
|
2933
|
+
}), w((e, n) => {
|
|
2934
|
+
P(i, "x", h(t).x), P(i, "y", h(t).y), P(i, "width", h(t).w), P(i, "height", h(t).h), P(i, "fill", h(t).color), P(i, "role", f.onSelect || h(X) ? "button" : "img"), P(i, "tabindex", e), P(i, "aria-label", n);
|
|
2935
|
+
}, [() => Cs(".sv-grid-chart-heatcell", n), () => `${h(t).rowLabel} ${h(t).colLabel}: ${U(h(t).value)}`]), S("mousemove", i, (e) => ds(e.clientX, e.clientY, h(t))), I("mouseleave", i, Q), I("focus", i, (e) => {
|
|
2936
|
+
ws(".sv-grid-chart-heatcell", n);
|
|
2937
|
+
let r = Es(e.currentTarget);
|
|
2938
|
+
ds(r.x, r.y, h(t));
|
|
2939
|
+
}), I("blur", i, Q), S("click", i, () => ys(h(t).colLabel, h(t).rowLabel, h(t).value)), S("keydown", i, (e) => Ts(e, ".sv-grid-chart-heatcell", n, f.onSelect || h(X) ? () => ys(h(t).colLabel, h(t).rowLabel, h(t).value) : null, { cols: h(q).heatmapColTicks.length })), j(e, r);
|
|
2940
|
+
});
|
|
2941
|
+
var a = D(i), o = (e) => {
|
|
2942
|
+
let t = N(() => h(q).plot.x + h(q).plot.w + 14), n = N(() => h(q).plot.h - 20), r = N(() => h(q).heatmapLegend);
|
|
2943
|
+
var i = Rn(), a = E(i), o = _(a);
|
|
2944
|
+
C(o, 21, () => h(r), g, (e, t, n) => {
|
|
2945
|
+
var i = Ln();
|
|
2946
|
+
w(() => {
|
|
2947
|
+
P(i, "offset", `${n / (h(r).length - 1) * 100}%`), P(i, "stop-color", h(t).color);
|
|
2948
|
+
}), j(e, i);
|
|
2949
|
+
}), k(o), k(a);
|
|
2950
|
+
var s = D(a), c = D(s), l = T(c, !0), u = D(c), d = T(u, !0);
|
|
2951
|
+
w(() => {
|
|
2952
|
+
P(o, "id", `${hi}-heatscale`), P(s, "x", h(t)), P(s, "y", h(q).plot.y + 10), P(s, "height", h(n)), P(s, "fill", `url(#${hi}-heatscale)`), P(c, "x", h(t) + 14), P(c, "y", h(q).plot.y + 14), m(l, h(r)[h(r).length - 1].label), P(u, "x", h(t) + 14), P(u, "y", h(q).plot.y + 10 + h(n)), m(d, h(r)[0].label);
|
|
2953
|
+
}), j(e, i);
|
|
2954
|
+
};
|
|
2955
|
+
b(a, (e) => {
|
|
2956
|
+
h(q).heatmapLegend.length && e(o);
|
|
2957
|
+
}), j(e, t);
|
|
2958
|
+
};
|
|
2959
|
+
b(Mc, (e) => {
|
|
2960
|
+
h(to) && e(Nc);
|
|
2961
|
+
});
|
|
2962
|
+
var Pc = D(Mc), Fc = (e) => {
|
|
2963
|
+
var t = v(), n = E(t);
|
|
2964
|
+
C(n, 17, () => h(q).funnelSegments, g, (e, t, n) => {
|
|
2965
|
+
var r = Vn(), i = E(r), a = D(i), o = (e) => {
|
|
2966
|
+
var n = Bn(), r = E(n), i = T(r, !0), a = D(r), o = T(a);
|
|
2967
|
+
w((e, n, s) => {
|
|
2968
|
+
P(r, "x", h(t).cx), P(r, "y", h(t).cy - 3), P(r, "fill", h(t).textColor), m(i, e), P(a, "x", h(t).cx), P(a, "y", h(t).cy + 11), P(a, "fill", h(t).textColor), m(o, `${n ?? ""} · ${s ?? ""}%`);
|
|
2969
|
+
}, [
|
|
2970
|
+
() => Ko(h(t).label, 24),
|
|
2971
|
+
() => U(h(t).value),
|
|
2972
|
+
() => (h(t).conversion * 100).toFixed(0)
|
|
2973
|
+
]), j(e, n);
|
|
2974
|
+
}, s = N(() => h(q).plot.h / Math.max(1, h(q).funnelSegments.length) >= 26);
|
|
2975
|
+
b(a, (e) => {
|
|
2976
|
+
h(s) && e(o);
|
|
2977
|
+
}), w((e, n) => {
|
|
2978
|
+
P(i, "d", h(t).path), P(i, "fill", h(t).color), P(i, "role", f.onSelect || h(X) ? "button" : "img"), P(i, "tabindex", e), P(i, "aria-label", n);
|
|
2979
|
+
}, [() => Cs(".sv-grid-chart-funnel-seg", n), () => `${h(t).label}: ${U(h(t).value)}`]), S("mousemove", i, (e) => fs(e.clientX, e.clientY, h(t))), I("mouseleave", i, Q), I("focus", i, (e) => {
|
|
2980
|
+
ws(".sv-grid-chart-funnel-seg", n);
|
|
2981
|
+
let r = Es(e.currentTarget);
|
|
2982
|
+
fs(r.x, r.y, h(t));
|
|
2983
|
+
}), I("blur", i, Q), S("click", i, () => ys(h(t).label, h(t).label, h(t).value, n)), S("keydown", i, (e) => Ts(e, ".sv-grid-chart-funnel-seg", n, f.onSelect || h(X) ? () => ys(h(t).label, h(t).label, h(t).value, n) : null)), j(e, r);
|
|
2984
|
+
}), j(e, t);
|
|
2985
|
+
};
|
|
2986
|
+
b(Pc, (e) => {
|
|
2987
|
+
h(no) && e(Fc);
|
|
2988
|
+
});
|
|
2989
|
+
var Ic = D(Pc), Lc = (e) => {
|
|
2990
|
+
let t = N(() => h(q).radarCenter);
|
|
2991
|
+
var n = Kn(), r = E(n);
|
|
2992
|
+
C(r, 17, () => h(q).radarRings, g, (e, n, r) => {
|
|
2993
|
+
let i = N(() => h(t).r * ((r + 1) / h(q).radarRings.length));
|
|
2994
|
+
var a = Hn();
|
|
2995
|
+
w(() => {
|
|
2996
|
+
P(a, "cx", h(t).cx), P(a, "cy", h(t).cy), P(a, "r", h(i));
|
|
2997
|
+
}), j(e, a);
|
|
2998
|
+
});
|
|
2999
|
+
var i = D(r);
|
|
3000
|
+
C(i, 17, () => h(q).radarAxes, g, (e, n) => {
|
|
3001
|
+
let r = N(() => h(n).x - h(t).cx), i = N(() => h(n).y - h(t).cy), a = N(() => h(t).cx + h(r) * 1.08), o = N(() => h(t).cy + h(i) * 1.08);
|
|
3002
|
+
var s = Un(), c = E(s), l = D(c), u = T(l, !0);
|
|
3003
|
+
w((e) => {
|
|
3004
|
+
P(c, "x1", h(t).cx), P(c, "y1", h(t).cy), P(c, "x2", h(n).x), P(c, "y2", h(n).y), P(l, "x", h(a)), P(l, "y", h(o) + 3), P(l, "text-anchor", e), m(u, h(n).label);
|
|
3005
|
+
}, [() => Math.abs(h(r)) < 1 ? "middle" : h(r) > 0 ? "start" : "end"]), j(e, s);
|
|
3006
|
+
});
|
|
3007
|
+
var a = D(i);
|
|
3008
|
+
C(a, 17, () => h(q).radarSeries, g, (e, t, n) => {
|
|
3009
|
+
var r = Gn(), i = E(r), a = D(i);
|
|
3010
|
+
C(a, 17, () => h(t).points, g, (e, r, i) => {
|
|
3011
|
+
let a = N(() => n * h(t).points.length + i);
|
|
3012
|
+
var o = Wn();
|
|
3013
|
+
w((e, n) => {
|
|
3014
|
+
P(o, "cx", h(r).x), P(o, "cy", h(r).y), P(o, "fill", h(t).color), P(o, "tabindex", e), P(o, "aria-label", n);
|
|
3015
|
+
}, [() => Cs(".sv-grid-chart-radar-dot", h(a)), () => `${h(t).label} ${h(r).axis}: ${U(h(r).value)}`]), S("mousemove", o, (e) => _s(e.clientX, e.clientY, h(t).label, h(r).axis, h(r).value, h(t).color)), I("mouseleave", o, Q), I("focus", o, (e) => {
|
|
3016
|
+
ws(".sv-grid-chart-radar-dot", h(a));
|
|
3017
|
+
let n = Es(e.currentTarget);
|
|
3018
|
+
_s(n.x, n.y, h(t).label, h(r).axis, h(r).value, h(t).color);
|
|
3019
|
+
}), I("blur", o, Q), S("keydown", o, (e) => Ts(e, ".sv-grid-chart-radar-dot", h(a))), j(e, o);
|
|
3020
|
+
}), w((e) => {
|
|
3021
|
+
P(i, "d", h(t).path), P(i, "fill", h(t).color), P(i, "stroke", h(t).color), F(i, e);
|
|
3022
|
+
}, [() => `opacity:${Y(h(t).label)}`]), j(e, r);
|
|
3023
|
+
}), j(e, n);
|
|
3024
|
+
};
|
|
3025
|
+
b(Ic, (e) => {
|
|
3026
|
+
h(ro) && h(q).radarCenter && e(Lc);
|
|
3027
|
+
});
|
|
3028
|
+
var Rc = D(Ic), zc = (e) => {
|
|
3029
|
+
var t = zn(), n = E(t);
|
|
3030
|
+
C(n, 17, () => h(q).calendarMonthTicks, g, (e, t, n, r) => {
|
|
3031
|
+
var i = Mt(), a = T(i, !0);
|
|
3032
|
+
w(() => {
|
|
3033
|
+
P(i, "x", h(t).x), P(i, "y", h(q).plot.y - 8), m(a, h(t).label);
|
|
3034
|
+
}), j(e, i);
|
|
3035
|
+
});
|
|
3036
|
+
var r = D(n);
|
|
3037
|
+
C(r, 16, () => [
|
|
3038
|
+
"Mon",
|
|
3039
|
+
"Wed",
|
|
3040
|
+
"Fri"
|
|
3041
|
+
], g, (e, t, n) => {
|
|
3042
|
+
let r = N(() => [
|
|
3043
|
+
1,
|
|
3044
|
+
3,
|
|
3045
|
+
5
|
|
3046
|
+
][n]), i = N(() => h(q).calendarCells[h(r)]);
|
|
3047
|
+
var a = v(), o = E(a), s = (e) => {
|
|
3048
|
+
var n = Dt(), r = T(n, !0);
|
|
3049
|
+
w(() => {
|
|
3050
|
+
P(n, "x", h(q).plot.x - 6), P(n, "y", h(i).y + h(i).size / 2 + 3), m(r, t);
|
|
3051
|
+
}), j(e, n);
|
|
3052
|
+
};
|
|
3053
|
+
b(o, (e) => {
|
|
3054
|
+
h(i) && e(s);
|
|
3055
|
+
}), j(e, a);
|
|
3056
|
+
});
|
|
3057
|
+
var i = D(r);
|
|
3058
|
+
C(i, 17, () => h(q).calendarCells, g, (e, t, n) => {
|
|
3059
|
+
var r = qn();
|
|
3060
|
+
let i;
|
|
3061
|
+
w((e, n) => {
|
|
3062
|
+
i = O(r, 0, "sv-grid-chart-calendar-cell svelte-kvdein", null, i, { "is-blank": !h(t).defined }), P(r, "x", h(t).x + 1), P(r, "y", h(t).y + 1), P(r, "width", h(t).size - 2), P(r, "height", h(t).size - 2), P(r, "fill", h(t).defined ? h(t).color : "transparent"), P(r, "tabindex", e), P(r, "aria-label", n);
|
|
3063
|
+
}, [() => Cs(".sv-grid-chart-calendar-cell", n), () => `${as(h(t).date)}: ${h(t).defined ? U(h(t).value) : h(B).noValue}`]), S("mousemove", r, (e) => h(t).defined && Z(e.clientX, e.clientY, as(h(t).date), [{
|
|
3064
|
+
color: h(t).color,
|
|
3065
|
+
value: U(h(t).value)
|
|
3066
|
+
}])), I("mouseleave", r, Q), I("focus", r, (e) => {
|
|
3067
|
+
if (ws(".sv-grid-chart-calendar-cell", n), h(t).defined) {
|
|
3068
|
+
let n = Es(e.currentTarget);
|
|
3069
|
+
Z(n.x, n.y, as(h(t).date), [{
|
|
3070
|
+
color: h(t).color,
|
|
3071
|
+
value: U(h(t).value)
|
|
3072
|
+
}]);
|
|
3073
|
+
}
|
|
3074
|
+
}), I("blur", r, Q), S("keydown", r, (e) => Ts(e, ".sv-grid-chart-calendar-cell", n, null, {
|
|
3075
|
+
cols: 7,
|
|
3076
|
+
colMajor: !0
|
|
3077
|
+
})), j(e, r);
|
|
3078
|
+
});
|
|
3079
|
+
var a = D(i), o = (e) => {
|
|
3080
|
+
let t = N(() => h(q).plot.x + h(q).plot.w + 12), n = N(() => h(q).plot.y + 4);
|
|
3081
|
+
var r = Yn(), i = E(r), a = D(i);
|
|
3082
|
+
C(a, 17, () => h(q).calendarLegend, g, (e, r, i) => {
|
|
3083
|
+
var a = Jn(), o = E(a), s = D(o), c = T(s, !0);
|
|
3084
|
+
w(() => {
|
|
3085
|
+
P(o, "x", h(t)), P(o, "y", h(n) + 6 + i * 13), P(o, "fill", h(r).color), P(s, "x", h(t) + 14), P(s, "y", h(n) + 14 + i * 13), m(c, h(r).label);
|
|
3086
|
+
}), j(e, a);
|
|
3087
|
+
});
|
|
3088
|
+
var o = D(a);
|
|
3089
|
+
w(() => {
|
|
3090
|
+
P(i, "x", h(t)), P(i, "y", h(n)), P(o, "x", h(t)), P(o, "y", h(n) + 12 + h(q).calendarLegend.length * 13);
|
|
3091
|
+
}), j(e, r);
|
|
3092
|
+
};
|
|
3093
|
+
b(a, (e) => {
|
|
3094
|
+
h(q).calendarLegend.length && e(o);
|
|
3095
|
+
}), j(e, t);
|
|
3096
|
+
};
|
|
3097
|
+
b(Rc, (e) => {
|
|
3098
|
+
h(io) && e(zc);
|
|
3099
|
+
});
|
|
3100
|
+
var Bc = D(Rc), Vc = (e) => {
|
|
3101
|
+
let t = N(() => h(q).gauge);
|
|
3102
|
+
var n = Qn(), r = E(n);
|
|
3103
|
+
C(r, 17, () => h(t).ticks, g, (e, t) => {
|
|
3104
|
+
var n = At();
|
|
3105
|
+
let r;
|
|
3106
|
+
w(() => {
|
|
3107
|
+
r = O(n, 0, "sv-grid-chart-gauge-tick svelte-kvdein", null, r, { "is-major": h(t).major }), P(n, "x1", h(t).x1), P(n, "y1", h(t).y1), P(n, "x2", h(t).x2), P(n, "y2", h(t).y2);
|
|
3108
|
+
}), j(e, n);
|
|
3109
|
+
});
|
|
3110
|
+
var i = D(r), a = D(i);
|
|
3111
|
+
C(a, 17, () => h(t).rangePaths, g, (e, t) => {
|
|
3112
|
+
var n = Xn();
|
|
3113
|
+
w(() => {
|
|
3114
|
+
P(n, "d", h(t).path), P(n, "stroke", h(t).color);
|
|
3115
|
+
}), j(e, n);
|
|
3116
|
+
});
|
|
3117
|
+
var o = D(a), s = D(o), c = (e) => {
|
|
3118
|
+
var n = Zn();
|
|
3119
|
+
w(() => {
|
|
3120
|
+
P(n, "x1", h(t).target.x1), P(n, "y1", h(t).target.y1), P(n, "x2", h(t).target.x2), P(n, "y2", h(t).target.y2);
|
|
3121
|
+
}), j(e, n);
|
|
3122
|
+
};
|
|
3123
|
+
b(s, (e) => {
|
|
3124
|
+
h(t).target && e(c);
|
|
3125
|
+
});
|
|
3126
|
+
var l = D(s), u = D(l), d = D(u), ee = D(d), te = T(ee, !0), ne = D(ee), re = T(ne, !0), ie = D(ne), f = T(ie);
|
|
3127
|
+
w((e, n, r, a) => {
|
|
3128
|
+
P(i, "d", h(t).trackPath), P(o, "d", h(t).valuePath), P(o, "stroke", h(t).valueColor ?? "var(--sg-accent, #2563eb)"), P(l, "d", h(t).needle.path), P(u, "cx", h(t).cx), P(u, "cy", h(t).cy), P(u, "r", h(t).needle.hubR), P(d, "cx", h(t).cx), P(d, "cy", h(t).cy), P(ee, "x", h(t).minLabel.x), P(ee, "y", h(t).minLabel.y), m(te, e), P(ne, "x", h(t).maxLabel.x), P(ne, "y", h(t).maxLabel.y), m(re, n), P(ie, "x", h(t).cx), P(ie, "y", h(t).cy + 38), m(f, `${r ?? ""}${a ?? ""}`);
|
|
3129
|
+
}, [
|
|
3130
|
+
() => U(h(t).min),
|
|
3131
|
+
() => U(h(t).max),
|
|
3132
|
+
() => U(h(t).value),
|
|
3133
|
+
() => h(t).unit ? /^[%°′″]/.test(h(t).unit) ? h(t).unit : ` ${h(t).unit}` : ""
|
|
3134
|
+
]), j(e, n);
|
|
3135
|
+
};
|
|
3136
|
+
b(Bc, (e) => {
|
|
3137
|
+
h(ao) && h(q).gauge && e(Vc);
|
|
3138
|
+
});
|
|
3139
|
+
var Hc = D(Bc), Uc = (e) => {
|
|
3140
|
+
var t = v(), n = E(t);
|
|
3141
|
+
C(n, 17, () => h(q).treemapCells, g, (e, t, n) => {
|
|
3142
|
+
var r = tr(), i = E(r), o = D(i), s = (e) => {
|
|
3143
|
+
var n = $n(), r = T(n, !0);
|
|
3144
|
+
w((e) => {
|
|
3145
|
+
P(n, "x", h(t).x + 4), P(n, "y", h(t).y + 12), P(n, "fill", h(t).textColor), m(r, e);
|
|
3146
|
+
}, [() => Ko(h(t).name, Math.max(3, Math.floor(h(t).w / 7)))]), j(e, n);
|
|
3147
|
+
};
|
|
3148
|
+
b(o, (e) => {
|
|
3149
|
+
h(t).w > 36 && h(t).h > 18 && e(s);
|
|
3150
|
+
});
|
|
3151
|
+
var c = D(o), l = (e) => {
|
|
3152
|
+
var n = er(), r = T(n, !0);
|
|
3153
|
+
w((e) => {
|
|
3154
|
+
P(n, "x", h(t).x + 4), P(n, "y", h(t).y + 24), P(n, "fill", h(t).textColor), m(r, e);
|
|
3155
|
+
}, [() => U(h(t).value)]), j(e, n);
|
|
3156
|
+
};
|
|
3157
|
+
b(c, (e) => {
|
|
3158
|
+
h(t).w > 60 && h(t).h > 30 && e(l);
|
|
3159
|
+
}), w((e, n) => {
|
|
3160
|
+
P(i, "x", h(t).x), P(i, "y", h(t).y), P(i, "width", h(t).w), P(i, "height", h(t).h), P(i, "fill", h(t).color), P(i, "role", f.onSelect || h(X) || h(ka) ? "button" : "img"), P(i, "tabindex", e), P(i, "aria-label", n);
|
|
3161
|
+
}, [() => Cs(".sv-grid-chart-treemap-cell", n), () => `${h(t).name}: ${U(h(t).value)}`]), S("mousemove", i, (e) => Z(e.clientX, e.clientY, h(t).name, [{
|
|
3162
|
+
color: h(t).color,
|
|
3163
|
+
value: U(h(t).value)
|
|
3164
|
+
}])), I("mouseleave", i, Q), I("focus", i, (e) => {
|
|
3165
|
+
ws(".sv-grid-chart-treemap-cell", n);
|
|
3166
|
+
let r = Es(e.currentTarget);
|
|
3167
|
+
Z(r.x, r.y, h(t).name, [{
|
|
3168
|
+
color: h(t).color,
|
|
3169
|
+
value: U(h(t).value)
|
|
3170
|
+
}]);
|
|
3171
|
+
}), I("blur", i, Q), S("click", i, (e) => {
|
|
3172
|
+
h(ka) && Ia([...Ie(), ...a(h(Aa), h(t).name) ?? []]) || ys(h(t).name, "", h(t).value, void 0, e);
|
|
3173
|
+
}), S("keydown", i, (e) => Ts(e, ".sv-grid-chart-treemap-cell", n, () => {
|
|
3174
|
+
h(ka) && Ia([...Ie(), ...a(h(Aa), h(t).name) ?? []]) || (f.onSelect || h(X)) && ys(h(t).name, "", h(t).value, void 0, e);
|
|
3175
|
+
})), j(e, r);
|
|
3176
|
+
}), j(e, t);
|
|
3177
|
+
};
|
|
3178
|
+
b(Hc, (e) => {
|
|
3179
|
+
h(oo) && e(Uc);
|
|
3180
|
+
});
|
|
3181
|
+
var Wc = D(Hc), Gc = (e) => {
|
|
3182
|
+
var t = jt(), n = E(t);
|
|
3183
|
+
C(n, 17, () => h(q).sankeyLinks, g, (e, t, n) => {
|
|
3184
|
+
var r = nr();
|
|
3185
|
+
w((e, n) => {
|
|
3186
|
+
P(r, "d", h(t).path), P(r, "stroke", h(t).color), P(r, "stroke-width", h(t).width), P(r, "tabindex", e), P(r, "aria-label", n);
|
|
3187
|
+
}, [() => Cs(".sv-grid-chart-sankey-link", n), () => `${h(t).source} → ${h(t).target}: ${U(h(t).value)}`]), S("mousemove", r, (e) => Z(e.clientX, e.clientY, `${h(t).source} → ${h(t).target}`, [{
|
|
3188
|
+
color: h(t).color,
|
|
3189
|
+
value: U(h(t).value)
|
|
3190
|
+
}])), I("mouseleave", r, Q), I("focus", r, (e) => {
|
|
3191
|
+
ws(".sv-grid-chart-sankey-link", n);
|
|
3192
|
+
let r = Es(e.currentTarget);
|
|
3193
|
+
Z(r.x, r.y, `${h(t).source} → ${h(t).target}`, [{
|
|
3194
|
+
color: h(t).color,
|
|
3195
|
+
value: U(h(t).value)
|
|
3196
|
+
}]);
|
|
3197
|
+
}), I("blur", r, Q), S("keydown", r, (e) => Ts(e, ".sv-grid-chart-sankey-link", n)), j(e, r);
|
|
3198
|
+
});
|
|
3199
|
+
var r = D(n);
|
|
3200
|
+
C(r, 17, () => h(q).sankeyNodes, g, (e, t, n) => {
|
|
3201
|
+
var r = rr(), i = E(r), a = D(i), o = T(a, !0);
|
|
3202
|
+
w((e, n) => {
|
|
3203
|
+
P(i, "x", h(t).x), P(i, "y", h(t).y), P(i, "width", h(t).w), P(i, "height", h(t).h), P(i, "fill", h(t).color), P(i, "tabindex", e), P(i, "aria-label", n), P(a, "x", h(t).column === 0 ? h(t).x + h(t).w + 4 : h(t).x - 4), P(a, "y", h(t).y + h(t).h / 2 + 3), P(a, "text-anchor", h(t).column === 0 ? "start" : "end"), m(o, h(t).label);
|
|
3204
|
+
}, [() => Cs(".sv-grid-chart-sankey-node", n), () => V(h(B).sankeyNode, {
|
|
3205
|
+
label: h(t).label,
|
|
3206
|
+
in: U(h(t).totalIn),
|
|
3207
|
+
out: U(h(t).totalOut)
|
|
3208
|
+
})]), S("mousemove", i, (e) => Z(e.clientX, e.clientY, h(t).label, [{
|
|
3209
|
+
label: "in",
|
|
3210
|
+
value: U(h(t).totalIn)
|
|
3211
|
+
}, {
|
|
3212
|
+
label: "out",
|
|
3213
|
+
value: U(h(t).totalOut)
|
|
3214
|
+
}])), I("mouseleave", i, Q), I("focus", i, (e) => {
|
|
3215
|
+
ws(".sv-grid-chart-sankey-node", n);
|
|
3216
|
+
let r = Es(e.currentTarget);
|
|
3217
|
+
Z(r.x, r.y, h(t).label, [{
|
|
3218
|
+
label: "in",
|
|
3219
|
+
value: U(h(t).totalIn)
|
|
3220
|
+
}, {
|
|
3221
|
+
label: "out",
|
|
3222
|
+
value: U(h(t).totalOut)
|
|
3223
|
+
}]);
|
|
3224
|
+
}), I("blur", i, Q), S("keydown", i, (e) => Ts(e, ".sv-grid-chart-sankey-node", n)), j(e, r);
|
|
3225
|
+
}), j(e, t);
|
|
3226
|
+
};
|
|
3227
|
+
b(Wc, (e) => {
|
|
3228
|
+
h(so) && e(Gc);
|
|
3229
|
+
});
|
|
3230
|
+
var Kc = D(Wc), qc = (e) => {
|
|
3231
|
+
var t = ur(), n = E(t), r = (e) => {
|
|
3232
|
+
var t = v(), n = E(t);
|
|
3233
|
+
C(n, 17, () => h(q).polarRings, g, (e, t) => {
|
|
3234
|
+
var n = ir();
|
|
3235
|
+
w(() => {
|
|
3236
|
+
P(n, "cx", h(q).radarCenter.cx), P(n, "cy", h(q).radarCenter.cy), P(n, "r", h(t));
|
|
3237
|
+
}), j(e, n);
|
|
3238
|
+
}), j(e, t);
|
|
3239
|
+
};
|
|
3240
|
+
b(n, (e) => {
|
|
3241
|
+
h(q).radarCenter && h(q).polarRings.length && e(r);
|
|
3242
|
+
});
|
|
3243
|
+
var i = D(n);
|
|
3244
|
+
C(i, 17, () => h(q).polarAxes, g, (e, t) => {
|
|
3245
|
+
var n = ar(), r = T(n, !0);
|
|
3246
|
+
w((e) => {
|
|
3247
|
+
P(n, "x", h(t).x), P(n, "y", h(t).y + 3), P(n, "text-anchor", h(t).x < (h(q).radarCenter?.cx ?? 0) - 2 ? "end" : h(t).x > (h(q).radarCenter?.cx ?? 0) + 2 ? "start" : "middle"), m(r, e);
|
|
3248
|
+
}, [() => Ko(h(t).label, 14)]), j(e, n);
|
|
3249
|
+
});
|
|
3250
|
+
var a = D(i);
|
|
3251
|
+
C(a, 17, () => h(q).arcs, g, (e, t) => {
|
|
3252
|
+
var n = v(), r = E(n), i = (e) => {
|
|
3253
|
+
var n = or();
|
|
3254
|
+
w(() => P(n, "d", h(t).trackPath)), j(e, n);
|
|
3255
|
+
};
|
|
3256
|
+
b(r, (e) => {
|
|
3257
|
+
h(t).trackPath && e(i);
|
|
3258
|
+
}), j(e, n);
|
|
3259
|
+
});
|
|
3260
|
+
var o = D(a);
|
|
3261
|
+
C(o, 17, () => h(q).chordRibbons, g, (e, t) => {
|
|
3262
|
+
var n = sr();
|
|
3263
|
+
w((e) => {
|
|
3264
|
+
P(n, "d", h(t).path), P(n, "fill", h(t).color), P(n, "stroke", h(t).color), F(n, e);
|
|
3265
|
+
}, [() => `opacity:${Y(h(t).source) === 1 && Y(h(t).target) === 1 ? 1 : .18}`]), S("mousemove", n, (e) => ms(e.clientX, e.clientY, h(t))), I("mouseleave", n, Q), j(e, n);
|
|
3266
|
+
});
|
|
3267
|
+
var s = D(o);
|
|
3268
|
+
C(s, 17, () => h(q).arcs, g, (e, t, n) => {
|
|
3269
|
+
var r = cr();
|
|
3270
|
+
let i;
|
|
3271
|
+
w((e, n, a, o, s) => {
|
|
3272
|
+
i = O(r, 0, "sv-grid-chart-arc svelte-kvdein", null, i, {
|
|
3273
|
+
"is-selected": e,
|
|
3274
|
+
"is-drillable": n
|
|
3275
|
+
}), P(r, "d", h(t).path), P(r, "fill", h(t).color), F(r, a), P(r, "role", f.onSelect || h(X) || h(ka) && h(t).nodePath ? "button" : "img"), P(r, "tabindex", o), P(r, "aria-label", s);
|
|
3276
|
+
}, [
|
|
3277
|
+
() => wo(h(t).label, h(t).series),
|
|
3278
|
+
() => h(ka) && !!h(t).nodePath && !!l(h(Oa), h(t).nodePath)?.children?.length,
|
|
3279
|
+
() => `opacity:${Y(h($a) || h(H).type === "sunburst" || h(H).type === "chord" ? h(t).label : h(t).series)}`,
|
|
3280
|
+
() => Cs(".sv-grid-chart-arc", n),
|
|
3281
|
+
() => `${h(t).nodePath ? h(t).nodePath.join(" / ") : h(t).label}${h(t).series ? ` ${h(t).series}` : ""}: ${U(h(t).value)}`
|
|
3282
|
+
]), S("mousemove", r, (e) => ps(e.clientX, e.clientY, h(t))), I("mouseleave", r, Q), I("focus", r, (e) => {
|
|
3283
|
+
ws(".sv-grid-chart-arc", n);
|
|
3284
|
+
let r = Es(e.currentTarget);
|
|
3285
|
+
ps(r.x, r.y, h(t));
|
|
3286
|
+
}), I("blur", r, Q), S("click", r, (e) => {
|
|
3287
|
+
h(t).nodePath && Ia(h(t).nodePath) || ys(h(t).label, h(t).series, h(t).value, void 0, e);
|
|
3288
|
+
}), S("keydown", r, (e) => Ts(e, ".sv-grid-chart-arc", n, () => {
|
|
3289
|
+
h(t).nodePath && Ia(h(t).nodePath) || (f.onSelect || h(X)) && ys(h(t).label, h(t).series, h(t).value, void 0, e);
|
|
3290
|
+
})), j(e, r);
|
|
3291
|
+
});
|
|
3292
|
+
var c = D(s);
|
|
3293
|
+
C(c, 17, () => h(q).arcs, g, (e, t) => {
|
|
3294
|
+
var n = v(), r = E(n), i = (e) => {
|
|
3295
|
+
var n = v(), r = E(n), i = (e) => {
|
|
3296
|
+
var n = ar(), r = T(n, !0);
|
|
3297
|
+
w((e) => {
|
|
3298
|
+
P(n, "x", h(t).lx), P(n, "y", h(t).ly + 3), P(n, "text-anchor", h(t).lx < h(t).cx - 2 ? "end" : h(t).lx > h(t).cx + 2 ? "start" : "middle"), m(r, e);
|
|
3299
|
+
}, [() => Ko(h(t).label, 14)]), j(e, n);
|
|
3300
|
+
};
|
|
3301
|
+
b(r, (e) => {
|
|
3302
|
+
h(t).a1 - h(t).a0 > .12 && h(H).xAxis?.labels !== !1 && e(i);
|
|
3303
|
+
}), j(e, n);
|
|
3304
|
+
}, a = (e) => {
|
|
3305
|
+
var n = lr(), r = T(n, !0);
|
|
3306
|
+
w((e) => {
|
|
3307
|
+
P(n, "x", h(t).lx), P(n, "y", h(t).ly), P(n, "fill", h(t).textColor), m(r, e);
|
|
3308
|
+
}, [() => Ko(h(ni).show && h(H).type !== "sunburst" ? U(h(t).value) : h(t).label, 12)]), j(e, n);
|
|
3309
|
+
};
|
|
3310
|
+
b(r, (e) => {
|
|
3311
|
+
h(H).type === "chord" ? e(i) : (h(t).a1 - h(t).a0) * (h(t).r0 + h(t).r1) / 2 > 34 && h(t).r1 - h(t).r0 > 12 && (h(H).type === "sunburst" || h(ni).show) && e(a, 1);
|
|
3312
|
+
}), j(e, n);
|
|
3313
|
+
}), j(e, t);
|
|
3314
|
+
};
|
|
3315
|
+
b(Kc, (e) => {
|
|
3316
|
+
h(Za) && e(qc);
|
|
3317
|
+
});
|
|
3318
|
+
var Jc = D(Kc), Yc = (e) => {
|
|
3319
|
+
var t = v(), n = E(t);
|
|
3320
|
+
C(n, 17, () => h(q).bullets, g, (e, t) => {
|
|
3321
|
+
var n = pr(), r = _(n);
|
|
3322
|
+
C(r, 17, () => h(t).ranges, g, (e, n) => {
|
|
3323
|
+
var r = dr();
|
|
3324
|
+
w(() => {
|
|
3325
|
+
P(r, "x", h(n).x), P(r, "y", h(t).y), P(r, "width", h(n).w), P(r, "height", h(t).h), P(r, "fill", h(n).color);
|
|
3326
|
+
}), j(e, r);
|
|
3327
|
+
});
|
|
3328
|
+
var i = D(r), a = D(i), o = (e) => {
|
|
3329
|
+
var n = fr();
|
|
3330
|
+
w(() => {
|
|
3331
|
+
P(n, "x1", h(t).targetX), P(n, "y1", h(t).y + h(t).h * .15), P(n, "x2", h(t).targetX), P(n, "y2", h(t).y + h(t).h * .85);
|
|
3332
|
+
}), j(e, n);
|
|
3333
|
+
};
|
|
3334
|
+
b(a, (e) => {
|
|
3335
|
+
h(t).targetX != null && e(o);
|
|
3336
|
+
}), k(n), w(() => {
|
|
3337
|
+
P(i, "x", h(t).x), P(i, "y", h(t).y + h(t).h * .3), P(i, "width", h(t).measureW), P(i, "height", h(t).h * .4), P(i, "fill", h(t).color);
|
|
3338
|
+
}), S("mousemove", n, (e) => hs(e.clientX, e.clientY, h(t))), I("mouseleave", n, Q), j(e, n);
|
|
3339
|
+
}), j(e, t);
|
|
3340
|
+
};
|
|
3341
|
+
b(Jc, (e) => {
|
|
3342
|
+
h(Qa) && e(Yc);
|
|
3343
|
+
});
|
|
3344
|
+
var Xc = D(Jc);
|
|
3345
|
+
C(Xc, 17, () => h(q).slices, g, (e, t, n) => {
|
|
3346
|
+
var r = gr(), i = E(r);
|
|
3347
|
+
let a;
|
|
3348
|
+
var o = D(i), s = (e) => {
|
|
3349
|
+
var n = mr(), r = E(n), i = D(r), a = T(i, !0);
|
|
3350
|
+
w((e) => {
|
|
3351
|
+
P(r, "points", `${h(t).callout.x1},${h(t).callout.y1} ${h(t).callout.x2},${h(t).callout.y2} ${h(t).callout.x3},${h(t).callout.y2}`), P(r, "stroke", h(t).color), P(i, "x", h(t).callout.tx), P(i, "y", h(t).callout.ty + 3.5), P(i, "text-anchor", h(t).callout.anchor), m(a, e);
|
|
3352
|
+
}, [() => h(ni).formatter ? h(ni).formatter(h(t).value, {
|
|
3353
|
+
category: h(t).label,
|
|
3354
|
+
series: h(t).label
|
|
3355
|
+
}) : `${Ko(h(t).label, Math.min(18, h(t).callout.maxChars))} ${h(t).percent.toFixed(0)}%`]), j(e, n);
|
|
3356
|
+
}, c = (e) => {
|
|
3357
|
+
var n = hr(), r = T(n);
|
|
3358
|
+
w((e) => {
|
|
3359
|
+
P(n, "x", h(t).cx), P(n, "y", h(t).cy), m(r, `${e ?? ""}%`);
|
|
3360
|
+
}, [() => h(t).percent.toFixed(0)]), j(e, n);
|
|
3361
|
+
};
|
|
3362
|
+
b(o, (e) => {
|
|
3363
|
+
h(t).callout ? e(s) : h(ni).show && h(ni).placement !== "outside" && h(t).percent >= 6 && e(c, 1);
|
|
3364
|
+
}), w((e, n, r, o, s, c) => {
|
|
3365
|
+
a = O(i, 0, "sv-grid-chart-slice svelte-kvdein", null, a, {
|
|
3366
|
+
"is-selected": e,
|
|
3367
|
+
"is-drillable": n
|
|
3368
|
+
}), P(i, "d", h(t).path), P(i, "fill", h(t).color), F(i, r), P(i, "role", o), P(i, "tabindex", s), P(i, "aria-label", c);
|
|
3369
|
+
}, [
|
|
3370
|
+
() => wo(h(t).label, h(t).label),
|
|
3371
|
+
() => Pa(h(t).label),
|
|
3372
|
+
() => `opacity:${To(h(t).label, h(t).label)}`,
|
|
3373
|
+
() => f.onSelect || h(X) || Pa(h(t).label) ? "button" : "img",
|
|
3374
|
+
() => Cs(".sv-grid-chart-slice", n),
|
|
3375
|
+
() => `${h(t).label}: ${U(h(t).value)}, ${h(t).percent.toFixed(1)}%${Pa(h(t).label) ? h(B).drillIn : ""}`
|
|
3376
|
+
]), S("mousemove", i, (e) => ls(e.clientX, e.clientY, h(t).label, h(t).value, h(t).percent)), I("mouseleave", i, Q), I("focus", i, (e) => {
|
|
3377
|
+
ws(".sv-grid-chart-slice", n);
|
|
3378
|
+
let r = Es(e.currentTarget);
|
|
3379
|
+
ls(r.x, r.y, h(t).label, h(t).value, h(t).percent);
|
|
3380
|
+
}), I("blur", i, Q), S("click", i, (e) => {
|
|
3381
|
+
Pa(h(t).label) && Ia([...Ie(), h(t).label]) || ys(h(t).label, h(t).label, h(t).value, n, e);
|
|
3382
|
+
}), S("keydown", i, (e) => {
|
|
3383
|
+
Ls(e, n) || Ts(e, ".sv-grid-chart-slice", n, () => {
|
|
3384
|
+
Pa(h(t).label) && Ia([...Ie(), h(t).label]) || (f.onSelect || h(X)) && ys(h(t).label, h(t).label, h(t).value, n, e);
|
|
3385
|
+
});
|
|
3386
|
+
}), j(e, r);
|
|
3387
|
+
});
|
|
3388
|
+
var Zc = D(Xc), Qc = (e) => {
|
|
3389
|
+
var t = _r(), n = E(t), r = T(n, !0), i = D(n), a = T(i, !0);
|
|
3390
|
+
w((e) => {
|
|
3391
|
+
P(n, "x", h(q).donut.cx), P(n, "y", h(q).donut.cy - 4), m(r, e), P(i, "x", h(q).donut.cx), P(i, "y", h(q).donut.cy + 11), m(a, h(B).total);
|
|
3392
|
+
}, [() => U(h(q).donut.total)]), j(e, t);
|
|
3393
|
+
};
|
|
3394
|
+
b(Zc, (e) => {
|
|
3395
|
+
h(q).donut && e(Qc);
|
|
3396
|
+
});
|
|
3397
|
+
var $c = D(Zc), el = (e) => {
|
|
3398
|
+
var t = v(), n = E(t), r = (e) => {
|
|
3399
|
+
var t = vr();
|
|
3400
|
+
w((e) => {
|
|
3401
|
+
P(t, "x", h(q).plot.x), P(t, "y", h(q).plot.y), P(t, "width", h(q).plot.w), P(t, "height", h(q).plot.h), P(t, "role", f.onSelect ? "button" : "img"), P(t, "tabindex", y() ? 0 : void 0), P(t, "data-cat-index", h(_o)), P(t, "aria-label", e);
|
|
3402
|
+
}, [() => V(h(B).densePoints, {
|
|
3403
|
+
count: h(fo),
|
|
3404
|
+
from: h(K).categories[0] ?? "",
|
|
3405
|
+
to: h(K).categories[h(K).categories.length - 1] ?? ""
|
|
3406
|
+
})]), S("mousemove", t, (e) => {
|
|
3407
|
+
let t = go(e.clientX, e.currentTarget);
|
|
3408
|
+
t != null && (p(_o, t, !0), ss(e.clientX, e.clientY, t));
|
|
3409
|
+
}), I("mouseleave", t, Q), I("focus", t, (e) => cs(e.currentTarget, h(_o))), I("blur", t, Q), S("click", t, (e) => vs(e, h(_o))), S("keydown", t, vo), j(e, t);
|
|
3410
|
+
}, i = (e) => {
|
|
3411
|
+
var t = v(), n = E(t);
|
|
3412
|
+
C(n, 19, () => h(K).categories, (e, t) => e + t, (e, t, n) => {
|
|
3413
|
+
let r = N(() => h(q).lines[0]?.points), i = N(() => h(r)?.[h(n)]?.x), a = N(() => !h(co) && h(r) && h(r).length === h(K).categories.length && Number.isFinite(h(i))), o = N(() => h(a) && h(n) > 0 ? h(r)[h(n) - 1].x : null), s = N(() => h(a) && h(n) < h(r).length - 1 ? h(r)[h(n) + 1].x : null), c = N(() => h(a) ? h(o) == null ? h(q).plot.x : (h(o) + h(i)) / 2 : h(q).plot.x + h(lo) * h(n)), l = N(() => h(a) ? h(s) == null ? h(q).plot.x + h(q).plot.w : (h(i) + h(s)) / 2 : h(q).plot.x + h(lo) * (h(n) + 1));
|
|
3414
|
+
var u = yr();
|
|
3415
|
+
w((e, t) => {
|
|
3416
|
+
P(u, "x", h(co) ? h(q).plot.x : h(c)), P(u, "y", h(co) ? h(q).plot.y + h(lo) * h(n) : h(q).plot.y), P(u, "width", e), P(u, "height", h(co) ? h(lo) : h(q).plot.h), P(u, "role", f.onSelect ? "button" : "img"), P(u, "tabindex", y() ? h(n) === 0 ? 0 : -1 : void 0), P(u, "data-cat-index", h(n)), P(u, "aria-label", t);
|
|
3417
|
+
}, [() => h(co) ? h(q).plot.w : Math.max(0, h(l) - h(c)), () => `${h(t)}: ${es(h(n)).map((e) => `${e.label} ${e.value}`).join(", ")}`]), S("mousemove", u, (e) => ss(e.clientX, e.clientY, h(n), e.currentTarget)), I("mouseleave", u, Q), I("focus", u, (e) => cs(e.currentTarget, h(n))), I("blur", u, Q), S("click", u, (e) => vs(e, h(n))), S("keydown", u, (e) => xs(e, h(n))), j(e, u);
|
|
3418
|
+
}), j(e, t);
|
|
3419
|
+
};
|
|
3420
|
+
b(n, (e) => {
|
|
3421
|
+
h(uo) ? e(r) : e(i, -1);
|
|
3422
|
+
}), j(e, t);
|
|
3423
|
+
};
|
|
3424
|
+
b($c, (e) => {
|
|
3425
|
+
h(J) && !h(eo) && e(el);
|
|
3426
|
+
});
|
|
3427
|
+
var tl = D($c), nl = (e) => {
|
|
3428
|
+
var t = br();
|
|
3429
|
+
w(() => {
|
|
3430
|
+
P(t, "x", h(Ri).x), P(t, "y", h(Ri).y), P(t, "width", h(Ri).w), P(t, "height", h(Ri).h);
|
|
3431
|
+
}), j(e, t);
|
|
3432
|
+
};
|
|
3433
|
+
b(tl, (e) => {
|
|
3434
|
+
h(Ri) && e(nl);
|
|
3435
|
+
}), k($), _e($, (e) => p(Fi, e), () => h(Fi));
|
|
3436
|
+
var rl = D($, 2), il = (e) => {
|
|
3437
|
+
let t = N(() => h(G).plot.x + h(Sa).t0 * h(G).plot.w), n = N(() => (h(Sa).t1 - h(Sa).t0) * h(G).plot.w);
|
|
3438
|
+
var r = wr(), i = _(r);
|
|
3439
|
+
P(i, "aria-valuemin", 0);
|
|
3440
|
+
var a = _(i);
|
|
3441
|
+
C(a, 17, () => h(G).lines, g, (e, t) => {
|
|
3442
|
+
var n = Sr(), r = E(n), i = (e) => {
|
|
3443
|
+
var n = xr();
|
|
3444
|
+
w(() => {
|
|
3445
|
+
P(n, "d", h(t).areaPath), P(n, "fill", h(t).color);
|
|
3446
|
+
}), j(e, n);
|
|
3447
|
+
};
|
|
3448
|
+
b(r, (e) => {
|
|
3449
|
+
h(t).areaPath && e(i);
|
|
3450
|
+
});
|
|
3451
|
+
var a = D(r);
|
|
3452
|
+
w(() => {
|
|
3453
|
+
P(a, "d", h(t).path), P(a, "stroke", h(t).color);
|
|
3454
|
+
}), j(e, n);
|
|
3455
|
+
});
|
|
3456
|
+
var o = D(a);
|
|
3457
|
+
C(o, 17, () => h(G).bars, g, (e, t) => {
|
|
3458
|
+
var n = Cr();
|
|
3459
|
+
w(() => {
|
|
3460
|
+
P(n, "x", h(t).x), P(n, "y", h(t).y), P(n, "width", h(t).w), P(n, "height", h(t).h), P(n, "fill", h(t).color);
|
|
3461
|
+
}), j(e, n);
|
|
3462
|
+
});
|
|
3463
|
+
var s = D(o), c = D(s), l = D(c), u = D(l), d = D(u);
|
|
3464
|
+
k(i), k(r), w((e, r) => {
|
|
3465
|
+
P(i, "viewBox", `0 0 ${h(G).width} ${h(G).height}`), P(i, "aria-label", h(B).rangeBrush), P(i, "aria-valuemax", e), P(i, "aria-valuenow", L()?.i0 ?? 0), P(i, "aria-valuetext", r), P(s, "x", h(G).plot.x), P(s, "y", h(G).plot.y), P(s, "width", h(t) - h(G).plot.x), P(s, "height", h(G).plot.h), P(c, "x", h(t) + h(n)), P(c, "y", h(G).plot.y), P(c, "width", h(G).plot.x + h(G).plot.w - (h(t) + h(n))), P(c, "height", h(G).plot.h), P(l, "x", h(t)), P(l, "y", h(G).plot.y), P(l, "width", h(n)), P(l, "height", h(G).plot.h), P(u, "x", h(t) - 4), P(u, "y", h(G).plot.y), P(u, "height", h(G).plot.h), P(d, "x", h(t) + h(n) - 4), P(d, "y", h(G).plot.y), P(d, "height", h(G).plot.h);
|
|
3466
|
+
}, [() => Math.max(0, h(H).categories.length - 1), () => V(h(B).brushRange, {
|
|
3467
|
+
from: h(H).categories[L()?.i0 ?? 0] ?? "",
|
|
3468
|
+
to: h(H).categories[L()?.i1 ?? h(H).categories.length - 1] ?? ""
|
|
3469
|
+
})]), S("pointermove", i, Ea), S("keydown", i, Os), S("pointerdown", l, (e) => Ta(e, "move")), S("pointerup", l, Da), I("pointercancel", l, Da), S("pointerdown", u, (e) => Ta(e, "left")), S("pointerup", u, Da), I("pointercancel", u, Da), S("pointerdown", d, (e) => Ta(e, "right")), S("pointerup", d, Da), I("pointercancel", d, Da), ye(r, "clientHeight", (e) => p(Qr, e)), j(e, r);
|
|
3470
|
+
};
|
|
3471
|
+
b(rl, (e) => {
|
|
3472
|
+
h(ba) && h(G) && e(il);
|
|
3473
|
+
});
|
|
3474
|
+
var al = D(rl, 2), ol = (e) => {
|
|
3475
|
+
var t = Tr(), n = T(t, !0);
|
|
3476
|
+
w(() => m(n, h(B).noData)), j(e, t);
|
|
3477
|
+
};
|
|
3478
|
+
b(al, (e) => {
|
|
3479
|
+
h(Ro) && e(ol);
|
|
3480
|
+
});
|
|
3481
|
+
var sl = D(al, 2), cl = (e) => {
|
|
3482
|
+
var t = v(), n = E(t);
|
|
3483
|
+
xe(n, () => h(js), (e, t) => {
|
|
3484
|
+
t(e, {
|
|
3485
|
+
get items() {
|
|
3486
|
+
return h(Rs);
|
|
3487
|
+
},
|
|
3488
|
+
get x() {
|
|
3489
|
+
return h(As).x;
|
|
3490
|
+
},
|
|
3491
|
+
get y() {
|
|
3492
|
+
return h(As).y;
|
|
3493
|
+
},
|
|
3494
|
+
onClose: () => p(As, null)
|
|
3495
|
+
});
|
|
3496
|
+
}), j(e, t);
|
|
3497
|
+
};
|
|
3498
|
+
b(sl, (e) => {
|
|
3499
|
+
h(As) && h(js) && e(cl);
|
|
3500
|
+
});
|
|
3501
|
+
var ll = D(sl, 2), ul = (e) => {
|
|
3502
|
+
var t = Er();
|
|
3503
|
+
he(t), de(() => me(t, () => h(Qi), (e) => p(Qi, e))), ue(t, (e) => ma?.(e)), w(() => {
|
|
3504
|
+
P(t, "placeholder", h(B).noteText), P(t, "aria-label", h(B).noteText), F(t, `left:${h(Zi).left}px; top:${h(Zi).top}px;`);
|
|
3505
|
+
}), S("keydown", t, (e) => {
|
|
3506
|
+
e.key === "Enter" ? (e.preventDefault(), $i()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), p(Zi, null), p(Qi, ""));
|
|
3507
|
+
}), I("blur", t, $i), j(e, t);
|
|
3508
|
+
};
|
|
3509
|
+
b(ll, (e) => {
|
|
3510
|
+
h(Zi) && e(ul);
|
|
3511
|
+
});
|
|
3512
|
+
var dl = D(ll, 2), fl = (e) => {
|
|
3513
|
+
var t = jr();
|
|
3514
|
+
let n;
|
|
3515
|
+
var r = _(t), i = (e) => {
|
|
3516
|
+
var t = v(), n = E(t);
|
|
3517
|
+
ge(n, () => f.tooltip, () => h(Xo).ctx), j(e, t);
|
|
3518
|
+
}, a = (e) => {
|
|
3519
|
+
var t = Ar(), n = E(t), r = T(n, !0), i = D(n, 2);
|
|
3520
|
+
C(i, 17, () => h(Xo).rows, g, (e, t) => {
|
|
3521
|
+
var n = kr(), r = _(n), i = (e) => {
|
|
3522
|
+
var n = Dr();
|
|
3523
|
+
w(() => F(n, `background:${h(t).color}`)), j(e, n);
|
|
3524
|
+
};
|
|
3525
|
+
b(r, (e) => {
|
|
3526
|
+
h(t).color && e(i);
|
|
3527
|
+
});
|
|
3528
|
+
var a = D(r, 2), o = (e) => {
|
|
3529
|
+
var n = Or(), r = T(n, !0);
|
|
3530
|
+
w(() => m(r, h(t).label)), j(e, n);
|
|
3531
|
+
};
|
|
3532
|
+
b(a, (e) => {
|
|
3533
|
+
h(t).label && e(o);
|
|
3534
|
+
});
|
|
3535
|
+
var s = D(a, 2), c = T(s, !0);
|
|
3536
|
+
k(n), w(() => m(c, h(t).value)), j(e, n);
|
|
3537
|
+
}), w(() => m(r, h(Xo).title)), j(e, t);
|
|
3538
|
+
};
|
|
3539
|
+
b(r, (e) => {
|
|
3540
|
+
f.tooltip ? e(i) : e(a, -1);
|
|
3541
|
+
}), k(t), w(() => {
|
|
3542
|
+
n = O(t, 1, "sv-grid-chart-tooltip svelte-kvdein", null, n, {
|
|
3543
|
+
"is-below": h(Xo).below,
|
|
3544
|
+
"is-custom": !!f.tooltip,
|
|
3545
|
+
"is-fixed": h(Xo).fixed,
|
|
3546
|
+
"is-right": Se() === "top-right" || Se() === "bottom-right",
|
|
3547
|
+
"is-bottom": Se() === "bottom-left" || Se() === "bottom-right",
|
|
3548
|
+
"is-pinned": !!h(Zo)
|
|
3549
|
+
}), F(t, `left:${h(Xo).left}px; top:${h(Xo).top}px;`);
|
|
3550
|
+
}), j(e, t);
|
|
3551
|
+
};
|
|
3552
|
+
b(dl, (e) => {
|
|
3553
|
+
h(Xo) && e(fl);
|
|
3554
|
+
});
|
|
3555
|
+
var pl = D(dl, 2), ml = (e) => {
|
|
3556
|
+
var t = Fr();
|
|
3557
|
+
let n;
|
|
3558
|
+
var r = _(t);
|
|
3559
|
+
C(r, 19, () => h(Lo), (e) => e.label, (e, t, n) => {
|
|
3560
|
+
var r = Nr();
|
|
3561
|
+
let i;
|
|
3562
|
+
var a = _(r), o = (e) => {
|
|
3563
|
+
var r = v(), i = E(r);
|
|
3564
|
+
ge(i, () => f.legendItem, () => ({
|
|
3565
|
+
label: h(t).label,
|
|
3566
|
+
color: h(t).color,
|
|
3567
|
+
off: h(t).off,
|
|
3568
|
+
index: h(n)
|
|
3569
|
+
})), j(e, r);
|
|
3570
|
+
}, s = (e) => {
|
|
3571
|
+
var n = Mr(), r = E(n), i = D(r);
|
|
3572
|
+
w(() => {
|
|
3573
|
+
F(r, `background:${h(t).off ? "transparent" : h(t).color}; border-color:${h(t).color}`), m(i, ` ${h(t).label ?? ""}`);
|
|
3574
|
+
}), j(e, n);
|
|
3575
|
+
};
|
|
3576
|
+
b(a, (e) => {
|
|
3577
|
+
f.legendItem ? e(o) : e(s, -1);
|
|
3578
|
+
}), k(r), w(() => {
|
|
3579
|
+
i = O(r, 1, "sv-grid-chart-legend-item svelte-kvdein", null, i, {
|
|
3580
|
+
"is-off": h(t).off,
|
|
3581
|
+
"is-isolated": h(di) === h(t).label
|
|
3582
|
+
}), r.disabled = !y() || !h(Po), P(r, "aria-pressed", h(Po) ? !h(t).off : void 0), P(r, "title", y() ? `${h(t).off ? h(B).showSeries : h(B).hideSeries} ${h(t).label} \u00b7 ${h(B).isolateHint}` : h(t).label);
|
|
3583
|
+
}), S("click", r, () => Bo(h(t).label)), S("dblclick", r, () => Vo(h(t).label)), I("pointerenter", r, () => y() && p(pi, h(t).label, !0)), I("pointerleave", r, () => p(pi, null)), j(e, r);
|
|
3584
|
+
});
|
|
3585
|
+
var i = D(r, 2), a = (e) => {
|
|
3586
|
+
var t = Pr(), n = T(t, !0);
|
|
3587
|
+
w((e) => m(n, e), [() => h(Fo) ? h(B).showLess : V(h(B).showMore, { n: h(ko).length - 10 })]), S("click", t, () => p(Fo, !h(Fo))), j(e, t);
|
|
3588
|
+
};
|
|
3589
|
+
b(i, (e) => {
|
|
3590
|
+
h(Io) && e(a);
|
|
3591
|
+
}), k(t), w(() => n = O(t, 1, "sv-grid-chart-legend svelte-kvdein", null, n, { "is-vertical": h(Jr) })), ye(t, "clientWidth", (e) => p(Xr, e)), ye(t, "clientHeight", (e) => p(Zr, e)), j(e, t);
|
|
3592
|
+
};
|
|
3593
|
+
b(pl, (e) => {
|
|
3594
|
+
h(qr) && h(ko).length && e(ml);
|
|
3595
|
+
});
|
|
3596
|
+
var hl = D(pl, 2), gl = (e) => {
|
|
3597
|
+
var t = Ir(), n = T(t, !0);
|
|
3598
|
+
w(() => m(n, h(Oo))), j(e, t);
|
|
3599
|
+
};
|
|
3600
|
+
b(hl, (e) => {
|
|
3601
|
+
ze() && e(gl);
|
|
3602
|
+
});
|
|
3603
|
+
var _l = D(hl, 2), vl = _(_l), yl = _(vl), bl = _(yl, !0), xl = D(bl), Sl = (e) => {
|
|
3604
|
+
var t = se();
|
|
3605
|
+
w((e) => m(t, e), [() => V(h(B).dataTableCapped, {
|
|
3606
|
+
shown: mo,
|
|
3607
|
+
total: h(Uo).rows.length
|
|
3608
|
+
})]), j(e, t);
|
|
3609
|
+
};
|
|
3610
|
+
b(xl, (e) => {
|
|
3611
|
+
h(Wo) && e(Sl);
|
|
3612
|
+
});
|
|
3613
|
+
var Cl = D(xl), wl = (e) => {
|
|
3614
|
+
var t = se();
|
|
3615
|
+
w(() => m(t, `. ${h(Xe) ?? ""}`)), j(e, t);
|
|
3616
|
+
};
|
|
3617
|
+
b(Cl, (e) => {
|
|
3618
|
+
Be() && h(Xe) && e(wl);
|
|
3619
|
+
}), k(yl);
|
|
3620
|
+
var Tl = D(yl), El = _(Tl);
|
|
3621
|
+
C(El, 20, () => h(Uo).cols, (e) => e, (e, t) => {
|
|
3622
|
+
var n = Lr(), r = T(n, !0);
|
|
3623
|
+
w(() => m(r, t)), j(e, n);
|
|
3624
|
+
}), k(El), k(Tl);
|
|
3625
|
+
var Dl = D(Tl);
|
|
3626
|
+
C(Dl, 21, () => h(Go), g, (e, t) => {
|
|
3627
|
+
var n = zr();
|
|
3628
|
+
C(n, 21, () => h(t), g, (e, t) => {
|
|
3629
|
+
var n = Rr(), r = T(n, !0);
|
|
3630
|
+
w(() => m(r, h(t))), j(e, n);
|
|
3631
|
+
}), k(n), j(e, n);
|
|
3632
|
+
}), k(Dl), k(vl), k(_l), k(qs), _e(qs, (e) => p(Jo, e), () => h(Jo)), w((e, a, o) => {
|
|
3633
|
+
t = O($, 0, "sv-grid-chart-svg svelte-kvdein", null, t, {
|
|
3634
|
+
"is-interactive": y(),
|
|
3635
|
+
"is-clickable": !!f.onSelect || !!f.onDrill,
|
|
3636
|
+
"is-zoomable": !!h(ri)?.drag && h(J) && !h(oi) && !h(ii),
|
|
3637
|
+
"is-pannable": !!h(ri)?.pan && h(J) && h(xi) && h(ii),
|
|
3638
|
+
"is-annotating": h(oi),
|
|
3639
|
+
"is-dragging": !!h(Ii),
|
|
3640
|
+
"is-drawing": !!h(Ji)
|
|
3641
|
+
}), P($, "viewBox", `0 0 ${h(q).width} ${h(q).height}`), P($, "role", y() ? "group" : "img"), P($, "aria-label", a), P($, "aria-description", Be() && h(Xe) ? h(Xe) : void 0), P($, "aria-describedby", `${hi}-table`), n = F($, "", n, { height: qe() ? `${h(ti) ?? h(H).height ?? 300}px` : null }), r = O(uc, 0, "sv-grid-chart-marks svelte-kvdein", null, r, {
|
|
3642
|
+
"is-enter-grow": h(Wa) === "grow",
|
|
3643
|
+
"is-enter-none": h(Wa) === "none"
|
|
3644
|
+
}), P(uc, "clip-path", h(J) ? `url(#${hi}-plot)` : void 0), i = O(Sc, 0, "sv-grid-chart-marks svelte-kvdein", null, i, {
|
|
3645
|
+
"is-enter-grow": h(Wa) === "grow",
|
|
3646
|
+
"is-enter-none": h(Wa) === "none"
|
|
3647
|
+
}), P(Sc, "clip-path", h(J) ? `url(#${hi}-plot)` : void 0), P(vl, "id", `${hi}-table`), m(bl, o);
|
|
3648
|
+
}, [
|
|
3649
|
+
() => ee(h(H).style) || void 0,
|
|
3650
|
+
() => V(h(B).chartLabel, { type: h(H).type }),
|
|
3651
|
+
() => V(h(B).dataTable, { type: h(H).type })
|
|
3652
|
+
]), S("pointerdown", $, Vi), S("pointermove", $, (e) => {
|
|
3653
|
+
Hi(e), ca(e);
|
|
3654
|
+
}), S("pointerup", $, (e) => {
|
|
3655
|
+
Ui(e), p(ea, null);
|
|
3656
|
+
}), I("pointercancel", $, (e) => {
|
|
3657
|
+
Ui(e), p(ea, null);
|
|
3658
|
+
}), S("click", $, sa), S("keydown", $, da), I("wheel", $, Ai), S("contextmenu", $, Fs), S("dblclick", $, Wi), ye(qs, "clientWidth", (e) => p(Vr, e)), ye(qs, "clientHeight", (e) => p(Hr, e));
|
|
3659
|
+
}
|
|
3660
|
+
return w((e, t, n) => {
|
|
3661
|
+
Js = O(qs, 1, "sv-grid-chart svelte-kvdein", null, Js, {
|
|
3662
|
+
"is-autosize": qe(),
|
|
3663
|
+
"is-legend-top": h(qr) === "top",
|
|
3664
|
+
"is-legend-left": h(qr) === "left",
|
|
3665
|
+
"is-legend-right": h(qr) === "right"
|
|
3666
|
+
}), F(qs, e);
|
|
3667
|
+
}, [
|
|
3668
|
+
() => ee(h(H).style) || void 0,
|
|
3669
|
+
() => V(h(B).chartLabel, { type: h(H).type }),
|
|
3670
|
+
() => V(h(B).dataTable, { type: h(H).type })
|
|
3671
|
+
]), j(ne, qs), pe(Ks);
|
|
3672
|
+
}
|
|
3673
|
+
ce([
|
|
3674
|
+
"click",
|
|
3675
|
+
"pointerdown",
|
|
3676
|
+
"pointermove",
|
|
3677
|
+
"pointerup",
|
|
3678
|
+
"keydown",
|
|
3679
|
+
"contextmenu",
|
|
3680
|
+
"dblclick",
|
|
3681
|
+
"mousemove"
|
|
3682
|
+
]);
|
|
3683
|
+
//#endregion
|
|
3684
|
+
export { Qe as a, Ke as c, Ge as i, Ze as n, Ye as o, Je as r, qe as s, Vr as t };
|