@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.
Files changed (72) hide show
  1. package/dist/GridFind-B5zpfGlk.js +39 -0
  2. package/dist/GridFooter-CSzuZWPH.js +142 -0
  3. package/dist/GridMenus-DGR1VkZL.js +1480 -0
  4. package/dist/PinSplitter-BbQwf4Eh.js +178 -0
  5. package/dist/{SvChartMenu-CztABicV.js → SvChartMenu-CFvrEIJf.js} +132 -132
  6. package/dist/{SvDateRangeInput-ByR-LFgf.js → SvDateRangeInput-B8uPcD0z.js} +107 -107
  7. package/dist/{SvDateTimePicker-8nq26l0z.js → SvDateTimePicker-D9MnooXn.js} +316 -316
  8. package/dist/{SvField-CtzxdF7J.js → SvField--1Px2j7E.js} +105 -105
  9. package/dist/SvGridCellEditor-BzLvoGRp.js +594 -0
  10. package/dist/SvGridChart-rvB4vvCB.js +3684 -0
  11. package/dist/{SvGridChartBuilder-BMPDRY0A.js → SvGridChartBuilder-C0HbpZhw.js} +385 -385
  12. package/dist/SvGridChartPanel-CftDsgLi.js +1689 -0
  13. package/dist/{SvGridChartView-D0Mk0N4Q.js → SvGridChartView-BMJf1fCo.js} +12 -12
  14. package/dist/SvGridDropdown-CZRv-0Cw.js +258 -0
  15. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +4 -2
  16. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
  17. package/dist/angular/types/svgrid-grid-wc-angular.d.ts +2 -1
  18. package/dist/{chart-export-pdf-COD2Ugv7.js → chart-export-pdf-CFq7Y-pq.js} +1 -1
  19. package/dist/{shadow/client-OtsRxGjS.js → client-DeNKZvIV.js} +593 -581
  20. package/dist/{date-format-DngG1HJ5.js → date-format-B1XMOxlA.js} +309 -309
  21. package/dist/{grid-extension.svelte-DToFhcZv.js → grid-extension.svelte-B_gzYJQQ.js} +8 -8
  22. package/dist/{range-commit-C6Rogxem.js → range-commit-BriJZw_M.js} +1 -1
  23. package/dist/react/index.d.ts +3 -1
  24. package/dist/react/index.js +1 -1
  25. package/dist/{shadow/row-drag-DLQMyiV3.js → row-drag-DevACK09.js} +1 -1
  26. package/dist/shadow/GridFind-CVqPCjPK.js +39 -0
  27. package/dist/shadow/GridFooter-DY9numnH.js +142 -0
  28. package/dist/shadow/GridMenus-Bl11jIy6.js +1480 -0
  29. package/dist/shadow/PinSplitter-DNjnUtbi.js +178 -0
  30. package/dist/shadow/{SvChartMenu-CFlDiKdq.js → SvChartMenu-Ca2hVFUA.js} +132 -132
  31. package/dist/shadow/{SvDateRangeInput-9Wq4E64y.js → SvDateRangeInput-CNXId95j.js} +107 -107
  32. package/dist/shadow/{SvDateTimePicker-J65ZmtSw.js → SvDateTimePicker-B6lwKYFq.js} +316 -316
  33. package/dist/shadow/{SvField-DGPj2clt.js → SvField-1OiD5dJA.js} +105 -105
  34. package/dist/shadow/SvGridCellEditor-CRImfWTE.js +594 -0
  35. package/dist/shadow/SvGridChart-_GY1Mgr4.js +3684 -0
  36. package/dist/shadow/{SvGridChartBuilder-BY64S-Zw.js → SvGridChartBuilder-Ci_GlCg3.js} +385 -385
  37. package/dist/shadow/SvGridChartPanel-BHczMJAe.js +1689 -0
  38. package/dist/shadow/{SvGridChartView-DwchQygE.js → SvGridChartView-BJEpaO8h.js} +12 -12
  39. package/dist/shadow/SvGridDropdown-giyKVcC0.js +258 -0
  40. package/dist/shadow/{chart-export-pdf-D9OfzqwS.js → chart-export-pdf-Ne0ET-JM.js} +1 -1
  41. package/dist/{client-OtsRxGjS.js → shadow/client-DeNKZvIV.js} +593 -581
  42. package/dist/shadow/{date-format-C9UkbCig.js → date-format-VCW-gATr.js} +309 -309
  43. package/dist/shadow/{grid-extension.svelte-DToFhcZv.js → grid-extension.svelte-B_gzYJQQ.js} +8 -8
  44. package/dist/shadow/{range-commit-C6Rogxem.js → range-commit-BriJZw_M.js} +1 -1
  45. package/dist/{row-drag-DLQMyiV3.js → shadow/row-drag-DevACK09.js} +1 -1
  46. package/dist/shadow/sv-grid-scrollbar-yHMClECS.js +228 -0
  47. package/dist/shadow/sv-grid-shadow-element.d.ts +2 -0
  48. package/dist/shadow/sv-grid-shadow-element.js +5686 -5829
  49. package/dist/{svelte-virtualizer.svelte-DWvD9wvL.js → shadow/svelte-virtualizer.svelte-D8oCAQUc.js} +4 -4
  50. package/dist/sv-grid-element.d.ts +2 -0
  51. package/dist/sv-grid-element.js +5668 -5811
  52. package/dist/sv-grid-scrollbar-yHMClECS.js +228 -0
  53. package/dist/{shadow/svelte-virtualizer.svelte-DWvD9wvL.js → svelte-virtualizer.svelte-D8oCAQUc.js} +4 -4
  54. package/dist/vue/index.d.ts +2 -1
  55. package/dist/vue/index.js +1 -1
  56. package/package.json +3 -3
  57. package/dist/GridFind-C1YbloFh.js +0 -39
  58. package/dist/GridFooter-DOR8m9GQ.js +0 -142
  59. package/dist/GridMenus-ac4ROLfR.js +0 -1461
  60. package/dist/PinSplitter-Du4ZF8T3.js +0 -178
  61. package/dist/SvGridCellEditor-3jq3ec38.js +0 -594
  62. package/dist/SvGridChart-CHMHUQto.js +0 -3684
  63. package/dist/SvGridChartPanel-Bk_xFAwN.js +0 -1689
  64. package/dist/SvGridDropdown-CnCQuXaI.js +0 -258
  65. package/dist/shadow/GridFind-CcoKoisE.js +0 -39
  66. package/dist/shadow/GridFooter-CDq71ytl.js +0 -142
  67. package/dist/shadow/GridMenus-hIMzQt3E.js +0 -1461
  68. package/dist/shadow/PinSplitter-BAYTAZtm.js +0 -178
  69. package/dist/shadow/SvGridCellEditor-DA5l3ENL.js +0 -594
  70. package/dist/shadow/SvGridChart-DgCuTYRq.js +0 -3684
  71. package/dist/shadow/SvGridChartPanel-CuRtOxSk.js +0 -1689
  72. package/dist/shadow/SvGridDropdown-B_5kqHQE.js +0 -258
@@ -1,3684 +0,0 @@
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__||{})["shadow"];if(typeof f==='function')f(c);else{var q=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__=g.__SVGRID_WC_CSS_CHUNKS_BY_BUILD__||{};(q["shadow"]=q["shadow"]||[]).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')==="shadow:SvGridChart-DgCuTYRq.js"||x[i].textContent===c)return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"shadow:SvGridChart-DgCuTYRq.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 ae, C as oe, D as h, F as se, H as ce, I as le, J as g, L as _, M as v, N as y, O as ue, Q as b, R as x, T as S, U as C, V as de, W as fe, X as w, Y as T, Z as pe, a as me, at as he, d as ge, f as E, it as _e, j as D, k as O, n as k, o as ve, ot as ye, q as A, s as be, st as j, tt as M, v as N, w as P, x as xe, y as F, z as I } from "./client-OtsRxGjS.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-shadow-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 = pe({
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 = v("<span class=\"sv-grid-chart-crumb is-current svelte-kvdein\" aria-current=\"page\"> </span>"), nt = v("<button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-crumb svelte-kvdein\"> </button>"), rt = v("<span class=\"sv-grid-chart-crumb-sep svelte-kvdein\" aria-hidden=\"true\">/</span> <!>", 1), it = v("<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 = v("<button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-preset svelte-kvdein\"> </button>"), ot = v("<span class=\"sv-grid-chart-presets svelte-kvdein\" role=\"group\"></span>"), st = v("<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 = v("<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 = v("<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 = v("<button type=\"button\"> </button>"), dt = v("<button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button>", 1), ft = v("<span class=\"sv-grid-chart-drawtools svelte-kvdein\" role=\"group\"><!> <!></span>"), pt = v("<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 = v("<div class=\"sv-grid-chart-toolbar is-crumbs-only svelte-kvdein\" role=\"toolbar\"><!></div>"), ht = y("<clipPath><rect></rect></clipPath>"), gt = y("<linearGradient x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\"></stop><stop offset=\"1\"></stop></linearGradient>"), _t = y("<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 = y("<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 = y("<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 = y("<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 = y("<defs><!><!><!></defs>"), St = y("<text class=\"sv-grid-chart-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), Ct = y("<text class=\"sv-grid-chart-subtitle svelte-kvdein\" text-anchor=\"middle\"> </text>"), wt = y("<text class=\"sv-grid-chart-caption svelte-kvdein\" text-anchor=\"start\"> </text>"), Tt = y("<line class=\"sv-grid-chart-gridline svelte-kvdein\"></line>"), Et = y("<!><text class=\"sv-grid-chart-axis is-x svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), Dt = y("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"end\"> </text>"), Ot = y("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), kt = y("<!><!><!><!><!>", 1), At = y("<line></line>"), jt = y("<!><!>", 1), Mt = y("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>"), Nt = y("<text class=\"sv-grid-chart-axis is-x svelte-kvdein\"> </text>"), Pt = y("<text class=\"sv-grid-chart-axis is-x svelte-kvdein\" text-anchor=\"middle\"> </text>"), Ft = y("<line class=\"sv-grid-chart-gridline svelte-kvdein\" opacity=\"0.5\"></line>"), It = y("<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 = y("<!><!><!><!><!><!><!><!>", 1), Rt = y("<text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"end\"> </text>"), zt = y("<text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"middle\"> </text>"), Bt = y("<rect class=\"sv-grid-chart-refband svelte-kvdein\"></rect><!>", 1), Vt = y("<path class=\"sv-grid-chart-band svelte-kvdein\" fill-opacity=\"0.12\" stroke=\"none\"></path>"), Ht = y("<path class=\"sv-grid-chart-area svelte-kvdein\" stroke=\"none\"></path>"), Ut = y("<circle class=\"sv-grid-chart-dot is-active svelte-kvdein\" r=\"4\"></circle>"), Wt = y("<circle></circle>"), Gt = y("<path fill=\"none\" stroke-width=\"1.5\"></path>"), Kt = y("<path></path>"), qt = y("<g class=\"svelte-kvdein\"><!><!><path class=\"sv-grid-chart-linepath svelte-kvdein\" fill=\"none\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path><!></g>"), Jt = y("<rect rx=\"1\"></rect>"), Yt = y("<circle class=\"sv-grid-chart-dot svelte-kvdein\" fill-opacity=\"0.55\"></circle>"), Xt = y("<g class=\"sv-grid-chart-stem svelte-kvdein\"><line class=\"svelte-kvdein\"></line><!><circle class=\"sv-grid-chart-dot svelte-kvdein\"></circle></g>"), Zt = y("<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 = y("<line class=\"sv-grid-chart-wick svelte-kvdein\"></line><rect class=\"sv-grid-chart-candle svelte-kvdein\"></rect>", 1), $t = y("<circle class=\"sv-grid-chart-outlier svelte-kvdein\" r=\"2\" fill=\"none\"></circle>"), en = y("<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 = y("<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 = y("<circle fill-opacity=\"0.7\"></circle>"), rn = y("<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 = y("<line class=\"sv-grid-chart-refline svelte-kvdein\"></line><!>", 1), on = y("<line class=\"sv-grid-chart-refline svelte-kvdein\"></line><text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"start\"> </text>", 1), sn = y("<path class=\"sv-grid-chart-overlay-band svelte-kvdein\" fill-opacity=\"0.1\" stroke-opacity=\"0.35\" stroke-width=\"1\"></path>"), cn = y("<!><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 = y("<line class=\"sv-grid-chart-datalabel-leader svelte-kvdein\"></line>"), un = y("<!><text> </text>", 1), dn = y("<text class=\"sv-grid-chart-serieslabel svelte-kvdein\" text-anchor=\"start\"> </text>"), fn = y("<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 = y("<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 = y("<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 = y("<circle stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle><text class=\"sv-grid-chart-annotation-label svelte-kvdein\"> </text>", 1), gn = y("<g><!></g>"), _n = y("<path class=\"svelte-kvdein\"></path>"), vn = y("<line class=\"sv-grid-chart-drawing-hit svelte-kvdein\"></line><line stroke-width=\"1.5\" class=\"svelte-kvdein\"></line><!>", 1), yn = y("<rect fill-opacity=\"0.08\" stroke-width=\"1.2\" class=\"svelte-kvdein\"></rect>"), bn = y("<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 = y("<line stroke-width=\"1\" class=\"svelte-kvdein\"></line><text class=\"sv-grid-chart-drawing-label svelte-kvdein\"> </text>", 1), Sn = y("<!><rect class=\"sv-grid-chart-drawing-hit svelte-kvdein\"></rect>", 1), Cn = y("<text class=\"sv-grid-chart-drawing-text svelte-kvdein\"> </text>"), wn = y("<circle class=\"sv-grid-chart-drawing-handle svelte-kvdein\" r=\"5\" fill=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle>"), Tn = y("<g><!><!></g>"), En = y("<rect fill=\"var(--sg-accent, #2563eb)\" fill-opacity=\"0.08\" stroke=\"var(--sg-accent, #2563eb)\" stroke-dasharray=\"4 3\"></rect>"), Dn = y("<line stroke=\"var(--sg-accent, #2563eb)\" stroke-width=\"1.5\" stroke-dasharray=\"4 3\"></line>"), On = y("<circle r=\"3.5\" fill=\"var(--sg-accent, #2563eb)\"></circle><!>", 1), kn = y("<g class=\"sv-grid-chart-drawings\"><!><!></g>"), An = y("<line class=\"sv-grid-chart-crosshair svelte-kvdein\"></line>"), jn = y("<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 = y("<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 = y("<line class=\"sv-grid-chart-crosshair svelte-kvdein\"></line><!>", 1), Pn = y("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"middle\"> </text>"), Fn = y("<text class=\"sv-grid-chart-heatlabel svelte-kvdein\" text-anchor=\"middle\"> </text>"), In = y("<rect class=\"sv-grid-chart-heatcell svelte-kvdein\"></rect><!>", 1), Ln = y("<stop></stop>"), Rn = y("<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 = y("<!><!><!><!>", 1), Bn = y("<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 = y("<path class=\"sv-grid-chart-funnel-seg svelte-kvdein\"></path><!>", 1), Hn = y("<circle class=\"sv-grid-chart-radar-ring svelte-kvdein\"></circle>"), Un = y("<line class=\"sv-grid-chart-radar-spoke svelte-kvdein\"></line><text class=\"sv-grid-chart-axis svelte-kvdein\"> </text>", 1), Wn = y("<circle class=\"sv-grid-chart-radar-dot svelte-kvdein\" r=\"3\" role=\"img\"></circle>"), Gn = y("<path class=\"sv-grid-chart-radar-poly svelte-kvdein\" fill-opacity=\"0.18\" stroke-width=\"2\"></path><!>", 1), Kn = y("<!><!><!>", 1), qn = y("<rect rx=\"2\" role=\"img\"></rect>"), Jn = y("<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 = y("<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 = y("<path fill=\"none\" stroke-width=\"4\" stroke-linecap=\"butt\" opacity=\"0.7\"></path>"), Zn = y("<line stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\" stroke-linecap=\"round\"></line>"), Qn = y("<!><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 = y("<text class=\"sv-grid-chart-treemap-label svelte-kvdein\"> </text>"), er = y("<text class=\"sv-grid-chart-treemap-value svelte-kvdein\" opacity=\"0.85\"> </text>"), tr = y("<rect class=\"sv-grid-chart-treemap-cell svelte-kvdein\"></rect><!><!>", 1), nr = y("<path class=\"sv-grid-chart-sankey-link svelte-kvdein\" fill=\"none\" stroke-opacity=\"0.35\" role=\"img\"></path>"), rr = y("<rect class=\"sv-grid-chart-sankey-node svelte-kvdein\" role=\"img\"></rect><text class=\"sv-grid-chart-sankey-label svelte-kvdein\"> </text>", 1), ir = y("<circle class=\"sv-grid-chart-gridline svelte-kvdein\" fill=\"none\"></circle>"), ar = y("<text class=\"sv-grid-chart-axis svelte-kvdein\"> </text>"), or = y("<path class=\"sv-grid-chart-arc-track svelte-kvdein\"></path>"), sr = y("<path class=\"sv-grid-chart-ribbon svelte-kvdein\" fill-opacity=\"0.45\" stroke-opacity=\"0.6\"></path>"), cr = y("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path>"), lr = y("<text class=\"sv-grid-chart-datalabel on-bar svelte-kvdein\" text-anchor=\"middle\" dominant-baseline=\"middle\" pointer-events=\"none\"> </text>"), ur = y("<!><!><!><!><!><!>", 1), dr = y("<rect></rect>"), fr = y("<line class=\"sv-grid-chart-bullet-target\" stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\"></line>"), pr = y("<g class=\"sv-grid-chart-bullet\"><!><rect class=\"sv-grid-chart-bar svelte-kvdein\"></rect><!></g>"), mr = y("<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 = y("<text class=\"sv-grid-chart-datalabel on-bar svelte-kvdein\" text-anchor=\"middle\" dominant-baseline=\"middle\"> </text>"), gr = y("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path><!>", 1), _r = y("<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 = y("<rect class=\"sv-grid-chart-cat-hit svelte-kvdein\" data-dense=\"true\"></rect>"), yr = y("<rect class=\"sv-grid-chart-cat-hit svelte-kvdein\"></rect>"), br = y("<rect class=\"sv-grid-chart-zoom-rect svelte-kvdein\"></rect>"), xr = y("<path fill-opacity=\"0.10\" stroke=\"none\"></path>"), Sr = y("<!><path fill=\"none\" stroke-width=\"1.2\" opacity=\"0.75\"></path>", 1), Cr = y("<rect opacity=\"0.55\"></rect>"), wr = v("<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 = v("<div class=\"sv-grid-chart-empty svelte-kvdein\"> </div>"), Er = v("<input class=\"sv-grid-chart-textdraft svelte-kvdein\" type=\"text\"/>"), Dr = v("<span class=\"sv-grid-chart-tooltip-dot svelte-kvdein\"></span>"), Or = v("<span class=\"sv-grid-chart-tooltip-row-label svelte-kvdein\"> </span>"), kr = v("<span class=\"sv-grid-chart-tooltip-row svelte-kvdein\"><!> <!> <span class=\"sv-grid-chart-tooltip-row-value svelte-kvdein\"> </span></span>"), Ar = v("<span class=\"sv-grid-chart-tooltip-title svelte-kvdein\"> </span> <!>", 1), jr = v("<div role=\"tooltip\"><!></div>"), Mr = v("<span class=\"sv-grid-chart-swatch svelte-kvdein\"></span> ", 1), Nr = v("<button type=\"button\"><!></button>"), Pr = v("<button type=\"button\" class=\"sv-grid-chart-legend-more svelte-kvdein\"> </button>"), Fr = v("<div><!> <!></div>"), Ir = v("<div class=\"sv-grid-chart-live sv-grid-chart-sr-only svelte-kvdein\" aria-live=\"polite\" aria-atomic=\"true\"> </div>"), Lr = v("<th> </th>"), Rr = v("<td> </td>"), zr = v("<tr></tr>"), Br = v("<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
- he(f, !0);
449
- let le = k(f, "legend", 3, !0), v = k(f, "interactive", 3, !0), y = k(f, "tooltipMode", 3, "shared"), Se = k(f, "tooltipPosition", 3, "follow"), Ce = k(f, "tooltipSticky", 3, !1), we = k(f, "zoomable", 3, !1), L = k(f, "zoom", 15, null), Ae = k(f, "rangePresets", 3, !1), R = k(f, "contextMenu", 3, !1), z = k(f, "animate", 3, !1), Fe = k(f, "drillable", 3, !1), Ie = k(f, "drillPath", 31, () => pe([])), Le = k(f, "selectable", 3, !1), Re = k(f, "selected", 31, () => pe([])), ze = k(f, "announce", 3, !0), Be = k(f, "describe", 3, !0), Ve = k(f, "live", 3, !1), He = k(f, "hoverHighlight", 3, !0), Ue = k(f, "crosshairLabels", 3, !0), We = k(f, "brush", 3, !1), Ge = k(f, "brushHeight", 3, 88), qe = k(f, "autosize", 3, !1), Je = k(f, "annotatable", 3, !1), Ye = k(f, "drawable", 3, !1), B = M(() => et(f.localeText)), Xe = p("");
450
- fe(() => {
451
- if (!Be()) {
452
- b(Xe, "");
453
- return;
454
- }
455
- let e = I(K), t = !0;
456
- return import("./chart-summary-B52586F9.js").then(({ chartSummary: n }) => {
457
- t && b(Xe, n(e), !0);
458
- }), () => {
459
- t = !1;
460
- };
461
- });
462
- async function $e() {
463
- if (I(Xe)) {
464
- try {
465
- await navigator.clipboard?.writeText(I(Xe));
466
- } catch {}
467
- b(Oo, `${I(B).describeCopied}. ${I(Xe)}`);
468
- }
469
- }
470
- let Vr = p(0), Hr = p(0), Ur = M(() => f.width ?? (qe() && I(Vr) > 24 ? I(Vr) : f.spec.width ?? 520)), Wr = M(() => f.height ?? (qe() && I(Hr) > 24 ? I(Hr) : f.spec.height ?? 300)), Gr = M(() => {
471
- if (!f.spec.responsive?.length) return;
472
- let e;
473
- for (let t of u(f.spec.responsive, I(Ur), I(Wr))) t.legend !== void 0 && (e = t.legend);
474
- return e;
475
- }), H = M(() => {
476
- if (!f.spec.responsive?.length) return f.spec;
477
- let { responsive: e, ...t } = o(f.spec, I(Ur), I(Wr));
478
- return t;
479
- }), Kr = M(() => I(Gr) ?? le()), qr = M(() => I(Kr) === !0 ? "bottom" : I(Kr) === !1 ? null : I(Kr)), Jr = M(() => I(qr) === "left" || I(qr) === "right"), Yr = p(0), Xr = p(0), Zr = p(0), Qr = p(0), $r = M(() => {
480
- if (!qe() || I(Vr) <= 24) return null;
481
- let e = I(ai) ? I(Yr) : 0, t = I(qr) ? I(Zr) : 0, n = I(qr) ? I(Xr) : 0, r = We() && !va.has(f.spec.type) ? I(Qr) : 0, i = Math.max(120, Math.round(I(Vr) - (I(Jr) ? n + 8 : 0))), a = e + (I(Jr) ? 0 : t) + r, o = I(Jr) ? 16 : (e ? 8 : 0) + (t ? 8 : 0) + (r ? 8 : 0);
482
- return {
483
- width: i,
484
- height: I(Hr) > 24 ? Math.max(120, Math.round(I(Hr) - a - o)) : void 0
485
- };
486
- }), ei = M(() => f.width ?? I($r)?.width), ti = M(() => f.height ?? I($r)?.height), ni = M(() => typeof f.dataLabels == "object" ? {
487
- show: !0,
488
- ...f.dataLabels
489
- } : f.dataLabels === void 0 ? I(H).dataLabels ? {
490
- show: I(H).dataLabels.show !== !1,
491
- ...I(H).dataLabels
492
- } : { show: !1 } : { show: !!f.dataLabels }), ri = M(() => 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 = p(!1), ai = M(() => f.toolbar ?? (!!we() || !!f.onDrill || Je() || !!Ae() || Fe() || !!Ye())), oi = p(!1), U = (e) => f.formatValue ? f.formatValue(e) : I(H).valueFormat ? d(e, I(H).valueFormat, I(H)) : Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e), si = M(() => {
505
- let e = I(H).y2Axis;
506
- return f.formatValue ? f.formatValue : e?.formatter ? (t) => e.formatter(t, -1) : e?.format ? (t) => d(t, e.format, I(H)) : (e) => Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e);
507
- }), ci = M(() => new Set(I(H).series.filter((e) => e.axis === "right").map((e) => e.label))), li = (e) => e && I(ci).has(e) ? I(si) : U, ui = p(pe(new Set(f.spec.series.filter((e) => e.visible === !1).map((e) => e.label)))), di = p(null), fi = p(null), pi = p(null), mi = M(() => I(H).palette ?? I(fi) ?? n), hi = `svgc-${Math.random().toString(36).slice(2, 8)}`, gi = M(() => I(H).series.map((e, t) => ({
508
- ...e,
509
- color: e.color ?? I(mi)[t % I(mi).length]
510
- }))), _i = M(() => I(H).series.map((e, t) => e.pattern ? e.pattern : I(H).patternFallback ? [
511
- "stripe",
512
- "crosshatch",
513
- "dots",
514
- "diagonal"
515
- ][t % 4] : "solid")), vi = M(() => {
516
- let e = {};
517
- return I(gi).forEach((t, n) => {
518
- let r = I(_i)[n];
519
- e[t.label] = r === "solid" || !r ? t.color : `url(#${hi}-pat-${n})`;
520
- }), e;
521
- }), yi = M(() => I(gi).map((e, t) => ({
522
- id: `${hi}-pat-${t}`,
523
- color: e.color,
524
- kind: I(_i)[t] ?? "solid"
525
- })).filter((e) => e.kind !== "solid")), bi = M(() => {
526
- if (I(di) == null) return I(ui);
527
- let e = I(H).type === "pie" ? I(Na) : I(H).series.map((e) => e.label);
528
- return new Set(e.filter((e) => e !== I(di)));
529
- }), xi = M(() => 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 = I(H).categories.length;
533
- Ne(f.syncGroup, e, t, Ci, e ? [I(H).categories[e.i0] ?? "", I(H).categories[e.i1] ?? ""] : null);
534
- }
535
- }
536
- let Ci = Symbol("svchart"), wi = !1, Ti = M(() => f.syncGroup ? je(f.syncGroup) : null), Ei = p(!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 (!I(ri)?.wheel || !I(J) || I(oi) || I(ri).wheel === "modifier" && !(e.ctrlKey || e.metaKey)) return;
549
- let t = zi(e);
550
- if (!t || t.x < I(q).plot.x || t.x > I(q).plot.x + I(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(), I(H).categories.length, n, r));
554
- }
555
- let ji = /* @__PURE__ */ new Map(), Mi = null, Ni = null, Pi = (e) => !!I(ri)?.pan && I(xi) && (I(ii) || (I(ri).pan === "shift" || I(ri).pan === !0) && e.shiftKey), Fi = p(null), Ii = p(null), Li = p(null), Ri = M(() => {
556
- if (!I(Ii) || !I(Li)) return null;
557
- let e = Math.min(I(Ii).x, I(Li).x), t = Math.min(I(Ii).y, I(Li).y), n = Math.abs(I(Li).x - I(Ii).x), r = Math.abs(I(Li).y - I(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 (!I(Fi)) return null;
567
- let t = I(Fi).getBoundingClientRect();
568
- return {
569
- x: (e.clientX - t.left) / t.width * I(q).width,
570
- y: (e.clientY - t.top) / t.height * I(q).height
571
- };
572
- }
573
- function Bi(e) {
574
- let t = I(co) ? e.y - I(q).plot.y : e.x - I(q).plot.x, n = Math.floor(t / I(lo));
575
- return Math.max(0, Math.min(I(K).categories.length - 1, n));
576
- }
577
- function Vi(e) {
578
- if (I(oi) || I(Ji) || I(ea) || !I(ri) || !I(J)) return;
579
- let t = zi(e);
580
- if (t && !(t.x < I(q).plot.x || t.x > I(q).plot.x + I(q).plot.w || t.y < I(q).plot.y || t.y > I(q).plot.y + I(q).plot.h)) {
581
- if (e.target.setPointerCapture?.(e.pointerId), I(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
- }, b(Ii, null), b(Li, null);
591
- return;
592
- }
593
- if (Pi(e)) {
594
- Ni = {
595
- startIndex: Bi(t),
596
- start: L()
597
- };
598
- return;
599
- }
600
- I(ri).drag && (b(Ii, t, !0), b(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, I(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, I(H).categories.length, n));
619
- return;
620
- }
621
- I(Ii) && b(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 (!I(Ii) || !I(Li)) {
633
- b(Ii, null), b(Li, null);
634
- return;
635
- }
636
- let t = I(Ri);
637
- if (t) {
638
- let e = I(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 ?? I(H).categories.length - 1 : i + Math.max(n, r), s;
645
- if (e !== "x" && I(Ya) && !I(co)) {
646
- let e = I(Ya).yInvert(t.y), n = I(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
- b(Ii, null), b(Li, null);
659
- }
660
- function Wi() {
661
- we() && I(xi) && Oi();
662
- }
663
- let Gi = [
664
- "trend",
665
- "hray",
666
- "fib",
667
- "rect",
668
- "arrow",
669
- "text"
670
- ], Ki = M(() => ({
671
- trend: I(B).toolTrend,
672
- hray: I(B).toolRay,
673
- fib: I(B).toolFib,
674
- rect: I(B).toolRect,
675
- arrow: I(B).toolArrow,
676
- text: I(B).toolText
677
- })), qi = M(() => Ye() ? Ye() === !0 ? Gi : Ye() : []), Ji = p(null), W = p(null), Yi = p(null), Xi = p(null), Zi = p(null), Qi = p("");
678
- function $i() {
679
- let e = I(Zi), t = I(Qi).trim();
680
- b(Zi, null), b(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 = p(null), ta = 0, na = () => I(H).drawings ?? [];
691
- function ra(e) {
692
- if (!I(Ya)) return null;
693
- let t = I(q).axes?.x;
694
- if (t?.type === "number") return I(Ya).xInvertValue(e);
695
- if (t?.type === "time") return new Date(I(Ya).xInvertValue(e)).toISOString();
696
- let n = Math.round(I(Ya).xInvert(e));
697
- return I(K).categories[n] ?? null;
698
- }
699
- function ia(e) {
700
- let t = zi(e);
701
- if (!t || !I(Ya) || t.x < I(q).plot.x || t.x > I(q).plot.x + I(q).plot.w || t.y < I(q).plot.y || t.y > I(q).plot.y + I(q).plot.h) return null;
702
- let n = ra(t.x);
703
- if (n == null) return null;
704
- let r = I(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
- b(Ji, I(Ji) === e ? null : e, !0), b(W, null), b(Yi, null), b(Zi, null);
717
- }
718
- function sa(e) {
719
- if (!I(Ji)) return;
720
- let t = ia(e);
721
- if (!t) return;
722
- if (I(Ji) === "text") {
723
- let n = I(Jo)?.getBoundingClientRect();
724
- b(Qi, ""), b(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 (I(Ji) === "hray") {
733
- aa([...na(), {
734
- id: `d${Date.now().toString(36)}${ta++}`,
735
- kind: I(Ji),
736
- points: [{
737
- x: t.x,
738
- y: t.y
739
- }]
740
- }]);
741
- return;
742
- }
743
- if (!I(W)) {
744
- b(W, t, !0), b(Yi, {
745
- x: t.px,
746
- y: t.py
747
- }, !0);
748
- return;
749
- }
750
- let n = I(W);
751
- b(W, null), b(Yi, null), aa([...na(), {
752
- id: `d${Date.now().toString(36)}${ta++}`,
753
- kind: I(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 (I(ea)) {
765
- let t = ia(e);
766
- if (!t) return;
767
- let { id: n, index: r } = I(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 (I(W)) {
778
- let t = zi(e);
779
- t && b(Yi, t, !0);
780
- }
781
- }
782
- function la(e) {
783
- aa(na().filter((t) => t.id !== e)), I(Xi) === e && b(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 (I(Zo)) {
791
- fa();
792
- return;
793
- }
794
- I(Ji) && (I(W) ? (b(W, null), b(Yi, null)) : b(Ji, null));
795
- }
796
- }
797
- function fa() {
798
- b(Zo, null), Q();
799
- }
800
- function pa(e) {
801
- if (!(!Ce() || !I(Xo))) {
802
- if (I(Zo) && I(Zo).index === e) {
803
- fa();
804
- return;
805
- }
806
- b(Zo, {
807
- index: e,
808
- series: I(Xo).ctx.series ?? null
809
- }, !0);
810
- }
811
- }
812
- fe(() => {
813
- if (!I(Zo) || typeof document > "u") return;
814
- let e = (e) => {
815
- I(Jo) && e.target instanceof Node && I(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 = M(() => I(H).type === "candlestick" || I(H).type === "ohlc"), ga = M(() => I(H).type === "ohlc"), _a = M(() => Math.max(50, (I(ei) ?? I(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 = M(() => We() && !va.has(I(H).type)), xa = M(() => ({
844
- ...I(H),
845
- width: I(ei) ?? I(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
- ...I(H).xAxis,
855
- title: void 0,
856
- labels: !1
857
- },
858
- yAxis: {
859
- ...I(H).yAxis,
860
- title: void 0,
861
- labels: !1
862
- },
863
- y2Axis: {
864
- ...I(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: I(ha) || I(H).type === "boxplot" || ya.has(I(H).type) ? "line" : I(H).type === "histogram" ? "bar" : I(H).type,
875
- stackOffset: void 0,
876
- series: I(gi).filter((e) => !I(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 = M(() => I(ba) ? te(re(I(xa), I(_a))) : null), Sa = M(() => {
888
- let e = I(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 = p(null);
897
- function wa(e, t) {
898
- let n = t.getBoundingClientRect();
899
- return I(G) ? (e.clientX - n.left) / n.width * I(G).width : 0;
900
- }
901
- function Ta(e, t) {
902
- if (!I(G)) return;
903
- let n = e.currentTarget, r = wa(e, n.ownerSVGElement ?? n);
904
- b(Ca, {
905
- mode: t,
906
- startX: r,
907
- startT0: I(Sa).t0,
908
- startT1: I(Sa).t1
909
- }, !0), e.currentTarget.setPointerCapture?.(e.pointerId), e.stopPropagation();
910
- }
911
- function Ea(e) {
912
- if (!I(Ca) || !I(G)) return;
913
- let t = (wa(e, e.currentTarget.ownerSVGElement ?? e.currentTarget) - I(Ca).startX) / I(G).plot.w, n = I(H).categories.length;
914
- if (n === 0) return;
915
- let r = I(Ca).startT0, i = I(Ca).startT1;
916
- if (I(Ca).mode === "move") {
917
- let e = i - r;
918
- r = Math.max(0, Math.min(1 - e, r + t)), i = r + e;
919
- } else I(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
- b(Ca, null), e.currentTarget.releasePointerCapture?.(e.pointerId);
929
- }
930
- let Oa = M(() => I(H).tree ?? I(H).treemap ?? null), ka = M(() => Fe() && !!I(Oa) && (I(H).type === "sunburst" || I(H).type === "treemap" || I(H).type === "pie")), Aa = M(() => I(ka) && Ie().length ? l(I(Oa), Ie()) : I(Oa)), ja = (e) => e.value ?? (e.children ?? []).reduce((e, t) => e + ja(t), 0), Ma = M(() => I(H).type === "pie" && I(ka) && I(Aa) ? I(Aa) : null), Na = M(() => I(Ma) ? (I(Ma).children ?? []).map((e) => e.name) : I(H).categories), Pa = (e) => !!I(Ma) && !!I(Ma).children?.find((t) => t.name === e)?.children?.length;
931
- function Fa(e) {
932
- Ie(e);
933
- }
934
- function Ia(e) {
935
- return !I(ka) || !e || !I(Oa) || !l(I(Oa), e)?.children?.length ? !1 : (Fa(e), !0);
936
- }
937
- let K = M(() => {
938
- if (I(Ma)) {
939
- let e = I(Ma).children ?? [], t = I(H).series[0]?.label ?? I(Ma).name, n = e.map((e) => I(bi).has(e.name) ? 0 : ja(e)), r = e.map((e) => e.color ?? null);
940
- return {
941
- ...I(H),
942
- categories: I(Na),
943
- series: [{
944
- label: t,
945
- values: n,
946
- ...r.some(Boolean) ? { colors: r } : {}
947
- }]
948
- };
949
- }
950
- if (I(ka) && I(Aa) && Ie().length) {
951
- let e = {
952
- ...I(H),
953
- tree: I(Aa),
954
- treemap: I(Aa)
955
- };
956
- return I(H).type === "treemap" ? e : {
957
- ...e,
958
- series: I(gi)
959
- };
960
- }
961
- if (I(H).type === "pie" || I($a)) {
962
- let e = I(gi)[0];
963
- if (!e) return I(H);
964
- let t = e.values.map((e, t) => I(bi).has(I(H).categories[t] ?? String(t)) ? 0 : e);
965
- return {
966
- ...I(H),
967
- series: [{
968
- ...e,
969
- values: t
970
- }]
971
- };
972
- }
973
- let e = I(gi).filter((e) => !I(bi).has(e.label)), t = L() ? c({
974
- ...I(H),
975
- series: e
976
- }, L().i0, L().i1) : {
977
- ...I(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, I(_a));
993
- }), La = p(!1), Ra = M(() => te({
994
- ...I(K),
995
- palette: I(mi),
996
- ...I(ei) || I(ti) ? {
997
- width: I(ei),
998
- height: I(ti)
999
- } : {},
1000
- ...f.dataLabels === void 0 ? {} : { dataLabels: I(ni) }
1001
- }, I(La) ? "dark" : "light")), za = M(() => 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 = p(!1);
1010
- fe(() => {
1011
- if (typeof matchMedia != "function") return;
1012
- let e = matchMedia("(prefers-reduced-motion: reduce)");
1013
- b(Ba, e.matches, !0);
1014
- let t = () => b(Ba, e.matches, !0);
1015
- return e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
1016
- });
1017
- let Va = p(null), q = M(() => I(Va) && I(Va).t < 1 ? Pe(I(Va).from, I(Ra), I(Va).t) : I(Ra)), Ha = null, Ua = 0;
1018
- fe(() => {
1019
- let e = I(Ra);
1020
- de(() => {
1021
- let t = Ha;
1022
- if (Ha = e, !t || !I(za)?.update || I(Ba) || I(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 = I(Va) && I(Va).t < 1 ? Pe(I(Va).from, t, I(Va).t) : t;
1024
- cancelAnimationFrame(Ua);
1025
- let r = performance.now(), i = I(za).duration;
1026
- b(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
- b(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 = M(() => I(Ba) || Ve() ? "none" : I(za)?.enter ?? "fade"), Ga = M(() => I(q).lines.flatMap((e, t) => e.style?.gradient ? [{
1041
- id: `${hi}-grad-${t}`,
1042
- ...e.style.gradient
1043
- }] : [])), Ka = M(() => I(H).yAxis?.title ?? I(H).yAxisTitle), qa = M(() => I(H).y2Axis?.title ?? I(H).y2AxisTitle), Ja = M(() => I(H).xAxis?.title ?? I(H).xAxisTitle), Ya = M(() => i(I(q))), Xa = M(() => ({
1044
- geo: I(q),
1045
- scales: I(Ya),
1046
- xOf: I(Ya)?.xOf ?? null,
1047
- yOf: I(Ya)?.yOf ?? null
1048
- })), J = M(() => !va.has(I(H).type)), Za = M(() => I(H).type === "sunburst" || I(H).type === "radial-bar" || I(H).type === "radial-column" || I(H).type === "nightingale" || I(H).type === "chord"), Qa = M(() => I(H).type === "bullet"), $a = M(() => (I(H).type === "radial-bar" || I(H).type === "radial-column" || I(H).type === "nightingale") && I(H).series.length === 1), eo = M(() => I(H).type === "scatter"), to = M(() => I(H).type === "heatmap"), no = M(() => I(H).type === "funnel"), ro = M(() => I(H).type === "radar"), io = M(() => I(H).type === "calendar"), ao = M(() => I(H).type === "gauge"), oo = M(() => I(H).type === "treemap"), so = M(() => I(H).type === "sankey"), co = M(() => I(q).orientation === "horizontal"), lo = M(() => (I(co) ? I(q).plot.h : I(q).plot.w) / Math.max(1, I(K).categories.length)), uo = M(() => I(J) && !I(eo) && !I(co) && I(lo) < 4 && I(K).categories.length > 1), fo = M(() => L() ? L().i1 - L().i0 + 1 : I(H).categories.length), po = M(() => I(ni).show && I(J) && !I(eo) ? s(I(q), I(ni), (e, t) => li(t)(e), {
1049
- stacked: !!(I(H).stacked || I(H).stacked100),
1050
- dense: I(uo),
1051
- share: !!I(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 = I(q).lines[0]?.points, a = I(K).categories.length;
1068
- if (!i || i.length !== a) {
1069
- let e = Math.floor((r - I(q).plot.x) / I(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 = p(0);
1080
- function vo(e) {
1081
- if (Ls(e, I(_o)) || Ds(e, I(_o))) return;
1082
- let t = I(K).categories.length - 1, n = Math.max(1, Math.floor(t / 10)), r = I(_o);
1083
- switch (e.key) {
1084
- case "ArrowRight":
1085
- case "ArrowDown":
1086
- r = Math.min(t, I(_o) + 1);
1087
- break;
1088
- case "ArrowLeft":
1089
- case "ArrowUp":
1090
- r = Math.max(0, I(_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, I(_o) + n);
1100
- break;
1101
- case "PageUp":
1102
- r = Math.max(0, I(_o) - n);
1103
- break;
1104
- case "Enter":
1105
- case " ":
1106
- e.preventDefault(), vs(e, I(_o));
1107
- return;
1108
- default: return;
1109
- }
1110
- e.preventDefault(), b(_o, r, !0), cs(e.currentTarget, r);
1111
- }
1112
- let yo = p(null), bo = M(() => I(pi) ?? (He() ? I(yo) : null)), Y = (e) => I(bo) && I(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 = M(() => 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) => I(X) && Re().length && !wo(e, t, n) ? .35 : 1;
1117
- function Eo(e, t, n, r) {
1118
- if (!I(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 = I(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 = p(null), Oo = p(""), ko = M(() => I(H).type === "heatmap" || I(H).type === "calendar" || I(H).type === "gauge" ? [] : I(H).type === "pie" || I($a) ? I(Na).map((e, t) => ({
1130
- label: e,
1131
- color: I(H).categoryColors?.[e] ?? I(K).series[0]?.colors?.[t] ?? I(mi)[t % I(mi).length],
1132
- off: I(ui).has(e)
1133
- })) : I(H).type === "sunburst" || I(H).type === "chord" ? I(q).legend.map((e) => ({
1134
- label: e.label,
1135
- color: e.color,
1136
- off: !1
1137
- })) : I(gi).map((e) => ({
1138
- label: e.label,
1139
- color: e.color,
1140
- off: I(ui).has(e.label)
1141
- }))), Ao = M(() => Ae() ? Ae() === !0 ? [
1142
- "1W",
1143
- "1M",
1144
- "3M",
1145
- "6M",
1146
- "YTD",
1147
- "1Y",
1148
- "All"
1149
- ] : Ae() : []), jo = M(() => I(Ao).length > 0 && I(J) && (I(H).xType === "time" || I(H).xType === "ordinal-time" || I(H).xAxis?.type === "time" || I(H).xAxis?.type === "ordinal-time")), Mo = (e) => typeof e == "string" ? e : e.label;
1150
- function No(e) {
1151
- Si(Oe(I(H).categories, e));
1152
- }
1153
- let Po = M(() => I(H).type !== "sunburst" && I(H).type !== "chord"), Fo = p(!1), Io = M(() => I(ko).length > 10), Lo = M(() => I(Io) && !I(Fo) ? I(ko).slice(0, 10) : I(ko)), Ro = M(() => I(H).type === "pie" ? I(q).slices.every((e) => e.value <= 0) : I(H).type === "scatter" ? I(q).scatterPoints.length === 0 : I(H).type === "heatmap" ? I(q).heatmapCells.length === 0 : I(H).type === "funnel" ? I(q).funnelSegments.length === 0 : I(H).type === "radar" ? I(q).radarSeries.length === 0 : I(H).type === "calendar" ? I(q).calendarCells.length === 0 : I(H).type === "gauge" ? !I(q).gauge : I(H).type === "treemap" ? I(q).treemapCells.length === 0 : I(H).type === "sankey" ? I(q).sankeyNodes.length === 0 : I(ha) ? I(q).candles.length === 0 : I(H).type === "boxplot" ? I(q).boxes.length === 0 : I(Za) ? I(q).arcs.length === 0 : I(Qa) ? I(q).bullets.length === 0 : I(q).bars.length === 0 && I(q).stems.length === 0 && I(q).lines.every((e) => e.points.every((e) => !e.defined))), zo = null;
1154
- function Bo(e) {
1155
- if (!v() || !I(Po)) return;
1156
- if (I(di) != null) {
1157
- zo = {
1158
- label: I(di),
1159
- at: Date.now()
1160
- }, b(di, null);
1161
- return;
1162
- }
1163
- let t = new Set(I(ui));
1164
- t.has(e) ? t.delete(e) : t.add(e), b(ui, t, !0);
1165
- }
1166
- function Vo(e) {
1167
- if (!v() || !I(Po)) return;
1168
- let t = zo;
1169
- zo = null;
1170
- let n = new Set(I(ui));
1171
- if (n.delete(e), t && t.label === e && Date.now() - t.at < 600) {
1172
- b(ui, n, !0);
1173
- return;
1174
- }
1175
- b(ui, n, !0), b(di, I(di) === e ? null : e, !0);
1176
- }
1177
- let Ho = (e, t) => Number.isFinite(e) ? li(t)(e) : "", Uo = M(() => {
1178
- if (I(H).type === "pie") {
1179
- let e = I(Ma) ? I(K).series[0] : I(gi)[0];
1180
- return {
1181
- cols: ["Category", "Value"],
1182
- rows: I(Na).map((t, n) => [t, Ho(e?.values[n])])
1183
- };
1184
- }
1185
- if (I(eo)) {
1186
- let e = [];
1187
- for (let t of I(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 (I(Za)) return {
1204
- cols: [
1205
- I(H).type === "chord" ? "Group" : "Category",
1206
- "Series",
1207
- "Value"
1208
- ],
1209
- rows: I(q).arcs.map((e) => [
1210
- e.nodePath ? e.nodePath.join(" / ") : e.label,
1211
- e.series,
1212
- U(e.value)
1213
- ])
1214
- };
1215
- if (I(Qa)) return {
1216
- cols: [
1217
- "Category",
1218
- "Value",
1219
- "Target"
1220
- ],
1221
- rows: I(q).bullets.map((e) => [
1222
- e.label,
1223
- U(e.value),
1224
- e.target == null ? "" : U(e.target)
1225
- ])
1226
- };
1227
- if (I(ha)) {
1228
- let e = [];
1229
- for (let t of I(gi)) (t.ohlc ?? []).forEach((n, r) => {
1230
- n && e.push([
1231
- I(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 (I(H).type === "waterfall") {
1252
- let e = I(gi)[0];
1253
- return {
1254
- cols: ["Category", e?.label ?? "Value"],
1255
- rows: I(H).categories.map((t, n) => {
1256
- let r = I(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", ...I(gi).map((e) => e.label)],
1263
- rows: I(H).categories.map((e, t) => [e, ...I(gi).map((e) => Ho(e.values[t], e.label))])
1264
- };
1265
- }), Wo = M(() => I(Uo).rows.length > mo), Go = M(() => I(Wo) ? I(Uo).rows.slice(0, mo) : I(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 = p(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
- fe(() => {
1283
- if (!I(Jo) || typeof window > "u") return;
1284
- let e = I(Jo), t = () => {
1285
- let t = getComputedStyle(e);
1286
- b(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
- (!I(fi) || r.some((e, t) => e !== I(fi)[t])) && b(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 = p(null), Zo = p(null), Qo = p(null);
1306
- function Z(e, t, n, r, i) {
1307
- if (!v() || !I(Jo) || r.length === 0 || I(Zo) && I(Xo)) return;
1308
- let a = I(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 && I(Fi)) {
1315
- let e = I(Fi).getBoundingClientRect(), t = e.width / (I(q).width || 1), n = e.height / (I(q).height || 1), r = Se() === "top-right" || Se() === "bottom-right", i = Se() === "bottom-left" || Se() === "bottom-right";
1316
- l = e.left - a.left + (r ? (I(q).plot.x + I(q).plot.w) * t - 8 : I(q).plot.x * t + 8), u = e.top - a.top + (i ? (I(q).plot.y + I(q).plot.h) * n - 8 : I(q).plot.y * n + 8);
1317
- } else l = Math.max(70, Math.min(a.width - 70, e - a.left)), u = t - a.top;
1318
- b(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 I(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 I(q).bars) {
1342
- if (i.label !== I(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 I(q).candles) {
1347
- if (i.label !== I(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 (I(H).type === "waterfall") {
1359
- let e = I(q).bars.find((e) => e.index === t), r = I(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 I(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 I(q).overlays) {
1447
- let i = r.points[t];
1448
- if (!i?.defined) continue;
1449
- let a = I(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(I(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 = p(null);
1461
- function ns(e) {
1462
- let t = I(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 = I(H).yAxis;
1463
- return a?.formatter ? a.formatter(i, -1) : a?.format ? d(i, a.format, I(H)) : qo(i, U(i));
1464
- }
1465
- let rs = M(() => I(H).xType === "time" || I(H).xType === "ordinal-time" || I(H).xAxis?.type === "time" || I(H).xAxis?.type === "ordinal-time"), is = M(() => I(rs) ? t(I(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 = I(K).categories[e] ?? "";
1471
- if (!I(rs)) return t;
1472
- let n = Date.parse(t);
1473
- return Number.isFinite(n) ? I(H).xAxis?.formatter ? I(H).xAxis.formatter(n, e) : r(n, I(is)) : t;
1474
- }
1475
- function ss(e, t, n, r) {
1476
- b(Qo, n, !0);
1477
- let i = zi({
1478
- clientX: e,
1479
- clientY: t
1480
- })?.y;
1481
- b(ts, i != null && Number.isFinite(i) && i >= I(q).plot.y && i <= I(q).plot.y + I(q).plot.h ? i : null, !0);
1482
- let a = I(K).categories[n] ?? "", o = es(n), s, c, l = I(Do) && I(K).series.some((e) => e.label === I(Do)) ? I(Do) : null;
1483
- if (l) s = l, c = I(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
- b(yo, a && a.distance <= 18 ? a.label : null, !0), y() === "single" && a && r && (s = a.label, c = I(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 && !I(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 (I(Do)) {
1511
- let e = I(K).series.find((e) => e.label === I(Do))?.values[t];
1512
- b(Oo, V(I(B).seriesAtCategory, {
1513
- series: I(Do),
1514
- value: Number.isFinite(e) ? li(I(Do))(e) : I(B).noValue,
1515
- category: r
1516
- }), !0);
1517
- } else b(Oo, `${r}: ${es(t).map((e) => `${e.label ?? ""} ${e.value}`).join(", ")}`);
1518
- }
1519
- function Q() {
1520
- I(Zo) || (b(Qo, null), b(ts, null), b(yo, null), b(Xo, null), So(null), f.syncGroup && !I(Ei) && I(Ti)?.hover?.from === Ci && Me(f.syncGroup, null));
1521
- }
1522
- fe(() => {
1523
- if (!I(Ti)) return;
1524
- let e = I(Ti).hover;
1525
- de(() => {
1526
- if (!e) {
1527
- I(Ei) && (b(Ei, !1), b(Qo, null), b(Xo, null));
1528
- return;
1529
- }
1530
- if (e.from === Ci) return;
1531
- let t = I(K).categories.indexOf(e.label);
1532
- if (t < 0 && e.time != null && (t = ke(I(K).categories, e.time)), t < 0 || !I(Fi) || !I(Ya)) return;
1533
- b(Ei, !0);
1534
- let n = I(Fi).getBoundingClientRect(), r = n.width / I(q).width, i = n.height / I(q).height, a = I(Ya).xOf(t);
1535
- ss(n.left + a * r, n.top + (I(q).plot.y + 12) * i, t), b(Ei, !0);
1536
- });
1537
- }), fe(() => {
1538
- if (!I(Ti)) return;
1539
- let e = I(Ti).zoom;
1540
- de(() => {
1541
- if (!e || e.from === Ci) return;
1542
- let t = I(H).categories.length, n = e.window;
1543
- if (n && e.count !== t) {
1544
- if (!e.labels) return;
1545
- let r = ke(I(H).categories, Date.parse(e.labels[0])), i = ke(I(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
- b(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 = I(K).series.find((e) => e.label === r.series && e.overlay), o = a?.overlay ? I(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(I(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
- b(yo, I($a) || I(H).type === "sunburst" || I(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
- b(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
- b(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
- b(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 (I(Ji)) return;
1665
- Ce() && "clientX" in e && !I(oi) && (I(Zo) && I(Zo).index === t ? fa() : (b(Zo, null), ss(e.clientX, e.clientY, t, e.currentTarget), pa(t)));
1666
- let n = I(K).categories[t] ?? "";
1667
- if (!I(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 = I(Do) ?? i?.label ?? (I(K).series.length === 1 ? I(K).series[0].label : "");
1672
- ys(n, a, I(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), I(oi) && f.onAnnotate && r !== void 0) {
1676
- let i = t ? n : I(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 I(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 = I(K).categories.length - 1, r = e.currentTarget;
1711
- if (Ds(e, t)) return;
1712
- let i = I(co) ? "ArrowDown" : "ArrowRight", a = I(co) ? "ArrowUp" : "ArrowLeft", o = I(co) ? "ArrowRight" : "ArrowUp", s = I(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 = I(K).series.map((e) => e.label);
1724
- if (!n.length) return;
1725
- let i = (I(Do) ? n.indexOf(I(Do)) : -1) + (e.key === s ? 1 : -1);
1726
- b(Do, i < 0 || i >= n.length ? null : n[i], !0), b(pi, I(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 && !I(X)) return;
1744
- e.preventDefault(), vs(e, t);
1745
- return;
1746
- case "Escape":
1747
- I(Do) && (b(Do, null), b(pi, null), cs(r, t));
1748
- return;
1749
- }
1750
- }
1751
- let Ss = p(pe({
1752
- sel: "",
1753
- i: 0
1754
- })), Cs = (e, t) => v() ? (I(Ss).sel === e ? I(Ss).i : 0) === t ? 0 : -1 : void 0;
1755
- function ws(e, t) {
1756
- (I(Ss).sel !== e || I(Ss).i !== t) && b(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 && (b(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 (!I(ri) || !I(J)) return !1;
1812
- let n = I(H).categories.length, r = (L()?.i0 ?? 0) + t, i, a = I(co) ? "ArrowDown" : "ArrowRight", o = I(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 ae().then(() => {
1824
- let e = I(Fi)?.querySelector(I(uo) ? "[data-dense=\"true\"]" : `[data-cat-index="${s}"]`);
1825
- e && (e.focus?.(), I(uo) && b(_o, s, !0), cs(e, s));
1826
- }), !0;
1827
- }
1828
- function Os(e) {
1829
- let t = I(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 = p("idle"), As = p(null), js = p(null), Ms = p(null), Ns = () => I(Ms) ?? import("./chart-export-pdf-D9OfzqwS.js").then((e) => b(Ms, e, !0)), Ps = p(!1);
1875
- function Fs(e) {
1876
- if (!R()) return;
1877
- e.preventDefault();
1878
- let t = I(J) && !I(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: I(K).categories[n],
1884
- index: (L() ? L().i0 : 0) + n,
1885
- ...I(Do) ? {
1886
- series: I(Do),
1887
- value: I(K).series.find((e) => e.label === I(Do))?.values[n]
1888
- } : {}
1889
- }, i = () => b(As, {
1890
- x: e,
1891
- y: t,
1892
- target: r
1893
- }, !0);
1894
- Ns(), I(js) ? i() : import("./SvChartMenu-CFlDiKdq.js").then((e) => {
1895
- b(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 = M(() => {
1905
- if (!I(As)) return [];
1906
- let e = [
1907
- {
1908
- label: I(B).downloadPng,
1909
- onSelect: () => {
1910
- Vs("png");
1911
- }
1912
- },
1913
- {
1914
- label: I(B).downloadSvg,
1915
- onSelect: () => {
1916
- Vs("svg");
1917
- }
1918
- },
1919
- Hs() ? {
1920
- label: Hs(),
1921
- disabled: !0
1922
- } : {
1923
- label: I(B).downloadPdf,
1924
- onSelect: () => {
1925
- Us();
1926
- }
1927
- },
1928
- ...Ze(I(H)) ? [{
1929
- label: I(B).downloadCsv,
1930
- onSelect: () => {
1931
- Qe(I(H));
1932
- }
1933
- }] : [],
1934
- {
1935
- label: I(B).copyAsImage,
1936
- onSelect: () => {
1937
- Gs();
1938
- }
1939
- },
1940
- {
1941
- label: I(B).print,
1942
- onSelect: () => {
1943
- Ws();
1944
- }
1945
- },
1946
- ...Be() && I(Xe) ? [{
1947
- label: I(B).describeChart,
1948
- onSelect: () => {
1949
- $e();
1950
- }
1951
- }] : []
1952
- ];
1953
- we() && I(xi) && e.push({ separator: !0 }, {
1954
- label: I(B).resetZoom,
1955
- onSelect: Oi
1956
- }), I(jo) && e.push({ separator: !0 }, {
1957
- label: I(B).range,
1958
- children: I(Ao).map((e) => ({
1959
- label: Mo(e),
1960
- onSelect: () => No(e)
1961
- }))
1962
- }), I(Po) && I(ko).length > 1 && e.push({ separator: !0 }, {
1963
- label: I(B).series,
1964
- children: I(ko).map((e) => ({
1965
- label: `${e.off ? " " : "✓"} ${e.label}`,
1966
- onSelect: () => Bo(e.label)
1967
- }))
1968
- });
1969
- let t = typeof R() == "function" ? R()(I(As).target) : Array.isArray(R()) ? R() : [];
1970
- return t.length && e.push({ separator: !0 }, ...t), e;
1971
- });
1972
- function zs() {
1973
- if (!I(Fi)) return null;
1974
- let e = I(Fi).cloneNode(!0);
1975
- e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.removeAttribute("class");
1976
- let t = I(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), I(Jo) && typeof getComputedStyle == "function") {
1986
- let t = getComputedStyle(I(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 = I(Fi)?.getBoundingClientRect(), r = Math.max(1, Math.round(n?.width ?? I(q).width)), i = Math.max(1, Math.round(n?.height ?? I(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 = I(Ms)?.pdfUndrawable(I(H).title, I(H).subtitle, I(H).caption);
2030
- return e ? V(I(B).pdfCannotDraw, { text: e }) : "";
2031
- };
2032
- async function Us() {
2033
- if (!I(Jo)) return;
2034
- let e = await Ns(), t = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
2035
- Hs() ? (b(Oo, Hs(), !0), b(Ps, !0)) : await e.downloadChartPdf(I(Jo), `chart-${t}.pdf`, {
2036
- title: I(H).title,
2037
- subtitle: I(H).subtitle,
2038
- caption: I(H).caption
2039
- });
2040
- }
2041
- async function Ws() {
2042
- I(Jo) && (await Ns()).printChart(I(Jo), { title: I(H).title });
2043
- }
2044
- async function Gs() {
2045
- let e = zs();
2046
- if (!e) {
2047
- b(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), b(ks, "ok");
2055
- } catch {
2056
- b(ks, "err");
2057
- }
2058
- setTimeout(() => b(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 = A(t), r = T(n, !0), i = w(n, 2);
2068
- P(i, 17, Ie, S, (e, t, n) => {
2069
- var r = rt(), i = w(g(r), 2), a = (e) => {
2070
- var n = tt(), r = T(n, !0);
2071
- C(() => O(r, I(t))), m(e, n);
2072
- }, o = (e) => {
2073
- var r = nt(), i = T(r, !0);
2074
- C(() => O(i, I(t))), _("click", r, () => Fa(Ie().slice(0, n + 1))), m(e, r);
2075
- };
2076
- h(i, (e) => {
2077
- n === Ie().length - 1 ? e(a) : e(o, -1);
2078
- }), m(e, r);
2079
- }), j(t), C(() => {
2080
- E(t, "aria-label", I(B).drillPath), O(r, I(Oa)?.name || I(B).drillRoot);
2081
- }), _("click", n, () => Fa([])), m(e, t);
2082
- };
2083
- var Ys = A(qs), Xs = (t) => {
2084
- var n = pt(), r = A(n), i = (t) => {
2085
- e(t);
2086
- };
2087
- h(r, (e) => {
2088
- I(ka) && Ie().length && e(i);
2089
- });
2090
- var a = w(r, 2), o = (e) => {
2091
- var t = ot();
2092
- P(t, 21, () => I(Ao), (e) => Mo(e), (e, t) => {
2093
- var n = at(), r = T(n, !0);
2094
- C((e, t) => {
2095
- E(n, "title", e), O(r, t);
2096
- }, [() => V(I(B).showLast, { preset: Mo(I(t)) }), () => Mo(I(t))]), _("click", n, () => No(I(t))), m(e, n);
2097
- }), j(t), C(() => E(t, "aria-label", I(B).dateRange)), m(e, t);
2098
- };
2099
- h(a, (e) => {
2100
- I(jo) && e(o);
2101
- });
2102
- var s = w(a, 2), c = (e) => {
2103
- var t = st();
2104
- let n;
2105
- var r = w(A(t));
2106
- j(t), C(() => {
2107
- n = F(t, 1, "sv-grid-chart-tool svelte-kvdein", null, n, { "is-on": I(ii) }), E(t, "aria-pressed", I(ii)), E(t, "title", I(B).panTitle), O(r, ` ${I(B).pan ?? ""}`);
2108
- }), _("click", t, () => b(ii, !I(ii))), m(e, t);
2109
- };
2110
- h(s, (e) => {
2111
- I(ri) && (I(ri).pan === "mode" || I(ri).pan === !0) && I(xi) && e(c);
2112
- });
2113
- var l = w(s, 2), u = (e) => {
2114
- var t = ct(), n = w(A(t));
2115
- j(t), C(() => {
2116
- E(t, "title", I(B).resetZoomTitle), O(n, ` ${I(B).resetZoom ?? ""}`);
2117
- }), _("click", t, Oi), m(e, t);
2118
- };
2119
- h(l, (e) => {
2120
- we() && I(xi) && e(u);
2121
- });
2122
- var d = w(l, 2), ee = (e) => {
2123
- var t = lt();
2124
- let n;
2125
- var r = w(A(t));
2126
- j(t), C(() => {
2127
- n = F(t, 1, "sv-grid-chart-tool svelte-kvdein", null, n, { "is-on": I(oi) }), E(t, "aria-pressed", I(oi)), E(t, "title", I(oi) ? I(B).annotateOnTitle : I(B).annotateOffTitle), O(r, ` ${I(B).annotate ?? ""}`);
2128
- }), _("click", t, () => b(oi, !I(oi))), m(e, t);
2129
- };
2130
- h(d, (e) => {
2131
- Je() && e(ee);
2132
- });
2133
- var te = w(d, 2), ne = (e) => {
2134
- var t = ft(), n = A(t);
2135
- P(n, 16, () => I(qi), (e) => e, (e, t) => {
2136
- var n = ut();
2137
- let r;
2138
- var i = T(n, !0);
2139
- C((e) => {
2140
- r = F(n, 1, "sv-grid-chart-tool sv-grid-chart-drawtool svelte-kvdein", null, r, { "is-on": I(Ji) === t }), E(n, "aria-pressed", I(Ji) === t), E(n, "title", e), O(i, I(Ki)[t]);
2141
- }, [() => V(I(B).draw, { tool: I(Ki)[t] })]), _("click", n, () => oa(t)), m(e, n);
2142
- });
2143
- var r = w(n, 2), i = (e) => {
2144
- var t = dt(), n = g(t), r = T(n, !0), i = w(n, 2), a = T(i, !0);
2145
- C(() => {
2146
- n.disabled = !I(Xi), E(n, "title", I(B).deleteDrawingTitle), O(r, I(B).deleteDrawing), E(i, "title", I(B).clearDrawingsTitle), O(a, I(B).clearDrawings);
2147
- }), _("click", n, () => I(Xi) && la(I(Xi))), _("click", i, () => aa([])), m(e, t);
2148
- }, a = M(() => na().length);
2149
- h(r, (e) => {
2150
- I(a) && e(i);
2151
- }), j(t), C(() => E(t, "aria-label", I(B).drawingTools)), m(e, t);
2152
- };
2153
- h(te, (e) => {
2154
- I(qi).length && I(J) && e(ne);
2155
- });
2156
- var re = w(te, 2), ie = T(re, !0), f = w(re, 2), p = T(f, !0), ae = w(f, 2), oe = T(ae, !0), se = w(ae, 2), ce = T(se, !0), le = w(se, 2), v = T(le, !0);
2157
- j(n), C((e, t, n) => {
2158
- E(re, "title", I(B).downloadPng), O(ie, I(B).png), E(f, "title", I(B).downloadSvg), O(p, I(B).svg), E(ae, "aria-disabled", e), E(ae, "title", t), O(oe, n), E(se, "title", I(B).printTitle), O(ce, I(B).print), E(le, "title", I(B).copyTitle), O(v, I(ks) === "ok" ? I(B).copied : I(B).copy);
2159
- }, [
2160
- () => !!Hs(),
2161
- () => Hs() || I(B).downloadPdf,
2162
- () => I(Ps) && Hs() || I(B).pdf
2163
- ]), _("click", re, () => Vs("png")), _("click", f, () => Vs("svg")), _("click", ae, Us), x("pointerenter", ae, Ns), x("focus", ae, Ns), _("click", se, Ws), _("click", le, Gs), ve(n, "clientHeight", (e) => b(Yr, e)), m(t, n);
2164
- }, Zs = (t) => {
2165
- var n = mt(), r = A(n);
2166
- e(r), j(n), ve(n, "clientHeight", (e) => b(Yr, e)), m(t, n);
2167
- };
2168
- h(Ys, (e) => {
2169
- I(ai) ? e(Xs) : I(ka) && Ie().length && e(Zs, 1);
2170
- });
2171
- var $ = w(Ys, 2);
2172
- let t, n;
2173
- var Qs = A($), $s = (e) => {
2174
- var t = xt(), n = A(t), r = (e) => {
2175
- var t = ht(), n = A(t);
2176
- let r;
2177
- j(t), C(() => {
2178
- E(t, "id", `${hi}-plot`), E(n, "x", I(q).plot.x - 4), E(n, "y", I(q).plot.y - 4), E(n, "width", I(q).plot.w + 8), E(n, "height", I(q).plot.h + 8), r = F(n, 0, "svelte-kvdein", null, r, { "sv-grid-chart-wipe": I(Wa) === "wipe" });
2179
- }), m(e, t);
2180
- };
2181
- h(n, (e) => {
2182
- I(J) && e(r);
2183
- });
2184
- var i = w(n);
2185
- P(i, 17, () => I(Ga), (e) => e.id, (e, t) => {
2186
- var n = gt(), r = A(n), i = w(r);
2187
- j(n), C(() => {
2188
- E(n, "id", I(t).id), E(r, "stop-color", I(t).from), E(i, "stop-color", I(t).to === "transparent" ? I(t).from : I(t).to), E(i, "stop-opacity", I(t).to === "transparent" ? 0 : 1);
2189
- }), m(e, n);
2190
- });
2191
- var a = w(i);
2192
- P(a, 17, () => I(yi), (e) => e.id, (e, t) => {
2193
- var n = D(), r = g(n), i = (e) => {
2194
- var n = _t(), r = A(n);
2195
- ye(), j(n), C(() => {
2196
- E(n, "id", I(t).id), E(r, "fill", I(t).color);
2197
- }), m(e, n);
2198
- }, a = (e) => {
2199
- var n = vt(), r = A(n);
2200
- ye(), j(n), C(() => {
2201
- E(n, "id", I(t).id), E(r, "fill", I(t).color);
2202
- }), m(e, n);
2203
- }, o = (e) => {
2204
- var n = yt(), r = A(n);
2205
- ye(), j(n), C(() => {
2206
- E(n, "id", I(t).id), E(r, "fill", I(t).color);
2207
- }), m(e, n);
2208
- }, s = (e) => {
2209
- var n = bt(), r = A(n);
2210
- ye(), j(n), C(() => {
2211
- E(n, "id", I(t).id), E(r, "fill", I(t).color);
2212
- }), m(e, n);
2213
- };
2214
- h(r, (e) => {
2215
- I(t).kind === "stripe" ? e(i) : I(t).kind === "crosshatch" ? e(a, 1) : I(t).kind === "dots" ? e(o, 2) : I(t).kind === "diagonal" && e(s, 3);
2216
- }), m(e, n);
2217
- }), j(t), m(e, t);
2218
- };
2219
- h(Qs, (e) => {
2220
- (I(yi).length || I(Ga).length || I(J)) && e($s);
2221
- });
2222
- var ec = w(Qs), tc = (e) => {
2223
- var t = St(), n = T(t, !0);
2224
- C(() => {
2225
- E(t, "x", I(q).frame.title.x), E(t, "y", I(q).frame.title.y), O(n, I(q).frame.title.text);
2226
- }), m(e, t);
2227
- };
2228
- h(ec, (e) => {
2229
- I(q).frame.title && e(tc);
2230
- });
2231
- var nc = w(ec), rc = (e) => {
2232
- var t = Ct(), n = T(t, !0);
2233
- C(() => {
2234
- E(t, "x", I(q).frame.subtitle.x), E(t, "y", I(q).frame.subtitle.y), O(n, I(q).frame.subtitle.text);
2235
- }), m(e, t);
2236
- };
2237
- h(nc, (e) => {
2238
- I(q).frame.subtitle && e(rc);
2239
- });
2240
- var ic = w(nc), ac = (e) => {
2241
- var t = wt(), n = T(t, !0);
2242
- C(() => {
2243
- E(t, "x", I(q).frame.caption.x), E(t, "y", I(q).frame.caption.y), O(n, I(q).frame.caption.text);
2244
- }), m(e, t);
2245
- };
2246
- h(ic, (e) => {
2247
- I(q).frame.caption && e(ac);
2248
- });
2249
- var oc = w(ic), sc = (e) => {
2250
- var t = kt(), n = g(t);
2251
- P(n, 17, () => I(q).valueTicks, (e) => e.label + e.x, (e, t, n, r) => {
2252
- var i = Et(), a = g(i), o = (e) => {
2253
- var n = Tt();
2254
- C(() => {
2255
- E(n, "x1", I(t).x), E(n, "y1", I(q).plot.y), E(n, "x2", I(t).x), E(n, "y2", I(q).plot.y + I(q).plot.h);
2256
- }), m(e, n);
2257
- };
2258
- h(a, (e) => {
2259
- I(q).grid.x && e(o);
2260
- });
2261
- var s = w(a), c = T(s, !0);
2262
- C(() => {
2263
- E(s, "x", I(t).x), E(s, "y", I(q).plot.y + I(q).plot.h + 14), O(c, I(t).label);
2264
- }), m(e, i);
2265
- });
2266
- var r = w(n), i = (e) => {
2267
- var t = D(), n = g(t);
2268
- P(n, 17, () => I(q).catTicks, (e) => e.value, (e, t, n, r) => {
2269
- var i = Tt();
2270
- C(() => {
2271
- E(i, "x1", I(q).plot.x), E(i, "y1", I(t).y), E(i, "x2", I(q).plot.x + I(q).plot.w), E(i, "y2", I(t).y);
2272
- }), m(e, i);
2273
- }), m(e, t);
2274
- };
2275
- h(r, (e) => {
2276
- I(q).grid.y && e(i);
2277
- });
2278
- var a = w(r);
2279
- P(a, 17, () => I(q).catTicks, (e) => e.value, (e, t, n, r) => {
2280
- var i = Dt(), a = T(i, !0);
2281
- C((e) => {
2282
- E(i, "x", I(q).plot.x - 6), E(i, "y", I(t).y + 3), O(a, e);
2283
- }, [() => Ko(I(t).label, 18)]), m(e, i);
2284
- });
2285
- var o = w(a), s = (e) => {
2286
- var t = Ot();
2287
- E(t, "x", 13);
2288
- var n = T(t, !0);
2289
- C(() => {
2290
- E(t, "y", I(q).plot.y + I(q).plot.h / 2), E(t, "transform", `rotate(-90 13 ${I(q).plot.y + I(q).plot.h / 2})`), O(n, I(Ka));
2291
- }), m(e, t);
2292
- };
2293
- h(o, (e) => {
2294
- I(Ka) && e(s);
2295
- });
2296
- var c = w(o), l = (e) => {
2297
- var t = Ot(), n = T(t, !0);
2298
- C(() => {
2299
- E(t, "x", I(q).plot.x + I(q).plot.w / 2), E(t, "y", I(q).height - 3 - I(q).frame.bottom), O(n, I(Ja));
2300
- }), m(e, t);
2301
- };
2302
- h(c, (e) => {
2303
- I(Ja) && e(l);
2304
- }), m(e, t);
2305
- }, cc = (e) => {
2306
- var t = Lt(), n = g(t);
2307
- P(n, 17, () => I(q).yTicks, (e) => e.value, (e, t, n, r) => {
2308
- var i = jt(), a = g(i), o = (e) => {
2309
- var n = At();
2310
- let r;
2311
- C(() => {
2312
- r = F(n, 0, "sv-grid-chart-gridline svelte-kvdein", null, r, { "is-zero": I(t).value === 0 }), E(n, "x1", I(q).plot.x), E(n, "y1", I(t).y), E(n, "x2", I(q).plot.x + I(q).plot.w), E(n, "y2", I(t).y);
2313
- }), m(e, n);
2314
- };
2315
- h(a, (e) => {
2316
- (I(q).grid.y || I(t).value === 0) && e(o);
2317
- });
2318
- var s = w(a), c = (e) => {
2319
- var n = Dt(), r = T(n, !0);
2320
- C((e) => {
2321
- E(n, "x", I(q).plot.x - 6), E(n, "y", I(t).y + 3), O(r, e);
2322
- }, [() => qo(I(t).value, I(t).label)]), m(e, n);
2323
- };
2324
- h(s, (e) => {
2325
- I(t).label && e(c);
2326
- }), m(e, i);
2327
- });
2328
- var r = w(n), i = (e) => {
2329
- var t = D(), n = g(t);
2330
- P(n, 17, () => I(q).xTicks, (e) => e.label + e.x, (e, t, n, r) => {
2331
- var i = Tt();
2332
- C(() => {
2333
- E(i, "x1", I(t).x), E(i, "y1", I(q).plot.y), E(i, "x2", I(t).x), E(i, "y2", I(q).plot.y + I(q).plot.h);
2334
- }), m(e, i);
2335
- }), m(e, t);
2336
- };
2337
- h(r, (e) => {
2338
- I(q).grid.x && e(i);
2339
- });
2340
- var a = w(r), o = (e) => {
2341
- var t = D(), n = g(t);
2342
- P(n, 17, () => I(q).y2Ticks, (e) => e.value, (e, t, n, r) => {
2343
- var i = D(), a = g(i), o = (e) => {
2344
- var n = Mt(), r = T(n, !0);
2345
- C((e) => {
2346
- E(n, "x", I(q).plot.x + I(q).plot.w + 6), E(n, "y", I(t).y + 3), O(r, e);
2347
- }, [() => qo(I(t).value, I(t).label)]), m(e, n);
2348
- };
2349
- h(a, (e) => {
2350
- I(t).label && e(o);
2351
- }), m(e, i);
2352
- }), m(e, t);
2353
- };
2354
- h(a, (e) => {
2355
- I(q).hasRightAxis && e(o);
2356
- });
2357
- var s = w(a);
2358
- P(s, 17, () => I(q).xTicks, (e) => e.label + e.x, (e, t, n, r) => {
2359
- var i = D(), a = g(i), o = (e) => {}, s = (e) => {
2360
- var n = Nt(), r = T(n, !0);
2361
- C((e) => {
2362
- E(n, "x", I(t).x), E(n, "y", I(q).plot.y + I(q).plot.h + 12), E(n, "text-anchor", I(q).xLabelAngle < 0 ? "end" : "start"), E(n, "transform", `rotate(${I(q).xLabelAngle} ${I(t).x} ${I(q).plot.y + I(q).plot.h + 12})`), O(r, e);
2363
- }, [() => Ko(I(t).label, Math.abs(I(q).xLabelAngle) >= 60 ? 18 : 12)]), m(e, n);
2364
- }, c = (e) => {
2365
- var n = Pt(), r = T(n, !0);
2366
- C((e) => {
2367
- E(n, "x", I(t).x), E(n, "y", I(q).plot.y + I(q).plot.h + 16), O(r, e);
2368
- }, [() => Ko(I(t).label, 16)]), m(e, n);
2369
- };
2370
- h(a, (e) => {
2371
- I(t).label ? I(q).xLabelRotated ? e(s, 1) : e(c, -1) : e(o);
2372
- }), m(e, i);
2373
- });
2374
- var c = w(s);
2375
- P(c, 17, () => I(q).categoryGroupTicks, (e) => e.label + e.x0, (e, t) => {
2376
- let n = M(() => I(q).plot.y + I(q).plot.h + (I(q).xLabelRotated ? 46 : 32));
2377
- var r = It(), i = g(r), a = w(i), o = (e) => {
2378
- var r = Ft();
2379
- C(() => {
2380
- E(r, "x1", I(t).x0), E(r, "y1", I(q).plot.y + I(q).plot.h), E(r, "x2", I(t).x0), E(r, "y2", I(n) - 9);
2381
- }), m(e, r);
2382
- };
2383
- h(a, (e) => {
2384
- I(t).x0 > I(q).plot.x + 1 && e(o);
2385
- });
2386
- var s = w(a), c = T(s, !0);
2387
- C((e) => {
2388
- E(i, "x1", I(t).x0 + 3), E(i, "y1", I(n) - 9), E(i, "x2", I(t).x1 - 3), E(i, "y2", I(n) - 9), E(s, "x", I(t).xCenter), E(s, "y", I(n)), O(c, e);
2389
- }, [() => Ko(I(t).label, Math.max(4, Math.floor((I(t).x1 - I(t).x0) / 7)))]), m(e, r);
2390
- });
2391
- var l = w(c), u = (e) => {
2392
- var t = Ot();
2393
- E(t, "x", 13);
2394
- var n = T(t, !0);
2395
- C(() => {
2396
- E(t, "y", I(q).plot.y + I(q).plot.h / 2), E(t, "transform", `rotate(-90 13 ${I(q).plot.y + I(q).plot.h / 2})`), O(n, I(Ka));
2397
- }), m(e, t);
2398
- };
2399
- h(l, (e) => {
2400
- I(Ka) && e(u);
2401
- });
2402
- var d = w(l), ee = (e) => {
2403
- var t = Ot(), n = T(t, !0);
2404
- C(() => {
2405
- E(t, "x", I(q).width - 12), E(t, "y", I(q).plot.y + I(q).plot.h / 2), E(t, "transform", `rotate(90 ${I(q).width - 12} ${I(q).plot.y + I(q).plot.h / 2})`), O(n, I(qa));
2406
- }), m(e, t);
2407
- };
2408
- h(d, (e) => {
2409
- I(qa) && e(ee);
2410
- });
2411
- var te = w(d), ne = (e) => {
2412
- var t = Ot(), n = T(t, !0);
2413
- C(() => {
2414
- E(t, "x", I(q).plot.x + I(q).plot.w / 2), E(t, "y", I(q).height - 3 - I(q).frame.bottom), O(n, I(Ja));
2415
- }), m(e, t);
2416
- };
2417
- h(te, (e) => {
2418
- I(Ja) && e(ne);
2419
- }), m(e, t);
2420
- };
2421
- h(oc, (e) => {
2422
- I(co) ? e(sc) : I(J) && e(cc, 1);
2423
- });
2424
- var lc = w(oc);
2425
- P(lc, 17, () => I(q).referenceBands, S, (e, t) => {
2426
- var n = Bt(), r = g(n), i = w(r), a = (e) => {
2427
- var n = D(), r = g(n), i = (e) => {
2428
- var n = Rt(), r = T(n, !0);
2429
- C(() => {
2430
- E(n, "x", I(t).x + I(t).w - 3), E(n, "y", I(t).y + 10), E(n, "fill", I(t).color), O(r, I(t).label);
2431
- }), m(e, n);
2432
- }, a = (e) => {
2433
- var n = zt(), r = T(n, !0);
2434
- C(() => {
2435
- E(n, "x", I(t).x + I(t).w / 2), E(n, "y", I(t).y + 10), E(n, "fill", I(t).color), O(r, I(t).label);
2436
- }), m(e, n);
2437
- };
2438
- h(r, (e) => {
2439
- I(t).axis === "y" ? e(i) : e(a, -1);
2440
- }), m(e, n);
2441
- };
2442
- h(i, (e) => {
2443
- I(t).label && e(a);
2444
- }), C(() => {
2445
- E(r, "x", I(t).x), E(r, "y", I(t).y), E(r, "width", I(t).w), E(r, "height", I(t).h), E(r, "fill", I(t).color), E(r, "fill-opacity", I(t).opacity);
2446
- }), m(e, n);
2447
- });
2448
- var uc = w(lc);
2449
- let r;
2450
- var dc = A(uc);
2451
- P(dc, 19, () => I(q).lines, (e, t) => e.label + t, (e, t, n) => {
2452
- let r = M(() => I(t).style?.gradient ? `${hi}-grad-${I(n)}` : null);
2453
- var i = qt(), a = A(i), o = (e) => {
2454
- var n = Vt();
2455
- C(() => {
2456
- E(n, "d", I(t).bandPath), E(n, "fill", I(t).color);
2457
- }), m(e, n);
2458
- };
2459
- h(a, (e) => {
2460
- I(t).bandPath && e(o);
2461
- });
2462
- var s = w(a), c = (e) => {
2463
- var n = Ht();
2464
- C(() => {
2465
- E(n, "d", I(t).areaPath), E(n, "fill", I(r) ? `url(#${I(r)})` : I(vi)[I(t).label] ?? I(t).color), E(n, "fill-opacity", I(r) ? .6 : I(t).range ? .35 : .15);
2466
- }), m(e, n);
2467
- };
2468
- h(s, (e) => {
2469
- I(t).areaPath && e(c);
2470
- });
2471
- var l = w(s), u = w(l), d = (e) => {
2472
- let n = M(() => I(t).points[I(Qo) ?? -1]);
2473
- var r = D(), i = g(r), a = (e) => {
2474
- var r = Ut();
2475
- C(() => {
2476
- E(r, "cx", I(n).x), E(r, "cy", I(n).y), E(r, "fill", I(n).marker?.color ?? I(t).color);
2477
- }), m(e, r);
2478
- };
2479
- h(i, (e) => {
2480
- I(n)?.defined && e(a);
2481
- }), m(e, r);
2482
- }, ee = (e) => {
2483
- var n = D(), r = g(n);
2484
- P(r, 17, () => I(t).points, S, (e, n, r) => {
2485
- var i = D(), a = g(i), o = (e) => {
2486
- let i = M(() => I(n).marker?.shape ?? "circle"), a = M(() => (I(n).marker?.size ?? 3) + +(I(Qo) === r)), o = M(() => I(n).marker?.color ?? I(t).color);
2487
- var s = D(), c = g(s), l = (e) => {
2488
- var i = Wt();
2489
- let s;
2490
- C((e, t) => {
2491
- s = F(i, 0, "sv-grid-chart-dot svelte-kvdein", null, s, {
2492
- "is-active": I(Qo) === r,
2493
- "is-selected": e
2494
- }), E(i, "cx", I(n).x), E(i, "cy", I(n).y), E(i, "r", I(a)), E(i, "fill", I(o)), N(i, t);
2495
- }, [() => wo(I(n).label, I(t).label), () => `opacity:${To(I(n).label, I(t).label)}`]), m(e, i);
2496
- }, u = (e) => {
2497
- var t = Gt();
2498
- let s;
2499
- C((e) => {
2500
- s = F(t, 0, "sv-grid-chart-dot is-stroked svelte-kvdein", null, s, { "is-active": I(Qo) === r }), E(t, "d", e), E(t, "stroke", I(o));
2501
- }, [() => ie(I(i), I(n).x, I(n).y, I(a))]), m(e, t);
2502
- }, d = (e) => {
2503
- var t = Kt();
2504
- let s;
2505
- C((e) => {
2506
- s = F(t, 0, "sv-grid-chart-dot svelte-kvdein", null, s, { "is-active": I(Qo) === r }), E(t, "d", e), E(t, "fill", I(o));
2507
- }, [() => ie(I(i), I(n).x, I(n).y, I(a))]), m(e, t);
2508
- };
2509
- h(c, (e) => {
2510
- I(i) === "circle" ? e(l) : I(i) === "cross" ? e(u, 1) : e(d, -1);
2511
- }), m(e, s);
2512
- };
2513
- h(a, (e) => {
2514
- I(n).defined && I(n).marker?.shape !== "none" && e(o);
2515
- }), m(e, i);
2516
- }), m(e, n);
2517
- };
2518
- h(u, (e) => {
2519
- I(uo) ? e(d) : e(ee, -1);
2520
- }), j(i), C((e) => {
2521
- N(i, e), E(l, "d", I(t).path), E(l, "stroke", I(t).color), E(l, "stroke-width", I(t).style?.strokeWidth ?? (I(t).range ? 1 : 2)), E(l, "stroke-dasharray", I(t).style?.dash);
2522
- }, [() => `opacity:${Y(I(t).label) * (I(t).style?.opacity ?? 1)}`]), m(e, i);
2523
- });
2524
- var fc = w(dc), pc = (e) => {
2525
- var t = D(), n = g(t);
2526
- ue(n, () => f.underlay, () => I(Xa)), m(e, t);
2527
- };
2528
- h(fc, (e) => {
2529
- f.underlay && e(pc);
2530
- });
2531
- var mc = w(fc);
2532
- P(mc, 17, () => I(q).bars, S, (e, t) => {
2533
- var n = Jt();
2534
- let r;
2535
- C((e, i, a) => {
2536
- r = F(n, 0, "sv-grid-chart-bar svelte-kvdein", null, r, { "is-selected": e }), E(n, "x", I(t).x), E(n, "y", I(t).y), E(n, "width", I(t).w), E(n, "height", I(t).h), E(n, "fill", i), N(n, a);
2537
- }, [
2538
- () => wo(I(t).label, I(t).series, I(t).index),
2539
- () => I(vi)[I(t).series]?.startsWith("url(") ? I(vi)[I(t).series] : I(t).color,
2540
- () => `opacity:${Y(I(t).series) * (I(t).opacity ?? 1) * To(I(t).label, I(t).series, I(t).index)}`
2541
- ]), _("click", n, function(...e) {
2542
- (I(X) ? (e) => {
2543
- e.stopPropagation(), ys(I(t).label, I(t).series, I(t).value, I(t).index, e);
2544
- } : void 0)?.apply(this, e);
2545
- }), m(e, n);
2546
- });
2547
- var hc = w(mc);
2548
- P(hc, 17, () => I(q).stems, S, (e, t) => {
2549
- var n = Xt(), r = A(n), i = w(r), a = (e) => {
2550
- var n = Yt();
2551
- C(() => {
2552
- E(n, "cx", I(t).xCenter), E(n, "cy", I(t).y0), E(n, "r", I(t).r), E(n, "fill", I(t).color2 ?? I(t).color), E(n, "stroke", I(t).color2 ?? I(t).color);
2553
- }), m(e, n);
2554
- };
2555
- h(i, (e) => {
2556
- I(t).dumbbell && e(a);
2557
- });
2558
- var o = w(i);
2559
- j(n), C((e) => {
2560
- N(n, e), E(r, "x1", I(t).xCenter), E(r, "y1", I(t).y0), E(r, "x2", I(t).xCenter), E(r, "y2", I(t).y1), E(r, "stroke", I(t).dumbbell ? "var(--sg-muted, #94a3b8)" : I(t).color), E(r, "stroke-width", I(t).dumbbell ? 2 : 1.5), E(o, "cx", I(t).xCenter), E(o, "cy", I(t).y1), E(o, "r", I(t).r), E(o, "fill", I(t).color);
2561
- }, [() => `opacity:${Y(I(t).series)}`]), _("mousemove", n, (e) => gs(e.clientX, e.clientY, I(t))), x("mouseleave", n, Q), m(e, n);
2562
- });
2563
- var gc = w(hc);
2564
- P(gc, 17, () => I(q).candles, S, (e, t) => {
2565
- var n = D(), r = g(n), i = (e) => {
2566
- var n = Zt(), r = g(n), i = w(r), a = w(i);
2567
- C((e, n, o) => {
2568
- E(r, "x1", I(t).xCenter), E(r, "y1", I(t).yHigh), E(r, "x2", I(t).xCenter), E(r, "y2", I(t).yLow), E(r, "stroke", I(t).color), N(r, e), E(i, "x1", I(t).x), E(i, "y1", I(t).yOpen), E(i, "x2", I(t).xCenter), E(i, "y2", I(t).yOpen), E(i, "stroke", I(t).color), N(i, n), E(a, "x1", I(t).xCenter), E(a, "y1", I(t).yClose), E(a, "x2", I(t).x + I(t).w), E(a, "y2", I(t).yClose), E(a, "stroke", I(t).color), N(a, o);
2569
- }, [
2570
- () => `opacity:${Y(I(t).series)}`,
2571
- () => `opacity:${Y(I(t).series)}`,
2572
- () => `opacity:${Y(I(t).series)}`
2573
- ]), m(e, n);
2574
- }, a = (e) => {
2575
- var n = Qt(), r = g(n), i = w(r);
2576
- C((e, n) => {
2577
- E(r, "x1", I(t).xCenter), E(r, "y1", I(t).yHigh), E(r, "x2", I(t).xCenter), E(r, "y2", I(t).yLow), E(r, "stroke", I(t).color), N(r, e), E(i, "x", I(t).x), E(i, "y", I(t).bodyY), E(i, "width", I(t).w), E(i, "height", I(t).bodyH), E(i, "fill", I(t).hollow ? "none" : I(t).color), E(i, "stroke", I(t).color), N(i, n);
2578
- }, [() => `opacity:${Y(I(t).series)}`, () => `opacity:${Y(I(t).series)}`]), m(e, n);
2579
- };
2580
- h(r, (e) => {
2581
- I(ga) ? e(i) : e(a, -1);
2582
- }), m(e, n);
2583
- });
2584
- var _c = w(gc);
2585
- P(_c, 17, () => I(q).boxes, S, (e, t) => {
2586
- var n = en(), r = g(n), i = w(r), a = w(i), o = w(a), s = w(o), c = w(s);
2587
- P(c, 17, () => I(t).outliers, S, (e, n) => {
2588
- var r = $t();
2589
- C((e) => {
2590
- E(r, "cx", I(t).xCenter), E(r, "cy", I(n).y), E(r, "stroke", I(t).color), N(r, e);
2591
- }, [() => `opacity:${Y(I(t).series)}`]), m(e, r);
2592
- }), C((e, n, c, l, u) => {
2593
- E(r, "x1", I(t).xCenter), E(r, "y1", I(t).yMax), E(r, "x2", I(t).xCenter), E(r, "y2", I(t).yMin), E(r, "stroke", I(t).color), N(r, e), E(i, "x1", I(t).x + I(t).w * .25), E(i, "y1", I(t).yMax), E(i, "x2", I(t).x + I(t).w * .75), E(i, "y2", I(t).yMax), E(i, "stroke", I(t).color), N(i, n), E(a, "x1", I(t).x + I(t).w * .25), E(a, "y1", I(t).yMin), E(a, "x2", I(t).x + I(t).w * .75), E(a, "y2", I(t).yMin), E(a, "stroke", I(t).color), N(a, c), E(o, "x", I(t).x), E(o, "y", I(t).boxY), E(o, "width", I(t).w), E(o, "height", I(t).boxH), E(o, "fill", I(t).color), E(o, "stroke", I(t).color), N(o, l), E(s, "x1", I(t).x), E(s, "y1", I(t).yMedian), E(s, "x2", I(t).x + I(t).w), E(s, "y2", I(t).yMedian), E(s, "stroke", I(t).color), N(s, u);
2594
- }, [
2595
- () => `opacity:${Y(I(t).series)}`,
2596
- () => `opacity:${Y(I(t).series)}`,
2597
- () => `opacity:${Y(I(t).series)}`,
2598
- () => `opacity:${Y(I(t).series)}`,
2599
- () => `opacity:${Y(I(t).series)}`
2600
- ]), m(e, n);
2601
- });
2602
- var vc = w(_c);
2603
- P(vc, 17, () => I(q).errorBars, S, (e, t) => {
2604
- var n = tn(), r = g(n), i = w(r), a = w(i);
2605
- C((e, n, o) => {
2606
- E(r, "x1", I(t).xCenter), E(r, "y1", I(t).yHi), E(r, "x2", I(t).xCenter), E(r, "y2", I(t).yLo), E(r, "stroke", I(t).color), N(r, e), E(i, "x1", I(t).xCenter - I(t).cap), E(i, "y1", I(t).yHi), E(i, "x2", I(t).xCenter + I(t).cap), E(i, "y2", I(t).yHi), E(i, "stroke", I(t).color), N(i, n), E(a, "x1", I(t).xCenter - I(t).cap), E(a, "y1", I(t).yLo), E(a, "x2", I(t).xCenter + I(t).cap), E(a, "y2", I(t).yLo), E(a, "stroke", I(t).color), N(a, o);
2607
- }, [
2608
- () => `opacity:${Y(I(t).series)}`,
2609
- () => `opacity:${Y(I(t).series)}`,
2610
- () => `opacity:${Y(I(t).series)}`
2611
- ]), m(e, n);
2612
- });
2613
- var yc = w(vc);
2614
- P(yc, 17, () => I(q).scatterPoints, S, (e, t, n) => {
2615
- var r = nn();
2616
- let i;
2617
- C((e, n, a, o) => {
2618
- i = F(r, 0, "sv-grid-chart-scatter svelte-kvdein", null, i, { "is-selected": e }), E(r, "cx", I(t).cx), E(r, "cy", I(t).cy), E(r, "r", I(t).r), E(r, "fill", I(t).color), E(r, "stroke", I(t).color), N(r, n), E(r, "role", I(X) || f.onSelect ? "button" : "img"), E(r, "tabindex", a), E(r, "aria-label", o);
2619
- }, [
2620
- () => wo(I(t).label || I(t).series, I(t).series, n),
2621
- () => `opacity:${Y(I(t).series) * To(I(t).label || I(t).series, I(t).series, n)}`,
2622
- () => Cs(".sv-grid-chart-scatter", n),
2623
- () => `${I(t).label || I(t).series}: ${U(I(t).x)}, ${U(I(t).y)}`
2624
- ]), _("mousemove", r, (e) => us(e.clientX, e.clientY, I(t))), x("mouseleave", r, Q), _("click", r, function(...e) {
2625
- (I(X) || f.onSelect ? (e) => {
2626
- e.stopPropagation(), ys(I(t).label || I(t).series, I(t).series, I(t).y, n, e);
2627
- } : void 0)?.apply(this, e);
2628
- }), x("focus", r, (e) => {
2629
- ws(".sv-grid-chart-scatter", n);
2630
- let r = Es(e.currentTarget);
2631
- us(r.x, r.y, I(t));
2632
- }), x("blur", r, Q), _("keydown", r, (e) => Ts(e, ".sv-grid-chart-scatter", n, I(X) || f.onSelect ? () => ys(I(t).label || I(t).series, I(t).series, I(t).y, n, e) : null)), m(e, r);
2633
- }), j(uc);
2634
- var bc = w(uc);
2635
- P(bc, 17, () => I(q).referenceLines, S, (e, t) => {
2636
- var n = an(), r = g(n), i = w(r), a = (e) => {
2637
- let n = M(() => Math.max(28, I(t).label.length * 6.4 + 10));
2638
- var r = rn(), i = A(r), a = w(i), o = T(a, !0);
2639
- j(r), C(() => {
2640
- E(i, "x", I(q).plot.x + I(q).plot.w - I(n)), E(i, "y", I(t).y - 8), E(i, "width", I(n)), E(i, "fill", I(t).color), E(a, "x", I(q).plot.x + I(q).plot.w - I(n) / 2), E(a, "y", I(t).y + 3.5), O(o, I(t).label);
2641
- }), m(e, r);
2642
- }, o = (e) => {
2643
- var n = Rt(), r = T(n, !0);
2644
- C(() => {
2645
- E(n, "x", I(q).plot.x + I(q).plot.w - 3), E(n, "y", I(t).y - 3), E(n, "fill", I(t).color), O(r, I(t).label);
2646
- }), m(e, n);
2647
- };
2648
- h(i, (e) => {
2649
- I(t).pill ? e(a) : e(o, -1);
2650
- }), C(() => {
2651
- E(r, "x1", I(q).plot.x), E(r, "y1", I(t).y), E(r, "x2", I(q).plot.x + I(q).plot.w), E(r, "y2", I(t).y), E(r, "stroke", I(t).color), E(r, "stroke-dasharray", I(t).dashed ? "5 4" : void 0);
2652
- }), m(e, n);
2653
- });
2654
- var xc = w(bc);
2655
- P(xc, 17, () => I(q).referenceLinesV, S, (e, t) => {
2656
- var n = on(), r = g(n), i = w(r), a = T(i, !0);
2657
- C(() => {
2658
- E(r, "x1", I(t).x), E(r, "y1", I(q).plot.y), E(r, "x2", I(t).x), E(r, "y2", I(q).plot.y + I(q).plot.h), E(r, "stroke", I(t).color), E(r, "stroke-dasharray", I(t).dashed ? "5 4" : void 0), E(i, "x", I(t).x + 3), E(i, "y", I(q).plot.y + 9), E(i, "fill", I(t).color), O(a, I(t).label);
2659
- }), m(e, n);
2660
- });
2661
- var Sc = w(xc);
2662
- let i;
2663
- P(Sc, 23, () => I(q).overlays, (e, t) => e.label + t, (e, t) => {
2664
- var n = cn(), r = g(n), i = (e) => {
2665
- var n = sn();
2666
- C(() => {
2667
- E(n, "d", I(t).bandPath), E(n, "fill", I(t).color), E(n, "stroke", I(t).color);
2668
- }), m(e, n);
2669
- };
2670
- h(r, (e) => {
2671
- I(t).bandPath && e(i);
2672
- });
2673
- var a = w(r);
2674
- C(() => {
2675
- E(a, "d", I(t).path), E(a, "stroke", I(t).color);
2676
- }), m(e, n);
2677
- }), j(Sc);
2678
- var Cc = w(Sc);
2679
- P(Cc, 17, () => I(po), S, (e, t) => {
2680
- var n = un(), r = g(n), i = (e) => {
2681
- var n = ln();
2682
- C((e) => {
2683
- E(n, "x1", I(t).leader.x1), E(n, "y1", I(t).leader.y1), E(n, "x2", I(t).leader.x2), E(n, "y2", I(t).leader.y2), N(n, e);
2684
- }, [() => `opacity:${Y(I(t).series)}`]), m(e, n);
2685
- };
2686
- h(r, (e) => {
2687
- I(t).leader && e(i);
2688
- });
2689
- var a = w(r);
2690
- let o;
2691
- var s = T(a, !0);
2692
- C((e) => {
2693
- o = F(a, 0, "sv-grid-chart-datalabel svelte-kvdein", null, o, { "on-bar": I(t).onBar }), E(a, "x", I(t).x), E(a, "y", I(t).y), E(a, "text-anchor", I(t).anchor), E(a, "transform", I(t).angle ? `rotate(${I(t).angle} ${I(t).x} ${I(t).y})` : void 0), N(a, e), O(s, I(t).text);
2694
- }, [() => `opacity:${Y(I(t).series)}`]), m(e, n);
2695
- });
2696
- var wc = w(Cc);
2697
- P(wc, 17, () => I(q).seriesLabels, (e) => e.series, (e, t) => {
2698
- var n = dn(), r = T(n, !0);
2699
- C((e) => {
2700
- E(n, "x", I(t).x), E(n, "y", I(t).y + 3.5), E(n, "fill", I(t).color), N(n, e), O(r, I(t).text);
2701
- }, [() => `opacity:${Y(I(t).series)}`]), m(e, n);
2702
- });
2703
- var Tc = w(wc), Ec = (e) => {
2704
- var t = D(), n = g(t);
2705
- ue(n, () => f.overlay, () => I(Xa)), m(e, t);
2706
- };
2707
- h(Tc, (e) => {
2708
- f.overlay && e(Ec);
2709
- });
2710
- var Dc = w(Tc);
2711
- P(Dc, 19, () => I(q).annotations, (e, t) => e.label + t, (e, t, n) => {
2712
- let r = M(() => I(t).placement === "left" ? -8 : I(t).placement === "right" ? 8 : 0), i = M(() => I(t).placement === "bottom" ? 14 : I(t).placement === "top" ? -8 : 0), a = M(() => I(t).placement === "left" ? "end" : I(t).placement === "right" ? "start" : "middle"), o = M(() => I(oi) && !!f.onAnnotationRemove), s = M(() => Math.max(14, I(t).label.length * 6.2 + 8));
2713
- var c = gn();
2714
- let l;
2715
- var u = A(c), d = (e) => {
2716
- var n = fn(), r = g(n), i = w(r), a = w(i), o = T(a, !0);
2717
- C(() => {
2718
- E(r, "x1", I(t).x), E(r, "y1", I(t).y), E(r, "x2", I(t).x), E(r, "y2", I(t).y - 24), E(r, "stroke", I(t).color), E(i, "x", I(t).x), E(i, "y", I(t).y - 24), E(i, "width", I(s)), E(i, "fill", I(t).color), E(a, "x", I(t).x + I(s) / 2), E(a, "y", I(t).y - 14.5), O(o, I(t).label);
2719
- }), m(e, n);
2720
- }, ee = (e) => {
2721
- var n = pn(), o = g(n), s = w(o), c = T(s, !0), l = w(s), u = T(l, !0);
2722
- C((e) => {
2723
- E(o, "d", `M${I(t).x},${I(t).y} c-7,-9 -8,-13 -8,-16 a8,8 0 1,1 16,0 c0,3 -1,7 -8,16 z`), E(o, "fill", I(t).color), E(s, "x", I(t).x), E(s, "y", I(t).y - 12.5), O(c, e), E(l, "x", I(t).x + I(r)), E(l, "y", I(t).y + I(i)), E(l, "text-anchor", I(a)), E(l, "fill", I(t).color), O(u, I(t).label);
2724
- }, [() => I(t).label.slice(0, 1)]), m(e, n);
2725
- }, te = (e) => {
2726
- var n = mn(), o = g(n), s = w(o), c = T(s, !0);
2727
- C(() => {
2728
- E(o, "x", I(t).x - 4.5), E(o, "y", I(t).y - 4.5), E(o, "fill", I(t).color), E(s, "x", I(t).x + I(r)), E(s, "y", I(t).y + I(i)), E(s, "text-anchor", I(a)), E(s, "fill", I(t).color), O(c, I(t).label);
2729
- }), m(e, n);
2730
- }, ne = (e) => {
2731
- var n = hn(), s = g(n), c = w(s), l = T(c, !0);
2732
- C(() => {
2733
- E(s, "cx", I(t).x), E(s, "cy", I(t).y), E(s, "r", I(o) ? 6 : 4), E(s, "fill", I(t).color), E(c, "x", I(t).x + I(r)), E(c, "y", I(t).y + I(i)), E(c, "text-anchor", I(a)), E(c, "fill", I(t).color), O(l, I(t).label);
2734
- }), m(e, n);
2735
- };
2736
- h(u, (e) => {
2737
- I(t).shape === "flag" ? e(d) : I(t).shape === "pin" ? e(ee, 1) : I(t).shape === "square" ? e(te, 2) : e(ne, -1);
2738
- }), j(c), C((e) => {
2739
- l = F(c, 0, "sv-grid-chart-annotation-marker svelte-kvdein", null, l, {
2740
- "is-removable": I(o),
2741
- "has-text": !!I(t).text
2742
- }), E(c, "role", I(o) ? "button" : I(t).text ? "img" : void 0), E(c, "tabindex", I(o) || I(t).text ? 0 : void 0), E(c, "aria-label", e);
2743
- }, [() => I(o) ? V(I(B).removeNote, { label: I(t).label }) : I(t).text ? `${I(t).label}: ${I(t).text}` : void 0]), _("click", c, (e) => {
2744
- !I(oi) || !f.onAnnotationRemove || (e.stopPropagation(), f.onAnnotationRemove(I(n)));
2745
- }), _("keydown", c, (e) => {
2746
- !I(oi) || !f.onAnnotationRemove || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), f.onAnnotationRemove(I(n)));
2747
- }), x("mouseenter", c, (e) => {
2748
- I(t).text && Z(e.clientX, e.clientY, I(t).label, [{ value: I(t).text }]);
2749
- }), x("mouseleave", c, () => {
2750
- I(t).text && b(Xo, null);
2751
- }), x("focus", c, () => {
2752
- if (!I(t).text || !I(Fi)) return;
2753
- let e = I(Fi).getBoundingClientRect();
2754
- Z(e.left + I(t).x * e.width / I(q).width, e.top + I(t).y * e.height / I(q).height, I(t).label, [{ value: I(t).text }]);
2755
- }), x("blur", c, () => {
2756
- I(t).text && b(Xo, null);
2757
- }), m(e, c);
2758
- });
2759
- var Oc = w(Dc), kc = (e) => {
2760
- var t = kn(), n = A(t);
2761
- P(n, 17, () => I(q).drawings, (e) => e.id, (e, t) => {
2762
- let n = M(() => I(t).points[0]), r = M(() => I(t).points[1]), i = M(() => I(Xi) === I(t).id);
2763
- var a = Tn();
2764
- let o;
2765
- var s = A(a), c = (e) => {
2766
- let i = M(() => Math.atan2(I(r).y - I(n).y, I(r).x - I(n).x));
2767
- var a = vn(), o = g(a), s = w(o), c = w(s), l = (e) => {
2768
- var n = _n();
2769
- C((e) => {
2770
- E(n, "d", e), E(n, "fill", I(t).color);
2771
- }, [() => `M${I(r).x},${I(r).y} L${I(r).x - 10 * Math.cos(I(i) - .45)},${I(r).y - 10 * Math.sin(I(i) - .45)} L${I(r).x - 10 * Math.cos(I(i) + .45)},${I(r).y - 10 * Math.sin(I(i) + .45)} Z`]), m(e, n);
2772
- };
2773
- h(c, (e) => {
2774
- I(t).kind === "arrow" && e(l);
2775
- }), C(() => {
2776
- E(o, "x1", I(n).x), E(o, "y1", I(n).y), E(o, "x2", I(r).x), E(o, "y2", I(r).y), E(s, "x1", I(n).x), E(s, "y1", I(n).y), E(s, "x2", I(r).x), E(s, "y2", I(r).y), E(s, "stroke", I(t).color);
2777
- }), m(e, a);
2778
- }, l = (e) => {
2779
- var i = yn();
2780
- C((e, n, r, a) => {
2781
- E(i, "x", e), E(i, "y", n), E(i, "width", r), E(i, "height", a), E(i, "fill", I(t).color), E(i, "stroke", I(t).color);
2782
- }, [
2783
- () => Math.min(I(n).x, I(r).x),
2784
- () => Math.min(I(n).y, I(r).y),
2785
- () => Math.abs(I(r).x - I(n).x),
2786
- () => Math.abs(I(r).y - I(n).y)
2787
- ]), m(e, i);
2788
- }, u = (e) => {
2789
- var r = bn(), i = g(r), a = w(i), o = w(a), s = T(o, !0);
2790
- C(() => {
2791
- E(i, "x1", I(n).x), E(i, "y1", I(n).y), E(i, "x2", I(q).plot.x + I(q).plot.w), E(i, "y2", I(n).y), E(a, "x1", I(n).x), E(a, "y1", I(n).y), E(a, "x2", I(q).plot.x + I(q).plot.w), E(a, "y2", I(n).y), E(a, "stroke", I(t).color), E(o, "x", I(q).plot.x + I(q).plot.w - 3), E(o, "y", I(n).y - 3), E(o, "fill", I(t).color), O(s, I(t).label);
2792
- }), m(e, r);
2793
- }, d = (e) => {
2794
- let i = M(() => Math.min(I(n).x, I(r).x)), a = M(() => Math.max(I(n).x, I(r).x));
2795
- var o = Sn(), s = g(o);
2796
- P(s, 17, () => I(t).levels, (e) => e.ratio, (e, n) => {
2797
- var r = xn(), o = g(r), s = w(o), c = T(s, !0);
2798
- C(() => {
2799
- E(o, "x1", I(i)), E(o, "y1", I(n).y), E(o, "x2", I(a)), E(o, "y2", I(n).y), E(o, "stroke", I(t).color), E(o, "stroke-dasharray", I(n).ratio === 0 || I(n).ratio === 1 ? void 0 : "3 3"), E(s, "x", I(i) + 3), E(s, "y", I(n).y - 2), E(s, "fill", I(t).color), O(c, I(n).label);
2800
- }), m(e, r);
2801
- });
2802
- var c = w(s);
2803
- C((e, t) => {
2804
- E(c, "x", I(i)), E(c, "y", e), E(c, "width", I(a) - I(i)), E(c, "height", t);
2805
- }, [() => Math.min(I(n).y, I(r).y), () => Math.abs(I(r).y - I(n).y)]), m(e, o);
2806
- }, ee = (e) => {
2807
- var r = Cn(), i = T(r, !0);
2808
- C(() => {
2809
- E(r, "x", I(n).x), E(r, "y", I(n).y), E(r, "fill", I(t).color), O(i, I(t).text ?? "");
2810
- }), m(e, r);
2811
- };
2812
- h(s, (e) => {
2813
- (I(t).kind === "trend" || I(t).kind === "arrow") && I(r) ? e(c) : I(t).kind === "rect" && I(r) ? e(l, 1) : I(t).kind === "hray" ? e(u, 2) : I(t).kind === "fib" && I(r) && I(t).levels ? e(d, 3) : I(t).kind === "text" && e(ee, 4);
2814
- });
2815
- var te = w(s), ne = (e) => {
2816
- var n = D(), r = g(n);
2817
- P(r, 17, () => I(t).points, S, (e, n, r) => {
2818
- var i = wn();
2819
- C(() => {
2820
- E(i, "cx", I(n).x), E(i, "cy", I(n).y), E(i, "stroke", I(t).color);
2821
- }), _("pointerdown", i, (e) => {
2822
- e.stopPropagation(), e.preventDefault(), b(ea, {
2823
- id: I(t).id,
2824
- index: r
2825
- }, !0), I(Fi)?.setPointerCapture?.(e.pointerId);
2826
- }), m(e, i);
2827
- }), m(e, n);
2828
- };
2829
- h(te, (e) => {
2830
- I(i) && Ye() && e(ne);
2831
- }), j(a), C((e) => {
2832
- o = F(a, 0, `sv-grid-chart-drawing is-${I(t).kind}`, "svelte-kvdein", o, { "is-selected": I(i) }), E(a, "role", Ye() ? "button" : void 0), E(a, "tabindex", Ye() ? 0 : void 0), E(a, "aria-label", e);
2833
- }, [() => Ye() ? `${V(I(B).drawing, { tool: I(Ki)[I(t).kind] })}${I(t).text ? `: ${I(t).text}` : ""}` : void 0]), _("click", a, (e) => {
2834
- Ye() && !I(Ji) && (e.stopPropagation(), b(Xi, I(i) ? null : I(t).id, !0));
2835
- }), _("keydown", a, (e) => {
2836
- Ye() && ua(e, I(t).id);
2837
- }), m(e, a);
2838
- });
2839
- var r = w(n), i = (e) => {
2840
- var t = On(), n = g(t), r = w(n), i = (e) => {
2841
- var t = En();
2842
- C((e, n, r, i) => {
2843
- E(t, "x", e), E(t, "y", n), E(t, "width", r), E(t, "height", i);
2844
- }, [
2845
- () => Math.min(I(W).px, I(Yi).x),
2846
- () => Math.min(I(W).py, I(Yi).y),
2847
- () => Math.abs(I(Yi).x - I(W).px),
2848
- () => Math.abs(I(Yi).y - I(W).py)
2849
- ]), m(e, t);
2850
- }, a = (e) => {
2851
- var t = Dn();
2852
- C(() => {
2853
- E(t, "x1", I(W).px), E(t, "y1", I(W).py), E(t, "x2", I(Yi).x), E(t, "y2", I(Yi).y);
2854
- }), m(e, t);
2855
- };
2856
- h(r, (e) => {
2857
- I(Ji) === "rect" ? e(i) : e(a, -1);
2858
- }), C(() => {
2859
- E(n, "cx", I(W).px), E(n, "cy", I(W).py);
2860
- }), m(e, t);
2861
- };
2862
- h(r, (e) => {
2863
- I(W) && I(Yi) && e(i);
2864
- }), j(t), C(() => E(t, "clip-path", `url(#${hi}-plot)`)), m(e, t);
2865
- };
2866
- h(Oc, (e) => {
2867
- (I(q).drawings.length || I(W)) && e(kc);
2868
- });
2869
- var Ac = w(Oc), jc = (e) => {
2870
- var t = D(), n = g(t), r = (e) => {
2871
- let t = M(() => I(q).plot.y + I(lo) * I(Qo) + I(lo) / 2);
2872
- var n = An();
2873
- C(() => {
2874
- E(n, "x1", I(q).plot.x), E(n, "y1", I(t)), E(n, "x2", I(q).plot.x + I(q).plot.w), E(n, "y2", I(t));
2875
- }), m(e, n);
2876
- }, i = (e) => {
2877
- let t = M(() => I(q).lines[0]?.points[I(Qo)]), n = M(() => I(t) && Number.isFinite(I(t).x) ? I(t).x : I(q).plot.x + I(lo) * I(Qo) + I(lo) / 2);
2878
- var r = Nn(), i = g(r), a = w(i), o = (e) => {
2879
- let t = M(() => Ko(I(Xo)?.title ?? I(K).categories[I(Qo)] ?? "", 16)), r = M(() => Math.max(24, I(t).length * 6.2 + 10));
2880
- var i = Mn(), a = g(i), o = A(a), s = w(o), c = T(s, !0);
2881
- j(a);
2882
- var l = w(a), u = (e) => {
2883
- let t = M(() => ns(I(Ya).yInvert(I(ts)))), n = M(() => Math.max(24, I(t).length * 6.2 + 10));
2884
- var r = jn(), i = A(r), a = w(i), o = T(a, !0);
2885
- j(r), C((e, r) => {
2886
- E(i, "x", e), E(i, "y", I(ts) - 7.5), E(i, "width", I(n)), E(a, "x", r), E(a, "y", I(ts) + 3.5), O(o, I(t));
2887
- }, [() => Math.max(0, I(q).plot.x - I(n) - 2), () => Math.max(I(n) / 2, I(q).plot.x - 2 - I(n) / 2)]), m(e, r);
2888
- };
2889
- h(l, (e) => {
2890
- I(ts) != null && I(Ya) && I(q).axes && e(u);
2891
- }), C((e, n) => {
2892
- E(o, "x", e), E(o, "y", I(q).plot.y + I(q).plot.h + 2), E(o, "width", I(r)), E(s, "x", n), E(s, "y", I(q).plot.y + I(q).plot.h + 13), O(c, I(t));
2893
- }, [() => Math.max(0, Math.min(I(q).width - I(r), I(n) - I(r) / 2)), () => Math.max(I(r) / 2, Math.min(I(q).width - I(r) / 2, I(n)))]), m(e, i);
2894
- };
2895
- h(a, (e) => {
2896
- Ue() && e(o);
2897
- }), C(() => {
2898
- E(i, "x1", I(n)), E(i, "y1", I(q).plot.y), E(i, "x2", I(n)), E(i, "y2", I(q).plot.y + I(q).plot.h);
2899
- }), m(e, r);
2900
- };
2901
- h(n, (e) => {
2902
- I(co) ? e(r) : e(i, -1);
2903
- }), m(e, t);
2904
- };
2905
- h(Ac, (e) => {
2906
- I(J) && I(Qo) !== null && e(jc);
2907
- });
2908
- var Mc = w(Ac), Nc = (e) => {
2909
- var t = zn(), n = g(t);
2910
- P(n, 17, () => I(q).heatmapRowTicks, (e) => e.value, (e, t, n, r) => {
2911
- var i = Dt(), a = T(i, !0);
2912
- C((e) => {
2913
- E(i, "x", I(q).plot.x - 8), E(i, "y", I(t).y + 3), O(a, e);
2914
- }, [() => Ko(I(t).label, 22)]), m(e, i);
2915
- });
2916
- var r = w(n);
2917
- P(r, 19, () => I(q).heatmapColTicks, (e, t) => e.label + t, (e, t, n, r) => {
2918
- var i = Pn(), a = T(i, !0);
2919
- C((e) => {
2920
- E(i, "x", I(t).x), E(i, "y", I(q).plot.y + I(q).plot.h + 14), O(a, e);
2921
- }, [() => Ko(I(t).label, 14)]), m(e, i);
2922
- });
2923
- var i = w(r);
2924
- P(i, 17, () => I(q).heatmapCells, S, (e, t, n) => {
2925
- var r = In(), i = g(r), a = w(i), o = (e) => {
2926
- var n = Fn(), r = T(n, !0);
2927
- C((e) => {
2928
- E(n, "x", I(t).x + I(t).w / 2), E(n, "y", I(t).y + I(t).h / 2 + 3), E(n, "fill", I(t).textColor), O(r, e);
2929
- }, [() => U(I(t).value)]), m(e, n);
2930
- };
2931
- h(a, (e) => {
2932
- I(ni).show && I(t).w > 22 && I(t).h > 14 && e(o);
2933
- }), C((e, n) => {
2934
- E(i, "x", I(t).x), E(i, "y", I(t).y), E(i, "width", I(t).w), E(i, "height", I(t).h), E(i, "fill", I(t).color), E(i, "role", f.onSelect || I(X) ? "button" : "img"), E(i, "tabindex", e), E(i, "aria-label", n);
2935
- }, [() => Cs(".sv-grid-chart-heatcell", n), () => `${I(t).rowLabel} ${I(t).colLabel}: ${U(I(t).value)}`]), _("mousemove", i, (e) => ds(e.clientX, e.clientY, I(t))), x("mouseleave", i, Q), x("focus", i, (e) => {
2936
- ws(".sv-grid-chart-heatcell", n);
2937
- let r = Es(e.currentTarget);
2938
- ds(r.x, r.y, I(t));
2939
- }), x("blur", i, Q), _("click", i, () => ys(I(t).colLabel, I(t).rowLabel, I(t).value)), _("keydown", i, (e) => Ts(e, ".sv-grid-chart-heatcell", n, f.onSelect || I(X) ? () => ys(I(t).colLabel, I(t).rowLabel, I(t).value) : null, { cols: I(q).heatmapColTicks.length })), m(e, r);
2940
- });
2941
- var a = w(i), o = (e) => {
2942
- let t = M(() => I(q).plot.x + I(q).plot.w + 14), n = M(() => I(q).plot.h - 20), r = M(() => I(q).heatmapLegend);
2943
- var i = Rn(), a = g(i), o = A(a);
2944
- P(o, 21, () => I(r), S, (e, t, n) => {
2945
- var i = Ln();
2946
- C(() => {
2947
- E(i, "offset", `${n / (I(r).length - 1) * 100}%`), E(i, "stop-color", I(t).color);
2948
- }), m(e, i);
2949
- }), j(o), j(a);
2950
- var s = w(a), c = w(s), l = T(c, !0), u = w(c), d = T(u, !0);
2951
- C(() => {
2952
- E(o, "id", `${hi}-heatscale`), E(s, "x", I(t)), E(s, "y", I(q).plot.y + 10), E(s, "height", I(n)), E(s, "fill", `url(#${hi}-heatscale)`), E(c, "x", I(t) + 14), E(c, "y", I(q).plot.y + 14), O(l, I(r)[I(r).length - 1].label), E(u, "x", I(t) + 14), E(u, "y", I(q).plot.y + 10 + I(n)), O(d, I(r)[0].label);
2953
- }), m(e, i);
2954
- };
2955
- h(a, (e) => {
2956
- I(q).heatmapLegend.length && e(o);
2957
- }), m(e, t);
2958
- };
2959
- h(Mc, (e) => {
2960
- I(to) && e(Nc);
2961
- });
2962
- var Pc = w(Mc), Fc = (e) => {
2963
- var t = D(), n = g(t);
2964
- P(n, 17, () => I(q).funnelSegments, S, (e, t, n) => {
2965
- var r = Vn(), i = g(r), a = w(i), o = (e) => {
2966
- var n = Bn(), r = g(n), i = T(r, !0), a = w(r), o = T(a);
2967
- C((e, n, s) => {
2968
- E(r, "x", I(t).cx), E(r, "y", I(t).cy - 3), E(r, "fill", I(t).textColor), O(i, e), E(a, "x", I(t).cx), E(a, "y", I(t).cy + 11), E(a, "fill", I(t).textColor), O(o, `${n ?? ""} · ${s ?? ""}%`);
2969
- }, [
2970
- () => Ko(I(t).label, 24),
2971
- () => U(I(t).value),
2972
- () => (I(t).conversion * 100).toFixed(0)
2973
- ]), m(e, n);
2974
- }, s = M(() => I(q).plot.h / Math.max(1, I(q).funnelSegments.length) >= 26);
2975
- h(a, (e) => {
2976
- I(s) && e(o);
2977
- }), C((e, n) => {
2978
- E(i, "d", I(t).path), E(i, "fill", I(t).color), E(i, "role", f.onSelect || I(X) ? "button" : "img"), E(i, "tabindex", e), E(i, "aria-label", n);
2979
- }, [() => Cs(".sv-grid-chart-funnel-seg", n), () => `${I(t).label}: ${U(I(t).value)}`]), _("mousemove", i, (e) => fs(e.clientX, e.clientY, I(t))), x("mouseleave", i, Q), x("focus", i, (e) => {
2980
- ws(".sv-grid-chart-funnel-seg", n);
2981
- let r = Es(e.currentTarget);
2982
- fs(r.x, r.y, I(t));
2983
- }), x("blur", i, Q), _("click", i, () => ys(I(t).label, I(t).label, I(t).value, n)), _("keydown", i, (e) => Ts(e, ".sv-grid-chart-funnel-seg", n, f.onSelect || I(X) ? () => ys(I(t).label, I(t).label, I(t).value, n) : null)), m(e, r);
2984
- }), m(e, t);
2985
- };
2986
- h(Pc, (e) => {
2987
- I(no) && e(Fc);
2988
- });
2989
- var Ic = w(Pc), Lc = (e) => {
2990
- let t = M(() => I(q).radarCenter);
2991
- var n = Kn(), r = g(n);
2992
- P(r, 17, () => I(q).radarRings, S, (e, n, r) => {
2993
- let i = M(() => I(t).r * ((r + 1) / I(q).radarRings.length));
2994
- var a = Hn();
2995
- C(() => {
2996
- E(a, "cx", I(t).cx), E(a, "cy", I(t).cy), E(a, "r", I(i));
2997
- }), m(e, a);
2998
- });
2999
- var i = w(r);
3000
- P(i, 17, () => I(q).radarAxes, S, (e, n) => {
3001
- let r = M(() => I(n).x - I(t).cx), i = M(() => I(n).y - I(t).cy), a = M(() => I(t).cx + I(r) * 1.08), o = M(() => I(t).cy + I(i) * 1.08);
3002
- var s = Un(), c = g(s), l = w(c), u = T(l, !0);
3003
- C((e) => {
3004
- E(c, "x1", I(t).cx), E(c, "y1", I(t).cy), E(c, "x2", I(n).x), E(c, "y2", I(n).y), E(l, "x", I(a)), E(l, "y", I(o) + 3), E(l, "text-anchor", e), O(u, I(n).label);
3005
- }, [() => Math.abs(I(r)) < 1 ? "middle" : I(r) > 0 ? "start" : "end"]), m(e, s);
3006
- });
3007
- var a = w(i);
3008
- P(a, 17, () => I(q).radarSeries, S, (e, t, n) => {
3009
- var r = Gn(), i = g(r), a = w(i);
3010
- P(a, 17, () => I(t).points, S, (e, r, i) => {
3011
- let a = M(() => n * I(t).points.length + i);
3012
- var o = Wn();
3013
- C((e, n) => {
3014
- E(o, "cx", I(r).x), E(o, "cy", I(r).y), E(o, "fill", I(t).color), E(o, "tabindex", e), E(o, "aria-label", n);
3015
- }, [() => Cs(".sv-grid-chart-radar-dot", I(a)), () => `${I(t).label} ${I(r).axis}: ${U(I(r).value)}`]), _("mousemove", o, (e) => _s(e.clientX, e.clientY, I(t).label, I(r).axis, I(r).value, I(t).color)), x("mouseleave", o, Q), x("focus", o, (e) => {
3016
- ws(".sv-grid-chart-radar-dot", I(a));
3017
- let n = Es(e.currentTarget);
3018
- _s(n.x, n.y, I(t).label, I(r).axis, I(r).value, I(t).color);
3019
- }), x("blur", o, Q), _("keydown", o, (e) => Ts(e, ".sv-grid-chart-radar-dot", I(a))), m(e, o);
3020
- }), C((e) => {
3021
- E(i, "d", I(t).path), E(i, "fill", I(t).color), E(i, "stroke", I(t).color), N(i, e);
3022
- }, [() => `opacity:${Y(I(t).label)}`]), m(e, r);
3023
- }), m(e, n);
3024
- };
3025
- h(Ic, (e) => {
3026
- I(ro) && I(q).radarCenter && e(Lc);
3027
- });
3028
- var Rc = w(Ic), zc = (e) => {
3029
- var t = zn(), n = g(t);
3030
- P(n, 17, () => I(q).calendarMonthTicks, S, (e, t, n, r) => {
3031
- var i = Mt(), a = T(i, !0);
3032
- C(() => {
3033
- E(i, "x", I(t).x), E(i, "y", I(q).plot.y - 8), O(a, I(t).label);
3034
- }), m(e, i);
3035
- });
3036
- var r = w(n);
3037
- P(r, 16, () => [
3038
- "Mon",
3039
- "Wed",
3040
- "Fri"
3041
- ], S, (e, t, n) => {
3042
- let r = M(() => [
3043
- 1,
3044
- 3,
3045
- 5
3046
- ][n]), i = M(() => I(q).calendarCells[I(r)]);
3047
- var a = D(), o = g(a), s = (e) => {
3048
- var n = Dt(), r = T(n, !0);
3049
- C(() => {
3050
- E(n, "x", I(q).plot.x - 6), E(n, "y", I(i).y + I(i).size / 2 + 3), O(r, t);
3051
- }), m(e, n);
3052
- };
3053
- h(o, (e) => {
3054
- I(i) && e(s);
3055
- }), m(e, a);
3056
- });
3057
- var i = w(r);
3058
- P(i, 17, () => I(q).calendarCells, S, (e, t, n) => {
3059
- var r = qn();
3060
- let i;
3061
- C((e, n) => {
3062
- i = F(r, 0, "sv-grid-chart-calendar-cell svelte-kvdein", null, i, { "is-blank": !I(t).defined }), E(r, "x", I(t).x + 1), E(r, "y", I(t).y + 1), E(r, "width", I(t).size - 2), E(r, "height", I(t).size - 2), E(r, "fill", I(t).defined ? I(t).color : "transparent"), E(r, "tabindex", e), E(r, "aria-label", n);
3063
- }, [() => Cs(".sv-grid-chart-calendar-cell", n), () => `${as(I(t).date)}: ${I(t).defined ? U(I(t).value) : I(B).noValue}`]), _("mousemove", r, (e) => I(t).defined && Z(e.clientX, e.clientY, as(I(t).date), [{
3064
- color: I(t).color,
3065
- value: U(I(t).value)
3066
- }])), x("mouseleave", r, Q), x("focus", r, (e) => {
3067
- if (ws(".sv-grid-chart-calendar-cell", n), I(t).defined) {
3068
- let n = Es(e.currentTarget);
3069
- Z(n.x, n.y, as(I(t).date), [{
3070
- color: I(t).color,
3071
- value: U(I(t).value)
3072
- }]);
3073
- }
3074
- }), x("blur", r, Q), _("keydown", r, (e) => Ts(e, ".sv-grid-chart-calendar-cell", n, null, {
3075
- cols: 7,
3076
- colMajor: !0
3077
- })), m(e, r);
3078
- });
3079
- var a = w(i), o = (e) => {
3080
- let t = M(() => I(q).plot.x + I(q).plot.w + 12), n = M(() => I(q).plot.y + 4);
3081
- var r = Yn(), i = g(r), a = w(i);
3082
- P(a, 17, () => I(q).calendarLegend, S, (e, r, i) => {
3083
- var a = Jn(), o = g(a), s = w(o), c = T(s, !0);
3084
- C(() => {
3085
- E(o, "x", I(t)), E(o, "y", I(n) + 6 + i * 13), E(o, "fill", I(r).color), E(s, "x", I(t) + 14), E(s, "y", I(n) + 14 + i * 13), O(c, I(r).label);
3086
- }), m(e, a);
3087
- });
3088
- var o = w(a);
3089
- C(() => {
3090
- E(i, "x", I(t)), E(i, "y", I(n)), E(o, "x", I(t)), E(o, "y", I(n) + 12 + I(q).calendarLegend.length * 13);
3091
- }), m(e, r);
3092
- };
3093
- h(a, (e) => {
3094
- I(q).calendarLegend.length && e(o);
3095
- }), m(e, t);
3096
- };
3097
- h(Rc, (e) => {
3098
- I(io) && e(zc);
3099
- });
3100
- var Bc = w(Rc), Vc = (e) => {
3101
- let t = M(() => I(q).gauge);
3102
- var n = Qn(), r = g(n);
3103
- P(r, 17, () => I(t).ticks, S, (e, t) => {
3104
- var n = At();
3105
- let r;
3106
- C(() => {
3107
- r = F(n, 0, "sv-grid-chart-gauge-tick svelte-kvdein", null, r, { "is-major": I(t).major }), E(n, "x1", I(t).x1), E(n, "y1", I(t).y1), E(n, "x2", I(t).x2), E(n, "y2", I(t).y2);
3108
- }), m(e, n);
3109
- });
3110
- var i = w(r), a = w(i);
3111
- P(a, 17, () => I(t).rangePaths, S, (e, t) => {
3112
- var n = Xn();
3113
- C(() => {
3114
- E(n, "d", I(t).path), E(n, "stroke", I(t).color);
3115
- }), m(e, n);
3116
- });
3117
- var o = w(a), s = w(o), c = (e) => {
3118
- var n = Zn();
3119
- C(() => {
3120
- E(n, "x1", I(t).target.x1), E(n, "y1", I(t).target.y1), E(n, "x2", I(t).target.x2), E(n, "y2", I(t).target.y2);
3121
- }), m(e, n);
3122
- };
3123
- h(s, (e) => {
3124
- I(t).target && e(c);
3125
- });
3126
- var l = w(s), u = w(l), d = w(u), ee = w(d), te = T(ee, !0), ne = w(ee), re = T(ne, !0), ie = w(ne), f = T(ie);
3127
- C((e, n, r, a) => {
3128
- E(i, "d", I(t).trackPath), E(o, "d", I(t).valuePath), E(o, "stroke", I(t).valueColor ?? "var(--sg-accent, #2563eb)"), E(l, "d", I(t).needle.path), E(u, "cx", I(t).cx), E(u, "cy", I(t).cy), E(u, "r", I(t).needle.hubR), E(d, "cx", I(t).cx), E(d, "cy", I(t).cy), E(ee, "x", I(t).minLabel.x), E(ee, "y", I(t).minLabel.y), O(te, e), E(ne, "x", I(t).maxLabel.x), E(ne, "y", I(t).maxLabel.y), O(re, n), E(ie, "x", I(t).cx), E(ie, "y", I(t).cy + 38), O(f, `${r ?? ""}${a ?? ""}`);
3129
- }, [
3130
- () => U(I(t).min),
3131
- () => U(I(t).max),
3132
- () => U(I(t).value),
3133
- () => I(t).unit ? /^[%°′″]/.test(I(t).unit) ? I(t).unit : ` ${I(t).unit}` : ""
3134
- ]), m(e, n);
3135
- };
3136
- h(Bc, (e) => {
3137
- I(ao) && I(q).gauge && e(Vc);
3138
- });
3139
- var Hc = w(Bc), Uc = (e) => {
3140
- var t = D(), n = g(t);
3141
- P(n, 17, () => I(q).treemapCells, S, (e, t, n) => {
3142
- var r = tr(), i = g(r), o = w(i), s = (e) => {
3143
- var n = $n(), r = T(n, !0);
3144
- C((e) => {
3145
- E(n, "x", I(t).x + 4), E(n, "y", I(t).y + 12), E(n, "fill", I(t).textColor), O(r, e);
3146
- }, [() => Ko(I(t).name, Math.max(3, Math.floor(I(t).w / 7)))]), m(e, n);
3147
- };
3148
- h(o, (e) => {
3149
- I(t).w > 36 && I(t).h > 18 && e(s);
3150
- });
3151
- var c = w(o), l = (e) => {
3152
- var n = er(), r = T(n, !0);
3153
- C((e) => {
3154
- E(n, "x", I(t).x + 4), E(n, "y", I(t).y + 24), E(n, "fill", I(t).textColor), O(r, e);
3155
- }, [() => U(I(t).value)]), m(e, n);
3156
- };
3157
- h(c, (e) => {
3158
- I(t).w > 60 && I(t).h > 30 && e(l);
3159
- }), C((e, n) => {
3160
- E(i, "x", I(t).x), E(i, "y", I(t).y), E(i, "width", I(t).w), E(i, "height", I(t).h), E(i, "fill", I(t).color), E(i, "role", f.onSelect || I(X) || I(ka) ? "button" : "img"), E(i, "tabindex", e), E(i, "aria-label", n);
3161
- }, [() => Cs(".sv-grid-chart-treemap-cell", n), () => `${I(t).name}: ${U(I(t).value)}`]), _("mousemove", i, (e) => Z(e.clientX, e.clientY, I(t).name, [{
3162
- color: I(t).color,
3163
- value: U(I(t).value)
3164
- }])), x("mouseleave", i, Q), x("focus", i, (e) => {
3165
- ws(".sv-grid-chart-treemap-cell", n);
3166
- let r = Es(e.currentTarget);
3167
- Z(r.x, r.y, I(t).name, [{
3168
- color: I(t).color,
3169
- value: U(I(t).value)
3170
- }]);
3171
- }), x("blur", i, Q), _("click", i, (e) => {
3172
- I(ka) && Ia([...Ie(), ...a(I(Aa), I(t).name) ?? []]) || ys(I(t).name, "", I(t).value, void 0, e);
3173
- }), _("keydown", i, (e) => Ts(e, ".sv-grid-chart-treemap-cell", n, () => {
3174
- I(ka) && Ia([...Ie(), ...a(I(Aa), I(t).name) ?? []]) || (f.onSelect || I(X)) && ys(I(t).name, "", I(t).value, void 0, e);
3175
- })), m(e, r);
3176
- }), m(e, t);
3177
- };
3178
- h(Hc, (e) => {
3179
- I(oo) && e(Uc);
3180
- });
3181
- var Wc = w(Hc), Gc = (e) => {
3182
- var t = jt(), n = g(t);
3183
- P(n, 17, () => I(q).sankeyLinks, S, (e, t, n) => {
3184
- var r = nr();
3185
- C((e, n) => {
3186
- E(r, "d", I(t).path), E(r, "stroke", I(t).color), E(r, "stroke-width", I(t).width), E(r, "tabindex", e), E(r, "aria-label", n);
3187
- }, [() => Cs(".sv-grid-chart-sankey-link", n), () => `${I(t).source} → ${I(t).target}: ${U(I(t).value)}`]), _("mousemove", r, (e) => Z(e.clientX, e.clientY, `${I(t).source} → ${I(t).target}`, [{
3188
- color: I(t).color,
3189
- value: U(I(t).value)
3190
- }])), x("mouseleave", r, Q), x("focus", r, (e) => {
3191
- ws(".sv-grid-chart-sankey-link", n);
3192
- let r = Es(e.currentTarget);
3193
- Z(r.x, r.y, `${I(t).source} → ${I(t).target}`, [{
3194
- color: I(t).color,
3195
- value: U(I(t).value)
3196
- }]);
3197
- }), x("blur", r, Q), _("keydown", r, (e) => Ts(e, ".sv-grid-chart-sankey-link", n)), m(e, r);
3198
- });
3199
- var r = w(n);
3200
- P(r, 17, () => I(q).sankeyNodes, S, (e, t, n) => {
3201
- var r = rr(), i = g(r), a = w(i), o = T(a, !0);
3202
- C((e, n) => {
3203
- E(i, "x", I(t).x), E(i, "y", I(t).y), E(i, "width", I(t).w), E(i, "height", I(t).h), E(i, "fill", I(t).color), E(i, "tabindex", e), E(i, "aria-label", n), E(a, "x", I(t).column === 0 ? I(t).x + I(t).w + 4 : I(t).x - 4), E(a, "y", I(t).y + I(t).h / 2 + 3), E(a, "text-anchor", I(t).column === 0 ? "start" : "end"), O(o, I(t).label);
3204
- }, [() => Cs(".sv-grid-chart-sankey-node", n), () => V(I(B).sankeyNode, {
3205
- label: I(t).label,
3206
- in: U(I(t).totalIn),
3207
- out: U(I(t).totalOut)
3208
- })]), _("mousemove", i, (e) => Z(e.clientX, e.clientY, I(t).label, [{
3209
- label: "in",
3210
- value: U(I(t).totalIn)
3211
- }, {
3212
- label: "out",
3213
- value: U(I(t).totalOut)
3214
- }])), x("mouseleave", i, Q), x("focus", i, (e) => {
3215
- ws(".sv-grid-chart-sankey-node", n);
3216
- let r = Es(e.currentTarget);
3217
- Z(r.x, r.y, I(t).label, [{
3218
- label: "in",
3219
- value: U(I(t).totalIn)
3220
- }, {
3221
- label: "out",
3222
- value: U(I(t).totalOut)
3223
- }]);
3224
- }), x("blur", i, Q), _("keydown", i, (e) => Ts(e, ".sv-grid-chart-sankey-node", n)), m(e, r);
3225
- }), m(e, t);
3226
- };
3227
- h(Wc, (e) => {
3228
- I(so) && e(Gc);
3229
- });
3230
- var Kc = w(Wc), qc = (e) => {
3231
- var t = ur(), n = g(t), r = (e) => {
3232
- var t = D(), n = g(t);
3233
- P(n, 17, () => I(q).polarRings, S, (e, t) => {
3234
- var n = ir();
3235
- C(() => {
3236
- E(n, "cx", I(q).radarCenter.cx), E(n, "cy", I(q).radarCenter.cy), E(n, "r", I(t));
3237
- }), m(e, n);
3238
- }), m(e, t);
3239
- };
3240
- h(n, (e) => {
3241
- I(q).radarCenter && I(q).polarRings.length && e(r);
3242
- });
3243
- var i = w(n);
3244
- P(i, 17, () => I(q).polarAxes, S, (e, t) => {
3245
- var n = ar(), r = T(n, !0);
3246
- C((e) => {
3247
- E(n, "x", I(t).x), E(n, "y", I(t).y + 3), E(n, "text-anchor", I(t).x < (I(q).radarCenter?.cx ?? 0) - 2 ? "end" : I(t).x > (I(q).radarCenter?.cx ?? 0) + 2 ? "start" : "middle"), O(r, e);
3248
- }, [() => Ko(I(t).label, 14)]), m(e, n);
3249
- });
3250
- var a = w(i);
3251
- P(a, 17, () => I(q).arcs, S, (e, t) => {
3252
- var n = D(), r = g(n), i = (e) => {
3253
- var n = or();
3254
- C(() => E(n, "d", I(t).trackPath)), m(e, n);
3255
- };
3256
- h(r, (e) => {
3257
- I(t).trackPath && e(i);
3258
- }), m(e, n);
3259
- });
3260
- var o = w(a);
3261
- P(o, 17, () => I(q).chordRibbons, S, (e, t) => {
3262
- var n = sr();
3263
- C((e) => {
3264
- E(n, "d", I(t).path), E(n, "fill", I(t).color), E(n, "stroke", I(t).color), N(n, e);
3265
- }, [() => `opacity:${Y(I(t).source) === 1 && Y(I(t).target) === 1 ? 1 : .18}`]), _("mousemove", n, (e) => ms(e.clientX, e.clientY, I(t))), x("mouseleave", n, Q), m(e, n);
3266
- });
3267
- var s = w(o);
3268
- P(s, 17, () => I(q).arcs, S, (e, t, n) => {
3269
- var r = cr();
3270
- let i;
3271
- C((e, n, a, o, s) => {
3272
- i = F(r, 0, "sv-grid-chart-arc svelte-kvdein", null, i, {
3273
- "is-selected": e,
3274
- "is-drillable": n
3275
- }), E(r, "d", I(t).path), E(r, "fill", I(t).color), N(r, a), E(r, "role", f.onSelect || I(X) || I(ka) && I(t).nodePath ? "button" : "img"), E(r, "tabindex", o), E(r, "aria-label", s);
3276
- }, [
3277
- () => wo(I(t).label, I(t).series),
3278
- () => I(ka) && !!I(t).nodePath && !!l(I(Oa), I(t).nodePath)?.children?.length,
3279
- () => `opacity:${Y(I($a) || I(H).type === "sunburst" || I(H).type === "chord" ? I(t).label : I(t).series)}`,
3280
- () => Cs(".sv-grid-chart-arc", n),
3281
- () => `${I(t).nodePath ? I(t).nodePath.join(" / ") : I(t).label}${I(t).series ? ` ${I(t).series}` : ""}: ${U(I(t).value)}`
3282
- ]), _("mousemove", r, (e) => ps(e.clientX, e.clientY, I(t))), x("mouseleave", r, Q), x("focus", r, (e) => {
3283
- ws(".sv-grid-chart-arc", n);
3284
- let r = Es(e.currentTarget);
3285
- ps(r.x, r.y, I(t));
3286
- }), x("blur", r, Q), _("click", r, (e) => {
3287
- I(t).nodePath && Ia(I(t).nodePath) || ys(I(t).label, I(t).series, I(t).value, void 0, e);
3288
- }), _("keydown", r, (e) => Ts(e, ".sv-grid-chart-arc", n, () => {
3289
- I(t).nodePath && Ia(I(t).nodePath) || (f.onSelect || I(X)) && ys(I(t).label, I(t).series, I(t).value, void 0, e);
3290
- })), m(e, r);
3291
- });
3292
- var c = w(s);
3293
- P(c, 17, () => I(q).arcs, S, (e, t) => {
3294
- var n = D(), r = g(n), i = (e) => {
3295
- var n = D(), r = g(n), i = (e) => {
3296
- var n = ar(), r = T(n, !0);
3297
- C((e) => {
3298
- E(n, "x", I(t).lx), E(n, "y", I(t).ly + 3), E(n, "text-anchor", I(t).lx < I(t).cx - 2 ? "end" : I(t).lx > I(t).cx + 2 ? "start" : "middle"), O(r, e);
3299
- }, [() => Ko(I(t).label, 14)]), m(e, n);
3300
- };
3301
- h(r, (e) => {
3302
- I(t).a1 - I(t).a0 > .12 && I(H).xAxis?.labels !== !1 && e(i);
3303
- }), m(e, n);
3304
- }, a = (e) => {
3305
- var n = lr(), r = T(n, !0);
3306
- C((e) => {
3307
- E(n, "x", I(t).lx), E(n, "y", I(t).ly), E(n, "fill", I(t).textColor), O(r, e);
3308
- }, [() => Ko(I(ni).show && I(H).type !== "sunburst" ? U(I(t).value) : I(t).label, 12)]), m(e, n);
3309
- };
3310
- h(r, (e) => {
3311
- I(H).type === "chord" ? e(i) : (I(t).a1 - I(t).a0) * (I(t).r0 + I(t).r1) / 2 > 34 && I(t).r1 - I(t).r0 > 12 && (I(H).type === "sunburst" || I(ni).show) && e(a, 1);
3312
- }), m(e, n);
3313
- }), m(e, t);
3314
- };
3315
- h(Kc, (e) => {
3316
- I(Za) && e(qc);
3317
- });
3318
- var Jc = w(Kc), Yc = (e) => {
3319
- var t = D(), n = g(t);
3320
- P(n, 17, () => I(q).bullets, S, (e, t) => {
3321
- var n = pr(), r = A(n);
3322
- P(r, 17, () => I(t).ranges, S, (e, n) => {
3323
- var r = dr();
3324
- C(() => {
3325
- E(r, "x", I(n).x), E(r, "y", I(t).y), E(r, "width", I(n).w), E(r, "height", I(t).h), E(r, "fill", I(n).color);
3326
- }), m(e, r);
3327
- });
3328
- var i = w(r), a = w(i), o = (e) => {
3329
- var n = fr();
3330
- C(() => {
3331
- E(n, "x1", I(t).targetX), E(n, "y1", I(t).y + I(t).h * .15), E(n, "x2", I(t).targetX), E(n, "y2", I(t).y + I(t).h * .85);
3332
- }), m(e, n);
3333
- };
3334
- h(a, (e) => {
3335
- I(t).targetX != null && e(o);
3336
- }), j(n), C(() => {
3337
- E(i, "x", I(t).x), E(i, "y", I(t).y + I(t).h * .3), E(i, "width", I(t).measureW), E(i, "height", I(t).h * .4), E(i, "fill", I(t).color);
3338
- }), _("mousemove", n, (e) => hs(e.clientX, e.clientY, I(t))), x("mouseleave", n, Q), m(e, n);
3339
- }), m(e, t);
3340
- };
3341
- h(Jc, (e) => {
3342
- I(Qa) && e(Yc);
3343
- });
3344
- var Xc = w(Jc);
3345
- P(Xc, 17, () => I(q).slices, S, (e, t, n) => {
3346
- var r = gr(), i = g(r);
3347
- let a;
3348
- var o = w(i), s = (e) => {
3349
- var n = mr(), r = g(n), i = w(r), a = T(i, !0);
3350
- C((e) => {
3351
- E(r, "points", `${I(t).callout.x1},${I(t).callout.y1} ${I(t).callout.x2},${I(t).callout.y2} ${I(t).callout.x3},${I(t).callout.y2}`), E(r, "stroke", I(t).color), E(i, "x", I(t).callout.tx), E(i, "y", I(t).callout.ty + 3.5), E(i, "text-anchor", I(t).callout.anchor), O(a, e);
3352
- }, [() => I(ni).formatter ? I(ni).formatter(I(t).value, {
3353
- category: I(t).label,
3354
- series: I(t).label
3355
- }) : `${Ko(I(t).label, Math.min(18, I(t).callout.maxChars))} ${I(t).percent.toFixed(0)}%`]), m(e, n);
3356
- }, c = (e) => {
3357
- var n = hr(), r = T(n);
3358
- C((e) => {
3359
- E(n, "x", I(t).cx), E(n, "y", I(t).cy), O(r, `${e ?? ""}%`);
3360
- }, [() => I(t).percent.toFixed(0)]), m(e, n);
3361
- };
3362
- h(o, (e) => {
3363
- I(t).callout ? e(s) : I(ni).show && I(ni).placement !== "outside" && I(t).percent >= 6 && e(c, 1);
3364
- }), C((e, n, r, o, s, c) => {
3365
- a = F(i, 0, "sv-grid-chart-slice svelte-kvdein", null, a, {
3366
- "is-selected": e,
3367
- "is-drillable": n
3368
- }), E(i, "d", I(t).path), E(i, "fill", I(t).color), N(i, r), E(i, "role", o), E(i, "tabindex", s), E(i, "aria-label", c);
3369
- }, [
3370
- () => wo(I(t).label, I(t).label),
3371
- () => Pa(I(t).label),
3372
- () => `opacity:${To(I(t).label, I(t).label)}`,
3373
- () => f.onSelect || I(X) || Pa(I(t).label) ? "button" : "img",
3374
- () => Cs(".sv-grid-chart-slice", n),
3375
- () => `${I(t).label}: ${U(I(t).value)}, ${I(t).percent.toFixed(1)}%${Pa(I(t).label) ? I(B).drillIn : ""}`
3376
- ]), _("mousemove", i, (e) => ls(e.clientX, e.clientY, I(t).label, I(t).value, I(t).percent)), x("mouseleave", i, Q), x("focus", i, (e) => {
3377
- ws(".sv-grid-chart-slice", n);
3378
- let r = Es(e.currentTarget);
3379
- ls(r.x, r.y, I(t).label, I(t).value, I(t).percent);
3380
- }), x("blur", i, Q), _("click", i, (e) => {
3381
- Pa(I(t).label) && Ia([...Ie(), I(t).label]) || ys(I(t).label, I(t).label, I(t).value, n, e);
3382
- }), _("keydown", i, (e) => {
3383
- Ls(e, n) || Ts(e, ".sv-grid-chart-slice", n, () => {
3384
- Pa(I(t).label) && Ia([...Ie(), I(t).label]) || (f.onSelect || I(X)) && ys(I(t).label, I(t).label, I(t).value, n, e);
3385
- });
3386
- }), m(e, r);
3387
- });
3388
- var Zc = w(Xc), Qc = (e) => {
3389
- var t = _r(), n = g(t), r = T(n, !0), i = w(n), a = T(i, !0);
3390
- C((e) => {
3391
- E(n, "x", I(q).donut.cx), E(n, "y", I(q).donut.cy - 4), O(r, e), E(i, "x", I(q).donut.cx), E(i, "y", I(q).donut.cy + 11), O(a, I(B).total);
3392
- }, [() => U(I(q).donut.total)]), m(e, t);
3393
- };
3394
- h(Zc, (e) => {
3395
- I(q).donut && e(Qc);
3396
- });
3397
- var $c = w(Zc), el = (e) => {
3398
- var t = D(), n = g(t), r = (e) => {
3399
- var t = vr();
3400
- C((e) => {
3401
- E(t, "x", I(q).plot.x), E(t, "y", I(q).plot.y), E(t, "width", I(q).plot.w), E(t, "height", I(q).plot.h), E(t, "role", f.onSelect ? "button" : "img"), E(t, "tabindex", v() ? 0 : void 0), E(t, "data-cat-index", I(_o)), E(t, "aria-label", e);
3402
- }, [() => V(I(B).densePoints, {
3403
- count: I(fo),
3404
- from: I(K).categories[0] ?? "",
3405
- to: I(K).categories[I(K).categories.length - 1] ?? ""
3406
- })]), _("mousemove", t, (e) => {
3407
- let t = go(e.clientX, e.currentTarget);
3408
- t != null && (b(_o, t, !0), ss(e.clientX, e.clientY, t));
3409
- }), x("mouseleave", t, Q), x("focus", t, (e) => cs(e.currentTarget, I(_o))), x("blur", t, Q), _("click", t, (e) => vs(e, I(_o))), _("keydown", t, vo), m(e, t);
3410
- }, i = (e) => {
3411
- var t = D(), n = g(t);
3412
- P(n, 19, () => I(K).categories, (e, t) => e + t, (e, t, n) => {
3413
- let r = M(() => I(q).lines[0]?.points), i = M(() => I(r)?.[I(n)]?.x), a = M(() => !I(co) && I(r) && I(r).length === I(K).categories.length && Number.isFinite(I(i))), o = M(() => I(a) && I(n) > 0 ? I(r)[I(n) - 1].x : null), s = M(() => I(a) && I(n) < I(r).length - 1 ? I(r)[I(n) + 1].x : null), c = M(() => I(a) ? I(o) == null ? I(q).plot.x : (I(o) + I(i)) / 2 : I(q).plot.x + I(lo) * I(n)), l = M(() => I(a) ? I(s) == null ? I(q).plot.x + I(q).plot.w : (I(i) + I(s)) / 2 : I(q).plot.x + I(lo) * (I(n) + 1));
3414
- var u = yr();
3415
- C((e, t) => {
3416
- E(u, "x", I(co) ? I(q).plot.x : I(c)), E(u, "y", I(co) ? I(q).plot.y + I(lo) * I(n) : I(q).plot.y), E(u, "width", e), E(u, "height", I(co) ? I(lo) : I(q).plot.h), E(u, "role", f.onSelect ? "button" : "img"), E(u, "tabindex", v() ? I(n) === 0 ? 0 : -1 : void 0), E(u, "data-cat-index", I(n)), E(u, "aria-label", t);
3417
- }, [() => I(co) ? I(q).plot.w : Math.max(0, I(l) - I(c)), () => `${I(t)}: ${es(I(n)).map((e) => `${e.label} ${e.value}`).join(", ")}`]), _("mousemove", u, (e) => ss(e.clientX, e.clientY, I(n), e.currentTarget)), x("mouseleave", u, Q), x("focus", u, (e) => cs(e.currentTarget, I(n))), x("blur", u, Q), _("click", u, (e) => vs(e, I(n))), _("keydown", u, (e) => xs(e, I(n))), m(e, u);
3418
- }), m(e, t);
3419
- };
3420
- h(n, (e) => {
3421
- I(uo) ? e(r) : e(i, -1);
3422
- }), m(e, t);
3423
- };
3424
- h($c, (e) => {
3425
- I(J) && !I(eo) && e(el);
3426
- });
3427
- var tl = w($c), nl = (e) => {
3428
- var t = br();
3429
- C(() => {
3430
- E(t, "x", I(Ri).x), E(t, "y", I(Ri).y), E(t, "width", I(Ri).w), E(t, "height", I(Ri).h);
3431
- }), m(e, t);
3432
- };
3433
- h(tl, (e) => {
3434
- I(Ri) && e(nl);
3435
- }), j($), me($, (e) => b(Fi, e), () => I(Fi));
3436
- var rl = w($, 2), il = (e) => {
3437
- let t = M(() => I(G).plot.x + I(Sa).t0 * I(G).plot.w), n = M(() => (I(Sa).t1 - I(Sa).t0) * I(G).plot.w);
3438
- var r = wr(), i = A(r);
3439
- E(i, "aria-valuemin", 0);
3440
- var a = A(i);
3441
- P(a, 17, () => I(G).lines, S, (e, t) => {
3442
- var n = Sr(), r = g(n), i = (e) => {
3443
- var n = xr();
3444
- C(() => {
3445
- E(n, "d", I(t).areaPath), E(n, "fill", I(t).color);
3446
- }), m(e, n);
3447
- };
3448
- h(r, (e) => {
3449
- I(t).areaPath && e(i);
3450
- });
3451
- var a = w(r);
3452
- C(() => {
3453
- E(a, "d", I(t).path), E(a, "stroke", I(t).color);
3454
- }), m(e, n);
3455
- });
3456
- var o = w(a);
3457
- P(o, 17, () => I(G).bars, S, (e, t) => {
3458
- var n = Cr();
3459
- C(() => {
3460
- E(n, "x", I(t).x), E(n, "y", I(t).y), E(n, "width", I(t).w), E(n, "height", I(t).h), E(n, "fill", I(t).color);
3461
- }), m(e, n);
3462
- });
3463
- var s = w(o), c = w(s), l = w(c), u = w(l), d = w(u);
3464
- j(i), j(r), C((e, r) => {
3465
- E(i, "viewBox", `0 0 ${I(G).width} ${I(G).height}`), E(i, "aria-label", I(B).rangeBrush), E(i, "aria-valuemax", e), E(i, "aria-valuenow", L()?.i0 ?? 0), E(i, "aria-valuetext", r), E(s, "x", I(G).plot.x), E(s, "y", I(G).plot.y), E(s, "width", I(t) - I(G).plot.x), E(s, "height", I(G).plot.h), E(c, "x", I(t) + I(n)), E(c, "y", I(G).plot.y), E(c, "width", I(G).plot.x + I(G).plot.w - (I(t) + I(n))), E(c, "height", I(G).plot.h), E(l, "x", I(t)), E(l, "y", I(G).plot.y), E(l, "width", I(n)), E(l, "height", I(G).plot.h), E(u, "x", I(t) - 4), E(u, "y", I(G).plot.y), E(u, "height", I(G).plot.h), E(d, "x", I(t) + I(n) - 4), E(d, "y", I(G).plot.y), E(d, "height", I(G).plot.h);
3466
- }, [() => Math.max(0, I(H).categories.length - 1), () => V(I(B).brushRange, {
3467
- from: I(H).categories[L()?.i0 ?? 0] ?? "",
3468
- to: I(H).categories[L()?.i1 ?? I(H).categories.length - 1] ?? ""
3469
- })]), _("pointermove", i, Ea), _("keydown", i, Os), _("pointerdown", l, (e) => Ta(e, "move")), _("pointerup", l, Da), x("pointercancel", l, Da), _("pointerdown", u, (e) => Ta(e, "left")), _("pointerup", u, Da), x("pointercancel", u, Da), _("pointerdown", d, (e) => Ta(e, "right")), _("pointerup", d, Da), x("pointercancel", d, Da), ve(r, "clientHeight", (e) => b(Qr, e)), m(e, r);
3470
- };
3471
- h(rl, (e) => {
3472
- I(ba) && I(G) && e(il);
3473
- });
3474
- var al = w(rl, 2), ol = (e) => {
3475
- var t = Tr(), n = T(t, !0);
3476
- C(() => O(n, I(B).noData)), m(e, t);
3477
- };
3478
- h(al, (e) => {
3479
- I(Ro) && e(ol);
3480
- });
3481
- var sl = w(al, 2), cl = (e) => {
3482
- var t = D(), n = g(t);
3483
- oe(n, () => I(js), (e, t) => {
3484
- t(e, {
3485
- get items() {
3486
- return I(Rs);
3487
- },
3488
- get x() {
3489
- return I(As).x;
3490
- },
3491
- get y() {
3492
- return I(As).y;
3493
- },
3494
- onClose: () => b(As, null)
3495
- });
3496
- }), m(e, t);
3497
- };
3498
- h(sl, (e) => {
3499
- I(As) && I(js) && e(cl);
3500
- });
3501
- var ll = w(sl, 2), ul = (e) => {
3502
- var t = Er();
3503
- ge(t), ce(() => be(t, () => I(Qi), (e) => b(Qi, e))), xe(t, (e) => ma?.(e)), C(() => {
3504
- E(t, "placeholder", I(B).noteText), E(t, "aria-label", I(B).noteText), N(t, `left:${I(Zi).left}px; top:${I(Zi).top}px;`);
3505
- }), _("keydown", t, (e) => {
3506
- e.key === "Enter" ? (e.preventDefault(), $i()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), b(Zi, null), b(Qi, ""));
3507
- }), x("blur", t, $i), m(e, t);
3508
- };
3509
- h(ll, (e) => {
3510
- I(Zi) && e(ul);
3511
- });
3512
- var dl = w(ll, 2), fl = (e) => {
3513
- var t = jr();
3514
- let n;
3515
- var r = A(t), i = (e) => {
3516
- var t = D(), n = g(t);
3517
- ue(n, () => f.tooltip, () => I(Xo).ctx), m(e, t);
3518
- }, a = (e) => {
3519
- var t = Ar(), n = g(t), r = T(n, !0), i = w(n, 2);
3520
- P(i, 17, () => I(Xo).rows, S, (e, t) => {
3521
- var n = kr(), r = A(n), i = (e) => {
3522
- var n = Dr();
3523
- C(() => N(n, `background:${I(t).color}`)), m(e, n);
3524
- };
3525
- h(r, (e) => {
3526
- I(t).color && e(i);
3527
- });
3528
- var a = w(r, 2), o = (e) => {
3529
- var n = Or(), r = T(n, !0);
3530
- C(() => O(r, I(t).label)), m(e, n);
3531
- };
3532
- h(a, (e) => {
3533
- I(t).label && e(o);
3534
- });
3535
- var s = w(a, 2), c = T(s, !0);
3536
- j(n), C(() => O(c, I(t).value)), m(e, n);
3537
- }), C(() => O(r, I(Xo).title)), m(e, t);
3538
- };
3539
- h(r, (e) => {
3540
- f.tooltip ? e(i) : e(a, -1);
3541
- }), j(t), C(() => {
3542
- n = F(t, 1, "sv-grid-chart-tooltip svelte-kvdein", null, n, {
3543
- "is-below": I(Xo).below,
3544
- "is-custom": !!f.tooltip,
3545
- "is-fixed": I(Xo).fixed,
3546
- "is-right": Se() === "top-right" || Se() === "bottom-right",
3547
- "is-bottom": Se() === "bottom-left" || Se() === "bottom-right",
3548
- "is-pinned": !!I(Zo)
3549
- }), N(t, `left:${I(Xo).left}px; top:${I(Xo).top}px;`);
3550
- }), m(e, t);
3551
- };
3552
- h(dl, (e) => {
3553
- I(Xo) && e(fl);
3554
- });
3555
- var pl = w(dl, 2), ml = (e) => {
3556
- var t = Fr();
3557
- let n;
3558
- var r = A(t);
3559
- P(r, 19, () => I(Lo), (e) => e.label, (e, t, n) => {
3560
- var r = Nr();
3561
- let i;
3562
- var a = A(r), o = (e) => {
3563
- var r = D(), i = g(r);
3564
- ue(i, () => f.legendItem, () => ({
3565
- label: I(t).label,
3566
- color: I(t).color,
3567
- off: I(t).off,
3568
- index: I(n)
3569
- })), m(e, r);
3570
- }, s = (e) => {
3571
- var n = Mr(), r = g(n), i = w(r);
3572
- C(() => {
3573
- N(r, `background:${I(t).off ? "transparent" : I(t).color}; border-color:${I(t).color}`), O(i, ` ${I(t).label ?? ""}`);
3574
- }), m(e, n);
3575
- };
3576
- h(a, (e) => {
3577
- f.legendItem ? e(o) : e(s, -1);
3578
- }), j(r), C(() => {
3579
- i = F(r, 1, "sv-grid-chart-legend-item svelte-kvdein", null, i, {
3580
- "is-off": I(t).off,
3581
- "is-isolated": I(di) === I(t).label
3582
- }), r.disabled = !v() || !I(Po), E(r, "aria-pressed", I(Po) ? !I(t).off : void 0), E(r, "title", v() ? `${I(t).off ? I(B).showSeries : I(B).hideSeries} ${I(t).label} \u00b7 ${I(B).isolateHint}` : I(t).label);
3583
- }), _("click", r, () => Bo(I(t).label)), _("dblclick", r, () => Vo(I(t).label)), x("pointerenter", r, () => v() && b(pi, I(t).label, !0)), x("pointerleave", r, () => b(pi, null)), m(e, r);
3584
- });
3585
- var i = w(r, 2), a = (e) => {
3586
- var t = Pr(), n = T(t, !0);
3587
- C((e) => O(n, e), [() => I(Fo) ? I(B).showLess : V(I(B).showMore, { n: I(ko).length - 10 })]), _("click", t, () => b(Fo, !I(Fo))), m(e, t);
3588
- };
3589
- h(i, (e) => {
3590
- I(Io) && e(a);
3591
- }), j(t), C(() => n = F(t, 1, "sv-grid-chart-legend svelte-kvdein", null, n, { "is-vertical": I(Jr) })), ve(t, "clientWidth", (e) => b(Xr, e)), ve(t, "clientHeight", (e) => b(Zr, e)), m(e, t);
3592
- };
3593
- h(pl, (e) => {
3594
- I(qr) && I(ko).length && e(ml);
3595
- });
3596
- var hl = w(pl, 2), gl = (e) => {
3597
- var t = Ir(), n = T(t, !0);
3598
- C(() => O(n, I(Oo))), m(e, t);
3599
- };
3600
- h(hl, (e) => {
3601
- ze() && e(gl);
3602
- });
3603
- var _l = w(hl, 2), vl = A(_l), yl = A(vl), bl = A(yl, !0), xl = w(bl), Sl = (e) => {
3604
- var t = se();
3605
- C((e) => O(t, e), [() => V(I(B).dataTableCapped, {
3606
- shown: mo,
3607
- total: I(Uo).rows.length
3608
- })]), m(e, t);
3609
- };
3610
- h(xl, (e) => {
3611
- I(Wo) && e(Sl);
3612
- });
3613
- var Cl = w(xl), wl = (e) => {
3614
- var t = se();
3615
- C(() => O(t, `. ${I(Xe) ?? ""}`)), m(e, t);
3616
- };
3617
- h(Cl, (e) => {
3618
- Be() && I(Xe) && e(wl);
3619
- }), j(yl);
3620
- var Tl = w(yl), El = A(Tl);
3621
- P(El, 20, () => I(Uo).cols, (e) => e, (e, t) => {
3622
- var n = Lr(), r = T(n, !0);
3623
- C(() => O(r, t)), m(e, n);
3624
- }), j(El), j(Tl);
3625
- var Dl = w(Tl);
3626
- P(Dl, 21, () => I(Go), S, (e, t) => {
3627
- var n = zr();
3628
- P(n, 21, () => I(t), S, (e, t) => {
3629
- var n = Rr(), r = T(n, !0);
3630
- C(() => O(r, I(t))), m(e, n);
3631
- }), j(n), m(e, n);
3632
- }), j(Dl), j(vl), j(_l), j(qs), me(qs, (e) => b(Jo, e), () => I(Jo)), C((e, a, o) => {
3633
- t = F($, 0, "sv-grid-chart-svg svelte-kvdein", null, t, {
3634
- "is-interactive": v(),
3635
- "is-clickable": !!f.onSelect || !!f.onDrill,
3636
- "is-zoomable": !!I(ri)?.drag && I(J) && !I(oi) && !I(ii),
3637
- "is-pannable": !!I(ri)?.pan && I(J) && I(xi) && I(ii),
3638
- "is-annotating": I(oi),
3639
- "is-dragging": !!I(Ii),
3640
- "is-drawing": !!I(Ji)
3641
- }), E($, "viewBox", `0 0 ${I(q).width} ${I(q).height}`), E($, "role", v() ? "group" : "img"), E($, "aria-label", a), E($, "aria-description", Be() && I(Xe) ? I(Xe) : void 0), E($, "aria-describedby", `${hi}-table`), n = N($, "", n, { height: qe() ? `${I(ti) ?? I(H).height ?? 300}px` : null }), r = F(uc, 0, "sv-grid-chart-marks svelte-kvdein", null, r, {
3642
- "is-enter-grow": I(Wa) === "grow",
3643
- "is-enter-none": I(Wa) === "none"
3644
- }), E(uc, "clip-path", I(J) ? `url(#${hi}-plot)` : void 0), i = F(Sc, 0, "sv-grid-chart-marks svelte-kvdein", null, i, {
3645
- "is-enter-grow": I(Wa) === "grow",
3646
- "is-enter-none": I(Wa) === "none"
3647
- }), E(Sc, "clip-path", I(J) ? `url(#${hi}-plot)` : void 0), E(vl, "id", `${hi}-table`), O(bl, o);
3648
- }, [
3649
- () => ee(I(H).style) || void 0,
3650
- () => V(I(B).chartLabel, { type: I(H).type }),
3651
- () => V(I(B).dataTable, { type: I(H).type })
3652
- ]), _("pointerdown", $, Vi), _("pointermove", $, (e) => {
3653
- Hi(e), ca(e);
3654
- }), _("pointerup", $, (e) => {
3655
- Ui(e), b(ea, null);
3656
- }), x("pointercancel", $, (e) => {
3657
- Ui(e), b(ea, null);
3658
- }), _("click", $, sa), _("keydown", $, da), x("wheel", $, Ai), _("contextmenu", $, Fs), _("dblclick", $, Wi), ve(qs, "clientWidth", (e) => b(Vr, e)), ve(qs, "clientHeight", (e) => b(Hr, e));
3659
- }
3660
- return C((e, t, n) => {
3661
- Js = F(qs, 1, "sv-grid-chart svelte-kvdein", null, Js, {
3662
- "is-autosize": qe(),
3663
- "is-legend-top": I(qr) === "top",
3664
- "is-legend-left": I(qr) === "left",
3665
- "is-legend-right": I(qr) === "right"
3666
- }), N(qs, e);
3667
- }, [
3668
- () => ee(I(H).style) || void 0,
3669
- () => V(I(B).chartLabel, { type: I(H).type }),
3670
- () => V(I(B).dataTable, { type: I(H).type })
3671
- ]), m(ne, qs), _e(Ks);
3672
- }
3673
- le([
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 };