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AAO,qBAAsB,0BAC5C,eAAe,OAAO,mBAAoB,wBAC1C,eAAe,OAAO,+BAAgC,cAAc,eAEpE,eAAe,OAAO,uBAAwB,cAAc,eAE5D,eAAe,OAAO,sBAAuB,kCAoBpC,eAAgB,aAAc,QAAS,cAAe","file":"/npm/@highcharts/controls@0.8.0/js/controls.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@highcharts/controls@0.8.0/js/controls.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * Type guard for SeparatorParams\n */\nfunction is$5(params) {\n    return params.type === 'separator';\n}\nfunction create$5(controls) {\n    if (!controls.container) {\n        throw new Error('Container for controls not found');\n    }\n    const row = controls.container.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-separator-row' }));\n    const cell1 = row.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-separator-cell' }));\n    // Add second cell to match the two-column layout\n    row.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-separator-cell' }));\n    cell1.appendChild(Object.assign(document.createElement('hr'), { className: 'hcc-separator' }));\n}\n\nvar SeparatorControl = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    create: create$5,\n    is: is$5\n});\n\n/**\n * Utility functions for Highcharts Controls\n */\n/**\n * Get a nested value from an object given a dot-separated path.\n * Supports array notation, e.g., 'series[0].name' or 'xAxis[0].title.text'\n */\nfunction getNestedValue(obj, path) {\n    path = path.replace(/^(xAxis|yAxis)\\./, '$1[0].');\n    // Split path into segments, handling array notation\n    // e.g., 'series[0].data[1]' becomes ['series', '0', 'data', '1']\n    const segments = path.split(/\\.|\\[|\\]/).filter(s => s !== '');\n    return segments.reduce((current, key) => current?.[key], obj);\n}\n/**\n * Type guard for GroupParams\n */\nfunction isGroupParams(params) {\n    return 'group' in params && Array.isArray(params.controls);\n}\n/**\n * Create the common scaffolding structure for all control types\n * Returns the created DOM elements for the control type to populate\n */\nfunction createControlScaffolding(params, container) {\n    const isNullish = params.value === null || params.value === undefined;\n    const controlDiv = container.appendChild(Object.assign(document.createElement('div'), {\n        className: `hcc-control hcc-control-${params.type}${isNullish ? ' hcc-control-nullish' : ''}`\n    }));\n    const keyDiv = controlDiv.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-key' }));\n    const valueDiv = controlDiv.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-value' }));\n    const valueDivInner = valueDiv.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-value-inner' }));\n    return { controlDiv, keyDiv, valueDiv, valueDivInner };\n}\n/**\n * Create a nullable toggle button\n * Returns the button element that can be appended to a control\n */\nfunction createNullableButton(params, controlDiv, onToggle) {\n    const button = Object.assign(document.createElement('button'), {\n        type: 'button',\n        className: 'hcc-nullable-button',\n        title: 'Set to null',\n        innerHTML: '⊘',\n        'aria-label': 'Set to null'\n    });\n    button.addEventListener('click', (e) => {\n        e.preventDefault();\n        e.stopPropagation();\n        onToggle();\n    });\n    return button;\n}\n\n/**\n * Base Control Class\n *\n * Provides a standalone control that can be used independently or as part\n * of the Controls collection. Extends EventTarget for native event handling.\n */\nclass Control extends EventTarget {\n    constructor(params, container) {\n        super();\n        this.params = params;\n        this.container = container;\n        this.elements = {};\n        this._value = params.value;\n        if (container) {\n            this.render(container);\n        }\n    }\n    /**\n     * Get the current value of the control\n     */\n    get value() {\n        return this._value;\n    }\n    /**\n     * Set the value of the control programmatically\n     */\n    set value(newValue) {\n        if (this._value !== newValue) {\n            const oldValue = this._value;\n            this._value = newValue;\n            this.updateUI();\n            this.emit('change', { value: newValue, oldValue, path: this.params.path });\n        }\n    }\n    /**\n     * Emit a custom event\n     */\n    emit(eventName, detail) {\n        this.dispatchEvent(new CustomEvent(eventName, {\n            detail,\n            bubbles: true,\n            cancelable: true\n        }));\n    }\n    /**\n     * Destroy the control and clean up\n     */\n    destroy() {\n        this.elements.controlDiv?.remove();\n        // Subclasses can override to add more cleanup\n    }\n    /**\n     * Get the control's DOM element\n     */\n    getElement() {\n        return this.elements.controlDiv;\n    }\n}\n\n/**\n * BooleanControl class - toggle switch for boolean values\n */\nclass BooleanControl extends Control {\n    /**\n     * Type guard for BooleanControlParams\n     */\n    static is(params) {\n        return params.type === 'boolean';\n    }\n    /**\n     * Render the boolean control\n     */\n    render(container) {\n        const { controlDiv, keyDiv, valueDivInner } = createControlScaffolding(this.params, container);\n        this.elements.controlDiv = controlDiv;\n        this.elements.keyDiv = keyDiv;\n        this.elements.valueDivInner = valueDivInner;\n        const rid = this.params.path.replace(/[^a-z0-9_-]/gi, '-');\n        keyDiv.appendChild(Object.assign(document.createElement('label'), {\n            htmlFor: `toggle-checkbox-${rid}`,\n            innerHTML: this.params.label || `<code>${this.params.path}</code>`,\n            title: this.params.label || this.params.path\n        }));\n        if (this.params.nullable) {\n            // Nullable tri-state toggle: false (left), null (middle), true (right)\n            const labelToggle = valueDivInner.appendChild(Object.assign(document.createElement('label'), { className: 'hcc-toggle hcc-toggle-nullable' }));\n            this.currentState = this._value === null || this._value === undefined ? null : Boolean(this._value);\n            // Create a hidden input to store state (not used for interaction)\n            this.input = labelToggle.appendChild(Object.assign(document.createElement('input'), {\n                type: 'hidden',\n                id: `toggle-checkbox-${rid}`\n            }));\n            this.slider = labelToggle.appendChild(Object.assign(document.createElement('span'), {\n                className: 'hcc-toggle-slider',\n                'aria-hidden': 'true'\n            }));\n            this.slider.addEventListener('click', () => {\n                this.handleNullableClick();\n            });\n            this.updateUI();\n        }\n        else {\n            // Standard two-state toggle\n            const labelToggle = valueDivInner.appendChild(Object.assign(document.createElement('label'), { className: 'hcc-toggle' }));\n            this.input = labelToggle.appendChild(Object.assign(document.createElement('input'), {\n                type: 'checkbox',\n                id: `toggle-checkbox-${rid}`\n            }));\n            this.slider = labelToggle.appendChild(Object.assign(document.createElement('span'), {\n                className: 'hcc-toggle-slider',\n                'aria-hidden': 'true'\n            }));\n            this.input.addEventListener('change', () => {\n                this.handleStandardChange();\n            });\n            this.updateUI();\n        }\n    }\n    /**\n     * Handle click on nullable toggle\n     */\n    handleNullableClick() {\n        // Cycle: false -> null -> true -> false\n        if (this.currentState === false) {\n            this.currentState = null;\n        }\n        else if (this.currentState === null) {\n            this.currentState = true;\n        }\n        else {\n            this.currentState = false;\n        }\n        const oldValue = this._value;\n        this._value = this.currentState;\n        this.updateUI();\n        this.emit('change', {\n            value: this.currentState,\n            oldValue,\n            path: this.params.path\n        });\n    }\n    /**\n     * Handle change on standard toggle\n     */\n    handleStandardChange() {\n        if (!this.input)\n            return;\n        const oldValue = this._value;\n        this._value = this.input.checked;\n        this.elements.controlDiv?.classList.remove('hcc-control-nullish');\n        this.emit('change', {\n            value: this._value,\n            oldValue,\n            path: this.params.path\n        });\n    }\n    /**\n     * Update UI to reflect current value\n     */\n    updateUI() {\n        if (this.params.nullable && this.slider) {\n            // Remove all state classes\n            this.slider.classList.remove('hcc-toggle-slider-false', 'hcc-toggle-slider-null', 'hcc-toggle-slider-true');\n            if (this.currentState === null) {\n                this.slider.classList.add('hcc-toggle-slider-null');\n                this.elements.controlDiv?.classList.add('hcc-control-nullish');\n            }\n            else if (this.currentState === false) {\n                this.slider.classList.add('hcc-toggle-slider-false');\n                this.elements.controlDiv?.classList.remove('hcc-control-nullish');\n            }\n            else {\n                this.slider.classList.add('hcc-toggle-slider-true');\n                this.elements.controlDiv?.classList.remove('hcc-control-nullish');\n            }\n        }\n        else if (this.input && this.input.type === 'checkbox') {\n            this.input.checked = Boolean(this._value);\n        }\n    }\n}\n/**\n * Legacy factory function for backward compatibility\n * @deprecated Use BooleanControl class directly\n */\nfunction create$4(controls, params) {\n    const control = new BooleanControl(params);\n    control.render(controls.container);\n    // Bind to target if it exists\n    control.addEventListener('change', ((e) => {\n        const customEvent = e;\n        controls.setNestedValue(params.path, customEvent.detail.value);\n    }));\n}\n/**\n * Legacy type guard for backward compatibility\n * @deprecated Use BooleanControl.is() instead\n */\nfunction is$4(params) {\n    return BooleanControl.is(params);\n}\n\nvar BooleanControl$1 = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    BooleanControl: BooleanControl,\n    create: create$4,\n    is: is$4\n});\n\n/**\n * Type guard for SelectControlParams\n */\nfunction is$3(params) {\n    return params.type === 'select';\n}\n/**\n * Create a select control with scaffolding\n */\nfunction create$3(controls, params) {\n    const { controlDiv, keyDiv, valueDivInner } = createControlScaffolding(params, controls.container);\n    keyDiv.appendChild(Object.assign(document.createElement('label'), {\n        innerHTML: params.label || `<code>${params.path}</code>`,\n        title: params.label || params.path\n    }));\n    // Deduce options\n    if (params.path.endsWith('.align') ||\n        params.path.endsWith('.textAlign')) {\n        params.options || (params.options = ['left', 'center', 'right']);\n    }\n    if (params.path.toLowerCase().endsWith('dashstyle')) {\n        params.options || (params.options = [\n            'Solid', 'ShortDash', 'ShortDot', 'ShortDashDot',\n            'ShortDashDotDot', 'Dot', 'Dash', 'LongDash',\n            'DashDot', 'LongDashDot', 'LongDashDotDot'\n        ]);\n    }\n    if (params.path.endsWith('.fontWeight')) {\n        params.options || (params.options = ['normal', 'bold', 'lighter']);\n    }\n    if (params.path.endsWith('.verticalAlign')) {\n        params.options || (params.options = ['top', 'middle', 'bottom']);\n    }\n    // Ensure current value is in options\n    const options = params.options || [];\n    if (params.value !== null &&\n        params.value !== undefined &&\n        !options.includes(params.value)) {\n        options.unshift(params.value);\n    }\n    // Determine whether to use select dropdown or button group\n    const totalLength = options.reduce((sum, opt) => sum + opt.length, 0);\n    const useDropdown = options.length > 3 || totalLength > 24;\n    if (useDropdown) {\n        // Render as select dropdown\n        valueDivInner.classList.add('hcc-select-control');\n        const select = valueDivInner.appendChild(Object.assign(document.createElement('select'), {\n            className: 'hcc-select-dropdown'\n        }));\n        // Add null option if nullable\n        if (params.nullable) {\n            const isNullSelected = params.value === null || params.value === undefined;\n            select.appendChild(Object.assign(document.createElement('option'), {\n                value: '__null__',\n                innerText: '—',\n                selected: isNullSelected\n            }));\n            if (isNullSelected) {\n                controlDiv.classList.add('hcc-control-nullish');\n            }\n        }\n        options.forEach((option) => {\n            const isSelected = params.value !== null &&\n                params.value !== undefined &&\n                params.value === option;\n            select.appendChild(Object.assign(document.createElement('option'), {\n                value: option,\n                innerText: option,\n                selected: isSelected\n            }));\n        });\n        select.addEventListener('change', () => {\n            const value = select.value;\n            if (value === '__null__') {\n                controlDiv.classList.add('hcc-control-nullish');\n                controls.setNestedValue(params.path, null);\n            }\n            else {\n                controlDiv.classList.remove('hcc-control-nullish');\n                controls.setNestedValue(params.path, value);\n            }\n        });\n    }\n    else {\n        // Render as button group\n        valueDivInner.classList.add('hcc-button-group');\n        options.forEach((option) => {\n            const isActive = params.value !== null &&\n                params.value !== undefined &&\n                params.value === option;\n            const button = valueDivInner.appendChild(Object.assign(document.createElement('button'), {\n                className: 'hcc-button' +\n                    (isActive ? ' active' : ''),\n                innerText: option\n            }));\n            button.dataset.path = params.path;\n            button.dataset.value = option;\n            button.addEventListener('click', () => {\n                controlDiv.classList.remove('hcc-control-nullish');\n                const value = button.getAttribute('data-value');\n                controls.setNestedValue(params.path, value);\n                // Update active state for all buttons in this group\n                const allButtons = document.querySelectorAll(`[data-path=\"${params.path}\"]`);\n                allButtons.forEach((b) => b.classList.remove('active'));\n                button.classList.add('active');\n            });\n        });\n        // Add null button if nullable (at the end, on the right)\n        if (params.nullable) {\n            const isNullActive = params.value === null || params.value === undefined;\n            const nullButton = valueDivInner.appendChild(Object.assign(document.createElement('button'), {\n                className: 'hcc-button' +\n                    (isNullActive ? ' active' : ''),\n                innerHTML: '⊘'\n            }));\n            nullButton.dataset.path = params.path;\n            nullButton.dataset.value = '__null__';\n            if (isNullActive) {\n                controlDiv.classList.add('hcc-control-nullish');\n            }\n            nullButton.addEventListener('click', () => {\n                controlDiv.classList.add('hcc-control-nullish');\n                controls.setNestedValue(params.path, null);\n                // Update active state for all buttons in this group\n                const allButtons = document.querySelectorAll(`[data-path=\"${params.path}\"]`);\n                allButtons.forEach((b) => b.classList.remove('active'));\n                nullButton.classList.add('active');\n            });\n        }\n    }\n}\n\nvar SelectControl = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    create: create$3,\n    is: is$3\n});\n\n/* eslint-disable @highcharts/highcharts/no-highcharts-object */\nconst Product$1 = window.Highcharts || window.Grid;\n/**\n * ColorControl class - standalone color picker with opacity\n */\nclass ColorControl extends Control {\n    /**\n     * Type guard for ColorControlParams\n     */\n    static is(params) {\n        return params.type === 'color';\n    }\n    /**\n     * Render the color control\n     */\n    render(container) {\n        const { controlDiv, keyDiv, valueDivInner } = createControlScaffolding(this.params, container);\n        this.elements.controlDiv = controlDiv;\n        this.elements.keyDiv = keyDiv;\n        this.elements.valueDivInner = valueDivInner;\n        const rid = this.params.path.replace(/[^a-z0-9_-]/gi, '-');\n        keyDiv.appendChild(Object.assign(document.createElement('label'), {\n            htmlFor: `color-input-${rid}`,\n            innerHTML: this.params.label || `<code>${this.params.path}</code>`,\n            title: this.params.label || this.params.path\n        }));\n        this.colorInput = valueDivInner.appendChild(Object.assign(document.createElement('input'), {\n            type: 'color',\n            id: `color-input-${rid}`\n        }));\n        this.valueEl = valueDivInner.appendChild(Object.assign(document.createElement('label'), {\n            id: `color-value-${rid}`,\n            className: 'hcc-color-value',\n            htmlFor: `color-input-${rid}`,\n            title: this.params.label || this.params.path\n        }));\n        this.opacityDisplay = valueDivInner.appendChild(Object.assign(document.createElement('span'), {\n            id: `opacity-display-${rid}`,\n            className: 'hcc-opacity-display',\n            title: this.params.label || this.params.path\n        }));\n        valueDivInner.appendChild(Object.assign(document.createElement('span'), {\n            textContent: '%',\n            className: 'hcc-opacity-input-label'\n        }));\n        // Container for the range slider popup\n        this.opacityRangeContainer = valueDivInner.appendChild(Object.assign(document.createElement('div'), {\n            className: 'hcc-opacity-range-container hcc-hidden'\n        }));\n        this.opacityInput = this.opacityRangeContainer.appendChild(Object.assign(document.createElement('input'), {\n            type: 'range',\n            id: `opacity-input-${rid}`,\n            className: 'hcc-opacity-input',\n            min: '0',\n            max: '100',\n            step: '1'\n        }));\n        // Show/hide range slider on opacity display click\n        this.opacityDisplay.addEventListener('click', (e) => {\n            e.stopPropagation();\n            this.opacityRangeContainer.classList.remove('hcc-hidden');\n            this.opacityInput.focus();\n        });\n        // Hide range slider on Enter key\n        this.opacityInput.addEventListener('keydown', (e) => {\n            if (e.key === 'Enter') {\n                this.opacityRangeContainer.classList.add('hcc-hidden');\n            }\n        });\n        // Hide range slider when clicking outside\n        this.hideRangeHandler = (e) => {\n            if (!this.opacityRangeContainer.contains(e.target) &&\n                !this.opacityDisplay.contains(e.target)) {\n                this.opacityRangeContainer.classList.add('hcc-hidden');\n            }\n        };\n        document.addEventListener('click', this.hideRangeHandler);\n        // Set up event listeners\n        this.colorInput.addEventListener('input', () => {\n            this.handleInputChange();\n        });\n        this.opacityInput.addEventListener('input', () => {\n            this.handleInputChange();\n        });\n        // Add nullable button if needed\n        if (this.params.nullable) {\n            const nullableButton = createNullableButton(this.params, controlDiv, () => {\n                this.value = null;\n            });\n            valueDivInner.appendChild(nullableButton);\n        }\n        // Initialize UI\n        this.updateUI();\n    }\n    /**\n     * Handle input changes from color picker or opacity slider\n     */\n    handleInputChange() {\n        if (!this.colorInput || !this.opacityInput)\n            return;\n        this.elements.controlDiv?.classList.remove('hcc-control-nullish');\n        const rgba = this.colorInput.value; // E.g. #RRGGBB\n        const opacity = parseFloat(this.opacityInput.value) / 100;\n        // Use Highcharts.color to apply opacity and produce rgba()/hex\n        const hcColor = Product$1.color(rgba).setOpacity(opacity);\n        const newValue = this.getHex(hcColor, true);\n        // Update internal value and emit event\n        const oldValue = this._value;\n        this._value = newValue;\n        // Update display elements\n        this.valueEl.textContent = this.getHex(hcColor);\n        this.opacityDisplay.textContent = this.opacityInput.value;\n        this.updateOpacityGradient(hcColor);\n        // Emit change event\n        this.emit('change', {\n            value: newValue,\n            oldValue,\n            path: this.params.path\n        });\n    }\n    /**\n     * Update UI to reflect current value\n     */\n    updateUI() {\n        if (!this.colorInput || !this.opacityInput || !this.valueEl || !this.opacityDisplay) {\n            return;\n        }\n        const isNullish = this._value === null || this._value === undefined;\n        let hcColor = isNullish ? Product$1.color('#808080') : Product$1.color(this._value);\n        if (!isNullish && hcColor.rgba.toString().indexOf('NaN') !== -1) {\n            console.warn(`Highcharts Controls: Invalid color value for path \"${this.params.path}\": ${this._value}`);\n            // Treat invalid color as nullish\n            this.elements.controlDiv?.classList.add('hcc-control-nullish');\n            this.valueEl.textContent = '—';\n            this.colorInput.value = '#808080';\n            this.opacityInput.value = '100';\n            this.opacityDisplay.textContent = '100';\n        }\n        else if (isNullish) {\n            this.elements.controlDiv?.classList.add('hcc-control-nullish');\n            this.valueEl.textContent = '—';\n            this.colorInput.value = '#808080';\n            this.opacityInput.value = '100';\n            this.opacityDisplay.textContent = '100';\n        }\n        else {\n            this.elements.controlDiv?.classList.remove('hcc-control-nullish');\n            const hex = this.getHex(hcColor);\n            const opacity = (hcColor.rgba[3] || 1) * 100;\n            this.colorInput.value = hex;\n            this.valueEl.textContent = hex;\n            this.opacityInput.value = String(Math.round(opacity));\n            this.opacityDisplay.textContent = String(Math.round(opacity));\n        }\n        // Initialize opacity slider gradient\n        this.updateOpacityGradient(hcColor);\n    }\n    /**\n     * Convert color to hex string\n     */\n    getHex(color, includeAlpha) {\n        const rgba = color.rgba;\n        let hex = `#${(((1 << 24) +\n            (rgba[0] << 16) +\n            (rgba[1] << 8) +\n            rgba[2])\n            .toString(16)\n            .slice(1)).toLowerCase()}`;\n        if (includeAlpha && rgba[3] !== undefined && rgba[3] !== 1) {\n            const alpha = Math.round(rgba[3] * 255);\n            hex += ((1 << 8) + alpha).toString(16).slice(1).toLowerCase();\n        }\n        return hex;\n    }\n    /**\n     * Update opacity slider gradient based on color\n     */\n    updateOpacityGradient(color) {\n        if (!this.opacityInput)\n            return;\n        const r = color.rgba[0];\n        const g = color.rgba[1];\n        const b = color.rgba[2];\n        this.opacityInput.style.setProperty('--hcc-opacity-gradient-start', `rgba(${r}, ${g}, ${b}, 0)`);\n        this.opacityInput.style.setProperty('--hcc-opacity-gradient-end', `rgba(${r}, ${g}, ${b}, 1)`);\n    }\n    /**\n     * Clean up event listeners\n     */\n    destroy() {\n        if (this.hideRangeHandler) {\n            document.removeEventListener('click', this.hideRangeHandler);\n        }\n        super.destroy();\n    }\n}\n/**\n * Legacy factory function for backward compatibility\n * @deprecated Use ColorControl class directly\n */\nfunction create$2(controls, params) {\n    const control = new ColorControl(params);\n    control.render(controls.container);\n    // Bind to target if it exists\n    control.addEventListener('change', ((e) => {\n        const customEvent = e;\n        controls.setNestedValue(params.path, customEvent.detail.value, false);\n    }));\n}\n/**\n * Legacy type guard for backward compatibility\n * @deprecated Use ColorControl.is() instead\n */\nfunction is$2(params) {\n    return ColorControl.is(params);\n}\n\nvar ColorControl$1 = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    ColorControl: ColorControl,\n    create: create$2,\n    is: is$2\n});\n\n/**\n * NumberControl class - range slider for numeric values\n */\nclass NumberControl extends Control {\n    constructor() {\n        super(...arguments);\n        this.unit = '';\n        this.isDragging = false;\n        this.mouseIsDown = false;\n        this.decimals = 0;\n    }\n    /**\n     * Type guard for NumberControlParams\n     */\n    static is(params) {\n        return params.type === 'number';\n    }\n    /**\n     * Render the number control\n     */\n    render(container) {\n        const { controlDiv, keyDiv, valueDivInner } = createControlScaffolding(this.params, container);\n        this.elements.controlDiv = controlDiv;\n        this.elements.keyDiv = keyDiv;\n        this.elements.valueDivInner = valueDivInner;\n        const rid = this.params.path.replace(/[^a-z0-9_-]/gi, '-');\n        let value = this._value;\n        // Extract unit from current value if it's a string\n        let numericValue;\n        if (typeof value === 'string') {\n            const match = value.match(/^([+-]?\\d+\\.?\\d*)\\s*(.*)$/);\n            if (match) {\n                numericValue = parseFloat(match[1]);\n                this.unit = match[2] || this.unit;\n            }\n        }\n        else {\n            numericValue = value;\n        }\n        // Set default min/max if not provided\n        if (this.params.min === void 0 || this.params.max === void 0) {\n            if (/(lineWidth|borderWidth)$/i.test(this.params.path)) {\n                this.params.min = this.params.min ?? 0;\n                this.params.max = this.params.max ?? 5;\n            }\n            else if (/(borderRadius)$/i.test(this.params.path)) {\n                this.params.min = this.params.min ?? 0;\n                this.params.max = this.params.max ?? 10;\n            }\n            else if (/\\.(x|y|offsetX|offsetY|offset)$/i.test(this.params.path)) {\n                this.params.min = this.params.min ?? -100;\n                this.params.max = this.params.max ?? 100;\n            }\n            else if (/rotation$/i.test(this.params.path)) {\n                this.params.min = this.params.min ?? -90;\n                this.params.max = this.params.max ?? 90;\n            }\n            else {\n                this.params.min = this.params.min ?? 0;\n                this.params.max = this.params.max ?? 100;\n            }\n        }\n        if (typeof numericValue === 'number') {\n            if (this.params.min > numericValue) {\n                this.params.min = numericValue;\n            }\n            if (this.params.max < numericValue) {\n                this.params.max = numericValue;\n            }\n        }\n        // Set default step for em/rem units\n        if (!this.params.step && (this.unit === 'em' || this.unit === 'rem')) {\n            this.params.step = 0.1;\n        }\n        keyDiv.appendChild(Object.assign(document.createElement('label'), {\n            htmlFor: `range-input-${rid}`,\n            innerHTML: this.params.label || `<code>${this.params.path}</code>`,\n            title: this.params.label || this.params.path\n        }));\n        const isNullish = numericValue === null || numericValue === undefined;\n        this.valueEl = valueDivInner.appendChild(Object.assign(document.createElement('span'), {\n            id: `range-value-${rid}`,\n            className: 'hcc-range-value',\n            title: this.params.label || this.params.path\n        }));\n        const strStep = String(this.params.step || 1);\n        this.input = valueDivInner.appendChild(Object.assign(document.createElement('input'), {\n            type: 'range',\n            id: `range-input-${rid}`,\n            min: String(this.params.min),\n            max: String(this.params.max),\n            step: strStep,\n            title: this.params.label || this.params.path\n        }));\n        if (isNullish) {\n            // Set to middle of range for nullish state\n            this.input.value = String((this.params.min + this.params.max) / 2);\n            this.valueEl.textContent = '';\n        }\n        else {\n            this.input.value = String(numericValue);\n            this.valueEl.textContent = this.unit ? `${numericValue}${this.unit}` : String(numericValue);\n        }\n        // Track if user is actively dragging vs clicking to jump\n        this.input.addEventListener('mousedown', () => {\n            this.mouseIsDown = true;\n            this.isDragging = false;\n        });\n        // Detect actual dragging by tracking mouse movement\n        this.onMouseMove = () => {\n            if (this.mouseIsDown) {\n                this.isDragging = true;\n            }\n        };\n        document.addEventListener('mousemove', this.onMouseMove);\n        this.onMouseUp = () => {\n            this.mouseIsDown = false;\n        };\n        document.addEventListener('mouseup', this.onMouseUp);\n        // Keep a fixed number of decimals to avoid jumping (#7)\n        this.decimals = strStep.indexOf('.') >= 0 ?\n            strStep.split('.')[1].length : 0;\n        this.input.addEventListener('input', () => {\n            this.handleInputChange(false);\n        });\n        this.input.addEventListener('change', () => {\n            this.handleInputChange(true);\n        });\n        // Add nullable button if needed\n        if (this.params.nullable) {\n            const nullableButton = createNullableButton(this.params, controlDiv, () => {\n                this.value = null;\n            });\n            valueDivInner.appendChild(nullableButton);\n        }\n    }\n    /**\n     * Handle input changes\n     */\n    handleInputChange(isChangeEvent) {\n        if (!this.input || !this.valueEl)\n            return;\n        this.elements.controlDiv?.classList.remove('hcc-control-nullish');\n        if (isChangeEvent) {\n            // Only emit/animate if user clicked to jump, not after dragging\n            if (!this.isDragging) {\n                this.emitValue(true);\n            }\n            this.isDragging = false;\n        }\n        else {\n            // During dragging\n            if (this.isDragging) {\n                this.emitValue(false);\n            }\n        }\n    }\n    /**\n     * Emit value change event\n     */\n    emitValue(animation) {\n        if (!this.input || !this.valueEl)\n            return;\n        const numValue = parseFloat(this.input.value);\n        const sValue = numValue.toFixed(this.decimals);\n        const displayValue = this.unit ? `${sValue}${this.unit}` : sValue;\n        const chartValue = this.unit ? `${numValue}${this.unit}` : numValue;\n        this.valueEl.textContent = displayValue;\n        const oldValue = this._value;\n        this._value = chartValue;\n        this.emit('change', {\n            value: chartValue,\n            oldValue,\n            path: this.params.path,\n            animation\n        });\n    }\n    /**\n     * Update UI to reflect current value\n     */\n    updateUI() {\n        if (!this.input || !this.valueEl)\n            return;\n        if (this._value === null || this._value === undefined) {\n            this.input.value = String((this.params.min + this.params.max) / 2);\n            this.valueEl.textContent = '';\n            this.elements.controlDiv?.classList.add('hcc-control-nullish');\n        }\n        else {\n            let numericValue;\n            if (typeof this._value === 'string') {\n                const match = this._value.match(/^([+-]?\\d+\\.?\\d*)/);\n                if (match) {\n                    numericValue = parseFloat(match[1]);\n                }\n            }\n            else {\n                numericValue = this._value;\n            }\n            if (numericValue !== undefined) {\n                this.input.value = String(numericValue);\n                this.valueEl.textContent = this.unit ?\n                    `${numericValue}${this.unit}` :\n                    String(numericValue);\n            }\n            this.elements.controlDiv?.classList.remove('hcc-control-nullish');\n        }\n    }\n    /**\n     * Clean up event listeners\n     */\n    destroy() {\n        if (this.onMouseMove) {\n            document.removeEventListener('mousemove', this.onMouseMove);\n        }\n        if (this.onMouseUp) {\n            document.removeEventListener('mouseup', this.onMouseUp);\n        }\n        super.destroy();\n    }\n}\n/**\n * Legacy factory function for backward compatibility\n * @deprecated Use NumberControl class directly\n */\nfunction create$1(controls, params) {\n    const control = new NumberControl(params);\n    control.render(controls.container);\n    // Bind to target if it exists\n    control.addEventListener('change', ((e) => {\n        const customEvent = e;\n        controls.setNestedValue(params.path, customEvent.detail.value, customEvent.detail.animation);\n    }));\n}\n/**\n * Legacy type guard for backward compatibility\n * @deprecated Use NumberControl.is() instead\n */\nfunction is$1(params) {\n    return NumberControl.is(params);\n}\n\nvar NumberControl$1 = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    NumberControl: NumberControl,\n    create: create$1,\n    is: is$1\n});\n\n/**\n * Type guard for TextControlParams\n */\nfunction is(params) {\n    return params.type === 'text';\n}\n/**\n * Create a text control with scaffolding\n */\nfunction create(controls, params) {\n    const { controlDiv, keyDiv, valueDivInner } = createControlScaffolding(params, controls.container);\n    const rid = params.path.replace(/[^a-z0-9_-]/gi, '-');\n    keyDiv.appendChild(Object.assign(document.createElement('label'), {\n        htmlFor: `text-input-${rid}`,\n        innerHTML: params.label || `<code>${params.path}</code>`,\n        title: params.label || params.path\n    }));\n    const input = valueDivInner.appendChild(Object.assign(document.createElement('input'), {\n        type: 'text',\n        id: `text-input-${rid}`,\n        className: 'hcc-text-input',\n        title: params.label || params.path\n    }));\n    const isNullish = params.value === null || params.value === undefined;\n    if (isNullish) {\n        input.value = '';\n        input.placeholder = 'null';\n    }\n    else {\n        input.value = String(params.value || '');\n    }\n    input.addEventListener('input', () => {\n        controlDiv.classList.remove('hcc-control-nullish');\n        input.placeholder = '';\n        const value = input.value;\n        controls.setNestedValue(params.path, value, false);\n    });\n    if (params.nullable) {\n        const nullableButton = createNullableButton(params, controlDiv, () => {\n            input.value = '';\n            input.placeholder = 'null';\n            controlDiv.classList.add('hcc-control-nullish');\n            controls.setNestedValue(params.path, null, false);\n        });\n        valueDivInner.appendChild(nullableButton);\n    }\n}\n\nvar TextControl = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    create: create,\n    is: is\n});\n\n/**\n * Index file for Control Types\n * Exports all control types and their type guards\n */\n/**\n * Registry of all control types, in order of priority for type checking\n */\nconst controlTypeRegistry = [\n    SelectControl,\n    BooleanControl$1,\n    ColorControl$1,\n    NumberControl$1,\n    TextControl,\n    SeparatorControl\n];\n\n/**\n * Highcharts Controls\n *\n * Provides UI controls to manipulate chart options on the fly.\n *\n * Used by the sample generator to create interactive samples:\n * - node tools/sample-generator/index.ts\n */\n/* eslint-disable @highcharts/highcharts/no-highcharts-object */\nconst Product = window.Highcharts || window.Grid;\nclass Controls {\n    constructor(renderTo, options) {\n        renderTo = (typeof renderTo === 'string' &&\n            document.getElementById(renderTo)) ||\n            (typeof renderTo === 'object' && renderTo) ||\n            document.body.appendChild(Object.assign(document.createElement('div')));\n        const displayClass = options.display === 'block'\n            ? 'hcc-display-block'\n            : 'hcc-display-inline-block';\n        const outerContainer = renderTo.appendChild(Object.assign(document.createElement('div'), { className: `highcharts-controls ${displayClass}` }));\n        this.container = outerContainer.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-container' }));\n        this.target = (options.target ||\n            Product?.charts?.[0] ||\n            Product?.grids?.[0]);\n        // Target is now optional - controls can work standalone\n        // Inject CSS if requested\n        if (options.injectCSS !== false) {\n            this.injectCSS();\n        }\n        // Add the controls\n        options.controls?.forEach((control) => {\n            if (isGroupParams(control)) {\n                this.addGroup(control);\n            }\n            else {\n                this.addControl(control);\n            }\n        });\n        this.addPreview();\n        // Keep the options preview updated\n        this.updateOptionsPreview();\n    }\n    /**\n     * Set a nested value on the target given a dot-separated path.\n     * Supports array notation, e.g., 'series[0].name' or 'xAxis[0].title.text'\n     */\n    setNestedValue(path, value, animation) {\n        // If no target, skip updating the chart\n        if (!this.target) {\n            return;\n        }\n        // Split path into segments, handling array notation\n        // e.g., 'series[0].data[1]' becomes ['series', '0', 'data', '1']\n        const keys = path.split(/\\.|\\[|\\]/).filter(s => s !== '');\n        const updateObj = {};\n        let cur = updateObj;\n        for (let i = 0; i < keys.length; i++) {\n            const k = keys[i];\n            if (i === keys.length - 1) {\n                cur[k] = value;\n            }\n            else {\n                // Check if next key is a number (array index)\n                const nextKey = keys[i + 1];\n                const isNextArray = !isNaN(Number(nextKey));\n                if (isNextArray) {\n                    // Make sure to retain existing array items, for example\n                    // when setting `palette.light.colors[0]`, we want to retain\n                    // the other colors in the array.\n                    const existingArray = getNestedValue(this.target.options, keys.slice(0, i + 1).join('.'));\n                    if (Array.isArray(existingArray)) {\n                        // But only retain primitive values, as objects may have\n                        // nested properties, so we don't want expensive updates\n                        // on those (#14)\n                        cur[k] = existingArray.slice().map(item => typeof item === 'object' && item !== null ?\n                            void 0 : item);\n                    }\n                    else {\n                        cur[k] = [];\n                    }\n                }\n                else {\n                    cur[k] = {};\n                }\n                cur = cur[k];\n            }\n        }\n        this.target.update(updateObj, true, false, animation);\n        this.updateOptionsPreview();\n    }\n    injectCSS() {\n        // Check if CSS is already injected\n        if (document.getElementById('highcharts-controls-css')) {\n            return;\n        }\n        // Add minimal inline styles to prevent FOUC\n        const inlineStyle = document.createElement('style');\n        inlineStyle.id = 'highcharts-controls-inline';\n        inlineStyle.nonce = 'highcharts';\n        inlineStyle.textContent = `\n            highcharts-group-description {\n                display: none;\n            }\n\n            .highcharts-controls {\n                opacity: 0;\n                transition: opacity 0.1s;\n\n                .hcc-control {\n                    max-height: 3em;\n                }\n\n                .hidden {\n                    max-height: 0;\n                }\n            }\n\n            .highcharts-controls.loaded {\n                opacity: 1;\n\n                .hcc-control {\n                    max-height: none;\n                }\n            }\n\n        `;\n        document.head.appendChild(inlineStyle);\n        // Get the CSS URL from the module URL\n        const cssUrl = import.meta.url\n            .replace(/\\/js\\/[^/]+$/, '/css/controls.css')\n            // Match jsDelivr/npm CDN. Patterns:\n            // - https://cdn.jsdelivr.net/npm/@highcharts/controls@0.3.0\n            // - https://cdn.jsdelivr.net/npm/@highcharts/controls\n            .replace(/(https?:\\/\\/cdn\\.jsdelivr\\.net\\/npm\\/@highcharts\\/controls)(@[\\d.]+)?$/, '$1$2/css/controls.css');\n        const link = document.createElement('link');\n        link.id = 'highcharts-controls-css';\n        link.rel = 'stylesheet';\n        link.href = cssUrl;\n        // Show controls when CSS is loaded or failed\n        const showControls = () => {\n            document.querySelectorAll('.highcharts-controls').forEach((el) => el.classList.add('loaded'));\n        };\n        link.onload = showControls;\n        link.onerror = showControls;\n        document.head.appendChild(link);\n    }\n    addPreview() {\n        const div = this.container.appendChild(Object.assign(document.createElement('div'), {\n            className: 'hcc-control hcc-button-control'\n        }));\n        div.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-key' }));\n        const valueDiv = div.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-value' }));\n        const valueDivInner = valueDiv.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-value-inner' }));\n        // Add the button\n        const button = valueDivInner.appendChild(Object.assign(document.createElement('button'), {\n            className: 'hcc-button hcc-show-preview-button',\n            innerText: '{…}',\n            title: 'Show / hide options preview'\n        }));\n        button.addEventListener('click', () => {\n            const previewSection = this.container.querySelector('.hcc-preview-section');\n            if (previewSection) {\n                previewSection.classList.toggle('hidden');\n                button.classList.toggle('active');\n            }\n        });\n        // Add the preview element\n        const previewSection = document.createElement('div');\n        previewSection.className = 'hcc-preview-section hidden';\n        previewSection.innerHTML =\n            '<div class=\"hcc-preview-wrapper\">' +\n                '<div class=\"hcc-preview-content\">' +\n                '<h3>Current Options<span class=\"hcc-expand-icon\" title=\"Expand preview\">⇲</span></h3>' +\n                '<pre class=\"hcc-options-preview\"></pre>' +\n                '</div>' +\n                '</div>';\n        this.container.appendChild(previewSection);\n        // Add expand functionality\n        const expandIcon = previewSection.querySelector('.hcc-expand-icon');\n        if (expandIcon) {\n            expandIcon.addEventListener('click', () => {\n                previewSection.classList.toggle('expanded');\n                expandIcon.innerText = previewSection.classList.contains('expanded') ? '⇱' : '⇲';\n                expandIcon.title = previewSection.classList.contains('expanded')\n                    ? 'Collapse preview'\n                    : 'Expand preview';\n            });\n        }\n    }\n    /**\n     * Add a group of controls\n     */\n    addGroup(params) {\n        if (!this.container) {\n            throw new Error('Container for controls not found');\n        }\n        // Create group container\n        const groupDiv = this.container.appendChild(Object.assign(document.createElement('div'), {\n            className: `hcc-group${params.className ? ' ' + params.className : ''}${params.collapsed ? ' hcc-group-collapsed' : ''}`\n        }));\n        // Create group header\n        const headerDiv = groupDiv.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-group-header' }));\n        // Add collapse button if collapsible\n        if (params.collapsible || params.collapsed) {\n            const collapseButton = headerDiv.appendChild(Object.assign(document.createElement('button'), {\n                className: 'hcc-group-toggle',\n                innerHTML: '❯',\n                'aria-label': 'Toggle group'\n            }));\n            collapseButton.addEventListener('click', () => {\n                groupDiv.classList.toggle('hcc-group-collapsed');\n            });\n        }\n        // Add group title\n        headerDiv.appendChild(Object.assign(document.createElement('h3'), {\n            className: 'hcc-group-title',\n            textContent: params.group\n        }));\n        // Add description if provided\n        if (params.description) {\n            const descriptionEl = groupDiv.appendChild(Object.assign(document.createElement('p'), { className: 'hcc-group-description' }));\n            descriptionEl.innerHTML = params.description;\n        }\n        // Create controls container within group\n        const groupControlsDiv = groupDiv.appendChild(Object.assign(document.createElement('div'), { className: 'hcc-group-controls' }));\n        // Temporarily swap container to add controls to group\n        const originalContainer = this.container;\n        this.container = groupControlsDiv;\n        // Add controls to the group\n        params.controls.forEach((control) => {\n            this.addControl(control);\n        });\n        // Restore original container\n        this.container = originalContainer;\n    }\n    /**\n     * Deduce control type based on the params\n     */\n    deduceControlType(params) {\n        const { path, value } = params;\n        if (typeof value === 'boolean') {\n            return 'boolean';\n        }\n        if (typeof value === 'number' ||\n            // Allow numeric strings with units limited to px, em, rem, %\n            (typeof value === 'string' &&\n                /^-?\\d+\\.?\\d*\\s*(px|em|rem|%)$/.test(value))) {\n            return 'number';\n        }\n        if (Array.isArray(params.options)) {\n            return 'select';\n        }\n        if (path.toLowerCase().indexOf('color') !== -1) {\n            return 'color';\n        }\n        if (path.endsWith('.align') ||\n            path.toLowerCase().endsWith('dashstyle') ||\n            path.endsWith('.fontWeight') ||\n            path.endsWith('.textAlign') ||\n            path.endsWith('.verticalAlign')) {\n            return 'select';\n        }\n        if (typeof value === 'string') {\n            if (Product.color(value).rgba.toString().indexOf('NaN') === -1) {\n                return 'color';\n            }\n            return 'text';\n        }\n        // Default to text\n        return 'text';\n    }\n    /**\n     * Add a control\n     */\n    /**\n     * Add a control\n     */\n    addControl(params) {\n        if (!this.container) {\n            throw new Error('Container for controls not found');\n        }\n        // Infer value and type if not provided. Value comes first as it may\n        // influence type deduction.\n        if (!is$5(params)) {\n            // Only try to get nested value if target exists\n            if (this.target?.options) {\n                params.value ?? (params.value = getNestedValue(this.target.options, params.path));\n            }\n            params.type || (params.type = this.deduceControlType(params));\n        }\n        // Find and instantiate the appropriate control type\n        for (const controlType of controlTypeRegistry) {\n            if (controlType.is(params)) {\n                controlType.create(this, params);\n                break;\n            }\n        }\n    }\n    /**\n     * Escape HTML entities in a string.\n     */\n    escapeHTML(str) {\n        return str\n            .replace(/&/g, '&amp;')\n            .replace(/</g, '&lt;')\n            .replace(/>/g, '&gt;')\n            .replace(/\"/g, '&quot;')\n            .replace(/'/g, '&#39;');\n    }\n    /**\n     * Format JSON with syntax highlighting and JavaScript-like formatting.\n     */\n    formatJSONWithHighlighting(obj) {\n        // First, create a normal JSON string\n        const json = JSON.stringify(obj, null, 2);\n        // Escape HTML in the entire JSON string first\n        let formatted = this.escapeHTML(json);\n        // Find and replace data arrays and dataTable objects with collapsed versions\n        // Match \"data\": [ ... ] or \"dataTable\": { ... }\n        formatted = formatted.replace(/^(\\s*)&quot;(data|dataTable)&quot;:\\s*(\\[[\\s\\S]*?\\n\\s*\\]|\\{[\\s\\S]*?\\n\\s*\\})/gm, (match, indent, key, value) => {\n            // Unescape to parse\n            const unescaped = value\n                .replace(/&quot;/g, '\"')\n                .replace(/&#39;/g, \"'\")\n                .replace(/&lt;/g, '<')\n                .replace(/&gt;/g, '>')\n                .replace(/&amp;/g, '&');\n            let parsed;\n            try {\n                parsed = JSON.parse(unescaped);\n            }\n            catch (e) {\n                return match; // If parsing fails, keep original\n            }\n            const isArray = Array.isArray(parsed);\n            const count = isArray ? parsed.length : Object.keys(parsed).length;\n            const collapsedText = isArray ? `[${count} items]` : `{${count} keys}`;\n            // Re-escape the value for storage\n            const escapedValue = this.escapeHTML(JSON.stringify(parsed, null, 2))\n                .replace(/&quot;/g, '\"') // Keep quotes for the data attribute\n                .replace(/&#39;/g, \"'\");\n            return `${indent}&quot;${key}&quot;: <span class=\"hcc-collapsible\" data-collapsed=\"true\" data-value=\"${escapedValue.replace(/\"/g, '&quot;')}\" data-indent=\"${indent}\"><span class=\"hcc-toggle-json\">\\u25B6</span> <span class=\"hcc-collapsed-text\">${collapsedText}</span><span class=\"hcc-expanded-content hcc-hidden\"></span></span>`;\n        });\n        // Convert to JavaScript-like syntax: remove quotes from keys, use single quotes\n        formatted = formatted\n            // Remove quotes from property names (but not in data attributes)\n            .replace(/&quot;([^&]+)&quot;:(?![^<]*>)/g, '$1:')\n            // Convert double quotes to single quotes for string values (allowing escaped entities)\n            .replace(/: &quot;((?:[^&]|&[a-z]+;)*?)&quot;/g, \": &#39;$1&#39;\");\n        // Apply syntax highlighting with HTML spans\n        formatted = formatted\n            // Highlight property names (skip already in span tags)\n            .replace(/^(\\s*)([a-zA-Z_$][a-zA-Z0-9_$]*):/gm, (match, indent, key) => {\n            if (match.includes('<span'))\n                return match;\n            return `${indent}<span class=\"hcc-syntax-key\">${key}</span>:`;\n        })\n            // Highlight string values (single quotes, allowing escaped entities)\n            .replace(/: &#39;((?:[^&]|&[a-z]+;)*?)&#39;/g, ': <span class=\"hcc-syntax-string\">&#39;$1&#39;</span>')\n            // Highlight numbers\n            .replace(/: (-?\\d+\\.?\\d*)/g, ': <span class=\"hcc-syntax-number\">$1</span>')\n            // Highlight booleans\n            .replace(/: (true|false)/g, ': <span class=\"hcc-syntax-boolean\">$1</span>')\n            // Highlight null\n            .replace(/: (null)/g, ': <span class=\"hcc-syntax-null\">$1</span>');\n        return formatted;\n    }\n    /**\n     * Update the options preview element with the current chart options.\n     */\n    updateOptionsPreview() {\n        const previewEl = this.container.parentElement\n            ?.querySelector('.hcc-options-preview');\n        if (previewEl && this.target) {\n            const options = this.target.getOptions() || {};\n            // Empty xAxis and yAxis structures\n            Object.keys(options).forEach((key) => {\n                if (JSON.stringify(options[key]) === '[{}]') {\n                    delete options[key];\n                }\n            });\n            previewEl.innerHTML = this.formatJSONWithHighlighting(options);\n            // Add click handlers for collapsible elements\n            previewEl.querySelectorAll('.hcc-collapsible').forEach((el) => {\n                const toggle = el.querySelector('.hcc-toggle-json');\n                if (toggle) {\n                    toggle.addEventListener('click', (e) => {\n                        e.stopPropagation();\n                        const collapsed = el.getAttribute('data-collapsed') === 'true';\n                        const expandedContent = el.querySelector('.hcc-expanded-content');\n                        if (!collapsed) {\n                            // Collapse\n                            el.setAttribute('data-collapsed', 'true');\n                            toggle.textContent = '\\u25B6';\n                            el.querySelector('.hcc-collapsed-text').classList.remove('hcc-hidden');\n                            expandedContent.classList.add('hcc-hidden');\n                            expandedContent.innerHTML = '';\n                        }\n                        else {\n                            // Expand\n                            el.setAttribute('data-collapsed', 'false');\n                            toggle.textContent = '\\u25BC';\n                            el.querySelector('.hcc-collapsed-text').classList.add('hcc-hidden');\n                            // Get the base indentation\n                            const baseIndent = el.getAttribute('data-indent') || '';\n                            // Format and display the expanded content\n                            const rawValue = el.getAttribute('data-value') || '[]';\n                            const unescaped = rawValue\n                                .replace(/&quot;/g, '\"')\n                                .replace(/&#39;/g, \"'\")\n                                .replace(/&lt;/g, '<')\n                                .replace(/&gt;/g, '>')\n                                .replace(/&amp;/g, '&');\n                            let formatted = this.escapeHTML(unescaped);\n                            // Add base indentation to each line\n                            formatted = formatted\n                                .split('\\n')\n                                .map((line, i) => i === 0 ? line : baseIndent + line)\n                                .join('\\n');\n                            // Apply JS-like formatting and syntax highlighting\n                            formatted = formatted\n                                .replace(/&quot;([^&]+)&quot;:/g, '$1:')\n                                .replace(/: &quot;((?:[^&]|&[a-z]+;)*?)&quot;/g, \": &#39;$1&#39;\")\n                                .replace(/^(\\s*)([a-zA-Z_$][a-zA-Z0-9_$]*):/gm, '$1<span class=\"hcc-syntax-key\">$2</span>:')\n                                .replace(/: &#39;((?:[^&]|&[a-z]+;)*?)&#39;/g, ': <span class=\"hcc-syntax-string\">&#39;$1&#39;</span>')\n                                .replace(/: (-?\\d+\\.?\\d*)/g, ': <span class=\"hcc-syntax-number\">$1</span>')\n                                .replace(/: (true|false)/g, ': <span class=\"hcc-syntax-boolean\">$1</span>')\n                                .replace(/: (null)/g, ': <span class=\"hcc-syntax-null\">$1</span>');\n                            expandedContent.innerHTML = formatted;\n                            expandedContent.classList.remove('hcc-hidden');\n                        }\n                    });\n                }\n            });\n        }\n    }\n}\n/**\n * Construct Highcharts Controls\n * @param container\n * @param options\n * @returns\n */\nControls.controls = function (container, options) {\n    return new Controls(container, options);\n};\nwindow.HighchartsControls = Controls;\n// Create a web component around the Controls class\n// @example\n// <highcharts-controls target=\"#container\">\n//     <highcharts-control\n//         type=\"color\"\n//         path=\"chart.backgroundColor\"\n//         value=\"#ff0000\"\n//     ></highcharts-control>\n//     <highcharts-control\n//         type=\"boolean\"\n//         path=\"legend.enabled\"\n//         value=\"true\"\n//     ></highcharts-control>\n//     <highcharts-control\n//         type=\"select\"\n//         path=\"legend.align\"\n//         options=\"left,center,right\"\n//         value=\"right\"\n//     ></highcharts-control>\n// </highcharts-controls>\nclass HighchartsControlElement extends HTMLElement {\n    getConfig() {\n        const config = {\n            path: this.getAttribute('path') || ''\n        };\n        if (this.hasAttribute('label')) {\n            config.label = this.getAttribute('label') || undefined;\n        }\n        if (this.hasAttribute('type')) {\n            config.type = this.getAttribute('type');\n        }\n        if (this.hasAttribute('value')) {\n            config.value = parseValue(this.getAttribute('value'));\n        }\n        if (this.hasAttribute('options')) {\n            config.options = parseOptions(this.getAttribute('options'));\n        }\n        if (this.hasAttribute('min')) {\n            config.min = parseFloat(this.getAttribute('min') || '0');\n        }\n        if (this.hasAttribute('max')) {\n            config.max = parseFloat(this.getAttribute('max') || '100');\n        }\n        if (this.hasAttribute('step')) {\n            config.step = parseFloat(this.getAttribute('step') || '1');\n        }\n        if (this.hasAttribute('nullable')) {\n            config.nullable = true;\n        }\n        return config;\n    }\n}\nclass HighchartsGroupElement extends HTMLElement {\n    getConfig() {\n        const controls = [];\n        let description;\n        // Extract description from highcharts-group-description element\n        const descriptionEl = this.querySelector(':scope > highcharts-group-description');\n        if (descriptionEl) {\n            description = descriptionEl.innerHTML?.trim() || undefined;\n        }\n        this.querySelectorAll(':scope > highcharts-control, :scope > highcharts-separator').forEach((controlEl) => {\n            if (controlEl.tagName.toLowerCase() === 'highcharts-separator') {\n                controls.push({ type: 'separator' });\n            }\n            else if (controlEl.tagName.toLowerCase() === 'highcharts-control') {\n                const control = controlEl.getConfig();\n                if (control.path) {\n                    controls.push(control);\n                }\n            }\n        });\n        return {\n            group: this.getAttribute('header') || 'Group',\n            description,\n            collapsed: this.hasAttribute('collapsed') &&\n                this.getAttribute('collapsed') !== 'false',\n            collapsible: this.hasAttribute('collapsible') &&\n                this.getAttribute('collapsible') !== 'false',\n            className: this.getAttribute('class') || undefined,\n            controls\n        };\n    }\n}\nclass HighchartsControlsElement extends HTMLElement {\n    connectedCallback() {\n        const controls = [], injectCSS = this.getAttribute('inject-css') !== 'false', displayAttr = this.getAttribute('display'), display = (displayAttr === 'block' || displayAttr === 'inline-block')\n            ? displayAttr\n            : 'inline-block';\n        let target = this.getTarget();\n        const init = (target) => {\n            Controls.controls(this, {\n                target,\n                injectCSS,\n                display: display,\n                controls: controls\n            });\n        };\n        // Process direct children (both controls and groups)\n        Array.from(this.children).forEach((child) => {\n            if (child.tagName.toLowerCase() === 'highcharts-group') {\n                const groupConfig = child.getConfig();\n                controls.push(groupConfig);\n            }\n            else if (child.tagName.toLowerCase() === 'highcharts-separator') {\n                controls.push({ type: 'separator' });\n            }\n            else if (child.tagName.toLowerCase() === 'highcharts-control') {\n                const control = child.getConfig();\n                if (control.path) {\n                    controls.push(control);\n                }\n            }\n        });\n        // Initialize if target is found\n        if (target) {\n            init(target);\n        }\n        else {\n            // Listen for DOM update to retry initialization\n            const observer = new MutationObserver(() => {\n                target = this.getTarget();\n                if (target) {\n                    observer.disconnect();\n                    init(target);\n                }\n            });\n            observer.observe(document.body, { childList: true, subtree: true });\n        }\n    }\n    getTarget() {\n        const targetAttr = this.getAttribute('target');\n        if (targetAttr) {\n            const el = document.querySelector(targetAttr);\n            const target = el?.chart || el?.grid;\n            if (target) {\n                return target;\n            }\n        }\n        return Product?.charts?.[0] || Product?.grids?.[0];\n    }\n}\ncustomElements.define('highcharts-control', HighchartsControlElement);\ncustomElements.define('highcharts-group', HighchartsGroupElement);\ncustomElements.define('highcharts-group-description', class extends HTMLElement {\n});\ncustomElements.define('highcharts-separator', class extends HTMLElement {\n});\ncustomElements.define('highcharts-controls', HighchartsControlsElement);\nfunction parseValue(value) {\n    if (value === 'true') {\n        return true;\n    }\n    if (value === 'false') {\n        return false;\n    }\n    if (!isNaN(Number(value))) {\n        return Number(value);\n    }\n    return value;\n}\nfunction parseOptions(options) {\n    if (options) {\n        return options.split(',').map((s) => s.trim());\n    }\n    return [];\n}\n\nexport { BooleanControl, ColorControl, Control, NumberControl, Controls as default };\n\n"]}