-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdatagrid.js.map
1 lines (1 loc) · 922 KB
/
datagrid.js.map
1
{"version":3,"sources":["<anon>"],"sourcesContent":["/**\n * @license Highcharts Dashboards v3.1.0 (2024-12-04)\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n */\n(function (root, factory) {\n if (typeof module === 'object' && module.exports) {\n factory['default'] = factory;\n module.exports = (root && root.document) ?\n factory(root) :\n factory;\n } else if (typeof define === 'function' && define.amd) {\n define('datagrid/datagrid', function () {\n return factory(root);\n });\n } else {\n if (root.DataGrid) {\n root.DataGrid.error(16, true);\n }\n root.DataGrid = factory(root);\n }\n}(typeof window !== 'undefined' ? window : this, function (window) {\n 'use strict';\n var _modules = {};\n function _registerModule(obj, path, args, fn) {\n if (!obj.hasOwnProperty(path)) {\n obj[path] = fn.apply(null, args);\n\n if (window && typeof CustomEvent === 'function') {\n window.dispatchEvent(new CustomEvent(\n 'DataGridModuleLoaded',\n { detail: { path: path, module: obj[path] } }\n ));\n }\n }\n }\n _registerModule(_modules, 'Core/Globals.js', [], function () {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n /* *\n *\n * Namespace\n *\n * */\n /**\n * Shared Highcharts properties.\n * @private\n */\n var Globals;\n (function (Globals) {\n /* *\n *\n * Constants\n *\n * */\n Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '3.1.0', Globals.win = (typeof window !== 'undefined' ?\n window :\n {}), // eslint-disable-line node/no-unsupported-features/es-builtins\n Globals.doc = Globals.win.document, Globals.svg = (Globals.doc &&\n Globals.doc.createElementNS &&\n !!Globals.doc.createElementNS(Globals.SVG_NS, 'svg').createSVGRect), Globals.userAgent = (Globals.win.navigator && Globals.win.navigator.userAgent) || '', Globals.isChrome = Globals.win.chrome, Globals.isFirefox = Globals.userAgent.indexOf('Firefox') !== -1, Globals.isMS = /(edge|msie|trident)/i.test(Globals.userAgent) && !Globals.win.opera, Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1, Globals.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(Globals.userAgent), Globals.isWebKit = Globals.userAgent.indexOf('AppleWebKit') !== -1, Globals.deg2rad = Math.PI * 2 / 360, Globals.marginNames = [\n 'plotTop',\n 'marginRight',\n 'marginBottom',\n 'plotLeft'\n ], Globals.noop = function () { }, Globals.supportsPassiveEvents = (function () {\n // Checks whether the browser supports passive events, (#11353).\n let supportsPassive = false;\n // Object.defineProperty doesn't work on IE as well as passive\n // events - instead of using polyfill, we can exclude IE totally.\n if (!Globals.isMS) {\n const opts = Object.defineProperty({}, 'passive', {\n get: function () {\n supportsPassive = true;\n }\n });\n if (Globals.win.addEventListener && Globals.win.removeEventListener) {\n Globals.win.addEventListener('testPassive', Globals.noop, opts);\n Globals.win.removeEventListener('testPassive', Globals.noop, opts);\n }\n }\n return supportsPassive;\n }());\n /**\n * An array containing the current chart objects in the page. A chart's\n * position in the array is preserved throughout the page's lifetime. When\n * a chart is destroyed, the array item becomes `undefined`.\n *\n * @name Highcharts.charts\n * @type {Array<Highcharts.Chart|undefined>}\n */\n Globals.charts = [];\n /**\n * A shared registry between all bundles to keep track of applied\n * compositions.\n * @private\n */\n Globals.composed = [];\n /**\n * A hook for defining additional date format specifiers. New\n * specifiers are defined as key-value pairs by using the\n * specifier as key, and a function which takes the timestamp as\n * value. This function returns the formatted portion of the\n * date.\n *\n * Using `dateFormats` is also a convenient way to define new keys for\n * complex locale-aware date formats compatible with the\n * [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)\n * browser API, whenever the built-in formats are not sufficient.\n *\n * @sample highcharts/global/dateformats/\n * Adding support for week number\n * @sample highcharts/global/dateformats-object/\n * A locale-aware date format using `Intl.DateTimeFormat`\n *\n * @name Highcharts.dateFormats\n * @type {Record<string, Highcharts.TimeFormatCallbackFunction>}\n */\n Globals.dateFormats = {};\n /**\n * @private\n * @deprecated\n * @todo Use only `Core/Series/SeriesRegistry.seriesTypes`\n */\n Globals.seriesTypes = {};\n /**\n * @private\n */\n Globals.symbolSizes = {};\n /* *\n *\n * Properties\n *\n * */\n // eslint-disable-next-line prefer-const\n Globals.chartCount = 0;\n })(Globals || (Globals = {}));\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Theme options that should get applied to the chart. In module mode it\n * might not be possible to change this property because of read-only\n * restrictions, instead use {@link Highcharts.setOptions}.\n *\n * @deprecated\n * @name Highcharts.theme\n * @type {Highcharts.Options}\n */\n (''); // Keeps doclets above in JS file\n\n return Globals;\n });\n _registerModule(_modules, 'Core/Utilities.js', [_modules['Core/Globals.js']], function (H) {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n const { charts, doc, win } = H;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Provide error messages for debugging, with links to online explanation. This\n * function can be overridden to provide custom error handling.\n *\n * @sample highcharts/chart/highcharts-error/\n * Custom error handler\n *\n * @function Highcharts.error\n *\n * @param {number|string} code\n * The error code. See\n * [errors.xml](https://github.com/highcharts/highcharts/blob/master/errors/errors.xml)\n * for available codes. If it is a string, the error message is printed\n * directly in the console.\n *\n * @param {boolean} [stop=false]\n * Whether to throw an error or just log a warning in the console.\n *\n * @param {Highcharts.Chart} [chart]\n * Reference to the chart that causes the error. Used in 'debugger'\n * module to display errors directly on the chart.\n * Important note: This argument is undefined for errors that lack\n * access to the Chart instance. In such case, the error will be\n * displayed on the last created chart.\n *\n * @param {Highcharts.Dictionary<string>} [params]\n * Additional parameters for the generated message.\n *\n * @return {void}\n */\n function error(code, stop, chart, params) {\n const severity = stop ? 'Highcharts error' : 'Highcharts warning';\n if (code === 32) {\n code = `${severity}: Deprecated member`;\n }\n const isCode = isNumber(code);\n let message = isCode ?\n `${severity} #${code}: www.highcharts.com/errors/${code}/` :\n code.toString();\n const defaultHandler = function () {\n if (stop) {\n throw new Error(message);\n }\n // Else ...\n if (win.console &&\n error.messages.indexOf(message) === -1 // Prevent console flooting\n ) {\n console.warn(message); // eslint-disable-line no-console\n }\n };\n if (typeof params !== 'undefined') {\n let additionalMessages = '';\n if (isCode) {\n message += '?';\n }\n objectEach(params, function (value, key) {\n additionalMessages += `\\n - ${key}: ${value}`;\n if (isCode) {\n message += encodeURI(key) + '=' + encodeURI(value);\n }\n });\n message += additionalMessages;\n }\n fireEvent(H, 'displayError', { chart, code, message, params }, defaultHandler);\n error.messages.push(message);\n }\n (function (error) {\n error.messages = [];\n })(error || (error = {}));\n /**\n * Utility function to deep merge two or more objects and return a third object.\n * If the first argument is true, the contents of the second object is copied\n * into the first object. The merge function can also be used with a single\n * object argument to create a deep copy of an object.\n *\n * @function Highcharts.merge<T>\n *\n * @param {true | T} extendOrSource\n * Whether to extend the left-side object,\n * or the first object to merge as a deep copy.\n *\n * @param {...Array<object|undefined>} [sources]\n * Object(s) to merge into the previous one.\n *\n * @return {T}\n * The merged object. If the first argument is true, the return is the\n * same as the second argument.\n */\n function merge(extendOrSource, ...sources) {\n let i, args = [extendOrSource, ...sources], ret = {};\n const doCopy = function (copy, original) {\n // An object is replacing a primitive\n if (typeof copy !== 'object') {\n copy = {};\n }\n objectEach(original, function (value, key) {\n // Prototype pollution (#14883)\n if (key === '__proto__' || key === 'constructor') {\n return;\n }\n // Copy the contents of objects, but not arrays or DOM nodes\n if (isObject(value, true) &&\n !isClass(value) &&\n !isDOMElement(value)) {\n copy[key] = doCopy(copy[key] || {}, value);\n // Primitives and arrays are copied over directly\n }\n else {\n copy[key] = original[key];\n }\n });\n return copy;\n };\n // If first argument is true, copy into the existing object. Used in\n // setOptions.\n if (extendOrSource === true) {\n ret = args[1];\n args = Array.prototype.slice.call(args, 2);\n }\n // For each argument, extend the return\n const len = args.length;\n for (i = 0; i < len; i++) {\n ret = doCopy(ret, args[i]);\n }\n return ret;\n }\n /**\n * Constrain a value to within a lower and upper threshold.\n *\n * @private\n * @param {number} value The initial value\n * @param {number} min The lower threshold\n * @param {number} max The upper threshold\n * @return {number} Returns a number value within min and max.\n */\n function clamp(value, min, max) {\n return value > min ? value < max ? value : max : min;\n }\n /**\n * Utility for crisping a line position to the nearest full pixel depening on\n * the line width\n * @param {number} value The raw pixel position\n * @param {number} lineWidth The line width\n * @param {boolean} [inverted] Whether the containing group is inverted.\n * Crisping round numbers on the y-scale need to go\n * to the other side because the coordinate system\n * is flipped (scaleY is -1)\n * @return {number} The pixel position to use for a crisp display\n */\n function crisp(value, lineWidth = 0, inverted) {\n const mod = lineWidth % 2 / 2, inverter = inverted ? -1 : 1;\n return (Math.round(value * inverter - mod) + mod) * inverter;\n }\n // eslint-disable-next-line valid-jsdoc\n /**\n * Return the deep difference between two objects. It can either return the new\n * properties, or optionally return the old values of new properties.\n * @private\n */\n function diffObjects(newer, older, keepOlder, collectionsWithUpdate) {\n const ret = {};\n /**\n * Recurse over a set of options and its current values, and store the\n * current values in the ret object.\n */\n function diff(newer, older, ret, depth) {\n const keeper = keepOlder ? older : newer;\n objectEach(newer, function (newerVal, key) {\n if (!depth &&\n collectionsWithUpdate &&\n collectionsWithUpdate.indexOf(key) > -1 &&\n older[key]) {\n newerVal = splat(newerVal);\n ret[key] = [];\n // Iterate over collections like series, xAxis or yAxis and map\n // the items by index.\n for (let i = 0; i < Math.max(newerVal.length, older[key].length); i++) {\n // Item exists in current data (#6347)\n if (older[key][i]) {\n // If the item is missing from the new data, we need to\n // save the whole config structure. Like when\n // responsively updating from a dual axis layout to a\n // single axis and back (#13544).\n if (newerVal[i] === void 0) {\n ret[key][i] = older[key][i];\n // Otherwise, proceed\n }\n else {\n ret[key][i] = {};\n diff(newerVal[i], older[key][i], ret[key][i], depth + 1);\n }\n }\n }\n }\n else if (isObject(newerVal, true) &&\n !newerVal.nodeType // #10044\n ) {\n ret[key] = isArray(newerVal) ? [] : {};\n diff(newerVal, older[key] || {}, ret[key], depth + 1);\n // Delete empty nested objects\n if (Object.keys(ret[key]).length === 0 &&\n // Except colorAxis which is a special case where the empty\n // object means it is enabled. Which is unfortunate and we\n // should try to find a better way.\n !(key === 'colorAxis' && depth === 0)) {\n delete ret[key];\n }\n }\n else if (newer[key] !== older[key] ||\n // If the newer key is explicitly undefined, keep it (#10525)\n (key in newer && !(key in older))) {\n if (key !== '__proto__' && key !== 'constructor') {\n ret[key] = keeper[key];\n }\n }\n });\n }\n diff(newer, older, ret, 0);\n return ret;\n }\n /**\n * Shortcut for parseInt\n *\n * @private\n * @function Highcharts.pInt\n *\n * @param {*} s\n * any\n *\n * @param {number} [mag]\n * Magnitude\n *\n * @return {number}\n * number\n */\n function pInt(s, mag) {\n return parseInt(s, mag || 10);\n }\n /**\n * Utility function to check for string type.\n *\n * @function Highcharts.isString\n *\n * @param {*} s\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a string.\n */\n function isString(s) {\n return typeof s === 'string';\n }\n /**\n * Utility function to check if an item is an array.\n *\n * @function Highcharts.isArray\n *\n * @param {*} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is an array.\n */\n function isArray(obj) {\n const str = Object.prototype.toString.call(obj);\n return str === '[object Array]' || str === '[object Array Iterator]';\n }\n /**\n * Utility function to check if an item is of type object.\n *\n * @function Highcharts.isObject\n *\n * @param {*} obj\n * The item to check.\n *\n * @param {boolean} [strict=false]\n * Also checks that the object is not an array.\n *\n * @return {boolean}\n * True if the argument is an object.\n */\n function isObject(obj, strict) {\n return (!!obj &&\n typeof obj === 'object' &&\n (!strict || !isArray(obj))); // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n /**\n * Utility function to check if an Object is a HTML Element.\n *\n * @function Highcharts.isDOMElement\n *\n * @param {*} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a HTML Element.\n */\n function isDOMElement(obj) {\n return isObject(obj) && typeof obj.nodeType === 'number';\n }\n /**\n * Utility function to check if an Object is a class.\n *\n * @function Highcharts.isClass\n *\n * @param {object|undefined} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a class.\n */\n function isClass(obj) {\n const c = obj && obj.constructor;\n return !!(isObject(obj, true) &&\n !isDOMElement(obj) &&\n (c && c.name && c.name !== 'Object'));\n }\n /**\n * Utility function to check if an item is a number and it is finite (not NaN,\n * Infinity or -Infinity).\n *\n * @function Highcharts.isNumber\n *\n * @param {*} n\n * The item to check.\n *\n * @return {boolean}\n * True if the item is a finite number\n */\n function isNumber(n) {\n return typeof n === 'number' && !isNaN(n) && n < Infinity && n > -Infinity;\n }\n /**\n * Remove the last occurence of an item from an array.\n *\n * @function Highcharts.erase\n *\n * @param {Array<*>} arr\n * The array.\n *\n * @param {*} item\n * The item to remove.\n *\n * @return {void}\n */\n function erase(arr, item) {\n let i = arr.length;\n while (i--) {\n if (arr[i] === item) {\n arr.splice(i, 1);\n break;\n }\n }\n }\n /**\n * Insert a series or an axis in a collection with other items, either the\n * chart series or yAxis series or axis collections, in the correct order\n * according to the index option and whether it is internal. Used internally\n * when adding series and axes.\n *\n * @private\n * @function Highcharts.Chart#insertItem\n * @param {Highcharts.Series|Highcharts.Axis} item\n * The item to insert\n * @param {Array<Highcharts.Series>|Array<Highcharts.Axis>} collection\n * A collection of items, like `chart.series` or `xAxis.series`.\n * @return {number} The index of the series in the collection.\n */\n function insertItem(item, collection) {\n const indexOption = item.options.index, length = collection.length;\n let i;\n for (\n // Internal item (navigator) should always be pushed to the end\n i = item.options.isInternal ? length : 0; i < length + 1; i++) {\n if (\n // No index option, reached the end of the collection,\n // equivalent to pushing\n !collection[i] ||\n // Handle index option, the element to insert has lower index\n (isNumber(indexOption) &&\n indexOption < pick(collection[i].options.index, collection[i]._i)) ||\n // Insert the new item before other internal items\n // (navigator)\n collection[i].options.isInternal) {\n collection.splice(i, 0, item);\n break;\n }\n }\n return i;\n }\n /**\n * Adds an item to an array, if it is not present in the array.\n *\n * @function Highcharts.pushUnique\n *\n * @param {Array<unknown>} array\n * The array to add the item to.\n *\n * @param {unknown} item\n * The item to add.\n *\n * @return {boolean}\n * Returns true, if the item was not present and has been added.\n */\n function pushUnique(array, item) {\n return array.indexOf(item) < 0 && !!array.push(item);\n }\n /**\n * Check if an object is null or undefined.\n *\n * @function Highcharts.defined\n *\n * @param {*} obj\n * The object to check.\n *\n * @return {boolean}\n * False if the object is null or undefined, otherwise true.\n */\n function defined(obj) {\n return typeof obj !== 'undefined' && obj !== null;\n }\n /**\n * Set or get an attribute or an object of attributes.\n *\n * To use as a setter, pass a key and a value, or let the second argument be a\n * collection of keys and values. When using a collection, passing a value of\n * `null` or `undefined` will remove the attribute.\n *\n * To use as a getter, pass only a string as the second argument.\n *\n * @function Highcharts.attr\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} elem\n * The DOM element to receive the attribute(s).\n *\n * @param {string|Highcharts.HTMLAttributes|Highcharts.SVGAttributes} [keyOrAttribs]\n * The property or an object of key-value pairs.\n *\n * @param {number|string} [value]\n * The value if a single property is set.\n *\n * @return {string|null|undefined}\n * When used as a getter, return the value.\n */\n function attr(elem, keyOrAttribs, value) {\n const isGetter = isString(keyOrAttribs) && !defined(value);\n let ret;\n const attrSingle = (value, key) => {\n // Set the value\n if (defined(value)) {\n elem.setAttribute(key, value);\n // Get the value\n }\n else if (isGetter) {\n ret = elem.getAttribute(key);\n // IE7 and below cannot get class through getAttribute (#7850)\n if (!ret && key === 'class') {\n ret = elem.getAttribute(key + 'Name');\n }\n // Remove the value\n }\n else {\n elem.removeAttribute(key);\n }\n };\n // If keyOrAttribs is a string\n if (isString(keyOrAttribs)) {\n attrSingle(value, keyOrAttribs);\n // Else if keyOrAttribs is defined, it is a hash of key/value pairs\n }\n else {\n objectEach(keyOrAttribs, attrSingle);\n }\n return ret;\n }\n /**\n * Check if an element is an array, and if not, make it into an array.\n *\n * @function Highcharts.splat\n *\n * @param {*} obj\n * The object to splat.\n *\n * @return {Array}\n * The produced or original array.\n */\n function splat(obj) {\n return isArray(obj) ? obj : [obj];\n }\n /**\n * Set a timeout if the delay is given, otherwise perform the function\n * synchronously.\n *\n * @function Highcharts.syncTimeout\n *\n * @param {Function} fn\n * The function callback.\n *\n * @param {number} delay\n * Delay in milliseconds.\n *\n * @param {*} [context]\n * An optional context to send to the function callback.\n *\n * @return {number}\n * An identifier for the timeout that can later be cleared with\n * Highcharts.clearTimeout. Returns -1 if there is no timeout.\n */\n function syncTimeout(fn, delay, context) {\n if (delay > 0) {\n return setTimeout(fn, delay, context);\n }\n fn.call(0, context);\n return -1;\n }\n /**\n * Internal clear timeout. The function checks that the `id` was not removed\n * (e.g. by `chart.destroy()`). For the details see\n * [issue #7901](https://github.com/highcharts/highcharts/issues/7901).\n *\n * @function Highcharts.clearTimeout\n *\n * @param {number|undefined} id\n * Id of a timeout.\n */\n function internalClearTimeout(id) {\n if (defined(id)) {\n clearTimeout(id);\n }\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Utility function to extend an object with the members of another.\n *\n * @function Highcharts.extend<T>\n *\n * @param {T|undefined} a\n * The object to be extended.\n *\n * @param {Partial<T>} b\n * The object to add to the first one.\n *\n * @return {T}\n * Object a, the original object.\n */\n function extend(a, b) {\n /* eslint-enable valid-jsdoc */\n let n;\n if (!a) {\n a = {};\n }\n for (n in b) { // eslint-disable-line guard-for-in\n a[n] = b[n];\n }\n return a;\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Return the first value that is not null or undefined.\n *\n * @function Highcharts.pick<T>\n *\n * @param {...Array<T|null|undefined>} items\n * Variable number of arguments to inspect.\n *\n * @return {T}\n * The value of the first argument that is not null or undefined.\n */\n function pick() {\n const args = arguments;\n const length = args.length;\n for (let i = 0; i < length; i++) {\n const arg = args[i];\n if (typeof arg !== 'undefined' && arg !== null) {\n return arg;\n }\n }\n }\n /**\n * Set CSS on a given element.\n *\n * @function Highcharts.css\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} el\n * An HTML DOM element.\n *\n * @param {Highcharts.CSSObject} styles\n * Style object with camel case property names.\n *\n * @return {void}\n */\n function css(el, styles) {\n extend(el.style, styles);\n }\n /**\n * Utility function to create an HTML element with attributes and styles.\n *\n * @function Highcharts.createElement\n *\n * @param {string} tag\n * The HTML tag.\n *\n * @param {Highcharts.HTMLAttributes} [attribs]\n * Attributes as an object of key-value pairs.\n *\n * @param {Highcharts.CSSObject} [styles]\n * Styles as an object of key-value pairs.\n *\n * @param {Highcharts.HTMLDOMElement} [parent]\n * The parent HTML object.\n *\n * @param {boolean} [nopad=false]\n * If true, remove all padding, border and margin.\n *\n * @return {Highcharts.HTMLDOMElement}\n * The created DOM element.\n */\n function createElement(tag, attribs, styles, parent, nopad) {\n const el = doc.createElement(tag);\n if (attribs) {\n extend(el, attribs);\n }\n if (nopad) {\n css(el, { padding: '0', border: 'none', margin: '0' });\n }\n if (styles) {\n css(el, styles);\n }\n if (parent) {\n parent.appendChild(el);\n }\n return el;\n }\n // eslint-disable-next-line valid-jsdoc\n /**\n * Extend a prototyped class by new members.\n *\n * @deprecated\n * @function Highcharts.extendClass<T>\n *\n * @param {Highcharts.Class<T>} parent\n * The parent prototype to inherit.\n *\n * @param {Highcharts.Dictionary<*>} members\n * A collection of prototype members to add or override compared to the\n * parent prototype.\n *\n * @return {Highcharts.Class<T>}\n * A new prototype.\n */\n function extendClass(parent, members) {\n const obj = (function () { });\n obj.prototype = new parent(); // eslint-disable-line new-cap\n extend(obj.prototype, members);\n return obj;\n }\n /**\n * Left-pad a string to a given length by adding a character repetitively.\n *\n * @function Highcharts.pad\n *\n * @param {number} number\n * The input string or number.\n *\n * @param {number} [length]\n * The desired string length.\n *\n * @param {string} [padder=0]\n * The character to pad with.\n *\n * @return {string}\n * The padded string.\n */\n function pad(number, length, padder) {\n return new Array((length || 2) +\n 1 -\n String(number)\n .replace('-', '')\n .length).join(padder || '0') + number;\n }\n /**\n * Return a length based on either the integer value, or a percentage of a base.\n *\n * @function Highcharts.relativeLength\n *\n * @param {Highcharts.RelativeSize} value\n * A percentage string or a number.\n *\n * @param {number} base\n * The full length that represents 100%.\n *\n * @param {number} [offset=0]\n * A pixel offset to apply for percentage values. Used internally in\n * axis positioning.\n *\n * @return {number}\n * The computed length.\n */\n function relativeLength(value, base, offset) {\n return (/%$/).test(value) ?\n (base * parseFloat(value) / 100) + (offset || 0) :\n parseFloat(value);\n }\n /**\n * Replaces text in a string with a given replacement in a loop to catch nested\n * matches after previous replacements.\n *\n * @function Highcharts.replaceNested\n *\n * @param {string} text\n * Text to search and modify.\n *\n * @param {...Array<(RegExp|string)>} replacements\n * One or multiple tuples with search pattern (`[0]: (string|RegExp)`) and\n * replacement (`[1]: string`) for matching text.\n *\n * @return {string}\n * Text with replacements.\n */\n function replaceNested(text, ...replacements) {\n let previous, replacement;\n do {\n previous = text;\n for (replacement of replacements) {\n text = text.replace(replacement[0], replacement[1]);\n }\n } while (text !== previous);\n return text;\n }\n /**\n * Wrap a method with extended functionality, preserving the original function.\n *\n * @function Highcharts.wrap\n *\n * @param {*} obj\n * The context object that the method belongs to. In real cases, this is\n * often a prototype.\n *\n * @param {string} method\n * The name of the method to extend.\n *\n * @param {Highcharts.WrapProceedFunction} func\n * A wrapper function callback. This function is called with the same\n * arguments as the original function, except that the original function\n * is unshifted and passed as the first argument.\n */\n function wrap(obj, method, func) {\n const proceed = obj[method];\n obj[method] = function () {\n const outerArgs = arguments, scope = this;\n return func.apply(this, [\n function () {\n return proceed.apply(scope, arguments.length ? arguments : outerArgs);\n }\n ].concat([].slice.call(arguments)));\n };\n }\n /**\n * Get the magnitude of a number.\n *\n * @function Highcharts.getMagnitude\n *\n * @param {number} num\n * The number.\n *\n * @return {number}\n * The magnitude, where 1-9 are magnitude 1, 10-99 magnitude 2 etc.\n */\n function getMagnitude(num) {\n return Math.pow(10, Math.floor(Math.log(num) / Math.LN10));\n }\n /**\n * Take an interval and normalize it to multiples of round numbers.\n *\n * @deprecated\n * @function Highcharts.normalizeTickInterval\n *\n * @param {number} interval\n * The raw, un-rounded interval.\n *\n * @param {Array<*>} [multiples]\n * Allowed multiples.\n *\n * @param {number} [magnitude]\n * The magnitude of the number.\n *\n * @param {boolean} [allowDecimals]\n * Whether to allow decimals.\n *\n * @param {boolean} [hasTickAmount]\n * If it has tickAmount, avoid landing on tick intervals lower than\n * original.\n *\n * @return {number}\n * The normalized interval.\n *\n * @todo\n * Move this function to the Axis prototype. It is here only for historical\n * reasons.\n */\n function normalizeTickInterval(interval, multiples, magnitude, allowDecimals, hasTickAmount) {\n let i, retInterval = interval;\n // Round to a tenfold of 1, 2, 2.5 or 5\n magnitude = pick(magnitude, getMagnitude(interval));\n const normalized = interval / magnitude;\n // Multiples for a linear scale\n if (!multiples) {\n multiples = hasTickAmount ?\n // Finer grained ticks when the tick amount is hard set, including\n // when alignTicks is true on multiple axes (#4580).\n [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] :\n // Else, let ticks fall on rounder numbers\n [1, 2, 2.5, 5, 10];\n // The allowDecimals option\n if (allowDecimals === false) {\n if (magnitude === 1) {\n multiples = multiples.filter(function (num) {\n return num % 1 === 0;\n });\n }\n else if (magnitude <= 0.1) {\n multiples = [1 / magnitude];\n }\n }\n }\n // Normalize the interval to the nearest multiple\n for (i = 0; i < multiples.length; i++) {\n retInterval = multiples[i];\n // Only allow tick amounts smaller than natural\n if ((hasTickAmount &&\n retInterval * magnitude >= interval) ||\n (!hasTickAmount &&\n (normalized <=\n (multiples[i] +\n (multiples[i + 1] || multiples[i])) / 2))) {\n break;\n }\n }\n // Multiply back to the correct magnitude. Correct floats to appropriate\n // precision (#6085).\n retInterval = correctFloat(retInterval * magnitude, -Math.round(Math.log(0.001) / Math.LN10));\n return retInterval;\n }\n /**\n * Sort an object array and keep the order of equal items. The ECMAScript\n * standard does not specify the behaviour when items are equal.\n *\n * @function Highcharts.stableSort\n *\n * @param {Array<*>} arr\n * The array to sort.\n *\n * @param {Function} sortFunction\n * The function to sort it with, like with regular Array.prototype.sort.\n */\n function stableSort(arr, sortFunction) {\n // @todo It seems like Chrome since v70 sorts in a stable way internally,\n // plus all other browsers do it, so over time we may be able to remove this\n // function\n const length = arr.length;\n let sortValue, i;\n // Add index to each item\n for (i = 0; i < length; i++) {\n arr[i].safeI = i; // Stable sort index\n }\n arr.sort(function (a, b) {\n sortValue = sortFunction(a, b);\n return sortValue === 0 ? a.safeI - b.safeI : sortValue;\n });\n // Remove index from items\n for (i = 0; i < length; i++) {\n delete arr[i].safeI; // Stable sort index\n }\n }\n /**\n * Non-recursive method to find the lowest member of an array. `Math.min` raises\n * a maximum call stack size exceeded error in Chrome when trying to apply more\n * than 150.000 points. This method is slightly slower, but safe.\n *\n * @function Highcharts.arrayMin\n *\n * @param {Array<*>} data\n * An array of numbers.\n *\n * @return {number}\n * The lowest number.\n */\n function arrayMin(data) {\n let i = data.length, min = data[0];\n while (i--) {\n if (data[i] < min) {\n min = data[i];\n }\n }\n return min;\n }\n /**\n * Non-recursive method to find the lowest member of an array. `Math.max` raises\n * a maximum call stack size exceeded error in Chrome when trying to apply more\n * than 150.000 points. This method is slightly slower, but safe.\n *\n * @function Highcharts.arrayMax\n *\n * @param {Array<*>} data\n * An array of numbers.\n *\n * @return {number}\n * The highest number.\n */\n function arrayMax(data) {\n let i = data.length, max = data[0];\n while (i--) {\n if (data[i] > max) {\n max = data[i];\n }\n }\n return max;\n }\n /**\n * Utility method that destroys any SVGElement instances that are properties on\n * the given object. It loops all properties and invokes destroy if there is a\n * destroy method. The property is then delete.\n *\n * @function Highcharts.destroyObjectProperties\n *\n * @param {*} obj\n * The object to destroy properties on.\n *\n * @param {*} [except]\n * Exception, do not destroy this property, only delete it.\n */\n function destroyObjectProperties(obj, except, destructablesOnly) {\n objectEach(obj, function (val, n) {\n // If the object is non-null and destroy is defined\n if (val !== except && val?.destroy) {\n // Invoke the destroy\n val.destroy();\n }\n // Delete the property from the object\n if (val?.destroy || !destructablesOnly) {\n delete obj[n];\n }\n });\n }\n /**\n * Discard a HTML element\n *\n * @function Highcharts.discardElement\n *\n * @param {Highcharts.HTMLDOMElement} element\n * The HTML node to discard.\n */\n function discardElement(element) {\n if (element && element.parentElement) {\n element.parentElement.removeChild(element);\n }\n }\n /**\n * Fix JS round off float errors.\n *\n * @function Highcharts.correctFloat\n *\n * @param {number} num\n * A float number to fix.\n *\n * @param {number} [prec=14]\n * The precision.\n *\n * @return {number}\n * The corrected float number.\n */\n function correctFloat(num, prec) {\n // When the number is higher than 1e14 use the number (#16275)\n return num > 1e14 ? num : parseFloat(num.toPrecision(prec || 14));\n }\n /**\n * The time unit lookup\n *\n * @ignore\n */\n const timeUnits = {\n millisecond: 1,\n second: 1000,\n minute: 60000,\n hour: 3600000,\n day: 24 * 3600000,\n week: 7 * 24 * 3600000,\n month: 28 * 24 * 3600000,\n year: 364 * 24 * 3600000\n };\n /**\n * Easing definition\n *\n * @private\n * @function Math.easeInOutSine\n *\n * @param {number} pos\n * Current position, ranging from 0 to 1.\n *\n * @return {number}\n * Ease result\n */\n Math.easeInOutSine = function (pos) {\n return -0.5 * (Math.cos(Math.PI * pos) - 1);\n };\n /**\n * Convenience function to get the align factor, used several places for\n * computing positions\n * @private\n */\n const getAlignFactor = (align = '') => ({\n center: 0.5,\n right: 1,\n middle: 0.5,\n bottom: 1\n }[align] || 0);\n /**\n * Find the closest distance between two values of a two-dimensional array\n * @private\n * @function Highcharts.getClosestDistance\n *\n * @param {Array<Array<number>>} arrays\n * An array of arrays of numbers\n *\n * @return {number | undefined}\n * The closest distance between values\n */\n function getClosestDistance(arrays, onError) {\n const allowNegative = !onError;\n let closest, loopLength, distance, i;\n arrays.forEach((xData) => {\n if (xData.length > 1) {\n loopLength = xData.length - 1;\n for (i = loopLength; i > 0; i--) {\n distance = xData[i] - xData[i - 1];\n if (distance < 0 && !allowNegative) {\n onError?.();\n // Only one call\n onError = void 0;\n }\n else if (distance && (typeof closest === 'undefined' || distance < closest)) {\n closest = distance;\n }\n }\n }\n });\n return closest;\n }\n /**\n * Returns the value of a property path on a given object.\n *\n * @private\n * @function getNestedProperty\n *\n * @param {string} path\n * Path to the property, for example `custom.myValue`.\n *\n * @param {unknown} obj\n * Instance containing the property on the specific path.\n *\n * @return {unknown}\n * The unknown property value.\n */\n function getNestedProperty(path, parent) {\n const pathElements = path.split('.');\n while (pathElements.length && defined(parent)) {\n const pathElement = pathElements.shift();\n // Filter on the key\n if (typeof pathElement === 'undefined' ||\n pathElement === '__proto__') {\n return; // Undefined\n }\n if (pathElement === 'this') {\n let thisProp;\n if (isObject(parent)) {\n thisProp = parent['@this'];\n }\n return thisProp ?? parent;\n }\n const child = parent[pathElement];\n // Filter on the child\n if (!defined(child) ||\n typeof child === 'function' ||\n typeof child.nodeType === 'number' ||\n child === win) {\n return; // Undefined\n }\n // Else, proceed\n parent = child;\n }\n return parent;\n }\n /**\n * Get the computed CSS value for given element and property, only for numerical\n * properties. For width and height, the dimension of the inner box (excluding\n * padding) is returned. Used for fitting the chart within the container.\n *\n * @function Highcharts.getStyle\n *\n * @param {Highcharts.HTMLDOMElement} el\n * An HTML element.\n *\n * @param {string} prop\n * The property name.\n *\n * @param {boolean} [toInt=true]\n * Parse to integer.\n *\n * @return {number|string|undefined}\n * The style value.\n */\n function getStyle(el, prop, toInt) {\n let style;\n // For width and height, return the actual inner pixel size (#4913)\n if (prop === 'width') {\n let offsetWidth = Math.min(el.offsetWidth, el.scrollWidth);\n // In flex boxes, we need to use getBoundingClientRect and floor it,\n // because scrollWidth doesn't support subpixel precision (#6427) ...\n const boundingClientRectWidth = el.getBoundingClientRect &&\n el.getBoundingClientRect().width;\n // ...unless if the containing div or its parents are transform-scaled\n // down, in which case the boundingClientRect can't be used as it is\n // also scaled down (#9871, #10498).\n if (boundingClientRectWidth < offsetWidth &&\n boundingClientRectWidth >= offsetWidth - 1) {\n offsetWidth = Math.floor(boundingClientRectWidth);\n }\n return Math.max(0, // #8377\n (offsetWidth -\n (getStyle(el, 'padding-left', true) || 0) -\n (getStyle(el, 'padding-right', true) || 0)));\n }\n if (prop === 'height') {\n return Math.max(0, // #8377\n (Math.min(el.offsetHeight, el.scrollHeight) -\n (getStyle(el, 'padding-top', true) || 0) -\n (getStyle(el, 'padding-bottom', true) || 0)));\n }\n // Otherwise, get the computed style\n const css = win.getComputedStyle(el, void 0); // eslint-disable-line no-undefined\n if (css) {\n style = css.getPropertyValue(prop);\n if (pick(toInt, prop !== 'opacity')) {\n style = pInt(style);\n }\n }\n return style;\n }\n /**\n * Return the value of the first element in the array that satisfies the\n * provided testing function.\n *\n * @function Highcharts.find<T>\n *\n * @param {Array<T>} arr\n * The array to test.\n *\n * @param {Function} callback\n * The callback function. The function receives the item as the first\n * argument. Return `true` if this item satisfies the condition.\n *\n * @return {T|undefined}\n * The value of the element.\n */\n const find = Array.prototype.find ?\n function (arr, callback) {\n return arr.find(callback);\n } :\n // Legacy implementation. PhantomJS, IE <= 11 etc. #7223.\n function (arr, callback) {\n let i;\n const length = arr.length;\n for (i = 0; i < length; i++) {\n if (callback(arr[i], i)) { // eslint-disable-line node/callback-return\n return arr[i];\n }\n }\n };\n /**\n * Get the element's offset position, corrected for `overflow: auto`.\n *\n * @function Highcharts.offset\n *\n * @param {global.Element} el\n * The DOM element.\n *\n * @return {Highcharts.OffsetObject}\n * An object containing `left` and `top` properties for the position in\n * the page.\n */\n function offset(el) {\n const docElem = doc.documentElement, box = (el.parentElement || el.parentNode) ?\n el.getBoundingClientRect() :\n { top: 0, left: 0, width: 0, height: 0 };\n return {\n top: box.top + (win.pageYOffset || docElem.scrollTop) -\n (docElem.clientTop || 0),\n left: box.left + (win.pageXOffset || docElem.scrollLeft) -\n (docElem.clientLeft || 0),\n width: box.width,\n height: box.height\n };\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Iterate over object key pairs in an object.\n *\n * @function Highcharts.objectEach<T>\n *\n * @param {*} obj\n * The object to iterate over.\n *\n * @param {Highcharts.ObjectEachCallbackFunction<T>} fn\n * The iterator callback. It passes three arguments:\n * * value - The property value.\n * * key - The property key.\n * * obj - The object that objectEach is being applied to.\n *\n * @param {T} [ctx]\n * The context.\n */\n function objectEach(obj, fn, ctx) {\n /* eslint-enable valid-jsdoc */\n for (const key in obj) {\n if (Object.hasOwnProperty.call(obj, key)) {\n fn.call(ctx || obj[key], obj[key], key, obj);\n }\n }\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Add an event listener.\n *\n * @function Highcharts.addEvent<T>\n *\n * @param {Highcharts.Class<T>|T} el\n * The element or object to add a listener to. It can be a\n * {@link HTMLDOMElement}, an {@link SVGElement} or any other object.\n *\n * @param {string} type\n * The event type.\n *\n * @param {Highcharts.EventCallbackFunction<T>|Function} fn\n * The function callback to execute when the event is fired.\n *\n * @param {Highcharts.EventOptionsObject} [options]\n * Options for adding the event.\n *\n * @sample highcharts/members/addevent\n * Use a general `render` event to draw shapes on a chart\n *\n * @return {Function}\n * A callback function to remove the added event.\n */\n function addEvent(el, type, fn, options = {}) {\n /* eslint-enable valid-jsdoc */\n // Add hcEvents to either the prototype (in case we're running addEvent on a\n // class) or the instance. If hasOwnProperty('hcEvents') is false, it is\n // inherited down the prototype chain, in which case we need to set the\n // property on this instance (which may itself be a prototype).\n const owner = typeof el === 'function' && el.prototype || el;\n if (!Object.hasOwnProperty.call(owner, 'hcEvents')) {\n owner.hcEvents = {};\n }\n const events = owner.hcEvents;\n // Allow click events added to points, otherwise they will be prevented by\n // the TouchPointer.pinch function after a pinch zoom operation (#7091).\n if (H.Point && // Without H a dependency loop occurs\n el instanceof H.Point &&\n el.series &&\n el.series.chart) {\n el.series.chart.runTrackerClick = true;\n }\n // Handle DOM events\n // If the browser supports passive events, add it to improve performance\n // on touch events (#11353).\n const addEventListener = el.addEventListener;\n if (addEventListener) {\n addEventListener.call(el, type, fn, H.supportsPassiveEvents ? {\n passive: options.passive === void 0 ?\n type.indexOf('touch') !== -1 : options.passive,\n capture: false\n } : false);\n }\n if (!events[type]) {\n events[type] = [];\n }\n const eventObject = {\n fn,\n order: typeof options.order === 'number' ? options.order : Infinity\n };\n events[type].push(eventObject);\n // Order the calls\n events[type].sort((a, b) => a.order - b.order);\n // Return a function that can be called to remove this event.\n return function () {\n removeEvent(el, type, fn);\n };\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Remove an event that was added with {@link Highcharts#addEvent}.\n *\n * @function Highcharts.removeEvent<T>\n *\n * @param {Highcharts.Class<T>|T} el\n * The element to remove events on.\n *\n * @param {string} [type]\n * The type of events to remove. If undefined, all events are removed\n * from the element.\n *\n * @param {Highcharts.EventCallbackFunction<T>} [fn]\n * The specific callback to remove. If undefined, all events that match\n * the element and optionally the type are removed.\n *\n * @return {void}\n */\n function removeEvent(el, type, fn) {\n /* eslint-enable valid-jsdoc */\n /**\n * @private\n */\n function removeOneEvent(type, fn) {\n const removeEventListener = el.removeEventListener;\n if (removeEventListener) {\n removeEventListener.call(el, type, fn, false);\n }\n }\n /**\n * @private\n */\n function removeAllEvents(eventCollection) {\n let types, len;\n if (!el.nodeName) {\n return; // Break on non-DOM events\n }\n if (type) {\n types = {};\n types[type] = true;\n }\n else {\n types = eventCollection;\n }\n objectEach(types, function (_val, n) {\n if (eventCollection[n]) {\n len = eventCollection[n].length;\n while (len--) {\n removeOneEvent(n, eventCollection[n][len].fn);\n }\n }\n });\n }\n const owner = typeof el === 'function' && el.prototype || el;\n if (Object.hasOwnProperty.call(owner, 'hcEvents')) {\n const events = owner.hcEvents;\n if (type) {\n const typeEvents = (events[type] || []);\n if (fn) {\n events[type] = typeEvents.filter(function (obj) {\n return fn !== obj.fn;\n });\n removeOneEvent(type, fn);\n }\n else {\n removeAllEvents(events);\n events[type] = [];\n }\n }\n else {\n removeAllEvents(events);\n delete owner.hcEvents;\n }\n }\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Fire an event that was registered with {@link Highcharts#addEvent}.\n *\n * @function Highcharts.fireEvent<T>\n *\n * @param {T} el\n * The object to fire the event on. It can be a {@link HTMLDOMElement},\n * an {@link SVGElement} or any other object.\n *\n * @param {string} type\n * The type of event.\n *\n * @param {Highcharts.Dictionary<*>|Event} [eventArguments]\n * Custom event arguments that are passed on as an argument to the event\n * handler.\n *\n * @param {Highcharts.EventCallbackFunction<T>|Function} [defaultFunction]\n * The default function to execute if the other listeners haven't\n * returned false.\n *\n * @return {void}\n */\n function fireEvent(el, type, eventArguments, defaultFunction) {\n /* eslint-enable valid-jsdoc */\n eventArguments = eventArguments || {};\n if (doc.createEvent &&\n (el.dispatchEvent ||\n (el.fireEvent &&\n // Enable firing events on Highcharts instance.\n el !== H))) {\n const e = doc.createEvent('Events');\n e.initEvent(type, true, true);\n eventArguments = extend(e, eventArguments);\n if (el.dispatchEvent) {\n el.dispatchEvent(eventArguments);\n }\n else {\n el.fireEvent(type, eventArguments);\n }\n }\n else if (el.hcEvents) {\n if (!eventArguments.target) {\n // We're running a custom event\n extend(eventArguments, {\n // Attach a simple preventDefault function to skip\n // default handler if called. The built-in\n // defaultPrevented property is not overwritable (#5112)\n preventDefault: function () {\n eventArguments.defaultPrevented = true;\n },\n // Setting target to native events fails with clicking\n // the zoom-out button in Chrome.\n target: el,\n // If the type is not set, we're running a custom event\n // (#2297). If it is set, we're running a browser event.\n type: type\n });\n }\n const events = [];\n let object = el;\n let multilevel = false;\n // Recurse up the inheritance chain and collect hcEvents set as own\n // objects on the prototypes.\n while (object.hcEvents) {\n if (Object.hasOwnProperty.call(object, 'hcEvents') &&\n object.hcEvents[type]) {\n if (events.length) {\n multilevel = true;\n }\n events.unshift.apply(events, object.hcEvents[type]);\n }\n object = Object.getPrototypeOf(object);\n }\n // For performance reasons, only sort the event handlers in case we are\n // dealing with multiple levels in the prototype chain. Otherwise, the\n // events are already sorted in the addEvent function.\n if (multilevel) {\n // Order the calls\n events.sort((a, b) => a.order - b.order);\n }\n // Call the collected event handlers\n events.forEach((obj) => {\n // If the event handler returns false, prevent the default handler\n // from executing\n if (obj.fn.call(el, eventArguments) === false) {\n eventArguments.preventDefault();\n }\n });\n }\n // Run the default if not prevented\n if (defaultFunction && !eventArguments.defaultPrevented) {\n defaultFunction.call(el, eventArguments);\n }\n }\n let serialMode;\n /**\n * Get a unique key for using in internal element id's and pointers. The key is\n * composed of a random hash specific to this Highcharts instance, and a\n * counter.\n *\n * @example\n * let id = uniqueKey(); // => 'highcharts-x45f6hp-0'\n *\n * @function Highcharts.uniqueKey\n *\n * @return {string}\n * A unique key.\n */\n const uniqueKey = (function () {\n const hash = Math.random().toString(36).substring(2, 9) + '-';\n let id = 0;\n return function () {\n return 'highcharts-' + (serialMode ? '' : hash) + id++;\n };\n }());\n /**\n * Activates a serial mode for element IDs provided by\n * {@link Highcharts.uniqueKey}. This mode can be used in automated tests, where\n * a simple comparison of two rendered SVG graphics is needed.\n *\n * **Note:** This is only for testing purposes and will break functionality in\n * webpages with multiple charts.\n *\n * @example\n * if (\n * process &&\n * process.env.NODE_ENV === 'development'\n * ) {\n * Highcharts.useSerialIds(true);\n * }\n *\n * @function Highcharts.useSerialIds\n *\n * @param {boolean} [mode]\n * Changes the state of serial mode.\n *\n * @return {boolean|undefined}\n * State of the serial mode.\n */\n function useSerialIds(mode) {\n return (serialMode = pick(mode, serialMode));\n }\n function isFunction(obj) {\n return typeof obj === 'function';\n }\n function ucfirst(s) {\n return ((isString(s) ?\n s.substring(0, 1).toUpperCase() + s.substring(1) :\n String(s)));\n }\n /* *\n *\n * External\n *\n * */\n // Register Highcharts as a plugin in jQuery\n if (win.jQuery) {\n /**\n * Highcharts-extended JQuery.\n *\n * @external JQuery\n */\n /**\n * Helper function to return the chart of the current JQuery selector\n * element.\n *\n * @function external:JQuery#highcharts\n *\n * @return {Highcharts.Chart}\n * The chart that is linked to the JQuery selector element.\n */ /**\n * Factory function to create a chart in the current JQuery selector\n * element.\n *\n * @function external:JQuery#highcharts\n *\n * @param {'Chart'|'Map'|'StockChart'|string} [className]\n * Name of the factory class in the Highcharts namespace.\n *\n * @param {Highcharts.Options} [options]\n * The chart options structure.\n *\n * @param {Highcharts.ChartCallbackFunction} [callback]\n * Function to run when the chart has loaded and all external\n * images are loaded. Defining a\n * [chart.events.load](https://api.highcharts.com/highcharts/chart.events.load)\n * handler is equivalent.\n *\n * @return {JQuery}\n * The current JQuery selector.\n */\n win.jQuery.fn.highcharts = function () {\n const args = [].slice.call(arguments);\n if (this[0]) { // `this[0]` is the renderTo div\n // Create the chart\n if (args[0]) {\n new H[ // eslint-disable-line computed-property-spacing, no-new\n // Constructor defaults to Chart\n isString(args[0]) ? args.shift() : 'Chart'](this[0], args[0], args[1]);\n return this;\n }\n // When called without parameters or with the return argument,\n // return an existing chart\n return charts[attr(this[0], 'data-highcharts-chart')];\n }\n };\n }\n /* *\n *\n * Default Export\n *\n * */\n // TODO use named exports when supported.\n const Utilities = {\n addEvent,\n arrayMax,\n arrayMin,\n attr,\n clamp,\n clearTimeout: internalClearTimeout,\n correctFloat,\n createElement,\n crisp,\n css,\n defined,\n destroyObjectProperties,\n diffObjects,\n discardElement,\n erase,\n error,\n extend,\n extendClass,\n find,\n fireEvent,\n getAlignFactor,\n getClosestDistance,\n getMagnitude,\n getNestedProperty,\n getStyle,\n insertItem,\n isArray,\n isClass,\n isDOMElement,\n isFunction,\n isNumber,\n isObject,\n isString,\n merge,\n normalizeTickInterval,\n objectEach,\n offset,\n pad,\n pick,\n pInt,\n pushUnique,\n relativeLength,\n removeEvent,\n replaceNested,\n splat,\n stableSort,\n syncTimeout,\n timeUnits,\n ucfirst,\n uniqueKey,\n useSerialIds,\n wrap\n };\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * An animation configuration. Animation configurations can also be defined as\n * booleans, where `false` turns off animation and `true` defaults to a duration\n * of 500ms and defer of 0ms.\n *\n * @interface Highcharts.AnimationOptionsObject\n */ /**\n * A callback function to execute when the animation finishes.\n * @name Highcharts.AnimationOptionsObject#complete\n * @type {Function|undefined}\n */ /**\n * The animation defer in milliseconds.\n * @name Highcharts.AnimationOptionsObject#defer\n * @type {number|undefined}\n */ /**\n * The animation duration in milliseconds.\n * @name Highcharts.AnimationOptionsObject#duration\n * @type {number|undefined}\n */ /**\n * The name of an easing function as defined on the `Math` object.\n * @name Highcharts.AnimationOptionsObject#easing\n * @type {string|Function|undefined}\n */ /**\n * A callback function to execute on each step of each attribute or CSS property\n * that's being animated. The first argument contains information about the\n * animation and progress.\n * @name Highcharts.AnimationOptionsObject#step\n * @type {Function|undefined}\n */\n /**\n * Creates a frame for the animated SVG element.\n *\n * @callback Highcharts.AnimationStepCallbackFunction\n *\n * @param {Highcharts.SVGElement} this\n * The SVG element to animate.\n *\n * @return {void}\n */\n /**\n * Interface description for a class.\n *\n * @interface Highcharts.Class<T>\n * @extends Function\n */ /**\n * Class constructor.\n * @function Highcharts.Class<T>#new\n * @param {...Array<*>} args\n * Constructor arguments.\n * @return {T}\n * Class instance.\n */\n /**\n * A style object with camel case property names to define visual appearance of\n * a SVG element or HTML element. The properties can be whatever styles are\n * supported on the given SVG or HTML element.\n *\n * @example\n * {\n * fontFamily: 'monospace',\n * fontSize: '1.2em'\n * }\n *\n * @interface Highcharts.CSSObject\n */ /**\n * @name Highcharts.CSSObject#[key:string]\n * @type {boolean|number|string|undefined}\n */ /**\n * Background style for the element.\n * @name Highcharts.CSSObject#background\n * @type {string|undefined}\n */ /**\n * Background color of the element.\n * @name Highcharts.CSSObject#backgroundColor\n * @type {Highcharts.ColorString|undefined}\n */ /**\n * Border style for the element.\n * @name Highcharts.CSSObject#border\n * @type {string|undefined}\n */ /**\n * Radius of the element border.\n * @name Highcharts.CSSObject#borderRadius\n * @type {number|undefined}\n */ /**\n * Color used in the element. The 'contrast' option is a Highcharts custom\n * property that results in black or white, depending on the background of the\n * element.\n * @name Highcharts.CSSObject#color\n * @type {'contrast'|Highcharts.ColorString|undefined}\n */ /**\n * Style of the mouse cursor when resting over the element.\n * @name Highcharts.CSSObject#cursor\n * @type {Highcharts.CursorValue|undefined}\n */ /**\n * Font family of the element text. Multiple values have to be in decreasing\n * preference order and separated by comma.\n * @name Highcharts.CSSObject#fontFamily\n * @type {string|undefined}\n */ /**\n * Font size of the element text.\n * @name Highcharts.CSSObject#fontSize\n * @type {string|undefined}\n */ /**\n * Font weight of the element text.\n * @name Highcharts.CSSObject#fontWeight\n * @type {string|undefined}\n */ /**\n * Height of the element.\n * @name Highcharts.CSSObject#height\n * @type {number|undefined}\n */ /**\n * The maximum number of lines. If lines are cropped away, an ellipsis will be\n * added.\n * @name Highcharts.CSSObject#lineClamp\n * @type {number|undefined}\n */ /**\n * Width of the element border.\n * @name Highcharts.CSSObject#lineWidth\n * @type {number|undefined}\n */ /**\n * Opacity of the element.\n * @name Highcharts.CSSObject#opacity\n * @type {number|undefined}\n */ /**\n * Space around the element content.\n * @name Highcharts.CSSObject#padding\n * @type {string|undefined}\n */ /**\n * Behaviour of the element when the mouse cursor rests over it.\n * @name Highcharts.CSSObject#pointerEvents\n * @type {string|undefined}\n */ /**\n * Positioning of the element.\n * @name Highcharts.CSSObject#position\n * @type {string|undefined}\n */ /**\n * Alignment of the element text.\n * @name Highcharts.CSSObject#textAlign\n * @type {string|undefined}\n */ /**\n * Additional decoration of the element text.\n * @name Highcharts.CSSObject#textDecoration\n * @type {string|undefined}\n */ /**\n * Outline style of the element text.\n * @name Highcharts.CSSObject#textOutline\n * @type {string|undefined}\n */ /**\n * Line break style of the element text. Highcharts SVG elements support\n * `ellipsis` when a `width` is set.\n * @name Highcharts.CSSObject#textOverflow\n * @type {string|undefined}\n */ /**\n * Top spacing of the element relative to the parent element.\n * @name Highcharts.CSSObject#top\n * @type {string|undefined}\n */ /**\n * Animated transition of selected element properties.\n * @name Highcharts.CSSObject#transition\n * @type {string|undefined}\n */ /**\n * Line break style of the element text.\n * @name Highcharts.CSSObject#whiteSpace\n * @type {string|undefined}\n */ /**\n * Width of the element.\n * @name Highcharts.CSSObject#width\n * @type {number|undefined}\n */\n /**\n * All possible cursor styles.\n *\n * @typedef {'alias'|'all-scroll'|'auto'|'cell'|'col-resize'|'context-menu'|'copy'|'crosshair'|'default'|'e-resize'|'ew-resize'|'grab'|'grabbing'|'help'|'move'|'n-resize'|'ne-resize'|'nesw-resize'|'no-drop'|'none'|'not-allowed'|'ns-resize'|'nw-resize'|'nwse-resize'|'pointer'|'progress'|'row-resize'|'s-resize'|'se-resize'|'sw-resize'|'text'|'vertical-text'|'w-resize'|'wait'|'zoom-in'|'zoom-out'} Highcharts.CursorValue\n */\n /**\n * All possible dash styles.\n *\n * @typedef {'Dash'|'DashDot'|'Dot'|'LongDash'|'LongDashDot'|'LongDashDotDot'|'ShortDash'|'ShortDashDot'|'ShortDashDotDot'|'ShortDot'|'Solid'} Highcharts.DashStyleValue\n */\n /**\n * Generic dictionary in TypeScript notation.\n * Use the native `AnyRecord` instead.\n *\n * @deprecated\n * @interface Highcharts.Dictionary<T>\n */ /**\n * @name Highcharts.Dictionary<T>#[key:string]\n * @type {T}\n */\n /**\n * The function callback to execute when the event is fired. The `this` context\n * contains the instance, that fired the event.\n *\n * @callback Highcharts.EventCallbackFunction<T>\n *\n * @param {T} this\n *\n * @param {Highcharts.Dictionary<*>|Event} [eventArguments]\n * Event arguments.\n *\n * @return {boolean|void}\n */\n /**\n * The event options for adding function callback.\n *\n * @interface Highcharts.EventOptionsObject\n */ /**\n * The order the event handler should be called. This opens for having one\n * handler be called before another, independent of in which order they were\n * added.\n * @name Highcharts.EventOptionsObject#order\n * @type {number}\n */ /**\n * Whether an event should be passive or not.\n * When set to `true`, the function specified by listener will never call\n * `preventDefault()`.\n * @name Highcharts.EventOptionsObject#passive\n * @type boolean\n */\n /**\n * Formats data as a string. Usually the data is accessible through the `this`\n * keyword.\n *\n * @callback Highcharts.FormatterCallbackFunction<T>\n *\n * @param {T} this\n * Context to format\n *\n * @return {string}\n * Formatted text\n */\n /**\n * An object of key-value pairs for HTML attributes.\n *\n * @typedef {Highcharts.Dictionary<boolean|number|string|Function>} Highcharts.HTMLAttributes\n */\n /**\n * An HTML DOM element. The type is a reference to the regular HTMLElement in\n * the global scope.\n *\n * @typedef {global.HTMLElement} Highcharts.HTMLDOMElement\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\n */\n /**\n * The iterator callback.\n *\n * @callback Highcharts.ObjectEachCallbackFunction<T>\n *\n * @param {T} this\n * The context.\n *\n * @param {*} value\n * The property value.\n *\n * @param {string} key\n * The property key.\n *\n * @param {*} obj\n * The object that objectEach is being applied to.\n */\n /**\n * An object containing `left` and `top` properties for the position in the\n * page.\n *\n * @interface Highcharts.OffsetObject\n */ /**\n * Left distance to the page border.\n * @name Highcharts.OffsetObject#left\n * @type {number}\n */ /**\n * Top distance to the page border.\n * @name Highcharts.OffsetObject#top\n * @type {number}\n */\n /**\n * Describes a range.\n *\n * @interface Highcharts.RangeObject\n */ /**\n * Maximum number of the range.\n * @name Highcharts.RangeObject#max\n * @type {number}\n */ /**\n * Minimum number of the range.\n * @name Highcharts.RangeObject#min\n * @type {number}\n */\n /**\n * If a number is given, it defines the pixel length. If a percentage string is\n * given, like for example `'50%'`, the setting defines a length relative to a\n * base size, for example the size of a container.\n *\n * @typedef {number|string} Highcharts.RelativeSize\n */\n /**\n * Proceed function to call original (wrapped) function.\n *\n * @callback Highcharts.WrapProceedFunction\n *\n * @param {*} [arg1]\n * Optional argument. Without any arguments defaults to first argument of\n * the wrapping function.\n *\n * @param {*} [arg2]\n * Optional argument. Without any arguments defaults to second argument\n * of the wrapping function.\n *\n * @param {*} [arg3]\n * Optional argument. Without any arguments defaults to third argument of\n * the wrapping function.\n *\n * @return {*}\n * Return value of the original function.\n */\n /**\n * The Highcharts object is the placeholder for all other members, and various\n * utility functions. The most important member of the namespace would be the\n * chart constructor.\n *\n * @example\n * let chart = Highcharts.chart('container', { ... });\n *\n * @namespace Highcharts\n */\n ''; // Detach doclets above\n\n return Utilities;\n });\n _registerModule(_modules, 'Core/Renderer/HTML/AST.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n const { SVG_NS, win } = H;\n const { attr, createElement, css, error, isFunction, isString, objectEach, splat } = U;\n const { trustedTypes } = win;\n /* *\n *\n * Constants\n *\n * */\n // Create the trusted type policy. This should not be exposed.\n const trustedTypesPolicy = (trustedTypes &&\n isFunction(trustedTypes.createPolicy) &&\n trustedTypes.createPolicy('highcharts', {\n createHTML: (s) => s\n }));\n const emptyHTML = trustedTypesPolicy ?\n trustedTypesPolicy.createHTML('') :\n '';\n /* *\n *\n * Class\n *\n * */\n /**\n * The AST class represents an abstract syntax tree of HTML or SVG content. It\n * can take HTML as an argument, parse it, optionally transform it to SVG, then\n * perform sanitation before inserting it into the DOM.\n *\n * @class\n * @name Highcharts.AST\n *\n * @param {string|Array<Highcharts.ASTNode>} source\n * Either an HTML string or an ASTNode list to populate the tree.\n */\n class AST {\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * Filter an object of SVG or HTML attributes against the allow list.\n *\n * @static\n *\n * @function Highcharts.AST#filterUserAttributes\n *\n * @param {Highcharts.SVGAttributes} attributes The attributes to filter\n *\n * @return {Highcharts.SVGAttributes}\n * The filtered attributes\n */\n static filterUserAttributes(attributes) {\n objectEach(attributes, (val, key) => {\n let valid = true;\n if (AST.allowedAttributes.indexOf(key) === -1) {\n valid = false;\n }\n if (['background', 'dynsrc', 'href', 'lowsrc', 'src']\n .indexOf(key) !== -1) {\n valid = isString(val) && AST.allowedReferences.some((ref) => val.indexOf(ref) === 0);\n }\n if (!valid) {\n error(33, false, void 0, {\n 'Invalid attribute in config': `${key}`\n });\n delete attributes[key];\n }\n // #17753, < is not allowed in SVG attributes\n if (isString(val) && attributes[key]) {\n attributes[key] = val.replace(/</g, '<');\n }\n });\n return attributes;\n }\n static parseStyle(style) {\n return style\n .split(';')\n .reduce((styles, line) => {\n const pair = line.split(':').map((s) => s.trim()), key = pair.shift();\n if (key && pair.length) {\n styles[key.replace(/-([a-z])/g, (g) => g[1].toUpperCase())] = pair.join(':'); // #17146\n }\n return styles;\n }, {});\n }\n /**\n * Utility function to set html content for an element by passing in a\n * markup string. The markup is safely parsed by the AST class to avoid\n * XSS vulnerabilities. This function should be used instead of setting\n * `innerHTML` in all cases where the content is not fully trusted.\n *\n * @static\n * @function Highcharts.AST#setElementHTML\n *\n * @param {SVGDOMElement|HTMLDOMElement} el\n * Node to set content of.\n *\n * @param {string} html\n * Markup string\n */\n static setElementHTML(el, html) {\n el.innerHTML = AST.emptyHTML; // Clear previous\n if (html) {\n const ast = new AST(html);\n ast.addToDOM(el);\n }\n }\n /* *\n *\n * Constructor\n *\n * */\n // Construct an AST from HTML markup, or wrap an array of existing AST nodes\n constructor(source) {\n this.nodes = typeof source === 'string' ?\n this.parseMarkup(source) : source;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Add the tree defined as a hierarchical JS structure to the DOM\n *\n * @function Highcharts.AST#addToDOM\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} parent\n * The node where it should be added\n *\n * @return {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement}\n * The inserted node.\n */\n addToDOM(parent) {\n /**\n * @private\n * @param {Highcharts.ASTNode} subtree\n * HTML/SVG definition\n * @param {Element} [subParent]\n * parent node\n * @return {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement}\n * The inserted node.\n */\n function recurse(subtree, subParent) {\n let ret;\n splat(subtree).forEach(function (item) {\n const tagName = item.tagName;\n const textNode = item.textContent ?\n H.doc.createTextNode(item.textContent) :\n void 0;\n // Whether to ignore the AST filtering totally, #15345\n const bypassHTMLFiltering = AST.bypassHTMLFiltering;\n let node;\n if (tagName) {\n if (tagName === '#text') {\n node = textNode;\n }\n else if (AST.allowedTags.indexOf(tagName) !== -1 ||\n bypassHTMLFiltering) {\n const NS = tagName === 'svg' ?\n SVG_NS :\n (subParent.namespaceURI || SVG_NS);\n const element = H.doc.createElementNS(NS, tagName);\n const attributes = item.attributes || {};\n // Apply attributes from root of AST node, legacy from\n // from before TextBuilder\n objectEach(item, function (val, key) {\n if (key !== 'tagName' &&\n key !== 'attributes' &&\n key !== 'children' &&\n key !== 'style' &&\n key !== 'textContent') {\n attributes[key] = val;\n }\n });\n attr(element, bypassHTMLFiltering ?\n attributes :\n AST.filterUserAttributes(attributes));\n if (item.style) {\n css(element, item.style);\n }\n // Add text content\n if (textNode) {\n element.appendChild(textNode);\n }\n // Recurse\n recurse(item.children || [], element);\n node = element;\n }\n else {\n error(33, false, void 0, {\n 'Invalid tagName in config': tagName\n });\n }\n }\n // Add to the tree\n if (node) {\n subParent.appendChild(node);\n }\n ret = node;\n });\n // Return last node added (on top level it's the only one)\n return ret;\n }\n return recurse(this.nodes, parent);\n }\n /**\n * Parse HTML/SVG markup into AST Node objects. Used internally from the\n * constructor.\n *\n * @private\n *\n * @function Highcharts.AST#getNodesFromMarkup\n *\n * @param {string} markup The markup string.\n *\n * @return {Array<Highcharts.ASTNode>} The parsed nodes.\n */\n parseMarkup(markup) {\n const nodes = [];\n markup = markup\n .trim()\n // The style attribute throws a warning when parsing when CSP is\n // enabled (#6884), so use an alias and pick it up below\n // Make all quotation marks parse correctly to DOM (#17627)\n .replace(/ style=([\"'])/g, ' data-style=$1');\n let doc;\n try {\n doc = new DOMParser().parseFromString(trustedTypesPolicy ?\n trustedTypesPolicy.createHTML(markup) :\n markup, 'text/html');\n }\n catch (e) {\n // There are two cases where this fails:\n // 1. IE9 and PhantomJS, where the DOMParser only supports parsing\n // XML\n // 2. Due to a Chromium issue where chart redraws are triggered by\n // a `beforeprint` event (#16931),\n // https://issues.chromium.org/issues/40222135\n }\n if (!doc) {\n const body = createElement('div');\n body.innerHTML = markup;\n doc = { body };\n }\n const appendChildNodes = (node, addTo) => {\n const tagName = node.nodeName.toLowerCase();\n // Add allowed tags\n const astNode = {\n tagName\n };\n if (tagName === '#text') {\n astNode.textContent = node.textContent || '';\n }\n const parsedAttributes = node.attributes;\n // Add attributes\n if (parsedAttributes) {\n const attributes = {};\n [].forEach.call(parsedAttributes, (attrib) => {\n if (attrib.name === 'data-style') {\n astNode.style = AST.parseStyle(attrib.value);\n }\n else {\n attributes[attrib.name] = attrib.value;\n }\n });\n astNode.attributes = attributes;\n }\n // Handle children\n if (node.childNodes.length) {\n const children = [];\n [].forEach.call(node.childNodes, (childNode) => {\n appendChildNodes(childNode, children);\n });\n if (children.length) {\n astNode.children = children;\n }\n }\n addTo.push(astNode);\n };\n [].forEach.call(doc.body.childNodes, (childNode) => appendChildNodes(childNode, nodes));\n return nodes;\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * The list of allowed SVG or HTML attributes, used for sanitizing\n * potentially harmful content from the chart configuration before adding to\n * the DOM.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedAttributes)\n *\n * @example\n * // Allow a custom, trusted attribute\n * Highcharts.AST.allowedAttributes.push('data-value');\n *\n * @name Highcharts.AST.allowedAttributes\n * @type {Array<string>}\n */\n AST.allowedAttributes = [\n 'alt',\n 'aria-controls',\n 'aria-describedby',\n 'aria-expanded',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-label',\n 'aria-labelledby',\n 'aria-live',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-roledescription',\n 'aria-selected',\n 'class',\n 'clip-path',\n 'color',\n 'colspan',\n 'cx',\n 'cy',\n 'd',\n 'dx',\n 'dy',\n 'disabled',\n 'fill',\n 'filterUnits',\n 'flood-color',\n 'flood-opacity',\n 'height',\n 'href',\n 'id',\n 'in',\n 'in2',\n 'markerHeight',\n 'markerWidth',\n 'offset',\n 'opacity',\n 'operator',\n 'orient',\n 'padding',\n 'paddingLeft',\n 'paddingRight',\n 'patternUnits',\n 'r',\n 'radius',\n 'refX',\n 'refY',\n 'role',\n 'scope',\n 'slope',\n 'src',\n 'startOffset',\n 'stdDeviation',\n 'stroke',\n 'stroke-linecap',\n 'stroke-width',\n 'style',\n 'tableValues',\n 'result',\n 'rowspan',\n 'summary',\n 'target',\n 'tabindex',\n 'text-align',\n 'text-anchor',\n 'textAnchor',\n 'textLength',\n 'title',\n 'type',\n 'valign',\n 'width',\n 'x',\n 'x1',\n 'x2',\n 'xlink:href',\n 'y',\n 'y1',\n 'y2',\n 'zIndex'\n ];\n /**\n * The list of allowed references for referring attributes like `href` and\n * `src`. Attribute values will only be allowed if they start with one of\n * these strings.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedReferences)\n *\n * @example\n * // Allow tel:\n * Highcharts.AST.allowedReferences.push('tel:');\n *\n * @name Highcharts.AST.allowedReferences\n * @type {Array<string>}\n */\n AST.allowedReferences = [\n 'https://',\n 'http://',\n 'mailto:',\n '/',\n '../',\n './',\n '#'\n ];\n /**\n * The list of allowed SVG or HTML tags, used for sanitizing potentially\n * harmful content from the chart configuration before adding to the DOM.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedTags)\n *\n * @example\n * // Allow a custom, trusted tag\n * Highcharts.AST.allowedTags.push('blink'); // ;)\n *\n * @name Highcharts.AST.allowedTags\n * @type {Array<string>}\n */\n AST.allowedTags = [\n 'a',\n 'abbr',\n 'b',\n 'br',\n 'button',\n 'caption',\n 'circle',\n 'clipPath',\n 'code',\n 'dd',\n 'defs',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'feComponentTransfer',\n 'feComposite',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feMorphology',\n 'feOffset',\n 'feMerge',\n 'feMergeNode',\n 'filter',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'i',\n 'img',\n 'li',\n 'linearGradient',\n 'marker',\n 'ol',\n 'p',\n 'path',\n 'pattern',\n 'pre',\n 'rect',\n 'small',\n 'span',\n 'stop',\n 'strong',\n 'style',\n 'sub',\n 'sup',\n 'svg',\n 'table',\n 'text',\n 'textPath',\n 'thead',\n 'title',\n 'tbody',\n 'tspan',\n 'td',\n 'th',\n 'tr',\n 'u',\n 'ul',\n '#text'\n ];\n AST.emptyHTML = emptyHTML;\n /**\n * Allow all custom SVG and HTML attributes, references and tags (together\n * with potentially harmful ones) to be added to the DOM from the chart\n * configuration. In other words, disable the allow-listing which is the\n * primary functionality of the AST.\n *\n * WARNING: Setting this property to `true` while allowing untrusted user\n * data in the chart configuration will expose your application to XSS\n * security risks!\n *\n * Note that in case you want to allow a known set of tags or attributes,\n * you should allow-list them instead of disabling the filtering totally.\n * See [allowedAttributes](Highcharts.AST#.allowedAttributes),\n * [allowedReferences](Highcharts.AST#.allowedReferences) and\n * [allowedTags](Highcharts.AST#.allowedTags). The `bypassHTMLFiltering`\n * setting is intended only for those cases where allow-listing is not\n * practical, and the chart configuration already comes from a secure\n * source.\n *\n * @example\n * // Allow all custom attributes, references and tags (disable DOM XSS\n * // filtering)\n * Highcharts.AST.bypassHTMLFiltering = true;\n *\n * @name Highcharts.AST.bypassHTMLFiltering\n * @static\n */\n AST.bypassHTMLFiltering = false;\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Serialized form of an SVG/HTML definition, including children.\n *\n * @interface Highcharts.ASTNode\n */ /**\n * @name Highcharts.ASTNode#attributes\n * @type {Highcharts.SVGAttributes|undefined}\n */ /**\n * @name Highcharts.ASTNode#children\n * @type {Array<Highcharts.ASTNode>|undefined}\n */ /**\n * @name Highcharts.ASTNode#tagName\n * @type {string|undefined}\n */ /**\n * @name Highcharts.ASTNode#textContent\n * @type {string|undefined}\n */\n (''); // Keeps doclets above in file\n\n return AST;\n });\n _registerModule(_modules, 'Data/Modifiers/DataModifier.js', [_modules['Core/Utilities.js']], function (U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Gøran Slettemark\n *\n * */\n const { addEvent, fireEvent, merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Abstract class to provide an interface for modifying a table.\n *\n */\n class DataModifier {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Runs a timed execution of the modifier on the given datatable.\n * Can be configured to run multiple times.\n *\n * @param {DataTable} dataTable\n * The datatable to execute\n *\n * @param {DataModifier.BenchmarkOptions} options\n * Options. Currently supports `iterations` for number of iterations.\n *\n * @return {Array<number>}\n * An array of times in milliseconds\n *\n */\n benchmark(dataTable, options) {\n const results = [];\n const modifier = this;\n const execute = () => {\n modifier.modifyTable(dataTable);\n modifier.emit({\n type: 'afterBenchmarkIteration'\n });\n };\n const defaultOptions = {\n iterations: 1\n };\n const { iterations } = merge(defaultOptions, options);\n modifier.on('afterBenchmarkIteration', () => {\n if (results.length === iterations) {\n modifier.emit({\n type: 'afterBenchmark',\n results\n });\n return;\n }\n // Run again\n execute();\n });\n const times = {\n startTime: 0,\n endTime: 0\n };\n // Add timers\n modifier.on('modify', () => {\n times.startTime = window.performance.now();\n });\n modifier.on('afterModify', () => {\n times.endTime = window.performance.now();\n results.push(times.endTime - times.startTime);\n });\n // Initial run\n execute();\n return results;\n }\n /**\n * Emits an event on the modifier to all registered callbacks of this event.\n *\n * @param {DataModifier.Event} [e]\n * Event object containing additonal event information.\n */\n emit(e) {\n fireEvent(this, e.type, e);\n }\n /**\n * Returns a modified copy of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<Highcharts.DataTable>}\n * Table with `modified` property as a reference.\n */\n modify(table, eventDetail) {\n const modifier = this;\n return new Promise((resolve, reject) => {\n if (table.modified === table) {\n table.modified = table.clone(false, eventDetail);\n }\n try {\n resolve(modifier.modifyTable(table, eventDetail));\n }\n catch (e) {\n modifier.emit({\n type: 'error',\n detail: eventDetail,\n table\n });\n reject(e);\n }\n });\n }\n /**\n * Applies partial modifications of a cell change to the property `modified`\n * of the given modified table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {string} columnName\n * Column name of changed cell.\n *\n * @param {number|undefined} rowIndex\n * Row index of changed cell.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Changed cell value.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyCell(table, \n /* eslint-disable @typescript-eslint/no-unused-vars */\n columnName, rowIndex, cellValue, eventDetail\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ) {\n return this.modifyTable(table);\n }\n /**\n * Applies partial modifications of column changes to the property\n * `modified` of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Changed columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex=0]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyColumns(table, \n /* eslint-disable @typescript-eslint/no-unused-vars */\n columns, rowIndex, eventDetail\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ) {\n return this.modifyTable(table);\n }\n /**\n * Applies partial modifications of row changes to the property `modified`\n * of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Array<(Highcharts.DataTableRow|Highcharts.DataTableRowObject)>} rows\n * Changed rows.\n *\n * @param {number} [rowIndex]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyRows(table, \n /* eslint-disable @typescript-eslint/no-unused-vars */\n rows, rowIndex, eventDetail\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ) {\n return this.modifyTable(table);\n }\n /**\n * Registers a callback for a specific modifier event.\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {DataEventEmitter.Callback} callback\n * Function to register for an modifier callback.\n *\n * @return {Function}\n * Function to unregister callback from the modifier event.\n */\n on(type, callback) {\n return addEvent(this, type, callback);\n }\n }\n /* *\n *\n * Class Namespace\n *\n * */\n /**\n * Additionally provided types for modifier events and options.\n */\n (function (DataModifier) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n /**\n * Registry as a record object with modifier names and their class\n * constructor.\n */\n DataModifier.types = {};\n /* *\n *\n * Functions\n *\n * */\n /**\n * Adds a modifier class to the registry. The modifier class has to provide\n * the `DataModifier.options` property and the `DataModifier.modifyTable`\n * method to modify the table.\n *\n * @private\n *\n * @param {string} key\n * Registry key of the modifier class.\n *\n * @param {DataModifierType} DataModifierClass\n * Modifier class (aka class constructor) to register.\n *\n * @return {boolean}\n * Returns true, if the registration was successful. False is returned, if\n * their is already a modifier registered with this key.\n */\n function registerType(key, DataModifierClass) {\n return (!!key &&\n !DataModifier.types[key] &&\n !!(DataModifier.types[key] = DataModifierClass));\n }\n DataModifier.registerType = registerType;\n })(DataModifier || (DataModifier = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return DataModifier;\n });\n _registerModule(_modules, 'Data/DataTableCore.js', [_modules['Core/Utilities.js']], function (U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Gøran Slettemark\n * - Torstein Hønsi\n *\n * */\n const { fireEvent, isArray, objectEach, uniqueKey } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Class to manage columns and rows in a table structure. It provides methods\n * to add, remove, and manipulate columns and rows, as well as to retrieve data\n * from specific cells.\n *\n * @class\n * @name Highcharts.DataTable\n *\n * @param {Highcharts.DataTableOptions} [options]\n * Options to initialize the new DataTable instance.\n */\n class DataTableCore {\n /**\n * Constructs an instance of the DataTable class.\n *\n * @example\n * const dataTable = new Highcharts.DataTableCore({\n * columns: {\n * year: [2020, 2021, 2022, 2023],\n * cost: [11, 13, 12, 14],\n * revenue: [12, 15, 14, 18]\n * }\n * });\n\n *\n * @param {Highcharts.DataTableOptions} [options]\n * Options to initialize the new DataTable instance.\n */\n constructor(options = {}) {\n /**\n * Whether the ID was automatic generated or given in the constructor.\n *\n * @name Highcharts.DataTable#autoId\n * @type {boolean}\n */\n this.autoId = !options.id;\n this.columns = {};\n /**\n * ID of the table for indentification purposes.\n *\n * @name Highcharts.DataTable#id\n * @type {string}\n */\n this.id = (options.id || uniqueKey());\n this.modified = this;\n this.rowCount = 0;\n this.versionTag = uniqueKey();\n let rowCount = 0;\n objectEach(options.columns || {}, (column, columnName) => {\n this.columns[columnName] = column.slice();\n rowCount = Math.max(rowCount, column.length);\n });\n this.applyRowCount(rowCount);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Applies a row count to the table by setting the `rowCount` property and\n * adjusting the length of all columns.\n *\n * @private\n * @param {number} rowCount The new row count.\n */\n applyRowCount(rowCount) {\n this.rowCount = rowCount;\n objectEach(this.columns, (column) => {\n if (isArray(column)) { // Not on typed array\n column.length = rowCount;\n }\n });\n }\n /**\n * Fetches the given column by the canonical column name. Simplified version\n * of the full `DataTable.getRow` method, always returning by reference.\n *\n * @param {string} columnName\n * Name of the column to get.\n *\n * @return {Highcharts.DataTableColumn|undefined}\n * A copy of the column, or `undefined` if not found.\n */\n getColumn(columnName, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n asReference) {\n return this.columns[columnName];\n }\n /**\n * Retrieves all or the given columns. Simplified version of the full\n * `DataTable.getColumns` method, always returning by reference.\n *\n * @param {Array<string>} [columnNames]\n * Column names to retrieve.\n *\n * @return {Highcharts.DataTableColumnCollection}\n * Collection of columns. If a requested column was not found, it is\n * `undefined`.\n */\n getColumns(columnNames, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n asReference) {\n return (columnNames || Object.keys(this.columns)).reduce((columns, columnName) => {\n columns[columnName] = this.columns[columnName];\n return columns;\n }, {});\n }\n /**\n * Retrieves the row at a given index.\n *\n * @param {number} rowIndex\n * Row index to retrieve. First row has index 0.\n *\n * @param {Array<string>} [columnNames]\n * Column names to retrieve.\n *\n * @return {Record<string, number|string|undefined>|undefined}\n * Returns the row values, or `undefined` if not found.\n */\n getRow(rowIndex, columnNames) {\n return (columnNames || Object.keys(this.columns)).map((key) => this.columns[key]?.[rowIndex]);\n }\n /**\n * Sets cell values for a column. Will insert a new column, if not found.\n *\n * @param {string} columnName\n * Column name to set.\n *\n * @param {Highcharts.DataTableColumn} [column]\n * Values to set in the column.\n *\n * @param {number} [rowIndex=0]\n * Index of the first row to change. (Default: 0)\n *\n * @param {Record<string, (boolean|number|string|null|undefined)>} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setColumns\n * @emits #afterSetColumns\n */\n setColumn(columnName, column = [], rowIndex = 0, eventDetail) {\n this.setColumns({ [columnName]: column }, rowIndex, eventDetail);\n }\n /**\n * * Sets cell values for multiple columns. Will insert new columns, if not\n * found. Simplified version of the full `DataTable.setColumns`, limited to\n * full replacement of the columns (undefined `rowIndex`).\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex]\n * Index of the first row to change. Keep undefined to reset.\n *\n * @param {Record<string, (boolean|number|string|null|undefined)>} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setColumns\n * @emits #afterSetColumns\n */\n setColumns(columns, rowIndex, eventDetail) {\n let rowCount = this.rowCount;\n objectEach(columns, (column, columnName) => {\n this.columns[columnName] = column.slice();\n rowCount = column.length;\n });\n this.applyRowCount(rowCount);\n if (!eventDetail?.silent) {\n fireEvent(this, 'afterSetColumns');\n this.versionTag = uniqueKey();\n }\n }\n /**\n * Sets cell values of a row. Will insert a new row if no index was\n * provided, or if the index is higher than the total number of table rows.\n * A simplified version of the full `DateTable.setRow`, limited to objects.\n *\n * @param {Record<string, number|string|undefined>} row\n * Cell values to set.\n *\n * @param {number} [rowIndex]\n * Index of the row to set. Leave `undefind` to add as a new row.\n *\n * @param {boolean} [insert]\n * Whether to insert the row at the given index, or to overwrite the row.\n *\n * @param {Record<string, (boolean|number|string|null|undefined)>} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #afterSetRows\n */\n setRow(row, rowIndex = this.rowCount, insert, eventDetail) {\n const { columns } = this, indexRowCount = insert ? this.rowCount + 1 : rowIndex + 1;\n objectEach(row, (cellValue, columnName) => {\n const column = columns[columnName] ||\n eventDetail?.addColumns !== false && new Array(indexRowCount);\n if (column) {\n if (insert) {\n column.splice(rowIndex, 0, cellValue);\n }\n else {\n column[rowIndex] = cellValue;\n }\n columns[columnName] = column;\n }\n });\n if (indexRowCount > this.rowCount) {\n this.applyRowCount(indexRowCount);\n }\n if (!eventDetail?.silent) {\n fireEvent(this, 'afterSetRows');\n this.versionTag = uniqueKey();\n }\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * A column of values in a data table.\n * @typedef {Array<boolean|null|number|string|undefined>} Highcharts.DataTableColumn\n */ /**\n * A collection of data table columns defined by a object where the key is the\n * column name and the value is an array of the column values.\n * @typedef {Record<string, Highcharts.DataTableColumn>} Highcharts.DataTableColumnCollection\n */\n /**\n * Options for the `DataTable` or `DataTableCore` classes.\n * @interface Highcharts.DataTableOptions\n */ /**\n * The column options for the data table. The columns are defined by an object\n * where the key is the column ID and the value is an array of the column\n * values.\n *\n * @name Highcharts.DataTableOptions.columns\n * @type {Highcharts.DataTableColumnCollection|undefined}\n */ /**\n * Custom ID to identify the new DataTable instance.\n *\n * @name Highcharts.DataTableOptions.id\n * @type {string|undefined}\n */\n (''); // Keeps doclets above in JS file\n\n return DataTableCore;\n });\n _registerModule(_modules, 'Data/DataTable.js', [_modules['Data/DataTableCore.js'], _modules['Core/Utilities.js']], function (DataTableCore, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Gøran Slettemark\n * - Jomar Hønsi\n * - Dawid Dragula\n *\n * */\n const { addEvent, defined, fireEvent, extend, uniqueKey } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Class to manage columns and rows in a table structure. It provides methods\n * to add, remove, and manipulate columns and rows, as well as to retrieve data\n * from specific cells.\n *\n * @class\n * @name Highcharts.DataTable\n *\n * @param {Highcharts.DataTableOptions} [options]\n * Options to initialize the new DataTable instance.\n */\n class DataTable extends DataTableCore {\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * Tests whether a row contains only `null` values or is equal to\n * DataTable.NULL. If all columns have `null` values, the function returns\n * `true`. Otherwise, it returns `false` to indicate that the row contains\n * at least one non-null value.\n *\n * @function Highcharts.DataTable.isNull\n *\n * @param {Highcharts.DataTableRow|Highcharts.DataTableRowObject} row\n * Row to test.\n *\n * @return {boolean}\n * Returns `true`, if the row contains only null, otherwise `false`.\n *\n * @example\n * if (DataTable.isNull(row)) {\n * // handle null row\n * }\n */\n static isNull(row) {\n if (row === DataTable.NULL) {\n return true;\n }\n if (row instanceof Array) {\n if (!row.length) {\n return false;\n }\n for (let i = 0, iEnd = row.length; i < iEnd; ++i) {\n if (row[i] !== null) {\n return false;\n }\n }\n }\n else {\n const columnNames = Object.keys(row);\n if (!columnNames.length) {\n return false;\n }\n for (let i = 0, iEnd = columnNames.length; i < iEnd; ++i) {\n if (row[columnNames[i]] !== null) {\n return false;\n }\n }\n }\n return true;\n }\n /* *\n *\n * Constructor\n *\n * */\n constructor(options = {}) {\n super(options);\n this.modified = this;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Returns a clone of this table. The cloned table is completely independent\n * of the original, and any changes made to the clone will not affect\n * the original table.\n *\n * @function Highcharts.DataTable#clone\n *\n * @param {boolean} [skipColumns]\n * Whether to clone columns or not.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Clone of this data table.\n *\n * @emits #cloneTable\n * @emits #afterCloneTable\n */\n clone(skipColumns, eventDetail) {\n const table = this, tableOptions = {};\n table.emit({ type: 'cloneTable', detail: eventDetail });\n if (!skipColumns) {\n tableOptions.columns = table.columns;\n }\n if (!table.autoId) {\n tableOptions.id = table.id;\n }\n const tableClone = new DataTable(tableOptions);\n if (!skipColumns) {\n tableClone.versionTag = table.versionTag;\n tableClone.originalRowIndexes = table.originalRowIndexes;\n tableClone.localRowIndexes = table.localRowIndexes;\n }\n table.emit({\n type: 'afterCloneTable',\n detail: eventDetail,\n tableClone\n });\n return tableClone;\n }\n /**\n * Deletes columns from the table.\n *\n * @function Highcharts.DataTable#deleteColumns\n *\n * @param {Array<string>} [columnNames]\n * Names of columns to delete. If no array is provided, all\n * columns will be deleted.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTableColumnCollection|undefined}\n * Returns the deleted columns, if found.\n *\n * @emits #deleteColumns\n * @emits #afterDeleteColumns\n */\n deleteColumns(columnNames, eventDetail) {\n const table = this, columns = table.columns, deletedColumns = {}, modifiedColumns = {}, modifier = table.modifier, rowCount = table.rowCount;\n columnNames = (columnNames || Object.keys(columns));\n if (columnNames.length) {\n table.emit({\n type: 'deleteColumns',\n columnNames,\n detail: eventDetail\n });\n for (let i = 0, iEnd = columnNames.length, column, columnName; i < iEnd; ++i) {\n columnName = columnNames[i];\n column = columns[columnName];\n if (column) {\n deletedColumns[columnName] = column;\n modifiedColumns[columnName] = new Array(rowCount);\n }\n delete columns[columnName];\n }\n if (!Object.keys(columns).length) {\n table.rowCount = 0;\n this.deleteRowIndexReferences();\n }\n if (modifier) {\n modifier.modifyColumns(table, modifiedColumns, 0, eventDetail);\n }\n table.emit({\n type: 'afterDeleteColumns',\n columns: deletedColumns,\n columnNames,\n detail: eventDetail\n });\n return deletedColumns;\n }\n }\n /**\n * Deletes the row index references. This is useful when the original table\n * is deleted, and the references are no longer needed. This table is\n * then considered an original table or a table that has the same row's\n * order as the original table.\n */\n deleteRowIndexReferences() {\n delete this.originalRowIndexes;\n delete this.localRowIndexes;\n // Here, in case of future need, can be implemented updating of the\n // modified tables' row indexes references.\n }\n /**\n * Deletes rows in this table.\n *\n * @function Highcharts.DataTable#deleteRows\n *\n * @param {number} [rowIndex]\n * Index to start delete of rows. If not specified, all rows will be\n * deleted.\n *\n * @param {number} [rowCount=1]\n * Number of rows to delete.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Array<Highcharts.DataTableRow>}\n * Returns the deleted rows, if found.\n *\n * @emits #deleteRows\n * @emits #afterDeleteRows\n */\n deleteRows(rowIndex, rowCount = 1, eventDetail) {\n const table = this, deletedRows = [], modifiedRows = [], modifier = table.modifier;\n table.emit({\n type: 'deleteRows',\n detail: eventDetail,\n rowCount,\n rowIndex: (rowIndex || 0)\n });\n if (typeof rowIndex === 'undefined') {\n rowIndex = 0;\n rowCount = table.rowCount;\n }\n if (rowCount > 0 && rowIndex < table.rowCount) {\n const columns = table.columns, columnNames = Object.keys(columns);\n for (let i = 0, iEnd = columnNames.length, column, deletedCells; i < iEnd; ++i) {\n column = columns[columnNames[i]];\n deletedCells = column.splice(rowIndex, rowCount);\n if (!i) {\n table.rowCount = column.length;\n }\n for (let j = 0, jEnd = deletedCells.length; j < jEnd; ++j) {\n deletedRows[j] = (deletedRows[j] || []);\n deletedRows[j][i] = deletedCells[j];\n }\n modifiedRows.push(new Array(iEnd));\n }\n }\n if (modifier) {\n modifier.modifyRows(table, modifiedRows, (rowIndex || 0), eventDetail);\n }\n table.emit({\n type: 'afterDeleteRows',\n detail: eventDetail,\n rowCount,\n rowIndex: (rowIndex || 0),\n rows: deletedRows\n });\n return deletedRows;\n }\n /**\n * Emits an event on this table to all registered callbacks of the given\n * event.\n * @private\n *\n * @param {DataTable.Event} e\n * Event object with event information.\n */\n emit(e) {\n if ([\n 'afterDeleteColumns',\n 'afterDeleteRows',\n 'afterSetCell',\n 'afterSetColumns',\n 'afterSetRows'\n ].includes(e.type)) {\n this.versionTag = uniqueKey();\n }\n fireEvent(this, e.type, e);\n }\n /**\n * Fetches a single cell value.\n *\n * @function Highcharts.DataTable#getCell\n *\n * @param {string} columnName\n * Column name of the cell to retrieve.\n *\n * @param {number} rowIndex\n * Row index of the cell to retrieve.\n *\n * @return {Highcharts.DataTableCellType|undefined}\n * Returns the cell value or `undefined`.\n */\n getCell(columnName, rowIndex) {\n const table = this;\n const column = table.columns[columnName];\n if (column) {\n return column[rowIndex];\n }\n }\n /**\n * Fetches a cell value for the given row as a boolean.\n *\n * @function Highcharts.DataTable#getCellAsBoolean\n *\n * @param {string} columnName\n * Column name to fetch.\n *\n * @param {number} rowIndex\n * Row index to fetch.\n *\n * @return {boolean}\n * Returns the cell value of the row as a boolean.\n */\n getCellAsBoolean(columnName, rowIndex) {\n const table = this;\n const column = table.columns[columnName];\n return !!(column && column[rowIndex]);\n }\n /**\n * Fetches a cell value for the given row as a number.\n *\n * @function Highcharts.DataTable#getCellAsNumber\n *\n * @param {string} columnName\n * Column name or to fetch.\n *\n * @param {number} rowIndex\n * Row index to fetch.\n *\n * @param {boolean} [useNaN]\n * Whether to return NaN instead of `null` and `undefined`.\n *\n * @return {number|null}\n * Returns the cell value of the row as a number.\n */\n getCellAsNumber(columnName, rowIndex, useNaN) {\n const table = this;\n const column = table.columns[columnName];\n let cellValue = (column && column[rowIndex]);\n switch (typeof cellValue) {\n case 'boolean':\n return (cellValue ? 1 : 0);\n case 'number':\n return (isNaN(cellValue) && !useNaN ? null : cellValue);\n }\n cellValue = parseFloat(`${cellValue ?? ''}`);\n return (isNaN(cellValue) && !useNaN ? null : cellValue);\n }\n /**\n * Fetches a cell value for the given row as a string.\n *\n * @function Highcharts.DataTable#getCellAsString\n *\n * @param {string} columnName\n * Column name to fetch.\n *\n * @param {number} rowIndex\n * Row index to fetch.\n *\n * @return {string}\n * Returns the cell value of the row as a string.\n */\n getCellAsString(columnName, rowIndex) {\n const table = this;\n const column = table.columns[columnName];\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n return `${(column && column[rowIndex])}`;\n }\n /**\n * Fetches the given column by the canonical column name.\n * This function is a simplified wrap of {@link getColumns}.\n *\n * @function Highcharts.DataTable#getColumn\n *\n * @param {string} columnName\n * Name of the column to get.\n *\n * @param {boolean} [asReference]\n * Whether to return the column as a readonly reference.\n *\n * @return {Highcharts.DataTableColumn|undefined}\n * A copy of the column, or `undefined` if not found.\n */\n getColumn(columnName, asReference) {\n return this.getColumns([columnName], asReference)[columnName];\n }\n /**\n * Fetches the given column by the canonical column name, and\n * validates the type of the first few cells. If the first defined cell is\n * of type number, it assumes for performance reasons, that all cells are of\n * type number or `null`. Otherwise it will convert all cells to number\n * type, except `null`.\n *\n * @function Highcharts.DataTable#getColumnAsNumbers\n *\n * @param {string} columnName\n * Name of the column to get.\n *\n * @param {boolean} [useNaN]\n * Whether to use NaN instead of `null` and `undefined`.\n *\n * @return {Array<(number|null)>}\n * A copy of the column, or an empty array if not found.\n */\n getColumnAsNumbers(columnName, useNaN) {\n const table = this, columns = table.columns;\n const column = columns[columnName], columnAsNumber = [];\n if (column) {\n const columnLength = column.length;\n if (useNaN) {\n for (let i = 0; i < columnLength; ++i) {\n columnAsNumber.push(table.getCellAsNumber(columnName, i, true));\n }\n }\n else {\n for (let i = 0, cellValue; i < columnLength; ++i) {\n cellValue = column[i];\n if (typeof cellValue === 'number') {\n // Assume unmixed data for performance reasons\n return column.slice();\n }\n if (cellValue !== null &&\n typeof cellValue !== 'undefined') {\n break;\n }\n }\n for (let i = 0; i < columnLength; ++i) {\n columnAsNumber.push(table.getCellAsNumber(columnName, i));\n }\n }\n }\n return columnAsNumber;\n }\n /**\n * Fetches all column names.\n *\n * @function Highcharts.DataTable#getColumnNames\n *\n * @return {Array<string>}\n * Returns all column names.\n */\n getColumnNames() {\n const table = this, columnNames = Object.keys(table.columns);\n return columnNames;\n }\n /**\n * Retrieves all or the given columns.\n *\n * @function Highcharts.DataTable#getColumns\n *\n * @param {Array<string>} [columnNames]\n * Column names to retrieve.\n *\n * @param {boolean} [asReference]\n * Whether to return columns as a readonly reference.\n *\n * @return {Highcharts.DataTableColumnCollection}\n * Collection of columns. If a requested column was not found, it is\n * `undefined`.\n */\n getColumns(columnNames, asReference) {\n const table = this, tableColumns = table.columns, columns = {};\n columnNames = (columnNames || Object.keys(tableColumns));\n for (let i = 0, iEnd = columnNames.length, column, columnName; i < iEnd; ++i) {\n columnName = columnNames[i];\n column = tableColumns[columnName];\n if (column) {\n columns[columnName] = (asReference ? column : column.slice());\n }\n }\n return columns;\n }\n /**\n * Takes the original row index and returns the local row index in the\n * modified table for which this function is called.\n *\n * @param {number} originalRowIndex\n * Original row index to get the local row index for.\n *\n * @return {number|undefined}\n * Returns the local row index or `undefined` if not found.\n */\n getLocalRowIndex(originalRowIndex) {\n const { localRowIndexes } = this;\n if (localRowIndexes) {\n return localRowIndexes[originalRowIndex];\n }\n return originalRowIndex;\n }\n /**\n * Retrieves the modifier for the table.\n * @private\n *\n * @return {Highcharts.DataModifier|undefined}\n * Returns the modifier or `undefined`.\n */\n getModifier() {\n return this.modifier;\n }\n /**\n * Takes the local row index and returns the index of the corresponding row\n * in the original table.\n *\n * @param {number} rowIndex\n * Local row index to get the original row index for.\n *\n * @return {number|undefined}\n * Returns the original row index or `undefined` if not found.\n */\n getOriginalRowIndex(rowIndex) {\n const { originalRowIndexes } = this;\n if (originalRowIndexes) {\n return originalRowIndexes[rowIndex];\n }\n return rowIndex;\n }\n /**\n * Retrieves the row at a given index. This function is a simplified wrap of\n * {@link getRows}.\n *\n * @function Highcharts.DataTable#getRow\n *\n * @param {number} rowIndex\n * Row index to retrieve. First row has index 0.\n *\n * @param {Array<string>} [columnNames]\n * Column names in order to retrieve.\n *\n * @return {Highcharts.DataTableRow}\n * Returns the row values, or `undefined` if not found.\n */\n getRow(rowIndex, columnNames) {\n return this.getRows(rowIndex, 1, columnNames)[0];\n }\n /**\n * Returns the number of rows in this table.\n *\n * @function Highcharts.DataTable#getRowCount\n *\n * @return {number}\n * Number of rows in this table.\n */\n getRowCount() {\n // @todo Implement via property getter `.length` browsers supported\n return this.rowCount;\n }\n /**\n * Retrieves the index of the first row matching a specific cell value.\n *\n * @function Highcharts.DataTable#getRowIndexBy\n *\n * @param {string} columnName\n * Column to search in.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Cell value to search for. `NaN` and `undefined` are not supported.\n *\n * @param {number} [rowIndexOffset]\n * Index offset to start searching.\n *\n * @return {number|undefined}\n * Index of the first row matching the cell value.\n */\n getRowIndexBy(columnName, cellValue, rowIndexOffset) {\n const table = this;\n const column = table.columns[columnName];\n if (column) {\n const rowIndex = column.indexOf(cellValue, rowIndexOffset);\n if (rowIndex !== -1) {\n return rowIndex;\n }\n }\n }\n /**\n * Retrieves the row at a given index. This function is a simplified wrap of\n * {@link getRowObjects}.\n *\n * @function Highcharts.DataTable#getRowObject\n *\n * @param {number} rowIndex\n * Row index.\n *\n * @param {Array<string>} [columnNames]\n * Column names and their order to retrieve.\n *\n * @return {Highcharts.DataTableRowObject}\n * Returns the row values, or `undefined` if not found.\n */\n getRowObject(rowIndex, columnNames) {\n return this.getRowObjects(rowIndex, 1, columnNames)[0];\n }\n /**\n * Fetches all or a number of rows.\n *\n * @function Highcharts.DataTable#getRowObjects\n *\n * @param {number} [rowIndex]\n * Index of the first row to fetch. Defaults to first row at index `0`.\n *\n * @param {number} [rowCount]\n * Number of rows to fetch. Defaults to maximal number of rows.\n *\n * @param {Array<string>} [columnNames]\n * Column names and their order to retrieve.\n *\n * @return {Highcharts.DataTableRowObject}\n * Returns retrieved rows.\n */\n getRowObjects(rowIndex = 0, rowCount = (this.rowCount - rowIndex), columnNames) {\n const table = this, columns = table.columns, rows = new Array(rowCount);\n columnNames = (columnNames || Object.keys(columns));\n for (let i = rowIndex, i2 = 0, iEnd = Math.min(table.rowCount, (rowIndex + rowCount)), column, row; i < iEnd; ++i, ++i2) {\n row = rows[i2] = {};\n for (const columnName of columnNames) {\n column = columns[columnName];\n row[columnName] = (column ? column[i] : void 0);\n }\n }\n return rows;\n }\n /**\n * Fetches all or a number of rows.\n *\n * @function Highcharts.DataTable#getRows\n *\n * @param {number} [rowIndex]\n * Index of the first row to fetch. Defaults to first row at index `0`.\n *\n * @param {number} [rowCount]\n * Number of rows to fetch. Defaults to maximal number of rows.\n *\n * @param {Array<string>} [columnNames]\n * Column names and their order to retrieve.\n *\n * @return {Highcharts.DataTableRow}\n * Returns retrieved rows.\n */\n getRows(rowIndex = 0, rowCount = (this.rowCount - rowIndex), columnNames) {\n const table = this, columns = table.columns, rows = new Array(rowCount);\n columnNames = (columnNames || Object.keys(columns));\n for (let i = rowIndex, i2 = 0, iEnd = Math.min(table.rowCount, (rowIndex + rowCount)), column, row; i < iEnd; ++i, ++i2) {\n row = rows[i2] = [];\n for (const columnName of columnNames) {\n column = columns[columnName];\n row.push(column ? column[i] : void 0);\n }\n }\n return rows;\n }\n /**\n * Returns the unique version tag of the current state of the table.\n *\n * @function Highcharts.DataTable#getVersionTag\n *\n * @return {string}\n * Unique version tag.\n */\n getVersionTag() {\n return this.versionTag;\n }\n /**\n * Checks for given column names.\n *\n * @function Highcharts.DataTable#hasColumns\n *\n * @param {Array<string>} columnNames\n * Column names to check.\n *\n * @return {boolean}\n * Returns `true` if all columns have been found, otherwise `false`.\n */\n hasColumns(columnNames) {\n const table = this, columns = table.columns;\n for (let i = 0, iEnd = columnNames.length, columnName; i < iEnd; ++i) {\n columnName = columnNames[i];\n if (!columns[columnName]) {\n return false;\n }\n }\n return true;\n }\n /**\n * Searches for a specific cell value.\n *\n * @function Highcharts.DataTable#hasRowWith\n *\n * @param {string} columnName\n * Column to search in.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Cell value to search for. `NaN` and `undefined` are not supported.\n *\n * @return {boolean}\n * True, if a row has been found, otherwise false.\n */\n hasRowWith(columnName, cellValue) {\n const table = this;\n const column = table.columns[columnName];\n if (column) {\n return (column.indexOf(cellValue) !== -1);\n }\n return false;\n }\n /**\n * Registers a callback for a specific event.\n *\n * @function Highcharts.DataTable#on\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {Highcharts.EventCallbackFunction<Highcharts.DataTable>} callback\n * Function to register for an event callback.\n *\n * @return {Function}\n * Function to unregister callback from the event.\n */\n on(type, callback) {\n return addEvent(this, type, callback);\n }\n /**\n * Renames a column of cell values.\n *\n * @function Highcharts.DataTable#renameColumn\n *\n * @param {string} columnName\n * Name of the column to be renamed.\n *\n * @param {string} newColumnName\n * New name of the column. An existing column with the same name will be\n * replaced.\n *\n * @return {boolean}\n * Returns `true` if successful, `false` if the column was not found.\n */\n renameColumn(columnName, newColumnName) {\n const table = this, columns = table.columns;\n if (columns[columnName]) {\n if (columnName !== newColumnName) {\n columns[newColumnName] = columns[columnName];\n delete columns[columnName];\n }\n return true;\n }\n return false;\n }\n /**\n * Sets a cell value based on the row index and column. Will\n * insert a new column, if not found.\n *\n * @function Highcharts.DataTable#setCell\n *\n * @param {string} columnName\n * Column name to set.\n *\n * @param {number|undefined} rowIndex\n * Row index to set.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Cell value to set.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setCell\n * @emits #afterSetCell\n */\n setCell(columnName, rowIndex, cellValue, eventDetail) {\n const table = this, columns = table.columns, modifier = table.modifier;\n let column = columns[columnName];\n if (column && column[rowIndex] === cellValue) {\n return;\n }\n table.emit({\n type: 'setCell',\n cellValue,\n columnName: columnName,\n detail: eventDetail,\n rowIndex\n });\n if (!column) {\n column = columns[columnName] = new Array(table.rowCount);\n }\n if (rowIndex >= table.rowCount) {\n table.rowCount = (rowIndex + 1);\n }\n column[rowIndex] = cellValue;\n if (modifier) {\n modifier.modifyCell(table, columnName, rowIndex, cellValue);\n }\n table.emit({\n type: 'afterSetCell',\n cellValue,\n columnName: columnName,\n detail: eventDetail,\n rowIndex\n });\n }\n /**\n * Sets cell values for multiple columns. Will insert new columns, if not\n * found.\n *\n * @function Highcharts.DataTable#setColumns\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex]\n * Index of the first row to change. Keep undefined to reset.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setColumns\n * @emits #afterSetColumns\n */\n setColumns(columns, rowIndex, eventDetail) {\n const table = this, tableColumns = table.columns, tableModifier = table.modifier, columnNames = Object.keys(columns);\n let rowCount = table.rowCount;\n table.emit({\n type: 'setColumns',\n columns,\n columnNames,\n detail: eventDetail,\n rowIndex\n });\n if (typeof rowIndex === 'undefined') {\n super.setColumns(columns, rowIndex, extend(eventDetail, { silent: true }));\n }\n else {\n for (let i = 0, iEnd = columnNames.length, column, columnName; i < iEnd; ++i) {\n columnName = columnNames[i];\n column = columns[columnName];\n const tableColumn = (tableColumns[columnName] ?\n tableColumns[columnName] :\n tableColumns[columnName] = new Array(table.rowCount));\n for (let i = (rowIndex || 0), iEnd = column.length; i < iEnd; ++i) {\n tableColumn[i] = column[i];\n }\n rowCount = Math.max(rowCount, tableColumn.length);\n }\n this.applyRowCount(rowCount);\n }\n if (tableModifier) {\n tableModifier.modifyColumns(table, columns, rowIndex || 0);\n }\n table.emit({\n type: 'afterSetColumns',\n columns,\n columnNames,\n detail: eventDetail,\n rowIndex\n });\n }\n /**\n * Sets or unsets the modifier for the table.\n *\n * @param {Highcharts.DataModifier} [modifier]\n * Modifier to set, or `undefined` to unset.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<Highcharts.DataTable>}\n * Resolves to this table if successful, or rejects on failure.\n *\n * @emits #setModifier\n * @emits #afterSetModifier\n */\n setModifier(modifier, eventDetail) {\n const table = this;\n let promise;\n table.emit({\n type: 'setModifier',\n detail: eventDetail,\n modifier,\n modified: table.modified\n });\n table.modified = table;\n table.modifier = modifier;\n if (modifier) {\n promise = modifier.modify(table);\n }\n else {\n promise = Promise.resolve(table);\n }\n return promise\n .then((table) => {\n table.emit({\n type: 'afterSetModifier',\n detail: eventDetail,\n modifier,\n modified: table.modified\n });\n return table;\n })['catch']((error) => {\n table.emit({\n type: 'setModifierError',\n error,\n modifier,\n modified: table.modified\n });\n throw error;\n });\n }\n /**\n * Sets the original row indexes for the table. It is used to keep the\n * reference to the original rows when modifying the table.\n *\n * @param {Array<number|undefined>} originalRowIndexes\n * Original row indexes array.\n *\n * @param {boolean} omitLocalRowIndexes\n * Whether to omit the local row indexes calculation. Defaults to `false`.\n */\n setOriginalRowIndexes(originalRowIndexes, omitLocalRowIndexes = false) {\n this.originalRowIndexes = originalRowIndexes;\n if (omitLocalRowIndexes) {\n return;\n }\n const modifiedIndexes = this.localRowIndexes = [];\n for (let i = 0, iEnd = originalRowIndexes.length, originalIndex; i < iEnd; ++i) {\n originalIndex = originalRowIndexes[i];\n if (defined(originalIndex)) {\n modifiedIndexes[originalIndex] = i;\n }\n }\n }\n /**\n * Sets cell values of a row. Will insert a new row, if no index was\n * provided, or if the index is higher than the total number of table rows.\n *\n * Note: This function is just a simplified wrap of\n * {@link Highcharts.DataTable#setRows}.\n *\n * @function Highcharts.DataTable#setRow\n *\n * @param {Highcharts.DataTableRow|Highcharts.DataTableRowObject} row\n * Cell values to set.\n *\n * @param {number} [rowIndex]\n * Index of the row to set. Leave `undefind` to add as a new row.\n *\n * @param {boolean} [insert]\n * Whether to insert the row at the given index, or to overwrite the row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setRows\n * @emits #afterSetRows\n */\n setRow(row, rowIndex, insert, eventDetail) {\n this.setRows([row], rowIndex, insert, eventDetail);\n }\n /**\n * Sets cell values for multiple rows. Will insert new rows, if no index was\n * was provided, or if the index is higher than the total number of table\n * rows.\n *\n * @function Highcharts.DataTable#setRows\n *\n * @param {Array<(Highcharts.DataTableRow|Highcharts.DataTableRowObject)>} rows\n * Row values to set.\n *\n * @param {number} [rowIndex]\n * Index of the first row to set. Leave `undefined` to add as new rows.\n *\n * @param {boolean} [insert]\n * Whether to insert the row at the given index, or to overwrite the row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setRows\n * @emits #afterSetRows\n */\n setRows(rows, rowIndex = this.rowCount, insert, eventDetail) {\n const table = this, columns = table.columns, columnNames = Object.keys(columns), modifier = table.modifier, rowCount = rows.length;\n table.emit({\n type: 'setRows',\n detail: eventDetail,\n rowCount,\n rowIndex,\n rows\n });\n for (let i = 0, i2 = rowIndex, row; i < rowCount; ++i, ++i2) {\n row = rows[i];\n if (row === DataTable.NULL) {\n for (let j = 0, jEnd = columnNames.length; j < jEnd; ++j) {\n if (insert) {\n columns[columnNames[j]].splice(i2, 0, null);\n }\n else {\n columns[columnNames[j]][i2] = null;\n }\n }\n }\n else if (row instanceof Array) {\n for (let j = 0, jEnd = columnNames.length; j < jEnd; ++j) {\n columns[columnNames[j]][i2] = row[j];\n }\n }\n else {\n super.setRow(row, i2, void 0, { silent: true });\n }\n }\n const indexRowCount = insert ?\n rowCount + rows.length :\n rowIndex + rowCount;\n if (indexRowCount > table.rowCount) {\n table.rowCount = indexRowCount;\n for (let i = 0, iEnd = columnNames.length; i < iEnd; ++i) {\n columns[columnNames[i]].length = indexRowCount;\n }\n }\n if (modifier) {\n modifier.modifyRows(table, rows, rowIndex);\n }\n table.emit({\n type: 'afterSetRows',\n detail: eventDetail,\n rowCount,\n rowIndex,\n rows\n });\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Null state for a row record. In some cases, a row in a table may not\n * contain any data or may be invalid. In these cases, a null state can be\n * used to indicate that the row record is empty or invalid.\n *\n * @name Highcharts.DataTable.NULL\n * @type {Highcharts.DataTableRowObject}\n *\n * @see {@link Highcharts.DataTable.isNull} for a null test.\n *\n * @example\n * table.setRows([DataTable.NULL, DataTable.NULL], 10);\n */\n DataTable.NULL = {};\n /**\n * Semantic version string of the DataTable class.\n * @internal\n */\n DataTable.version = '1.0.0';\n /* *\n *\n * Default Export\n *\n * */\n\n return DataTable;\n });\n _registerModule(_modules, 'Data/Connectors/DataConnector.js', [_modules['Data/Modifiers/DataModifier.js'], _modules['Data/DataTable.js'], _modules['Core/Utilities.js']], function (DataModifier, DataTable, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Wojciech Chmiel\n * - Gøran Slettemark\n *\n * */\n const { addEvent, fireEvent, merge, pick } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Abstract class providing an interface for managing a DataConnector.\n *\n * @private\n */\n class DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructor for the connector class.\n *\n * @param {DataConnector.UserOptions} [options]\n * Options to use in the connector.\n */\n constructor(options = {}) {\n this.table = new DataTable(options.dataTable);\n this.metadata = options.metadata || { columns: {} };\n }\n /**\n * Poll timer ID, if active.\n */\n get polling() {\n return !!this.polling;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Method for adding metadata for a single column.\n *\n * @param {string} name\n * The name of the column to be described.\n *\n * @param {DataConnector.MetaColumn} columnMeta\n * The metadata to apply to the column.\n */\n describeColumn(name, columnMeta) {\n const connector = this, columns = connector.metadata.columns;\n columns[name] = merge(columns[name] || {}, columnMeta);\n }\n /**\n * Method for applying columns meta information to the whole DataConnector.\n *\n * @param {Highcharts.Dictionary<DataConnector.MetaColumn>} columns\n * Pairs of column names and MetaColumn objects.\n */\n describeColumns(columns) {\n const connector = this, columnNames = Object.keys(columns);\n let columnName;\n while (typeof (columnName = columnNames.pop()) === 'string') {\n connector.describeColumn(columnName, columns[columnName]);\n }\n }\n /**\n * Emits an event on the connector to all registered callbacks of this\n * event.\n *\n * @param {DataConnector.Event} [e]\n * Event object containing additional event information.\n */\n emit(e) {\n fireEvent(this, e.type, e);\n }\n /**\n * Returns the order of columns.\n *\n * @param {boolean} [usePresentationState]\n * Whether to use the column order of the presentation state of the table.\n *\n * @return {Array<string>|undefined}\n * Order of columns.\n */\n getColumnOrder(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n usePresentationState) {\n const connector = this, columns = connector.metadata.columns, names = Object.keys(columns || {});\n if (names.length) {\n return names.sort((a, b) => (pick(columns[a].index, 0) - pick(columns[b].index, 0)));\n }\n }\n /**\n * Retrieves the columns of the dataTable,\n * applies column order from meta.\n *\n * @param {boolean} [usePresentationOrder]\n * Whether to use the column order of the presentation state of the table.\n *\n * @return {Highcharts.DataTableColumnCollection}\n * An object with the properties `columnNames` and `columnValues`\n */\n getSortedColumns(usePresentationOrder) {\n return this.table.getColumns(this.getColumnOrder(usePresentationOrder));\n }\n /**\n * The default load method, which fires the `afterLoad` event\n *\n * @return {Promise<DataConnector>}\n * The loaded connector.\n *\n * @emits DataConnector#afterLoad\n */\n load() {\n fireEvent(this, 'afterLoad', { table: this.table });\n return Promise.resolve(this);\n }\n /**\n * Registers a callback for a specific connector event.\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {DataEventEmitter.Callback} callback\n * Function to register for the connector callback.\n *\n * @return {Function}\n * Function to unregister callback from the connector event.\n */\n on(type, callback) {\n return addEvent(this, type, callback);\n }\n /**\n * The default save method, which fires the `afterSave` event.\n *\n * @return {Promise<DataConnector>}\n * The saved connector.\n *\n * @emits DataConnector#afterSave\n * @emits DataConnector#saveError\n */\n save() {\n fireEvent(this, 'saveError', { table: this.table });\n return Promise.reject(new Error('Not implemented'));\n }\n /**\n * Sets the index and order of columns.\n *\n * @param {Array<string>} columnNames\n * Order of columns.\n */\n setColumnOrder(columnNames) {\n const connector = this;\n for (let i = 0, iEnd = columnNames.length; i < iEnd; ++i) {\n connector.describeColumn(columnNames[i], { index: i });\n }\n }\n setModifierOptions(modifierOptions) {\n const ModifierClass = (modifierOptions &&\n DataModifier.types[modifierOptions.type]);\n return this.table\n .setModifier(ModifierClass ?\n new ModifierClass(modifierOptions) :\n void 0)\n .then(() => this);\n }\n /**\n * Starts polling new data after the specific time span in milliseconds.\n *\n * @param {number} refreshTime\n * Refresh time in milliseconds between polls.\n */\n startPolling(refreshTime = 1000) {\n const connector = this;\n window.clearTimeout(connector._polling);\n connector._polling = window.setTimeout(() => connector\n .load()['catch']((error) => connector.emit({\n type: 'loadError',\n error,\n table: connector.table\n }))\n .then(() => {\n if (connector._polling) {\n connector.startPolling(refreshTime);\n }\n }), refreshTime);\n }\n /**\n * Stops polling data.\n */\n stopPolling() {\n const connector = this;\n window.clearTimeout(connector._polling);\n delete connector._polling;\n }\n /**\n * Retrieves metadata from a single column.\n *\n * @param {string} name\n * The identifier for the column that should be described\n *\n * @return {DataConnector.MetaColumn|undefined}\n * Returns a MetaColumn object if found.\n */\n whatIs(name) {\n return this.metadata.columns[name];\n }\n }\n /* *\n *\n * Class Namespace\n *\n * */\n (function (DataConnector) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n /**\n * Registry as a record object with connector names and their class.\n */\n DataConnector.types = {};\n /* *\n *\n * Functions\n *\n * */\n /**\n * Adds a connector class to the registry. The connector has to provide the\n * `DataConnector.options` property and the `DataConnector.load` method to\n * modify the table.\n *\n * @private\n *\n * @param {string} key\n * Registry key of the connector class.\n *\n * @param {DataConnectorType} DataConnectorClass\n * Connector class (aka class constructor) to register.\n *\n * @return {boolean}\n * Returns true, if the registration was successful. False is returned, if\n * their is already a connector registered with this key.\n */\n function registerType(key, DataConnectorClass) {\n return (!!key &&\n !DataConnector.types[key] &&\n !!(DataConnector.types[key] = DataConnectorClass));\n }\n DataConnector.registerType = registerType;\n })(DataConnector || (DataConnector = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return DataConnector;\n });\n _registerModule(_modules, 'Data/Converters/DataConverter.js', [_modules['Data/DataTable.js'], _modules['Core/Utilities.js']], function (DataTable, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Sebastian Bochan\n * - Gøran Slettemark\n * - Torstein Hønsi\n * - Wojciech Chmiel\n *\n * */\n const { addEvent, fireEvent, isNumber, merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Base class providing an interface and basic methods for a DataConverter\n *\n * @private\n */\n class DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the DataConverter.\n *\n * @param {DataConverter.UserOptions} [options]\n * Options for the DataConverter.\n */\n constructor(options) {\n /* *\n *\n * Properties\n *\n * */\n /**\n * A collection of available date formats.\n */\n this.dateFormats = {\n 'YYYY/mm/dd': {\n regex: /^(\\d{4})([\\-\\.\\/])(\\d{1,2})\\2(\\d{1,2})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[1], match[3] - 1, +match[4]) :\n NaN);\n }\n },\n 'dd/mm/YYYY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{4})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[4], match[3] - 1, +match[1]) :\n NaN);\n },\n alternative: 'mm/dd/YYYY' // Different format with the same regex\n },\n 'mm/dd/YYYY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{4})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[4], match[1] - 1, +match[3]) :\n NaN);\n }\n },\n 'dd/mm/YY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{2})$/,\n parser: function (match) {\n const d = new Date();\n if (!match) {\n return NaN;\n }\n let year = +match[4];\n if (year > (d.getFullYear() - 2000)) {\n year += 1900;\n }\n else {\n year += 2000;\n }\n return Date.UTC(year, match[3] - 1, +match[1]);\n },\n alternative: 'mm/dd/YY' // Different format with the same regex\n },\n 'mm/dd/YY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{2})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[4] + 2000, match[1] - 1, +match[3]) :\n NaN);\n }\n }\n };\n const mergedOptions = merge(DataConverter.defaultOptions, options);\n let regExpPoint = mergedOptions.decimalPoint;\n if (regExpPoint === '.' || regExpPoint === ',') {\n regExpPoint = regExpPoint === '.' ? '\\\\.' : ',';\n this.decimalRegExp =\n new RegExp('^(-?[0-9]+)' + regExpPoint + '([0-9]+)$');\n }\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Converts a value to a boolean.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {boolean}\n * Converted value as a boolean.\n */\n asBoolean(value) {\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'string') {\n return value !== '' && value !== '0' && value !== 'false';\n }\n return !!this.asNumber(value);\n }\n /**\n * Converts a value to a Date.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {globalThis.Date}\n * Converted value as a Date.\n */\n asDate(value) {\n let timestamp;\n if (typeof value === 'string') {\n timestamp = this.parseDate(value);\n }\n else if (typeof value === 'number') {\n timestamp = value;\n }\n else if (value instanceof Date) {\n return value;\n }\n else {\n timestamp = this.parseDate(this.asString(value));\n }\n return new Date(timestamp);\n }\n /**\n * Casts a string value to it's guessed type\n *\n * @param {*} value\n * The value to examine.\n *\n * @return {number|string|Date}\n * The converted value.\n */\n asGuessedType(value) {\n const converter = this, typeMap = {\n 'number': converter.asNumber,\n 'Date': converter.asDate,\n 'string': converter.asString\n };\n return typeMap[converter.guessType(value)].call(converter, value);\n }\n /**\n * Converts a value to a number.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {number}\n * Converted value as a number.\n */\n asNumber(value) {\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'boolean') {\n return value ? 1 : 0;\n }\n if (typeof value === 'string') {\n const decimalRegex = this.decimalRegExp;\n if (value.indexOf(' ') > -1) {\n value = value.replace(/\\s+/g, '');\n }\n if (decimalRegex) {\n if (!decimalRegex.test(value)) {\n return NaN;\n }\n value = value.replace(decimalRegex, '$1.$2');\n }\n return parseFloat(value);\n }\n if (value instanceof Date) {\n return value.getDate();\n }\n if (value) {\n return value.getRowCount();\n }\n return NaN;\n }\n /**\n * Converts a value to a string.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {string}\n * Converted value as a string.\n */\n asString(value) {\n return '' + value;\n }\n /**\n * Tries to guess the date format\n * - Check if either month candidate exceeds 12\n * - Check if year is missing (use current year)\n * - Check if a shortened year format is used (e.g. 1/1/99)\n * - If no guess can be made, the user must be prompted\n * data is the data to deduce a format based on\n * @private\n *\n * @param {Array<string>} data\n * Data to check the format.\n *\n * @param {number} limit\n * Max data to check the format.\n *\n * @param {boolean} save\n * Whether to save the date format in the converter options.\n */\n deduceDateFormat(data, limit, save) {\n const parser = this, stable = [], max = [];\n let format = 'YYYY/mm/dd', thing, guessedFormat = [], i = 0, madeDeduction = false, \n /// candidates = {},\n elem, j;\n if (!limit || limit > data.length) {\n limit = data.length;\n }\n for (; i < limit; i++) {\n if (typeof data[i] !== 'undefined' &&\n data[i] && data[i].length) {\n thing = data[i]\n .trim()\n .replace(/[\\-\\.\\/]/g, ' ')\n .split(' ');\n guessedFormat = [\n '',\n '',\n ''\n ];\n for (j = 0; j < thing.length; j++) {\n if (j < guessedFormat.length) {\n elem = parseInt(thing[j], 10);\n if (elem) {\n max[j] = (!max[j] || max[j] < elem) ? elem : max[j];\n if (typeof stable[j] !== 'undefined') {\n if (stable[j] !== elem) {\n stable[j] = false;\n }\n }\n else {\n stable[j] = elem;\n }\n if (elem > 31) {\n if (elem < 100) {\n guessedFormat[j] = 'YY';\n }\n else {\n guessedFormat[j] = 'YYYY';\n }\n /// madeDeduction = true;\n }\n else if (elem > 12 &&\n elem <= 31) {\n guessedFormat[j] = 'dd';\n madeDeduction = true;\n }\n else if (!guessedFormat[j].length) {\n guessedFormat[j] = 'mm';\n }\n }\n }\n }\n }\n }\n if (madeDeduction) {\n // This handles a few edge cases with hard to guess dates\n for (j = 0; j < stable.length; j++) {\n if (stable[j] !== false) {\n if (max[j] > 12 &&\n guessedFormat[j] !== 'YY' &&\n guessedFormat[j] !== 'YYYY') {\n guessedFormat[j] = 'YY';\n }\n }\n else if (max[j] > 12 && guessedFormat[j] === 'mm') {\n guessedFormat[j] = 'dd';\n }\n }\n // If the middle one is dd, and the last one is dd,\n // the last should likely be year.\n if (guessedFormat.length === 3 &&\n guessedFormat[1] === 'dd' &&\n guessedFormat[2] === 'dd') {\n guessedFormat[2] = 'YY';\n }\n format = guessedFormat.join('/');\n // If the caculated format is not valid, we need to present an\n // error.\n }\n // Save the deduced format in the converter options.\n if (save) {\n parser.options.dateFormat = format;\n }\n return format;\n }\n /**\n * Emits an event on the DataConverter instance.\n *\n * @param {DataConverter.Event} [e]\n * Event object containing additional event data\n */\n emit(e) {\n fireEvent(this, e.type, e);\n }\n /**\n * Initiates the data exporting. Should emit `exportError` on failure.\n *\n * @param {DataConnector} connector\n * Connector to export from.\n *\n * @param {DataConverter.Options} [options]\n * Options for the export.\n */\n export(\n /* eslint-disable @typescript-eslint/no-unused-vars */\n connector, options\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ) {\n this.emit({\n type: 'exportError',\n columns: [],\n headers: []\n });\n throw new Error('Not implemented');\n }\n /**\n * Getter for the data table.\n *\n * @return {DataTable}\n * Table of parsed data.\n */\n getTable() {\n throw new Error('Not implemented');\n }\n /**\n * Guesses the potential type of a string value for parsing CSV etc.\n *\n * @param {*} value\n * The value to examine.\n *\n * @return {'number'|'string'|'Date'}\n * Type string, either `string`, `Date`, or `number`.\n */\n guessType(value) {\n const converter = this;\n let result = 'string';\n if (typeof value === 'string') {\n const trimedValue = converter.trim(`${value}`), decimalRegExp = converter.decimalRegExp;\n let innerTrimedValue = converter.trim(trimedValue, true);\n if (decimalRegExp) {\n innerTrimedValue = (decimalRegExp.test(innerTrimedValue) ?\n innerTrimedValue.replace(decimalRegExp, '$1.$2') :\n '');\n }\n const floatValue = parseFloat(innerTrimedValue);\n if (+innerTrimedValue === floatValue) {\n // String is numeric\n value = floatValue;\n }\n else {\n // Determine if a date string\n const dateValue = converter.parseDate(value);\n result = isNumber(dateValue) ? 'Date' : 'string';\n }\n }\n if (typeof value === 'number') {\n // Greater than milliseconds in a year assumed timestamp\n result = value > 365 * 24 * 3600 * 1000 ? 'Date' : 'number';\n }\n return result;\n }\n /**\n * Registers a callback for a specific event.\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {DataEventEmitter.Callback} callback\n * Function to register for an modifier callback.\n *\n * @return {Function}\n * Function to unregister callback from the modifier event.\n */\n on(type, callback) {\n return addEvent(this, type, callback);\n }\n /**\n * Initiates the data parsing. Should emit `parseError` on failure.\n *\n * @param {DataConverter.UserOptions} options\n * Options of the DataConverter.\n */\n parse(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n options) {\n this.emit({\n type: 'parseError',\n columns: [],\n headers: []\n });\n throw new Error('Not implemented');\n }\n /**\n * Parse a date and return it as a number.\n *\n * @param {string} value\n * Value to parse.\n *\n * @param {string} dateFormatProp\n * Which of the predefined date formats\n * to use to parse date values.\n */\n parseDate(value, dateFormatProp) {\n const converter = this, options = converter.options;\n let dateFormat = dateFormatProp || options.dateFormat, result = NaN, key, format, match;\n if (options.parseDate) {\n result = options.parseDate(value);\n }\n else {\n // Auto-detect the date format the first time\n if (!dateFormat) {\n for (key in converter.dateFormats) { // eslint-disable-line guard-for-in\n format = converter.dateFormats[key];\n match = value.match(format.regex);\n if (match) {\n // `converter.options.dateFormat` = dateFormat = key;\n dateFormat = key;\n // `converter.options.alternativeFormat` =\n // format.alternative || '';\n result = format.parser(match);\n break;\n }\n }\n // Next time, use the one previously found\n }\n else {\n format = converter.dateFormats[dateFormat];\n if (!format) {\n // The selected format is invalid\n format = converter.dateFormats['YYYY/mm/dd'];\n }\n match = value.match(format.regex);\n if (match) {\n result = format.parser(match);\n }\n }\n // Fall back to Date.parse\n if (!match) {\n match = Date.parse(value);\n // External tools like Date.js and MooTools extend Date object\n // and returns a date.\n if (typeof match === 'object' &&\n match !== null &&\n match.getTime) {\n result = (match.getTime() -\n match.getTimezoneOffset() *\n 60000);\n // Timestamp\n }\n else if (isNumber(match)) {\n result = match - (new Date(match)).getTimezoneOffset() * 60000;\n if ( // Reset dates without year in Chrome\n value.indexOf('2001') === -1 &&\n (new Date(result)).getFullYear() === 2001) {\n result = NaN;\n }\n }\n }\n }\n return result;\n }\n /**\n * Trim a string from whitespaces.\n *\n * @param {string} str\n * String to trim.\n *\n * @param {boolean} [inside=false]\n * Remove all spaces between numbers.\n *\n * @return {string}\n * Trimed string\n */\n trim(str, inside) {\n if (typeof str === 'string') {\n str = str.replace(/^\\s+|\\s+$/g, '');\n // Clear white space insdie the string, like thousands separators\n if (inside && /^[\\d\\s]+$/.test(str)) {\n str = str.replace(/\\s/g, '');\n }\n }\n return str;\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default options\n */\n DataConverter.defaultOptions = {\n dateFormat: '',\n alternativeFormat: '',\n startColumn: 0,\n endColumn: Number.MAX_VALUE,\n startRow: 0,\n endRow: Number.MAX_VALUE,\n firstRowAsNames: true,\n switchRowsAndColumns: false\n };\n /* *\n *\n * Class Namespace\n *\n * */\n /**\n * Additionally provided types for events and conversion.\n */\n (function (DataConverter) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Converts an array of columns to a table instance. Second dimension of the\n * array are the row cells.\n *\n * @param {Array<DataTable.Column>} [columns]\n * Array to convert.\n *\n * @param {Array<string>} [headers]\n * Column names to use.\n *\n * @return {DataTable}\n * Table instance from the arrays.\n */\n function getTableFromColumns(columns = [], headers = []) {\n const table = new DataTable();\n for (let i = 0, iEnd = Math.max(headers.length, columns.length); i < iEnd; ++i) {\n table.setColumn(headers[i] || `${i}`, columns[i]);\n }\n return table;\n }\n DataConverter.getTableFromColumns = getTableFromColumns;\n })(DataConverter || (DataConverter = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return DataConverter;\n });\n _registerModule(_modules, 'Data/DataCursor.js', [], function () {\n /* *\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n /* *\n *\n * Class\n *\n * */\n /**\n * This class manages state cursors pointing on {@link Data.DataTable}. It\n * creates a relation between states of the user interface and the table cells,\n * columns, or rows.\n *\n * @class\n * @name Data.DataCursor\n */\n class DataCursor {\n /* *\n *\n * Constructor\n *\n * */\n constructor(stateMap = {}) {\n this.emittingRegister = [];\n this.listenerMap = {};\n this.stateMap = stateMap;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * This function registers a listener for a specific state and table.\n *\n * @example\n * ```TypeScript\n * dataCursor.addListener(myTable.id, 'hover', (e: DataCursor.Event) => {\n * if (e.cursor.type === 'position') {\n * console.log(`Hover over row #${e.cursor.row}.`);\n * }\n * });\n * ```\n *\n * @function #addListener\n *\n * @param {Data.DataCursor.TableId} tableId\n * The ID of the table to listen to.\n *\n * @param {Data.DataCursor.State} state\n * The state on the table to listen to.\n *\n * @param {Data.DataCursor.Listener} listener\n * The listener to register.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n addListener(tableId, state, listener) {\n const listenerMap = this.listenerMap[tableId] = (this.listenerMap[tableId] ||\n {});\n const listeners = listenerMap[state] = (listenerMap[state] ||\n []);\n listeners.push(listener);\n return this;\n }\n /**\n * @private\n */\n buildEmittingTag(e) {\n return (e.cursor.type === 'position' ?\n [\n e.table.id,\n e.cursor.column,\n e.cursor.row,\n e.cursor.state,\n e.cursor.type\n ] :\n [\n e.table.id,\n e.cursor.columns,\n e.cursor.firstRow,\n e.cursor.lastRow,\n e.cursor.state,\n e.cursor.type\n ]).join('\\0');\n }\n /**\n * This function emits a state cursor related to a table. It will provide\n * lasting state cursors of the table to listeners.\n *\n * @example\n * ```ts\n * dataCursor.emit(myTable, {\n * type: 'position',\n * column: 'city',\n * row: 4,\n * state: 'hover',\n * });\n * ```\n *\n * @param {Data.DataTable} table\n * The related table of the cursor.\n *\n * @param {Data.DataCursor.Type} cursor\n * The state cursor to emit.\n *\n * @param {Event} [event]\n * Optional event information from a related source.\n *\n * @param {boolean} [lasting]\n * Whether this state cursor should be kept until it is cleared with\n * {@link DataCursor#remitCursor}.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n emitCursor(table, cursor, event, lasting) {\n const tableId = table.id, state = cursor.state, listeners = (this.listenerMap[tableId] &&\n this.listenerMap[tableId][state]);\n if (listeners) {\n const stateMap = this.stateMap[tableId] = (this.stateMap[tableId] ?? {});\n const cursors = stateMap[cursor.state] || [];\n if (lasting) {\n if (!cursors.length) {\n stateMap[cursor.state] = cursors;\n }\n if (DataCursor.getIndex(cursor, cursors) === -1) {\n cursors.push(cursor);\n }\n }\n const e = {\n cursor,\n cursors,\n table\n };\n if (event) {\n e.event = event;\n }\n const emittingRegister = this.emittingRegister, emittingTag = this.buildEmittingTag(e);\n if (emittingRegister.indexOf(emittingTag) >= 0) {\n // Break call stack loops\n return this;\n }\n try {\n this.emittingRegister.push(emittingTag);\n for (let i = 0, iEnd = listeners.length; i < iEnd; ++i) {\n listeners[i].call(this, e);\n }\n }\n finally {\n const index = this.emittingRegister.indexOf(emittingTag);\n if (index >= 0) {\n this.emittingRegister.splice(index, 1);\n }\n }\n }\n return this;\n }\n /**\n * Removes a lasting state cursor.\n *\n * @function #remitCursor\n *\n * @param {string} tableId\n * ID of the related cursor table.\n *\n * @param {Data.DataCursor.Type} cursor\n * Copy or reference of the cursor.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n remitCursor(tableId, cursor) {\n const cursors = (this.stateMap[tableId] &&\n this.stateMap[tableId][cursor.state]);\n if (cursors) {\n const index = DataCursor.getIndex(cursor, cursors);\n if (index >= 0) {\n cursors.splice(index, 1);\n }\n }\n return this;\n }\n /**\n * This function removes a listener.\n *\n * @function #addListener\n *\n * @param {Data.DataCursor.TableId} tableId\n * The ID of the table the listener is connected to.\n *\n * @param {Data.DataCursor.State} state\n * The state on the table the listener is listening to.\n *\n * @param {Data.DataCursor.Listener} listener\n * The listener to deregister.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n removeListener(tableId, state, listener) {\n const listeners = (this.listenerMap[tableId] &&\n this.listenerMap[tableId][state]);\n if (listeners) {\n const index = listeners.indexOf(listener);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n }\n return this;\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Semantic version string of the DataCursor class.\n * @internal\n */\n DataCursor.version = '1.0.0';\n /* *\n *\n * Class Namespace\n *\n * */\n /**\n * @class Data.DataCursor\n */\n (function (DataCursor) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Finds the index of an cursor in an array.\n * @private\n */\n function getIndex(needle, cursors) {\n if (needle.type === 'position') {\n for (let cursor, i = 0, iEnd = cursors.length; i < iEnd; ++i) {\n cursor = cursors[i];\n if (cursor.type === 'position' &&\n cursor.state === needle.state &&\n cursor.column === needle.column &&\n cursor.row === needle.row) {\n return i;\n }\n }\n }\n else {\n const columnNeedle = JSON.stringify(needle.columns);\n for (let cursor, i = 0, iEnd = cursors.length; i < iEnd; ++i) {\n cursor = cursors[i];\n if (cursor.type === 'range' &&\n cursor.state === needle.state &&\n cursor.firstRow === needle.firstRow &&\n cursor.lastRow === needle.lastRow &&\n JSON.stringify(cursor.columns) === columnNeedle) {\n return i;\n }\n }\n }\n return -1;\n }\n DataCursor.getIndex = getIndex;\n /**\n * Checks whether two cursor share the same properties.\n * @private\n */\n function isEqual(cursorA, cursorB) {\n if (cursorA.type === 'position' && cursorB.type === 'position') {\n return (cursorA.column === cursorB.column &&\n cursorA.row === cursorB.row &&\n cursorA.state === cursorB.state);\n }\n if (cursorA.type === 'range' && cursorB.type === 'range') {\n return (cursorA.firstRow === cursorB.firstRow &&\n cursorA.lastRow === cursorB.lastRow &&\n (JSON.stringify(cursorA.columns) ===\n JSON.stringify(cursorB.columns)));\n }\n return false;\n }\n DataCursor.isEqual = isEqual;\n /**\n * Checks whether a cursor is in a range.\n * @private\n */\n function isInRange(needle, range) {\n if (range.type === 'position') {\n range = toRange(range);\n }\n if (needle.type === 'position') {\n needle = toRange(needle, range);\n }\n const needleColumns = needle.columns;\n const rangeColumns = range.columns;\n return (needle.firstRow >= range.firstRow &&\n needle.lastRow <= range.lastRow &&\n (!needleColumns ||\n !rangeColumns ||\n needleColumns.every((column) => rangeColumns.indexOf(column) >= 0)));\n }\n DataCursor.isInRange = isInRange;\n /**\n * @private\n */\n function toPositions(cursor) {\n if (cursor.type === 'position') {\n return [cursor];\n }\n const columns = (cursor.columns || []);\n const positions = [];\n const state = cursor.state;\n for (let row = cursor.firstRow, rowEnd = cursor.lastRow; row < rowEnd; ++row) {\n if (!columns.length) {\n positions.push({\n type: 'position',\n row,\n state\n });\n continue;\n }\n for (let column = 0, columnEnd = columns.length; column < columnEnd; ++column) {\n positions.push({\n type: 'position',\n column: columns[column],\n row,\n state\n });\n }\n }\n return positions;\n }\n DataCursor.toPositions = toPositions;\n /**\n * @private\n */\n function toRange(cursor, defaultRange) {\n if (cursor.type === 'range') {\n return cursor;\n }\n const range = {\n type: 'range',\n firstRow: (cursor.row ??\n (defaultRange && defaultRange.firstRow) ??\n 0),\n lastRow: (cursor.row ??\n (defaultRange && defaultRange.lastRow) ??\n Number.MAX_VALUE),\n state: cursor.state\n };\n if (typeof cursor.column !== 'undefined') {\n range.columns = [cursor.column];\n }\n return range;\n }\n DataCursor.toRange = toRange;\n })(DataCursor || (DataCursor = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return DataCursor;\n });\n _registerModule(_modules, 'DataGrid/Globals.js', [], function () {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n /* *\n *\n * Imports\n *\n * */\n /* *\n *\n * Namespace\n *\n * */\n /**\n * Global DataGrid namespace.\n *\n * @namespace DataGrid\n */\n var Globals;\n (function (Globals) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n Globals.classNamePrefix = 'highcharts-datagrid-';\n Globals.classNames = {\n container: Globals.classNamePrefix + 'container',\n tableElement: Globals.classNamePrefix + 'table',\n captionElement: Globals.classNamePrefix + 'caption',\n theadElement: Globals.classNamePrefix + 'thead',\n tbodyElement: Globals.classNamePrefix + 'tbody',\n rowElement: Globals.classNamePrefix + 'row',\n rowEven: Globals.classNamePrefix + 'row-even',\n rowOdd: Globals.classNamePrefix + 'row-odd',\n hoveredRow: Globals.classNamePrefix + 'hovered-row',\n columnElement: Globals.classNamePrefix + 'column',\n hoveredCell: Globals.classNamePrefix + 'hovered-cell',\n hoveredColumn: Globals.classNamePrefix + 'hovered-column',\n editedCell: Globals.classNamePrefix + 'edited-cell',\n rowsContentNowrap: Globals.classNamePrefix + 'rows-content-nowrap',\n headerCell: Globals.classNamePrefix + 'header-cell',\n headerCellContent: Globals.classNamePrefix + 'header-cell-content',\n headerRow: Globals.classNamePrefix + 'head-row-content',\n noData: Globals.classNamePrefix + 'no-data',\n columnFirst: Globals.classNamePrefix + 'column-first',\n columnSortable: Globals.classNamePrefix + 'column-sortable',\n columnSortableIcon: Globals.classNamePrefix + 'column-sortable-icon',\n columnSortedAsc: Globals.classNamePrefix + 'column-sorted-asc',\n columnSortedDesc: Globals.classNamePrefix + 'column-sorted-desc',\n resizerHandles: Globals.classNamePrefix + 'column-resizer',\n resizedColumn: Globals.classNamePrefix + 'column-resized',\n creditsContainer: Globals.classNamePrefix + 'credits-container',\n creditsText: Globals.classNamePrefix + 'credits',\n visuallyHidden: Globals.classNamePrefix + 'visually-hidden'\n };\n Globals.win = window;\n Globals.userAgent = (Globals.win.navigator && Globals.win.navigator.userAgent) || '';\n Globals.isChrome = Globals.userAgent.indexOf('Chrome') !== -1;\n Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1;\n })(Globals || (Globals = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return Globals;\n });\n _registerModule(_modules, 'DataGrid/Utils.js', [], function () {\n /* *\n *\n * DataGrid utilities\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n /* *\n *\n * Namespace\n *\n * */\n var DataGridUtils;\n (function (DataGridUtils) {\n /* *\n *\n * Functions\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Creates a HTML element with the provided options.\n *\n * @param tagName\n * The tag name of the element.\n *\n * @param params\n * The parameters of the element.\n *\n * @param parent\n * The parent element.\n */\n function makeHTMLElement(tagName, params, parent) {\n const element = document.createElement(tagName);\n if (params) {\n const paramsKeys = Object.keys(params);\n for (let i = 0; i < paramsKeys.length; i++) {\n const key = paramsKeys[i];\n const value = params[key];\n if (value !== void 0) {\n if (key === 'style') {\n Object.assign(element.style, value);\n }\n else {\n element[key] = value;\n }\n }\n }\n }\n if (parent) {\n parent.appendChild(element);\n }\n return element;\n }\n DataGridUtils.makeHTMLElement = makeHTMLElement;\n /**\n * Creates a div element with the provided class name and id.\n *\n * @param className\n * The class name of the div.\n *\n * @param id\n * The id of the element.\n */\n function makeDiv(className, id) {\n return makeHTMLElement('div', { className, id });\n }\n DataGridUtils.makeDiv = makeDiv;\n /**\n * Gets the translateY value of an element.\n *\n * @param element\n * The element to get the translateY value from.\n *\n * @returns The translateY value of the element.\n */\n function getTranslateY(element) {\n const transform = element.style.transform;\n if (transform) {\n const match = transform.match(/translateY\\(([^)]+)\\)/);\n if (match) {\n return parseFloat(match[1]);\n }\n }\n return 0;\n }\n DataGridUtils.getTranslateY = getTranslateY;\n /**\n * Check if there's a possibility that the given string is an HTML\n * (contains '<').\n *\n * @param str\n * Text to verify.\n */\n function isHTML(str) {\n return str.indexOf('<') !== -1;\n }\n DataGridUtils.isHTML = isHTML;\n /**\n * Returns a string containing plain text format by removing HTML tags\n *\n * @param text\n * String to be sanitized\n *\n * @returns\n * Sanitized plain text string\n */\n function sanitizeText(text) {\n try {\n return new DOMParser().parseFromString(text, 'text/html')\n .body.textContent || '';\n }\n catch (error) {\n return '';\n }\n }\n DataGridUtils.sanitizeText = sanitizeText;\n })(DataGridUtils || (DataGridUtils = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return DataGridUtils;\n });\n _registerModule(_modules, 'DataGrid/Accessibility/Accessibility.js', [_modules['DataGrid/Globals.js'], _modules['DataGrid/Utils.js']], function (Globals, DGUtils) {\n /* *\n *\n * DataGrid Accessibility class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DGUtils;\n /**\n * Representing the accessibility functionalities for the Data Grid.\n */\n class Accessibility {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Construct the accessibility object.\n *\n * @param dataGrid\n * The DataGrid Table instance which the accessibility controller belong to.\n */\n constructor(dataGrid) {\n this.dataGrid = dataGrid;\n this.element = document.createElement('div');\n this.element.classList.add(Globals.classNames.visuallyHidden);\n this.dataGrid.container?.prepend(this.element);\n this.announcerElement = document.createElement('p');\n this.announcerElement.setAttribute('aria-atomic', 'true');\n this.announcerElement.setAttribute('aria-hidden', 'false');\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Add the 'editable' hint span element for the editable cell.\n *\n * @param cellElement\n * The cell element to add the description to.\n */\n addEditableCellHint(cellElement) {\n const editableLang = this.dataGrid.options?.lang?.accessibility?.cellEditing?.editable;\n if (!editableLang) {\n return;\n }\n makeHTMLElement('span', {\n className: Globals.classNames.visuallyHidden,\n innerText: ', ' + editableLang\n }, cellElement);\n }\n /**\n * Add the description to the header cell.\n *\n * @param thElement\n * The header cell element to add the description to.\n *\n * @param description\n * The description to be added.\n */\n addHeaderCellDescription(thElement, description) {\n if (description) {\n thElement.setAttribute('aria-description', description);\n }\n }\n /**\n * Announce the message to the screen reader.\n *\n * @param msg\n * The message to be announced.\n *\n * @param assertive\n * Whether the message should be assertive. Default is false.\n */\n announce(msg, assertive = false) {\n if (this.announcerTimeout) {\n clearTimeout(this.announcerTimeout);\n }\n this.announcerElement.remove();\n this.announcerElement.setAttribute('aria-live', assertive ? 'assertive' : 'polite');\n this.element.appendChild(this.announcerElement);\n this.announcerElement.textContent = msg;\n this.announcerTimeout = setTimeout(() => {\n this.announcerElement.remove();\n }, 3000);\n }\n /**\n * Announce the message to the screen reader that the user sorted the\n * column.\n *\n * @param order\n * The order of the sorting.\n */\n userSortedColumn(order) {\n const { options } = this.dataGrid;\n const announcementsLang = options?.lang\n ?.accessibility?.sorting?.announcements;\n if (!options?.accessibility?.announcements?.sorting) {\n return;\n }\n let msg;\n switch (order) {\n case 'asc':\n msg = announcementsLang?.ascending;\n break;\n case 'desc':\n msg = announcementsLang?.descending;\n break;\n default:\n msg = announcementsLang?.none;\n }\n if (!msg) {\n return;\n }\n this.announce(msg, true);\n }\n /**\n * Announce the message to the screen reader that the user edited the cell.\n *\n * @param msgType\n * The type of the edit message.\n */\n userEditedCell(msgType) {\n const { options } = this.dataGrid;\n const announcementsLang = options?.lang\n ?.accessibility?.cellEditing?.announcements;\n if (!options?.accessibility?.announcements?.cellEditing) {\n return;\n }\n const msg = announcementsLang?.[msgType];\n if (!msg) {\n return;\n }\n this.announce(msg);\n }\n /**\n * Set the aria sort state of the column header cell element.\n *\n * @param thElement\n * The header cell element to set the `aria-sort` state to.\n *\n * @param state\n * The sort state to be set for the column header cell.\n */\n setColumnSortState(thElement, state) {\n thElement?.setAttribute('aria-sort', state);\n }\n /**\n * Set the row index attribute for the row element.\n *\n * @param el\n * The row element to set the index to.\n *\n * @param idx\n * The index of the row in the data table.\n */\n setRowIndex(el, idx) {\n el.setAttribute('aria-rowindex', idx);\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return Accessibility;\n });\n _registerModule(_modules, 'DataGrid/Credits.js', [_modules['DataGrid/Globals.js'], _modules['DataGrid/Utils.js']], function (Globals, DGUtils) {\n /* *\n *\n * DataGrid Credits class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n const { makeHTMLElement } = DGUtils;\n /* *\n *\n * Abstract Class of Row\n *\n * */\n /**\n * Represents a credits in the data grid.\n */\n class Credits {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Construct the credits.\n *\n * @param dataGrid\n * The DataGrid Table instance which the credits belong to.\n */\n constructor(dataGrid) {\n this.dataGrid = dataGrid;\n this.options = dataGrid.options?.credits ?? {};\n this.containerElement = makeHTMLElement('div', {\n className: Globals.classNames.creditsContainer\n });\n this.textElement = makeHTMLElement('a', {\n className: Globals.classNames.creditsText\n }, this.containerElement);\n this.textElement.setAttribute('target', '_top');\n this.render();\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Set the content of the credits.\n */\n setContent() {\n const { text, href } = this.options;\n this.textElement.innerText = text || '';\n this.textElement.setAttribute('href', href || '');\n }\n /**\n * Append the credits to the container. The position of the credits is\n * determined by the `position` option.\n */\n appendToContainer() {\n const { position } = this.options;\n if (position === 'top') {\n // Append the credits to the top of the table.\n this.dataGrid.contentWrapper?.prepend(this.containerElement);\n return;\n }\n // Append the credits to the bottom of the table.\n this.dataGrid.contentWrapper?.appendChild(this.containerElement);\n }\n /**\n * Update the credits with new options.\n *\n * @param options\n * The new options for the credits.\n *\n * @param render\n * Whether to render the credits after the update.\n */\n update(options, render = true) {\n if (options) {\n this.dataGrid.update({\n credits: options\n }, false);\n this.options = this.dataGrid.options?.credits ?? {};\n }\n if (render) {\n this.render();\n }\n }\n /**\n * Render the credits. If the credits are disabled, they will be removed\n * from the container. If also reflows the viewport dimensions.\n */\n render() {\n const enabled = this.options.enabled ?? false;\n this.containerElement.remove();\n if (enabled) {\n this.setContent();\n this.appendToContainer();\n }\n else {\n this.destroy();\n }\n this.dataGrid.viewport?.reflow();\n }\n /**\n * Get the height of the credits container.\n */\n getHeight() {\n return this.containerElement.offsetHeight;\n }\n /**\n * Destroy the credits. The credits will be removed from the container and\n * the reference to the credits will be deleted from the DataGrid instance\n * it belongs to.\n */\n destroy() {\n this.containerElement.remove();\n delete this.dataGrid.credits;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return Credits;\n });\n _registerModule(_modules, 'DataGrid/Defaults.js', [_modules['Core/Utilities.js']], function (Utils) {\n /* *\n *\n * DataGrid default options\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { merge } = Utils;\n /**\n * Namespace for default options.\n */\n var Defaults;\n (function (Defaults) {\n /**\n * Default options for the DataGrid.\n */\n Defaults.defaultOptions = {\n accessibility: {\n enabled: true,\n announcements: {\n cellEditing: true,\n sorting: true\n }\n },\n lang: {\n accessibility: {\n cellEditing: {\n editable: 'Editable.',\n announcements: {\n started: 'Entered cell editing mode.',\n edited: 'Edited cell value.',\n cancelled: 'Editing canceled.'\n }\n },\n sorting: {\n announcements: {\n ascending: 'Sorted ascending.',\n descending: 'Sorted descending.',\n none: 'Not sorted.'\n }\n }\n },\n noData: 'No data to display'\n },\n rendering: {\n columns: {\n distribution: 'full'\n },\n rows: {\n bufferSize: 10,\n strictHeights: false\n },\n header: {\n enabled: true\n }\n },\n credits: {\n enabled: true,\n text: 'Highcharts.com',\n href: 'https://www.highcharts.com?credits',\n position: 'bottom'\n },\n columnDefaults: {\n sorting: {\n sortable: true\n },\n resizing: true\n }\n };\n /**\n * Merge the default options with custom options. Commonly used for defining\n * reusable templates.\n *\n * @param options\n * The new custom chart options.\n */\n function setOptions(options) {\n merge(true, Defaults.defaultOptions, options);\n }\n Defaults.setOptions = setOptions;\n })(Defaults || (Defaults = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return Defaults;\n });\n _registerModule(_modules, 'Core/Chart/ChartDefaults.js', [], function () {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * General options for the chart.\n *\n * @optionparent chart\n */\n const ChartDefaults = {\n /**\n * Default `mapData` for all series, in terms of a GeoJSON or TopoJSON\n * object. If set to a string, it functions as an index into the\n * `Highcharts.maps` array.\n *\n * For picking out individual shapes and geometries to use for each series\n * of the map, see [series.mapData](#series.map.mapData).\n *\n * @sample maps/demo/geojson\n * Loading GeoJSON data\n * @sample maps/chart/topojson\n * Loading TopoJSON data\n *\n * @type {string|Array<*>|Highcharts.GeoJSON|Highcharts.TopoJSON}\n * @since 5.0.0\n * @product highmaps\n * @apioption chart.map\n */\n /**\n * Set lat/lon transformation definitions for the chart. If not defined,\n * these are extracted from the map data.\n *\n * @type {*}\n * @since 5.0.0\n * @product highmaps\n * @apioption chart.mapTransforms\n */\n /**\n * When using multiple axes, the ticks of two or more opposite axes\n * will automatically be aligned by adding ticks to the axis or axes\n * with the least ticks, as if `tickAmount` were specified.\n *\n * This can be prevented by setting `alignTicks` to false. If the grid\n * lines look messy, it's a good idea to hide them for the secondary\n * axis by setting `gridLineWidth` to 0.\n *\n * If `startOnTick` or `endOnTick` in the axis options are set to false,\n * then the `alignTicks ` will be disabled for the axis.\n *\n * Disabled for logarithmic axes.\n *\n * @sample {highcharts} highcharts/chart/alignticks-true/\n * True by default\n * @sample {highcharts} highcharts/chart/alignticks-false/\n * False\n * @sample {highstock} stock/chart/alignticks-true/\n * True by default\n * @sample {highstock} stock/chart/alignticks-false/\n * False\n *\n * @type {boolean}\n * @default true\n * @product highcharts highstock gantt\n * @apioption chart.alignTicks\n */\n /**\n * When using multiple axes, align the thresholds. When this is true, other\n * ticks will also be aligned.\n *\n * Note that for line series and some other series types, the `threshold`\n * option is set to `null` by default. This will in turn cause their y-axis\n * to not have a threshold. In order to avoid that, set the series\n * `threshold` to 0 or another number.\n *\n * If `startOnTick` or `endOnTick` in the axis options are set to false, or\n * if the axis is logarithmic, the threshold will not be aligned.\n *\n * @sample {highcharts} highcharts/chart/alignthresholds/ Set to true\n *\n * @since 10.0.0\n * @product highcharts highstock gantt\n * @apioption chart.alignThresholds\n */\n alignThresholds: false,\n /**\n * Set the overall animation for all chart updating. Animation can be\n * disabled throughout the chart by setting it to false here. It can\n * be overridden for each individual API method as a function parameter.\n * The only animation not affected by this option is the initial series\n * animation, see [plotOptions.series.animation](\n * #plotOptions.series.animation).\n *\n * The animation can either be set as a boolean or a configuration\n * object. If `true`, it will use the 'swing' jQuery easing and a\n * duration of 500 ms. If used as a configuration object, the following\n * properties are supported:\n *\n * - `defer`: The animation delay time in milliseconds.\n *\n * - `duration`: The duration of the animation in milliseconds.\n *\n * - `easing`: A string reference to an easing function set on the\n * `Math` object. See\n * [the easing demo](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-animation-easing/).\n *\n * When zooming on a series with less than 100 points, the chart redraw\n * will be done with animation, but in case of more data points, it is\n * necessary to set this option to ensure animation on zoom.\n *\n * @sample {highcharts} highcharts/chart/animation-none/\n * Updating with no animation\n * @sample {highcharts} highcharts/chart/animation-duration/\n * With a longer duration\n * @sample {highcharts} highcharts/chart/animation-easing/\n * With a jQuery UI easing\n * @sample {highmaps} maps/chart/animation-none/\n * Updating with no animation\n * @sample {highmaps} maps/chart/animation-duration/\n * With a longer duration\n *\n * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}\n * @default true\n * @apioption chart.animation\n */\n /**\n * A CSS class name to apply to the charts container `div`, allowing\n * unique CSS styling for each chart.\n *\n * @type {string}\n * @apioption chart.className\n */\n /**\n * Event listeners for the chart.\n *\n * @apioption chart.events\n */\n /**\n * Fires when a series is added to the chart after load time, using the\n * `addSeries` method. One parameter, `event`, is passed to the\n * function, containing common event information. Through\n * `event.options` you can access the series options that were passed to\n * the `addSeries` method. Returning false prevents the series from\n * being added.\n *\n * @sample {highcharts} highcharts/chart/events-addseries/\n * Alert on add series\n * @sample {highstock} stock/chart/events-addseries/\n * Alert on add series\n *\n * @type {Highcharts.ChartAddSeriesCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.addSeries\n */\n /**\n * Fires when clicking on the plot background. One parameter, `event`,\n * is passed to the function, containing common event information.\n *\n * Information on the clicked spot can be found through `event.xAxis`\n * and `event.yAxis`, which are arrays containing the axes of each\n * dimension and each axis' value at the clicked spot. The primary axes\n * are `event.xAxis[0]` and `event.yAxis[0]`. Remember the unit of a\n * datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * ```js\n * click: function(e) {\n * console.log(\n * Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', e.xAxis[0].value),\n * e.yAxis[0].value\n * )\n * }\n * ```\n *\n * @sample {highcharts} highcharts/chart/events-click/\n * Alert coordinates on click\n * @sample {highcharts} highcharts/chart/events-container/\n * Alternatively, attach event to container\n * @sample {highstock} stock/chart/events-click/\n * Alert coordinates on click\n * @sample {highstock} highcharts/chart/events-container/\n * Alternatively, attach event to container\n * @sample {highmaps} maps/chart/events-click/\n * Record coordinates on click\n * @sample {highmaps} highcharts/chart/events-container/\n * Alternatively, attach event to container\n *\n * @type {Highcharts.ChartClickCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.click\n */\n /**\n * Fires when the chart is finished loading. Since v4.2.2, it also waits\n * for images to be loaded, for example from point markers. One\n * parameter, `event`, is passed to the function, containing common\n * event information.\n *\n * There is also a second parameter to the chart constructor where a\n * callback function can be passed to be executed on chart.load.\n *\n * @sample {highcharts} highcharts/chart/events-load/\n * Alert on chart load\n * @sample {highcharts} highcharts/chart/events-render/\n * Load vs Redraw vs Render\n * @sample {highstock} stock/chart/events-load/\n * Alert on chart load\n * @sample {highmaps} maps/chart/events-load/\n * Add series on chart load\n *\n * @type {Highcharts.ChartLoadCallbackFunction}\n * @context Highcharts.Chart\n * @apioption chart.events.load\n */\n /**\n * Fires when the chart is redrawn, either after a call to\n * `chart.redraw()` or after an axis, series or point is modified with\n * the `redraw` option set to `true`. One parameter, `event`, is passed\n * to the function, containing common event information.\n *\n * @sample {highcharts} highcharts/chart/events-redraw/\n * Alert on chart redraw\n * @sample {highcharts} highcharts/chart/events-render/\n * Load vs Redraw vs Render\n * @sample {highstock} stock/chart/events-redraw/\n * Alert on chart redraw when adding a series or moving the\n * zoomed range\n * @sample {highmaps} maps/chart/events-redraw/\n * Set subtitle on chart redraw\n *\n * @type {Highcharts.ChartRedrawCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.redraw\n */\n /**\n * Fires after initial load of the chart (directly after the `load`\n * event), and after each redraw (directly after the `redraw` event).\n *\n * @sample {highcharts} highcharts/chart/events-render/\n * Load vs Redraw vs Render\n *\n * @type {Highcharts.ChartRenderCallbackFunction}\n * @since 5.0.7\n * @context Highcharts.Chart\n * @apioption chart.events.render\n */\n /**\n * Fires when an area of the chart has been selected. Selection is\n * enabled by setting the chart's zoomType. One parameter, `event`, is\n * passed to the function, containing common event information. The\n * default action for the selection event is to zoom the chart to the\n * selected area. It can be prevented by calling\n * `event.preventDefault()` or return false.\n *\n * Information on the selected area can be found through `event.xAxis`\n * and `event.yAxis`, which are arrays containing the axes of each\n * dimension and each axis' min and max values. The primary axes are\n * `event.xAxis[0]` and `event.yAxis[0]`. Remember the unit of a\n * datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * ```js\n * selection: function(event) {\n * // log the min and max of the primary, datetime x-axis\n * console.log(\n * Highcharts.dateFormat(\n * '%Y-%m-%d %H:%M:%S',\n * event.xAxis[0].min\n * ),\n * Highcharts.dateFormat(\n * '%Y-%m-%d %H:%M:%S',\n * event.xAxis[0].max\n * )\n * );\n * // log the min and max of the y axis\n * console.log(event.yAxis[0].min, event.yAxis[0].max);\n * }\n * ```\n *\n * @sample {highcharts} highcharts/chart/events-selection/\n * Report on selection and reset\n * @sample {highcharts} highcharts/chart/events-selection-points/\n * Select a range of points through a drag selection\n * @sample {highstock} stock/chart/events-selection/\n * Report on selection and reset\n * @sample {highstock} highcharts/chart/events-selection-points/\n * Select a range of points through a drag selection\n * (Highcharts)\n *\n * @type {Highcharts.ChartSelectionCallbackFunction}\n * @apioption chart.events.selection\n */\n /**\n * The margin between the outer edge of the chart and the plot area.\n * The numbers in the array designate top, right, bottom and left\n * respectively. Use the options `marginTop`, `marginRight`,\n * `marginBottom` and `marginLeft` for shorthand setting of one option.\n *\n * By default there is no margin. The actual space is dynamically\n * calculated from the offset of axis labels, axis title, title,\n * subtitle and legend in addition to the `spacingTop`, `spacingRight`,\n * `spacingBottom` and `spacingLeft` options.\n *\n * @sample {highcharts} highcharts/chart/margins-zero/\n * Zero margins\n * @sample {highstock} stock/chart/margin-zero/\n * Zero margins\n *\n * @type {number|Array<number>}\n * @apioption chart.margin\n */\n /**\n * The margin between the bottom outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingBottom`.\n *\n * @sample {highcharts} highcharts/chart/marginbottom/\n * 100px bottom margin\n * @sample {highstock} stock/chart/marginbottom/\n * 100px bottom margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginBottom\n */\n /**\n * The margin between the left outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingLeft`.\n *\n * @sample {highcharts} highcharts/chart/marginleft/\n * 150px left margin\n * @sample {highstock} stock/chart/marginleft/\n * 150px left margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginLeft\n */\n /**\n * The margin between the right outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingRight`.\n *\n * @sample {highcharts} highcharts/chart/marginright/\n * 100px right margin\n * @sample {highstock} stock/chart/marginright/\n * 100px right margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginRight\n */\n /**\n * The margin between the top outer edge of the chart and the plot area.\n * Use this to set a fixed pixel value for the margin as opposed to\n * the default dynamic margin. See also `spacingTop`.\n *\n * @sample {highcharts} highcharts/chart/margintop/ 100px top margin\n * @sample {highstock} stock/chart/margintop/\n * 100px top margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginTop\n */\n /**\n * Callback function to override the default function that formats all\n * the numbers in the chart. Returns a string with the formatted number.\n *\n * @sample highcharts/members/highcharts-numberformat\n * Arabic digits in Highcharts\n * @type {Highcharts.NumberFormatterCallbackFunction}\n * @since 8.0.0\n * @apioption chart.numberFormatter\n */\n /**\n * When a chart with an x and a y-axis is rendered, we first pre-render the\n * labels of both in order to measure them. Then, if either of the axis\n * labels take up so much space that it significantly affects the length of\n * the other axis, we repeat the process.\n *\n * By default we stop at two axis layout runs, but it may be that the second\n * run also alter the space required by either axis, for example if it\n * causes the labels to rotate. In this situation, a subsequent redraw of\n * the chart may cause the tick and label placement to change for apparently\n * no reason.\n *\n * Use the `axisLayoutRuns` option to set the maximum allowed number of\n * repetitions. But keep in mind that the default value of 2 is set because\n * every run costs performance time.\n *\n * **Note:** Changing that option to higher than the default might decrease\n * performance significantly, especially with bigger sets of data.\n *\n * @type {number}\n * @default 2\n * @since 11.3.0\n * @apioption chart.axisLayoutRuns\n */\n /**\n * Allows setting a key to switch between zooming and panning. Can be\n * one of `alt`, `ctrl`, `meta` (the command key on Mac and Windows\n * key on Windows) or `shift`. The keys are mapped directly to the key\n * properties of the click event argument (`event.altKey`,\n * `event.ctrlKey`, `event.metaKey` and `event.shiftKey`).\n *\n * @type {string}\n * @since 4.0.3\n * @product highcharts gantt\n * @validvalue [\"alt\", \"ctrl\", \"meta\", \"shift\"]\n * @apioption chart.panKey\n */\n /**\n * Allow panning in a chart. Best used with [panKey](#chart.panKey)\n * to combine zooming and panning.\n *\n * On touch devices, when the [tooltip.followTouchMove](\n * #tooltip.followTouchMove) option is `true` (default), panning\n * requires two fingers. To allow panning with one finger, set\n * `followTouchMove` to `false`.\n *\n * @sample {highcharts} highcharts/chart/pankey/ Zooming and panning\n * @sample {highstock} stock/chart/panning/ Zooming and xy panning\n */\n panning: {\n /**\n * Enable or disable chart panning.\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock|highmaps} true\n */\n enabled: false,\n /**\n * Decides in what dimensions the user can pan the chart. Can be\n * one of `x`, `y`, or `xy`.\n *\n * During panning, all axes will behave as if\n * [`startOnTick`](#yAxis.startOnTick) and\n * [`endOnTick`](#yAxis.endOnTick) were set to `false`. After the\n * panning action is finished, the axes will adjust to their actual\n * settings.\n *\n * @sample {highcharts} highcharts/chart/panning-type\n * Zooming and xy panning\n *\n * @declare Highcharts.OptionsChartPanningTypeValue\n * @type {string}\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @product highcharts highstock gantt\n */\n type: 'x'\n },\n /**\n * Equivalent to [zoomType](#chart.zoomType), but for multitouch\n * gestures only. By default, the `pinchType` is the same as the\n * `zoomType` setting. However, pinching can be enabled separately in\n * some cases, for example in stock charts where a mouse drag pans the\n * chart, while pinching is enabled. When [tooltip.followTouchMove](\n * #tooltip.followTouchMove) is true, pinchType only applies to\n * two-finger touches.\n *\n * @type {string}\n * @default {highcharts} undefined\n * @default {highstock} undefined\n * @since 3.0\n * @product highcharts highstock gantt\n * @deprecated\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.pinchType\n */\n /**\n * Whether to apply styled mode. When in styled mode, no presentational\n * attributes or CSS are applied to the chart SVG. Instead, CSS rules\n * are required to style the chart. The default style sheet is\n * available from `https://code.highcharts.com/css/highcharts.css`.\n *\n * [Read more in the docs](https://www.highcharts.com/docs/chart-design-and-style/style-by-css)\n * on what classes and variables are available.\n *\n * @sample highcharts/css/colors\n * Color theming with CSS\n * @sample highcharts/css/prefers-color-scheme\n * Dynamic theme based on system settings\n * @type {boolean}\n * @default false\n * @since 7.0\n * @apioption chart.styledMode\n */\n styledMode: false,\n /**\n * The corner radius of the outer chart border.\n *\n * @sample {highcharts} highcharts/chart/borderradius/\n * 20px radius\n * @sample {highstock} stock/chart/border/\n * 10px radius\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n */\n borderRadius: 0,\n /**\n * In styled mode, this sets how many colors the class names\n * should rotate between. With ten colors, series (or points) are\n * given class names like `highcharts-color-0`, `highcharts-color-1`\n * [...] `highcharts-color-9`. The equivalent in non-styled mode\n * is to set colors using the [colors](#colors) setting.\n *\n * @since 5.0.0\n */\n colorCount: 10,\n /**\n * By default, (because of memory and performance reasons) the chart does\n * not copy the data but keeps it as a reference. In some cases, this might\n * result in mutating the original data source. In order to prevent that,\n * set that property to false. Please note that changing that might decrease\n * performance, especially with bigger sets of data.\n *\n * @type {boolean}\n * @since 10.1.0\n */\n allowMutatingData: true,\n /**\n * If true, the axes will scale to the remaining visible series once\n * one series is hidden. If false, hiding and showing a series will\n * not affect the axes or the other series. For stacks, once one series\n * within the stack is hidden, the rest of the stack will close in\n * around it even if the axis is not affected.\n *\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-true/\n * True by default\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-false/\n * False\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-true-stacked/\n * True with stack\n * @sample {highstock} stock/chart/ignorehiddenseries-true/\n * True by default\n * @sample {highstock} stock/chart/ignorehiddenseries-false/\n * False\n *\n * @since 1.2.0\n * @product highcharts highstock gantt\n */\n ignoreHiddenSeries: true,\n /**\n * Whether to invert the axes so that the x axis is vertical and y axis\n * is horizontal. When `true`, the x axis is [reversed](#xAxis.reversed)\n * by default.\n *\n * @productdesc {highcharts}\n * If a bar series is present in the chart, it will be inverted\n * automatically. Inverting the chart doesn't have an effect if there\n * are no cartesian series in the chart.\n *\n * @sample {highcharts} highcharts/chart/inverted/\n * Inverted line\n * @sample {highstock} stock/navigator/inverted/\n * Inverted stock chart\n *\n * @type {boolean}\n * @default false\n * @product highcharts highstock gantt\n * @apioption chart.inverted\n */\n /**\n * The distance between the outer edge of the chart and the content,\n * like title or legend, or axis title and labels if present. The\n * numbers in the array designate top, right, bottom and left\n * respectively. Use the options spacingTop, spacingRight, spacingBottom\n * and spacingLeft options for shorthand setting of one option.\n *\n * @type {Array<number>}\n * @see [chart.margin](#chart.margin)\n * @default [10, 10, 15, 10]\n * @since 3.0.6\n */\n spacing: [10, 10, 15, 10],\n /**\n * The button that appears after a selection zoom, allowing the user\n * to reset zoom. This option is deprecated in favor of\n * [zooming](#chart.zooming).\n *\n * @since 2.2\n * @deprecated 10.2.1\n */\n resetZoomButton: {\n /**\n * What frame the button placement should be related to. Can be\n * either `plotBox` or `spacingBox`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n * @sample {highstock} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n *\n * @type {Highcharts.ButtonRelativeToValue}\n * @apioption chart.resetZoomButton.relativeTo\n */\n /**\n * A collection of attributes for the button. The object takes SVG\n * attributes like `fill`, `stroke`, `stroke-width` or `r`, the\n * border radius. The theme also supports `style`, a collection of\n * CSS properties for the text. Equivalent attributes for the hover\n * state are given in `theme.states.hover`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n * @sample {highstock} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n *\n * @type {Highcharts.SVGAttributes}\n */\n theme: {\n /**\n * The z-index of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.theme.zIndex\n */\n },\n /**\n * The position of the button.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highstock} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highmaps} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n *\n * @type {Highcharts.AlignObject}\n */\n position: {\n /**\n * The horizontal alignment of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.position.align\n */\n /**\n * The horizontal offset of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.position.x\n */\n /**\n * The vertical alignment of the button.\n *\n * @type {Highcharts.VerticalAlignValue}\n * @apioption chart.resetZoomButton.position.verticalAlign\n */\n /**\n * The vertical offset of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.position.y\n */\n }\n },\n /**\n * The pixel width of the plot area border.\n *\n * @sample {highcharts} highcharts/chart/plotborderwidth/\n * 1px border\n * @sample {highstock} stock/chart/plotborder/\n * 2px border\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {number}\n * @default 0\n * @apioption chart.plotBorderWidth\n */\n /**\n * Whether to apply a drop shadow to the plot area. Requires that\n * plotBackgroundColor be set. The shadow can be an object configuration\n * containing `color`, `offsetX`, `offsetY`, `opacity` and `width`.\n *\n * @sample {highcharts} highcharts/chart/plotshadow/\n * Plot shadow\n * @sample {highstock} stock/chart/plotshadow/\n * Plot shadow\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default false\n * @apioption chart.plotShadow\n */\n /**\n * When true, cartesian charts like line, spline, area and column are\n * transformed into the polar coordinate system. This produces _polar\n * charts_, also known as _radar charts_.\n *\n * @sample {highcharts} highcharts/demo/polar/\n * Polar chart\n * @sample {highcharts} highcharts/demo/polar-wind-rose/\n * Wind rose, stacked polar column chart\n * @sample {highcharts} highcharts/demo/polar-spider/\n * Spider web chart\n * @sample {highcharts} highcharts/parallel-coordinates/polar/\n * Star plot, multivariate data in a polar chart\n *\n * @type {boolean}\n * @default false\n * @since 2.3.0\n * @product highcharts\n * @requires highcharts-more\n * @apioption chart.polar\n */\n /**\n * Whether to reflow the chart to fit the width of the container div\n * on resizing the window.\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * True by default\n * @sample {highcharts} highcharts/chart/reflow-false/\n * False\n * @sample {highstock} stock/chart/reflow-true/\n * True by default\n * @sample {highstock} stock/chart/reflow-false/\n * False\n * @sample {highmaps} maps/chart/reflow-true/\n * True by default\n * @sample {highmaps} maps/chart/reflow-false/\n * False\n *\n * @since 2.1\n */\n reflow: true,\n /**\n * The HTML element where the chart will be rendered. If it is a string,\n * the element by that id is used. The HTML element can also be passed\n * by direct reference, or as the first argument of the chart\n * constructor, in which case the option is not needed.\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * String\n * @sample {highcharts} highcharts/chart/renderto-object/\n * Object reference\n * @sample {highstock} stock/chart/renderto-string/\n * String\n * @sample {highstock} stock/chart/renderto-object/\n * Object reference\n *\n * @type {string|Highcharts.HTMLDOMElement}\n * @apioption chart.renderTo\n */\n /**\n * The background color of the marker square when selecting (zooming\n * in on) an area of the chart.\n *\n * @see In styled mode, the selection marker fill is set with the\n * `.highcharts-selection-marker` class.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default rgba(51,92,173,0.25)\n * @since 2.1.7\n * @apioption chart.selectionMarkerFill\n */\n /**\n * Whether to apply a drop shadow to the global series group. This causes\n * all the series to have the same shadow. Contrary to the `series.shadow`\n * option, this prevents items from casting shadows on each other, like for\n * others series in a stack. The shadow can be an object configuration\n * containing `color`, `offsetX`, `offsetY`, `opacity` and `width`.\n *\n * @sample highcharts/chart/seriesgroupshadow/ Shadow\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default false\n * @apioption chart.shadow\n */\n /**\n * Whether to apply a drop shadow to the outer chart area. Requires\n * that backgroundColor be set. The shadow can be an object\n * configuration containing `color`, `offsetX`, `offsetY`, `opacity` and\n * `width`.\n *\n * @sample {highcharts} highcharts/chart/shadow/\n * Shadow\n * @sample {highstock} stock/chart/shadow/\n * Shadow\n * @sample {highmaps} maps/chart/border/\n * Chart border and shadow\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default false\n * @apioption chart.shadow\n */\n /**\n * Whether to show the axes initially. This only applies to empty charts\n * where series are added dynamically, as axes are automatically added\n * to cartesian series.\n *\n * @sample {highcharts} highcharts/chart/showaxes-false/\n * False by default\n * @sample {highcharts} highcharts/chart/showaxes-true/\n * True\n *\n * @type {boolean}\n * @since 1.2.5\n * @product highcharts gantt\n * @apioption chart.showAxes\n */\n /**\n * The space between the bottom edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingbottom/\n * Spacing bottom set to 100\n * @sample {highstock} stock/chart/spacingbottom/\n * Spacing bottom set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 15\n * @since 2.1\n * @apioption chart.spacingBottom\n */\n /**\n * The space between the left edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingleft/\n * Spacing left set to 100\n * @sample {highstock} stock/chart/spacingleft/\n * Spacing left set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingLeft\n */\n /**\n * The space between the right edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingright-100/\n * Spacing set to 100\n * @sample {highcharts} highcharts/chart/spacingright-legend/\n * Legend in right position with default spacing\n * @sample {highstock} stock/chart/spacingright/\n * Spacing set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingRight\n */\n /**\n * The space between the top edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingtop-100/\n * A top spacing of 100\n * @sample {highcharts} highcharts/chart/spacingtop-10/\n * Floating chart title makes the plot area align to the default\n * spacingTop of 10.\n * @sample {highstock} stock/chart/spacingtop/\n * A top spacing of 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingTop\n */\n /**\n * Additional CSS styles to apply inline to the container `div` and the root\n * SVG.\n *\n * According to the CSS syntax documentation, it is recommended to quote\n * font family names that contain white space, digits, or punctuation\n * characters other than hyphens. In such cases, wrap the fontFamily\n * name as follows: `fontFamily: '\"Font name\"'`.\n *\n * Since v11, the root font size is 1rem by default, and all child element\n * are given a relative `em` font size by default. This allows implementers\n * to control all the chart's font sizes by only setting the root level.\n *\n * @see In styled mode, general chart styles can be set with the\n * `.highcharts-root` class.\n * @sample {highcharts} highcharts/chart/style-serif-font/\n * Using a serif type font\n * @sample {highcharts} highcharts/chart/style-special-font/\n * Using a font with special character in name\n * @sample {highcharts} highcharts/members/relative-font-size/\n * Relative font sizes\n * @sample {highcharts} highcharts/css/em/\n * Styled mode with relative font sizes\n * @sample {highstock} stock/chart/style/\n * Using a serif type font\n * @sample {highmaps} maps/chart/style-serif-font/\n * Using a serif type font\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontFamily\": \"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif\", \"fontSize\":\"1rem\"}\n * @apioption chart.style\n */\n /**\n * The default series type for the chart. Can be any of the chart types\n * listed under [plotOptions](#plotOptions) and [series](#series) or can\n * be a series provided by an additional module.\n *\n * In TypeScript this option has no effect in sense of typing and\n * instead the `type` option must always be set in the series.\n *\n * @sample {highcharts} highcharts/chart/type-bar/\n * Bar\n * @sample {highstock} stock/chart/type/\n * Areaspline\n * @sample {highmaps} maps/chart/type-mapline/\n * Mapline\n *\n * @type {string}\n * @default {highcharts} line\n * @default {highstock} line\n * @default {highmaps} map\n * @since 2.1.0\n * @apioption chart.type\n */\n type: 'line',\n /**\n * Decides in what dimensions the user can zoom by dragging the mouse.\n * Can be one of `x`, `y` or `xy`.\n *\n * @see [panKey](#chart.panKey)\n *\n * @sample {highcharts} highcharts/chart/zoomtype-none/\n * None by default\n * @sample {highcharts} highcharts/chart/zoomtype-x/\n * X\n * @sample {highcharts} highcharts/chart/zoomtype-y/\n * Y\n * @sample {highcharts} highcharts/chart/zoomtype-xy/\n * Xy\n * @sample {highcharts} highcharts/chart/zoomtype-polar/\n * Zoom on polar chart\n * @sample {highstock} stock/demo/basic-line/\n * None by default\n * @sample {highstock} stock/chart/zoomtype-x/\n * X\n * @sample {highstock} stock/chart/zoomtype-y/\n * Y\n * @sample {highstock} stock/chart/zoomtype-xy/\n * Xy\n * @sample {highmaps} maps/chart/zoomtype-xy/\n * Map with selection zoom\n *\n * @type {string}\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @deprecated\n * @apioption chart.zoomType\n */\n /**\n * Enables zooming by a single touch, in combination with\n * [chart.zoomType](#chart.zoomType). When enabled, two-finger pinch\n * will still work as set up by [chart.pinchType](#chart.pinchType).\n * However, `zoomBySingleTouch` will interfere with touch-dragging the\n * chart to read the tooltip. And especially when vertical zooming is\n * enabled, it will make it hard to scroll vertically on the page.\n * @since 9.0.0\n * @sample highcharts/chart/zoombysingletouch\n * Zoom by single touch enabled, with buttons to toggle\n * @product highcharts highstock gantt\n * @deprecated\n */\n /**\n * Chart zooming options.\n * @since 10.2.1\n */\n zooming: {\n /**\n * Equivalent to [type](#chart.zooming.type), but for multitouch\n * gestures only. By default, the `pinchType` is the same as the\n * `type` setting. However, pinching can be enabled separately in\n * some cases, for example in stock charts where a mouse drag pans the\n * chart, while pinching is enabled. When [tooltip.followTouchMove](\n * #tooltip.followTouchMove) is true, pinchType only applies to\n * two-finger touches.\n *\n * @type {string}\n * @default {highcharts} undefined\n * @default {highstock} x\n * @product highcharts highstock gantt\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.zooming.pinchType\n */\n /**\n * Decides in what dimensions the user can zoom by dragging the mouse.\n * Can be one of `x`, `y` or `xy`.\n *\n * @declare Highcharts.OptionsChartZoomingTypeValue\n * @type {string}\n * @default {highcharts} undefined\n * @product highcharts highstock gantt\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.zooming.type\n */\n /**\n * Set a key to hold when dragging to zoom the chart. This is useful to\n * avoid zooming while moving points. Should be set different than\n * [chart.panKey](#chart.panKey).\n *\n * @type {string}\n * @default {highcharts} undefined\n * @validvalue [\"alt\", \"ctrl\", \"meta\", \"shift\"]\n * @requires modules/draggable-points\n * @apioption chart.zooming.key\n */\n /**\n * Enables zooming by a single touch, in combination with\n * [chart.zooming.type](#chart.zooming.type). When enabled, two-finger\n * pinch will still work as set up by [chart.zooming.pinchType]\n * (#chart.zooming.pinchType). However, `singleTouch` will interfere\n * with touch-dragging the chart to read the tooltip. And especially\n * when vertical zooming is enabled, it will make it hard to scroll\n * vertically on the page.\n *\n * @sample highcharts/chart/zoombysingletouch\n * Zoom by single touch enabled, with buttons to toggle\n *\n * @product highcharts highstock gantt\n */\n singleTouch: false,\n /**\n * The button that appears after a selection zoom, allowing the user\n * to reset zoom.\n */\n resetButton: {\n /**\n * What frame the button placement should be related to. Can be\n * either `plotBox` or `spacingBox`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n * @sample {highstock} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n *\n * @type {Highcharts.ButtonRelativeToValue}\n * @default plot\n * @apioption chart.zooming.resetButton.relativeTo\n */\n /**\n * A collection of attributes for the button. The object takes SVG\n * attributes like `fill`, `stroke`, `stroke-width` or `r`, the\n * border radius. The theme also supports `style`, a collection of\n * CSS properties for the text. Equivalent attributes for the hover\n * state are given in `theme.states.hover`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n * @sample {highstock} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n *\n * @type {Highcharts.SVGAttributes}\n * @since 10.2.1\n */\n theme: {\n /** @internal */\n zIndex: 6\n },\n /**\n * The position of the button.\n *\n * Note: Adjusting position values might cause overlap with chart\n * elements. Ensure coordinates do not obstruct other components or\n * data visibility.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highstock} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highmaps} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n *\n * @type {Highcharts.AlignObject}\n * @since 10.2.1\n */\n position: {\n /**\n * The horizontal alignment of the button.\n */\n align: 'right',\n /**\n * The horizontal offset of the button.\n */\n x: -10,\n /**\n * The vertical alignment of the button.\n *\n * @type {Highcharts.VerticalAlignValue}\n * @default top\n * @apioption chart.zooming.resetButton.position.verticalAlign\n */\n /**\n * The vertical offset of the button.\n */\n y: 10\n }\n }\n },\n /**\n * An explicit width for the chart. By default (when `null`) the width\n * is calculated from the offset width of the containing element.\n *\n * @sample {highcharts} highcharts/chart/width/\n * 800px wide\n * @sample {highstock} stock/chart/width/\n * 800px wide\n * @sample {highmaps} maps/chart/size/\n * Chart with explicit size\n *\n * @type {null|number|string}\n */\n width: null,\n /**\n * An explicit height for the chart. If a _number_, the height is\n * given in pixels. If given a _percentage string_ (for example\n * `'56%'`), the height is given as the percentage of the actual chart\n * width. This allows for preserving the aspect ratio across responsive\n * sizes.\n *\n * By default (when `null`) the height is calculated from the offset\n * height of the containing element, or 400 pixels if the containing\n * element's height is 0.\n *\n * @sample {highcharts} highcharts/chart/height/\n * Forced 200px height\n * @sample {highstock} stock/chart/height/\n * 300px height\n * @sample {highmaps} maps/chart/size/\n * Chart with explicit size\n * @sample highcharts/chart/height-percent/\n * Highcharts with percentage height\n * @sample highcharts/chart/height-inherited/\n * Chart with inherited height\n *\n * @type {null|number|string}\n */\n height: null,\n /**\n * The color of the outer chart border.\n *\n * @see In styled mode, the stroke is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/bordercolor/\n * Brown border\n * @sample {highstock} stock/chart/border/\n * Brown border\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n borderColor: \"#334eff\" /* Palette.highlightColor80 */,\n /**\n * The pixel width of the outer chart border.\n *\n * @see In styled mode, the stroke is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/borderwidth/\n * 5px border\n * @sample {highstock} stock/chart/border/\n * 2px border\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n * @type {number}\n * @default 0\n * @apioption chart.borderWidth\n */\n /**\n * The background color or gradient for the outer chart area.\n *\n * @see In styled mode, the background is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/backgroundcolor-color/\n * Color\n * @sample {highcharts} highcharts/chart/backgroundcolor-gradient/\n * Gradient\n * @sample {highstock} stock/chart/backgroundcolor-color/\n * Color\n * @sample {highstock} stock/chart/backgroundcolor-gradient/\n * Gradient\n * @sample {highmaps} maps/chart/backgroundcolor-color/\n * Color\n * @sample {highmaps} maps/chart/backgroundcolor-gradient/\n * Gradient\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n backgroundColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * The background color or gradient for the plot area.\n *\n * @see In styled mode, the plot background is set with the\n * `.highcharts-plot-background` class.\n *\n * @sample {highcharts} highcharts/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highcharts} highcharts/chart/plotbackgroundcolor-gradient/\n * Gradient\n * @sample {highstock} stock/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highstock} stock/chart/plotbackgroundcolor-gradient/\n * Gradient\n * @sample {highmaps} maps/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highmaps} maps/chart/plotbackgroundcolor-gradient/\n * Gradient\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption chart.plotBackgroundColor\n */\n /**\n * The URL for an image to use as the plot background. To set an image\n * as the background for the entire chart, set a CSS background image\n * to the container element. Note that for the image to be applied to\n * exported charts, its URL needs to be accessible by the export server.\n *\n * @see In styled mode, a plot background image can be set with the\n * `.highcharts-plot-background` class and a [custom pattern](\n * https://www.highcharts.com/docs/chart-design-and-style/gradients-shadows-and-patterns).\n *\n * @sample {highcharts} highcharts/chart/plotbackgroundimage/\n * Skies\n * @sample {highstock} stock/chart/plotbackgroundimage/\n * Skies\n *\n * @type {string}\n * @apioption chart.plotBackgroundImage\n */\n /**\n * The color of the inner chart or plot area border.\n *\n * @see In styled mode, a plot border stroke can be set with the\n * `.highcharts-plot-border` class.\n *\n * @sample {highcharts} highcharts/chart/plotbordercolor/\n * Blue border\n * @sample {highstock} stock/chart/plotborder/\n * Blue border\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n plotBorderColor: \"#cccccc\" /* Palette.neutralColor20 */\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return ChartDefaults;\n });\n _registerModule(_modules, 'Core/Color/Palettes.js', [], function () {\n /*\n * Series palettes for Highcharts. Series colors are defined in highcharts.css.\n * **Do not edit this file!** This file is generated using the 'gulp palette' task.\n */\n const SeriesPalettes = {\n /**\n * Colors for data series and points\n */\n colors: [\n '#2caffe',\n '#544fc5',\n '#00e272',\n '#fe6a35',\n '#6b8abc',\n '#d568fb',\n '#2ee0ca',\n '#fa4b42',\n '#feb56a',\n '#91e8e1'\n ]\n };\n\n return SeriesPalettes;\n });\n _registerModule(_modules, 'Core/Time.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n const { win } = H;\n const { defined, error, extend, isNumber, isObject, isString, merge, objectEach, pad, splat, timeUnits, ucfirst } = U;\n /* *\n *\n * Constants\n *\n * */\n // To do: Remove this when we no longer need support for Safari < v14.1\n const hasOldSafariBug = H.isSafari &&\n win.Intl &&\n !win.Intl.DateTimeFormat.prototype.formatRange;\n const isDateTimeFormatOptions = (obj) => obj.main === void 0;\n // We use the Spanish locale for internal weekday handling because it uses\n // unique letters for narrow weekdays\n const spanishWeekdayIndex = (weekday) => ['D', 'L', 'M', 'X', 'J', 'V', 'S'].indexOf(weekday);\n /* *\n *\n * Class\n *\n * */\n /* eslint-disable no-invalid-this, valid-jsdoc */\n /**\n * The Time class. Time settings are applied in general for each page using\n * `Highcharts.setOptions`, or individually for each Chart item through the\n * [time](https://api.highcharts.com/highcharts/time) options set.\n *\n * The Time object is available from {@link Highcharts.Chart#time},\n * which refers to `Highcharts.time` if no individual time settings are\n * applied.\n *\n * @example\n * // Apply time settings globally\n * Highcharts.setOptions({\n * time: {\n * timezone: 'Europe/London'\n * }\n * });\n *\n * // Apply time settings by instance\n * const chart = Highcharts.chart('container', {\n * time: {\n * timezone: 'America/New_York'\n * },\n * series: [{\n * data: [1, 4, 3, 5]\n * }]\n * });\n *\n * // Use the Time object of a chart instance\n * console.log(\n * 'Current time in New York',\n * chart.time.dateFormat('%Y-%m-%d %H:%M:%S', Date.now())\n * );\n *\n * // Standalone use\n * const time = new Highcharts.Time({\n * timezone: 'America/New_York'\n * });\n * const s = time.dateFormat('%Y-%m-%d %H:%M:%S', Date.UTC(2020, 0, 1));\n * console.log(s); // => 2019-12-31 19:00:00\n *\n * @since 6.0.5\n *\n * @class\n * @name Highcharts.Time\n *\n * @param {Highcharts.TimeOptions} [options]\n * Time options as defined in [chart.options.time](/highcharts/time).\n */\n class Time {\n /* *\n *\n * Constructors\n *\n * */\n constructor(options) {\n /* *\n *\n * Properties\n *\n * */\n this.options = {};\n this.variableTimezone = false;\n this.Date = win.Date;\n this.update(options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Update the Time object with current options. It is called internally on\n * initializing Highcharts, after running `Highcharts.setOptions` and on\n * `Chart.update`.\n *\n * @private\n * @function Highcharts.Time#update\n *\n * @param {Highcharts.TimeOptions} [options]\n *\n */\n update(options = {}) {\n let timezone = options.timezone ?? 'UTC';\n this.dTLCache = {};\n this.options = options = merge(true, this.options, options);\n const { timezoneOffset, useUTC } = options;\n // Allow using a different Date class\n this.Date = options.Date || win.Date || Date;\n if (defined(useUTC)) {\n timezone = useUTC ? 'UTC' : void 0;\n }\n // The Etc/GMT time zones do not support offsets with half-hour\n // resolutions\n if (timezoneOffset && timezoneOffset % 60 === 0) {\n timezone = 'Etc/GMT' + ((timezoneOffset > 0 ? '+' : '')) + timezoneOffset / 60;\n }\n /*\n * The time object has options allowing for variable time zones, meaning\n * the axis ticks or series data needs to consider this.\n */\n this.variableTimezone = timezone !== 'UTC' &&\n timezone?.indexOf('Etc/GMT') !== 0;\n this.timezone = timezone;\n // Assign default time formats from locale strings\n ['months', 'shortMonths', 'weekdays', 'shortWeekdays'].forEach((name) => {\n const isMonth = /months/i.test(name), isShort = /short/.test(name), options = { timeZone: 'UTC' };\n options[isMonth ? 'month' : 'weekday'] = isShort ? 'short' : 'long';\n this[name] = (isMonth ?\n [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] :\n [3, 4, 5, 6, 7, 8, 9]).map((position) => this.dateFormat(options, (isMonth ? 31 : 1) * 24 * 36e5 * position));\n });\n }\n /**\n * Get a date in terms of numbers (year, month, day etc) for further\n * processing. Takes the current `timezone` setting into account. Inverse of\n * `makeTime` and the native `Date` constructor and `Date.UTC`.\n *\n * The date is returned in array format with the following indices:\n *\n * 0: year,\n * 1: month (zero based),\n * 2: day,\n * 3: hours,\n * 4: minutes,\n * 5: seconds,\n * 6: milliseconds,\n * 7: weekday (Sunday as 0)\n *\n * @function Highcharts.Time#toParts\n *\n * @param {number|Date} [timestamp]\n * The timestamp in milliseconds since January 1st 1970.\n * A Date object is also accepted.\n *\n * @return {Array<number>} The date parts in array format.\n */\n toParts(timestamp) {\n const [weekday, dayOfMonth, month, year, hours, minutes, seconds] = this.dateTimeFormat({\n weekday: 'narrow',\n day: 'numeric',\n month: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric'\n }, timestamp, 'es')\n .split(/(?:, |\\/|:)/g);\n return [\n year,\n +month - 1,\n dayOfMonth,\n hours,\n minutes,\n seconds,\n // Milliseconds\n Math.floor(Number(timestamp) || 0) % 1000,\n // Weekday index\n spanishWeekdayIndex(weekday)\n ].map(Number);\n }\n /**\n * Shorthand to get a cached `Intl.DateTimeFormat` instance.\n */\n dateTimeFormat(options, timestamp, locale = this.options.locale) {\n const cacheKey = JSON.stringify(options) + locale;\n if (isString(options)) {\n options = this.str2dtf(options);\n }\n let dTL = this.dTLCache[cacheKey];\n if (!dTL) {\n options.timeZone ?? (options.timeZone = this.timezone);\n try {\n dTL = new Intl.DateTimeFormat(locale, options);\n }\n catch (e) {\n if (/Invalid time zone/i.test(e.message)) {\n error(34);\n options.timeZone = 'UTC';\n dTL = new Intl.DateTimeFormat(locale, options);\n }\n else {\n error(e.message, false);\n }\n }\n }\n this.dTLCache[cacheKey] = dTL;\n return dTL?.format(timestamp) || '';\n }\n /**\n * Take a locale-aware string format and return a full DateTimeFormat in\n * object form.\n */\n str2dtf(s, dtf = {}) {\n const mapping = {\n L: { fractionalSecondDigits: 3 },\n S: { second: '2-digit' },\n M: { minute: 'numeric' },\n H: { hour: '2-digit' },\n k: { hour: 'numeric' },\n E: { weekday: 'narrow' },\n a: { weekday: 'short' },\n A: { weekday: 'long' },\n d: { day: '2-digit' },\n e: { day: 'numeric' },\n b: { month: 'short' },\n B: { month: 'long' },\n m: { month: '2-digit' },\n o: { month: 'numeric' },\n y: { year: '2-digit' },\n Y: { year: 'numeric' }\n };\n Object.keys(mapping).forEach((key) => {\n if (s.indexOf(key) !== -1) {\n extend(dtf, mapping[key]);\n }\n });\n return dtf;\n }\n /**\n * Make a time and returns milliseconds. Similar to `Date.UTC`, but takes\n * the current `timezone` setting into account.\n *\n * @function Highcharts.Time#makeTime\n *\n * @param {number} year\n * The year\n *\n * @param {number} month\n * The month. Zero-based, so January is 0.\n *\n * @param {number} [date=1]\n * The day of the month\n *\n * @param {number} [hours=0]\n * The hour of the day, 0-23.\n *\n * @param {number} [minutes=0]\n * The minutes\n *\n * @param {number} [seconds=0]\n * The seconds\n *\n * @return {number}\n * The time in milliseconds since January 1st 1970.\n */\n makeTime(year, month, date = 1, hours = 0, minutes, seconds, milliseconds) {\n // eslint-disable-next-line new-cap\n let d = this.Date.UTC(year, month, date, hours, minutes || 0, seconds || 0, milliseconds || 0);\n if (this.timezone !== 'UTC') {\n const offset = this.getTimezoneOffset(d);\n d += offset;\n // Adjustments close to DST transitions\n if (\n // Optimize for speed by limiting the number of calls to\n // `getTimezoneOffset`. According to\n // https://en.wikipedia.org/wiki/Daylight_saving_time_by_country,\n // DST change may only occur in these months.\n [2, 3, 8, 9, 10, 11].indexOf(month) !== -1 &&\n // DST transitions occur only in the night-time\n (hours < 5 || hours > 20)) {\n const newOffset = this.getTimezoneOffset(d);\n if (offset !== newOffset) {\n d += newOffset - offset;\n // A special case for transitioning from summer time to winter\n // time. When the clock is set back, the same time is repeated\n // twice, i.e. 02:30 am is repeated since the clock is set back\n // from 3 am to 2 am. We need to make the same time as local\n // Date does.\n }\n else if (offset - 36e5 === this.getTimezoneOffset(d - 36e5) &&\n !hasOldSafariBug) {\n d -= 36e5;\n }\n }\n }\n return d;\n }\n /**\n * Parse a datetime string. Unless the string contains time zone\n * information, apply the current `timezone` from options. If the argument\n * is a number, return it.\n *\n * @function Highcharts.Time#parse\n * @param {string|number|undefined} s The datetime string to parse\n * @return {number|undefined} Parsed JavaScript timestamp\n */\n parse(s) {\n if (!isString(s)) {\n return s ?? void 0;\n }\n s = s\n // Firefox fails on YYYY/MM/DD\n .replace(/\\//g, '-')\n // Replace some non-standard notations\n .replace(/(GMT|UTC)/, '');\n // Extend shorthand hour timezone offset like +02\n // .replace(/([+-][0-9]{2})$/, '$1:00');\n // Check if the string has time zone information\n const hasTimezone = s.indexOf('Z') > -1 ||\n /([+-][0-9]{2}):?[0-9]{2}$/.test(s), isYYYYMMDD = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/.test(s);\n if (!hasTimezone && !isYYYYMMDD) {\n s += 'Z';\n }\n const ts = Date.parse(s);\n if (isNumber(ts)) {\n // Unless the string contains time zone information, convert from\n // the local time result of `Date.parse` via UTC into the current\n // timezone of the time object.\n return ts + ((!hasTimezone || isYYYYMMDD) ?\n this.getTimezoneOffset(ts) :\n 0);\n }\n }\n /**\n * Get the time zone offset based on the current timezone information as\n * set in the global options.\n *\n * @function Highcharts.Time#getTimezoneOffset\n *\n * @param {number} timestamp\n * The JavaScript timestamp to inspect.\n *\n * @return {number}\n * The timezone offset in minutes compared to UTC.\n */\n getTimezoneOffset(timestamp) {\n if (this.timezone !== 'UTC') {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [date, gmt, hours, colon, minutes = 0] = this.dateTimeFormat({ timeZoneName: 'shortOffset' }, timestamp, 'en')\n .split(/(GMT|:)/)\n .map(Number), offset = -(hours + minutes / 60) * 60 * 60000;\n // Possible future NaNs stop here\n if (isNumber(offset)) {\n return offset;\n }\n }\n return 0;\n }\n /**\n * Formats a JavaScript date timestamp (milliseconds since January 1 1970)\n * into a human readable date string.\n *\n * The `format` parameter accepts two types of values:\n * - An object containing settings that are passed directly on to\n * [Intl.DateTimeFormat.prototype.format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format).\n * - A format string containing either individual or locale-aware format\n * keys. **Individual keys**, for example `%Y-%m-%d`, are listed below.\n * **Locale-aware keys** are grouped by square brackets, for example\n * `%[Ymd]`. The order of keys within the square bracket doesn't affect\n * the output, which is determined by the locale. See example below.\n * Internally, the locale-aware format keys are just a shorthand for the\n * full object formats, but are particularly practical in\n * [templating](https://www.highcharts.com/docs/chart-concepts/templating)\n * where full object definitions are not an option.\n *\n * The available string format keys are listed below. Additional formats can\n * be given in the {@link Highcharts.dateFormats} hook.\n *\n * Supported format keys:\n * | Key | Description | Notes on locale-aware format |\n * -------|----------------------------------------------|-------|\n * | `%A` | Long weekday, like 'Monday' | |\n * | `%a` | Short weekday, like 'Mon' | |\n * | `%E` | Narrow weekday, single character | |\n * | `%d` | Two digit day of the month, 01 to 31 | |\n * | `%e` | Day of the month, 1 through 31 | |\n * | `%w` | Day of the week, 0 through 6 | N/A |\n * | `%b` | Short month, like 'Jan' | |\n * | `%B` | Long month, like 'January' | |\n * | `%m` | Two digit month number, 01 through 12 | |\n * | `%o` | Month number, 1 through 12 | |\n * | `%y` | Two digits year, like 24 for 2024 | |\n * | `%Y` | Four digits year, like 2024 | |\n * | `%H` | Two digits hours in 24h format, 00 through 23 | Depending on the locale, 12h format may be instered. |\n * | `%k` | Hours in 24h format, 0 through 23 | Depending on the locale, 12h format may be instered. |\n * | `%I` | Two digits hours in 12h format, 00 through 11 | N/A. The locale determines the hour format. |\n * | `%l` | Hours in 12h format, 1 through 12 | N/A. The locale determines the hour format. |\n * | `%M` | Two digits minutes, 00 through 59 | |\n * | `%p` | Upper case AM or PM | N/A. The locale determines whether to add AM and PM. |\n * | `%P` | Lower case AM or PM | N/A. The locale determines whether to add AM and PM. |\n * | `%S` | Two digits seconds, 00 through 59 | |\n * | `%L` | Milliseconds (naming from Ruby) | |\n *\n * @example\n * // Object format, US English\n * const time1 = new Highcharts.Time({ locale: 'en-US' });\n * console.log(\n * time1.dateFormat({\n * day: 'numeric',\n * month: 'short',\n * year: 'numeric',\n * hour: 'numeric',\n * minute: 'numeric'\n * }, Date.UTC(2024, 11, 31))\n * ); // => Dec 31, 2024, 12:00 AM\n *\n * // Object format, British English\n * const time2 = new Highcharts.Time({ locale: 'en-GB' });\n * console.log(\n * time2.dateFormat({\n * day: 'numeric',\n * month: 'short',\n * year: 'numeric',\n * hour: 'numeric',\n * minute: 'numeric'\n * }, Date.UTC(2024, 11, 31))\n * ); // => 31 Dec 2024, 00:00\n *\n * // Individual key string replacement\n * const time3 = new Highcharts.Time();\n * console.log(\n * time3.dateFormat('%Y-%m-%d %H:%M:%S', Date.UTC(2024, 11, 31))\n * ); // => 2024-12-31 00:00:00\n *\n * // Locale-aware keys, US English\n * const time4 = new Highcharts.Time({ locale: 'en-US' });\n * console.log(\n * time4.dateFormat('%[YebHM]', Date.UTC(2024, 11, 31))\n * ); // => Dec 31, 2024, 12:00 AM\n *\n * // Locale-aware keys, British English\n * const time5 = new Highcharts.Time({ locale: 'en-GB' });\n * console.log(\n * time5.dateFormat('%[YebHM]', Date.UTC(2024, 11, 31))\n * ); // => 31 Dec 2024, 00:00\n *\n * // Mixed locale-aware and individual keys\n * console.log(\n * time5.dateFormat('%[Yeb], %H:%M', Date.UTC(2024, 11, 31))\n * ); // => 31 Dec 2024, 00:00\n *\n * @function Highcharts.Time#dateFormat\n *\n * @param {string|Highcharts.DateTimeFormatOptions} format\n * The desired string format where various time representations are\n * prefixed with %, or an object representing the locale-aware format\n * options.\n *\n * @param {number} [timestamp]\n * The JavaScript timestamp.\n *\n * @param {boolean} [upperCaseFirst=false]\n * Upper case first letter in the return.\n *\n * @return {string}\n * The formatted date.\n */\n dateFormat(format, timestamp, upperCaseFirst) {\n const lang = H.defaultOptions?.lang;\n if (!defined(timestamp) || isNaN(timestamp)) {\n return lang?.invalidDate || '';\n }\n format = format ?? '%Y-%m-%d %H:%M:%S';\n // First, identify and replace locale-aware formats like %[Ymd]\n if (isString(format)) {\n const localeAwareRegex = /%\\[([a-zA-Z]+)\\]/g;\n let match;\n while ((match = localeAwareRegex.exec(format))) {\n format = format.replace(match[0], this.dateTimeFormat(match[1], timestamp));\n }\n }\n // Then, replace static formats like %Y, %m, %d etc.\n if (isString(format) && format.indexOf('%') !== -1) {\n const time = this, [fullYear, month, dayOfMonth, hours, minutes, seconds, milliseconds, weekday] = this.toParts(timestamp), langWeekdays = lang?.weekdays || this.weekdays, shortWeekdays = lang?.shortWeekdays || this.shortWeekdays, months = lang?.months || this.months, shortMonths = lang?.shortMonths || this.shortMonths, \n // List all format keys. Custom formats can be added from the\n // outside.\n replacements = extend({\n // Day\n // Short weekday, like 'Mon'\n a: shortWeekdays ?\n shortWeekdays[weekday] :\n langWeekdays[weekday].substr(0, 3),\n // Long weekday, like 'Monday'\n A: langWeekdays[weekday],\n // Two digit day of the month, 01 to 31\n d: pad(dayOfMonth),\n // Day of the month, 1 through 31\n e: pad(dayOfMonth, 2, ' '),\n // Day of the week, 0 through 6\n w: weekday,\n // Week (none implemented)\n // 'W': weekNumber(),\n // Month\n // Short month, like 'Jan'\n b: shortMonths[month],\n // Long month, like 'January'\n B: months[month],\n // Two digit month number, 01 through 12\n m: pad(month + 1),\n // Month number, 1 through 12 (#8150)\n o: month + 1,\n // Year\n // Two digits year, like 09 for 2009\n y: fullYear.toString().substr(2, 2),\n // Four digits year, like 2009\n Y: fullYear,\n // Time\n // Two digits hours in 24h format, 00 through 23\n H: pad(hours),\n // Hours in 24h format, 0 through 23\n k: hours,\n // Two digits hours in 12h format, 00 through 11\n I: pad((hours % 12) || 12),\n // Hours in 12h format, 1 through 12\n l: (hours % 12) || 12,\n // Two digits minutes, 00 through 59\n M: pad(minutes),\n // Upper case AM or PM\n p: hours < 12 ? 'AM' : 'PM',\n // Lower case AM or PM\n P: hours < 12 ? 'am' : 'pm',\n // Two digits seconds, 00 through 59\n S: pad(seconds),\n // Milliseconds (naming from Ruby)\n L: pad(milliseconds, 3)\n }, H.dateFormats);\n // Do the replaces\n objectEach(replacements, function (val, key) {\n if (isString(format)) {\n // Regex would do it in one line, but this is faster\n while (format.indexOf('%' + key) !== -1) {\n format = format.replace('%' + key, typeof val === 'function' ?\n val.call(time, timestamp) :\n val);\n }\n }\n });\n }\n else if (isObject(format)) {\n const tzHours = (this.getTimezoneOffset(timestamp) || 0) /\n (60000 * 60), timeZone = this.options.timezone || ('Etc/GMT' + (tzHours >= 0 ? '+' : '') + tzHours), { prefix = '', suffix = '' } = format;\n format = prefix + this.dateTimeFormat(extend({ timeZone }, format), timestamp) + suffix;\n }\n // Optionally sentence-case the string and return\n return upperCaseFirst ? ucfirst(format) : format;\n }\n /**\n * Resolve legacy formats of dateTimeLabelFormats (strings and arrays) into\n * an object.\n * @private\n * @param {string|Array<T>|Highcharts.Dictionary<T>} f\n * General format description\n * @return {Highcharts.Dictionary<T>}\n * The object definition\n */\n resolveDTLFormat(f) {\n if (!isObject(f, true)) { // Check for string or array\n f = splat(f);\n return {\n main: f[0],\n from: f[1],\n to: f[2]\n };\n }\n // Type-check DateTimeFormatOptions against DateTimeLabelFormatObject\n if (isObject(f, true) && isDateTimeFormatOptions(f)) {\n return { main: f };\n }\n return f;\n }\n /**\n * Return an array with time positions distributed on round time values\n * right and right after min and max. Used in datetime axes as well as for\n * grouping data on a datetime axis.\n *\n * @function Highcharts.Time#getTimeTicks\n *\n * @param {Highcharts.TimeNormalizedObject} normalizedInterval\n * The interval in axis values (ms) and the count\n *\n * @param {number} [min]\n * The minimum in axis values\n *\n * @param {number} [max]\n * The maximum in axis values\n *\n * @param {number} [startOfWeek=1]\n *\n * @return {Highcharts.AxisTickPositionsArray}\n * Time positions\n */\n getTimeTicks(normalizedInterval, min, max, startOfWeek) {\n const time = this, tickPositions = [], higherRanks = {}, { count = 1, unitRange } = normalizedInterval;\n let [year, month, dayOfMonth, hours, minutes, seconds] = time.toParts(min), milliseconds = (min || 0) % 1000, variableDayLength;\n startOfWeek ?? (startOfWeek = 1);\n if (defined(min)) { // #1300\n milliseconds = unitRange >= timeUnits.second ?\n 0 : // #3935\n count * Math.floor(milliseconds / count);\n if (unitRange >= timeUnits.second) { // Second\n seconds = unitRange >= timeUnits.minute ?\n 0 : // #3935\n count * Math.floor(seconds / count);\n }\n if (unitRange >= timeUnits.minute) { // Minute\n minutes = unitRange >= timeUnits.hour ?\n 0 :\n count * Math.floor(minutes / count);\n }\n if (unitRange >= timeUnits.hour) { // Hour\n hours = unitRange >= timeUnits.day ?\n 0 :\n count * Math.floor(hours / count);\n }\n if (unitRange >= timeUnits.day) { // Day\n dayOfMonth = unitRange >= timeUnits.month ?\n 1 :\n Math.max(1, count * Math.floor(dayOfMonth / count));\n }\n if (unitRange >= timeUnits.month) { // Month\n month = unitRange >= timeUnits.year ? 0 :\n count * Math.floor(month / count);\n }\n if (unitRange >= timeUnits.year) { // Year\n year -= year % count;\n }\n // Week is a special case that runs outside the hierarchy\n if (unitRange === timeUnits.week) {\n if (count) {\n min = time.makeTime(year, month, dayOfMonth, hours, minutes, seconds, milliseconds);\n }\n // Get start of current week, independent of count\n const weekday = this.dateTimeFormat({\n timeZone: this.timezone,\n weekday: 'narrow'\n }, min, 'es'), weekdayNo = spanishWeekdayIndex(weekday);\n dayOfMonth += -weekdayNo + startOfWeek +\n // We don't want to skip days that are before\n // startOfWeek (#7051)\n (weekdayNo < startOfWeek ? -7 : 0);\n }\n min = time.makeTime(year, month, dayOfMonth, hours, minutes, seconds, milliseconds);\n // Handle local timezone offset\n if (time.variableTimezone && defined(max)) {\n // Detect whether we need to take the DST crossover into\n // consideration. If we're crossing over DST, the day length may\n // be 23h or 25h and we need to compute the exact clock time for\n // each tick instead of just adding hours. This comes at a cost,\n // so first we find out if it is needed (#4951).\n variableDayLength = (\n // Long range, assume we're crossing over.\n max - min > 4 * timeUnits.month ||\n // Short range, check if min and max are in different time\n // zones.\n time.getTimezoneOffset(min) !==\n time.getTimezoneOffset(max));\n }\n // Iterate and add tick positions at appropriate values\n let t = min, i = 1;\n while (t < max) {\n tickPositions.push(t);\n // Increase the years\n if (unitRange === timeUnits.year) {\n t = time.makeTime(year + i * count, 0);\n // Increase the months\n }\n else if (unitRange === timeUnits.month) {\n t = time.makeTime(year, month + i * count);\n // If we're using local time, the interval is not fixed as it\n // jumps one hour at the DST crossover\n }\n else if (variableDayLength && (unitRange === timeUnits.day ||\n unitRange === timeUnits.week)) {\n t = time.makeTime(year, month, dayOfMonth +\n i * count * (unitRange === timeUnits.day ? 1 : 7));\n }\n else if (variableDayLength &&\n unitRange === timeUnits.hour &&\n count > 1) {\n // Make sure higher ranks are preserved across DST (#6797,\n // #7621)\n t = time.makeTime(year, month, dayOfMonth, hours + i * count);\n // Else, the interval is fixed and we use simple addition\n }\n else {\n t += unitRange * count;\n }\n i++;\n }\n // Push the last time\n tickPositions.push(t);\n // Handle higher ranks. Mark new days if the time is on midnight\n // (#950, #1649, #1760, #3349). Use a reasonable dropout threshold\n // to prevent looping over dense data grouping (#6156).\n if (unitRange <= timeUnits.hour && tickPositions.length < 10000) {\n tickPositions.forEach((t) => {\n if (\n // Speed optimization, no need to run dateFormat unless\n // we're on a full or half hour\n t % 1800000 === 0 &&\n // Check for local or global midnight\n time.dateFormat('%H%M%S%L', t) === '000000000') {\n higherRanks[t] = 'day';\n }\n });\n }\n }\n // Record information on the chosen unit - for dynamic label formatter\n tickPositions.info = extend(normalizedInterval, {\n higherRanks,\n totalRange: unitRange * count\n });\n return tickPositions;\n }\n /**\n * Get the optimal date format for a point, based on a range.\n *\n * @private\n * @function Highcharts.Time#getDateFormat\n *\n * @param {number} range\n * The time range\n *\n * @param {number} timestamp\n * The timestamp of the date\n *\n * @param {number} startOfWeek\n * An integer representing the first day of the week, where 0 is\n * Sunday.\n *\n * @param {Highcharts.Dictionary<string>} dateTimeLabelFormats\n * A map of time units to formats.\n *\n * @return {string}\n * The optimal date format for a point.\n */\n getDateFormat(range, timestamp, startOfWeek, dateTimeLabelFormats) {\n const dateStr = this.dateFormat('%m-%d %H:%M:%S.%L', timestamp), blank = '01-01 00:00:00.000', strpos = {\n millisecond: 15,\n second: 12,\n minute: 9,\n hour: 6,\n day: 3\n };\n let n = 'millisecond', \n // For sub-millisecond data, #4223\n lastN = n;\n for (n in timeUnits) { // eslint-disable-line guard-for-in\n // If the range is exactly one week and we're looking at a\n // Sunday/Monday, go for the week format\n if (range === timeUnits.week &&\n +this.dateFormat('%w', timestamp) === startOfWeek &&\n dateStr.substr(6) === blank.substr(6)) {\n n = 'week';\n break;\n }\n // The first format that is too great for the range\n if (timeUnits[n] > range) {\n n = lastN;\n break;\n }\n // If the point is placed every day at 23:59, we need to show\n // the minutes as well. #2637.\n if (strpos[n] &&\n dateStr.substr(strpos[n]) !== blank.substr(strpos[n])) {\n break;\n }\n // Weeks are outside the hierarchy, only apply them on\n // Mondays/Sundays like in the first condition\n if (n !== 'week') {\n lastN = n;\n }\n }\n return this.resolveDTLFormat(dateTimeLabelFormats[n]).main;\n }\n }\n /* *\n *\n * Default export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Normalized interval.\n *\n * @interface Highcharts.TimeNormalizedObject\n */ /**\n * The count.\n *\n * @name Highcharts.TimeNormalizedObject#count\n * @type {number|undefined}\n */ /**\n * The interval in axis values (ms).\n *\n * @name Highcharts.TimeNormalizedObject#unitRange\n * @type {number}\n */\n /**\n * Function of an additional date format specifier.\n *\n * @callback Highcharts.TimeFormatCallbackFunction\n *\n * @param {number} timestamp\n * The time to format.\n *\n * @return {string}\n * The formatted portion of the date.\n */\n /**\n * Time ticks.\n *\n * @interface Highcharts.AxisTickPositionsArray\n * @extends global.Array<number>\n */ /**\n * @name Highcharts.AxisTickPositionsArray#info\n * @type {Highcharts.TimeTicksInfoObject|undefined}\n */\n /**\n * A callback to return the time zone offset for a given datetime. It\n * takes the timestamp in terms of milliseconds since January 1 1970,\n * and returns the timezone offset in minutes. This provides a hook\n * for drawing time based charts in specific time zones using their\n * local DST crossover dates, with the help of external libraries.\n *\n * @callback Highcharts.TimezoneOffsetCallbackFunction\n *\n * @param {number} timestamp\n * Timestamp in terms of milliseconds since January 1 1970.\n *\n * @return {number}\n * Timezone offset in minutes.\n */\n /**\n * Options for formatting dates and times using the [Intl.DateTimeFormat](\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * ) API, and extended with some custom options for Highcharts.\n *\n * @interface Highcharts.DateTimeFormatOptions\n */ /**\n * The locale matching algorithm to use.\n *\n * @name Highcharts.DateTimeFormatOptions#localeMatcher\n * @type {string|undefined}\n */ /**\n * The time zone to use. The default is the browser's default time zone.\n *\n * @name Highcharts.DateTimeFormatOptions#timeZone\n * @type {string|undefined}\n */ /**\n * Whether to use 12-hour time (as opposed to 24-hour time).\n *\n * @name Highcharts.DateTimeFormatOptions#hour12\n * @type {'auto'|'always'|'never'|undefined}\n */ /**\n * The format matching algorithm to use.\n *\n * @name Highcharts.DateTimeFormatOptions#formatMatcher\n * @type {string|undefined}\n */ /**\n * The representation of the weekday.\n *\n * @name Highcharts.DateTimeFormatOptions#weekday\n * @type {'narrow'|'short'|'long'|undefined}\n */ /**\n * The representation of the era.\n *\n * @name Highcharts.DateTimeFormatOptions#era\n * @type {'narrow'|'short'|'long'|undefined}\n */ /**\n * The representation of the year.\n *\n * @name Highcharts.DateTimeFormatOptions#year\n * @type {'numeric'|'2-digit'|undefined}\n */ /**\n * The representation of the month.\n * \"narrow\", \"short\", \"long\".\n *\n * @name Highcharts.DateTimeFormatOptions#month\n * @type {'numeric'|'2-digit'|'narrow'|'short'|'long'|undefined}\n */ /**\n * The representation of the day.\n *\n * @name Highcharts.DateTimeFormatOptions#day\n * @type {'numeric'|'2-digit'|undefined}\n */ /**\n * The representation of the hour.\n *\n * @name Highcharts.DateTimeFormatOptions#hour\n * @type {'numeric'|'2-digit'|undefined}\n */ /**\n * The representation of the minute.\n *\n * @name Highcharts.DateTimeFormatOptions#minute\n * @type {'numeric'|'2-digit'|undefined}\n */ /**\n * The representation of the second.\n *\n * @name Highcharts.DateTimeFormatOptions#second\n * @type {'numeric'|'2-digit'|undefined}\n */ /**\n * The number of fractional digits to use. 3 means milliseconds.\n *\n * @name Highcharts.DateTimeFormatOptions#fractionalSecondDigits\n * @type {number|undefined}\n */ /**\n * The representation of the time zone name.\n *\n * @name Highcharts.DateTimeFormatOptions#timeZoneName\n * @type {'short'|'long'|undefined}\n */ /**\n * A prefix for the time string. Custom Highcharts option.\n *\n * @name Highcharts.DateTimeFormatOptions#prefix\n * @type {'string'|undefined}\n */ /**\n * A suffix for the time string. Custom Highcharts option.\n *\n * @name Highcharts.DateTimeFormatOptions#suffix\n * @type {'string'|undefined}\n */\n ''; // Keeps doclets above in JS file\n\n return Time;\n });\n _registerModule(_modules, 'Core/Defaults.js', [_modules['Core/Chart/ChartDefaults.js'], _modules['Core/Globals.js'], _modules['Core/Color/Palettes.js'], _modules['Core/Time.js'], _modules['Core/Utilities.js']], function (ChartDefaults, H, Palettes, Time, U) {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n const { isTouchDevice } = H;\n const { fireEvent, merge } = U;\n /* *\n *\n * API Options\n *\n * */\n /**\n * Global default settings.\n *\n * @name Highcharts.defaultOptions\n * @type {Highcharts.Options}\n */ /**\n * @optionparent\n * @private\n */\n const defaultOptions = {\n /**\n * An array containing the default colors for the chart's series. When\n * all colors are used, new colors are pulled from the start again.\n *\n * Default colors can also be set on a series or series.type basis,\n * see [column.colors](#plotOptions.column.colors),\n * [pie.colors](#plotOptions.pie.colors).\n *\n * In styled mode, the colors option doesn't exist. Instead, colors\n * are defined in CSS and applied either through series or point class\n * names, or through the [chart.colorCount](#chart.colorCount) option.\n *\n * @sample {highcharts} highcharts/chart/colors/\n * Assign a global color theme\n * @sample highcharts/members/theme-v10/\n * Latest release styled like version 10\n *\n * @type {Array<(Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject)>}\n * @default [\n * \"#2caffe\",\n * \"#544fc5\",\n * \"#00e272\",\n * \"#fe6a35\",\n * \"#6b8abc\",\n * \"#d568fb\",\n * \"#2ee0ca\",\n * \"#fa4b42\",\n * \"#feb56a\",\n * \"#91e8e1\"\n * ]\n */\n colors: Palettes.colors,\n /**\n * Styled mode only. Configuration object for adding SVG definitions for\n * reusable elements. See [gradients, shadows and\n * patterns](https://www.highcharts.com/docs/chart-design-and-style/gradients-shadows-and-patterns)\n * for more information and code examples.\n *\n * @type {*}\n * @since 5.0.0\n * @apioption defs\n */\n /**\n * @ignore-option\n */\n symbols: ['circle', 'diamond', 'square', 'triangle', 'triangle-down'],\n /**\n * An object containing language-related strings and settings. A typical\n * setup uses `Highcharts.setOptions` to make the options apply to all\n * charts in the same page.\n *\n * ```js\n * Highcharts.setOptions({\n * lang: {\n * locale: 'fr'\n * }\n * });\n * ```\n */\n lang: {\n /**\n * The browser locale to use for date and number formatting. The actual\n * locale used for each chart is determined in three steps:\n * 1. If this `lang.locale` option is specified, it is used.\n * 2. Else, look for the closest ancestor HTML element with a `lang`\n * attribute, typically the `<html>` element.\n * 3. If no 'lang' attribute is found, use the default browser locale.\n *\n * Use `en-GB`, British English, for approximate consistency with\n * Highcharts v < 12.\n *\n * @sample highcharts/lang/locale/\n * Set the locale using the `lang.locale` option\n * @sample highcharts/lang/locale-attribute/\n * Pick up the locale from the HTML `lang` attribute\n * @sample highcharts/members/highcharts-numberformat\n * Arabic locale with digits and dates *\n *\n * @since 12.0.0\n * @type {string|Array<string>}\n */\n locale: void 0,\n /**\n * The loading text that appears when the chart is set into the loading\n * state following a call to `chart.showLoading`.\n */\n loading: 'Loading...',\n /**\n * An array containing the months names. Corresponds to the `%B` format\n * in `Highcharts.dateFormat()`. Defaults to 'undefined',\n * meaning the default month names are used according to the\n * `lang.locale` setting.\n *\n * @type {Array<string>}\n */\n months: void 0,\n /**\n * An array containing the months names in abbreviated form. Corresponds\n * to the `%b` format in `Highcharts.dateFormat()`. Defaults to\n * 'undefined', meaning the default short month names are used according\n * to the `lang.locale` setting.\n *\n * @type {Array<string>}\n */\n shortMonths: void 0,\n /**\n * An array containing the weekday names. Defaults to 'undefined',\n * meaning the default weekday names are used according to the\n * `lang.locale` setting.\n *\n * @type {Array<string>}\n */\n weekdays: void 0,\n /**\n * Short week days, starting Sunday. Defaults to 'undefined', meaning\n * the default short weekday names are used according to the\n * `lang.locale` setting.\n *\n * @sample highcharts/lang/shortweekdays/\n * Finnish two-letter abbreviations\n *\n * @type {Array<string>}\n * @since 4.2.4\n * @apioption lang.shortWeekdays\n */\n /**\n * What to show in a date field for invalid dates. Defaults to an empty\n * string.\n *\n * @type {string}\n * @since 4.1.8\n * @product highcharts highstock\n * @apioption lang.invalidDate\n */\n /**\n * The title appearing on hovering the zoom in button. The text itself\n * defaults to \"+\" and can be changed in the button options.\n *\n * @type {string}\n * @default Zoom in\n * @product highmaps\n * @apioption lang.zoomIn\n */\n /**\n * The title appearing on hovering the zoom out button. The text itself\n * defaults to \"-\" and can be changed in the button options.\n *\n * @type {string}\n * @default Zoom out\n * @product highmaps\n * @apioption lang.zoomOut\n */\n /**\n * The default decimal point used in the `Highcharts.numberFormat`\n * method unless otherwise specified in the function arguments. Defaults\n * to the locale decimal point as determined by `lang.locale`.\n *\n * @type {string}\n * @default undefined\n * @since 1.2.2\n * @apioption lang.decimalPoint\n */\n /**\n * [Metric prefixes](https://en.wikipedia.org/wiki/Metric_prefix) used\n * to shorten high numbers in axis labels. Replacing any of the\n * positions with `null` causes the full number to be written. Setting\n * `numericSymbols` to `undefined` disables shortening altogether.\n *\n * @sample {highcharts} highcharts/lang/numericsymbols/\n * Replacing the symbols with text\n * @sample {highstock} highcharts/lang/numericsymbols/\n * Replacing the symbols with text\n *\n * @type {Array<string>}\n * @default [\"k\", \"M\", \"G\", \"T\", \"P\", \"E\"]\n * @since 2.3.0\n */\n numericSymbols: ['k', 'M', 'G', 'T', 'P', 'E'],\n /**\n * The magnitude of [numericSymbols](#lang.numericSymbol) replacements.\n * Use 10000 for Japanese, Korean and various Chinese locales, which\n * use symbols for 10^4, 10^8 and 10^12.\n *\n * @sample highcharts/lang/numericsymbolmagnitude/\n * 10000 magnitude for Japanese\n *\n * @type {number}\n * @default 1000\n * @since 5.0.3\n * @apioption lang.numericSymbolMagnitude\n */\n /**\n * The default thousands separator used in the `Highcharts.numberFormat`\n * method unless otherwise specified in the function arguments. Defaults\n * to the locale thousands separator as determined by `lang.locale`.\n *\n * @type {string}\n * @default undefined\n * @since 1.2.2\n * @apioption lang.thousandsSep\n */\n /**\n * The text for the label appearing when a chart is zoomed.\n *\n * @since 1.2.4\n */\n resetZoom: 'Reset zoom',\n /**\n * The tooltip title for the label appearing when a chart is zoomed.\n *\n * @since 1.2.4\n */\n resetZoomTitle: 'Reset zoom level 1:1'\n },\n /**\n * Global options that don't apply to each chart. These options, like\n * the `lang` options, must be set using the `Highcharts.setOptions`\n * method.\n *\n * ```js\n * Highcharts.setOptions({\n * global: {\n * buttonTheme: {\n * fill: '#d0d0d0'\n * }\n * }\n * });\n * ```\n */\n global: {\n /**\n * General theme for buttons. This applies to the zoom button, exporting\n * context menu, map navigation, range selector buttons and custom\n * buttons generated using the `SVGRenderer.button` function. However,\n * each of these may be overridden with more specific options.\n *\n * @sample highcharts/global/buttontheme\n * General button theme\n * @since 11.4.2\n */\n buttonTheme: {\n /**\n * The fill color for buttons\n */\n fill: \"#f7f7f7\" /* Palette.neutralColor3 */,\n /**\n * The padding of buttons\n */\n padding: 8,\n /**\n * The border radius for buttons\n */\n r: 2,\n /**\n * The stroke color for buttons\n */\n stroke: \"#cccccc\" /* Palette.neutralColor20 */,\n /**\n * The stroke width for buttons\n */\n 'stroke-width': 1,\n /**\n * CSS styling for the buttons' text\n */\n style: {\n color: \"#333333\" /* Palette.neutralColor80 */,\n cursor: 'pointer',\n fontSize: '0.8em',\n fontWeight: 'normal'\n },\n /**\n * State overrides for the buttons\n */\n states: {\n /**\n * Hover state overrides for the buttons are applied in addition\n * to the normal state options\n */\n hover: {\n fill: \"#e6e6e6\" /* Palette.neutralColor10 */\n },\n /**\n * Select state overrides for the buttons are applied in\n * addition to the normal state options\n */\n select: {\n fill: \"#e6e9ff\" /* Palette.highlightColor10 */,\n style: {\n color: \"#000000\" /* Palette.neutralColor100 */,\n fontWeight: 'bold'\n }\n },\n /**\n * Disabled state overrides for the buttons are applied in\n * addition to the normal state options\n */\n disabled: {\n /**\n * Disabled state CSS style overrides for the buttons' text\n */\n style: {\n color: \"#cccccc\" /* Palette.neutralColor20 */\n }\n }\n }\n }\n },\n /**\n * Time options that can apply globally or to individual charts. These\n * settings affect how `datetime` axes are laid out, how tooltips are\n * formatted, how series\n * [pointIntervalUnit](#plotOptions.series.pointIntervalUnit) works and how\n * the Highcharts Stock range selector handles time.\n *\n * The common use case is that all charts in the same Highcharts object\n * share the same time settings, in which case the global settings are set\n * using `setOptions`.\n *\n * ```js\n * // Apply time settings globally\n * Highcharts.setOptions({\n * time: {\n * timezone: 'Europe/London'\n * }\n * });\n * // Apply time settings by instance\n * const chart = Highcharts.chart('container', {\n * time: {\n * timezone: 'America/New_York'\n * },\n * series: [{\n * data: [1, 4, 3, 5]\n * }]\n * });\n *\n * // Use the Time object\n * console.log(\n * 'Current time in New York',\n * chart.time.dateFormat('%Y-%m-%d %H:%M:%S', Date.now())\n * );\n * ```\n *\n * Since v6.0.5, the time options were moved from the `global` object to the\n * `time` object, and time options can be set on each individual chart.\n *\n * @sample {highcharts|highstock}\n * highcharts/time/timezone/\n * Set the timezone globally\n * @sample {highcharts}\n * highcharts/time/individual/\n * Set the timezone per chart instance\n * @sample {highstock}\n * stock/time/individual/\n * Set the timezone per chart instance\n *\n * @since 6.0.5\n * @optionparent time\n */\n time: {\n /**\n * A custom `Date` class for advanced date handling. For example,\n * [JDate](https://github.com/tahajahangir/jdate) can be hooked in to\n * handle Jalali dates.\n *\n * @type {*}\n * @since 4.0.4\n * @product highcharts highstock gantt\n */\n Date: void 0,\n /**\n * A named time zone. Supported time zone names rely on the browser\n * implementations, as described in the [mdn\n * docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezone).\n * If the given time zone is not recognized by the browser, Highcharts\n * provides a warning and falls back to returning a 0 offset,\n * corresponding to the UTC time zone.\n *\n * The time zone affects axis scaling, tickmark placement and\n * time display in `Highcharts.dateFormat`.\n *\n * Setting `timezone` to `undefined` falls back to the default browser\n * timezone setting.\n *\n * Until v11.2.0, this option depended on moment.js.\n *\n * @sample {highcharts|highstock} highcharts/time/timezone/ Europe/Oslo\n *\n * @type {string}\n * @since 5.0.7\n * @product highcharts highstock gantt\n */\n timezone: 'UTC',\n /**\n * The timezone offset in minutes. Positive values are west, negative\n * values are east of UTC, as in the ECMAScript\n * [getTimezoneOffset](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset)\n * method. Use this to display UTC based data in a predefined time zone.\n *\n * This option is deprecated as of v11.4.1 and will be removed in a\n * future release. Use the [time.timezone](#time.timezone) option\n * instead.\n *\n * @see [time.getTimezoneOffset](#time.getTimezoneOffset)\n *\n * @sample {highcharts|highstock} highcharts/time/timezoneoffset/\n * Timezone offset\n *\n * @since 3.0.8\n * @deprecated 11.4.2\n * @product highcharts highstock gantt\n */\n timezoneOffset: 0,\n /**\n * Whether to use UTC time for axis scaling, tickmark placement and\n * time display in `Highcharts.dateFormat`. Advantages of using UTC\n * is that the time displays equally regardless of the user agent's\n * time zone settings. Local time can be used when the data is loaded\n * in real time or when correct Daylight Saving Time transitions are\n * required.\n *\n * Setting `useUTC` to true is equivalent to setting `time.timezone` to\n * `\"UTC\"`. Setting `useUTC` to false is equivalent to setting\n * `time.timezone` to `undefined`.\n *\n * @see [time.timezone](#timezone)\n *\n * @sample {highcharts} highcharts/time/useutc-true/\n * True by default\n * @sample {highcharts} highcharts/time/useutc-false/\n * False\n *\n * @deprecated\n */\n useUTC: void 0\n },\n chart: ChartDefaults,\n /**\n * The chart's main title.\n *\n * @sample {highmaps} maps/title/title/\n * Title options demonstrated\n * @sample {highcharts} highcharts/title/align-auto/\n * Default title alignment\n */\n title: {\n /**\n * When the title is floating, the plot area will not move to make space\n * for it.\n *\n * @sample {highcharts} highcharts/chart/zoomtype-none/\n * False by default\n * @sample {highcharts} highcharts/title/floating/\n * True - title on top of the plot area\n * @sample {highstock} stock/chart/title-floating/\n * True - title on top of the plot area\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption title.floating\n */\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption title.useHTML\n */\n /**\n * The vertical alignment of the title. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When a value is given, the title behaves\n * as if [floating](#title.floating) were `true`.\n *\n * @sample {highcharts} highcharts/title/verticalalign/\n * Chart title in bottom right corner\n * @sample {highstock} stock/chart/title-verticalalign/\n * Chart title in bottom right corner\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.1\n * @apioption title.verticalAlign\n */\n /**\n * The x position of the title relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @sample {highcharts} highcharts/title/align/\n * Aligned to the plot area (x = 70px = margin left - spacing\n * left)\n * @sample {highstock} stock/chart/title-align/\n * Aligned to the plot area (x = 50px = margin left - spacing\n * left)\n *\n * @type {number}\n * @default 0\n * @since 2.0\n * @apioption title.x\n */\n /**\n * The y position of the title relative to the alignment within\n * [chart.spacingTop](#chart.spacingTop) and [chart.spacingBottom](\n * #chart.spacingBottom). By default it depends on the font size.\n *\n * @sample {highcharts} highcharts/title/y/\n * Title inside the plot area\n * @sample {highstock} stock/chart/title-verticalalign/\n * Chart title in bottom right corner\n *\n * @type {number}\n * @since 2.0\n * @apioption title.y\n */\n /**\n * CSS styles for the title. Use this for font styling, but use `align`,\n * `x` and `y` for text alignment.\n *\n * Note that the default [title.minScale](#title.minScale) option also\n * affects the rendered font size. In order to keep the font size fixed\n * regardless of title length, set `minScale` to 1.\n *\n * In styled mode, the title style is given in the `.highcharts-title`\n * class.\n *\n * @sample {highcharts} highcharts/title/style/\n * Custom color and weight\n * @sample {highstock} stock/chart/title-style/\n * Custom color and weight\n * @sample highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {highcharts|highmaps} { \"color\": \"#333333\", \"fontSize\": \"18px\" }\n * @default {highstock} { \"color\": \"#333333\", \"fontSize\": \"16px\" }\n */\n style: {\n color: \"#333333\" /* Palette.neutralColor80 */,\n fontWeight: 'bold'\n },\n /**\n * The title of the chart. To disable the title, set the `text` to\n * `undefined`.\n *\n * @sample {highcharts} highcharts/title/text/\n * Custom title\n * @sample {highstock} stock/chart/title-text/\n * Custom title\n *\n * @default {highcharts|highmaps} Chart title\n * @default {highstock} undefined\n */\n text: 'Chart title',\n /**\n * The horizontal alignment of the title. Can be one of \"left\", \"center\"\n * and \"right\".\n *\n * Since v12 it defaults to `undefined`, meaning the alignment is\n * computed for best fit. If the text fits in one line, it aligned to\n * the center, but if it is wrapped into multiple lines, it is aligned\n * to the left.\n *\n * @sample {highcharts} highcharts/title/align-auto/\n * Default alignment, dynamic\n * @sample {highcharts} highcharts/title/align/\n * Aligned to the plot area (x = 70px = margin left - spacing\n * left)\n * @sample {highstock} stock/chart/title-align/\n * Aligned to the plot area (x = 50px = margin left - spacing\n * left)\n *\n * @type {Highcharts.AlignValue}\n * @default undefined\n * @since 2.0\n * @apioption title.align\n */\n /**\n * The margin between the title and the plot area, or if a subtitle\n * is present, the margin between the subtitle and the plot area.\n *\n * @sample {highcharts} highcharts/title/margin-50/\n * A chart title margin of 50\n * @sample {highcharts} highcharts/title/margin-subtitle/\n * The same margin applied with a subtitle\n * @sample {highstock} stock/chart/title-margin/\n * A chart title margin of 50\n *\n * @since 2.1\n */\n margin: 15,\n /**\n * When the title is too wide to fit in the chart, the default behavior\n * is to scale it down to fit, or apply word wrap if it is scaled down\n * to `minScale` and still doesn't fit.\n *\n * The default value reflects the scale, when using default font sizes,\n * when the title font size matches that of the subtitle. The title\n * still stands out as it is bold by default.\n *\n * Set `minScale` to 1 to avoid downscaling.\n *\n * @sample {highcharts} highcharts/title/align-auto/\n * Downscaling demonstrated\n *\n * @since 12.0.0\n */\n minScale: 0.67\n },\n /**\n * The chart's subtitle. This can be used both to display a subtitle below\n * the main title, and to display random text anywhere in the chart. The\n * subtitle can be updated after chart initialization through the\n * `Chart.setTitle` method.\n *\n * @sample {highcharts} highcharts/title/align-auto/\n * Default title alignment\n * @sample {highmaps} maps/title/subtitle/\n * Subtitle options demonstrated\n */\n subtitle: {\n /**\n * When the subtitle is floating, the plot area will not move to make\n * space for it.\n *\n * @sample {highcharts} highcharts/subtitle/floating/\n * Floating title and subtitle\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote floating at bottom right of plot area\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption subtitle.floating\n */\n /**\n * CSS styles for the title.\n *\n * In styled mode, the subtitle style is given in the\n * `.highcharts-subtitle` class.\n *\n * @sample {highcharts} highcharts/subtitle/style/\n * Custom color and weight\n * @sample {highcharts} highcharts/css/titles/\n * Styled mode\n * @sample {highstock} stock/chart/subtitle-style\n * Custom color and weight\n * @sample {highstock} highcharts/css/titles/\n * Styled mode\n * @sample {highmaps} highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#666666\"}\n * @apioption subtitle.style\n */\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption subtitle.useHTML\n */\n /**\n * The vertical alignment of the title. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When middle, the subtitle behaves as\n * floating.\n *\n * @sample {highcharts} highcharts/subtitle/verticalalign/\n * Footnote at the bottom right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.1\n * @apioption subtitle.verticalAlign\n */\n /**\n * The x position of the subtitle relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @sample {highcharts} highcharts/subtitle/align/\n * Footnote at right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {number}\n * @default 0\n * @since 2.0\n * @apioption subtitle.x\n */\n /**\n * The y position of the subtitle relative to the alignment within\n * `chart.spacingTop` and `chart.spacingBottom`. By default the subtitle\n * is laid out below the title unless the title is floating.\n *\n * @sample {highcharts} highcharts/subtitle/verticalalign/\n * Footnote at the bottom right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {number}\n * @since 2.0\n * @apioption subtitle.y\n */\n /**\n * CSS styles for the title.\n *\n * In styled mode, the subtitle style is given in the\n * `.highcharts-subtitle` class.\n *\n * @sample {highcharts} highcharts/subtitle/style/\n * Custom color and weight\n * @sample {highcharts} highcharts/css/titles/\n * Styled mode\n * @sample {highstock} stock/chart/subtitle-style\n * Custom color and weight\n * @sample {highstock} highcharts/css/titles/\n * Styled mode\n * @sample {highmaps} highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#666666\"}\n */\n style: {\n color: \"#666666\" /* Palette.neutralColor60 */,\n /**\n * @type {number|string}\n */\n fontSize: '0.8em'\n },\n /**\n * The subtitle of the chart.\n *\n * @sample {highcharts|highstock} highcharts/subtitle/text/\n * Custom subtitle\n * @sample {highcharts|highstock} highcharts/subtitle/text-formatted/\n * Formatted and linked text.\n */\n text: ''\n /**\n * The horizontal alignment of the subtitle. Can be one of \"left\",\n * \"center\" and \"right\". Since v12, it defaults to `undefined`, meaning\n * the actual alignment is inherited from the alignment of the main\n * title.\n *\n * @sample {highcharts} highcharts/title/align-auto/\n * Default title and subtitle alignment, dynamic\n * @sample {highcharts} highcharts/subtitle/align/\n * Footnote at right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at bottom right of plot area\n *\n * @type {Highcharts.AlignValue}\n * @default undefined\n * @since 2.0\n * @apioption subtitle.align\n */\n },\n /**\n * The chart's caption, which will render below the chart and will be part\n * of exported charts. The caption can be updated after chart initialization\n * through the `Chart.update` or `Chart.caption.update` methods.\n *\n * @sample highcharts/caption/text/\n * A chart with a caption\n * @since 7.2.0\n */\n caption: {\n /**\n * When the caption is floating, the plot area will not move to make\n * space for it.\n *\n * @type {boolean}\n * @default false\n * @apioption caption.floating\n */\n /**\n * The margin between the caption and the plot area.\n */\n margin: 15,\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption caption.useHTML\n */\n /**\n * The x position of the caption relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @type {number}\n * @default 0\n * @apioption caption.x\n */\n /**\n * The y position of the caption relative to the alignment within\n * `chart.spacingTop` and `chart.spacingBottom`.\n *\n * @type {number}\n * @apioption caption.y\n */\n /**\n * CSS styles for the caption.\n *\n * In styled mode, the caption style is given in the\n * `.highcharts-caption` class.\n *\n * @sample {highcharts} highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#666666\"}\n */\n style: {\n color: \"#666666\" /* Palette.neutralColor60 */,\n /**\n * @type {number|string}\n */\n fontSize: '0.8em'\n },\n /**\n * The caption text of the chart.\n *\n * @sample {highcharts} highcharts/caption/text/\n * Custom caption\n */\n text: '',\n /**\n * The horizontal alignment of the caption. Can be one of \"left\",\n * \"center\" and \"right\".\n *\n * @type {Highcharts.AlignValue}\n */\n align: 'left',\n /**\n * The vertical alignment of the caption. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When middle, the caption behaves as\n * floating.\n *\n * @type {Highcharts.VerticalAlignValue}\n */\n verticalAlign: 'bottom'\n },\n /**\n * The plotOptions is a wrapper object for config objects for each series\n * type. The config objects for each series can also be overridden for\n * each series item as given in the series array.\n *\n * Configuration options for the series are given in three levels. Options\n * for all series in a chart are given in the [plotOptions.series](\n * #plotOptions.series) object. Then options for all series of a specific\n * type are given in the plotOptions of that type, for example\n * `plotOptions.line`. Next, options for one single series are given in\n * [the series array](#series).\n */\n plotOptions: {},\n /**\n * The legend is a box containing a symbol and name for each series\n * item or point item in the chart. Each series (or points in case\n * of pie charts) is represented by a symbol and its name in the legend.\n *\n * It is possible to override the symbol creator function and create\n * [custom legend symbols](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/studies/legend-custom-symbol/).\n *\n * @productdesc {highmaps}\n * A Highmaps legend by default contains one legend item per series, but if\n * a `colorAxis` is defined, the axis will be displayed in the legend.\n * Either as a gradient, or as multiple legend items for `dataClasses`.\n */\n legend: {\n /**\n * The background color of the legend.\n *\n * @see In styled mode, the legend background fill can be applied with\n * the `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/backgroundcolor/\n * Yellowish background\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption legend.backgroundColor\n */\n /**\n * The width of the drawn border around the legend.\n *\n * @see In styled mode, the legend border stroke width can be applied\n * with the `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/borderwidth/\n * 2px border width\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {number}\n * @default 0\n * @apioption legend.borderWidth\n */\n /**\n * Enable or disable the legend. There is also a series-specific option,\n * [showInLegend](#plotOptions.series.showInLegend), that can hide the\n * series from the legend. In some series types this is `false` by\n * default, so it must set to `true` in order to show the legend for the\n * series.\n *\n * @sample {highcharts} highcharts/legend/enabled-false/ Legend disabled\n * @sample {highstock} stock/legend/align/ Various legend options\n * @sample {highmaps} maps/legend/enabled-false/ Legend disabled\n *\n * @default {highstock} false\n * @default {highmaps} true\n * @default {gantt} false\n */\n enabled: true,\n /**\n * The horizontal alignment of the legend box within the chart area.\n * Valid values are `left`, `center` and `right`.\n *\n * In the case that the legend is aligned in a corner position, the\n * `layout` option will determine whether to place it above/below\n * or on the side of the plot area.\n *\n * @sample {highcharts} highcharts/legend/align/\n * Legend at the right of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @type {Highcharts.AlignValue}\n * @since 2.0\n */\n align: 'center',\n /**\n * If the [layout](legend.layout) is `horizontal` and the legend items\n * span over two lines or more, whether to align the items into vertical\n * columns. Setting this to `false` makes room for more items, but will\n * look more messy.\n *\n * @since 6.1.0\n */\n alignColumns: true,\n /**\n * A CSS class name to apply to the legend group.\n */\n className: 'highcharts-no-tooltip',\n /**\n * General event handlers for the legend. These event hooks can\n * also be attached to the legend at run time using the\n * `Highcharts.addEvent` function.\n *\n * @declare Highcharts.LegendEventsOptionsObject\n *\n * @private\n */\n events: {},\n /**\n * Fires when the legend item belonging to the series is clicked. One\n * parameter, `event`, is passed to the function. The default action\n * is to toggle the visibility of the series, point or data class. This\n * can be prevented by returning `false` or calling\n * `event.preventDefault()`.\n *\n * @sample {highcharts} highcharts/legend/itemclick/\n * Confirm hiding and showing\n * @sample {highcharts} highcharts/legend/pie-legend-itemclick/\n * Confirm toggle visibility of pie slices\n *\n * @type {Highcharts.LegendItemClickCallbackFunction}\n * @context Highcharts.Legend\n * @apioption legend.events.itemClick\n */\n /**\n * When the legend is floating, the plot area ignores it and is allowed\n * to be placed below it.\n *\n * @sample {highcharts} highcharts/legend/floating-false/\n * False by default\n * @sample {highcharts} highcharts/legend/floating-true/\n * True\n * @sample {highmaps} maps/legend/alignment/\n * Floating legend\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption legend.floating\n */\n /**\n * The layout of the legend items. Can be one of `horizontal` or\n * `vertical` or `proximate`. When `proximate`, the legend items will be\n * placed as close as possible to the graphs they're representing,\n * except in inverted charts or when the legend position doesn't allow\n * it.\n *\n * @sample {highcharts} highcharts/legend/layout-horizontal/\n * Horizontal by default\n * @sample {highcharts} highcharts/legend/layout-vertical/\n * Vertical\n * @sample highcharts/legend/layout-proximate\n * Labels proximate to the data\n * @sample {highstock} stock/legend/layout-horizontal/\n * Horizontal by default\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Vertical with data classes\n * @sample {highmaps} maps/legend/layout-vertical/\n * Vertical with color axis gradient\n *\n * @validvalue [\"horizontal\", \"vertical\", \"proximate\"]\n */\n layout: 'horizontal',\n /**\n * In a legend with horizontal layout, the itemDistance defines the\n * pixel distance between each item.\n *\n * @sample {highcharts} highcharts/legend/layout-horizontal/\n * 50px item distance\n * @sample {highstock} highcharts/legend/layout-horizontal/\n * 50px item distance\n *\n * @type {number}\n * @default {highcharts} 20\n * @default {highstock} 20\n * @default {highmaps} 8\n * @since 3.0.3\n * @apioption legend.itemDistance\n */\n /**\n * The pixel bottom margin for each legend item.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @since 2.2.0\n */\n itemMarginBottom: 2,\n /**\n * The pixel top margin for each legend item.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @since 2.2.0\n */\n itemMarginTop: 2,\n /**\n * The width for each legend item. By default the items are laid out\n * successively. In a [horizontal layout](legend.layout), if the items\n * are laid out across two rows or more, they will be vertically aligned\n * depending on the [legend.alignColumns](legend.alignColumns) option.\n *\n * @sample {highcharts} highcharts/legend/itemwidth-default/\n * Undefined by default\n * @sample {highcharts} highcharts/legend/itemwidth-80/\n * 80 for aligned legend items\n *\n * @type {number}\n * @since 2.0\n * @apioption legend.itemWidth\n */\n /**\n * A [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * for each legend label. Available variables relates to properties on\n * the series, or the point in case of pies.\n *\n * @type {string}\n * @default {name}\n * @since 1.3\n * @apioption legend.labelFormat\n */\n /* eslint-disable valid-jsdoc */\n /**\n * Callback function to format each of the series' labels. The `this`\n * keyword refers to the series object, or the point object in case of\n * pie charts. By default the series or point name is printed.\n *\n * @productdesc {highmaps}\n * In Highmaps the context can also be a data class in case of a\n * `colorAxis`.\n *\n * @sample {highcharts} highcharts/legend/labelformatter/\n * Add text\n * @sample {highmaps} maps/legend/labelformatter/\n * Data classes with label formatter\n *\n * @type {Highcharts.FormatterCallbackFunction<Point|Series>}\n */\n labelFormatter: function () {\n // eslint-enable valid-jsdoc\n return this.name;\n },\n /**\n * Line height for the legend items. Deprecated as of 2.1\\. Instead,\n * the line height for each item can be set using\n * `itemStyle.lineHeight`, and the padding between items using\n * `itemMarginTop` and `itemMarginBottom`.\n *\n * @sample {highcharts} highcharts/legend/lineheight/\n * Setting padding\n *\n * @deprecated\n *\n * @type {number}\n * @default 16\n * @since 2.0\n * @product highcharts gantt\n * @apioption legend.lineHeight\n */\n /**\n * If the plot area sized is calculated automatically and the legend is\n * not floating, the legend margin is the space between the legend and\n * the axis labels or plot area.\n *\n * @sample {highcharts} highcharts/legend/margin-default/\n * 12 pixels by default\n * @sample {highcharts} highcharts/legend/margin-30/\n * 30 pixels\n *\n * @type {number}\n * @default 12\n * @since 2.1\n * @apioption legend.margin\n */\n /**\n * Maximum pixel height for the legend. When the maximum height is\n * extended, navigation will show.\n *\n * @type {number}\n * @since 2.3.0\n * @apioption legend.maxHeight\n */\n /**\n * The color of the drawn border around the legend.\n *\n * @see In styled mode, the legend border stroke can be applied with the\n * `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/bordercolor/\n * Brown border\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n borderColor: \"#999999\" /* Palette.neutralColor40 */,\n /**\n * The border corner radius of the legend.\n *\n * @sample {highcharts} highcharts/legend/borderradius-default/\n * Square by default\n * @sample {highcharts} highcharts/legend/borderradius-round/\n * 5px rounded\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n */\n borderRadius: 0,\n /**\n * Options for the paging or navigation appearing when the legend is\n * overflown. Navigation works well on screen, but not in static\n * exported images. One way of working around that is to\n * [increase the chart height in\n * export](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/legend/navigation-enabled-false/).\n *\n * @sample highcharts/legend/scrollable-vertical/\n * Legend with vertical scrollable extension\n * @sample highcharts/legend/scrollable-horizontal/\n * Legend with horizontal scrollable extension\n *\n */\n navigation: {\n /**\n * How to animate the pages when navigating up or down. A value of\n * `true` applies the default navigation given in the\n * `chart.animation` option. Additional options can be given as an\n * object containing values for easing and duration.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}\n * @default true\n * @since 2.2.4\n * @apioption legend.navigation.animation\n */\n /**\n * The pixel size of the up and down arrows in the legend paging\n * navigation.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {number}\n * @default 12\n * @since 2.2.4\n * @apioption legend.navigation.arrowSize\n */\n /**\n * Whether to enable the legend navigation. In most cases, disabling\n * the navigation results in an unwanted overflow.\n *\n * See also the\n * [adapt chart to legend](https://github.com/highcharts/adapt-chart-to-legend)\n * plugin for a solution to extend the chart height to make room for\n * the legend, optionally in exported charts only.\n *\n * @type {boolean}\n * @default true\n * @since 4.2.4\n * @apioption legend.navigation.enabled\n */\n /**\n * Text styles for the legend page navigation.\n *\n * @see In styled mode, the navigation items are styled with the\n * `.highcharts-legend-navigation` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.CSSObject}\n * @since 2.2.4\n * @apioption legend.navigation.style\n */\n style: {\n /**\n * @type {number|string}\n */\n fontSize: '0.8em'\n },\n /**\n * The color for the active up or down arrow in the legend page\n * navigation.\n *\n * @see In styled mode, the active arrow be styled with the\n * `.highcharts-legend-nav-active` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.2.4\n */\n activeColor: \"#0022ff\" /* Palette.highlightColor100 */,\n /**\n * The color of the inactive up or down arrow in the legend page\n * navigation. .\n *\n * @see In styled mode, the inactive arrow be styled with the\n * `.highcharts-legend-nav-inactive` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.2.4\n */\n inactiveColor: \"#cccccc\" /* Palette.neutralColor20 */\n },\n /**\n * The inner padding of the legend box.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @type {number}\n * @default 8\n * @since 2.2.0\n * @apioption legend.padding\n */\n /**\n * Whether to reverse the order of the legend items compared to the\n * order of the series or points as defined in the configuration object.\n *\n * @see [yAxis.reversedStacks](#yAxis.reversedStacks),\n * [series.legendIndex](#series.legendIndex)\n *\n * @sample {highcharts} highcharts/legend/reversed/\n * Stacked bar with reversed legend\n *\n * @type {boolean}\n * @default false\n * @since 1.2.5\n * @apioption legend.reversed\n */\n /**\n * Whether to show the symbol on the right side of the text rather than\n * the left side. This is common in Arabic and Hebrew.\n *\n * @sample {highcharts} highcharts/legend/rtl/\n * Symbol to the right\n *\n * @type {boolean}\n * @default false\n * @since 2.2\n * @apioption legend.rtl\n */\n /**\n * CSS styles for the legend area. In the 1.x versions the position\n * of the legend area was determined by CSS. In 2.x, the position is\n * determined by properties like `align`, `verticalAlign`, `x` and `y`,\n * but the styles are still parsed for backwards compatibility.\n *\n * @deprecated\n *\n * @type {Highcharts.CSSObject}\n * @product highcharts highstock\n * @apioption legend.style\n */\n /**\n * CSS styles for each legend item. Only a subset of CSS is supported,\n * notably those options related to text. The default `textOverflow`\n * property makes long texts truncate. Set it to `undefined` to wrap\n * text instead. A `width` property can be added to control the text\n * width.\n *\n * @see In styled mode, the legend items can be styled with the\n * `.highcharts-legend-item` class.\n *\n * @sample {highcharts} highcharts/legend/itemstyle/\n * Bold black text\n * @sample {highmaps} maps/legend/itemstyle/\n * Item text styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#333333\", \"cursor\": \"pointer\", \"fontSize\": \"0.8em\", \"fontWeight\": \"bold\", \"textOverflow\": \"ellipsis\"}\n */\n itemStyle: {\n /**\n * @ignore\n */\n color: \"#333333\" /* Palette.neutralColor80 */,\n /**\n * @ignore\n */\n cursor: 'pointer',\n /**\n * @ignore\n */\n fontSize: '0.8em',\n /**\n * @ignore\n */\n textDecoration: 'none',\n /**\n * @ignore\n */\n textOverflow: 'ellipsis'\n },\n /**\n * CSS styles for each legend item in hover mode. Only a subset of\n * CSS is supported, notably those options related to text. Properties\n * are inherited from `style` unless overridden here.\n *\n * @see In styled mode, the hovered legend items can be styled with\n * the `.highcharts-legend-item:hover` pseudo-class.\n *\n * @sample {highcharts} highcharts/legend/itemhoverstyle/\n * Red on hover\n * @sample {highmaps} maps/legend/itemstyle/\n * Item text styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#000000\"}\n */\n itemHoverStyle: {\n /**\n * @ignore\n */\n color: \"#000000\" /* Palette.neutralColor100 */\n },\n /**\n * CSS styles for each legend item when the corresponding series or\n * point is hidden. Only a subset of CSS is supported, notably those\n * options related to text. Properties are inherited from `style`\n * unless overridden here.\n *\n * @see In styled mode, the hidden legend items can be styled with\n * the `.highcharts-legend-item-hidden` class.\n *\n * @sample {highcharts} highcharts/legend/itemhiddenstyle/\n * Darker gray color\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#cccccc\"}\n */\n itemHiddenStyle: {\n /**\n * @ignore\n */\n color: \"#666666\" /* Palette.neutralColor60 */,\n /**\n * @ignore\n */\n textDecoration: 'line-through'\n },\n /**\n * Whether to apply a drop shadow to the legend. A `backgroundColor`\n * also needs to be applied for this to take effect. The shadow can be\n * an object configuration containing `color`, `offsetX`, `offsetY`,\n * `opacity` and `width`.\n *\n * @sample {highcharts} highcharts/legend/shadow/\n * White background and drop shadow\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {boolean|Highcharts.CSSObject}\n */\n shadow: false,\n /**\n * Default styling for the checkbox next to a legend item when\n * `showCheckbox` is true.\n *\n * @type {Highcharts.CSSObject}\n * @default {\"width\": \"13px\", \"height\": \"13px\", \"position\":\"absolute\"}\n */\n itemCheckboxStyle: {\n /**\n * @ignore\n */\n position: 'absolute',\n /**\n * @ignore\n */\n width: '13px', // For IE precision\n /**\n * @ignore\n */\n height: '13px'\n },\n /// itemWidth: undefined,\n /**\n * When this is true, the legend symbol width will be the same as\n * the symbol height, which in turn defaults to the font size of the\n * legend items.\n *\n * @since 5.0.0\n */\n squareSymbol: true,\n /**\n * The pixel height of the symbol for series types that use a rectangle\n * in the legend. Defaults to the font size of legend items.\n *\n * Note: This option is a default source of color axis height, if the\n * [colorAxis.height](https://api.highcharts.com/highcharts/colorAxis.height)\n * option is not set.\n *\n * @productdesc {highmaps}\n * In Highmaps, when the symbol is the gradient of a vertical color\n * axis, the height defaults to 200.\n *\n * @sample {highmaps} maps/legend/layout-vertical-sized/\n * Sized vertical gradient\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * No distance between data classes\n *\n * @type {number}\n * @since 3.0.8\n * @apioption legend.symbolHeight\n */\n /**\n * The border radius of the symbol for series types that use a rectangle\n * in the legend. Defaults to half the `symbolHeight`, effectively\n * creating a circle.\n *\n * For color axis scales, it defaults to 3.\n *\n * @sample {highcharts} highcharts/legend/symbolradius/\n * Round symbols\n * @sample {highstock} highcharts/legend/symbolradius/\n * Round symbols\n * @sample {highmaps} highcharts/legend/symbolradius/\n * Round symbols\n *\n * @type {number}\n * @since 3.0.8\n * @apioption legend.symbolRadius\n */\n /**\n * The pixel width of the legend item symbol. When the `squareSymbol`\n * option is set, this defaults to the `symbolHeight`, otherwise 16.\n *\n * Note: This option is a default source of color axis width, if the\n * [colorAxis.width](https://api.highcharts.com/highcharts/colorAxis.width)\n * option is not set.\n *\n * @productdesc {highmaps}\n * In Highmaps, when the symbol is the gradient of a horizontal color\n * axis, the width defaults to 200.\n *\n * @sample {highcharts} highcharts/legend/symbolwidth/\n * Greater symbol width and padding\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/layout-vertical-sized/\n * Sized vertical gradient\n *\n * @type {number}\n * @apioption legend.symbolWidth\n */\n /**\n * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the legend item texts.\n *\n * Prior to 4.1.7, when using HTML, [legend.navigation](\n * #legend.navigation) was disabled.\n *\n * @sample highcharts/legend/scrollable-vertical/\n * Legend with vertical scrollable extension\n * @sample highcharts/legend/scrollable-horizontal/\n * Legend with horizontal scrollable extension\n *\n * @type {boolean}\n * @default false\n * @apioption legend.useHTML\n */\n /**\n * For a color axis with data classes, how many decimals to render in\n * the legend. The default preserves the decimals of the range numbers.\n *\n * @type {number}\n * @default -1\n * @product highcharts highmaps\n * @apioption legend.valueDecimals\n */\n /**\n * For a color axis with data classes, a suffix for the range numbers in\n * the legend.\n *\n * @type {string}\n * @default ''\n * @product highcharts highmaps\n * @apioption legend.valueSuffix\n */\n /**\n * The width of the legend box. If a number is set, it translates to\n * pixels. Since v7.0.2 it allows setting a percent string of the full\n * chart width, for example `40%`.\n *\n * Defaults to the full chart width for legends below or above the\n * chart, half the chart width for legends to the left and right.\n *\n * @sample {highcharts} highcharts/legend/width/\n * Aligned to the plot area\n * @sample {highcharts} highcharts/legend/width-percent/\n * A percent of the chart width\n *\n * @type {number|string}\n * @since 2.0\n * @apioption legend.width\n */\n /**\n * The pixel padding between the legend item symbol and the legend\n * item text.\n *\n * @sample {highcharts} highcharts/legend/symbolpadding/\n * Greater symbol width and padding\n */\n symbolPadding: 5,\n /**\n * The vertical alignment of the legend box. Can be one of `top`,\n * `middle` or `bottom`. Vertical position can be further determined\n * by the `y` option.\n *\n * In the case that the legend is aligned in a corner position, the\n * `layout` option will determine whether to place it above/below\n * or on the side of the plot area.\n *\n * When the [layout](#legend.layout) option is `proximate`, the\n * `verticalAlign` option doesn't apply.\n *\n * @sample {highcharts} highcharts/legend/verticalalign/\n * Legend 100px from the top of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.0\n */\n verticalAlign: 'bottom',\n // Width: undefined,\n /**\n * The x offset of the legend relative to its horizontal alignment\n * `align` within chart.spacingLeft and chart.spacingRight. Negative\n * x moves it to the left, positive x moves it to the right.\n *\n * @sample {highcharts} highcharts/legend/width/\n * Aligned to the plot area\n *\n * @since 2.0\n */\n x: 0,\n /**\n * The vertical offset of the legend relative to it's vertical alignment\n * `verticalAlign` within chart.spacingTop and chart.spacingBottom.\n * Negative y moves it up, positive y moves it down.\n *\n * @sample {highcharts} highcharts/legend/verticalalign/\n * Legend 100px from the top of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @since 2.0\n */\n y: 0,\n /**\n * A title to be added on top of the legend.\n *\n * @sample {highcharts} highcharts/legend/title/\n * Legend title\n * @sample {highmaps} maps/legend/alignment/\n * Legend with title\n *\n * @since 3.0\n */\n title: {\n /**\n * A text or HTML string for the title.\n *\n * @type {string}\n * @since 3.0\n * @apioption legend.title.text\n */\n /**\n * Generic CSS styles for the legend title.\n *\n * @see In styled mode, the legend title is styled with the\n * `.highcharts-legend-title` class.\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontSize\": \"0.8em\", \"fontWeight\": \"bold\"}\n * @since 3.0\n */\n style: {\n /**\n * @ignore\n */\n fontSize: '0.8em',\n /**\n * @ignore\n */\n fontWeight: 'bold'\n }\n }\n },\n /**\n * The loading options control the appearance of the loading screen\n * that covers the plot area on chart operations. This screen only\n * appears after an explicit call to `chart.showLoading()`. It is a\n * utility for developers to communicate to the end user that something\n * is going on, for example while retrieving new data via an XHR connection.\n * The \"Loading...\" text itself is not part of this configuration\n * object, but part of the `lang` object.\n */\n loading: {\n /**\n * The duration in milliseconds of the fade out effect.\n *\n * @sample highcharts/loading/hideduration/\n * Fade in and out over a second\n *\n * @type {number}\n * @default 100\n * @since 1.2.0\n * @apioption loading.hideDuration\n */\n /**\n * The duration in milliseconds of the fade in effect.\n *\n * @sample highcharts/loading/hideduration/\n * Fade in and out over a second\n *\n * @type {number}\n * @default 100\n * @since 1.2.0\n * @apioption loading.showDuration\n */\n /**\n * CSS styles for the loading label `span`.\n *\n * @see In styled mode, the loading label is styled with the\n * `.highcharts-loading-inner` class.\n *\n * @sample {highcharts|highmaps} highcharts/loading/labelstyle/\n * Vertically centered\n * @sample {highstock} stock/loading/general/\n * Label styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontWeight\": \"bold\", \"position\": \"relative\", \"top\": \"45%\"}\n * @since 1.2.0\n */\n labelStyle: {\n /**\n * @ignore\n */\n fontWeight: 'bold',\n /**\n * @ignore\n */\n position: 'relative',\n /**\n * @ignore\n */\n top: '45%'\n },\n /**\n * CSS styles for the loading screen that covers the plot area.\n *\n * In styled mode, the loading label is styled with the\n * `.highcharts-loading` class.\n *\n * @sample {highcharts|highmaps} highcharts/loading/style/\n * Gray plot area, white text\n * @sample {highstock} stock/loading/general/\n * Gray plot area, white text\n *\n * @type {Highcharts.CSSObject}\n * @default {\"position\": \"absolute\", \"backgroundColor\": \"#ffffff\", \"opacity\": 0.5, \"textAlign\": \"center\"}\n * @since 1.2.0\n */\n style: {\n /**\n * @ignore\n */\n position: 'absolute',\n /**\n * @ignore\n */\n backgroundColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * @ignore\n */\n opacity: 0.5,\n /**\n * @ignore\n */\n textAlign: 'center'\n }\n },\n /**\n * Options for the tooltip that appears when the user hovers over a\n * series or point.\n *\n * @declare Highcharts.TooltipOptions\n */\n tooltip: {\n /**\n * The color of the tooltip border. When `undefined`, the border takes\n * the color of the corresponding series or point.\n *\n * Note that the [borderWidth](#tooltip.borderWidth) is usually 0 by\n * default, so the border color may not be visible until a border width\n * is set.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/ Follow\n * series by default\n * @sample {highcharts} highcharts/tooltip/bordercolor-black/ Black\n * border\n * @sample {highstock} stock/tooltip/general/ Styled tooltip\n * @sample {highmaps} maps/tooltip/background-border/ Background and\n * border demo\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption tooltip.borderColor\n */\n /**\n * A CSS class name to apply to the tooltip's container div,\n * allowing unique CSS styling for each chart.\n *\n * @type {string}\n * @apioption tooltip.className\n */\n /**\n * Since 4.1, the crosshair definitions are moved to the Axis object\n * in order for a better separation from the tooltip. See\n * [xAxis.crosshair](#xAxis.crosshair).\n *\n * @sample {highcharts} highcharts/tooltip/crosshairs-x/\n * Enable a crosshair for the x value\n *\n * @deprecated\n *\n * @type {*}\n * @default true\n * @apioption tooltip.crosshairs\n */\n /**\n * Distance from point to tooltip in pixels.\n *\n * @type {number}\n * @default 16\n * @apioption tooltip.distance\n */\n /**\n * Whether the tooltip should follow the mouse as it moves across\n * columns, pie slices and other point types with an extent.\n * By default it behaves this way for pie, polygon, map, sankey\n * and wordcloud series by override in the `plotOptions`\n * for those series types.\n *\n * Does not apply if [split](#tooltip.split) is `true`.\n *\n * For touch moves to behave the same way, [followTouchMove](\n * #tooltip.followTouchMove) must be `true` also.\n *\n * @sample highcharts/tooltip/followpointer/\n * Tooltip follow pointer comparison\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock} false\n * @default {highmaps} true\n * @since 3.0\n * @apioption tooltip.followPointer\n */\n /**\n * Whether the tooltip should update as the finger moves on a touch\n * device. If this is `true` and [chart.panning](#chart.panning) is\n * set,`followTouchMove` will take over one-finger touches, so the user\n * needs to use two fingers for zooming and panning.\n *\n * Note the difference to [followPointer](#tooltip.followPointer) that\n * only defines the _position_ of the tooltip. If `followPointer` is\n * false in for example a column series, the tooltip will show above or\n * below the column, but as `followTouchMove` is true, the tooltip will\n * jump from column to column as the user swipes across the plot area.\n *\n * @type {boolean}\n * @default {highcharts} true\n * @default {highstock} true\n * @default {highmaps} false\n * @since 3.0.1\n * @apioption tooltip.followTouchMove\n */\n /**\n * A [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * for the whole shared tooltip. When format strings are a requirement,\n * it is usually more convenient to use `headerFormat`, `pointFormat`\n * and `footerFormat`, but the `format` option allows combining them\n * into one setting.\n *\n * The context of the format string is the same as that of the\n * `tooltip.formatter` callback.\n *\n * @sample {highcharts} highcharts/tooltip/format-shared/\n * Format for shared tooltip\n *\n * @type {string}\n * @default undefined\n * @since 11.1.0\n * @apioption tooltip.format\n */\n /**\n * Callback function to format the text of the tooltip from scratch. In\n * case of single or [shared](#tooltip.shared) tooltips, a string should\n * be returned. In case of [split](#tooltip.split) tooltips, it should\n * return an array where the first item is the header, and subsequent\n * items are mapped to the points. Return `false` to disable tooltip for\n * a specific point on series.\n *\n * A subset of HTML is supported. Unless `useHTML` is true, the HTML of\n * the tooltip is parsed and converted to SVG, therefore this isn't a\n * complete HTML renderer. The following HTML tags are supported: `b`,\n * `br`, `em`, `i`, `span`, `strong`. Spans can be styled with a `style`\n * attribute, but only text-related CSS, that is shared with SVG, is\n * handled.\n *\n * The context of the formatter (since v12) is the\n * [Point](https://api.highcharts.com/class-reference/Highcharts.Point)\n * instance. If the tooltip is shared or split, an array `this.points`\n * contains all points of the hovered x-value.\n *\n * Common properties from the Point to use in the formatter include:\n *\n * - **Point.percentage**:\n * Stacked series and pies only. The point's percentage of the total.\n *\n * - **Point.points**:\n * In a shared or split tooltip, this is an array containing all the\n * hovered points.\n *\n * - **this.series**:\n * The series object. The series name is available through\n * `this.series.name`.\n *\n * - **this.total**:\n * The total value at this point's x value in a stacked series, or the\n * sum of all slices in a pie series.\n *\n * - **this.x**:\n * The x value.\n *\n * - **this.y**:\n * The y value.\n *\n * @sample {highcharts} highcharts/tooltip/formatter-simple/\n * Simple string formatting\n * @sample {highcharts} highcharts/tooltip/formatter-shared/\n * Formatting with shared tooltip\n * @sample {highcharts|highstock} highcharts/tooltip/formatter-split/\n * Formatting with split tooltip\n * @sample highcharts/tooltip/formatter-conditional-default/\n * Extending default formatter\n * @sample {highstock} stock/tooltip/formatter/\n * Formatting with shared tooltip\n * @sample {highmaps} maps/tooltip/formatter/\n * String formatting\n *\n * @type {Highcharts.TooltipFormatterCallbackFunction}\n * @apioption tooltip.formatter\n */\n /**\n * Callback function to format the text of the tooltip for\n * visible null points.\n * Works analogously to [formatter](#tooltip.formatter).\n *\n * @sample highcharts/plotoptions/series-nullformat\n * Format data label and tooltip for null point.\n *\n * @type {Highcharts.TooltipFormatterCallbackFunction}\n * @apioption tooltip.nullFormatter\n */\n /**\n * Whether to allow the tooltip to render outside the chart's SVG\n * element box. By default (`false`), the tooltip is rendered within the\n * chart's SVG element, which results in the tooltip being aligned\n * inside the chart area. For small charts, this may result in clipping\n * or overlapping. When `true`, a separate SVG element is created and\n * overlaid on the page, allowing the tooltip to be aligned inside the\n * page itself. Beware that with this option active, CSS classes on the\n * chart's target container, with classnames matching the pattern\n * 'highcharts-*', will be set on the tooltip as well. This is done to\n * support theming for tooltips with this option.\n *\n * Defaults to `true` if `chart.scrollablePlotArea` is activated,\n * otherwise `false`.\n *\n * @sample highcharts/tooltip/outside\n * Small charts with tooltips outside\n *\n * @type {boolean|undefined}\n * @default undefined\n * @since 6.1.1\n * @apioption tooltip.outside\n */\n /**\n * A callback function for formatting the HTML output for a single point\n * in the tooltip. Like the `pointFormat` string, but with more\n * flexibility.\n *\n * @type {Highcharts.FormatterCallbackFunction<Highcharts.Point>}\n * @since 4.1.0\n * @context Highcharts.Point\n * @apioption tooltip.pointFormatter\n */\n /**\n * A callback function to place the tooltip in a custom position. The\n * callback receives three parameters: `labelWidth`, `labelHeight` and\n * `point`, where point contains values for `plotX` and `plotY` telling\n * where the reference point is in the plot area. Add `chart.plotLeft`\n * and `chart.plotTop` to get the full coordinates.\n *\n * To find the actual hovered `Point` instance, use\n * `this.chart.hoverPoint`. For shared or split tooltips, all the hover\n * points are available in `this.chart.hoverPoints`.\n *\n * Since v7, when [tooltip.split](#tooltip.split) option is enabled,\n * positioner is called for each of the boxes separately, including\n * xAxis header. xAxis header is not a point, instead `point` argument\n * contains info: `{ plotX: Number, plotY: Number, isHeader: Boolean }`\n *\n * The return should be an object containing x and y values, for example\n * `{ x: 100, y: 100 }`.\n *\n * @sample {highcharts} highcharts/tooltip/positioner/\n * A fixed tooltip position\n * @sample {highstock} stock/tooltip/positioner/\n * A fixed tooltip position on top of the chart\n * @sample {highmaps} maps/tooltip/positioner/\n * A fixed tooltip position\n * @sample {highstock} stock/tooltip/split-positioner/\n * Split tooltip with fixed positions\n * @sample {highstock} stock/tooltip/positioner-scrollable-plotarea/\n * Scrollable plot area combined with tooltip positioner\n *\n * @type {Highcharts.TooltipPositionerCallbackFunction}\n * @since 2.2.4\n * @apioption tooltip.positioner\n */\n /**\n * Shows tooltip for all points with the same X value. Splits the\n * tooltip into one label per series, with the header close to the axis.\n * This is recommended over [shared](#tooltip.shared)\n * tooltips for charts with multiple line series, generally making them\n * easier to read. This option takes precedence over `tooltip.shared`.\n *\n * Not supported for [polar](#chart.polar) and [inverted](#chart.inverted) charts.\n *\n * @productdesc {highstock} In Highcharts Stock, tooltips are split\n * by default since v6.0.0. Stock charts typically contain\n * multi-dimension points and multiple panes, making split tooltips\n * the preferred layout over\n * the previous `shared` tooltip.\n *\n * @sample highcharts/tooltip/split/\n * Split tooltip\n * @sample {highcharts|highstock} highcharts/tooltip/formatter-split/\n * Split tooltip and custom formatter callback\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock} true\n * @since 5.0.0\n * @product highcharts highstock\n * @apioption tooltip.split\n */\n /**\n * Prevents the tooltip from switching or closing, when touched or\n * pointed.\n *\n * @sample highcharts/tooltip/stickoncontact/\n * Tooltip sticks on pointer contact\n *\n * @type {boolean}\n * @since 8.0.1\n * @apioption tooltip.stickOnContact\n */\n /**\n * Use HTML to render the contents of the tooltip instead of SVG. Using\n * HTML allows advanced formatting like tables and images in the\n * tooltip. It is also recommended for rtl languages as it works around\n * rtl bugs in early Firefox.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highcharts|highstock} highcharts/tooltip/fullhtml/\n * Full HTML tooltip\n * @sample {highmaps} maps/tooltip/usehtml/\n * Pure HTML tooltip\n *\n * @type {boolean}\n * @default false\n * @since 2.2\n * @apioption tooltip.useHTML\n */\n /**\n * How many decimals to show in each series' y value. This is\n * overridable in each series' tooltip options object. The default is to\n * preserve all decimals.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {number|undefined}\n * @since 2.2\n * @apioption tooltip.valueDecimals\n */\n /**\n * A string to prepend to each series' y value. Overridable in each\n * series' tooltip options object.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.valuePrefix\n */\n /**\n * A string to append to each series' y value. Overridable in each\n * series' tooltip options object.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.valueSuffix\n */\n /**\n * The format for the date in the tooltip header if the X axis is a\n * datetime axis. The default is a best guess based on the smallest\n * distance between points in the chart.\n *\n * @sample {highcharts} highcharts/tooltip/xdateformat/\n * A different format\n *\n * @type {string|Highcharts.DateTimeFormatOptions}\n * @product highcharts highstock gantt\n * @apioption tooltip.xDateFormat\n */\n /**\n * How many decimals to show for the `point.change`\n * or the `point.cumulativeSum` value when the `series.compare`\n * or the `series.cumulative` option is set.\n * This is overridable in each series' tooltip options object.\n *\n * @type {number}\n * @default 2\n * @since 1.0.1\n * @product highstock\n * @apioption tooltip.changeDecimals\n */\n /**\n * Enable or disable the tooltip.\n *\n * @sample {highcharts} highcharts/tooltip/enabled/\n * Disabled\n * @sample {highcharts} highcharts/plotoptions/series-point-events-mouseover/\n * Disable tooltip and show values on chart instead\n */\n enabled: true,\n /**\n * Enable or disable animation of the tooltip.\n *\n * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}\n * @since 2.3.0\n */\n animation: {\n duration: 300,\n // EaseOutCirc\n easing: (x) => Math.sqrt(1 - Math.pow(x - 1, 2))\n },\n /**\n * The radius of the rounded border corners.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * Default border radius\n * @sample {highcharts} highcharts/tooltip/borderradius-0/\n * Square borders\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n */\n borderRadius: 3,\n /**\n * For series on datetime axes, the date format in the tooltip's\n * header will by default be guessed based on the closest data points.\n * This member gives the default string representations used for\n * each unit. For an overview of the string or object configuration, see\n * [dateFormat](/class-reference/Highcharts.Time#dateFormat).\n *\n * @see [xAxis.dateTimeLabelFormats](#xAxis.dateTimeLabelFormats)\n *\n * @type {Highcharts.Dictionary<string|Highcharts.DateTimeFormatOptions>}\n * @product highcharts highstock gantt\n */\n dateTimeLabelFormats: {\n /** @internal */\n millisecond: '%[AebHMSL]',\n /** @internal */\n second: '%[AebHMS]',\n /** @internal */\n minute: '%[AebHM]',\n /** @internal */\n hour: '%[AebHM]',\n /** @internal */\n day: '%[AebY]',\n /** @internal */\n week: 'Week from %[AebY]',\n /** @internal */\n month: '%[BY]',\n /** @internal */\n year: '%Y'\n },\n /**\n * A string to append to the tooltip format.\n *\n * @sample {highcharts} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @since 2.2\n */\n footerFormat: '',\n /**\n * The name of a symbol to use for the border around the tooltip\n * header. Applies only when [tooltip.split](#tooltip.split) is\n * enabled.\n *\n * Custom callbacks for symbol path generation can also be added to\n * `Highcharts.SVGRenderer.prototype.symbols` the same way as for\n * [series.marker.symbol](plotOptions.line.marker.symbol).\n *\n * @see [tooltip.shape](#tooltip.shape)\n *\n * @sample {highstock} stock/tooltip/split-positioner/\n * Different shapes for header and split boxes\n *\n * @type {Highcharts.TooltipShapeValue}\n * @validvalue [\"callout\", \"rect\"]\n * @since 7.0\n */\n headerShape: 'callout',\n /**\n * The number of milliseconds to wait until the tooltip is hidden when\n * mouse out from a point or chart.\n *\n * @since 3.0\n */\n hideDelay: 500,\n /**\n * Padding inside the tooltip, in pixels.\n *\n * @since 5.0.0\n */\n padding: 8,\n /**\n * The name of a symbol to use for the border around the tooltip. Can\n * be one of: `\"callout\"`, `\"circle\"` or `\"rect\"`. When\n * [tooltip.split](#tooltip.split)\n * option is enabled, shape is applied to all boxes except header, which\n * is controlled by\n * [tooltip.headerShape](#tooltip.headerShape).\n *\n * Custom callbacks for symbol path generation can also be added to\n * `Highcharts.SVGRenderer.prototype.symbols` the same way as for\n * [series.marker.symbol](plotOptions.line.marker.symbol).\n *\n * @type {Highcharts.TooltipShapeValue}\n * @since 4.0\n */\n shape: 'callout',\n /**\n * Shows information in the tooltip for all points with the same X\n * value. When the tooltip is shared, the entire plot area will capture\n * mouse movement or touch events. Tooltip texts for series types with\n * ordered data (not pie, scatter, flags etc) will be shown in a single\n * bubble. This is recommended for single series charts and for\n * tablet/mobile optimized charts.\n *\n * See also [tooltip.split](#tooltip.split), that is better suited for\n * charts with many series, especially line-type series. The\n * `tooltip.split` option takes precedence over `tooltip.shared`.\n *\n * @sample {highcharts} highcharts/tooltip/shared-false/\n * False by default\n * @sample {highcharts} highcharts/tooltip/shared-true/\n * True\n * @sample {highcharts} highcharts/tooltip/shared-x-crosshair/\n * True with x axis crosshair\n * @sample {highcharts} highcharts/tooltip/shared-true-mixed-types/\n * True with mixed series types\n *\n * @since 2.1\n * @product highcharts highstock\n */\n shared: false,\n /**\n * Proximity snap for graphs or single points. It defaults to 10 for\n * mouse-powered devices and 25 for touch devices.\n *\n * Note that in most cases the whole plot area captures the mouse\n * movement, and in these cases `tooltip.snap` doesn't make sense. This\n * applies when [stickyTracking](#plotOptions.series.stickyTracking)\n * is `true` (default) and when the tooltip is [shared](#tooltip.shared)\n * or [split](#tooltip.split).\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * 10 px by default\n * @sample {highcharts} highcharts/tooltip/snap-50/\n * 50 px on graph\n *\n * @type {number}\n * @default 10/25\n * @since 1.2.0\n * @product highcharts highstock\n */\n snap: isTouchDevice ? 25 : 10,\n /**\n * The HTML of the tooltip header line. The context is the\n * [Point class](https://api.highcharts.com/class-reference/Highcharts.Point).\n * Variables are enclosed in curly brackets. Examples of common\n * variables to include are `x`, `y`, `series.name` and `series.color`\n * and other properties on the same form. The `point.key` variable\n * contains the category name, x value or datetime string depending on\n * the type of axis. For datetime axes, the `point.key` date format can\n * be set using `tooltip.xDateFormat`.\n *\n * @sample {highcharts} highcharts/tooltip/footerformat/\n * An HTML table in the tooltip\n * @sample {highstock} highcharts/tooltip/footerformat/\n * An HTML table in the tooltip\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @type {string}\n * @apioption tooltip.headerFormat\n */\n headerFormat: '<span style=\"font-size: 0.8em\">{ucfirst point.key}</span><br/>',\n /**\n * The HTML of the null point's line in the tooltip. Works analogously\n * to [pointFormat](#tooltip.pointFormat).\n *\n * @sample {highcharts} highcharts/plotoptions/series-nullformat\n * Format data label and tooltip for null point.\n *\n * @type {string}\n * @apioption tooltip.nullFormat\n */\n /**\n * The HTML of the point's line in the tooltip. The context is the\n * [Point class](https://api.highcharts.com/class-reference/Highcharts.Point).\n * Variables are enclosed in curly brackets. Examples of common\n * variables to include are `x`, `y`, `series.name` and `series.color`\n * and other properties on the same form. Furthermore, `y` can be\n * extended by the `tooltip.valuePrefix` and `tooltip.valueSuffix`\n * variables. This can also be overridden for each series, which makes\n * it a good hook for displaying units.\n *\n * In styled mode, the dot is colored by a class name rather than the\n * point color.\n *\n * @sample {highcharts} highcharts/tooltip/pointformat/\n * A different point format with value suffix\n * @sample {highcharts|highstock} highcharts/tooltip/pointformat-extra-information/\n * Show extra information about points in the tooltip\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.pointFormat\n */\n pointFormat: '<span style=\"color:{point.color}\">\\u25CF</span> {series.name}: <b>{point.y}</b><br/>',\n /**\n * The background color or gradient for the tooltip.\n *\n * In styled mode, the stroke width is set in the\n * `.highcharts-tooltip-box` class.\n *\n * @sample {highcharts} highcharts/tooltip/backgroundcolor-solid/\n * Yellowish background\n * @sample {highcharts} highcharts/tooltip/backgroundcolor-gradient/\n * Gradient\n * @sample {highcharts} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highstock} stock/tooltip/general/\n * Custom tooltip\n * @sample {highstock} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n * @sample {highmaps} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n backgroundColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * The pixel width of the tooltip border. Defaults to 0 for single\n * tooltips and 1 for split tooltips.\n *\n * In styled mode, the stroke width is set in the\n * `.highcharts-tooltip-box` class.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * 2 pixels\n * @sample {highcharts} highcharts/tooltip/borderwidth/\n * No border (shadow only)\n * @sample {highcharts} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highstock} stock/tooltip/general/\n * Custom tooltip\n * @sample {highstock} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n * @sample {highmaps} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n *\n * @type {number}\n */\n borderWidth: void 0,\n /**\n * Whether to apply a drop shadow to the tooltip.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * True by default\n * @sample {highcharts} highcharts/tooltip/shadow/\n * False\n * @sample {highmaps} maps/tooltip/positioner/\n * Fixed tooltip position, border and shadow disabled\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n */\n shadow: true,\n /**\n * Prevents the tooltip from switching or closing when touched or\n * pointed.\n *\n * @sample highcharts/tooltip/stickoncontact/\n * Tooltip sticks on pointer contact\n *\n * @since 8.0.1\n */\n stickOnContact: false,\n /**\n * CSS styles for the tooltip. The tooltip can also be styled through\n * the CSS class `.highcharts-tooltip`.\n *\n * Note that the default `pointerEvents` style makes the tooltip ignore\n * mouse events, so in order to use clickable tooltips, this value must\n * be set to `auto`.\n *\n * @sample {highcharts} highcharts/tooltip/style/\n * Greater padding, bold text\n *\n * @type {Highcharts.CSSObject}\n */\n style: {\n /** @internal */\n color: \"#333333\" /* Palette.neutralColor80 */,\n /** @internal */\n cursor: 'default',\n /**\n * @type {number|string}\n */\n fontSize: '0.8em'\n },\n /**\n * Use HTML to render the contents of the tooltip instead of SVG. Using\n * HTML allows advanced formatting like tables and images in the\n * tooltip. It is also recommended for rtl languages as it works around\n * rtl bugs in early Firefox.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highcharts|highstock} highcharts/tooltip/fullhtml/\n * Full HTML tooltip\n * @sample {highmaps} maps/tooltip/usehtml/\n * Pure HTML tooltip\n *\n * @since 2.2\n */\n useHTML: false\n },\n /**\n * Highchart by default puts a credits label in the lower right corner\n * of the chart. This can be changed using these options.\n */\n credits: {\n /**\n * Credits for map source to be concatenated with conventional credit\n * text. By default this is a format string that collects copyright\n * information from the map if available.\n *\n * @see [mapTextFull](#credits.mapTextFull)\n * @see [text](#credits.text)\n *\n * @type {string}\n * @default \\u00a9 <a href=\"{geojson.copyrightUrl}\">{geojson.copyrightShort}</a>\n * @since 4.2.2\n * @product highmaps\n * @apioption credits.mapText\n */\n /**\n * Detailed credits for map source to be displayed on hover of credits\n * text. By default this is a format string that collects copyright\n * information from the map if available.\n *\n * @see [mapText](#credits.mapText)\n * @see [text](#credits.text)\n *\n * @type {string}\n * @default {geojson.copyright}\n * @since 4.2.2\n * @product highmaps\n * @apioption credits.mapTextFull\n */\n /**\n * Whether to show the credits text.\n *\n * @sample {highcharts} highcharts/credits/enabled-false/\n * Credits disabled\n * @sample {highstock} stock/credits/enabled/\n * Credits disabled\n * @sample {highmaps} maps/credits/enabled-false/\n * Credits disabled\n */\n enabled: true,\n /**\n * The URL for the credits label.\n *\n * @sample {highcharts} highcharts/credits/href/\n * Custom URL and text\n * @sample {highmaps} maps/credits/customized/\n * Custom URL and text\n */\n href: 'https://www.highcharts.com?credits',\n /**\n * Position configuration for the credits label.\n *\n * @sample {highcharts} highcharts/credits/position-left/\n * Left aligned\n * @sample {highcharts} highcharts/credits/position-left/\n * Left aligned\n * @sample {highmaps} maps/credits/customized/\n * Left aligned\n * @sample {highmaps} maps/credits/customized/\n * Left aligned\n *\n * @type {Highcharts.AlignObject}\n * @since 2.1\n */\n position: {\n /** @internal */\n align: 'right',\n /** @internal */\n x: -10,\n /** @internal */\n verticalAlign: 'bottom',\n /** @internal */\n y: -5\n },\n /**\n * CSS styles for the credits label.\n *\n * @see In styled mode, credits styles can be set with the\n * `.highcharts-credits` class.\n *\n * @type {Highcharts.CSSObject}\n */\n style: {\n /** @internal */\n cursor: 'pointer',\n /** @internal */\n color: \"#999999\" /* Palette.neutralColor40 */,\n /**\n * @type {number|string}\n */\n fontSize: '0.6em'\n },\n /**\n * The text for the credits label.\n *\n * @productdesc {highmaps}\n * If a map is loaded as GeoJSON, the text defaults to\n * `Highcharts @ {map-credits}`. Otherwise, it defaults to\n * `Highcharts.com`.\n *\n * @sample {highcharts} highcharts/credits/href/\n * Custom URL and text\n * @sample {highmaps} maps/credits/customized/\n * Custom URL and text\n */\n text: 'Highcharts.com'\n }\n };\n /* eslint-disable spaced-comment */\n\n defaultOptions.chart.styledMode = false;\n\n '';\n const defaultTime = new Time(defaultOptions.time);\n /**\n * Get the updated default options. Until 3.0.7, merely exposing defaultOptions\n * for outside modules wasn't enough because the setOptions method created a new\n * object.\n *\n * @function Highcharts.getOptions\n *\n * @return {Highcharts.Options}\n * Default options.\n */\n function getOptions() {\n return defaultOptions;\n }\n /**\n * Merge the default options with custom options and return the new options\n * structure. Commonly used for defining reusable templates.\n *\n * @sample highcharts/members/setoptions Applying a global theme\n *\n * @function Highcharts.setOptions\n *\n * @param {Highcharts.Options} options\n * The new custom chart options.\n *\n * @return {Highcharts.Options}\n * Updated options.\n */\n function setOptions(options) {\n fireEvent(H, 'setOptions', { options });\n // Copy in the default options\n merge(true, defaultOptions, options);\n // Update the time object\n if (options.time) {\n defaultTime.update(defaultOptions.time);\n }\n if (options.lang && 'locale' in options.lang) {\n defaultTime.update({\n locale: options.lang.locale\n });\n }\n return defaultOptions;\n }\n /* *\n *\n * Default Export\n *\n * */\n const DefaultOptions = {\n defaultOptions,\n defaultTime,\n getOptions,\n setOptions\n };\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * @typedef {\"plotBox\"|\"spacingBox\"} Highcharts.ButtonRelativeToValue\n */\n /**\n * Gets fired when a series is added to the chart after load time, using the\n * `addSeries` method. Returning `false` prevents the series from being added.\n *\n * @callback Highcharts.ChartAddSeriesCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {Highcharts.ChartAddSeriesEventObject} event\n * The event that occurred.\n */\n /**\n * Contains common event information. Through the `options` property you can\n * access the series options that were passed to the `addSeries` method.\n *\n * @interface Highcharts.ChartAddSeriesEventObject\n */ /**\n * The series options that were passed to the `addSeries` method.\n * @name Highcharts.ChartAddSeriesEventObject#options\n * @type {Highcharts.SeriesOptionsType}\n */ /**\n * Prevents the default behaviour of the event.\n * @name Highcharts.ChartAddSeriesEventObject#preventDefault\n * @type {Function}\n */ /**\n * The event target.\n * @name Highcharts.ChartAddSeriesEventObject#target\n * @type {Highcharts.Chart}\n */ /**\n * The event type.\n * @name Highcharts.ChartAddSeriesEventObject#type\n * @type {\"addSeries\"}\n */\n /**\n * Gets fired when clicking on the plot background.\n *\n * @callback Highcharts.ChartClickCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {Highcharts.PointerEventObject} event\n * The event that occurred.\n */\n /**\n * Contains an axes of the clicked spot.\n *\n * @interface Highcharts.ChartClickEventAxisObject\n */ /**\n * Axis at the clicked spot.\n * @name Highcharts.ChartClickEventAxisObject#axis\n * @type {Highcharts.Axis}\n */ /**\n * Axis value at the clicked spot.\n * @name Highcharts.ChartClickEventAxisObject#value\n * @type {number}\n */\n /**\n * Contains information about the clicked spot on the chart. Remember the unit\n * of a datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * @interface Highcharts.ChartClickEventObject\n * @extends Highcharts.PointerEventObject\n */ /**\n * Information about the x-axis on the clicked spot.\n * @name Highcharts.ChartClickEventObject#xAxis\n * @type {Array<Highcharts.ChartClickEventAxisObject>}\n */ /**\n * Information about the y-axis on the clicked spot.\n * @name Highcharts.ChartClickEventObject#yAxis\n * @type {Array<Highcharts.ChartClickEventAxisObject>}\n */ /**\n * Information about the z-axis on the clicked spot.\n * @name Highcharts.ChartClickEventObject#zAxis\n * @type {Array<Highcharts.ChartClickEventAxisObject>|undefined}\n */\n /**\n * Gets fired when the chart is finished loading.\n *\n * @callback Highcharts.ChartLoadCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {global.Event} event\n * The event that occurred.\n */\n /**\n * Fires when the chart is redrawn, either after a call to `chart.redraw()` or\n * after an axis, series or point is modified with the `redraw` option set to\n * `true`.\n *\n * @callback Highcharts.ChartRedrawCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {global.Event} event\n * The event that occurred.\n */\n /**\n * Gets fired after initial load of the chart (directly after the `load` event),\n * and after each redraw (directly after the `redraw` event).\n *\n * @callback Highcharts.ChartRenderCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {global.Event} event\n * The event that occurred.\n */\n /**\n * Gets fired when an area of the chart has been selected. The default action\n * for the selection event is to zoom the chart to the selected area. It can be\n * prevented by calling `event.preventDefault()` or return false.\n *\n * @callback Highcharts.ChartSelectionCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {Highcharts.SelectEventObject} event\n * Event informations\n *\n * @return {boolean|undefined}\n * Return false to prevent the default action, usually zoom.\n */\n (''); // Detach doclets above\n\n return DefaultOptions;\n });\n _registerModule(_modules, 'Core/Templating.js', [_modules['Core/Defaults.js'], _modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (D, G, U) {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n const { defaultOptions, defaultTime } = D;\n const { doc } = G;\n const { extend, getNestedProperty, isArray, isNumber, isObject, pick, ucfirst } = U;\n const helpers = {\n // Built-in helpers\n add: (a, b) => a + b,\n divide: (a, b) => (b !== 0 ? a / b : ''),\n // eslint-disable-next-line eqeqeq\n eq: (a, b) => a == b,\n each: function (arr) {\n const match = arguments[arguments.length - 1];\n return isArray(arr) ?\n arr.map((item, i) => format(match.body, extend(isObject(item) ? item : { '@this': item }, {\n '@index': i,\n '@first': i === 0,\n '@last': i === arr.length - 1\n }))).join('') :\n false;\n },\n ge: (a, b) => a >= b,\n gt: (a, b) => a > b,\n 'if': (condition) => !!condition,\n le: (a, b) => a <= b,\n lt: (a, b) => a < b,\n multiply: (a, b) => a * b,\n // eslint-disable-next-line eqeqeq\n ne: (a, b) => a != b,\n subtract: (a, b) => a - b,\n ucfirst,\n unless: (condition) => !condition\n };\n const numberFormatCache = {};\n /* *\n *\n * Functions\n *\n * */\n /**\n * Formats a JavaScript date timestamp (milliseconds since Jan 1st 1970) into a\n * human readable date string. The format is a subset of the formats for PHP's\n * [strftime](https://www.php.net/manual/en/function.strftime.php) function.\n * Additional formats can be given in the {@link Highcharts.dateFormats} hook.\n *\n * Since v6.0.5, all internal dates are formatted through the\n * {@link Highcharts.Chart#time} instance to respect chart-level time settings.\n * The `Highcharts.dateFormat` function only reflects global time settings set\n * with `setOptions`.\n *\n * Supported format keys:\n * - `%a`: Short weekday, like 'Mon'\n * - `%A`: Long weekday, like 'Monday'\n * - `%d`: Two digit day of the month, 01 to 31\n * - `%e`: Day of the month, 1 through 31\n * - `%w`: Day of the week, 0 through 6\n * - `%b`: Short month, like 'Jan'\n * - `%B`: Long month, like 'January'\n * - `%m`: Two digit month number, 01 through 12\n * - `%y`: Two digits year, like 09 for 2009\n * - `%Y`: Four digits year, like 2009\n * - `%H`: Two digits hours in 24h format, 00 through 23\n * - `%k`: Hours in 24h format, 0 through 23\n * - `%I`: Two digits hours in 12h format, 00 through 11\n * - `%l`: Hours in 12h format, 1 through 12\n * - `%M`: Two digits minutes, 00 through 59\n * - `%p`: Upper case AM or PM\n * - `%P`: Lower case AM or PM\n * - `%S`: Two digits seconds, 00 through 59\n * - `%L`: Milliseconds (naming from Ruby)\n *\n * @function Highcharts.dateFormat\n *\n * @param {string} format\n * The desired format where various time representations are prefixed\n * with `%`.\n *\n * @param {number} timestamp\n * The JavaScript timestamp.\n *\n * @param {boolean} [upperCaseFirst=false]\n * Upper case first letter in the return.\n *\n * @return {string}\n * The formatted date.\n */\n function dateFormat(format, timestamp, upperCaseFirst) {\n return defaultTime.dateFormat(format, timestamp, upperCaseFirst);\n }\n /**\n * Format a string according to a subset of the rules of Python's String.format\n * method.\n *\n * @example\n * let s = Highcharts.format(\n * 'The {color} fox was {len:.2f} feet long',\n * { color: 'red', len: Math.PI }\n * );\n * // => The red fox was 3.14 feet long\n *\n * @function Highcharts.format\n *\n * @param {string} str\n * The string to format.\n *\n * @param {Record<string, *>} ctx\n * The context, a collection of key-value pairs where each key is\n * replaced by its value.\n *\n * @param {Highcharts.Chart} [chart]\n * A `Chart` instance used to get numberFormatter and time.\n *\n * @return {string}\n * The formatted string.\n */\n function format(str = '', ctx, chart) {\n const regex = /\\{([\\p{L}\\d:\\.,;\\-\\/<>\\[\\]%_@\"'’= #\\(\\)]+)\\}/gu, \n // The sub expression regex is the same as the top expression regex,\n // but except parens and block helpers (#), and surrounded by parens\n // instead of curly brackets.\n subRegex = /\\(([\\p{L}\\d:\\.,;\\-\\/<>\\[\\]%_@\"'= ]+)\\)/gu, matches = [], floatRegex = /f$/, decRegex = /\\.(\\d)/, lang = chart?.options.lang || defaultOptions.lang, time = chart && chart.time || defaultTime, numberFormatter = chart && chart.numberFormatter || numberFormat;\n /*\n * Get a literal or variable value inside a template expression. May be\n * extended with other types like string or null if needed, but keep it\n * small for now.\n */\n const resolveProperty = (key = '') => {\n let n;\n // Literals\n if (key === 'true') {\n return true;\n }\n if (key === 'false') {\n return false;\n }\n if ((n = Number(key)).toString() === key) {\n return n;\n }\n if (/^[\"'].+[\"']$/.test(key)) {\n return key.slice(1, -1);\n }\n // Variables and constants\n return getNestedProperty(key, ctx);\n };\n let match, currentMatch, depth = 0, hasSub;\n // Parse and create tree\n while ((match = regex.exec(str)) !== null) {\n // When a sub expression is found, it is evaluated first, and the\n // results recursively evaluated until no subexpression exists.\n const mainMatch = match, subMatch = subRegex.exec(match[1]);\n if (subMatch) {\n match = subMatch;\n hasSub = true;\n }\n if (!currentMatch || !currentMatch.isBlock) {\n currentMatch = {\n ctx,\n expression: match[1],\n find: match[0],\n isBlock: match[1].charAt(0) === '#',\n start: match.index,\n startInner: match.index + match[0].length,\n length: match[0].length\n };\n }\n // Identify helpers\n const fn = (currentMatch.isBlock ? mainMatch : match)[1].split(' ')[0].replace('#', '');\n if (helpers[fn]) {\n // Block helper, only 0 level is handled\n if (currentMatch.isBlock && fn === currentMatch.fn) {\n depth++;\n }\n if (!currentMatch.fn) {\n currentMatch.fn = fn;\n }\n }\n // Closing a block helper\n const startingElseSection = match[1] === 'else';\n if (currentMatch.isBlock &&\n currentMatch.fn && (match[1] === `/${currentMatch.fn}` ||\n startingElseSection)) {\n if (!depth) { // === 0\n const start = currentMatch.startInner, body = str.substr(start, match.index - start);\n // Either closing without an else section, or when encountering\n // an else section\n if (currentMatch.body === void 0) {\n currentMatch.body = body;\n currentMatch.startInner = match.index + match[0].length;\n // The body exists already, so this is the else section\n }\n else {\n currentMatch.elseBody = body;\n }\n currentMatch.find += body + match[0];\n if (!startingElseSection) {\n matches.push(currentMatch);\n currentMatch = void 0;\n }\n }\n else if (!startingElseSection) {\n depth--;\n }\n // Common expression\n }\n else if (!currentMatch.isBlock) {\n matches.push(currentMatch);\n }\n // Evaluate sub-matches one by one to prevent orphaned block closers\n if (subMatch && !currentMatch?.isBlock) {\n break;\n }\n }\n // Execute\n matches.forEach((match) => {\n const { body, elseBody, expression, fn } = match;\n let replacement, i;\n // Helper function\n if (fn) {\n // Pass the helpers the amount of arguments defined by the function,\n // then the match as the last argument.\n const args = [match], parts = [], len = expression.length;\n let start = 0, startChar;\n for (i = 0; i <= len; i++) {\n const char = expression.charAt(i);\n // Start of string\n if (!startChar && (char === '\"' || char === '\\'')) {\n startChar = char;\n // End of string\n }\n else if (startChar === char) {\n startChar = '';\n }\n if (!startChar &&\n (char === ' ' || i === len)) {\n parts.push(expression.substr(start, i - start));\n start = i + 1;\n }\n }\n i = helpers[fn].length;\n while (i--) {\n args.unshift(resolveProperty(parts[i + 1]));\n }\n replacement = helpers[fn].apply(ctx, args);\n // Block helpers may return true or false. They may also return a\n // string, like the `each` helper.\n if (match.isBlock && typeof replacement === 'boolean') {\n replacement = format(replacement ? body : elseBody, ctx, chart);\n }\n // Simple variable replacement\n }\n else {\n const valueAndFormat = expression.split(':');\n replacement = resolveProperty(valueAndFormat.shift() || '');\n // Format the replacement\n if (valueAndFormat.length && typeof replacement === 'number') {\n const segment = valueAndFormat.join(':');\n if (floatRegex.test(segment)) { // Float\n const decimals = parseInt((segment.match(decRegex) || ['', '-1'])[1], 10);\n if (replacement !== null) {\n replacement = numberFormatter(replacement, decimals, lang.decimalPoint, segment.indexOf(',') > -1 ? lang.thousandsSep : '');\n }\n }\n else {\n replacement = time.dateFormat(segment, replacement);\n // Use string literal in order to be preserved in the outer\n // expression\n if (hasSub) {\n replacement = `\"${replacement}\"`;\n }\n }\n }\n }\n str = str.replace(match.find, pick(replacement, ''));\n });\n return hasSub ? format(str, ctx, chart) : str;\n }\n /**\n * Format a number and return a string based on input settings.\n *\n * @sample highcharts/members/highcharts-numberformat/\n * Custom number format\n *\n * @function Highcharts.numberFormat\n *\n * @param {number} number\n * The input number to format.\n *\n * @param {number} decimals\n * The amount of decimals. A value of -1 preserves the amount in the\n * input number.\n *\n * @param {string} [decimalPoint]\n * The decimal point, defaults to the one given in the lang options, or\n * a dot.\n *\n * @param {string} [thousandsSep]\n * The thousands separator, defaults to the one given in the lang\n * options, or a space character.\n *\n * @return {string}\n * The formatted number.\n */\n function numberFormat(number, decimals, decimalPoint, thousandsSep) {\n number = +number || 0;\n decimals = +decimals;\n let ret, fractionDigits, [mantissa, exp] = number.toString().split('e').map(Number);\n const lang = this?.options?.lang || defaultOptions.lang, origDec = (number.toString().split('.')[1] || '').split('e')[0].length, firstDecimals = decimals, options = {};\n decimalPoint ?? (decimalPoint = lang.decimalPoint);\n thousandsSep ?? (thousandsSep = lang.thousandsSep);\n if (decimals === -1) {\n // Preserve decimals. Not huge numbers (#3793).\n decimals = Math.min(origDec, 20);\n }\n else if (!isNumber(decimals)) {\n decimals = 2;\n }\n else if (decimals && exp < 0) {\n // Expose decimals from exponential notation (#7042)\n fractionDigits = decimals + exp;\n if (fractionDigits >= 0) {\n // Remove too small part of the number while keeping the notation\n mantissa = +mantissa.toExponential(fractionDigits).split('e')[0];\n decimals = fractionDigits;\n }\n else {\n // `fractionDigits < 0`\n mantissa = Math.floor(mantissa);\n if (decimals < 20) {\n // Use number instead of exponential notation (#7405)\n number = +(mantissa * Math.pow(10, exp)).toFixed(decimals);\n }\n else {\n // Or zero\n number = 0;\n }\n exp = 0;\n }\n }\n if (exp) {\n decimals ?? (decimals = 2);\n number = mantissa;\n }\n if (isNumber(decimals) && decimals >= 0) {\n options.minimumFractionDigits = decimals;\n options.maximumFractionDigits = decimals;\n }\n if (thousandsSep === '') {\n options.useGrouping = false;\n }\n const hasSeparators = thousandsSep || decimalPoint, locale = hasSeparators ?\n 'en' :\n (this?.locale ||\n lang.locale ||\n doc.body.closest('[lang]')?.lang), cacheKey = JSON.stringify(options) + locale, nf = numberFormatCache[cacheKey] ?? (numberFormatCache[cacheKey] = new Intl.NumberFormat(locale, options));\n ret = nf.format(number);\n // If thousandsSep or decimalPoint are set, fall back to using English\n // format with string replacement for the separators.\n if (hasSeparators) {\n ret = ret\n .replace(/\\,/g, thousandsSep ?? ',')\n .replace('.', decimalPoint ?? '.');\n }\n if (\n // Remove signed zero (#20564)\n (!decimals && +ret === 0) ||\n // Small numbers, no decimals (#14023)\n (exp < 0 && !firstDecimals)) {\n ret = '0';\n }\n if (exp && +ret !== 0) {\n ret += 'e' + (exp < 0 ? '' : '+') + exp;\n }\n return ret;\n }\n /* *\n *\n * Default Export\n *\n * */\n const Templating = {\n dateFormat,\n format,\n helpers,\n numberFormat\n };\n\n return Templating;\n });\n _registerModule(_modules, 'DataGrid/Table/Column.js', [_modules['DataGrid/Globals.js'], _modules['Core/Utilities.js'], _modules['DataGrid/Utils.js'], _modules['Core/Templating.js']], function (Globals, Utils, DGUtils, Templating) {\n /* *\n *\n * DataGrid class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { merge } = Utils;\n const { makeHTMLElement } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a column in the data grid.\n */\n class Column {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a column in the data grid.\n *\n * @param viewport\n * The viewport (table) the column belongs to.\n *\n * @param id\n * The id of the column (`name` in the Data Table).\n *\n * @param index\n * The index of the column.\n */\n constructor(viewport, id, index) {\n /**\n * The cells of the column.\n */\n this.cells = [];\n this.options = merge(viewport.dataGrid.options?.columnDefaults ?? {}, viewport.dataGrid.columnOptionsMap?.[id] ?? {});\n this.id = id;\n this.index = index;\n this.viewport = viewport;\n this.width = this.getInitialWidth();\n this.loadData();\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Loads the data of the column from the viewport's data table.\n */\n loadData() {\n this.data = this.viewport.dataTable.getColumn(this.id, true);\n }\n /**\n * Registers a cell in the column.\n *\n * @param cell\n * The cell to register.\n */\n registerCell(cell) {\n cell.htmlElement.setAttribute('data-column-id', this.id);\n if (this.options.className) {\n cell.htmlElement.classList.add(...this.options.className.split(/\\s+/g));\n }\n if (this.viewport.dataGrid.hoveredColumnId === this.id) {\n cell.htmlElement.classList.add(Globals.classNames.hoveredColumn);\n }\n this.cells.push(cell);\n }\n /**\n * Unregister a cell from the column.\n *\n * @param cell\n * The cell to unregister.\n */\n unregisterCell(cell) {\n const index = this.cells.indexOf(cell);\n if (index > -1) {\n this.cells.splice(index, 1);\n }\n }\n /**\n * Returns the width of the column in pixels.\n */\n getWidth() {\n const vp = this.viewport;\n return vp.columnDistribution === 'full' ?\n vp.getWidthFromRatio(this.width) :\n this.width;\n }\n /**\n * Adds or removes the hovered CSS class to the column element\n * and its cells.\n *\n * @param hovered\n * Whether the column should be hovered.\n */\n setHoveredState(hovered) {\n this.header?.htmlElement?.classList[hovered ? 'add' : 'remove'](Globals.classNames.hoveredColumn);\n for (let i = 0, iEnd = this.cells.length; i < iEnd; ++i) {\n this.cells[i].htmlElement.classList[hovered ? 'add' : 'remove'](Globals.classNames.hoveredColumn);\n }\n }\n /**\n * Creates a mock element to measure the width of the column from the CSS.\n * The element is appended to the viewport container and then removed.\n * It should be called only once for each column.\n *\n * @returns The initial width of the column.\n */\n getInitialWidth() {\n let result;\n const { viewport } = this;\n // Set the initial width of the column.\n const mock = makeHTMLElement('div', {\n className: Globals.classNames.columnElement\n }, viewport.dataGrid.container);\n mock.setAttribute('data-column-id', this.id);\n if (this.options.className) {\n mock.classList.add(...this.options.className.split(/\\s+/g));\n }\n if (viewport.columnDistribution === 'full') {\n result = this.getInitialFullDistWidth(mock);\n }\n else {\n result = mock.offsetWidth || 100;\n }\n mock.remove();\n return result;\n }\n /**\n * The initial width of the column in the full distribution mode. The last\n * column in the viewport will have to fill the remaining space.\n *\n * @param mock\n * The mock element to measure the width.\n */\n getInitialFullDistWidth(mock) {\n const vp = this.viewport;\n const columnsCount = vp.dataGrid.enabledColumns?.length ?? 0;\n if (this.index < columnsCount - 1) {\n return vp.getRatioFromWidth(mock.offsetWidth) || 1 / columnsCount;\n }\n let allPreviousWidths = 0;\n for (let i = 0, iEnd = columnsCount - 1; i < iEnd; i++) {\n allPreviousWidths += vp.columns[i].width;\n }\n const result = 1 - allPreviousWidths;\n if (result < 0) {\n // eslint-disable-next-line no-console\n console.warn('The sum of the columns\\' widths exceeds the ' +\n 'viewport width. It may cause unexpected behavior in the ' +\n 'full distribution mode. Check the CSS styles of the ' +\n 'columns. Corrections may be needed.');\n }\n return result;\n }\n /**\n * Returns the formatted string where the templating context is the column.\n *\n * @param template\n * The template string.\n *\n * @return\n * The formatted string.\n */\n format(template) {\n return Templating.format(template, this);\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * The minimum width of a column.\n * @internal\n */\n Column.MIN_COLUMN_WIDTH = 20;\n /* *\n *\n * Default Export\n *\n * */\n\n return Column;\n });\n _registerModule(_modules, 'DataGrid/Table/Row.js', [_modules['DataGrid/Utils.js']], function (DGUtils) {\n /* *\n *\n * DataGrid class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DGUtils;\n /* *\n *\n * Abstract Class of Row\n *\n * */\n /**\n * Represents a row in the data grid.\n */\n class Row {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a row in the data grid.\n *\n * @param viewport\n * The DataGrid Table instance which the row belongs to.\n */\n constructor(viewport) {\n /* *\n *\n * Properties\n *\n * */\n /**\n * The cells of the row.\n */\n this.cells = [];\n this.viewport = viewport;\n this.htmlElement = makeHTMLElement('tr', {});\n }\n /**\n * Renders the row's content. It does not attach the row element to the\n * viewport nor pushes the rows to the viewport.rows array.\n */\n render() {\n const columns = this.viewport.columns;\n for (let i = 0, iEnd = columns.length; i < iEnd; i++) {\n const cell = this.createCell(columns[i]);\n cell.render();\n }\n this.reflow();\n }\n /**\n * Reflows the row's content dimensions.\n */\n reflow() {\n for (let j = 0, jEnd = this.cells.length; j < jEnd; ++j) {\n this.cells[j].reflow();\n }\n const vp = this.viewport;\n if (vp.rowsWidth) {\n this.htmlElement.style.width = vp.rowsWidth + 'px';\n }\n }\n /**\n * Destroys the row.\n */\n destroy() {\n this.destroyed = true;\n if (!this.htmlElement) {\n return;\n }\n for (let i = 0, iEnd = this.cells.length; i < iEnd; ++i) {\n this.cells[i].destroy();\n }\n this.htmlElement.remove();\n }\n /**\n * Returns the cell with the given column ID.\n *\n * @param columnId\n * The column ID that the cell belongs to.\n *\n * @returns\n * The cell with the given column ID or undefined if not found.\n */\n getCell(columnId) {\n return this.cells.find((cell) => cell.column.id === columnId);\n }\n /**\n * Registers a cell in the row.\n *\n * @param cell\n * The cell to register.\n */\n registerCell(cell) {\n this.cells.push(cell);\n }\n /**\n * Unregister a cell from the row.\n *\n * @param cell\n * The cell to unregister.\n */\n unregisterCell(cell) {\n if (this.destroyed) {\n return;\n }\n const index = this.cells.indexOf(cell);\n if (index > -1) {\n this.cells.splice(index, 1);\n }\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return Row;\n });\n _registerModule(_modules, 'DataGrid/Table/Cell.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Core/Templating.js']], function (AST, Templating) {\n /* *\n *\n * DataGrid class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n /* *\n *\n * Abstract Class of Cell\n *\n * */\n class Cell {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a cell in the data grid.\n *\n * @param column\n * The column of the cell.\n *\n * @param row\n * The row of the cell.\n */\n constructor(column, row) {\n /**\n * Array of cell events to be removed when the cell is destroyed.\n */\n this.cellEvents = [];\n this.column = column;\n this.row = row;\n this.row.registerCell(this);\n this.htmlElement = this.init();\n this.htmlElement.setAttribute('tabindex', '-1');\n this.initEvents();\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Init element.\n * @internal\n */\n init() {\n return document.createElement('td', {});\n }\n /**\n * Initialize event listeners. Events added to the `cellEvents` array will\n * be registered now and unregistered when the cell is destroyed.\n */\n initEvents() {\n this.cellEvents.push(['blur', () => this.onBlur()]);\n this.cellEvents.push(['focus', () => this.onFocus()]);\n this.cellEvents.push(['click', (e) => {\n this.onClick(e);\n }]);\n this.cellEvents.push(['keydown', (e) => {\n this.onKeyDown(e);\n }]);\n this.cellEvents.forEach((pair) => {\n this.htmlElement.addEventListener(pair[0], pair[1]);\n });\n }\n /**\n * Handles the focus event on the cell.\n */\n onFocus() {\n const vp = this.row.viewport;\n const focusAnchor = vp.rowsVirtualizer.focusAnchorCell?.htmlElement;\n focusAnchor?.setAttribute('tabindex', '-1');\n }\n /**\n * Handles the blur event on the cell.\n */\n onBlur() {\n const vp = this.row.viewport;\n const focusAnchor = vp.rowsVirtualizer.focusAnchorCell?.htmlElement;\n focusAnchor?.setAttribute('tabindex', '0');\n delete vp.focusCursor;\n }\n /**\n * Handles user keydown on the cell.\n *\n * @param e\n * Keyboard event object.\n */\n onKeyDown(e) {\n const { row, column } = this;\n const vp = row.viewport;\n const changeFocusKeys = {\n ArrowDown: [1, 0],\n ArrowUp: [-1, 0],\n ArrowLeft: [0, -1],\n ArrowRight: [0, 1]\n };\n const dir = changeFocusKeys[e.key];\n if (dir) {\n e.preventDefault();\n e.stopPropagation();\n const localRowIndex = row.index === void 0 ? -1 : (row.index - vp.rows[0].index);\n const nextVerticalDir = localRowIndex + dir[0];\n if (nextVerticalDir < 0 && vp.header) {\n vp.columns[column.index + dir[1]]?.header?.htmlElement.focus();\n return;\n }\n const nextRow = vp.rows[nextVerticalDir];\n if (nextRow) {\n nextRow.cells[column.index + dir[1]]?.htmlElement.focus();\n }\n }\n }\n /**\n * Renders the cell by appending the HTML element to the row.\n */\n render() {\n this.row.htmlElement.appendChild(this.htmlElement);\n }\n /**\n * Reflows the cell dimensions.\n */\n reflow() {\n const column = this.column;\n const elementStyle = this.htmlElement.style;\n elementStyle.width = elementStyle.maxWidth = column.getWidth() + 'px';\n }\n /**\n * Returns the formatted string where the templating context is the cell.\n *\n * @param template\n * The template string.\n *\n * @return\n * The formatted string.\n */\n format(template) {\n return Templating.format(template, this);\n }\n /**\n * Sets the custom class name of the cell based on the template.\n *\n * @param template\n * The template string.\n */\n setCustomClassName(template) {\n const element = this.htmlElement;\n if (this.customClassName) {\n element.classList.remove(...this.customClassName.split(/\\s+/g));\n }\n if (!template) {\n delete this.customClassName;\n return;\n }\n const newClassName = this.format(template);\n if (!newClassName) {\n delete this.customClassName;\n return;\n }\n element.classList.add(...newClassName.split(/\\s+/g));\n this.customClassName = newClassName;\n }\n /**\n * Renders content of cell.\n *\n * @param cellContent\n * Content to render.\n *\n * @param parentElement\n * Parent element where the content should be.\n *\n * @internal\n */\n renderHTMLCellContent(cellContent, parentElement) {\n const formattedNodes = new AST(cellContent);\n formattedNodes.addToDOM(parentElement);\n }\n /**\n * Destroys the cell.\n */\n destroy() {\n this.cellEvents.forEach((pair) => {\n this.htmlElement.removeEventListener(pair[0], pair[1]);\n });\n this.column.unregisterCell(this);\n this.row.unregisterCell(this);\n this.htmlElement.remove();\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return Cell;\n });\n _registerModule(_modules, 'DataGrid/Table/Actions/ColumnSorting.js', [_modules['DataGrid/Globals.js'], _modules['DataGrid/Utils.js']], function (Globals, DGUtils) {\n /* *\n *\n * DataGrid class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that manages sorting for a dedicated column.\n */\n class ColumnSorting {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs sorting for a dedicated column.\n *\n * @param column\n * The column that be sorted.\n *\n * @param headerCellElement\n * The head element of the column.\n */\n constructor(column, headerCellElement) {\n /**\n * Toggle sorting order for the column in the order: asc -> desc -> none\n */\n this.toggle = () => {\n const viewport = this.column.viewport;\n const querying = viewport.dataGrid.querying;\n const sortingController = querying.sorting;\n const currentOrder = (sortingController.currentSorting?.columnId === this.column.id ?\n sortingController.currentSorting.order : null) || 'none';\n const consequents = {\n none: 'asc',\n asc: 'desc',\n desc: null\n };\n void this.setOrder(consequents[currentOrder]);\n };\n this.column = column;\n this.headerCellElement = headerCellElement;\n this.addHeaderElementAttributes();\n if (column.options.sorting?.sortable) {\n makeHTMLElement('span', {\n className: Globals.classNames.columnSortableIcon,\n innerText: '▲'\n }, headerCellElement).setAttribute('aria-hidden', true);\n headerCellElement.classList.add(Globals.classNames.columnSortable);\n }\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Adds attributes to the column header.\n */\n addHeaderElementAttributes() {\n const col = this.column;\n const a11y = col.viewport.dataGrid.accessibility;\n const sortingOptions = col.options.sorting;\n const { currentSorting } = col.viewport.dataGrid.querying.sorting;\n const el = this.headerCellElement;\n if (currentSorting?.columnId !== col.id || !currentSorting?.order) {\n el.classList.remove(Globals.classNames.columnSortedAsc);\n el.classList.remove(Globals.classNames.columnSortedDesc);\n if (sortingOptions?.sortable) {\n a11y?.setColumnSortState(el, 'none');\n }\n return;\n }\n switch (currentSorting?.order) {\n case 'asc':\n el.classList.add(Globals.classNames.columnSortedAsc);\n el.classList.remove(Globals.classNames.columnSortedDesc);\n a11y?.setColumnSortState(el, 'ascending');\n break;\n case 'desc':\n el.classList.remove(Globals.classNames.columnSortedAsc);\n el.classList.add(Globals.classNames.columnSortedDesc);\n a11y?.setColumnSortState(el, 'descending');\n break;\n }\n }\n /**\n * Set sorting order for the column. It will modify the presentation data\n * and rerender the rows.\n *\n * @param order\n * The order of sorting. It can be `'asc'`, `'desc'` or `null` if the\n * sorting should be disabled.\n */\n async setOrder(order) {\n const viewport = this.column.viewport;\n const querying = viewport.dataGrid.querying;\n const sortingController = querying.sorting;\n const a11y = viewport.dataGrid.accessibility;\n sortingController.setSorting(order, this.column.id);\n await querying.proceed();\n viewport.loadPresentationData();\n for (const col of viewport.columns) {\n col.sorting?.addHeaderElementAttributes();\n }\n a11y?.userSortedColumn(order);\n viewport.dataGrid.options?.events?.column?.afterSorting?.call(this.column);\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return ColumnSorting;\n });\n _registerModule(_modules, 'DataGrid/Table/Header/HeaderCell.js', [_modules['DataGrid/Table/Cell.js'], _modules['DataGrid/Utils.js'], _modules['DataGrid/Globals.js'], _modules['DataGrid/Table/Actions/ColumnSorting.js'], _modules['Core/Utilities.js']], function (Cell, DGUtils, Globals, ColumnSorting, Utilities) {\n /* *\n *\n * DataGrid class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement, isHTML } = DGUtils;\n const { merge } = Utilities;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a cell in the data grid header.\n */\n class HeaderCell extends Cell {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a cell in the data grid header.\n *\n * @param column\n * The column of the cell.\n *\n * @param row\n * The row of the cell.\n */\n constructor(column, row) {\n super(column, row);\n /**\n * Reference to options in settings header.\n */\n this.options = {};\n /**\n * Content value of the header cell.\n */\n this.value = '';\n column.header = this;\n this.isMain = !!this.row.viewport.getColumn(this.column.id);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Init element.\n */\n init() {\n const elem = document.createElement('th', {});\n elem.classList.add(Globals.classNames.headerCell);\n return elem;\n }\n /**\n * Render the cell container.\n */\n render() {\n const column = this.column;\n const options = merge(column.options, this.options); // ??\n const headerCellOptions = options.header || {};\n if (headerCellOptions.formatter) {\n this.value = headerCellOptions.formatter.call(this).toString();\n }\n else if (headerCellOptions.format) {\n this.value = column.format(headerCellOptions.format);\n }\n else {\n this.value = column.id;\n }\n // Render content of th element\n this.row.htmlElement.appendChild(this.htmlElement);\n this.headerContent = makeHTMLElement(options.sorting?.sortable && column.data ? 'button' : 'span', {\n className: Globals.classNames.headerCellContent\n }, this.htmlElement);\n if (isHTML(this.value)) {\n this.renderHTMLCellContent(this.value, this.headerContent);\n }\n else {\n this.headerContent.innerText = this.value;\n }\n this.htmlElement.setAttribute('scope', 'col');\n if (this.options.className) {\n this.htmlElement.classList.add(...this.options.className.split(/\\s+/g));\n }\n if (this.isMain) {\n this.htmlElement.setAttribute('data-column-id', column.id);\n // Add user column classname\n if (column.options.className) {\n this.htmlElement.classList.add(...column.options.className.split(/\\s+/g));\n }\n // Add resizing\n this.column.viewport.columnsResizer?.renderColumnDragHandles(this.column, this);\n // Add sorting\n this.initColumnSorting();\n }\n this.setCustomClassName(options.header?.className);\n }\n reflow() {\n const cell = this;\n const th = cell.htmlElement;\n const vp = cell.column.viewport;\n if (!th) {\n return;\n }\n let width = 0;\n if (cell.columns) {\n for (const col of cell.columns) {\n width += (vp.getColumn(col.columnId || '')?.getWidth()) || 0;\n }\n }\n else {\n width = cell.column.getWidth();\n }\n // Set the width of the column. Max width is needed for the\n // overflow: hidden to work.\n th.style.width = th.style.maxWidth = width + 'px';\n }\n onKeyDown(e) {\n if (e.target !== this.htmlElement) {\n return;\n }\n if (e.key === 'Enter') {\n if (this.column.options.sorting?.sortable) {\n this.column.sorting?.toggle();\n }\n return;\n }\n super.onKeyDown(e);\n }\n onClick(e) {\n const column = this.column;\n if (!this.isMain || (e.target !== this.htmlElement &&\n e.target !== column.header?.headerContent)) {\n return;\n }\n if (column.options.sorting?.sortable) {\n column.sorting?.toggle();\n }\n column.viewport.dataGrid.options?.events?.header?.click?.call(column);\n }\n /**\n * Add sorting option to the column.\n */\n initColumnSorting() {\n const { column } = this;\n column.sorting = new ColumnSorting(column, this.htmlElement);\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return HeaderCell;\n });\n _registerModule(_modules, 'DataGrid/Table/Header/HeaderRow.js', [_modules['DataGrid/Table/Row.js'], _modules['DataGrid/Globals.js'], _modules['DataGrid/Table/Header/HeaderCell.js'], _modules['DataGrid/Table/Column.js'], _modules['DataGrid/Utils.js']], function (Row, Globals, HeaderCell, Column, DGUtils) {\n /* *\n *\n * DataGrid class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { sanitizeText } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a row in the data grid header.\n */\n class HeaderRow extends Row {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a row in the data grid.\n *\n * @param viewport\n * The DataGrid Table instance which the row belongs to.\n *\n * @param level\n * The current level of header that is rendered.\n */\n constructor(viewport, level) {\n super(viewport);\n this.level = level;\n this.setRowAttributes();\n }\n /* *\n *\n * Methods\n *\n * */\n createCell(column) {\n return new HeaderCell(column, this);\n }\n /**\n * Renders the row's content in the header.\n *\n * @param level\n * The current level in the header tree\n */\n renderMultipleLevel(level) {\n const header = this.viewport.dataGrid.options?.header;\n const vp = this.viewport;\n const enabledColumns = vp.dataGrid.enabledColumns;\n // Render element\n vp.theadElement?.appendChild(this.htmlElement);\n this.htmlElement.classList.add(Globals.classNames.headerRow);\n if (!header) {\n super.render();\n return;\n }\n const columnsOnLevel = this.getColumnsAtLevel(header, level);\n for (let i = 0, iEnd = columnsOnLevel.length; i < iEnd; i++) {\n const column = columnsOnLevel[i];\n const colSpan = (typeof column !== 'string' && column.columns) ?\n vp.dataGrid.getColumnIds(column.columns).length : 0;\n const columnId = typeof column === 'string' ?\n column : column.columnId;\n const dataColumn = vp.getColumn(columnId || '');\n const headerFormat = (typeof column !== 'string') ?\n column.format : void 0;\n const className = (typeof column !== 'string') ?\n column.className : void 0;\n // Skip hidden column or header when all columns are hidden.\n if ((columnId &&\n enabledColumns && enabledColumns?.indexOf(columnId) < 0) || (!dataColumn && colSpan === 0)) {\n continue;\n }\n const headerCell = this.createCell(vp.getColumn(columnId || '') ||\n new Column(vp, \n // Remove HTML tags and empty spaces.\n sanitizeText(headerFormat || '').trim() || '', i));\n if (typeof column !== 'string') {\n vp.dataGrid.accessibility?.addHeaderCellDescription(headerCell.htmlElement, column.accessibility?.description);\n }\n if (headerFormat) {\n if (!headerCell.options.header) {\n headerCell.options.header = {};\n }\n headerCell.options.header.format = headerFormat;\n }\n if (className) {\n headerCell.options.className = className;\n }\n // Add class to disable left border on first column\n if (dataColumn?.index === 0 && i === 0) {\n headerCell.htmlElement.classList.add(Globals.classNames.columnFirst);\n }\n headerCell.render();\n headerCell.columns =\n typeof column !== 'string' ? column.columns : void 0;\n if (columnId) {\n headerCell.htmlElement.setAttribute('rowSpan', (this.viewport.header?.levels || 1) - level);\n }\n else {\n if (colSpan > 1) {\n headerCell.htmlElement.setAttribute('colSpan', colSpan);\n }\n }\n }\n }\n reflow() {\n const row = this;\n for (let i = 0, iEnd = row.cells.length; i < iEnd; i++) {\n const cell = row.cells[i];\n cell.reflow();\n }\n }\n /**\n * Get all headers that should be rendered in a level.\n *\n * @param scope\n * Level that we start from\n *\n * @param targetLevel\n * Max level\n *\n * @param currentLevel\n * Current level\n *\n * @return\n * Array of headers that should be rendered in a level\n */\n getColumnsAtLevel(scope, targetLevel, currentLevel = 0) {\n let result = [];\n for (const column of scope) {\n if (currentLevel === targetLevel) {\n result.push(column);\n }\n if (typeof column !== 'string' && column.columns) {\n result = result.concat(this.getColumnsAtLevel(column.columns, targetLevel, currentLevel + 1));\n }\n }\n return result;\n }\n /**\n * Sets the row HTML element attributes and additional classes.\n */\n setRowAttributes() {\n const a11y = this.viewport.dataGrid.accessibility;\n a11y?.setRowIndex(this.htmlElement, this.level);\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return HeaderRow;\n });\n _registerModule(_modules, 'DataGrid/Table/Header/TableHeader.js', [_modules['DataGrid/Table/Header/HeaderRow.js'], _modules['Core/Utilities.js']], function (HeaderRow, Utils) {\n /* *\n *\n * DataGrid class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { getStyle } = Utils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a table header row containing the cells (headers) with\n * column names.\n */\n class TableHeader {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a new table head.\n *\n * @param viewport\n * The viewport (table) the table head belongs to.\n */\n constructor(viewport) {\n /* *\n *\n * Properties\n *\n * */\n /**\n * The visible columns of the table.\n */\n this.columns = [];\n /**\n * The container of the table head.\n */\n this.rows = [];\n /**\n * Amount of levels in the header, that is used in creating correct rows.\n */\n this.levels = 1;\n this.viewport = viewport;\n this.columns = viewport.columns;\n if (viewport.dataGrid.options?.header) {\n this.levels = this.getRowLevels(viewport.dataGrid.options?.header);\n }\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Renders the table head content.\n */\n render() {\n const vp = this.viewport;\n const dataGrid = vp.dataGrid;\n if (!dataGrid.enabledColumns) {\n return;\n }\n for (let i = 0, iEnd = this.levels; i < iEnd; i++) {\n const row = new HeaderRow(vp, i + 1); // Avoid indexing from 0\n row.renderMultipleLevel(i);\n this.rows.push(row);\n }\n }\n /**\n * Reflows the table head's content dimensions.\n */\n reflow() {\n const vp = this.viewport;\n if (!vp.theadElement) {\n return;\n }\n const { clientWidth, offsetWidth } = vp.tbodyElement;\n const header = vp.header;\n const rows = this.rows;\n const tableEl = header?.viewport.dataGrid.tableElement;\n const theadEL = header?.viewport.theadElement;\n const theadBorder = theadEL && getStyle(theadEL, 'border-right-width', true) || 0;\n const tableBorder = (tableEl && getStyle(tableEl, 'border-right-width', true)) || 0;\n const bordersWidth = offsetWidth - clientWidth - theadBorder - tableBorder;\n for (const row of rows) {\n row.reflow();\n }\n if (vp.rowsWidth) {\n vp.theadElement.style.width =\n Math.max(vp.rowsWidth, clientWidth) + bordersWidth + 'px';\n }\n // Adjust cell's width when scrollbar is enabled.\n if (header && bordersWidth > 0) {\n const cells = header.rows[header.rows.length - 1].cells;\n const cellHtmlElement = cells[cells.length - 1].htmlElement;\n cellHtmlElement.style.width = cellHtmlElement.style.maxWidth =\n cellHtmlElement.offsetWidth + bordersWidth + 'px';\n }\n }\n /**\n * Returns amount of rows for the current cell in header tree.\n *\n * @param scope\n * Structure of header\n *\n * @returns\n */\n getRowLevels(scope) {\n let maxDepth = 0;\n for (const item of scope) {\n if (typeof item !== 'string' && item.columns) {\n const depth = this.getRowLevels(item.columns);\n if (depth > maxDepth) {\n maxDepth = depth;\n }\n }\n }\n return maxDepth + 1;\n }\n /**\n * Scrolls the table head horizontally.\n *\n * @param scrollLeft\n * The left scroll position.\n */\n scrollHorizontally(scrollLeft) {\n const el = this.viewport.theadElement;\n if (!el) {\n return;\n }\n el.style.transform = `translateX(${-scrollLeft}px)`;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return TableHeader;\n });\n _registerModule(_modules, 'DataGrid/Table/Content/TableCell.js', [_modules['DataGrid/Table/Cell.js'], _modules['Core/Utilities.js'], _modules['DataGrid/Utils.js']], function (Cell, Utils, DGUtils) {\n /* *\n *\n * DataGrid class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { defined, fireEvent } = Utils;\n const { isHTML } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a cell in the data grid.\n */\n class TableCell extends Cell {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a cell in the data grid.\n *\n * @param column\n * The column of the cell.\n *\n * @param row\n * The row of the cell.\n */\n constructor(column, row) {\n super(column, row);\n this.row = row;\n this.column.registerCell(this);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Renders the cell by appending it to the row and setting its value.\n */\n render() {\n super.render();\n // It may happen that `await` will be needed here in the future.\n void this.setValue(this.column.data?.[this.row.index], false);\n }\n initEvents() {\n this.cellEvents.push(['dblclick', (e) => {\n this.onDblClick(e);\n }]);\n this.cellEvents.push(['mouseout', () => this.onMouseOut()]);\n this.cellEvents.push(['mouseover', () => this.onMouseOver()]);\n this.cellEvents.push(['mousedown', (e) => {\n this.onMouseDown(e);\n }]);\n super.initEvents();\n }\n /**\n * Handles the focus event on the cell.\n */\n onFocus() {\n super.onFocus();\n const vp = this.row.viewport;\n vp.focusCursor = [\n this.row.index,\n this.column.index\n ];\n }\n /**\n * Handles the mouse down event on the cell.\n *\n * @param e\n * The mouse event object.\n */\n onMouseDown(e) {\n const { dataGrid } = this.row.viewport;\n if (e.target === this.htmlElement) {\n this.htmlElement.focus();\n }\n fireEvent(dataGrid, 'cellMouseDown', {\n target: this\n });\n }\n /**\n * Handles the mouse over event on the cell.\n */\n onMouseOver() {\n const { dataGrid } = this.row.viewport;\n dataGrid.hoverRow(this.row.index);\n dataGrid.hoverColumn(this.column.id);\n dataGrid.options?.events?.cell?.mouseOver?.call(this);\n fireEvent(dataGrid, 'cellMouseOver', {\n target: this\n });\n }\n /**\n * Handles the mouse out event on the cell.\n */\n onMouseOut() {\n const { dataGrid } = this.row.viewport;\n dataGrid.hoverRow();\n dataGrid.hoverColumn();\n dataGrid.options?.events?.cell?.mouseOut?.call(this);\n fireEvent(dataGrid, 'cellMouseOut', {\n target: this\n });\n }\n /**\n * Handles the double click event on the cell.\n *\n * @param e\n * The mouse event object.\n */\n onDblClick(e) {\n const vp = this.row.viewport;\n const { dataGrid } = vp;\n if (this.column.options.cells?.editable) {\n e.preventDefault();\n vp.cellEditing.startEditing(this);\n }\n dataGrid.options?.events?.cell?.dblClick?.call(this);\n fireEvent(dataGrid, 'cellDblClick', {\n target: this\n });\n }\n onClick() {\n const vp = this.row.viewport;\n const { dataGrid } = vp;\n dataGrid.options?.events?.cell?.click?.call(this);\n fireEvent(dataGrid, 'cellClick', {\n target: this\n });\n }\n onKeyDown(e) {\n if (e.target !== this.htmlElement) {\n return;\n }\n if (e.key === 'Enter') {\n if (this.column.options.cells?.editable) {\n this.row.viewport.cellEditing.startEditing(this);\n }\n return;\n }\n super.onKeyDown(e);\n }\n /**\n * Sets the value & updating content of the cell.\n *\n * @param value\n * The raw value to set.\n *\n * @param updateTable\n * Whether to update the table after setting the content.\n */\n async setValue(value, updateTable) {\n this.value = value;\n const vp = this.column.viewport;\n const element = this.htmlElement;\n const cellContent = this.formatCell();\n if (isHTML(cellContent)) {\n this.renderHTMLCellContent(cellContent, element);\n }\n else {\n element.innerText = cellContent;\n }\n this.htmlElement.setAttribute('data-value', this.value + '');\n this.setCustomClassName(this.column.options.cells?.className);\n if (this.column.options.cells?.editable) {\n vp.dataGrid.accessibility?.addEditableCellHint(this.htmlElement);\n }\n vp.dataGrid.options?.events?.cell?.afterSetValue?.call(this);\n if (!updateTable) {\n return;\n }\n const { dataTable: originalDataTable } = vp.dataGrid;\n // Taken the local row index of the original datagrid data table, but\n // in the future it should affect the globally original data table.\n // (To be done after the DataLayer refinement)\n const rowTableIndex = this.row.id && originalDataTable?.getLocalRowIndex(this.row.id);\n if (!originalDataTable || rowTableIndex === void 0) {\n return;\n }\n originalDataTable.setCell(this.column.id, rowTableIndex, this.value);\n if (vp.dataGrid.querying.willNotModify()) {\n // If the data table does not need to be modified, skip the\n // data modification and don't update the whole table. It checks\n // if the modifiers are globally set. Can be changed in the future\n // to check if the modifiers are set for the specific columns.\n return;\n }\n let focusedRowId;\n if (vp.focusCursor) {\n focusedRowId = vp.dataTable.getOriginalRowIndex(vp.focusCursor[0]);\n }\n await vp.dataGrid.querying.proceed(true);\n vp.loadPresentationData();\n if (focusedRowId !== void 0 && vp.focusCursor) {\n const newRowIndex = vp.dataTable.getLocalRowIndex(focusedRowId);\n if (newRowIndex !== void 0) {\n vp.rows[newRowIndex - vp.rows[0].index]\n ?.cells[vp.focusCursor[1]].htmlElement.focus();\n }\n }\n }\n /**\n * Handle the formatting content of the cell.\n */\n formatCell() {\n const options = this.column.options.cells || {};\n const { format, formatter } = options;\n let value = this.value;\n if (!defined(value)) {\n value = '';\n }\n let cellContent = '';\n if (formatter) {\n cellContent = formatter.call(this).toString();\n }\n else {\n cellContent = (format ? this.format(format) : value + '');\n }\n return cellContent;\n }\n /**\n * Destroys the cell.\n */\n destroy() {\n super.destroy();\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return TableCell;\n });\n _registerModule(_modules, 'DataGrid/Table/Content/TableRow.js', [_modules['DataGrid/Table/Row.js'], _modules['DataGrid/Table/Content/TableCell.js'], _modules['DataGrid/Globals.js']], function (Row, TableCell, Globals) {\n /* *\n *\n * DataGrid class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a row in the data grid.\n */\n class TableRow extends Row {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a row in the data grid.\n *\n * @param viewport\n * The DataGrid Table instance which the row belongs to.\n *\n * @param index\n * The index of the row in the data table.\n */\n constructor(viewport, index) {\n super(viewport);\n this.index = index;\n this.id = viewport.dataTable.getOriginalRowIndex(index);\n this.setRowAttributes();\n }\n /* *\n *\n * Methods\n *\n * */\n createCell(column) {\n return new TableCell(column, this);\n }\n /**\n * Adds or removes the hovered CSS class to the row element.\n *\n * @param hovered\n * Whether the row should be hovered.\n */\n setHoveredState(hovered) {\n this.htmlElement.classList[hovered ? 'add' : 'remove'](Globals.classNames.hoveredRow);\n if (hovered) {\n this.viewport.dataGrid.hoveredRowIndex = this.index;\n }\n }\n /**\n * Sets the row HTML element attributes and additional classes.\n */\n setRowAttributes() {\n const idx = this.index;\n const el = this.htmlElement;\n const a11y = this.viewport.dataGrid.accessibility;\n el.style.transform = `translateY(${this.getDefaultTopOffset()}px)`;\n el.classList.add(Globals.classNames.rowElement);\n // Index of the row in the presentation data table\n el.setAttribute('data-row-index', idx);\n // Index of the row in the original data table (ID)\n if (this.id !== void 0) {\n el.setAttribute('data-row-id', this.id);\n }\n // Calculate levels of header, 1 to avoid indexing from 0\n a11y?.setRowIndex(el, idx + (this.viewport.header?.levels ?? 1) + 1);\n // Indexing from 0, so rows with even index are odd.\n el.classList.add(Globals.classNames[idx % 2 ? 'rowEven' : 'rowOdd']);\n if (this.viewport.dataGrid.hoveredRowIndex === idx) {\n el.classList.add(Globals.classNames.hoveredRow);\n }\n }\n /**\n * Returns the default top offset of the row (before adjusting row heights).\n * @internal\n */\n getDefaultTopOffset() {\n return this.index * this.viewport.rowsVirtualizer.defaultRowHeight;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return TableRow;\n });\n _registerModule(_modules, 'DataGrid/Table/Actions/RowsVirtualizer.js', [_modules['DataGrid/Utils.js'], _modules['DataGrid/Globals.js'], _modules['DataGrid/Table/Content/TableRow.js']], function (DGUtils, Globals, TableRow) {\n /* *\n *\n * DataGrid Rows Renderer class.\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n const { makeHTMLElement, getTranslateY } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a virtualized rows renderer for the data grid.\n */\n class RowsVirtualizer {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the rows virtualizer.\n *\n * @param viewport\n * The viewport of the data grid to render rows in.\n */\n constructor(viewport) {\n /**\n * The index of the first visible row.\n */\n this.rowCursor = 0;\n /**\n * Flag indicating if the scrolling handler should be prevented to avoid\n * flickering loops when scrolling to the last row.\n */\n this.preventScroll = false;\n const rowSettings = viewport.dataGrid.options?.rendering?.rows;\n this.viewport = viewport;\n this.strictRowHeights = rowSettings?.strictHeights;\n this.buffer = Math.max(rowSettings?.bufferSize, 0);\n this.defaultRowHeight = this.getDefaultRowHeight();\n if (this.strictRowHeights) {\n viewport.tbodyElement.classList.add(Globals.classNames.rowsContentNowrap);\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Renders the rows in the viewport for the first time.\n */\n initialRender() {\n // Initial reflow to set the viewport height\n this.viewport.reflow();\n // Load & render rows\n this.renderRows(this.rowCursor);\n this.adjustRowHeights();\n }\n /**\n * Renders the rows in the viewport. It is called when the rows need to be\n * re-rendered, e.g., after a sort or filter operation.\n */\n rerender() {\n const rows = this.viewport.rows;\n const tbody = this.viewport.tbodyElement;\n let oldScrollTop;\n if (rows.length) {\n oldScrollTop = tbody.scrollTop;\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rows[i].destroy();\n }\n rows.length = 0;\n }\n this.renderRows(this.rowCursor);\n if (oldScrollTop !== void 0) {\n tbody.scrollTop = oldScrollTop;\n }\n this.scroll();\n // Reflow the rendered row cells widths (check redundancy)\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rows[i].reflow();\n }\n }\n /**\n * Method called on the viewport scroll event.\n */\n scroll() {\n const target = this.viewport.tbodyElement;\n const { defaultRowHeight: rowHeight } = this;\n const lastScrollTop = target.scrollTop;\n if (this.preventScroll) {\n if (lastScrollTop <= target.scrollTop) {\n this.preventScroll = false;\n }\n this.adjustBottomRowHeights();\n return;\n }\n // Do vertical virtual scrolling\n const rowCursor = Math.floor(target.scrollTop / rowHeight);\n if (this.rowCursor !== rowCursor) {\n this.renderRows(rowCursor);\n }\n this.rowCursor = rowCursor;\n this.adjustRowHeights();\n if (!this.strictRowHeights &&\n lastScrollTop > target.scrollTop &&\n !this.preventScroll) {\n target.scrollTop = lastScrollTop;\n this.preventScroll = true;\n }\n }\n /**\n * Adjusts the visible row heights from the bottom of the viewport.\n */\n adjustBottomRowHeights() {\n const rows = this.viewport.rows;\n const rowsLn = rows.length;\n const lastRow = rows[rowsLn - 1];\n let rowTop = getTranslateY(lastRow.htmlElement);\n const rowBottom = rowTop + lastRow.htmlElement.offsetHeight;\n let newHeight = lastRow.cells[0].htmlElement.offsetHeight;\n rowTop = rowBottom - newHeight;\n lastRow.htmlElement.style.height = newHeight + 'px';\n lastRow.htmlElement.style.transform = `translateY(${rowTop}px)`;\n for (let j = 0, jEnd = lastRow.cells.length; j < jEnd; ++j) {\n lastRow.cells[j].htmlElement.style.transform = '';\n }\n for (let i = rowsLn - 2; i >= 0; i--) {\n const row = rows[i];\n newHeight = row.cells[0].htmlElement.offsetHeight;\n rowTop -= newHeight;\n row.htmlElement.style.height = newHeight + 'px';\n row.htmlElement.style.transform = `translateY(${rowTop}px)`;\n for (let j = 0, jEnd = row.cells.length; j < jEnd; ++j) {\n row.cells[j].htmlElement.style.transform = '';\n }\n }\n }\n /**\n * Renders rows in the specified range. Removes rows that are out of the\n * range except the last row.\n *\n * @param rowCursor\n * The index of the first visible row.\n */\n renderRows(rowCursor) {\n const { viewport: vp, buffer } = this;\n const rowsPerPage = Math.ceil(vp.tbodyElement.offsetHeight / this.defaultRowHeight);\n const rows = vp.rows;\n if (!rows.length) {\n const last = new TableRow(vp, vp.dataTable.getRowCount() - 1);\n last.render();\n rows.push(last);\n vp.tbodyElement.appendChild(last.htmlElement);\n }\n const from = Math.max(0, Math.min(rowCursor - buffer, vp.dataTable.getRowCount() - rowsPerPage));\n const to = Math.min(rowCursor + rowsPerPage + buffer, rows[rows.length - 1].index - 1);\n const alwaysLastRow = rows.pop();\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rows[i].destroy();\n }\n rows.length = 0;\n for (let i = from; i <= to; ++i) {\n const newRow = new TableRow(vp, i);\n newRow.render();\n vp.tbodyElement.insertBefore(newRow.htmlElement, vp.tbodyElement.lastChild);\n rows.push(newRow);\n }\n if (alwaysLastRow) {\n rows.push(alwaysLastRow);\n }\n // Focus the cell if the focus cursor is set\n if (vp.focusCursor) {\n const [rowIndex, columnIndex] = vp.focusCursor;\n const row = rows.find((row) => row.index === rowIndex);\n if (row) {\n row.cells[columnIndex]?.htmlElement.focus({\n preventScroll: true\n });\n }\n }\n const firstVisibleRow = rows[rowCursor - rows[0].index];\n this.focusAnchorCell = firstVisibleRow?.cells[0];\n this.focusAnchorCell?.htmlElement.setAttribute('tabindex', '0');\n }\n /**\n * Adjusts the heights of the rows based on the current scroll position.\n * It handles the possibility of the rows having different heights than\n * the default height.\n */\n adjustRowHeights() {\n if (this.strictRowHeights) {\n return;\n }\n const { rowCursor: cursor, defaultRowHeight: defaultH } = this;\n const { rows, tbodyElement } = this.viewport;\n const rowsLn = rows.length;\n let translateBuffer = rows[0].getDefaultTopOffset();\n for (let i = 0; i < rowsLn; ++i) {\n const row = rows[i];\n // Reset row height and cell transforms\n row.htmlElement.style.height = '';\n if (row.cells[0].htmlElement.style.transform) {\n for (let j = 0, jEnd = row.cells.length; j < jEnd; ++j) {\n const cell = row.cells[j];\n cell.htmlElement.style.transform = '';\n }\n }\n // Rows above the first visible row\n if (row.index < cursor) {\n row.htmlElement.style.height = defaultH + 'px';\n continue;\n }\n const cellHeight = row.cells[0].htmlElement.offsetHeight;\n row.htmlElement.style.height = cellHeight + 'px';\n // Rows below the first visible row\n if (row.index > cursor) {\n continue;\n }\n // First visible row\n if (row.htmlElement.offsetHeight > defaultH) {\n const newHeight = Math.floor(cellHeight - (cellHeight - defaultH) * (tbodyElement.scrollTop / defaultH - cursor));\n row.htmlElement.style.height = newHeight + 'px';\n for (let j = 0, jEnd = row.cells.length; j < jEnd; ++j) {\n const cell = row.cells[j];\n cell.htmlElement.style.transform = `translateY(${newHeight - cellHeight}px)`;\n }\n }\n }\n for (let i = 1, iEnd = rowsLn - 1; i < iEnd; ++i) {\n translateBuffer += rows[i - 1].htmlElement.offsetHeight;\n rows[i].htmlElement.style.transform =\n `translateY(${translateBuffer}px)`;\n }\n // Set the proper offset for the last row\n const lastRow = rows[rowsLn - 1];\n const preLastRow = rows[rowsLn - 2];\n if (preLastRow && preLastRow.index === lastRow.index - 1) {\n lastRow.htmlElement.style.transform = `translateY(${preLastRow.htmlElement.offsetHeight +\n getTranslateY(preLastRow.htmlElement)}px)`;\n }\n }\n /**\n * Reflow the rendered rows content dimensions.\n */\n reflowRows() {\n const rows = this.viewport.rows;\n if (rows.length < 1) {\n return;\n }\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rows[i].reflow();\n }\n this.adjustRowHeights();\n }\n /**\n * Returns the default height of a row. This method should be called only\n * once on initialization.\n */\n getDefaultRowHeight() {\n const mockRow = makeHTMLElement('tr', {\n className: Globals.classNames.rowElement\n }, this.viewport.tbodyElement);\n const defaultRowHeight = mockRow.offsetHeight;\n mockRow.remove();\n return defaultRowHeight;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return RowsVirtualizer;\n });\n _registerModule(_modules, 'DataGrid/Table/Actions/ColumnsResizer.js', [_modules['DataGrid/Table/Column.js'], _modules['DataGrid/Globals.js'], _modules['DataGrid/Utils.js']], function (Column, Globals, DGUtils) {\n /* *\n *\n * DataGrid Columns Resizer class.\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * The class that handles the resizing of columns in the data grid.\n */\n class ColumnsResizer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(viewport) {\n /**\n * The handles and their mouse down event listeners.\n */\n this.handles = [];\n /**\n * Handles the mouse move event on the document.\n *\n * @param e\n * The mouse event.\n */\n this.onDocumentMouseMove = (e) => {\n if (!this.draggedResizeHandle || !this.draggedColumn) {\n return;\n }\n const diff = e.pageX - (this.dragStartX || 0);\n if (this.viewport.columnDistribution === 'full') {\n this.fullDistributionResize(diff);\n }\n else {\n this.fixedDistributionResize(diff);\n }\n this.viewport.reflow();\n this.viewport.rowsVirtualizer.adjustRowHeights();\n this.viewport.dataGrid.options?.events?.column?.afterResize?.call(this.draggedColumn);\n };\n /**\n * Handles the mouse up event on the document.\n */\n this.onDocumentMouseUp = () => {\n this.draggedColumn?.header?.htmlElement?.classList.remove(Globals.classNames.resizedColumn);\n this.dragStartX = void 0;\n this.draggedColumn = void 0;\n this.draggedResizeHandle = void 0;\n this.columnStartWidth = void 0;\n this.nextColumnStartWidth = void 0;\n };\n this.viewport = viewport;\n document.addEventListener('mousemove', this.onDocumentMouseMove);\n document.addEventListener('mouseup', this.onDocumentMouseUp);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Resizes the columns in the full distribution mode.\n *\n * @param diff\n * The X position difference in pixels.\n */\n fullDistributionResize(diff) {\n const vp = this.viewport;\n const column = this.draggedColumn;\n if (!column) {\n return;\n }\n const nextColumn = vp.columns[column.index + 1];\n if (!nextColumn) {\n return;\n }\n const leftColW = this.columnStartWidth ?? 0;\n const rightColW = this.nextColumnStartWidth ?? 0;\n const MIN_WIDTH = Column.MIN_COLUMN_WIDTH;\n let newLeftW = leftColW + diff;\n let newRightW = rightColW - diff;\n if (newLeftW < MIN_WIDTH) {\n newLeftW = MIN_WIDTH;\n newRightW = leftColW + rightColW - MIN_WIDTH;\n }\n if (newRightW < MIN_WIDTH) {\n newRightW = MIN_WIDTH;\n newLeftW = leftColW + rightColW - MIN_WIDTH;\n }\n column.width = vp.getRatioFromWidth(newLeftW);\n nextColumn.width = vp.getRatioFromWidth(newRightW);\n }\n /**\n * Render the drag handle for resizing columns.\n *\n * @param column\n * The reference to rendered column\n *\n * @param cell\n * The reference to rendered cell, where hadles should be added\n */\n renderColumnDragHandles(column, cell) {\n const vp = column.viewport;\n if (vp.columnsResizer && (vp.columnDistribution !== 'full' ||\n (vp.dataGrid.enabledColumns &&\n column.index < vp.dataGrid.enabledColumns.length - 1))) {\n const handle = makeHTMLElement('div', {\n className: Globals.classNames.resizerHandles\n }, cell.htmlElement);\n handle.setAttribute('aria-hidden', true);\n vp.columnsResizer?.addHandleListeners(handle, column);\n }\n }\n /**\n * Resizes the columns in the fixed distribution mode.\n *\n * @param diff\n * The X position difference in pixels.\n */\n fixedDistributionResize(diff) {\n const column = this.draggedColumn;\n if (!column) {\n return;\n }\n const colW = this.columnStartWidth ?? 0;\n const MIN_WIDTH = Column.MIN_COLUMN_WIDTH;\n let newW = colW + diff;\n if (newW < MIN_WIDTH) {\n newW = MIN_WIDTH;\n }\n column.width = newW;\n }\n /**\n * Adds event listeners to the handle.\n *\n * @param handle\n * The handle element.\n *\n * @param column\n * The column the handle belongs to.\n */\n addHandleListeners(handle, column) {\n const onHandleMouseDown = (e) => {\n this.dragStartX = e.pageX;\n this.draggedColumn = column;\n this.draggedResizeHandle = handle;\n this.columnStartWidth = column.getWidth();\n this.nextColumnStartWidth =\n this.viewport.columns[column.index + 1]?.getWidth();\n column.header?.htmlElement.classList.add(Globals.classNames.resizedColumn);\n };\n this.handles.push([handle, onHandleMouseDown]);\n handle.addEventListener('mousedown', onHandleMouseDown);\n }\n /**\n * Removes all added event listeners from the document and handles. This\n * should be called on the destroy of the data grid.\n */\n removeEventListeners() {\n document.removeEventListener('mousemove', this.onDocumentMouseMove);\n document.removeEventListener('mouseup', this.onDocumentMouseUp);\n for (let i = 0, iEnd = this.handles.length; i < iEnd; i++) {\n const [handle, listener] = this.handles[i];\n handle.removeEventListener('mousedown', listener);\n }\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return ColumnsResizer;\n });\n _registerModule(_modules, 'DataGrid/Table/Actions/CellEditing.js', [_modules['DataGrid/Globals.js'], _modules['DataGrid/Utils.js']], function (Globals, DGUtils) {\n /* *\n *\n * DataGrid Cell Editing class.\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * The class that handles the manual editing of cells in the data grid.\n */\n class CellEditing {\n constructor() {\n /* *\n *\n * Properties\n *\n * */\n /**\n * Handles the blur event on the input field.\n */\n this.onInputBlur = () => {\n this.stopEditing();\n };\n /**\n * Handles the keydown event on the input field. Cancels editing on escape\n * and saves the value on enter.\n *\n * @param e\n * The keyboard event.\n */\n this.onInputKeyDown = (e) => {\n const { keyCode } = e;\n // Enter / Escape\n if (keyCode === 13 || keyCode === 27) {\n // Cancel editing on escape\n this.stopEditing(keyCode === 13);\n }\n };\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Turns the cell into an editable input field.\n *\n * @param cell\n * The cell that is to be edited.\n */\n startEditing(cell) {\n if (this.editedCell === cell) {\n return;\n }\n if (this.editedCell) {\n this.stopEditing();\n }\n this.editedCell = cell;\n const cellElement = cell.htmlElement;\n cellElement.innerHTML = '';\n cellElement.classList.add(Globals.classNames.editedCell);\n cell.row.viewport.dataGrid.accessibility?.userEditedCell('started');\n this.renderInput();\n }\n /**\n * Stops the editing of the cell.\n *\n * @param submit\n * Whether to save the value of the input to the cell. Defaults to true.\n */\n stopEditing(submit = true) {\n const cell = this.editedCell;\n const input = this.inputElement;\n if (!cell || !input) {\n return;\n }\n const dataGrid = cell.column.viewport.dataGrid;\n let newValue = input.value;\n this.destroyInput();\n cell.htmlElement.classList.remove(Globals.classNames.editedCell);\n cell.htmlElement.focus();\n // Convert to number if possible\n if (!isNaN(+newValue)) {\n newValue = +newValue;\n }\n void cell.setValue(submit ? newValue : cell.value, submit && cell.value !== newValue);\n dataGrid.options?.events?.cell?.afterEdit?.call(cell);\n cell.row.viewport.dataGrid.accessibility?.userEditedCell(submit ? 'edited' : 'cancelled');\n delete this.editedCell;\n }\n /**\n * Renders the input field for the cell, focuses it and sets up event\n * listeners.\n */\n renderInput() {\n const cell = this.editedCell;\n if (!cell) {\n return;\n }\n const cellEl = cell.htmlElement;\n const input = this.inputElement = makeHTMLElement('input', {}, cellEl);\n input.value = '' + cell.value;\n input.focus();\n input.addEventListener('blur', this.onInputBlur);\n input.addEventListener('keydown', this.onInputKeyDown);\n }\n /**\n * Removes event listeners and the input element.\n */\n destroyInput() {\n const input = this.inputElement;\n if (!input) {\n return;\n }\n input.removeEventListener('keydown', this.onInputKeyDown);\n input.removeEventListener('blur', this.onInputBlur);\n input.remove();\n delete this.inputElement;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return CellEditing;\n });\n _registerModule(_modules, 'DataGrid/Table/Table.js', [_modules['DataGrid/Utils.js'], _modules['DataGrid/Table/Column.js'], _modules['DataGrid/Table/Header/TableHeader.js'], _modules['DataGrid/Table/Actions/RowsVirtualizer.js'], _modules['DataGrid/Table/Actions/ColumnsResizer.js'], _modules['DataGrid/Globals.js'], _modules['Core/Utilities.js'], _modules['DataGrid/Table/Actions/CellEditing.js']], function (DGUtils, Column, TableHeader, RowsVirtualizer, ColumnsResizer, Globals, Utils, CellEditing) {\n /* *\n *\n * DataGrid class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DGUtils;\n const { getStyle } = Utils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a table viewport of the data grid.\n */\n class Table {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a new data grid table.\n *\n * @param dataGrid\n * The data grid instance which the table (viewport) belongs to.\n *\n * @param tableElement\n * The HTML table element of the data grid.\n */\n constructor(dataGrid, tableElement) {\n /**\n * The visible columns of the table.\n */\n this.columns = [];\n /**\n * The visible rows of the table.\n */\n this.rows = [];\n /**\n * Handles the focus event on the table body.\n *\n * @param e\n * The focus event.\n */\n this.onTBodyFocus = (e) => {\n e.preventDefault();\n this.rows[this.rowsVirtualizer.rowCursor - this.rows[0].index]\n ?.cells[0]?.htmlElement.focus();\n };\n /**\n * Handles the resize event.\n */\n this.onResize = () => {\n this.reflow();\n };\n /**\n * Handles the scroll event.\n */\n this.onScroll = () => {\n this.rowsVirtualizer.scroll();\n this.header?.scrollHorizontally(this.tbodyElement.scrollLeft);\n };\n this.dataGrid = dataGrid;\n this.dataTable = this.dataGrid.presentationTable;\n const dgOptions = dataGrid.options;\n const customClassName = dgOptions?.rendering?.table?.className;\n this.columnDistribution =\n dgOptions?.rendering?.columns?.distribution;\n this.renderCaption();\n if (dgOptions?.rendering?.header?.enabled) {\n this.theadElement = makeHTMLElement('thead', {}, tableElement);\n }\n this.tbodyElement = makeHTMLElement('tbody', {}, tableElement);\n this.rowsVirtualizer = new RowsVirtualizer(this);\n if (dgOptions?.columnDefaults?.resizing) {\n this.columnsResizer = new ColumnsResizer(this);\n }\n this.cellEditing = new CellEditing();\n if (customClassName) {\n tableElement.classList.add(...customClassName.split(/\\s+/g));\n }\n this.init();\n // Add event listeners\n this.resizeObserver = new ResizeObserver(this.onResize);\n this.resizeObserver.observe(tableElement);\n this.tbodyElement.addEventListener('scroll', this.onScroll);\n this.tbodyElement.addEventListener('focus', this.onTBodyFocus);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Initializes the data grid table.\n */\n init() {\n // Load columns\n this.loadColumns();\n // Load & render head\n if (this.dataGrid.options?.rendering?.header?.enabled) {\n this.header = new TableHeader(this);\n this.header.render();\n }\n // TODO: Load & render footer\n // this.footer = new TableFooter(this);\n // this.footer.render();\n this.rowsVirtualizer.initialRender();\n }\n /**\n * Loads the columns of the table.\n */\n loadColumns() {\n const { enabledColumns } = this.dataGrid;\n if (!enabledColumns) {\n return;\n }\n let columnId;\n for (let i = 0, iEnd = enabledColumns.length; i < iEnd; ++i) {\n columnId = enabledColumns[i];\n this.columns.push(new Column(this, columnId, i));\n }\n }\n /**\n * Loads the modified data from the data table and renders the rows.\n */\n loadPresentationData() {\n this.dataTable = this.dataGrid.presentationTable;\n for (const column of this.columns) {\n column.loadData();\n }\n this.rowsVirtualizer.rerender();\n }\n /**\n * Reflows the table's content dimensions.\n */\n reflow() {\n const tableEl = this.dataGrid.tableElement;\n const borderWidth = tableEl ? ((getStyle(tableEl, 'border-top-width', true) || 0) +\n (getStyle(tableEl, 'border-bottom-width', true) || 0)) : 0;\n this.tbodyElement.style.height = this.tbodyElement.style.minHeight = `${(this.dataGrid.container?.clientHeight || 0) -\n (this.theadElement?.offsetHeight || 0) -\n (this.captionElement?.offsetHeight || 0) -\n (this.dataGrid.credits?.getHeight() || 0) -\n borderWidth}px`;\n // Get the width of the rows.\n if (this.columnDistribution === 'fixed') {\n let rowsWidth = 0;\n for (let i = 0, iEnd = this.columns.length; i < iEnd; ++i) {\n rowsWidth += this.columns[i].width;\n }\n this.rowsWidth = rowsWidth;\n }\n // Reflow the head\n this.header?.reflow();\n // Reflow rows content dimensions\n this.rowsVirtualizer.reflowRows();\n }\n /**\n * Scrolls the table to the specified row.\n *\n * @param index\n * The index of the row to scroll to.\n *\n * Try it: {@link https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/data-grid/basic/scroll-to-row | Scroll to row}\n */\n scrollToRow(index) {\n this.tbodyElement.scrollTop =\n index * this.rowsVirtualizer.defaultRowHeight;\n }\n /**\n * Get the widthRatio value from the width in pixels. The widthRatio is\n * calculated based on the width of the viewport.\n *\n * @param width\n * The width in pixels.\n *\n * @return The width ratio.\n *\n * @internal\n */\n getRatioFromWidth(width) {\n return width / this.tbodyElement.clientWidth;\n }\n /**\n * Get the width in pixels from the widthRatio value. The width is\n * calculated based on the width of the viewport.\n *\n * @param ratio\n * The width ratio.\n *\n * @returns The width in pixels.\n *\n * @internal\n */\n getWidthFromRatio(ratio) {\n return this.tbodyElement.clientWidth * ratio;\n }\n /**\n * Render caption above the datagrid\n * @internal\n */\n renderCaption() {\n const captionOptions = this.dataGrid.options?.caption;\n if (!captionOptions?.text) {\n return;\n }\n this.captionElement = makeHTMLElement('caption', {\n innerText: captionOptions.text,\n className: Globals.classNames.captionElement\n }, this.dataGrid.tableElement);\n if (captionOptions.className) {\n this.captionElement.classList.add(...captionOptions.className.split(/\\s+/g));\n }\n }\n /**\n * Destroys the data grid table.\n */\n destroy() {\n this.tbodyElement.removeEventListener('focus', this.onTBodyFocus);\n this.tbodyElement.removeEventListener('scroll', this.onScroll);\n this.resizeObserver.disconnect();\n this.columnsResizer?.removeEventListeners();\n for (let i = 0, iEnd = this.rows.length; i < iEnd; ++i) {\n this.rows[i].destroy();\n }\n }\n /**\n * Get the viewport state metadata. It is used to save the state of the\n * viewport and restore it when the data grid is re-rendered.\n *\n * @returns\n * The viewport state metadata.\n */\n getStateMeta() {\n return {\n scrollTop: this.tbodyElement.scrollTop,\n scrollLeft: this.tbodyElement.scrollLeft,\n columnDistribution: this.columnDistribution,\n columnWidths: this.columns.map((column) => column.width),\n focusCursor: this.focusCursor\n };\n }\n /**\n * Apply the metadata to the viewport state. It is used to restore the state\n * of the viewport when the data grid is re-rendered.\n *\n * @param meta\n * The viewport state metadata.\n */\n applyStateMeta(meta) {\n this.tbodyElement.scrollTop = meta.scrollTop;\n this.tbodyElement.scrollLeft = meta.scrollLeft;\n if (this.columnDistribution === meta.columnDistribution &&\n this.columns.length === meta.columnWidths.length) {\n const widths = meta.columnWidths;\n for (let i = 0, iEnd = widths.length; i < iEnd; ++i) {\n this.columns[i].width = widths[i];\n }\n this.reflow();\n if (meta.focusCursor) {\n const [rowIndex, columnIndex] = meta.focusCursor;\n const row = this.rows[rowIndex - this.rows[0].index];\n row?.cells[columnIndex]?.htmlElement.focus();\n }\n }\n }\n /**\n * Returns the column with the provided ID.\n *\n * @param id\n * The ID of the column.\n */\n getColumn(id) {\n const columns = this.dataGrid.enabledColumns;\n if (!columns) {\n return;\n }\n const columnIndex = columns.indexOf(id);\n if (columnIndex < 0) {\n return;\n }\n return this.columns[columnIndex];\n }\n /**\n * Returns the row with the provided ID.\n *\n * @param id\n * The ID of the row.\n */\n getRow(id) {\n return this.rows.find((row) => row.id === id);\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return Table;\n });\n _registerModule(_modules, 'Data/Modifiers/ChainModifier.js', [_modules['Data/Modifiers/DataModifier.js'], _modules['Core/Utilities.js']], function (DataModifier, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Dawid Dragula\n *\n * */\n const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Modifies a table with the help of modifiers in an ordered chain.\n *\n */\n class ChainModifier extends DataModifier {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the modifier chain.\n *\n * @param {Partial<ChainModifier.Options>} [options]\n * Options to configure the modifier chain.\n *\n * @param {...DataModifier} [chain]\n * Ordered chain of modifiers.\n */\n constructor(options, ...chain) {\n super();\n this.chain = chain;\n this.options = merge(ChainModifier.defaultOptions, options);\n const optionsChain = this.options.chain || [];\n for (let i = 0, iEnd = optionsChain.length, modifierOptions, ModifierClass; i < iEnd; ++i) {\n modifierOptions = optionsChain[i];\n if (!modifierOptions.type) {\n continue;\n }\n ModifierClass = DataModifier.types[modifierOptions.type];\n if (ModifierClass) {\n chain.push(new ModifierClass(modifierOptions));\n }\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Adds a configured modifier to the end of the modifier chain. Please note,\n * that the modifier can be added multiple times.\n *\n * @param {DataModifier} modifier\n * Configured modifier to add.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n */\n add(modifier, eventDetail) {\n this.emit({\n type: 'addModifier',\n detail: eventDetail,\n modifier\n });\n this.chain.push(modifier);\n this.emit({\n type: 'addModifier',\n detail: eventDetail,\n modifier\n });\n }\n /**\n * Clears all modifiers from the chain.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n */\n clear(eventDetail) {\n this.emit({\n type: 'clearChain',\n detail: eventDetail\n });\n this.chain.length = 0;\n this.emit({\n type: 'afterClearChain',\n detail: eventDetail\n });\n }\n /**\n * Applies several modifications to the table and returns a modified copy of\n * the given table.\n *\n * @param {Highcharts.DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<Highcharts.DataTable>}\n * Table with `modified` property as a reference.\n */\n async modify(table, eventDetail) {\n const modifiers = (this.options.reverse ?\n this.chain.slice().reverse() :\n this.chain.slice());\n if (table.modified === table) {\n table.modified = table.clone(false, eventDetail);\n }\n let modified = table;\n for (let i = 0, iEnd = modifiers.length; i < iEnd; ++i) {\n try {\n await modifiers[i].modify(modified, eventDetail);\n }\n catch (error) {\n this.emit({\n type: 'error',\n detail: eventDetail,\n table\n });\n throw error;\n }\n modified = modified.modified;\n }\n table.modified = modified;\n return table;\n }\n /**\n * Applies partial modifications of a cell change to the property `modified`\n * of the given modified table.\n *\n * *Note:* The `modified` property of the table gets replaced.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {string} columnName\n * Column name of changed cell.\n *\n * @param {number|undefined} rowIndex\n * Row index of changed cell.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Changed cell value.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyCell(table, columnName, rowIndex, cellValue, eventDetail) {\n const modifiers = (this.options.reverse ?\n this.chain.reverse() :\n this.chain);\n if (modifiers.length) {\n let clone = table.clone();\n for (let i = 0, iEnd = modifiers.length; i < iEnd; ++i) {\n modifiers[i].modifyCell(clone, columnName, rowIndex, cellValue, eventDetail);\n clone = clone.modified;\n }\n table.modified = clone;\n }\n return table;\n }\n /**\n * Applies partial modifications of column changes to the property\n * `modified` of the given table.\n *\n * *Note:* The `modified` property of the table gets replaced.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Changed columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex=0]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyColumns(table, columns, rowIndex, eventDetail) {\n const modifiers = (this.options.reverse ?\n this.chain.reverse() :\n this.chain.slice());\n if (modifiers.length) {\n let clone = table.clone();\n for (let i = 0, iEnd = modifiers.length; i < iEnd; ++i) {\n modifiers[i].modifyColumns(clone, columns, rowIndex, eventDetail);\n clone = clone.modified;\n }\n table.modified = clone;\n }\n return table;\n }\n /**\n * Applies partial modifications of row changes to the property `modified`\n * of the given table.\n *\n * *Note:* The `modified` property of the table gets replaced.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Array<(Highcharts.DataTableRow|Highcharts.DataTableRowObject)>} rows\n * Changed rows.\n *\n * @param {number} [rowIndex]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyRows(table, rows, rowIndex, eventDetail) {\n const modifiers = (this.options.reverse ?\n this.chain.reverse() :\n this.chain.slice());\n if (modifiers.length) {\n let clone = table.clone();\n for (let i = 0, iEnd = modifiers.length; i < iEnd; ++i) {\n modifiers[i].modifyRows(clone, rows, rowIndex, eventDetail);\n clone = clone.modified;\n }\n table.modified = clone;\n }\n return table;\n }\n /**\n * Applies several modifications to the table.\n *\n * *Note:* The `modified` property of the table gets replaced.\n *\n * @param {DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table as a reference.\n *\n * @emits ChainDataModifier#execute\n * @emits ChainDataModifier#afterExecute\n */\n modifyTable(table, eventDetail) {\n const chain = this;\n chain.emit({\n type: 'modify',\n detail: eventDetail,\n table\n });\n const modifiers = (chain.options.reverse ?\n chain.chain.reverse() :\n chain.chain.slice());\n let modified = table.modified;\n for (let i = 0, iEnd = modifiers.length, modifier; i < iEnd; ++i) {\n modifier = modifiers[i];\n modified = modifier.modifyTable(modified, eventDetail).modified;\n }\n table.modified = modified;\n chain.emit({\n type: 'afterModify',\n detail: eventDetail,\n table\n });\n return table;\n }\n /**\n * Removes a configured modifier from all positions in the modifier chain.\n *\n * @param {DataModifier} modifier\n * Configured modifier to remove.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n */\n remove(modifier, eventDetail) {\n const modifiers = this.chain;\n this.emit({\n type: 'removeModifier',\n detail: eventDetail,\n modifier\n });\n modifiers.splice(modifiers.indexOf(modifier), 1);\n this.emit({\n type: 'afterRemoveModifier',\n detail: eventDetail,\n modifier\n });\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default option for the ordered modifier chain.\n */\n ChainModifier.defaultOptions = {\n type: 'Chain'\n };\n DataModifier.registerType('Chain', ChainModifier);\n /* *\n *\n * Default Export\n *\n * */\n\n return ChainModifier;\n });\n _registerModule(_modules, 'Data/Modifiers/SortModifier.js', [_modules['Data/Modifiers/DataModifier.js'], _modules['Data/DataTable.js'], _modules['Core/Utilities.js']], function (DataModifier, DataTable, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Dawid Dragula\n *\n * */\n const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Sort table rows according to values of a column.\n *\n */\n class SortModifier extends DataModifier {\n /* *\n *\n * Static Functions\n *\n * */\n static ascending(a, b) {\n return ((a || 0) < (b || 0) ? -1 :\n (a || 0) > (b || 0) ? 1 :\n 0);\n }\n static descending(a, b) {\n return ((b || 0) < (a || 0) ? -1 :\n (b || 0) > (a || 0) ? 1 :\n 0);\n }\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the range modifier.\n *\n * @param {Partial<RangeDataModifier.Options>} [options]\n * Options to configure the range modifier.\n */\n constructor(options) {\n super();\n this.options = merge(SortModifier.defaultOptions, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Returns index and row for sort reference.\n *\n * @private\n *\n * @param {Highcharts.DataTable} table\n * Table with rows to reference.\n *\n * @return {Array<SortModifier.RowReference>}\n * Array of row references.\n */\n getRowReferences(table) {\n const rows = table.getRows(), rowReferences = [];\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rowReferences.push({\n index: i,\n row: rows[i]\n });\n }\n return rowReferences;\n }\n /**\n * Applies partial modifications of a cell change to the property `modified`\n * of the given modified table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {string} columnName\n * Column name of changed cell.\n *\n * @param {number|undefined} rowIndex\n * Row index of changed cell.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Changed cell value.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyCell(table, columnName, rowIndex, cellValue, eventDetail) {\n const modifier = this, { orderByColumn, orderInColumn } = modifier.options;\n if (columnName === orderByColumn) {\n if (orderInColumn) {\n table.modified.setCell(columnName, rowIndex, cellValue);\n table.modified.setColumn(orderInColumn, modifier\n .modifyTable(new DataTable({\n columns: table\n .getColumns([orderByColumn, orderInColumn])\n }))\n .modified\n .getColumn(orderInColumn));\n }\n else {\n modifier.modifyTable(table, eventDetail);\n }\n }\n return table;\n }\n /**\n * Applies partial modifications of column changes to the property\n * `modified` of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Changed columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex=0]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyColumns(table, columns, rowIndex, eventDetail) {\n const modifier = this, { orderByColumn, orderInColumn } = modifier.options, columnNames = Object.keys(columns);\n if (columnNames.indexOf(orderByColumn) > -1) {\n if (orderInColumn &&\n columns[columnNames[0]].length) {\n table.modified.setColumns(columns, rowIndex);\n table.modified.setColumn(orderInColumn, modifier\n .modifyTable(new DataTable({\n columns: table\n .getColumns([orderByColumn, orderInColumn])\n }))\n .modified\n .getColumn(orderInColumn));\n }\n else {\n modifier.modifyTable(table, eventDetail);\n }\n }\n return table;\n }\n /**\n * Applies partial modifications of row changes to the property `modified`\n * of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Array<(Highcharts.DataTableRow|Highcharts.DataTableRowObject)>} rows\n * Changed rows.\n *\n * @param {number} [rowIndex]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyRows(table, rows, rowIndex, eventDetail) {\n const modifier = this, { orderByColumn, orderInColumn } = modifier.options;\n if (orderInColumn &&\n rows.length) {\n table.modified.setRows(rows, rowIndex);\n table.modified.setColumn(orderInColumn, modifier\n .modifyTable(new DataTable({\n columns: table\n .getColumns([orderByColumn, orderInColumn])\n }))\n .modified\n .getColumn(orderInColumn));\n }\n else {\n modifier.modifyTable(table, eventDetail);\n }\n return table;\n }\n /**\n * Sorts rows in the table.\n *\n * @param {DataTable} table\n * Table to sort in.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table with `modified` property as a reference.\n */\n modifyTable(table, eventDetail) {\n const modifier = this;\n modifier.emit({ type: 'modify', detail: eventDetail, table });\n const columnNames = table.getColumnNames(), rowCount = table.getRowCount(), rowReferences = this.getRowReferences(table), { direction, orderByColumn, orderInColumn } = modifier.options, compare = (direction === 'asc' ?\n SortModifier.ascending :\n SortModifier.descending), orderByColumnIndex = columnNames.indexOf(orderByColumn), modified = table.modified;\n if (orderByColumnIndex !== -1) {\n rowReferences.sort((a, b) => compare(a.row[orderByColumnIndex], b.row[orderByColumnIndex]));\n }\n if (orderInColumn) {\n const column = [];\n for (let i = 0; i < rowCount; ++i) {\n column[rowReferences[i].index] = i;\n }\n modified.setColumns({ [orderInColumn]: column });\n }\n else {\n const originalIndexes = [];\n const rows = [];\n let rowReference;\n for (let i = 0; i < rowCount; ++i) {\n rowReference = rowReferences[i];\n originalIndexes.push(modified.getOriginalRowIndex(rowReference.index));\n rows.push(rowReference.row);\n }\n modified.setRows(rows, 0);\n modified.setOriginalRowIndexes(originalIndexes);\n }\n modifier.emit({ type: 'afterModify', detail: eventDetail, table });\n return table;\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default options to group table rows.\n */\n SortModifier.defaultOptions = {\n type: 'Sort',\n direction: 'desc',\n orderByColumn: 'y'\n };\n DataModifier.registerType('Sort', SortModifier);\n /* *\n *\n * Default Export\n *\n * */\n\n return SortModifier;\n });\n _registerModule(_modules, 'DataGrid/Querying/SortingController.js', [_modules['Data/Modifiers/SortModifier.js']], function (SortModifier) {\n /* *\n *\n * DataGrid Sorting Controller class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that manages one of the data grid querying types - sorting.\n */\n class SortingController {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs the SortingController instance.\n *\n * @param dataGrid\n * The data grid instance.\n */\n constructor(dataGrid) {\n /**\n * The flag that indicates if the data should be updated because of the\n * change in the sorting options.\n */\n this.shouldBeUpdated = false;\n this.dataGrid = dataGrid;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Sets the sorting state. If the new sorting state is different than the\n * current one, the `shouldBeUpdated` flag is set to `true`. If the\n * same, the flag is set to `false`.\n *\n * @param order\n * The sorting order.\n *\n * @param columnId\n * The column ID to sort by.\n */\n setSorting(order, columnId) {\n if (this.currentSorting?.columnId !== columnId ||\n this.currentSorting?.order !== order) {\n this.shouldBeUpdated = true;\n this.currentSorting = {\n columnId,\n order\n };\n }\n this.modifier = this.createModifier();\n }\n /**\n * Returns the sorting options from the data grid options.\n */\n getSortingOptions() {\n const dataGrid = this.dataGrid, { columnOptionsMap } = dataGrid;\n if (!columnOptionsMap) {\n return { order: null };\n }\n const columnIDs = Object.keys(columnOptionsMap);\n let foundOrder = null;\n let foundColumnId;\n for (let i = columnIDs.length - 1; i > -1; --i) {\n const columnId = columnIDs[i];\n const columnOptions = columnOptionsMap[columnId];\n const order = columnOptions.sorting?.order;\n if (order) {\n if (foundColumnId) {\n // eslint-disable-next-line no-console\n console.warn('DataGrid: Only one column can be sorted at a time. ' +\n 'Data will be sorted only by the last found column ' +\n `with the sorting order defined in the options: \"${foundColumnId}\".`);\n break;\n }\n foundOrder = order;\n foundColumnId = columnId;\n }\n }\n return {\n columnId: foundColumnId,\n order: foundOrder\n };\n }\n /**\n * Loads sorting options from the data grid options.\n */\n loadOptions() {\n const stateFromOptions = this.getSortingOptions();\n if (stateFromOptions.columnId !== this.initialSorting?.columnId ||\n stateFromOptions.order !== this.initialSorting?.order) {\n this.initialSorting = stateFromOptions;\n this.setSorting(stateFromOptions.order, stateFromOptions.columnId);\n }\n }\n /**\n * Returns the sorting modifier based on the loaded sorting options.\n */\n createModifier() {\n if (!this.currentSorting) {\n return;\n }\n const { columnId, order } = this.currentSorting;\n if (!order) {\n return;\n }\n return new SortModifier({\n orderByColumn: columnId,\n direction: order\n });\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return SortingController;\n });\n _registerModule(_modules, 'DataGrid/Querying/QueryingController.js', [_modules['Data/Modifiers/ChainModifier.js'], _modules['DataGrid/Querying/SortingController.js']], function (ChainModifier, SortingController) {\n /* *\n *\n * DataGrid Querying Controller class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n /* *\n *\n * Imports\n *\n * */\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that manage data modification of the visible data in the data grid.\n * It manages the modifiers that are applied to the data table.\n */\n class QueryingController {\n /* *\n *\n * Constructor\n *\n * */\n constructor(dataGrid) {\n this.dataGrid = dataGrid;\n this.sorting = new SortingController(dataGrid);\n /// this.filtering = new FilteringController(dataGrid);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Proceeds with the data modification if needed.\n *\n * @param force\n * If the data should be modified even if the significant options are not\n * changed.\n */\n async proceed(force = false) {\n if (force ||\n this.sorting.shouldBeUpdated // ||\n // this.filtering.shouldBeUpdated\n ) {\n await this.modifyData();\n }\n }\n /**\n * Load all options needed to generate the modifiers.\n */\n loadOptions() {\n this.sorting.loadOptions();\n }\n /**\n * Check if the data table does not need to be modified.\n */\n willNotModify() {\n return (!this.sorting.modifier\n // && !this.filtering.modifier\n );\n }\n /**\n * Apply all modifiers to the data table.\n */\n async modifyData() {\n const originalDataTable = this.dataGrid.dataTable;\n if (!originalDataTable) {\n return;\n }\n const modifiers = [];\n // TODO: Implement filtering\n // if (this.filtering.modifier) {\n // modifiers.push(this.filtering.modifier);\n // }\n if (this.sorting.modifier) {\n modifiers.push(this.sorting.modifier);\n }\n if (modifiers.length > 0) {\n const chainModifier = new ChainModifier({}, ...modifiers);\n const dataTableCopy = originalDataTable.clone();\n await chainModifier.modify(dataTableCopy.modified);\n this.dataGrid.presentationTable = dataTableCopy.modified;\n }\n else {\n this.dataGrid.presentationTable = originalDataTable.modified;\n }\n this.sorting.shouldBeUpdated = false;\n /// this.filtering.shouldBeUpdated = false;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return QueryingController;\n });\n _registerModule(_modules, 'DataGrid/DataGrid.js', [_modules['DataGrid/Accessibility/Accessibility.js'], _modules['Core/Renderer/HTML/AST.js'], _modules['DataGrid/Credits.js'], _modules['DataGrid/Defaults.js'], _modules['DataGrid/Utils.js'], _modules['Data/DataTable.js'], _modules['DataGrid/Globals.js'], _modules['DataGrid/Table/Table.js'], _modules['Core/Utilities.js'], _modules['DataGrid/Querying/QueryingController.js']], function (Accessibility, AST, Credits, Defaults, DataGridUtils, DataTable, Globals, Table, U, QueryingController) {\n /* *\n *\n * DataGrid class\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DataGridUtils;\n const { win } = Globals;\n const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Creates a grid structure (table).\n */\n class DataGrid {\n // Implementation\n static dataGrid(renderTo, options, async) {\n if (async) {\n return new Promise((resolve) => {\n void new DataGrid(renderTo, options, (dataGrid) => {\n resolve(dataGrid);\n });\n });\n }\n return new DataGrid(renderTo, options);\n }\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a new data grid.\n *\n * @param renderTo\n * The render target (container) of the data grid.\n *\n * @param options\n * The options of the data grid.\n *\n * @param afterLoadCallback\n * The callback that is called after the data grid is loaded.\n */\n constructor(renderTo, options, afterLoadCallback) {\n /**\n * The user options declared for the columns as an object of column ID to\n * column options.\n */\n this.columnOptionsMap = {};\n /**\n * The options that were declared by the user when creating the data grid\n * or when updating it.\n */\n this.userOptions = {};\n this.loadUserOptions(options);\n this.querying = new QueryingController(this);\n this.initContainers(renderTo);\n this.initAccessibility();\n this.loadDataTable(this.options?.dataTable);\n this.querying.loadOptions();\n void this.querying.proceed().then(() => {\n this.renderViewport();\n afterLoadCallback?.(this);\n });\n DataGrid.dataGrids.push(this);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Initializes the accessibility controller.\n */\n initAccessibility() {\n if (!this.options?.accessibility?.enabled) {\n return;\n }\n // Can be moved to a separate module in the future (if needed).\n this.accessibility = new Accessibility(this);\n }\n /**\n * Initializes the container of the data grid.\n *\n * @param renderTo\n * The render target (html element or id) of the data grid.\n *\n */\n initContainers(renderTo) {\n const container = (typeof renderTo === 'string') ?\n win.document.getElementById(renderTo) : renderTo;\n // Display an error if the renderTo is wrong\n if (!container) {\n // eslint-disable-next-line no-console\n console.error(`\n Rendering div not found. It is unable to find the HTML element\n to render the DataGrid in.\n `);\n return;\n }\n this.container = container;\n this.container.innerHTML = AST.emptyHTML;\n this.contentWrapper = makeHTMLElement('div', {\n className: Globals.classNames.container\n }, this.container);\n }\n /**\n * Loads the new user options to all the important fields (`userOptions`,\n * `options` and `columnOptionsMap`).\n *\n * @param newOptions\n * The options that were declared by the user.\n *\n * @param oneToOne\n * When `false` (default), the existing column options will be merged with\n * the ones that are currently defined in the user options. When `true`,\n * the columns not defined in the new options will be removed.\n */\n loadUserOptions(newOptions, oneToOne = false) {\n // Operate on a copy of the options argument\n newOptions = merge(newOptions);\n if (newOptions.columns) {\n if (oneToOne) {\n this.loadColumnOptionsOneToOne(newOptions.columns);\n }\n else {\n this.loadColumnOptions(newOptions.columns);\n }\n delete newOptions.columns;\n }\n this.userOptions = merge(this.userOptions, newOptions);\n this.options = merge(this.options ?? Defaults.defaultOptions, this.userOptions);\n const columnOptionsArray = this.options?.columns;\n if (!columnOptionsArray) {\n return;\n }\n const columnOptionsObj = {};\n for (let i = 0, iEnd = columnOptionsArray?.length ?? 0; i < iEnd; ++i) {\n columnOptionsObj[columnOptionsArray[i].id] = columnOptionsArray[i];\n }\n this.columnOptionsMap = columnOptionsObj;\n }\n /**\n * Loads the new column options to the userOptions field.\n *\n * @param newColumnOptions\n * The new column options that should be loaded.\n *\n * @param overwrite\n * Whether to overwrite the existing column options with the new ones.\n * Default is `false`.\n */\n loadColumnOptions(newColumnOptions, overwrite = false) {\n if (!this.userOptions.columns) {\n this.userOptions.columns = [];\n }\n const columnOptions = this.userOptions.columns;\n for (let i = 0, iEnd = newColumnOptions.length; i < iEnd; ++i) {\n const newOptions = newColumnOptions[i];\n const indexInPrevOptions = columnOptions.findIndex((prev) => prev.id === newOptions.id);\n // If the new column options contain only the id.\n if (Object.keys(newOptions).length < 2) {\n if (overwrite && indexInPrevOptions !== -1) {\n columnOptions.splice(indexInPrevOptions, 1);\n }\n continue;\n }\n if (indexInPrevOptions === -1) {\n columnOptions.push(newOptions);\n }\n else if (overwrite) {\n columnOptions[indexInPrevOptions] = newOptions;\n }\n else {\n columnOptions[indexInPrevOptions] = merge(columnOptions[indexInPrevOptions], newOptions);\n }\n }\n if (columnOptions.length < 1) {\n delete this.userOptions.columns;\n }\n }\n /**\n * Loads the new column options to the userOptions field in a one-to-one\n * manner. It means that all the columns that are not defined in the new\n * options will be removed.\n *\n * @param newColumnOptions\n * The new column options that should be loaded.\n */\n loadColumnOptionsOneToOne(newColumnOptions) {\n const prevColumnOptions = this.userOptions.columns;\n const columnOptions = [];\n let prevOptions;\n for (let i = 0, iEnd = newColumnOptions.length; i < iEnd; ++i) {\n const newOptions = newColumnOptions[i];\n const indexInPrevOptions = prevColumnOptions?.findIndex((prev) => prev.id === newOptions.id);\n if (indexInPrevOptions !== void 0 && indexInPrevOptions !== -1) {\n prevOptions = prevColumnOptions?.[indexInPrevOptions];\n }\n const resultOptions = merge(prevOptions ?? {}, newOptions);\n if (Object.keys(resultOptions).length > 1) {\n columnOptions.push(resultOptions);\n }\n }\n this.userOptions.columns = columnOptions;\n }\n /**\n * Updates the data grid with new options.\n *\n * @param options\n * The options of the data grid that should be updated. If not provided,\n * the update will be proceeded based on the `this.userOptions` property.\n * The `column` options are merged using the `id` property as a key.\n *\n * @param render\n * Whether to re-render the data grid after updating the options.\n *\n * @param oneToOne\n * When `false` (default), the existing column options will be merged with\n * the ones that are currently defined in the user options. When `true`,\n * the columns not defined in the new options will be removed.\n */\n async update(options = {}, render = true, oneToOne = false) {\n this.loadUserOptions(options, oneToOne);\n let newDataTable = false;\n if (!this.dataTable || options.dataTable) {\n this.userOptions.dataTable = options.dataTable;\n (this.options ?? {}).dataTable = options.dataTable;\n this.loadDataTable(this.options?.dataTable);\n newDataTable = true;\n }\n this.querying.loadOptions();\n if (render) {\n await this.querying.proceed(newDataTable);\n this.renderViewport();\n }\n }\n /**\n * Updates the column of the data grid with new options.\n *\n * @param columnId\n * The ID of the column that should be updated.\n *\n * @param options\n * The options of the columns that should be updated. If null,\n * column options for this column ID will be removed.\n *\n * @param render\n * Whether to re-render the data grid after updating the columns.\n *\n * @param overwrite\n * If true, the column options will be updated by replacing the existing\n * options with the new ones instead of merging them.\n */\n async updateColumn(columnId, options, render = true, overwrite = false) {\n this.loadColumnOptions([{\n id: columnId,\n ...options\n }], overwrite);\n await this.update(void 0, render);\n }\n /**\n * Hovers the row with the provided index. It removes the hover effect from\n * the previously hovered row.\n *\n * @param rowIndex\n * The index of the row.\n */\n hoverRow(rowIndex) {\n const rows = this.viewport?.rows;\n if (!rows) {\n return;\n }\n const firstRowIndex = this.viewport?.rows[0]?.index ?? 0;\n if (this.hoveredRowIndex !== void 0) {\n rows[this.hoveredRowIndex - firstRowIndex]?.setHoveredState(false);\n }\n if (rowIndex !== void 0) {\n rows[rowIndex - firstRowIndex]?.setHoveredState(true);\n }\n this.hoveredRowIndex = rowIndex;\n }\n /**\n * Hovers the column with the provided ID. It removes the hover effect from\n * the previously hovered column.\n *\n * @param columnId\n * The ID of the column.\n */\n hoverColumn(columnId) {\n const vp = this.viewport;\n if (!vp) {\n return;\n }\n if (this.hoveredColumnId) {\n vp.getColumn(this.hoveredColumnId)?.setHoveredState(false);\n }\n if (columnId) {\n vp.getColumn(columnId)?.setHoveredState(true);\n }\n this.hoveredColumnId = columnId;\n }\n /**\n * Renders the viewport of the data grid. If the data grid is already\n * rendered, it will be destroyed and re-rendered with the new data.\n * @internal\n */\n renderViewport() {\n let vp = this.viewport;\n const viewportMeta = vp?.getStateMeta();\n this.enabledColumns = this.getEnabledColumnIDs();\n this.credits?.destroy();\n vp?.destroy();\n if (this.contentWrapper) {\n this.contentWrapper.innerHTML = AST.emptyHTML;\n }\n if (this.enabledColumns.length > 0) {\n this.renderTable();\n vp = this.viewport;\n if (viewportMeta && vp) {\n vp.applyStateMeta(viewportMeta);\n }\n }\n else {\n this.renderNoData();\n }\n if (this.options?.credits?.enabled) {\n this.credits = new Credits(this);\n }\n this.viewport?.reflow();\n }\n /**\n * Renders the table (viewport) of the data grid.\n */\n renderTable() {\n this.tableElement = makeHTMLElement('table', {\n className: Globals.classNames.tableElement\n }, this.contentWrapper);\n this.viewport = new Table(this, this.tableElement);\n // Accessibility\n this.tableElement.setAttribute('aria-rowcount', this.dataTable?.getRowCount() ?? 0);\n }\n /**\n * Renders a message that there is no data to display.\n */\n renderNoData() {\n makeHTMLElement('div', {\n className: Globals.classNames.noData,\n innerText: this.options?.lang?.noData\n }, this.contentWrapper);\n }\n /**\n * Returns the array of IDs of columns that should be displayed in the data\n * grid, in the correct order.\n */\n getEnabledColumnIDs() {\n const { columnOptionsMap } = this;\n const header = this.options?.header;\n const headerColumns = this.getColumnIds(header || [], false);\n const columnsIncluded = this.options?.rendering?.columns?.included || (headerColumns && headerColumns.length > 0 ?\n headerColumns : this.dataTable?.getColumnNames());\n if (!columnsIncluded?.length) {\n return [];\n }\n if (!columnOptionsMap) {\n return columnsIncluded;\n }\n let columnName;\n const result = [];\n for (let i = 0, iEnd = columnsIncluded.length; i < iEnd; ++i) {\n columnName = columnsIncluded[i];\n if (columnOptionsMap?.[columnName]?.enabled !== false) {\n result.push(columnName);\n }\n }\n return result;\n }\n loadDataTable(tableOptions) {\n // If the table is passed as a reference, it should be used instead of\n // creating a new one.\n if (tableOptions?.id) {\n this.dataTable = tableOptions;\n this.presentationTable = this.dataTable.modified;\n return;\n }\n this.dataTable = this.presentationTable =\n new DataTable(tableOptions);\n }\n /**\n * Extracts all references to columnIds on all levels below defined level\n * in the settings.header structure.\n *\n * @param columns\n * Structure that we start calculation\n *\n * @param [onlyEnabledColumns=true]\n * Extract all columns from header or columns filtered by enabled param\n * @returns\n */\n getColumnIds(columns, onlyEnabledColumns = true) {\n let columnIds = [];\n const { enabledColumns } = this;\n for (const column of columns) {\n const columnId = typeof column === 'string' ? column : column.columnId;\n if (columnId &&\n (!onlyEnabledColumns || (enabledColumns?.includes(columnId)))) {\n columnIds.push(columnId);\n }\n if (typeof column !== 'string' && column.columns) {\n columnIds = columnIds.concat(this.getColumnIds(column.columns, onlyEnabledColumns));\n }\n }\n return columnIds;\n }\n /**\n * Destroys the data grid.\n */\n destroy() {\n const dgIndex = DataGrid.dataGrids.findIndex((dg) => dg === this);\n this.viewport?.destroy();\n if (this.container) {\n this.container.innerHTML = AST.emptyHTML;\n this.container.classList.remove(Globals.classNames.container);\n }\n // Clear all properties\n Object.keys(this).forEach((key) => {\n delete this[key];\n });\n DataGrid.dataGrids.splice(dgIndex, 1);\n }\n /**\n * Returns the current dataGrid data as a JSON string.\n *\n * @return\n * JSON representation of the data\n */\n getJSON() {\n const json = this.viewport?.dataTable.modified.columns;\n if (!this.enabledColumns || !json) {\n return '{}';\n }\n for (const key of Object.keys(json)) {\n if (this.enabledColumns.indexOf(key) === -1) {\n delete json[key];\n }\n }\n return JSON.stringify(json);\n }\n /**\n * Returns the current DataGrid options as a JSON string.\n *\n * @param onlyUserOptions\n * Whether to return only the user options or all options (user options\n * merged with the default ones). Default is `true`.\n *\n * @returns\n * Options as a JSON string.\n */\n getOptionsJSON(onlyUserOptions = true) {\n const optionsCopy = onlyUserOptions ? merge(this.userOptions) : merge(this.options);\n if (optionsCopy.dataTable?.id) {\n optionsCopy.dataTable = {\n columns: optionsCopy.dataTable.columns\n };\n }\n return JSON.stringify(optionsCopy);\n }\n }\n /* *\n *\n * Properties\n *\n * */\n /**\n * An array containing the current DataGrid objects in the page.\n */\n DataGrid.dataGrids = [];\n /* *\n *\n * Default Export\n *\n * */\n\n return DataGrid;\n });\n _registerModule(_modules, 'Data/DataPoolDefaults.js', [], function () {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n const DataPoolDefaults = {\n connectors: []\n };\n /* *\n *\n * Export Defaults\n *\n * */\n\n return DataPoolDefaults;\n });\n _registerModule(_modules, 'Data/DataPool.js', [_modules['Data/Connectors/DataConnector.js'], _modules['Data/DataPoolDefaults.js'], _modules['Core/Utilities.js']], function (DataConnector, DataPoolDefaults, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n /* *\n *\n * Class\n *\n * */\n /**\n * Data pool to load connectors on-demand.\n *\n * @class\n * @name Data.DataPool\n *\n * @param {Data.DataPoolOptions} options\n * Pool options with all connectors.\n */\n class DataPool {\n /* *\n *\n * Constructor\n *\n * */\n constructor(options = DataPoolDefaults) {\n options.connectors = (options.connectors || []);\n this.connectors = {};\n this.options = options;\n this.waiting = {};\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Emits an event on this data pool to all registered callbacks of the given\n * event.\n * @private\n *\n * @param {DataTable.Event} e\n * Event object with event information.\n */\n emit(e) {\n U.fireEvent(this, e.type, e);\n }\n /**\n * Loads the connector.\n *\n * @function Data.DataPool#getConnector\n *\n * @param {string} connectorId\n * ID of the connector.\n *\n * @return {Promise<Data.DataConnector>}\n * Returns the connector.\n */\n getConnector(connectorId) {\n const connector = this.connectors[connectorId];\n // Already loaded\n if (connector) {\n return Promise.resolve(connector);\n }\n let waitingList = this.waiting[connectorId];\n // Start loading\n if (!waitingList) {\n waitingList = this.waiting[connectorId] = [];\n const connectorOptions = this.getConnectorOptions(connectorId);\n if (!connectorOptions) {\n throw new Error(`Connector '${connectorId}' not found.`);\n }\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this\n .loadConnector(connectorOptions)\n .then((connector) => {\n delete this.waiting[connectorId];\n for (let i = 0, iEnd = waitingList.length; i < iEnd; ++i) {\n waitingList[i][0](connector);\n }\n })['catch']((error) => {\n delete this.waiting[connectorId];\n for (let i = 0, iEnd = waitingList.length; i < iEnd; ++i) {\n waitingList[i][1](error);\n }\n });\n }\n // Add request to waiting list\n return new Promise((resolve, reject) => {\n waitingList.push([resolve, reject]);\n });\n }\n /**\n * Returns the IDs of all connectors.\n *\n * @private\n *\n * @return {Array<string>}\n * Names of all connectors.\n */\n getConnectorIds() {\n const connectors = this.options.connectors, connectorIds = [];\n for (let i = 0, iEnd = connectors.length; i < iEnd; ++i) {\n connectorIds.push(connectors[i].id);\n }\n return connectorIds;\n }\n /**\n * Loads the options of the connector.\n *\n * @private\n *\n * @param {string} connectorId\n * ID of the connector.\n *\n * @return {DataPoolConnectorOptions|undefined}\n * Returns the options of the connector, or `undefined` if not found.\n */\n getConnectorOptions(connectorId) {\n const connectors = this.options.connectors;\n for (let i = 0, iEnd = connectors.length; i < iEnd; ++i) {\n if (connectors[i].id === connectorId) {\n return connectors[i];\n }\n }\n }\n /**\n * Loads the connector table.\n *\n * @function Data.DataPool#getConnectorTable\n *\n * @param {string} connectorId\n * ID of the connector.\n *\n * @return {Promise<Data.DataTable>}\n * Returns the connector table.\n */\n getConnectorTable(connectorId) {\n return this\n .getConnector(connectorId)\n .then((connector) => connector.table);\n }\n /**\n * Tests whether the connector has never been requested.\n *\n * @param {string} connectorId\n * Name of the connector.\n *\n * @return {boolean}\n * Returns `true`, if the connector has never been requested, otherwise\n * `false`.\n */\n isNewConnector(connectorId) {\n return !this.connectors[connectorId];\n }\n /**\n * Creates and loads the connector.\n *\n * @private\n *\n * @param {Data.DataPoolConnectorOptions} options\n * Options of connector.\n *\n * @return {Promise<Data.DataConnector>}\n * Returns the connector.\n */\n loadConnector(options) {\n return new Promise((resolve, reject) => {\n this.emit({\n type: 'load',\n options\n });\n const ConnectorClass = DataConnector.types[options.type];\n if (!ConnectorClass) {\n throw new Error(`Connector type not found. (${options.type})`);\n }\n const connector = new ConnectorClass(options.options);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n connector\n .load()\n .then((connector) => {\n this.connectors[options.id] = connector;\n this.emit({\n type: 'afterLoad',\n options\n });\n resolve(connector);\n })['catch'](reject);\n });\n }\n /**\n * Registers a callback for a specific event.\n *\n * @function Highcharts.DataPool#on\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {Highcharts.EventCallbackFunction<Highcharts.DataPool>} callback\n * Function to register for an event callback.\n *\n * @return {Function}\n * Function to unregister callback from the event.\n */\n on(type, callback) {\n return U.addEvent(this, type, callback);\n }\n /**\n * Sets connector options under the specified `options.id`.\n *\n * @param {Data.DataPoolConnectorOptions} options\n * Connector options to set.\n */\n setConnectorOptions(options) {\n const connectors = this.options.connectors, instances = this.connectors;\n this.emit({\n type: 'setConnectorOptions',\n options\n });\n for (let i = 0, iEnd = connectors.length; i < iEnd; ++i) {\n if (connectors[i].id === options.id) {\n connectors.splice(i, 1);\n break;\n }\n }\n if (instances[options.id]) {\n instances[options.id].stopPolling();\n delete instances[options.id];\n }\n connectors.push(options);\n this.emit({\n type: 'afterSetConnectorOptions',\n options\n });\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Semantic version string of the DataPool class.\n * @internal\n */\n DataPool.version = '1.0.0';\n /* *\n *\n * Default Export\n *\n * */\n\n return DataPool;\n });\n _registerModule(_modules, 'Accessibility/HighContrastMode.js', [_modules['Core/Globals.js']], function (H) {\n /* *\n *\n * (c) 2009-2024 Øystein Moseng\n *\n * Handling for Windows High Contrast Mode.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n const { doc, isMS, win } = H;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Detect WHCM in the browser.\n *\n * @function Highcharts#isHighContrastModeActive\n * @private\n * @return {boolean} Returns true if the browser is in High Contrast mode.\n */\n function isHighContrastModeActive() {\n // Use media query on Edge, but not on IE\n const isEdge = /(Edg)/.test(win.navigator.userAgent);\n if (win.matchMedia && isEdge) {\n return win.matchMedia('(-ms-high-contrast: active)').matches;\n }\n // Test BG image for IE\n if (isMS && win.getComputedStyle) {\n const testDiv = doc.createElement('div');\n const imageSrc = 'data:image/gif;base64,' +\n 'R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n testDiv.style.backgroundImage = `url(${imageSrc})`; // #13071\n doc.body.appendChild(testDiv);\n const bi = (testDiv.currentStyle ||\n win.getComputedStyle(testDiv)).backgroundImage;\n doc.body.removeChild(testDiv);\n return bi === 'none';\n }\n // Other browsers use the forced-colors standard\n return win.matchMedia && win.matchMedia('(forced-colors: active)').matches;\n }\n /**\n * Force high contrast theme for the chart. The default theme is defined in\n * a separate file.\n *\n * @function Highcharts#setHighContrastTheme\n * @private\n * @param {Highcharts.AccessibilityChart} chart The chart to set the theme of.\n * @return {void}\n */\n function setHighContrastTheme(chart) {\n // We might want to add additional functionality here in the future for\n // storing the old state so that we can reset the theme if HC mode is\n // disabled. For now, the user will have to reload the page.\n chart.highContrastModeActive = true;\n // Apply theme to chart\n const theme = (chart.options.accessibility.highContrastTheme);\n chart.update(theme, false);\n const hasCustomColors = theme.colors?.length > 1;\n // Force series colors (plotOptions is not enough)\n chart.series.forEach(function (s) {\n const plotOpts = theme.plotOptions[s.type] || {};\n const fillColor = hasCustomColors && s.colorIndex !== void 0 ?\n theme.colors[s.colorIndex] :\n plotOpts.color || 'window';\n const seriesOptions = {\n color: plotOpts.color || 'windowText',\n colors: hasCustomColors ?\n theme.colors : [plotOpts.color || 'windowText'],\n borderColor: plotOpts.borderColor || 'window',\n fillColor\n };\n s.update(seriesOptions, false);\n if (s.points) {\n // Force point colors if existing\n s.points.forEach(function (p) {\n if (p.options && p.options.color) {\n p.update({\n color: plotOpts.color || 'windowText',\n borderColor: plotOpts.borderColor || 'window'\n }, false);\n }\n });\n }\n });\n // The redraw for each series and after is required for 3D pie\n // (workaround)\n chart.redraw();\n }\n /* *\n *\n * Default Export\n *\n * */\n const whcm = {\n isHighContrastModeActive,\n setHighContrastTheme\n };\n\n return whcm;\n });\n _registerModule(_modules, 'Data/Converters/CSVConverter.js', [_modules['Data/Converters/DataConverter.js'], _modules['Core/Utilities.js']], function (DataConverter, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Christer Vasseng\n * - Gøran Slettemark\n * - Sophie Bremer\n *\n * */\n const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Handles parsing and transforming CSV to a table.\n *\n * @private\n */\n class CSVConverter extends DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the CSV parser.\n *\n * @param {CSVConverter.UserOptions} [options]\n * Options for the CSV parser.\n */\n constructor(options) {\n const mergedOptions = merge(CSVConverter.defaultOptions, options);\n super(mergedOptions);\n /* *\n *\n * Properties\n *\n * */\n this.columns = [];\n this.headers = [];\n this.dataTypes = [];\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Creates a CSV string from the datatable on the connector instance.\n *\n * @param {DataConnector} connector\n * Connector instance to export from.\n *\n * @param {CSVConverter.Options} [options]\n * Options used for the export.\n *\n * @return {string}\n * CSV string from the connector table.\n */\n export(connector, options = this.options) {\n const { useLocalDecimalPoint, lineDelimiter } = options, exportNames = (this.options.firstRowAsNames !== false);\n let { decimalPoint, itemDelimiter } = options;\n if (!decimalPoint) {\n decimalPoint = (itemDelimiter !== ',' && useLocalDecimalPoint ?\n (1.1).toLocaleString()[1] :\n '.');\n }\n if (!itemDelimiter) {\n itemDelimiter = (decimalPoint === ',' ? ';' : ',');\n }\n const columns = connector.getSortedColumns(options.usePresentationOrder), columnNames = Object.keys(columns), csvRows = [], columnsCount = columnNames.length;\n const rowArray = [];\n // Add the names as the first row if they should be exported\n if (exportNames) {\n csvRows.push(columnNames.map((columnName) => `\"${columnName}\"`).join(itemDelimiter));\n }\n for (let columnIndex = 0; columnIndex < columnsCount; columnIndex++) {\n const columnName = columnNames[columnIndex], column = columns[columnName], columnLength = column.length;\n const columnMeta = connector.whatIs(columnName);\n let columnDataType;\n if (columnMeta) {\n columnDataType = columnMeta.dataType;\n }\n for (let rowIndex = 0; rowIndex < columnLength; rowIndex++) {\n let cellValue = column[rowIndex];\n if (!rowArray[rowIndex]) {\n rowArray[rowIndex] = [];\n }\n // Prefer datatype from metadata\n if (columnDataType === 'string') {\n cellValue = '\"' + cellValue + '\"';\n }\n else if (typeof cellValue === 'number') {\n cellValue = String(cellValue).replace('.', decimalPoint);\n }\n else if (typeof cellValue === 'string') {\n cellValue = `\"${cellValue}\"`;\n }\n rowArray[rowIndex][columnIndex] = cellValue;\n // On the final column, push the row to the CSV\n if (columnIndex === columnsCount - 1) {\n // Trim repeated undefined values starting at the end\n // Currently, we export the first \"comma\" even if the\n // second value is undefined\n let i = columnIndex;\n while (rowArray[rowIndex].length > 2) {\n const cellVal = rowArray[rowIndex][i];\n if (cellVal !== void 0) {\n break;\n }\n rowArray[rowIndex].pop();\n i--;\n }\n csvRows.push(rowArray[rowIndex].join(itemDelimiter));\n }\n }\n }\n return csvRows.join(lineDelimiter);\n }\n /**\n * Initiates parsing of CSV\n *\n * @param {CSVConverter.UserOptions}[options]\n * Options for the parser\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits CSVDataParser#parse\n * @emits CSVDataParser#afterParse\n */\n parse(options, eventDetail) {\n const converter = this, dataTypes = converter.dataTypes, parserOptions = merge(this.options, options), { beforeParse, lineDelimiter, firstRowAsNames, itemDelimiter } = parserOptions;\n let lines, rowIt = 0, { csv, startRow, endRow } = parserOptions, column;\n converter.columns = [];\n converter.emit({\n type: 'parse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.headers\n });\n if (csv && beforeParse) {\n csv = beforeParse(csv);\n }\n if (csv) {\n lines = csv\n .replace(/\\r\\n|\\r/g, '\\n') // Windows | Mac\n .split(lineDelimiter || '\\n');\n if (!startRow || startRow < 0) {\n startRow = 0;\n }\n if (!endRow || endRow >= lines.length) {\n endRow = lines.length - 1;\n }\n if (!itemDelimiter) {\n converter.guessedItemDelimiter =\n converter.guessDelimiter(lines);\n }\n // If the first row contain names, add them to the\n // headers array and skip the row.\n if (firstRowAsNames) {\n const headers = lines[0].split(itemDelimiter || converter.guessedItemDelimiter || ',');\n // Remove \"\"s from the headers\n for (let i = 0; i < headers.length; i++) {\n headers[i] = headers[i].trim().replace(/^[\"']|[\"']$/g, '');\n }\n converter.headers = headers;\n startRow++;\n }\n let offset = 0;\n for (rowIt = startRow; rowIt <= endRow; rowIt++) {\n if (lines[rowIt][0] === '#') {\n offset++;\n }\n else {\n converter\n .parseCSVRow(lines[rowIt], rowIt - startRow - offset);\n }\n }\n if (dataTypes.length &&\n dataTypes[0].length &&\n dataTypes[0][1] === 'date' && // Format is a string date\n !converter.options.dateFormat) {\n converter.deduceDateFormat(converter.columns[0], null, true);\n }\n // Guess types.\n for (let i = 0, iEnd = converter.columns.length; i < iEnd; ++i) {\n column = converter.columns[i];\n for (let j = 0, jEnd = column.length; j < jEnd; ++j) {\n if (column[j] && typeof column[j] === 'string') {\n let cellValue = converter.asGuessedType(column[j]);\n if (cellValue instanceof Date) {\n cellValue = cellValue.getTime();\n }\n converter.columns[i][j] = cellValue;\n }\n }\n }\n }\n converter.emit({\n type: 'afterParse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.headers\n });\n }\n /**\n * Internal method that parses a single CSV row\n */\n parseCSVRow(columnStr, rowNumber) {\n const converter = this, columns = converter.columns || [], dataTypes = converter.dataTypes, { startColumn, endColumn } = converter.options, itemDelimiter = (converter.options.itemDelimiter ||\n converter.guessedItemDelimiter);\n let { decimalPoint } = converter.options;\n if (!decimalPoint || decimalPoint === itemDelimiter) {\n decimalPoint = converter.guessedDecimalPoint || '.';\n }\n let i = 0, c = '', token = '', actualColumn = 0, column = 0;\n const read = (j) => {\n c = columnStr[j];\n };\n const pushType = (type) => {\n if (dataTypes.length < column + 1) {\n dataTypes.push([type]);\n }\n if (dataTypes[column][dataTypes[column].length - 1] !== type) {\n dataTypes[column].push(type);\n }\n };\n const push = () => {\n if (startColumn > actualColumn || actualColumn > endColumn) {\n // Skip this column, but increment the column count (#7272)\n ++actualColumn;\n token = '';\n return;\n }\n // Save the type of the token.\n if (typeof token === 'string') {\n if (!isNaN(parseFloat(token)) && isFinite(token)) {\n token = parseFloat(token);\n pushType('number');\n }\n else if (!isNaN(Date.parse(token))) {\n token = token.replace(/\\//g, '-');\n pushType('date');\n }\n else {\n pushType('string');\n }\n }\n else {\n pushType('number');\n }\n if (columns.length < column + 1) {\n columns.push([]);\n }\n // Try to apply the decimal point, and check if the token then is a\n // number. If not, reapply the initial value\n if (typeof token !== 'number' &&\n converter.guessType(token) !== 'number' &&\n decimalPoint) {\n const initialValue = token;\n token = token.replace(decimalPoint, '.');\n if (converter.guessType(token) !== 'number') {\n token = initialValue;\n }\n }\n columns[column][rowNumber] = token;\n token = '';\n ++column;\n ++actualColumn;\n };\n if (!columnStr.trim().length) {\n return;\n }\n if (columnStr.trim()[0] === '#') {\n return;\n }\n for (; i < columnStr.length; i++) {\n read(i);\n if (c === '#') {\n // If there are hexvalues remaining (#13283)\n if (!/^#[A-F\\d]{3,3}|[A-F\\d]{6,6}/i.test(columnStr.substring(i))) {\n // The rest of the row is a comment\n push();\n return;\n }\n }\n // Quoted string\n if (c === '\"') {\n read(++i);\n while (i < columnStr.length) {\n if (c === '\"') {\n break;\n }\n token += c;\n read(++i);\n }\n }\n else if (c === itemDelimiter) {\n push();\n // Actual column data\n }\n else {\n token += c;\n }\n }\n push();\n }\n /**\n * Internal method that guesses the delimiter from the first\n * 13 lines of the CSV\n * @param {Array<string>} lines\n * The CSV, split into lines\n */\n guessDelimiter(lines) {\n let points = 0, commas = 0, guessed;\n const potDelimiters = {\n ',': 0,\n ';': 0,\n '\\t': 0\n }, linesCount = lines.length;\n for (let i = 0; i < linesCount; i++) {\n let inStr = false, c, cn, cl, token = '';\n // We should be able to detect dateformats within 13 rows\n if (i > 13) {\n break;\n }\n const columnStr = lines[i];\n for (let j = 0; j < columnStr.length; j++) {\n c = columnStr[j];\n cn = columnStr[j + 1];\n cl = columnStr[j - 1];\n if (c === '#') {\n // Skip the rest of the line - it's a comment\n break;\n }\n if (c === '\"') {\n if (inStr) {\n if (cl !== '\"' && cn !== '\"') {\n while (cn === ' ' && j < columnStr.length) {\n cn = columnStr[++j];\n }\n // After parsing a string, the next non-blank\n // should be a delimiter if the CSV is properly\n // formed.\n if (typeof potDelimiters[cn] !== 'undefined') {\n potDelimiters[cn]++;\n }\n inStr = false;\n }\n }\n else {\n inStr = true;\n }\n }\n else if (typeof potDelimiters[c] !== 'undefined') {\n token = token.trim();\n if (!isNaN(Date.parse(token))) {\n potDelimiters[c]++;\n }\n else if (isNaN(Number(token)) ||\n !isFinite(Number(token))) {\n potDelimiters[c]++;\n }\n token = '';\n }\n else {\n token += c;\n }\n if (c === ',') {\n commas++;\n }\n if (c === '.') {\n points++;\n }\n }\n }\n // Count the potential delimiters.\n // This could be improved by checking if the number of delimiters\n // equals the number of columns - 1\n if (potDelimiters[';'] > potDelimiters[',']) {\n guessed = ';';\n }\n else if (potDelimiters[','] > potDelimiters[';']) {\n guessed = ',';\n }\n else {\n // No good guess could be made..\n guessed = ',';\n }\n // Try to deduce the decimal point if it's not explicitly set.\n // If both commas or points is > 0 there is likely an issue\n if (points > commas) {\n this.guessedDecimalPoint = '.';\n }\n else {\n this.guessedDecimalPoint = ',';\n }\n return guessed;\n }\n /**\n * Handles converting the parsed data to a table.\n *\n * @return {DataTable}\n * Table from the parsed CSV.\n */\n getTable() {\n return DataConverter.getTableFromColumns(this.columns, this.headers);\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default options\n */\n CSVConverter.defaultOptions = {\n ...DataConverter.defaultOptions,\n lineDelimiter: '\\n'\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return CSVConverter;\n });\n _registerModule(_modules, 'Data/Connectors/CSVConnector.js', [_modules['Data/Converters/CSVConverter.js'], _modules['Data/Connectors/DataConnector.js'], _modules['Core/Utilities.js']], function (CSVConverter, DataConnector, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Christer Vasseng\n * - Gøran Slettemark\n * - Sophie Bremer\n *\n * */\n const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that handles creating a DataConnector from CSV\n *\n * @private\n */\n class CSVConnector extends DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of CSVConnector.\n *\n * @param {CSVConnector.UserOptions} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = merge(CSVConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new CSVConverter(mergedOptions);\n this.options = mergedOptions;\n if (mergedOptions.enablePolling) {\n this.startPolling(Math.max(mergedOptions.dataRefreshRate || 0, 1) * 1000);\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initiates the loading of the CSV source to the connector\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits CSVConnector#load\n * @emits CSVConnector#afterLoad\n */\n load(eventDetail) {\n const connector = this, converter = connector.converter, table = connector.table, { csv, csvURL, dataModifier } = connector.options;\n connector.emit({\n type: 'load',\n csv,\n detail: eventDetail,\n table\n });\n return Promise\n .resolve(csvURL ?\n fetch(csvURL).then((response) => response.text()) :\n csv || '')\n .then((csv) => {\n if (csv) {\n // If already loaded, clear the current rows\n table.deleteColumns();\n converter.parse({ csv });\n table.setColumns(converter.getTable().getColumns());\n }\n return connector\n .setModifierOptions(dataModifier)\n .then(() => csv);\n })\n .then((csv) => {\n connector.emit({\n type: 'afterLoad',\n csv,\n detail: eventDetail,\n table\n });\n return connector;\n })['catch']((error) => {\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error,\n table\n });\n throw error;\n });\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n CSVConnector.defaultOptions = {\n csv: '',\n csvURL: '',\n enablePolling: false,\n dataRefreshRate: 1,\n firstRowAsNames: true\n };\n DataConnector.registerType('CSV', CSVConnector);\n /* *\n *\n * Default Export\n *\n * */\n\n return CSVConnector;\n });\n _registerModule(_modules, 'Data/Converters/GoogleSheetsConverter.js', [_modules['Data/Converters/DataConverter.js'], _modules['Core/Utilities.js']], function (DataConverter, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n *\n * */\n const { merge, uniqueKey } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Handles parsing and transformation of an Google Sheets to a table.\n *\n * @private\n */\n class GoogleSheetsConverter extends DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the GoogleSheetsConverter.\n *\n * @param {GoogleSheetsConverter.UserOptions} [options]\n * Options for the GoogleSheetsConverter.\n */\n constructor(options) {\n const mergedOptions = merge(GoogleSheetsConverter.defaultOptions, options);\n super(mergedOptions);\n this.columns = [];\n this.header = [];\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initiates the parsing of the Google Sheet\n *\n * @param {GoogleSheetsConverter.UserOptions}[options]\n * Options for the parser\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits GoogleSheetsParser#parse\n * @emits GoogleSheetsParser#afterParse\n */\n parse(options, eventDetail) {\n const converter = this, parseOptions = merge(converter.options, options);\n let columns = ((parseOptions.json?.values) || []).map((column) => column.slice());\n if (columns.length === 0) {\n return false;\n }\n converter.header = [];\n converter.columns = [];\n converter.emit({\n type: 'parse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.header\n });\n // If beforeParse is defined, use it to modify the data\n const { beforeParse, json } = parseOptions;\n if (beforeParse && json) {\n columns = beforeParse(json.values);\n }\n let column;\n converter.columns = columns;\n for (let i = 0, iEnd = columns.length; i < iEnd; i++) {\n column = columns[i];\n converter.header[i] = (parseOptions.firstRowAsNames ?\n `${column.shift()}` :\n uniqueKey());\n for (let j = 0, jEnd = column.length; j < jEnd; ++j) {\n if (column[j] && typeof column[j] === 'string') {\n let cellValue = converter.asGuessedType(column[j]);\n if (cellValue instanceof Date) {\n cellValue = cellValue.getTime();\n }\n converter.columns[i][j] = cellValue;\n }\n }\n }\n converter.emit({\n type: 'afterParse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.header\n });\n }\n /**\n * Handles converting the parsed data to a table.\n *\n * @return {DataTable}\n * Table from the parsed Google Sheet\n */\n getTable() {\n return DataConverter.getTableFromColumns(this.columns, this.header);\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default options\n */\n GoogleSheetsConverter.defaultOptions = {\n ...DataConverter.defaultOptions\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return GoogleSheetsConverter;\n });\n _registerModule(_modules, 'Data/Connectors/GoogleSheetsConnector.js', [_modules['Data/Connectors/DataConnector.js'], _modules['Data/Converters/GoogleSheetsConverter.js'], _modules['Core/Utilities.js']], function (DataConnector, GoogleSheetsConverter, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n * - Jomar Hønsi\n *\n * */\n const { merge, pick } = U;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Tests Google's response for error.\n * @private\n */\n function isGoogleError(json) {\n return (typeof json === 'object' && json &&\n typeof json.error === 'object' && json.error &&\n typeof json.error.code === 'number' &&\n typeof json.error.message === 'string' &&\n typeof json.error.status === 'string');\n }\n /* *\n *\n * Class\n *\n * */\n /**\n * @private\n * @todo implement save, requires oauth2\n */\n class GoogleSheetsConnector extends DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of GoogleSheetsConnector\n *\n * @param {GoogleSheetsConnector.UserOptions} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = merge(GoogleSheetsConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new GoogleSheetsConverter(mergedOptions);\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Loads data from a Google Spreadsheet.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<this>}\n * Same connector instance with modified table.\n */\n load(eventDetail) {\n const connector = this, converter = connector.converter, table = connector.table, { dataModifier, dataRefreshRate, enablePolling, firstRowAsNames, googleAPIKey, googleSpreadsheetKey } = connector.options, url = GoogleSheetsConnector.buildFetchURL(googleAPIKey, googleSpreadsheetKey, connector.options);\n connector.emit({\n type: 'load',\n detail: eventDetail,\n table,\n url\n });\n if (!URL.canParse(url)) {\n throw new Error('Invalid URL: ' + url);\n }\n return fetch(url)\n .then((response) => (response.json()))\n .then((json) => {\n if (isGoogleError(json)) {\n throw new Error(json.error.message);\n }\n converter.parse({\n firstRowAsNames,\n json\n });\n // If already loaded, clear the current table\n table.deleteColumns();\n table.setColumns(converter.getTable().getColumns());\n return connector.setModifierOptions(dataModifier);\n })\n .then(() => {\n connector.emit({\n type: 'afterLoad',\n detail: eventDetail,\n table,\n url\n });\n // Polling\n if (enablePolling) {\n setTimeout(() => connector.load(), Math.max(dataRefreshRate || 0, 1) * 1000);\n }\n return connector;\n })['catch']((error) => {\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error,\n table\n });\n throw error;\n });\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n GoogleSheetsConnector.defaultOptions = {\n googleAPIKey: '',\n googleSpreadsheetKey: '',\n enablePolling: false,\n dataRefreshRate: 2,\n firstRowAsNames: true\n };\n /* *\n *\n * Class Namespace\n *\n * */\n (function (GoogleSheetsConnector) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n /* *\n *\n * Functions\n *\n * */\n /**\n * Creates GoogleSheets API v4 URL.\n * @private\n */\n function buildFetchURL(apiKey, sheetKey, options = {}) {\n const url = new URL(`https://sheets.googleapis.com/v4/spreadsheets/${sheetKey}/values/`);\n const range = options.onlyColumnNames ?\n 'A1:Z1' : buildQueryRange(options);\n url.pathname += range;\n const searchParams = url.searchParams;\n searchParams.set('alt', 'json');\n if (!options.onlyColumnNames) {\n searchParams.set('dateTimeRenderOption', 'FORMATTED_STRING');\n searchParams.set('majorDimension', 'COLUMNS');\n searchParams.set('valueRenderOption', 'UNFORMATTED_VALUE');\n }\n searchParams.set('prettyPrint', 'false');\n searchParams.set('key', apiKey);\n return url.href;\n }\n GoogleSheetsConnector.buildFetchURL = buildFetchURL;\n /**\n * Creates sheets range.\n * @private\n */\n function buildQueryRange(options = {}) {\n const { endColumn, endRow, googleSpreadsheetRange, startColumn, startRow } = options;\n return googleSpreadsheetRange || ((alphabet[startColumn || 0] || 'A') +\n (Math.max((startRow || 0), 0) + 1) +\n ':' +\n (alphabet[pick(endColumn, 25)] || 'Z') +\n (endRow ?\n Math.max(endRow, 0) :\n 'Z'));\n }\n GoogleSheetsConnector.buildQueryRange = buildQueryRange;\n })(GoogleSheetsConnector || (GoogleSheetsConnector = {}));\n DataConnector.registerType('GoogleSheets', GoogleSheetsConnector);\n /* *\n *\n * Default Export\n *\n * */\n\n return GoogleSheetsConnector;\n });\n _registerModule(_modules, 'Data/Converters/HTMLTableConverter.js', [_modules['Data/Converters/DataConverter.js'], _modules['Core/Utilities.js']], function (DataConverter, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n *\n * */\n const { merge } = U;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Row equal\n */\n function isRowEqual(row1, row2) {\n let i = row1.length;\n if (row2.length === i) {\n while (--i) {\n if (row1[i] !== row2[i]) {\n return false;\n }\n }\n }\n else {\n return false;\n }\n return true;\n }\n /* *\n *\n * Class\n *\n * */\n /**\n * Handles parsing and transformation of an HTML table to a table.\n *\n * @private\n */\n class HTMLTableConverter extends DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the HTMLTableConverter.\n *\n * @param {HTMLTableConverter.UserOptions} [options]\n * Options for the HTMLTableConverter.\n */\n constructor(options) {\n const mergedOptions = merge(HTMLTableConverter.defaultOptions, options);\n super(mergedOptions);\n this.columns = [];\n this.headers = [];\n this.options = mergedOptions;\n if (mergedOptions.tableElement) {\n this.tableElement = mergedOptions.tableElement;\n this.tableElementID = mergedOptions.tableElement.id;\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Exports the dataconnector as an HTML string, using the options\n * provided on *\n * @param {DataConnector} connector\n * Connector instance to export from.\n *\n * @param {HTMLTableConnector.ExportOptions} [options]\n * Options that override default or existing export options.\n *\n * @return {string}\n * HTML from the current dataTable.\n */\n export(connector, options = this.options) {\n const exportNames = (options.firstRowAsNames !== false), useMultiLevelHeaders = options.useMultiLevelHeaders;\n const columns = connector.getSortedColumns(options.usePresentationOrder), columnNames = Object.keys(columns), htmlRows = [], columnsCount = columnNames.length;\n const rowArray = [];\n let tableHead = '';\n // Add the names as the first row if they should be exported\n if (exportNames) {\n const subcategories = [];\n // If using multilevel headers, the first value\n // of each column is a subcategory\n if (useMultiLevelHeaders) {\n for (const name of columnNames) {\n const subhead = (columns[name].shift() || '').toString();\n subcategories.push(subhead);\n }\n tableHead = this.getTableHeaderHTML(columnNames, subcategories, options);\n }\n else {\n tableHead = this.getTableHeaderHTML(void 0, columnNames, options);\n }\n }\n for (let columnIndex = 0; columnIndex < columnsCount; columnIndex++) {\n const columnName = columnNames[columnIndex], column = columns[columnName], columnLength = column.length;\n for (let rowIndex = 0; rowIndex < columnLength; rowIndex++) {\n let cellValue = column[rowIndex];\n if (!rowArray[rowIndex]) {\n rowArray[rowIndex] = [];\n }\n // Alternative: Datatype from HTML attribute with\n // connector.whatIs(columnName)\n if (!(typeof cellValue === 'string' ||\n typeof cellValue === 'number' ||\n typeof cellValue === 'undefined')) {\n cellValue = (cellValue || '').toString();\n }\n rowArray[rowIndex][columnIndex] = this.getCellHTMLFromValue(columnIndex ? 'td' : 'th', null, columnIndex ? '' : 'scope=\"row\"', cellValue);\n // On the final column, push the row to the array\n if (columnIndex === columnsCount - 1) {\n htmlRows.push('<tr>' +\n rowArray[rowIndex].join('') +\n '</tr>');\n }\n }\n }\n let caption = '';\n // Add table caption\n // Current exportdata falls back to chart title\n // but that should probably be handled elsewhere?\n if (options.tableCaption) {\n caption = '<caption class=\"highcharts-table-caption\">' +\n options.tableCaption +\n '</caption>';\n }\n return ('<table>' +\n caption +\n tableHead +\n '<tbody>' +\n htmlRows.join('') +\n '</tbody>' +\n '</table>');\n }\n /**\n * Get table cell markup from row data.\n */\n getCellHTMLFromValue(tag, classes, attrs, value, decimalPoint) {\n let val = value, className = 'text' + (classes ? ' ' + classes : '');\n // Convert to string if number\n if (typeof val === 'number') {\n val = val.toString();\n if (decimalPoint === ',') {\n val = val.replace('.', decimalPoint);\n }\n className = 'number';\n }\n else if (!value) {\n val = '';\n className = 'empty';\n }\n return '<' + tag + (attrs ? ' ' + attrs : '') +\n ' class=\"' + className + '\">' +\n val + '</' + tag + '>';\n }\n /**\n * Get table header markup from row data.\n */\n getTableHeaderHTML(topheaders = [], subheaders = [], options = this.options) {\n const { useMultiLevelHeaders, useRowspanHeaders } = options;\n let html = '<thead>', i = 0, len = subheaders && subheaders.length, next, cur, curColspan = 0, rowspan;\n // Clean up multiple table headers. Chart.getDataRows() returns two\n // levels of headers when using multilevel, not merged. We need to\n // merge identical headers, remove redundant headers, and keep it\n // all marked up nicely.\n if (useMultiLevelHeaders &&\n topheaders &&\n subheaders &&\n !isRowEqual(topheaders, subheaders)) {\n html += '<tr>';\n for (; i < len; ++i) {\n cur = topheaders[i];\n next = topheaders[i + 1];\n if (cur === next) {\n ++curColspan;\n }\n else if (curColspan) {\n // Ended colspan\n // Add cur to HTML with colspan.\n html += this.getCellHTMLFromValue('th', 'highcharts-table-topheading', 'scope=\"col\" ' +\n 'colspan=\"' + (curColspan + 1) + '\"', cur);\n curColspan = 0;\n }\n else {\n // Cur is standalone. If it is same as sublevel,\n // remove sublevel and add just toplevel.\n if (cur === subheaders[i]) {\n if (useRowspanHeaders) {\n rowspan = 2;\n delete subheaders[i];\n }\n else {\n rowspan = 1;\n subheaders[i] = '';\n }\n }\n else {\n rowspan = 1;\n }\n html += this.getCellHTMLFromValue('th', 'highcharts-table-topheading', 'scope=\"col\"' +\n (rowspan > 1 ?\n ' valign=\"top\" rowspan=\"' + rowspan + '\"' :\n ''), cur);\n }\n }\n html += '</tr>';\n }\n // Add the subheaders (the only headers if not using multilevels)\n if (subheaders) {\n html += '<tr>';\n for (i = 0, len = subheaders.length; i < len; ++i) {\n if (typeof subheaders[i] !== 'undefined') {\n html += this.getCellHTMLFromValue('th', null, 'scope=\"col\"', subheaders[i]);\n }\n }\n html += '</tr>';\n }\n html += '</thead>';\n return html;\n }\n /**\n * Initiates the parsing of the HTML table\n *\n * @param {HTMLTableConverter.UserOptions}[options]\n * Options for the parser\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits CSVDataParser#parse\n * @emits CSVDataParser#afterParse\n * @emits HTMLTableParser#parseError\n */\n parse(options, eventDetail) {\n const converter = this, columns = [], headers = [], parseOptions = merge(converter.options, options), { endRow, startColumn, endColumn, firstRowAsNames } = parseOptions, tableHTML = parseOptions.tableElement || this.tableElement;\n if (!(tableHTML instanceof HTMLElement)) {\n converter.emit({\n type: 'parseError',\n columns,\n detail: eventDetail,\n headers,\n error: 'Not a valid HTML Table'\n });\n return;\n }\n converter.tableElement = tableHTML;\n converter.tableElementID = tableHTML.id;\n this.emit({\n type: 'parse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.headers\n });\n const rows = tableHTML.getElementsByTagName('tr'), rowsCount = rows.length;\n let rowIndex = 0, item, { startRow } = parseOptions;\n // Insert headers from the first row\n if (firstRowAsNames && rowsCount) {\n const items = rows[0].children, itemsLength = items.length;\n for (let i = startColumn; i < itemsLength; i++) {\n if (i > endColumn) {\n break;\n }\n item = items[i];\n if (item.tagName === 'TD' ||\n item.tagName === 'TH') {\n headers.push(item.innerHTML);\n }\n }\n startRow++;\n }\n while (rowIndex < rowsCount) {\n if (rowIndex >= startRow && rowIndex <= endRow) {\n const columnsInRow = rows[rowIndex].children, columnsInRowLength = columnsInRow.length;\n let columnIndex = 0;\n while (columnIndex < columnsInRowLength) {\n const relativeColumnIndex = columnIndex - startColumn, row = columns[relativeColumnIndex];\n item = columnsInRow[columnIndex];\n if ((item.tagName === 'TD' ||\n item.tagName === 'TH') &&\n (columnIndex >= startColumn &&\n columnIndex <= endColumn)) {\n if (!columns[relativeColumnIndex]) {\n columns[relativeColumnIndex] = [];\n }\n let cellValue = converter.asGuessedType(item.innerHTML);\n if (cellValue instanceof Date) {\n cellValue = cellValue.getTime();\n }\n columns[relativeColumnIndex][rowIndex - startRow] = cellValue;\n // Loop over all previous indices and make sure\n // they are nulls, not undefined.\n let i = 1;\n while (rowIndex - startRow >= i &&\n row[rowIndex - startRow - i] === void 0) {\n row[rowIndex - startRow - i] = null;\n i++;\n }\n }\n columnIndex++;\n }\n }\n rowIndex++;\n }\n this.columns = columns;\n this.headers = headers;\n this.emit({\n type: 'afterParse',\n columns,\n detail: eventDetail,\n headers\n });\n }\n /**\n * Handles converting the parsed data to a table.\n *\n * @return {DataTable}\n * Table from the parsed HTML table\n */\n getTable() {\n return DataConverter.getTableFromColumns(this.columns, this.headers);\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default options\n */\n HTMLTableConverter.defaultOptions = {\n ...DataConverter.defaultOptions,\n useRowspanHeaders: true,\n useMultiLevelHeaders: true\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return HTMLTableConverter;\n });\n _registerModule(_modules, 'Data/Connectors/HTMLTableConnector.js', [_modules['Data/Connectors/DataConnector.js'], _modules['Core/Globals.js'], _modules['Data/Converters/HTMLTableConverter.js'], _modules['Core/Utilities.js']], function (DataConnector, H, HTMLTableConverter, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n *\n * */\n const { win } = H;\n const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that handles creating a data connector from an HTML table.\n *\n * @private\n */\n class HTMLTableConnector extends DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of HTMLTableConnector.\n *\n * @param {HTMLTableConnector.UserOptions} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = merge(HTMLTableConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new HTMLTableConverter(mergedOptions);\n this.options = mergedOptions;\n }\n /**\n * Initiates creating the dataconnector from the HTML table\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits HTMLTableConnector#load\n * @emits HTMLTableConnector#afterLoad\n * @emits HTMLTableConnector#loadError\n */\n load(eventDetail) {\n const connector = this, converter = connector.converter, table = connector.table, { dataModifier, table: tableHTML } = connector.options;\n connector.emit({\n type: 'load',\n detail: eventDetail,\n table,\n tableElement: connector.tableElement\n });\n let tableElement;\n if (typeof tableHTML === 'string') {\n connector.tableID = tableHTML;\n tableElement = win.document.getElementById(tableHTML);\n }\n else {\n tableElement = tableHTML;\n connector.tableID = tableElement.id;\n }\n connector.tableElement = tableElement || void 0;\n if (!connector.tableElement) {\n const error = 'HTML table not provided, or element with ID not found';\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error,\n table\n });\n return Promise.reject(new Error(error));\n }\n converter.parse(merge({ tableElement: connector.tableElement }, connector.options), eventDetail);\n // If already loaded, clear the current rows\n table.deleteColumns();\n table.setColumns(converter.getTable().getColumns());\n return connector\n .setModifierOptions(dataModifier)\n .then(() => {\n connector.emit({\n type: 'afterLoad',\n detail: eventDetail,\n table,\n tableElement: connector.tableElement\n });\n return connector;\n });\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n HTMLTableConnector.defaultOptions = {\n table: ''\n };\n DataConnector.registerType('HTMLTable', HTMLTableConnector);\n /* *\n *\n * Default Export\n *\n * */\n\n return HTMLTableConnector;\n });\n _registerModule(_modules, 'Data/Converters/JSONConverter.js', [_modules['Data/Converters/DataConverter.js'], _modules['Data/DataTable.js'], _modules['Core/Utilities.js']], function (DataConverter, DataTable, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Pawel Lysy\n *\n * */\n const { error, isArray, merge, objectEach } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Handles parsing and transforming JSON to a table.\n *\n * @private\n */\n class JSONConverter extends DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the JSON parser.\n *\n * @param {JSONConverter.UserOptions} [options]\n * Options for the JSON parser.\n */\n constructor(options) {\n const mergedOptions = merge(JSONConverter.defaultOptions, options);\n super(mergedOptions);\n /* *\n *\n * Properties\n *\n * */\n this.columns = [];\n this.headers = [];\n this.options = mergedOptions;\n this.table = new DataTable();\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initiates parsing of JSON structure.\n *\n * @param {JSONConverter.UserOptions}[options]\n * Options for the parser\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits JSONConverter#parse\n * @emits JSONConverter#afterParse\n */\n parse(options, eventDetail) {\n const converter = this;\n options = merge(converter.options, options);\n const { beforeParse, orientation, firstRowAsNames, columnNames } = options;\n let data = options.data;\n if (!data) {\n return;\n }\n converter.columns = [];\n converter.emit({\n type: 'parse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.headers\n });\n if (beforeParse) {\n data = beforeParse(data);\n }\n data = data.slice();\n if (orientation === 'columns') {\n for (let i = 0, iEnd = data.length; i < iEnd; i++) {\n const item = data[i];\n if (!(item instanceof Array)) {\n return;\n }\n if (converter.headers instanceof Array) {\n if (firstRowAsNames) {\n converter.headers.push(`${item.shift()}`);\n }\n else if (columnNames && columnNames instanceof Array) {\n converter.headers.push(columnNames[i]);\n }\n converter.table.setColumn(converter.headers[i] || i.toString(), item);\n }\n else {\n error('JSONConverter: Invalid `columnNames` option.', false);\n }\n }\n }\n else if (orientation === 'rows') {\n if (firstRowAsNames) {\n converter.headers = data.shift();\n }\n else if (columnNames) {\n converter.headers = columnNames;\n }\n for (let rowIndex = 0, iEnd = data.length; rowIndex < iEnd; rowIndex++) {\n let row = data[rowIndex];\n if (isArray(row)) {\n for (let columnIndex = 0, jEnd = row.length; columnIndex < jEnd; columnIndex++) {\n if (converter.columns.length < columnIndex + 1) {\n converter.columns.push([]);\n }\n converter.columns[columnIndex].push(row[columnIndex]);\n if (converter.headers instanceof Array) {\n this.table.setColumn(converter.headers[columnIndex] ||\n columnIndex.toString(), converter.columns[columnIndex]);\n }\n else {\n error('JSONConverter: Invalid `columnNames` option.', false);\n }\n }\n }\n else {\n const columnNames = converter.headers;\n if (columnNames && !(columnNames instanceof Array)) {\n const newRow = {};\n objectEach(columnNames, (arrayWithPath, name) => {\n newRow[name] = arrayWithPath.reduce((acc, key) => acc[key], row);\n });\n row = newRow;\n }\n this.table.setRows([row], rowIndex);\n }\n }\n }\n converter.emit({\n type: 'afterParse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.headers\n });\n }\n /**\n * Handles converting the parsed data to a table.\n *\n * @return {DataTable}\n * Table from the parsed CSV.\n */\n getTable() {\n return this.table;\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default options\n */\n JSONConverter.defaultOptions = {\n ...DataConverter.defaultOptions,\n data: [],\n orientation: 'rows'\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return JSONConverter;\n });\n _registerModule(_modules, 'Data/Connectors/JSONConnector.js', [_modules['Data/Connectors/DataConnector.js'], _modules['Core/Utilities.js'], _modules['Data/Converters/JSONConverter.js']], function (DataConnector, U, JSONConverter) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Pawel Lysy\n *\n * */\n const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that handles creating a DataConnector from JSON structure\n *\n * @private\n */\n class JSONConnector extends DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of JSONConnector.\n *\n * @param {JSONConnector.UserOptions} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = merge(JSONConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new JSONConverter(mergedOptions);\n this.options = mergedOptions;\n if (mergedOptions.enablePolling) {\n this.startPolling(Math.max(mergedOptions.dataRefreshRate || 0, 1) * 1000);\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initiates the loading of the JSON source to the connector\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits JSONConnector#load\n * @emits JSONConnector#afterLoad\n */\n load(eventDetail) {\n const connector = this, converter = connector.converter, table = connector.table, { data, dataUrl, dataModifier } = connector.options;\n connector.emit({\n type: 'load',\n data,\n detail: eventDetail,\n table\n });\n return Promise\n .resolve(dataUrl ?\n fetch(dataUrl).then((json) => json.json()) :\n data || [])\n .then((data) => {\n if (data) {\n // If already loaded, clear the current rows\n table.deleteColumns();\n converter.parse({ data });\n table.setColumns(converter.getTable().getColumns());\n }\n return connector.setModifierOptions(dataModifier).then(() => data);\n })\n .then((data) => {\n connector.emit({\n type: 'afterLoad',\n data,\n detail: eventDetail,\n table\n });\n return connector;\n })['catch']((error) => {\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error,\n table\n });\n throw error;\n });\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n JSONConnector.defaultOptions = {\n data: [],\n enablePolling: false,\n dataRefreshRate: 0,\n firstRowAsNames: true,\n orientation: 'rows'\n };\n DataConnector.registerType('JSON', JSONConnector);\n /* *\n *\n * Default Export\n *\n * */\n\n return JSONConnector;\n });\n _registerModule(_modules, 'Data/Modifiers/InvertModifier.js', [_modules['Data/Modifiers/DataModifier.js'], _modules['Core/Utilities.js']], function (DataModifier, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Wojciech Chmiel\n * - Sophie Bremer\n *\n * */\n const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Inverts columns and rows in a table.\n *\n * @private\n */\n class InvertModifier extends DataModifier {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the invert modifier.\n *\n * @param {Partial<InvertModifier.Options>} [options]\n * Options to configure the invert modifier.\n */\n constructor(options) {\n super();\n this.options = merge(InvertModifier.defaultOptions, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Applies partial modifications of a cell change to the property `modified`\n * of the given modified table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {string} columnName\n * Column name of changed cell.\n *\n * @param {number|undefined} rowIndex\n * Row index of changed cell.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Changed cell value.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyCell(table, columnName, rowIndex, cellValue, eventDetail) {\n const modified = table.modified, modifiedRowIndex = modified.getRowIndexBy('columnNames', columnName);\n if (typeof modifiedRowIndex === 'undefined') {\n modified.setColumns(this.modifyTable(table.clone()).getColumns(), void 0, eventDetail);\n }\n else {\n modified.setCell(`${rowIndex}`, modifiedRowIndex, cellValue, eventDetail);\n }\n return table;\n }\n /**\n * Applies partial modifications of column changes to the property\n * `modified` of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Changed columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex=0]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyColumns(table, columns, rowIndex, eventDetail) {\n const modified = table.modified, modifiedColumnNames = (modified.getColumn('columnNames') || []);\n let columnNames = table.getColumnNames(), reset = (table.getRowCount() !== modifiedColumnNames.length);\n if (!reset) {\n for (let i = 0, iEnd = columnNames.length; i < iEnd; ++i) {\n if (columnNames[i] !== modifiedColumnNames[i]) {\n reset = true;\n break;\n }\n }\n }\n if (reset) {\n return this.modifyTable(table, eventDetail);\n }\n columnNames = Object.keys(columns);\n for (let i = 0, iEnd = columnNames.length, column, columnName, modifiedRowIndex; i < iEnd; ++i) {\n columnName = columnNames[i];\n column = columns[columnName];\n modifiedRowIndex = (modified.getRowIndexBy('columnNames', columnName) ||\n modified.getRowCount());\n for (let j = 0, j2 = rowIndex, jEnd = column.length; j < jEnd; ++j, ++j2) {\n modified.setCell(`${j2}`, modifiedRowIndex, column[j], eventDetail);\n }\n }\n return table;\n }\n /**\n * Applies partial modifications of row changes to the property `modified`\n * of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Array<(Highcharts.DataTableRow|Highcharts.DataTableRowObject)>} rows\n * Changed rows.\n *\n * @param {number} [rowIndex]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyRows(table, rows, rowIndex, eventDetail) {\n const columnNames = table.getColumnNames(), modified = table.modified, modifiedColumnNames = (modified.getColumn('columnNames') || []);\n let reset = (table.getRowCount() !== modifiedColumnNames.length);\n if (!reset) {\n for (let i = 0, iEnd = columnNames.length; i < iEnd; ++i) {\n if (columnNames[i] !== modifiedColumnNames[i]) {\n reset = true;\n break;\n }\n }\n }\n if (reset) {\n return this.modifyTable(table, eventDetail);\n }\n for (let i = 0, i2 = rowIndex, iEnd = rows.length, row; i < iEnd; ++i, ++i2) {\n row = rows[i];\n if (row instanceof Array) {\n modified.setColumn(`${i2}`, row);\n }\n else {\n for (let j = 0, jEnd = columnNames.length; j < jEnd; ++j) {\n modified.setCell(`${i2}`, j, row[columnNames[j]], eventDetail);\n }\n }\n }\n return table;\n }\n /**\n * Inverts rows and columns in the table.\n *\n * @param {DataTable} table\n * Table to invert.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table with inverted `modified` property as a reference.\n */\n modifyTable(table, eventDetail) {\n const modifier = this;\n modifier.emit({ type: 'modify', detail: eventDetail, table });\n const modified = table.modified;\n if (table.hasColumns(['columnNames'])) { // Inverted table\n const columnNames = ((table.deleteColumns(['columnNames']) || {})\n .columnNames || []).map((column) => `${column}`), columns = {};\n for (let i = 0, iEnd = table.getRowCount(), row; i < iEnd; ++i) {\n row = table.getRow(i);\n if (row) {\n columns[columnNames[i]] = row;\n }\n }\n modified.deleteColumns();\n modified.setColumns(columns);\n }\n else { // Regular table\n const columns = {};\n for (let i = 0, iEnd = table.getRowCount(), row; i < iEnd; ++i) {\n row = table.getRow(i);\n if (row) {\n columns[`${i}`] = row;\n }\n }\n columns.columnNames = table.getColumnNames();\n modified.deleteColumns();\n modified.setColumns(columns);\n }\n modifier.emit({ type: 'afterModify', detail: eventDetail, table });\n return table;\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default options for the invert modifier.\n */\n InvertModifier.defaultOptions = {\n type: 'Invert'\n };\n DataModifier.registerType('Invert', InvertModifier);\n /* *\n *\n * Default Export\n *\n * */\n\n return InvertModifier;\n });\n _registerModule(_modules, 'Data/Modifiers/RangeModifier.js', [_modules['Data/Modifiers/DataModifier.js'], _modules['Core/Utilities.js']], function (DataModifier, U) {\n /* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Dawid Dragula\n *\n * */\n const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Filters out table rows with a specific value range.\n *\n */\n class RangeModifier extends DataModifier {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the range modifier.\n *\n * @param {Partial<RangeModifier.Options>} [options]\n * Options to configure the range modifier.\n */\n constructor(options) {\n super();\n this.options = merge(RangeModifier.defaultOptions, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Replaces table rows with filtered rows.\n *\n * @param {DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table with `modified` property as a reference.\n */\n modifyTable(table, eventDetail) {\n const modifier = this;\n modifier.emit({ type: 'modify', detail: eventDetail, table });\n let indexes = [];\n const { additive, ranges, strict } = modifier.options;\n if (ranges.length) {\n const modified = table.modified;\n let columns = table.getColumns(), rows = [];\n for (let i = 0, iEnd = ranges.length, range, rangeColumn; i < iEnd; ++i) {\n range = ranges[i];\n if (strict &&\n typeof range.minValue !== typeof range.maxValue) {\n continue;\n }\n if (i > 0 && !additive) {\n modified.deleteRows();\n modified.setRows(rows);\n modified.setOriginalRowIndexes(indexes, true);\n columns = modified.getColumns();\n rows = [];\n indexes = [];\n }\n rangeColumn = (columns[range.column] || []);\n for (let j = 0, jEnd = rangeColumn.length, cell, row, originalRowIndex; j < jEnd; ++j) {\n cell = rangeColumn[j];\n switch (typeof cell) {\n default:\n continue;\n case 'boolean':\n case 'number':\n case 'string':\n break;\n }\n if (strict &&\n typeof cell !== typeof range.minValue) {\n continue;\n }\n if (cell >= range.minValue &&\n cell <= range.maxValue) {\n if (additive) {\n row = table.getRow(j);\n originalRowIndex = table.getOriginalRowIndex(j);\n }\n else {\n row = modified.getRow(j);\n originalRowIndex = modified.getOriginalRowIndex(j);\n }\n if (row) {\n rows.push(row);\n indexes.push(originalRowIndex);\n }\n }\n }\n }\n modified.deleteRows();\n modified.setRows(rows);\n modified.setOriginalRowIndexes(indexes);\n }\n modifier.emit({ type: 'afterModify', detail: eventDetail, table });\n return table;\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default options for the range modifier.\n */\n RangeModifier.defaultOptions = {\n type: 'Range',\n ranges: []\n };\n DataModifier.registerType('Range', RangeModifier);\n /* *\n *\n * Default Export\n *\n * */\n\n return RangeModifier;\n });\n _registerModule(_modules, 'masters/datagrid.src.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Data/Connectors/DataConnector.js'], _modules['Data/Converters/DataConverter.js'], _modules['Data/DataCursor.js'], _modules['DataGrid/DataGrid.js'], _modules['Data/Modifiers/DataModifier.js'], _modules['Data/DataPool.js'], _modules['Data/DataTable.js'], _modules['DataGrid/Defaults.js'], _modules['DataGrid/Globals.js'], _modules['Accessibility/HighContrastMode.js']], function (AST, DataConnector, DataConverter, DataCursor, _DataGrid, DataModifier, DataPool, DataTable, Defaults, Globals, whcm) {\n\n /* *\n *\n * Imports\n *\n * */\n // Fill registries\n /* *\n *\n * Namespace\n *\n * */\n const G = Globals;\n G.AST = AST;\n G.DataConnector = DataConnector;\n G.DataCursor = DataCursor;\n G.DataConverter = DataConverter;\n G.DataGrid = _DataGrid;\n G.dataGrid = _DataGrid.dataGrid;\n G.dataGrids = _DataGrid.dataGrids;\n G.DataModifier = DataModifier;\n G.DataPool = DataPool;\n G.DataTable = DataTable;\n G.defaultOptions = Defaults.defaultOptions;\n G.setOptions = Defaults.setOptions;\n G.isHighContrastModeActive = whcm.isHighContrastModeActive;\n /* *\n *\n * Classic Export\n *\n * */\n if (!G.win.DataGrid) {\n G.win.DataGrid = G;\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return G;\n });\n _modules['masters/datagrid.src.js']._modules = _modules;\n return _modules['masters/datagrid.src.js'];\n}));"],"names":["root","factory","module","exports","document","define","amd","DataGrid","error","window","_modules","_registerModule","obj","path","args","fn","hasOwnProperty","apply","CustomEvent","dispatchEvent","detail","Globals","SVG_NS","product","version","win","doc","svg","createElementNS","createSVGRect","userAgent","navigator","isChrome","chrome","isFirefox","indexOf","isMS","test","opera","isSafari","isTouchDevice","isWebKit","deg2rad","Math","PI","marginNames","noop","supportsPassiveEvents","supportsPassive","opts","Object","defineProperty","get","addEventListener","removeEventListener","charts","composed","dateFormats","seriesTypes","symbolSizes","chartCount","H","serialMode","code","stop","chart","params","severity","isCode","isNumber","message","toString","additionalMessages","objectEach","value","key","encodeURI","fireEvent","Error","console","messages","warn","push","pInt","s","mag","parseInt","isString","isArray","str","prototype","call","isObject","strict","isDOMElement","nodeType","isClass","c","constructor","name","n","isNaN","Infinity","defined","attr","elem","keyOrAttribs","ret","isGetter","attrSingle","setAttribute","getAttribute","removeAttribute","splat","extend","a","b","pick","arguments","length","i","arg","css","el","styles","style","getMagnitude","num","pow","floor","log","LN10","correctFloat","prec","parseFloat","toPrecision","easeInOutSine","pos","cos","find","Array","arr","callback","ctx","removeEvent","type","removeOneEvent","removeAllEvents","eventCollection","types","len","nodeName","_val","owner","events","hcEvents","typeEvents","filter","eventArguments","defaultFunction","createEvent","e","initEvent","target","preventDefault","defaultPrevented","object","multilevel","unshift","getPrototypeOf","sort","order","forEach","uniqueKey","hash","random","substring","id","jQuery","highcharts","slice","shift","addEvent","options","Point","series","runTrackerClick","passive","capture","eventObject","arrayMax","data","max","arrayMin","min","clamp","clearTimeout","createElement","tag","attribs","parent","nopad","padding","border","margin","appendChild","crisp","lineWidth","inverted","mod","inverter","round","destroyObjectProperties","except","destructablesOnly","val","destroy","diffObjects","newer","older","keepOlder","collectionsWithUpdate","diff","depth","keeper","newerVal","keys","discardElement","element","parentElement","removeChild","erase","item","splice","extendClass","members","getAlignFactor","align","center","right","middle","bottom","getClosestDistance","arrays","onError","closest","loopLength","distance","allowNegative","xData","getNestedProperty","pathElements","split","pathElement","thisProp","child","getStyle","prop","toInt","offsetWidth","scrollWidth","boundingClientRectWidth","getBoundingClientRect","width","offsetHeight","scrollHeight","getComputedStyle","getPropertyValue","insertItem","collection","indexOption","index","isInternal","_i","isFunction","merge","extendOrSource","sources","doCopy","copy","original","normalizeTickInterval","interval","multiples","magnitude","allowDecimals","hasTickAmount","retInterval","normalized","offset","docElem","documentElement","box","parentNode","top","left","height","pageYOffset","scrollTop","clientTop","pageXOffset","scrollLeft","clientLeft","pad","number","padder","String","replace","join","pushUnique","array","relativeLength","base","replaceNested","text","replacements","previous","replacement","stableSort","sortFunction","sortValue","safeI","syncTimeout","delay","context","setTimeout","timeUnits","millisecond","second","minute","hour","day","week","month","year","ucfirst","toUpperCase","useSerialIds","mode","wrap","method","func","proceed","outerArgs","scope","concat","U","trustedTypes","trustedTypesPolicy","createPolicy","createHTML","emptyHTML","AST","filterUserAttributes","attributes","valid","allowedAttributes","allowedReferences","some","ref","parseStyle","reduce","line","pair","map","trim","g","setElementHTML","html","innerHTML","ast","addToDOM","source","nodes","parseMarkup","recurse","subtree","subParent","node","tagName","textNode","textContent","createTextNode","bypassHTMLFiltering","allowedTags","NS","namespaceURI","children","markup","DOMParser","parseFromString","body","appendChildNodes","addTo","toLowerCase","astNode","parsedAttributes","attrib","childNodes","childNode","DataModifier","benchmark","dataTable","results","modifier","execute","modifyTable","emit","iterations","on","times","startTime","endTime","performance","now","modify","table","eventDetail","Promise","resolve","reject","modified","clone","modifyCell","columnName","rowIndex","cellValue","modifyColumns","columns","modifyRows","rows","registerType","DataModifierClass","autoId","rowCount","versionTag","column","applyRowCount","getColumn","asReference","getColumns","columnNames","getRow","setColumn","setColumns","silent","setRow","row","insert","indexRowCount","addColumns","DataTableCore","DataTable","isNull","NULL","iEnd","skipColumns","tableOptions","tableClone","originalRowIndexes","localRowIndexes","deleteColumns","deletedColumns","modifiedColumns","deleteRowIndexReferences","deleteRows","deletedRows","modifiedRows","deletedCells","j","jEnd","includes","getCell","getCellAsBoolean","getCellAsNumber","useNaN","getCellAsString","getColumnAsNumbers","columnAsNumber","columnLength","getColumnNames","tableColumns","getLocalRowIndex","originalRowIndex","getModifier","getOriginalRowIndex","getRows","getRowCount","getRowIndexBy","rowIndexOffset","getRowObject","getRowObjects","i2","getVersionTag","hasColumns","hasRowWith","renameColumn","newColumnName","setCell","tableModifier","tableColumn","setModifier","promise","then","setOriginalRowIndexes","omitLocalRowIndexes","modifiedIndexes","originalIndex","setRows","DataConnector","metadata","polling","describeColumn","columnMeta","connector","describeColumns","pop","getColumnOrder","usePresentationState","names","getSortedColumns","usePresentationOrder","load","save","setColumnOrder","setModifierOptions","modifierOptions","ModifierClass","startPolling","refreshTime","_polling","stopPolling","whatIs","DataConnectorClass","DataConverter","regex","parser","match","Date","UTC","NaN","alternative","d","getFullYear","mergedOptions","defaultOptions","regExpPoint","decimalPoint","decimalRegExp","RegExp","asBoolean","asNumber","asDate","timestamp","parseDate","asString","asGuessedType","typeMap","converter","guessType","decimalRegex","getDate","deduceDateFormat","limit","stable","format","thing","guessedFormat","madeDeduction","dateFormat","export","headers","getTable","result","trimedValue","innerTrimedValue","floatValue","parse","dateFormatProp","getTime","getTimezoneOffset","inside","alternativeFormat","startColumn","endColumn","Number","MAX_VALUE","startRow","endRow","firstRowAsNames","switchRowsAndColumns","getTableFromColumns","DataCursor","stateMap","emittingRegister","listenerMap","addListener","tableId","state","listener","listeners","buildEmittingTag","cursor","firstRow","lastRow","emitCursor","event","lasting","cursors","getIndex","emittingTag","remitCursor","removeListener","toRange","defaultRange","range","needle","columnNeedle","JSON","stringify","isEqual","cursorA","cursorB","isInRange","needleColumns","rangeColumns","every","toPositions","positions","rowEnd","columnEnd","classNamePrefix","classNames","container","tableElement","captionElement","theadElement","tbodyElement","rowElement","rowEven","rowOdd","hoveredRow","columnElement","hoveredCell","hoveredColumn","editedCell","rowsContentNowrap","headerCell","headerCellContent","headerRow","noData","columnFirst","columnSortable","columnSortableIcon","columnSortedAsc","columnSortedDesc","resizerHandles","resizedColumn","creditsContainer","creditsText","visuallyHidden","DataGridUtils","makeHTMLElement","paramsKeys","assign","makeDiv","className","getTranslateY","transform","isHTML","sanitizeText","DGUtils","dataGrid","classList","add","prepend","announcerElement","addEditableCellHint","cellElement","editableLang","lang","accessibility","cellEditing","editable","innerText","addHeaderCellDescription","thElement","description","announce","msg","assertive","announcerTimeout","remove","userSortedColumn","announcementsLang","sorting","announcements","ascending","descending","none","userEditedCell","msgType","setColumnSortState","setRowIndex","idx","credits","containerElement","textElement","render","setContent","href","appendToContainer","position","contentWrapper","update","enabled","viewport","reflow","getHeight","Utils","Defaults","started","edited","cancelled","rendering","distribution","bufferSize","strictHeights","header","columnDefaults","sortable","resizing","setOptions","alignThresholds","panning","styledMode","borderRadius","colorCount","allowMutatingData","ignoreHiddenSeries","spacing","resetZoomButton","theme","zooming","singleTouch","resetButton","zIndex","x","y","borderColor","backgroundColor","plotBorderColor","colors","hasOldSafariBug","Intl","DateTimeFormat","formatRange","isDateTimeFormatOptions","main","spanishWeekdayIndex","weekday","variableTimezone","timezone","dTLCache","timezoneOffset","useUTC","isMonth","isShort","timeZone","toParts","dayOfMonth","hours","minutes","seconds","dateTimeFormat","locale","cacheKey","str2dtf","dTL","dtf","mapping","L","fractionalSecondDigits","S","M","k","E","A","B","m","o","Y","makeTime","date","milliseconds","newOffset","hasTimezone","isYYYYMMDD","ts","gmt","colon","timeZoneName","upperCaseFirst","invalidDate","localeAwareRegex","exec","time","fullYear","langWeekdays","weekdays","shortWeekdays","months","shortMonths","substr","w","I","l","p","P","tzHours","prefix","suffix","resolveDTLFormat","f","from","to","getTimeTicks","normalizedInterval","startOfWeek","tickPositions","higherRanks","count","unitRange","variableDayLength","weekdayNo","t","info","totalRange","getDateFormat","dateTimeLabelFormats","dateStr","blank","strpos","lastN","ChartDefaults","Palettes","Time","symbols","loading","numericSymbols","resetZoom","resetZoomTitle","global","buttonTheme","fill","r","stroke","color","fontSize","fontWeight","states","hover","select","disabled","title","minScale","subtitle","caption","verticalAlign","plotOptions","legend","alignColumns","layout","itemMarginBottom","itemMarginTop","labelFormatter","navigation","activeColor","inactiveColor","itemStyle","textDecoration","textOverflow","itemHoverStyle","itemHiddenStyle","shadow","itemCheckboxStyle","squareSymbol","symbolPadding","labelStyle","opacity","textAlign","tooltip","animation","duration","easing","sqrt","footerFormat","headerShape","hideDelay","shape","shared","snap","headerFormat","pointFormat","borderWidth","stickOnContact","useHTML","defaultTime","getOptions","D","G","helpers","divide","eq","each","ge","gt","condition","le","lt","multiply","ne","subtract","unless","numberFormatCache","subRegex","matches","floatRegex","decRegex","numberFormatter","numberFormat","resolveProperty","currentMatch","hasSub","mainMatch","subMatch","isBlock","expression","charAt","start","startInner","startingElseSection","elseBody","parts","startChar","char","valueAndFormat","segment","decimals","thousandsSep","fractionDigits","mantissa","exp","origDec","firstDecimals","toExponential","toFixed","minimumFractionDigits","maximumFractionDigits","useGrouping","hasSeparators","nf","NumberFormat","Templating","Column","cells","columnOptionsMap","getInitialWidth","loadData","registerCell","cell","htmlElement","hoveredColumnId","unregisterCell","getWidth","vp","columnDistribution","getWidthFromRatio","setHoveredState","hovered","mock","getInitialFullDistWidth","columnsCount","enabledColumns","getRatioFromWidth","allPreviousWidths","template","MIN_COLUMN_WIDTH","createCell","rowsWidth","destroyed","columnId","cellEvents","init","initEvents","onBlur","onFocus","onClick","onKeyDown","focusAnchor","rowsVirtualizer","focusAnchorCell","focusCursor","dir","changeFocusKeys","ArrowDown","ArrowUp","ArrowLeft","ArrowRight","stopPropagation","nextVerticalDir","localRowIndex","focus","nextRow","elementStyle","maxWidth","setCustomClassName","customClassName","newClassName","renderHTMLCellContent","cellContent","formattedNodes","headerCellElement","toggle","sortingController","querying","currentOrder","currentSorting","setOrder","consequents","asc","desc","addHeaderElementAttributes","col","a11y","sortingOptions","setSorting","loadPresentationData","afterSorting","Cell","ColumnSorting","Utilities","isMain","headerCellOptions","formatter","headerContent","columnsResizer","renderColumnDragHandles","initColumnSorting","th","click","Row","HeaderCell","level","setRowAttributes","renderMultipleLevel","columnsOnLevel","getColumnsAtLevel","colSpan","getColumnIds","dataColumn","levels","targetLevel","currentLevel","HeaderRow","getRowLevels","clientWidth","tableEl","theadEL","bordersWidth","cellHtmlElement","maxDepth","scrollHorizontally","setValue","onDblClick","onMouseOut","onMouseOver","onMouseDown","hoverRow","hoverColumn","mouseOver","mouseOut","startEditing","dblClick","updateTable","focusedRowId","formatCell","afterSetValue","originalDataTable","rowTableIndex","willNotModify","newRowIndex","TableCell","hoveredRowIndex","getDefaultTopOffset","defaultRowHeight","TableRow","rowCursor","preventScroll","rowSettings","strictRowHeights","buffer","getDefaultRowHeight","initialRender","renderRows","adjustRowHeights","rerender","oldScrollTop","tbody","scroll","rowHeight","lastScrollTop","adjustBottomRowHeights","rowsLn","rowTop","rowBottom","newHeight","rowsPerPage","ceil","last","alwaysLastRow","newRow","insertBefore","lastChild","columnIndex","firstVisibleRow","defaultH","translateBuffer","cellHeight","preLastRow","reflowRows","mockRow","handles","onDocumentMouseMove","draggedResizeHandle","draggedColumn","pageX","dragStartX","fullDistributionResize","fixedDistributionResize","afterResize","onDocumentMouseUp","columnStartWidth","nextColumnStartWidth","nextColumn","leftColW","rightColW","MIN_WIDTH","newLeftW","newRightW","handle","addHandleListeners","colW","newW","onHandleMouseDown","removeEventListeners","onInputBlur","stopEditing","onInputKeyDown","keyCode","renderInput","submit","input","inputElement","newValue","destroyInput","afterEdit","cellEl","TableHeader","RowsVirtualizer","ColumnsResizer","CellEditing","onTBodyFocus","onResize","onScroll","presentationTable","dgOptions","renderCaption","resizeObserver","ResizeObserver","observe","loadColumns","minHeight","clientHeight","scrollToRow","ratio","captionOptions","disconnect","getStateMeta","columnWidths","applyStateMeta","meta","widths","ChainModifier","chain","optionsChain","clear","modifiers","reverse","SortModifier","getRowReferences","rowReferences","orderByColumn","orderInColumn","direction","compare","orderByColumnIndex","rowReference","originalIndexes","shouldBeUpdated","createModifier","getSortingOptions","foundColumnId","columnIDs","foundOrder","columnOptions","loadOptions","stateFromOptions","initialSorting","SortingController","force","modifyData","chainModifier","dataTableCopy","Accessibility","Credits","Table","QueryingController","renderTo","async","afterLoadCallback","userOptions","loadUserOptions","initContainers","initAccessibility","loadDataTable","renderViewport","dataGrids","getElementById","newOptions","oneToOne","loadColumnOptionsOneToOne","loadColumnOptions","columnOptionsArray","columnOptionsObj","newColumnOptions","overwrite","indexInPrevOptions","findIndex","prev","prevOptions","prevColumnOptions","resultOptions","newDataTable","updateColumn","firstRowIndex","viewportMeta","getEnabledColumnIDs","renderTable","renderNoData","headerColumns","columnsIncluded","included","onlyEnabledColumns","columnIds","dgIndex","dg","getJSON","json","getOptionsJSON","onlyUserOptions","optionsCopy","connectors","DataPoolDefaults","DataPool","waiting","getConnector","connectorId","waitingList","connectorOptions","getConnectorOptions","loadConnector","getConnectorIds","connectorIds","getConnectorTable","isNewConnector","ConnectorClass","setConnectorOptions","instances","isHighContrastModeActive","isEdge","matchMedia","testDiv","backgroundImage","bi","currentStyle","setHighContrastTheme","highContrastModeActive","highContrastTheme","hasCustomColors","plotOpts","fillColor","colorIndex","seriesOptions","points","redraw","CSVConverter","dataTypes","useLocalDecimalPoint","lineDelimiter","exportNames","itemDelimiter","toLocaleString","csvRows","rowArray","columnDataType","dataType","cellVal","parserOptions","beforeParse","lines","rowIt","csv","guessedItemDelimiter","guessDelimiter","parseCSVRow","columnStr","rowNumber","guessedDecimalPoint","token","actualColumn","read","pushType","isFinite","initialValue","commas","guessed","potDelimiters","linesCount","inStr","cn","cl","CSVConnector","enablePolling","dataRefreshRate","csvURL","dataModifier","fetch","response","GoogleSheetsConverter","parseOptions","values","GoogleSheetsConnector","googleAPIKey","googleSpreadsheetKey","url","buildFetchURL","URL","canParse","status","alphabet","buildQueryRange","googleSpreadsheetRange","apiKey","sheetKey","onlyColumnNames","pathname","searchParams","set","HTMLTableConverter","tableElementID","useMultiLevelHeaders","htmlRows","tableHead","subcategories","subhead","getTableHeaderHTML","getCellHTMLFromValue","tableCaption","classes","attrs","topheaders","subheaders","useRowspanHeaders","cur","curColspan","rowspan","isRowEqual","row1","row2","tableHTML","HTMLElement","getElementsByTagName","rowsCount","items","itemsLength","columnsInRow","columnsInRowLength","relativeColumnIndex","HTMLTableConnector","tableID","JSONConverter","orientation","arrayWithPath","acc","JSONConnector","dataUrl","InvertModifier","modifiedRowIndex","modifiedColumnNames","reset","j2","RangeModifier","indexes","additive","ranges","rangeColumn","minValue","maxValue","_DataGrid","whcm"],"mappings":"CAAA;;;;;;CAMC,EACA,SAAUA,CAAI,CAAEC,CAAO,EAChB,AAAkB,UAAlB,OAAOC,QAAuBA,OAAOC,OAAO,EAC5CF,EAAQ,OAAU,CAAGA,EACrBC,OAAOC,OAAO,CAAG,AAACH,GAAQA,EAAKI,QAAQ,CACnCH,EAAQD,GACRC,GACG,AAAkB,YAAlB,OAAOI,QAAyBA,OAAOC,GAAG,CACjDD,OAAO,oBAAqB,WACxB,OAAOJ,EAAQD,EACnB,IAEIA,EAAKO,QAAQ,EACbP,EAAKO,QAAQ,CAACC,KAAK,CAAC,GAAI,CAAA,GAE5BR,EAAKO,QAAQ,CAAGN,EAAQD,GAEhC,EAAE,AAAkB,aAAlB,OAAOS,OAAyBA,OAAS,IAAI,CAAE,SAAUA,CAAM,EAC7D,aACA,IAAIC,EAAW,CAAC,EAChB,SAASC,EAAgBC,CAAG,CAAEC,CAAI,CAAEC,CAAI,CAAEC,CAAE,EACpC,CAACH,EAAII,cAAc,CAACH,KACpBD,CAAG,CAACC,EAAK,CAAGE,EAAGE,KAAK,CAAC,KAAMH,GAEvBL,GAAU,AAAuB,YAAvB,O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CAAE,AAACC,IAC9BP,EAAiBO,EAAWZ,EAChC,GACIA,EAAS5Q,MAAM,EACfoR,CAAAA,EAAQR,QAAQ,CAAGA,CAAO,CAElC,CACAM,EAAMvT,IAAI,CAACyT,EACf,EAEA,MADA,EAAE,CAAC/N,OAAO,CAACjF,IAAI,CAACjE,EAAI6W,IAAI,CAACO,UAAU,CAAE,AAACC,GAAcP,EAAiBO,EAAW1B,IACzEA,CACX,CACJ,CA2QA,OAtPArB,EAAII,iBAAiB,CAAG,CACpB,MACA,gBACA,mBACA,gBACA,gBACA,cACA,aACA,kBACA,YACA,eACA,gBACA,uBACA,gBACA,QACA,YACA,QACA,UACA,KACA,KACA,IACA,KACA,KACA,WACA,OACA,cACA,cACA,gBACA,SACA,OACA,KACA,KACA,MACA,eACA,cACA,SACA,UACA,WACA,SACA,UACA,cACA,eACA,eACA,IACA,SACA,OACA,OACA,OACA,QACA,QACA,MACA,cACA,eACA,SACA,iBACA,eACA,QACA,cACA,SACA,UACA,UACA,SACA,WACA,aACA,cACA,aACA,aACA,QACA,OACA,SACA,QACA,IACA,KACA,KACA,aACA,IACA,KACA,KACA,SACH,CAgBDJ,EAAIK,iBAAiB,CAAG,CACpB,WACA,UACA,UACA,IACA,MACA,KACA,IACH,CAeDL,EAAIgC,WAAW,CAAG,CACd,IACA,OACA,IACA,KACA,SACA,UACA,SACA,WACA,OACA,KACA,OACA,MACA,KACA,KACA,KACA,sBACA,cACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,eACA,WACA,UACA,cACA,SACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MACA,KACA,iBACA,SACA,KACA,IACA,OACA,UACA,MACA,OACA,QACA,OACA,OACA,SACA,QACA,MACA,MACA,MACA,QACA,OACA,WACA,QACA,QACA,QACA,QACA,KACA,KACA,KACA,IACA,KACA,QACH,CACDhC,EAAID,SAAS,CAAGA,EA4BhBC,EAAI+B,mBAAmB,CAAG,CAAA,EA8BnB/B,CACX,GACArV,EAA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