apexcharts 8.2.0 → 8.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +19793 -19713
- package/dist/apexcharts.core.min.js +2 -2
- package/dist/apexcharts.css +38 -8
- package/dist/apexcharts.esm.js +1882 -1625
- package/dist/apexcharts.full.js +22044 -21634
- package/dist/apexcharts.full.min.js +2 -2
- package/dist/apexcharts.js +21414 -21124
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +21413 -21123
- package/dist/area.common.js +2 -2
- package/dist/area.esm.js +91 -40
- package/dist/bar.common.js +2 -2
- package/dist/bar.esm.js +478 -406
- package/dist/bar.js +2 -2
- package/dist/boxPlot.common.js +2 -2
- package/dist/boxPlot.esm.js +409 -334
- package/dist/bubble.common.js +2 -2
- package/dist/bubble.esm.js +91 -40
- package/dist/candlestick.common.js +2 -2
- package/dist/candlestick.esm.js +409 -334
- package/dist/candlestick.js +2 -2
- package/dist/column.common.js +2 -2
- package/dist/column.esm.js +478 -406
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +19793 -19713
- package/dist/donut.common.js +2 -2
- package/dist/donut.esm.js +3 -9
- package/dist/dumbbell.common.js +2 -2
- package/dist/dumbbell.esm.js +478 -406
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +442 -324
- package/dist/features/annotations.common.js +2 -2
- package/dist/features/annotations.esm.js +65 -48
- package/dist/features/annotations.js +2 -2
- package/dist/features/context-menu.common.js +1 -1
- package/dist/features/context-menu.esm.js +1 -1
- package/dist/features/context-menu.js +1 -1
- package/dist/features/drilldown.common.js +2 -2
- package/dist/features/drilldown.esm.js +4 -2
- package/dist/features/drilldown.js +2 -2
- package/dist/features/dumbbell.common.js +1 -1
- package/dist/features/dumbbell.esm.js +1 -1
- package/dist/features/dumbbell.js +1 -1
- package/dist/features/exports.common.js +2 -2
- package/dist/features/exports.esm.js +10 -4
- package/dist/features/exports.js +2 -2
- package/dist/features/facet.common.js +1 -1
- package/dist/features/facet.esm.js +1 -1
- package/dist/features/facet.js +1 -1
- package/dist/features/highlight-filter.common.js +2 -2
- package/dist/features/highlight-filter.esm.js +14 -9
- package/dist/features/highlight-filter.js +2 -2
- package/dist/features/history.common.js +1 -1
- package/dist/features/history.esm.js +1 -1
- package/dist/features/history.js +1 -1
- package/dist/features/ink.common.js +1 -1
- package/dist/features/ink.esm.js +1 -1
- package/dist/features/ink.js +1 -1
- package/dist/features/keyboard.common.js +2 -2
- package/dist/features/keyboard.esm.js +97 -145
- package/dist/features/keyboard.js +2 -2
- package/dist/features/legend.common.js +2 -2
- package/dist/features/legend.esm.js +64 -44
- package/dist/features/legend.js +2 -2
- package/dist/features/link.common.js +1 -1
- package/dist/features/link.esm.js +1 -1
- package/dist/features/link.js +1 -1
- package/dist/features/marks.common.js +1 -1
- package/dist/features/marks.esm.js +1 -1
- package/dist/features/marks.js +1 -1
- package/dist/features/measure.common.js +1 -1
- package/dist/features/measure.esm.js +1 -1
- package/dist/features/measure.js +1 -1
- package/dist/features/morph.common.js +2 -2
- package/dist/features/morph.esm.js +9 -5
- package/dist/features/morph.js +2 -2
- package/dist/features/perspectives.common.js +2 -2
- package/dist/features/perspectives.esm.js +4 -1
- package/dist/features/perspectives.js +2 -2
- package/dist/features/raincloud.common.js +2 -2
- package/dist/features/raincloud.esm.js +26 -27
- package/dist/features/raincloud.js +2 -2
- package/dist/features/renderer-canvas.common.js +2 -2
- package/dist/features/renderer-canvas.esm.js +2 -1
- package/dist/features/renderer-canvas.js +2 -2
- package/dist/features/stats.common.js +2 -2
- package/dist/features/stats.esm.js +52 -59
- package/dist/features/stats.js +2 -2
- package/dist/features/storyboard.common.js +2 -2
- package/dist/features/storyboard.esm.js +4 -1
- package/dist/features/storyboard.js +2 -2
- package/dist/features/streamgraph.common.js +2 -2
- package/dist/features/streamgraph.esm.js +48 -14
- package/dist/features/streamgraph.js +2 -2
- package/dist/features/toolbar.common.js +2 -2
- package/dist/features/toolbar.esm.js +148 -18
- package/dist/features/toolbar.js +2 -2
- package/dist/features/trellis.common.js +2 -2
- package/dist/features/trellis.esm.js +150 -63
- package/dist/features/trellis.js +2 -2
- package/dist/features/waterfall.common.js +1 -1
- package/dist/features/waterfall.esm.js +1 -1
- package/dist/features/waterfall.js +1 -1
- package/dist/features/weave.common.js +2 -2
- package/dist/features/weave.esm.js +13 -12
- package/dist/features/weave.js +2 -2
- package/dist/full.common.js +2 -2
- package/dist/full.esm.js +1068 -842
- package/dist/heatmap.common.js +2 -2
- package/dist/heatmap.esm.js +3 -17
- package/dist/heatmap.js +2 -2
- package/dist/histogram.common.js +2 -2
- package/dist/histogram.esm.js +529 -464
- package/dist/icicle.common.js +2 -2
- package/dist/icicle.esm.js +80 -46
- package/dist/icicle.js +2 -2
- package/dist/line.common.js +2 -2
- package/dist/line.esm.js +91 -40
- package/dist/line.js +2 -2
- package/dist/locales/en.json +2 -1
- package/dist/locales/ro.json +3 -2
- package/dist/pictograms.common.js +1 -1
- package/dist/pictograms.esm.js +1 -1
- package/dist/pictograms.js +1 -1
- package/dist/pie.common.js +2 -2
- package/dist/pie.esm.js +3 -9
- package/dist/pie.js +2 -2
- package/dist/polarArea.common.js +2 -2
- package/dist/polarArea.esm.js +3 -9
- package/dist/radar.common.js +2 -2
- package/dist/radar.esm.js +5 -4
- package/dist/radar.js +2 -2
- package/dist/radialBar.common.js +2 -2
- package/dist/radialBar.esm.js +5 -12
- package/dist/radialBar.js +2 -2
- package/dist/raincloud.common.js +2 -2
- package/dist/raincloud.esm.js +97 -52
- package/dist/rangeArea.common.js +2 -2
- package/dist/rangeArea.esm.js +91 -40
- package/dist/rangeBar.common.js +2 -2
- package/dist/rangeBar.esm.js +478 -406
- package/dist/scatter.common.js +2 -2
- package/dist/scatter.esm.js +91 -40
- package/dist/streamgraph.common.js +2 -2
- package/dist/streamgraph.esm.js +138 -53
- package/dist/sunburst.common.js +2 -2
- package/dist/sunburst.esm.js +116 -94
- package/dist/sunburst.js +2 -2
- package/dist/treemap.common.js +2 -2
- package/dist/treemap.esm.js +138 -104
- package/dist/treemap.js +2 -2
- package/dist/unit-shapes.common.js +1 -1
- package/dist/unit-shapes.esm.js +1 -1
- package/dist/unit-shapes.js +1 -1
- package/dist/unit.common.js +2 -2
- package/dist/unit.esm.js +280 -202
- package/dist/unit.js +2 -2
- package/dist/violin.common.js +2 -2
- package/dist/violin.esm.js +72 -26
- package/dist/violin.js +2 -2
- package/dist/waterfall.common.js +2 -2
- package/dist/waterfall.esm.js +477 -405
- package/package.json +1 -1
- package/src/apexcharts.js +40 -59
- package/src/assets/apexcharts.css +38 -8
- package/src/charts/Bar.js +62 -55
- package/src/charts/BarStacked.js +80 -88
- package/src/charts/BoxCandleStick.js +28 -31
- package/src/charts/Icicle.js +68 -47
- package/src/charts/Line.js +118 -42
- package/src/charts/Pie.js +2 -8
- package/src/charts/Radar.js +5 -7
- package/src/charts/Radial.js +2 -6
- package/src/charts/RangeBar.js +47 -43
- package/src/charts/Sunburst.js +101 -98
- package/src/charts/Treemap.js +150 -88
- package/src/charts/Unit.js +368 -250
- package/src/charts/Violin.js +48 -30
- package/src/charts/common/Breadcrumb.js +2 -2
- package/src/charts/common/Hierarchy.js +32 -11
- package/src/charts/common/Jitter.js +32 -7
- package/src/charts/common/Stats.js +30 -23
- package/src/charts/common/bar/DataLabels.js +76 -81
- package/src/charts/common/bar/Helpers.js +43 -7
- package/src/charts/common/line/Helpers.js +12 -15
- package/src/charts/common/partition/NodeTooltip.js +29 -7
- package/src/charts/common/partition/Partition.js +33 -1
- package/src/charts/common/treemap/Helpers.js +3 -11
- package/src/charts/common/treemap/Nested.js +2 -3
- package/src/features/raincloud.js +16 -10
- package/src/features/stats.js +67 -62
- package/src/locales/en.json +2 -1
- package/src/locales/ro.json +3 -2
- package/src/modules/Animations.js +102 -95
- package/src/modules/AxisMapping.js +47 -12
- package/src/modules/Core.js +4 -0
- package/src/modules/CoreUtils.js +18 -42
- package/src/modules/Data.js +23 -24
- package/src/modules/DataLabels.js +6 -6
- package/src/modules/Exports.js +12 -5
- package/src/modules/Fill.js +17 -8
- package/src/modules/Filters.js +50 -50
- package/src/modules/Graphics.js +69 -51
- package/src/modules/Markers.js +3 -1
- package/src/modules/MorphTypeChange.js +13 -7
- package/src/modules/Range.js +44 -29
- package/src/modules/RendererController.js +17 -3
- package/src/modules/Scales.js +32 -9
- package/src/modules/Series.js +41 -19
- package/src/modules/Theme.js +1 -1
- package/src/modules/Toolbar.js +3 -2
- package/src/modules/UnitMarkRegistry.js +0 -5
- package/src/modules/ZoomPanSelection.js +123 -2
- package/src/modules/accessibility/KeyboardNavigation.js +114 -186
- package/src/modules/animations/Easing.js +2 -1
- package/src/modules/animations/LengthTransition.js +22 -2
- package/src/modules/annotations/Helpers.js +68 -52
- package/src/modules/axes/Grid.js +21 -7
- package/src/modules/axes/YAxis.js +8 -9
- package/src/modules/dimensions/Dimensions.js +9 -3
- package/src/modules/dimensions/Grid.js +2 -2
- package/src/modules/dimensions/XAxis.js +2 -5
- package/src/modules/drilldown/Breadcrumb.js +5 -2
- package/src/modules/helpers/Destroy.js +1 -1
- package/src/modules/helpers/UpdateHelpers.js +33 -15
- package/src/modules/highlightFilter/HighlightFilter.js +8 -9
- package/src/modules/highlightFilter/TreemapPart.js +2 -2
- package/src/modules/legend/HeatmapGradientLegend.js +76 -45
- package/src/modules/legend/Helpers.js +8 -1
- package/src/modules/legend/Legend.js +11 -12
- package/src/modules/license/LicenseEnforcer.js +5 -0
- package/src/modules/settings/Defaults.js +28 -56
- package/src/modules/settings/Globals.js +5 -0
- package/src/modules/settings/Options.js +7 -7
- package/src/modules/settings/TypeAliases.js +33 -16
- package/src/modules/streamgraph/StreamLabels.js +1 -0
- package/src/modules/tooltip/Labels.js +73 -76
- package/src/modules/tooltip/Marker.js +25 -21
- package/src/modules/tooltip/Position.js +88 -51
- package/src/modules/tooltip/Tooltip.js +242 -255
- package/src/modules/tooltip/Utils.js +71 -130
- package/src/modules/tooltip/constants.js +5 -5
- package/src/modules/trellis/Trellis.js +6 -0
- package/src/modules/trellis/TrellisChrome.js +18 -7
- package/src/modules/trellis/TrellisSync.js +2 -0
- package/src/modules/trellis/TrellisTooltip.js +2 -11
- package/src/modules/weave/WeaveHost.js +18 -12
- package/src/renderers/canvas/CanvasGraphics.js +1 -0
- package/src/ssr/DOMShim.js +10 -0
- package/src/svg/SVGFilter.js +26 -17
- package/src/types/internal.d.ts +9 -3
- package/src/utils/Utils.js +0 -14
- package/types/apexcharts.d.ts +33 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v8.
|
|
2
|
+
* ApexCharts v8.3.1
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
|
-
"use strict";var t=Object.defineProperty,r=Object.defineProperties,e=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,i=(r,e,n)=>e in r?t(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n,a=(t,r)=>{for(var e in r||(r={}))s.call(r,e)&&i(t,e,r[e]);if(n)for(var e of n(r))o.call(r,e)&&i(t,e,r[e]);return t},l=(t,n)=>r(t,e(n));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function u(t){if(t&&t.__esModule)return t;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const e in t)if("default"!==e){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:()=>t[e]})}return r.default=t,Object.freeze(r)}const c=u(require("apexcharts/core")),f=c.__apex_Utils,h="__apexcharts_series_transforms__";function d(t,r){t&&"string"==typeof t?"function"==typeof r?globalThis[h][t]=r:console.warn(`ApexCharts: registerSeriesTransform("${t}") expects a function (series, w) => series.`):console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.")}globalThis[h]||(globalThis[h]={});const y="__apexcharts_row_sources__";function g(t,r){t&&"string"==typeof t?"function"==typeof r?globalThis[y][t]=r:console.warn(`ApexCharts: registerRowSource("${t}") expects a function (w, opts) => series.`):console.warn("ApexCharts: registerRowSource requires a non-empty name.")}function p(t){return(t.collapsedSeriesIndices||[]).concat(t.ancillaryCollapsedSeriesIndices||[])}function b(t,r){const e=(r.collapsedSeries||[]).concat(r.ancillaryCollapsedSeries||[]);return t.map((t,r)=>{const i=t||{},{hidden:u}=i,c=((t,r)=>{var e={};for(var i in t)s.call(t,i)&&r.indexOf(i)<0&&(e[i]=t[i]);if(null!=t&&n)for(var i of n(t))r.indexOf(i)<0&&o.call(t,i)&&(e[i]=t[i]);return e})(i,["hidden"]);let f=c.data;if(Array.isArray(f)&&!f.length){const t=e.find(t=>t.index===r);t&&Array.isArray(t.data)&&(f=t.data)}return l(a({},c),{data:Array.isArray(f)?f.slice():f})})}globalThis[y]||(globalThis[y]={});function m(t,r){const e=t.length;if(0===e)return NaN;if(1===e)return t[0];const n=(e-1)*r,s=Math.floor(n),o=Math.ceil(n);return s===o?t[s]:t[s]+(t[o]-t[s])*(n-s)}function A(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r);let n=e[0],s=e[e.length-1];const o=r.range;if(Array.isArray(o)&&2===o.length){const t=Number(o[0]),r=Number(o[1]);Number.isFinite(t)&&Number.isFinite(r)&&r>t&&(n=t,s=r)}if(!(s>n)){const t=Math.abs(n)>0?.05*Math.abs(n):.5;return{edges:[n-t,n+t],binWidth:2*t,rule:"single",capped:!1}}const i=s-n;let a,l;if("number"==typeof r.binWidth&&r.binWidth>0)a=r.binWidth,l="binWidth";else if("number"==typeof r.bins&&r.bins>=1)a=i/Math.floor(r.bins),l="count";else{const t=function(t,r,e){const n=t.length,s=t=>r/Math.max(1,Math.ceil(t)),o=()=>s(Math.log2(n)+1);switch(e){case"sqrt":return{width:s(Math.sqrt(n)),rule:"sqrt"};case"rice":return{width:s(2*Math.cbrt(n)),rule:"rice"};case"scott":{const r=function(t){const r=t.length;if(r<2)return 0;let e=0;for(let n=0;n<r;n++)e+=t[n];const n=e/r;let s=0;for(let e=0;e<r;e++){const r=t[e]-n;s+=r*r}return Math.sqrt(s/r)}(t);return r>0?{width:3.49*r*Math.pow(n,-1/3),rule:"scott"}:{width:o(),rule:"sturges"}}case"fd":{const r=m(t,.75)-m(t,.25);return r>0?{width:2*r*Math.pow(n,-1/3),rule:"fd"}:{width:o(),rule:"sturges"}}case"auto":{const r=o(),e=m(t,.75)-m(t,.25);if(e<=0)return{width:r,rule:"sturges"};const s=2*e*Math.pow(n,-1/3);return s<r?{width:s,rule:"fd"}:{width:r,rule:"sturges"}}default:return{width:o(),rule:"sturges"}}}(e,i,"string"==typeof r.bins?r.bins:"auto");a=t.width,l=t.rule}(!Number.isFinite(a)||a<=0)&&(a=i);let u=Math.ceil(i/a);(!Number.isFinite(u)||u<1)&&(u=1);let c=!1;u>1e3&&(u=1e3,c=!0),a=i/u;const f=new Array(u+1);for(let t=0;t<=u;t++)f[t]=n+t*a;return f[u]=Math.max(f[u],s),{edges:f,binWidth:a,rule:l,capped:c}}function w(t,r){const e=r.length-1;if(!(t>=r[0])||t>r[e])return-1;if(t===r[e])return e-1;const n=(r[e]-r[0])/e;if(n>0){let s=Math.floor((t-r[0])/n);return s<0&&(s=0),s>e-1&&(s=e-1),t<r[s]?s--:t>=r[s+1]&&s++,s<0||s>e-1?-1:s}let s=0,o=e-1;for(;s<=o;){const e=s+o>>1;if(t<r[e])o=e-1;else{if(!(t>=r[e+1]))return e;s=e+1}}return-1}function v(t,r){const e=Math.max(0,r.length-1),n=new Array(e);for(let t=0;t<e;t++)n[t]=[];for(let e=0;e<t.length;e++){const s=w(t[e],r);s>=0&&n[s].push(t[e])}return n}function x(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=e.length;let s=r.bandwidth;if(!("number"==typeof s&&s>0)){const t=function(t){const r=t.length;if(r<2)return 0;let e=0;for(let n=0;n<r;n++)e+=t[n];const n=e/r;let s=0;for(let e=0;e<r;e++){const r=t[e]-n;s+=r*r}return Math.sqrt(s/r)}(e),r=m(e,.75)-m(e,.25);s=.9*(r>0?Math.min(t,r/1.349):t)*Math.pow(n,-.2)}if(!isFinite(s)||s<=0){const t=e[0],r=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-r,0],[t,1],[t+r,0]],bandwidth:r}}const o=Math.max(8,Math.floor(r.resolution||64)),i=e[0]-2*s,a=(e[n-1]+2*s-i)/(o-1),l=1/(n*s*Math.sqrt(2*Math.PI)),u=[];for(let t=0;t<o;t++){const r=i+t*a;let o=0;for(let t=0;t<n;t++){const n=(r-e[t])/s;o+=Math.exp(-.5*n*n)}u.push([r,o*l])}return{density:u,bandwidth:s}}function M(t,r){var e;if(!t||"object"!=typeof t||Array.isArray(t))return null;let n=null;if(Array.isArray(t.points)?n=t.points:Array.isArray(null==(e=t.y)?void 0:e.points)?n=t.y.points:r&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(n=t.y),!n)return null;const s=[];for(let t=0;t<n.length;t++){const r=f.parseNumber(n[t]);null!==r&&isFinite(r)&&s.push(r)}return s.length?s:null}function O(t,r){var e,n;const s=null!=(e=t.statsDerived)?e:t.statsDerived={};return null!=(n=s[r])?n:s[r]=new Map}function S(t,r,e){const n=t.get(r);if(!n||!Array.isArray(e)||n.length!==e.length)return!1;for(let t=0;t<e.length;t++){const r=n[t],s=e[t];if(r!==s&&(!Array.isArray(r)||!Array.isArray(s)||r[0]!==s[0]||r[1]!==s[1]))return!1}return!0}function P(t){const r=[];if(!Array.isArray(t))return r;for(let e=0;e<t.length;e++){const n=t[e];let s=n;Array.isArray(n)?s=1===n.length?n[0]:n[1]:n&&"object"==typeof n&&(s=void 0!==n.y?n.y:n.x);const o=f.parseNumber(s);null!==o&&isFinite(o)&&r.push(o)}return r}function _(t,r){var e;const n=r.config,s=r.globals;if(!Array.isArray(t))return t;s.histogramRawSeries||(s.histogramRawSeries=b(t,s));const o=s.histogramRawSeries,i=(null==(e=n.plotOptions)?void 0:e.histogram)||{},u=o.map(t=>P(null==t?void 0:t.data));let c=[];if(1===u.length)c=u[0];else for(const t of u)c=c.concat(t);const f=A(c,{bins:i.bins,binWidth:i.binWidth,range:i.range});if(!f)return r.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},o;const{edges:h,binWidth:d}=f,y=u.map(t=>function(t,r){const e=new Array(Math.max(0,r.length-1)).fill(0);for(let n=0;n<t.length;n++){const s=w(t[n],r);s>=0&&e[s]++}return e}(t,h));r.histogramData={edges:h,binWidth:d,counts:y,rule:f.rule,capped:f.capped};const g=p(s);return r.seriesObservations=u.map((t,r)=>({values:t,byPoint:-1!==g.indexOf(r)?[]:v(t,h)})),o.map((t,r)=>{if(-1!==g.indexOf(r))return l(a({},t),{data:[]});const e=function(t,r={}){let e=t.slice();if(r.cumulative){let t=0;e=e.map(r=>t+=r)}const n=t.reduce((t,r)=>t+r,0);if(n<=0)return e;if("relative"===r.normalize)return e.map(t=>t/n*100);if("density"===r.normalize){const t=r.binWidth;if("number"==typeof t&&t>0)return e.map(r=>r/(n*t))}return e}(y[r],{normalize:i.normalize,cumulative:i.cumulative,binWidth:d}),n=[];for(let t=0;t<e.length;t++)n.push({x:(h[t]+h[t+1])/2,y:e[t]});return l(a({},t),{data:n})})}function $(t,r){var e,n;if(!Array.isArray(t))return t;const s=(null==(n=null==(e=r.config.plotOptions)?void 0:e.boxPlot)?void 0:n.whiskers)||"minmax",o=O(r,"boxPlot"),i=[],u=t.map((t,r)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&"boxPlot"!==t.type)return t;let e=!1;const n=new Array(t.data.length).fill(null),u=t.data.map((t,i)=>{const u=r+":"+i;if(Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&!S(o,u,t.y))return t;const c=M(t,!1);if(!c)return t;const f=function(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=m(e,.25),s=m(e,.5),o=m(e,.75),i=o-n;let a=e[0],l=e[e.length-1],u=[];if("tukey"===r.whiskers&&i>0){const t=n-1.5*i,r=o+1.5*i;let s=0;for(;s<e.length&&e[s]<t;)s++;let c=e.length-1;for(;c>=0&&e[c]>r;)c--;s<=c&&(a=e[s],l=e[c],u=e.slice(0,s).concat(e.slice(c+1)))}return{summary:[a,n,s,o,l],outliers:u,iqr:i}}(c,{whiskers:s});return f?(e=!0,n[i]=c,o.set(u,f.summary),l(a({},t),{y:f.summary,points:c})):t});return e&&(i[r]=n),e?l(a({},t),{data:u}):t});return R(r,i,t.length),u}function j(t,r){var e,n;if(!Array.isArray(t))return t;const s=(null==(n=null==(e=r.config.plotOptions)?void 0:e.violin)?void 0:n.kde)||{},o=O(r,"violin"),i=[],u=t.map((t,r)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&"violin"!==t.type)return t;let e=!1;const n=new Array(t.data.length).fill(null),u=t.data.map((t,i)=>{var u;const c=r+":"+i;if(Array.isArray(null==(u=null==t?void 0:t.y)?void 0:u.density)&&t.y.density.length&&!S(o,c,t.y.density))return t;const f=M(t,!0);if(!f)return t;const h=x(f,{bandwidth:s.bandwidth,resolution:s.resolution});if(!h)return t;e=!0,n[i]=f;const d=t.y&&"object"==typeof t.y&&!Array.isArray(t.y)?t.y:{};return o.set(c,h.density),l(a({},t),{y:l(a({},d),{density:h.density,points:f})})});return e&&(i[r]=n),e?l(a({},t),{data:u}):t});return R(r,i,t.length),u}function R(t,r,e){if(!r.length)return;const n=[];for(let t=0;t<e;t++){const e=r[t];if(!e){n.push(null);continue}const s=[];for(const t of e)if(t)for(let r=0;r<t.length;r++)s.push(t[r]);n.push({values:s,byPoint:e})}t.seriesObservations=n}function D(t,r,e){const n=e&&null!=e.maxRows?e.maxRows:3e3,s=function(t,r){let e=0,n=0;for(const r of t)e+=r.length,r.length>n&&(n=r.length);if(e<=r)return{clusters:t,stride:1,total:e,kept:e};const s=r=>{let e=0;for(const n of t)e+=Math.ceil(n.length/r);return e};let o=Math.max(2,Math.ceil(e/r));for(;o<n&&s(o)>r;)o++;let i=0;return{clusters:t.map(t=>{const r=[];for(let e=0;e<t.length;e+=o)r.push(t[e]);return i+=r.length,r}),stride:o,total:e,kept:i}}(r.map(t=>t.rows),n);s.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${s.total} rows to ${s.kept} (every ${s.stride}${2===s.stride?"nd":3===s.stride?"rd":"th"} row) to stay under maxRows=${n}. Raise maxRows to draw more.`);const o=t.globals&&t.globals.colors||[];return r.map((t,r)=>{const e=o[t.realIndex]||o[0];return{name:t.name,data:s.clusters[r].map((n,s)=>a({id:`${t.realIndex}:${r}:${s}`,x:t.name,y:n},e?{fillColor:e}:{}))}})}function N(t,r){const e=t.globals,n=t.histogramData,s=e&&e.histogramRawSeries;if(!n||!Array.isArray(n.edges)||n.edges.length<2)return null;if(!Array.isArray(s)||!s.length)return null;const o=p(e),i=n.edges,a=[];return s.forEach((r,e)=>{var n;if(-1!==o.indexOf(e))return;const l=v(P(r&&r.data),i),u=t.seriesData&&(null==(n=t.seriesData.seriesNames)?void 0:n[e])||(null==r?void 0:r.name);l.forEach((t,r)=>{const n=`${T(i[r])}-${T(i[r+1])}`;a.push({name:s.length>1&&u?`${u} ${n}`:n,realIndex:e,rows:t})})}),a.length?D(t,a,r):null}function T(t){if(!isFinite(t))return String(t);const r=Math.round(t);return Math.abs(t-r)<1e-6?String(r):String(Number(t.toFixed(2)))}function W(t){return(r,e)=>{var n;const s=t(r);if(!Array.isArray(s)||!s.length)return null;const o=r.globals?p(r.globals):[],i=r.globals&&((null==(n=r.globals.categoryLabels)?void 0:n.length)?r.globals.categoryLabels:r.globals.labels)||[],a=[];return s.forEach((t,e)=>{var n;if(-1!==o.indexOf(e))return;if(!Array.isArray(t))return;const l=r.seriesData&&(null==(n=r.seriesData.seriesNames)?void 0:n[e]);t.forEach((t,r)=>{const n=null!=i[r]?String(i[r]):`#${r+1}`;a.push({name:s.length>1&&l?`${l} ${n}`:n,realIndex:e,rows:Array.isArray(t)?t.slice():[]})})}),a.length?D(r,a,e):null}}const q=W(t=>{var r;return null==(r=t.candleData)?void 0:r.seriesBoxPoints}),F=W(t=>{var r;return null==(r=t.violinData)?void 0:r.seriesViolinPoints});d("histogram",_),d("boxPlot",$),d("violin",j),g("histogram",N),g("boxPlot",q),g("violin",F),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default}),exports.boxPlotRows=q,exports.boxPlotTransform=$,exports.histogramRows=N,exports.histogramTransform=_,exports.violinRows=F,exports.violinTransform=j;
|
|
5
|
+
"use strict";var t=Object.defineProperty,e=Object.defineProperties,r=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,i=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,a=(t,e)=>{for(var r in e||(e={}))s.call(e,r)&&i(t,r,e[r]);if(n)for(var r of n(e))o.call(e,r)&&i(t,r,e[r]);return t},l=(t,n)=>e(t,r(n));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function u(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const r in t)if("default"!==r){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}return e.default=t,Object.freeze(e)}const c=u(require("apexcharts/core")),f=c.__apex_Utils,h="__apexcharts_series_transforms__";function d(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[h][t]=e:console.warn(`ApexCharts: registerSeriesTransform("${t}") expects a function (series, w) => series.`):console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.")}globalThis[h]||(globalThis[h]={});const y="__apexcharts_row_sources__";function g(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[y][t]=e:console.warn(`ApexCharts: registerRowSource("${t}") expects a function (w, opts) => series.`):console.warn("ApexCharts: registerRowSource requires a non-empty name.")}function p(t){return(t.collapsedSeriesIndices||[]).concat(t.ancillaryCollapsedSeriesIndices||[])}function b(t,e){const r=(e.collapsedSeries||[]).concat(e.ancillaryCollapsedSeries||[]);return t.map((t,e)=>{const i=t||{},{hidden:u}=i,c=((t,e)=>{var r={};for(var i in t)s.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(null!=t&&n)for(var i of n(t))e.indexOf(i)<0&&o.call(t,i)&&(r[i]=t[i]);return r})(i,["hidden"]);let f=c.data;if(Array.isArray(f)&&!f.length){const t=r.find(t=>t.index===e);t&&Array.isArray(t.data)&&(f=t.data)}return l(a({},c),{data:Array.isArray(f)?f.slice():f})})}globalThis[y]||(globalThis[y]={});function m(t,e){const r=t.length;if(0===r)return NaN;if(1===r)return t[0];const n=(r-1)*e,s=Math.floor(n),o=Math.ceil(n);return s===o?t[s]:t[s]+(t[o]-t[s])*(n-s)}function w(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const r=t.slice().sort((t,e)=>t-e);let n=r[0],s=r[r.length-1];const o=e.range;if(Array.isArray(o)&&2===o.length){const t=Number(o[0]),e=Number(o[1]);Number.isFinite(t)&&Number.isFinite(e)&&e>t&&(n=t,s=e)}if(!(s>n)){const t=Math.abs(n)>0?.05*Math.abs(n):.5;return{edges:[n-t,n+t],binWidth:2*t,rule:"single",capped:!1}}const i=s-n;let a,l;if("number"==typeof e.binWidth&&e.binWidth>0)a=e.binWidth,l="binWidth";else if("number"==typeof e.bins&&e.bins>=1)a=i/Math.floor(e.bins),l="count";else{const t=function(t,e,r){const n=t.length,s=t=>e/Math.max(1,Math.ceil(t)),o=()=>s(Math.log2(n)+1);switch(r){case"sqrt":return{width:s(Math.sqrt(n)),rule:"sqrt"};case"rice":return{width:s(2*Math.cbrt(n)),rule:"rice"};case"scott":{const e=function(t){const e=t.length;if(e<2)return 0;let r=0;for(let n=0;n<e;n++)r+=t[n];const n=r/e;let s=0;for(let r=0;r<e;r++){const e=t[r]-n;s+=e*e}return Math.sqrt(s/e)}(t);return e>0?{width:3.49*e*Math.pow(n,-1/3),rule:"scott"}:{width:o(),rule:"sturges"}}case"fd":{const e=m(t,.75)-m(t,.25);return e>0?{width:2*e*Math.pow(n,-1/3),rule:"fd"}:{width:o(),rule:"sturges"}}case"auto":{const e=o(),r=m(t,.75)-m(t,.25);if(r<=0)return{width:e,rule:"sturges"};const s=2*r*Math.pow(n,-1/3);return s<e?{width:s,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:o(),rule:"sturges"}}}(r,i,"string"==typeof e.bins?e.bins:"auto");a=t.width,l=t.rule}(!Number.isFinite(a)||a<=0)&&(a=i);let u=Math.ceil(i/a);(!Number.isFinite(u)||u<1)&&(u=1);let c=!1;u>1e3&&(u=1e3,c=!0),a=i/u;const f=new Array(u+1);for(let t=0;t<=u;t++)f[t]=n+t*a;return f[u]=Math.max(f[u],s),{edges:f,binWidth:a,rule:l,capped:c}}function v(t,e){const r=e.length-1;if(!(t>=e[0])||t>e[r])return-1;if(t===e[r])return r-1;const n=(e[r]-e[0])/r;if(n>0){let s=Math.floor((t-e[0])/n);return s<0&&(s=0),s>r-1&&(s=r-1),t<e[s]?s--:t>=e[s+1]&&s++,s<0||s>r-1?-1:s}let s=0,o=r-1;for(;s<=o;){const r=s+o>>1;if(t<e[r])o=r-1;else{if(!(t>=e[r+1]))return r;s=r+1}}return-1}function A(t,e){const r=Math.max(0,e.length-1),n=new Array(r);for(let t=0;t<r;t++)n[t]=[];for(let r=0;r<t.length;r++){const s=v(t[r],e);s>=0&&n[s].push(t[r])}return n}function x(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const r=t.slice().sort((t,e)=>t-e),n=m(r,.25),s=m(r,.5),o=m(r,.75),i=o-n;let a=r[0],l=r[r.length-1],u=[];if("tukey"===e.whiskers&&i>0){const t=n-1.5*i,e=o+1.5*i;let s=0;for(;s<r.length&&r[s]<t;)s++;let c=r.length-1;for(;c>=0&&r[c]>e;)c--;s<=c&&(a=r[s],l=r[c],u=r.slice(0,s).concat(r.slice(c+1)))}return{summary:[a,n,s,o,l],outliers:u,iqr:i}}function M(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const r=t.slice().sort((t,e)=>t-e),n=r.length;let s=e.bandwidth;if(!("number"==typeof s&&s>0)){const t=function(t){const e=t.length;if(e<2)return 0;let r=0;for(let n=0;n<e;n++)r+=t[n];const n=r/e;let s=0;for(let r=0;r<e;r++){const e=t[r]-n;s+=e*e}return Math.sqrt(s/e)}(r),e=m(r,.75)-m(r,.25);s=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(n,-.2)}if(!isFinite(s)||s<=0){const t=r[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const o=Math.max(8,Math.floor(e.resolution||64)),i=r[0]-2*s,a=(r[n-1]+2*s-i)/(o-1),l=1/(n*s*Math.sqrt(2*Math.PI)),u=[];for(let t=0;t<o;t++){const e=i+t*a;let o=0;for(let t=0;t<n;t++){const n=(e-r[t])/s;o+=Math.exp(-.5*n*n)}u.push([e,o*l])}return{density:u,bandwidth:s}}function O(t){const e=[];if(!Array.isArray(t))return e;for(let r=0;r<t.length;r++){const n=t[r];let s=n;Array.isArray(n)?s=1===n.length?n[0]:n[1]:n&&"object"==typeof n&&(s=void 0!==n.y?n.y:n.x);const o=f.parseNumber(s);null!==o&&isFinite(o)&&e.push(o)}return e}function S(t,e){var r;const n=e.config,s=e.globals;if(!Array.isArray(t))return t;s.histogramRawSeries||(s.histogramRawSeries=b(t,s));const o=s.histogramRawSeries,i=(null==(r=n.plotOptions)?void 0:r.histogram)||{},u=o.map(t=>O(null==t?void 0:t.data));let c=[];if(1===u.length)c=u[0];else for(const t of u)c=c.concat(t);const f=w(c,{bins:i.bins,binWidth:i.binWidth,range:i.range});if(!f)return e.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},o;const{edges:h,binWidth:d}=f,y=u.map(t=>function(t,e){const r=new Array(Math.max(0,e.length-1)).fill(0);for(let n=0;n<t.length;n++){const s=v(t[n],e);s>=0&&r[s]++}return r}(t,h));e.histogramData={edges:h,binWidth:d,counts:y,rule:f.rule,capped:f.capped};const g=p(s);return e.seriesObservations=u.map((t,e)=>({values:t,byPoint:-1!==g.indexOf(e)?[]:A(t,h)})),o.map((t,e)=>{if(-1!==g.indexOf(e))return l(a({},t),{data:[]});const r=function(t,e={}){let r=t.slice();if(e.cumulative){let t=0;r=r.map(e=>t+=e)}const n=t.reduce((t,e)=>t+e,0);if(n<=0)return r;if("relative"===e.normalize)return r.map(t=>t/n*100);if("density"===e.normalize){const t=e.binWidth;if("number"==typeof t&&t>0)return r.map(e=>e/(n*t))}return r}(y[e],{normalize:i.normalize,cumulative:i.cumulative,binWidth:d}),n=[];for(let t=0;t<r.length;t++)n.push({x:(h[t]+h[t+1])/2,y:r[t]});return l(a({},t),{data:n})})}function P(t,e){var r,n;return $(t,e,"boxPlot",{whiskers:(null==(n=null==(r=e.config.plotOptions)?void 0:r.boxPlot)?void 0:n.whiskers)||"minmax"},x,t=>Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&t.y,(t,e,r)=>l(a({},t),{y:e.summary,points:r}))}function _(t,e){var r,n;const s=(null==(n=null==(r=e.config.plotOptions)?void 0:r.violin)?void 0:n.kde)||{};return $(t,e,"violin",{bandwidth:s.bandwidth,resolution:s.resolution},M,t=>{var e;return Array.isArray(null==(e=null==t?void 0:t.y)?void 0:e.density)&&t.y.density.length&&t.y.density},(t,e,r)=>l(a({},t),{y:l(a({},t.y&&"object"==typeof t.y&&!Array.isArray(t.y)?t.y:{}),{density:e.density,points:r})}))}function $(t,e,r,n,s,o,i){if(!Array.isArray(t))return t;const u=function(t,e){const r=t.statsDerived||(t.statsDerived={});return r[e]||(r[e]=new Map)}(e,r),c=[],h=t.map((t,e)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&t.type!==r)return t;let h=!1;const d=new Array(t.data.length).fill(null),y=t.data.map((t,a)=>{const l=e+":"+a,c=o(t);if(c&&!function(t,e,r){const n=(t.get(e)||{}).e;return!!n&&JSON.stringify(n.density||n.summary)===JSON.stringify(r)}(u,l,c))return t;const y=function(t,e){var r;if(!t||"object"!=typeof t||Array.isArray(t))return null;let n=null;if(Array.isArray(t.points)?n=t.points:Array.isArray(null==(r=t.y)?void 0:r.points)?n=t.y.points:e&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(n=t.y),!n)return null;const s=[];for(let t=0;t<n.length;t++){const e=f.parseNumber(n[t]);null!==e&&isFinite(e)&&s.push(e)}return s.length?s:null}(t,"violin"===r);if(!y)return t;const g=function(t,e,r,n,s){const o=JSON.stringify(n)+r;let i=t.get(e);return i&&i.s===o||t.set(e,i={s:o,e:s(r,n)}),i.e}(u,l,y,n,s);return g?(h=!0,d[a]=y,i(t,g,y)):t});return h&&(c[e]=d),h?l(a({},t),{data:y}):t});return function(t,e,r){if(!e.length)return;const n=[];for(let t=0;t<r;t++){const r=e[t];if(!r){n.push(null);continue}const s=[];for(const t of r)if(t)for(let e=0;e<t.length;e++)s.push(t[e]);n.push({values:s,byPoint:r})}t.seriesObservations=n}(e,c,t.length),h}function N(t,e,r){const n=r&&null!=r.maxRows?r.maxRows:3e3,s=function(t,e){let r=0,n=0;for(const e of t)r+=e.length,e.length>n&&(n=e.length);if(r<=e)return{clusters:t,stride:1,total:r,kept:r};const s=e=>{let r=0;for(const n of t)r+=Math.ceil(n.length/e);return r};let o=Math.max(2,Math.ceil(r/e));for(;o<n&&s(o)>e;)o++;let i=0;return{clusters:t.map(t=>{const e=[];for(let r=0;r<t.length;r+=o)e.push(t[r]);return i+=e.length,e}),stride:o,total:r,kept:i}}(e.map(t=>t.rows),n);s.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${s.total} rows to ${s.kept} (every ${s.stride}${2===s.stride?"nd":3===s.stride?"rd":"th"} row) to stay under maxRows=${n}. Raise maxRows to draw more.`);const o=t.globals&&t.globals.colors||[];return e.map((t,e)=>{const r=o[t.realIndex]||o[0];return{name:t.name,data:s.clusters[e].map((n,s)=>a({id:`${t.realIndex}:${e}:${s}`,x:t.name,y:n},r?{fillColor:r}:{}))}})}function j(t,e){const r=t.globals,n=t.histogramData,s=r&&r.histogramRawSeries;if(!n||!Array.isArray(n.edges)||n.edges.length<2)return null;if(!Array.isArray(s)||!s.length)return null;const o=p(r),i=n.edges,a=[];return s.forEach((e,r)=>{var n;if(-1!==o.indexOf(r))return;const l=A(O(e&&e.data),i),u=t.seriesData&&(null==(n=t.seriesData.seriesNames)?void 0:n[r])||(null==e?void 0:e.name);l.forEach((t,e)=>{const n=`${R(i[e])}-${R(i[e+1])}`;a.push({name:s.length>1&&u?`${u} ${n}`:n,realIndex:r,rows:t})})}),a.length?N(t,a,e):null}function R(t){if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))}function D(t){return(e,r)=>{var n;const s=t(e);if(!Array.isArray(s)||!s.length)return null;const o=e.globals?p(e.globals):[],i=e.globals&&((null==(n=e.globals.categoryLabels)?void 0:n.length)?e.globals.categoryLabels:e.globals.labels)||[],a=[];return s.forEach((t,r)=>{var n;if(-1!==o.indexOf(r))return;if(!Array.isArray(t))return;const l=e.seriesData&&(null==(n=e.seriesData.seriesNames)?void 0:n[r]);t.forEach((t,e)=>{const n=null!=i[e]?String(i[e]):`#${e+1}`;a.push({name:s.length>1&&l?`${l} ${n}`:n,realIndex:r,rows:Array.isArray(t)?t.slice():[]})})}),a.length?N(e,a,r):null}}const T=D(t=>{var e;return null==(e=t.candleData)?void 0:e.seriesBoxPoints}),W=D(t=>{var e;return null==(e=t.violinData)?void 0:e.seriesViolinPoints});d("histogram",S),d("boxPlot",P),d("violin",_),g("histogram",j),g("boxPlot",T),g("violin",W),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default}),exports.boxPlotRows=T,exports.boxPlotTransform=P,exports.histogramRows=j,exports.histogramTransform=S,exports.violinRows=W,exports.violinTransform=_;
|
|
@@ -30,7 +30,7 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
32
|
/*!
|
|
33
|
-
* ApexCharts v8.
|
|
33
|
+
* ApexCharts v8.3.1
|
|
34
34
|
* (c) 2018-2026 ApexCharts
|
|
35
35
|
*/
|
|
36
36
|
import * as _core from "apexcharts/core";
|
|
@@ -332,24 +332,18 @@ function observationsOf(d, allowFlatY) {
|
|
|
332
332
|
return out.length ? out : null;
|
|
333
333
|
}
|
|
334
334
|
function derivedStats(w, kind) {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
335
|
+
const all = w.statsDerived || (w.statsDerived = {});
|
|
336
|
+
return all[kind] || (all[kind] = /* @__PURE__ */ new Map());
|
|
337
|
+
}
|
|
338
|
+
function deriveStat(derived, key, values, opts, fn) {
|
|
339
|
+
const s = JSON.stringify(opts) + values;
|
|
340
|
+
let hit = derived.get(key);
|
|
341
|
+
if (!hit || hit.s !== s) derived.set(key, hit = { s, e: fn(values, opts) });
|
|
342
|
+
return hit.e;
|
|
338
343
|
}
|
|
339
344
|
function isDerived(derived, key, value) {
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
return false;
|
|
343
|
-
}
|
|
344
|
-
for (let k2 = 0; k2 < value.length; k2++) {
|
|
345
|
-
const a = ours[k2];
|
|
346
|
-
const b = value[k2];
|
|
347
|
-
if (a === b) continue;
|
|
348
|
-
if (!Array.isArray(a) || !Array.isArray(b) || a[0] !== b[0] || a[1] !== b[1]) {
|
|
349
|
-
return false;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
return true;
|
|
345
|
+
const e = (derived.get(key) || {}).e;
|
|
346
|
+
return !!e && JSON.stringify(e.density || e.summary) === JSON.stringify(value);
|
|
353
347
|
}
|
|
354
348
|
function histogramValues(data) {
|
|
355
349
|
const out = [];
|
|
@@ -430,62 +424,61 @@ function histogramTransform(ser, w) {
|
|
|
430
424
|
}
|
|
431
425
|
function boxPlotTransform(ser, w) {
|
|
432
426
|
var _a, _b;
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
const values = observationsOf(d, false);
|
|
447
|
-
if (!values) return d;
|
|
448
|
-
const summary = fiveNumberSummary(values, { whiskers });
|
|
449
|
-
if (!summary) return d;
|
|
450
|
-
touched = true;
|
|
451
|
-
byPoint[j] = values;
|
|
452
|
-
derived.set(key, summary.summary);
|
|
453
|
-
return __spreadProps(__spreadValues({}, d), { y: summary.summary, points: values });
|
|
454
|
-
});
|
|
455
|
-
if (touched) observed[i] = byPoint;
|
|
456
|
-
return touched ? __spreadProps(__spreadValues({}, s), { data }) : s;
|
|
457
|
-
});
|
|
458
|
-
recordObservations(w, observed, ser.length);
|
|
459
|
-
return out;
|
|
427
|
+
return sampleTransform(
|
|
428
|
+
ser,
|
|
429
|
+
w,
|
|
430
|
+
"boxPlot",
|
|
431
|
+
{ whiskers: ((_b = (_a = w.config.plotOptions) == null ? void 0 : _a.boxPlot) == null ? void 0 : _b.whiskers) || "minmax" },
|
|
432
|
+
fiveNumberSummary,
|
|
433
|
+
(d) => Array.isArray(d == null ? void 0 : d.y) && d.y.length === 5 && d.y,
|
|
434
|
+
(d, est, values) => __spreadProps(__spreadValues({}, d), {
|
|
435
|
+
y: est.summary,
|
|
436
|
+
points: values
|
|
437
|
+
})
|
|
438
|
+
);
|
|
460
439
|
}
|
|
461
440
|
function violinTransform(ser, w) {
|
|
462
441
|
var _a, _b;
|
|
463
|
-
if (!Array.isArray(ser)) return ser;
|
|
464
442
|
const kde = ((_b = (_a = w.config.plotOptions) == null ? void 0 : _a.violin) == null ? void 0 : _b.kde) || {};
|
|
465
|
-
|
|
443
|
+
return sampleTransform(
|
|
444
|
+
ser,
|
|
445
|
+
w,
|
|
446
|
+
"violin",
|
|
447
|
+
{ bandwidth: kde.bandwidth, resolution: kde.resolution },
|
|
448
|
+
kernelDensity,
|
|
449
|
+
(d) => {
|
|
450
|
+
var _a2;
|
|
451
|
+
return Array.isArray((_a2 = d == null ? void 0 : d.y) == null ? void 0 : _a2.density) && d.y.density.length && d.y.density;
|
|
452
|
+
},
|
|
453
|
+
(d, est, values) => __spreadProps(__spreadValues({}, d), {
|
|
454
|
+
// Keep the rest of an object `y`: a summary given with the points still
|
|
455
|
+
// draws the box lane.
|
|
456
|
+
y: __spreadProps(__spreadValues({}, d.y && typeof d.y === "object" && !Array.isArray(d.y) ? d.y : {}), {
|
|
457
|
+
density: est.density,
|
|
458
|
+
points: values
|
|
459
|
+
})
|
|
460
|
+
})
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
function sampleTransform(ser, w, type, opts, fn, statOf, write) {
|
|
464
|
+
if (!Array.isArray(ser)) return ser;
|
|
465
|
+
const derived = derivedStats(w, type);
|
|
466
466
|
const observed = [];
|
|
467
467
|
const out = ser.map((s, i) => {
|
|
468
|
-
if (!Array.isArray(s == null ? void 0 : s.data) || s.type && s.type !==
|
|
468
|
+
if (!Array.isArray(s == null ? void 0 : s.data) || s.type && s.type !== type) return s;
|
|
469
469
|
let touched = false;
|
|
470
470
|
const byPoint = new Array(s.data.length).fill(null);
|
|
471
471
|
const data = s.data.map((d, j) => {
|
|
472
|
-
var _a2;
|
|
473
472
|
const key = i + ":" + j;
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
const values = observationsOf(d, true);
|
|
473
|
+
const stat = statOf(d);
|
|
474
|
+
if (stat && !isDerived(derived, key, stat)) return d;
|
|
475
|
+
const values = observationsOf(d, type === "violin");
|
|
478
476
|
if (!values) return d;
|
|
479
|
-
const est =
|
|
480
|
-
bandwidth: kde.bandwidth,
|
|
481
|
-
resolution: kde.resolution
|
|
482
|
-
});
|
|
477
|
+
const est = deriveStat(derived, key, values, opts, fn);
|
|
483
478
|
if (!est) return d;
|
|
484
479
|
touched = true;
|
|
485
480
|
byPoint[j] = values;
|
|
486
|
-
|
|
487
|
-
derived.set(key, est.density);
|
|
488
|
-
return __spreadProps(__spreadValues({}, d), { y: __spreadProps(__spreadValues({}, rest), { density: est.density, points: values }) });
|
|
481
|
+
return write(d, est, values);
|
|
489
482
|
});
|
|
490
483
|
if (touched) observed[i] = byPoint;
|
|
491
484
|
return touched ? __spreadProps(__spreadValues({}, s), { data }) : s;
|
package/dist/features/stats.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v8.
|
|
2
|
+
* ApexCharts v8.3.1
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
|
-
!function(t){var e="undefined"!=typeof globalThis?globalThis:self,r=e.ApexCharts;if(r&&r.__internals)return t.call(e);if(r)throw new Error("ApexCharts: dist/features/stats.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");if("function"==typeof define&&define.amd)return t.call(e);if("object"==typeof exports&&"undefined"!=typeof module||"undefined"==typeof window||"undefined"==typeof document)throw new Error("ApexCharts: dist/features/stats.js is a script-tag add-on and needs the ApexCharts script on the page. A bundler imports the matching apexcharts/ sub-path instead.");var n={file:"dist/features/stats.js",run:t,done:!1},s=e.__apexcharts_pending_addons__||(e.__apexcharts_pending_addons__=[]);s.push(n),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!n.done){var r=e.ApexCharts;if(r)if(r.__internals){n.done=!0;var a=s.indexOf(n);-1!==a&&s.splice(a,1);try{t.call(e),r.__drainsAddons||e.console.warn("ApexCharts: dist/features/stats.js loaded before the ApexCharts script, which is older than 8.0 and does not pick up add-ons loaded first, so it registered only when the page finished loading. Put its tag after the ApexCharts script.")}catch(t){e.console.error("ApexCharts: dist/features/stats.js could not register with the ApexCharts script on this page: "+(t&&t.message))}}else e.console.error("ApexCharts: dist/features/stats.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");else e.console.warn("ApexCharts: dist/features/stats.js is waiting for the ApexCharts script, which had not loaded when the page finished loading. It registers when an ApexCharts 8.0 or later script loads; if the page has none, add apexcharts.min.js (or apexcharts.core.min.js, or apexcharts.full.min.js).")}})}(function(){var t,e;t=this,e=function(t){"use strict";var e=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(t,r,n)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,l=(t,e)=>{for(var r in e||(e={}))a.call(e,r)&&o(t,r,e[r]);if(s)for(var r of s(e))i.call(e,r)&&o(t,r,e[r]);return t},u=(t,e)=>r(t,n(e));const c=globalThis.ApexCharts,h=globalThis.ApexCharts.__internals.__apex_Utils,f="__apexcharts_series_transforms__";function d(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[f][t]=e:console.warn(`ApexCharts: registerSeriesTransform("${t}") expects a function (series, w) => series.`):console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.")}globalThis[f]||(globalThis[f]={});const p="__apexcharts_row_sources__";function y(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[p][t]=e:console.warn(`ApexCharts: registerRowSource("${t}") expects a function (w, opts) => series.`):console.warn("ApexCharts: registerRowSource requires a non-empty name.")}function g(t){return(t.collapsedSeriesIndices||[]).concat(t.ancillaryCollapsedSeriesIndices||[])}function m(t,e){const r=(e.collapsedSeries||[]).concat(e.ancillaryCollapsedSeries||[]);return t.map((t,e)=>{const n=t||{},{hidden:o}=n,c=((t,e)=>{var r={};for(var n in t)a.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&s)for(var n of s(t))e.indexOf(n)<0&&i.call(t,n)&&(r[n]=t[n]);return r})(n,["hidden"]);let h=c.data;if(Array.isArray(h)&&!h.length){const t=r.find(t=>t.index===e);t&&Array.isArray(t.data)&&(h=t.data)}return u(l({},c),{data:Array.isArray(h)?h.slice():h})})}function b(t,e){const r=t.length;if(0===r)return NaN;if(1===r)return t[0];const n=(r-1)*e,s=Math.floor(n),a=Math.ceil(n);return s===a?t[s]:t[s]+(t[a]-t[s])*(n-s)}function A(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const r=t.slice().sort((t,e)=>t-e);let n=r[0],s=r[r.length-1];const a=e.range;if(Array.isArray(a)&&2===a.length){const t=Number(a[0]),e=Number(a[1]);Number.isFinite(t)&&Number.isFinite(e)&&e>t&&(n=t,s=e)}if(!(s>n)){const t=Math.abs(n)>0?.05*Math.abs(n):.5;return{edges:[n-t,n+t],binWidth:2*t,rule:"single",capped:!1}}const i=s-n;let o,l;if("number"==typeof e.binWidth&&e.binWidth>0)o=e.binWidth,l="binWidth";else if("number"==typeof e.bins&&e.bins>=1)o=i/Math.floor(e.bins),l="count";else{const t=function(t,e,r){const n=t.length,s=t=>e/Math.max(1,Math.ceil(t)),a=()=>s(Math.log2(n)+1);switch(r){case"sqrt":return{width:s(Math.sqrt(n)),rule:"sqrt"};case"rice":return{width:s(2*Math.cbrt(n)),rule:"rice"};case"scott":{const e=function(t){const e=t.length;if(e<2)return 0;let r=0;for(let n=0;n<e;n++)r+=t[n];const n=r/e;let s=0;for(let r=0;r<e;r++){const e=t[r]-n;s+=e*e}return Math.sqrt(s/e)}(t);return e>0?{width:3.49*e*Math.pow(n,-1/3),rule:"scott"}:{width:a(),rule:"sturges"}}case"fd":{const e=b(t,.75)-b(t,.25);return e>0?{width:2*e*Math.pow(n,-1/3),rule:"fd"}:{width:a(),rule:"sturges"}}case"auto":{const e=a(),r=b(t,.75)-b(t,.25);if(r<=0)return{width:e,rule:"sturges"};const s=2*r*Math.pow(n,-1/3);return s<e?{width:s,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:a(),rule:"sturges"}}}(r,i,"string"==typeof e.bins?e.bins:"auto");o=t.width,l=t.rule}(!Number.isFinite(o)||o<=0)&&(o=i);let u=Math.ceil(i/o);(!Number.isFinite(u)||u<1)&&(u=1);let c=!1;u>1e3&&(u=1e3,c=!0),o=i/u;const h=new Array(u+1);for(let t=0;t<=u;t++)h[t]=n+t*o;return h[u]=Math.max(h[u],s),{edges:h,binWidth:o,rule:l,capped:c}}function x(t,e){const r=e.length-1;if(!(t>=e[0])||t>e[r])return-1;if(t===e[r])return r-1;const n=(e[r]-e[0])/r;if(n>0){let s=Math.floor((t-e[0])/n);return s<0&&(s=0),s>r-1&&(s=r-1),t<e[s]?s--:t>=e[s+1]&&s++,s<0||s>r-1?-1:s}let s=0,a=r-1;for(;s<=a;){const r=s+a>>1;if(t<e[r])a=r-1;else{if(!(t>=e[r+1]))return r;s=r+1}}return-1}function w(t,e){const r=Math.max(0,e.length-1),n=new Array(r);for(let t=0;t<r;t++)n[t]=[];for(let r=0;r<t.length;r++){const s=x(t[r],e);s>=0&&n[s].push(t[r])}return n}function v(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const r=t.slice().sort((t,e)=>t-e),n=r.length;let s=e.bandwidth;if(!("number"==typeof s&&s>0)){const t=function(t){const e=t.length;if(e<2)return 0;let r=0;for(let n=0;n<e;n++)r+=t[n];const n=r/e;let s=0;for(let r=0;r<e;r++){const e=t[r]-n;s+=e*e}return Math.sqrt(s/e)}(r),e=b(r,.75)-b(r,.25);s=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(n,-.2)}if(!isFinite(s)||s<=0){const t=r[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const a=Math.max(8,Math.floor(e.resolution||64)),i=r[0]-2*s,o=(r[n-1]+2*s-i)/(a-1),l=1/(n*s*Math.sqrt(2*Math.PI)),u=[];for(let t=0;t<a;t++){const e=i+t*o;let a=0;for(let t=0;t<n;t++){const n=(e-r[t])/s;a+=Math.exp(-.5*n*n)}u.push([e,a*l])}return{density:u,bandwidth:s}}function M(t,e){var r;if(!t||"object"!=typeof t||Array.isArray(t))return null;let n=null;if(Array.isArray(t.points)?n=t.points:Array.isArray(null==(r=t.y)?void 0:r.points)?n=t.y.points:e&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(n=t.y),!n)return null;const s=[];for(let t=0;t<n.length;t++){const e=h.parseNumber(n[t]);null!==e&&isFinite(e)&&s.push(e)}return s.length?s:null}function _(t,e){var r,n;const s=null!=(r=t.statsDerived)?r:t.statsDerived={};return null!=(n=s[e])?n:s[e]=new Map}function j(t,e,r){const n=t.get(e);if(!n||!Array.isArray(r)||n.length!==r.length)return!1;for(let t=0;t<r.length;t++){const e=n[t],s=r[t];if(!(e===s||Array.isArray(e)&&Array.isArray(s)&&e[0]===s[0]&&e[1]===s[1]))return!1}return!0}function C(t){const e=[];if(!Array.isArray(t))return e;for(let r=0;r<t.length;r++){const n=t[r];let s=n;Array.isArray(n)?s=1===n.length?n[0]:n[1]:n&&"object"==typeof n&&(s=void 0!==n.y?n.y:n.x);const a=h.parseNumber(s);null!==a&&isFinite(a)&&e.push(a)}return e}function O(t,e){var r;const n=e.config,s=e.globals;if(!Array.isArray(t))return t;s.histogramRawSeries||(s.histogramRawSeries=m(t,s));const a=s.histogramRawSeries,i=(null==(r=n.plotOptions)?void 0:r.histogram)||{},o=a.map(t=>C(null==t?void 0:t.data));let c=[];if(1===o.length)c=o[0];else for(const t of o)c=c.concat(t);const h=A(c,{bins:i.bins,binWidth:i.binWidth,range:i.range});if(!h)return e.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},a;const{edges:f,binWidth:d}=h,p=o.map(t=>function(t,e){const r=new Array(Math.max(0,e.length-1)).fill(0);for(let n=0;n<t.length;n++){const s=x(t[n],e);s>=0&&r[s]++}return r}(t,f));e.histogramData={edges:f,binWidth:d,counts:p,rule:h.rule,capped:h.capped};const y=g(s);return e.seriesObservations=o.map((t,e)=>({values:t,byPoint:-1!==y.indexOf(e)?[]:w(t,f)})),a.map((t,e)=>{if(-1!==y.indexOf(e))return u(l({},t),{data:[]});const r=function(t,e={}){let r=t.slice();if(e.cumulative){let t=0;r=r.map(e=>t+=e)}const n=t.reduce((t,e)=>t+e,0);if(n<=0)return r;if("relative"===e.normalize)return r.map(t=>t/n*100);if("density"===e.normalize){const t=e.binWidth;if("number"==typeof t&&t>0)return r.map(e=>e/(n*t))}return r}(p[e],{normalize:i.normalize,cumulative:i.cumulative,binWidth:d}),n=[];for(let t=0;t<r.length;t++)n.push({x:(f[t]+f[t+1])/2,y:r[t]});return u(l({},t),{data:n})})}function S(t,e){var r,n;if(!Array.isArray(t))return t;const s=(null==(n=null==(r=e.config.plotOptions)?void 0:r.boxPlot)?void 0:n.whiskers)||"minmax",a=_(e,"boxPlot"),i=[],o=t.map((t,e)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&"boxPlot"!==t.type)return t;let r=!1;const n=new Array(t.data.length).fill(null),o=t.data.map((t,i)=>{const o=e+":"+i;if(Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&!j(a,o,t.y))return t;const c=M(t,!1);if(!c)return t;const h=function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const r=t.slice().sort((t,e)=>t-e),n=b(r,.25),s=b(r,.5),a=b(r,.75),i=a-n;let o=r[0],l=r[r.length-1],u=[];if("tukey"===e.whiskers&&i>0){const t=n-1.5*i,e=a+1.5*i;let s=0;for(;s<r.length&&r[s]<t;)s++;let c=r.length-1;for(;c>=0&&r[c]>e;)c--;s<=c&&(o=r[s],l=r[c],u=r.slice(0,s).concat(r.slice(c+1)))}return{summary:[o,n,s,a,l],outliers:u,iqr:i}}(c,{whiskers:s});return h?(r=!0,n[i]=c,a.set(o,h.summary),u(l({},t),{y:h.summary,points:c})):t});return r&&(i[e]=n),r?u(l({},t),{data:o}):t});return T(e,i,t.length),o}function P(t,e){var r,n;if(!Array.isArray(t))return t;const s=(null==(n=null==(r=e.config.plotOptions)?void 0:r.violin)?void 0:n.kde)||{},a=_(e,"violin"),i=[],o=t.map((t,e)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&"violin"!==t.type)return t;let r=!1;const n=new Array(t.data.length).fill(null),o=t.data.map((t,i)=>{var o;const c=e+":"+i;if(Array.isArray(null==(o=null==t?void 0:t.y)?void 0:o.density)&&t.y.density.length&&!j(a,c,t.y.density))return t;const h=M(t,!0);if(!h)return t;const f=v(h,{bandwidth:s.bandwidth,resolution:s.resolution});if(!f)return t;r=!0,n[i]=h;const d=t.y&&"object"==typeof t.y&&!Array.isArray(t.y)?t.y:{};return a.set(c,f.density),u(l({},t),{y:u(l({},d),{density:f.density,points:h})})});return r&&(i[e]=n),r?u(l({},t),{data:o}):t});return T(e,i,t.length),o}function T(t,e,r){if(!e.length)return;const n=[];for(let t=0;t<r;t++){const r=e[t];if(!r){n.push(null);continue}const s=[];for(const t of r)if(t)for(let e=0;e<t.length;e++)s.push(t[e]);n.push({values:s,byPoint:r})}t.seriesObservations=n}function $(t,e,r){const n=r&&null!=r.maxRows?r.maxRows:3e3,s=function(t,e){let r=0,n=0;for(const e of t)r+=e.length,e.length>n&&(n=e.length);if(r<=e)return{clusters:t,stride:1,total:r,kept:r};const s=e=>{let r=0;for(const n of t)r+=Math.ceil(n.length/e);return r};let a=Math.max(2,Math.ceil(r/e));for(;a<n&&s(a)>e;)a++;let i=0;return{clusters:t.map(t=>{const e=[];for(let r=0;r<t.length;r+=a)e.push(t[r]);return i+=e.length,e}),stride:a,total:r,kept:i}}(e.map(t=>t.rows),n);s.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${s.total} rows to ${s.kept} (every ${s.stride}${2===s.stride?"nd":3===s.stride?"rd":"th"} row) to stay under maxRows=${n}. Raise maxRows to draw more.`);const a=t.globals&&t.globals.colors||[];return e.map((t,e)=>{const r=a[t.realIndex]||a[0];return{name:t.name,data:s.clusters[e].map((n,s)=>l({id:`${t.realIndex}:${e}:${s}`,x:t.name,y:n},r?{fillColor:r}:{}))}})}function R(t,e){const r=t.globals,n=t.histogramData,s=r&&r.histogramRawSeries;if(!n||!Array.isArray(n.edges)||n.edges.length<2)return null;if(!Array.isArray(s)||!s.length)return null;const a=g(r),i=n.edges,o=[];return s.forEach((e,r)=>{var n;if(-1!==a.indexOf(r))return;const l=w(C(e&&e.data),i),u=t.seriesData&&(null==(n=t.seriesData.seriesNames)?void 0:n[r])||(null==e?void 0:e.name);l.forEach((t,e)=>{const n=`${N(i[e])}-${N(i[e+1])}`;o.push({name:s.length>1&&u?`${u} ${n}`:n,realIndex:r,rows:t})})}),o.length?$(t,o,e):null}function N(t){if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))}function W(t){return(e,r)=>{var n;const s=t(e);if(!Array.isArray(s)||!s.length)return null;const a=e.globals?g(e.globals):[],i=e.globals&&((null==(n=e.globals.categoryLabels)?void 0:n.length)?e.globals.categoryLabels:e.globals.labels)||[],o=[];return s.forEach((t,r)=>{var n;if(-1!==a.indexOf(r))return;if(!Array.isArray(t))return;const l=e.seriesData&&(null==(n=e.seriesData.seriesNames)?void 0:n[r]);t.forEach((t,e)=>{const n=null!=i[e]?String(i[e]):`#${e+1}`;o.push({name:s.length>1&&l?`${l} ${n}`:n,realIndex:r,rows:Array.isArray(t)?t.slice():[]})})}),o.length?$(e,o,r):null}}globalThis[p]||(globalThis[p]={});const D=W(t=>{var e;return null==(e=t.candleData)?void 0:e.seriesBoxPoints}),k=W(t=>{var e;return null==(e=t.violinData)?void 0:e.seriesViolinPoints});d("histogram",O),d("boxPlot",S),d("violin",P),y("histogram",R),y("boxPlot",D),y("violin",k),t.boxPlotRows=D,t.boxPlotTransform=S,t.default=c,t.histogramRows=R,t.histogramTransform=O,t.violinRows=k,t.violinTransform=P,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ApexStats={})});
|
|
5
|
+
!function(t){var e="undefined"!=typeof globalThis?globalThis:self,r=e.ApexCharts;if(r&&r.__internals)return t.call(e);if(r)throw new Error("ApexCharts: dist/features/stats.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");if("function"==typeof define&&define.amd)return t.call(e);if("object"==typeof exports&&"undefined"!=typeof module||"undefined"==typeof window||"undefined"==typeof document)throw new Error("ApexCharts: dist/features/stats.js is a script-tag add-on and needs the ApexCharts script on the page. A bundler imports the matching apexcharts/ sub-path instead.");var n={file:"dist/features/stats.js",run:t,done:!1},s=e.__apexcharts_pending_addons__||(e.__apexcharts_pending_addons__=[]);s.push(n),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!n.done){var r=e.ApexCharts;if(r)if(r.__internals){n.done=!0;var i=s.indexOf(n);-1!==i&&s.splice(i,1);try{t.call(e),r.__drainsAddons||e.console.warn("ApexCharts: dist/features/stats.js loaded before the ApexCharts script, which is older than 8.0 and does not pick up add-ons loaded first, so it registered only when the page finished loading. Put its tag after the ApexCharts script.")}catch(t){e.console.error("ApexCharts: dist/features/stats.js could not register with the ApexCharts script on this page: "+(t&&t.message))}}else e.console.error("ApexCharts: dist/features/stats.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");else e.console.warn("ApexCharts: dist/features/stats.js is waiting for the ApexCharts script, which had not loaded when the page finished loading. It registers when an ApexCharts 8.0 or later script loads; if the page has none, add apexcharts.min.js (or apexcharts.core.min.js, or apexcharts.full.min.js).")}})}(function(){var t,e;t=this,e=function(t){"use strict";var e=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,a=(t,r,n)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,l=(t,e)=>{for(var r in e||(e={}))i.call(e,r)&&a(t,r,e[r]);if(s)for(var r of s(e))o.call(e,r)&&a(t,r,e[r]);return t},u=(t,e)=>r(t,n(e));const c=globalThis.ApexCharts,h=globalThis.ApexCharts.__internals.__apex_Utils,f="__apexcharts_series_transforms__";function d(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[f][t]=e:console.warn(`ApexCharts: registerSeriesTransform("${t}") expects a function (series, w) => series.`):console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.")}globalThis[f]||(globalThis[f]={});const p="__apexcharts_row_sources__";function g(t,e){t&&"string"==typeof t?"function"==typeof e?globalThis[p][t]=e:console.warn(`ApexCharts: registerRowSource("${t}") expects a function (w, opts) => series.`):console.warn("ApexCharts: registerRowSource requires a non-empty name.")}function y(t){return(t.collapsedSeriesIndices||[]).concat(t.ancillaryCollapsedSeriesIndices||[])}function m(t,e){const r=(e.collapsedSeries||[]).concat(e.ancillaryCollapsedSeries||[]);return t.map((t,e)=>{const n=t||{},{hidden:a}=n,c=((t,e)=>{var r={};for(var n in t)i.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&s)for(var n of s(t))e.indexOf(n)<0&&o.call(t,n)&&(r[n]=t[n]);return r})(n,["hidden"]);let h=c.data;if(Array.isArray(h)&&!h.length){const t=r.find(t=>t.index===e);t&&Array.isArray(t.data)&&(h=t.data)}return u(l({},c),{data:Array.isArray(h)?h.slice():h})})}function b(t,e){const r=t.length;if(0===r)return NaN;if(1===r)return t[0];const n=(r-1)*e,s=Math.floor(n),i=Math.ceil(n);return s===i?t[s]:t[s]+(t[i]-t[s])*(n-s)}function x(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const r=t.slice().sort((t,e)=>t-e);let n=r[0],s=r[r.length-1];const i=e.range;if(Array.isArray(i)&&2===i.length){const t=Number(i[0]),e=Number(i[1]);Number.isFinite(t)&&Number.isFinite(e)&&e>t&&(n=t,s=e)}if(!(s>n)){const t=Math.abs(n)>0?.05*Math.abs(n):.5;return{edges:[n-t,n+t],binWidth:2*t,rule:"single",capped:!1}}const o=s-n;let a,l;if("number"==typeof e.binWidth&&e.binWidth>0)a=e.binWidth,l="binWidth";else if("number"==typeof e.bins&&e.bins>=1)a=o/Math.floor(e.bins),l="count";else{const t=function(t,e,r){const n=t.length,s=t=>e/Math.max(1,Math.ceil(t)),i=()=>s(Math.log2(n)+1);switch(r){case"sqrt":return{width:s(Math.sqrt(n)),rule:"sqrt"};case"rice":return{width:s(2*Math.cbrt(n)),rule:"rice"};case"scott":{const e=function(t){const e=t.length;if(e<2)return 0;let r=0;for(let n=0;n<e;n++)r+=t[n];const n=r/e;let s=0;for(let r=0;r<e;r++){const e=t[r]-n;s+=e*e}return Math.sqrt(s/e)}(t);return e>0?{width:3.49*e*Math.pow(n,-1/3),rule:"scott"}:{width:i(),rule:"sturges"}}case"fd":{const e=b(t,.75)-b(t,.25);return e>0?{width:2*e*Math.pow(n,-1/3),rule:"fd"}:{width:i(),rule:"sturges"}}case"auto":{const e=i(),r=b(t,.75)-b(t,.25);if(r<=0)return{width:e,rule:"sturges"};const s=2*r*Math.pow(n,-1/3);return s<e?{width:s,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:i(),rule:"sturges"}}}(r,o,"string"==typeof e.bins?e.bins:"auto");a=t.width,l=t.rule}(!Number.isFinite(a)||a<=0)&&(a=o);let u=Math.ceil(o/a);(!Number.isFinite(u)||u<1)&&(u=1);let c=!1;u>1e3&&(u=1e3,c=!0),a=o/u;const h=new Array(u+1);for(let t=0;t<=u;t++)h[t]=n+t*a;return h[u]=Math.max(h[u],s),{edges:h,binWidth:a,rule:l,capped:c}}function w(t,e){const r=e.length-1;if(!(t>=e[0])||t>e[r])return-1;if(t===e[r])return r-1;const n=(e[r]-e[0])/r;if(n>0){let s=Math.floor((t-e[0])/n);return s<0&&(s=0),s>r-1&&(s=r-1),t<e[s]?s--:t>=e[s+1]&&s++,s<0||s>r-1?-1:s}let s=0,i=r-1;for(;s<=i;){const r=s+i>>1;if(t<e[r])i=r-1;else{if(!(t>=e[r+1]))return r;s=r+1}}return-1}function A(t,e){const r=Math.max(0,e.length-1),n=new Array(r);for(let t=0;t<r;t++)n[t]=[];for(let r=0;r<t.length;r++){const s=w(t[r],e);s>=0&&n[s].push(t[r])}return n}function v(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const r=t.slice().sort((t,e)=>t-e),n=b(r,.25),s=b(r,.5),i=b(r,.75),o=i-n;let a=r[0],l=r[r.length-1],u=[];if("tukey"===e.whiskers&&o>0){const t=n-1.5*o,e=i+1.5*o;let s=0;for(;s<r.length&&r[s]<t;)s++;let c=r.length-1;for(;c>=0&&r[c]>e;)c--;s<=c&&(a=r[s],l=r[c],u=r.slice(0,s).concat(r.slice(c+1)))}return{summary:[a,n,s,i,l],outliers:u,iqr:o}}function M(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const r=t.slice().sort((t,e)=>t-e),n=r.length;let s=e.bandwidth;if(!("number"==typeof s&&s>0)){const t=function(t){const e=t.length;if(e<2)return 0;let r=0;for(let n=0;n<e;n++)r+=t[n];const n=r/e;let s=0;for(let r=0;r<e;r++){const e=t[r]-n;s+=e*e}return Math.sqrt(s/e)}(r),e=b(r,.75)-b(r,.25);s=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(n,-.2)}if(!isFinite(s)||s<=0){const t=r[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const i=Math.max(8,Math.floor(e.resolution||64)),o=r[0]-2*s,a=(r[n-1]+2*s-o)/(i-1),l=1/(n*s*Math.sqrt(2*Math.PI)),u=[];for(let t=0;t<i;t++){const e=o+t*a;let i=0;for(let t=0;t<n;t++){const n=(e-r[t])/s;i+=Math.exp(-.5*n*n)}u.push([e,i*l])}return{density:u,bandwidth:s}}function _(t){const e=[];if(!Array.isArray(t))return e;for(let r=0;r<t.length;r++){const n=t[r];let s=n;Array.isArray(n)?s=1===n.length?n[0]:n[1]:n&&"object"==typeof n&&(s=void 0!==n.y?n.y:n.x);const i=h.parseNumber(s);null!==i&&isFinite(i)&&e.push(i)}return e}function j(t,e){var r;const n=e.config,s=e.globals;if(!Array.isArray(t))return t;s.histogramRawSeries||(s.histogramRawSeries=m(t,s));const i=s.histogramRawSeries,o=(null==(r=n.plotOptions)?void 0:r.histogram)||{},a=i.map(t=>_(null==t?void 0:t.data));let c=[];if(1===a.length)c=a[0];else for(const t of a)c=c.concat(t);const h=x(c,{bins:o.bins,binWidth:o.binWidth,range:o.range});if(!h)return e.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},i;const{edges:f,binWidth:d}=h,p=a.map(t=>function(t,e){const r=new Array(Math.max(0,e.length-1)).fill(0);for(let n=0;n<t.length;n++){const s=w(t[n],e);s>=0&&r[s]++}return r}(t,f));e.histogramData={edges:f,binWidth:d,counts:p,rule:h.rule,capped:h.capped};const g=y(s);return e.seriesObservations=a.map((t,e)=>({values:t,byPoint:-1!==g.indexOf(e)?[]:A(t,f)})),i.map((t,e)=>{if(-1!==g.indexOf(e))return u(l({},t),{data:[]});const r=function(t,e={}){let r=t.slice();if(e.cumulative){let t=0;r=r.map(e=>t+=e)}const n=t.reduce((t,e)=>t+e,0);if(n<=0)return r;if("relative"===e.normalize)return r.map(t=>t/n*100);if("density"===e.normalize){const t=e.binWidth;if("number"==typeof t&&t>0)return r.map(e=>e/(n*t))}return r}(p[e],{normalize:o.normalize,cumulative:o.cumulative,binWidth:d}),n=[];for(let t=0;t<r.length;t++)n.push({x:(f[t]+f[t+1])/2,y:r[t]});return u(l({},t),{data:n})})}function C(t,e){var r,n;return S(t,e,"boxPlot",{whiskers:(null==(n=null==(r=e.config.plotOptions)?void 0:r.boxPlot)?void 0:n.whiskers)||"minmax"},v,t=>Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&t.y,(t,e,r)=>u(l({},t),{y:e.summary,points:r}))}function O(t,e){var r,n;const s=(null==(n=null==(r=e.config.plotOptions)?void 0:r.violin)?void 0:n.kde)||{};return S(t,e,"violin",{bandwidth:s.bandwidth,resolution:s.resolution},M,t=>{var e;return Array.isArray(null==(e=null==t?void 0:t.y)?void 0:e.density)&&t.y.density.length&&t.y.density},(t,e,r)=>u(l({},t),{y:u(l({},t.y&&"object"==typeof t.y&&!Array.isArray(t.y)?t.y:{}),{density:e.density,points:r})}))}function S(t,e,r,n,s,i,o){if(!Array.isArray(t))return t;const a=function(t,e){const r=t.statsDerived||(t.statsDerived={});return r[e]||(r[e]=new Map)}(e,r),c=[],f=t.map((t,e)=>{if(!Array.isArray(null==t?void 0:t.data)||t.type&&t.type!==r)return t;let f=!1;const d=new Array(t.data.length).fill(null),p=t.data.map((t,l)=>{const u=e+":"+l,c=i(t);if(c&&!function(t,e,r){const n=(t.get(e)||{}).e;return!!n&&JSON.stringify(n.density||n.summary)===JSON.stringify(r)}(a,u,c))return t;const p=function(t,e){var r;if(!t||"object"!=typeof t||Array.isArray(t))return null;let n=null;if(Array.isArray(t.points)?n=t.points:Array.isArray(null==(r=t.y)?void 0:r.points)?n=t.y.points:e&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(n=t.y),!n)return null;const s=[];for(let t=0;t<n.length;t++){const e=h.parseNumber(n[t]);null!==e&&isFinite(e)&&s.push(e)}return s.length?s:null}(t,"violin"===r);if(!p)return t;const g=function(t,e,r,n,s){const i=JSON.stringify(n)+r;let o=t.get(e);return o&&o.s===i||t.set(e,o={s:i,e:s(r,n)}),o.e}(a,u,p,n,s);return g?(f=!0,d[l]=p,o(t,g,p)):t});return f&&(c[e]=d),f?u(l({},t),{data:p}):t});return function(t,e,r){if(!e.length)return;const n=[];for(let t=0;t<r;t++){const r=e[t];if(!r){n.push(null);continue}const s=[];for(const t of r)if(t)for(let e=0;e<t.length;e++)s.push(t[e]);n.push({values:s,byPoint:r})}t.seriesObservations=n}(e,c,t.length),f}function P(t,e,r){const n=r&&null!=r.maxRows?r.maxRows:3e3,s=function(t,e){let r=0,n=0;for(const e of t)r+=e.length,e.length>n&&(n=e.length);if(r<=e)return{clusters:t,stride:1,total:r,kept:r};const s=e=>{let r=0;for(const n of t)r+=Math.ceil(n.length/e);return r};let i=Math.max(2,Math.ceil(r/e));for(;i<n&&s(i)>e;)i++;let o=0;return{clusters:t.map(t=>{const e=[];for(let r=0;r<t.length;r+=i)e.push(t[r]);return o+=e.length,e}),stride:i,total:r,kept:o}}(e.map(t=>t.rows),n);s.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${s.total} rows to ${s.kept} (every ${s.stride}${2===s.stride?"nd":3===s.stride?"rd":"th"} row) to stay under maxRows=${n}. Raise maxRows to draw more.`);const i=t.globals&&t.globals.colors||[];return e.map((t,e)=>{const r=i[t.realIndex]||i[0];return{name:t.name,data:s.clusters[e].map((n,s)=>l({id:`${t.realIndex}:${e}:${s}`,x:t.name,y:n},r?{fillColor:r}:{}))}})}function T(t,e){const r=t.globals,n=t.histogramData,s=r&&r.histogramRawSeries;if(!n||!Array.isArray(n.edges)||n.edges.length<2)return null;if(!Array.isArray(s)||!s.length)return null;const i=y(r),o=n.edges,a=[];return s.forEach((e,r)=>{var n;if(-1!==i.indexOf(r))return;const l=A(_(e&&e.data),o),u=t.seriesData&&(null==(n=t.seriesData.seriesNames)?void 0:n[r])||(null==e?void 0:e.name);l.forEach((t,e)=>{const n=`${$(o[e])}-${$(o[e+1])}`;a.push({name:s.length>1&&u?`${u} ${n}`:n,realIndex:r,rows:t})})}),a.length?P(t,a,e):null}function $(t){if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))}function N(t){return(e,r)=>{var n;const s=t(e);if(!Array.isArray(s)||!s.length)return null;const i=e.globals?y(e.globals):[],o=e.globals&&((null==(n=e.globals.categoryLabels)?void 0:n.length)?e.globals.categoryLabels:e.globals.labels)||[],a=[];return s.forEach((t,r)=>{var n;if(-1!==i.indexOf(r))return;if(!Array.isArray(t))return;const l=e.seriesData&&(null==(n=e.seriesData.seriesNames)?void 0:n[r]);t.forEach((t,e)=>{const n=null!=o[e]?String(o[e]):`#${e+1}`;a.push({name:s.length>1&&l?`${l} ${n}`:n,realIndex:r,rows:Array.isArray(t)?t.slice():[]})})}),a.length?P(e,a,r):null}}globalThis[p]||(globalThis[p]={});const R=N(t=>{var e;return null==(e=t.candleData)?void 0:e.seriesBoxPoints}),W=N(t=>{var e;return null==(e=t.violinData)?void 0:e.seriesViolinPoints});d("histogram",j),d("boxPlot",C),d("violin",O),g("histogram",T),g("boxPlot",R),g("violin",W),t.boxPlotRows=R,t.boxPlotTransform=C,t.default=c,t.histogramRows=T,t.histogramTransform=j,t.violinRows=W,t.violinTransform=O,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ApexStats={})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v8.
|
|
2
|
+
* ApexCharts v8.3.1
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
|
-
"use strict";var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=(t,n,i)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,o=(e,t)=>{for(var n in t||(t={}))s.call(t,n)&&a(e,n,t[n]);if(i)for(var n of i(t))r.call(t,n)&&a(e,n,t[n]);return e},c=(e,i)=>t(e,n(i));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function l(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const d=l(require("apexcharts/core")),u=d.__apex_Environment_Environment,h=d.__apex_Animations_prefersReducedMotion,p=globalThis.console;function f(e,...t){p.error(e,...t)}function v(e){p.warn(e)}const m="APEX-",y=new Date("2027-07-31T00:00:00Z"),g="__apex_license_v1__";function b(){const e=globalThis;let t=e[g];return t||(t={key:null,listeners:new Set,result:null},e[g]=t),t}const w=class{static get licenseKey(){return b().key}static set licenseKey(e){b().key=e}static get listeners(){return b().listeners}static get validationResult(){return b().result}static set validationResult(e){b().result=e}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(e){return!!e&&this.validateKey(e).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}static setLicense(e){var t,n;if(!e)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const i=this.validateKey(e);i.valid||e===this.licenseKey||!(null==(n=this.validationResult)?void 0:n.valid)?(this.licenseKey=e,this.publish(i),i.valid||f(`[Apex] ${i.message}`)):v(`[Apex] Ignoring license key: ${null!=(t=i.message)?t:"it is not valid"} A valid license is already active on this page.`)}static validateKey(e){const t=this.parseKey(e),n=this.validateStructure(e,t);if(!n.valid||!(null==t?void 0:t.signature))return n;const i=this.verdicts.get(e);return!1===i?{data:t.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===i&&this.verifySignature(e,t,n),c(o({},n),{signatureVerified:!0===i}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(4*Math.ceil(t.length/4),"="),i=globalThis.atob;if("function"!=typeof i)throw new Error("no base64 decoder available");const s=i(n),r=new Uint8Array(s.length);for(let e=0;e<s.length;e++)r[e]=s.charCodeAt(e);return r}static canonicalPayload(e){const t=e.domains&&e.domains.length>0?e.domains.join(","):"";return`v1|${e.issueDate}|${e.expiryDate}|${e.plan}|${t}`}static notify(e){for(const t of this.listeners)try{t(e)}catch(e){}}static parseKey(e){if("string"!=typeof e||!e.startsWith(m))return null;const t=e.slice(5);if(!t)return null;try{const e=(new TextDecoder).decode(this.base64ToBytes(t)),n=JSON.parse(e);return n.issueDate&&n.expiryDate&&n.plan?{data:{domains:Array.isArray(n.domains)?n.domains:void 0,expiryDate:n.expiryDate,issueDate:n.issueDate,plan:n.plan,valid:!0},signature:"string"==typeof n.sig&&n.sig?n.sig:null}:null}catch(e){return null}}static publish(e){this.validationResult=e,this.notify(e)}static validateStructure(e,t){const n=e=>({expired:!1,message:e,signatureVerified:!1,valid:!1});if("string"!=typeof e||!e.startsWith(m))return n('Invalid license key format. License key must start with "APEX-".');if(!t)return n("Invalid license key. Unable to decode license data.");const{data:i,signature:s}=t;if(!s&&new Date>=y)return n("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(i.expiryDate)<new Date)return{data:i,expired:!0,message:`License expired on ${i.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(i.domains&&i.domains.length>0){const e="undefined"==typeof location?"":location.hostname;if(!i.domains.some(t=>e===t||e.endsWith(`.${t}`)))return{data:i,expired:!1,message:`License is not valid for this domain (${e}). Allowed domains: ${i.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:i,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(e,t,n){return i=this,s=null,r=function*(){var i;if(this.verifying.has(e)||this.verdicts.has(e))return;this.verifying.add(e);const s=this.epoch,r=null==(i=globalThis.crypto)?void 0:i.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(e),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,v(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const a=(new TextEncoder).encode(this.canonicalPayload(t.data));let l=!1;for(const e of this.publicKeysSpki){try{const n=yield r.importKey("spki",this.base64ToBytes(e),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);l=yield r.verify({hash:"SHA-256",name:"ECDSA"},n,this.base64ToBytes(t.signature),a)}catch(e){l=!1}if(l)break}if(this.verifying.delete(e),this.epoch!==s)return;if(this.verdicts.set(e,l),l){const t=c(o({},n),{signatureVerified:!0});return void(this.licenseKey===e?this.publish(t):this.notify(t))}const d="Invalid license key. The license signature does not verify.",u={data:t.data,expired:!1,message:d,signatureVerified:!0,valid:!1};this.licenseKey===e?this.publish(u):this.notify(u),f(`[Apex] ${d}`)},new Promise((e,t)=>{var n=e=>{try{o(r.next(e))}catch(e){t(e)}},a=e=>{try{o(r.throw(e))}catch(e){t(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,a);o((r=r.apply(i,s)).next())});var i,s,r}};w.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],w.verdicts=new Map,w.verifying=new Set,w.warnedUnverifiable=!1,w.epoch=0;let x=w;const _=class{static applyStyles(e){Object.assign(e.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(e){return e?e.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(e,t){return e&&"undefined"!=typeof document?(this.setManaged(e,t),this.paint(e)):null}static exists(e){return!!this.node(e)}static remove(e,t){e&&(this.setManaged(e,t),this.erase(e))}static untrack(e){this.managed.delete(e)}static createWatermarkPattern(){const e=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${e}</text>\n </svg>\n `.trim())}")`}static erase(e){var t;null==(t=this.node(e))||t.remove()}static paint(e){let t=this.node(e);return t||(t=document.createElement("div"),t.setAttribute(this.WATERMARK_ATTR,""),e.appendChild(t)),this.applyStyles(t),"function"==typeof getComputedStyle&&"static"===getComputedStyle(e).position&&(e.style.position="relative"),t}static reconcile(){const e=x.isLicenseValid();for(const t of this.managed)t.isConnected?e?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(e,t){!1!==(null==t?void 0:t.manage)?this.track(e):this.managed.delete(e)}static track(e){this.managed.add(e),this.subscribed||(this.subscribed=!0,x.onChange(()=>{this.reconcile()}))}};_.WATERMARK_ATTR="data-apexcharts-watermark",_.WATERMARK_TEXT="APEXCHARTS",_.ATTR="data-apexcharts-watermark",_.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},_.managed=new Set,_.subscribed=!1;let A=_;const S="https://apexcharts.com/pricing",k="__apexcharts_license_enforcer_v1__";globalThis[k]||(globalThis[k]={perspectivesTokenDecoded:!1,enforced:new Set});const O=globalThis[k],T=O.enforced;function E(){O.perspectivesTokenDecoded=!0,D()}const I=new Set(["premium","enterprise"]);function R(e,t){const n=A.add(t,{manage:!1});if(!n||"undefined"==typeof MutationObserver)return;if(e._wmNodeObserver&&e._wmObservedNode===n)return;e._wmNodeObserver&&e._wmNodeObserver.disconnect();const i=new MutationObserver(()=>{const e=A.node(t);e&&(i.disconnect(),A.applyStyles(e),i.takeRecords(),i.observe(e,{attributes:!0,attributeFilter:["style"]}))});i.observe(n,{attributes:!0,attributeFilter:["style"]}),e._wmNodeObserver=i,e._wmObservedNode=n}function C(e,t){e._wmWrapObserver&&(e._wmWrapObserver.disconnect(),e._wmWrapObserver=null),e._wmNodeObserver&&(e._wmNodeObserver.disconnect(),e._wmNodeObserver=null),e._wmObservedNode=null,e._wmObservedWrap=null;const n=t||e.w&&e.w.dom&&e.w.dom.elWrap;n&&A.remove(n,{manage:!1})}function P(e,t){try{if(!u.isBrowser())return;if(e&&e.globals&&e.globals.isDestroyed)return void T.delete(t);const n=e&&e.dom&&e.dom.elWrap;if(!n)return;const i=function(e,t){var n;const i=e&&e.config&&e.config.chart||{},s=[];"unit"===i.type&&s.push("unit"),"raincloud"===i.requestedType&&s.push("raincloud"),t.trellis&&"function"==typeof t.trellis.isActive&&t.trellis.isActive()&&s.push("trellis"),t.storyboard&&t.storyboard._used&&s.push("storyboard");const r=i.link;return t.linkedViews&&r&&(!0===r.enabled||"function"==typeof r.dimension)&&s.push("link"),t.ink&&i.ink&&!0===i.ink.enabled&&s.push("ink"),t.measure&&i.measure&&!0===i.measure.enabled&&s.push("measure"),t.contextMenu&&i.contextMenu&&!0===i.contextMenu.enabled&&s.push("context-menu"),t.perspectives&&(t.perspectives._used||O.perspectivesTokenDecoded)&&s.push("perspectives"),t.history&&i.history&&!0===i.history.enabled&&s.push("history"),(null==(n=t._highlightFilter)?void 0:n.isActive())&&s.push("highlight-filter"),s}(e,t);if(0===i.length)return T.delete(t),void C(t,n);T.add(t);const s=function(e){const t=e&&e.config&&e.config.chart&&e.config.chart.license;if(t)return t;const n=x.getKey();if(n)return n;const i=u.getApex();return i&&i.license?i.license:null}(e);if(function(e){if(!e)return!1;const t=x.validateKey(e);if(!t.valid)return!1;const n=t.data&&t.data.plan;return"string"==typeof n&&I.has(n.toLowerCase())}(s))return void C(t,n);!function(e,t){if(R(e,t),"undefined"==typeof MutationObserver)return;if(e._wmWrapObserver&&e._wmObservedWrap===t)return;e._wmWrapObserver&&e._wmWrapObserver.disconnect();const n=new MutationObserver(()=>{A.node(t)||R(e,t)});n.observe(t,{childList:!0}),e._wmWrapObserver=n,e._wmObservedWrap=t}(t,n),function(e,t,n){if(e._premiumLicenseNotified)return;e._premiumLicenseNotified=!0;const i=n.length>1;if(!t)return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${S}`);const s=x.validateKey(t);if(s.valid){const e=s.data&&s.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) require a Premium or Enterprise license; the ${e} plan does not include ${i?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${S}`)}t!==x.getKey()&&console.error(`[Apex] ${s.message}`)}(t,s,i)}catch(e){}}function D(){if(!u.isBrowser())return;const e=new Set,t=u.getApex(),n=t&&t._chartInstances;Array.isArray(n)&&n.forEach(t=>{const n=t&&t.chart;n&&n.w&&!n.w.globals.isDestroyed&&(e.add(n),P(n.w,n))}),Array.from(T).forEach(t=>{const n=t&&t.w,i=n&&n.dom&&n.dom.elWrap;n&&!n.globals.isDestroyed&&i&&!1!==i.isConnected?e.has(t)||P(n,t):T.delete(t)})}x.onChange(D);const K=d.__apex_Utils;function $(e,t){const n=null!=e,i=null!=t;return n||i?{min:n?e:null,max:i?t:null}:null}function M(e){return Array.isArray(e)?e.map(e=>Array.isArray(e)?e.slice():e):[]}function j(e,t){return"function"==typeof e&&t?e===t.addXaxisAnnotation?"xaxis":e===t.addYaxisAnnotation?"yaxis":e===t.addPointAnnotation?"point":null:null}function L(e,t){const n=e.config.annotations?K.clone(e.config.annotations):null,i=[],s=e.globals.memory&&e.globals.memory.methodsToExec||[];for(const e of s){if(!e||"addAnnotation"!==e.label)continue;const n=j(e.method,t);n&&i.push({kind:n,params:K.clone(e.params)})}return{static:n,dynamic:i}}function W(e){const t=e&&e.measure;if(!t||"function"!=typeof t.getPins)return null;const n=t.getPins();return Array.isArray(n)&&n.length?{pins:n}:null}function N(e,t,{animate:n=!0,mergeOptions:i}={}){var s,r;if(!e||!t)return;"number"==typeof t.v&&t.v>1&&console.warn(`[apexcharts] ViewState v${t.v} is newer than this build understands (v1); applying best-effort.`),e.clearAnnotations();const a=i?K.clone(i):{},o=t.window&&t.window.xaxis;a.xaxis=Object.assign({},a.xaxis,o?{min:null!=(s=o.min)?s:void 0,max:null!=(r=o.max)?r:void 0}:{min:void 0,max:void 0});const c=t.window&&t.window.yaxis;if(Array.isArray(c)&&(a.yaxis=c.map(e=>{var t,n;return e?{min:null!=(t=e.min)?t:void 0,max:null!=(n=e.max)?n:void 0}:{}})),t.theme){const e={};null!=t.theme.mode&&(e.mode=t.theme.mode),null!=t.theme.palette&&(e.palette=t.theme.palette),Object.keys(e).length&&(a.theme=Object.assign({},a.theme,e))}t.annotations&&t.annotations.static&&(a.annotations=K.clone(t.annotations.static)),e.updateOptions(a,!1,n,!1,!1),function(e,t){if(!e||!t)return;const n=e.w;n.interact.zoomed=!!t.zoomed,function(e,t,n){const i=e.w;if(null==t&&null==n)return;const s=i.globals.seriesNames||[],r=new Set([...t||[],...n||[]]),a=new Set([...i.globals.collapsedSeriesIndices||[],...i.globals.ancillaryCollapsedSeriesIndices||[]]);for(let t=0;t<s.length;t++){const n=s[t];if(null==n)continue;const i=r.has(t),o=a.has(t);i&&!o?e.hideSeries(n):!i&&o&&e.showSeries(n)}}(e,t.collapsed,t.ancillaryCollapsed),t.annotations&&Array.isArray(t.annotations.dynamic)&&t.annotations.dynamic.forEach(t=>{const n=function(e){switch(e){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(t.kind);n&&"function"==typeof e[n]&&e[n](t.params,!0)});(function(e,t){Array.isArray(t)&&(e.w.interact.selectedDataPoints=M(t))})(e,t.selectedDataPoints),t.locale&&t.locale!==n.config.chart.defaultLocale&&e.setLocale(t.locale);e.measure&&"function"==typeof e.measure.setPins&&e.measure.setPins(t.measure&&t.measure.pins||[])}(e,t)}const U="apex";function B(e){return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"utf-8").toString("base64");const t=(new TextEncoder).encode(e);let n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function V(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}(t)}class z{constructor(e,t){this.w=e,this.ctx=t,this._saved=[],this._counter=0,this._used=!1}capture(){const e={v:1,view:function(e,t){var n,i;const s=e.config.xaxis||{},r=(Array.isArray(e.config.yaxis)?e.config.yaxis:e.config.yaxis?[e.config.yaxis]:[]).map(e=>$(e&&e.min,e&&e.max)),a=r.some(e=>null!==e),o=e.config.theme,c=t&&t.drilldown;return{v:1,window:{xaxis:$(s.min,s.max),yaxis:a?r:null},zoomed:!!e.interact.zoomed,collapsed:(e.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(e.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:M(e.interact.selectedDataPoints),theme:o?{mode:null!=(n=o.mode)?n:null,palette:null!=(i=o.palette)?i:null}:null,locale:e.config.chart&&e.config.chart.defaultLocale||null,annotations:L(e,t),drill:c&&c.depth>0?{path:c.path.slice()}:null,measure:W(t)}}(this.w,this.ctx)},t=this._serializableDelta();return t&&Object.keys(t).length&&(e.options=t),e}_serializableDelta(){const e=this.w.config,t=e.chart&&e.chart.perspectives&&e.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],n={};return t.forEach(t=>{if(void 0!==e[t]){const i=function(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return}}(e[t]);void 0!==i&&(n[t]=i)}}),n}encode(e){const t=e||this.capture();return B(JSON.stringify(t))}decode(e){return z.decode(e)}toURL(){if(!u.isBrowser())return"";const e=this.encode(this.capture()),t=new URL(window.location.href);return t.hash=`${U}=${e}`,t.toString()}apply(e,t={}){const n="string"==typeof e?z.decode(e):e;if(!n||!n.view)return;this._used=!0,P(this.w,this.ctx);const i=void 0===t.animate||t.animate,s=K.extend(n.options?K.clone(n.options):{},t.mergeOptions||{}),r=Object.keys(s).length?s:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(e=>{N(e,n.view,{animate:i,mergeOptions:r})})}save(e){const t="perspective-"+ ++this._counter;return this._saved.push({id:t,name:e||t,token:this.capture()}),this._used=!0,P(this.w,this.ctx),t}list(){return this._saved.map(e=>({id:e.id,name:e.name,token:e.token}))}delete(e){const t=this._saved.findIndex(t=>t.id===e);t>-1&&this._saved.splice(t,1)}teardown(){this._saved=[],this._counter=0}static decode(e){if("string"!=typeof e||!e)return null;try{const t=JSON.parse(V(e));return t&&"object"==typeof t?1!==t.v?(console.warn(`apexcharts: unsupported perspective version ${t.v} (expected 1).`),null):t:null}catch(e){return console.warn("apexcharts: failed to decode perspective token.",e),null}}static fromURL(e){try{const t=e||(u.isBrowser()?window.location.href:"");if(!t)return null;const n=new URL(t).hash.replace(/^#/,"");if(!n)return null;const i=n.split("&").map(e=>e.split("=")).find(e=>e[0]===U);return i&&null!=i[1]?z.decode(decodeURIComponent(i[1])):null}catch(e){return null}}}d.default.registerFeatures({perspectives:z,perspectivesStatics:{decode:e=>(E(),z.decode(e)),fromURL:e=>(E(),z.fromURL(e))}}),d.default.registerFeatures({storyboard:class{constructor(e,t){this.w=e,this.ctx=t,this._beats=[],this._observer=null,this._activeIndex=-1,this._animate=!0,this._warnedNoPerspectives=!1,this._used=!1}bind(e={}){var t;if(this.unbind(),!u.isBrowser())return 0;const n=this.ctx.el&&this.ctx.el.ownerDocument;if(!n||"undefined"==typeof IntersectionObserver)return 0;let i=null;if(e.scroller&&(i="string"==typeof e.scroller?n.querySelector(e.scroller):e.scroller),this._beats=this._resolveBeats(n,i,e.beats),!this._beats.length)return 0;this._animate=!1!==e.animate;const s=Math.min(Math.max(null!=(t=e.offset)?t:.5,0),1),r=+(100*s).toFixed(3),a=+(100-100*s).toFixed(3);return this._observer=new IntersectionObserver(e=>this._onIntersect(e),{root:i,rootMargin:`-${r}% 0px -${a}%`,threshold:0}),this._beats.forEach(e=>{var t;return null==(t=this._observer)?void 0:t.observe(e.el)}),this._used=!0,P(this.w,this.ctx),this._beats.length}_resolveBeats(e,t,n){const i=[];if(Array.isArray(n))return n.forEach((t,n)=>{var s,r;if(!t)return;const a=t.el&&"object"==typeof t.el?t.el:t.selector?e.querySelector(t.selector):null;a?i.push({el:a,key:null!=(r=null!=(s=t.key)?s:a.getAttribute("data-apex-beat"))?r:String(n),view:t.view,options:t.options,announce:t.announce,onEnter:"function"==typeof t.onEnter?t.onEnter:void 0}):console.warn(`apexcharts: storyboard beat ${n} has no resolvable element; skipped.`)}),i;return(t||e).querySelectorAll("[data-apex-beat]").forEach((e,t)=>{i.push({el:e,key:e.getAttribute("data-apex-beat")||String(t),view:e.getAttribute("data-apex-view")||void 0,options:void 0,announce:e.getAttribute("data-apex-announce")||void 0,onEnter:void 0})}),i}_onIntersect(e){e.forEach(e=>{const t=this._beats.findIndex(t=>t.el===e.target);t<0||(e.isIntersecting?this._activate(t):t===this._activeIndex&&e.rootBounds&&e.boundingClientRect.top>=e.rootBounds.bottom&&t>0&&this._activate(t-1))})}_activate(e,t={}){var n,i;if(e===this._activeIndex)return;const s=this._beats[e];if(!s)return;const r=e>this._activeIndex?"down":"up";this._activeIndex=e;const a=(void 0!==t.animate?t.animate:this._animate)&&!h();if(null!=s.view||s.options)if(this.ctx.perspectives){const e=null!=(n=s.view)?n:{},t="string"==typeof e||e.view?e:{view:this._normalizeView(e)};this.ctx.perspectives.apply(t,{animate:a,mergeOptions:s.options})}else this._warnedNoPerspectives||(this._warnedNoPerspectives=!0,console.warn('apexcharts: storyboard beats carry views but the perspectives feature is not bundled. import "apexcharts/features/storyboard" (which includes it) or drive beats via onEnter.'));const o={index:e,key:s.key,el:s.el,direction:r};s.onEnter&&s.onEnter(this.ctx,o),s.announce&&this._announce(s.announce),"function"==typeof this.w.config.chart.events.beatChange&&this.w.config.chart.events.beatChange(this.ctx,o),null==(i=this.ctx.events)||i.fireEvent("beatChange",[this.ctx,o])}_normalizeView(e){const t=e.annotations&&e.annotations.static||{};return c(o({},e),{annotations:{static:o({points:[],xaxis:[],yaxis:[],texts:[],images:[]},t),dynamic:e.annotations&&e.annotations.dynamic||[]}})}goTo(e,t={}){const n="number"==typeof e?e:this._beats.findIndex(t=>t.key===e);n>=0&&n<this._beats.length&&this._activate(n,t)}current(){if(this._activeIndex<0)return null;const e=this._beats[this._activeIndex];return{index:this._activeIndex,key:e?e.key:null}}unbind(){this._observer&&(this._observer.disconnect(),this._observer=null),this._beats=[],this._activeIndex=-1,this._used=!1,P(this.w,this.ctx)}teardown(){this.unbind()}_announce(e){const t=this.w;if(!t.config.chart.accessibility.announcements.enabled)return;const n=t.dom.baseEl;if(!n)return;const i=n.querySelector(".apexcharts-sr-status");i&&(i.textContent="",setTimeout(()=>{i.textContent=e},0))}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
|
|
5
|
+
"use strict";var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=(t,n,i)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,o=(e,t)=>{for(var n in t||(t={}))s.call(t,n)&&a(e,n,t[n]);if(i)for(var n of i(t))r.call(t,n)&&a(e,n,t[n]);return e},c=(e,i)=>t(e,n(i));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function l(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const d=l(require("apexcharts/core")),u=d.__apex_Environment_Environment,h=d.__apex_Animations_prefersReducedMotion,p=globalThis.console;function f(e,...t){p.error(e,...t)}function v(e){p.warn(e)}const m="APEX-",y=new Date("2027-07-31T00:00:00Z"),g="__apex_license_v1__";function b(){const e=globalThis;let t=e[g];return t||(t={key:null,listeners:new Set,result:null},e[g]=t),t}const w=class{static get licenseKey(){return b().key}static set licenseKey(e){b().key=e}static get listeners(){return b().listeners}static get validationResult(){return b().result}static set validationResult(e){b().result=e}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(e){return!!e&&this.validateKey(e).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}static setLicense(e){var t,n;if(!e)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const i=this.validateKey(e);i.valid||e===this.licenseKey||!(null==(n=this.validationResult)?void 0:n.valid)?(this.licenseKey=e,this.publish(i),i.valid||f(`[Apex] ${i.message}`)):v(`[Apex] Ignoring license key: ${null!=(t=i.message)?t:"it is not valid"} A valid license is already active on this page.`)}static validateKey(e){const t=this.parseKey(e),n=this.validateStructure(e,t);if(!n.valid||!(null==t?void 0:t.signature))return n;const i=this.verdicts.get(e);return!1===i?{data:t.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===i&&this.verifySignature(e,t,n),c(o({},n),{signatureVerified:!0===i}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(4*Math.ceil(t.length/4),"="),i=globalThis.atob;if("function"!=typeof i)throw new Error("no base64 decoder available");const s=i(n),r=new Uint8Array(s.length);for(let e=0;e<s.length;e++)r[e]=s.charCodeAt(e);return r}static canonicalPayload(e){const t=e.domains&&e.domains.length>0?e.domains.join(","):"";return`v1|${e.issueDate}|${e.expiryDate}|${e.plan}|${t}`}static notify(e){for(const t of this.listeners)try{t(e)}catch(e){}}static parseKey(e){if("string"!=typeof e||!e.startsWith(m))return null;const t=e.slice(5);if(!t)return null;try{const e=(new TextDecoder).decode(this.base64ToBytes(t)),n=JSON.parse(e);return n.issueDate&&n.expiryDate&&n.plan?{data:{domains:Array.isArray(n.domains)?n.domains:void 0,expiryDate:n.expiryDate,issueDate:n.issueDate,plan:n.plan,valid:!0},signature:"string"==typeof n.sig&&n.sig?n.sig:null}:null}catch(e){return null}}static publish(e){this.validationResult=e,this.notify(e)}static validateStructure(e,t){const n=e=>({expired:!1,message:e,signatureVerified:!1,valid:!1});if("string"!=typeof e||!e.startsWith(m))return n('Invalid license key format. License key must start with "APEX-".');if(!t)return n("Invalid license key. Unable to decode license data.");const{data:i,signature:s}=t;if(!s&&new Date>=y)return n("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(i.expiryDate)<new Date)return{data:i,expired:!0,message:`License expired on ${i.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(i.domains&&i.domains.length>0){const e="undefined"==typeof location?"":location.hostname;if(!i.domains.some(t=>e===t||e.endsWith(`.${t}`)))return{data:i,expired:!1,message:`License is not valid for this domain (${e}). Allowed domains: ${i.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:i,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(e,t,n){return i=this,s=null,r=function*(){var i;if(this.verifying.has(e)||this.verdicts.has(e))return;this.verifying.add(e);const s=this.epoch,r=null==(i=globalThis.crypto)?void 0:i.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(e),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,v(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const a=(new TextEncoder).encode(this.canonicalPayload(t.data));let l=!1;for(const e of this.publicKeysSpki){try{const n=yield r.importKey("spki",this.base64ToBytes(e),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);l=yield r.verify({hash:"SHA-256",name:"ECDSA"},n,this.base64ToBytes(t.signature),a)}catch(e){l=!1}if(l)break}if(this.verifying.delete(e),this.epoch!==s)return;if(this.verdicts.set(e,l),l){const t=c(o({},n),{signatureVerified:!0});return void(this.licenseKey===e?this.publish(t):this.notify(t))}const d="Invalid license key. The license signature does not verify.",u={data:t.data,expired:!1,message:d,signatureVerified:!0,valid:!1};this.licenseKey===e?this.publish(u):this.notify(u),f(`[Apex] ${d}`)},new Promise((e,t)=>{var n=e=>{try{o(r.next(e))}catch(e){t(e)}},a=e=>{try{o(r.throw(e))}catch(e){t(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,a);o((r=r.apply(i,s)).next())});var i,s,r}};w.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],w.verdicts=new Map,w.verifying=new Set,w.warnedUnverifiable=!1,w.epoch=0;let x=w;const _=class{static applyStyles(e){Object.assign(e.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(e){return e?e.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(e,t){return e&&"undefined"!=typeof document?(this.setManaged(e,t),this.paint(e)):null}static exists(e){return!!this.node(e)}static remove(e,t){e&&(this.setManaged(e,t),this.erase(e))}static untrack(e){this.managed.delete(e)}static createWatermarkPattern(){const e=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${e}</text>\n </svg>\n `.trim())}")`}static erase(e){var t;null==(t=this.node(e))||t.remove()}static paint(e){let t=this.node(e);return t||(t=document.createElement("div"),t.setAttribute(this.WATERMARK_ATTR,""),e.appendChild(t)),this.applyStyles(t),"function"==typeof getComputedStyle&&"static"===getComputedStyle(e).position&&(e.style.position="relative"),t}static reconcile(){const e=x.isLicenseValid();for(const t of this.managed)t.isConnected?e?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(e,t){!1!==(null==t?void 0:t.manage)?this.track(e):this.managed.delete(e)}static track(e){this.managed.add(e),this.subscribed||(this.subscribed=!0,x.onChange(()=>{this.reconcile()}))}};_.WATERMARK_ATTR="data-apexcharts-watermark",_.WATERMARK_TEXT="APEXCHARTS",_.ATTR="data-apexcharts-watermark",_.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},_.managed=new Set,_.subscribed=!1;let A=_;const S="https://apexcharts.com/pricing",k="__apexcharts_license_enforcer_v1__";globalThis[k]||(globalThis[k]={perspectivesTokenDecoded:!1,enforced:new Set});const O=globalThis[k],T=O.enforced;function E(){O.perspectivesTokenDecoded=!0,D()}const I=new Set(["premium","enterprise"]);function P(e,t){const n=A.add(t,{manage:!1});if(e._wmPainted=!0,!n||"undefined"==typeof MutationObserver)return;if(e._wmNodeObserver&&e._wmObservedNode===n)return;e._wmNodeObserver&&e._wmNodeObserver.disconnect();const i=new MutationObserver(()=>{const e=A.node(t);e&&(i.disconnect(),A.applyStyles(e),i.takeRecords(),i.observe(e,{attributes:!0,attributeFilter:["style"]}))});i.observe(n,{attributes:!0,attributeFilter:["style"]}),e._wmNodeObserver=i,e._wmObservedNode=n}function R(e,t){if(!e._wmPainted)return;e._wmPainted=!1,e._wmWrapObserver&&(e._wmWrapObserver.disconnect(),e._wmWrapObserver=null),e._wmNodeObserver&&(e._wmNodeObserver.disconnect(),e._wmNodeObserver=null),e._wmObservedNode=null,e._wmObservedWrap=null;const n=t||e.w&&e.w.dom&&e.w.dom.elWrap;n&&A.remove(n,{manage:!1})}function C(e,t){try{if(!u.isBrowser())return;if(e&&e.globals&&e.globals.isDestroyed)return void T.delete(t);const n=e&&e.dom&&e.dom.elWrap;if(!n)return;const i=function(e,t){var n;const i=e&&e.config&&e.config.chart||{},s=[];"unit"===i.type&&s.push("unit"),"raincloud"===i.requestedType&&s.push("raincloud"),t.trellis&&"function"==typeof t.trellis.isActive&&t.trellis.isActive()&&s.push("trellis"),t.storyboard&&t.storyboard._used&&s.push("storyboard");const r=i.link;return t.linkedViews&&r&&(!0===r.enabled||"function"==typeof r.dimension)&&s.push("link"),t.ink&&i.ink&&!0===i.ink.enabled&&s.push("ink"),t.measure&&i.measure&&!0===i.measure.enabled&&s.push("measure"),t.contextMenu&&i.contextMenu&&!0===i.contextMenu.enabled&&s.push("context-menu"),t.perspectives&&(t.perspectives._used||O.perspectivesTokenDecoded)&&s.push("perspectives"),t.history&&i.history&&!0===i.history.enabled&&s.push("history"),(null==(n=t._highlightFilter)?void 0:n.isActive())&&s.push("highlight-filter"),s}(e,t);if(0===i.length)return T.delete(t),void R(t,n);T.add(t);const s=function(e){const t=e&&e.config&&e.config.chart&&e.config.chart.license;if(t)return t;const n=x.getKey();if(n)return n;const i=u.getApex();return i&&i.license?i.license:null}(e);if(function(e){if(!e)return!1;const t=x.validateKey(e);if(!t.valid)return!1;const n=t.data&&t.data.plan;return"string"==typeof n&&I.has(n.toLowerCase())}(s))return void R(t,n);!function(e,t){if(P(e,t),"undefined"==typeof MutationObserver)return;if(e._wmWrapObserver&&e._wmObservedWrap===t)return;e._wmWrapObserver&&e._wmWrapObserver.disconnect();const n=new MutationObserver(()=>{A.node(t)||P(e,t)});n.observe(t,{childList:!0}),e._wmWrapObserver=n,e._wmObservedWrap=t}(t,n),function(e,t,n){if(e._premiumLicenseNotified)return;e._premiumLicenseNotified=!0;const i=n.length>1;if(!t)return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${S}`);const s=x.validateKey(t);if(s.valid){const e=s.data&&s.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) require a Premium or Enterprise license; the ${e} plan does not include ${i?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${S}`)}t!==x.getKey()&&console.error(`[Apex] ${s.message}`)}(t,s,i)}catch(e){}}function D(){if(!u.isBrowser())return;const e=new Set,t=u.getApex(),n=t&&t._chartInstances;Array.isArray(n)&&n.forEach(t=>{const n=t&&t.chart;n&&n.w&&!n.w.globals.isDestroyed&&(e.add(n),C(n.w,n))}),Array.from(T).forEach(t=>{const n=t&&t.w,i=n&&n.dom&&n.dom.elWrap;n&&!n.globals.isDestroyed&&i&&!1!==i.isConnected?e.has(t)||C(n,t):T.delete(t)})}x.onChange(D);const K=d.__apex_Utils;function $(e,t){const n=null!=e,i=null!=t;return n||i?{min:n?e:null,max:i?t:null}:null}function M(e){return Array.isArray(e)?e.map(e=>Array.isArray(e)?e.slice():e):[]}function j(e,t){return"function"==typeof e&&t?e===t.addXaxisAnnotation?"xaxis":e===t.addYaxisAnnotation?"yaxis":e===t.addPointAnnotation?"point":null:null}function L(e,t){const n=e.config.annotations?K.clone(e.config.annotations):null,i=[],s=e.globals.memory&&e.globals.memory.methodsToExec||[];for(const e of s){if(!e||"addAnnotation"!==e.label)continue;const n=j(e.method,t);n&&i.push({kind:n,params:K.clone(e.params)})}return{static:n,dynamic:i}}function W(e){const t=e&&e.measure;if(!t||"function"!=typeof t.getPins)return null;const n=t.getPins();return Array.isArray(n)&&n.length?{pins:n}:null}function N(e,t,{animate:n=!0,mergeOptions:i}={}){var s,r;if(!e||!t)return;"number"==typeof t.v&&t.v>1&&console.warn(`[apexcharts] ViewState v${t.v} is newer than this build understands (v1); applying best-effort.`),e.clearAnnotations();const a=i?K.clone(i):{},o=t.window&&t.window.xaxis;a.xaxis=Object.assign({},a.xaxis,o?{min:null!=(s=o.min)?s:void 0,max:null!=(r=o.max)?r:void 0}:{min:void 0,max:void 0});const c=t.window&&t.window.yaxis;if(Array.isArray(c)&&(a.yaxis=c.map(e=>{var t,n;return e?{min:null!=(t=e.min)?t:void 0,max:null!=(n=e.max)?n:void 0}:{}})),t.theme){const e={};null!=t.theme.mode&&(e.mode=t.theme.mode),null!=t.theme.palette&&(e.palette=t.theme.palette),Object.keys(e).length&&(a.theme=Object.assign({},a.theme,e))}t.annotations&&t.annotations.static&&(a.annotations=K.clone(t.annotations.static)),e.updateOptions(a,!1,n,!1,!1),function(e,t){if(!e||!t)return;const n=e.w;n.interact.zoomed=!!t.zoomed,function(e,t,n){const i=e.w;if(null==t&&null==n)return;const s=i.globals.seriesNames||[],r=new Set([...t||[],...n||[]]),a=new Set([...i.globals.collapsedSeriesIndices||[],...i.globals.ancillaryCollapsedSeriesIndices||[]]);for(let t=0;t<s.length;t++){const n=s[t];if(null==n)continue;const i=r.has(t),o=a.has(t);i&&!o?e.hideSeries(n):!i&&o&&e.showSeries(n)}}(e,t.collapsed,t.ancillaryCollapsed),t.annotations&&Array.isArray(t.annotations.dynamic)&&t.annotations.dynamic.forEach(t=>{const n=function(e){switch(e){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(t.kind);n&&"function"==typeof e[n]&&e[n](t.params,!0)});(function(e,t){Array.isArray(t)&&(e.w.interact.selectedDataPoints=M(t))})(e,t.selectedDataPoints),t.locale&&t.locale!==n.config.chart.defaultLocale&&e.setLocale(t.locale);e.measure&&"function"==typeof e.measure.setPins&&e.measure.setPins(t.measure&&t.measure.pins||[])}(e,t)}const U="apex";function B(e){return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"utf-8").toString("base64");const t=(new TextEncoder).encode(e);let n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function V(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}(t)}class z{constructor(e,t){this.w=e,this.ctx=t,this._saved=[],this._counter=0,this._used=!1}capture(){const e={v:1,view:function(e,t){var n,i;const s=e.config.xaxis||{},r=(Array.isArray(e.config.yaxis)?e.config.yaxis:e.config.yaxis?[e.config.yaxis]:[]).map(e=>$(e&&e.min,e&&e.max)),a=r.some(e=>null!==e),o=e.config.theme,c=t&&t.drilldown;return{v:1,window:{xaxis:$(s.min,s.max),yaxis:a?r:null},zoomed:!!e.interact.zoomed,collapsed:(e.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(e.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:M(e.interact.selectedDataPoints),theme:o?{mode:null!=(n=o.mode)?n:null,palette:null!=(i=o.palette)?i:null}:null,locale:e.config.chart&&e.config.chart.defaultLocale||null,annotations:L(e,t),drill:c&&c.depth>0?{path:c.path.slice()}:null,measure:W(t)}}(this.w,this.ctx)},t=this._serializableDelta();return t&&Object.keys(t).length&&(e.options=t),e}_serializableDelta(){const e=this.w.config,t=e.chart&&e.chart.perspectives&&e.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],n={};return t.forEach(t=>{if(void 0!==e[t]){const i=function(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return}}(e[t]);void 0!==i&&(n[t]=i)}}),n}encode(e){const t=e||this.capture();return B(JSON.stringify(t))}decode(e){return z.decode(e)}toURL(){if(!u.isBrowser())return"";const e=this.encode(this.capture()),t=new URL(window.location.href);return t.hash=`${U}=${e}`,t.toString()}apply(e,t={}){const n="string"==typeof e?z.decode(e):e;if(!n||!n.view)return;this._used=!0,C(this.w,this.ctx);const i=void 0===t.animate||t.animate,s=K.extend(n.options?K.clone(n.options):{},t.mergeOptions||{}),r=Object.keys(s).length?s:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(e=>{N(e,n.view,{animate:i,mergeOptions:r})})}save(e){const t="perspective-"+ ++this._counter;return this._saved.push({id:t,name:e||t,token:this.capture()}),this._used=!0,C(this.w,this.ctx),t}list(){return this._saved.map(e=>({id:e.id,name:e.name,token:e.token}))}delete(e){const t=this._saved.findIndex(t=>t.id===e);t>-1&&this._saved.splice(t,1)}teardown(){this._saved=[],this._counter=0}static decode(e){if("string"!=typeof e||!e)return null;try{const t=JSON.parse(V(e));return t&&"object"==typeof t?1!==t.v?(console.warn(`apexcharts: unsupported perspective version ${t.v} (expected 1).`),null):t:null}catch(e){return console.warn("apexcharts: failed to decode perspective token.",e),null}}static fromURL(e){try{const t=e||(u.isBrowser()?window.location.href:"");if(!t)return null;const n=new URL(t).hash.replace(/^#/,"");if(!n)return null;const i=n.split("&").map(e=>e.split("=")).find(e=>e[0]===U);return i&&null!=i[1]?z.decode(decodeURIComponent(i[1])):null}catch(e){return null}}}d.default.registerFeatures({perspectives:z,perspectivesStatics:{decode:e=>(E(),z.decode(e)),fromURL:e=>(E(),z.fromURL(e))}}),d.default.registerFeatures({storyboard:class{constructor(e,t){this.w=e,this.ctx=t,this._beats=[],this._observer=null,this._activeIndex=-1,this._animate=!0,this._warnedNoPerspectives=!1,this._used=!1}bind(e={}){var t;if(this.unbind(),!u.isBrowser())return 0;const n=this.ctx.el&&this.ctx.el.ownerDocument;if(!n||"undefined"==typeof IntersectionObserver)return 0;let i=null;if(e.scroller&&(i="string"==typeof e.scroller?n.querySelector(e.scroller):e.scroller),this._beats=this._resolveBeats(n,i,e.beats),!this._beats.length)return 0;this._animate=!1!==e.animate;const s=Math.min(Math.max(null!=(t=e.offset)?t:.5,0),1),r=+(100*s).toFixed(3),a=+(100-100*s).toFixed(3);return this._observer=new IntersectionObserver(e=>this._onIntersect(e),{root:i,rootMargin:`-${r}% 0px -${a}%`,threshold:0}),this._beats.forEach(e=>{var t;return null==(t=this._observer)?void 0:t.observe(e.el)}),this._used=!0,C(this.w,this.ctx),this._beats.length}_resolveBeats(e,t,n){const i=[];if(Array.isArray(n))return n.forEach((t,n)=>{var s,r;if(!t)return;const a=t.el&&"object"==typeof t.el?t.el:t.selector?e.querySelector(t.selector):null;a?i.push({el:a,key:null!=(r=null!=(s=t.key)?s:a.getAttribute("data-apex-beat"))?r:String(n),view:t.view,options:t.options,announce:t.announce,onEnter:"function"==typeof t.onEnter?t.onEnter:void 0}):console.warn(`apexcharts: storyboard beat ${n} has no resolvable element; skipped.`)}),i;return(t||e).querySelectorAll("[data-apex-beat]").forEach((e,t)=>{i.push({el:e,key:e.getAttribute("data-apex-beat")||String(t),view:e.getAttribute("data-apex-view")||void 0,options:void 0,announce:e.getAttribute("data-apex-announce")||void 0,onEnter:void 0})}),i}_onIntersect(e){e.forEach(e=>{const t=this._beats.findIndex(t=>t.el===e.target);t<0||(e.isIntersecting?this._activate(t):t===this._activeIndex&&e.rootBounds&&e.boundingClientRect.top>=e.rootBounds.bottom&&t>0&&this._activate(t-1))})}_activate(e,t={}){var n,i;if(e===this._activeIndex)return;const s=this._beats[e];if(!s)return;const r=e>this._activeIndex?"down":"up";this._activeIndex=e;const a=(void 0!==t.animate?t.animate:this._animate)&&!h();if(null!=s.view||s.options)if(this.ctx.perspectives){const e=null!=(n=s.view)?n:{},t="string"==typeof e||e.view?e:{view:this._normalizeView(e)};this.ctx.perspectives.apply(t,{animate:a,mergeOptions:s.options})}else this._warnedNoPerspectives||(this._warnedNoPerspectives=!0,console.warn('apexcharts: storyboard beats carry views but the perspectives feature is not bundled. import "apexcharts/features/storyboard" (which includes it) or drive beats via onEnter.'));const o={index:e,key:s.key,el:s.el,direction:r};s.onEnter&&s.onEnter(this.ctx,o),s.announce&&this._announce(s.announce),"function"==typeof this.w.config.chart.events.beatChange&&this.w.config.chart.events.beatChange(this.ctx,o),null==(i=this.ctx.events)||i.fireEvent("beatChange",[this.ctx,o])}_normalizeView(e){const t=e.annotations&&e.annotations.static||{};return c(o({},e),{annotations:{static:o({points:[],xaxis:[],yaxis:[],texts:[],images:[]},t),dynamic:e.annotations&&e.annotations.dynamic||[]}})}goTo(e,t={}){const n="number"==typeof e?e:this._beats.findIndex(t=>t.key===e);n>=0&&n<this._beats.length&&this._activate(n,t)}current(){if(this._activeIndex<0)return null;const e=this._beats[this._activeIndex];return{index:this._activeIndex,key:e?e.key:null}}unbind(){this._observer&&(this._observer.disconnect(),this._observer=null),this._beats=[],this._activeIndex=-1,this._used=!1,C(this.w,this.ctx)}teardown(){this.unbind()}_announce(e){const t=this.w;if(!t.config.chart.accessibility.announcements.enabled)return;const n=t.dom.baseEl;if(!n)return;const i=n.querySelector(".apexcharts-sr-status");i&&(i.textContent="",setTimeout(()=>{i.textContent=e},0))}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
|
|
@@ -38,7 +38,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
40
|
/*!
|
|
41
|
-
* ApexCharts v8.
|
|
41
|
+
* ApexCharts v8.3.1
|
|
42
42
|
* (c) 2018-2026 ApexCharts
|
|
43
43
|
*/
|
|
44
44
|
import * as _core from "apexcharts/core";
|
|
@@ -309,6 +309,7 @@ function licensedForPremium(key) {
|
|
|
309
309
|
}
|
|
310
310
|
function reinstateWatermark(ctx, elWrap) {
|
|
311
311
|
const node = C.add(elWrap, { manage: false });
|
|
312
|
+
ctx._wmPainted = true;
|
|
312
313
|
if (!node || typeof MutationObserver === "undefined") return;
|
|
313
314
|
if (ctx._wmNodeObserver && ctx._wmObservedNode === node) return;
|
|
314
315
|
if (ctx._wmNodeObserver) ctx._wmNodeObserver.disconnect();
|
|
@@ -337,6 +338,8 @@ function addWatermark(ctx, elWrap) {
|
|
|
337
338
|
ctx._wmObservedWrap = elWrap;
|
|
338
339
|
}
|
|
339
340
|
function teardownWatermark(ctx, elWrap) {
|
|
341
|
+
if (!ctx._wmPainted) return;
|
|
342
|
+
ctx._wmPainted = false;
|
|
340
343
|
if (ctx._wmWrapObserver) {
|
|
341
344
|
ctx._wmWrapObserver.disconnect();
|
|
342
345
|
ctx._wmWrapObserver = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v8.
|
|
2
|
+
* ApexCharts v8.3.1
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
|
-
!function(e){var t="undefined"!=typeof globalThis?globalThis:self,n=t.ApexCharts;if(n&&n.__internals)return e.call(t);if(n)throw new Error("ApexCharts: dist/features/storyboard.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");if("function"==typeof define&&define.amd)return e.call(t);if("object"==typeof exports&&"undefined"!=typeof module||"undefined"==typeof window||"undefined"==typeof document)throw new Error("ApexCharts: dist/features/storyboard.js is a script-tag add-on and needs the ApexCharts script on the page. A bundler imports the matching apexcharts/ sub-path instead.");var i={file:"dist/features/storyboard.js",run:e,done:!1},s=t.__apexcharts_pending_addons__||(t.__apexcharts_pending_addons__=[]);s.push(i),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!i.done){var n=t.ApexCharts;if(n)if(n.__internals){i.done=!0;var r=s.indexOf(i);-1!==r&&s.splice(r,1);try{e.call(t),n.__drainsAddons||t.console.warn("ApexCharts: dist/features/storyboard.js loaded before the ApexCharts script, which is older than 8.0 and does not pick up add-ons loaded first, so it registered only when the page finished loading. Put its tag after the ApexCharts script.")}catch(e){t.console.error("ApexCharts: dist/features/storyboard.js could not register with the ApexCharts script on this page: "+(e&&e.message))}}else t.console.error("ApexCharts: dist/features/storyboard.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");else t.console.warn("ApexCharts: dist/features/storyboard.js is waiting for the ApexCharts script, which had not loaded when the page finished loading. It registers when an ApexCharts 8.0 or later script loads; if the page has none, add apexcharts.min.js (or apexcharts.core.min.js, or apexcharts.full.min.js).")}})}(function(){var e,t;e=this,t=function(e){"use strict";var t=Object.defineProperty,n=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(e,n,i)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,c=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&o(e,n,t[n]);if(s)for(var n of s(t))a.call(t,n)&&o(e,n,t[n]);return e},l=(e,t)=>n(e,i(t));const d=globalThis.ApexCharts,u=globalThis.ApexCharts.__internals.__apex_Environment_Environment,h=globalThis.ApexCharts.__internals;h.__apex_Animations,h.__apex_Animations_computeStagger,h.__apex_Animations_applyAnimationPolicy;const p=h.__apex_Animations_prefersReducedMotion;h.__apex_Animations_applyProgressiveReveal;const f=globalThis.console;function m(e,...t){f.error(e,...t)}function v(e){f.warn(e)}const y="APEX-",g=new Date("2027-07-31T00:00:00Z"),b="__apex_license_v1__";function x(){const e=globalThis;let t=e[b];return t||(t={key:null,listeners:new Set,result:null},e[b]=t),t}const w=class{static get licenseKey(){return x().key}static set licenseKey(e){x().key=e}static get listeners(){return x().listeners}static get validationResult(){return x().result}static set validationResult(e){x().result=e}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(e){return!!e&&this.validateKey(e).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}static setLicense(e){var t,n;if(!e)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const i=this.validateKey(e);i.valid||e===this.licenseKey||!(null==(n=this.validationResult)?void 0:n.valid)?(this.licenseKey=e,this.publish(i),i.valid||m(`[Apex] ${i.message}`)):v(`[Apex] Ignoring license key: ${null!=(t=i.message)?t:"it is not valid"} A valid license is already active on this page.`)}static validateKey(e){const t=this.parseKey(e),n=this.validateStructure(e,t);if(!n.valid||!(null==t?void 0:t.signature))return n;const i=this.verdicts.get(e);return!1===i?{data:t.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===i&&this.verifySignature(e,t,n),l(c({},n),{signatureVerified:!0===i}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(4*Math.ceil(t.length/4),"="),i=globalThis.atob;if("function"!=typeof i)throw new Error("no base64 decoder available");const s=i(n),r=new Uint8Array(s.length);for(let e=0;e<s.length;e++)r[e]=s.charCodeAt(e);return r}static canonicalPayload(e){const t=e.domains&&e.domains.length>0?e.domains.join(","):"";return`v1|${e.issueDate}|${e.expiryDate}|${e.plan}|${t}`}static notify(e){for(const t of this.listeners)try{t(e)}catch(e){}}static parseKey(e){if("string"!=typeof e||!e.startsWith(y))return null;const t=e.slice(5);if(!t)return null;try{const e=(new TextDecoder).decode(this.base64ToBytes(t)),n=JSON.parse(e);return n.issueDate&&n.expiryDate&&n.plan?{data:{domains:Array.isArray(n.domains)?n.domains:void 0,expiryDate:n.expiryDate,issueDate:n.issueDate,plan:n.plan,valid:!0},signature:"string"==typeof n.sig&&n.sig?n.sig:null}:null}catch(e){return null}}static publish(e){this.validationResult=e,this.notify(e)}static validateStructure(e,t){const n=e=>({expired:!1,message:e,signatureVerified:!1,valid:!1});if("string"!=typeof e||!e.startsWith(y))return n('Invalid license key format. License key must start with "APEX-".');if(!t)return n("Invalid license key. Unable to decode license data.");const{data:i,signature:s}=t;if(!s&&new Date>=g)return n("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(i.expiryDate)<new Date)return{data:i,expired:!0,message:`License expired on ${i.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(i.domains&&i.domains.length>0){const e="undefined"==typeof location?"":location.hostname;if(!i.domains.some(t=>e===t||e.endsWith(`.${t}`)))return{data:i,expired:!1,message:`License is not valid for this domain (${e}). Allowed domains: ${i.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:i,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(e,t,n){return i=this,s=null,r=function*(){var i;if(this.verifying.has(e)||this.verdicts.has(e))return;this.verifying.add(e);const s=this.epoch,r=null==(i=globalThis.crypto)?void 0:i.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(e),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,v(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const a=(new TextEncoder).encode(this.canonicalPayload(t.data));let o=!1;for(const e of this.publicKeysSpki){try{const n=yield r.importKey("spki",this.base64ToBytes(e),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);o=yield r.verify({hash:"SHA-256",name:"ECDSA"},n,this.base64ToBytes(t.signature),a)}catch(e){o=!1}if(o)break}if(this.verifying.delete(e),this.epoch!==s)return;if(this.verdicts.set(e,o),o){const t=l(c({},n),{signatureVerified:!0});return void(this.licenseKey===e?this.publish(t):this.notify(t))}const d="Invalid license key. The license signature does not verify.",u={data:t.data,expired:!1,message:d,signatureVerified:!0,valid:!1};this.licenseKey===e?this.publish(u):this.notify(u),m(`[Apex] ${d}`)},new Promise((e,t)=>{var n=e=>{try{o(r.next(e))}catch(e){t(e)}},a=e=>{try{o(r.throw(e))}catch(e){t(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,a);o((r=r.apply(i,s)).next())});var i,s,r}};w.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],w.verdicts=new Map,w.verifying=new Set,w.warnedUnverifiable=!1,w.epoch=0;let _=w;const A=class{static applyStyles(e){Object.assign(e.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(e){return e?e.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(e,t){return e&&"undefined"!=typeof document?(this.setManaged(e,t),this.paint(e)):null}static exists(e){return!!this.node(e)}static remove(e,t){e&&(this.setManaged(e,t),this.erase(e))}static untrack(e){this.managed.delete(e)}static createWatermarkPattern(){const e=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${e}</text>\n </svg>\n `.trim())}")`}static erase(e){var t;null==(t=this.node(e))||t.remove()}static paint(e){let t=this.node(e);return t||(t=document.createElement("div"),t.setAttribute(this.WATERMARK_ATTR,""),e.appendChild(t)),this.applyStyles(t),"function"==typeof getComputedStyle&&"static"===getComputedStyle(e).position&&(e.style.position="relative"),t}static reconcile(){const e=_.isLicenseValid();for(const t of this.managed)t.isConnected?e?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(e,t){!1!==(null==t?void 0:t.manage)?this.track(e):this.managed.delete(e)}static track(e){this.managed.add(e),this.subscribed||(this.subscribed=!0,_.onChange(()=>{this.reconcile()}))}};A.WATERMARK_ATTR="data-apexcharts-watermark",A.WATERMARK_TEXT="APEXCHARTS",A.ATTR="data-apexcharts-watermark",A.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},A.managed=new Set,A.subscribed=!1;let S=A;const k="https://apexcharts.com/pricing",C="__apexcharts_license_enforcer_v1__";globalThis[C]||(globalThis[C]={perspectivesTokenDecoded:!1,enforced:new Set});const T=globalThis[C],O=T.enforced;function E(){T.perspectivesTokenDecoded=!0,D()}const I=new Set(["premium","enterprise"]);function R(e,t){const n=S.add(t,{manage:!1});if(!n||"undefined"==typeof MutationObserver)return;if(e._wmNodeObserver&&e._wmObservedNode===n)return;e._wmNodeObserver&&e._wmNodeObserver.disconnect();const i=new MutationObserver(()=>{const e=S.node(t);e&&(i.disconnect(),S.applyStyles(e),i.takeRecords(),i.observe(e,{attributes:!0,attributeFilter:["style"]}))});i.observe(n,{attributes:!0,attributeFilter:["style"]}),e._wmNodeObserver=i,e._wmObservedNode=n}function j(e,t){e._wmWrapObserver&&(e._wmWrapObserver.disconnect(),e._wmWrapObserver=null),e._wmNodeObserver&&(e._wmNodeObserver.disconnect(),e._wmNodeObserver=null),e._wmObservedNode=null,e._wmObservedWrap=null;const n=t||e.w&&e.w.dom&&e.w.dom.elWrap;n&&S.remove(n,{manage:!1})}function P(e,t){try{if(!u.isBrowser())return;if(e&&e.globals&&e.globals.isDestroyed)return void O.delete(t);const n=e&&e.dom&&e.dom.elWrap;if(!n)return;const i=function(e,t){var n;const i=e&&e.config&&e.config.chart||{},s=[];"unit"===i.type&&s.push("unit"),"raincloud"===i.requestedType&&s.push("raincloud"),t.trellis&&"function"==typeof t.trellis.isActive&&t.trellis.isActive()&&s.push("trellis"),t.storyboard&&t.storyboard._used&&s.push("storyboard");const r=i.link;return t.linkedViews&&r&&(!0===r.enabled||"function"==typeof r.dimension)&&s.push("link"),t.ink&&i.ink&&!0===i.ink.enabled&&s.push("ink"),t.measure&&i.measure&&!0===i.measure.enabled&&s.push("measure"),t.contextMenu&&i.contextMenu&&!0===i.contextMenu.enabled&&s.push("context-menu"),t.perspectives&&(t.perspectives._used||T.perspectivesTokenDecoded)&&s.push("perspectives"),t.history&&i.history&&!0===i.history.enabled&&s.push("history"),(null==(n=t._highlightFilter)?void 0:n.isActive())&&s.push("highlight-filter"),s}(e,t);if(0===i.length)return O.delete(t),void j(t,n);O.add(t);const s=function(e){const t=e&&e.config&&e.config.chart&&e.config.chart.license;if(t)return t;const n=_.getKey();if(n)return n;const i=u.getApex();return i&&i.license?i.license:null}(e);if(function(e){if(!e)return!1;const t=_.validateKey(e);if(!t.valid)return!1;const n=t.data&&t.data.plan;return"string"==typeof n&&I.has(n.toLowerCase())}(s))return void j(t,n);!function(e,t){if(R(e,t),"undefined"==typeof MutationObserver)return;if(e._wmWrapObserver&&e._wmObservedWrap===t)return;e._wmWrapObserver&&e._wmWrapObserver.disconnect();const n=new MutationObserver(()=>{S.node(t)||R(e,t)});n.observe(t,{childList:!0}),e._wmWrapObserver=n,e._wmObservedWrap=t}(t,n),function(e,t,n){if(e._premiumLicenseNotified)return;e._premiumLicenseNotified=!0;const i=n.length>1;if(!t)return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${k}`);const s=_.validateKey(t);if(s.valid){const e=s.data&&s.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) require a Premium or Enterprise license; the ${e} plan does not include ${i?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${k}`)}t!==_.getKey()&&console.error(`[Apex] ${s.message}`)}(t,s,i)}catch(e){}}function D(){if(!u.isBrowser())return;const e=new Set,t=u.getApex(),n=t&&t._chartInstances;Array.isArray(n)&&n.forEach(t=>{const n=t&&t.chart;n&&n.w&&!n.w.globals.isDestroyed&&(e.add(n),P(n.w,n))}),Array.from(O).forEach(t=>{const n=t&&t.w,i=n&&n.dom&&n.dom.elWrap;n&&!n.globals.isDestroyed&&i&&!1!==i.isConnected?e.has(t)||P(n,t):O.delete(t)})}_.onChange(D);const K=globalThis.ApexCharts.__internals.__apex_Utils;function $(e,t){const n=null!=e,i=null!=t;return n||i?{min:n?e:null,max:i?t:null}:null}function L(e){return Array.isArray(e)?e.map(e=>Array.isArray(e)?e.slice():e):[]}function M(e,t){return"function"==typeof e&&t?e===t.addXaxisAnnotation?"xaxis":e===t.addYaxisAnnotation?"yaxis":e===t.addPointAnnotation?"point":null:null}function W(e,t){const n=e.config.annotations?K.clone(e.config.annotations):null,i=[],s=e.globals.memory&&e.globals.memory.methodsToExec||[];for(const e of s){if(!e||"addAnnotation"!==e.label)continue;const n=M(e.method,t);n&&i.push({kind:n,params:K.clone(e.params)})}return{static:n,dynamic:i}}function N(e){const t=e&&e.measure;if(!t||"function"!=typeof t.getPins)return null;const n=t.getPins();return Array.isArray(n)&&n.length?{pins:n}:null}function U(e,t,{animate:n=!0,mergeOptions:i}={}){var s,r;if(!e||!t)return;"number"==typeof t.v&&t.v>1&&console.warn(`[apexcharts] ViewState v${t.v} is newer than this build understands (v1); applying best-effort.`),e.clearAnnotations();const a=i?K.clone(i):{},o=t.window&&t.window.xaxis;a.xaxis=Object.assign({},a.xaxis,o?{min:null!=(s=o.min)?s:void 0,max:null!=(r=o.max)?r:void 0}:{min:void 0,max:void 0});const c=t.window&&t.window.yaxis;if(Array.isArray(c)&&(a.yaxis=c.map(e=>{var t,n;return e?{min:null!=(t=e.min)?t:void 0,max:null!=(n=e.max)?n:void 0}:{}})),t.theme){const e={};null!=t.theme.mode&&(e.mode=t.theme.mode),null!=t.theme.palette&&(e.palette=t.theme.palette),Object.keys(e).length&&(a.theme=Object.assign({},a.theme,e))}t.annotations&&t.annotations.static&&(a.annotations=K.clone(t.annotations.static)),e.updateOptions(a,!1,n,!1,!1),function(e,t){if(!e||!t)return;const n=e.w;n.interact.zoomed=!!t.zoomed,function(e,t,n){const i=e.w;if(null==t&&null==n)return;const s=i.globals.seriesNames||[],r=new Set([...t||[],...n||[]]),a=new Set([...i.globals.collapsedSeriesIndices||[],...i.globals.ancillaryCollapsedSeriesIndices||[]]);for(let t=0;t<s.length;t++){const n=s[t];if(null==n)continue;const i=r.has(t),o=a.has(t);i&&!o?e.hideSeries(n):!i&&o&&e.showSeries(n)}}(e,t.collapsed,t.ancillaryCollapsed),t.annotations&&Array.isArray(t.annotations.dynamic)&&t.annotations.dynamic.forEach(t=>{const n=function(e){switch(e){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(t.kind);n&&"function"==typeof e[n]&&e[n](t.params,!0)}),function(e,t){Array.isArray(t)&&(e.w.interact.selectedDataPoints=L(t))}(e,t.selectedDataPoints),t.locale&&t.locale!==n.config.chart.defaultLocale&&e.setLocale(t.locale),e.measure&&"function"==typeof e.measure.setPins&&e.measure.setPins(t.measure&&t.measure.pins||[])}(e,t)}const B="apex";function V(e){return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"utf-8").toString("base64");const t=(new TextEncoder).encode(e);let n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function z(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}(t)}class q{constructor(e,t){this.w=e,this.ctx=t,this._saved=[],this._counter=0,this._used=!1}capture(){const e={v:1,view:function(e,t){var n,i;const s=e.config.xaxis||{},r=(Array.isArray(e.config.yaxis)?e.config.yaxis:e.config.yaxis?[e.config.yaxis]:[]).map(e=>$(e&&e.min,e&&e.max)),a=r.some(e=>null!==e),o=e.config.theme,c=t&&t.drilldown;return{v:1,window:{xaxis:$(s.min,s.max),yaxis:a?r:null},zoomed:!!e.interact.zoomed,collapsed:(e.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(e.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:L(e.interact.selectedDataPoints),theme:o?{mode:null!=(n=o.mode)?n:null,palette:null!=(i=o.palette)?i:null}:null,locale:e.config.chart&&e.config.chart.defaultLocale||null,annotations:W(e,t),drill:c&&c.depth>0?{path:c.path.slice()}:null,measure:N(t)}}(this.w,this.ctx)},t=this._serializableDelta();return t&&Object.keys(t).length&&(e.options=t),e}_serializableDelta(){const e=this.w.config,t=e.chart&&e.chart.perspectives&&e.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],n={};return t.forEach(t=>{if(void 0!==e[t]){const i=function(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return}}(e[t]);void 0!==i&&(n[t]=i)}}),n}encode(e){const t=e||this.capture();return V(JSON.stringify(t))}decode(e){return q.decode(e)}toURL(){if(!u.isBrowser())return"";const e=this.encode(this.capture()),t=new URL(window.location.href);return t.hash=`${B}=${e}`,t.toString()}apply(e,t={}){const n="string"==typeof e?q.decode(e):e;if(!n||!n.view)return;this._used=!0,P(this.w,this.ctx);const i=void 0===t.animate||t.animate,s=K.extend(n.options?K.clone(n.options):{},t.mergeOptions||{}),r=Object.keys(s).length?s:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(e=>{U(e,n.view,{animate:i,mergeOptions:r})})}save(e){const t="perspective-"+ ++this._counter;return this._saved.push({id:t,name:e||t,token:this.capture()}),this._used=!0,P(this.w,this.ctx),t}list(){return this._saved.map(e=>({id:e.id,name:e.name,token:e.token}))}delete(e){const t=this._saved.findIndex(t=>t.id===e);t>-1&&this._saved.splice(t,1)}teardown(){this._saved=[],this._counter=0}static decode(e){if("string"!=typeof e||!e)return null;try{const t=JSON.parse(z(e));return t&&"object"==typeof t?1!==t.v?(console.warn(`apexcharts: unsupported perspective version ${t.v} (expected 1).`),null):t:null}catch(e){return console.warn("apexcharts: failed to decode perspective token.",e),null}}static fromURL(e){try{const t=e||(u.isBrowser()?window.location.href:"");if(!t)return null;const n=new URL(t).hash.replace(/^#/,"");if(!n)return null;const i=n.split("&").map(e=>e.split("=")).find(e=>e[0]===B);return i&&null!=i[1]?q.decode(decodeURIComponent(i[1])):null}catch(e){return null}}}d.registerFeatures({perspectives:q,perspectivesStatics:{decode:e=>(E(),q.decode(e)),fromURL:e=>(E(),q.fromURL(e))}}),d.registerFeatures({storyboard:class{constructor(e,t){this.w=e,this.ctx=t,this._beats=[],this._observer=null,this._activeIndex=-1,this._animate=!0,this._warnedNoPerspectives=!1,this._used=!1}bind(e={}){var t;if(this.unbind(),!u.isBrowser())return 0;const n=this.ctx.el&&this.ctx.el.ownerDocument;if(!n||"undefined"==typeof IntersectionObserver)return 0;let i=null;if(e.scroller&&(i="string"==typeof e.scroller?n.querySelector(e.scroller):e.scroller),this._beats=this._resolveBeats(n,i,e.beats),!this._beats.length)return 0;this._animate=!1!==e.animate;const s=Math.min(Math.max(null!=(t=e.offset)?t:.5,0),1),r=+(100*s).toFixed(3),a=+(100-100*s).toFixed(3);return this._observer=new IntersectionObserver(e=>this._onIntersect(e),{root:i,rootMargin:`-${r}% 0px -${a}%`,threshold:0}),this._beats.forEach(e=>{var t;return null==(t=this._observer)?void 0:t.observe(e.el)}),this._used=!0,P(this.w,this.ctx),this._beats.length}_resolveBeats(e,t,n){const i=[];return Array.isArray(n)?(n.forEach((t,n)=>{var s,r;if(!t)return;const a=t.el&&"object"==typeof t.el?t.el:t.selector?e.querySelector(t.selector):null;a?i.push({el:a,key:null!=(r=null!=(s=t.key)?s:a.getAttribute("data-apex-beat"))?r:String(n),view:t.view,options:t.options,announce:t.announce,onEnter:"function"==typeof t.onEnter?t.onEnter:void 0}):console.warn(`apexcharts: storyboard beat ${n} has no resolvable element; skipped.`)}),i):((t||e).querySelectorAll("[data-apex-beat]").forEach((e,t)=>{i.push({el:e,key:e.getAttribute("data-apex-beat")||String(t),view:e.getAttribute("data-apex-view")||void 0,options:void 0,announce:e.getAttribute("data-apex-announce")||void 0,onEnter:void 0})}),i)}_onIntersect(e){e.forEach(e=>{const t=this._beats.findIndex(t=>t.el===e.target);t<0||(e.isIntersecting?this._activate(t):t===this._activeIndex&&e.rootBounds&&e.boundingClientRect.top>=e.rootBounds.bottom&&t>0&&this._activate(t-1))})}_activate(e,t={}){var n,i;if(e===this._activeIndex)return;const s=this._beats[e];if(!s)return;const r=e>this._activeIndex?"down":"up";this._activeIndex=e;const a=(void 0!==t.animate?t.animate:this._animate)&&!p();if(null!=s.view||s.options)if(this.ctx.perspectives){const e=null!=(n=s.view)?n:{},t="string"==typeof e||e.view?e:{view:this._normalizeView(e)};this.ctx.perspectives.apply(t,{animate:a,mergeOptions:s.options})}else this._warnedNoPerspectives||(this._warnedNoPerspectives=!0,console.warn('apexcharts: storyboard beats carry views but the perspectives feature is not bundled. import "apexcharts/features/storyboard" (which includes it) or drive beats via onEnter.'));const o={index:e,key:s.key,el:s.el,direction:r};s.onEnter&&s.onEnter(this.ctx,o),s.announce&&this._announce(s.announce),"function"==typeof this.w.config.chart.events.beatChange&&this.w.config.chart.events.beatChange(this.ctx,o),null==(i=this.ctx.events)||i.fireEvent("beatChange",[this.ctx,o])}_normalizeView(e){const t=e.annotations&&e.annotations.static||{};return l(c({},e),{annotations:{static:c({points:[],xaxis:[],yaxis:[],texts:[],images:[]},t),dynamic:e.annotations&&e.annotations.dynamic||[]}})}goTo(e,t={}){const n="number"==typeof e?e:this._beats.findIndex(t=>t.key===e);n>=0&&n<this._beats.length&&this._activate(n,t)}current(){if(this._activeIndex<0)return null;const e=this._beats[this._activeIndex];return{index:this._activeIndex,key:e?e.key:null}}unbind(){this._observer&&(this._observer.disconnect(),this._observer=null),this._beats=[],this._activeIndex=-1,this._used=!1,P(this.w,this.ctx)}teardown(){this.unbind()}_announce(e){const t=this.w;if(!t.config.chart.accessibility.announcements.enabled)return;const n=t.dom.baseEl;if(!n)return;const i=n.querySelector(".apexcharts-sr-status");i&&(i.textContent="",setTimeout(()=>{i.textContent=e},0))}}}),e.default=d,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ApexStoryboard={})});
|
|
5
|
+
!function(e){var t="undefined"!=typeof globalThis?globalThis:self,n=t.ApexCharts;if(n&&n.__internals)return e.call(t);if(n)throw new Error("ApexCharts: dist/features/storyboard.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");if("function"==typeof define&&define.amd)return e.call(t);if("object"==typeof exports&&"undefined"!=typeof module||"undefined"==typeof window||"undefined"==typeof document)throw new Error("ApexCharts: dist/features/storyboard.js is a script-tag add-on and needs the ApexCharts script on the page. A bundler imports the matching apexcharts/ sub-path instead.");var i={file:"dist/features/storyboard.js",run:e,done:!1},s=t.__apexcharts_pending_addons__||(t.__apexcharts_pending_addons__=[]);s.push(i),"complete"!==document.readyState&&window.addEventListener("load",function(){if(!i.done){var n=t.ApexCharts;if(n)if(n.__internals){i.done=!0;var r=s.indexOf(i);-1!==r&&s.splice(r,1);try{e.call(t),n.__drainsAddons||t.console.warn("ApexCharts: dist/features/storyboard.js loaded before the ApexCharts script, which is older than 8.0 and does not pick up add-ons loaded first, so it registered only when the page finished loading. Put its tag after the ApexCharts script.")}catch(e){t.console.error("ApexCharts: dist/features/storyboard.js could not register with the ApexCharts script on this page: "+(e&&e.message))}}else t.console.error("ApexCharts: dist/features/storyboard.js cannot register: the ApexCharts on this page has no add-on surface (a script before 7.0, or a bundled apexcharts/core class). Load apexcharts.min.js, apexcharts.core.min.js or apexcharts.full.min.js.");else t.console.warn("ApexCharts: dist/features/storyboard.js is waiting for the ApexCharts script, which had not loaded when the page finished loading. It registers when an ApexCharts 8.0 or later script loads; if the page has none, add apexcharts.min.js (or apexcharts.core.min.js, or apexcharts.full.min.js).")}})}(function(){var e,t;e=this,t=function(e){"use strict";var t=Object.defineProperty,n=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(e,n,i)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,c=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&o(e,n,t[n]);if(s)for(var n of s(t))a.call(t,n)&&o(e,n,t[n]);return e},l=(e,t)=>n(e,i(t));const d=globalThis.ApexCharts,u=globalThis.ApexCharts.__internals.__apex_Environment_Environment,h=globalThis.ApexCharts.__internals;h.__apex_Animations,h.__apex_Animations_computeStagger,h.__apex_Animations_applyAnimationPolicy;const p=h.__apex_Animations_prefersReducedMotion;h.__apex_Animations_applyProgressiveReveal;const f=globalThis.console;function m(e,...t){f.error(e,...t)}function v(e){f.warn(e)}const y="APEX-",g=new Date("2027-07-31T00:00:00Z"),b="__apex_license_v1__";function x(){const e=globalThis;let t=e[b];return t||(t={key:null,listeners:new Set,result:null},e[b]=t),t}const w=class{static get licenseKey(){return x().key}static set licenseKey(e){x().key=e}static get listeners(){return x().listeners}static get validationResult(){return x().result}static set validationResult(e){x().result=e}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(e){return!!e&&this.validateKey(e).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}static setLicense(e){var t,n;if(!e)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const i=this.validateKey(e);i.valid||e===this.licenseKey||!(null==(n=this.validationResult)?void 0:n.valid)?(this.licenseKey=e,this.publish(i),i.valid||m(`[Apex] ${i.message}`)):v(`[Apex] Ignoring license key: ${null!=(t=i.message)?t:"it is not valid"} A valid license is already active on this page.`)}static validateKey(e){const t=this.parseKey(e),n=this.validateStructure(e,t);if(!n.valid||!(null==t?void 0:t.signature))return n;const i=this.verdicts.get(e);return!1===i?{data:t.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===i&&this.verifySignature(e,t,n),l(c({},n),{signatureVerified:!0===i}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(4*Math.ceil(t.length/4),"="),i=globalThis.atob;if("function"!=typeof i)throw new Error("no base64 decoder available");const s=i(n),r=new Uint8Array(s.length);for(let e=0;e<s.length;e++)r[e]=s.charCodeAt(e);return r}static canonicalPayload(e){const t=e.domains&&e.domains.length>0?e.domains.join(","):"";return`v1|${e.issueDate}|${e.expiryDate}|${e.plan}|${t}`}static notify(e){for(const t of this.listeners)try{t(e)}catch(e){}}static parseKey(e){if("string"!=typeof e||!e.startsWith(y))return null;const t=e.slice(5);if(!t)return null;try{const e=(new TextDecoder).decode(this.base64ToBytes(t)),n=JSON.parse(e);return n.issueDate&&n.expiryDate&&n.plan?{data:{domains:Array.isArray(n.domains)?n.domains:void 0,expiryDate:n.expiryDate,issueDate:n.issueDate,plan:n.plan,valid:!0},signature:"string"==typeof n.sig&&n.sig?n.sig:null}:null}catch(e){return null}}static publish(e){this.validationResult=e,this.notify(e)}static validateStructure(e,t){const n=e=>({expired:!1,message:e,signatureVerified:!1,valid:!1});if("string"!=typeof e||!e.startsWith(y))return n('Invalid license key format. License key must start with "APEX-".');if(!t)return n("Invalid license key. Unable to decode license data.");const{data:i,signature:s}=t;if(!s&&new Date>=g)return n("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(i.expiryDate)<new Date)return{data:i,expired:!0,message:`License expired on ${i.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(i.domains&&i.domains.length>0){const e="undefined"==typeof location?"":location.hostname;if(!i.domains.some(t=>e===t||e.endsWith(`.${t}`)))return{data:i,expired:!1,message:`License is not valid for this domain (${e}). Allowed domains: ${i.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:i,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(e,t,n){return i=this,s=null,r=function*(){var i;if(this.verifying.has(e)||this.verdicts.has(e))return;this.verifying.add(e);const s=this.epoch,r=null==(i=globalThis.crypto)?void 0:i.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(e),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,v(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const a=(new TextEncoder).encode(this.canonicalPayload(t.data));let o=!1;for(const e of this.publicKeysSpki){try{const n=yield r.importKey("spki",this.base64ToBytes(e),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);o=yield r.verify({hash:"SHA-256",name:"ECDSA"},n,this.base64ToBytes(t.signature),a)}catch(e){o=!1}if(o)break}if(this.verifying.delete(e),this.epoch!==s)return;if(this.verdicts.set(e,o),o){const t=l(c({},n),{signatureVerified:!0});return void(this.licenseKey===e?this.publish(t):this.notify(t))}const d="Invalid license key. The license signature does not verify.",u={data:t.data,expired:!1,message:d,signatureVerified:!0,valid:!1};this.licenseKey===e?this.publish(u):this.notify(u),m(`[Apex] ${d}`)},new Promise((e,t)=>{var n=e=>{try{o(r.next(e))}catch(e){t(e)}},a=e=>{try{o(r.throw(e))}catch(e){t(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,a);o((r=r.apply(i,s)).next())});var i,s,r}};w.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],w.verdicts=new Map,w.verifying=new Set,w.warnedUnverifiable=!1,w.epoch=0;let _=w;const A=class{static applyStyles(e){Object.assign(e.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(e){return e?e.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(e,t){return e&&"undefined"!=typeof document?(this.setManaged(e,t),this.paint(e)):null}static exists(e){return!!this.node(e)}static remove(e,t){e&&(this.setManaged(e,t),this.erase(e))}static untrack(e){this.managed.delete(e)}static createWatermarkPattern(){const e=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${e}</text>\n </svg>\n `.trim())}")`}static erase(e){var t;null==(t=this.node(e))||t.remove()}static paint(e){let t=this.node(e);return t||(t=document.createElement("div"),t.setAttribute(this.WATERMARK_ATTR,""),e.appendChild(t)),this.applyStyles(t),"function"==typeof getComputedStyle&&"static"===getComputedStyle(e).position&&(e.style.position="relative"),t}static reconcile(){const e=_.isLicenseValid();for(const t of this.managed)t.isConnected?e?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(e,t){!1!==(null==t?void 0:t.manage)?this.track(e):this.managed.delete(e)}static track(e){this.managed.add(e),this.subscribed||(this.subscribed=!0,_.onChange(()=>{this.reconcile()}))}};A.WATERMARK_ATTR="data-apexcharts-watermark",A.WATERMARK_TEXT="APEXCHARTS",A.ATTR="data-apexcharts-watermark",A.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},A.managed=new Set,A.subscribed=!1;let S=A;const k="https://apexcharts.com/pricing",C="__apexcharts_license_enforcer_v1__";globalThis[C]||(globalThis[C]={perspectivesTokenDecoded:!1,enforced:new Set});const T=globalThis[C],O=T.enforced;function E(){T.perspectivesTokenDecoded=!0,D()}const I=new Set(["premium","enterprise"]);function R(e,t){const n=S.add(t,{manage:!1});if(e._wmPainted=!0,!n||"undefined"==typeof MutationObserver)return;if(e._wmNodeObserver&&e._wmObservedNode===n)return;e._wmNodeObserver&&e._wmNodeObserver.disconnect();const i=new MutationObserver(()=>{const e=S.node(t);e&&(i.disconnect(),S.applyStyles(e),i.takeRecords(),i.observe(e,{attributes:!0,attributeFilter:["style"]}))});i.observe(n,{attributes:!0,attributeFilter:["style"]}),e._wmNodeObserver=i,e._wmObservedNode=n}function P(e,t){if(!e._wmPainted)return;e._wmPainted=!1,e._wmWrapObserver&&(e._wmWrapObserver.disconnect(),e._wmWrapObserver=null),e._wmNodeObserver&&(e._wmNodeObserver.disconnect(),e._wmNodeObserver=null),e._wmObservedNode=null,e._wmObservedWrap=null;const n=t||e.w&&e.w.dom&&e.w.dom.elWrap;n&&S.remove(n,{manage:!1})}function j(e,t){try{if(!u.isBrowser())return;if(e&&e.globals&&e.globals.isDestroyed)return void O.delete(t);const n=e&&e.dom&&e.dom.elWrap;if(!n)return;const i=function(e,t){var n;const i=e&&e.config&&e.config.chart||{},s=[];"unit"===i.type&&s.push("unit"),"raincloud"===i.requestedType&&s.push("raincloud"),t.trellis&&"function"==typeof t.trellis.isActive&&t.trellis.isActive()&&s.push("trellis"),t.storyboard&&t.storyboard._used&&s.push("storyboard");const r=i.link;return t.linkedViews&&r&&(!0===r.enabled||"function"==typeof r.dimension)&&s.push("link"),t.ink&&i.ink&&!0===i.ink.enabled&&s.push("ink"),t.measure&&i.measure&&!0===i.measure.enabled&&s.push("measure"),t.contextMenu&&i.contextMenu&&!0===i.contextMenu.enabled&&s.push("context-menu"),t.perspectives&&(t.perspectives._used||T.perspectivesTokenDecoded)&&s.push("perspectives"),t.history&&i.history&&!0===i.history.enabled&&s.push("history"),(null==(n=t._highlightFilter)?void 0:n.isActive())&&s.push("highlight-filter"),s}(e,t);if(0===i.length)return O.delete(t),void P(t,n);O.add(t);const s=function(e){const t=e&&e.config&&e.config.chart&&e.config.chart.license;if(t)return t;const n=_.getKey();if(n)return n;const i=u.getApex();return i&&i.license?i.license:null}(e);if(function(e){if(!e)return!1;const t=_.validateKey(e);if(!t.valid)return!1;const n=t.data&&t.data.plan;return"string"==typeof n&&I.has(n.toLowerCase())}(s))return void P(t,n);!function(e,t){if(R(e,t),"undefined"==typeof MutationObserver)return;if(e._wmWrapObserver&&e._wmObservedWrap===t)return;e._wmWrapObserver&&e._wmWrapObserver.disconnect();const n=new MutationObserver(()=>{S.node(t)||R(e,t)});n.observe(t,{childList:!0}),e._wmWrapObserver=n,e._wmObservedWrap=t}(t,n),function(e,t,n){if(e._premiumLicenseNotified)return;e._premiumLicenseNotified=!0;const i=n.length>1;if(!t)return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${k}`);const s=_.validateKey(t);if(s.valid){const e=s.data&&s.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) require a Premium or Enterprise license; the ${e} plan does not include ${i?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${k}`)}t!==_.getKey()&&console.error(`[Apex] ${s.message}`)}(t,s,i)}catch(e){}}function D(){if(!u.isBrowser())return;const e=new Set,t=u.getApex(),n=t&&t._chartInstances;Array.isArray(n)&&n.forEach(t=>{const n=t&&t.chart;n&&n.w&&!n.w.globals.isDestroyed&&(e.add(n),j(n.w,n))}),Array.from(O).forEach(t=>{const n=t&&t.w,i=n&&n.dom&&n.dom.elWrap;n&&!n.globals.isDestroyed&&i&&!1!==i.isConnected?e.has(t)||j(n,t):O.delete(t)})}_.onChange(D);const K=globalThis.ApexCharts.__internals.__apex_Utils;function $(e,t){const n=null!=e,i=null!=t;return n||i?{min:n?e:null,max:i?t:null}:null}function L(e){return Array.isArray(e)?e.map(e=>Array.isArray(e)?e.slice():e):[]}function M(e,t){return"function"==typeof e&&t?e===t.addXaxisAnnotation?"xaxis":e===t.addYaxisAnnotation?"yaxis":e===t.addPointAnnotation?"point":null:null}function W(e,t){const n=e.config.annotations?K.clone(e.config.annotations):null,i=[],s=e.globals.memory&&e.globals.memory.methodsToExec||[];for(const e of s){if(!e||"addAnnotation"!==e.label)continue;const n=M(e.method,t);n&&i.push({kind:n,params:K.clone(e.params)})}return{static:n,dynamic:i}}function N(e){const t=e&&e.measure;if(!t||"function"!=typeof t.getPins)return null;const n=t.getPins();return Array.isArray(n)&&n.length?{pins:n}:null}function U(e,t,{animate:n=!0,mergeOptions:i}={}){var s,r;if(!e||!t)return;"number"==typeof t.v&&t.v>1&&console.warn(`[apexcharts] ViewState v${t.v} is newer than this build understands (v1); applying best-effort.`),e.clearAnnotations();const a=i?K.clone(i):{},o=t.window&&t.window.xaxis;a.xaxis=Object.assign({},a.xaxis,o?{min:null!=(s=o.min)?s:void 0,max:null!=(r=o.max)?r:void 0}:{min:void 0,max:void 0});const c=t.window&&t.window.yaxis;if(Array.isArray(c)&&(a.yaxis=c.map(e=>{var t,n;return e?{min:null!=(t=e.min)?t:void 0,max:null!=(n=e.max)?n:void 0}:{}})),t.theme){const e={};null!=t.theme.mode&&(e.mode=t.theme.mode),null!=t.theme.palette&&(e.palette=t.theme.palette),Object.keys(e).length&&(a.theme=Object.assign({},a.theme,e))}t.annotations&&t.annotations.static&&(a.annotations=K.clone(t.annotations.static)),e.updateOptions(a,!1,n,!1,!1),function(e,t){if(!e||!t)return;const n=e.w;n.interact.zoomed=!!t.zoomed,function(e,t,n){const i=e.w;if(null==t&&null==n)return;const s=i.globals.seriesNames||[],r=new Set([...t||[],...n||[]]),a=new Set([...i.globals.collapsedSeriesIndices||[],...i.globals.ancillaryCollapsedSeriesIndices||[]]);for(let t=0;t<s.length;t++){const n=s[t];if(null==n)continue;const i=r.has(t),o=a.has(t);i&&!o?e.hideSeries(n):!i&&o&&e.showSeries(n)}}(e,t.collapsed,t.ancillaryCollapsed),t.annotations&&Array.isArray(t.annotations.dynamic)&&t.annotations.dynamic.forEach(t=>{const n=function(e){switch(e){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(t.kind);n&&"function"==typeof e[n]&&e[n](t.params,!0)}),function(e,t){Array.isArray(t)&&(e.w.interact.selectedDataPoints=L(t))}(e,t.selectedDataPoints),t.locale&&t.locale!==n.config.chart.defaultLocale&&e.setLocale(t.locale),e.measure&&"function"==typeof e.measure.setPins&&e.measure.setPins(t.measure&&t.measure.pins||[])}(e,t)}const B="apex";function V(e){return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"utf-8").toString("base64");const t=(new TextEncoder).encode(e);let n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function z(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}(t)}class q{constructor(e,t){this.w=e,this.ctx=t,this._saved=[],this._counter=0,this._used=!1}capture(){const e={v:1,view:function(e,t){var n,i;const s=e.config.xaxis||{},r=(Array.isArray(e.config.yaxis)?e.config.yaxis:e.config.yaxis?[e.config.yaxis]:[]).map(e=>$(e&&e.min,e&&e.max)),a=r.some(e=>null!==e),o=e.config.theme,c=t&&t.drilldown;return{v:1,window:{xaxis:$(s.min,s.max),yaxis:a?r:null},zoomed:!!e.interact.zoomed,collapsed:(e.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(e.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:L(e.interact.selectedDataPoints),theme:o?{mode:null!=(n=o.mode)?n:null,palette:null!=(i=o.palette)?i:null}:null,locale:e.config.chart&&e.config.chart.defaultLocale||null,annotations:W(e,t),drill:c&&c.depth>0?{path:c.path.slice()}:null,measure:N(t)}}(this.w,this.ctx)},t=this._serializableDelta();return t&&Object.keys(t).length&&(e.options=t),e}_serializableDelta(){const e=this.w.config,t=e.chart&&e.chart.perspectives&&e.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],n={};return t.forEach(t=>{if(void 0!==e[t]){const i=function(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return}}(e[t]);void 0!==i&&(n[t]=i)}}),n}encode(e){const t=e||this.capture();return V(JSON.stringify(t))}decode(e){return q.decode(e)}toURL(){if(!u.isBrowser())return"";const e=this.encode(this.capture()),t=new URL(window.location.href);return t.hash=`${B}=${e}`,t.toString()}apply(e,t={}){const n="string"==typeof e?q.decode(e):e;if(!n||!n.view)return;this._used=!0,j(this.w,this.ctx);const i=void 0===t.animate||t.animate,s=K.extend(n.options?K.clone(n.options):{},t.mergeOptions||{}),r=Object.keys(s).length?s:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(e=>{U(e,n.view,{animate:i,mergeOptions:r})})}save(e){const t="perspective-"+ ++this._counter;return this._saved.push({id:t,name:e||t,token:this.capture()}),this._used=!0,j(this.w,this.ctx),t}list(){return this._saved.map(e=>({id:e.id,name:e.name,token:e.token}))}delete(e){const t=this._saved.findIndex(t=>t.id===e);t>-1&&this._saved.splice(t,1)}teardown(){this._saved=[],this._counter=0}static decode(e){if("string"!=typeof e||!e)return null;try{const t=JSON.parse(z(e));return t&&"object"==typeof t?1!==t.v?(console.warn(`apexcharts: unsupported perspective version ${t.v} (expected 1).`),null):t:null}catch(e){return console.warn("apexcharts: failed to decode perspective token.",e),null}}static fromURL(e){try{const t=e||(u.isBrowser()?window.location.href:"");if(!t)return null;const n=new URL(t).hash.replace(/^#/,"");if(!n)return null;const i=n.split("&").map(e=>e.split("=")).find(e=>e[0]===B);return i&&null!=i[1]?q.decode(decodeURIComponent(i[1])):null}catch(e){return null}}}d.registerFeatures({perspectives:q,perspectivesStatics:{decode:e=>(E(),q.decode(e)),fromURL:e=>(E(),q.fromURL(e))}}),d.registerFeatures({storyboard:class{constructor(e,t){this.w=e,this.ctx=t,this._beats=[],this._observer=null,this._activeIndex=-1,this._animate=!0,this._warnedNoPerspectives=!1,this._used=!1}bind(e={}){var t;if(this.unbind(),!u.isBrowser())return 0;const n=this.ctx.el&&this.ctx.el.ownerDocument;if(!n||"undefined"==typeof IntersectionObserver)return 0;let i=null;if(e.scroller&&(i="string"==typeof e.scroller?n.querySelector(e.scroller):e.scroller),this._beats=this._resolveBeats(n,i,e.beats),!this._beats.length)return 0;this._animate=!1!==e.animate;const s=Math.min(Math.max(null!=(t=e.offset)?t:.5,0),1),r=+(100*s).toFixed(3),a=+(100-100*s).toFixed(3);return this._observer=new IntersectionObserver(e=>this._onIntersect(e),{root:i,rootMargin:`-${r}% 0px -${a}%`,threshold:0}),this._beats.forEach(e=>{var t;return null==(t=this._observer)?void 0:t.observe(e.el)}),this._used=!0,j(this.w,this.ctx),this._beats.length}_resolveBeats(e,t,n){const i=[];return Array.isArray(n)?(n.forEach((t,n)=>{var s,r;if(!t)return;const a=t.el&&"object"==typeof t.el?t.el:t.selector?e.querySelector(t.selector):null;a?i.push({el:a,key:null!=(r=null!=(s=t.key)?s:a.getAttribute("data-apex-beat"))?r:String(n),view:t.view,options:t.options,announce:t.announce,onEnter:"function"==typeof t.onEnter?t.onEnter:void 0}):console.warn(`apexcharts: storyboard beat ${n} has no resolvable element; skipped.`)}),i):((t||e).querySelectorAll("[data-apex-beat]").forEach((e,t)=>{i.push({el:e,key:e.getAttribute("data-apex-beat")||String(t),view:e.getAttribute("data-apex-view")||void 0,options:void 0,announce:e.getAttribute("data-apex-announce")||void 0,onEnter:void 0})}),i)}_onIntersect(e){e.forEach(e=>{const t=this._beats.findIndex(t=>t.el===e.target);t<0||(e.isIntersecting?this._activate(t):t===this._activeIndex&&e.rootBounds&&e.boundingClientRect.top>=e.rootBounds.bottom&&t>0&&this._activate(t-1))})}_activate(e,t={}){var n,i;if(e===this._activeIndex)return;const s=this._beats[e];if(!s)return;const r=e>this._activeIndex?"down":"up";this._activeIndex=e;const a=(void 0!==t.animate?t.animate:this._animate)&&!p();if(null!=s.view||s.options)if(this.ctx.perspectives){const e=null!=(n=s.view)?n:{},t="string"==typeof e||e.view?e:{view:this._normalizeView(e)};this.ctx.perspectives.apply(t,{animate:a,mergeOptions:s.options})}else this._warnedNoPerspectives||(this._warnedNoPerspectives=!0,console.warn('apexcharts: storyboard beats carry views but the perspectives feature is not bundled. import "apexcharts/features/storyboard" (which includes it) or drive beats via onEnter.'));const o={index:e,key:s.key,el:s.el,direction:r};s.onEnter&&s.onEnter(this.ctx,o),s.announce&&this._announce(s.announce),"function"==typeof this.w.config.chart.events.beatChange&&this.w.config.chart.events.beatChange(this.ctx,o),null==(i=this.ctx.events)||i.fireEvent("beatChange",[this.ctx,o])}_normalizeView(e){const t=e.annotations&&e.annotations.static||{};return l(c({},e),{annotations:{static:c({points:[],xaxis:[],yaxis:[],texts:[],images:[]},t),dynamic:e.annotations&&e.annotations.dynamic||[]}})}goTo(e,t={}){const n="number"==typeof e?e:this._beats.findIndex(t=>t.key===e);n>=0&&n<this._beats.length&&this._activate(n,t)}current(){if(this._activeIndex<0)return null;const e=this._beats[this._activeIndex];return{index:this._activeIndex,key:e?e.key:null}}unbind(){this._observer&&(this._observer.disconnect(),this._observer=null),this._beats=[],this._activeIndex=-1,this._used=!1,j(this.w,this.ctx)}teardown(){this.unbind()}_announce(e){const t=this.w;if(!t.config.chart.accessibility.announcements.enabled)return;const n=t.dom.baseEl;if(!n)return;const i=n.querySelector(".apexcharts-sr-status");i&&(i.textContent="",setTimeout(()=>{i.textContent=e},0))}}}),e.default=d,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ApexStoryboard={})});
|