{L.addEventListener("resize",e=>{t.updatePosition()}),L.addEventListener("scroll",e=>{t.updatePosition()})}),t})();return Q.coloris=Q}})(),_coloris=Coloris.coloris,_init=Coloris.init,_set=Coloris.set,_wrap=Coloris.wrap,_close=Coloris.close,_setInstance=Coloris.setInstance,_removeInstance=Coloris.removeInstance,_updatePosition=Coloris.updatePosition;export default Coloris;export{_coloris as coloris,_close as close,_init as init,_set as set,_wrap as wrap,_setInstance as setInstance,_removeInstance as removeInstance,_updatePosition as updatePosition};
\ No newline at end of file
diff --git a/cp/public/assets/libs/@melloware/coloris/dist/esm/package.json b/cp/public/assets/libs/@melloware/coloris/dist/esm/package.json
new file mode 100644
index 0000000..4720025
--- /dev/null
+++ b/cp/public/assets/libs/@melloware/coloris/dist/esm/package.json
@@ -0,0 +1,3 @@
+{
+ "type": "module"
+}
diff --git a/cp/public/assets/libs/@melloware/coloris/dist/umd/coloris.js b/cp/public/assets/libs/@melloware/coloris/dist/umd/coloris.js
new file mode 100644
index 0000000..333128d
--- /dev/null
+++ b/cp/public/assets/libs/@melloware/coloris/dist/umd/coloris.js
@@ -0,0 +1,1343 @@
+ // https://github.com/umdjs/umd/blob/master/templates/returnExports.js
+
+// Uses Node, AMD or browser globals to create a module.
+
+// If you want something that will work in other stricter CommonJS environments,
+// or if you need to create a circular dependency, see commonJsStrict.js
+
+// Defines a module "returnExports" that depends another module called "b".
+// Note that the name of the module is implied by the file name. It is best
+// if the file name and the exported global have matching names.
+
+// If the 'b' module also uses this type of boilerplate, then
+// in the browser, it will create a global .b that is used below.
+
+// If you do not want to support the browser global path, then you
+// can remove the `root` use and the passing `this` as the first arg to
+// the top function.
+
+// if the module has no dependencies, the above pattern can be simplified to
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an unnamed module.
+ define([], factory);
+ } else
+ if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory();
+ } else
+ {
+ // Browser globals (root is window)
+ root.Coloris = factory();
+ if (typeof window === "object") {
+ // Init the color picker when the DOM is ready
+ root.Coloris.init();
+ }
+ }
+})(typeof self !== 'undefined' ? self : void 0, function () {
+ // Just return a value to define the module export.
+ // This example returns an object, but the module
+ // can return a function as the exported value.
+ /*!
+ * Copyright (c) 2021-2024 Momo Bassit.
+ * Licensed under the MIT License (MIT)
+ * https://github.com/mdbassit/Coloris
+ * Version: 0.24.0
+ * NPM: https://github.com/melloware/coloris-npm
+ */
+
+ return ((window, document, Math, undefined) => {
+ const ctx = document.createElement('canvas').getContext('2d');
+ const currentColor = { r: 0, g: 0, b: 0, h: 0, s: 0, v: 0, a: 1 };
+ let container,picker,colorArea,colorMarker,colorPreview,colorValue,clearButton,closeButton,
+ hueSlider,hueMarker,alphaSlider,alphaMarker,currentEl,currentFormat,oldColor,keyboardNav,
+ colorAreaDims = {};
+
+ // Default settings
+ const settings = {
+ el: '[data-coloris]',
+ parent: 'body',
+ theme: 'default',
+ themeMode: 'light',
+ rtl: false,
+ wrap: true,
+ margin: 2,
+ format: 'hex',
+ formatToggle: false,
+ swatches: [],
+ swatchesOnly: false,
+ alpha: true,
+ forceAlpha: false,
+ focusInput: true,
+ selectInput: false,
+ inline: false,
+ defaultColor: '#000000',
+ clearButton: false,
+ clearLabel: 'Clear',
+ closeButton: false,
+ closeLabel: 'Close',
+ onChange: () => undefined,
+ a11y: {
+ open: 'Open color picker',
+ close: 'Close color picker',
+ clear: 'Clear the selected color',
+ marker: 'Saturation: {s}. Brightness: {v}.',
+ hueSlider: 'Hue slider',
+ alphaSlider: 'Opacity slider',
+ input: 'Color value field',
+ format: 'Color format',
+ swatch: 'Color swatch',
+ instruction: 'Saturation and brightness selector. Use up, down, left and right arrow keys to select.'
+ }
+ };
+
+ // Virtual instances cache
+ const instances = {};
+ let currentInstanceId = '';
+ let defaultInstance = {};
+ let hasInstance = false;
+
+ /**
+ * Configure the color picker.
+ * @param {object} options Configuration options.
+ */
+ function configure(options) {
+ if (typeof options !== 'object') {
+ return;
+ }
+
+ for (const key in options) {
+ switch (key) {
+ case 'el':
+ bindFields(options.el);
+ if (options.wrap !== false) {
+ wrapFields(options.el);
+ }
+ break;
+ case 'parent':
+ container = options.parent instanceof HTMLElement ? options.parent : document.querySelector(options.parent);
+ if (container) {
+ container.appendChild(picker);
+ settings.parent = options.parent;
+
+ // document.body is special
+ if (container === document.body) {
+ container = undefined;
+ }
+ }
+ break;
+ case 'themeMode':
+ settings.themeMode = options.themeMode;
+ if (options.themeMode === 'auto' && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
+ settings.themeMode = 'dark';
+ }
+ // The lack of a break statement is intentional
+ case 'theme':
+ if (options.theme) {
+ settings.theme = options.theme;
+ }
+
+ // Set the theme and color scheme
+ picker.className = "clr-picker clr-" + settings.theme + " clr-" + settings.themeMode;
+
+ // Update the color picker's position if inline mode is in use
+ if (settings.inline) {
+ updatePickerPosition();
+ }
+ break;
+ case 'rtl':
+ settings.rtl = !!options.rtl;
+ Array.from(document.getElementsByClassName('clr-field')).forEach((field) => field.classList.toggle('clr-rtl', settings.rtl));
+ break;
+ case 'margin':
+ options.margin *= 1;
+ settings.margin = !isNaN(options.margin) ? options.margin : settings.margin;
+ break;
+ case 'wrap':
+ if (options.el && options.wrap) {
+ wrapFields(options.el);
+ }
+ break;
+ case 'formatToggle':
+ settings.formatToggle = !!options.formatToggle;
+ getEl('clr-format').style.display = settings.formatToggle ? 'block' : 'none';
+ if (settings.formatToggle) {
+ settings.format = 'auto';
+ }
+ break;
+ case 'swatches':
+ if (Array.isArray(options.swatches)) {
+ const swatchesContainer = getEl('clr-swatches');
+ const swatches = document.createElement('div');
+
+ // Clear current swatches
+ swatchesContainer.textContent = '';
+
+ // Build new swatches
+ options.swatches.forEach((swatch, i) => {
+ const button = document.createElement('button');
+
+ button.setAttribute('type', "button");
+ button.setAttribute('id', "clr-swatch-" + i);
+ button.setAttribute('aria-labelledby', "clr-swatch-label clr-swatch-" + i);
+ button.style.color = swatch;
+ button.textContent = swatch;
+
+ swatches.appendChild(button);
+ });
+
+ // Append new swatches if any
+ if (options.swatches.length) {
+ swatchesContainer.appendChild(swatches);
+ }
+
+ settings.swatches = options.swatches.slice();
+ }
+ break;
+ case 'swatchesOnly':
+ settings.swatchesOnly = !!options.swatchesOnly;
+ picker.setAttribute('data-minimal', settings.swatchesOnly);
+ break;
+ case 'alpha':
+ settings.alpha = !!options.alpha;
+ picker.setAttribute('data-alpha', settings.alpha);
+ break;
+ case 'inline':
+ settings.inline = !!options.inline;
+ picker.setAttribute('data-inline', settings.inline);
+
+ if (settings.inline) {
+ const defaultColor = options.defaultColor || settings.defaultColor;
+
+ currentFormat = getColorFormatFromStr(defaultColor);
+ updatePickerPosition();
+ setColorFromStr(defaultColor);
+ }
+ break;
+ case 'clearButton':
+ // Backward compatibility
+ if (typeof options.clearButton === 'object') {
+ if (options.clearButton.label) {
+ settings.clearLabel = options.clearButton.label;
+ clearButton.innerHTML = settings.clearLabel;
+ }
+
+ options.clearButton = options.clearButton.show;
+ }
+
+ settings.clearButton = !!options.clearButton;
+ clearButton.style.display = settings.clearButton ? 'block' : 'none';
+ break;
+ case 'clearLabel':
+ settings.clearLabel = options.clearLabel;
+ clearButton.innerHTML = settings.clearLabel;
+ break;
+ case 'closeButton':
+ settings.closeButton = !!options.closeButton;
+
+ if (settings.closeButton) {
+ picker.insertBefore(closeButton, colorPreview);
+ } else {
+ colorPreview.appendChild(closeButton);
+ }
+
+ break;
+ case 'closeLabel':
+ settings.closeLabel = options.closeLabel;
+ closeButton.innerHTML = settings.closeLabel;
+ break;
+ case 'a11y':
+ const labels = options.a11y;
+ let update = false;
+
+ if (typeof labels === 'object') {
+ for (const label in labels) {
+ if (labels[label] && settings.a11y[label]) {
+ settings.a11y[label] = labels[label];
+ update = true;
+ }
+ }
+ }
+
+ if (update) {
+ const openLabel = getEl('clr-open-label');
+ const swatchLabel = getEl('clr-swatch-label');
+
+ openLabel.innerHTML = settings.a11y.open;
+ swatchLabel.innerHTML = settings.a11y.swatch;
+ closeButton.setAttribute('aria-label', settings.a11y.close);
+ clearButton.setAttribute('aria-label', settings.a11y.clear);
+ hueSlider.setAttribute('aria-label', settings.a11y.hueSlider);
+ alphaSlider.setAttribute('aria-label', settings.a11y.alphaSlider);
+ colorValue.setAttribute('aria-label', settings.a11y.input);
+ colorArea.setAttribute('aria-label', settings.a11y.instruction);
+ }
+ break;
+ default:
+ settings[key] = options[key];
+ }
+ }
+ }
+
+ /**
+ * Add or update a virtual instance.
+ * @param {String} selector The CSS selector of the elements to which the instance is attached.
+ * @param {Object} options Per-instance options to apply.
+ */
+ function setVirtualInstance(selector, options) {
+ if (typeof selector === 'string' && typeof options === 'object') {
+ instances[selector] = options;
+ hasInstance = true;
+ }
+ }
+
+ /**
+ * Remove a virtual instance.
+ * @param {String} selector The CSS selector of the elements to which the instance is attached.
+ */
+ function removeVirtualInstance(selector) {
+ delete instances[selector];
+
+ if (Object.keys(instances).length === 0) {
+ hasInstance = false;
+
+ if (selector === currentInstanceId) {
+ resetVirtualInstance();
+ }
+ }
+ }
+
+ /**
+ * Attach a virtual instance to an element if it matches a selector.
+ * @param {Object} element Target element that will receive a virtual instance if applicable.
+ */
+ function attachVirtualInstance(element) {
+ if (hasInstance) {
+ // These options can only be set globally, not per instance
+ const unsupportedOptions = ['el', 'wrap', 'rtl', 'inline', 'defaultColor', 'a11y'];
+
+ for (let selector in instances) {
+ const options = instances[selector];
+
+ // If the element matches an instance's CSS selector
+ if (element.matches(selector)) {
+ currentInstanceId = selector;
+ defaultInstance = {};
+
+ // Delete unsupported options
+ unsupportedOptions.forEach((option) => delete options[option]);
+
+ // Back up the default options so we can restore them later
+ for (let option in options) {
+ defaultInstance[option] = Array.isArray(settings[option]) ? settings[option].slice() : settings[option];
+ }
+
+ // Set the instance's options
+ configure(options);
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Revert any per-instance options that were previously applied.
+ */
+ function resetVirtualInstance() {
+ if (Object.keys(defaultInstance).length > 0) {
+ configure(defaultInstance);
+ currentInstanceId = '';
+ defaultInstance = {};
+ }
+ }
+
+ /**
+ * Bind the color picker to input fields that match the selector.
+ * @param {(string|HTMLElement|HTMLElement[])} selector A CSS selector string, a DOM element or a list of DOM elements.
+ */
+ function bindFields(selector) {
+ if (selector instanceof HTMLElement) {
+ selector = [selector];
+ }
+
+ if (Array.isArray(selector)) {
+ selector.forEach((field) => {
+ addListener(field, 'click', openPicker);
+ addListener(field, 'input', updateColorPreview);
+ });
+ } else {
+ addListener(document, 'click', selector, openPicker);
+ addListener(document, 'input', selector, updateColorPreview);
+ }
+ }
+
+ /**
+ * Open the color picker.
+ * @param {object} event The event that opens the color picker.
+ */
+ function openPicker(event) {
+ // Skip if inline mode is in use
+ if (settings.inline) {
+ return;
+ }
+
+ // Apply any per-instance options first
+ attachVirtualInstance(event.target);
+
+ currentEl = event.target;
+ oldColor = currentEl.value;
+ currentFormat = getColorFormatFromStr(oldColor);
+ picker.classList.add('clr-open');
+
+ updatePickerPosition();
+ setColorFromStr(oldColor);
+
+ if (settings.focusInput || settings.selectInput) {
+ colorValue.focus({ preventScroll: true });
+ colorValue.setSelectionRange(currentEl.selectionStart, currentEl.selectionEnd);
+ }
+
+ if (settings.selectInput) {
+ colorValue.select();
+ }
+
+ // Always focus the first element when using keyboard navigation
+ if (keyboardNav || settings.swatchesOnly) {
+ getFocusableElements().shift().focus();
+ }
+
+ // Trigger an "open" event
+ currentEl.dispatchEvent(new Event('open', { bubbles: true }));
+ }
+
+ /**
+ * Update the color picker's position and the color gradient's offset
+ */
+ function updatePickerPosition() {
+ if (!picker || !currentEl && !settings.inline) return; //** DO NOT REMOVE: in case called before initialized
+ const parent = container;
+ const scrollY = window.scrollY;
+ const pickerWidth = picker.offsetWidth;
+ const pickerHeight = picker.offsetHeight;
+ const reposition = { left: false, top: false };
+ let parentStyle, parentMarginTop, parentBorderTop;
+ let offset = { x: 0, y: 0 };
+
+ if (parent) {
+ parentStyle = window.getComputedStyle(parent);
+ parentMarginTop = parseFloat(parentStyle.marginTop);
+ parentBorderTop = parseFloat(parentStyle.borderTopWidth);
+
+ offset = parent.getBoundingClientRect();
+ offset.y += parentBorderTop + scrollY;
+ }
+
+ if (!settings.inline) {
+ const coords = currentEl.getBoundingClientRect();
+ let left = coords.x;
+ let top = scrollY + coords.y + coords.height + settings.margin;
+
+ // If the color picker is inside a custom container
+ // set the position relative to it
+ if (parent) {
+ left -= offset.x;
+ top -= offset.y;
+
+ if (left + pickerWidth > parent.clientWidth) {
+ left += coords.width - pickerWidth;
+ reposition.left = true;
+ }
+
+ if (top + pickerHeight > parent.clientHeight - parentMarginTop) {
+ if (pickerHeight + settings.margin <= coords.top - (offset.y - scrollY)) {
+ top -= coords.height + pickerHeight + settings.margin * 2;
+ reposition.top = true;
+ }
+ }
+
+ top += parent.scrollTop;
+
+ // Otherwise set the position relative to the whole document
+ } else {
+ if (left + pickerWidth > document.documentElement.clientWidth) {
+ left += coords.width - pickerWidth;
+ reposition.left = true;
+ }
+
+ if (top + pickerHeight - scrollY > document.documentElement.clientHeight) {
+ if (pickerHeight + settings.margin <= coords.top) {
+ top = scrollY + coords.y - pickerHeight - settings.margin;
+ reposition.top = true;
+ }
+ }
+ }
+
+ picker.classList.toggle('clr-left', reposition.left);
+ picker.classList.toggle('clr-top', reposition.top);
+ picker.style.left = left + "px";
+ picker.style.top = top + "px";
+ offset.x += picker.offsetLeft;
+ offset.y += picker.offsetTop;
+ }
+
+ colorAreaDims = {
+ width: colorArea.offsetWidth,
+ height: colorArea.offsetHeight,
+ x: colorArea.offsetLeft + offset.x,
+ y: colorArea.offsetTop + offset.y
+ };
+ }
+
+ /**
+ * Wrap the linked input fields in a div that adds a color preview.
+ * @param {(string|HTMLElement|HTMLElement[])} selector A CSS selector string, a DOM element or a list of DOM elements.
+ */
+ function wrapFields(selector) {
+ if (selector instanceof HTMLElement) {
+ wrapColorField(selector);
+ } else if (Array.isArray(selector)) {
+ selector.forEach(wrapColorField);
+ } else {
+ document.querySelectorAll(selector).forEach(wrapColorField);
+ }
+ }
+
+ /**
+ * Wrap an input field in a div that adds a color preview.
+ * @param {object} field The input field.
+ */
+ function wrapColorField(field) {
+ const parentNode = field.parentNode;
+
+ if (!parentNode.classList.contains('clr-field')) {
+ const wrapper = document.createElement('div');
+ let classes = 'clr-field';
+
+ if (settings.rtl || field.classList.contains('clr-rtl')) {
+ classes += ' clr-rtl';
+ }
+
+ wrapper.innerHTML = '';
+ parentNode.insertBefore(wrapper, field);
+ wrapper.className = classes;
+ wrapper.style.color = field.value;
+ wrapper.appendChild(field);
+ }
+ }
+
+ /**
+ * Update the color preview of an input field
+ * @param {object} event The "input" event that triggers the color change.
+ */
+ function updateColorPreview(event) {
+ const parent = event.target.parentNode;
+
+ // Only update the preview if the field has been previously wrapped
+ if (parent.classList.contains('clr-field')) {
+ parent.style.color = event.target.value;
+ }
+ }
+
+ /**
+ * Close the color picker.
+ * @param {boolean} [revert] If true, revert the color to the original value.
+ */
+ function closePicker(revert) {
+ if (currentEl && !settings.inline) {
+ const prevEl = currentEl;
+
+ // Revert the color to the original value if needed
+ if (revert) {
+ // This will prevent the "change" event on the colorValue input to execute its handler
+ currentEl = undefined;
+
+ if (oldColor !== prevEl.value) {
+ prevEl.value = oldColor;
+
+ // Trigger an "input" event to force update the thumbnail next to the input field
+ prevEl.dispatchEvent(new Event('input', { bubbles: true }));
+ }
+ }
+
+ // Trigger a "change" event if needed
+ setTimeout(() => {// Add this to the end of the event loop
+ if (oldColor !== prevEl.value) {
+ prevEl.dispatchEvent(new Event('change', { bubbles: true }));
+ }
+ });
+
+ // Hide the picker dialog
+ picker.classList.remove('clr-open');
+
+ // Reset any previously set per-instance options
+ if (hasInstance) {
+ resetVirtualInstance();
+ }
+
+ // Trigger a "close" event
+ prevEl.dispatchEvent(new Event('close', { bubbles: true }));
+
+ if (settings.focusInput) {
+ prevEl.focus({ preventScroll: true });
+ }
+
+ // This essentially marks the picker as closed
+ currentEl = undefined;
+ }
+ }
+
+ /**
+ * Set the active color from a string.
+ * @param {string} str String representing a color.
+ */
+ function setColorFromStr(str) {
+ const rgba = strToRGBA(str);
+ const hsva = RGBAtoHSVA(rgba);
+
+ updateMarkerA11yLabel(hsva.s, hsva.v);
+ updateColor(rgba, hsva);
+
+ // Update the UI
+ hueSlider.value = hsva.h;
+ picker.style.color = "hsl(" + hsva.h + ", 100%, 50%)";
+ hueMarker.style.left = hsva.h / 360 * 100 + "%";
+
+ colorMarker.style.left = colorAreaDims.width * hsva.s / 100 + "px";
+ colorMarker.style.top = colorAreaDims.height - colorAreaDims.height * hsva.v / 100 + "px";
+
+ alphaSlider.value = hsva.a * 100;
+ alphaMarker.style.left = hsva.a * 100 + "%";
+ }
+
+ /**
+ * Guess the color format from a string.
+ * @param {string} str String representing a color.
+ * @return {string} The color format.
+ */
+ function getColorFormatFromStr(str) {
+ const format = str.substring(0, 3).toLowerCase();
+
+ if (format === 'rgb' || format === 'hsl') {
+ return format;
+ }
+
+ return 'hex';
+ }
+
+ /**
+ * Copy the active color to the linked input field.
+ * @param {number} [color] Color value to override the active color.
+ */
+ function pickColor(color) {
+ color = color !== undefined ? color : colorValue.value;
+
+ if (currentEl) {
+ currentEl.value = color;
+ currentEl.dispatchEvent(new Event('input', { bubbles: true }));
+ }
+
+ if (settings.onChange) {
+ settings.onChange.call(window, color, currentEl);
+ }
+
+ document.dispatchEvent(new CustomEvent('coloris:pick', { detail: { color, currentEl } }));
+ }
+
+ /**
+ * Set the active color based on a specific point in the color gradient.
+ * @param {number} x Left position.
+ * @param {number} y Top position.
+ */
+ function setColorAtPosition(x, y) {
+ const hsva = {
+ h: hueSlider.value * 1,
+ s: x / colorAreaDims.width * 100,
+ v: 100 - y / colorAreaDims.height * 100,
+ a: alphaSlider.value / 100
+ };
+ const rgba = HSVAtoRGBA(hsva);
+
+ updateMarkerA11yLabel(hsva.s, hsva.v);
+ updateColor(rgba, hsva);
+ pickColor();
+ }
+
+ /**
+ * Update the color marker's accessibility label.
+ * @param {number} saturation
+ * @param {number} value
+ */
+ function updateMarkerA11yLabel(saturation, value) {
+ let label = settings.a11y.marker;
+
+ saturation = saturation.toFixed(1) * 1;
+ value = value.toFixed(1) * 1;
+ label = label.replace('{s}', saturation);
+ label = label.replace('{v}', value);
+ colorMarker.setAttribute('aria-label', label);
+ }
+
+ //
+ /**
+ * Get the pageX and pageY positions of the pointer.
+ * @param {object} event The MouseEvent or TouchEvent object.
+ * @return {object} The pageX and pageY positions.
+ */
+ function getPointerPosition(event) {
+ return {
+ pageX: event.changedTouches ? event.changedTouches[0].pageX : event.pageX,
+ pageY: event.changedTouches ? event.changedTouches[0].pageY : event.pageY
+ };
+ }
+
+ /**
+ * Move the color marker when dragged.
+ * @param {object} event The MouseEvent object.
+ */
+ function moveMarker(event) {
+ const pointer = getPointerPosition(event);
+ let x = pointer.pageX - colorAreaDims.x;
+ let y = pointer.pageY - colorAreaDims.y;
+
+ if (container) {
+ y += container.scrollTop;
+ }
+
+ setMarkerPosition(x, y);
+
+ // Prevent scrolling while dragging the marker
+ event.preventDefault();
+ event.stopPropagation();
+ }
+
+ /**
+ * Move the color marker when the arrow keys are pressed.
+ * @param {number} offsetX The horizontal amount to move.
+ * @param {number} offsetY The vertical amount to move.
+ */
+ function moveMarkerOnKeydown(offsetX, offsetY) {
+ let x = colorMarker.style.left.replace('px', '') * 1 + offsetX;
+ let y = colorMarker.style.top.replace('px', '') * 1 + offsetY;
+
+ setMarkerPosition(x, y);
+ }
+
+ /**
+ * Set the color marker's position.
+ * @param {number} x Left position.
+ * @param {number} y Top position.
+ */
+ function setMarkerPosition(x, y) {
+ // Make sure the marker doesn't go out of bounds
+ x = x < 0 ? 0 : x > colorAreaDims.width ? colorAreaDims.width : x;
+ y = y < 0 ? 0 : y > colorAreaDims.height ? colorAreaDims.height : y;
+
+ // Set the position
+ colorMarker.style.left = x + "px";
+ colorMarker.style.top = y + "px";
+
+ // Update the color
+ setColorAtPosition(x, y);
+
+ // Make sure the marker is focused
+ colorMarker.focus();
+ }
+
+ /**
+ * Update the color picker's input field and preview thumb.
+ * @param {Object} rgba Red, green, blue and alpha values.
+ * @param {Object} [hsva] Hue, saturation, value and alpha values.
+ */
+ function updateColor(rgba, hsva) {if (rgba === void 0) {rgba = {};}if (hsva === void 0) {hsva = {};}
+ let format = settings.format;
+
+ for (const key in rgba) {
+ currentColor[key] = rgba[key];
+ }
+
+ for (const key in hsva) {
+ currentColor[key] = hsva[key];
+ }
+
+ const hex = RGBAToHex(currentColor);
+ const opaqueHex = hex.substring(0, 7);
+
+ colorMarker.style.color = opaqueHex;
+ alphaMarker.parentNode.style.color = opaqueHex;
+ alphaMarker.style.color = hex;
+ colorPreview.style.color = hex;
+
+ // Force repaint the color and alpha gradients as a workaround for a Google Chrome bug
+ colorArea.style.display = 'none';
+ colorArea.offsetHeight;
+ colorArea.style.display = '';
+ alphaMarker.nextElementSibling.style.display = 'none';
+ alphaMarker.nextElementSibling.offsetHeight;
+ alphaMarker.nextElementSibling.style.display = '';
+
+ if (format === 'mixed') {
+ format = currentColor.a === 1 ? 'hex' : 'rgb';
+ } else if (format === 'auto') {
+ format = currentFormat;
+ }
+
+ switch (format) {
+ case 'hex':
+ colorValue.value = hex;
+ break;
+ case 'rgb':
+ colorValue.value = RGBAToStr(currentColor);
+ break;
+ case 'hsl':
+ colorValue.value = HSLAToStr(HSVAtoHSLA(currentColor));
+ break;
+ }
+
+ // Select the current format in the format switcher
+ document.querySelector(".clr-format [value=\"" + format + "\"]").checked = true;
+ }
+
+ /**
+ * Set the hue when its slider is moved.
+ */
+ function setHue() {
+ const hue = hueSlider.value * 1;
+ const x = colorMarker.style.left.replace('px', '') * 1;
+ const y = colorMarker.style.top.replace('px', '') * 1;
+
+ picker.style.color = "hsl(" + hue + ", 100%, 50%)";
+ hueMarker.style.left = hue / 360 * 100 + "%";
+
+ setColorAtPosition(x, y);
+ }
+
+ /**
+ * Set the alpha when its slider is moved.
+ */
+ function setAlpha() {
+ const alpha = alphaSlider.value / 100;
+
+ alphaMarker.style.left = alpha * 100 + "%";
+ updateColor({ a: alpha });
+ pickColor();
+ }
+
+ /**
+ * Convert HSVA to RGBA.
+ * @param {object} hsva Hue, saturation, value and alpha values.
+ * @return {object} Red, green, blue and alpha values.
+ */
+ function HSVAtoRGBA(hsva) {
+ const saturation = hsva.s / 100;
+ const value = hsva.v / 100;
+ let chroma = saturation * value;
+ let hueBy60 = hsva.h / 60;
+ let x = chroma * (1 - Math.abs(hueBy60 % 2 - 1));
+ let m = value - chroma;
+
+ chroma = chroma + m;
+ x = x + m;
+
+ const index = Math.floor(hueBy60) % 6;
+ const red = [chroma, x, m, m, x, chroma][index];
+ const green = [x, chroma, chroma, x, m, m][index];
+ const blue = [m, m, x, chroma, chroma, x][index];
+
+ return {
+ r: Math.round(red * 255),
+ g: Math.round(green * 255),
+ b: Math.round(blue * 255),
+ a: hsva.a
+ };
+ }
+
+ /**
+ * Convert HSVA to HSLA.
+ * @param {object} hsva Hue, saturation, value and alpha values.
+ * @return {object} Hue, saturation, lightness and alpha values.
+ */
+ function HSVAtoHSLA(hsva) {
+ const value = hsva.v / 100;
+ const lightness = value * (1 - hsva.s / 100 / 2);
+ let saturation;
+
+ if (lightness > 0 && lightness < 1) {
+ saturation = Math.round((value - lightness) / Math.min(lightness, 1 - lightness) * 100);
+ }
+
+ return {
+ h: hsva.h,
+ s: saturation || 0,
+ l: Math.round(lightness * 100),
+ a: hsva.a
+ };
+ }
+
+ /**
+ * Convert RGBA to HSVA.
+ * @param {object} rgba Red, green, blue and alpha values.
+ * @return {object} Hue, saturation, value and alpha values.
+ */
+ function RGBAtoHSVA(rgba) {
+ const red = rgba.r / 255;
+ const green = rgba.g / 255;
+ const blue = rgba.b / 255;
+ const xmax = Math.max(red, green, blue);
+ const xmin = Math.min(red, green, blue);
+ const chroma = xmax - xmin;
+ const value = xmax;
+ let hue = 0;
+ let saturation = 0;
+
+ if (chroma) {
+ if (xmax === red) {hue = (green - blue) / chroma;}
+ if (xmax === green) {hue = 2 + (blue - red) / chroma;}
+ if (xmax === blue) {hue = 4 + (red - green) / chroma;}
+ if (xmax) {saturation = chroma / xmax;}
+ }
+
+ hue = Math.floor(hue * 60);
+
+ return {
+ h: hue < 0 ? hue + 360 : hue,
+ s: Math.round(saturation * 100),
+ v: Math.round(value * 100),
+ a: rgba.a
+ };
+ }
+
+ /**
+ * Parse a string to RGBA.
+ * @param {string} str String representing a color.
+ * @return {object} Red, green, blue and alpha values.
+ */
+ function strToRGBA(str) {
+ const regex = /^((rgba)|rgb)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i;
+ let match, rgba;
+
+ // Default to black for invalid color strings
+ ctx.fillStyle = '#000';
+
+ // Use canvas to convert the string to a valid color string
+ ctx.fillStyle = str;
+ match = regex.exec(ctx.fillStyle);
+
+ if (match) {
+ rgba = {
+ r: match[3] * 1,
+ g: match[4] * 1,
+ b: match[5] * 1,
+ a: match[6] * 1
+ };
+
+ } else {
+ match = ctx.fillStyle.replace('#', '').match(/.{2}/g).map((h) => parseInt(h, 16));
+ rgba = {
+ r: match[0],
+ g: match[1],
+ b: match[2],
+ a: 1
+ };
+ }
+
+ return rgba;
+ }
+
+ /**
+ * Convert RGBA to Hex.
+ * @param {object} rgba Red, green, blue and alpha values.
+ * @return {string} Hex color string.
+ */
+ function RGBAToHex(rgba) {
+ let R = rgba.r.toString(16);
+ let G = rgba.g.toString(16);
+ let B = rgba.b.toString(16);
+ let A = '';
+
+ if (rgba.r < 16) {
+ R = '0' + R;
+ }
+
+ if (rgba.g < 16) {
+ G = '0' + G;
+ }
+
+ if (rgba.b < 16) {
+ B = '0' + B;
+ }
+
+ if (settings.alpha && (rgba.a < 1 || settings.forceAlpha)) {
+ const alpha = rgba.a * 255 | 0;
+ A = alpha.toString(16);
+
+ if (alpha < 16) {
+ A = '0' + A;
+ }
+ }
+
+ return '#' + R + G + B + A;
+ }
+
+ /**
+ * Convert RGBA values to a CSS rgb/rgba string.
+ * @param {object} rgba Red, green, blue and alpha values.
+ * @return {string} CSS color string.
+ */
+ function RGBAToStr(rgba) {
+ if (!settings.alpha || rgba.a === 1 && !settings.forceAlpha) {
+ return "rgb(" + rgba.r + ", " + rgba.g + ", " + rgba.b + ")";
+ } else {
+ return "rgba(" + rgba.r + ", " + rgba.g + ", " + rgba.b + ", " + rgba.a + ")";
+ }
+ }
+
+ /**
+ * Convert HSLA values to a CSS hsl/hsla string.
+ * @param {object} hsla Hue, saturation, lightness and alpha values.
+ * @return {string} CSS color string.
+ */
+ function HSLAToStr(hsla) {
+ if (!settings.alpha || hsla.a === 1 && !settings.forceAlpha) {
+ return "hsl(" + hsla.h + ", " + hsla.s + "%, " + hsla.l + "%)";
+ } else {
+ return "hsla(" + hsla.h + ", " + hsla.s + "%, " + hsla.l + "%, " + hsla.a + ")";
+ }
+ }
+
+ /**
+ * Init the color picker.
+ */
+ function init() {
+ if (document.getElementById('clr-picker')) return; //** DO NOT REMOVE: Prevent binding events multiple times
+ // Render the UI
+ container = undefined;
+ picker = document.createElement('div');
+ picker.setAttribute('id', 'clr-picker');
+ picker.className = 'clr-picker';
+ picker.innerHTML =
+ "" + ("' +
+ '' +
+ '' + ("
") +
+ '
' +
+ '
' +
+ '
' +
+ '' +
+ '
' +
+ '' +
+ '' + ("") +
+ '' + ("") +
+ '
' + ("" +
+ settings.a11y.open + "") + ("" +
+ settings.a11y.swatch + "");
+
+ // Append the color picker to the DOM
+ document.body.appendChild(picker);
+
+ // Reference the UI elements
+ colorArea = getEl('clr-color-area');
+ colorMarker = getEl('clr-color-marker');
+ clearButton = getEl('clr-clear');
+ closeButton = getEl('clr-close');
+ colorPreview = getEl('clr-color-preview');
+ colorValue = getEl('clr-color-value');
+ hueSlider = getEl('clr-hue-slider');
+ hueMarker = getEl('clr-hue-marker');
+ alphaSlider = getEl('clr-alpha-slider');
+ alphaMarker = getEl('clr-alpha-marker');
+
+ // Bind the picker to the default selector
+ bindFields(settings.el);
+ wrapFields(settings.el);
+
+ addListener(picker, 'mousedown', (event) => {
+ picker.classList.remove('clr-keyboard-nav');
+ event.stopPropagation();
+ });
+
+ addListener(colorArea, 'mousedown', (event) => {
+ addListener(document, 'mousemove', moveMarker);
+ });
+
+ addListener(colorArea, 'contextmenu', (event) => {
+ event.preventDefault();
+ });
+
+ addListener(colorArea, 'touchstart', (event) => {
+ document.addEventListener('touchmove', moveMarker, { passive: false });
+ });
+
+ addListener(colorMarker, 'mousedown', (event) => {
+ addListener(document, 'mousemove', moveMarker);
+ });
+
+ addListener(colorMarker, 'touchstart', (event) => {
+ document.addEventListener('touchmove', moveMarker, { passive: false });
+ });
+
+ addListener(colorValue, 'change', (event) => {
+ const value = colorValue.value;
+
+ if (currentEl || settings.inline) {
+ const color = value === '' ? value : setColorFromStr(value);
+ pickColor(color);
+ }
+ });
+
+ addListener(clearButton, 'click', (event) => {
+ pickColor('');
+ closePicker();
+ });
+
+ addListener(closeButton, 'click', (event) => {
+ pickColor();
+ closePicker();
+ });
+
+ addListener(getEl('clr-format'), 'click', '.clr-format input', (event) => {
+ currentFormat = event.target.value;
+ updateColor();
+ pickColor();
+ });
+
+ addListener(picker, 'click', '.clr-swatches button', (event) => {
+ setColorFromStr(event.target.textContent);
+ pickColor();
+
+ if (settings.swatchesOnly) {
+ closePicker();
+ }
+ });
+
+ addListener(document, 'mouseup', (event) => {
+ document.removeEventListener('mousemove', moveMarker);
+ });
+
+ addListener(document, 'touchend', (event) => {
+ document.removeEventListener('touchmove', moveMarker);
+ });
+
+ addListener(document, 'mousedown', (event) => {
+ keyboardNav = false;
+ picker.classList.remove('clr-keyboard-nav');
+ closePicker();
+ });
+
+ addListener(document, 'keydown', (event) => {
+ const key = event.key;
+ const target = event.target;
+ const shiftKey = event.shiftKey;
+ const navKeys = ['Tab', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];
+
+ if (key === 'Escape') {
+ closePicker(true);
+
+ // Display focus rings when using the keyboard
+ } else if (navKeys.includes(key)) {
+ keyboardNav = true;
+ picker.classList.add('clr-keyboard-nav');
+ }
+
+ // Trap the focus within the color picker while it's open
+ if (key === 'Tab' && target.matches('.clr-picker *')) {
+ const focusables = getFocusableElements();
+ const firstFocusable = focusables.shift();
+ const lastFocusable = focusables.pop();
+
+ if (shiftKey && target === firstFocusable) {
+ lastFocusable.focus();
+ event.preventDefault();
+ } else if (!shiftKey && target === lastFocusable) {
+ firstFocusable.focus();
+ event.preventDefault();
+ }
+ }
+ });
+
+ addListener(document, 'click', '.clr-field button', (event) => {
+ // Reset any previously set per-instance options
+ if (hasInstance) {
+ resetVirtualInstance();
+ }
+
+ // Open the color picker
+ event.target.nextElementSibling.dispatchEvent(new Event('click', { bubbles: true }));
+ });
+
+ addListener(colorMarker, 'keydown', (event) => {
+ const movements = {
+ ArrowUp: [0, -1],
+ ArrowDown: [0, 1],
+ ArrowLeft: [-1, 0],
+ ArrowRight: [1, 0]
+ };
+
+ if (Object.keys(movements).includes(event.key)) {
+ moveMarkerOnKeydown(...movements[event.key]);
+ event.preventDefault();
+ }
+ });
+
+ addListener(colorArea, 'click', moveMarker);
+ addListener(hueSlider, 'input', setHue);
+ addListener(alphaSlider, 'input', setAlpha);
+ }
+
+ /**
+ * Return a list of focusable elements within the color picker.
+ * @return {array} The list of focusable DOM elemnts.
+ */
+ function getFocusableElements() {
+ const controls = Array.from(picker.querySelectorAll('input, button'));
+ const focusables = controls.filter((node) => !!node.offsetWidth);
+
+ return focusables;
+ }
+
+ /**
+ * Shortcut for getElementById to optimize the minified JS.
+ * @param {string} id The element id.
+ * @return {object} The DOM element with the provided id.
+ */
+ function getEl(id) {
+ return document.getElementById(id);
+ }
+
+ /**
+ * Shortcut for addEventListener to optimize the minified JS.
+ * @param {object} context The context to which the listener is attached.
+ * @param {string} type Event type.
+ * @param {(string|function)} selector Event target if delegation is used, event handler if not.
+ * @param {function} [fn] Event handler if delegation is used.
+ */
+ function addListener(context, type, selector, fn) {
+ const matches = Element.prototype.matches || Element.prototype.msMatchesSelector;
+
+ // Delegate event to the target of the selector
+ if (typeof selector === 'string') {
+ context.addEventListener(type, (event) => {
+ if (matches.call(event.target, selector)) {
+ fn.call(event.target, event);
+ }
+ });
+
+ // If the selector is not a string then it's a function
+ // in which case we need a regular event listener
+ } else {
+ fn = selector;
+ context.addEventListener(type, fn);
+ }
+ }
+
+ /**
+ * Call a function only when the DOM is ready.
+ * @param {function} fn The function to call.
+ * @param {array} [args] Arguments to pass to the function.
+ */
+ function DOMReady(fn, args) {
+ args = args !== undefined ? args : [];
+
+ if (document.readyState !== 'loading') {
+ fn(...args);
+ } else {
+ document.addEventListener('DOMContentLoaded', () => {
+ fn(...args);
+ });
+ }
+ }
+
+ // Polyfill for Nodelist.forEach
+ if (NodeList !== undefined && NodeList.prototype && !NodeList.prototype.forEach) {
+ NodeList.prototype.forEach = Array.prototype.forEach;
+ }
+
+ //*****************************************************
+ //******* NPM: Custom code starts here ****************
+ //*****************************************************
+
+ /**
+ * Copy the active color to the linked input field and set the color.
+ * @param {string} [color] Color value to override the active color.
+ * @param {HTMLelement} [target] the element setting the color on
+ */
+ function setColor(color, target) {
+ currentEl = target;
+ oldColor = currentEl.value;
+ attachVirtualInstance(target);
+ currentFormat = getColorFormatFromStr(color);
+ updatePickerPosition();
+ setColorFromStr(color);
+ pickColor();
+ if (oldColor !== color) {
+ currentEl.dispatchEvent(new Event('change', { bubbles: true }));
+ }
+ }
+
+ // Expose the color picker to the global scope
+ const Coloris = (() => {
+ const methods = {
+ init: init,
+ set: configure,
+ wrap: wrapFields,
+ close: closePicker,
+ setInstance: setVirtualInstance,
+ setColor: setColor,
+ removeInstance: removeVirtualInstance,
+ updatePosition: updatePickerPosition,
+ ready: DOMReady
+ };
+
+ function Coloris(options) {
+ DOMReady(() => {
+ if (options) {
+ if (typeof options === 'string') {
+ bindFields(options);
+ } else {
+ configure(options);
+ }
+ }
+ });
+ }
+
+ for (const key in methods) {
+ Coloris[key] = function () {for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];}
+ DOMReady(methods[key], args);
+ };
+ }
+
+ // handle window resize events re-aligning the panel
+ DOMReady(() => {
+ window.addEventListener('resize', (event) => {Coloris.updatePosition();});
+ window.addEventListener('scroll', (event) => {Coloris.updatePosition();});
+ });
+
+ return Coloris;
+ })();
+
+ // Ensure init function is available not only as as a default import
+ Coloris.coloris = Coloris;
+
+ // Init the color picker when the DOM is ready
+ return Coloris;
+
+ })(window, document, Math);
+});
\ No newline at end of file
diff --git a/cp/public/assets/libs/@melloware/coloris/dist/umd/coloris.min.js b/cp/public/assets/libs/@melloware/coloris/dist/umd/coloris.min.js
new file mode 100644
index 0000000..4e4f8a8
--- /dev/null
+++ b/cp/public/assets/libs/@melloware/coloris/dist/umd/coloris.min.js
@@ -0,0 +1 @@
+!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():(e.Coloris=t(),"object"==typeof window&&e.Coloris.init())}("undefined"!=typeof self?self:void 0,function(){{var L=window,x=document,A=Math,C=void 0;const Z=x.createElement("canvas").getContext("2d"),_={r:0,g:0,b:0,h:0,s:0,v:0,a:1};let u,d,p,i,s,h,f,b,y,a,v,m,g,w,l,o,k={};const ee={el:"[data-coloris]",parent:"body",theme:"default",themeMode:"light",rtl:!1,wrap:!0,margin:2,format:"hex",formatToggle:!1,swatches:[],swatchesOnly:!1,alpha:!0,forceAlpha:!1,focusInput:!0,selectInput:!1,inline:!1,defaultColor:"#000000",clearButton:!1,clearLabel:"Clear",closeButton:!1,closeLabel:"Close",onChange:()=>C,a11y:{open:"Open color picker",close:"Close color picker",clear:"Clear the selected color",marker:"Saturation: {s}. Brightness: {v}.",hueSlider:"Hue slider",alphaSlider:"Opacity slider",input:"Color value field",format:"Color format",swatch:"Color swatch",instruction:"Saturation and brightness selector. Use up, down, left and right arrow keys to select."}},te={};let n="",c={},E=!1;function S(t){if("object"==typeof t)for(const n in t)switch(n){case"el":M(t.el),!1!==t.wrap&&N(t.el);break;case"parent":(u=t.parent instanceof HTMLElement?t.parent:x.querySelector(t.parent))&&(u.appendChild(d),ee.parent=t.parent,u===x.body)&&(u=C);break;case"themeMode":ee.themeMode=t.themeMode,"auto"===t.themeMode&&L.matchMedia&&L.matchMedia("(prefers-color-scheme: dark)").matches&&(ee.themeMode="dark");case"theme":t.theme&&(ee.theme=t.theme),d.className="clr-picker clr-"+ee.theme+" clr-"+ee.themeMode,ee.inline&&H();break;case"rtl":ee.rtl=!!t.rtl,Array.from(x.getElementsByClassName("clr-field")).forEach(e=>e.classList.toggle("clr-rtl",ee.rtl));break;case"margin":t.margin*=1,ee.margin=(isNaN(t.margin)?ee:t).margin;break;case"wrap":t.el&&t.wrap&&N(t.el);break;case"formatToggle":ee.formatToggle=!!t.formatToggle,$("clr-format").style.display=ee.formatToggle?"block":"none",ee.formatToggle&&(ee.format="auto");break;case"swatches":if(Array.isArray(t.swatches)){var l=$("clr-swatches");const c=x.createElement("div");l.textContent="",t.swatches.forEach((e,t)=>{var l=x.createElement("button");l.setAttribute("type","button"),l.setAttribute("id","clr-swatch-"+t),l.setAttribute("aria-labelledby","clr-swatch-label clr-swatch-"+t),l.style.color=e,l.textContent=e,c.appendChild(l)}),t.swatches.length&&l.appendChild(c),ee.swatches=t.swatches.slice()}break;case"swatchesOnly":ee.swatchesOnly=!!t.swatchesOnly,d.setAttribute("data-minimal",ee.swatchesOnly);break;case"alpha":ee.alpha=!!t.alpha,d.setAttribute("data-alpha",ee.alpha);break;case"inline":ee.inline=!!t.inline,d.setAttribute("data-inline",ee.inline),ee.inline&&(l=t.defaultColor||ee.defaultColor,w=R(l),H(),j(l));break;case"clearButton":"object"==typeof t.clearButton&&(t.clearButton.label&&(ee.clearLabel=t.clearButton.label,f.innerHTML=ee.clearLabel),t.clearButton=t.clearButton.show),ee.clearButton=!!t.clearButton,f.style.display=ee.clearButton?"block":"none";break;case"clearLabel":ee.clearLabel=t.clearLabel,f.innerHTML=ee.clearLabel;break;case"closeButton":ee.closeButton=!!t.closeButton,ee.closeButton?d.insertBefore(b,s):s.appendChild(b);break;case"closeLabel":ee.closeLabel=t.closeLabel,b.innerHTML=ee.closeLabel;break;case"a11y":var a,r,o=t.a11y;let e=!1;if("object"==typeof o)for(const i in o)o[i]&&ee.a11y[i]&&(ee.a11y[i]=o[i],e=!0);e&&(a=$("clr-open-label"),r=$("clr-swatch-label"),a.innerHTML=ee.a11y.open,r.innerHTML=ee.a11y.swatch,b.setAttribute("aria-label",ee.a11y.close),f.setAttribute("aria-label",ee.a11y.clear),y.setAttribute("aria-label",ee.a11y.hueSlider),v.setAttribute("aria-label",ee.a11y.alphaSlider),h.setAttribute("aria-label",ee.a11y.input),p.setAttribute("aria-label",ee.a11y.instruction));break;default:ee[n]=t[n]}}function e(e,t){"string"==typeof e&&"object"==typeof t&&(te[e]=t,E=!0)}function T(e){delete te[e],0===Object.keys(te).length&&(E=!1,e===n)&&B()}function r(e){if(E){var t,l=["el","wrap","rtl","inline","defaultColor","a11y"];for(t in te){const r=te[t];if(e.matches(t)){for(var a in n=t,c={},l.forEach(e=>delete r[e]),r)c[a]=Array.isArray(ee[a])?ee[a].slice():ee[a];S(r);break}}}}function B(){0{J(e,"click",t),J(e,"input",D)}):(J(x,"click",e,t),J(x,"input",e,D))}function t(e){ee.inline||(r(e.target),g=e.target,l=g.value,w=R(l),d.classList.add("clr-open"),H(),j(l),(ee.focusInput||ee.selectInput)&&(h.focus({preventScroll:!0}),h.setSelectionRange(g.selectionStart,g.selectionEnd)),ee.selectInput&&h.select(),(o||ee.swatchesOnly)&&K().shift().focus(),g.dispatchEvent(new Event("open",{bubbles:!0})))}function H(){if(d&&(g||ee.inline)){var r=u,o=L.scrollY,n=d.offsetWidth,c=d.offsetHeight,i={left:!1,top:!1};let e,l,t,a={x:0,y:0};if(r&&(e=L.getComputedStyle(r),l=parseFloat(e.marginTop),t=parseFloat(e.borderTopWidth),(a=r.getBoundingClientRect()).y+=t+o),!ee.inline){var s=g.getBoundingClientRect();let e=s.x,t=o+s.y+s.height+ee.margin;r?(e-=a.x,t-=a.y,e+n>r.clientWidth&&(e+=s.width-n,i.left=!0),t+c>r.clientHeight-l&&c+ee.margin<=s.top-(a.y-o)&&(t-=s.height+c+2*ee.margin,i.top=!0),t+=r.scrollTop):(e+n>x.documentElement.clientWidth&&(e+=s.width-n,i.left=!0),t+c-o>x.documentElement.clientHeight&&c+ee.margin<=s.top&&(t=o+s.y-c-ee.margin,i.top=!0)),d.classList.toggle("clr-left",i.left),d.classList.toggle("clr-top",i.top),d.style.left=e+"px",d.style.top=t+"px",a.x+=d.offsetLeft,a.y+=d.offsetTop}k={width:p.offsetWidth,height:p.offsetHeight,x:p.offsetLeft+a.x,y:p.offsetTop+a.y}}}function N(e){e instanceof HTMLElement?O(e):(Array.isArray(e)?e:x.querySelectorAll(e)).forEach(O)}function O(t){var l=t.parentNode;if(!l.classList.contains("clr-field")){var a=x.createElement("div");let e="clr-field";(ee.rtl||t.classList.contains("clr-rtl"))&&(e+=" clr-rtl"),a.innerHTML='',l.insertBefore(a,t),a.className=e,a.style.color=t.value,a.appendChild(t)}}function D(e){var t=e.target.parentNode;t.classList.contains("clr-field")&&(t.style.color=e.target.value)}function I(e){if(g&&!ee.inline){const t=g;e&&(g=C,l!==t.value)&&(t.value=l,t.dispatchEvent(new Event("input",{bubbles:!0}))),setTimeout(()=>{l!==t.value&&t.dispatchEvent(new Event("change",{bubbles:!0}))}),d.classList.remove("clr-open"),E&&B(),t.dispatchEvent(new Event("close",{bubbles:!0})),ee.focusInput&&t.focus({preventScroll:!0}),g=C}}function j(e){var e=function(e){let t,l;Z.fillStyle="#000",Z.fillStyle=e,l=(t=/^((rgba)|rgb)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i.exec(Z.fillStyle))?{r:+t[3],g:+t[4],b:+t[5],a:+t[6]}:(t=Z.fillStyle.replace("#","").match(/.{2}/g).map(e=>parseInt(e,16)),{r:t[0],g:t[1],b:t[2],a:1});return l}(e),t=function(e){var t=e.r/255,l=e.g/255,a=e.b/255,r=A.max(t,l,a),o=A.min(t,l,a),o=r-o,n=r;let c=0,i=0;o&&(r===t&&(c=(l-a)/o),r===l&&(c=2+(a-t)/o),r===a&&(c=4+(t-l)/o),r)&&(i=o/r);return{h:(c=A.floor(60*c))<0?c+360:c,s:A.round(100*i),v:A.round(100*n),a:e.a}}(e);q(t.s,t.v),U(e,t),y.value=t.h,d.style.color="hsl("+t.h+", 100%, 50%)",a.style.left=t.h/360*100+"%",i.style.left=k.width*t.s/100+"px",i.style.top=k.height-k.height*t.v/100+"px",v.value=100*t.a,m.style.left=100*t.a+"%"}function R(e){e=e.substring(0,3).toLowerCase();return"rgb"===e||"hsl"===e?e:"hex"}function W(e){e=e!==C?e:h.value,g&&(g.value=e,g.dispatchEvent(new Event("input",{bubbles:!0}))),ee.onChange&&ee.onChange.call(L,e,g),x.dispatchEvent(new CustomEvent("coloris:pick",{detail:{color:e,currentEl:g}}))}function P(e,t){var l,a,r,o,n,e={h:+y.value,s:e/k.width*100,v:100-t/k.height*100,a:v.value/100},c=(c=(t=e).s/100,l=t.v/100,c*=l,a=t.h/60,r=c*(1-A.abs(a%2-1)),c+=l-=c,r+=l,a=A.floor(a)%6,o=[c,r,l,l,r,c][a],n=[r,c,c,r,l,l][a],l=[l,l,r,c,c,r][a],{r:A.round(255*o),g:A.round(255*n),b:A.round(255*l),a:t.a});q(e.s,e.v),U(c,e),W()}function q(e,t){let l=ee.a11y.marker;e=+e.toFixed(1),t=+t.toFixed(1),l=(l=l.replace("{s}",e)).replace("{v}",t),i.setAttribute("aria-label",l)}function F(e){var t={pageX:((t=e).changedTouches?t.changedTouches[0]:t).pageX,pageY:(t.changedTouches?t.changedTouches[0]:t).pageY},l=t.pageX-k.x;let a=t.pageY-k.y;u&&(a+=u.scrollTop),Y(l,a),e.preventDefault(),e.stopPropagation()}function Y(e,t){e=e<0?0:e>k.width?k.width:e,t=t<0?0:t>k.height?k.height:t,i.style.left=e+"px",i.style.top=t+"px",P(e,t),i.focus()}function U(e,t){void 0===e&&(e={}),void 0===t&&(t={});let l=ee.format;for(const n in e)_[n]=e[n];for(const c in t)_[c]=t[c];var a,r=function(e){let t=e.r.toString(16),l=e.g.toString(16),a=e.b.toString(16),r="";e.r<16&&(t="0"+t);e.g<16&&(l="0"+l);e.b<16&&(a="0"+a);ee.alpha&&(e.a<1||ee.forceAlpha)&&(e=255*e.a|0,r=e.toString(16),e<16)&&(r="0"+r);return"#"+t+l+a+r}(_),o=r.substring(0,7);switch(i.style.color=o,m.parentNode.style.color=o,m.style.color=r,s.style.color=r,p.style.display="none",p.offsetHeight,p.style.display="",m.nextElementSibling.style.display="none",m.nextElementSibling.offsetHeight,m.nextElementSibling.style.display="","mixed"===l?l=1===_.a?"hex":"rgb":"auto"===l&&(l=w),l){case"hex":h.value=r;break;case"rgb":h.value=(a=_,!ee.alpha||1===a.a&&!ee.forceAlpha?"rgb("+a.r+", "+a.g+", "+a.b+")":"rgba("+a.r+", "+a.g+", "+a.b+", "+a.a+")");break;case"hsl":h.value=(a=function(e){var t=e.v/100,l=t*(1-e.s/100/2);let a;0'+ee.a11y.open+''+ee.a11y.swatch+"",x.body.appendChild(d),p=$("clr-color-area"),i=$("clr-color-marker"),f=$("clr-clear"),b=$("clr-close"),s=$("clr-color-preview"),h=$("clr-color-value"),y=$("clr-hue-slider"),a=$("clr-hue-marker"),v=$("clr-alpha-slider"),m=$("clr-alpha-marker"),M(ee.el),N(ee.el),J(d,"mousedown",e=>{d.classList.remove("clr-keyboard-nav"),e.stopPropagation()}),J(p,"mousedown",e=>{J(x,"mousemove",F)}),J(p,"contextmenu",e=>{e.preventDefault()}),J(p,"touchstart",e=>{x.addEventListener("touchmove",F,{passive:!1})}),J(i,"mousedown",e=>{J(x,"mousemove",F)}),J(i,"touchstart",e=>{x.addEventListener("touchmove",F,{passive:!1})}),J(h,"change",e=>{var t=h.value;(g||ee.inline)&&W(""===t?t:j(t))}),J(f,"click",e=>{W(""),I()}),J(b,"click",e=>{W(),I()}),J($("clr-format"),"click",".clr-format input",e=>{w=e.target.value,U(),W()}),J(d,"click",".clr-swatches button",e=>{j(e.target.textContent),W(),ee.swatchesOnly&&I()}),J(x,"mouseup",e=>{x.removeEventListener("mousemove",F)}),J(x,"touchend",e=>{x.removeEventListener("touchmove",F)}),J(x,"mousedown",e=>{o=!1,d.classList.remove("clr-keyboard-nav"),I()}),J(x,"keydown",e=>{var t,l=e.key,a=e.target,r=e.shiftKey;"Escape"===l?I(!0):["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(l)&&(o=!0,d.classList.add("clr-keyboard-nav")),"Tab"===l&&a.matches(".clr-picker *")&&(t=(l=K()).shift(),l=l.pop(),r&&a===t?(l.focus(),e.preventDefault()):r||a!==l||(t.focus(),e.preventDefault()))}),J(x,"click",".clr-field button",e=>{E&&B(),e.target.nextElementSibling.dispatchEvent(new Event("click",{bubbles:!0}))}),J(i,"keydown",e=>{var t,l={ArrowUp:[0,-1],ArrowDown:[0,1],ArrowLeft:[-1,0],ArrowRight:[1,0]};Object.keys(l).includes(e.key)&&([l,t]=[...l[e.key]],Y(+i.style.left.replace("px","")+l,+i.style.top.replace("px","")+t),e.preventDefault())}),J(p,"click",F),J(y,"input",X),J(v,"input",z))}function K(){return Array.from(d.querySelectorAll("input, button")).filter(e=>!!e.offsetWidth)}function $(e){return x.getElementById(e)}function J(e,t,l,a){const r=Element.prototype.matches||Element.prototype.msMatchesSelector;"string"==typeof l?e.addEventListener(t,e=>{r.call(e.target,l)&&a.call(e.target,e)}):(a=l,e.addEventListener(t,a))}function Q(e,t){t=t!==C?t:[],"loading"!==x.readyState?e(...t):x.addEventListener("DOMContentLoaded",()=>{e(...t)})}function le(e,t){g=t,l=g.value,r(t),w=R(e),H(),j(e),W(),l!==e&&g.dispatchEvent(new Event("change",{bubbles:!0}))}NodeList!==C&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);var V=(()=>{const a={init:G,set:S,wrap:N,close:I,setInstance:e,setColor:le,removeInstance:T,updatePosition:H,ready:Q};function t(e){Q(()=>{e&&("string"==typeof e?M:S)(e)})}for(const r in a)t[r]=function(){for(var e=arguments.length,t=new Array(e),l=0;l{L.addEventListener("resize",e=>{t.updatePosition()}),L.addEventListener("scroll",e=>{t.updatePosition()})}),t})();return V.coloris=V}});
\ No newline at end of file
diff --git a/cp/public/assets/libs/@melloware/coloris/dist/umd/package.json b/cp/public/assets/libs/@melloware/coloris/dist/umd/package.json
new file mode 100644
index 0000000..1cd945a
--- /dev/null
+++ b/cp/public/assets/libs/@melloware/coloris/dist/umd/package.json
@@ -0,0 +1,3 @@
+{
+ "type": "commonjs"
+}
diff --git a/cp/public/assets/libs/apexcharts/dist/apexcharts.amd.js b/cp/public/assets/libs/apexcharts/dist/apexcharts.amd.js
index a868bc9..0a4a045 100644
--- a/cp/public/assets/libs/apexcharts/dist/apexcharts.amd.js
+++ b/cp/public/assets/libs/apexcharts/dist/apexcharts.amd.js
@@ -1,2 +1,2 @@
/*! For license information please see apexcharts.amd.js.LICENSE.txt */
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ApexCharts=e():t.ApexCharts=e()}(self,(()=>(()=>{var t={532:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",i=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),i&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),i&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,i,n,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),e.push(u))}},e}},547:t=>{"use strict";t.exports=function(t){return t[1]}},521:()=>{window.TreemapSquared={},function(){"use strict";window.TreemapSquared.generate=function(){function t(e,r,i,n){this.xoffset=e,this.yoffset=r,this.height=n,this.width=i,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,r=[],i=this.xoffset,n=this.yoffset,a=o(t)/this.height,s=o(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var i=e/this.height,n=this.width-i;r=new t(this.xoffset+i,this.yoffset,n,this.height)}else{var o=e/this.width,a=this.height-o;r=new t(this.xoffset,this.yoffset+o,this.width,a)}return r}}function e(e,i,n,a,s){a=void 0===a?0:a,s=void 0===s?0:s;var l=r(function(t,e){var r,i=[],n=e/o(t);for(r=0;r=i(n,r))}(e,l=t[0],s)?(e.push(l),r(t.slice(1),e,n,a)):(c=n.cutArea(o(e),a),a.push(n.getCoordinates(e)),r(t,[],c,a)),a;a.push(n.getCoordinates(e))}function i(t,e){var r=Math.min.apply(Math,t),i=Math.max.apply(Math,t),n=o(t);return Math.max(Math.pow(e,2)*i/Math.pow(n,2),Math.pow(n,2)/(Math.pow(e,2)*r))}function n(t){return t&&t.constructor===Array}function o(t){var e,r=0;for(e=0;e{"use strict";r.r(e),r.d(e,{default:()=>s});var i=r(547),n=r.n(i),o=r(532),a=r.n(o)()(n());a.push([t.id,'@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n\n 0%,\n to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n direction: ltr !important;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\nrect.legend-mouseover-inactive,\n.legend-mouseover-inactive rect,\n.legend-mouseover-inactive path,\n.legend-mouseover-inactive circle,\n.legend-mouseover-inactive line,\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, .96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, .8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, .7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-z-value:empty,\n.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0;\n margin-right: 10px;\n border-radius: 50%\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,\n.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}',""]);const s=a},161:(t,e,r)=>{var i=r(72),n=r(2);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.id,n,""]]);var o=(i(t.id,n,{insert:"head",singleton:!1}),n.locals?n.locals:{});t.exports=o},72:(t,e,r)=>{"use strict";var i,n=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),o={};function a(t,e,r){for(var i=0;i{t.exports=''},627:t=>{t.exports=''},606:t=>{t.exports=''},75:t=>{t.exports=''},646:t=>{t.exports=''},802:t=>{t.exports=''},541:t=>{t.exports=''}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={id:i,exports:{}};return t[i](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nc=void 0;var i={};return(()=>{"use strict";r.r(i),r.d(i,{default:()=>Fy});var t={};r.r(t),r.d(t,{cx:()=>Yr,cy:()=>Hr,height:()=>Br,rx:()=>Rr,ry:()=>zr,width:()=>Fr,x:()=>Xr,y:()=>Dr});var e={};r.r(e),r.d(e,{from:()=>si,to:()=>li});var n={};r.r(n),r.d(n,{MorphArray:()=>Vi,height:()=>$i,width:()=>Zi,x:()=>Ui,y:()=>qi});var o={};r.r(o),r.d(o,{array:()=>xo,clear:()=>wo,move:()=>So,plot:()=>ko,size:()=>Ao});var a={};r.r(a),r.d(a,{amove:()=>$a,ax:()=>qa,ay:()=>Za,build:()=>Ja,center:()=>Ua,cx:()=>Ga,cy:()=>Va,length:()=>Fa,move:()=>Wa,plain:()=>Ha,x:()=>Ba,y:()=>Na});var s={};function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var r=0;rXs,dx:()=>Ds,dy:()=>Ys,height:()=>Hs,move:()=>Fs,size:()=>Bs,width:()=>Ns,x:()=>Ws,y:()=>Gs});var h=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,r=[{key:"shadeRGBColor",value:function(t,e){var r=e.split(","),i=t<0?0:255,n=t<0?-1*t:t,o=parseInt(r[0].slice(4),10),a=parseInt(r[1],10),s=parseInt(r[2],10);return"rgb("+(Math.round((i-o)*n)+o)+","+(Math.round((i-a)*n)+a)+","+(Math.round((i-s)*n)+s)+")"}},{key:"shadeHexColor",value:function(t,e){var r=parseInt(e.slice(1),16),i=t<0?0:255,n=t<0?-1*t:t,o=r>>16,a=r>>8&255,s=255&r;return"#"+(16777216+65536*(Math.round((i-o)*n)+o)+256*(Math.round((i-a)*n)+a)+(Math.round((i-s)*n)+s)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,r){return t.isColorHex(r)?this.shadeHexColor(e,r):this.shadeRGBColor(e,r)}}],i=[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===l(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,r=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if(null===t||"object"!==l(t))return t;if(r.has(t))return r.get(t);if(Array.isArray(t)){e=[],r.set(t,e);for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){return t.toString().includes("e")?Math.round(t):t}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),r=t.clientHeight,i=t.clientWidth;return r-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[i-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),r]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var r=t.replace("#","");r=r.match(new RegExp("(.{"+r.length/3+"})","g"));for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"x",r=t.toString().slice();return r.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,r){if(r>=t.length)for(var i=r-t.length+1;i--;)t.push(void 0);return t.splice(r,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t.style.key=e[r])}},{key:"preciseAddition",value:function(t,e){var r=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,n=Math.pow(10,Math.max(r,i));return(Math.round(t*n)+Math.round(e*n))/n}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i);e;){var n=e;e=t%e,t=n}return t/i}},{key:"getPrimeFactors",value:function(t){for(var e=[],r=2;t>=2;)t%r==0?(e.push(r),t/=r):r++;return e}},{key:"mod",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*i))%(e=Math.round(Math.abs(e)*i))/i}}],r&&c(e.prototype,r),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const f=h;function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function p(t,e){for(var r=0;r-1||n.indexOf("NaN")>-1)&&(n=u()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=u()),c.globals.shouldAnimate||(a=1),t.plot(n).animate(1,s).plot(n).animate(a,s).plot(o).after((function(){f.isNumber(r)?r===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(t):"none"!==i&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function y(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function m(t,e){if(t){if("string"==typeof t)return x(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(i.s();!(r=i.n()).done;)k(r.value,e)}catch(t){i.e(t)}finally{i.f()}}else if("object"!==v(t))O(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(var n in t)k(n,t[n])}function A(t){return w[t]||{}}function O(t){S.push.apply(S,y(t))}function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function C(t,e,r){return(e=function(t){var e=function(t){if("object"!=T(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==T(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r2&&void 0!==arguments[2]?arguments[2]:{},i=function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:Y;return B.document.createElementNS(e,t)}function Z(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t instanceof W)return t;if("object"===G(t))return Q(t);if(null==t)return new V[U];if("string"==typeof t&&"<"!==t.charAt(0))return Q(B.document.querySelector(t));var r=e?B.document.createElement("div"):q("svg");return r.innerHTML=t,t=Q(r.firstChild),r.removeChild(r.firstChild),t}function $(t,e){return e&&(e instanceof B.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:q(t)}function J(t){if(!t)return null;if(t.instance instanceof W)return t.instance;if("#document-fragment"===t.nodeName)return new V.Fragment(t);var e=I(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":V[e]||(e="Dom"),new V[e](t)}var Q=J;function K(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.name,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return V[e]=t,r&&(V[U]=t),O(Object.getOwnPropertyNames(t.prototype)),t}var tt=1e3;function et(t){return"Svgjs"+I(t)+tt++}function rt(t){for(var e=t.children.length-1;e>=0;e--)rt(t.children[e]);return t.id?(t.id=et(t.nodeName),t):t}function it(t,e){var r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;i>=0;i--)for(r in e)t[i].prototype[r]=e[r]}function nt(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;it.length)&&(e=t.length);for(var r=0,i=Array(e);rt.length)&&(e=t.length);for(var r=0,i=Array(e);rt.length)&&(e=t.length);for(var r=0,i=Array(e);r1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}k("Dom",{classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(bt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),k("Dom",{css:function(t,e){var r={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){var e=t.split(/\s*:\s*/);r[e[0]]=e[1]})),r;if(arguments.length<2){if(Array.isArray(t)){var i,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(n.s();!(i=n.n()).done;){var o=i.value,a=o;r[o]=this.node.style.getPropertyValue(a)}}catch(t){n.e(t)}finally{n.f()}return r}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"===vt(t))for(var s in t)this.node.style.setProperty(s,null==t[s]||dt.test(t[s])?"":t[s])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||dt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),k("Dom",{data:function(t,e,r){if(null==t)return this.data(M(function(t){var e,r=t.length,i=[];for(e=0;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;n[a]=this.data(a)}}catch(t){o.e(t)}finally{o.f()}return n}if("object"===xt(t))for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===r||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),k("Dom",{remember:function(t,e){if("object"===St(arguments[0]))for(var r in t)this.remember(r,t[r]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var Mt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init.apply(this,arguments)}var e,r,i;return e=t,r=[{key:"cmyk",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.min(1-i,1-n,1-o);return 1===a?new t(0,0,0,1,"cmyk"):new t((1-i-a)/(1-a),(1-n-a)/(1-a),(1-o-a)/(1-a),a,"cmyk")}},{key:"hsl",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.max(i,n,o),s=Math.min(i,n,o),l=(a+s)/2,c=a===s,u=a-s;return new t(360*(c?0:a===i?((n-o)/u+(n.5?u/(2-a-s):u/(a+s)),100*l,"hsl")}},{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"rgb";if(t=t||0,this.space)for(var o in this.space)delete this[this.space[o]];if("number"==typeof t)n="string"==typeof i?i:n,i="string"==typeof i?0:i,Object.assign(this,{_a:t,_b:e,_c:r,_d:i,space:n});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){var a=function(t,e){var r=Tt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Tt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Tt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Tt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Tt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Tt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return r.space=e||r.space,r}(t,e);Object.assign(this,a)}else if("string"==typeof t)if(ft.test(t)){var s=t.replace(ut,""),l=At(st.exec(s).slice(1,4).map((function(t){return parseInt(t)})),3),c=l[0],u=l[1],h=l[2];Object.assign(this,{_a:c,_b:u,_c:h,_d:0,space:"rgb"})}else{if(!ht.test(t))throw Error("Unsupported string format, can't construct Color");var f=at.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map((function(t){return parseInt(t,16)})),d=At(f,4),p=d[1],g=d[2],b=d[3];Object.assign(this,{_a:p,_b:g,_c:b,_d:0,space:"rgb"})}var y=this._a,v=this._b,m=this._c,x=this._d,w="rgb"===this.space?{r:y,g:v,b:m}:"xyz"===this.space?{x:y,y:v,z:m}:"hsl"===this.space?{h:y,s:v,l:m}:"lab"===this.space?{l:y,a:v,b:m}:"lch"===this.space?{l:y,c:v,h:m}:"cmyk"===this.space?{c:y,m:v,y:m,k:x}:{};Object.assign(this,w)}},{key:"lab",value:function(){var e=this.xyz(),r=e.x,i=e.y;return new t(116*i-16,500*(r-i),200*(i-e.z),"lab")}},{key:"lch",value:function(){var e=this.lab(),r=e.l,i=e.a,n=e.b,o=Math.sqrt(Math.pow(i,2)+Math.pow(n,2)),a=180*Math.atan2(n,i)/Math.PI;return a<0&&(a=360-(a*=-1)),new t(r,o,a,"lch")}},{key:"rgb",value:function(){if("rgb"===this.space)return this;if("lab"===(E=this.space)||"xyz"===E||"lch"===E){var e=this.x,r=this.y,i=this.z;if("lab"===this.space||"lch"===this.space){var n=this.l,o=this.a,a=this.b;if("lch"===this.space){var s=this.c,l=this.h,c=Math.PI/180;o=s*Math.cos(c*l),a=s*Math.sin(c*l)}var u=(n+16)/116,h=o/500+u,f=u-a/200,d=16/116,p=.008856,g=7.787;e=.95047*(Math.pow(h,3)>p?Math.pow(h,3):(h-d)/g),r=1*(Math.pow(u,3)>p?Math.pow(u,3):(u-d)/g),i=1.08883*(Math.pow(f,3)>p?Math.pow(f,3):(f-d)/g)}var b=3.2406*e+-1.5372*r+-.4986*i,y=-.9689*e+1.8758*r+.0415*i,v=.0557*e+-.204*r+1.057*i,m=Math.pow,x=.0031308;return new t(255*(b>x?1.055*m(b,1/2.4)-.055:12.92*b),255*(y>x?1.055*m(y,1/2.4)-.055:12.92*y),255*(v>x?1.055*m(v,1/2.4)-.055:12.92*v))}if("hsl"===this.space){var w=this.h,S=this.s,k=this.l;if(w/=360,k/=100,0==(S/=100))return new t(k*=255,k,k);var A=k<.5?k*(1+S):k+S-k*S,O=2*k-A;return new t(255*Et(O,A,w+1/3),255*Et(O,A,w),255*Et(O,A,w-1/3))}if("cmyk"===this.space){var P=this.c,C=this.m,j=this.y,T=this.k;return new t(255*(1-Math.min(1,P*(1-T)+T)),255*(1-Math.min(1,C*(1-T)+T)),255*(1-Math.min(1,j*(1-T)+T)))}return this;var E}},{key:"toArray",value:function(){return[this._a,this._b,this._c,this._d,this.space]}},{key:"toHex",value:function(){var t=At(this._clamped().map(jt),3),e=t[0],r=t[1],i=t[2];return"#".concat(e).concat(r).concat(i)}},{key:"toRgb",value:function(){var t=At(this._clamped(),3),e=t[0],r=t[1],i=t[2];return"rgb(".concat(e,",").concat(r,",").concat(i,")")}},{key:"toString",value:function(){return this.toHex()}},{key:"xyz",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,l=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=(.4124*a+.3576*s+.1805*l)/.95047,u=(.2126*a+.7152*s+.0722*l)/1,h=(.0193*a+.1192*s+.9505*l)/1.08883;return new t(c>.008856?Math.pow(c,1/3):7.787*c+16/116,u>.008856?Math.pow(u,1/3):7.787*u+16/116,h>.008856?Math.pow(h,1/3):7.787*h+16/116,"xyz")}},{key:"_clamped",value:function(){var t=this.rgb(),e=t._a,r=t._b,i=t._c,n=Math.max,o=Math.min,a=Math.round;return[e,r,i].map((function(t){return n(0,o(a(t),255))}))}}],i=[{key:"isColor",value:function(e){return e&&(e instanceof t||this.isRgb(e)||this.test(e))}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"random",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vibrant",r=arguments.length>1?arguments[1]:void 0,i=Math.random,n=Math.round,o=Math.sin,a=Math.PI;if("vibrant"===e)return new t(24*i()+57,38*i()+45,360*i(),"lch");if("sine"===e)return new t(n(80*o(2*a*(r=null==r?i():r)/.5+.01)+150),n(50*o(2*a*r/.5+4.6)+200),n(100*o(2*a*r/.5+2.3)+150));if("pastel"===e)return new t(8*i()+86,17*i()+9,360*i(),"lch");if("dark"===e)return new t(10+10*i(),50*i()+86,360*i(),"lch");if("rgb"===e)return new t(255*i(),255*i(),255*i());if("lab"===e)return new t(100*i(),256*i()-128,256*i()-128,"lab");if("grey"===e){var s=255*i();return new t(s,s,s)}throw new Error("Unsupported random color mode")}},{key:"test",value:function(t){return"string"==typeof t&&(ht.test(t)||ft.test(t))}}],r&&Pt(e.prototype,r),i&&Pt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function It(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f,l=r*o-i*n,c=l>0?1:-1,u=c*Math.sqrt(r*r+i*i),h=Math.atan2(c*i,c*r),f=180/Math.PI*h,d=Math.cos(h),p=Math.sin(h),g=(r*n+i*o)/l,b=n*u/(g*r-i)||o*u/(g*i+r);return{scaleX:u,scaleY:b,shear:g,rotate:f,translateX:a-t+t*d*u+e*(g*d*u-p*b),translateY:s-e+t*p*u+e*(g*p*u+d*b),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"equals",value:function(e){if(e===this)return!0;var r=new t(e);return Yt(this.a,r.a)&&Yt(this.b,r.b)&&Yt(this.c,r.c)&&Yt(this.d,r.d)&&Yt(this.e,r.e)&&Yt(this.f,r.f)}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"init",value:function(e){var r=t.fromArray([1,0,0,1,0,0]);return e=e instanceof ar?e.matrixify():"string"==typeof e?t.fromArray(e.split(bt).map(parseFloat)):Array.isArray(e)?t.fromArray(e):"object"===zt(e)&&t.isMatrixLike(e)?e:"object"===zt(e)?(new t).transform(e):6===arguments.length?t.fromArray([].slice.call(arguments)):r,this.a=null!=e.a?e.a:r.a,this.b=null!=e.b?e.b:r.b,this.c=null!=e.c?e.c:r.c,this.d=null!=e.d?e.d:r.d,this.e=null!=e.e?e.e:r.e,this.f=null!=e.f?e.f:r.f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"inverseO",value:function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.e,o=this.f,a=t*i-e*r;if(!a)throw new Error("Cannot invert "+this);var s=i/a,l=-e/a,c=-r/a,u=t/a,h=-(s*n+c*o),f=-(l*n+u*o);return this.a=s,this.b=l,this.c=c,this.d=u,this.e=h,this.f=f,this}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(r,this,this)}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(this,r,this)}},{key:"rotate",value:function(t,e,r){return this.clone().rotateO(t,e,r)}},{key:"rotateO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t=L(t);var i=Math.cos(t),n=Math.sin(t),o=this.a,a=this.b,s=this.c,l=this.d,c=this.e,u=this.f;return this.a=o*i-a*n,this.b=a*i+o*n,this.c=s*i-l*n,this.d=l*i+s*n,this.e=c*i-u*n+r*n-e*i+e,this.f=u*i+c*n-e*n-r*i+r,this}},{key:"scale",value:function(){var t;return(t=this.clone()).scaleO.apply(t,arguments)}},{key:"scaleO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t);var n=this.a,o=this.b,a=this.c,s=this.d,l=this.e,c=this.f;return this.a=n*t,this.b=o*e,this.c=a*t,this.d=s*e,this.e=l*t-r*t+r,this.f=c*e-i*e+i,this}},{key:"shear",value:function(t,e,r){return this.clone().shearO(t,e,r)}},{key:"shearO",value:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f;return this.a=r+i*t,this.c=n+o*t,this.e=a+s*t-e*t,this}},{key:"skew",value:function(){var t;return(t=this.clone()).skewO.apply(t,arguments)}},{key:"skewO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t),t=L(t),e=L(e);var n=Math.tan(t),o=Math.tan(e),a=this.a,s=this.b,l=this.c,c=this.d,u=this.e,h=this.f;return this.a=a+s*n,this.b=s+a*o,this.c=l+c*n,this.d=c+l*o,this.e=u+h*n-i*n,this.f=h+u*o-r*o,this}},{key:"skewX",value:function(t,e,r){return this.skew(t,0,e,r)}},{key:"skewY",value:function(t,e,r){return this.skew(0,t,e,r)}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"transform",value:function(e){if(t.isMatrixLike(e))return new t(e).multiplyO(this);var r=t.formatTransforms(e),i=new Rt(r.ox,r.oy).transform(this),n=i.x,o=i.y,a=(new t).translateO(r.rx,r.ry).lmultiplyO(this).translateO(-n,-o).scaleO(r.scaleX,r.scaleY).skewO(r.skewX,r.skewY).shearO(r.shear).rotateO(r.theta).translateO(n,o);if(isFinite(r.px)||isFinite(r.py)){var s=new Rt(n,o).transform(a),l=isFinite(r.px)?r.px-s.x:0,c=isFinite(r.py)?r.py-s.y:0;a.translateO(l,c)}return a.translateO(r.tx,r.ty),a}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],i=[{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,r=t.flip&&(e||"x"===t.flip)?-1:1,i=t.flip&&(e||"y"===t.flip)?-1:1,n=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,o=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,a=t.scale&&t.scale.length?t.scale[0]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleX)?t.scaleX*r:r,s=t.scale&&t.scale.length?t.scale[1]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleY)?t.scaleY*i:i,l=t.shear||0,c=t.rotate||t.theta||0,u=new Rt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),h=u.x,f=u.y,d=new Rt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,g=d.y,b=new Rt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=b.x,v=b.y,m=new Rt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:a,scaleY:s,skewX:n,skewY:o,shear:l,theta:c,rx:m.x,ry:m.y,tx:y,ty:v,ox:h,oy:f,px:p,py:g}}},{key:"fromArray",value:function(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}},{key:"isMatrixLike",value:function(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}},{key:"matrixMultiply",value:function(t,e,r){var i=t.a*e.a+t.c*e.b,n=t.b*e.a+t.d*e.b,o=t.a*e.c+t.c*e.d,a=t.b*e.c+t.d*e.d,s=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return r.a=i,r.b=n,r.c=o,r.d=a,r.e=s,r.f=l,r}}],r&&Xt(e.prototype,r),i&&Xt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ft(){if(!Ft.nodes){var t=Z().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");var e=t.path().node;Ft.nodes={svg:t,path:e}}if(!Ft.nodes.svg.node.parentNode){var r=B.document.body||B.document.documentElement;Ft.nodes.svg.addTo(r)}return Ft.nodes}function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function Nt(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s1?e-1:0),i=1;it.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(bt).map(parseFloat)}},{key:"toArray",value:function(){return Array.prototype.concat.apply([],this)}},{key:"toSet",value:function(){return new Set(this)}},{key:"toString",value:function(){return this.join(" ")}},{key:"valueOf",value:function(){var t=[];return t.push.apply(t,Pe(this)),t}}],r&&je(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Ee(Array));function Re(t){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Re(t)}function ze(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.writeDataToDom();var r=this.node.cloneNode(t);return e&&(r=rt(r)),new this.constructor(r)}},{key:"each",value:function(t,e){var r,i,n=this.children();for(r=0,i=n.length;r=0}},{key:"html",value:function(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=et(this.type)),this.attr("id",t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"last",value:function(){return J(this.node.lastChild)}},{key:"matches",value:function(t){var e=this.node,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return r&&r.call(e,t)}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=J(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=J(e.node.parentNode));return e}},{key:"put",value:function(t,e){return t=Z(t),this.add(t,e),t}},{key:"putIn",value:function(t,e){return Z(t).add(this,e)}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"replace",value:function(t){return t=Z(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}},{key:"round",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Math.pow(10,t),i=this.attr(e);for(var n in i)"number"==typeof i[n]&&(i[n]=Math.round(i[n]*r)/r);return this.attr(i),this}},{key:"svg",value:function(t,e){return this.xml(t,e,Y)}},{key:"toString",value:function(){return this.id()}},{key:"words",value:function(t){return this.node.textContent=t,this}},{key:"wrap",value:function(t){var e=this.parent();if(!e)return this.addTo(t);var r=e.index(this);return e.put(t,r).put(this)}},{key:"writeDataToDom",value:function(){return this.each((function(){this.writeDataToDom()})),this}},{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();var i=this;if(null!=t){if(i=J(i.node.cloneNode(!0)),e){var n=t(i);if(i=n||i,!1===n)return""}i.each((function(){var e=t(this),r=e||this;!1===e?this.remove():e&&this!==r&&this.replace(r)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;var o=q("wrapper",r),a=B.document.createDocumentFragment();o.innerHTML=t;for(var s=o.children.length;s--;)a.appendChild(o.firstElementChild);var l=this.parent();return e?this.replace(a)&&l:this.add(a)}}],r&&We(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function Je(t){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Je(t)}function Qe(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(e=this.node.attributes);try{for(o.s();!(n=o.n()).done;){var a=n.value;t[a.nodeName]=pt.test(a.nodeValue)?parseFloat(a.nodeValue):a.nodeValue}}catch(t){o.e(t)}finally{o.f()}return t}if(t instanceof Array)return t.reduce((function(t,e){return t[e]=i.attr(e),t}),{});if("object"===Ye(t)&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ae[t]:pt.test(e)?parseFloat(e):e;"number"==typeof(e=Be.reduce((function(e,r){return r(t,e,i)}),e))?e=new De(e):Fe.has(t)&&Mt.isColor(e)?e=new Mt(e):e.constructor===Array&&(e=new _e(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof r?this.node.setAttributeNS(r,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return oe(t,this.node)},findOne:function(t){return J(this.node.querySelector(t))}}),K($e,"Dom");var ar=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&er(t,e)}(n,t);var e,r,i=rr(n);function n(t,e){var r,o,a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,t,e)).dom={},r.node.instance=ir(r),(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&r.setData(null!==(o=null!==(a=JSON.parse(t.getAttribute("data-svgjs")))&&void 0!==a?a:JSON.parse(t.getAttribute("svgjs:data")))&&void 0!==o?o:{}),r}return e=n,r=[{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"defs",value:function(){var t=this.root();return t&&t.defs()}},{key:"dmove",value:function(t,e){return this.dx(t).dy(e)}},{key:"dx",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.x(new De(t).plus(this.x()))}},{key:"dy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.y(new De(t).plus(this.y()))}},{key:"getEventHolder",value:function(){return this}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"parents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.root(),e="string"==typeof t;e||(t=Z(t));for(var r=new ie,i=this;(i=i.parent())&&i.node!==B.document&&"#document-fragment"!==i.nodeName&&(r.push(i),e||i.node!==t.node)&&(!e||!i.matches(t));)if(i.node===this.root().node)return null;return r}},{key:"reference",value:function(t){if(!(t=this.attr(t)))return null;var e=(t+"").match(lt);return e?Z(e[1]):null}},{key:"root",value:function(){var t=this.parent(V[U]);return t&&t.root()}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.width(new De(r.width)).height(new De(r.height))}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"writeDataToDom",value:function(){return D(this,this.dom),tr(or(n.prototype),"writeDataToDom",this).call(this)}},{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}}],r&&Qe(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);function sr(t){return sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sr(t)}it(ar,{bbox:function(){var t=Ut(this,(function(t){return t.getBBox()}),(function(t){try{var e=t.clone().addTo(Ft().svg).show(),r=e.node.getBBox();return e.remove(),r}catch(e){throw new Error('Getting bbox of element "'.concat(t.node.nodeName,'" is not possible: ').concat(e.toString()))}}));return new Vt(t)},rbox:function(t){var e=Ut(this,(function(t){return t.getBoundingClientRect()}),(function(t){throw new Error('Getting rbox of element "'.concat(t.node.nodeName,'" is not possible'))})),r=new Vt(e);return t?r.transform(t.screenCTM().inverseO()):r.addOffset()},inside:function(t,e){var r=this.bbox();return t>r.x&&e>r.y&&t=0;e--)null!=r[lr[t][e]]&&this.attr(lr.prefix(t,lr[t][e]),r[lr[t][e]]);return this},k(["Element","Runner"],r)})),k(["Element","Runner"],{matrix:function(t,e,r,i,n,o){return null==t?new Ht(this):this.attr("transform",new Ht(t,e,r,i,n,o))},rotate:function(t,e,r){return this.transform({rotate:t,ox:e,oy:r},!0)},skew:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:r},!0):this.transform({skew:[t,e],ox:r,oy:i},!0)},shear:function(t,e,r){return this.transform({shear:t,ox:e,oy:r},!0)},scale:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:r},!0):this.transform({scale:[t,e],ox:r,oy:i},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"both",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"center";return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),k("radius",{radius:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return"radialGradient"===(this._element||this).type?this.attr("r",new De(t)):this.rx(t).ry(e)}}),k("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Rt(this.node.getPointAtLength(t))}}),k(["Element","Runner"],{font:function(t,e){if("object"===sr(t)){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),k("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),k("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(ct).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(bt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(Ht.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new Ht)},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);var r=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(i.multiply(r)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){var r=new Ht(this).decompose();return null==t?r:r[t]}Ht.isMatrixLike(t)||(t=hr(hr({},t),{},{origin:R(t,this)}));var i=new Ht(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});var xr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&br(t,e)}(n,t);var e,r,i=yr(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"flatten",value:function(){return this.each((function(){if(this instanceof n)return this.flatten().ungroup()})),this}},{key:"ungroup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.index(this);return e=-1===e?t.children().length:e,this.each((function(r,i){return i[i.length-r-1].toParent(t,e)})),this.remove()}}],r&&pr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function wr(t){return wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wr(t)}function Sr(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("defs",t),e)}return e=n,(r=[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}])&&Sr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Tr(t){return Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tr(t)}function Er(t,e){return Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Er(t,e)}function Mr(t){var e=Lr();return function(){var r,i=Ir(t);if(e){var n=Ir(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Tr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Lr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lr=function(){return!!t})()}function Ir(t){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ir(t)}K(jr,"Defs");var _r=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Er(t,e)}(r,t);var e=Mr(r);function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.apply(this,arguments)}return r}(ar);function Rr(t){return this.attr("rx",t)}function zr(t){return this.attr("ry",t)}function Xr(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Dr(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Yr(t){return this.attr("cx",t)}function Hr(t){return this.attr("cy",t)}function Fr(t){return null==t?2*this.rx():this.rx(new De(t).divide(2))}function Br(t){return null==t?2*this.ry():this.ry(new De(t).divide(2))}function Nr(t){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nr(t)}function Wr(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("ellipse",t),e)}return e=n,r=[{key:"size",value:function(t,e){var r=_(this,t,e);return this.rx(new De(r.width).divide(2)).ry(new De(r.height).divide(2))}}],r&&Wr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Jr(t){return Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jr(t)}function Qr(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.put(new $r).size(t,e).move(0,0)}))}),K($r,"Ellipse");var oi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ei(t,e)}(n,t);var e,r,i=ri(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B.document.createDocumentFragment();return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,t)}return e=n,(r=[{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){var i=new $e(q("wrapper",r));return i.add(this.node.cloneNode(!0)),i.xml(!1,r)}return ti(ni(n.prototype),"xml",this).call(this,t,!1,r)}}])&&Qr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);K(oi,"Fragment");const ai=oi;function si(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new De(t),fy:new De(e)}):this.attr({x1:new De(t),y1:new De(e)})}function li(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new De(t),cy:new De(e)}):this.attr({x2:new De(t),y2:new De(e)})}function ci(t){return ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(t)}function ui(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("pattern",t),e)}return e=n,(r=[{key:"attr",value:function(t,e,r){return"transform"===t&&(t="patternTransform"),wi(Oi(n.prototype),"attr",this).call(this,t,e,r)}},{key:"bbox",value:function(){return new Vt}},{key:"targets",value:function(){return oe("svg [fill*="+this.id()+"]")}},{key:"toString",value:function(){return this.url()}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}}])&&mi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ci(t){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(t)}function ji(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("image",t),e)}return e=n,r=[{key:"load",value:function(t,e){if(!t)return this;var r=new B.window.Image;return de(r,"load",(function(t){var i=this.parent(Pi);0===this.width()&&0===this.height()&&this.size(r.width,r.height),i instanceof Pi&&0===i.width()&&0===i.height()&&i.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),de(r,"load error",(function(){pe(r)})),this.attr("href",r.src=t,F)}}],r&&ji(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function zi(t){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(t)}function Xi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Di(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Di(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Di(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(bt).map(parseFloat)).length%2!=0&&t.pop();for(var r=0,i=t.length;r=0;r--)i.width&&(this[r][0]=(this[r][0]-i.x)*t/i.width+i.x),i.height&&(this[r][1]=(this[r][1]-i.y)*e/i.height+i.y);return this}},{key:"toLine",value:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}},{key:"toString",value:function(){for(var t=[],e=0,r=this.length;e1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("line",t),e)}return e=n,r=[{key:"array",value:function(){return new Gi([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"plot",value:function(t,e,r,i){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:r,y2:i}:new Gi(t).toLine(),this.attr(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr(this.array().size(r.width,r.height).toLine())}}],r&&Qi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function an(t){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},an(t)}function sn(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("marker",t),e)}return e=n,r=[{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"orient",value:function(t){return this.attr("orient",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"toString",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"width",value:function(t){return this.attr("markerWidth",t)}}],r&&sn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function gn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bn(t,e)}function bn(t,e){return bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bn(t,e)}function yn(t){var e=vn();return function(){var r,i=mn(t);if(e){var n=mn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function vn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vn=function(){return!!t})()}function mn(t){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mn(t)}function xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wn(t,e){for(var r=0;r":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,r,i){return function(n){return n<0?t>0?e/t*n:r>0?i/r*n:0:n>1?r<1?(1-i)/(1-r)*n+(i-r)/(1-r):t<1?(1-e)/(1-t)*n+(e-t)/(1-t):1:3*n*Math.pow(1-n,2)*e+3*Math.pow(n,2)*(1-n)*i+Math.pow(n,3)}},steps:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";e=e.split("-").reverse()[0];var r=t;return"none"===e?--r:"both"===e&&++r,function(i){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Math.floor(i*t),a=i*o%1==0;return"start"!==e&&"both"!==e||++o,n&&a&&--o,i>=0&&o<0&&(o=0),i<=1&&o>r&&(o=r),o/r}}},Pn=function(){function t(){xn(this,t)}return Sn(t,[{key:"done",value:function(){return!1}}]),t}(),Cn=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:">";return xn(this,r),(t=e.call(this)).ease=On[i]||i,t}return Sn(r,[{key:"step",value:function(t,e,r){return"number"!=typeof t?r<1?t:e:t+(e-t)*this.ease(r)}}]),r}(Pn),jn=function(t){gn(r,t);var e=yn(r);function r(t){var i;return xn(this,r),(i=e.call(this)).stepper=t,i}return Sn(r,[{key:"done",value:function(t){return t.done}},{key:"step",value:function(t,e,r,i){return this.stepper(t,e,r,i)}}]),r}(Pn);function Tn(){var t=(this._duration||500)/1e3,e=this._overshoot||0,r=Math.PI,i=Math.log(e/100+1e-10),n=-i/Math.sqrt(r*r+i*i),o=3.9/(n*t);this.d=2*n*o,this.k=o*o}it(function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return xn(this,r),(t=e.call(this)).duration(i).overshoot(n),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;r>100&&(r=16),r/=1e3;var n=i.velocity||0,o=-this.d*n-this.k*(t-e),a=t+n*r+o*r*r/2;return i.velocity=n+o*r,i.done=Math.abs(e-a)+Math.abs(n)<.002,i.done?e:a}}]),r}(jn),{duration:An("_duration",Tn),overshoot:An("_overshoot",Tn)});var En=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;return xn(this,r),(t=e.call(this)).p(i).i(n).d(o).windup(a),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;var n=e-t,o=(i.integral||0)+n*r,a=(n-(i.error||0))/r,s=this._windup;return!1!==s&&(o=Math.max(-s,Math.min(o,s))),i.error=n,i.integral=o,i.done=Math.abs(n)<.001,i.done?e:t+(this.P*n+this.I*o+this.D*a)}}]),r}(jn);it(En,{windup:An("_windup"),p:An("P"),i:An("I"),d:An("D")});for(var Mn={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ln={M:function(t,e,r){return e.x=r.x=t[0],e.y=r.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,r){return e.x=r.x,e.y=r.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},In="mlhvqtcsaz".split(""),_n=0,Rn=In.length;_n=0;n--)"M"===(i=this[n][0])||"L"===i||"T"===i?(this[n][1]+=t,this[n][2]+=e):"H"===i?this[n][1]+=t:"V"===i?this[n][1]+=e:"C"===i||"S"===i||"Q"===i?(this[n][1]+=t,this[n][2]+=e,this[n][3]+=t,this[n][4]+=e,"C"===i&&(this[n][5]+=t,this[n][6]+=e)):"A"===i&&(this[n][6]+=t,this[n][7]+=e);return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"M0 0";return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t){for(var e=0,r="",i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:!(arguments.length>1&&void 0!==arguments[1])||arguments[1],p0:new Rt,p:new Rt};i.lastToken=r,r=t.charAt(e++);)if(i.inSegment||!Xn(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Bn.has(r))i.inNumber&&Dn(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(yt.test(r)){if(i.inNumber)Dn(i,!1);else{if(!zn(i))throw new Error("parser Error");Yn(i)}--e}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Fn(i)){Dn(i,!1),--e;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||Hn(i)){i.inNumber=!0,i.number=r,Dn(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Dn(i,!1),--e;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Dn(i,!1),i.inSegment&&zn(i)&&Yn(i),i.segments}(t)}},{key:"size",value:function(t,e){var r,i,n=this.bbox();for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)"M"===(i=this[r][0])||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}},{key:"toString",value:function(){return function(t){for(var e="",r=0,i=t.length;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r-1?t.constructor:Array.isArray(t)?_e:"object"===e?co:ao},oo=function(){function t(e){Kn(this,t),this._stepper=e||new Cn("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return eo(t,[{key:"at",value:function(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}},{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){this._type||this.type(no(t));var e=new this._type(t);return this._type===Mt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===co&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}]),t}(),ao=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}},{key:"toArray",value:function(){return[this.value]}},{key:"valueOf",value:function(){return this.value}}]),t}(),so=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,t.defaults,e),this}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),t}();so.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var lo=function(t,e){return t[0]e[0]?1:0},co=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"align",value:function(t){for(var e=this.values,r=0,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("path",t),e)}return e=n,r=[{key:"array",value:function(){return this._array||(this._array=new $n(this.attr("d")))}},{key:"clear",value:function(){return delete this._array,this}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new $n(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr("d",this.array().size(r.width,r.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}],r&&fo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function xo(){return this._array||(this._array=new Gi(this.attr("points")))}function wo(){return delete this._array,this}function So(t,e){return this.attr("points",this.array().move(t,e))}function ko(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Gi(t))}function Ao(t,e){var r=_(this,t,e);return this.attr("points",this.array().size(r.width,r.height))}function Oo(t){return Oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(t)}function Po(t,e){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Po(t,e)}function Co(t){var e=jo();return function(){var r,i=To(t);if(e){var n=To(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Oo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function jo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jo=function(){return!!t})()}function To(t){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},To(t)}mo.prototype.MorphArray=$n,k({Container:{path:nt((function(t){return this.put(new mo).plot(t||new $n)}))}}),K(mo,"Path");var Eo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Po(t,e)}(r,t);var e=Co(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polygon",t),i)}return r}(_r);function Mo(t){return Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(t)}function Lo(t,e){return Lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lo(t,e)}function Io(t){var e=_o();return function(){var r,i=Ro(t);if(e){var n=Ro(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_o=function(){return!!t})()}function Ro(t){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ro(t)}k({Container:{polygon:nt((function(t){return this.put(new Eo).plot(t||new Gi)}))}}),it(Eo,n),it(Eo,o),K(Eo,"Polygon");var zo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lo(t,e)}(r,t);var e=Io(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polyline",t),i)}return r}(_r);function Xo(t){return Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(t)}function Do(t,e){return Do=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Do(t,e)}function Yo(t){var e=Ho();return function(){var r,i=Fo(t);if(e){var n=Fo(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ho=function(){return!!t})()}function Fo(t){return Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fo(t)}k({Container:{polyline:nt((function(t){return this.put(new zo).plot(t||new Gi)}))}}),it(zo,n),it(zo,o),K(zo,"Polyline");var Bo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Do(t,e)}(r,t);var e=Yo(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("rect",t),i)}return r}(_r);function No(t){return No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(t)}function Wo(t,e){for(var r=0;r=e.time?e.run():Uo.timeouts.push(e),e!==r););for(var i=null,n=Uo.frames.last();i!==n&&(i=Uo.frames.shift());)i.run(t);for(var o=null;o=Uo.immediates.shift();)o();Uo.nextDraw=Uo.timeouts.first()||Uo.frames.first()?B.window.requestAnimationFrame(Uo._draw):null}};const qo=Uo;function Zo(t){return Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(t)}function $o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:na;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(t=i.call(this))._timeSource=e,t.terminate(),t}return e=n,r=[{key:"active",value:function(){return!!this._nextFrame}},{key:"finish",value:function(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}},{key:"getEndTime",value:function(){var t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}},{key:"getEndTimeOfTimeline",value:function(){var t=this._runners.map((function(t){return t.start+t.runner.duration()}));return Math.max.apply(Math,[0].concat(function(t){return function(t){if(Array.isArray(t))return $o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return $o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)))}},{key:"getLastRunnerInfo",value:function(){return this.getRunnerInfoById(this._lastRunnerId)}},{key:"getRunnerInfoById",value:function(t){return this._runners[this._runnerIds.indexOf(t)]||null}},{key:"pause",value:function(){return this._paused=!0,this._continue()}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"play",value:function(){return this._paused=!1,this.updateTime()._continue()}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var r=Math.abs(e);return this.speed(t?-r:r)}},{key:"schedule",value:function(t,e,r){if(null==t)return this._runners.map(ia);var i=0,n=this.getEndTime();if(e=e||0,null==r||"last"===r||"after"===r)i=n;else if("absolute"===r||"start"===r)i=e,e=0;else if("now"===r)i=this._time;else if("relative"===r){var o=this.getRunnerInfoById(t.id);o&&(i=o.start+e,e=0)}else{if("with-last"!==r)throw new Error('Invalid value for the "when" parameter');var a=this.getLastRunnerInfo();i=a?a.start:this._time}t.unschedule(),t.timeline(this);var s=t.persist(),l={persist:null===s?this._persist:s,start:i+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(l),this._runners.sort((function(t,e){return t.start-e.start})),this._runnerIds=this._runners.map((function(t){return t.runner.id})),this.updateTime()._continue(),this}},{key:"seek",value:function(t){return this.time(this._time+t)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"stop",value:function(){return this.time(0),this.pause()}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this._continue(!0))}},{key:"unschedule",value:function(t){var e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}},{key:"updateTime",value:function(){return this.active()||(this._lastSourceTime=this._timeSource()),this}},{key:"_continue",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return qo.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qo.frame(this._step)),this)}},{key:"_stepFn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._timeSource(),r=e-this._lastSourceTime;t&&(r=0);var i=this._speed*r+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=i,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(var n=this._runners.length;n--;){var o=this._runners[n],a=o.runner;this._time-o.start<=0&&a.reset()}for(var s=!1,l=0,c=this._runners.length;l0?this._continue():(this.pause(),this.fire("finished")),this}},{key:"terminate",value:function(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}],r&&Jo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function aa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=0;this._lastPosition=e;var i=this.duration(),n=this._lastTime<=0&&this._time>0,o=this._lastTime=i;this._lastTime=this._time,n&&this.fire("start",this);var a=this._isDeclarative;this.done=!a&&!o&&this._time>=i,this._reseted=!1;var s=!1;return(r||a)&&(this._initialise(r),this.transforms=new Ht,s=this._run(a?t:e),this.fire("step",this)),this.done=this.done||s&&a,o&&this.fire("finished",this),this}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,r=this._queue.length;e0&&void 0!==arguments[0]?arguments[0]:new Ht,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ha(this,t),this.transforms=e,this.id=r,this.done=i}return da(t,[{key:"clearTransformsFromQueue",value:function(){}}]),t}();it([ma,xa],{mergeWith:function(t){return new xa(t.transforms.lmultiply(this.transforms),t.id)}});var wa=function(t,e){return t.lmultiplyO(e)},Sa=function(t){return t.transforms};function ka(){var t=this._transformationRunners.runners.map(Sa).reduce(wa,new Ht);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}var Aa=function(){function t(){ha(this,t),this.runners=[],this.ids=[]}return da(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var e=t.id+1;return this.runners.push(t),this.ids.push(e),this}}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new xa).forEach((function(t){return t.clearTransformsFromQueue()})),this}},{key:"edit",value:function(t,e){var r=this.ids.indexOf(t+1);return this.ids.splice(r,1,t+1),this.runners.splice(r,1,e),this}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"length",value:function(){return this.ids.length}},{key:"merge",value:function(){for(var t=null,e=0;e0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("x",t)},dy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("y",t)},dmove:function(t,e){return this.dx(t).dy(e)},_queueNumberDelta:function(t,e){if(e=new De(e),this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e),i=null;return this.queue((function(){i=this.element()[t](),r.from(i),r.to(i+e)}),(function(e){return this.element()[t](r.at(e)),r.done()}),(function(t){r.to(i+new De(t))})),this._rememberMorpher(t,r),this},_queueObject:function(t,e){if(this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e);return this.queue((function(){r.from(this.element()[t]())}),(function(e){return this.element()[t](r.at(e)),r.done()})),this._rememberMorpher(t,r),this},_queueNumber:function(t,e){return this._queueObject(t,new De(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},amove:function(t,e){return this.ax(t).ay(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var r;return t&&e||(r=this._element.bbox()),t||(t=r.width/r.height*e),e||(e=r.height/r.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,r,i){if(4===arguments.length)return this.plot([t,e,r,i]);if(this._tryRetarget("plot",t))return this;var n=new oo(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){n.from(this._element.array())}),(function(t){return this._element.plot(n.at(t)),n.done()})),this._rememberMorpher("plot",n),this},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,r,i){return this._queueObject("viewbox",new Vt(t,e,r,i))},update:function(t){return"object"!==ua(t)?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),it(ma,{rx:Rr,ry:zr,from:si,to:li}),K(ma,"Runner");var Ia=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ta(t,e)}(n,t);var e,r,i=Ea(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("svg",t),r)).namespace(),e}return e=n,(r=[{key:"defs",value:function(){return this.isRoot()?J(this.node.querySelector("defs"))||this.put(new jr):this.root().defs()}},{key:"isRoot",value:function(){return!this.node.parentNode||!(this.node.parentNode instanceof B.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",F,H):this.root().namespace()}},{key:"removeNamespace",value:function(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,H).attr("xmlns:svgjs",null,H)}},{key:"root",value:function(){return this.isRoot()?this:ja(La(n.prototype),"root",this).call(this)}}])&&Pa(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function _a(t){return _a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(t)}function Ra(t,e){return Ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ra(t,e)}function za(t){var e=Xa();return function(){var r,i=Da(t);if(e){var n=Da(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==_a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xa=function(){return!!t})()}function Da(t){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Da(t)}k({Container:{nested:nt((function(){return this.put(new Ia)}))}}),K(Ia,"Svg",!0);var Ya=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ra(t,e)}(r,t);var e=za(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("symbol",t),i)}return r}(xr);function Ha(t){return!1===this._build&&this.clear(),this.node.appendChild(B.document.createTextNode(t)),this}function Fa(){return this.node.getComputedTextLength()}function Ba(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Na(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Wa(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.x(t,r).y(e,r)}function Ga(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function Va(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function Ua(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.cx(t,r).cy(e,r)}function qa(t){return this.attr("x",t)}function Za(t){return this.attr("y",t)}function $a(t,e){return this.ax(t).ay(e)}function Ja(t){return this._build=!!t,this}function Qa(t){return Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qa(t)}function Ka(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,$("text",t),o)).dom.leading=null!==(e=r.dom.leading)&&void 0!==e?e:new De(1.3),r._rebuild=!0,r._build=!1,r}return e=n,r=[{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new De(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,r=0,i=this.dom.leading;this.each((function(t){if(!X(this.node)){var n=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=i*new De(n);this.dom.newLined&&(this.attr("x",e.attr("x")),"\n"===this.text()?r+=o:(this.attr("dy",t?o+r:0),r=0))}})),this.fire("rebuild")}return this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new De(t.leading||1.3),this}},{key:"writeDataToDom",value:function(){return D(this,this.dom,{leading:1.3}),this}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,r=0;t="";for(var i=0,n=e.length;i0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).text(t)})),plain:nt((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).plain(t)}))}}),K(os,"Text");var ds=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cs(t,e)}(n,t);var e,r,i=us(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("tspan",t),r))._build=!1,e}return e=n,r=[{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"newLine",value:function(){this.dom.newLined=!0;var t=this.parent();if(!(t instanceof os))return this;var e=t.index(this),r=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),i=t.dom.leading*new De(r);return this.dy(e?i:0).attr("x",t.x())}},{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}],r&&ss(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function ps(t){return ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(t)}function gs(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:"",e=new ds;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.tspan(t).newLine()}}}),K(ds,"Tspan");var ws=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ys(t,e)}(n,t);var e,r,i=vs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("circle",t),e)}return e=n,(r=[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}},{key:"size",value:function(t){return this.radius(new De(t).divide(2))}}])&&gs(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Ss(t){return Ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(t)}function ks(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0;return this.put(new ws).size(t).move(0,0)}))}}),K(ws,"Circle");var Es=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ps(t,e)}(n,t);var e,r,i=Cs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("clipPath",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unclip()})),Os(Ts(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [clip-path*="+this.id()+"]")}}])&&ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ms(t){return Ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ms(t)}function Ls(t,e){return Ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ls(t,e)}function Is(t){var e=_s();return function(){var r,i=Rs(t);if(e){var n=Rs(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Ms(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_s=function(){return!!t})()}function Rs(t){return Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rs(t)}k({Container:{clip:nt((function(){return this.defs().put(new Es)}))},Element:{clipper:function(){return this.reference("clip-path")},clipWith:function(t){var e=t instanceof Es?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip:function(){return this.attr("clip-path",null)}}}),K(Es,"ClipPath");var zs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ls(t,e)}(r,t);var e=Is(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("foreignObject",t),i)}return r}(ar);function Xs(t,e){return this.children().forEach((function(r){var i;try{i=r.node instanceof N().SVGSVGElement?new Vt(r.attr(["x","y","width","height"])):r.bbox()}catch(t){return}var n=new Ht(r),o=n.translate(t,e).transform(n.inverse()),a=new Rt(i.x,i.y).transform(o);r.move(a.x,a.y)})),this}function Ds(t){return this.dmove(t,0)}function Ys(t){return this.dmove(0,t)}function Hs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.height:this.size(e.width,t,e)}function Fs(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=t-r.x,n=e-r.y;return this.dmove(i,n)}function Bs(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=_(this,t,e,r),n=i.width/r.width,o=i.height/r.height;return this.children().forEach((function(t){var e=new Rt(r).transform(new Ht(t).inverse());t.scale(n,o,e.x,e.y)})),this}function Ns(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.width:this.size(t,e.height,e)}function Ws(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.move(t,e.y,e)}function Gs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.move(e.x,t,e)}function Vs(t){return Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(t)}function Us(t,e){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Us(t,e)}function qs(t){var e=Zs();return function(){var r,i=$s(t);if(e){var n=$s(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Zs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zs=function(){return!!t})()}function $s(t){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(t)}k({Container:{foreignObject:nt((function(t,e){return this.put(new zs).size(t,e)}))}}),K(zs,"ForeignObject");var Js=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Us(t,e)}(r,t);var e=qs(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("g",t),i)}return r}(xr);function Qs(t){return Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(t)}function Ks(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("a",t),e)}return e=n,(r=[{key:"target",value:function(t){return this.attr("target",t)}},{key:"to",value:function(t){return this.attr("href",t,F)}}])&&Ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function al(t){return al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},al(t)}function sl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("mask",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unmask()})),cl(dl(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [mask*="+this.id()+"]")}}])&&sl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function gl(t){return gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(t)}function bl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("stop",t),e)}return e=n,r=[{key:"update",value:function(t){return("number"==typeof t||t instanceof De)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new De(t.offset)),this}}],r&&bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function kl(t){return kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kl(t)}function Al(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Ol(t,e,r){return(e=Cl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("style",t),e)}return e=n,r=[{key:"addText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.node.textContent+=t,this}},{key:"font",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.rule("@font-face",function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("textPath",t),e)}return e=n,(r=[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),r=null;return e&&(r=e.plot(t)),null==t?r:this}},{key:"track",value:function(){return this.reference("href")}}])&&_l(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(os);function Fl(t){return Fl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(t)}function Bl(t,e){for(var r=0;r1&&void 0!==arguments[1])||arguments[1],i=new Hl;if(t instanceof mo||(t=this.defs().path(t)),i.attr("href","#"+t,F),r)for(;e=this.node.firstChild;)i.node.appendChild(e);return this.put(i)})),textPath:function(){return this.findOne("textPath")}},Path:{text:nt((function(t){return t instanceof os||(t=(new os).addTo(this.parent()).text(t)),t.path(this)})),targets:function(){var t=this;return oe("svg textPath").filter((function(e){return(e.attr("href")||"").includes(t.id())}))}}}),Hl.prototype.MorphArray=$n,K(Hl,"TextPath");var ql=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wl(t,e)}(n,t);var e,r,i=Gl(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("use",t),e)}return e=n,(r=[{key:"use",value:function(t,e){return this.attr("href",(e||"")+"#"+t,F)}}])&&Bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);k({Container:{use:nt((function(t,e){return this.put(new ql).use(t,e)}))}}),K(ql,"Use");var Zl=Z;function $l(t){return $l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$l(t)}function Jl(t){return function(t){if(Array.isArray(t))return Ql(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ql(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ql(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ql(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];uo.push.apply(uo,Jn([].concat(t)))}([De,Mt,Vt,Ht,_e,Gi,$n,Rt]),it(uo,{to:function(t){return(new oo).type(this.constructor).from(this.toArray()).to(t)},fromArray:function(t){return this.init(t),this},toConsumable:function(){return this.toArray()},morph:function(t,e,r,i,n){return this.fromArray(t.map((function(t,o){return i.step(t,e[o],r,n[o],n)})))}});var cc=function(t){nc(r,t);var e=ac(r);function r(t){var i;return Kl(this,r),(i=e.call(this,$("filter",t),t)).$source="SourceGraphic",i.$sourceAlpha="SourceAlpha",i.$background="BackgroundImage",i.$backgroundAlpha="BackgroundAlpha",i.$fill="FillPaint",i.$stroke="StrokePaint",i.$autoSetIn=!0,i}return ec(r,[{key:"put",value:function(t,e){return!(t=ic(lc(r.prototype),"put",this).call(this,t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}},{key:"remove",value:function(){return this.targets().each("unfilter"),ic(lc(r.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe('svg [filter*="'+this.id()+'"]')}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),r}(ar),uc=function(t){nc(r,t);var e=ac(r);function r(t,i){var n;return Kl(this,r),(n=e.call(this,t,i)).result(n.id()),n}return ec(r,[{key:"in",value:function(t){if(null==t){var e=this.attr("in");return this.parent()&&this.parent().find('[result="'.concat(e,'"]'))[0]||e}return this.attr("in",t)}},{key:"result",value:function(t){return this.attr("result",t)}},{key:"toString",value:function(){return this.result()}}]),r}(ar),hc=function(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,F)},morphology:hc(["operator","radius"]),offset:hc(["dx","dy"]),specularLighting:hc(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:hc([]),turbulence:hc(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((function(t){var e=I(t),r=fc[t];cc[e+"Effect"]=function(t){nc(n,t);var i=ac(n);function n(t){return Kl(this,n),i.call(this,$("fe"+e,t),t)}return ec(n,[{key:"update",value:function(t){return r.apply(this,t),this}}]),n}(uc),cc.prototype[t]=nt((function(t){var r=new cc[e+"Effect"];if(null==t)return this.put(r);for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},e=this.put(new cc.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;for(var r in t.r||t.g||t.b||t.a||(t={r:t,g:t,b:t,a:t}),t)e.add(new(cc["Func"+r.toUpperCase()])(t[r]));return e}}),["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((function(t){var e=I(t);cc[e]=function(t){nc(i,t);var r=ac(i);function i(t){return Kl(this,i),r.call(this,$("fe"+e,t),t)}return i}(uc)})),["funcR","funcG","funcB","funcA"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.ComponentTransferEffect.prototype[t]=r})),["distantLight","pointLight","spotLight"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.DiffuseLightingEffect.prototype[t]=r,cc.SpecularLightingEffect.prototype[t]=r})),it(cc.MergeEffect,{mergeNode:function(t){return this.put(new cc.MergeNode).attr("in",t)}}),it(jr,{filter:function(t){var e=this.put(new cc);return"function"==typeof t&&t.call(e,e),e}}),it(xr,{filter:function(t){return this.defs().filter(t)}}),it(ar,{filterWith:function(t){var e=t instanceof cc?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer:function(){return this.reference("filter")}});var dc={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,r,i){return this.parent()&&this.parent().diffuseLighting(t,r,i).in(this)},displacementMap:function(t,e,r,i){return this.parent()&&this.parent().displacementMap(this,t,e,r,i)},dropShadow:function(t,e,r){return this.parent()&&this.parent().dropShadow(this,t,e,r).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){var e;return t=t instanceof Array?t:Jl(t),this.parent()&&(e=this.parent()).merge.apply(e,[this].concat(Jl(t)))},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,r,i,n){return this.parent()&&this.parent().specularLighting(t,r,i,n).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,r,i,n){return this.parent()&&this.parent().turbulence(t,e,r,i,n).in(this)}};function pc(t){return pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(t)}function gc(t,e){for(var r=0;r0&&-1===o.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:i,dx:l,dy:s,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:a,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":u,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}},{key:"dropShadow",value:function(t,e){var r,i,n,o,a,s=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,c=this.w;return t.unfilter(!0),f.isMsEdge()&&"radialBar"===c.config.chart.type||(null===(r=c.config.chart.dropShadow.enabledOnSeries)||void 0===r?void 0:r.length)>0&&-1===(null===(n=c.config.chart.dropShadow.enabledOnSeries)||void 0===n?void 0:n.indexOf(l))||(t.filterWith((function(t){s.addShadow(t,l,e,"SourceGraphic")})),e.noUserSpaceOnUse||null===(o=t.filterer())||void 0===o||null===(a=o.node)||void 0===a||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(i=t.filterer())||void 0===i?void 0:i.node)),t}},{key:"setSelectionFilter",value:function(t,e,r){var i=this.w;if(void 0!==i.globals.selectedDataPoints[e]&&i.globals.selectedDataPoints[e].indexOf(r)>-1){t.node.setAttribute("selected",!0);var n=i.config.states.active.filter;"none"!==n&&this.applyFilter(t,e,n.type)}}},{key:"_scaleFilterSize",value:function(t){t&&function(e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}],r&&gc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const vc=yc;function mc(t){return mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(t)}function xc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wc(t){for(var e=1;e2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function o(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var a=t.split(/[,\s]/).reduce((function(t,e){var r=e.match("([a-zA-Z])(.+)");return r?(t.push(r[1]),t.push(r[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),s=[];if(a.length>1){var l=o(a[0]),c=null;"Z"==a[a.length-1][0]&&a[0].length>2&&(c=["L",l.x,l.y],a[a.length-1]=c),s.push(a[0]);for(var u=1;u2&&"L"==f[0]&&d.length>2&&"L"==d[0]){var p,g,b=o(h),y=o(f),v=o(d);p=r(y,b,e),g=r(y,v,e),n(f,p),f.origPoint=y,s.push(f);var m=i(p,y,.5),x=i(y,g,.5),w=["C",m.x,m.y,x.x,x.y,g.x,g.y];w.origPoint=y,s.push(w)}else s.push(f)}if(c){var S=o(s[s.length-1]);s.push(["Z"]),n(s[0],S)}}else s=a;return s.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:r,y2:i,stroke:n,"stroke-dasharray":o,"stroke-width":a,"stroke-linecap":s})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,u=this.w.globals.dom.Paper.rect();return u.attr({x:t,y:e,width:r>0?r:0,height:i>0?i:0,rx:n,ry:n,opacity:a,"stroke-width":null!==s?s:0,stroke:null!==l?l:"none","stroke-dasharray":c}),u.node.setAttribute("fill",o),u}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":r})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var r=this.w.globals.dom.Paper.circle(2*t);return null!==e&&r.attr(e),r}},{key:"drawPath",value:function(t){var e=t.d,r=void 0===e?"":e,i=t.stroke,n=void 0===i?"#a8a8a8":i,o=t.strokeWidth,a=void 0===o?1:o,s=t.fill,l=t.fillOpacity,c=void 0===l?1:l,u=t.strokeOpacity,h=void 0===u?1:u,f=t.classes,d=t.strokeLinecap,p=void 0===d?null:d,g=t.strokeDashArray,b=void 0===g?0:g,y=this.w;return null===p&&(p=y.config.stroke.lineCap),(r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r="M 0 ".concat(y.globals.gridHeight)),y.globals.dom.Paper.path(r).attr({fill:s,"fill-opacity":c,stroke:n,"stroke-opacity":h,"stroke-linecap":p,"stroke-width":a,"stroke-dasharray":b,class:f})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=null;return null===r?i=[" L",t,e].join(" "):"H"===r?i=[" H",t].join(" "):"V"===r&&(i=[" V",e].join(" ")),i}},{key:"curve",value:function(t,e,r,i,n,o){return["C",t,e,r,i,n,o].join(" ")}},{key:"quadraticCurve",value:function(t,e,r,i){return["Q",t,e,r,i].join(" ")}},{key:"arc",value:function(t,e,r,i,n,o,a){var s="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(s="a"),[s,t,e,r,i,n,o,a].join(" ")}},{key:"renderPaths",value:function(t){var e,r=t.j,i=t.realIndex,n=t.pathFrom,o=t.pathTo,a=t.stroke,s=t.strokeWidth,l=t.strokeLinecap,c=t.fill,u=t.animationDelay,h=t.initialSpeed,f=t.dataChangeSpeed,d=t.className,p=t.chartType,g=t.shouldClipToGrid,y=void 0===g||g,v=t.bindEventsOnPaths,m=void 0===v||v,x=t.drawShadow,w=void 0===x||x,S=this.w,k=new vc(this.ctx),A=new b(this.ctx),O=this.w.config.chart.animations.enabled,P=O&&this.w.config.chart.animations.dynamicAnimation.enabled,C=!!(O&&!S.globals.resized||P&&S.globals.dataChanged&&S.globals.shouldAnimate);C?e=n:(e=o,S.globals.animationEnded=!0);var j,T=S.config.stroke.dashArray;j=Array.isArray(T)?T[i]:S.config.stroke.dashArray;var E=this.drawPath({d:e,stroke:a,strokeWidth:s,fill:c,fillOpacity:1,classes:d,strokeLinecap:l,strokeDashArray:j});E.attr("index",i),y&&("bar"===p&&!S.globals.isHorizontal||S.globals.comboCharts?E.attr({"clip-path":"url(#gridRectBarMask".concat(S.globals.cuid,")")}):E.attr({"clip-path":"url(#gridRectMask".concat(S.globals.cuid,")")})),S.config.chart.dropShadow.enabled&&w&&k.dropShadow(E,S.config.chart.dropShadow,i),m&&(E.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,E)),E.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,E)),E.node.addEventListener("mousedown",this.pathMouseDown.bind(this,E))),E.attr({pathTo:o,pathFrom:n});var M={el:E,j:r,realIndex:i,pathFrom:n,pathTo:o,fill:c,strokeWidth:s,delay:u};return!O||S.globals.resized||S.globals.dataChanged?!S.globals.resized&&S.globals.dataChanged||A.showDelayedElements():A.animatePathsGradually(wc(wc({},M),{},{speed:h})),S.globals.dataChanged&&P&&C&&A.animatePathsGradually(wc(wc({},M),{},{speed:f})),E}},{key:"drawPattern",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,r,(function(o){"horizontalLines"===t?o.line(0,0,r,0).stroke({color:i,width:n+1}):"verticalLines"===t?o.line(0,0,0,e).stroke({color:i,width:n+1}):"slantedLines"===t?o.line(0,0,e,r).stroke({color:i,width:n}):"squares"===t?o.rect(e,r).fill("none").stroke({color:i,width:n}):"circles"===t&&o.circle(e).fill("none").stroke({color:i,width:n})}))}},{key:"drawGradient",value:function(t,e,r,i,n){var o,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,u=this.w;e.length<9&&0===e.indexOf("#")&&(e=f.hexToRgba(e,i)),r.length<9&&0===r.indexOf("#")&&(r=f.hexToRgba(r,n));var h=0,d=1,p=1,g=null;null!==s&&(h=void 0!==s[0]?s[0]/100:0,d=void 0!==s[1]?s[1]/100:1,p=void 0!==s[2]?s[2]/100:1,g=void 0!==s[3]?s[3]/100:null);var b=!("donut"!==u.config.chart.type&&"pie"!==u.config.chart.type&&"polarArea"!==u.config.chart.type&&"bubble"!==u.config.chart.type);if(o=l&&0!==l.length?u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){(Array.isArray(l[c])?l[c]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){t.stop(h,e,i),t.stop(d,r,n),t.stop(p,r,n),null!==g&&t.stop(g,e,i)})),b){var y=u.globals.gridWidth/2,v=u.globals.gridHeight/2;"bubble"!==u.config.chart.type?o.attr({gradientUnits:"userSpaceOnUse",cx:y,cy:v,r:a}):o.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?o.from(0,0).to(0,1):"diagonal"===t?o.from(0,0).to(1,1):"horizontal"===t?o.from(0,1).to(1,1):"diagonal2"===t&&o.from(1,0).to(0,1);return o}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,r=t.maxWidth,i=t.fontSize,n=t.fontFamily,o=this.getTextRects(e,i,n),a=o.width/e.length,s=Math.floor(r/a);return r-1){var s=r.globals.selectedDataPoints[n].indexOf(o);r.globals.selectedDataPoints[n].splice(s,1)}}else{if(!r.config.states.active.allowMultipleDataPointsSelection&&r.globals.selectedDataPoints.length>0){r.globals.selectedDataPoints=[];var l=r.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),c=r.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),u=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),i.getDefaultFilter(t,n)}))};u(l),u(c)}t.node.setAttribute("selected","true"),a="true",void 0===r.globals.selectedDataPoints[n]&&(r.globals.selectedDataPoints[n]=[]),r.globals.selectedDataPoints[n].push(o)}if("true"===a){var h=r.config.states.active.filter;if("none"!==h)i.applyFilter(t,n,h.type);else if("none"!==r.config.states.hover.filter&&!r.globals.isTouchDevice){var f=r.config.states.hover.filter;i.applyFilter(t,n,f.type)}}else"none"!==r.config.states.active.filter.type&&("none"===r.config.states.hover.filter.type||r.globals.isTouchDevice?i.getDefaultFilter(t,n):(f=r.config.states.hover.filter,i.applyFilter(t,n,f.type)));"function"==typeof r.config.chart.events.dataPointSelection&&r.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,r,i){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.w,a=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:r,foreColor:"#fff",opacity:0});i&&a.attr("transform",i),o.globals.dom.Paper.add(a);var s=a.bbox();return n||(s=a.node.getBoundingClientRect()),a.remove(),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(t,e,r){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=r/1.1)){for(var i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=r/1.1)return void(t.textContent=e.substring(0,i)+"...");t.textContent="."}}}],i=[{key:"setAttrs",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}}],r&&kc(e.prototype,r),i&&kc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Pc=Oc;function Cc(t){return Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(t)}function jc(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,r=[];if(0===e.globals.series.length)return r;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,r=[];return e.globals.seriesGroups.forEach((function(i){var n=[];e.config.series.forEach((function(t,r){i.indexOf(e.globals.seriesNames[r])>-1&&n.push(r)}));var o=e.globals.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));r.push(t.getStackedSeriesTotals(o))})),r}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,r=[],i=[],n=[],o=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){n.push(e),i.push(null)})),e.yaxis.forEach((function(t,e){r[e]=[]}));var a=[];e.yaxis.forEach((function(t,i){var s=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,a){if(e.name===t){var l=a;i===a||o?!o||n.indexOf(a)>-1?r[i].push([i,a]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(r[a].push([a,i]),l=i),s=!0,-1!==(l=n.indexOf(l))&&n.splice(l,1)}}))}))}s||a.push(i)})),r=r.map((function(t,e){var r=[];return t.forEach((function(t){i[t[1]]=t[0],r.push(t[1])})),r}));for(var s=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,r){return t===r[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,r=t.slice();return e.config.xaxis.convertedCatToNumeric&&(r=t.map((function(t,r){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),r}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var r=0;if(Array.isArray(t))for(var i=0;it&&r.globals.seriesX[n][a]0){var d=function(t,e){var r=n.config.yaxis[n.globals.seriesYAxisReverseMap[e]],o=t<0?-1:1;return t=Math.abs(t),r.logarithmic&&(t=i.getBaseLog(r.logBase,t)),-o*t/a[e]};if(o.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var a=[],s=[];t.i.forEach((function(r,i){n.config.series[r].group===e&&(a.push(t.series[i]),s.push(r))})),a.length>0&&o.push(i.draw(a,r,s))})),o}}],i=[{key:"checkComboSeries",value:function(t,e){var r=!1,i=0,n=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||i++,void 0!==t.type&&t.type!==e&&n++})),n>0&&(r=!0),{comboBarCount:i,comboCharts:r}}},{key:"extendArrayProps",value:function(t,e,r){var i,n,o,a,s,l;return null!==(i=e)&&void 0!==i&&i.yaxis&&(e=t.extendYAxis(e,r)),null!==(n=e)&&void 0!==n&&n.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(a=o.annotations)&&void 0!==a&&a.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(s=e)&&void 0!==s&&null!==(l=s.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e))),e}}],r&&jc(e.prototype,r),i&&jc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Mc=Ec;function Lc(t){return Lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(t)}function Ic(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=this.w;if("vertical"===t.label.orientation){var i=null!==e?e:0,n=r.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(i,"']"));if(null!==n){var o=n.getBoundingClientRect();n.setAttribute("x",parseFloat(n.getAttribute("x"))-o.height+4);var a="top"===t.label.position?o.width:-o.width;n.setAttribute("y",parseFloat(n.getAttribute("y"))+a);var s=this.annoCtx.graphics.rotateAroundCenter(n),l=s.x,c=s.y;n.setAttribute("transform","rotate(-90 ".concat(l," ").concat(c,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var r=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var i=r.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),n=t.getBoundingClientRect(),o=e.label.style.padding,a=o.left,s=o.right,l=o.top,c=o.bottom;if("vertical"===e.label.orientation){var u=[a,s,l,c];l=u[0],c=u[1],a=u[2],s=u[3]}var h=n.left-i.left-a,f=n.top-i.top-l,d=this.annoCtx.graphics.drawRect(h-r.globals.barPadForNumericAxis,f,n.width+a+s,n.height+l+c,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&d.node.classList.add(e.id),d}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,r=function(r,i,n){var o=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(i,"']"));if(o){var a=o.parentNode,s=t.addBackgroundToAnno(o,r);s&&(a.insertBefore(s.node,o),r.label.mouseEnter&&s.node.addEventListener("mouseenter",r.label.mouseEnter.bind(t,r)),r.label.mouseLeave&&s.node.addEventListener("mouseleave",r.label.mouseLeave.bind(t,r)),r.label.click&&s.node.addEventListener("click",r.label.click.bind(t,r)))}};e.config.annotations.xaxis.forEach((function(t,e){return r(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return r(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return r(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var r,i=this.w,n="y1"===t?e.y:e.y2,o=!1;if(this.annoCtx.invertAxis){var a=i.config.xaxis.convertedCatToNumeric?i.globals.categoryLabels:i.globals.labels,s=a.indexOf(n),l=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(s+1,")"));r=l?parseFloat(l.getAttribute("y")):(i.globals.gridHeight/a.length-1)*(s+1)-i.globals.barHeight,void 0!==e.seriesIndex&&i.globals.barHeight&&(r-=i.globals.barHeight/2*(i.globals.series.length-1)-i.globals.barHeight*e.seriesIndex)}else{var c,u=i.globals.seriesYAxisMap[e.yAxisIndex][0],h=i.config.yaxis[e.yAxisIndex].logarithmic?new Mc(this.annoCtx.ctx).getLogVal(i.config.yaxis[e.yAxisIndex].logBase,n,u)/i.globals.yLogRatio[u]:(n-i.globals.minYArr[u])/(i.globals.yRange[u]/i.globals.gridHeight);r=i.globals.gridHeight-Math.min(Math.max(h,0),i.globals.gridHeight),o=h>i.globals.gridHeight||h<0,!e.marker||void 0!==e.y&&null!==e.y||(r=0),null!==(c=i.config.yaxis[e.yAxisIndex])&&void 0!==c&&c.reversed&&(r=h)}return"string"==typeof n&&n.includes("px")&&(r=parseFloat(n)),{yP:r,clipped:o}}},{key:"getX1X2",value:function(t,e){var r=this.w,i="x1"===t?e.x:e.x2,n=this.annoCtx.invertAxis?r.globals.minY:r.globals.minX,o=this.annoCtx.invertAxis?r.globals.maxY:r.globals.maxX,a=this.annoCtx.invertAxis?r.globals.yRange[0]:r.globals.xRange,s=!1,l=this.annoCtx.inversedReversedAxis?(o-i)/(a/r.globals.gridWidth):(i-n)/(a/r.globals.gridWidth);return"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||r.globals.dataFormatXNumeric||r.config.chart.sparkline.enabled||(l=this.getStringX(i)),"string"==typeof i&&i.includes("px")&&(l=parseFloat(i)),null==i&&e.marker&&(l=r.globals.gridWidth),void 0!==e.seriesIndex&&r.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=r.globals.barWidth/2*(r.globals.series.length-1)-r.globals.barWidth*e.seriesIndex),l>r.globals.gridWidth?(l=r.globals.gridWidth,s=!0):l<0&&(l=0,s=!0),{x:l,clipped:s}}},{key:"getStringX",value:function(t){var e=this.w,r=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var i=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),n=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(i+1,")"));return n&&(r=parseFloat(n.getAttribute("x"))),r}}],r&&Ic(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zc(t){return zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zc(t)}function Xc(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r12?f-12:0===f?12:f;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+l(d))).replace(/(^|[^\\])h/g,"$1"+d);var p=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var g=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(g))).replace(/(^|[^\\])s/g,"$1"+g);var b=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var y=f<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+y)).replace(/(^|[^\\])T/g,"$1"+y.charAt(0));var v=y.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var m=-t.getTimezoneOffset(),x=i||!m?"Z":m>0?"+":"-";if(!i){var w=(m=Math.abs(m))%60;x+=l(Math.floor(m/60))+":"+l(w)}e=e.replace(/(^|[^\\])K/g,"$1"+x);var S=(i?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(a[0],"g"),a[S])).replace(new RegExp(s[0],"g"),s[S])).replace(new RegExp(n[0],"g"),n[u])).replace(new RegExp(o[0],"g"),o[u])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,r){var i=this.w;void 0!==i.config.xaxis.min&&(t=i.config.xaxis.min),void 0!==i.config.xaxis.max&&(e=i.config.xaxis.max);var n=this.getDate(t),o=this.getDate(e),a=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(s[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,r){return this.determineDaysOfMonths(t,e)-r}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,r){var i=this.daysCntOfYear[e]+r;return e>1&&this.isLeapYear()&&i++,i}},{key:"determineDaysOfMonths",value:function(t,e){var r=30;switch(t=f.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(r=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:r=31}return r}}],r&&Nc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Vc=Gc;function Uc(t){return Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uc(t)}function qc(t,e){for(var r=0;r0&&r<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(r,i){void 0!==r.labels.formatter?e.globals.yLabelFormatters[i]=r.labels.formatter:e.globals.yLabelFormatters[i]=function(n){return e.globals.xyCharts?Array.isArray(n)?n.map((function(e){return t.defaultYFormatter(e,r,i)})):t.defaultYFormatter(n,r,i):n}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}],r&&qc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Jc=$c;function Qc(t){return Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(t)}function Kc(t,e){for(var r=0;r4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],c=this.w,u=void 0===t[i]?"":t[i],h=u,f=c.globals.xLabelFormatter,d=c.config.xaxis.labels.formatter,p=!1,g=new Jc(this.ctx),b=u;l&&(h=g.xLabelFormat(f,u,b,{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}),void 0!==d&&(h=d(u,t[i],{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}))),e.length>0?(n=e[i].unit,o=null,e.forEach((function(t){"month"===t.unit?o="year":"day"===t.unit?o="month":"hour"===t.unit?o="day":"minute"===t.unit&&(o="hour")})),p=o===n,r=e[i].position,h=e[i].value):"datetime"===c.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var y,v=new Pc(this.ctx);y=c.globals.rotateXLabels&&l?v.getTextRects(h,parseInt(s,10),null,"rotate(".concat(c.config.xaxis.labels.rotate," 0 0)"),!1):v.getTextRects(h,parseInt(s,10));var m=!c.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||a.indexOf(h)>=0&&m)&&(h=""),{x:r,text:h,textRect:y,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,r){var i=this.w,n=i.config.xaxis.tickAmount;return"dataPoints"===n&&(n=Math.round(i.globals.gridWidth/120)),n>r||t%Math.round(r/(n+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,r,i,n){var o=this.w;if(0===t&&o.globals.skipFirstTimelinelabel&&(e.text=""),t===r-1&&o.globals.skipLastTimelinelabel&&(e.text=""),o.config.xaxis.labels.hideOverlappingLabels&&i.length>0){var a=n[n.length-1];e.xi.length||i.some((function(t){return Array.isArray(t.seriesName)}))?t:r.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,r=e.config.yaxis[t];if(!r.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!r.showForNullSeries){var i=e.globals.seriesYAxisMap[t],n=new Mc(this.ctx);return i.every((function(t){return n.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var r=this.w;return Array.isArray(t)&&r.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,r.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,r,i,n,o,a){var s=this.w,l=new Pc(this.ctx),c=s.globals.translateY+s.config.yaxis[n].labels.offsetY;if(s.globals.isBarHorizontal?c=0:"heatmap"===s.config.chart.type&&(c+=o/2),i.show&&e>0){!0===s.config.yaxis[n].opposite&&(t+=i.width);for(var u=e;u>=0;u--){var h=l.drawLine(t+r.offsetX-i.width+i.offsetX,c+i.offsetY,t+r.offsetX+i.offsetX,c+i.offsetY,i.color);a.add(h),c+=o}}}}],r&&Kc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ru(t){return ru="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(t)}function iu(t,e){for(var r=0;rs){var d=s;s=i,i=d}if(!l||!c){u=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,i+t.offsetY,this._getYAxisAnnotationWidth(t),s-i,0,t.fillColor,t.opacity,1,t.borderColor,o);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(u){var g="right"===t.label.position?n.globals.gridWidth:"center"===t.label.position?n.globals.gridWidth/2:0,b=this.annoCtx.graphics.drawText({x:g+t.label.offsetX,y:(null!=i?i:s)+t.label.offsetY-3,text:h,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});b.attr({rel:r}),e.appendChild(b.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,i){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,r.node,i)})),r}}])&&iu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function au(t){return au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(t)}function su(t,e){for(var r=0;r-1)){var i=this.helpers.getX1X2("x1",t),n=i.x,o=i.clipped,a=(i=this.helpers.getY1Y2("y1",t)).yP,s=i.clipped;if(f.isNumber(n)&&!s&&!o){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},c=this.annoCtx.graphics.drawMarker(n+t.marker.offsetX,a+t.marker.offsetY,l);e.appendChild(c.node);var u=t.label.text?t.label.text:"",h=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:a+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:u,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(h.attr({rel:r}),e.appendChild(h.node),t.customSVG.SVG){var d=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});d.attr({transform:"translate(".concat(n+t.customSVG.offsetX,", ").concat(a+t.customSVG.offsetY,")")}),d.node.innerHTML=t.customSVG.SVG,e.appendChild(d.node)}if(t.image.path){var p=t.image.width?t.image.width:20,g=t.image.height?t.image.height:20;c=this.annoCtx.addImage({x:n+t.image.offsetX-p/2,y:a+t.image.offsetY-g/2,width:p,height:g,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&c.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&c.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&c.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,i){t.addPointAnnotation(e,r.node,i)})),r}}],r&&su(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const uu=JSON.parse('{"name":"en","options":{"months":["January","February","March","April","May","June","July","August","September","October","November","December"],"shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"days":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"shortDays":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"toolbar":{"exportToSVG":"Download SVG","exportToPNG":"Download PNG","exportToCSV":"Download CSV","menu":"Menu","selection":"Selection","selectionZoom":"Selection Zoom","zoomIn":"Zoom In","zoomOut":"Zoom Out","pan":"Panning","reset":"Reset Zoom"}}}');function hu(t){return hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(t)}function fu(t,e){for(var r=0;r1&&a[s].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:a[s],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,r){t.addImage(e,r)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,r){t.addText(e,r)}))}},{key:"addXaxisAnnotation",value:function(t,e,r){this.xAxisAnnotations.addXaxisAnnotation(t,e,r)}},{key:"addYaxisAnnotation",value:function(t,e,r){this.yAxisAnnotations.addYaxisAnnotation(t,e,r)}},{key:"addPointAnnotation",value:function(t,e,r){this.pointsAnnotations.addPointAnnotation(t,e,r)}},{key:"addText",value:function(t,e){var r=t.x,i=t.y,n=t.text,o=t.textAnchor,a=t.foreColor,s=t.fontSize,l=t.fontFamily,c=t.fontWeight,u=t.cssClass,h=t.backgroundColor,f=t.borderWidth,d=t.strokeDashArray,p=t.borderRadius,g=t.borderColor,b=t.appendTo,y=void 0===b?".apexcharts-svg":b,v=t.paddingLeft,m=void 0===v?4:v,x=t.paddingRight,w=void 0===x?4:x,S=t.paddingBottom,k=void 0===S?2:S,A=t.paddingTop,O=void 0===A?2:A,P=this.w,C=this.graphics.drawText({x:r,y:i,text:n,textAnchor:o||"start",fontSize:s||"12px",fontWeight:c||"regular",fontFamily:l||P.config.chart.fontFamily,foreColor:a||P.config.chart.foreColor,cssClass:u}),j=P.globals.dom.baseEl.querySelector(y);j&&j.appendChild(C.node);var T=C.bbox();if(n){var E=this.graphics.drawRect(T.x-m,T.y-O,T.width+m+w,T.height+k+O,p,h||"transparent",1,f,g,d);j.insertBefore(E.node,C.node)}}},{key:"addImage",value:function(t,e){var r=this.w,i=t.path,n=t.x,o=void 0===n?0:n,a=t.y,s=void 0===a?0:a,l=t.width,c=void 0===l?20:l,u=t.height,h=void 0===u?20:u,f=t.appendTo,d=void 0===f?".apexcharts-svg":f,p=r.globals.dom.Paper.image(i);p.size(c,h).move(o,s);var g=r.globals.dom.baseEl.querySelector(d);return g&&g.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"xaxis",contextMethod:r.addXaxisAnnotation}),r}},{key:"addYaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"yaxis",contextMethod:r.addYaxisAnnotation}),r}},{key:"addPointAnnotationExternal",value:function(t,e,r){return void 0===this.invertAxis&&(this.invertAxis=r.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"point",contextMethod:r.addPointAnnotation}),r}},{key:"addAnnotationExternal",value:function(t){var e=t.params,r=t.pushToMemory,i=t.context,n=t.type,o=t.contextMethod,a=i,s=a.w,l=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations")),c=l.childNodes.length+1,u=new pu,h=Object.assign({},"xaxis"===n?u.xAxisAnnotation:"yaxis"===n?u.yAxisAnnotation:u.pointAnnotation),d=f.extend(h,e);switch(n){case"xaxis":this.addXaxisAnnotation(d,l,c);break;case"yaxis":this.addYaxisAnnotation(d,l,c);break;case"point":this.addPointAnnotation(d,l,c)}var p=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(c,"']")),g=this.helpers.addBackgroundToAnno(p,d);return g&&l.insertBefore(g.node,p),r&&s.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:f.randomId(),method:o,label:"addAnnotation",params:e}),i}},{key:"clearAnnotations",value:function(t){for(var e=t.w,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),i=e.globals.memory.methodsToExec.length-1;i>=0;i--)"addText"!==e.globals.memory.methodsToExec[i].label&&"addAnnotation"!==e.globals.memory.methodsToExec[i].label||e.globals.memory.methodsToExec.splice(i,1);r=f.listToArray(r),Array.prototype.forEach.call(r,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var r=t.w,i=r.globals.dom.baseEl.querySelectorAll(".".concat(e));i&&(r.globals.memory.methodsToExec.map((function(t,i){t.id===e&&r.globals.memory.methodsToExec.splice(i,1)})),Array.prototype.forEach.call(i,(function(t){t.parentElement.removeChild(t)})))}}],r&&bu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function mu(t){return mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mu(t)}function xu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wu(t){for(var e=1;e\n '.concat(n,'\n - \n ').concat(o,"\n ");return'"},Cu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opts=e}var e,r;return e=t,(r=[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.hideYAxis(),f.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var r=e.w.config.series[e.seriesIndex].name;return null!==t?r+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),wu(wu({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var r=e.seriesIndex,i=e.dataPointIndex,n=e.w,o=function(){var t=n.globals.seriesRangeStart[r][i];return n.globals.seriesRangeEnd[r][i]-t};return n.globals.comboCharts?"rangeBar"===n.config.series[r].type||"rangeArea"===n.config.series[r].type?o():t:o()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Ou(wu(wu({},t),{},{isTimeline:!0})),r=e.color,i=e.seriesName,n=e.ylabel,o=e.startVal,a=e.endVal;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t):function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,r;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(r=t.plotOptions.bar)&&void 0!==r&&r.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}}}}},{key:"brush",value:function(t){return f.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,r){t.yaxis[r].min=0,t.yaxis[r].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return wu(wu({},t),{},{plotOptions:wu(wu({},t.plotOptions),{},{bar:wu(wu({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,r){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return f.isNumber(t)?Math.floor(t):t};var i=t.xaxis.labels.formatter,n=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return r&&r.length&&(n=r.map((function(t){return Array.isArray(t)?t:String(t)}))),n&&n.length&&(t.xaxis.labels.formatter=function(t){return f.isNumber(t)?i(n[Math.floor(t)-1]):i(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,r,i,n){var o=t.globals.seriesCandleO[e][r],a=t.globals.seriesCandleH[e][r],s=t.globals.seriesCandleM[e][r],l=t.globals.seriesCandleL[e][r],c=t.globals.seriesCandleC[e][r];return t.config.series[e].type&&t.config.series[e].type!==n?'\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][r],"\n
"):'"}}])&&ku(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ju(t){return ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ju(t)}function Tu(t,e){for(var r=0;r1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new pu;return t.annotations.yaxis=f.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new pu;return t.annotations.xaxis=f.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new pu;return t.annotations.points=f.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}],r&&Tu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lu(t){return Lu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(t)}function Iu(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);rn?i:n,a=t.image,s=0,l=0;void 0===t.width&&void 0===t.height?void 0!==r.fill.image.width&&void 0!==r.fill.image.height?(s=r.fill.image.width+1,l=r.fill.image.height):(s=o+1,l=o):(s=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");Pc.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:s+"px",height:l+"px"});var u=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(u),u.setAttributeNS(window.SVG.xlink,"href",a),Pc.setAttrs(u,{x:0,y:0,preserveAspectRatio:"none",width:s+"px",height:l+"px"}),u.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w,r=e.config.chart.type;return("bar"===r||"rangeBar"===r)&&e.config.plotOptions.bar.distributed||"heatmap"===r||"treemap"===r?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var r,i=this.w,n=null,o=null,a=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Wu(t))){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;s>=e.threshold?(null===n||s>n)&&(n=s):(null===o||s-1?b=f.getOpacityFromRGBA(u):v=f.hexToRgba(f.rgb2hex(u),b),t.opacity&&(b=t.opacity),"pattern"===g&&(a=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:a,fillColor:u,fillOpacity:b,defaultColor:v})),y){var m=function(t){return function(t){if(Array.isArray(t))return Gu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Wu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(l.fill.gradient.colorStops)||[],x=l.fill.gradient.type;c&&(m[this.seriesIndex]=this.computeColorStops(n.globals.series[this.seriesIndex],l.plotOptions.line.colors),x="vertical"),s=this.handleGradientFill({type:x,fillConfig:t.fillConfig,fillColor:u,fillOpacity:b,colorStops:m,i:this.seriesIndex})}if("image"===g){var w=l.fill.image.src,S=t.patternID?t.patternID:"",k="pattern".concat(n.globals.cuid).concat(t.seriesNumber+1).concat(S);-1===this.patternIDs.indexOf(k)&&(this.clippedImgArea({opacity:b,image:Array.isArray(w)?t.seriesNumber-1&&(p=f.getOpacityFromRGBA(d));var g=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[a]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)h="dark"===s.gradient.shade?u.shadeColor(-1*parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r):u.shadeColor(parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r);else if(s.gradient.gradientToColors[l.seriesNumber]){var b=s.gradient.gradientToColors[l.seriesNumber];h=b,b.indexOf("rgba")>-1&&(g=f.getOpacityFromRGBA(b))}else h=r;if(s.gradient.gradientFrom&&(d=s.gradient.gradientFrom),s.gradient.gradientTo&&(h=s.gradient.gradientTo),s.gradient.inverseColors){var y=d;d=h,h=y}return d.indexOf("rgb")>-1&&(d=f.rgb2hex(d)),h.indexOf("rgb")>-1&&(h=f.rgb2hex(h)),c.drawGradient(e,d,h,p,g,l.size,s.gradient.stops,o,a)}}],r&&Vu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Zu=qu;function $u(t){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(t)}function Ju(t,e){for(var r=0;r0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],o=this.w,a=e,s=t,l=null,c=new Pc(this.ctx),u=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(s.x))for(var h=0;h0:o.config.markers.size>0)||n||u){g||(b+=" w".concat(f.randomId()));var y=this.getMarkerConfig({cssClass:b,seriesIndex:e,dataPointIndex:p});o.config.series[a].data[p]&&(o.config.series[a].data[p].fillColor&&(y.pointFillColor=o.config.series[a].data[p].fillColor),o.config.series[a].data[p].strokeColor&&(y.pointStrokeColor=o.config.series[a].data[p].strokeColor)),void 0!==i&&(y.pSize=i),(s.x[h]<-o.globals.markers.largestSize||s.x[h]>o.globals.gridWidth+o.globals.markers.largestSize||s.y[h]<-o.globals.markers.largestSize||s.y[h]>o.globals.gridHeight+o.globals.markers.largestSize)&&(y.pSize=0),g||((o.globals.markers.size[e]>0||n||u)&&!l&&(l=c.group({class:n||u?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(o.globals.cuid,")")),(d=c.drawMarker(s.x[h],s.y[h],y)).attr("rel",p),d.attr("j",p),d.attr("index",e),d.node.setAttribute("default-marker-size",y.pSize),new vc(this.ctx).setSelectionFilter(d,e,p),this.addEvents(d),l&&l.add(d))}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([s.x[h],s.y[h]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,r=t.seriesIndex,i=t.dataPointIndex,n=void 0===i?null:i,o=t.radius,a=void 0===o?null:o,s=t.size,l=void 0===s?null:s,c=t.strokeWidth,u=void 0===c?null:c,h=this.w,f=this.getMarkerStyle(r),d=null===l?h.globals.markers.size[r]:l,p=h.config.markers;return null!==n&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===r&&t.dataPointIndex===n&&(f.pointStrokeColor=t.strokeColor,f.pointFillColor=t.fillColor,d=t.size,f.pointShape=t.shape)})),{pSize:null===a?d:a,pRadius:null!==a?a:p.radius,pointStrokeWidth:null!==u?u:Array.isArray(p.strokeWidth)?p.strokeWidth[r]:p.strokeWidth,pointStrokeColor:f.pointStrokeColor,pointFillColor:f.pointFillColor,shape:f.pointShape||(Array.isArray(p.shape)?p.shape[r]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[r]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[r]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[r]:p.fillOpacity,seriesIndex:r}}},{key:"addEvents",value:function(t){var e=this.w,r=new Pc(this.ctx);t.node.addEventListener("mouseenter",r.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",r.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",r.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",r.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,r=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[t]:i,pointFillColor:Array.isArray(r)?r[t]:r}}}],r&&Ju(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function th(t){return th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},th(t)}function eh(t,e){for(var r=0;rp.maxBubbleRadius&&(d=p.maxBubbleRadius)}var g=a.x[u],b=a.y[u];if(d=d||0,null!==b&&void 0!==i.globals.series[o][h]||(f=!1),f){var y=this.drawPoint(g,b,d,o,h,e);c.add(y)}l.add(c)}}},{key:"drawPoint",value:function(t,e,r,i,n,o){var a=this.w,s=i,l=new b(this.ctx),c=new vc(this.ctx),u=new Zu(this.ctx),h=new Ku(this.ctx),f=new Pc(this.ctx),d=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:s,dataPointIndex:n,radius:"bubble"===a.config.chart.type||a.globals.comboCharts&&a.config.series[i]&&"bubble"===a.config.series[i].type?r:null}),p=u.fillPath({seriesNumber:i,dataPointIndex:n,color:d.pointFillColor,patternUnits:"objectBoundingBox",value:a.globals.series[i][o]}),g=f.drawMarker(t,e,d);if(a.config.series[s].data[n]&&a.config.series[s].data[n].fillColor&&(p=a.config.series[s].data[n].fillColor),g.attr({fill:p}),a.config.chart.dropShadow.enabled){var y=a.config.chart.dropShadow;c.dropShadow(g,y,i)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var v=a.config.chart.animations.speed;l.animateMarker(g,v,a.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(g)}),100)}))}return g.attr({rel:n,j:n,index:i,"default-marker-size":d.pSize}),c.setSelectionFilter(g,i,n),h.addEvents(g),g.node.classList.add("apexcharts-marker"),g}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}],r&&eh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nh(t){return nh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nh(t)}function oh(t,e){for(var r=0;rs.globals.gridHeight+h&&(e=s.globals.gridHeight+h/2),void 0===s.globals.dataLabelsRects[i]&&(s.globals.dataLabelsRects[i]=[]),s.globals.dataLabelsRects[i].push({x:t,y:e,width:u,height:h});var f=s.globals.dataLabelsRects[i].length-2,d=void 0!==s.globals.lastDrawnDataLabelsIndexes[i]?s.globals.lastDrawnDataLabelsIndexes[i][s.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(void 0!==s.globals.dataLabelsRects[i][f]){var p=s.globals.dataLabelsRects[i][d];(t>p.x+p.width||e>p.y+p.height||e+he.globals.gridWidth+y.textRects.width+30)&&(s="");var v=e.globals.dataLabels.style.colors[o];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(v=e.globals.dataLabels.style.colors[a]),"function"==typeof v&&(v=v({series:e.globals.series,seriesIndex:o,dataPointIndex:a,w:e})),f&&(v=f);var m=h.offsetX,x=h.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(m=0,x=0),e.globals.isSlopeChart&&(0!==a&&(m=-2*h.offsetX+5),0!==a&&a!==e.config.series[o].data.length-1&&(m=0)),y.drawnextLabel){if((b=r.drawText({width:100,height:parseInt(h.style.fontSize,10),x:i+m,y:n+x,foreColor:v,textAnchor:l||h.textAnchor,text:s,fontSize:c||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"})).attr({class:g||"apexcharts-datalabel",cx:i,cy:n}),h.dropShadow.enabled){var w=h.dropShadow;new vc(this.ctx).dropShadow(b,w)}u.add(b),void 0===e.globals.lastDrawnDataLabelsIndexes[o]&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(a)}return b}},{key:"addBackgroundToDataLabel",value:function(t,e){var r=this.w,i=r.config.dataLabels.background,n=i.padding,o=i.padding/2,a=e.width,s=e.height,l=new Pc(this.ctx).drawRect(e.x-n,e.y-o/2,a+2*n,s+o,i.borderRadius,"transparent"!==r.config.chart.background&&r.config.chart.background?r.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new vc(this.ctx).dropShadow(l,i.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),r=0;r0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w,n=f.clone(i.globals.initialSeries);i.globals.previousPaths=[],r?(i.globals.collapsedSeries=[],i.globals.ancillaryCollapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeriesIndices=[]):n=this.emptyCollapsedSeries(n),i.config.series=n,t&&(e&&(i.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(n,i.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,r=0;r-1&&(t[r].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,r=this.getSeriesByName(t),i=parseInt(null==r?void 0:r.getAttribute("data:realIndex"),10),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),o=null,a=null,s=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){o=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(i,"']")),a=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(i,"']"));var l=e.globals.seriesYAxisReverseMap[i];s=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"']"));else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"'] path"));for(var c=0;c=t.from&&(o0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this.w,i=0;if(r.config.series.length>1)for(var n=r.config.series.map((function(t,i){return t.data&&t.data.length>0&&-1===r.globals.collapsedSeriesIndices.indexOf(i)&&(!r.globals.comboCharts||0===e.length||e.length&&e.indexOf(r.config.series[i].type)>-1)?i:-1})),o="asc"===t?0:n.length-1;"asc"===t?o=0;"asc"===t?o++:o--)if(-1!==n[o]){i=n[o];break}return i}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,r,i){for(var n=e[r].childNodes,o={type:i,paths:[],realIndex:e[r].getAttribute("data:realIndex")},a=0;a0)for(var i=function(e){for(var r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),i=[],n=function(t){var e=function(e){return r[t].getAttribute(e)},n={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};i.push({rect:n,color:r[t].getAttribute("color")})},o=0;o0?t:[]}))}}],r&&uh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function dh(t){return dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(t)}function ph(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new fh(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var r=this.w.config,i=this.w.globals,n="boxPlot"===r.chart.type||"boxPlot"===r.series[e].type,o=0;o=5?this.twoDSeries.push(f.parseNumber(t[e].data[o][4])):this.twoDSeries.push(f.parseNumber(t[e].data[o][1])),i.dataFormatXNumeric=!0),"datetime"===r.xaxis.type){var a=new Date(t[e].data[o][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(t[e].data[o][0]);for(var s=0;s-1&&(o=this.activeSeriesIndex);for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:this.ctx,i=this.w.config,n=this.w.globals,o=new Vc(r),a=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();n.isRangeBar="rangeBar"===i.chart.type&&n.isBarHorizontal,n.hasXaxisGroups="category"===i.xaxis.type&&i.xaxis.group.groups.length>0,n.hasXaxisGroups&&(n.groups=i.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?n.seriesNames.push(t.name):n.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var s=[],l=function(t){return function(t){if(Array.isArray(t))return ph(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ph(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ph(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(new Set(i.series.map((function(t){return t.group}))));i.series.forEach((function(t,e){var r=l.indexOf(t.group);s[r]||(s[r]=[]),s[r].push(n.seriesNames[e])})),n.seriesGroups=s;for(var c=function(){for(var t=0;t0&&(this.twoDSeriesX=a,n.seriesX.push(this.twoDSeriesX))),n.labels.push(this.twoDSeriesX);var h=t[u].data.map((function(t){return f.parseNumber(t)}));n.series.push(h)}n.seriesZ.push(this.threeDSeries),void 0!==t[u].color?n.seriesColors.push(t[u].color):n.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,r=this.w.config;e.series=t.slice(),e.seriesNames=r.labels.slice();for(var i=0;i0?r.labels=e.xaxis.categories:e.labels.length>0?r.labels=e.labels.slice():this.fallbackToCategory?(r.labels=r.labels[0],r.seriesRange.length&&(r.seriesRange.map((function(t){t.forEach((function(t){r.labels.indexOf(t.x)<0&&t.x&&r.labels.push(t.x)}))})),r.labels=Array.from(new Set(r.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric&&(new Cu(e).convertCatToNumericXaxis(e,this.ctx,r.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,r=this.w.config,i=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var n=r.series.map((function(t,e){return t.data.filter((function(t,e,r){return r.findIndex((function(e){return e.x===t.x}))===e}))})),o=n.reduce((function(t,e,r,i){return i[t].length>e.length?t:r}),0),a=0;a0&&n==r.length&&e.push(i)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}],r&&gh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vh(t){return vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vh(t)}function mh(t){return function(t){if(Array.isArray(t))return xh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return xh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=10?new Date(t).toDateString():f.isNumber(t)?t:t.split(o).join("")},y=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},v=Math.max.apply(Math,mh(r.map((function(t){return t.data?t.data.length:0})))),m=new yh(this.ctx),x=new eu(this.ctx),w=function(t){var r="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var i=l.globals.yLabelFormatters[0],n=new fh(e.ctx).getActiveConfigSeriesIndex();r=i(l.globals.labels[t],{seriesIndex:n,dataPointIndex:t,w:l})}else r=x.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?r=l.config.xaxis.categories[t]:l.config.labels.length&&(r=l.config.labels[t]))}else r=l.config.labels[t];return null===r?"nullvalue":(Array.isArray(r)&&(r=r.join(" ")),f.isNumber(r)?r:r.split(o).join(""))};h.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(h.push("minimum"),h.push("q1"),h.push("median"),h.push("q3"),h.push("maximum")):"candlestick"===l.config.chart.type?(h.push("open"),h.push("high"),h.push("low"),h.push("close")):"rangeBar"===l.config.chart.type?(h.push("minimum"),h.push("maximum")):r.map((function(t,e){var r=(t.name?t.name:"series-".concat(e))+"";l.globals.axisCharts&&h.push(r.split(o).join("")?r.split(o).join(""):"series-".concat(e))})),l.globals.axisCharts||(h.push(l.config.chart.toolbar.export.csv.headerValue),d.push(h.join(o))),l.globals.allSeriesHasEqualX||!l.globals.axisCharts||l.config.xaxis.categories.length||l.config.labels.length?r.map((function(t,e){l.globals.axisCharts?function(t,e){if(h.length&&0===e&&d.push(h.join(o)),t.data){t.data=t.data.length&&t.data||mh(Array(v)).map((function(){return""}));for(var i=0;i0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}var e,r;return e=t,r=[{key:"drawXaxis",value:function(){var t=this.w,e=new Pc(this.ctx),r=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});r.add(i);for(var n=[],o=0;o6&&void 0!==arguments[6]?arguments[6]:{},c=[],u=[],h=this.w,f=l.xaxisFontSize||this.xaxisFontSize,d=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||h.config.xaxis.labels.style.fontWeight,b=l.cssClass||h.config.xaxis.labels.style.cssClass,y=h.globals.padHorizontal,v=i.length,m="category"===h.config.xaxis.type?h.globals.dataPoints:v;if(0===m&&v>m&&(m=v),n){var x=Math.max(Number(h.config.xaxis.tickAmount)||1,m>1?m-1:m);a=h.globals.gridWidth/Math.min(x,v-1),y=y+o(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/m,y=y+o(0,a)+h.config.xaxis.labels.offsetX;for(var w=function(n){var l=y-o(n,a)/2+h.config.xaxis.labels.offsetX;0===n&&1===v&&a/2===y&&1===m&&(l=h.globals.gridWidth/2);var x=s.axesUtils.getLabel(i,h.globals.timescaleLabels,l,n,c,f,t),w=28;if(h.globals.rotateXLabels&&t&&(w=22),h.config.xaxis.title.text&&"top"===h.config.xaxis.position&&(w+=parseFloat(h.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(f)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),x=void 0!==h.config.xaxis.tickAmount&&"dataPoints"!==h.config.xaxis.tickAmount&&"datetime"!==h.config.xaxis.type?s.axesUtils.checkLabelBasedOnTickamount(n,x,v):s.axesUtils.checkForOverflowingLabels(n,x,v,c,u),h.config.xaxis.labels.show){var S=e.drawText({x:x.x,y:s.offY+h.config.xaxis.labels.offsetY+w-("top"===h.config.xaxis.position?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:x.text,textAnchor:"middle",fontWeight:x.isBold?600:g,fontSize:f,fontFamily:d,foreColor:Array.isArray(p)?t&&h.config.xaxis.convertedCatToNumeric?p[h.globals.minX+n-1]:p[n]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(r.add(S),S.on("click",(function(t){if("function"==typeof h.config.chart.events.xAxisLabelClick){var e=Object.assign({},h,{labelIndex:n});h.config.chart.events.xAxisLabelClick(t,s.ctx,e)}})),t){var k=document.createElementNS(h.globals.SVGNS,"title");k.textContent=Array.isArray(x.text)?x.text.join(" "):x.text,S.node.appendChild(k),""!==x.text&&(c.push(x.text),u.push(x))}}ni.globals.gridWidth)){var o=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+o+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var a=new Pc(this.ctx).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,n+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);r.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],r=this.xaxisLabels.length,i=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var n=0;n0){var c=n[n.length-1].getBBox(),u=n[0].getBBox();c.x<-20&&n[n.length-1].parentNode.removeChild(n[n.length-1]),u.x+u.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&n[0].parentNode.removeChild(n[0]);for(var h=0;ht.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(this.xaxisLabels=r.globals.timescaleLabels.slice())}var e,r;return e=t,r=[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,r=new Pc(this.ctx);t||(t=r.group({class:"apexcharts-grid"}));var i=r.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),n=r.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(n),t.add(i),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,r=new Pc(this.ctx),i=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Eh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Eh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Eh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.config.stroke.width)):t.config.stroke.width,n=function(t){var r=document.createElementNS(e.SVGNS,"clipPath");return r.setAttribute("id",t),r};e.dom.elGridRectMask=n("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=n("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=n("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=n("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=n("nonForecastMask".concat(e.cuid));var o=0,a=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(o=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),a=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=r.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=r.drawRect(-i/2-o-2,-i/2-2,e.gridWidth+i+a+o+4,e.gridHeight+i+4,0,"#fff");var s=t.globals.markers.largestSize;e.dom.elGridRectMarker=r.drawRect(-s,-s,e.gridWidth+2*s,e.gridHeight+2*s,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,r=t.x1,i=t.y1,n=t.x2,o=t.y2,a=t.xCount,s=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===a-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:r,y1:i,x2:n,y2:o,xCount:a,parent:s});var c=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var u=l.globals.groups;if(u){for(var h=0,f=0;h0&&"datetime"!==t.config.xaxis.type&&(n=e.yAxisScale[i].result.length-1)),this._drawXYLines({xCount:n,tickAmount:l})):(n=l,l=e.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:l})),this.drawGridBands(n,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/n}}},{key:"drawGridBands",value:function(t,e){var r,i,n=this,o=this.w;if((null===(r=o.config.grid.row.colors)||void 0===r?void 0:r.length)>0&&function(t,r,i,a,s,l){for(var c=0,u=0;c=o.config.grid.row.colors.length&&(u=0),n._drawGridBandRect({c:u,x1:0,y1:a,x2:s,y2:l,type:"row"}),a+=o.globals.gridHeight/e}(0,e,0,0,o.globals.gridWidth,o.globals.gridHeight/e),(null===(i=o.config.grid.column.colors)||void 0===i?void 0:i.length)>0){var a=o.globals.isBarHorizontal||"on"!==o.config.xaxis.tickPlacement||"category"!==o.config.xaxis.type&&!o.config.xaxis.convertedCatToNumeric?t:t-1;o.globals.isXNumeric&&(a=o.globals.xAxisScale.result.length-1);for(var s=o.globals.padHorizontal,l=o.globals.padHorizontal+o.globals.gridWidth/a,c=o.globals.gridHeight,u=0,h=0;u=o.config.grid.column.colors.length&&(h=0),"datetime"===o.config.xaxis.type&&(s=this.xaxisLabels[u].position,l=((null===(f=this.xaxisLabels[u+1])||void 0===f?void 0:f.position)||o.globals.gridWidth)-this.xaxisLabels[u].position),this._drawGridBandRect({c:h,x1:s,y1:0,x2:l,y2:c,type:"column"}),s+=o.globals.gridWidth/a}}}}],r&&Mh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const _h=Ih;function Rh(t){return Rh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rh(t)}function zh(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:0,s=1e-11,l=this.w,c=l.globals;c.isBarHorizontal?(r=l.config.xaxis,i=Math.max((c.svgWidth-100)/25,2)):(r=l.config.yaxis[a],i=Math.max((c.svgHeight-100)/15,2)),f.isNumber(i)||(i=10),n=void 0!==r.min&&null!==r.min,o=void 0!==r.max&&null!==r.min;var u=void 0!==r.stepSize&&null!==r.stepSize,h=void 0!==r.tickAmount&&null!==r.tickAmount,d=h?r.tickAmount:c.niceScaleDefaultTicks[Math.min(Math.round(i/2),c.niceScaleDefaultTicks.length-1)];if(c.isMultipleYAxis&&!h&&c.multiAxisTickAmount>0&&(d=c.multiAxisTickAmount,h=!0),d="dataPoints"===d?c.dataPoints-1:Math.abs(Math.round(d)),(t===Number.MIN_VALUE&&0===e||!f.isNumber(t)&&!f.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=f.isNumber(r.min)?r.min:0,e=f.isNumber(r.max)?r.max:t+d,c.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var p=e;e=t,t=p}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var g=[];d<1&&(d=1);var b=d,y=Math.abs(e-t);!n&&t>0&&t/y<.15&&(t=0,n=!0),!o&&e<0&&-e/y<.15&&(e=0,o=!0);var v=(y=Math.abs(e-t))/b,m=v,x=Math.floor(Math.log10(m)),w=Math.pow(10,x),S=Math.ceil(m/w);if(v=m=(S=c.niceScaleAllowedMagMsd[0===c.yValueDecimal?0:1][S])*w,c.isBarHorizontal&&r.stepSize&&"datetime"!==r.type?(v=r.stepSize,u=!0):u&&(v=r.stepSize),u&&r.forceNiceScale){var k=Math.floor(Math.log10(v));v*=Math.pow(10,x-k)}if(n&&o){var A=y/b;if(h)if(u)if(0!=f.mod(y,v)){var O=f.getGCD(v,A);v=A/O<10?O:A}else 0==f.mod(v,A)?v=A:(A=v,h=!1);else v=A;else if(u)0==f.mod(y,v)?A=v:v=A;else if(0==f.mod(y,v))A=v;else{A=y/(b=Math.ceil(y/v));var P=f.getGCD(y,v);y/Pi&&(t=e-v*d,t+=v*Math.floor((C-t)/v))}else if(n)if(h)e=t+v*b;else{var j=e;e=v*Math.ceil(e/v),Math.abs(e-t)/f.getGCD(y,v)>i&&(e=t+v*d,e+=v*Math.ceil((j-e)/v))}}else if(c.isMultipleYAxis&&h){var T=v*Math.floor(t/v),E=T+v*b;E0&&t16&&f.getPrimeFactors(b).length<2&&b++,!h&&r.forceNiceScale&&0===c.yValueDecimal&&b>y&&(b=y,v=Math.round(y/b)),b>i&&(!h&&!u||r.forceNiceScale)){var M=f.getPrimeFactors(b),L=M.length-1,I=b;t:for(var _=0;_F);return{result:g,niceMin:g[0],niceMax:g[g.length-1]}}},{key:"linearScale",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=Math.abs(e-t),a=[];if(t===e)return{result:a=[t],niceMin:a[0],niceMax:a[a.length-1]};"dataPoints"===(r=this._adjustTicksForSmallRange(r,i,o))&&(r=this.w.globals.dataPoints-1),n||(n=o/r),n=Math.round(10*(n+Number.EPSILON))/10,r===Number.MAX_VALUE&&(r=5,n=1);for(var s=t;r>=0;)a.push(s),s=f.preciseAddition(s,n),r-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,r){e<=0&&(e=Math.max(t,r)),t<=0&&(t=Math.min(e,r));for(var i=[],n=Math.ceil(Math.log(e)/Math.log(r)+1),o=Math.floor(Math.log(t)/Math.log(r));o5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=o.forceNiceScale?this.logarithmicScaleNice(e,r,o.logBase):this.logarithmicScale(e,r,o.logBase)):r!==-Number.MAX_VALUE&&f.isNumber(r)&&e!==Number.MAX_VALUE&&f.isNumber(e)?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,r,t)):i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var r=this.w,i=r.globals,n=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&f.isNumber(e)){var o=i.xTickAmount;n<10&&n>1&&(o=n),i.xAxisScale=this.linearScale(t,e,o,0,r.config.xaxis.stepSize)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,r=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var i=r.seriesYAxisMap,n=r.minYArr,o=r.maxYArr;r.allSeriesCollapsed=!0,r.barGroups=[],i.forEach((function(i,a){var s=[];i.forEach((function(t){var r=e.series[t].group;s.indexOf(r)<0&&s.push(r)})),i.length>0?function(){var l,c,u=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=u,d=h;if(e.chart.stacked)!function(){var t=new Array(r.dataPoints).fill(0),n=[],o=[],p=[];s.forEach((function(){n.push(t.map((function(){return Number.MIN_VALUE}))),o.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var g=function(t){!l&&e.series[i[t]].type&&(l=e.series[i[t]].type);var u=i[t];c=e.series[u].group?e.series[u].group:"axis-".concat(a),!(r.collapsedSeriesIndices.indexOf(u)<0&&r.ancillaryCollapsedSeriesIndices.indexOf(u)<0)||(r.allSeriesCollapsed=!1,s.forEach((function(t,i){if(e.series[u].group===t)for(var a=0;a=0?o[i][a]+=s:p[i][a]+=s,n[i][a]+=s,f=Math.min(f,s),d=Math.max(d,s)}}))),"bar"!==l&&"column"!==l||r.barGroups.push(c)},b=0;bt.length)&&(e=t.length);for(var r=0,i=Array(e);r1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w.config,o=this.w.globals,a=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===i&&(i=t+1);var l=o.series,c=l,u=l;"candlestick"===n.chart.type?(c=o.seriesCandleL,u=o.seriesCandleH):"boxPlot"===n.chart.type?(c=o.seriesCandleO,u=o.seriesCandleC):o.isRangeData&&(c=o.seriesRangeStart,u=o.seriesRangeEnd);var h=!1;if(o.seriesX.length>=i){var d,p=null===(d=o.brushSource)||void 0===d?void 0:d.w.config.chart.brush;(n.chart.zoom.enabled&&n.chart.zoom.autoScaleYaxis||null!=p&&p.enabled&&null!=p&&p.autoScaleYaxis)&&(h=!0)}for(var g=t;gy&&o.seriesX[g][v]>n.xaxis.max;v--);}for(var m=y;m<=v&&mc[g][m]&&c[g][m]<0&&(s=c[g][m])}else o.hasNullValues=!0}"bar"!==b&&"column"!==b||(s<0&&a<0&&(a=0,r=Math.max(r,0)),s===Number.MIN_VALUE&&(s=0,e=Math.min(e,0)))}return"rangeBar"===n.chart.type&&o.seriesRangeStart.length&&o.isBarHorizontal&&(s=e),"bar"===n.chart.type&&(s<0&&a<0&&(a=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:a,lowestY:e,highestY:r}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var r,i=Number.MAX_VALUE;if(t.isMultipleYAxis){i=Number.MAX_VALUE;for(var n=0;nt.dataPoints&&0!==t.dataPoints&&(i=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(i=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var n=t.maxX-t.minX;n<30&&(i=n-1)}}else i=e.xaxis.tickAmount;if(t.xTickAmount=i,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var o=[],a=t.minX-1;a0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,i-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());r&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var n=e-i[r-1];n>0&&(t.minXDiff=Math.min(n,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var r=e.seriesGroups;r.length||(r=[this.w.globals.seriesNames.map((function(t){return t}))]);var i={},n={};r.forEach((function(r){i[r]=[],n[r]=[],t.w.config.series.map((function(t,i){return r.indexOf(e.seriesNames[i])>-1?i:null})).filter((function(t){return null!==t})).forEach((function(o){for(var a=0;a0?i[r][a]+=parseFloat(e.series[o][a])+1e-4:n[r][a]+=parseFloat(e.series[o][a]))}}))})),Object.entries(i).forEach((function(t){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Hh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hh(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,1)[0];i[r].forEach((function(t,o){e.maxY=Math.max(e.maxY,i[r][o]),e.minY=Math.min(e.minY,n[r][o])}))}))}}}],r&&Fh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Wh=Nh;function Gh(t){return Gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(t)}function Vh(t,e){for(var r=0;r=0;g--){var b=h(d[g],g,e),y=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(y*=-1);var v=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(i.colors,t),x=Array.isArray(m)?m[g]:m,w=f.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),S=r.drawText({x:y,y:p,text:w.includes(b)&&!e.config.yaxis[t].labels.showDuplicates?"":b,textAnchor:v,fontSize:n,fontFamily:o,fontWeight:a,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:x,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(i.cssClass)});l.add(S),this.addTooltip(S,b),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(r,S,firstLabel,e.config.yaxis[t].labels.rotate),p+=u}}return this.addYAxisTitle(r,s,t),this.addAxisBorder(r,s,t,c,u),s}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var r=document.createElementNS(this.w.globals.SVGNS,"title");r.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(r)}},{key:"rotateLabel",value:function(t,e,r,i){var n=t.rotateAroundCenter(r.node),o=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(i," ").concat(n.x," ").concat(o.y,")"))}},{key:"addYAxisTitle",value:function(t,e,r){var i=this.w;if(void 0!==i.config.yaxis[r].title.text){var n=t.group({class:"apexcharts-yaxis-title"}),o=i.config.yaxis[r].opposite?i.globals.translateYAxisX[r]:0,a=t.drawText({x:o,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[r].title.offsetY,text:i.config.yaxis[r].title.text,textAnchor:"end",foreColor:i.config.yaxis[r].title.style.color,fontSize:i.config.yaxis[r].title.style.fontSize,fontWeight:i.config.yaxis[r].title.style.fontWeight,fontFamily:i.config.yaxis[r].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(i.config.yaxis[r].title.style.cssClass)});n.add(a),e.add(n)}}},{key:"addAxisBorder",value:function(t,e,r,i,n){var o=this.w,a=o.config.yaxis[r].axisBorder,s=31+a.offsetX;if(o.config.yaxis[r].opposite&&(s=-31-a.offsetX),a.show){var l=t.drawLine(s,o.globals.translateY+a.offsetY-2,s,o.globals.gridHeight+o.globals.translateY+a.offsetY+2,a.color,0,a.width);e.add(l)}o.config.yaxis[r].axisTicks.show&&this.axesUtils.drawYAxisTicks(s,i,a,o.config.yaxis[r].axisTicks,r,n,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,r=new Pc(this.ctx),i=r.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),n=r.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(n);var o=e.globals.yAxisScale[t].result.length-1,a=e.globals.gridWidth/o+.1,s=a+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),u=e.globals.timescaleLabels;if(u.length>0&&(this.xaxisLabels=u.slice(),o=(c=u.slice()).length),e.config.xaxis.labels.show)for(var h=u.length?0:o;u.length?h=0;u.length?h++:h--){var f=l(c[h],h,e),d=e.globals.gridWidth+e.globals.padHorizontal-(s-a+e.config.xaxis.labels.offsetX);if(u.length){var p=this.axesUtils.getLabel(c,u,d,h,this.drawnLabels,this.xaxisFontSize);d=p.x,f=p.text,this.drawnLabels.push(p.text),0===h&&e.globals.skipFirstTimelinelabel&&(f=""),h===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}var g=r.drawText({x:d,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});n.add(g),g.tspan(f),this.addTooltip(g,f),s+=a}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,r=new Pc(this.ctx),i=e.config.xaxis.axisBorder;if(i.show){var n=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(n-=15);var o=r.drawLine(e.globals.padHorizontal+n+i.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(o):t.add(o)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,r=new Pc(this.ctx);if(void 0!==e.config.xaxis.title.text){var i=r.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),n=r.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});i.add(n),t.add(i)}}},{key:"yAxisTitleRotate",value:function(t,e){var r=this.w,i=new Pc(this.ctx),n=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),o=n?n.getBoundingClientRect():{width:0,height:0},a=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),s=a?a.getBoundingClientRect():{width:0,height:0};if(a){var l=this.xPaddingForYAxisTitle(t,o,s,e);a.setAttribute("x",l.xPos-(e?10:0));var c=i.rotateAroundCenter(a);a.setAttribute("transform","rotate(".concat(e?-1*r.config.yaxis[t].title.rotate:r.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,r,i){var n=this.w,o=0,a=10;return void 0===n.config.yaxis[t].title.text||t<0?{xPos:o,padd:0}:(i?o=e.width+n.config.yaxis[t].title.offsetX+r.width/2+a/2:(o=-1*e.width+n.config.yaxis[t].title.offsetX+a/2+r.width/2,n.globals.isBarHorizontal&&(a=25,o=-1*e.width-n.config.yaxis[t].title.offsetX-a)),{xPos:o,padd:a})}},{key:"setYAxisXPosition",value:function(t,e){var r=this.w,i=0,n=0,o=18,a=1;r.config.yaxis.length>1&&(this.multipleYs=!0),r.config.yaxis.forEach((function(s,l){var c=r.globals.ignoreYAxisIndexes.includes(l)||!s.show||s.floating||0===t[l].width,u=t[l].width+e[l].width;s.opposite?r.globals.isBarHorizontal?(n=r.globals.gridWidth+r.globals.translateX-1,r.globals.translateYAxisX[l]=n-s.labels.offsetX):(n=r.globals.gridWidth+r.globals.translateX+a,c||(a+=u+20),r.globals.translateYAxisX[l]=n-s.labels.offsetX+20):(i=r.globals.translateX-o,c||(o+=u+20),r.globals.translateYAxisX[l]=i+s.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;f.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,r){var i=t.config.yaxis[r];if(i&&!i.floating&&void 0!==i.labels.align){var n=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-texts-g")),o=f.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-label"))),a=n.getBoundingClientRect();o.forEach((function(t){t.setAttribute("text-anchor",i.labels.align)})),"left"!==i.labels.align||i.opposite?"center"===i.labels.align?n.setAttribute("transform","translate(".concat(a.width/2*(i.opposite?1:-1),", 0)")):"right"===i.labels.align&&i.opposite&&n.setAttribute("transform","translate(".concat(a.width,", 0)")):n.setAttribute("transform","translate(-".concat(a.width,", 0)"))}}))}}],r&&Vh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Zh(t){return Zh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zh(t)}function $h(t,e){for(var r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var r=e.filter((function(e){return e.name===t}))[0];if(!r)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var i=f.extend(uu,r);this.w.globals.locale=i.options}}])&&tf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nf(t){return nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(t)}function of(t,e){for(var r=0;re.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var o=new Mu({}),a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n[0].breakpoint,a=window.innerWidth>0?window.innerWidth:screen.width;if(a>i){var s=f.clone(r.globals.initialConfig);s.series=f.clone(r.config.series);var l=Mc.extendArrayProps(o,s,r);t=f.extend(l,t),t=f.extend(r.config,t),e.overrideResponsiveOptions(t)}else for(var c=0;ct.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&"function"==typeof t[0]?(this.isColorFn=!0,r.config.series.map((function(i,n){var o=t[n]||t[0];return"function"==typeof o?o({value:r.globals.axisCharts?r.globals.series[n][0]||0:r.globals.series[n],seriesIndex:n,dataPointIndex:n,w:e.w}):o}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,r){t&&(e[r]=t)}))}},{key:"getMonochromeColors",value:function(t,e,r){var i=t.color,n=t.shadeIntensity,o=t.shadeTo,a=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,s=1/(a/n),l=0;return Array.from({length:a},(function(){var t="dark"===o?r.shadeColor(-1*l,i):r.shadeColor(l,i);return l+=s,t}))}},{key:"applyColorTypes",value:function(t,e){var r=this,i=this.w;t.forEach((function(t){i.globals[t].colors=void 0===i.config[t].colors?r.isColorFn?i.config.colors:e:i.config[t].colors.slice(),r.pushExtraColors(i.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=e||i.globals.series.length;if(null===r&&(r=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),r&&i.globals.series.length&&(n=i.globals.series[i.globals.maxValsInArrayIndex].length*i.globals.series.length),t.lengtht.length)&&(e=t.length);for(var r=0,i=Array(e);rt.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,r=[];e.config.series.forEach((function(n,o){n.data.forEach((function(n,a){var s;s=e.globals.series[o][a],i=e.config.dataLabels.formatter(s,{ctx:t.dCtx.ctx,seriesIndex:o,dataPointIndex:a,w:e}),r.push(i)}))}));var i=f.getLargestStringFromArr(r),n=new Pc(this.dCtx.ctx),o=e.config.dataLabels.style,a=n.getTextRects(i,parseInt(o.fontSize),o.fontFamily);return{width:1.05*a.width,height:a.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var r=t;if(this.w.globals.isMultiLineX){var i=e.map((function(t,e){return Array.isArray(t)?t.length:1})),n=Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Pf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Pf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pf(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i));r=e[i.indexOf(n)]}return r}}],r&&Cf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ef(t){return Ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(t)}function Mf(t,e){for(var r=0;r0){var i=this.getxAxisTimeScaleLabelsCoords();t={width:i.width,height:i.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var n=e.globals.xLabelFormatter,o=f.getLargestStringFromArr(r),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,r);e.globals.isBarHorizontal&&(a=o=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var s=new Jc(this.dCtx.ctx),l=o;o=s.xLabelFormat(n,o,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),a=s.xLabelFormat(n,a,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===o||""===String(o).trim())&&(a=o="1");var c=new Pc(this.dCtx.ctx),u=c.getTextRects(o,e.config.xaxis.labels.style.fontSize),h=u;if(o!==a&&(h=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),(t={width:u.width>=h.width?u.width:h.width,height:u.height>=h.height?u.height:h.height}).width*r.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var d=function(t){return c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};u=d(o),o!==a&&(h=d(a)),t.height=(u.height>h.height?u.height:h.height)/1.5,t.width=u.width>h.width?u.width:h.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var r,i=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,n=e.globals.groups.map((function(t){return t.title})),o=f.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,n),s=new Pc(this.dCtx.ctx),l=s.getTextRects(o,i),c=l;return o!==a&&(c=s.getTextRects(a,i)),r={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(r={width:0,height:0}),{width:r.width,height:r.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,r=0;if(void 0!==t.config.xaxis.title.text){var i=new Pc(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=i.width,r=i.height}return{width:e,height:r}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var r=this.dCtx.timescaleLabels.map((function(t){return t.value})),i=r.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Pc(this.dCtx.ctx).getTextRects(i,e.config.xaxis.labels.style.fontSize)).width*r.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,r=this.w,i=r.globals,n=r.config,o=n.xaxis.type,a=t.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;var s=r.config.yaxis[0].opposite&&r.globals.isBarHorizontal;n.yaxis.forEach((function(t,l){s?(e.dCtx.gridPad.left1&&function(t){return-1!==i.collapsedSeriesIndices.indexOf(t)}(s)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var s=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+a/1.75-e.dCtx.yAxisWidthRight,c=s.position-a/1.75+e.dCtx.yAxisWidthLeft,u="right"===r.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>i.svgWidth-i.translateX-u&&(i.skipLastTimelinelabel=!0),c<-(t.show&&!t.floating||"bar"!==n.chart.type&&"candlestick"!==n.chart.type&&"rangeBar"!==n.chart.type&&"boxPlot"!==n.chart.type?10:a/1.75)&&(i.skipFirstTimelinelabel=!0)}else"datetime"===o?e.dCtx.gridPad.right(null===(i=String(u(e,s)))||void 0===i?void 0:i.length)?t:e}),h),p=d=u(d,s);if(void 0!==d&&0!==d.length||(d=l.niceMax),e.globals.isBarHorizontal){i=0;var g=e.globals.labels.slice();d=f.getLargestStringFromArr(g),d=u(d,{seriesIndex:a,dataPointIndex:-1,w:e}),p=t.dCtx.dimHelpers.getLargestStringFromMultiArr(d,g)}var b=new Pc(t.dCtx.ctx),y="rotate(".concat(o.labels.rotate," 0 0)"),v=b.getTextRects(d,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1),m=v;d!==p&&(m=b.getTextRects(p,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1)),r.push({width:(c>m.width||c>v.width?c:m.width>v.width?m.width:v.width)+i,height:m.height>v.height?m.height:v.height})}else r.push({width:0,height:0})})),r}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,r=[];return e.config.yaxis.map((function(e,i){if(e.show&&void 0!==e.title.text){var n=new Pc(t.dCtx.ctx),o="rotate(".concat(e.title.rotate," 0 0)"),a=n.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,o,!1);r.push({width:a.width,height:a.height})}else r.push({width:0,height:0})})),r}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,r=0,i=0,n=t.globals.yAxisScale.length>1?10:0,o=new eu(this.dCtx.ctx),a=function(a,s){var l=t.config.yaxis[s].floating,c=0;a.width>0&&!l?(c=a.width+n,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(s)&&(c=c-a.width-n)):c=l||o.isYAxisHidden(s)?0:5,t.config.yaxis[s].opposite?i+=c:r+=c,e+=c};return t.globals.yLabelsCoords.map((function(t,e){a(t,e)})),t.globals.yTitleCoords.map((function(t,e){a(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=r,this.dCtx.yAxisWidthRight=i,e}}],r&&Rf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Df(t){return Df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(t)}function Yf(t,e){for(var r=0;r0&&(s=i.comboBarCount),i.collapsedSeries.forEach((function(t){n(t.type)&&(s-=1)})),r.chart.stacked&&(s=1);var l=n(o)||i.comboBarCount>0,c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&i.isXNumeric&&!i.isBarHorizontal&&s>0&&0!==c){c<=3&&(c=i.dataPoints);var u=c/t,h=i.minXDiff&&i.minXDiff/u>0?i.minXDiff/u:0;h>t/2&&(h/=2),(a=h*parseInt(r.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),i.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,r=e.globals,i=this.dCtx.isSparkline||!r.axisCharts?0:10;["title","subtitle"].forEach((function(n){void 0!==e.config[n].text?i+=e.config[n].margin:i+=t.dCtx.isSparkline||!r.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||r.axisCharts||(i+=10);var n=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),o=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");r.gridHeight-=n.height+o.height+i,r.translateY+=n.height+o.height+i}},{key:"setGridXPosForDualYAxis",value:function(t,e){var r=this.w,i=new eu(this.dCtx.ctx);r.config.yaxis.forEach((function(n,o){-1!==r.globals.ignoreYAxisIndexes.indexOf(o)||n.floating||i.isYAxisHidden(o)||(n.opposite&&(r.globals.translateX-=e[o].width+t[o].width+parseInt(n.labels.style.fontSize,10)/1.2+12),r.globals.translateX<2&&(r.globals.translateX=2))}))}}],r&&Yf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Bf(t){return Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(t)}function Nf(t,e){if(t){if("string"==typeof t)return Wf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wf(t,e):void 0}}function Wf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||Nf(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),i=r[0],n=r[1];t.gridPad[i]=Math.max(n,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(i/2,this.gridPad.top),this.gridPad.bottom=Math.max(i/2,this.gridPad.bottom)),r.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),r.gridHeight=r.gridHeight-this.gridPad.top-this.gridPad.bottom,r.gridWidth=r.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var n=this.dimGrid.gridPadForColumnsInNumericAxis(r.gridWidth);r.gridWidth=r.gridWidth-2*n,r.translateX=r.translateX+this.gridPad.left+this.xPadLeft+(n>0?n:0),r.translateY=r.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,r=e.globals,i=this.dimYAxis.getyAxisLabelsCoords(),n=this.dimYAxis.getyAxisTitleCoords();r.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,r){e.globals.yLabelsCoords.push({width:i[r].width,index:r}),e.globals.yTitleCoords.push({width:n[r].width,index:r})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var o=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(o,s,a),r.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,r.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(r.rotateXLabels=!1,r.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),r.translateXAxisY=r.translateXAxisY+e.config.xaxis.labels.offsetY,r.translateXAxisX=r.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;r.xAxisLabelsHeight=this.xAxisHeight-s.height,r.xAxisGroupLabelsHeight=r.xAxisLabelsHeight-o.height,r.xAxisLabelsWidth=this.xAxisWidth,r.xAxisHeight=this.xAxisHeight;var u=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,c=0,u=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(o);var h=function(){r.translateX=l+t.datalabelsCoords.width,r.gridHeight=r.svgHeight-t.lgRect.height-c-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),r.gridWidth=r.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(u=r.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":r.translateY=u,h();break;case"top":r.translateY=this.lgRect.height+u,h();break;case"left":r.translateY=u,r.translateX=this.lgRect.width+l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":r.translateY=u,r.translateX=l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(n,i),new qh(this.ctx).setYAxisXPosition(i,n)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,r=t.config,i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);var n="pie"===r.chart.type||"polarArea"===r.chart.type||"donut"===r.chart.type?"pie":"radialBar",o=r.plotOptions[n].offsetY,a=r.plotOptions[n].offsetX;if(!r.legend.show||r.legend.floating){e.gridHeight=e.svgHeight;var s=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(s,e.gridHeight),e.translateY=o,void(e.translateX=a+(e.svgWidth-e.gridWidth)/2)}switch(r.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=o-10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+o+10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-i,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+this.lgRect.width+i;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-i-5,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,r){var i=this.w,n=i.globals.hasXaxisGroups?2:1,o=r.height+t.height+e.height,a=i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO,s=i.globals.rotateXLabels?22:10,l=i.globals.rotateXLabels&&"bottom"===i.config.legend.position?10:0;this.xAxisHeight=o*a+n*s+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeightu&&(this.yAxisWidth=u)}}],r&&Gf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qf(t){return qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(t)}function Zf(t,e){for(var r=0;r0){for(var o=0;o1;if(this.legendHelpers.appendToForeignObject(),(i||!e.axisCharts)&&r.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===r.legend.position||"top"===r.legend.position?this.legendAlignHorizontal():"right"!==r.legend.position&&"left"!==r.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,r=t.fillcolor,i=this.w,n=document.createElement("span");n.classList.add("apexcharts-legend-marker");var o=i.config.legend.markers.shape||i.config.markers.shape,a=o;Array.isArray(o)&&(a=o[e]);var s=Array.isArray(i.config.legend.markers.size)?parseFloat(i.config.legend.markers.size[e]):parseFloat(i.config.legend.markers.size),l=Array.isArray(i.config.legend.markers.offsetX)?parseFloat(i.config.legend.markers.offsetX[e]):parseFloat(i.config.legend.markers.offsetX),c=Array.isArray(i.config.legend.markers.offsetY)?parseFloat(i.config.legend.markers.offsetY[e]):parseFloat(i.config.legend.markers.offsetY),u=Array.isArray(i.config.legend.markers.strokeWidth)?parseFloat(i.config.legend.markers.strokeWidth[e]):parseFloat(i.config.legend.markers.strokeWidth),h=n.style;if(h.height=2*(s+u)+"px",h.width=2*(s+u)+"px",h.left=l+"px",h.top=c+"px",i.config.legend.markers.customHTML)h.background="transparent",h.color=r[e],Array.isArray(i.config.legend.markers.customHTML)?i.config.legend.markers.customHTML[e]&&(n.innerHTML=i.config.legend.markers.customHTML[e]()):n.innerHTML=i.config.legend.markers.customHTML();else{var f=new Ku(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(a),seriesIndex:e,strokeWidth:u,size:s}),d=window.SVG().addTo(n).size("100%","100%"),p=new Pc(this.ctx).drawMarker(0,0,td(td({},f),{},{pointFillColor:Array.isArray(r)?r[e]:f.pointFillColor,shape:a}));i.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),d.add(p)}return n}},{key:"drawLegends",value:function(){var t=this,e=this,r=this.w,i=r.config.legend.fontFamily,n=r.globals.seriesNames,o=r.config.legend.markers.fillColors?r.config.legend.markers.fillColors.slice():r.globals.colors.slice();if("heatmap"===r.config.chart.type){var a=r.config.plotOptions.heatmap.colorScale.ranges;n=a.map((function(t){return t.name?t.name:t.from+" - "+t.to})),o=a.map((function(t){return t.color}))}else this.isBarsDistributed&&(n=r.globals.labels.slice());r.config.legend.customLegendItems.length&&(n=r.config.legend.customLegendItems);var s=r.globals.legendFormatter,l=r.config.legend.inverseOrder,c=[];r.globals.seriesGroups.length>1&&r.config.legend.clusterGroupedSeries&&r.globals.seriesGroups.forEach((function(t,e){c[e]=document.createElement("div"),c[e].classList.add("apexcharts-legend-group","apexcharts-legend-group-".concat(e)),"horizontal"===r.config.legend.clusterGroupedSeriesOrientation?r.globals.dom.elLegendWrap.classList.add("apexcharts-legend-group-horizontal"):c[e].classList.add("apexcharts-legend-group-vertical")}));for(var u=function(e){var a,l=s(n[e],{seriesIndex:e,w:r}),u=!1,h=!1;if(r.globals.collapsedSeries.length>0)for(var d=0;d0)for(var p=0;p=0:h<=n.length-1;l?h--:h++)u(h);r.globals.dom.elWrap.addEventListener("click",e.onLegendClick,!0),r.config.legend.onItemHover.highlightDataSeries&&0===r.config.legend.customLegendItems.length&&(r.globals.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),r.globals.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(t,e){var r=this.w,i=r.globals.dom.elLegendWrap,n=i.clientHeight,o=0,a=0;if("bottom"===r.config.legend.position)a=r.globals.svgHeight-Math.min(n,r.globals.svgHeight/2)-5;else if("top"===r.config.legend.position){var s=new Uf(this.ctx),l=s.dimHelpers.getTitleSubtitleCoords("title").height,c=s.dimHelpers.getTitleSubtitleCoords("subtitle").height;a=(l>0?l-10:0)+(c>0?c-10:0)}i.style.position="absolute",o=o+t+r.config.legend.offsetX,a=a+e+r.config.legend.offsetY,i.style.left=o+"px",i.style.top=a+"px","right"===r.config.legend.position&&(i.style.left="auto",i.style.right=25+r.config.legend.offsetX+"px"),["width","height"].forEach((function(t){i.style[t]&&(i.style[t]=parseInt(r.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new Uf(this.ctx),r=e.dimHelpers.getTitleSubtitleCoords("title"),i=e.dimHelpers.getTitleSubtitleCoords("subtitle"),n=0;"top"===t.config.legend.position&&(n=r.height+i.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,n)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),r=0;"left"===t.config.legend.position&&(r=20),"right"===t.config.legend.position&&(r=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(r,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,r=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(r){var i=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,i,this.w]),new fh(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&r&&new fh(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var r=parseInt(t.target.getAttribute("rel"),10)-1,i="true"===t.target.getAttribute("data:collapsed"),n=this.w.config.chart.events.legendClick;"function"==typeof n&&n(this.ctx,r,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,r,this.w]);var o=this.w.config.legend.markers.onClick;"function"==typeof o&&t.target.classList.contains("apexcharts-legend-marker")&&(o(this.ctx,r,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,r,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(r,i)}}}],r&&rd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const od=nd;var ad=r(75),sd=r.n(ad),ld=r(541),cd=r.n(ld),ud=r(955),hd=r.n(ud),fd=r(646),dd=r.n(fd),pd=r(606),gd=r.n(pd),bd=r(802),yd=r.n(bd),vd=r(627),md=r.n(vd);function xd(t){return xd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xd(t)}function wd(t,e){for(var r=0;rthis.wheelDelay&&(this.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){i-r.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,r=this.w;this.minX=r.globals.isRangeBar?r.globals.minY:r.globals.minX,this.maxX=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;var i=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(i){var n,o,a,s=(t.clientX-i.left)/i.width,l=this.minX,c=this.maxX,u=c-l;if(t.deltaY<0){var h=l+s*u;o=h-(n=.5*u)/2,a=h+n/2}else o=l-(n=1.5*u)/2,a=c+n/2;if(!r.globals.isRangeBar){o=Math.max(o,r.globals.initialMinX),a=Math.min(a,r.globals.initialMaxX);var f=.01*(r.globals.initialMaxX-r.globals.initialMinX);if(a-o0&&r.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,r,i,n){return"l"===n||"r"===n?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resize",(function(){var r=e.globals.zoomEnabled?e.config.chart.zoom.type:e.config.chart.selection.type;t.handleMouseUp({zoomtype:r,isResized:!0})})))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(Pd(Pd({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var r=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,i=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-r;t.globals.isRangeBar&&(r=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,i=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var n={x:r,y:0,width:i,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,r=t.y,i=t.width,n=t.height,o=t.translateX,a=void 0===o?0:o,s=t.translateY,l=void 0===s?0:s,c=this.w,u=this.zoomRect,h=this.selectionRect;if(this.dragged||null!==c.globals.selection){var f={transform:"translate("+a+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(i<0&&(i=1),u.attr({x:e,y:r,width:i,height:n,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),Pc.setAttrs(u.node,f)),c.globals.selectionEnabled&&(h.attr({x:e,y:r,width:i>0?i:0,height:n>0?n:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),Pc.setAttrs(h.node,f))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.gridRect.getBoundingClientRect(),a=n.startX-1,s=n.startY,l=!1,c=!1,u=n.clientX-o.left-i.globals.barPadForNumericAxis,h=n.clientY-o.top,f=u-a,d=h-s,p={translateX:i.globals.translateX,translateY:i.globals.translateY};return Math.abs(f+a)>i.globals.gridWidth?f=i.globals.gridWidth-a:u<0&&(f=a),a>u&&(l=!0,f=Math.abs(f)),s>h&&(c=!0,d=Math.abs(d)),p=Pd(Pd({},p="x"===r?{x:l?a-f:a,y:0,width:f,height:i.globals.gridHeight}:"y"===r?{x:0,y:c?s-d:s,width:i.globals.gridWidth,height:d}:{x:l?a-f:a,y:c?s-d:s,width:f,height:d}),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}),n.drawSelectionRect(p),n.selectionDragging("resizing"),p}},{key:"selectionDragging",value:function(t,e){var r=this,i=this.w;if(e){e.preventDefault();var n=e.detail,o=n.handler,a=n.box,s=a.x,l=a.y;sthis.constraints.x2&&(s=this.constraints.x2-a.w),a.y2>this.constraints.y2&&(l=this.constraints.y2-a.h),o.move(s,l);var c=this.xyRatios,u=this.selectionRect,h=0;"resizing"===t&&(h=30);var f=function(t){return parseFloat(u.node.getAttribute(t))},d={x:f("x"),y:f("y"),width:f("width"),height:f("height")};i.globals.selection=d,"function"==typeof i.config.chart.events.selection&&i.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,n,o,a=r.gridRect.getBoundingClientRect(),s=u.node.getBoundingClientRect();i.globals.isRangeBar?(t=i.globals.yAxisScale[0].niceMin+(s.left-a.left)*c.invertedYRatio,e=i.globals.yAxisScale[0].niceMin+(s.right-a.left)*c.invertedYRatio,n=0,o=1):(t=i.globals.xAxisScale.niceMin+(s.left-a.left)*c.xRatio,e=i.globals.xAxisScale.niceMin+(s.right-a.left)*c.xRatio,n=i.globals.yAxisScale[0].niceMin+(a.bottom-s.bottom)*c.yRatio[0],o=i.globals.yAxisScale[0].niceMax-(s.top-a.top)*c.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:n,max:o}};i.config.chart.events.selection(r.ctx,l),i.config.chart.brush.enabled&&void 0!==i.config.chart.events.brushScrolled&&i.config.chart.events.brushScrolled(r.ctx,l)}),h))}}},{key:"selectionDrawn",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.xyRatios,a=this.ctx.toolbar;if(n.startX>n.endX){var s=n.startX;n.startX=n.endX,n.endX=s}if(n.startY>n.endY){var l=n.startY;n.startY=n.endY,n.endY=l}var c=void 0,u=void 0;i.globals.isRangeBar?(c=i.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,u=i.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(c=i.globals.xAxisScale.niceMin+n.startX*o.xRatio,u=i.globals.xAxisScale.niceMin+n.endX*o.xRatio);var h=[],d=[];if(i.config.yaxis.forEach((function(t,e){var r=i.globals.seriesYAxisMap[e][0];h.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.startY),d.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.endY)})),n.dragged&&(n.dragX>10||n.dragY>10)&&c!==u)if(i.globals.zoomEnabled){var p=f.clone(i.globals.initialConfig.yaxis),g=f.clone(i.globals.initialConfig.xaxis);if(i.globals.zoomed=!0,i.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),u=Math.floor(u),c<1&&(c=1,u=i.globals.dataPoints),u-c<2&&(u=c+1)),"xy"!==r&&"x"!==r||(g={min:c,max:u}),"xy"!==r&&"y"!==r||p.forEach((function(t,e){p[e].min=d[e],p[e].max=h[e]})),a){var b=a.getBeforeZoomRange(g,p);b&&(g=b.xaxis?b.xaxis:g,p=b.yaxis?b.yaxis:p)}var y={xaxis:g};i.config.chart.group||(y.yaxis=p),n.ctx.updateHelpers._updateOptions(y,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof i.config.chart.events.zoomed&&a.zoomCallback(g,p)}else if(i.globals.selectionEnabled){var v,m=null;v={min:c,max:u},"xy"!==r&&"y"!==r||(m=f.clone(i.config.yaxis)).forEach((function(t,e){m[e].min=d[e],m[e].max=h[e]})),i.globals.selection=n.selection,"function"==typeof i.config.chart.events.selection&&i.config.chart.events.selection(n.ctx,{xaxis:v,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,r=this.w,i=e;if(void 0!==r.globals.lastClientPosition.x){var n=r.globals.lastClientPosition.x-i.clientX,o=r.globals.lastClientPosition.y-i.clientY;Math.abs(n)>Math.abs(o)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(o)&&n<0?this.moveDirection="right":Math.abs(o)>Math.abs(n)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(n)&&o<0&&(this.moveDirection="down")}r.globals.lastClientPosition={x:i.clientX,y:i.clientY};var a=r.globals.isRangeBar?r.globals.minY:r.globals.minX,s=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;r.config.xaxis.convertedCatToNumeric||i.panScrolled(a,s)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,r=t.globals.maxX,i=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+i,r=t.globals.maxX+i):"right"===this.moveDirection&&(e=t.globals.minX-i,r=t.globals.maxX-i),e=Math.floor(e),r=Math.floor(r),this.updateScrolledChart({xaxis:{min:e,max:r}},e,r)}},{key:"panScrolled",value:function(t,e){var r=this.w,i=this.xyRatios,n=f.clone(r.globals.initialConfig.yaxis),o=i.xRatio,a=r.globals.minX,s=r.globals.maxX;r.globals.isRangeBar&&(o=i.invertedYRatio,a=r.globals.minY,s=r.globals.maxY),"left"===this.moveDirection?(t=a+r.globals.gridWidth/15*o,e=s+r.globals.gridWidth/15*o):"right"===this.moveDirection&&(t=a-r.globals.gridWidth/15*o,e=s-r.globals.gridWidth/15*o),r.globals.isRangeBar||(tr.globals.initialMaxX)&&(t=a,e=s);var l={xaxis:{min:t,max:e}};r.config.chart.group||(l.yaxis=n),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,r){var i=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof i.config.chart.events.scrolled&&i.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:r}})}}],r&&jd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(kd);function Rd(t){return Rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rd(t)}function zd(t){return function(t){if(Array.isArray(t))return Xd(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Xd(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xd(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);rs||p>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):o.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):o.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var g=Math.round(d/c),b=Math.floor(p/u);h&&!o.config.xaxis.convertedCatToNumeric&&(g=Math.ceil(d/c),g-=1);var y=null,v=null,m=o.globals.seriesXvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))})),x=o.globals.seriesYvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))}));if(o.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),S=d*(w.width/s),k=p*(w.height/l);y=(v=this.closestInMultiArray(S,k,m,x)).index,g=v.j,null!==y&&o.globals.hasNullValues&&(m=o.globals.seriesXvalues[y],g=(v=this.closestInArray(S,m)).j)}return o.globals.capturedSeriesIndex=null===y?-1:y,(!g||g<1)&&(g=0),o.globals.isBarHorizontal?o.globals.capturedDataPointIndex=b:o.globals.capturedDataPointIndex=g,{capturedSeries:y,j:o.globals.isBarHorizontal?b:g,hoverX:d,hoverY:p}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,r=0,i=t.map((function(t,e){return t.length>0?e:-1})),n=0;n0)for(var i=0;i *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");r=zd(r),e&&(r=r.filter((function(e){var r=Number(e.getAttribute("data:realIndex"));return-1===t.w.globals.collapsedSeriesIndices.indexOf(r)}))),r.sort((function(t,e){var r=Number(t.getAttribute("data:realIndex")),i=Number(e.getAttribute("data:realIndex"));return ir?-1:0}));var i=[];return r.forEach((function(t){i.push(t.querySelector(".apexcharts-marker"))})),i}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var r=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),n=t.getAttribute("shape");return new Pc(this.ctx).getMarkerPath(r,i,n,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,r=e.config.markers.hover.size;return void 0===r&&(r=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),r}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,r=this.ttCtx;0===r.allTooltipSeriesGroups.length&&(r.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var i=r.allTooltipSeriesGroups,n=0;n";h.forEach((function(r,i){t+=' ').concat(r.attrs.name,"
"),e+="".concat(r.val,"
")})),v.innerHTML=t+"",m.innerHTML=e+""};a?l.globals.seriesGoals[e][r]&&Array.isArray(l.globals.seriesGoals[e][r])?x():(v.innerHTML="",m.innerHTML=""):x()}else v.innerHTML="",m.innerHTML="";if(null!==p&&(i[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,i[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""),a&&g[0]){if(l.config.tooltip.hideEmptySeries){var w=i[e].querySelector(".apexcharts-tooltip-marker"),S=i[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(u)?(w.style.display="none",S.style.display="none"):(w.style.display="block",S.style.display="block")}null==u||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)&&(g[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var r=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));i&&(i.classList.add("apexcharts-active"),i.style.display=r.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,r=t.j,i=this.w,n=this.ctx.series.filteredSeriesX(),o="",a="",s=null,l=null,c={series:i.globals.series,seriesIndex:e,dataPointIndex:r,w:i},u=i.globals.ttZFormatter;null===r?l=i.globals.series[e]:i.globals.isXNumeric&&"treemap"!==i.config.chart.type?(o=n[e][r],0===n[e].length&&(o=n[this.tooltipUtil.getFirstActiveXArray(n)][r])):o=new yh(this.ctx).isFormatXY()?void 0!==i.config.series[e].data[r]?i.config.series[e].data[r].x:"":void 0!==i.globals.labels[r]?i.globals.labels[r]:"";var h=o;return o=i.globals.isXNumeric&&"datetime"===i.config.xaxis.type?new Jc(this.ctx).xLabelFormat(i.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new Vc(this.ctx).formatDate,w:this.w}):i.globals.isBarHorizontal?i.globals.yLabelFormatters[0](h,c):i.globals.xLabelFormatter(h,c),void 0!==i.config.tooltip.x.formatter&&(o=i.globals.ttKeyFormatter(h,c)),i.globals.seriesZ.length>0&&i.globals.seriesZ[e].length>0&&(s=u(i.globals.seriesZ[e][r],i)),a="function"==typeof i.config.xaxis.tooltip.formatter?i.globals.xaxisTooltipFormatter(h,c):o,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(o)?o.join(" "):o,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:s}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,r=t.j,i=t.y1,n=t.y2,o=t.w,a=this.ttCtx.getElTooltip(),s=o.config.tooltip.custom;Array.isArray(s)&&s[e]&&(s=s[e]);var l=s({ctx:this.ctx,series:o.globals.series,seriesIndex:e,dataPointIndex:r,y1:i,y2:n,w:o});"string"==typeof l?a.innerHTML=l:(l instanceof Element||"string"==typeof l.nodeName)&&(a.innerHTML="",a.appendChild(l))}}],r&&Gd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qd(t){return qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qd(t)}function Zd(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=this.ttCtx,i=this.w,n=r.getElXCrosshairs(),o=t-r.xcrosshairsWidth/2,a=i.globals.labels.slice().length;if(null!==e&&(o=i.globals.gridWidth/a*e),null===n||i.globals.isBarHorizontal||(n.setAttribute("x",o),n.setAttribute("x1",o),n.setAttribute("x2",o),n.setAttribute("y2",i.globals.gridHeight),n.classList.add("apexcharts-active")),o<0&&(o=0),o>i.globals.gridWidth&&(o=i.globals.gridWidth),r.isXAxisTooltipEnabled){var s=o;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(s=o+r.xcrosshairsWidth/2),this.moveXAxisTooltip(s)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Pc.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Pc.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;if(null!==r.xaxisTooltip&&0!==r.xcrosshairsWidth){r.xaxisTooltip.classList.add("apexcharts-active");var i,n=r.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;t-=r.xaxisTooltip.getBoundingClientRect().width/2,isNaN(t)||(t+=e.globals.translateX,i=new Pc(this.ctx).getTextRects(r.xaxisTooltipText.innerHTML),r.xaxisTooltipText.style.minWidth=i.width+"px",r.xaxisTooltip.style.left=t+"px",r.xaxisTooltip.style.top=n+"px")}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;null===r.yaxisTTEls&&(r.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var i=parseInt(r.ycrosshairsHidden.getAttribute("y1"),10),n=e.globals.translateY+i,o=r.yaxisTTEls[t].getBoundingClientRect().height,a=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(a-=26),n-=o/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(r.yaxisTTEls[t].classList.add("apexcharts-active"),r.yaxisTTEls[t].style.top=n+"px",r.yaxisTTEls[t].style.left=a+e.config.yaxis[t].tooltip.offsetX+"px"):r.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=this.ttCtx,o=n.getElTooltip(),a=n.tooltipRect,s=null!==r?parseFloat(r):1,l=parseFloat(t)+s+5,c=parseFloat(e)+s/2;if(l>i.globals.gridWidth/2&&(l=l-a.ttWidth-s-10),l>i.globals.gridWidth-a.ttWidth-10&&(l=i.globals.gridWidth-a.ttWidth),l<-20&&(l=-20),i.config.tooltip.followCursor){var u=n.getElGrid().getBoundingClientRect();(l=n.e.clientX-u.left)>i.globals.gridWidth/2&&(l-=n.tooltipRect.ttWidth),(c=n.e.clientY+i.globals.translateY-u.top)>i.globals.gridHeight/2&&(c-=n.tooltipRect.ttHeight)}else i.globals.isBarHorizontal||a.ttHeight/2+c>i.globals.gridHeight&&(c=i.globals.gridHeight-a.ttHeight+i.globals.translateY);isNaN(l)||(l+=i.globals.translateX,o.style.left=l+"px",o.style.top=c+"px")}},{key:"moveMarkers",value:function(t,e){var r=this.w,i=this.ttCtx;if(r.globals.markers.size[t]>0)for(var n=r.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),o=0;o0){var d=f.getAttribute("shape"),p=l.getMarkerPath(n,o,d,1.5*u);f.setAttribute("d",p)}this.moveXCrosshairs(n),s.fixedTooltip||this.moveTooltip(n,o,u)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,r=this.ttCtx,i=r.w,n=0,o=0,a=i.globals.pointsArray,s=new fh(this.ctx),l=new Pc(this.ctx);e=s.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var c=r.tooltipUtil.getHoverMarkerSize(e);if(a[e]&&(n=a[e][t][0],o=a[e][t][1]),!isNaN(n)){var u=r.tooltipUtil.getAllMarkers();if(u.length)for(var h=0;h0){var y=l.getMarkerPath(n,d,g,c);u[h].setAttribute("d",y)}else u[h].setAttribute("d","")}}this.moveXCrosshairs(n),r.fixedTooltip||this.moveTooltip(n,o||i.globals.gridHeight,c)}}},{key:"moveStickyTooltipOverBars",value:function(t,e){var r=this.w,i=this.ttCtx,n=r.globals.columnSeries?r.globals.columnSeries.length:r.globals.series.length,o=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;r.globals.isBarHorizontal&&(o=new fh(this.ctx).getActiveConfigSeriesIndex("desc")+1);var a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(o,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"']"));a||"number"!=typeof e||(a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var s=a?parseFloat(a.getAttribute("cx")):0,l=a?parseFloat(a.getAttribute("cy")):0,c=a?parseFloat(a.getAttribute("barWidth")):0,u=i.getElGrid().getBoundingClientRect(),h=a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"));r.globals.isXNumeric?(a&&!h&&(s-=n%2!=0?c/2:0),a&&h&&(s-=c/2)):r.globals.isBarHorizontal||(s=i.xAxisTicksPositions[t-1]+i.dataPointsDividedWidth/2,isNaN(s)&&(s=i.xAxisTicksPositions[t]-i.dataPointsDividedWidth/2)),r.globals.isBarHorizontal?l-=i.tooltipRect.ttHeight:r.config.tooltip.followCursor?l=i.e.clientY-u.top-i.tooltipRect.ttHeight/2:l+i.tooltipRect.ttHeight+15>r.globals.gridHeight&&(l=r.globals.gridHeight),r.globals.isBarHorizontal||this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,l||r.globals.gridHeight)}}],r&&Zd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qd(t){return Qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qd(t)}function Kd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w;"bubble"!==n.config.chart.type&&this.newPointSize(t,e);var o=e.getAttribute("cx"),a=e.getAttribute("cy");if(null!==r&&null!==i&&(o=r,a=i),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if("radar"===n.config.chart.type){var s=this.ttCtx.getElGrid().getBoundingClientRect();o=this.ttCtx.e.clientX-s.left}this.tooltipPosition.moveTooltip(o,a,n.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,r=this,i=this.ttCtx,n=t,o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=e.config.markers.hover.size,s=0;s0){var i=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],r);t[e].setAttribute("d",i)}else t[e].setAttribute("d","M0,0")}}}],r&&tp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ip(t){return ip="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ip(t)}function np(t,e){for(var r=0;rs.globals.gridWidth/2&&(i=u-a.tooltipRect.ttWidth/2+f),a.w.config.tooltip.followCursor){var p=s.globals.dom.elWrap.getBoundingClientRect();i=s.globals.clientX-p.left-(i>s.globals.gridWidth/2?a.tooltipRect.ttWidth:0),n=s.globals.clientY-p.top-(n>s.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:i,y:n}}},{key:"handleMarkerTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=t.x,a=t.y,s=this.w,l=this.ttCtx;if(i.target.classList.contains("apexcharts-marker")){var c=parseInt(n.paths.getAttribute("cx"),10),u=parseInt(n.paths.getAttribute("cy"),10),h=parseFloat(n.paths.getAttribute("val"));if(r=parseInt(n.paths.getAttribute("rel"),10),e=parseInt(n.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var d=f.findAncestor(n.paths,"apexcharts-series");d&&(e=parseInt(d.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:r,shared:!l.showOnIntersect&&s.config.tooltip.shared,e:i}),"mouseup"===i.type&&l.markerClick(i,e,r),s.globals.capturedSeriesIndex=e,s.globals.capturedDataPointIndex=r,o=c,a=u+s.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var p=l.getElGrid().getBoundingClientRect();a=l.e.clientY+s.globals.translateY-p.top}h<0&&(a=u),l.marker.enlargeCurrentPoint(r,n.paths,o,a)}return{x:o,y:a}}},{key:"handleBarTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=this.ttCtx,s=a.getElTooltip(),l=0,c=0,u=0,h=this.getBarTooltipXY({e:i,opt:n});if(null!==h.j||0!==h.barHeight||0!==h.barWidth){e=h.i;var f=h.j;if(o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=f,o.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!o.config.tooltip.shared?(c=h.x,u=h.y,r=Array.isArray(o.config.stroke.width)?o.config.stroke.width[e]:o.config.stroke.width,l=c):o.globals.comboCharts||o.config.tooltip.shared||(l/=2),isNaN(u)&&(u=o.globals.svgHeight-a.tooltipRect.ttHeight),parseInt(n.paths.parentNode.getAttribute("data:realIndex"),10),c+a.tooltipRect.ttWidth>o.globals.gridWidth?c-=a.tooltipRect.ttWidth:c<0&&(c=0),a.w.config.tooltip.followCursor){var d=a.getElGrid().getBoundingClientRect();u=a.e.clientY-d.top}null===a.tooltip&&(a.tooltip=o.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),o.config.tooltip.shared||(o.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(l+r/2):a.tooltipPosition.moveXCrosshairs(l)),!a.fixedTooltip&&(!o.config.tooltip.shared||o.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(u=u+o.globals.translateY-a.tooltipRect.ttHeight/2,s.style.left=c+o.globals.translateX+"px",s.style.top=u+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,r=t.e,i=t.opt,n=this.w,o=null,a=this.ttCtx,s=0,l=0,c=0,u=0,h=0,f=r.target.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){var d=r.target,p=d.getBoundingClientRect(),g=i.elGrid.getBoundingClientRect(),b=p.height;h=p.height;var y=p.width,v=parseInt(d.getAttribute("cx"),10),m=parseInt(d.getAttribute("cy"),10);u=parseFloat(d.getAttribute("barWidth"));var x="touchmove"===r.type?r.touches[0].clientX:r.clientX;o=parseInt(d.getAttribute("j"),10),s=parseInt(d.parentNode.getAttribute("rel"),10)-1;var w=d.getAttribute("data-range-y1"),S=d.getAttribute("data-range-y2");n.globals.comboCharts&&(s=parseInt(d.parentNode.getAttribute("data:realIndex"),10));var k=function(t){return n.globals.isXNumeric?v-y/2:e.isVerticalGroupedRangeBar?v+y/2:v-a.dataPointsDividedWidth+y/2},A=function(){return m-a.dataPointsDividedHeight+b/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:s,j:o,y1:w?parseInt(w,10):null,y2:S?parseInt(S,10):null,shared:!a.showOnIntersect&&n.config.tooltip.shared,e:r}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(l=x-g.left+15,c=A()):(l=k(),c=r.clientY-g.top-a.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?((l=v)0&&r.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,r){var i=this.ttCtx,n=this.w,o=n.globals,a=o.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&a.length>0){var s=o.yLabelFormatters[t],l=i.getElGrid().getBoundingClientRect(),c=a[0],u=0;r.yRatio.length>1&&(u=c);var h=(e-l.top)*r.yRatio[u],f=o.maxYArr[c]-o.minYArr[c],d=o.minYArr[c]+(f-h);n.config.yaxis[t].reversed&&(d=o.maxYArr[c]-(f-h)),i.tooltipPosition.moveYCrosshairs(e-l.top),i.yaxisTooltipText[t].innerHTML=s(d),i.tooltipPosition.moveYAxisTooltip(t)}}}],r&&cp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const fp=hp;function dp(t){return dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dp(t)}function pp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function gp(t){for(var e=1;e0&&this.addPathsEventListeners(d,u),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(u)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),r=e.getBoundingClientRect(),i=r.width+10,n=r.height+10,o=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),s.indexOf("bottom")>-1&&(a=a+t.globals.svgHeight-n-10),e.style.left=o+"px",e.style.top=a+"px",{x:o,y:a,ttWidth:i,ttHeight:n}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var r=this,i=function(i){var n={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[i].addEventListener(e,r.onSeriesHover.bind(r,n),{capture:!1,passive:!0})}))},n=0;n=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){r.seriesHover(t,e)}),20-i))}},{key:"seriesHover",value:function(t,e){var r=this;this.lastHoverTime=Date.now();var i=[],n=this.w;n.config.chart.group&&(i=this.ctx.getGroupedCharts()),n.globals.axisCharts&&(n.globals.minX===-1/0&&n.globals.maxX===1/0||0===n.globals.dataPoints)||(i.length?i.forEach((function(i){var n=r.getElTooltip(i),o={paths:t.paths,tooltipEl:n,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:i.w.globals.tooltip.ttItems};i.w.globals.minX===r.w.globals.minX&&i.w.globals.maxX===r.w.globals.maxX&&i.w.globals.tooltip.seriesHoverByContext({chartCtx:i,ttCtx:i.w.globals.tooltip,opt:o,e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,r=t.ttCtx,i=t.opt,n=t.e,o=e.w,a=this.getElTooltip(e);a&&(r.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},r.e=n,!r.tooltipUtil.hasBars()||o.globals.comboCharts||r.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new fh(e).toggleSeriesOnHover(n,n.target.parentNode),r.fixedTooltip&&r.drawFixedTooltipRect(),o.globals.axisCharts?r.axisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}):r.nonAxisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=n.elGrid.getBoundingClientRect(),s="touchmove"===i.type?i.touches[0].clientX:i.clientX,l="touchmove"===i.type?i.touches[0].clientY:i.clientY;if(this.clientY=l,this.clientX=s,o.globals.capturedSeriesIndex=-1,o.globals.capturedDataPointIndex=-1,la.top+a.height)this.handleMouseOut(n);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!o.config.tooltip.shared){var c=parseInt(n.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(n)}var u=this.getElTooltip(),h=this.getElXCrosshairs(),f=[];o.config.chart.group&&(f=this.ctx.getSyncedCharts());var d=o.globals.xyCharts||"bar"===o.config.chart.type&&!o.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||o.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===i.type||"touchmove"===i.type||"mouseup"===i.type){if(o.globals.collapsedSeries.length+o.globals.ancillaryCollapsedSeries.length===o.globals.series.length)return;null!==h&&h.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),d&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(i,s,l,n);else if("heatmap"===o.config.chart.type||"treemap"===o.config.chart.type){var g=this.intersect.handleHeatTreeTooltip({e:i,opt:n,x:e,y:r,type:o.config.chart.type});e=g.x,r=g.y,u.style.left=e+"px",u.style.top=r+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:i,opt:n}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:i,opt:n,x:e,y:r});if(this.yaxisTooltips.length)for(var b=0;bl.width)this.handleMouseOut(i);else if(null!==s)this.handleStickyCapturedSeries(t,s,i,a);else if(this.tooltipUtil.isXoverlap(a)||n.globals.isBarHorizontal){var c=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,c,a,i.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,r,i){var n=this.w;if(this.tConfig.shared||null!==n.globals.series[e][i]){if(void 0!==n.globals.series[e][i])this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,r.ttItems):this.create(t,this,e,i,r.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){var o=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,o,i,r.ttItems)}}else this.handleMouseOut(r)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Pc(this.ctx),r=t.globals.dom.Paper.find(".apexcharts-bar-area"),i=0;i5&&void 0!==arguments[5]?arguments[5]:null,S=this.w,k=e;"mouseup"===t.type&&this.markerClick(t,r,i),null===w&&(w=this.tConfig.shared);var A=this.tooltipUtil.hasMarkers(r),O=this.tooltipUtil.getElBars(),P=function(){S.globals.markers.largestSize>0?k.marker.enlargePoints(i):k.tooltipPosition.moveDynamicPointsOnHover(i)};if(S.config.legend.tooltipHoverFormatter){var C=S.config.legend.tooltipHoverFormatter,j=Array.from(this.legendLabels);j.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var T=0;T0)){var R=new Pc(this.ctx),z=S.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(i,"']"));this.deactivateHoverFilter(),k.tooltipPosition.moveStickyTooltipOverBars(i,r),k.tooltipUtil.getAllMarkers(!0).length&&P();for(var X=0;X0&&i.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=c*S)),w&&(f=f+h.height/2-y/2-2);var A=i.globals.series[n][o]<0,O=s;switch(this.barCtx.isReversed&&(O=s+(A?u:-u)),g.position){case"center":d=w?A?O-u/2+m:O+u/2-m:A?O-u/2+h.height/2+m:O+u/2+h.height/2-m;break;case"bottom":d=w?A?O-u+m:O+u-m:A?O-u+h.height+y+m:O+u-h.height/2+y-m;break;case"top":d=w?A?O+m:O-m:A?O-h.height/2-m:O+h.height+m}if(this.barCtx.lastActiveBarSerieIndex===a&&b.enabled){var P=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:o}),p.fontSize);e=A?O-P.height/2-m-b.offsetY+18:O+P.height+m+b.offsetY-18;var C=k;r=x+(i.globals.isXNumeric?-c*i.globals.barGroups.length/2:i.globals.barGroups.length*c/2-(i.globals.barGroups.length-1)*c-C)+b.offsetX}return i.config.chart.stacked||(d<0?d=0+y:d+h.height/3>i.globals.gridHeight&&(d=i.globals.gridHeight-y)),{bcx:l,bcy:s,dataLabelsX:f,dataLabelsY:d,totalDataLabelsX:r,totalDataLabelsY:e,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,r=t.x,i=t.i,n=t.j,o=t.realIndex,a=t.bcy,s=t.barHeight,l=t.barWidth,c=t.textRects,u=t.dataLabelsX,h=t.strokeWidth,f=t.dataLabelsConfig,d=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,g=t.offX,b=t.offY,y=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var v,m,x=a-(this.barCtx.isRangeBar?0:y)+s/2+c.height/2+b-3,w="start",S=e.globals.series[i][n]<0,k=r;switch(this.barCtx.isReversed&&(k=r+(S?-l:l),w=S?"start":"end"),d.position){case"center":u=S?k+l/2-g:Math.max(c.width/2,k-l/2)+g;break;case"bottom":u=S?k+l-h-g:k-l+h+g;break;case"top":u=S?k-h-g:k-h+g}if(this.barCtx.lastActiveBarSerieIndex===o&&p.enabled){var A=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:n}),f.fontSize);S?(v=k-h-g-p.offsetX,w="end"):v=k+g+p.offsetX+(this.barCtx.isReversed?-(l+h):h),m=x-c.height/2+A.height/2+p.offsetY+h}return e.config.chart.stacked||("start"===f.textAnchor?u-c.width<0?u=S?c.width+h:h:u+c.width>e.globals.gridWidth&&(u=S?e.globals.gridWidth-h:e.globals.gridWidth-c.width-h):"middle"===f.textAnchor?u-c.width/2<0?u=c.width/2+h:u+c.width/2>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width/2-h):"end"===f.textAnchor&&(u<1?u=c.width+h:u+1>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width-h))),{bcx:r,bcy:a,dataLabelsX:u,dataLabelsY:x,totalDataLabelsX:v,totalDataLabelsY:m,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,r=t.y,i=t.val,n=t.i,o=t.j,a=t.textRects,s=t.barHeight,l=t.barWidth,c=t.dataLabelsConfig,u=this.w,h="rotate(0)";"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&(h="rotate(-90, ".concat(e,", ").concat(r,")"));var f=new lh(this.barCtx.ctx),d=new Pc(this.barCtx.ctx),p=c.formatter,g=null,b=u.globals.collapsedSeriesIndices.indexOf(n)>-1;if(c.enabled&&!b){g=d.group({class:"apexcharts-data-labels",transform:h});var y="";void 0!==i&&(y=p(i,Sp(Sp({},u),{},{seriesIndex:n,dataPointIndex:o,w:u}))),!i&&u.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y="");var v=u.globals.series[n][o]<0,m=u.config.plotOptions.bar.dataLabels.position;"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&("top"===m&&(c.textAnchor=v?"end":"start"),"center"===m&&(c.textAnchor="middle"),"bottom"===m&&(c.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&lMath.abs(l)&&(y=""):a.height/1.6>Math.abs(s)&&(y=""));var x=Sp({},c);this.barCtx.isHorizontal&&i<0&&("start"===c.textAnchor?x.textAnchor="end":"end"===c.textAnchor&&(x.textAnchor="start")),f.plotDataLabelsText({x:e,y:r,text:y,i:n,j:o,parent:g,dataLabelsConfig:x,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return g}},{key:"drawTotalDataLabels",value:function(t){var e,r=t.x,i=t.y,n=t.val,o=t.realIndex,a=t.textAnchor,s=t.barTotalDataLabelsConfig,l=(this.w,new Pc(this.barCtx.ctx));return s.enabled&&void 0!==r&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===o&&(e=l.drawText({x:r,y:i,foreColor:s.style.color,text:n,textAnchor:a,fontFamily:s.style.fontFamily,fontSize:s.style.fontSize,fontWeight:s.style.fontWeight})),e}}],r&&Ap(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Cp(t){return Cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cp(t)}function jp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Tp(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Lp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[r].length),e.globals.isXNumeric)for(var i=0;ie.globals.minX&&e.globals.seriesX[r][i]0&&(i=l.globals.minXDiff/h),(o=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(o=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.columnWidth,10)),a=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+f.noExponents(i-o*this.barCtx.seriesLen)/2}return l.globals.barHeight=n,l.globals.barWidth=o,{x:t,y:e,yDivision:r,xDivision:i,barHeight:n,barWidth:o,zeroH:a,zeroW:s}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,r,i){var n,o,a,s,l=this.w,c=this.barCtx.ctx.fill,u=null,h=this.barCtx.barOptions.distributed?r:e,f=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(i){t[e][r]>=i.from&&t[e][r]<=i.to&&(u=i.color,f=!0)})),{color:c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:i,dataPointIndex:r,color:u,value:t[e][r],fillConfig:null===(n=l.config.series[e].data[r])||void 0===n?void 0:n.fill,fillType:null!==(o=l.config.series[e].data[r])&&void 0!==o&&null!==(a=o.fill)&&void 0!==a&&a.type?null===(s=l.config.series[e].data[r])||void 0===s?void 0:s.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[i]:l.config.fill.type}),useRangeColor:f}}},{key:"getStrokeWidth",value:function(t,e,r){var i=0,n=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,n.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[r]:this.barCtx.strokeWidth)),i}},{key:"createBorderRadiusArr",value:function(t){var e,r=this.w,i=!this.w.config.chart.stacked||r.config.plotOptions.bar.borderRadius<=0,n=t.length,o=0|(null===(e=t[0])||void 0===e?void 0:e.length),a=Array.from({length:n},(function(){return Array(o).fill(i?"top":"none")}));if(i)return a;for(var s=0;s0?(l.push(h),u++):f<0&&(c.push(h),u++)}if(l.length>0&&0===c.length)if(1===l.length)a[l[0]][s]="both";else{var d,p=l[0],g=l[l.length-1],b=Mp(l);try{for(b.s();!(d=b.n()).done;){var y=d.value;a[y][s]=y===p?"bottom":y===g?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===l.length)if(1===c.length)a[c[0]][s]="both";else{var v,m=Math.max.apply(Math,c),x=Math.min.apply(Math,c),w=Mp(c);try{for(w.s();!(v=w.n()).done;){var S=v.value;a[S][s]=S===m?"bottom":S===x?"top":"none"}}catch(t){w.e(t)}finally{w.f()}}else if(l.length>0&&c.length>0){var k,A=l[l.length-1],O=Mp(l);try{for(O.s();!(k=O.n()).done;){var P=k.value;a[P][s]=P===A?"top":"none"}}catch(t){O.e(t)}finally{O.f()}var C,j=Math.max.apply(Math,c),T=Mp(c);try{for(T.s();!(C=T.n()).done;){var E=C.value;a[E][s]=E===j?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else 1===u&&(a[l[0]||c[0]][s]="both")}return a}},{key:"barBackground",value:function(t){var e=t.j,r=t.i,i=t.x1,n=t.x2,o=t.y1,a=t.y2,s=t.elSeries,l=this.w,c=new Pc(this.barCtx.ctx),u=new fh(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&u===r){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[e],f=c.drawRect(void 0!==i?i:0,void 0!==o?o:0,void 0!==n?n:l.globals.gridWidth,void 0!==a?a:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);s.add(f),f.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,r=t.barWidth,i=t.barXPosition,n=t.y1,o=t.y2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.columnWidthOffset&&(b=i-d.config.series[u].data[f].columnWidthOffset/2,g=r+d.config.series[u].data[f].columnWidthOffset);var y=a/2,v=b+y,m=b+g-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001-y*x,o+=.001+y*x;var w=p.move(v,n),S=p.move(v,n),k=p.line(m,n);if(d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1)),w=w+p.line(v,o)+p.line(m,o)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(v,n)+k+k+k+k+k+p.line(v,n)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).yArrj.push(o-y*x),A.yArrjF.push(Math.abs(n-o+a*x)),A.yArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"getBarpaths",value:function(t){var e,r=t.barYPosition,i=t.barHeight,n=t.x1,o=t.x2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.barHeightOffset&&(g=r-d.config.series[u].data[f].barHeightOffset/2,b=i+d.config.series[u].data[f].barHeightOffset);var y=a/2,v=g+y,m=g+b-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001+y*x,o+=.001-y*x;var w=p.move(n,v),S=p.move(n,v);d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1));var k=p.line(n,m);if(w=w+p.line(o,v)+p.line(o,m)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(n,v)+k+k+k+k+k+p.line(n,v)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).xArrj.push(o+y*x),A.xArrjF.push(Math.abs(n-o-a*x)),A.xArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,r=this.w,i=0;i2&&void 0!==arguments[2]&&!arguments[2]?null:e;return null!=t&&(r=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),r}},{key:"getYForValue",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?null:e;return null!=t&&(i=e-t/this.barCtx.yRatio[r]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[r]:0)),i}},{key:"getGoalValues",value:function(t,e,r,i,n,o){var a=this,s=this.w,l=[],c=function(i,n){var s;l.push((Ep(s={},t,"x"===t?a.getXForValue(i,e,!1):a.getYForValue(i,r,o,!1)),Ep(s,"attrs",n),s))};if(s.globals.seriesGoals[i]&&s.globals.seriesGoals[i][n]&&Array.isArray(s.globals.seriesGoals[i][n])&&s.globals.seriesGoals[i][n].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&s.globals.seriesRange.length){var u=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,h={strokeHeight:"x"===t?0:s.globals.markers.size[i],strokeWidth:"x"===t?s.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(u[i])?u[i][0]:u[i]};c(s.globals.seriesRangeStart[i][n],h),c(s.globals.seriesRangeEnd[i][n],Tp(Tp({},h),{},{strokeColor:Array.isArray(u[i])?u[i][1]:u[i]}))}return l}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,r=t.barYPosition,i=t.goalX,n=t.goalY,o=t.barWidth,a=t.barHeight,s=new Pc(this.barCtx.ctx),l=s.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(i)&&i.forEach((function(t){if(t.x>=-1&&t.x<=s.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:a/2,i=r+e+a/2;c=s.drawLine(t.x,i-2*e,t.x,i,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(c)}})):Array.isArray(n)&&n.forEach((function(t){if(t.y>=-1&&t.y<=s.w.globals.gridHeight+1){var r=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:o/2,i=e+r+o/2;c=s.drawLine(i-2*r,t.y,i,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(c)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,r=t.currPaths,i=t.color,n=this.w,o=e.x,a=e.x1,s=e.barYPosition,l=r.x,c=r.x1,u=r.barYPosition,h=s+r.barHeight,d=new Pc(this.barCtx.ctx),p=new f,g=d.move(a,h)+d.line(o,h)+d.line(l,u)+d.line(c,u)+d.line(a,h)+("around"===n.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return d.drawPath({d:g,fill:p.shadeColor(.5,f.rgb2hex(i)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,r=t.i,i=t.j,n=this.w,o=0,a=0;return(n.config.plotOptions.bar.horizontal?n.globals.series.map((function(t,e){return e})):(null===(e=n.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=n.globals.seriesPercent[t][i];e&&o++,t-1})),i=this.barCtx.columnGroupIndices,n=i.indexOf(r);return n<0&&(i.push(r),n=i.length-1),{groupIndex:r,columnGroupIndex:n}}}],r&&Ip(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zp(t){return zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zp(t)}function Xp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Dp(t){for(var e=1;ethis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var a=0,s=0;a0&&(this.visibleI=this.visibleI+1);var x=0,w=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[y],this.translationsIndex=y);var S=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();p=k.y,x=k.barHeight,c=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,l=k.xDivision,u=k.zeroH,this.isHorizontal||b.push(d+w/2);var A=i.group({class:"apexcharts-datalabels","data:realIndex":y});r.globals.delayedElements.push({el:A.node}),A.node.classList.add("apexcharts-element-hidden");var O=i.group({class:"apexcharts-bar-goals-markers"}),P=i.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:P.node}),P.node.classList.add("apexcharts-element-hidden");for(var C=0;C0){var L,I=this.barHelpers.drawBarShadow({color:"string"==typeof M.color&&-1===(null===(L=M.color)||void 0===L?void 0:L.indexOf("url"))?M.color:f.hexToRgba(r.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});P.add(I),r.config.chart.dropShadow.enabled&&new vc(this.ctx).dropShadow(I,r.config.chart.dropShadow,y)}this.pathArr.push(T);var _=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:x,barWidth:w});_&&O.add(_),p=T.y,d=T.x,C>0&&b.push(d+w/2),g.push(p),this.renderSeries(Dp(Dp({realIndex:y,pathFill:M.color},M.useRangeColor?{lineFill:M.color}:{}),{},{j:C,i:a,columnGroupIndex:v,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:j,elSeries:m,x:d,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:x),barWidth:Math.abs(T.barWidth?T.barWidth:w),elDataLabelsWrap:A,elGoalsMarkers:O,elBarShadows:P,visibleSeries:this.visibleI,type:"bar"}))}r.globals.seriesXvalues[y]=b,r.globals.seriesYvalues[y]=g,o.add(m)}return o}},{key:"renderSeries",value:function(t){var e=t.realIndex,r=t.pathFill,i=t.lineFill,n=t.j,o=t.i,a=t.columnGroupIndex,s=t.pathFrom,l=t.pathTo,c=t.strokeWidth,u=t.elSeries,h=t.x,f=t.y,d=t.y1,p=t.y2,g=t.series,b=t.barHeight,y=t.barWidth,v=t.barXPosition,m=t.barYPosition,x=t.elDataLabelsWrap,w=t.elGoalsMarkers,S=t.elBarShadows,k=t.visibleSeries,A=t.type,O=t.classes,P=this.w,C=new Pc(this.ctx);if(!i){var j="function"==typeof P.globals.stroke.colors[e]?function(t){var e,r=P.config.stroke.colors;return Array.isArray(r)&&r.length>0&&((e=r[t])||(e=""),"function"==typeof e)?e({value:P.globals.series[t][n],dataPointIndex:n,w:P}):e}(e):P.globals.stroke.colors[e];i=this.barOptions.distributed?P.globals.stroke.colors[n]:j}P.config.series[o].data[n]&&P.config.series[o].data[n].strokeColor&&(i=P.config.series[o].data[n].strokeColor),this.isNullValue&&(r="none");var T=n/P.config.chart.animations.animateGradually.delay*(P.config.chart.animations.speed/P.globals.dataPoints)/2.4,E=C.renderPaths({i:o,j:n,realIndex:e,pathFrom:s,pathTo:l,stroke:i,strokeWidth:c,strokeLineCap:P.config.stroke.lineCap,fill:r,animationDelay:T,initialSpeed:P.config.chart.animations.speed,dataChangeSpeed:P.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(A,"-area ").concat(O),chartType:A});E.attr("clip-path","url(#gridRectBarMask".concat(P.globals.cuid,")"));var M=P.config.forecastDataPoints;M.count>0&&n>=P.globals.dataPoints-M.count&&(E.node.setAttribute("stroke-dasharray",M.dashArray),E.node.setAttribute("stroke-width",M.strokeWidth),E.node.setAttribute("fill-opacity",M.fillOpacity)),void 0!==d&&void 0!==p&&(E.attr("data-range-y1",d),E.attr("data-range-y2",p)),new vc(this.ctx).setSelectionFilter(E,e,n),u.add(E);var L=new Pp(this).handleBarDataLabels({x:h,y:f,y1:d,y2:p,i:o,j:n,series:g,realIndex:e,columnGroupIndex:a,barHeight:b,barWidth:y,barXPosition:v,barYPosition:m,renderedPath:E,visibleSeries:k});return null!==L.dataLabels&&x.add(L.dataLabels),L.totalDataLabels&&x.add(L.totalDataLabels),u.add(x),w&&u.add(w),S&&u.add(S),u}},{key:"drawBarPaths",value:function(t){var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.yDivision,c=t.elSeries,u=this.w,h=r.i,f=r.j;if(u.globals.isXNumeric)e=(s=(u.globals.seriesX[h][f]-u.globals.minX)/this.invertedXRatio-i)+i*this.visibleI;else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var d=0,p=0;u.globals.seriesPercent.forEach((function(t,e){t[f]&&d++,e0&&(i=this.seriesLen*i/d),e=s+i*this.visibleI,e-=i*p}else e=s+i*this.visibleI;this.isFunnel&&(o-=(this.barHelpers.getXForValue(this.series[h][f],o)-o)/2),a=this.barHelpers.getXForValue(this.series[h][f],o);var g=this.barHelpers.getBarpaths({barYPosition:e,barHeight:i,x1:o,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,i:h,j:f,w:u});return u.globals.isXNumeric||(s+=l),this.barHelpers.barBackground({j:f,i:h,y1:e-i*this.visibleI,y2:i*this.seriesLen,elSeries:c}),{pathTo:g.pathTo,pathFrom:g.pathFrom,x1:o,x:a,y:s,goalX:this.barHelpers.getGoalValues("x",o,null,h,f),barYPosition:e,barHeight:i}}},{key:"drawColumnPaths",value:function(t){var e,r=t.indexes,i=t.x,n=t.y,o=t.xDivision,a=t.barWidth,s=t.zeroH,l=t.strokeWidth,c=t.elSeries,u=this.w,h=r.realIndex,f=r.translationsIndex,d=r.i,p=r.j,g=r.bc;if(u.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:i,j:p,realIndex:h,barWidth:a});i=b.x,e=b.barXPosition}else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var y=this.barHelpers.getZeroValueEncounters({i:d,j:p}),v=y.nonZeroColumns,m=y.zeroEncounters;v>0&&(a=this.seriesLen*a/v),e=i+a*this.visibleI,e-=a*m}else e=i+a*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][p],s,f);var x=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:a,y1:s,y2:n,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:h,i:d,j:p,w:u});return u.globals.isXNumeric||(i+=o),this.barHelpers.barBackground({bc:g,j:p,i:d,x1:e-l/2-a*this.visibleI,x2:a*this.seriesLen+l/2,elSeries:c}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:i,y:n,goalY:this.barHelpers.getGoalValues("y",null,s,d,p,f),barXPosition:e,barWidth:a}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,r=t.barWidth,i=t.realIndex,n=t.j,o=this.w,a=i;return o.globals.seriesX[i].length||(a=o.globals.maxValsInArrayIndex),f.isNumber(o.globals.seriesX[a][n])&&(e=(o.globals.seriesX[a][n]-o.globals.minX)/this.xRatio-r*this.seriesLen/2),{barXPosition:e+r*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var r,i=this.w,n=0;n0&&parseInt(o.realIndex,10)===parseInt(t,10)&&void 0!==i.globals.previousPaths[n].paths[e]&&(r=i.globals.previousPaths[n].paths[e].d)}return r}}],r&&Hp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Np=Bp;function Wp(t){return Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wp(t)}function Gp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Vp(t){for(var e=1;e1&&(r.yaxisIndex=i.globals.seriesYAxisReverseMap[p][0],x=p),r.isReversed=i.config.yaxis[r.yaxisIndex]&&i.config.yaxis[r.yaxisIndex].reversed;var w=r.graphics.group({class:"apexcharts-series",seriesName:f.escapeString(i.globals.seriesNames[p]),rel:n+1,"data:realIndex":p});r.ctx.series.addCollapsedClassToSeries(w,p);var S=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),k=r.graphics.group({class:"apexcharts-bar-goals-markers"}),A=0,O=0,P=r.initialPositions(a,s,c,u,h,d,x);s=P.y,A=P.barHeight,u=P.yDivision,d=P.zeroW,a=P.x,O=P.barWidth,c=P.xDivision,h=P.zeroH,i.globals.barHeight=A,i.globals.barWidth=O,r.barHelpers.initializeStackedXYVars(r),1===r.groupCtx.prevY.length&&r.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(r.groupCtx.prevY[0]=r.groupCtx.prevY[0].map((function(){return h})),r.groupCtx.prevYF[0]=r.groupCtx.prevYF[0].map((function(){return 0})));for(var C=0;C0||"top"===r.barHelpers.arrBorderRadius[p][C]&&i.globals.series[p][C]<0)&&(I=_),w=r.renderSeries(Vp(Vp({realIndex:p,pathFill:L.color},L.useRangeColor?{lineFill:L.color}:{}),{},{j:C,i:n,columnGroupIndex:y,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:j,elSeries:w,x:a,y:s,series:t,barHeight:A,barWidth:O,elDataLabelsWrap:S,elGoalsMarkers:k,type:"bar",visibleSeries:y,classes:I}))}i.globals.seriesXvalues[p]=v,i.globals.seriesYvalues[p]=m,r.groupCtx.prevY.push(r.groupCtx.yArrj),r.groupCtx.prevYF.push(r.groupCtx.yArrjF),r.groupCtx.prevYVal.push(r.groupCtx.yArrjVal),r.groupCtx.prevX.push(r.groupCtx.xArrj),r.groupCtx.prevXF.push(r.groupCtx.xArrjF),r.groupCtx.prevXVal.push(r.groupCtx.xArrjVal),o.add(w)},c=0,u=0;c1?l=(r=c.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(h).indexOf("%")?l=parseInt(h,10):l*=parseInt(h,10)/100,n=this.isReversed?this.baseLineY[a]:c.globals.gridHeight-this.baseLineY[a],t=c.globals.padHorizontal+(r-l)/2}var f=c.globals.barGroups.length||1;return{x:t,y:e,yDivision:i,xDivision:r,barHeight:s/f,barWidth:l/f,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(t){for(var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.columnGroupIndex,c=t.seriesGroup,u=t.yDivision,h=t.elSeries,f=this.w,d=s+l*i,p=r.i,g=r.j,b=r.realIndex,y=r.translationsIndex,v=0,m=0;m0){var w=o;this.groupCtx.prevXVal[x-1][g]<0?w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]+v-2*(this.isReversed?v:0):this.groupCtx.prevX[x-1][g]:this.groupCtx.prevXVal[x-1][g]>=0&&(w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]:this.groupCtx.prevX[x-1][g]-v+2*(this.isReversed?v:0)),e=w}else e=o;a=null===this.series[p][g]?e:e+this.series[p][g]/this.invertedYRatio-2*(this.isReversed?this.series[p][g]/this.invertedYRatio:0);var S=this.barHelpers.getBarpaths({barYPosition:d,barHeight:i,x1:e,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,seriesGroup:c,i:p,j:g,w:f});return this.barHelpers.barBackground({j:g,i:p,y1:d,y2:i,elSeries:h}),s+=u,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,p,g,y),barXPosition:e,barYPosition:d,x:a,y:s}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.y,n=t.xDivision,o=t.barWidth,a=t.zeroH,s=t.columnGroupIndex,l=t.seriesGroup,c=t.elSeries,u=this.w,h=e.i,f=e.j,d=e.bc,p=e.realIndex,g=e.translationsIndex;if(u.globals.isXNumeric){var b=u.globals.seriesX[p][f];b||(b=0),r=(b-u.globals.minX)/this.xRatio-o/2*u.globals.barGroups.length}for(var y,v=r+s*o,m=0,x=0;x0&&!u.globals.isXNumeric||w>0&&u.globals.isXNumeric&&u.globals.seriesX[p-1][f]===u.globals.seriesX[p][f]){var S,k,A,O=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var P=1;P=0?A-m+2*(this.isReversed?m:0):A;break}if((null===(E=this.groupCtx.prevYVal[w-j])||void 0===E?void 0:E[f])>=0){k=this.series[h][f]>=0?A:A+m-2*(this.isReversed?m:0);break}}void 0===k&&(k=u.globals.gridHeight),y=null!==(S=this.groupCtx.prevYF[0])&&void 0!==S&&S.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?a:k}else y=a;i=this.series[h][f]?y-this.series[h][f]/this.yRatio[g]+2*(this.isReversed?this.series[h][f]/this.yRatio[g]:0):y;var M=this.barHelpers.getColumnPaths({barXPosition:v,barWidth:o,y1:y,y2:i,yRatio:this.yRatio[g],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:h,j:f,w:u});return this.barHelpers.barBackground({bc:d,j:f,i:h,x1:v,x2:o,elSeries:c}),{pathTo:M.pathTo,pathFrom:M.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,a,h,f),barXPosition:v,x:u.globals.isXNumeric?r:r+n,y:i}}}],r&&qp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const eg=tg;function rg(t){return rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rg(t)}function ig(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function ng(t){for(var e=1;e0&&(i.visibleI=i.visibleI+1);var x,w,S=0;i.yRatio.length>1&&(i.yaxisIndex=n.globals.seriesYAxisReverseMap[y][0],S=y);var k=i.barHelpers.initialPositions();p=k.y,x=k.barHeight,l=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,a=k.xDivision,u=k.zeroH,b.push(d+w/2);for(var A=o.group({class:"apexcharts-datalabels","data:realIndex":y}),O=o.group({class:"apexcharts-bar-goals-markers"}),P=function(r){var o=i.barHelpers.getStrokeWidth(e,r,y),c=null,f={indexes:{i:e,j:r,realIndex:y,translationsIndex:S},x:d,y:p,strokeWidth:o,elSeries:m};c=i.isHorizontal?i.drawHorizontalBoxPaths(ng(ng({},f),{},{yDivision:l,barHeight:x,zeroW:h})):i.drawVerticalBoxPaths(ng(ng({},f),{},{xDivision:a,barWidth:w,zeroH:u})),p=c.y,d=c.x;var k=i.barHelpers.drawGoalLine({barXPosition:c.barXPosition,barYPosition:c.barYPosition,goalX:c.goalX,goalY:c.goalY,barHeight:x,barWidth:w});k&&O.add(k),r>0&&b.push(d+w/2),g.push(p),c.pathTo.forEach((function(a,l){var u=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?c.color[l]:n.globals.stroke.colors[e],h=s.fillPath({seriesNumber:y,dataPointIndex:r,color:c.color[l],value:t[e][r]});i.renderSeries({realIndex:y,pathFill:h,lineFill:u,j:r,i:e,pathFrom:c.pathFrom,pathTo:a,strokeWidth:o,elSeries:m,x:d,y:p,series:t,columnGroupIndex:v,barHeight:x,barWidth:w,elDataLabelsWrap:A,elGoalsMarkers:O,visibleSeries:i.visibleI,type:n.config.chart.type})}))},C=0;C0&&(C=this.getPreviousPath(d,u,!0)),P=this.isBoxPlot?[l.move(O,S)+l.line(O+n/2,S)+l.line(O+n/2,m)+l.line(O+n/4,m)+l.line(O+n-n/4,m)+l.line(O+n/2,m)+l.line(O+n/2,S)+l.line(O+n,S)+l.line(O+n,A)+l.line(O,A)+l.line(O,S+a/2),l.move(O,A)+l.line(O+n,A)+l.line(O+n,k)+l.line(O+n/2,k)+l.line(O+n/2,x)+l.line(O+n-n/4,x)+l.line(O+n/4,x)+l.line(O+n/2,x)+l.line(O+n/2,k)+l.line(O,k)+l.line(O,A)+"z"]:[l.move(O,k)+l.line(O+n/2,k)+l.line(O+n/2,m)+l.line(O+n/2,k)+l.line(O+n,k)+l.line(O+n,S)+l.line(O+n/2,S)+l.line(O+n/2,x)+l.line(O+n/2,S)+l.line(O,S)+l.line(O,k-a/2)],C+=l.move(O,S),s.globals.isXNumeric||(r+=i),{pathTo:P,pathFrom:C,x:r,y:k,goalY:this.barHelpers.getGoalValues("y",null,o,c,u,e.translationsIndex),barXPosition:O,color:w}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes,r=(t.x,t.y),i=t.yDivision,n=t.barHeight,o=t.zeroW,a=t.strokeWidth,s=this.w,l=new Pc(this.ctx),c=e.i,u=e.j,h=this.boxOptions.colors.lower;this.isBoxPlot&&(h=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var f=this.invertedYRatio,d=e.realIndex,p=this.getOHLCValue(d,u),g=o,b=o,y=Math.min(p.o,p.c),v=Math.max(p.o,p.c),m=p.m;s.globals.isXNumeric&&(r=(s.globals.seriesX[d][u]-s.globals.minX)/this.invertedXRatio-n/2);var x=r+n*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(y=o,v=o):(y=o+y/f,v=o+v/f,g=o+p.h/f,b=o+p.l/f,m=o+p.m/f);var w=l.move(o,x),S=l.move(y,x+n/2);return s.globals.previousPaths.length>0&&(S=this.getPreviousPath(d,u,!0)),w=[l.move(y,x)+l.line(y,x+n/2)+l.line(g,x+n/2)+l.line(g,x+n/2-n/4)+l.line(g,x+n/2+n/4)+l.line(g,x+n/2)+l.line(y,x+n/2)+l.line(y,x+n)+l.line(m,x+n)+l.line(m,x)+l.line(y+a/2,x),l.move(m,x)+l.line(m,x+n)+l.line(v,x+n)+l.line(v,x+n/2)+l.line(b,x+n/2)+l.line(b,x+n-n/4)+l.line(b,x+n/4)+l.line(b,x+n/2)+l.line(v,x+n/2)+l.line(v,x)+l.line(m,x)+"z"],S+=l.move(y,x),s.globals.isXNumeric||(r+=i),{pathTo:w,pathFrom:S,x:v,y:r,goalX:this.barHelpers.getGoalValues("x",o,null,c,u),barYPosition:x,color:h}}},{key:"getOHLCValue",value:function(t,e){var r=this.w,i=new Mc(this.ctx,r),n=i.getLogValAtSeriesIndex(r.globals.seriesCandleH[t][e],t),o=i.getLogValAtSeriesIndex(r.globals.seriesCandleO[t][e],t),a=i.getLogValAtSeriesIndex(r.globals.seriesCandleM[t][e],t),s=i.getLogValAtSeriesIndex(r.globals.seriesCandleC[t][e],t),l=i.getLogValAtSeriesIndex(r.globals.seriesCandleL[t][e],t);return{o:this.isBoxPlot?n:o,h:this.isBoxPlot?o:n,m:a,l:this.isBoxPlot?s:l,c:this.isBoxPlot?l:s}}}],r&&ag(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const dg=fg;function pg(t){return pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pg(t)}function gg(t){return function(t){if(Array.isArray(t))return bg(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return bg(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bg(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&r.colorScale.ranges.map((function(t,r){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,r,i){var n=this.w,o=1,a=n.config.plotOptions[t].shadeIntensity,s=this.determineColor(t,e,r);n.globals.hasNegs||i?o=n.config.plotOptions[t].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*a):(1-s.percent/100)*(1.25*a):s.percent<=0?1-(1+s.percent/100)*a:(1-s.percent/100)*a:(o=1-s.percent/100,"treemap"===t&&(o=(1-s.percent/100)*(1.25*a)));var l=s.color,c=new f;if(n.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var u=c.shadeColor(-1*o,s.color);l=f.hexToRgba(f.isColorHex(u)?u:f.rgb2hex(u),n.config.fill.opacity)}else{var h=c.shadeColor(o,s.color);l=f.hexToRgba(f.isColorHex(h)?h:f.rgb2hex(h),n.config.fill.opacity)}return{color:l,colorProps:s}}},{key:"determineColor",value:function(t,e,r){var i=this.w,n=i.globals.series[e][r],o=i.config.plotOptions[t],a=o.colorScale.inverse?r:e;o.distributed&&"treemap"===i.config.chart.type&&(a=r);var s=i.globals.colors[a],l=null,c=Math.min.apply(Math,gg(i.globals.series[e])),u=Math.max.apply(Math,gg(i.globals.series[e]));o.distributed||"heatmap"!==t||(c=i.globals.minY,u=i.globals.maxY),void 0!==o.colorScale.min&&(c=o.colorScale.mini.globals.maxY?o.colorScale.max:i.globals.maxY);var h=Math.abs(u)+Math.abs(c),f=100*n/(0===h?h-1e-6:h);return o.colorScale.ranges.length>0&&o.colorScale.ranges.map((function(t,e){if(n>=t.from&&n<=t.to){s=t.color,l=t.foreColor?t.foreColor:null,c=t.from,u=t.to;var r=Math.abs(u)+Math.abs(c);f=100*n/(0===r?r-1e-6:r)}})),{color:s,foreColor:l,percent:f}}},{key:"calculateDataLabels",value:function(t){var e=t.text,r=t.x,i=t.y,n=t.i,o=t.j,a=t.colorProps,s=t.fontSize,l=this.w.config.dataLabels,c=new Pc(this.ctx),u=new lh(this.ctx),h=null;if(l.enabled){h=c.group({class:"apexcharts-data-labels"});var f=l.offsetX,d=l.offsetY,p=r+f,g=i+parseFloat(l.style.fontSize)/3+d;u.plotDataLabelsText({x:p,y:g,text:e,i:n,j:o,color:a.foreColor,parent:h,fontSize:s,dataLabelsConfig:l})}return h}},{key:"addListeners",value:function(t){var e=new Pc(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}],r&&yg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xg(t){return xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xg(t)}function wg(t,e){for(var r=0;r=0;s?c++:c--){var u=r.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:f.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(u,c),e.config.chart.dropShadow.enabled){var h=e.config.chart.dropShadow;new vc(this.ctx).dropShadow(u,h,c)}for(var d=0,p=e.config.plotOptions.heatmap.shadeIntensity,g=0,b=0;b=l[c].length)break;var y=this.helpers.getShadeColor(e.config.chart.type,c,g,this.negRange),v=y.color,m=y.colorProps;"image"===e.config.fill.type&&(v=new Zu(this.ctx).fillPath({seriesNumber:c,dataPointIndex:g,opacity:e.globals.hasNegs?m.percent<0?1-(1+m.percent/100):p+m.percent/100:m.percent/100,patternID:f.randomId(),width:e.config.fill.image.width?e.config.fill.image.width:n,height:e.config.fill.image.height?e.config.fill.image.height:o}));var x=this.rectRadius,w=r.drawRect(d,a,n,o,x);if(w.attr({cx:d,cy:a}),w.node.classList.add("apexcharts-heatmap-rect"),u.add(w),w.attr({fill:v,i:c,index:c,j:g,val:t[c][g],"stroke-width":this.strokeWidth,stroke:e.config.plotOptions.heatmap.useFillColorAsStroke?v:e.globals.stroke.colors[0],color:v}),this.helpers.addListeners(w),e.config.chart.animations.enabled&&!e.globals.dataChanged){var S=1;e.globals.resized||(S=e.config.chart.animations.speed),this.animateHeatMap(w,d,a,n,o,S)}if(e.globals.dataChanged){var k=1;if(this.dynamicAnim.enabled&&e.globals.shouldAnimate){k=this.dynamicAnim.speed;var A=e.globals.previousPaths[c]&&e.globals.previousPaths[c][g]&&e.globals.previousPaths[c][g].color;A||(A="rgba(255, 255, 255, 0)"),this.animateHeatColor(w,f.isColorHex(A)?A:f.rgb2hex(A),f.isColorHex(v)?v:f.rgb2hex(v),k)}}var O=(0,e.config.dataLabels.formatter)(e.globals.series[c][g],{value:e.globals.series[c][g],seriesIndex:c,dataPointIndex:g,w:e}),P=this.helpers.calculateDataLabels({text:O,x:d+n/2,y:a+o/2,i:c,j:g,colorProps:m,series:l});null!==P&&u.add(P),d+=n,g++}a+=o,i.add(u)}var C=e.globals.yAxisScale[0].result.slice();return e.config.yaxis[0].reversed?C.unshift(""):C.push(""),e.globals.yAxisScale[0].result=C,i}},{key:"animateHeatMap",value:function(t,e,r,i,n,o){var a=new b(this.ctx);a.animateRect(t,{x:e+i/2,y:r+n/2,width:0,height:0},{x:e,y:r,width:i,height:n},o,(function(){a.animationCompleted(t)}))}},{key:"animateHeatColor",value:function(t,e,r,i){t.attr({fill:e}).animate(i).attr({fill:r})}}],r&&wg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ag(t){return Ag="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ag(t)}function Og(t,e){for(var r=0;r-1&&this.pieClicked(h),r.config.dataLabels.enabled){var w=m.x,S=m.y,k=100*p/this.fullAngle+"%";if(0!==p&&r.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(i+a):i+a=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var u=Math.PI*(c-90)/180,h=r.centerX+o*Math.cos(l),d=r.centerY+o*Math.sin(l),p=r.centerX+o*Math.cos(u),g=r.centerY+o*Math.sin(u),b=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,c),y=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,s),v=n>180?1:0,m=["M",h,d,"A",o,o,0,v,1,p,g];return e="donut"===r.chartType?[].concat(m,["L",b.x,b.y,"A",r.donutSize,r.donutSize,0,v,0,y.x,y.y,"L",h,d,"z"]).join(" "):"pie"===r.chartType||"polarArea"===r.chartType?[].concat(m,["L",r.centerX,r.centerY,"L",h,d]).join(" "):[].concat(m).join(" "),a.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,r=new Dh(this.ctx),i=new Pc(this.ctx),n=new Cg(this.ctx),o=i.group(),a=i.group(),s=r.niceScale(0,Math.ceil(this.maxY),0),l=s.result.reverse(),c=s.result.length;this.maxY=s.niceMax;for(var u=e.globals.radialSize,h=u/(c-1),f=0;f1&&t.total.show&&(n=t.total.color);var a=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),s=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");r=(0,t.value.formatter)(r,o),i||"function"!=typeof t.total.formatter||(r=t.total.formatter(o));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,o):"",null!==a&&(a.textContent=e),null!==s&&(s.textContent=r),null!==a&&(a.style.fill=n)}},{key:"printDataLabelsInner",value:function(t,e){var r=this.w,i=t.getAttribute("data:value"),n=r.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];r.globals.series.length>1&&this.printInnerLabels(e,n,i,t);var o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==o&&(o.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,r=this.w,i=new Pc(this.ctx),n=r.config.plotOptions.polarArea.spokes;if(0!==n.strokeWidth){for(var o=[],a=360/r.globals.series.length,s=0;s0&&(g=e.getPreviousPath(a));for(var b=0;b=10?t.x>0?(r="start",i+=10):t.x<0&&(r="end",i-=10):r="middle",Math.abs(t.y)>=e-10&&(t.y<0?n-=10:t.y>0&&(n+=10)),{textAnchor:r,newX:i,newY:n}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,r=null,i=0;i0&&parseInt(n.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[i].paths[0]&&(r=e.globals.previousPaths[i].paths[0].d)}return r}},{key:"getDataPointsPos",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var i=[],n=0;n=360&&(f=360-Math.abs(this.startAngle)-.1);var d=r.drawPath({d:"",stroke:u,strokeWidth:a*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var p=c.dropShadow;n.dropShadow(d,p)}l.add(d),d.attr("id","apexcharts-radialbarTrack-"+s),this.animatePaths(d,{centerX:t.centerX,centerY:t.centerY,endAngle:f,startAngle:h,size:t.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return i}},{key:"drawArcs",value:function(t){var e=this.w,r=new Pc(this.ctx),i=new Zu(this.ctx),n=new vc(this.ctx),o=r.group(),a=this.getStrokeWidth(t);t.size=t.size-a/2;var s=e.config.plotOptions.radialBar.hollow.background,l=t.size-a*t.series.length-this.margin*t.series.length-a*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(s=this.drawHollowImage(t,o,l,s));var u=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:s||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var h=e.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(u,h)}var d=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(d=0);var p=null;if(this.radialDataLabels.show){var g=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");p=this.renderInnerDataLabels(g,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:d})}"back"===e.config.plotOptions.radialBar.hollow.position&&(o.add(u),p&&o.add(p));var b=!1;e.config.plotOptions.radialBar.inverseOrder&&(b=!0);for(var y=b?t.series.length-1:0;b?y>=0:y100?100:t.series[y])/100,k=Math.round(this.totalAngle*S)+this.startAngle,A=void 0;e.globals.dataChanged&&(w=this.startAngle,A=Math.round(this.totalAngle*f.negToZero(e.globals.previousPaths[y])/100)+w),Math.abs(k)+Math.abs(x)>360&&(k-=.01),Math.abs(A)+Math.abs(w)>360&&(A-=.01);var O=k-x,P=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[y]:e.config.stroke.dashArray,C=r.drawPath({d:"",stroke:m,strokeWidth:a,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+y,strokeDashArray:P});if(Pc.setAttrs(C.node,{"data:angle":O,"data:value":t.series[y]}),e.config.chart.dropShadow.enabled){var j=e.config.chart.dropShadow;n.dropShadow(C,j,y)}if(n.setSelectionFilter(C,0,y),this.addListeners(C,this.radialDataLabels),v.add(C),C.attr({index:0,j:y}),this.barLabels.enabled){var T=f.polarToCartesian(t.centerX,t.centerY,t.size,x),E=this.barLabels.formatter(e.globals.seriesNames[y],{seriesIndex:y,w:e}),M=["apexcharts-radialbar-label"];this.barLabels.onClick||M.push("apexcharts-no-click");var L=this.barLabels.useSeriesColors?e.globals.colors[y]:e.config.chart.foreColor;L||(L=e.config.chart.foreColor);var I=T.x+this.barLabels.offsetX,_=T.y+this.barLabels.offsetY,R=r.drawText({x:I,y:_,text:E,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:L,cssClass:M.join(" ")});R.on("click",this.onBarLabelClick),R.attr({rel:y+1}),0!==x&&R.attr({"transform-origin":"".concat(I," ").concat(_),transform:"rotate(".concat(x," 0 0)")}),v.add(R)}var z=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(z=e.config.chart.animations.speed),e.globals.dataChanged&&(z=e.config.chart.animations.dynamicAnimation.speed),this.animDur=z/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(C,{centerX:t.centerX,centerY:t.centerY,endAngle:k,startAngle:x,prevEndAngle:A,prevStartAngle:w,size:t.size,i:y,totalItems:2,animBeginArr:this.animBeginArr,dur:z,shouldSetPrevPaths:!0})}return{g:o,elHollow:u,dataLabels:p}}},{key:"drawHollow",value:function(t){var e=new Pc(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,r,i){var n=this.w,o=new Zu(this.ctx),a=f.randomId(),s=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:r,height:r,image:s,patternID:"pattern".concat(n.globals.cuid).concat(a)}),i="url(#pattern".concat(n.globals.cuid).concat(a,")");else{var l=n.config.plotOptions.radialBar.hollow.imageWidth,c=n.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var u=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-e.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(u)}else{var h=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-l/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(h)}}return i}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,r=this.barLabels.onClick,i=this.w;r&&r(i.globals.seriesNames[e],{w:i,seriesIndex:e})}}],r&&Bg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Lg);const $g=Zg;function Jg(t){return Jg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jg(t)}function Qg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Kg(t){for(var e=1;e0&&(this.visibleI=this.visibleI+1);var b=0,y=0,v=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],v=d);var m=this.barHelpers.initialPositions();h=m.y,c=m.zeroW,u=m.x,y=m.barWidth,b=m.barHeight,a=m.xDivision,s=m.yDivision,l=m.zeroH;for(var x=i.group({class:"apexcharts-datalabels","data:realIndex":d}),w=i.group({class:"apexcharts-rangebar-goals-markers"}),S=0;S0}));return this.isHorizontal?(i=f.config.plotOptions.bar.rangeBarGroupRows?o+c*y:o+s*this.visibleI+c*y,v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(i=(s=h.barHeight/d.length)*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+s*(this.visibleI+d.indexOf(p))+c*y)):(y>-1&&!f.globals.timescaleLabels.length&&(n=f.config.plotOptions.bar.rangeBarGroupRows?a+u*y:a+l*this.visibleI+u*y),v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(n=(l=h.barWidth/d.length)*this.visibleI+u*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+d.indexOf(p))+u*y)),{barYPosition:i,barXPosition:n,barHeight:s,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.xDivision,n=t.barWidth,o=t.barXPosition,a=t.zeroH,s=this.w,l=e.i,c=e.j,u=e.realIndex,h=e.translationsIndex,f=this.yRatio[h],d=this.getRangeValue(u,c),p=Math.min(d.start,d.end),g=Math.max(d.start,d.end);void 0===this.series[l][c]||null===this.series[l][c]?p=a:(p=a-p/f,g=a-g/f);var b=Math.abs(g-p),y=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:n,y1:p,y2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:u,i:u,j:c,w:s});if(s.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:r,j:c,realIndex:u,barWidth:n});r=v.x,o=v.barXPosition}else r+=i;return{pathTo:y.pathTo,pathFrom:y.pathFrom,barHeight:b,x:r,y:d.start<0&&d.end<0?p:g,goalY:this.barHelpers.getGoalValues("y",null,a,l,c,h),barXPosition:o}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,r=t.y,i=t.y1,n=t.y2,o=t.yDivision,a=t.barHeight,s=t.barYPosition,l=t.zeroW,c=this.w,u=e.realIndex,h=e.j,f=this.preventBarOverflow(l+i/this.invertedYRatio),d=this.preventBarOverflow(l+n/this.invertedYRatio),p=this.getRangeValue(u,h),g=Math.abs(d-f),b=this.barHelpers.getBarpaths({barYPosition:s,barHeight:a,x1:f,x2:d,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:u,realIndex:u,j:h,w:c});return c.globals.isXNumeric||(r+=o),{pathTo:b.pathTo,pathFrom:b.pathFrom,barWidth:g,x:p.start<0&&p.end<0?f:d,goalX:this.barHelpers.getGoalValues("x",l,null,u,h),y:r}}},{key:"getRangeValue",value:function(t,e){var r=this.w;return{start:r.globals.seriesRangeStart[t][e],end:r.globals.seriesRangeEnd[t][e]}}}],r&&eb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const lb=sb;function cb(t){return cb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cb(t)}function ub(t,e){for(var r=0;r0&&parseInt(a.realIndex,10)===parseInt(i,10)&&("line"===a.type?(this.lineCtx.appendPathFrom=!1,e=n.globals.previousPaths[o].paths[0].d):"area"===a.type&&(this.lineCtx.appendPathFrom=!1,r=n.globals.previousPaths[o].paths[0].d,n.config.stroke.show&&n.globals.previousPaths[o].paths[1]&&(e=n.globals.previousPaths[o].paths[1].d)))}return{pathFromLine:e,pathFromArea:r}}},{key:"determineFirstPrevY",value:function(t){var e,r,i,n=t.i,o=t.realIndex,a=t.series,s=t.prevY,l=t.lineYPosition,c=t.translationsIndex,u=this.w,h=u.config.chart.stacked&&!u.globals.comboCharts||u.config.chart.stacked&&u.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[o])||void 0===r?void 0:r.type));if(void 0!==(null===(i=a[n])||void 0===i?void 0:i[0]))s=(l=h&&n>0?this.lineCtx.prevSeriesY[n-1][0]:this.lineCtx.zeroY)-a[n][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?a[n][0]/this.lineCtx.yRatio[c]:0);else if(h&&n>0&&void 0===a[n][0])for(var f=n-1;f>=0;f--)if(null!==a[f][0]&&void 0!==a[f][0]){s=l=this.lineCtx.prevSeriesY[f][0];break}return{prevY:s,lineYPosition:l}}}],r&&ub(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),db=function(t){var e=function(t){for(var e,r,i,n,o=function(t){for(var e=[],r=t[0],i=t[1],n=e[0]=gb(r,i),o=1,a=t.length-1;o9&&(n=3*i/Math.sqrt(n),o[l]=n*e,o[l+1]=n*r);for(var c=0;c<=a;c++)n=(t[Math.min(a,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),s.push([n||0,o[c]*n||0]);return s}(t),r=t[1],i=t[0],n=[],o=e[1],a=e[0];n.push(i,[i[0]+a[0],i[1]+a[1],r[0]-o[0],r[1]-o[1],r[0],r[1]]);for(var s=2,l=e.length;s1&&i[1].length<6){var n=i[0].length;i[1]=[2*i[0][n-2]-i[0][n-4],2*i[0][n-1]-i[0][n-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function gb(t,e){return(e[1]-t[1])/(e[0]-t[0])}function bb(t){return bb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bb(t)}function yb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function vb(t){for(var e=1;e1?f:0;this._initSerieVariables(t,h,f);var p=[],g=[],b=[],y=o.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),o.globals.isXNumeric&&o.globals.seriesX.length>0&&(y=(o.globals.seriesX[f][0]-o.globals.minX)/this.xRatio),b.push(y);var v,m=y,x=void 0,w=m,S=this.zeroY,k=this.zeroY;S=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:t,prevY:S,lineYPosition:0,translationsIndex:d}).prevY,"monotoneCubic"===o.config.stroke.curve&&null===t[h][0]?p.push(null):p.push(S),v=S,"rangeArea"===s&&(x=k=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:i,prevY:k,lineYPosition:0,translationsIndex:d}).prevY,g.push(null!==p[0]?k:null));var A=this._calculatePathsFrom({type:s,series:t,i:h,realIndex:f,translationsIndex:d,prevX:w,prevY:S,prevY2:k}),O=[p[0]],P=[g[0]],C={type:s,series:t,realIndex:f,translationsIndex:d,i:h,x:y,y:1,pX:m,pY:v,pathsFrom:A,linePaths:[],areaPaths:[],seriesIndex:r,lineYPosition:0,xArrj:b,yArrj:p,y2Arrj:g,seriesRangeEnd:i},j=this._iterateOverDataPoints(vb(vb({},C),{},{iterations:"rangeArea"===s?t[h].length-1:void 0,isRangeStart:!0}));if("rangeArea"===s){for(var T=this._calculatePathsFrom({series:i,i:h,realIndex:f,prevX:w,prevY:k}),E=this._iterateOverDataPoints(vb(vb({},C),{},{series:i,xArrj:[y],yArrj:O,y2Arrj:P,pY:x,areaPaths:j.areaPaths,pathsFrom:T,iterations:i[h].length-1,isRangeStart:!1})),M=j.linePaths.length/2,L=0;L=0;I--)l.add(u[I]);else for(var _=0;_1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[r],o=r),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.globals.gridHeight-this.baseLineY[o]-(this.isReversed?i.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[o]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.globals.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=n.group({class:"apexcharts-series",zIndex:void 0!==i.config.series[r].zIndex?i.config.series[r].zIndex:r,seriesName:f.escapeString(i.globals.seriesNames[r])}),this.elPointsMain=n.group({class:"apexcharts-series-markers-wrap","data:realIndex":r}),this.elDataLabelsWrap=n.group({class:"apexcharts-datalabels","data:realIndex":r});var a=t[e].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":a,rel:e+1,"data:realIndex":r}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,r,i,n,o=t.type,a=t.series,s=t.i,l=t.realIndex,c=t.translationsIndex,u=t.prevX,h=t.prevY,f=t.prevY2,d=this.w,p=new Pc(this.ctx);if(null===a[s][0]){for(var g=0;g0){var b=this.lineHelpers.checkPreviousPaths({pathFromLine:i,pathFromArea:n,realIndex:l});i=b.pathFromLine,n=b.pathFromArea}return{prevX:u,prevY:h,linePath:e,areaPath:r,pathFromLine:i,pathFromArea:n}}},{key:"_handlePaths",value:function(t){var e=t.type,r=t.realIndex,i=t.i,n=t.paths,o=this.w,a=new Pc(this.ctx),s=new Zu(this.ctx);this.prevSeriesY.push(n.yArrj),o.globals.seriesXvalues[r]=n.xArrj,o.globals.seriesYvalues[r]=n.yArrj;var l=o.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var c=o.globals.seriesXvalues[r][o.globals.seriesXvalues[r].length-l.count-1],u=a.drawRect(c,0,o.globals.gridWidth,o.globals.gridHeight,0);o.globals.dom.elForecastMask.appendChild(u.node);var h=a.drawRect(0,0,c,o.globals.gridHeight,0);o.globals.dom.elNonForecastMask.appendChild(h.node)}this.pointsChart||o.globals.delayedElements.push({el:this.elPointsMain.node,index:r});var f={i,realIndex:r,animationDelay:i,initialSpeed:o.config.chart.animations.speed,dataChangeSpeed:o.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var d=s.fillPath({seriesNumber:r}),p=0;p0&&"rangeArea"!==e){var S=a.renderPaths(x);S.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&S.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(S),S.attr("clip-path","url(#forecastMask".concat(o.globals.cuid,")")),w.attr("clip-path","url(#nonForecastMask".concat(o.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,r,i=this,n=t.type,o=t.series,a=t.iterations,s=t.realIndex,l=t.translationsIndex,c=t.i,u=t.x,h=t.y,d=t.pX,p=t.pY,g=t.pathsFrom,b=t.linePaths,y=t.areaPaths,v=t.seriesIndex,m=t.lineYPosition,x=t.xArrj,w=t.yArrj,S=t.y2Arrj,k=t.isRangeStart,A=t.seriesRangeEnd,O=this.w,P=new Pc(this.ctx),C=this.yRatio,j=g.prevY,T=g.linePath,E=g.areaPath,M=g.pathFromLine,L=g.pathFromArea,I=f.isNumber(O.globals.minYArr[s])?O.globals.minYArr[s]:O.globals.minY;a||(a=O.globals.dataPoints>1?O.globals.dataPoints-1:O.globals.dataPoints);var _=function(t,e){return e-t/C[l]+2*(i.isReversed?t/C[l]:0)},R=h,z=O.config.chart.stacked&&!O.globals.comboCharts||O.config.chart.stacked&&O.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[s])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[s])||void 0===r?void 0:r.type)),X=O.config.stroke.curve;Array.isArray(X)&&(X=Array.isArray(v)?X[v[c]]:X[c]);for(var D,Y=0,H=0;H0&&O.globals.collapsedSeries.length0;e--){if(!(O.globals.collapsedSeriesIndices.indexOf((null==v?void 0:v[e])||e)>-1))return e;e--}return 0}(c-1)][H+1]:this.zeroY,F?h=_(I,m):(h=_(o[c][H+1],m),"rangeArea"===n&&(R=_(A[c][H+1],m))),x.push(null===o[c][H+1]?null:u),!F||"smooth"!==O.config.stroke.curve&&"monotoneCubic"!==O.config.stroke.curve?(w.push(h),S.push(R)):(w.push(null),S.push(null));var N=this.lineHelpers.calculatePoints({series:o,x:u,y:h,realIndex:s,i:c,j:H,prevY:j}),W=this._createPaths({type:n,series:o,i:c,realIndex:s,j:H,x:u,y:h,y2:R,xArrj:x,yArrj:w,y2Arrj:S,pX:d,pY:p,pathState:Y,segmentStartX:D,linePath:T,areaPath:E,linePaths:b,areaPaths:y,curve:X,isRangeStart:k});y=W.areaPaths,b=W.linePaths,d=W.pX,p=W.pY,Y=W.pathState,D=W.segmentStartX,E=W.areaPath,T=W.linePath,!this.appendPathFrom||O.globals.hasNullValues||"monotoneCubic"===X&&"rangeArea"===n||(M+=P.line(u,this.areaBottomY),L+=P.line(u,this.areaBottomY)),this.handleNullDataPoints(o,N,c,H,s),this._handleMarkersAndLabels({type:n,pointsPos:N,i:c,j:H,realIndex:s,isRangeStart:k})}return{yArrj:w,xArrj:x,pathFromArea:L,areaPaths:y,pathFromLine:M,linePaths:b,linePath:T,areaPath:E}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,r=t.pointsPos,i=t.isRangeStart,n=t.i,o=t.j,a=t.realIndex,s=this.w,l=new lh(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,o,{realIndex:a,pointsPos:r,zRatio:this.zRatio,elParent:this.elPointsMain});else{s.globals.series[n].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(r,a,o+1);null!==c&&this.elPointsMain.add(c)}var u=l.drawDataLabel({type:e,isRangeStart:i,pos:r,i:a,j:o+1});null!==u&&this.elDataLabelsWrap.add(u)}},{key:"_createPaths",value:function(t){var e,r=t.type,i=t.series,n=t.i,o=(t.realIndex,t.j),a=t.x,s=t.y,l=t.xArrj,c=t.yArrj,u=t.y2,h=t.y2Arrj,f=t.pX,d=t.pY,p=t.pathState,g=t.segmentStartX,b=t.linePath,y=t.areaPath,v=t.linePaths,m=t.areaPaths,x=t.curve,w=t.isRangeStart,S=new Pc(this.ctx),k=this.areaBottomY,A="rangeArea"===r,O="rangeArea"===r&&w;switch(x){case"monotoneCubic":var P=w?c:h;switch(p){case 0:if(null===P[o+1])break;p=1;case 1:if(!(A?l.length===i[n].length:o===i[n].length-2))break;case 2:var C=w?l:l.slice().reverse(),j=w?P:P.slice().reverse(),T=(e=j,C.map((function(t,r){return[t,e[r]]})).filter((function(t){return null!==t[1]}))),E=T.length>1?db(T):T,M=[];A&&(O?m=T:M=m.reverse());var L=0,I=0;if(function(t,e){for(var r=function(t){var e=[],r=0;return t.forEach((function(t){null!==t?r++:r>0&&(e.push(r),r=0)})),r>0&&e.push(r),e}(t),i=[],n=0,o=0;n