{"version":3,"file":"wizishop-wizi-editor.mjs","sources":["../../../../projects/wizi-editor/src/lib/wizi-editor.service.ts","../../../../projects/wizi-editor/src/lib/services/history.service.ts","../../../../projects/wizi-editor/src/lib/tools/utils/keys.component.ts","../../../../projects/wizi-editor/src/lib/tools/utils/list.component.ts","../../../../projects/wizi-editor/src/lib/tools/utils/selection.component.ts","../../../../projects/wizi-editor/src/lib/tools/editorjs-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/tool-type/inline-style-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/bold-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/capitalize-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/clean-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/italic-tool.component.ts","../../../../projects/wizi-editor/src/lib/services/editorjs-translation.service.ts","../../../../projects/wizi-editor/src/lib/tools/utils/dropdown.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/link-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/strike-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/subscript-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/superscript-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/utils/colors.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/tool-type/color-tool.component.ts","../../../../projects/wizi-editor/src/lib/services/recent-colors.service.ts","../../../../projects/wizi-editor/src/lib/tools/inline/text-background-color-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/text-color-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/tool-type/text-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/utils/texts.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/text-size-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/inline/underline-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/tool-type/paragraph-style-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/tool-type/text-edition.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/code-edit-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/indent-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/ordered-list-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/outdent-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/quote-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/redo-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/tool-type/text-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/text-align-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/text-type-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/undo-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/paragraph/unordered-list-tool.component.ts","../../../../projects/wizi-editor/src/lib/tools/utils/i18n/en-i18n.component.ts","../../../../projects/wizi-editor/src/lib/tools/utils/i18n/fr-i18n.component.ts","../../../../projects/wizi-editor/src/lib/services/editorjs-conversion.service.ts","../../../../projects/wizi-editor/src/lib/services/selected-blocks.service.ts","../../../../projects/wizi-editor/src/lib/wizi-editor.component.ts","../../../../projects/wizi-editor/src/lib/wizi-editor.component.html","../../../../projects/wizi-editor/src/lib/wizi-editor.module.ts","../../../../projects/wizi-editor/src/public-api.ts","../../../../projects/wizi-editor/src/wizishop-wizi-editor.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n  providedIn: 'root'\n})\nexport class WiziEditorService {\n\n  constructor() { }\n}\n","import { Injectable } from '@angular/core';\n\nexport interface HistoryData {\n    html: string;\n}\n\n@Injectable()\nexport class HistoryService<HistoryData> {\n\n    history: HistoryData[] = [];\n    historyIndex = -1;\n    lastUndoData: HistoryData | null = null;\n\n    add(data: HistoryData) {\n        this.history = this.history.slice(0, this.historyIndex + 1);\n        this.history.push(data);\n        this.historyIndex++;\n    }\n\n    addIfDataChanged = (data: HistoryData) => {\n        if (this.historyIndex < 0 || JSON.stringify(this.history[this.historyIndex]) !== JSON.stringify(data)) {\n            this.add(data);\n        }\n    }\n\n    undo = () => {\n        if (this.historyIndex > 0) {\n            this.historyIndex--;\n        }\n        this.lastUndoData = this.history[this.historyIndex+1];\n        return this.history[this.historyIndex];\n    }\n\n    redo = () => {\n        if (this.historyIndex < this.history.length - 1) {\n            this.historyIndex++;\n        }\n        return this.history[this.historyIndex];\n    }\n}","export const LIST_EDIT_KEY_CODES = ['Enter', 'NumpadEnter'];\n","import { LIST_EDIT_KEY_CODES } from './keys.component';\nimport { getCursorPosition, getSelection, isAnchorBeforeFocus } from './selection.component';\n\nexport var listApi: any = null;\nexport var listEditor: HTMLElement | null = null;\n\nexport function setlistApiEditor(api: any, editor: any) {\n    listApi = api;\n    listEditor = editor;\n}\n\nexport async function onEditList(this: Element, event: Event) {\n    const focusedBlock = <HTMLElement>event.target;\n    const eventCode = (<KeyboardEvent>event).code;\n    if (!listEditor || !listApi) {\n        return;\n    }\n    const currentParagraph = listEditor.querySelectorAll('.ce-paragraph')[listApi.blocks.getCurrentBlockIndex()];\n    const currentListElement = currentParagraph.querySelector('li');\n    if (LIST_EDIT_KEY_CODES.indexOf(eventCode) === -1) {\n        if (focusedBlock.innerText.length >= 1 && (currentListElement && escape(currentListElement.innerHTML).includes('%u200A'))) {\n            currentListElement.innerHTML = currentListElement.innerHTML.replace(/[\\u{200A}]/gu, '');\n            // getSelection()?.setBaseAndExtent(currentListElement, currentListElement.innerText.length, currentListElement, currentListElement.innerText.length);\n        }\n        return;\n    }\n    event.preventDefault();\n    event.stopPropagation();\n\n    if (focusedBlock.innerText !== '') {\n        listApi.blocks.insert('paragraph', listApi.blocks.getCurrentBlockIndex());\n        const currentBlock = listEditor.querySelectorAll('.ce-block')[listApi.blocks.getCurrentBlockIndex()];\n        const previousBlock = listEditor.querySelectorAll('.ce-block')[listApi.blocks.getCurrentBlockIndex() - 1];\n        const currentParagraph = currentBlock.querySelector('.ce-paragraph');\n        const previousBlockChild = previousBlock.querySelector('.ce-paragraph')?.firstElementChild;\n        if (previousBlockChild) {\n            const previousListElement = previousBlock.querySelector('li');\n            const previousListElementValue = previousListElement?.getAttribute('value');\n            const previousValue: string = previousListElementValue ? previousListElementValue : '0';\n            const listElement = document.createElement(previousBlockChild.tagName);\n            listElement.appendChild(document.createElement('li'));\n            if (listElement.tagName.toLowerCase() === 'ol') {\n                let value = parseInt(previousValue) + 1;\n                let nextListElement = true;\n                listElement.firstElementChild?.setAttribute('value', value.toString());\n                for (\n                    var i = listApi.blocks.getCurrentBlockIndex() + 1;\n                    i < listEditor.querySelectorAll('.ce-block').length && nextListElement;\n                    ++i\n                ) {\n                    const followingOlBlock = listEditor.querySelectorAll('.ce-block')[i];\n                    if (followingOlBlock.querySelector('ol')) {\n                        ++value;\n                        followingOlBlock.querySelector('li')?.setAttribute('value', value.toString());\n                    } else {\n                        nextListElement = false;\n                    }\n                }\n            }\n            currentParagraph?.appendChild(listElement);\n        }\n        currentParagraph?.addEventListener('keydown', onEditList, true);\n\n        let selection = getSelection();\n        if (selection && selection.anchorNode && selection.focusNode) {\n            let copyRange = new Range();\n            let lastChild = focusedBlock.getElementsByTagName('li')[0].lastChild ? focusedBlock.getElementsByTagName('li')[0].lastChild : focusedBlock.getElementsByTagName('li')[0];\n            if (lastChild) {\n                copyRange.selectNode(lastChild);\n            }\n            copyRange.setStart(selection.anchorNode, selection.anchorOffset);\n            let fragment = copyRange.extractContents();\n            let tmp = document.createElement('div');\n            tmp.append(fragment);\n            const currentListElement = currentParagraph?.querySelector('li');\n            if (currentListElement) {\n                currentListElement.innerHTML = tmp.innerHTML;\n            }\n            if (currentListElement) {\n                getSelection()?.setBaseAndExtent(currentListElement, 0, currentListElement, 0);\n            }\n            return;\n        }\n    }\n    currentParagraph.innerHTML = '';\n    currentParagraph.appendChild(document.createElement('p'));\n    currentParagraph.removeEventListener('keydown', onEditList, true);\n    const currentParagraphElement = currentParagraph.querySelector('p');\n    if (currentParagraphElement) {\n        getSelection()?.setBaseAndExtent(currentParagraphElement, 0, currentParagraphElement, 0);\n    }\n\n    checkFollowingList('0');\n\n}\n\nexport function checkFollowingList(value: string, api = null) {\n  const whatApi = api?? listApi;\n  if (whatApi?.blocks) {\n    let currentIndex = whatApi.blocks.getCurrentBlockIndex() + 1;\n    const blocks = listEditor?.querySelectorAll('.ce-block');\n    let currentValue = parseInt(value);\n    while (blocks && blocks[currentIndex]) {\n      const paragraph = blocks[currentIndex].querySelector('.ce-paragraph');\n      if (paragraph && paragraph.firstElementChild?.tagName.toLowerCase() === 'ol') {\n        paragraph.firstElementChild?.firstElementChild?.setAttribute('value', (++currentValue).toString());\n      } else {\n        currentValue = 0;\n      }\n      currentIndex++;\n    }\n  }\n}\n","import { checkFollowingList } from \"./list.component\";\n\nexport async function getCursorPosition(element: Node, selection: Selection | null = null, anchor: boolean = false) {\n    var charCount = -1,\n        node;\n    if (!selection) {\n        selection = window.getSelection();\n    }\n    var selectedNode = anchor ? selection?.anchorNode : selection?.focusNode;\n    var selectedOffset = anchor ? selection?.anchorOffset : selection?.focusOffset;\n    var nodeIsElement = selectedNode?.nodeType === Node.ELEMENT_NODE;\n    \n    if (selectedNode && typeof selectedOffset !== 'undefined' && selectedOffset >= 0) {\n        if (isChildOf(selectedNode, element)) {\n            node = selectedNode; \n            charCount = selectedOffset;\n\n            if (nodeIsElement) {\n                let childNode = selectedNode.childNodes[selectedOffset - 1];\n                let childNodeLength = childNode?.textContent?.length;\n                charCount += !!childNodeLength ? childNodeLength : 0;\n            }\n\n            while (node) {\n                if (node === element) {\n                    break;\n                }\n\n                if (node.previousSibling) {\n                    node = node.previousSibling;\n                    charCount += node.textContent ? node.textContent.length : 0;\n                } else {\n                    node = node.parentNode;\n                    if (node === null) {\n                        break;\n                    }\n                }\n           }\n        } else {\n            charCount = selectedOffset;\n        }\n    }\n    return charCount;\n}\n\nexport async function resetCursorPosition(start: number, end: number, element: Element | null) {\n    if (element && start >= 0 && end >= 0) {\n        let selection = window.getSelection();\n        let range = createRange(element, { start: start, end: end });\n\n        if (range && selection) {\n            selection.removeAllRanges();\n            selection.addRange(range);\n        }\n    }\n}\n\nexport function createRange(element: ChildNode, position: any, range: Range | null = null): Range {\n    if (!range) {\n        range = document.createRange()\n    }\n\n    range = setRangeStart(element, position, range);\n    range = setRangeEnd(element, position, range);\n\n    return range;\n}\n\nfunction setRangeStart(element: ChildNode, position: any, range: Range): Range {\n    if (position.start === 0) {\n        range.setStart(element, position.start);\n    } else if (element && position.start > 0) {\n        if (element.nodeType === Node.TEXT_NODE) {\n            if (element.textContent && element.textContent.length < position.start) {\n                position.start -= element.textContent.length;\n            } else {\n                range.setStart(element, position.start);\n                position.start = 0;\n            }\n        } else {\n           for (var i = 0; i < element.childNodes.length; i++) {\n                range = setRangeStart(element.childNodes[i], position, range);\n\n                if (position.start === 0) {\n                    break;\n                }\n            }\n        }\n    }\n    return range;\n}\n\nfunction setRangeEnd(element: ChildNode, position: any, range: Range): Range {\n    if (position.end === 0) {\n        range.setEnd(element, position.end);\n    } else if (element && position.end > 0) {\n        if (element.nodeType === Node.TEXT_NODE) {\n            if (element.textContent && element.textContent.length < position.end) {\n                position.end -= element.textContent.length;\n            } else {\n                range.setEnd(element, position.end);\n                position.end = 0;\n            }\n        } else {\n           for (var i = 0; i < element.childNodes.length; i++) {\n                range = setRangeEnd(element.childNodes[i], position, range);\n\n                if (position.end === 0) {\n                    break;\n                }\n            }\n        }\n    }\n    return range;\n}\n\nfunction isChildOf(node: Node, parentNode: Node) {\n    while (node !== null) {\n        if (node === parentNode) {\n            return true;\n        }\n        if (node.parentNode) {\n            node = node.parentNode;\n        } else {\n            return false;\n        }\n    }\n\n    return false;\n};\n\nexport function getSelection(): Selection | null {\n    if (window?.getSelection) {\n        return window.getSelection();\n    } else if (document?.getSelection) {\n        return document.getSelection();\n    } else if (document && (document as any).selection) {\n        return (document as any).selection.createRange().text;\n    }\n    return null;\n}\n\nexport function isAnchorBeforeFocus(anchorNode: Node, anchorOffset: number, focusNode: Node, focusOffset: number) {\n    let anchorRange = document.createRange();\n    let focusRange = document.createRange();\n    anchorRange.setStart(anchorNode, anchorOffset);\n    anchorRange.setEnd(anchorNode, anchorOffset);\n    focusRange.setStart(focusNode, focusOffset);\n    focusRange.setEnd(focusNode, focusOffset);\n    if (anchorRange.compareBoundaryPoints(Range.START_TO_START, focusRange) === -1) {\n        return true;\n    }\n    return false;\n}\n\nexport function mergeBlocks(editorElement: Element, editor: any, index: number, indexToRemove: number | null = null) {\n    let blocks = editorElement.querySelectorAll('.ce-paragraph');\n    let currentBlockContent = blocks[index]?.children[0];\n    let nextBlockContent = null;\n    let isList = false;\n\n    blocks[index].querySelectorAll('.cdx-shadow-caret').forEach(e => e.remove());\n\n    if (indexToRemove) {\n        nextBlockContent = blocks[indexToRemove]?.children[0];\n    } else {\n        nextBlockContent = blocks[index]?.children[1];\n    }\n    // handle empty block\n    if (currentBlockContent?.tagName.toLowerCase() === 'p' && currentBlockContent?.childElementCount === 1 && currentBlockContent?.children[0].tagName.toLowerCase() === 'br' && currentBlockContent?.textContent?.length === 0) {\n        currentBlockContent.innerHTML = '';\n    }\n    if (nextBlockContent?.tagName.toLowerCase() === 'p' && nextBlockContent?.childElementCount === 1 && nextBlockContent?.children[0].tagName.toLowerCase() === 'br' && nextBlockContent?.textContent?.length === 0) {\n        nextBlockContent.innerHTML = '';\n    }\n\n    // handle list\n    if (currentBlockContent?.tagName.toLowerCase() === 'ul' || currentBlockContent?.tagName.toLowerCase() === 'ol') {\n        isList = true;\n        currentBlockContent = currentBlockContent.children[0];\n    }\n    if (nextBlockContent?.tagName.toLowerCase() === 'ul' || nextBlockContent?.tagName.toLowerCase() === 'ol') {\n        if (!indexToRemove) {\n            if (nextBlockContent) {\n                let newParagraph = document.createElement('p');\n                newParagraph.innerHTML = nextBlockContent.querySelector('li')?.innerHTML ?? '';\n                nextBlockContent.remove();\n                editor.blocks.insertNewBlock();\n                editorElement.querySelectorAll('.ce-paragraph')[editor.blocks.getCurrentBlockIndex()].appendChild(newParagraph);\n\n                setTimeout(() => {\n                    resetCursorPosition(0, 0, newParagraph);  \n                }, 50);\n            }\n            return;\n        }\n        isList = true;\n        nextBlockContent = nextBlockContent.children[0];\n    }\n\n    let cursorPosition = currentBlockContent?.textContent?.length ?? 0;\n\n    if (currentBlockContent && nextBlockContent) {\n        currentBlockContent.innerHTML += nextBlockContent.innerHTML;\n        if (indexToRemove) {\n            editor.blocks.delete(indexToRemove);\n        } else {\n            blocks[index]?.children[1].remove();\n        }\n    }\n\n    setTimeout(() => {\n        resetCursorPosition(cursorPosition, cursorPosition, currentBlockContent);  \n        if (isList) {\n            checkFollowingList(currentBlockContent.getAttribute('value') ?? '0');\n        }\n    }, 50);\n}","import { Observable, ReplaySubject, of } from \"rxjs\";\nimport { getCursorPosition, getSelection, isAnchorBeforeFocus, resetCursorPosition } from \"./utils/selection.component\";\n\nexport class StyleObject {\n    property: string | null = null;\n    value: string | null = null;\n    default: string | null = null;\n    input?: string;\n    class?: string;\n}\n\nexport class AttributeObject {\n    name: string | null = null;\n    value: string | null = null;\n}\n\nexport abstract class EditorJSTool {\n    api: any;\n\n    parentEditor: HTMLDivElement | null = null;\n\n    textContainers = 'h1,h2,h3,h4,h5,h6,p,li';\n\n    currentSelection?: Selection | null;\n\n    cursorStart: number = -1;\n\n    cursorEnd: number = -1;\n\n    hasSeparatorBefore?: boolean = false;\n\n    separatorClass: string = 'ce-inline-tool--separator';\n\n    getSelection(): Selection | null {\n        return getSelection();\n    }\n\n    async getRangeObject(selectionObject: Selection): Promise<Range> {\n        if (selectionObject.getRangeAt) {\n            return selectionObject.getRangeAt(0);\n        } else {\n            let range = document.createRange();\n            if (selectionObject.anchorNode && selectionObject.anchorNode.parentElement && selectionObject.focusNode) {\n                range.setStart(selectionObject.anchorNode.parentElement, selectionObject.anchorOffset);\n                range.setEnd(selectionObject.focusNode, selectionObject.focusOffset);\n            } else {\n                console.error('Error getRangeObject: could not set range')\n            }\n            return range;\n        }\n    }\n\n    async saveUserSelection() {\n        let isLTR = true;\n        this.currentSelection = this.getSelection();\n        let parentModifier = <Node>(this.findParentModifier());\n        if (this.currentSelection && this.currentSelection.anchorNode && this.currentSelection.focusNode) {\n            isLTR = isAnchorBeforeFocus(this.currentSelection.anchorNode, this.currentSelection.anchorOffset, this.currentSelection.focusNode, this.currentSelection.focusOffset);\n        }\n        this.cursorStart = await getCursorPosition(parentModifier, this.currentSelection, isLTR ? true : false);\n        this.cursorEnd = await getCursorPosition(parentModifier, this.currentSelection, isLTR ? false : true);\n    }\n\n    async resetUserSelection() {\n        resetCursorPosition(this.cursorStart, this.cursorEnd, this.findParentModifier());\n    }\n\n    collapseSelection() {\n        let selection = this.getSelection();\n        if (selection && selection.anchorNode && selection.focusNode) {\n            this.currentSelection?.setBaseAndExtent(selection.anchorNode, 0, selection.anchorNode, 0);\n        } else {\n            console.error('Error collapseSelection : Could not collapse selection');\n        }\n    }\n\n    findParentEditor(): HTMLDivElement | null {\n        const selection: Selection | null = this.currentSelection ? this.currentSelection : this.getSelection();\n        if (selection && selection.anchorNode?.parentElement) {\n            return selection.anchorNode.parentElement.closest('.editorJs');\n        } else {\n            return null;\n        }\n    }\n\n    findParentModifier(): HTMLElement | null {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        let blockList = this.parentEditor?.querySelectorAll('.ce-block');\n        if (!blockList) {\n            return null;\n        }\n        let blockIndex = this.api.blocks.getCurrentBlockIndex();\n        let paragraphList = blockList[blockIndex].querySelector('.ce-paragraph');\n        return <HTMLElement>(\n            paragraphList?.children[0]\n        );\n    }\n\n    clear() {\n        if (this.parentEditor) {\n            resetBlockFocus(this.parentEditor);\n        }\n    }\n}\n\nexport var containerSelector: string = 'document.body';\n\nexport function setContainerSelector(value: string) {\n    containerSelector = value;\n}\n\nexport var isTextEditionTool: boolean = false;\n\nexport var isBlockFocused: boolean = false;\n\nexport function setIsTextEditionTool(value: boolean) {\n    isTextEditionTool = value;\n}\n\nexport function setIsBlockFocused(value: boolean) {\n    isBlockFocused = value;\n}\n\nexport function setBlockFocus(parentEditor: HTMLElement) {\n    let block = parentEditor.closest('.wb-blocks__container');\n    if (block && !block.classList.contains('wb-blocks__container--focused')) {\n        block.classList.add('wb-blocks__container--focused');\n    }\n}\n\nexport function resetBlockFocus(parentEditor: HTMLElement) {\n    let block = parentEditor.closest('.wb-blocks__container');\n    if (block && block.classList.contains('wb-blocks__container--focused')) {\n        block.classList.remove('wb-blocks__container--focused');\n    }\n}","import { AttributeObject, EditorJSTool, StyleObject } from '../../editorjs-tool.component';\nimport { isAnchorBeforeFocus } from '../../utils/selection.component';\n\nexport abstract class InlineStyleTool extends EditorJSTool {\n    tag: string | null = null;\n\n    modifiers = 'strong,em';\n\n    style?: StyleObject;\n\n    foundAnchorOffset: number = 0;\n\n    foundFocusOffset: number = 0;\n\n    foundAnchorNode: boolean = false;\n\n    foundFocusNode: boolean = false;\n\n    tmpOffset: number = 0;\n\n    classToApply?: string;\n\n    classes?: string;\n\n    modifiedContent: boolean = false;\n\n    attributeName?: string;\n\n    attributesToApply?: Array<AttributeObject>;\n\n    checkAnchorAndFocus: boolean = false;\n\n    linkDeletion: boolean = false;\n\n    resetSelection: boolean = true;\n\n    preventSelectionReset?: boolean;\n\n    paragraphTags: Array<string> = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];\n\n    modifies = {\n        tag: false,\n        style: false,\n        class: false,\n        attribute: false,\n    };\n\n    async execCommandStyle(action: string, saveUserSelection: boolean = true) {\n        this.resetSelection = true;\n        const selection: Selection | null = this.currentSelection ? this.currentSelection : this.getSelection();\n        if (!selection) {\n            return;\n        }\n        if (saveUserSelection && !this.preventSelectionReset) {\n            await this.saveUserSelection();\n        }\n        let anchorNode: Node | null = selection.anchorNode;\n        let focusNode: Node | null = selection.focusNode;\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n\n        if (!anchorNode || !focusNode) {\n            return;\n        }\n        let container: HTMLElement | null =\n            anchorNode.nodeType !== Node.TEXT_NODE && anchorNode.nodeType !== Node.COMMENT_NODE\n                ? (anchorNode as HTMLElement)\n                : anchorNode.parentElement;\n        let focusContainer: HTMLElement | null =\n            focusNode.nodeType !== Node.TEXT_NODE && focusNode.nodeType !== Node.COMMENT_NODE\n                ? (focusNode as HTMLElement)\n                : focusNode.parentElement;\n        const sameSelection: boolean | null = container && container.innerText === selection.toString();\n        if (container) {\n            let containerHasStyle = null;\n\n            if (this.checkAnchorAndFocus) {\n                containerHasStyle = (this.hasStyle(container) || this.hasStyle(focusContainer ?? container));\n            } else {\n                containerHasStyle = this.hasStyle(container);\n            }\n\n            // Link delete exception\n            if (this.linkDeletion) {\n                if (containerHasStyle) {\n                    await this.replaceLink(selection, containerHasStyle);\n                }\n            } else {\n                if (\n                    sameSelection &&\n                    containerHasStyle &&\n                    !this.isContainer(this.textContainers, container) &&\n                    this.hasStyle(container) &&\n                    selection.toString() === containerHasStyle.innerText\n                ) {\n                    await this.updateSelection(selection, containerHasStyle, action, this.textContainers);\n                } else {\n                    await this.replaceSelection(this.getMostDescendantChild(container), action, selection, this.textContainers);\n                }\n            }\n            await this.cleanupContainer(selection, container, true);\n            if (this.modifiedContent && this.resetSelection && !this.preventSelectionReset) {\n                await this.resetUserSelection();\n            }\n        }\n    }\n\n    private async updateSelection(selection: Selection, container: HTMLElement, action: string, containers: string) {\n        if (this.modifies.style) {\n            const css: string | null | undefined = this.style?.property;\n            let value = await this.getStyleValue(container, action, containers);\n            if (value !== this.style?.default) {\n                if (css) {\n                    container.style.setProperty(css, value);\n                }\n            } else {\n                if (this.style?.property) {\n                    container.style.removeProperty(this.style.property);\n                }\n            }\n        } else {\n            const range: Range = await this.getRangeObject(selection);\n            let newElement = document.createElement(this.hasStyle(container) ? 'span' : (this.tag ? this.tag : 'span'));\n            if (this.modifies.class) {\n                await this.removeChildrenClasses(newElement);\n                if (this.classToApply && this.classToApply !== '') {\n                    newElement.classList.add(this.classToApply);\n                }\n            }\n            if (this.modifies.attribute) {\n                this.attributesToApply?.forEach((attribute) => {\n                    if (attribute.name && attribute.value) {\n                        newElement.setAttribute(attribute.name, attribute.value);\n                    }\n                });\n            }\n            newElement = this.setInlineStyle(container, newElement);\n\n            while (container.firstChild) {\n                let elementClone = container.firstChild.cloneNode(true);\n                newElement.appendChild(elementClone);\n                container.firstChild.remove();\n            }\n\n            container.parentElement?.replaceChild(newElement, container);\n\n            range.insertNode(newElement);\n        }\n    }\n\n    private async replaceSelection(container: HTMLElement, action: string, selection: Selection, containers: string) {\n        const focusNode: Node | null = selection.focusNode;\n        let offsetContainer: HTMLElement | null =\n            focusNode?.nodeType !== Node.TEXT_NODE && focusNode?.nodeType !== Node.COMMENT_NODE\n                ? (focusNode as HTMLElement)\n                : focusNode.parentElement;\n\n        let parentContainer = this.hasStyle(container);\n        if (offsetContainer) {\n            let offsetParentContainer = this.hasStyle(offsetContainer);\n            if (\n                parentContainer &&\n                parentContainer === offsetParentContainer &&\n                ((parentContainer.children.length > 0 && parentContainer.innerText !== parentContainer.children[0].textContent) ||\n                    parentContainer.innerText !== selection.toString())\n            ) {\n                this.resetSelection = false;\n                const range: Range = await this.getRangeObject(selection);\n                const currentFragment: DocumentFragment = range.extractContents();\n                const currentElement: HTMLSpanElement = document.createElement('span');\n                currentElement.appendChild(currentFragment);\n                if (this.modifies.style && this.style?.value && this.style.value.indexOf('$1') > -1 && this.style.property && this.style.input) {\n                    currentElement.style.setProperty(this.style.property, this.style.value.replace('$1', this.style.input));\n                }\n                if (this.modifies.class) {\n                    await this.removeChildrenClasses(currentElement);\n                    if (this.classToApply && this.classToApply !== '') {\n                        currentElement.classList.add(this.classToApply);\n                    }\n                }\n                if (this.modifies.attribute) {\n                    this.attributesToApply?.forEach((attribute) => {\n                        if (attribute.name && attribute.value) {\n                            currentElement.setAttribute(attribute.name, attribute.value);\n                        }\n                    });\n                }\n                let currentElementToAppend = currentElement;\n                let currentParentElement = container;\n                if (parentContainer.contains(currentParentElement)) {\n                    while (currentParentElement !== parentContainer) {\n                        let tmpElement = document.createElement(currentParentElement.tagName);\n                        tmpElement = this.setInlineStyle(currentParentElement, tmpElement);\n\n                        tmpElement.appendChild(currentElementToAppend);\n                        currentElementToAppend = tmpElement;\n                        currentParentElement = <HTMLElement>currentParentElement.parentElement;\n                    }\n                }\n\n                let isLTR = true;\n                if (selection.anchorNode && selection.focusNode) {\n                    isLTR = isAnchorBeforeFocus(\n                        selection.anchorNode,\n                        selection.anchorOffset,\n                        selection.focusNode,\n                        selection.focusOffset\n                    );\n                }\n\n                let selectionFocusOffset = isLTR ? selection.anchorOffset : selection.focusOffset;\n                let selectionFocusNode = isLTR ? selection.anchorNode : selection.focusNode;\n\n                if (selectionFocusNode) {\n                    this.currentSelection?.setBaseAndExtent(parentContainer, 0, selectionFocusNode, selectionFocusOffset);\n                } else {\n                    console.warn('Warning replaceSelection : cannot set selection');\n                }\n                const newSelection = this.getSelection();\n                if (newSelection) {\n                    let preRange: Range = await this.getRangeObject(newSelection);\n\n                    const preFragment: DocumentFragment = preRange.extractContents();\n\n                    let newElement: HTMLElement = <HTMLElement>parentContainer.cloneNode();\n                    newElement.innerHTML = '';\n                    newElement.appendChild(preFragment);\n\n                    parentContainer.parentElement?.insertBefore(currentElementToAppend, parentContainer);\n                    parentContainer.parentElement?.insertBefore(newElement, currentElementToAppend);\n                    if (!parentContainer.textContent || parentContainer.textContent.length === 0) {\n                        parentContainer.parentElement?.removeChild(parentContainer);\n                    }\n                    selection.selectAllChildren(currentElementToAppend);\n                } else {\n                    console.error('Error replaceSelection : cannot find newSelection');\n                }\n            } else {\n                const range: Range = await this.getRangeObject(selection);\n                const fragment: DocumentFragment = range.extractContents();\n                let fragmentElement = document.createElement('div');\n                fragmentElement.append(fragment);\n\n                let newElement: HTMLElement | null = await this.createElement(container, action, containers);\n                let elementToAppend = newElement;\n\n                if (\n                    fragmentElement.children?.length === 1 &&\n                    this.textContainers.split(',').indexOf(fragmentElement.children[0]?.tagName.toLowerCase()) > -1\n                ) {\n                    elementToAppend = <HTMLElement>fragmentElement.children[0];\n                    newElement.innerHTML = (<HTMLElement>fragmentElement.children[0]).innerHTML;\n                    elementToAppend.innerHTML = '';\n                    elementToAppend.append(newElement);\n                } else {\n                    newElement.innerHTML = fragmentElement.innerHTML;\n                    elementToAppend = newElement;\n                }\n                if (this.modifies.class) {\n                    await this.removeChildrenClasses(elementToAppend);\n                    if (this.classToApply && this.classToApply !== '') {\n                        newElement.classList.add(this.classToApply);\n                    }\n                }\n                if (this.modifies.attribute) {\n                    this.attributesToApply?.forEach((attribute) => {\n                        if (attribute.name && attribute.value) {\n                            newElement?.setAttribute(attribute.name, attribute.value);\n                        }\n                    });\n                }\n                range.insertNode(elementToAppend);\n                selection.selectAllChildren(elementToAppend);\n            }\n        } else {\n            console.error('Error replaceSelection : could not find offsetContainer');\n        }\n    }\n\n    private async replaceLink(selection: Selection, container: HTMLElement) {\n        let newElement = document.createElement('span');\n        newElement.innerHTML = container.innerHTML;\n\n        container.parentElement?.replaceChild(newElement, container);\n        selection.selectAllChildren(newElement);\n    }\n\n    hasStyle(element: HTMLElement, firstTimeCall: boolean = true): HTMLElement | null {\n        if (firstTimeCall && element.children) {\n            element = this.getMostDescendantChild(<HTMLElement>element);\n        }\n\n        // foundElement was added because of a return issue when a class is applied\n        let foundElement: HTMLElement | null = null;\n\n        if (!element || element.classList?.contains('ce-paragraph')) {\n            return null;\n        }\n        if (this.modifies.style) {\n            if (this.style && this.style.property && this.style.value) {\n                if (\n                    element.style &&\n                    element.style.getPropertyValue(this.style.property) &&\n                    (this.style.value.indexOf('$1') > -1 ? true : element.style.getPropertyValue(this.style.property) === this.style.value)\n                ) {\n                    foundElement = element;\n                    return element;\n                }\n            } else {\n                console.warn('Warning hasStyle : cannot find tool style property');\n            }\n        } else if (this.modifies.class) {\n            this.classes?.split(',').forEach((className) => {\n                if (element.classList?.contains(className) === true) {\n                    foundElement = element;\n                }\n            });\n        } else if (this.modifies.tag) {\n            if (element.tagName?.toLowerCase() === this.tag?.toLowerCase()) {\n                return element;\n            }\n        } else if (this.modifies.attribute) {\n            let attributes = this.attributeName?.split(',');\n            for (var i = 0; attributes && i < attributes.length; ++i) {\n                if (typeof element.getAttribute === 'function' && element.getAttribute(attributes[i])) {\n                    foundElement = element;\n                    return element;\n                }\n            }\n        }\n        if (foundElement) {\n            return foundElement;\n        }\n        if (!foundElement && element.parentElement) {\n            return this.hasStyle(element.parentElement, false);\n        }\n        return null;\n    }\n\n    private async getStyleValue(container: HTMLElement, action: string, containers: string): Promise<string | null> {\n        if (this.style?.value) {\n            if (!container) {\n                return (this.style.input && this.style.value.indexOf('$1') > -1) ? this.style.value.replace('$1', this.style.input) : this.style.value;\n            }\n\n            if (this.hasStyle(container) && this.style.value.indexOf('$1') === -1) {\n                return this.style.default;\n            }\n\n            const style: Node | null = await this.findStyleNode(container, action, containers);\n            if (style && this.hasStyle(style as HTMLElement) && this.style.value.indexOf('$1') === -1) {\n                return this.style.default;\n            }\n\n            return (this.style.input && this.style.value.indexOf('$1') > -1) ? this.style.value.replace('$1', this.style.input) : this.style.value;\n        } else {\n            console.error('Error getStyleValue : cannot get current style value');\n            return null;\n        }\n    }\n\n    private async findStyleNode(node: Node, style: string, containers: string): Promise<Node | null> {\n        if (node.nodeName.toUpperCase() === 'HTML' || node.nodeName.toUpperCase() === 'BODY') {\n            return null;\n        }\n\n        if (!node.parentNode) {\n            return null;\n        }\n\n        if (this.isContainer(containers, node)) {\n            return null;\n        }\n\n        const hasStyle: boolean =\n            (node as HTMLElement).style.getPropertyValue(style) !== null &&\n            (node as HTMLElement).style.getPropertyValue(style) !== undefined &&\n            (node as HTMLElement).style.getPropertyValue(style) !== '';\n\n        if (hasStyle) {\n            return node;\n        }\n\n        return await this.findStyleNode(node.parentNode, style, containers);\n    }\n\n    private async createElement(container: HTMLElement, action: string, containers: string): Promise<HTMLElement> {\n        let newElement: HTMLElement = document.createElement(this.tag ? this.tag : '');\n        if (this.modifies.style) {\n            const property = this.style?.property;\n            let value = await this.getStyleValue(container, action, containers);\n            if (value !== this.style?.default && property) {\n                newElement.style.setProperty(property, value);\n            } else {\n                newElement.style.removeProperty(property ? property : '');\n            }\n        }\n\n        return newElement;\n    }\n\n    private async removeChildrenClasses(element: HTMLElement) {\n        if (!element) {\n            return;\n        }\n\n        const children: HTMLCollection = element.children;\n        for (var currentElement = children[0]; currentElement; currentElement = <Element>currentElement.nextElementSibling) {\n            this.classes?.split(',').forEach((className) => {\n                if (currentElement.classList?.contains(className)) {\n                    if (currentElement.classList.length === 1) {\n                        currentElement.removeAttribute('class');\n                    } else {\n                        currentElement.classList.remove(className);\n                    }\n                }\n            });\n            if (currentElement.children.length > 0) {\n                await this.removeChildrenClasses(<HTMLElement>currentElement);\n            }\n        }\n    }\n\n    parentHasStyle(currentElement: HTMLElement, referenceElement: HTMLElement): boolean {\n        // Link exception\n        if (!currentElement || referenceElement.tagName.toLowerCase() === 'a' || referenceElement.tagName.toLowerCase() === 'div') {\n            return false;\n        }\n\n        if (\n            referenceElement.tagName.toLowerCase() !== 'span' &&\n            referenceElement.tagName.toLowerCase() === currentElement.tagName.toLowerCase()\n        ) {\n            return true;\n        }\n        if (Object.keys(this.getInlineStyle(currentElement)).length > 0 && this.identicalInlineStyle(currentElement, referenceElement)) {\n            return true;\n        }\n        if (currentElement.classList.length > 0 && this.identicalClassList(currentElement, referenceElement)) {\n            return true;\n        }\n        if (currentElement.parentElement && currentElement.parentElement.tagName.toLowerCase() !== 'div') {\n            return this.parentHasStyle(currentElement.parentElement, referenceElement);\n        }\n        return false;\n    }\n\n    private async cleanupContainer(selection: Selection, container: HTMLElement, firstTimeCall: Boolean) {\n        let parentContainer: HTMLElement;\n        let parentFound: Boolean = false;\n        if (firstTimeCall) {\n            parentContainer = <HTMLElement>selection.anchorNode;\n            while (parentContainer && !parentFound) {\n                if (parentContainer.nodeType === Node.ELEMENT_NODE && parentContainer.classList?.contains('ce-paragraph')) {\n                    parentFound = true;\n                } else {\n                    parentContainer = <HTMLElement>parentContainer.parentElement;\n                }\n            }\n        } else {\n            parentContainer = container;\n        }\n        if (!parentContainer || !parentContainer.hasChildNodes()) {\n            return;\n        }\n\n        parentContainer.normalize();\n\n        const children: Node[] = Array.from(parentContainer.childNodes);\n        let previousNode = null;\n        if (children?.length > 0) {\n            for (var currentNode = children[0]; currentNode; currentNode = <Node>currentNode.nextSibling) {\n                while (\n                    currentNode.nextSibling &&\n                    !currentNode.nextSibling.textContent ||\n                    currentNode.nextSibling?.textContent?.length === 0 ||\n                    (currentNode.nextSibling?.nodeType === Node.ELEMENT_NODE && (<HTMLElement>currentNode.nextSibling).innerText.length === 0)\n                ) {\n                    if ((<HTMLElement>currentNode.nextSibling).tagName.toLowerCase() === 'br' || this.paragraphTags.indexOf((<HTMLElement>currentNode.nextSibling).tagName.toLowerCase()) > -1) {\n                        currentNode = currentNode.nextSibling;\n                        continue;\n                    }\n                    parentContainer.removeChild(currentNode.nextSibling);\n                    this.modifiedContent = true;\n                }\n                if (\n                    !currentNode.textContent ||\n                    currentNode.textContent.length === 0 ||\n                    (currentNode.nodeType === Node.ELEMENT_NODE && (<HTMLElement>currentNode).innerText.length === 0)\n                ) {\n                    if ((<HTMLElement>currentNode).tagName.toLowerCase() === 'br' || this.paragraphTags.indexOf((<HTMLElement>currentNode).tagName.toLowerCase()) > -1) {\n                        continue;\n                    }\n                    let previousSibling = currentNode.previousSibling ? currentNode.previousSibling : (previousNode ? previousNode : currentNode.parentNode);\n                    parentContainer.removeChild(currentNode);\n                    currentNode = <Node>previousSibling;\n                    this.modifiedContent = true;\n                }\n                if (\n                    currentNode.nodeType === Node.ELEMENT_NODE &&\n                    currentNode.parentElement &&\n                    this.parentHasStyle(currentNode.parentElement, <HTMLElement>currentNode)\n                ) {\n                    let currentNodeFirstChild = currentNode;\n                    let nextCurrentElement = currentNode.firstChild;\n                    while (currentNode.firstChild) {\n                        parentContainer.insertBefore(currentNode.firstChild, currentNodeFirstChild.nextSibling);\n                        currentNodeFirstChild = <Node>currentNodeFirstChild.nextSibling;\n                    }\n                    if (parentContainer.contains(currentNode)) {\n                      parentContainer.removeChild(currentNode);\n                    }\n                    currentNode = <Node>nextCurrentElement;\n                    this.modifiedContent = true;\n                }\n                let identicalElements = true;\n                while (\n                    identicalElements &&\n                    currentNode.nextSibling &&\n                    currentNode.nodeType === Node.ELEMENT_NODE &&\n                    currentNode.nextSibling.nodeType === Node.ELEMENT_NODE\n                ) {\n                    let currentElement = <Element>currentNode;\n                    let nextElement = <Element>currentNode.nextSibling;\n\n                    if (\n                        this.identicalInlineStyle(<HTMLElement>currentElement, <HTMLElement>nextElement) &&\n                        currentElement.tagName.toLowerCase() === nextElement.tagName.toLowerCase() &&\n                        this.identicalClassList(currentElement, nextElement) &&\n                        this.identicalAttributes(<HTMLElement>currentElement, <HTMLElement>nextElement)\n                    ) {\n                        currentElement.innerHTML += nextElement.innerHTML;\n                        nextElement.remove();\n                        this.modifiedContent = true;\n                    } else {\n                        identicalElements = false;\n                    }\n                }\n                if (\n                    currentNode.nodeType === Node.ELEMENT_NODE &&\n                    (<Element>currentNode).tagName.toLowerCase() === 'span' &&\n                    Object.keys(this.getInlineStyle(<HTMLElement>currentNode)).length === 0 &&\n                    (!(<Element>currentNode).classList || (<Element>currentNode).classList.length === 0) &&\n                    this.hasNoAttributes(<Element>currentNode)\n                ) {\n                    let currentNodeFirstChild = currentNode;\n\n                    while (currentNode.firstChild) {\n                        (<Element>currentNodeFirstChild.parentElement).insertBefore(\n                            currentNode.firstChild,\n                            currentNodeFirstChild.nextSibling\n                        );\n                        currentNodeFirstChild = <Node>(currentNodeFirstChild.nextSibling);\n                    }\n                    (<Element>currentNode).remove();\n                    this.modifiedContent = true;\n                }\n                currentNode.normalize();\n                if (currentNode.childNodes.length > 0) {\n                    await this.cleanupContainer(selection, <HTMLElement>currentNode, false);\n                }\n                previousNode = currentNode;\n            }\n        }\n    }\n\n    private hasNoAttributes(node: Element): boolean {\n        let nodeStyle = Object.keys(this.getInlineStyle(<HTMLElement>node));\n        let nodeAttributes = Object.keys(\n            node.getAttributeNames().reduce((acc, name) => {\n                return { ...acc, [name]: node.getAttribute(name) };\n            }, {})\n        );\n        if (nodeAttributes.length === 0 || (nodeAttributes.length === 1 && nodeStyle.length > 0)) {\n            return true;\n        }\n        return false;\n    }\n\n    private identicalClassList(currentElement: any, nextElement: any): boolean {\n        return (\n            [...currentElement.classList].every((classList) => nextElement.classList.contains(classList)) &&\n            [...nextElement.classList].every((classList) => currentElement.classList.contains(classList))\n        );\n    }\n\n    private identicalAttributes(currentElement: HTMLElement, nextElement: HTMLElement): boolean {\n        let currentElementAttributes = currentElement.getAttributeNames();\n        let identical = true;\n        if (currentElementAttributes) {\n            currentElementAttributes.forEach((attribute) => {\n                if (\n                    !nextElement.getAttribute(attribute) ||\n                    nextElement.getAttribute(attribute) !== currentElement.getAttribute(attribute)\n                ) {\n                    identical = false;\n                }\n            });\n        }\n        return identical;\n    }\n\n    private identicalInlineStyle(currentElement: HTMLElement, nextElement: HTMLElement): boolean {\n        const currentElementInlineStyle = this.getInlineStyle(currentElement);\n        const nextElementInlineStyle = this.getInlineStyle(nextElement);\n        let currentElementInlineStyleSorted = this.sortInlineStyle(currentElementInlineStyle);\n        let nextElementInlineStyleSorted = this.sortInlineStyle(nextElementInlineStyle);\n        return JSON.stringify(currentElementInlineStyleSorted) === JSON.stringify(nextElementInlineStyleSorted);\n    }\n\n    private sortInlineStyle(currentElement: Object): Object {\n        return Object.entries(currentElement)\n            .sort(([, a]: any, [, b]: any) => a - b)\n            .reduce((r, [k, v]) => ({ ...r, [k]: v }), {});\n    }\n\n    private getInlineStyle(currentElement: HTMLElement): Object {\n        let inlineStyleArray = Array.from(currentElement.style);\n        if (inlineStyleArray && inlineStyleArray.length > 0) {\n            return inlineStyleArray.reduce((style: string, name: string) => {\n                let object: any = {\n                    name: currentElement.style.getPropertyValue(name)\n                };\n                return object;\n            });\n        }\n        return {};\n    }\n\n    private setInlineStyle(currentElement: HTMLElement, nextElement: HTMLElement): HTMLElement {\n        let currentElementStyle = Array.from(currentElement.style);\n        if (currentElementStyle && currentElementStyle.length > 0) {\n            const currentElementInlineStyle = Array.from(currentElement.style).reduce((o, key) => ({ ...o, [key]: currentElement.style.getPropertyValue(key)}), {})\n            for (const property in currentElementInlineStyle) {\n                nextElement.style.setProperty(property, '' + currentElementInlineStyle[property as keyof typeof currentElementInlineStyle]);\n            }\n        }\n        return nextElement;\n    }\n\n    private isContainer(containers: string, node: Node): Boolean {\n        if (containers.split(',').indexOf(node.nodeName.toLowerCase()) === -1) {\n            return false;\n        }\n        return true;\n    }\n\n    private getMostDescendantChild(element: HTMLElement) {\n        while (element.children && element.innerText === (<HTMLElement>element.children[0])?.innerText && element.children.length === 1) {\n            element = <HTMLElement>element.children[0];\n        }\n        return element;\n    }\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { InlineStyleTool } from './tool-type/inline-style-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Bold formatting tool for EditorJS\n * Allows applying bold formatting to selected text or entire blocks\n */\n// @dynamic\nexport class BoldTool extends InlineStyleTool implements InlineTool {\n    public static title = 'Bold';\n\n    // Tool configuration\n    private readonly commandName: string = 'bold';\n    override tag = 'STRONG';\n    override hasSeparatorBefore = true;\n\n    // CSS configuration\n    private readonly CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--bold',\n    };\n\n    // Modification configuration\n    override modifies = {\n        tag: true,\n        style: false,\n        class: false,\n        attribute: false,\n    };\n\n    // DOM elements\n    private nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    public get shortcut() {\n        return 'CMD+B';\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // BOLD APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies bold formatting to selected text or selected blocks\n     */\n    async surround(range: Range) {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        // If blocks are selected, apply bold to all blocks\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.applyBoldToSelectedBlocks(selectedBlocks);\n        } else {\n            await this.execCommandStyle(this.tag);\n        }\n        \n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Applies bold formatting to all selected blocks\n     */\n    private applyBoldToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyBoldToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies bold formatting to a specific block\n     */\n    private applyBoldToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applyBoldToTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies bold formatting to a text element\n     */\n    private applyBoldToTextElement(textElement: HTMLElement) {\n        // Remove existing bold elements\n        this.removeExistingBoldElements(textElement);\n        \n        // Create and apply new bold element if not already bold\n        if (!this.state) {\n            this.createAndApplyBoldElement(textElement);\n        }\n    }\n\n    /**\n     * Removes existing bold elements\n     */\n    private removeExistingBoldElements(textElement: HTMLElement) {\n        textElement.querySelectorAll(this.tag).forEach((boldElement) => {\n            boldElement.replaceWith(...Array.from(boldElement.childNodes));\n        });\n    }\n\n    /**\n     * Creates and applies a new bold element\n     */\n    private createAndApplyBoldElement(textElement: HTMLElement) {\n        // List of block elements that should not be wrapped by a strong tag\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'];\n        \n        // Check if the text element contains block elements\n        const hasBlockElements = Array.from(textElement.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            // If the element contains blocks, apply bold to text inside each block\n            this.applyBoldToBlockElements(textElement);\n        } else {\n            // Otherwise, apply bold normally by wrapping all content\n            const strong = document.createElement(this.tag);\n            strong.append(...Array.from(textElement.childNodes));\n            textElement.replaceChildren(strong);\n        }\n    }\n\n    /**\n     * Applies bold to block elements by wrapping only the text\n     */\n    private applyBoldToBlockElements(textElement: HTMLElement): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its text content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'].includes(childElement.tagName)) {\n                this.applyBoldToBlockContent(childElement);\n            } else {\n                // For other elements, apply bold normally\n                const strong = document.createElement(this.tag);\n                strong.append(...Array.from(childElement.childNodes));\n                childElement.replaceChildren(strong);\n            }\n        });\n    }\n\n    /**\n     * Applies bold to the content of a block element\n     */\n    private applyBoldToBlockContent(blockElement: HTMLElement): void {\n        // Create a strong element\n        const strong = document.createElement(this.tag);\n        \n        // Move all child nodes into the strong element\n        strong.append(...Array.from(blockElement.childNodes));\n        \n        // Replace the block element content with the strong element\n        blockElement.replaceChildren(strong);\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const isActive = !!(\n            (selection?.anchorNode && this.hasStyle(selection.anchorNode as HTMLElement)) || \n            (selection?.focusNode && this.hasStyle(selection.focusNode as HTMLElement))\n        );\n        \n        this.state = isActive;\n        return isActive;\n    }\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus, StyleObject } from '../editorjs-tool.component';\nimport { InlineStyleTool } from './tool-type/inline-style-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Capitalize formatting tool for EditorJS\n * Allows applying uppercase text transformation to selected text or entire blocks\n */\n// @dynamic\nexport class CapitalizeTool extends InlineStyleTool implements InlineTool {\n    public static title = 'Capitalize';\n\n    // Tool configuration\n    private readonly commandName: string = 'capitalize';\n    override tag = 'SPAN';\n    override hasSeparatorBefore = false;\n\n    // CSS configuration\n    private readonly CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--capitalize',\n    };\n\n    // Style configuration\n    override style: StyleObject = {\n        property: 'text-transform',\n        value: 'uppercase',\n        default: 'initial',\n    };\n\n    // Modification configuration\n    override modifies = {\n        tag: false,\n        style: true,\n        class: false,\n        attribute: false,\n    };\n\n    // DOM elements\n    private nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            span: {\n                style: {\n                    'text-transform': true,\n                },\n            },\n        } as unknown as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    public get shortcut() {\n        return 'CMD+SHIFT+C';\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // CAPITALIZE APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies capitalize formatting to selected text or selected blocks\n     */\n    async surround(range: Range) {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        // If blocks are selected, apply capitalize to all blocks\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.applyCapitalizeToSelectedBlocks(selectedBlocks);\n        } else {\n            await this.execCommandStyle(this.tag);\n        }\n        \n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Applies capitalize formatting to all selected blocks\n     */\n    private applyCapitalizeToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyCapitalizeToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies capitalize formatting to a specific block\n     */\n    private applyCapitalizeToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applyCapitalizeToTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies capitalize formatting to a text element\n     */\n    private applyCapitalizeToTextElement(textElement: HTMLElement) {\n        // Remove existing capitalize elements\n        this.removeExistingCapitalizeElements(textElement);\n        \n        // Create and apply new capitalize element if not already capitalized\n        if (!this.state) {\n            this.createAndApplyCapitalizeElement(textElement);\n        }\n    }\n\n    /**\n     * Removes existing capitalize elements\n     */\n    private removeExistingCapitalizeElements(textElement: HTMLElement) {\n        textElement.querySelectorAll(`span[style*=\"text-transform: uppercase\"]`).forEach((capitalizeElement) => {\n            // Remove the text-transform style\n            const element = capitalizeElement as HTMLElement;\n            element.style.textTransform = 'initial';\n            \n            // If the element has no other styles, unwrap it\n            if (!element.style.cssText || element.style.cssText.trim() === '') {\n                element.replaceWith(...Array.from(element.childNodes));\n            }\n        });\n    }\n\n    /**\n     * Creates and applies a new capitalize element\n     */\n    private createAndApplyCapitalizeElement(textElement: HTMLElement) {\n        // List of block elements that should not be wrapped by a span tag\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'];\n        \n        // Check if the text element contains block elements\n        const hasBlockElements = Array.from(textElement.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            // If the element contains blocks, apply capitalize to text inside each block\n            this.applyCapitalizeToBlockElements(textElement);\n        } else {\n            // Otherwise, apply capitalize normally by wrapping all content\n            const span = document.createElement(this.tag);\n            span.style.textTransform = this.style.value || 'uppercase';\n            span.append(...Array.from(textElement.childNodes));\n            textElement.replaceChildren(span);\n        }\n    }\n\n    /**\n     * Applies capitalize to block elements by wrapping only the text\n     */\n    private applyCapitalizeToBlockElements(textElement: HTMLElement): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its text content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'].includes(childElement.tagName)) {\n                this.applyCapitalizeToBlockContent(childElement);\n            } else {\n                // For other elements, apply capitalize normally\n                const span = document.createElement(this.tag);\n                span.style.textTransform = this.style.value || 'uppercase';\n                span.append(...Array.from(childElement.childNodes));\n                childElement.replaceChildren(span);\n            }\n        });\n    }\n\n    /**\n     * Applies capitalize to the content of a block element\n     */\n    private applyCapitalizeToBlockContent(blockElement: HTMLElement): void {\n        // Create a span element with capitalize style\n        const span = document.createElement(this.tag);\n        span.style.textTransform = this.style.value || 'uppercase';\n        \n        // Move all child nodes into the span element\n        span.append(...Array.from(blockElement.childNodes));\n        \n        // Replace the block element content with the span element\n        blockElement.replaceChildren(span);\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const isActive = !!(\n            (selection?.anchorNode && this.hasStyle(selection.anchorNode as HTMLElement)) || \n            (selection?.focusNode && this.hasStyle(selection.focusNode as HTMLElement))\n        );\n        \n        this.state = isActive;\n        return isActive;\n    }\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { InlineStyleTool } from './tool-type/inline-style-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Clean formatting tool for EditorJS\n * Allows removing all formatting from selected text or entire blocks\n */\n// @dynamic\nexport class CleanTool extends InlineStyleTool implements InlineTool {\n    public static title = 'Clean';\n\n    // Tool configuration\n    private readonly commandName: string = 'clean';\n    override hasSeparatorBefore = true;\n\n    // CSS configuration\n    private readonly CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--clean',\n    };\n\n    // Modification configuration\n    override modifies = {\n        tag: false,\n        style: false,\n        class: false,\n        attribute: false,\n    };\n\n    // DOM elements\n    private nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {} as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    public get shortcut() {\n        return 'CMD+SHIFT+C';\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // CLEAN APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Cleans formatting from selected text or selected blocks\n     */\n    async surround(range: Range) {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        // If blocks are selected, clean all blocks\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.cleanSelectedBlocks(selectedBlocks);\n        } else {\n            await this.cleanSelectedText(range);\n        }\n        \n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Cleans formatting from all selected blocks\n     */\n    private cleanSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.cleanBlock(blockId);\n        });\n    }\n\n    /**\n     * Cleans formatting from a specific block\n     */\n    private cleanBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.cleanTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Cleans formatting from a text element\n     */\n    private cleanTextElement(textElement: HTMLElement) {\n        // Get all text content without formatting\n        const textContent = textElement.textContent || '';\n        \n        // Clear the element and create a new paragraph with clean text\n        textElement.innerHTML = '';\n        \n        // Only create a paragraph if there's actual content\n        if (textContent.trim()) {\n            const paragraph = document.createElement('p');\n            paragraph.textContent = textContent;\n            textElement.appendChild(paragraph);\n        } else {\n            // If no content, create an empty paragraph to maintain structure\n            const paragraph = document.createElement('p');\n            paragraph.innerHTML = '<br>';\n            textElement.appendChild(paragraph);\n        }\n    }\n\n    /**\n     * Cleans formatting from selected text\n     */\n    private async cleanSelectedText(range: Range) {\n        const selection = this.getSelection();\n        if (!selection || selection.rangeCount === 0) {\n            return;\n        }\n\n        const rangeToClean = selection.getRangeAt(0);\n        \n        // Check if selection covers all text in the container\n        const isCoveringAllText = this.isSelectionCoveringAllText(rangeToClean);\n        \n        if (isCoveringAllText) {\n            await this.cleanEntireDiv(rangeToClean);\n        } else {\n            await this.cleanSelectedTextOnly(rangeToClean);\n        }\n    }\n\n    /**\n     * Cleans only the selected text (original behavior)\n     */\n    private async cleanSelectedTextOnly(range: Range) {\n        const selection = this.getSelection();\n        if (!selection || selection.rangeCount === 0) return;\n\n        const rangeToClean = selection.getRangeAt(0);\n        \n        // Get the container element\n        const container = rangeToClean.commonAncestorContainer;\n        const containerElement = container.nodeType === Node.TEXT_NODE \n            ? container.parentElement \n            : container as HTMLElement;\n            \n        if (!containerElement) {\n            return;\n        }\n\n        // Extract the selected content\n        const fragment = rangeToClean.extractContents();\n        \n        // Get clean text content\n        const textContent = fragment.textContent || '';\n        \n        // Create a new text node with clean content\n        const cleanTextNode = document.createTextNode(textContent);\n        \n        // Insert the clean text\n        rangeToClean.insertNode(cleanTextNode);\n        \n        // Clean up any formatting elements that might be left\n        this.cleanupFormattingElements(containerElement);\n        \n        // Collapse the range to the end\n        rangeToClean.collapse(false);\n        selection.removeAllRanges();\n        selection.addRange(rangeToClean);\n    }\n\n    /**\n     * Cleans all formatting from the entire div when selection covers all text\n     */\n    private async cleanEntireDiv(range: Range) {\n        // Get the container element\n        const container = range.commonAncestorContainer;\n        let containerElement = container.nodeType === Node.TEXT_NODE \n            ? container.parentElement \n            : container as HTMLElement;\n            \n        if (!containerElement) {\n            return;\n        }\n        \n        // Find the first div above the container\n        const divElement = this.findFirstDivAbove(containerElement);\n        if (!divElement) {\n            return;\n        }\n        \n        // Clean the entire div by removing all formatting\n        this.cleanEntireContainerAdvanced(divElement);\n    }\n\n    /**\n     * Finds the first div element above the given element\n     */\n    private findFirstDivAbove(element: HTMLElement): HTMLElement | null {\n        let currentElement: HTMLElement | null = element;\n        \n        while (currentElement) {\n            // Check if current element is a div\n            if (currentElement.tagName.toLowerCase() === 'div') {\n                return currentElement;\n            }\n            \n            // Move to parent element\n            currentElement = currentElement.parentElement;\n        }\n        \n        return null;\n    }\n\n    /**\n     * Cleans all formatting from an entire container element\n     */\n    private cleanEntireContainer(element: HTMLElement) {\n        // Get all text content\n        const textContent = element.textContent || '';\n        \n        // Clear all content\n        element.innerHTML = '';\n        \n        // Remove all style attributes and classes that might contain formatting\n        element.removeAttribute('style');\n        element.removeAttribute('class');\n        \n        // If there's text content, create clean paragraphs\n        if (textContent.trim()) {\n            // Split by line breaks and create paragraphs\n            const lines = textContent.split(/\\n+/).filter(line => line.trim());\n            \n            if (lines.length === 0) {\n                // If no lines after filtering, create empty paragraph\n                const paragraph = document.createElement('p');\n                paragraph.innerHTML = '<br>';\n                element.appendChild(paragraph);\n            } else {\n                // Create a paragraph for each line\n                lines.forEach(line => {\n                    const paragraph = document.createElement('p');\n                    paragraph.textContent = line.trim();\n                    element.appendChild(paragraph);\n                });\n            }\n        } else {\n            // Create empty paragraph to maintain structure\n            const paragraph = document.createElement('p');\n            paragraph.innerHTML = '<br>';\n            element.appendChild(paragraph);\n        }\n    }\n\n    /**\n     * Cleans all formatting from an entire container element (alternative approach)\n     * Removes formatting elements and specific we-* classes\n     */\n    private cleanEntireContainerAdvanced(element: HTMLElement) {\n        // Elements to remove (same as cleanupFormattingElements)\n        const formattingElements = ['a', 'b', 'strong', 'i', 'em', 'u', 's', 'strike', 'sub', 'sup', 'span'];\n        \n        // Remove all formatting elements\n        formattingElements.forEach(tagName => {\n            const elements = element.querySelectorAll(tagName);\n            elements.forEach(el => {\n                // Unwrap the element (replace with its text content)\n                const textNode = document.createTextNode(el.textContent || '');\n                el.parentNode?.replaceChild(textNode, el);\n            });\n        });\n        \n        // Remove specific we-* classes from all elements\n        const allElements = element.querySelectorAll('*');\n        allElements.forEach(el => {\n            if (el instanceof HTMLElement) {\n                const classList = Array.from(el.classList);\n                const weClasses = classList.filter(cls => \n                    cls.startsWith('we-size-') || \n                    cls.startsWith('we-align-') || \n                    cls.startsWith('we-indent-')\n                );\n                \n                if (weClasses.length > 0) {\n                    weClasses.forEach(cls => el.classList.remove(cls));\n                }\n            }\n        });\n        \n        // Also clean up any empty elements\n        const emptyElements = element.querySelectorAll('*');\n        emptyElements.forEach(el => {\n            if (el.textContent?.trim() === '' && el.children.length === 0) {\n                el.remove();\n            }\n        });\n        \n        // Remove style attributes from all elements\n        const styledElements = element.querySelectorAll('[style]');\n        styledElements.forEach(el => {\n            if (el instanceof HTMLElement) {\n                el.removeAttribute('style');\n            }\n        });\n    }\n\n    /**\n     * Cleans up formatting elements that might be left after cleaning\n     */\n    private cleanupFormattingElements(element: HTMLElement) {\n        // Elements to remove (formatting elements)\n        const formattingElements = ['a', 'b', 'strong', 'i', 'em', 'u', 's', 'strike', 'sub', 'sup', 'span'];\n        \n        // Find all formatting elements within the container\n        formattingElements.forEach(tagName => {\n            const elements = element.querySelectorAll(tagName);\n            elements.forEach(el => {\n                // If the element contains only text (no other formatting), unwrap it\n                if (el.children.length === 0 && el.textContent) {\n                    const textNode = document.createTextNode(el.textContent);\n                    el.parentNode?.replaceChild(textNode, el);\n                }\n            });\n        });\n        \n        // Also clean up any empty elements\n        const emptyElements = element.querySelectorAll('*');\n        emptyElements.forEach(el => {\n            if (el.textContent?.trim() === '' && el.children.length === 0) {\n                el.remove();\n            }\n        });\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Checks if the current selection covers all visible text in its container div\n     */\n    private isSelectionCoveringAllText(range: Range): boolean {\n        // Get the container element\n        const container = range.commonAncestorContainer;\n        const containerElement = container.nodeType === Node.TEXT_NODE \n            ? container.parentElement \n            : container as HTMLElement;\n            \n        if (!containerElement) {\n            return false;\n        }\n        \n        // Get the selected text\n        const selectedText = range.toString().trim();\n        \n        // Get all visible text in the container (excluding hidden elements)\n        const allText = this.getAllVisibleText(containerElement).trim();\n        \n        // Compare the texts (case-insensitive and ignoring extra whitespace)\n        const normalizedSelected = selectedText.replace(/\\s+/g, ' ').toLowerCase();\n        const normalizedAll = allText.replace(/\\s+/g, ' ').toLowerCase();\n        \n        const isCovering = normalizedSelected === normalizedAll && normalizedSelected.length > 0;\n        \n        return isCovering;\n    }\n\n    /**\n     * Gets all visible text content from an element, excluding hidden elements\n     */\n    private getAllVisibleText(element: HTMLElement): string {\n        // Clone the element to avoid modifying the original\n        const clone = element.cloneNode(true) as HTMLElement;\n        \n        // Remove hidden elements\n        const hiddenElements = clone.querySelectorAll('[style*=\"display: none\"], [style*=\"visibility: hidden\"], .hidden');\n        hiddenElements.forEach(el => el.remove());\n        \n        // Get text content\n        return clone.textContent || '';\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        // Clean tool is always available, so we don't need to check for specific formatting\n        this.state = false;\n        return false;\n    }\n} ","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { InlineStyleTool } from './tool-type/inline-style-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Italic formatting tool for EditorJS\n * Allows applying italic formatting to selected text or entire blocks\n */\n// @dynamic\nexport class ItalicTool extends InlineStyleTool implements InlineTool {\n    public static title = 'Italic';\n\n    // Tool configuration\n    private readonly commandName: string = 'italic';\n    override tag = 'EM';\n\n    // CSS configuration\n    private readonly CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--italic',\n    };\n\n    // Modification configuration\n    override modifies = {\n        tag: true,\n        style: false,\n        class: false,\n        attribute: false,\n    };\n\n    // DOM elements\n    private nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    public get shortcut() {\n        return 'CMD+I';\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // ITALIC APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies italic formatting to selected text or selected blocks\n     */\n    async surround(range: Range) {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        // If blocks are selected, apply italic to all blocks\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.applyItalicToSelectedBlocks(selectedBlocks);\n        } else {\n            await this.execCommandStyle(this.tag);\n        }\n        \n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Applies italic formatting to all selected blocks\n     */\n    private applyItalicToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyItalicToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies italic formatting to a specific block\n     */\n    private applyItalicToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applyItalicToTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies italic formatting to a text element\n     */\n    private applyItalicToTextElement(textElement: HTMLElement) {\n        // Remove existing italic elements\n        this.removeExistingItalicElements(textElement);\n        \n        // Create and apply new italic element if not already italic\n        if (!this.state) {\n            this.createAndApplyItalicElement(textElement);\n        }\n    }\n\n    /**\n     * Removes existing italic elements\n     */\n    private removeExistingItalicElements(textElement: HTMLElement) {\n        textElement.querySelectorAll(this.tag).forEach((italicElement) => {\n            italicElement.replaceWith(...Array.from(italicElement.childNodes));\n        });\n    }\n\n    /**\n     * Creates and applies a new italic element\n     */\n    private createAndApplyItalicElement(textElement: HTMLElement) {\n        // List of block elements that should not be wrapped by an em tag\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'];\n        \n        // Check if the text element contains block elements\n        const hasBlockElements = Array.from(textElement.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            // If the element contains blocks, apply italic to text inside each block\n            this.applyItalicToBlockElements(textElement);\n        } else {\n            // Otherwise, apply italic normally by wrapping all content\n            const em = document.createElement(this.tag);\n            em.append(...Array.from(textElement.childNodes));\n            textElement.replaceChildren(em);\n        }\n    }\n\n    /**\n     * Applies italic to block elements by wrapping only the text\n     */\n    private applyItalicToBlockElements(textElement: HTMLElement): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its text content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'].includes(childElement.tagName)) {\n                this.applyItalicToBlockContent(childElement);\n            } else {\n                // For other elements, apply italic normally\n                const em = document.createElement(this.tag);\n                em.append(...Array.from(childElement.childNodes));\n                childElement.replaceChildren(em);\n            }\n        });\n    }\n\n    /**\n     * Applies italic to the content of a block element\n     */\n    private applyItalicToBlockContent(blockElement: HTMLElement): void {\n        // Create an em element\n        const em = document.createElement(this.tag);\n        \n        // Move all child nodes into the em element\n        em.append(...Array.from(blockElement.childNodes));\n        \n        // Replace the block element content with the em element\n        blockElement.replaceChildren(em);\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const isActive = !!(\n            (selection?.anchorNode && this.hasStyle(selection.anchorNode as HTMLElement)) || \n            (selection?.focusNode && this.hasStyle(selection.focusNode as HTMLElement))\n        );\n        \n        this.state = isActive;\n        return isActive;\n    }\n}\n\n","import { Injectable } from '@angular/core';\nimport { I18nConfig } from '@editorjs/editorjs';\n\nexport var editorJSI18nDictionnary: I18nConfig;\n\n@Injectable({\n    providedIn: 'root',\n})\nexport class EditorJSTranslationService {\n    constructor() {}\n\n    setDictionnary(dictionnary: I18nConfig) {\n        editorJSI18nDictionnary = dictionnary;\n    }\n\n    get(key: string): string {\n        return editorJSI18nDictionnary[key as keyof typeof editorJSI18nDictionnary] as string;\n    }\n}\n","import { containerSelector } from \"../editorjs-tool.component\";\n\ninterface DropdownConfig {\n    left?: string;\n    [key: string]: any;\n}\n\nexport function openDropdown(parentEditor: HTMLElement | null, dropdown: Element | null | undefined, toolButton: HTMLElement | null, parentSelector: string, inputToFocus: Element | null = null, childElementSelector: string | null = null, config: DropdownConfig = {}) {\n    if (!parentEditor) {\n        console.error('Error openDropdown: Cannot find editor');\n        return;\n    }\n    if (!dropdown) {\n        console.error('Error openDropdown: Cannot find dropdown');\n        return;\n    }\n    if (!toolButton) {\n        console.error('Error openDropdown: Cannot find tool');\n        return;\n    }\n\n    // close all dropdowns\n    const toolActionContainers = parentEditor.querySelector('.ce-inline-toolbar__actions')?.children ?? null;\n    if (!toolActionContainers) {\n        console.error('Error openDropdown: Cannot find tools');\n        return;\n    }\n    Array.from(toolActionContainers).map((tool) => !tool.classList.contains('action-hidden') ? tool.classList.add('action-hidden') : true);\n\n    // reset dropdown vertical position\n    (<HTMLElement>dropdown).style.top = 'unset';\n    (<HTMLElement>dropdown).style.bottom = 'unset';\n    \n    // Apply left position from config if provided, otherwise use default calculation\n    if (config.left !== undefined) {\n        (<HTMLElement>dropdown).style.left = config.left;\n    } else {\n        // center dropdown relative to button\n        (<HTMLElement>dropdown).style.left = (toolButton.getBoundingClientRect().left - (dropdown.closest('.ce-inline-toolbar')?.getBoundingClientRect()?.left ?? 0)).toString() + 'px';\n    }\n    \n    // event variables\n    currentDropdown = dropdown;\n    dropdownSelector = parentSelector;\n\n    // left and top positions\n    let bottomPosition = false;\n    let left = parseFloat(getComputedStyle(dropdown).left.replace('px', ''));\n    let top = 0;\n    const globalContainer = <HTMLElement>(dropdown.closest(containerSelector)) ?? document.body;\n    const childElement = childElementSelector ? dropdown.querySelector(childElementSelector) : null;\n    const dropdownOffset = {\n        top: dropdown.getBoundingClientRect().top - globalContainer.getBoundingClientRect().top,\n        left: dropdown.getBoundingClientRect().left - globalContainer.getBoundingClientRect().left\n    };\n    const childDimensions = {\n        width: childElement ? (<HTMLElement>childElement).offsetWidth : 0,\n        height: childElement ? (<HTMLElement>childElement).offsetHeight : 0\n    }\n    const dropdownDimensions = {\n        width: (<HTMLElement>dropdown).offsetWidth + childDimensions.width,\n        height: Math.max((<HTMLElement>dropdown).offsetHeight, childDimensions.height)\n    }\n    \n    const containerDimensions = {\n        width: globalContainer.offsetWidth,\n        height: globalContainer.offsetHeight\n    }\n\n    if (dropdownDimensions.width > containerDimensions.width) {\n        // dropdown is wider than container\n        // add responsive class for dropdowns ?\n    }\n\n    // Only adjust left position if not provided in config\n    if (config.left === undefined) {\n        // Get the parent container (toolbar) position relative to viewport\n        const toolbar = dropdown.closest('.ce-inline-toolbar') as HTMLElement;\n        const toolbarRect = toolbar.getBoundingClientRect();\n        const currentLeft = parseFloat(getComputedStyle(dropdown).left.replace('px', ''));\n        \n        // Temporarily show dropdown to get accurate dimensions\n        const wasHidden = dropdown.classList.contains('action-hidden');\n        if (wasHidden) {\n            dropdown.classList.remove('action-hidden');\n        }\n        \n        // Recalculate dropdown dimensions after showing it\n        const actualDropdownWidth = (<HTMLElement>dropdown).offsetWidth;\n        const actualChildWidth = childElementSelector ? \n            ((<HTMLElement>dropdown.querySelector(childElementSelector))?.offsetWidth || 0) : 0;\n        const actualDropdownDimensions = {\n            width: actualDropdownWidth + actualChildWidth,\n            height: Math.max((<HTMLElement>dropdown).offsetHeight, \n                childElementSelector ? ((<HTMLElement>dropdown.querySelector(childElementSelector))?.offsetHeight || 0) : 0)\n        };\n        \n        // Calculate dropdown position relative to viewport\n        const dropdownLeftInViewport = toolbarRect.left + currentLeft;\n        const dropdownRightInViewport = dropdownLeftInViewport + actualDropdownDimensions.width;\n\n        // Check if dropdown overflows to the right of viewport\n        if (dropdownRightInViewport > window.innerWidth) {\n            const overflowRight = dropdownRightInViewport - window.innerWidth;\n            left = currentLeft - overflowRight;\n        }\n        \n        // Check if dropdown overflows to the left of viewport\n        if (dropdownLeftInViewport < 0) {\n            const overflowLeft = Math.abs(dropdownLeftInViewport);\n            left = currentLeft + overflowLeft;\n        }\n\n        // Ensure dropdown doesn't exceed viewport width (relative to toolbar)\n        const maxLeftInToolbar = window.innerWidth - toolbarRect.left - actualDropdownDimensions.width;\n        if (left > maxLeftInToolbar) {\n            left = maxLeftInToolbar;\n        }\n        \n        // Hide dropdown again if it was hidden before\n        if (wasHidden) {\n            dropdown.classList.add('action-hidden');\n        }\n        \n        (<HTMLElement>dropdown).style.left = left.toString() + 'px';\n    }\n    \n    if (dropdownOffset.top + dropdownDimensions.height > containerDimensions.height) {\n        // dropdown overflows to the bottom\n        let toolbar = document.querySelector('.ce-inline-toolbar.ce-inline-toolbar--showed') as HTMLElement;\n        bottomPosition = true;\n        (<HTMLElement>dropdown).style.bottom = toolbar.offsetHeight.toString() + 'px';\n        (<HTMLElement>dropdown).style.top = 'unset';\n    }\n\n    if (!bottomPosition) {\n        (<HTMLElement>dropdown).style.bottom = 'unset';\n        (<HTMLElement>dropdown).style.top = top.toString() + 'px';\n    }\n\n    // show dropdown\n    dropdown.classList.remove('action-hidden');\n    document.addEventListener('click', ($event) => isDropdownFocusedOut($event));\n    if (inputToFocus) {\n        setTimeout(() => {\n            trigger(inputToFocus, 'focus');\n        }, 100);\n    }\n}\n\nexport function closeDropdown(dropdown: Element | null) {\n    if (!dropdown) {\n        console.error('Error closeDropdown: Cannot find dropdown');\n        return;\n    }\n    dropdown.classList.add('action-hidden');\n    document.removeEventListener('click', ($event) => isDropdownFocusedOut($event));\n}\n\nfunction isDropdownFocusedOut($event: any) {;\n        if (!(<HTMLElement>currentDropdown).classList.contains('action-hidden')) {\n            return false;\n        }\n        let element = $event.target;\n        if (element.closest(dropdownSelector)) {\n            return false;\n        }\n        document.removeEventListener('click', ($event) => isDropdownFocusedOut($event));\n        (<HTMLElement>currentDropdown).classList.add('action-hidden');\n        return true;\n}\n\nfunction trigger(el: any, eventType :any) {\n  if (typeof eventType === 'string' && typeof el[eventType] === 'function') {\n    el[eventType]();\n  } else {\n    const event =\n      typeof eventType === 'string'\n        ? new Event(eventType, {bubbles: true})\n        : eventType;\n    el.dispatchEvent(event);\n  }\n}\n\nvar currentDropdown: Element | null = null;\nvar dropdownSelector: string = '';","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { fromEvent } from 'rxjs';\nimport { editorJSI18nDictionnary } from '../../services/editorjs-translation.service';\nimport { AttributeObject, containerSelector, isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { InlineStyleTool } from './tool-type/inline-style-tool.component';\nimport { openDropdown, closeDropdown } from '../utils/dropdown.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Link formatting tool for EditorJS\n * Allows applying links to selected text or entire blocks with various options\n * including target blank and obfuscation features\n */\n// @dynamic\nexport class LinkTool extends InlineStyleTool implements InlineTool {\n    public static title = 'Link';\n\n    // ============================================================================\n    // TOOL CONFIGURATION\n    // ============================================================================\n\n    private readonly commandName: string = 'link';\n    override tag: 'SPAN' | 'A' = 'SPAN';\n    override hasSeparatorBefore = true;\n    override linkDeletion: boolean = false;\n\n    // Modification configuration\n    override modifies = {\n        tag: false,\n        style: false,\n        class: false,\n        attribute: true,\n    };\n\n    override attributeName: string = 'data-htap,href,data-knalb';\n    override attributesToApply: AttributeObject[] = [];\n\n    // ============================================================================\n    // CSS CONFIGURATION\n    // ============================================================================\n\n    private readonly CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--link',\n    };\n\n    linkCss = {\n        container: 'ce-inline-actions--link',\n        linkContainer: 'ce-inline-actions--link__container',\n        targetContainer: 'ce-inline-actions--link__target',\n        obfuscationContainer: 'ce-inline-actions--link__obfuscation',\n        linkInputId: 'linkInput',\n        targetCheckboxId: 'targetCheckbox',\n        obfuscationCheckboxId: 'obfuscationCheckbox',\n        addButtonClass: 'ce-inline-actions--link__add',\n        editButtonClass: 'ce-inline-actions--link__edit',\n        deleteButtonClass: 'ce-inline-actions--link__delete',\n    };\n\n    // ============================================================================\n    // DOM ELEMENTS\n    // ============================================================================\n\n    private nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // ============================================================================\n    // SERVICES\n    // ============================================================================\n\n    private selectedBlocksService: SelectedBlocksService;\n\n    // ============================================================================\n    // INTERNAL STATE\n    // ============================================================================\n\n    override api: any;\n    private _state: boolean;\n    isLinkDropdownOpen: boolean = false;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    public get shortcut() {\n        return 'CMD+K';\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render() {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        this.nodes.button.addEventListener('click', () => this.openLinkDropdown(event));\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // LINK APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies link formatting to selected text or selected blocks\n     */\n    async surround(range: Range | null, applyLink: boolean = false) {\n        if (applyLink) {\n            const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n            // If blocks are selected, apply link to all blocks\n            if (selectedBlocks && selectedBlocks.length > 0) {\n                this.applyLinkToSelectedBlocks(selectedBlocks);\n            } else {\n                this.checkAnchorAndFocus = true;\n                await this.resetUserSelection();\n                await this.execCommandStyle(this.tag, false);\n                this.checkAnchorAndFocus = false;\n            }\n        }\n    }\n\n    /**\n     * Applies link formatting to all selected blocks\n     */\n    private applyLinkToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyLinkToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies link formatting to a specific block\n     */\n    private applyLinkToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applyLinkToTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies link formatting to a text element\n     */\n    private applyLinkToTextElement(textElement: HTMLElement) {\n        // Get link configuration from dropdown\n        const linkConfig = this.getLinkConfiguration();\n        if (!linkConfig.url) return;\n\n        // Remove existing link elements\n        this.removeExistingLinkElements(textElement);\n        \n        // Create and apply new link element\n        this.createAndApplyLinkElement(textElement, linkConfig);\n    }\n\n    /**\n     * Removes existing link elements\n     */\n    private removeExistingLinkElements(textElement: HTMLElement) {\n        textElement.querySelectorAll('a[href], span[data-htap]').forEach((linkElement) => {\n            const element = linkElement as HTMLElement;\n            const parent = element.parentElement;\n            if (parent) {\n                // Preserve formatting by moving child nodes to parent instead of creating text node\n                while (element.firstChild) {\n                    parent.insertBefore(element.firstChild, element);\n                }\n                // Remove the link element\n                parent.removeChild(element);\n            }\n        });\n    }\n\n    /**\n     * Creates and applies a new link element\n     */\n    private createAndApplyLinkElement(textElement: HTMLElement, linkConfig: { url: string; target: boolean; obfuscated: boolean }) {\n        // List of block elements that should not be wrapped by a link\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV', 'BLOCKQUOTE'];\n        \n        // Check if the text element contains block elements\n        const hasBlockElements = Array.from(textElement.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            // If the element contains blocks, apply link to text inside each block\n            this.applyLinkToBlockElements(textElement, linkConfig);\n        } else {\n            // Otherwise, apply link normally by wrapping all content\n            this.applyLinkToAllContent(textElement, linkConfig);\n        }\n    }\n\n    /**\n     * Applies link to all content (when no block elements are present)\n     */\n    private applyLinkToAllContent(textElement: HTMLElement, linkConfig: { url: string; target: boolean; obfuscated: boolean }) {\n        const childNodes = Array.from(textElement.childNodes);\n        if (childNodes.length === 0) return;\n\n        if (linkConfig.obfuscated) {\n            // Create obfuscated link with SPAN tag\n            const span = document.createElement('SPAN');\n            span.setAttribute('data-htap', btoa(linkConfig.url));\n            \n            if (linkConfig.target) {\n                span.setAttribute('data-knalb', 'true');\n            }\n            \n            // Move all child nodes to the span to preserve formatting\n            childNodes.forEach(node => span.appendChild(node.cloneNode(true)));\n            textElement.replaceChildren(span);\n        } else {\n            // Create regular link with A tag\n            const link = document.createElement('A');\n            link.setAttribute('href', linkConfig.url);\n            \n            if (linkConfig.target) {\n                link.setAttribute('target', '_blank');\n            }\n            \n            // Move all child nodes to the link to preserve formatting\n            childNodes.forEach(node => link.appendChild(node.cloneNode(true)));\n            textElement.replaceChildren(link);\n        }\n    }\n\n    /**\n     * Applies link to block elements by wrapping only the text content\n     */\n    private applyLinkToBlockElements(textElement: HTMLElement, linkConfig: { url: string; target: boolean; obfuscated: boolean }): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its text content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'].includes(childElement.tagName)) {\n                this.applyLinkToBlockContent(childElement, linkConfig);\n            } else {\n                // For other elements, apply link normally\n                this.applyLinkToElement(childElement, linkConfig);\n            }\n        });\n    }\n\n    /**\n     * Applies link to the content of a block element\n     */\n    private applyLinkToBlockContent(blockElement: HTMLElement, linkConfig: { url: string; target: boolean; obfuscated: boolean }): void {\n        const childNodes = Array.from(blockElement.childNodes);\n        if (childNodes.length === 0) return;\n\n        if (linkConfig.obfuscated) {\n            // Create obfuscated link with SPAN tag\n            const span = document.createElement('SPAN');\n            span.setAttribute('data-htap', btoa(linkConfig.url));\n            \n            if (linkConfig.target) {\n                span.setAttribute('data-knalb', 'true');\n            }\n            \n            // Move all child nodes to the span to preserve formatting\n            childNodes.forEach(node => span.appendChild(node.cloneNode(true)));\n            blockElement.replaceChildren(span);\n        } else {\n            // Create regular link with A tag\n            const link = document.createElement('A');\n            link.setAttribute('href', linkConfig.url);\n            \n            if (linkConfig.target) {\n                link.setAttribute('target', '_blank');\n            }\n            \n            // Move all child nodes to the link to preserve formatting\n            childNodes.forEach(node => link.appendChild(node.cloneNode(true)));\n            blockElement.replaceChildren(link);\n        }\n    }\n\n    /**\n     * Applies link to a single element\n     */\n    private applyLinkToElement(element: HTMLElement, linkConfig: { url: string; target: boolean; obfuscated: boolean }): void {\n        const childNodes = Array.from(element.childNodes);\n        if (childNodes.length === 0) return;\n\n        if (linkConfig.obfuscated) {\n            // Create obfuscated link with SPAN tag\n            const span = document.createElement('SPAN');\n            span.setAttribute('data-htap', btoa(linkConfig.url));\n            \n            if (linkConfig.target) {\n                span.setAttribute('data-knalb', 'true');\n            }\n            \n            // Move all child nodes to the span to preserve formatting\n            childNodes.forEach(node => span.appendChild(node.cloneNode(true)));\n            element.replaceChildren(span);\n        } else {\n            // Create regular link with A tag\n            const link = document.createElement('A');\n            link.setAttribute('href', linkConfig.url);\n            \n            if (linkConfig.target) {\n                link.setAttribute('target', '_blank');\n            }\n            \n            // Move all child nodes to the link to preserve formatting\n            childNodes.forEach(node => link.appendChild(node.cloneNode(true)));\n            element.replaceChildren(link);\n        }\n    }\n\n    /**\n     * Gets link configuration from the dropdown inputs\n     */\n    private getLinkConfiguration(): { url: string; target: boolean; obfuscated: boolean } {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        const uuid = this.parentEditor?.getAttribute('id')?.replace('editorJs-', '');\n        if (!uuid) return { url: '', target: false, obfuscated: false };\n\n        const targetCheckbox = this.parentEditor?.querySelector(`#${this.linkCss.targetCheckboxId}${uuid}`) as HTMLInputElement;\n        const obfuscationCheckbox = this.parentEditor?.querySelector(`#${this.linkCss.obfuscationCheckboxId}${uuid}`) as HTMLInputElement;\n        const linkInput = this.parentEditor?.querySelector(`#${this.linkCss.linkInputId}${uuid}`) as HTMLInputElement;\n\n        return {\n            url: linkInput?.value || '',\n            target: targetCheckbox?.checked || false,\n            obfuscated: obfuscationCheckbox?.checked || false\n        };\n    }\n\n    /**\n     * Applies link to the current selection\n     */\n    async applyLink() {\n        await this.resetUserSelection();\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        const uuid = this.parentEditor?.getAttribute('id')?.replace('editorJs-', '');\n        this.attributesToApply = [];\n\n        const targetCheckbox = this.parentEditor?.querySelector(`#${this.linkCss.targetCheckboxId}${uuid}`) as HTMLInputElement;\n        const obfuscationCheckbox = this.parentEditor?.querySelector(`#${this.linkCss.obfuscationCheckboxId}${uuid}`) as HTMLInputElement;\n        const linkInput = this.parentEditor?.querySelector(`#${this.linkCss.linkInputId}${uuid}`) as HTMLInputElement;\n\n        this.tag = 'A';\n        this.modifies.tag = true;\n        this.attributesToApply = [\n            {\n                name: 'href',\n                value: linkInput.value,\n            }\n        ];\n\n        if (obfuscationCheckbox.checked) {\n            this.tag = 'SPAN';\n            this.modifies.tag = false;\n            this.attributesToApply = [\n                {\n                    name: 'data-htap',\n                    value: btoa(linkInput.value),\n                }\n            ];\n\n            if (targetCheckbox.checked) {\n                this.attributesToApply.push({\n                    name: 'data-knalb',\n                    value: 'true',\n                });\n            }\n        } else {\n            if (targetCheckbox.checked) {\n                this.attributesToApply.push({\n                    name: 'target',\n                    value: '_blank',\n                });\n            }\n        }\n        \n        await this.surround(null, true);\n        this.resetUserSelection();\n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Deletes link from the current selection or selected blocks\n     */\n    async deleteLink() {\n        await this.resetUserSelection();\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        // If blocks are selected, delete links from all blocks\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.deleteLinkFromSelectedBlocks(selectedBlocks);\n        } else {\n            // Use the original logic for single selection\n            const uuid = this.parentEditor?.getAttribute('id')?.replace('editorJs-', '');\n\n            const targetCheckbox = this.parentEditor?.querySelector(`#${this.linkCss.targetCheckboxId}${uuid}`) as HTMLInputElement;\n            const obfuscationCheckbox = this.parentEditor?.querySelector(`#${this.linkCss.obfuscationCheckboxId}${uuid}`) as HTMLInputElement;\n            const linkInput = this.parentEditor?.querySelector(`#${this.linkCss.linkInputId}${uuid}`) as HTMLInputElement;\n            \n            if (obfuscationCheckbox.checked) {\n                this.tag = 'SPAN';\n                this.modifies.tag = false;\n                this.attributesToApply.push({\n                    name: 'data-htap',\n                    value: btoa(linkInput.value),\n                });\n\n                if (targetCheckbox.checked) {\n                    this.attributesToApply.push({\n                        name: 'data-knalb',\n                        value: 'true',\n                    });\n                }\n            } else {\n                this.tag = 'A';\n                this.modifies.tag = true;\n                this.attributesToApply.push({\n                    name: 'href',\n                    value: linkInput.value,\n                });\n\n                if (targetCheckbox.checked) {\n                    this.attributesToApply.push({\n                        name: 'target',\n                        value: '_blank',\n                    });\n                }\n            }\n            \n            this.linkDeletion = true;\n            await this.surround(null, true);\n            this.linkDeletion = false;\n        }\n        \n        this.resetUserSelection();\n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Deletes links from all selected blocks\n     */\n    private deleteLinkFromSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.deleteLinkFromBlock(blockId);\n        });\n    }\n\n    /**\n     * Deletes links from a specific block\n     */\n    private deleteLinkFromBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.deleteLinkFromTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Deletes links from a text element\n     */\n    private deleteLinkFromTextElement(textElement: HTMLElement) {\n        // List of block elements that should be processed\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'];\n        \n        // Check if the text element contains block elements\n        const hasBlockElements = Array.from(textElement.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            // If the element contains blocks, delete links from each block\n            this.deleteLinkFromBlockElements(textElement);\n        } else {\n            // Otherwise, delete links normally from all content\n            this.deleteLinkFromAllContent(textElement);\n        }\n    }\n\n    /**\n     * Deletes links from all content (when no block elements are present)\n     */\n    private deleteLinkFromAllContent(textElement: HTMLElement) {\n        // Remove all link elements (both regular and obfuscated)\n        textElement.querySelectorAll('a[href], span[data-htap]').forEach((linkElement) => {\n            const element = linkElement as HTMLElement;\n            const parent = element.parentElement;\n            if (parent) {\n                // Preserve formatting by moving child nodes to parent instead of creating text node\n                while (element.firstChild) {\n                    parent.insertBefore(element.firstChild, element);\n                }\n                // Remove the link element\n                parent.removeChild(element);\n            }\n        });\n    }\n\n    /**\n     * Deletes links from block elements\n     */\n    private deleteLinkFromBlockElements(textElement: HTMLElement): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'].includes(childElement.tagName)) {\n                this.deleteLinkFromBlockContent(childElement);\n            } else {\n                // For other elements, delete links normally\n                this.deleteLinkFromElement(childElement);\n            }\n        });\n    }\n\n    /**\n     * Deletes links from the content of a block element\n     */\n    private deleteLinkFromBlockContent(blockElement: HTMLElement): void {\n        // Remove all link elements (both regular and obfuscated)\n        blockElement.querySelectorAll('a[href], span[data-htap]').forEach((linkElement) => {\n            const element = linkElement as HTMLElement;\n            const parent = element.parentElement;\n            if (parent) {\n                // Preserve formatting by moving child nodes to parent instead of creating text node\n                while (element.firstChild) {\n                    parent.insertBefore(element.firstChild, element);\n                }\n                // Remove the link element\n                parent.removeChild(element);\n            }\n        });\n    }\n\n    /**\n     * Deletes links from a single element\n     */\n    private deleteLinkFromElement(element: HTMLElement): void {\n        // Remove all link elements (both regular and obfuscated)\n        element.querySelectorAll('a[href], span[data-htap]').forEach((linkElement) => {\n            const linkEl = linkElement as HTMLElement;\n            const parent = linkEl.parentElement;\n            if (parent) {\n                // Preserve formatting by moving child nodes to parent instead of creating text node\n                while (linkEl.firstChild) {\n                    parent.insertBefore(linkEl.firstChild, linkEl);\n                }\n                // Remove the link element\n                parent.removeChild(linkEl);\n            }\n        });\n    }\n\n    /**\n     * Edits existing link\n     */\n    async editLink() {\n        await this.deleteLink();\n        await this.applyLink();\n        const linkCss = this.linkCss;\n        const linkDropdown = this.parentEditor?.querySelector(`.${this.linkCss.container}`);\n        if (linkDropdown) {\n            closeDropdown(linkDropdown);\n        }\n        this.resetUserSelection();\n        this.checkState(this.getSelection());\n    }\n\n    // ============================================================================\n    // DROPDOWN MANAGEMENT METHODS\n    // ============================================================================\n\n    /**\n     * Renders the link dropdown actions\n     */\n    renderActions() {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        const uuid = this.parentEditor?.getAttribute('id')?.replace('editorJs-', '');\n        const container = document.createElement('div');\n        \n        if (uuid) {\n            const linkCss = this.linkCss;\n            let toolsDictionnary = null;\n            if (editorJSI18nDictionnary?.messages && editorJSI18nDictionnary.messages.tools) {\n                toolsDictionnary = editorJSI18nDictionnary.messages.tools;\n            }\n            \n            container.className = `${this.linkCss.container} action-hidden`;\n            // allows container element to have focus\n            container.setAttribute('tabindex', '1');\n\n            const linkContainer = document.createElement('div');\n            linkContainer.className = this.linkCss.linkContainer;\n            \n            const targetContainer = document.createElement('div');\n            targetContainer.className = this.linkCss.targetContainer;\n            \n            const obfuscationContainer = document.createElement('div');\n            obfuscationContainer.className = this.linkCss.obfuscationContainer;\n            \n            const applyButton = document.createElement('button');\n            applyButton.className = this.linkCss.addButtonClass;\n            if (toolsDictionnary) {\n                applyButton.innerText = String(toolsDictionnary[\"linkAdd\"]);\n            }\n\n            fromEvent(applyButton, 'click').subscribe(() => {\n                this.applyLink();\n                this.openLinkDropdown(event);\n                this.resetUserSelection();\n                this.checkState(this.getSelection());\n            });\n\n            const linkInput = document.createElement('input');\n            linkInput.setAttribute('id', `${this.linkCss.linkInputId}${uuid}`);\n            if (toolsDictionnary) {\n                linkInput.setAttribute('placeholder', String(toolsDictionnary['linkPlaceholder']));\n            }\n            \n            const targetCheckbox = document.createElement('input');\n            targetCheckbox.setAttribute('id', `${this.linkCss.targetCheckboxId}${uuid}`);\n            targetCheckbox.setAttribute('type', 'checkbox');\n            \n            const targetLabel = document.createElement('label');\n            if (toolsDictionnary) {\n                targetLabel.innerText = String(toolsDictionnary['linkExternal']);\n            }\n            targetLabel.setAttribute('for', `${this.linkCss.targetCheckboxId}${uuid}`);\n            targetLabel.addEventListener('mousedown', (event) => event.preventDefault());\n            targetLabel.addEventListener('click', (event) => this.preventLabelFromStealingFocus(event));\n            \n            const targetTooltipContainer = document.createElement('div');\n            const targetTooltip = document.createElement('div');\n            if (toolsDictionnary) {\n                targetTooltip.innerHTML = String(toolsDictionnary['linkExternalInfo']);\n            }\n            targetTooltipContainer.appendChild(targetTooltip);\n            \n            const obfuscationCheckbox = document.createElement('input');\n            obfuscationCheckbox.setAttribute('id', `${this.linkCss.obfuscationCheckboxId}${uuid}`);\n            obfuscationCheckbox.setAttribute('type', 'checkbox');\n            \n            const obfuscationLabel = document.createElement('label');\n            if (toolsDictionnary) {\n                obfuscationLabel.innerText = String(toolsDictionnary['linkObfuscated']);\n            }\n            obfuscationLabel.setAttribute('for', `${this.linkCss.obfuscationCheckboxId}${uuid}`);\n            obfuscationLabel.addEventListener('click', (event) => this.preventLabelFromStealingFocus(event));\n            obfuscationLabel.addEventListener('mousedown', (event) => event.preventDefault());\n            \n            const obfuscationTooltipContainer = document.createElement('div');\n            const obbfuscationTooltip = document.createElement('div');\n            if (toolsDictionnary) {\n                obbfuscationTooltip.innerHTML = String(toolsDictionnary['linkInfo']);\n            }\n            obfuscationTooltipContainer.appendChild(obbfuscationTooltip);\n            \n            const editButton = document.createElement('button');\n            const deleteButton = document.createElement('button');\n            editButton.className = `${this.linkCss.editButtonClass} hidden`;\n            editButton.addEventListener('click', () => this.editLink());\n            deleteButton.className = `${this.linkCss.deleteButtonClass} hidden`;\n            deleteButton.addEventListener('click', () => {\n                this.deleteLink();\n                this.openLinkDropdown(event);\n                this.resetUserSelection();\n                this.checkState(this.getSelection());\n            });\n\n            linkContainer.appendChild(linkInput);\n            targetContainer.appendChild(targetCheckbox);\n            targetContainer.appendChild(targetLabel);\n            targetContainer.appendChild(targetTooltipContainer);\n            obfuscationContainer.appendChild(obfuscationCheckbox);\n            obfuscationContainer.appendChild(obfuscationLabel);\n            obfuscationContainer.appendChild(obfuscationTooltipContainer);\n\n            container.appendChild(linkContainer);\n            container.appendChild(targetContainer);\n            container.appendChild(obfuscationContainer);\n            container.appendChild(applyButton);\n            container.appendChild(editButton);\n            container.appendChild(deleteButton);\n\n            // prevent tool dropdown losing focus, and parent losing focus-within\n            container.addEventListener('click', (event) => {\n                if ((event.target as HTMLElement).tagName?.toLowerCase() === 'div') {\n                    container.focus();\n                }\n            });\n        } else {\n            console.error('Error renderActions on link tool : could not find editor uuid');\n        }\n\n        return container;\n    }\n\n    /**\n     * Shows link actions dropdown with current link state\n     */\n    showActions(mark: any) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        const uuid = this.parentEditor?.getAttribute('id')?.replace('editorJs-', '');\n        const linkCss = this.linkCss;\n        const targetCheckbox = this.parentEditor?.querySelector(`#${this.linkCss.targetCheckboxId}${uuid}`) as HTMLInputElement;\n        const obfuscationCheckbox = this.parentEditor?.querySelector(`#${this.linkCss.obfuscationCheckboxId}${uuid}`) as HTMLInputElement;\n        const linkInput = this.parentEditor?.querySelector(`#${this.linkCss.linkInputId}${uuid}`) as HTMLInputElement;\n        const editButton = this.parentEditor?.querySelector(`.${this.linkCss.editButtonClass}`);\n        const deleteButton = this.parentEditor?.querySelector(`.${this.linkCss.deleteButtonClass}`);\n        const addButton = this.parentEditor?.querySelector(`.${this.linkCss.addButtonClass}`);\n        \n        linkInput.value = '';\n        \n        if (this.checkState(this.getSelection())) {\n            const selection = this.getSelection();\n            const element = this.hasStyle(selection?.anchorNode as HTMLElement) || this.hasStyle(selection?.focusNode as HTMLElement);\n            if (element) {\n                const value = element.getAttribute(element.tagName.toLowerCase() === 'a' ? 'href' : 'data-htap');\n                linkInput.value = value ? value : '';\n            }\n            targetCheckbox.checked = (element?.getAttribute('target') === '_blank' || element?.getAttribute('data-knalb') === 'true');\n            obfuscationCheckbox.checked = element?.tagName.toLowerCase() === 'span';\n            if (obfuscationCheckbox.checked) {\n                linkInput.value = atob(linkInput.value);\n            }\n            if (deleteButton?.classList.contains('hidden')) {\n                editButton?.classList.remove('hidden');\n                deleteButton.classList.remove('hidden');\n            }\n            if (!addButton?.classList.contains('hidden')) {\n                addButton?.classList.add('hidden');\n            }\n        } else {\n            linkInput.value = '';\n            targetCheckbox.checked = false;\n            obfuscationCheckbox.checked = false;\n            if (!deleteButton?.classList.contains('hidden')) {\n                editButton?.classList.add('hidden');\n                deleteButton?.classList.add('hidden');\n            }\n            if (addButton?.classList.contains('hidden')) {\n                addButton.classList.remove('hidden');\n            }\n        }\n    }\n\n    /**\n     * Hides link actions dropdown\n     */\n    hideActions() {}\n\n    /**\n     * Opens or closes the link dropdown\n     */\n    async openLinkDropdown(event: any) {\n        event.preventDefault();\n        await this.saveUserSelection();\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        const linkCss = this.linkCss;\n        const linkDropdown = this.parentEditor?.querySelector(`.${this.linkCss.container}`);\n        const linkDropdownInput = this.parentEditor?.querySelector('.ce-inline-actions--link__container input');\n        \n        if (linkDropdown && this.nodes.button) {\n            if (linkDropdown.classList.contains('action-hidden')) {\n                openDropdown(this.parentEditor, linkDropdown, this.nodes.button, `.${this.linkCss.container}`, linkDropdownInput, null, { left: '0px' });\n                this.showActions(null);\n            } else {\n                closeDropdown(linkDropdown);\n                this.isLinkDropdownOpen = false;\n                await this.resetUserSelection();\n            }\n        }\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const isActive = !!(\n            (selection?.anchorNode && this.hasStyle(selection.anchorNode as HTMLElement)) || \n            (selection?.focusNode && this.hasStyle(selection.focusNode as HTMLElement))\n        );\n        \n        this.state = isActive;\n        return isActive;\n    }\n\n    /**\n     * Prevents label from stealing focus when clicked\n     */\n    private preventLabelFromStealingFocus(event: MouseEvent) {\n        if ((event.target as HTMLElement).tagName?.toLowerCase() === 'label') {\n            event.preventDefault();\n            (event.target as HTMLLabelElement).control?.click();\n        }\n    }\n}\n\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { InlineStyleTool } from './tool-type/inline-style-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Strike formatting tool for EditorJS\n * Allows applying strikethrough formatting to selected text or entire blocks\n */\n// @dynamic\nexport class StrikeTool extends InlineStyleTool implements InlineTool {\n    public static title = 'Strike';\n\n    // Tool configuration\n    private readonly commandName: string = 'strikethrough';\n    override tag = 'S';\n\n    // CSS configuration\n    private readonly CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--strike',\n    };\n\n    // Modification configuration\n    override modifies = {\n        tag: true,\n        style: false,\n        class: false,\n        attribute: false,\n    };\n\n    // DOM elements\n    private nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    public get shortcut() {\n        return 'CMD+S';\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // STRIKE APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies strikethrough formatting to selected text or selected blocks\n     */\n    async surround(range: Range) {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        // If blocks are selected, apply strikethrough to all blocks\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.applyStrikeToSelectedBlocks(selectedBlocks);\n        } else {\n            await this.execCommandStyle(this.tag);\n        }\n        \n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Applies strikethrough formatting to all selected blocks\n     */\n    private applyStrikeToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyStrikeToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies strikethrough formatting to a specific block\n     */\n    private applyStrikeToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applyStrikeToTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies strikethrough formatting to a text element\n     */\n    private applyStrikeToTextElement(textElement: HTMLElement) {\n        // Remove existing strike elements\n        this.removeExistingStrikeElements(textElement);\n        \n        // Create and apply new strike element if not already struck\n        if (!this.state) {\n            this.createAndApplyStrikeElement(textElement);\n        }\n    }\n\n    /**\n     * Removes existing strike elements\n     */\n    private removeExistingStrikeElements(textElement: HTMLElement) {\n        textElement.querySelectorAll(this.tag).forEach((strikeElement) => {\n            strikeElement.replaceWith(...Array.from(strikeElement.childNodes));\n        });\n    }\n\n    /**\n     * Creates and applies a new strike element\n     */\n    private createAndApplyStrikeElement(textElement: HTMLElement) {\n        // List of block elements that should not be wrapped by a strike tag\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'];\n        \n        // Check if the text element contains block elements\n        const hasBlockElements = Array.from(textElement.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            // If the element contains blocks, apply strike to text inside each block\n            this.applyStrikeToBlockElements(textElement);\n        } else {\n            // Otherwise, apply strike normally by wrapping all content\n            const strike = document.createElement(this.tag);\n            strike.append(...Array.from(textElement.childNodes));\n            textElement.replaceChildren(strike);\n        }\n    }\n\n    /**\n     * Applies strikethrough to block elements by wrapping only the text\n     */\n    private applyStrikeToBlockElements(textElement: HTMLElement): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its text content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'].includes(childElement.tagName)) {\n                this.applyStrikeToBlockContent(childElement);\n            } else {\n                // For other elements, apply strike normally\n                const strike = document.createElement(this.tag);\n                strike.append(...Array.from(childElement.childNodes));\n                childElement.replaceChildren(strike);\n            }\n        });\n    }\n\n    /**\n     * Applies strikethrough to the content of a block element\n     */\n    private applyStrikeToBlockContent(blockElement: HTMLElement): void {\n        // Create a strike element\n        const strike = document.createElement(this.tag);\n        \n        // Move all child nodes into the strike element\n        strike.append(...Array.from(blockElement.childNodes));\n        \n        // Replace the block element content with the strike element\n        blockElement.replaceChildren(strike);\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const isActive = !!(\n            (selection?.anchorNode && this.hasStyle(selection.anchorNode as HTMLElement)) || \n            (selection?.focusNode && this.hasStyle(selection.focusNode as HTMLElement))\n        );\n        \n        this.state = isActive;\n        return isActive;\n    }\n}\n\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { InlineStyleTool } from './tool-type/inline-style-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Subscript formatting tool for EditorJS\n * Allows applying subscript formatting to selected text or entire blocks\n */\n// @dynamic\nexport class SubscriptTool extends InlineStyleTool implements InlineTool {\n    public static title = 'Subscript';\n\n    // Tool configuration\n    private readonly commandName: string = 'subscript';\n    override tag = 'SUB';\n    override hasSeparatorBefore = true;\n\n    // CSS configuration\n    private readonly CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--subscript',\n    };\n\n    // Modification configuration\n    override modifies = {\n        tag: true,\n        style: false,\n        class: false,\n        attribute: false,\n    };\n\n    // DOM elements\n    private nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            sub: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    public get shortcut() {\n        return 'CMD+SHIFT+S';\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // SUBSCRIPT APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies subscript formatting to selected text or selected blocks\n     */\n    async surround(range: Range) {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        // If blocks are selected, apply subscript to all blocks\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.applySubscriptToSelectedBlocks(selectedBlocks);\n        } else {\n            await this.execCommandStyle(this.tag);\n        }\n        \n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Applies subscript formatting to all selected blocks\n     */\n    private applySubscriptToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applySubscriptToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies subscript formatting to a specific block\n     */\n    private applySubscriptToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applySubscriptToTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies subscript formatting to a text element\n     */\n    private applySubscriptToTextElement(textElement: HTMLElement) {\n        // Remove existing subscript elements\n        this.removeExistingSubscriptElements(textElement);\n        \n        // Create and apply new subscript element if not already subscript\n        if (!this.state) {\n            this.createAndApplySubscriptElement(textElement);\n        }\n    }\n\n    /**\n     * Removes existing subscript elements\n     */\n    private removeExistingSubscriptElements(textElement: HTMLElement) {\n        textElement.querySelectorAll(this.tag).forEach((subscriptElement) => {\n            subscriptElement.replaceWith(...Array.from(subscriptElement.childNodes));\n        });\n    }\n\n    /**\n     * Creates and applies a new subscript element\n     */\n    private createAndApplySubscriptElement(textElement: HTMLElement) {\n        // List of block elements that should not be wrapped by a subscript tag\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'];\n        \n        // Check if the text element contains block elements\n        const hasBlockElements = Array.from(textElement.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            // If the element contains blocks, apply subscript to text inside each block\n            this.applySubscriptToBlockElements(textElement);\n        } else {\n            // Otherwise, apply subscript normally by wrapping all content\n            const subscript = document.createElement(this.tag);\n            subscript.append(...Array.from(textElement.childNodes));\n            textElement.replaceChildren(subscript);\n        }\n    }\n\n    /**\n     * Applies subscript to block elements by wrapping only the text\n     */\n    private applySubscriptToBlockElements(textElement: HTMLElement): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its text content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'].includes(childElement.tagName)) {\n                this.applySubscriptToBlockContent(childElement);\n            } else {\n                // For other elements, apply subscript normally\n                const subscript = document.createElement(this.tag);\n                subscript.append(...Array.from(childElement.childNodes));\n                childElement.replaceChildren(subscript);\n            }\n        });\n    }\n\n    /**\n     * Applies subscript to the content of a block element\n     */\n    private applySubscriptToBlockContent(blockElement: HTMLElement): void {\n        // Create a subscript element\n        const subscript = document.createElement(this.tag);\n        \n        // Move all child nodes into the subscript element\n        subscript.append(...Array.from(blockElement.childNodes));\n        \n        // Replace the block element content with the subscript element\n        blockElement.replaceChildren(subscript);\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const isActive = !!(\n            (selection?.anchorNode && this.hasStyle(selection.anchorNode as HTMLElement)) || \n            (selection?.focusNode && this.hasStyle(selection.focusNode as HTMLElement))\n        );\n        \n        this.state = isActive;\n        return isActive;\n    }\n}\n\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { InlineStyleTool } from './tool-type/inline-style-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Superscript formatting tool for EditorJS\n * Allows applying superscript formatting to selected text or entire blocks\n */\n// @dynamic\nexport class SuperscriptTool extends InlineStyleTool implements InlineTool {\n    public static title = 'Superscript';\n\n    // Tool configuration\n    private readonly commandName: string = 'superscript';\n    override tag = 'SUP';\n    override hasSeparatorBefore = false;\n\n    // CSS configuration\n    private readonly CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--superscript',\n    };\n\n    // Modification configuration\n    override modifies = {\n        tag: true,\n        style: false,\n        class: false,\n        attribute: false,\n    };\n\n    // DOM elements\n    private nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            sup: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    public get shortcut() {\n        return 'CMD+SHIFT+U';\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // SUPERSCRIPT APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies superscript formatting to selected text or selected blocks\n     */\n    async surround(range: Range) {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        // If blocks are selected, apply superscript to all blocks\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.applySuperscriptToSelectedBlocks(selectedBlocks);\n        } else {\n            await this.execCommandStyle(this.tag);\n        }\n        \n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Applies superscript formatting to all selected blocks\n     */\n    private applySuperscriptToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applySuperscriptToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies superscript formatting to a specific block\n     */\n    private applySuperscriptToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applySuperscriptToTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies superscript formatting to a text element\n     */\n    private applySuperscriptToTextElement(textElement: HTMLElement) {\n        // Remove existing superscript elements\n        this.removeExistingSuperscriptElements(textElement);\n        \n        // Create and apply new superscript element if not already superscript\n        if (!this.state) {\n            this.createAndApplySuperscriptElement(textElement);\n        }\n    }\n\n    /**\n     * Removes existing superscript elements\n     */\n    private removeExistingSuperscriptElements(textElement: HTMLElement) {\n        textElement.querySelectorAll(this.tag).forEach((supElement) => {\n            supElement.replaceWith(...Array.from(supElement.childNodes));\n        });\n    }\n\n    /**\n     * Creates and applies a new superscript element\n     */\n    private createAndApplySuperscriptElement(textElement: HTMLElement) {\n        // List of block elements that should not be wrapped by a sup tag\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'];\n        \n        // Check if the text element contains block elements\n        const hasBlockElements = Array.from(textElement.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            // If the element contains blocks, apply superscript to text inside each block\n            this.applySuperscriptToBlockElements(textElement);\n        } else {\n            // Otherwise, apply superscript normally by wrapping all content\n            const sup = document.createElement(this.tag);\n            sup.append(...Array.from(textElement.childNodes));\n            textElement.replaceChildren(sup);\n        }\n    }\n\n    /**\n     * Applies superscript to block elements by wrapping only the text\n     */\n    private applySuperscriptToBlockElements(textElement: HTMLElement): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its text content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'].includes(childElement.tagName)) {\n                this.applySuperscriptToBlockContent(childElement);\n            } else {\n                // For other elements, apply superscript normally\n                const sup = document.createElement(this.tag);\n                sup.append(...Array.from(childElement.childNodes));\n                childElement.replaceChildren(sup);\n            }\n        });\n    }\n\n    /**\n     * Applies superscript to the content of a block element\n     */\n    private applySuperscriptToBlockContent(blockElement: HTMLElement): void {\n        // Create a sup element\n        const sup = document.createElement(this.tag);\n        \n        // Move all child nodes into the sup element\n        sup.append(...Array.from(blockElement.childNodes));\n        \n        // Replace the block element content with the sup element\n        blockElement.replaceChildren(sup);\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const isActive = !!(\n            (selection?.anchorNode && this.hasStyle(selection.anchorNode as HTMLElement)) || \n            (selection?.focusNode && this.hasStyle(selection.focusNode as HTMLElement))\n        );\n        \n        this.state = isActive;\n        return isActive;\n    }\n}\n\n","export const DEFAULT_COLOR_ARRAY: Array<Array<string>> = [\n    [\n        'rgb(0, 0, 0)',\n        'rgb(67, 67, 67)',\n        'rgb(102, 102, 102)',\n        'rgb(153, 153, 153)',\n        'rgb(183, 183, 183)',\n        'rgb(204, 204, 204)',\n        'rgb(217, 217, 217)',\n        'rgb(239, 239, 239)',\n        'rgb(243, 243, 243)',\n        'rgb(255, 255, 255)',\n    ],\n    [\n        'rgb(152, 0, 0)',\n        'rgb(255, 0, 0)',\n        'rgb(255, 153, 0)',\n        'rgb(255, 255, 0)',\n        'rgb(0, 255, 0)',\n        'rgb(0, 255, 255)',\n        'rgb(74, 134, 232)',\n        'rgb(0, 0, 255)',\n        'rgb(153, 0, 255)',\n        'rgb(255, 0, 255)',\n    ],\n    [\n        'rgb(230, 184, 175)',\n        'rgb(244, 204, 204)',\n        'rgb(252, 229, 205)',\n        'rgb(255, 242, 204)',\n        'rgb(217, 234, 211)',\n        'rgb(208, 224, 227)',\n        'rgb(201, 218, 248)',\n        'rgb(207, 226, 243)',\n        'rgb(217, 210, 233)',\n        'rgb(234, 209, 220)',\n    ],\n    [\n        'rgb(221, 126, 107)',\n        'rgb(234, 153, 153)',\n        'rgb(249, 203, 156)',\n        'rgb(255, 229, 153)',\n        'rgb(182, 215, 168)',\n        'rgb(162, 196, 201)',\n        'rgb(164, 194, 244)',\n        'rgb(159, 197, 232)',\n        'rgb(180, 167, 214)',\n        'rgb(213, 166, 189)',\n    ],/*\n    [\n        'rgb(204, 65, 37)',\n        'rgb(224, 102, 102)',\n        'rgb(246, 178, 107)',\n        'rgb(255, 217, 102)',\n        'rgb(147, 196, 125)',\n        'rgb(118, 165, 175)',\n        'rgb(109, 158, 235)',\n        'rgb(111, 168, 220)',\n        'rgb(142, 124, 195)',\n        'rgb(194, 123, 160)',\n    ],*/\n    [\n        'rgb(166, 28, 0)',\n        'rgb(204, 0, 0)',\n        'rgb(230, 145, 56)',\n        'rgb(241, 194, 50)',\n        'rgb(106, 168, 79)',\n        'rgb(69, 129, 142)',\n        'rgb(60, 120, 216)',\n        'rgb(61, 133, 198)',\n        'rgb(103, 78, 167)',\n        'rgb(166, 77, 121)',\n    ],/*\n    [\n        'rgb(133, 32, 12)',\n        'rgb(153, 0, 0)',\n        'rgb(180, 95, 6)',\n        'rgb(191, 144, 0)',\n        'rgb(56, 118, 29)',\n        'rgb(19, 79, 92)',\n        'rgb(17, 85, 204)',\n        'rgb(11, 83, 148)',\n        'rgb(53, 28, 117)',\n        'rgb(116, 27, 71)',\n    ],\n    [\n        'rgb(91, 15, 0)',\n        'rgb(102, 0, 0)',\n        'rgb(120, 63, 4)',\n        'rgb(127, 96, 0)',\n        'rgb(39, 78, 19)',\n        'rgb(12, 52, 61)',\n        'rgb(28, 69, 135)',\n        'rgb(7, 55, 99)',\n        'rgb(32, 18, 77)',\n        'rgb(76, 17, 48)',\n    ],*/\n];\n\nexport const GLOBAL_KEY_CODES = [\n    'Backspace',\n    'ControlLeft',\n    'ControlRight',\n    'ShiftLeft',\n    'ShiftRight',\n    'Tab',\n    'ArrowLeft',\n    'ArrowRight',\n    'ArrowUp',\n    'ArrowDown',\n];","import { DEFAULT_COLOR_ARRAY, GLOBAL_KEY_CODES } from '../../utils/colors.component';\nimport { closeDropdown, openDropdown } from '../../utils/dropdown.component';\nimport { InlineStyleTool } from './inline-style-tool.component';\nimport iro from '@jaames/iro';\n\nenum ColorType {\n    HEX,\n    RGB,\n    HSL,\n}\n\nexport abstract class ColorTool extends InlineStyleTool {\n    nodes: { button: HTMLButtonElement | null } = { button: null};\n\n    isColorSelectionOpen: boolean = false;\n\n    colorSelection: any;\n\n    colors: Array<Array<string>> = DEFAULT_COLOR_ARRAY;\n\n    colorIndicator: HTMLSpanElement | null = null;\n\n    CSS: any;\n\n    override api: any = null;\n\n    colorSelectionCss: any = {\n        wrapper: 'ce-inline-actions--color',\n        container: 'ce-inline-actions--color__container',\n        colorPickerContainer: 'ce-inline-actions--color__container__colorPicker',\n        row: 'ce-inline-actions--color__row',\n        item: 'ce-inline-actions--color__row__item',\n    };\n\n    customColorPicker: iro.ColorPicker | null = null;\n\n    abstract applyColor($event: MouseEvent | null, color: string, inputToFocus: HTMLInputElement): Promise<void>;\n\n    async openColorPicker() {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        let colorSelection = this.parentEditor?.querySelectorAll('.' + this.CSS.colorSelectionModifier)[0];\n        let selection = this.getSelection();\n        let currentColor: any = null;\n        if (selection?.anchorNode && selection.anchorNode.parentElement) {\n            currentColor = this.getCurrentColorApplied(selection?.anchorNode?.parentElement);\n        }\n        await this.saveUserSelection();\n        if (colorSelection && currentColor && this.parentEditor) {\n            if (colorSelection.classList.contains('action-hidden') && this.nodes.button) {\n                this.checkDefaultColors();\n                openDropdown(this.parentEditor, colorSelection, this.nodes.button, this.colorSelectionCss.container, null, '.' + (this.colorSelectionCss.colorPickerContainer));\n                let colorPickerWrapper = <HTMLElement>this.parentEditor.querySelector('#' + this.CSS.colorPickerId);\n                if (colorPickerWrapper.children.length === 0) {\n                    this.customColorPicker = iro.ColorPicker(colorPickerWrapper, {\n                        width: 170,\n                        height: 170,\n                        layoutDirection: 'horizontal',\n                    });\n                    this.customColorPicker.on(['color:init'], (color: iro.Color) => this.changeColor(color, true, currentColor));\n                    this.customColorPicker.on(['input:end'], (color: iro.Color) => this.changeColor(color, false));\n                }\n                this.currentSelection = this.getSelection();\n                setTimeout(() => {\n                    this.isColorSelectionOpen = true;\n                }, 400);\n            } else {\n                this.isColorSelectionOpen = false;\n                closeDropdown(colorSelection);\n            }\n        }\n    }\n\n    getCurrentColorApplied(element: Element | null): string | null {\n        if (element && element.className && element.classList.contains('ce-paragraph') && element.children.length === 1) {\n            element = element.firstElementChild;\n        }\n        if (element && this.style?.property) {\n            return window.getComputedStyle(element, null).getPropertyValue(this.style.property);\n        }\n        return null;\n    }\n\n    isColorSelectionFocusedOut($event: any) {\n        let colorSelection = this.parentEditor?.querySelectorAll('.' + this.CSS.colorSelectionModifier)[0];\n        if (this.isColorSelectionOpen && colorSelection) {\n            let element = $event.target;\n            let colorSelectionCss = this.colorSelectionCss;\n            while (element) {\n                if (element.classList.contains(this.colorSelectionCss['container' as keyof typeof colorSelectionCss])) {\n                    $event.preventDefault();\n                    return false;\n                }\n                element = element.parentElement;\n            }\n            document.removeEventListener('click', ($event) => this.isColorSelectionFocusedOut($event));\n            this.isColorSelectionOpen = false;\n            colorSelection.classList.add('action-hidden');\n            this.api.toolbar.close();\n            return true;\n        }\n        $event.preventDefault();\n        return false;\n    }\n\n    checkDefaultColors() {\n        let selection = this.getSelection();\n        let currentColor: any = null;\n        let colorSelectionCss = this.colorSelectionCss;\n        if (selection?.anchorNode && selection.anchorNode.parentElement) {\n            currentColor = this.getCurrentColorApplied(selection.anchorNode.parentElement)\n        }\n        \n        if (!this.parentEditor) {\n            return;\n        }\n        \n        const colorSelection = this.parentEditor.querySelectorAll('.' + this.CSS.colorSelectionModifier)[0];\n        if (!colorSelection) {\n            return;\n        }\n        \n        // Récupérer toutes les lignes de couleurs (en excluant les titres)\n        const colorRows = Array.from(colorSelection.querySelectorAll('.' + this.colorSelectionCss['row' as keyof typeof colorSelectionCss]))\n            .filter(row => {\n                // Exclure les lignes qui contiennent des titres\n                const hasTitle = row.querySelector('.ce-inline-actions--color__recent-title, .ce-inline-actions--color__default-title');\n                return !hasTitle;\n            });\n        \n        // Parcourir les couleurs par défaut et les lignes correspondantes\n        this.colors.forEach((colorRow, rowIndex) => {\n            const domRow = colorRows[rowIndex];\n            if (!domRow) {\n                return; // Skip if row doesn't exist\n            }\n            \n            colorRow.forEach((color, columnIndex) => {\n                const colorElements = domRow.querySelectorAll('.' + this.colorSelectionCss['item' as keyof typeof colorSelectionCss]);\n                const colorElement = colorElements[columnIndex];\n                \n                if (colorElement) {\n                    if (color === currentColor) {\n                        colorElement.classList.add(this.colorSelectionCss['item' as keyof typeof colorSelectionCss] + '--active');\n                    } else {\n                        colorElement.classList.remove(this.colorSelectionCss['item' as keyof typeof colorSelectionCss] + '--active');\n                    }\n                }\n            });\n        });\n        \n        // Gérer les couleurs récentes si elles existent\n        this.checkRecentColors(currentColor);\n    }\n    \n    private checkRecentColors(currentColor: string | null) {\n        if (!this.parentEditor || !currentColor) {\n            return;\n        }\n        \n        const colorSelection = this.parentEditor.querySelectorAll('.' + this.CSS.colorSelectionModifier)[0];\n        if (!colorSelection) {\n            return;\n        }\n        \n        let colorSelectionCss = this.colorSelectionCss;\n        \n        // Trouver la ligne des couleurs récentes\n        const recentTitle = colorSelection.querySelector('.ce-inline-actions--color__recent-title');\n        if (!recentTitle) {\n            return; // Pas de couleurs récentes\n        }\n        \n        const recentRow = recentTitle.nextElementSibling;\n        if (!recentRow || !recentRow.classList.contains(this.colorSelectionCss['row' as keyof typeof colorSelectionCss])) {\n            return;\n        }\n        \n        // Parcourir les couleurs récentes\n        const recentColorElements = recentRow.querySelectorAll('.' + this.colorSelectionCss['item' as keyof typeof colorSelectionCss]);\n        recentColorElements.forEach((colorElement) => {\n            const style = colorElement.getAttribute('style');\n            if (style && style.includes('background-color:')) {\n                const colorValue = style.match(/background-color:\\s*([^;]+)/)?.[1];\n                if (colorValue === currentColor) {\n                    colorElement.classList.add(this.colorSelectionCss['item' as keyof typeof colorSelectionCss] + '--active');\n                } else {\n                    colorElement.classList.remove(this.colorSelectionCss['item' as keyof typeof colorSelectionCss] + '--active');\n                }\n            }\n        });\n    }\n\n    async openCustomColorPicker(event: MouseEvent) {\n        let colorSelectionCss = this.colorSelectionCss;\n        let customColorPicker = (<HTMLDivElement>event.target).querySelectorAll('.' + this.colorSelectionCss['colorPickerContainer' as keyof typeof colorSelectionCss])[0];\n        if (customColorPicker) {\n            if (customColorPicker.classList.contains(this.colorSelectionCss['colorPickerContainer' as keyof typeof colorSelectionCss] + '--active')) {\n                customColorPicker.classList.remove(this.colorSelectionCss['colorPickerContainer' as keyof typeof colorSelectionCss] + '--active');\n            } else {\n                customColorPicker.classList.add(this.colorSelectionCss['colorPickerContainer' as keyof typeof colorSelectionCss] + '--active');\n            }\n        }\n        if ((<HTMLElement>event.target).tagName.toLowerCase() === 'div') {\n            await this.resetUserSelection();\n        }\n    }\n\n    changeColor(color: iro.Color, isInit: boolean, initColor: string = '') {\n        let colorSelectionModifier = this.parentEditor?.querySelector('.' + this.CSS.colorSelectionModifier);\n        if (colorSelectionModifier) {\n            let hexInput = <HTMLInputElement>colorSelectionModifier.querySelector('.hex input');\n            let rgbInput1 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.rgb input')[0];\n            let rgbInput2 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.rgb input')[1];\n            let rgbInput3 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.rgb input')[2];\n            /*\n            let hslInput1 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.hsl input')[0];\n            let hslInput2 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.hsl input')[1];\n            let hslInput3 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.hsl input')[2];\n            */\n            if (isInit && this.customColorPicker) {\n                if (initColor.indexOf('rgba') > -1) {\n                    initColor = initColor.replace('rgba(', '').replace(')', '').replace(' ', '');\n                    let rgbInitColor = initColor.split(',');\n                    this.customColorPicker.color.red = parseInt(rgbInitColor[0]);\n                    this.customColorPicker.color.green = parseInt(rgbInitColor[1]);\n                    this.customColorPicker.color.blue = parseInt(rgbInitColor[2]);\n                    hexInput.value = this.rgbToHex(parseInt(rgbInitColor[0]), parseInt(rgbInitColor[1]), parseInt(rgbInitColor[2]));\n                    rgbInput1.value = rgbInitColor[0];\n                    rgbInput2.value = rgbInitColor[1];\n                    rgbInput3.value = rgbInitColor[2];\n                } else {\n                    initColor = initColor.replace('rgb(', '').replace(')', '').replace(' ', '');\n                    let rgbInitColor = initColor.split(',');\n                    this.customColorPicker.color.red = parseInt(rgbInitColor[0]);\n                    this.customColorPicker.color.green = parseInt(rgbInitColor[1]);\n                    this.customColorPicker.color.blue = parseInt(rgbInitColor[2]);\n                    hexInput.value = this.rgbToHex(parseInt(rgbInitColor[0]), parseInt(rgbInitColor[1]), parseInt(rgbInitColor[2]));\n                    rgbInput1.value = rgbInitColor[0];\n                    rgbInput2.value = rgbInitColor[1];\n                    rgbInput3.value = rgbInitColor[2];\n                }\n            } else {\n                hexInput.value = color.hexString;\n                rgbInput1.value = color.rgb.r.toString();\n                rgbInput2.value = color.rgb.g.toString();\n                rgbInput3.value = color.rgb.b.toString();\n                this.checkColorInput(null, ColorType.RGB);\n            }\n            /*\n            hslInput1.value = color.hsl.h.toString();\n            hslInput2.value = color.hsl.s + '%';\n            hslInput3.value = color.hsl.l + '%';\n            */\n        }\n    }\n\n    changeColorInput(event: KeyboardEvent, colorType: ColorType) {\n        if (colorType === ColorType.HEX) {\n            let hexRegex = /[0-9A-Fa-f#]/;\n            let hexInput = <HTMLInputElement>(\n                this.parentEditor?.querySelector('.' + this.CSS.colorSelectionModifier)?.querySelector('.hex input')\n            );\n            \n            // Permettre les raccourcis de copier/coller avant toute autre vérification\n            if (this.isAllowedEvent(event)) {\n                return; // Ne pas empêcher les raccourcis\n            }\n            \n            if (GLOBAL_KEY_CODES.indexOf(event.code) > -1 || hexRegex.test(event.key)) {\n                if (hexInput.value.length > 0 && event.key === '#') {\n                    event.preventDefault();\n                }\n                if (hexInput.value.length === 5 && hexInput.value[0] !== '#' && hexRegex.test(event.key)) {\n                    hexInput.value = '#' + hexInput.value + event.key;\n                    return;\n                }\n            } else {\n                event.preventDefault();\n            }\n        } else if (colorType === ColorType.RGB) {\n            let rgbRegex = /[0-9]/;\n            let selectedInput = <HTMLInputElement>event.target;\n            \n            // Permettre les raccourcis de copier/coller avant toute autre vérification\n            if (this.isAllowedEvent(event)) {\n                return; // Ne pas empêcher les raccourcis\n            }\n            \n            if (\n                (GLOBAL_KEY_CODES.indexOf(event.code) === -1 &&\n                (selectedInput.value.length === 3 || event.key.length !== 1 || !rgbRegex.test(event.key)))\n            ) {\n                event.preventDefault();\n            }\n            if (parseInt(selectedInput.value) > 255) {\n                selectedInput.value = '255';\n            }\n        } else {\n            let maxInputLength = 3;\n            let hslRegex = /[0-9]/;\n            let selectedInput = <HTMLInputElement>event.target;\n            \n            // Permettre les raccourcis de copier/coller avant toute autre vérification\n            if (this.isAllowedEvent(event)) {\n                return; // Ne pas empêcher les raccourcis\n            }\n            \n            if (selectedInput.parentElement) {\n                let selectedInputPosition = Array.from(selectedInput.parentElement.children).indexOf(selectedInput);\n                if (selectedInputPosition > 0) {\n                    hslRegex = /[0-9%]/;\n                    maxInputLength = 4;\n                }\n                if (\n                    (GLOBAL_KEY_CODES.indexOf(event.code) === -1 &&\n                    (selectedInput.value.length === maxInputLength || event.key.length !== 1 || !hslRegex.test(event.key)))\n                ) {\n                    event.preventDefault();\n                }\n                if (selectedInputPosition === 0 && parseInt(selectedInput.value) > 360) {\n                    selectedInput.value = '360';\n                } else if (selectedInputPosition > 0 && parseInt(selectedInput.value.replace('%', '')) > 100) {\n                    selectedInput.value = '100';\n                }\n            }\n        }\n    }\n\n    async checkColorInput(event: KeyboardEvent | null, colorType: ColorType) {\n        if (event && this.isAllowedEvent(event) && event.key !== 'v') {\n            return;\n        }\n        let colorSelectionModifier = this.parentEditor?.querySelector('.' + this.CSS.colorSelectionModifier);\n        let focusedInput = null;\n        if (colorSelectionModifier && this.customColorPicker) {\n            if (colorType === ColorType.HEX) {\n                let hexInput = <HTMLInputElement>colorSelectionModifier?.querySelector('.hex input');\n                focusedInput = <HTMLInputElement>colorSelectionModifier?.querySelector('.hex input:focus');\n                if (hexInput.value.length === 7 && hexInput.value[0] === '#' && this.customColorPicker) {\n                    this.customColorPicker.color.hexString = hexInput.value;\n                } else {\n                    return;\n                }\n            } else if (colorType === ColorType.RGB) {\n                let rgbInput1 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.rgb input')[0];\n                let rgbInput2 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.rgb input')[1];\n                let rgbInput3 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.rgb input')[2];\n                focusedInput = <HTMLInputElement>colorSelectionModifier.querySelector('.rgb input:focus');\n                if (rgbInput1.value.length > 0 && rgbInput2.value.length > 0 && rgbInput3.value.length > 0) {\n                    this.customColorPicker.color.red = parseInt(rgbInput1.value);\n                    this.customColorPicker.color.green = parseInt(rgbInput2.value);\n                    this.customColorPicker.color.blue = parseInt(rgbInput3.value);\n                } else {\n                    return;\n                }\n            } else {\n                let hslInput1 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.hsl input')[0];\n                let hslInput2 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.hsl input')[1];\n                let hslInput3 = <HTMLInputElement>colorSelectionModifier.querySelectorAll('.hsl input')[2];\n                focusedInput = <HTMLInputElement>colorSelectionModifier.querySelector('.hsl input:focus');\n                if (hslInput1.value.length > 0 && hslInput2.value.replace('%', '').length > 0 && hslInput3.value.replace('%', '').length > 0) {\n                    this.customColorPicker.color.hue = parseInt(hslInput1.value);\n                    this.customColorPicker.color.saturation = parseInt(hslInput2.value.replace('%', ''));\n                    this.customColorPicker.color.value = parseInt(hslInput3.value.replace('%', ''));\n                } else {\n                    return;\n                }\n            }\n            let rgbColor =\n                'rgb(' +\n                this.customColorPicker.color.rgb.r +\n                ',' +\n                this.customColorPicker.color.rgb.g +\n                ',' +\n                this.customColorPicker.color.rgb.b +\n                ')';\n            this.applyColor(null, rgbColor, focusedInput);\n            await this.resetUserSelection();\n        }\n    }\n\n    createCustomColorPicker() {\n        let colorSelectionCss = this.colorSelectionCss;\n        let customColorPicker = document.createElement('div');\n        customColorPicker.className = '' + this.colorSelectionCss['colorPickerContainer' as keyof typeof colorSelectionCss];\n        let wrapper = document.createElement('div');\n        wrapper.id = this.CSS.colorPickerId;\n        customColorPicker.appendChild(wrapper);\n        \n        let container = document.createElement('div');\n        let select = document.createElement('select');\n        select.addEventListener('change', (event) => this.changeColorType(event));\n\n        let hexOption = document.createElement('option');\n        hexOption.value = 'hex';\n        hexOption.innerText = 'HEX';\n        let rgbOption = document.createElement('option');\n        rgbOption.value = 'rgb';\n        rgbOption.innerText = 'RGB';\n        let hslOption = document.createElement('option');\n        hslOption.value = 'hsl';\n        hslOption.innerText = 'HSL';\n\n        let hexContainer = document.createElement('div');\n        hexContainer.className = 'hex';\n        let hexInput = document.createElement('input');\n        hexInput.setAttribute('maxlength', '7');\n        hexInput.placeholder = '#23272b';\n        hexContainer.appendChild(hexInput);\n        hexInput.addEventListener('keydown', (event) => this.changeColorInput(event, ColorType.HEX));\n        hexInput.addEventListener('keyup', (event) => this.checkColorInput(event, ColorType.HEX));\n\n        let rgbContainer = document.createElement('div');\n        rgbContainer.className = 'rgb hidden';\n        let rgbInput1 = document.createElement('input');\n        rgbInput1.placeholder = '255';\n        rgbInput1.setAttribute('maxlength', '3');\n        let rgbInput2 = document.createElement('input');\n        rgbInput2.placeholder = '0';\n        rgbInput2.setAttribute('maxlength', '3');\n        let rgbInput3 = document.createElement('input');\n        rgbInput3.placeholder = '0';\n        rgbInput3.setAttribute('maxlength', '3');\n        rgbInput1.addEventListener('keydown', (event) => this.changeColorInput(event, ColorType.RGB));\n        rgbInput2.addEventListener('keydown', (event) => this.changeColorInput(event, ColorType.RGB));\n        rgbInput3.addEventListener('keydown', (event) => this.changeColorInput(event, ColorType.RGB));\n        rgbInput1.addEventListener('keyup', (event) => this.checkColorInput(event, ColorType.RGB));\n        rgbInput2.addEventListener('keyup', (event) => this.checkColorInput(event, ColorType.RGB));\n        rgbInput3.addEventListener('keyup', (event) => this.checkColorInput(event, ColorType.RGB));\n        rgbContainer.appendChild(rgbInput1);\n        rgbContainer.appendChild(rgbInput2);\n        rgbContainer.appendChild(rgbInput3);\n\n        let hslContainer = document.createElement('div');\n        hslContainer.className = 'hsl hidden';\n        let hslInput1 = document.createElement('input');\n        hslInput1.placeholder = '0';\n        let hslInput2 = document.createElement('input');\n        hslInput2.placeholder = '100%';\n        let hslInput3 = document.createElement('input');\n        hslInput3.placeholder = '50%';\n        hslInput1.addEventListener('keydown', (event) => this.changeColorInput(event, ColorType.HSL));\n        hslInput2.addEventListener('keydown', (event) => this.changeColorInput(event, ColorType.HSL));\n        hslInput3.addEventListener('keydown', (event) => this.changeColorInput(event, ColorType.HSL));\n        hslInput1.addEventListener('keyup', (event) => this.checkColorInput(event, ColorType.HSL));\n        hslInput2.addEventListener('keyup', (event) => this.checkColorInput(event, ColorType.HSL));\n        hslInput3.addEventListener('keyup', (event) => this.checkColorInput(event, ColorType.HSL));\n        hslContainer.appendChild(hslInput1);\n        hslContainer.appendChild(hslInput2);\n        hslContainer.appendChild(hslInput3);\n\n        select.appendChild(hexOption);\n        select.appendChild(rgbOption);\n        //select.appendChild(hslOption);\n        container.appendChild(select);\n\n        container.appendChild(hexContainer);\n        container.appendChild(rgbContainer);\n        //container.appendChild(hslContainer);\n\n        customColorPicker.appendChild(container);\n\n        return customColorPicker;\n    }\n\n    changeColorType(event: Event) {\n        let parent = (<HTMLSelectElement>event.target).parentElement;\n        if (parent) {\n            let children = parent.getElementsByTagName('div');\n            for (var i = 0; i < children.length; ++i) {\n                if (children[i].classList.contains((<HTMLSelectElement>event.target).value)) {\n                    if (children[i].classList.contains('hidden')) {\n                        children[i].classList.remove('hidden');\n                    }\n                } else {\n                    if (!children[i].classList.contains('hidden')) {\n                        children[i].classList.add('hidden');\n                    }\n                }\n            }\n        }\n    }\n\n    private rgbToHex(red: number, green: number, blue: number) {\n        return '#' + this.colorToHex(red) + this.colorToHex(green) + this.colorToHex(blue);\n    }\n\n    private colorToHex(color: number) {\n        var hexadecimal = color.toString(16);\n        return hexadecimal.length == 1 ? '0' + hexadecimal : hexadecimal;\n    }\n\n    private isAllowedEvent(event: KeyboardEvent): boolean {\n        const allowedKeyCodes: string[] = ['a', 'c', 'v', 'x'];\n        // Support pour macOS (metaKey) et Windows/Linux (ctrlKey)\n        if ((event.ctrlKey || event.metaKey) && (allowedKeyCodes.includes(event.key))) {\n            return true;\n        }\n        return false;\n    }\n}","import { Injectable } from '@angular/core';\n\n@Injectable({\n    providedIn: 'root'\n})\nexport class RecentColorsService {\n    private readonly STORAGE_KEY = 'wizi-editor-recent-colors';\n    private readonly MAX_RECENT_COLORS = 10;\n\n    private recentColors: string[] = [];\n\n    constructor() {\n        this.loadRecentColors();\n    }\n\n    /**\n     * Ajoute une couleur à la liste des couleurs récentes\n     * @param color La couleur à ajouter (format hex, rgb, etc.)\n     */\n    addRecentColor(color: string): void {\n        if (!color || color.trim() === '') {\n            return;\n        }\n\n        // Normaliser la couleur (convertir en format cohérent)\n        const normalizedColor = this.normalizeColor(color);\n        \n        // Retirer la couleur si elle existe déjà\n        this.recentColors = this.recentColors.filter(c => this.normalizeColor(c) !== normalizedColor);\n        \n        // Ajouter la nouvelle couleur au début\n        this.recentColors.unshift(normalizedColor);\n        \n        // Limiter à MAX_RECENT_COLORS\n        if (this.recentColors.length > this.MAX_RECENT_COLORS) {\n            this.recentColors = this.recentColors.slice(0, this.MAX_RECENT_COLORS);\n        }\n        \n        this.saveRecentColors();\n    }\n\n    /**\n     * Récupère la liste des couleurs récentes\n     * @returns Array des couleurs récentes\n     */\n    getRecentColors(): string[] {\n        return [...this.recentColors];\n    }\n\n    /**\n     * Efface toutes les couleurs récentes\n     */\n    clearRecentColors(): void {\n        this.recentColors = [];\n        this.saveRecentColors();\n    }\n\n    /**\n     * Normalise une couleur pour assurer la cohérence\n     * @param color La couleur à normaliser\n     * @returns La couleur normalisée\n     */\n    private normalizeColor(color: string): string {\n        // Supprimer les espaces\n        let normalized = color.trim();\n        \n        // Convertir les couleurs hex en rgb si nécessaire\n        if (normalized.startsWith('#')) {\n            normalized = this.hexToRgb(normalized);\n        }\n        \n        return normalized;\n    }\n\n    /**\n     * Convertit une couleur hex en rgb\n     * @param hex La couleur hex (ex: #ff0000)\n     * @returns La couleur en format rgb\n     */\n    private hexToRgb(hex: string): string {\n        const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n        if (result) {\n            const r = parseInt(result[1], 16);\n            const g = parseInt(result[2], 16);\n            const b = parseInt(result[3], 16);\n            return `rgb(${r}, ${g}, ${b})`;\n        }\n        return hex; // Retourner la couleur originale si la conversion échoue\n    }\n\n    /**\n     * Charge les couleurs récentes depuis le localStorage\n     */\n    private loadRecentColors(): void {\n        try {\n            const stored = localStorage.getItem(this.STORAGE_KEY);\n            if (stored) {\n                this.recentColors = JSON.parse(stored);\n            }\n        } catch (error) {\n            console.warn('Erreur lors du chargement des couleurs récentes:', error);\n            this.recentColors = [];\n        }\n    }\n\n    /**\n     * Sauvegarde les couleurs récentes dans le localStorage\n     */\n    private saveRecentColors(): void {\n        try {\n            localStorage.setItem(this.STORAGE_KEY, JSON.stringify(this.recentColors));\n        } catch (error) {\n            console.warn('Erreur lors de la sauvegarde des couleurs récentes:', error);\n        }\n    }\n} ","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus, StyleObject } from '../editorjs-tool.component';\nimport { editorJSI18nDictionnary } from '../../services/editorjs-translation.service';\nimport { ColorTool } from './tool-type/color-tool.component';\nimport { RecentColorsService } from '../../services/recent-colors.service';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Text background coloring tool for EditorJS\n * Allows applying background colors to selected text or entire blocks\n */\n// @dynamic\nexport class TextBackgroundColorTool extends ColorTool implements InlineTool {\n    public static title = 'Background Color';\n\n    // Tool configuration\n    private readonly commandName: string = 'textbackgroundcolor';\n    override tag = 'SPAN';\n    override preventSelectionReset = true;\n\n    // CSS configuration\n    override CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--textBackgroundColor',\n        colorIndicatorModifier: 'ce-inline-tool--textBackgroundColor__colorIndicator',\n        colorSelectionModifier: 'ce-inline-actions--backgroundColor',\n        colorPickerId: 'colorPicker-textBackgroundColor',\n        removeBackgroundColorClass: 'ce-inline-tool--textBackgroundColor__remove',\n    };\n\n    // Style configuration\n    override style: StyleObject = {\n        property: 'background-color',\n        value: '$1',\n        default: 'transparent',\n        input: '',\n    };\n\n    // Modification configuration\n    override modifies = {\n        tag: false,\n        style: true,\n        class: false,\n        attribute: false,\n    };\n\n    // DOM elements\n    override nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private recentColorsService: RecentColorsService;\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        if (this.nodes.button) {\n            this.nodes.button.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n        }\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any}) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Initialize services\n        this.recentColorsService = new RecentColorsService();\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.createButton();\n        this.createColorIndicator();\n        \n        // Ensure the button is never null\n        if (!this.nodes.button) {\n            this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        }\n        \n        return this.nodes.button;\n    }\n\n    /**\n     * Creates the main tool button\n     */\n    private createButton(): void {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n        \n        this.nodes.button.addEventListener('click', () => this.openColorPicker());\n    }\n\n    /**\n     * Creates the color indicator and adds it to the button\n     */\n    private createColorIndicator(): void {\n        this.colorIndicator = document.createElement('span');\n        this.colorIndicator.classList.add(this.CSS.colorIndicatorModifier);\n        \n        const selection = this.getSelection();\n        if (selection?.anchorNode?.parentElement) {\n            const currentColor = this.getCurrentColorApplied(selection.anchorNode.parentElement);\n            if (currentColor) {\n                this.colorIndicator.setAttribute('style', `background-color: ${currentColor}`);\n            }\n        }\n        \n        // Ensure the button exists before adding the indicator\n        if (this.nodes.button) {\n            this.nodes.button.append(this.colorIndicator);\n        }\n    }\n\n    /**\n     * Creates the color selection panel\n     */\n    renderActions(): HTMLElement {\n        this.createColorSelectionContainer();\n        this.addDefaultColors();\n        this.addRecentColors();\n        this.addRemoveColorOption();\n        this.addCustomColorPicker();\n        this.setupFocusHandling();\n        \n        // Ensure colorSelection is never null\n        if (!this.colorSelection) {\n            this.colorSelection = document.createElement('div');\n        }\n        \n        return this.colorSelection;\n    }\n\n    /**\n     * Creates the main color selection container\n     */\n    private createColorSelectionContainer(): void {\n        this.colorSelection = document.createElement('div');\n        const colorSelectionCss = this.colorSelectionCss;\n        \n        if (this.colorSelection) {\n            this.colorSelection.className = `${colorSelectionCss['wrapper' as keyof typeof colorSelectionCss]} action-hidden ${this.CSS.colorSelectionModifier}`;\n            this.colorSelection.setAttribute('tabindex', '1');\n        }\n    }\n\n    /**\n     * Adds default colors to the panel\n     */\n    private addDefaultColors(): void {\n        if (!this.colorSelection) return;\n        \n        this.colors.forEach((colorRow) => {\n            const row = document.createElement('div');\n            row.className = this.colorSelectionCss['row' as keyof typeof this.colorSelectionCss];\n            \n            colorRow.forEach((color) => {\n                if (color && color !== '') {\n                    const colorElement = this.createColorElement(color);\n                    row.appendChild(colorElement);\n                }\n            });\n            \n            this.colorSelection.appendChild(row);\n        });\n    }\n\n    /**\n     * Adds recent colors to the panel\n     */\n    private addRecentColors(): void {\n        if (!this.colorSelection) return;\n        \n        const recentColors = this.recentColorsService.getRecentColors();\n        if (recentColors.length === 0) return;\n\n        const toolsDictionnary = this.getToolsDictionary();\n        \n        // Title for recent colors\n        const recentTitle = document.createElement('div');\n        recentTitle.className = 'ce-inline-actions--color__recent-title';\n        recentTitle.textContent = (toolsDictionnary?.['textBackgroundColorRecent'] as string) || 'Couleurs récentes';\n        this.colorSelection.appendChild(recentTitle);\n\n        // Recent colors row\n        const recentRow = document.createElement('div');\n        recentRow.className = this.colorSelectionCss['row' as keyof typeof this.colorSelectionCss];\n\n        recentColors.forEach((color) => {\n            if (color && color !== '') {\n                const colorElement = this.createColorElement(color);\n                recentRow.appendChild(colorElement);\n            }\n        });\n        \n        this.colorSelection.appendChild(recentRow);\n    }\n\n    /**\n     * Creates a clickable color element\n     */\n    private createColorElement(color: string): HTMLDivElement {\n        const colorElement = document.createElement('div');\n        colorElement.className = this.colorSelectionCss['item' as keyof typeof this.colorSelectionCss];\n        colorElement.setAttribute('style', `background-color: ${color}`);\n        colorElement.addEventListener('click', ($event) => this.applyColor($event, color));\n        \n        return colorElement;\n    }\n\n    /**\n     * Adds the option to remove background color\n     */\n    private addRemoveColorOption(): void {\n        if (!this.colorSelection) return;\n        \n        const removeColorContainer = document.createElement('div');\n        const removeColorContainerIcon = document.createElement('span');\n        \n        removeColorContainer.classList.add(this.CSS.removeBackgroundColorClass);\n        removeColorContainer.addEventListener('click', ($event) => this.applyColor($event, 'rgba(0,0,0,0)'));\n        \n        const toolsDictionnary = this.getToolsDictionary();\n        if (toolsDictionnary) {\n            removeColorContainer.innerText = toolsDictionnary['textBackgroundColorNone'];\n        }\n        \n        removeColorContainer.appendChild(removeColorContainerIcon);\n        this.colorSelection.appendChild(removeColorContainer);\n    }\n\n    /**\n     * Adds the custom color picker\n     */\n    private addCustomColorPicker(): void {\n        if (!this.colorSelection) return;\n        \n        const customColor = document.createElement('div');\n        customColor.className = this.colorSelectionCss['container' as keyof typeof this.colorSelectionCss];\n        \n        const text = document.createElement('p');\n        const toolsDictionnary = this.getToolsDictionary();\n        if (toolsDictionnary) {\n            text.innerText = toolsDictionnary['textBackgroundColorCustomColor'];\n        }\n        \n        const button = document.createElement('div');\n        button.addEventListener('click', (event) => this.openCustomColorPicker(event));\n        \n        const container = this.createCustomColorPicker();\n        button.appendChild(container);\n\n        customColor.appendChild(text);\n        customColor.appendChild(button);\n        this.colorSelection.appendChild(customColor);\n    }\n\n    /**\n     * Configures focus handling for the panel\n     */\n    private setupFocusHandling(): void {\n        if (!this.colorSelection) return;\n        \n        this.colorSelection.addEventListener('click', (event: MouseEvent) => {\n            if ((event.target as HTMLElement).tagName?.toLowerCase() === 'div') {\n                this.colorSelection?.focus();\n            }\n        });\n    }\n\n    // ============================================================================\n    // COLOR APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies a background color to selected text or selected blocks\n     */\n    async applyColor($event: MouseEvent, color: string, inputToFocus: HTMLInputElement | null = null): Promise<void> {\n        $event?.preventDefault();\n        \n        this.updateColorIndicator(color);\n        this.style.input = color;\n\n        if (color && color.trim() !== '') {\n            this.recentColorsService.addRecentColor(color);\n            await this.resetUserSelection();\n            \n            // Check if there are selected blocks first\n            const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n            \n            if (selectedBlocks.length > 0) {\n                this.applyBackgroundColorToSelectedBlocks(selectedBlocks, color);\n            } else {\n                // Use normal surround logic for single selection\n                await this.surround(null, true);\n            }\n        } else {\n            await this.resetUserSelection();\n            await this.removeBackgroundColorFromAllSelectedBlocks();\n        }\n\n        this.checkDefaultColors();\n        if (this.currentSelection) {\n            this.checkState(this.currentSelection);\n        }\n\n        this.focusAfterColorApplication(inputToFocus);\n    }\n\n    /**\n     * Updates the color indicator in the button\n     */\n    private updateColorIndicator(color: string): void {\n        if (!this.nodes.button) return;\n        \n        const colorIndicator = this.nodes.button.querySelectorAll(`.${this.CSS.colorIndicatorModifier}`)[0] as HTMLElement;\n        \n        if (color && color.trim() !== '' && color !== 'rgba(0,0,0,0)') {\n            if (colorIndicator) {\n                colorIndicator.setAttribute('style', `background-color: ${color}`);\n            }\n        } else {\n            if (colorIndicator) {\n                colorIndicator.removeAttribute('style');\n            }\n        }\n    }\n\n    /**\n     * Handles focus after color application\n     */\n    private focusAfterColorApplication(inputToFocus: HTMLInputElement | null): void {\n        if (inputToFocus) {\n            inputToFocus.focus();\n        } else {\n            const selection = this.getSelection();\n            if (selection?.anchorNode?.parentElement) {\n                const paragraphElement = selection.anchorNode.parentElement.closest('.ce-paragraph') as HTMLElement;\n                if (paragraphElement) {\n                    paragraphElement.focus();\n                }\n            }\n        }\n    }\n\n    /**\n     * Applies background color using the surround method\n     */\n    async surround(range: Range | null, applyColor: boolean = false) {\n        \n        if (applyColor) {\n            const selection = this.getSelection();\n            if (!selection || selection.rangeCount === 0) {\n                return;\n            }\n\n            let range = selection.getRangeAt(0);\n            \n            // If current selection is collapsed but we have an original selection, use it\n            const originalSelection = this.selectedBlocksService.getOriginalSelection();\n            if (range.collapsed && originalSelection && !originalSelection.collapsed) {\n                range = originalSelection;\n            }\n            \n            // If there's a text selection, apply background color only to the selected text\n            if (!range.collapsed && range.toString().trim()) {\n                \n                try {\n                    // Try surroundContents first\n                    const span = document.createElement(this.tag);\n                    span.style.backgroundColor = this.style.input || '#000000';\n                    span.style.whiteSpace = 'pre-wrap'; // Preserve spaces\n                    range.surroundContents(span);\n                    \n                    // Clear original selection after successful application\n                    this.selectedBlocksService.clearOriginalSelection();\n                    return;\n                } catch (error) {\n                    message : String(error);\n                    \n                    // Manual approach for complex selections\n                    try {\n                        const selectedText = range.toString();\n                        \n                        const span = document.createElement(this.tag);\n                        span.style.backgroundColor = this.style.input || '#000000';\n                        span.style.whiteSpace = 'pre-wrap'; // Preserve spaces\n                        span.textContent = selectedText;\n                        \n                        range.deleteContents();\n                        range.insertNode(span);\n                        \n                        // Clear original selection after successful application\n                        this.selectedBlocksService.clearOriginalSelection();\n                        return;\n                    } catch (manualError) {\n                        // Continue to block-level application\n                    }\n                }\n            }\n\n            const commonAncestor = range.commonAncestorContainer;\n\n            // If commonAncestor is a Text node, take its parent\n            const element = commonAncestor.nodeType === Node.TEXT_NODE \n                ? commonAncestor.parentElement \n                : commonAncestor as HTMLElement;\n\n            if (!element) {\n                return;\n            }\n            \n            this.addBackgroundColorToTextElement(element, this.style.input || '#000000');\n        } else {\n            // When applyColor is false, capture the original selection before it changes\n            const selection = this.getSelection();\n            if (selection && selection.rangeCount > 0) {\n                const originalRange = selection.getRangeAt(0).cloneRange();\n                // Only store if it's a real text selection, not a toolbar element\n                if (originalRange.toString().trim() && \n                    originalRange.commonAncestorContainer.nodeType === Node.ELEMENT_NODE && \n                    !(originalRange.commonAncestorContainer as Element).closest('.ce-inline-actions')) {\n                    this.selectedBlocksService.storeOriginalSelection(originalRange);\n                }\n            }\n            \n            // Don't close the toolbar, just return without doing anything\n            return;\n        }\n    }\n\n    /**\n     * Applies background color to all selected blocks\n     */\n    private applyBackgroundColorToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>, color: string): void {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyBackgroundColorToBlock(blockId, color);\n        });\n    }\n\n    /**\n     * Applies background color to a specific block\n     */\n    private applyBackgroundColorToBlock(blockId: string, color: string): void {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applyBackgroundColorToTextElement(textElement, color);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies background color to a text element\n     */\n    private applyBackgroundColorToTextElement(textElement: HTMLElement, color: string): void {\n        if (color && color.trim() !== '' && color !== 'rgba(0,0,0,0)') {\n            this.removeExistingBackgroundColorSpans(textElement); // Remove existing spans\n            this.addBackgroundColorToTextElement(textElement, color);\n        } else {\n            this.removeBackgroundColorFromTextElement(textElement);\n        }\n    }\n\n    /**\n     * Finds the deepest block element in the hierarchy\n     */\n    private findDeepestBlockElement(element: HTMLElement): HTMLElement {\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV', 'BLOCKQUOTE'];\n        let deepest: HTMLElement = element;\n        let foundDeeper = false;\n        Array.from(element.children).forEach((child) => {\n            const childEl = child as HTMLElement;\n            if (blockElements.includes(childEl.tagName)) {\n                const candidate = this.findDeepestBlockElement(childEl);\n                if (candidate !== childEl) {\n                    foundDeeper = true;\n                    deepest = candidate;\n                } else if (!foundDeeper) {\n                    deepest = childEl;\n                }\n            }\n        });\n        return deepest;\n    }\n\n    /**\n     * Adds a background color to a text element\n     */\n    private addBackgroundColorToTextElement(textElement: HTMLElement, color: string): void {\n        // Find the deepest block element\n        const target = this.findDeepestBlockElement(textElement);\n        \n        // List of block elements that should not be wrapped by a span\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV', 'BLOCKQUOTE'];\n        \n        // Check if the target has block elements as children\n        const hasBlockElements = Array.from(target.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            this.applyBackgroundColorToBlockElements(target, color);\n        } else {\n            // Remove existing background color spans before applying new one\n            this.removeExistingBackgroundColorSpans(target);\n            \n            const span = document.createElement(this.tag);\n            span.style.backgroundColor = color;\n            span.append(...Array.from(target.childNodes));\n            target.replaceChildren(span);\n        }\n    }\n\n    /**\n     * Applies background color to block elements by wrapping only the text\n     */\n    private applyBackgroundColorToBlockElements(textElement: HTMLElement, color: string): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its text content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV', 'BLOCKQUOTE'].includes(childElement.tagName)) {\n                this.applyBackgroundColorToBlockContent(childElement, color);\n            } else {\n                // For other elements, apply background color normally\n                const span = document.createElement(this.tag);\n                span.style.backgroundColor = color;\n                span.append(...Array.from(childElement.childNodes));\n                childElement.replaceChildren(span);\n            }\n        });\n    }\n\n    /**\n     * Applies background color to the content of a block element\n     */\n    private applyBackgroundColorToBlockContent(blockElement: HTMLElement, color: string): void {\n        // If it's a blockquote, apply background color to its text content without wrapping it in a span\n        if (blockElement.tagName === 'BLOCKQUOTE') {\n            this.applyBackgroundColorToBlockquoteContent(blockElement, color);\n            return;\n        }\n\n        // Remove existing background color spans before applying new one\n        this.removeExistingBackgroundColorSpans(blockElement);\n        \n        // Create a span with background color\n        const span = document.createElement(this.tag);\n        span.style.backgroundColor = color;\n        \n        // Move all child nodes into the span\n        span.append(...Array.from(blockElement.childNodes));\n        \n        // Replace the block element content with the span\n        blockElement.replaceChildren(span);\n    }\n\n    /**\n     * Applies background color to the content of a blockquote element without wrapping it in a span\n     */\n    private applyBackgroundColorToBlockquoteContent(blockquoteElement: HTMLElement, color: string): void {\n        // Apply background color directly to the blockquote element\n        blockquoteElement.style.backgroundColor = color;\n    }\n\n    /**\n     * Removes background color from a text element\n     */\n    private removeBackgroundColorFromTextElement(textElement: HTMLElement): void {\n        // Remove background colors from all spans with background-color styles\n        const spans = textElement.querySelectorAll('span[style*=\"background-color\"]');\n        \n        spans.forEach(span => {\n            const htmlSpan = span as HTMLElement;\n            \n            // Remove the background-color property from the style\n            htmlSpan.style.removeProperty('background-color');\n            \n            // If the span has no more style, remove it and move its content\n            if (!htmlSpan.getAttribute('style') || htmlSpan.getAttribute('style')?.trim() === '') {\n                const parent = htmlSpan.parentNode;\n                if (parent) {\n                    while (htmlSpan.firstChild) {\n                        parent.insertBefore(htmlSpan.firstChild, htmlSpan);\n                    }\n                    parent.removeChild(htmlSpan);\n                }\n            }\n        });\n        \n        // Check if there are background-color styles directly on the text element\n        if (textElement.style.backgroundColor) {\n            textElement.style.removeProperty('background-color');\n        }\n    }\n\n    /**\n     * Removes existing background color spans from an element\n     */\n    private removeExistingBackgroundColorSpans(element: HTMLElement): void {\n        element.querySelectorAll(this.tag).forEach((span) => {\n            const htmlSpan = span as HTMLElement;\n            if (htmlSpan.style.backgroundColor && !htmlSpan.style.color) {\n                // Only remove spans that have background-color but no color (pure background spans)\n                span.replaceWith(...Array.from(span.childNodes));\n            }\n        });\n    }\n\n    /**\n     * Applies background color to text element\n     */\n    async removeBackgroundColorFromSelection(): Promise<void> {\n        const selection = this.getSelection();\n        if (!selection || selection.rangeCount === 0) return;\n\n        const range = selection.getRangeAt(0);\n        const commonAncestor = range.commonAncestorContainer;\n\n        // If commonAncestor is a Text node, take its parent\n        const element = commonAncestor.nodeType === Node.TEXT_NODE \n            ? commonAncestor.parentElement \n            : commonAncestor as HTMLElement;\n\n        if (!element) return;\n\n        this.removeBackgroundColorFromTextElement(element);\n    }\n\n    /**\n     * Removes background color from all selected blocks\n     */\n    private async removeBackgroundColorFromAllSelectedBlocks(): Promise<void> {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        if (selectedBlocks.length > 0) {\n            selectedBlocks.forEach(({ blockId }) => {\n                this.removeBackgroundColorFromBlock(blockId);\n            });\n        } else {\n            // Removes background color from a specific block\n            await this.removeBackgroundColorFromSelection();\n        }\n    }\n\n    /**\n     * Removes background color from a specific block\n     */\n    private removeBackgroundColorFromBlock(blockId: string): void {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.removeBackgroundColorFromTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Gets the tools dictionary for translations\n     */\n    private getToolsDictionary(): any {\n        return editorJSI18nDictionnary?.messages?.tools || null;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        this.checkDefaultColors();\n        \n        const isActive = !!(\n            (selection?.anchorNode && this.hasStyle(selection.anchorNode as HTMLElement)) || \n            (selection?.focusNode && this.hasStyle(selection.focusNode as HTMLElement))\n        );\n        \n        this.state = isActive;\n        return isActive;\n    }\n\n    // ============================================================================\n    // PANEL MANAGEMENT METHODS\n    // ============================================================================\n\n    /**\n     * Shows the color selection panel\n     */\n    showActions(mark: HTMLElement) {\n        this.style.input = mark?.style?.backgroundColor || '#f5f1cc';\n\n        if (this.colorSelection) {\n            this.colorSelection.onchange = () => {\n                if (this.style.input) {\n                    mark.style.backgroundColor = this.style.input;\n                }\n            };\n            \n            this.colorSelection.hidden = false;\n        }\n    }\n\n    /**\n     * Hides the color selection panel\n     */\n    hideActions() {\n        const colorSelection = document.querySelectorAll(`.${this.CSS.colorSelectionModifier}`)[0] as HTMLElement;\n        this.isColorSelectionOpen = false;\n        \n        if (colorSelection && !colorSelection.classList.contains('action-hidden')) {\n            colorSelection.classList.add('action-hidden');\n        }\n    }\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus, StyleObject } from '../editorjs-tool.component';\nimport { editorJSI18nDictionnary } from '../../services/editorjs-translation.service';\nimport { ColorTool } from './tool-type/color-tool.component';\nimport { RecentColorsService } from '../../services/recent-colors.service';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Text coloring tool for EditorJS\n * Allows applying colors to selected text or entire blocks\n */\n// @dynamic\nexport class TextColorTool extends ColorTool implements InlineTool {\n    public static title = 'Text Color';\n\n    // Tool configuration\n    private readonly commandName: string = 'textcolor';\n    override tag = 'SPAN';\n    override preventSelectionReset = true;\n\n    // CSS configuration\n    override CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--textColor',\n        colorIndicatorModifier: 'ce-inline-tool--textColor__colorIndicator',\n        colorSelectionModifier: 'ce-inline-actions--textColor',\n        colorPickerId: 'colorPicker-textColor',\n        removeBackgroundColorClass: 'ce-inline-tool--textColor__remove',\n    };\n\n    // Style configuration\n    override style: StyleObject = {\n        property: 'color',\n        value: '$1',\n        default: 'initial',\n        input: '#f5f1cc',\n    };\n\n    // Modification configuration\n    override modifies = {\n        tag: false,\n        style: true,\n        class: false,\n        attribute: false,\n    };\n\n    // DOM elements\n    override nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private recentColorsService: RecentColorsService;\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        if (this.nodes.button) {\n            this.nodes.button.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n        }\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Initialize services\n        this.recentColorsService = new RecentColorsService();\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.createButton();\n        this.createColorIndicator();\n        \n        // Ensure the button is never null\n        if (!this.nodes.button) {\n            this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        }\n        \n        return this.nodes.button;\n    }\n\n    /**\n     * Creates the main tool button\n     */\n    private createButton(): void {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n        \n        this.nodes.button.addEventListener('click', () => this.openColorPicker());\n    }\n\n    /**\n     * Creates the color indicator and adds it to the button\n     */\n    private createColorIndicator(): void {\n        this.colorIndicator = document.createElement('span');\n        this.colorIndicator.classList.add(this.CSS.colorIndicatorModifier);\n        \n        const selection = this.getSelection();\n        if (selection?.anchorNode?.parentElement) {\n            const currentColor = this.getCurrentColorApplied(selection.anchorNode.parentElement);\n            if (currentColor) {\n                this.colorIndicator.setAttribute('style', `background-color: ${currentColor}`);\n            }\n        }\n        \n        // Ensure the button exists before adding the indicator\n        if (this.nodes.button) {\n            this.nodes.button.append(this.colorIndicator);\n        }\n    }\n\n    /**\n     * Creates the color selection panel\n     */\n    renderActions(): HTMLElement {\n        this.createColorSelectionContainer();\n        this.addDefaultColors();\n        this.addRecentColors();\n        this.addRemoveColorOption();\n        this.addCustomColorPicker();\n        this.setupFocusHandling();\n        \n        // Ensure colorSelection is never null\n        if (!this.colorSelection) {\n            this.colorSelection = document.createElement('div');\n        }\n        \n        return this.colorSelection;\n    }\n\n    /**\n     * Creates the main color selection container\n     */\n    private createColorSelectionContainer(): void {\n        this.colorSelection = document.createElement('div');\n        const colorSelectionCss = this.colorSelectionCss;\n        \n        if (this.colorSelection) {\n            this.colorSelection.className = `${colorSelectionCss['wrapper' as keyof typeof colorSelectionCss]} action-hidden ${this.CSS.colorSelectionModifier}`;\n            this.colorSelection.setAttribute('tabindex', '1');\n        }\n    }\n\n    /**\n     * Adds default colors to the panel\n     */\n    private addDefaultColors(): void {\n        if (!this.colorSelection) return;\n        \n        this.colors.forEach((colorRow) => {\n            const row = document.createElement('div');\n            row.className = this.colorSelectionCss['row' as keyof typeof this.colorSelectionCss];\n            \n            colorRow.forEach((color) => {\n                if (color && color !== '') {\n                    const colorElement = this.createColorElement(color);\n                    row.appendChild(colorElement);\n                }\n            });\n            \n            this.colorSelection.appendChild(row);\n        });\n    }\n\n    /**\n     * Adds recent colors to the panel\n     */\n    private addRecentColors(): void {\n        if (!this.colorSelection) return;\n        \n        const recentColors = this.recentColorsService.getRecentColors();\n        if (recentColors.length === 0) return;\n\n        const toolsDictionnary = this.getToolsDictionary();\n        \n        // Title for recent colors\n        const recentTitle = document.createElement('div');\n        recentTitle.className = 'ce-inline-actions--color__recent-title';\n        recentTitle.textContent = (toolsDictionnary?.['textColorRecent'] as string) || 'Couleurs récentes';\n        this.colorSelection.appendChild(recentTitle);\n\n        // Recent colors row\n        const recentRow = document.createElement('div');\n        recentRow.className = this.colorSelectionCss['row' as keyof typeof this.colorSelectionCss];\n\n        recentColors.forEach((color) => {\n            if (color && color !== '') {\n                const colorElement = this.createColorElement(color);\n                recentRow.appendChild(colorElement);\n            }\n        });\n        \n        this.colorSelection.appendChild(recentRow);\n    }\n\n    /**\n     * Creates a clickable color element\n     */\n    private createColorElement(color: string): HTMLDivElement {\n        const colorElement = document.createElement('div');\n        colorElement.className = this.colorSelectionCss['item' as keyof typeof this.colorSelectionCss];\n        colorElement.setAttribute('style', `background-color: ${color}`);\n        colorElement.addEventListener('click', ($event) => this.applyColor($event, color));\n        \n        return colorElement;\n    }\n\n    /**\n     * Adds the option to remove color\n     */\n    private addRemoveColorOption(): void {\n        if (!this.colorSelection) return;\n        \n        const removeColorContainer = document.createElement('div');\n        const removeColorContainerIcon = document.createElement('span');\n        \n        removeColorContainer.classList.add(this.CSS.removeBackgroundColorClass);\n        removeColorContainer.addEventListener('click', ($event) => this.applyColor($event, ''));\n        \n        const toolsDictionnary = this.getToolsDictionary();\n        if (toolsDictionnary) {\n            removeColorContainer.innerText = toolsDictionnary['textBackgroundColorNone'];\n        }\n        \n        removeColorContainer.appendChild(removeColorContainerIcon);\n        this.colorSelection.appendChild(removeColorContainer);\n    }\n\n    /**\n     * Adds the custom color picker\n     */\n    private addCustomColorPicker(): void {\n        if (!this.colorSelection) return;\n        \n        const customColor = document.createElement('div');\n        customColor.className = this.colorSelectionCss['container' as keyof typeof this.colorSelectionCss];\n        \n        const text = document.createElement('p');\n        const toolsDictionnary = this.getToolsDictionary();\n        if (toolsDictionnary) {\n            text.innerText = toolsDictionnary['textBackgroundColorCustomColor'];\n        }\n        \n        const button = document.createElement('div');\n        button.addEventListener('click', (event) => this.openCustomColorPicker(event));\n        \n        const container = this.createCustomColorPicker();\n        button.appendChild(container);\n\n        customColor.appendChild(text);\n        customColor.appendChild(button);\n        this.colorSelection.appendChild(customColor);\n    }\n\n    /**\n     * Configures focus handling for the panel\n     */\n    private setupFocusHandling(): void {\n        if (!this.colorSelection) return;\n        \n        this.colorSelection.addEventListener('click', (event: MouseEvent) => {\n            if ((event.target as HTMLElement).tagName?.toLowerCase() === 'div') {\n                this.colorSelection?.focus();\n            }\n        });\n    }\n\n    // ============================================================================\n    // COLOR APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies a color to selected text or selected blocks\n     */\n    async applyColor($event: MouseEvent, color: string, inputToFocus: HTMLInputElement | null = null): Promise<void> {\n        $event?.preventDefault();\n        \n        this.updateColorIndicator(color);\n        this.style.input = color;\n\n        if (color && color.trim() !== '') {\n            this.recentColorsService.addRecentColor(color);\n            await this.resetUserSelection();\n            \n            // Check if there are selected blocks first\n            const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n            \n            if (selectedBlocks.length > 0) {\n                this.applyColorToSelectedBlocks(selectedBlocks, color);\n            } else {\n                // Use normal surround logic for single selection\n                await this.surround(null, true);\n            }\n        } else {\n            await this.resetUserSelection();\n            await this.removeColorFromAllSelectedBlocks();\n        }\n\n        this.checkDefaultColors();\n        if (this.currentSelection) {\n            this.checkState(this.currentSelection);\n        }\n\n        this.focusAfterColorApplication(inputToFocus);\n    }\n\n    /**\n     * Updates the color indicator in the button\n     */\n    private updateColorIndicator(color: string): void {\n        if (!this.nodes.button) return;\n        \n        const colorIndicator = this.nodes.button.querySelectorAll(`.${this.CSS.colorIndicatorModifier}`)[0] as HTMLElement;\n        \n        if (color && color.trim() !== '') {\n            if (colorIndicator) {\n                colorIndicator.setAttribute('style', `background-color: ${color}`);\n            }\n        } else {\n            if (colorIndicator) {\n                colorIndicator.removeAttribute('style');\n            }\n        }\n    }\n\n    /**\n     * Handles focus after color application\n     */\n    private focusAfterColorApplication(inputToFocus: HTMLInputElement | null): void {\n        if (inputToFocus) {\n            inputToFocus.focus();\n        } else {\n            const selection = this.getSelection();\n            if (selection?.anchorNode?.parentElement) {\n                const paragraphElement = selection.anchorNode.parentElement.closest('.ce-paragraph') as HTMLElement;\n                if (paragraphElement) {\n                    paragraphElement.focus();\n                }\n            }\n        }\n    }\n\n    /**\n     * Applies color using the surround method\n     */\n    async surround(range: Range | null, applyColor: boolean = false) {\n        \n        if (applyColor) {\n            const selection = this.getSelection();\n            if (!selection || selection.rangeCount === 0) {\n                return;\n            }\n\n            let range = selection.getRangeAt(0);\n            \n            // If current selection is collapsed but we have an original selection, use it\n            const originalSelection = this.selectedBlocksService.getOriginalSelection();\n            if (range.collapsed && originalSelection && !originalSelection.collapsed) {\n                range = originalSelection;\n            }\n            \n            // If there's a text selection, apply color only to the selected text\n            if (!range.collapsed && range.toString().trim()) {\n                \n                try {\n                    // Try surroundContents first\n                    const span = document.createElement(this.tag);\n                    span.style.color = this.style.input || '#000000';\n                    span.style.whiteSpace = 'pre-wrap'; // Preserve spaces\n                    range.surroundContents(span);\n                    \n                    // Clear original selection after successful application\n                    this.selectedBlocksService.clearOriginalSelection();\n                    return;\n                } catch (error) {\n                   message : String(error);\n                    \n                    // Manual approach for complex selections\n                    try {\n                        const selectedText = range.toString();\n                        \n                        const span = document.createElement(this.tag);\n                        span.style.color = this.style.input || '#000000';\n                        span.style.whiteSpace = 'pre-wrap'; // Preserve spaces\n                        span.textContent = selectedText;\n                        \n                        range.deleteContents();\n                        range.insertNode(span);\n                        \n                        // Clear original selection after successful application\n                        this.selectedBlocksService.clearOriginalSelection();\n                        return;\n                    } catch (manualError) {\n                        // Continue to block-level application\n                    }\n                }\n            }\n\n            const commonAncestor = range.commonAncestorContainer;\n\n            // If commonAncestor is a Text node, take its parent\n            const element = commonAncestor.nodeType === Node.TEXT_NODE \n                ? commonAncestor.parentElement \n                : commonAncestor as HTMLElement;\n\n            if (!element) {\n                return;\n            }\n            \n            this.addColorToTextElement(element, this.style.input || '#000000');\n        } else {\n            // When applyColor is false, capture the original selection before it changes\n            const selection = this.getSelection();\n            if (selection && selection.rangeCount > 0) {\n                const originalRange = selection.getRangeAt(0).cloneRange();\n                // Only store if it's a real text selection, not a toolbar element\n                if (originalRange.toString().trim() && \n                    originalRange.commonAncestorContainer.nodeType === Node.ELEMENT_NODE && \n                    !(originalRange.commonAncestorContainer as Element).closest('.ce-inline-actions')) {\n                    this.selectedBlocksService.storeOriginalSelection(originalRange);\n                }\n            }\n            \n            // Don't close the toolbar, just return without doing anything\n            return;\n        }\n    }\n\n    /**\n     * Applies color to all selected blocks\n     */\n    private applyColorToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>, color: string): void {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyColorToBlock(blockId, color);\n        });\n    }\n\n    /**\n     * Applies color to a specific block\n     */\n    private applyColorToBlock(blockId: string, color: string): void {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applyColorToTextElement(textElement, color);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies color to a text element\n     */\n    private applyColorToTextElement(textElement: HTMLElement, color: string): void {\n        if (color && color.trim() !== '') {\n            this.removeExistingTextColorSpans(textElement); // Remove existing spans\n            this.addColorToTextElement(textElement, color);\n        } else {\n            this.removeColorFromTextElement(textElement);\n        }\n    }\n\n    /**\n     * Finds the deepest block element in the hierarchy\n     */\n    private findDeepestBlockElement(element: HTMLElement): HTMLElement {\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV', 'BLOCKQUOTE'];\n        let deepest: HTMLElement = element;\n        let foundDeeper = false;\n        Array.from(element.children).forEach((child) => {\n            const childEl = child as HTMLElement;\n            if (blockElements.includes(childEl.tagName)) {\n                const candidate = this.findDeepestBlockElement(childEl);\n                if (candidate !== childEl) {\n                    foundDeeper = true;\n                    deepest = candidate;\n                } else if (!foundDeeper) {\n                    deepest = childEl;\n                }\n            }\n        });\n        return deepest;\n    }\n\n    /**\n     * Adds a color to a text element\n     */\n    private addColorToTextElement(textElement: HTMLElement, color: string): void {\n        // Find the deepest block element\n        const target = this.findDeepestBlockElement(textElement);\n        \n        // List of block elements that should not be wrapped by a span\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV', 'BLOCKQUOTE'];\n        \n        // Check if the target has block elements as children\n        const hasBlockElements = Array.from(target.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            this.applyColorToBlockElements(target, color);\n        } else {\n            // Remove existing text color spans before applying new one\n            this.removeExistingTextColorSpans(target);\n            \n            const span = document.createElement(this.tag);\n            span.style.color = color;\n            span.append(...Array.from(target.childNodes));\n            target.replaceChildren(span);\n        }\n    }\n\n    /**\n     * Applies color to block elements by wrapping only the text\n     */\n    private applyColorToBlockElements(textElement: HTMLElement, color: string): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its text content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV', 'BLOCKQUOTE'].includes(childElement.tagName)) {\n                this.applyColorToBlockContent(childElement, color);\n            } else {\n                // For other elements, apply color normally\n                const span = document.createElement(this.tag);\n                span.style.color = color;\n                span.append(...Array.from(childElement.childNodes));\n                childElement.replaceChildren(span);\n            }\n        });\n    }\n\n    /**\n     * Applies color to the content of a block element\n     */\n    private applyColorToBlockContent(blockElement: HTMLElement, color: string): void {\n        \n        // If it's a blockquote, apply color to its text content without wrapping it in a span\n        if (blockElement.tagName === 'BLOCKQUOTE') {\n            this.applyColorToBlockquoteContent(blockElement, color);\n            return;\n        }\n        \n        // Remove existing text color spans before applying new one\n        this.removeExistingTextColorSpans(blockElement);\n        \n        // Create a span with color\n        const span = document.createElement(this.tag);\n        span.style.color = color;\n        \n        // Move all child nodes into the span\n        span.append(...Array.from(blockElement.childNodes));\n        \n        // Replace the block element content with the span\n        blockElement.replaceChildren(span);\n    }\n\n    /**\n     * Applies color to the content of a blockquote element without wrapping it in a span\n     */\n    private applyColorToBlockquoteContent(blockquoteElement: HTMLElement, color: string): void {\n        // Apply color directly to the blockquote element\n        blockquoteElement.style.color = color;\n    }\n\n    /**\n     * Removes color from a text element\n     */\n    private removeColorFromTextElement(textElement: HTMLElement): void {\n        // Remove colors from all spans with color styles\n        const spans = textElement.querySelectorAll('span[style*=\"color\"]');\n        \n        spans.forEach(span => {\n            const htmlSpan = span as HTMLElement;\n            \n            // Remove the color property from the style\n            htmlSpan.style.removeProperty('color');\n            \n            // If the span has no more style, remove it and move its content\n            if (!htmlSpan.getAttribute('style') || htmlSpan.getAttribute('style')?.trim() === '') {\n                const parent = htmlSpan.parentNode;\n                if (parent) {\n                    while (htmlSpan.firstChild) {\n                        parent.insertBefore(htmlSpan.firstChild, htmlSpan);\n                    }\n                    parent.removeChild(htmlSpan);\n                }\n            }\n        });\n        \n        // Check if there are color styles directly on the text element\n        if (textElement.style.color) {\n            textElement.style.removeProperty('color');\n        }\n    }\n\n    /**\n     * Removes existing text color spans from an element\n     */\n    private removeExistingTextColorSpans(element: HTMLElement): void {\n        element.querySelectorAll(this.tag).forEach((span) => {\n            const htmlSpan = span as HTMLElement;\n            if (htmlSpan.style.color && !htmlSpan.style.backgroundColor) {\n                // Only remove spans that have color but no background-color (pure text color spans)\n                span.replaceWith(...Array.from(span.childNodes));\n            }\n        });\n    }\n\n    /**\n     * Applies color to text element\n     */\n    async removeColorFromSelection(): Promise<void> {\n        const selection = this.getSelection();\n        if (!selection || selection.rangeCount === 0) return;\n\n        const range = selection.getRangeAt(0);\n        const commonAncestor = range.commonAncestorContainer;\n\n        // If commonAncestor is a Text node, take its parent\n        const element = commonAncestor.nodeType === Node.TEXT_NODE \n            ? commonAncestor.parentElement \n            : commonAncestor as HTMLElement;\n\n        if (!element) return;\n\n        this.removeColorFromTextElement(element);\n    }\n\n    /**\n     * Removes color from all selected blocks\n     */\n    private async removeColorFromAllSelectedBlocks(): Promise<void> {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        if (selectedBlocks.length > 0) {\n            selectedBlocks.forEach(({ blockId }) => {\n                this.removeColorFromBlock(blockId);\n            });\n        } else {\n            // Removes color from a specific block\n            await this.removeColorFromSelection();\n        }\n    }\n\n    /**\n     * Removes color from a specific block\n     */\n    private removeColorFromBlock(blockId: string): void {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.removeColorFromTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Gets the tools dictionary for translations\n     */\n    private getToolsDictionary(): any {\n        return editorJSI18nDictionnary?.messages?.tools || null;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        this.checkDefaultColors();\n        \n        const isActive = !!(\n            (selection?.anchorNode && this.hasStyle(selection.anchorNode as HTMLElement)) || \n            (selection?.focusNode && this.hasStyle(selection.focusNode as HTMLElement))\n        );\n        \n        this.state = isActive;\n        return isActive;\n    }\n\n    // ============================================================================\n    // PANEL MANAGEMENT METHODS\n    // ============================================================================\n\n    /**\n     * Shows the color selection panel\n     */\n    private showActions(mark: HTMLElement) {\n        this.style.input = mark?.style?.backgroundColor || '#f5f1cc';\n\n        if (this.colorSelection) {\n            this.colorSelection.onchange = () => {\n                if (this.style.input) {\n                    mark.style.backgroundColor = this.style.input;\n                }\n            };\n            \n            this.colorSelection.hidden = false;\n        }\n    }\n\n    /**\n     * Hides the color selection panel\n     */\n    private hideActions() {\n        const colorSelection = document.querySelectorAll(`.${this.CSS.colorSelectionModifier}`)[0] as HTMLElement;\n        this.isColorSelectionOpen = false;\n        \n        if (colorSelection && !colorSelection.classList.contains('action-hidden')) {\n            colorSelection.classList.add('action-hidden');\n        }\n    }\n}\n","import { closeDropdown, openDropdown } from '../../utils/dropdown.component';\nimport { InlineStyleTool } from './inline-style-tool.component';\n\nexport abstract class InlineTextTool extends InlineStyleTool {\n    nodes: { button: HTMLButtonElement | null } = { button: null};\n\n    isDropdownOpen: boolean = false;\n\n    override currentSelection?: Selection | null;\n\n    CSS: any;\n\n    override api: any;\n\n    dropdownCss = {\n        container: 'ce-inline-actions--text',\n        row: 'ce-inline-actions--text__row',\n    };\n\n    openDropdown(event: any) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        let dropdown = this.parentEditor?.querySelectorAll('.' + this.CSS.textSelectionModifier)[0];\n        this.saveUserSelection();\n        if (dropdown) {\n            if (dropdown.classList.contains('action-hidden')) {\n                this.saveUserSelection();\n                this.currentSelection = this.getSelection();\n                openDropdown(this.parentEditor, dropdown, this.nodes.button, this.dropdownCss.container);\n                setTimeout(() => {\n                    this.isDropdownOpen = true;\n                }, 400);\n            } else {\n                this.isDropdownOpen = false;\n                closeDropdown(dropdown);\n            }\n        }\n    }\n\n    closeDropdown() {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        let dropdown = this.parentEditor?.querySelectorAll('.' + this.CSS.textSelectionModifier)[0];\n        this.saveUserSelection();\n        if (dropdown) {\n            if (!dropdown.classList.contains('action-hidden')) {\n                closeDropdown(dropdown);\n                setTimeout(() => {\n                    this.isDropdownOpen = false;\n                }, 400);\n            }\n        }\n    }\n}\n","export class TextType {\n    tag: string | null = null;\n    name: string | null = null;\n}\n\nexport const TEXT_TYPES: Array<TextType> = [\n    {\n        tag: 'H1',\n        name: 'Heading 1',\n    },\n    {\n        tag: 'H2',\n        name: 'Heading 2',\n    },\n    {\n        tag: 'H3',\n        name: 'Heading 3',\n    },\n    {\n        tag: 'H4',\n        name: 'Heading 4',\n    },\n    {\n        tag: 'H5',\n        name: 'Heading 5',\n    },\n    {\n        tag: 'H6',\n        name: 'Heading 6',\n    },\n    {\n        tag: 'P',\n        name: 'Paragraph',\n    },\n];\n\nexport class TextSize {\n    class: string | null = null;\n    name: string | null = null;\n}\n\nexport const TEXT_SIZES: Array<TextAlign> = [\n    {\n        class: 'we-size-small',\n        name: 'Small',\n    },\n    {\n        class: '',\n        name: 'Normal',\n    },\n    {\n        class: 'we-size-large',\n        name: 'Large',\n    },\n    {\n        class: 'we-size-huge',\n        name: 'Huge',\n    },\n];\n\nexport class TextAlign {\n    class: string | null = null;\n    name: string | null = null;\n}\n\nexport const TEXT_ALIGN: Array<TextAlign> = [\n    {\n        class: 'we-align-left',\n        name: 'Left',\n    },\n    {\n        class: 'we-align-center',\n        name: 'Center',\n    },\n    {\n        class: 'we-align-right',\n        name: 'Right',\n    },\n    {\n        class: 'we-align-justify',\n        name: 'Justify',\n    },\n];\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { InlineTextTool } from './tool-type/text-tool.component';\nimport { TextSize, TEXT_SIZES } from '../utils/texts.component';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { editorJSI18nDictionnary } from '../../services/editorjs-translation.service';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Text Size formatting tool for EditorJS\n * Allows applying different text sizes to selected text or entire blocks\n */\n// @dynamic\nexport class textSizeTool extends InlineTextTool implements InlineTool {\n    public static title = 'Text Size';\n\n    // Tool configuration\n    private readonly commandName: string = 'textSize';\n    override tag = 'SPAN';\n    override hasSeparatorBefore = false;\n\n    // CSS configuration\n    override CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--textSize',\n        arrowButtonModifier: 'ce-inline-tool--textSize__arrow',\n        textSelectionModifier: 'ce-inline-actions--textSize',\n    };\n\n    // Text sizes configuration\n    textSizes: Array<TextSize> = TEXT_SIZES;\n    override classToApply = '';\n    override classes = '';\n\n    // Modification configuration\n    override modifies = {\n        tag: false,\n        style: false,\n        class: true,\n        attribute: false,\n    };\n\n    // DOM elements\n    override nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            span: {\n                class: true,\n            },\n        } as unknown as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    public get shortcut() {\n        return 'CMD+SHIFT+S';\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n        \n        // Initialize classes string\n        this.initializeClasses();\n    }\n\n    // ============================================================================\n    // INITIALIZATION METHODS\n    // ============================================================================\n\n    /**\n     * Initializes the classes string for all text sizes\n     */\n    private initializeClasses(): void {\n        if (this.classes === '') {\n            this.textSizes.forEach((textSize) => {\n                if (this.classes !== '') {\n                    this.classes += ',';\n                }\n                this.classes += textSize.class;\n            });\n        }\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button with dropdown functionality\n     */\n    render(): HTMLElement {\n        const toolsDictionnary: any = this.getToolsDictionary();\n        \n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n        \n        this.nodes.button.addEventListener('click', () => this.openDropdown(event));\n        \n        // Add text size labels to button\n        this.textSizes.forEach((textSize) => {\n            const span = document.createElement('span');\n            if (toolsDictionnary) {\n                span.innerText = '' + toolsDictionnary[textSize.name as keyof typeof toolsDictionnary];\n            }\n            this.nodes.button?.appendChild(span);\n        });\n\n        // Add dropdown arrow\n        const dropdownArrow = document.createElement('span');\n        dropdownArrow.classList.add(this.CSS.arrowButtonModifier);\n        this.nodes.button.appendChild(dropdownArrow);\n\n        return this.nodes.button;\n    }\n\n    /**\n     * Creates the dropdown actions menu\n     */\n    renderActions(): HTMLElement {\n        const dropdownCss = this.dropdownCss;\n        const toolsDictionnary: any = this.getToolsDictionary();\n        \n        const textSizeDropdown = document.createElement('div');\n        textSizeDropdown.className = this.dropdownCss['container' as keyof typeof dropdownCss] + ' action-hidden ' + this.CSS.textSelectionModifier;\n        \n        this.textSizes.forEach((textSize) => {\n            const row = document.createElement('div');\n            row.className = '' + this.dropdownCss['row' as keyof typeof dropdownCss];\n            \n            if (toolsDictionnary) {\n                row.innerText = toolsDictionnary[textSize.name as keyof typeof toolsDictionnary];\n            }\n            \n            row.addEventListener('mousedown', (event) => this.applyTextStyle(event, textSize.class ? textSize.class : ''));\n            textSizeDropdown.appendChild(row);\n        });\n        \n        return textSizeDropdown;\n    }\n\n    // ============================================================================\n    // TEXT SIZE APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies text size formatting to selected text or selected blocks\n     */\n    async surround(range: Range | null, applyStyle: boolean = false) {\n        if (applyStyle) {\n            const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n            // If blocks are selected, apply text size to all blocks\n            if (selectedBlocks && selectedBlocks.length > 0) {\n                this.applyTextSizeToSelectedBlocks(selectedBlocks);\n            } else {\n                await this.execCommandStyle(this.tag);\n            }\n            \n            this.checkState(this.getSelection());\n            this.closeDropdown();\n        }\n    }\n\n    /**\n     * Applies text size formatting to all selected blocks\n     */\n    private applyTextSizeToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyTextSizeToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies text size formatting to a specific block\n     */\n    private applyTextSizeToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applyTextSizeToTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies text size formatting to a text element\n     */\n    private applyTextSizeToTextElement(textElement: HTMLElement) {\n        // Remove existing text size elements\n        this.removeExistingTextSizeElements(textElement);\n        \n        // Create and apply new text size element if a class is specified\n        if (this.classToApply && this.classToApply !== '') {\n            this.createAndApplyTextSizeElement(textElement);\n        }\n    }\n\n    /**\n     * Removes existing text size elements\n     */\n    private removeExistingTextSizeElements(textElement: HTMLElement) {\n        this.textSizes.forEach((textSize) => {\n            if (textSize.class && textSize.class !== '') {\n                textElement.querySelectorAll(`span.${textSize.class}`).forEach((textSizeElement) => {\n                    const element = textSizeElement as HTMLElement;\n                    element.classList.remove(textSize.class!);\n                    \n                    // If the element has no classes, unwrap it\n                    if (element.classList.length === 0) {\n                        element.replaceWith(...Array.from(element.childNodes));\n                    }\n                });\n            }\n        });\n    }\n\n    /**\n     * Creates and applies a new text size element\n     */\n    private createAndApplyTextSizeElement(textElement: HTMLElement) {\n        // List of block elements that should not be wrapped by a span tag\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'];\n        \n        // Check if the text element contains block elements\n        const hasBlockElements = Array.from(textElement.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            // If the element contains blocks, apply text size to text inside each block\n            this.applyTextSizeToBlockElements(textElement);\n        } else {\n            // Otherwise, apply text size normally by wrapping all content\n            const span = document.createElement(this.tag);\n            span.classList.add(this.classToApply);\n            span.append(...Array.from(textElement.childNodes));\n            textElement.replaceChildren(span);\n        }\n    }\n\n    /**\n     * Applies text size to block elements by wrapping only the text\n     */\n    private applyTextSizeToBlockElements(textElement: HTMLElement): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its text content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'].includes(childElement.tagName)) {\n                this.applyTextSizeToBlockContent(childElement);\n            } else {\n                // For other elements, apply text size normally\n                const span = document.createElement(this.tag);\n                span.classList.add(this.classToApply);\n                span.append(...Array.from(childElement.childNodes));\n                childElement.replaceChildren(span);\n            }\n        });\n    }\n\n    /**\n     * Applies text size to the content of a block element\n     */\n    private applyTextSizeToBlockContent(blockElement: HTMLElement): void {\n        // Create a span element with text size class\n        const span = document.createElement(this.tag);\n        span.classList.add(this.classToApply);\n        \n        // Move all child nodes into the span element\n        span.append(...Array.from(blockElement.childNodes));\n        \n        // Replace the block element content with the span element\n        blockElement.replaceChildren(span);\n    }\n\n    // ============================================================================\n    // ACTION HANDLERS\n    // ============================================================================\n\n    /**\n     * Handles text style application from dropdown\n     */\n    async applyTextStyle(event: MouseEvent, classToApply: string) {\n        event.preventDefault();\n        this.classToApply = classToApply;\n        await this.resetUserSelection();\n        await this.surround(null, true);\n        \n        if (this.currentSelection) {\n            this.checkState(this.currentSelection);\n        }\n        \n        this.hideActions();\n        this.focusParagraph();\n    }\n\n    /**\n     * Shows actions dropdown\n     */\n    showActions(mark: HTMLElement) {\n        // Implementation for showing actions if needed\n    }\n\n    /**\n     * Hides actions dropdown\n     */\n    hideActions() {\n        // Implementation for hiding actions if needed\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets tools dictionary for internationalization\n     */\n    private getToolsDictionary(): any {\n        if (editorJSI18nDictionnary?.messages && editorJSI18nDictionnary.messages.tools) {\n            return editorJSI18nDictionnary.messages.tools;\n        }\n        return null;\n    }\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Focuses the paragraph element\n     */\n    private focusParagraph() {\n        const paragraph = this.getSelection()?.anchorNode?.parentElement?.closest('.ce-paragraph') as HTMLElement;\n        if (paragraph) {\n            paragraph.focus();\n        }\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const element = this.hasStyle(selection?.anchorNode as HTMLElement) || this.hasStyle(selection?.focusNode as HTMLElement);\n        const isActive = !!element;\n\n        // Update button classes based on current text size\n        this.textSizes.forEach((textSize) => {\n            if (textSize.class && textSize.class !== '') {\n                if (element?.classList.contains(textSize.class)) {\n                    this.nodes.button?.classList.add(textSize.class);\n                } else {\n                    this.nodes.button?.classList.remove(textSize.class);\n                }\n            }\n        });\n\n        this.state = isActive;\n        return isActive;\n    }\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus, StyleObject } from '../editorjs-tool.component';\nimport { InlineStyleTool } from './tool-type/inline-style-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Underline formatting tool for EditorJS\n * Allows applying underline formatting to selected text or entire blocks\n */\n// @dynamic\nexport class UnderlineTool extends InlineStyleTool implements InlineTool {\n    public static title = 'Underline';\n\n    // Tool configuration\n    private readonly commandName: string = 'underline';\n    override tag = 'SPAN';\n    override hasSeparatorBefore = false;\n\n    // CSS configuration\n    private readonly CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--underline',\n    };\n\n    // Style configuration\n    override style: StyleObject = {\n        property: 'text-decoration-line',\n        value: 'underline',\n        default: 'initial',\n    };\n\n    // Modification configuration\n    override modifies = {\n        tag: false,\n        style: true,\n        class: false,\n        attribute: false,\n    };\n\n    // DOM elements\n    private nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    public get shortcut() {\n        return 'CMD+U';\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // UNDERLINE APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies underline formatting to selected text or selected blocks\n     */\n    async surround(range: Range) {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        // If blocks are selected, apply underline to all blocks\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.applyUnderlineToSelectedBlocks(selectedBlocks);\n        } else {\n            await this.execCommandStyle(this.tag);\n        }\n        \n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Applies underline formatting to all selected blocks\n     */\n    private applyUnderlineToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyUnderlineToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies underline formatting to a specific block\n     */\n    private applyUnderlineToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applyUnderlineToTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies underline formatting to a text element\n     */\n    private applyUnderlineToTextElement(textElement: HTMLElement) {\n        // Remove existing underline elements\n        this.removeExistingUnderlineElements(textElement);\n        \n        // Create and apply new underline element if not already underlined\n        if (!this.state) {\n            this.createAndApplyUnderlineElement(textElement);\n        }\n    }\n\n    /**\n     * Removes existing underline elements\n     */\n    private removeExistingUnderlineElements(textElement: HTMLElement) {\n        textElement.querySelectorAll(this.tag).forEach((underlineElement) => {\n            underlineElement.replaceWith(...Array.from(underlineElement.childNodes));\n        });\n    }\n\n    /**\n     * Creates and applies a new underline element\n     */\n    private createAndApplyUnderlineElement(textElement: HTMLElement) {\n        // List of block elements that should not be wrapped by a span\n        const blockElements = ['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'];\n        \n        // Check if the text element contains block elements\n        const hasBlockElements = Array.from(textElement.children).some(child => \n            blockElements.includes(child.tagName)\n        );\n        \n        if (hasBlockElements) {\n            // If the element contains blocks, apply underline to text inside each block\n            this.applyUnderlineToBlockElements(textElement);\n        } else {\n            // Otherwise, apply underline normally by wrapping all content\n            const newUnderlineElement = document.createElement(this.tag);\n            newUnderlineElement.style.textDecorationLine = 'underline';\n            newUnderlineElement.append(...Array.from(textElement.childNodes));\n            textElement.replaceChildren(newUnderlineElement);\n        }\n    }\n\n    /**\n     * Applies underline to block elements by wrapping only the text\n     */\n    private applyUnderlineToBlockElements(textElement: HTMLElement): void {\n        // Iterate through all children of the text element\n        const children = Array.from(textElement.children);\n        \n        children.forEach(child => {\n            const childElement = child as HTMLElement;\n            \n            // If it's a block element, process its text content\n            if (['P', 'OL', 'UL', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'LI', 'DIV'].includes(childElement.tagName)) {\n                this.applyUnderlineToBlockContent(childElement);\n            } else {\n                // For other elements, apply underline normally\n                const span = document.createElement(this.tag);\n                span.style.textDecorationLine = 'underline';\n                span.append(...Array.from(childElement.childNodes));\n                childElement.replaceChildren(span);\n            }\n        });\n    }\n\n    /**\n     * Applies underline to the content of a block element\n     */\n    private applyUnderlineToBlockContent(blockElement: HTMLElement): void {\n        // Create a span with the underline\n        const span = document.createElement(this.tag);\n        span.style.textDecorationLine = 'underline';\n        \n        // Move all child nodes into the span\n        span.append(...Array.from(blockElement.childNodes));\n        \n        // Replace the block element content with the span\n        blockElement.replaceChildren(span);\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const isActive = !!(\n            (selection?.anchorNode && this.hasStyle(selection.anchorNode as HTMLElement)) || \n            (selection?.focusNode && this.hasStyle(selection.focusNode as HTMLElement))\n        );\n        \n        this.state = isActive;\n        return isActive;\n    }\n}\n\n","import { EditorJSTool } from '../../editorjs-tool.component';\nimport { checkFollowingList, listApi, listEditor, onEditList, setlistApiEditor } from '../../utils/list.component';\n\nexport abstract class ParagraphStyleTool extends EditorJSTool {\n    tag: string | null = null;\n\n    classToApply?: string;\n\n    classes?: string;\n\n    input?: number;\n\n    containers = 'div';\n\n    modifiers = 'h1,h2,h3,h4,h5,h6,p,ul,ol,blockquote';\n\n    removableModifiers = 'ul,ol,blockquote';\n\n    override api: any;\n\n    async execCommandStyle(action: string) {\n        const selection: Selection | null = this.currentSelection ? this.currentSelection : this.getSelection();\n        if (!selection) {\n            return;\n        }\n        this.saveUserSelection();\n        const anchorNode: Node | null = selection.anchorNode;\n\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n\n        if (!anchorNode) {\n            return;\n        }\n        let parentModifier = this.findParentModifier();\n        if (parentModifier?.tagName.toLowerCase() === 'ul' || parentModifier?.tagName.toLowerCase() === 'ol') {\n            parentModifier = <HTMLElement>(parentModifier.children[0]);\n        }\n\n        try {\n            if (this.tag?.toLowerCase() !== 'span') {\n                await this.changeContainerTag(parentModifier, selection);\n            }\n            if ((this.classToApply && this.classToApply.length > 0) || (this.classes && this.classes.length > 0)) {\n                this.changeCurrentClass(parentModifier);\n            }\n            this.collapseSelection();\n        } catch (error) {\n            console.warn('Paragraph Tool Error : ' + error);\n        }\n    }\n\n    private checkOrderedListValue(): string {\n        let value = 1;\n        let currentIndex = this.api.blocks.getCurrentBlockIndex();\n        if (currentIndex > 0) {\n            while (currentIndex > 0) {\n                const previousParagraph = this.parentEditor?.querySelectorAll('.ce-paragraph')[currentIndex - 1];\n                if (previousParagraph?.firstElementChild?.tagName.toLowerCase() === 'ol') {\n                    value++;\n                } else {\n                    return value.toString();\n                }\n                currentIndex--;\n            }\n        }\n\n        return value.toString();\n    }\n\n    private getCurrentParagraph(anchorNode: Node): HTMLElement | null {\n        if (anchorNode.nodeType === Node.ELEMENT_NODE && (<HTMLElement>anchorNode).classList.contains('ce-paragraph')) {\n            return <HTMLElement>anchorNode;\n        }\n        if (anchorNode.parentElement?.classList.contains('ce-paragraph')) {\n            return anchorNode.parentElement;\n        }\n        if (anchorNode.parentElement) {\n            return anchorNode.parentElement.closest('.ce-paragraph');\n        }\n        return null;\n    }\n\n    private async changeContainerTag(container: HTMLElement | null, selection: Selection) {\n        const range: Range = await this.getRangeObject(selection);\n        let currentParagraph = null;\n        if (selection.anchorNode) {\n            currentParagraph = this.getCurrentParagraph(selection.anchorNode);\n        }\n        let tagToCreate = this.tag;\n        if (container?.tagName.toLowerCase() === this.tag?.toLowerCase() && this.removableModifiers.indexOf(this.tag ? this.tag.toLowerCase() : '') > -1) {\n            tagToCreate = 'p';\n        }\n        let newContainer = document.createElement(tagToCreate ? tagToCreate : 'p');\n\n        if (container && currentParagraph) {\n            if (container.className) {\n                newContainer.className = container.className;\n            }\n            let containerToCopy = container;\n            if (container.tagName.toLowerCase() === 'ul' || container.tagName.toLowerCase() === 'ol') {\n                currentParagraph.removeEventListener('keydown', onEditList, true);\n                containerToCopy = <HTMLElement>container.firstElementChild;\n            }\n            if (newContainer.tagName.toLowerCase() === 'ul' || newContainer.tagName.toLowerCase() === 'ol') {\n                setlistApiEditor(listApi, listEditor);\n                currentParagraph.addEventListener('keydown', onEditList, true);\n            }\n            if (\n              (this.tag?.toLowerCase() === 'ol' &&\n                container.tagName.toLowerCase() !== 'li') || (container.parentElement?.tagName.toLowerCase() === 'ul' && this.tag?.toLowerCase() === 'ol')\n            ) {\n                const newChildContainer = document.createElement('li');\n                const value = this.checkOrderedListValue();\n                newChildContainer.setAttribute('value', value);\n                checkFollowingList(value, this.api);\n                while (containerToCopy.firstChild) {\n                    const elementClone = containerToCopy.firstChild.cloneNode(true);\n                    newChildContainer.appendChild(elementClone);\n                    containerToCopy.firstChild.remove();\n                }\n                newContainer.appendChild(newChildContainer);\n            } else if (\n              (this.tag?.toLowerCase() === 'ul' &&\n              container.tagName.toLowerCase() !== 'li') || (container.parentElement?.tagName.toLowerCase() === 'ol' && this.tag?.toLowerCase() === 'ul')\n            ) {\n              const newChildContainer = document.createElement('li');\n              while (containerToCopy.firstChild) {\n                const elementClone = containerToCopy.firstChild.cloneNode(true);\n                newChildContainer.appendChild(elementClone);\n                containerToCopy.firstChild.remove();\n              }\n              newContainer.appendChild(newChildContainer);\n            } else {\n                if ((this.tag?.toLowerCase() === 'ul' || this.tag?.toLowerCase() === 'ol')) {\n                  newContainer = document.createElement('p');\n                }\n              if (this.tag?.toLowerCase() === 'ol') {\n                checkFollowingList('0', this.api);\n              }\n                while (containerToCopy.firstChild) {\n                    const elementClone = containerToCopy.firstChild.cloneNode(true);\n                    newContainer.appendChild(elementClone);\n                    containerToCopy.firstChild.remove();\n                }\n            }\n            if (container.tagName.toLowerCase() === 'li') {\n                container = container.parentElement;\n            }\n            container?.parentElement?.replaceChild(newContainer, container);\n        } else {\n            console.error('Error changecontainerTag : cannot find container and current paragraph');\n        }\n\n        range.insertNode(newContainer);\n    }\n\n    private changeCurrentClass(container: HTMLElement | null) {\n        if (container) {\n            if (container.tagName === 'ul' || container.tagName === 'ol') {\n                container = container.getElementsByTagName('li')[0];\n            }\n            if (this.classes && this.classes.indexOf('{{input}}') > -1) {\n                const regexp = new RegExp('^' + this.classes.replace('{{input}}', ''));\n                let found = -1;\n                let newIndex = this.input;\n                for (var i = 0; i < container.classList.length && found === -1; ++i) {\n                    if (container.classList[i].match(regexp)) {\n                        if (newIndex) {\n                            newIndex += parseInt(container.classList[i].replace(this.classes.replace('{{input}}', ''), ''));\n                        } else {\n                            newIndex = parseInt(container.classList[i].replace(this.classes.replace('{{input}}', ''), ''));\n                        }\n                        found = i;\n                    }\n                }\n                newIndex = newIndex ? (newIndex < 0 ? 0 : newIndex > 10 ? 10 : newIndex) : 0;\n                if (found === -1) {\n                    if (newIndex > 0) {\n                        container.classList.add(this.classes.replace('{{input}}', newIndex.toString()));\n                    }\n                } else {\n                    container.classList.remove(container.classList[found]);\n                    if (newIndex > 0) {\n                        container.classList.add(this.classes.replace('{{input}}', newIndex.toString()));\n                    }\n                }\n            } else {\n                if (this.classes) {\n                    this.classes.split(',').forEach((elementClass) => {\n                        container?.classList.remove(elementClass);\n                    });\n                }\n                container.className += (container.className.length > 0 ? ' ' : '') + this.classToApply;\n            }\n        } else {\n            console.error('Error changeCurrentClass : cannot find container');\n        }\n    }\n}\n","import { ParagraphStyleTool } from './paragraph-style-tool.component';\nimport { editorJSI18nDictionnary } from '../../../services/editorjs-translation.service';\nimport { EditorView, basicSetup } from 'codemirror';\nimport { EditorState } from '@codemirror/state';\nimport { linter, Diagnostic, lintGutter } from \"@codemirror/lint\";\nimport { html } from '@codemirror/lang-html';\nimport { syntaxTree } from \"@codemirror/language\";\nimport { onEditList } from '../../utils/list.component';\n\nexport abstract class TextEditionTool extends ParagraphStyleTool {\n    nodes: { button: HTMLButtonElement | null } = { button: null};\n\n    CSS: any;\n\n    containerClass = 'codeEdit__container';\n    modalClass = 'codeEdit__container__modal';\n    notificationClass = 'codeEdit__container__notification';\n    editorClass = 'codeEdit__container__modal__editor';\n    buttonClass = 'codeEdit__container__modal__buttons';\n\n    editHTML() {\n        let content = this.getEditorContent();\n        this.createHTMLEditModal(content);\n    }\n\n    private createHTMLEditModal(content: string) {\n        let linterErrorMessage = '';\n\n        let container = document.createElement('div');\n        container.classList.add(this.containerClass);\n        let modal = document.createElement('div');\n        modal.classList.add(this.modalClass);\n        let notification = document.createElement('div');\n        notification.classList.add(this.notificationClass);\n        notification.classList.add('hidden');\n        let editorContainer = document.createElement('div');\n        editorContainer.classList.add(this.editorClass);\n        codeEditEditor = this.findParentEditor();\n        codeEditApi = this.api;\n\n        let buttonContainer = document.createElement('div');\n        let cancelButton = document.createElement('button');\n        let saveButton = document.createElement('button');\n        if (editorJSI18nDictionnary.messages?.tools && editorJSI18nDictionnary.messages.tools) {\n            let toolsDictionnary = editorJSI18nDictionnary.messages.tools;\n            cancelButton.innerText = '' + toolsDictionnary['codeEditCancel'];\n            saveButton.innerText = '' + toolsDictionnary['codeEditSave'];\n            notification.innerText = '' + toolsDictionnary['codeEditNotification'];\n            linterErrorMessage += toolsDictionnary['codeEditContentError']\n        }\n        cancelButton.addEventListener('click', closeCodeEditModal, true);\n        buttonContainer.appendChild(cancelButton);\n        buttonContainer.classList.add(this.buttonClass);\n\n        modal.appendChild(notification);\n        modal.appendChild(editorContainer);\n        modal.appendChild(buttonContainer);\n        container.appendChild(modal);\n        document.body.appendChild(container);\n\n        const unallowedTagsLinter = linter(view => {\n            let diagnostics: Diagnostic[] = []\n            syntaxTree(view.state).cursor().iterate(node => {\n                if (node.name === 'OpenTag') {\n                    unallowedTags.map((tag: string) => {\n                        if (view.state.sliceDoc(node.from, node.to) === '<' + tag + '>'\n                            || view.state.sliceDoc(node.from, node.to).slice(0, tag.length + 2) === '<' + tag + ' ') {\n                            diagnostics.push({\n                                from: node.from,\n                                to: node.to,\n                                severity: \"error\",\n                                message: linterErrorMessage.replace('%tag%', tag)\n                            })\n                        }\n                    })\n                }\n            })\n            if (diagnostics.length > 0) {\n                document.querySelector('.codeEdit__container__modal__buttons button:last-of-type')?.setAttribute('disabled', 'true');\n                document.querySelector('.codeEdit__container__notification')?.classList.remove('hidden');\n            } else {\n                document.querySelector('.codeEdit__container__modal__buttons button:last-of-type')?.removeAttribute('disabled');\n                document.querySelector('.codeEdit__container__notification')?.classList.add('hidden');\n            }\n            return diagnostics\n        })\n\n        let state = EditorState.create({\n            doc: content,\n            extensions: [\n                basicSetup,\n                html(),\n                lintGutter(),\n                unallowedTagsLinter\n            ],\n        });\n        let view = new EditorView({\n            state: state,\n            parent: editorContainer,\n        });\n\n        saveButton.addEventListener('click', () => saveCodeEditModal(view.state.doc.toString()), true);\n        buttonContainer.appendChild(saveButton);\n    }\n\n    private getEditorContent(): string {\n        let currentEditor = this.findParentEditor();\n        if (currentEditor) {\n            let editorBlocks = currentEditor.querySelectorAll('.codex-editor__redactor .ce-paragraph');\n            let content = '';\n            editorBlocks.forEach((block) => {\n                let closingTag = '</' + block.children[0]?.tagName.toLowerCase() + '>';\n                let regexp = /((<\\/)\\w+(>))(?![\\s\\S]*((<\\/)\\w+(>))[\\s\\S]*$)/i;\n                let match = content.match(regexp);\n                let lastContentClosingTag = match ? match[0] : '';\n                if (\n                    (block.children[0]?.tagName.toLowerCase() === 'ul' || block.children[0]?.tagName.toLowerCase() === 'ol') &&\n                    lastContentClosingTag === closingTag\n                ) {\n                    content = content.substring(0, content.length - closingTag.length);\n                    content += block.innerHTML.substring(closingTag.replace('/', '').length, block.innerHTML.length);\n                } else {\n                    content += block.innerHTML;\n                }\n            });\n            return this.FormatHTMLStringIndentation(content);\n        } else {\n            console.error('Error getEditorContent : could not find parent editor');\n            return '';\n        }\n    }\n\n    // Adapted FROM jsfiddle here: https://jsfiddle.net/buksy/rxucg1gd/\n    private FormatHTMLStringIndentation(code: string): string {\n        let stripWhiteSpaces = true;\n        let stripEmptyLines = true;\n        const whitespace = ' '.repeat(2); // Default indenting 4 whitespaces\n        let currentIndent = 0;\n        const newlineChar = '\\n';\n        let prevChar = null;\n        let char = null;\n        let nextChar = null;\n\n        let result = '';\n        for (let pos = 0; pos <= code.length; pos++) {\n            prevChar = char;\n            char = code.substr(pos, 1);\n            nextChar = code.substr(pos + 1, 1);\n\n            const isBrTag = (code.substr(pos, 4) === '<br>' || code.substr(pos, 5) === '<br/>');\n            const isOpeningTag = char === '<' && nextChar !== '/' && !isBrTag;\n            const isClosingTag = char === '<' && nextChar === '/' && !isBrTag;\n            const isTagEnd = prevChar === '>' && char !== '<' && currentIndent > 0;\n            const isTagNext =\n                !isBrTag && !isOpeningTag && !isClosingTag && isTagEnd && code.substr(pos, code.substr(pos).indexOf('<')).trim() === '';\n            if (isBrTag) {\n                // If opening tag, add newline character and indention\n                result += newlineChar + whitespace.repeat(currentIndent);\n            }\n            if (isOpeningTag) {\n                // If opening tag, add newline character and indention\n                result += (pos === 0 ? '' : newlineChar) + whitespace.repeat(currentIndent);\n                currentIndent++;\n            }\n            // if Closing tag, add newline and indention\n            else if (isClosingTag) {\n                // If there're more closing tags than opening\n                if (--currentIndent < 0) currentIndent = 0;\n                result += newlineChar + whitespace.repeat(currentIndent);\n            }\n            // remove multiple whitespaces\n            else if (stripWhiteSpaces === true && char === ' ' && nextChar === ' ') char = '';\n            // remove empty lines\n            else if (stripEmptyLines === true && char === newlineChar) {\n                //debugger;\n                if (code.substr(pos, code.substr(pos).indexOf('<')).trim() === '') char = '';\n            }\n            if (isTagEnd && !isTagNext) {\n                result += newlineChar + whitespace.repeat(currentIndent);\n            }\n\n            result += char;\n        }\n        return result;\n    }\n}\n\nconst unallowedTags = ['div'];\nvar codeEditEditor: HTMLElement | null = null;\nvar codeEditApi: any = null;\n\nfunction closeCodeEditModal() {\n    codeEditApi.toolbar.close();\n    document.querySelector('.codeEdit__container')?.remove();\n}\n\nfunction hasUnallowedTags(content: string) {\n    const container = document.createElement('div');\n    container.innerHTML = content;\n    \n    return unallowedTags.some((tag) => {\n        if (container.querySelector(tag)) {\n            return true;\n        }\n        return false;\n    })\n}\n\nfunction saveCodeEditModal(content: string) {\n    let tmpElement = document.createElement('div');\n    let paragraph: NodeListOf<Element> | null = null;\n    if (hasUnallowedTags(content)) {\n        return ;\n    }\n    content = JSON.parse(JSON.stringify(content).replace(/(\\\\r\\\\n|\\\\n|\\\\r)/g, ''));\n    tmpElement.innerHTML = content;\n\n    codeEditApi.blocks.clear();\n    if (codeEditEditor) {\n        paragraph = codeEditEditor.querySelectorAll('.ce-paragraph');\n    }\n    let i = 0;\n\n    while (tmpElement.firstElementChild && paragraph && codeEditEditor) {\n        if (tmpElement.firstElementChild.tagName.toLowerCase() === 'ul' || tmpElement.firstElementChild.tagName.toLowerCase() === 'ol') {\n            let listMarker = 1;\n            let previousContainerWasOl = false;\n            while (tmpElement.firstElementChild.firstElementChild) {\n                let container = document.createElement(tmpElement.firstElementChild.tagName);\n                container.appendChild(tmpElement.firstElementChild.firstElementChild.cloneNode(true));\n                if (container.tagName.toLowerCase() === 'ol') {\n                    if (!previousContainerWasOl) {\n                        listMarker = 1;\n                    }\n                    container.firstElementChild?.setAttribute('value', listMarker.toString());\n                    previousContainerWasOl = true;\n                    ++listMarker;\n                } else {\n                    previousContainerWasOl = false;\n                }\n                if (i >= paragraph.length) {\n                    codeEditApi.blocks.insert();\n                    let tmpParagraph = codeEditEditor.querySelectorAll('.ce-paragraph');\n                    tmpParagraph[tmpParagraph.length - 1].innerHTML = '';\n                    tmpParagraph[tmpParagraph.length - 1].appendChild(container);\n                    tmpParagraph[tmpParagraph.length - 1].addEventListener('keydown', onEditList, true);\n                } else {\n                    paragraph[i].innerHTML = '';\n                    paragraph[i].appendChild(container);\n                    paragraph[i].addEventListener('keydown', onEditList, true);\n                }\n                tmpElement.firstElementChild.firstElementChild.remove();\n                ++i;\n            }\n        } else {\n            if (i >= paragraph.length) {\n                codeEditApi.blocks.insert();\n                let tmpParagraph = codeEditEditor.querySelectorAll('.ce-paragraph');\n                tmpParagraph[tmpParagraph.length - 1].innerHTML = '';\n                tmpParagraph[tmpParagraph.length - 1].appendChild(tmpElement.firstElementChild.cloneNode(true));\n            } else {\n                paragraph[i].innerHTML = '';\n                paragraph[i].appendChild(tmpElement.firstElementChild.cloneNode(true));\n            }\n            ++i;\n        }\n        tmpElement.firstElementChild.remove();\n    }\n\n    closeCodeEditModal();\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { TextEditionTool } from './tool-type/text-edition.component';\n\n// @dynamic\nexport class CodeEditTool extends TextEditionTool implements InlineTool {\n    public static title = 'Code Edit';\n\n    private readonly commandName: string = 'codeEdit';\n\n    override CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--codeEdit',\n    };\n\n    override nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    override api: any;\n\n    private _state: boolean;\n\n    override tag = 'SPAN';\n\n    override hasSeparatorBefore = true;\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state) {\n        this._state = state;\n\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n    }\n\n    render() {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    async surround(range: Range) {\n        this.editHTML();\n    }\n\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        return false;\n    }\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { ParagraphStyleTool } from './tool-type/paragraph-style-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Indent formatting tool for EditorJS\n * Allows applying indentation to selected text or entire blocks\n */\n// @dynamic\nexport class IndentTool extends ParagraphStyleTool implements InlineTool {\n    public static title = 'Indent';\n\n    // Tool configuration\n    private readonly commandName: string = 'indent';\n    override tag = 'SPAN';\n    override classes = 'we-indent-{{input}}';\n    override input = 1;\n\n    // CSS configuration\n    CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--indent',\n    };\n\n    // DOM elements\n    nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // INDENT APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies indent formatting to selected text or selected blocks\n     */\n    async surround(range: Range | null) {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        // If blocks are selected, apply indent to all blocks\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.applyIndentToSelectedBlocks(selectedBlocks);\n        } else {\n            await this.execCommandStyle(this.tag);\n        }\n        \n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Applies indent formatting to all selected blocks\n     */\n    private applyIndentToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyIndentToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies indent formatting to a specific block\n     */\n    private applyIndentToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const blockElement = this.getBlockElement(block);\n        if (!blockElement) return;\n\n        this.applyIndentToBlockElement(blockElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies indent formatting to a block element\n     */\n    private applyIndentToBlockElement(blockElement: HTMLElement) {\n        // Find the current container element\n        const currentContainer = this.findCurrentContainer(blockElement);\n        if (!currentContainer) return;\n\n        // Apply indent class to the container\n        this.applyIndentClass(currentContainer);\n    }\n\n    /**\n     * Finds the current container element within the block element\n     */\n    private findCurrentContainer(blockElement: HTMLElement): HTMLElement | null {\n        // Look for common block container elements\n        const containerSelectors = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'div', 'blockquote'];\n        \n        for (const selector of containerSelectors) {\n            const element = blockElement.querySelector(selector);\n            if (element) {\n                return element as HTMLElement;\n            }\n        }\n        \n        // If no specific container found, return the block element itself\n        return blockElement;\n    }\n\n    /**\n     * Applies indent class to the container element\n     */\n    private applyIndentClass(container: HTMLElement) {\n        if (!this.classes) return;\n\n        // Remove existing indent classes\n        const regexp = new RegExp('^' + this.classes.replace('{{input}}', ''));\n        let found = -1;\n        let newIndex = this.input;\n\n        for (let i = 0; i < container.classList.length && found === -1; ++i) {\n            if (container.classList[i].match(regexp)) {\n                if (newIndex) {\n                    newIndex += parseInt(container.classList[i].replace(this.classes.replace('{{input}}', ''), ''));\n                } else {\n                    newIndex = parseInt(container.classList[i].replace(this.classes.replace('{{input}}', ''), ''));\n                }\n                found = i;\n            }\n        }\n\n        // Limit indent level between 0 and 10\n        newIndex = newIndex ? (newIndex < 0 ? 0 : newIndex > 10 ? 10 : newIndex) : 0;\n\n        // Remove old class if found\n        if (found !== -1) {\n            container.classList.remove(container.classList[found]);\n        }\n\n        // Add new class if indent level > 0\n        if (newIndex > 0) {\n            container.classList.add(this.classes.replace('{{input}}', newIndex.toString()));\n        }\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the block element\n     */\n    private getBlockElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        return element;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        return false;\n    }\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { ParagraphStyleTool } from './tool-type/paragraph-style-tool.component';\n\n// @dynamic\nexport class OrderedListTool extends ParagraphStyleTool implements InlineTool {\n    public static title = 'Ordered List';\n\n    private readonly commandName: string = 'orderedList';\n\n    CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--orderedList',\n    };\n\n    nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    override api: any;\n\n    private _state: boolean;\n\n    override tag = 'OL';\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state) {\n        this._state = state;\n\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n    }\n\n    render() {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    async surround(range: Range) {\n        await this.execCommandStyle(this.tag);\n        this.checkState(this.getSelection());\n    }\n\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        const parentModifier = this.findParentModifier();\n        if (!parentModifier) {\n            return false;\n        }\n        let isActive = parentModifier.tagName.toLowerCase() === this.tag.toLowerCase();\n        this.nodes.button?.classList.toggle(this.CSS.buttonActive, isActive);\n\n        return isActive;\n    }\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { ParagraphStyleTool } from './tool-type/paragraph-style-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Outdent formatting tool for EditorJS\n * Allows removing indentation from selected text or entire blocks\n */\n// @dynamic\nexport class OutdentTool extends ParagraphStyleTool implements InlineTool {\n    public static title = 'Outdent';\n\n    // Tool configuration\n    private readonly commandName: string = 'outdent';\n    override tag = 'SPAN';\n    override classes = 'we-indent-{{input}}';\n    override input = -1;\n\n    // CSS configuration\n    CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--outdent',\n    };\n\n    // DOM elements\n    nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // OUTDENT APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies outdent formatting to selected text or selected blocks\n     */\n    async surround(range: Range | null) {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        // If blocks are selected, apply outdent to all blocks\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.applyOutdentToSelectedBlocks(selectedBlocks);\n        } else {\n            await this.execCommandStyle(this.tag);\n        }\n        \n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Applies outdent formatting to all selected blocks\n     */\n    private applyOutdentToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyOutdentToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies outdent formatting to a specific block\n     */\n    private applyOutdentToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const blockElement = this.getBlockElement(block);\n        if (!blockElement) return;\n\n        this.applyOutdentToBlockElement(blockElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies outdent formatting to a block element\n     */\n    private applyOutdentToBlockElement(blockElement: HTMLElement) {\n        // Find the current container element\n        const currentContainer = this.findCurrentContainer(blockElement);\n        if (!currentContainer) return;\n\n        // Apply outdent class to the container\n        this.applyOutdentClass(currentContainer);\n    }\n\n    /**\n     * Finds the current container element within the block element\n     */\n    private findCurrentContainer(blockElement: HTMLElement): HTMLElement | null {\n        // Look for common block container elements\n        const containerSelectors = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'div', 'blockquote'];\n        \n        for (const selector of containerSelectors) {\n            const element = blockElement.querySelector(selector);\n            if (element) {\n                return element as HTMLElement;\n            }\n        }\n        \n        // If no specific container found, return the block element itself\n        return blockElement;\n    }\n\n    /**\n     * Applies outdent class to the container element\n     */\n    private applyOutdentClass(container: HTMLElement) {\n        if (!this.classes) return;\n\n        // Remove existing indent classes\n        const regexp = new RegExp('^' + this.classes.replace('{{input}}', ''));\n        let found = -1;\n        let newIndex = this.input;\n\n        for (let i = 0; i < container.classList.length && found === -1; ++i) {\n            if (container.classList[i].match(regexp)) {\n                if (newIndex) {\n                    newIndex += parseInt(container.classList[i].replace(this.classes.replace('{{input}}', ''), ''));\n                } else {\n                    newIndex = parseInt(container.classList[i].replace(this.classes.replace('{{input}}', ''), ''));\n                }\n                found = i;\n            }\n        }\n\n        // Limit indent level between 0 and 10\n        newIndex = newIndex ? (newIndex < 0 ? 0 : newIndex > 10 ? 10 : newIndex) : 0;\n\n        // Remove old class if found\n        if (found !== -1) {\n            container.classList.remove(container.classList[found]);\n        }\n\n        // Add new class if indent level > 0\n        if (newIndex > 0) {\n            container.classList.add(this.classes.replace('{{input}}', newIndex.toString()));\n        }\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the block element\n     */\n    private getBlockElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        return element;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        return false;\n    }\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { ParagraphStyleTool } from './tool-type/paragraph-style-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Quote formatting tool for EditorJS\n * Allows applying quote formatting to selected text or entire blocks\n */\n// @dynamic\nexport class QuoteTool extends ParagraphStyleTool implements InlineTool {\n    public static title = 'Quote';\n\n    // Tool configuration\n    private readonly commandName: string = 'quote';\n    override tag = 'BLOCKQUOTE';\n\n    // CSS configuration\n    CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--quote',\n    };\n\n    // DOM elements\n    nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // Block elements that can contain quote formatting\n    private readonly BLOCK_ELEMENTS = ['P', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'UL', 'LI', 'DIV', 'OL'];\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // QUOTE APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies quote formatting to selected text or selected blocks\n     */\n    async surround(range: Range) {\n        const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n        if (selectedBlocks && selectedBlocks.length > 0) {\n            this.applyQuoteToSelectedBlocks(selectedBlocks);\n        } else {\n            await this.execCommandStyle(this.tag);\n        }\n        \n        this.checkState(this.getSelection());\n    }\n\n    /**\n     * Applies quote formatting to all selected blocks\n     */\n    private applyQuoteToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyQuoteToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies quote formatting to a specific block\n     */\n    private applyQuoteToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const blockElement = this.getBlockElement(block);\n        if (!blockElement) return;\n\n        this.applyQuoteToBlockElement(blockElement);\n        \n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies quote formatting to a block element\n     */\n    private applyQuoteToBlockElement(blockElement: HTMLElement) {\n        // Find the deepest block element in the hierarchy\n        const deepestBlockElement = this.findDeepestBlockElement(blockElement);\n        \n        // If it's already a blockquote, do nothing\n        if (deepestBlockElement.tagName === this.tag) {\n            return;\n        }\n\n        // Unwrap any spans that might be wrapping the block element\n        const unwrappedElement = this.unwrapSpans(deepestBlockElement);\n\n        // Apply quote to the deepest block element\n        this.applyQuoteToElement(unwrappedElement || deepestBlockElement);\n    }\n\n    /**\n     * Recursively finds the deepest block element in the hierarchy\n     */\n    private findDeepestBlockElement(element: HTMLElement): HTMLElement {\n        let deepest: HTMLElement = element;\n        let foundDeeper = false;\n\n        // Check all children for block elements\n        Array.from(element.children).forEach((child) => {\n            const childEl = child as HTMLElement;\n            \n            if (this.BLOCK_ELEMENTS.includes(childEl.tagName)) {\n                const candidate = this.findDeepestBlockElement(childEl);\n                \n                if (candidate !== childEl) {\n                    foundDeeper = true;\n                    deepest = candidate;\n                } else if (!foundDeeper) {\n                    // If no deeper found yet, prefer this child\n                    deepest = childEl;\n                }\n            }\n        });\n\n        return deepest;\n    }\n\n    /**\n     * Unwraps any spans that might be wrapping the block element\n     */\n    private unwrapSpans(element: HTMLElement): HTMLElement {\n        let currentElement = element;\n        \n        while (currentElement && currentElement.tagName === 'SPAN') {\n            const parent = currentElement.parentElement;\n            if (!parent) break;\n            \n            // Move all children from span to parent\n            while (currentElement.firstChild) {\n                parent.insertBefore(currentElement.firstChild, currentElement);\n            }\n            \n            // Remove the span\n            parent.removeChild(currentElement);\n            \n            // Continue with the parent\n            currentElement = parent;\n        }\n        \n        return currentElement;\n    }\n\n    /**\n     * Applies quote to the specified element\n     */\n    private applyQuoteToElement(element: HTMLElement) {\n        // Check if there's already a blockquote inside\n        const existingBlockquote = element.querySelector(this.tag);\n        if (existingBlockquote) {\n            return;\n        }\n\n        // Create a new blockquote\n        const blockquote = document.createElement(this.tag);\n        \n        // Move all child nodes into the blockquote\n        while (element.firstChild) {\n            blockquote.appendChild(element.firstChild);\n        }\n        \n        // Add the blockquote inside the element\n        element.appendChild(blockquote);\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the block element\n     */\n    private getBlockElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        return element;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const parentModifier = this.findParentModifier();\n        if (!parentModifier) {\n            return false;\n        }\n        \n        const isActive = parentModifier.tagName.toLowerCase() === this.tag.toLowerCase();\n        this.nodes.button?.classList.toggle(this.CSS.buttonActive, isActive);\n\n        return isActive;\n    }\n}\n","import { InlineTool, InlineToolConstructorOptions, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus, setIsTextEditionTool } from '../editorjs-tool.component';\nimport { TextEditionTool } from './tool-type/text-edition.component';\n\nexport type RedoToolConfig = {\n    redo: () => void;\n};\n\n// @dynamic\nexport class RedoTool extends TextEditionTool implements InlineTool {\n    public static title = 'Redo';\n\n    private readonly commandName: string = 'redo';\n\n    override CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--redo',\n    };\n\n    override nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    override api: any;\n\n    private _state: boolean;\n\n    override tag = '';\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state) {\n        this._state = state;\n\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    private config!: RedoToolConfig;\n\n    constructor({ api, config }: InlineToolConstructorOptions) {\n        super();\n        this.api = api;\n        this._state = false;\n        this.config = config;\n    }\n\n    render() {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    async surround(range: Range) {\n        setIsTextEditionTool(true);\n        this.redo();\n    }\n\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        return false;\n    }\n\n    redo() {\n        this.config.redo();\n        \n        // Fermer la toolbar de MultiBlockSelectionPlugin si elle est ouverte\n        if (this.api && this.api.toolbar) {\n            this.api.toolbar.close();\n        }\n        \n        // Fermeture manuelle via les classes CSS pour s'assurer que la toolbar se ferme\n        if (this.parentEditor) {\n            const toolbar = this.parentEditor.querySelector('.ce-inline-toolbar.ce-inline-toolbar--showed') as HTMLElement;\n            if (toolbar) {\n                toolbar.classList.remove('ce-inline-toolbar--showed');\n                toolbar.classList.remove('ce-inline-toolbar--block');\n            }\n        }\n    };\n}\n","import { closeDropdown, openDropdown } from '../../utils/dropdown.component';\nimport { ParagraphStyleTool } from './paragraph-style-tool.component';\n\nexport abstract class ParagraphTextTool extends ParagraphStyleTool {\n    nodes: { button: HTMLButtonElement | null } = { button: null};\n\n    isDropdownOpen: boolean = false;\n\n    override currentSelection?: Selection | null;\n\n    CSS: any;\n\n    override api: any;\n\n    dropdownCss = {\n        container: 'ce-inline-actions--text',\n        row: 'ce-inline-actions--text__row',\n    };\n\n    openDropdown(event: any) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        let dropdown = this.parentEditor?.querySelectorAll('.' + this.CSS.textSelectionModifier)[0];\n        if (dropdown) {\n            if (dropdown.classList.contains('action-hidden')) {\n                this.saveUserSelection();\n                this.currentSelection = this.getSelection();\n                openDropdown(this.parentEditor, dropdown, this.nodes.button, this.dropdownCss.container);\n                setTimeout(() => {\n                    this.isDropdownOpen = true;\n                }, 400);\n            } else {\n                closeDropdown(dropdown);\n                this.isDropdownOpen = false;\n            }\n        }\n    }\n\n    closeDropdown() {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        let dropdown = this.parentEditor?.querySelectorAll('.' + this.CSS.textSelectionModifier)[0];\n        this.saveUserSelection();\n        if (dropdown) {\n            if (!dropdown.classList.contains('action-hidden')) {\n                closeDropdown(dropdown);\n                setTimeout(() => {\n                    this.isDropdownOpen = false;\n                }, 400);\n            }\n        }\n    }\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { ParagraphTextTool } from './tool-type/text-tool.component';\nimport { TextAlign, TEXT_ALIGN } from '../utils/texts.component';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Text alignment tool for EditorJS\n * Allows applying text alignment to selected text or entire blocks\n */\n// @dynamic\nexport class TextAlignTool extends ParagraphTextTool implements InlineTool {\n    public static title = 'Text Align';\n\n    // Tool configuration\n    private readonly commandName: string = 'textAlign';\n    override tag = 'SPAN';\n    override hasSeparatorBefore = true;\n\n    // Text alignment options\n    textAlign: Array<TextAlign> = TEXT_ALIGN;\n    override classes = '';\n\n    // CSS configuration\n    override CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--textAlign',\n        arrowButtonModifier: 'ce-inline-tool--textAlign__arrow',\n        textSelectionModifier: 'ce-inline-actions--textAlign',\n    };\n\n    // DOM elements\n    override nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button with dropdown functionality\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n        \n        this.nodes.button.addEventListener('click', () => this.openDropdown(event));\n\n        let dropdownArrow = document.createElement('span');\n        dropdownArrow.classList.add(this.CSS.arrowButtonModifier);\n        this.nodes.button.appendChild(dropdownArrow);\n\n        return this.nodes.button;\n    }\n\n    // ============================================================================\n    // TEXT ALIGNMENT APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies text alignment to selected text or selected blocks\n     */\n    async surround(range: Range | null, applyStyle: boolean = false) {\n        if (applyStyle) {\n            const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n            // If blocks are selected, apply alignment to all blocks\n            if (selectedBlocks && selectedBlocks.length > 0) {\n                this.applyTextAlignToSelectedBlocks(selectedBlocks);\n            } else {\n                await this.execCommandStyle(this.tag);\n            }\n            \n            this.checkState(this.getSelection());\n            this.closeDropdown();\n        }\n    }\n\n    /**\n     * Applies text alignment to all selected blocks\n     */\n    private applyTextAlignToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyTextAlignToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies text alignment to a specific block\n     */\n    private applyTextAlignToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const blockElement = this.getBlockElement(block);\n        if (!blockElement) return;\n\n        this.applyTextAlignToBlockElement(blockElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies text alignment to a block element\n     */\n    private applyTextAlignToBlockElement(blockElement: HTMLElement) {\n        // Find the current container element\n        const currentContainer = this.findCurrentContainer(blockElement);\n        if (!currentContainer) return;\n\n        // Apply text alignment class to the container\n        this.applyTextAlignClass(currentContainer);\n    }\n\n    /**\n     * Finds the current container element within the block element\n     */\n    private findCurrentContainer(blockElement: HTMLElement): HTMLElement | null {\n        // Look for common block container elements\n        const containerSelectors = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'div', 'blockquote'];\n        \n        for (const selector of containerSelectors) {\n            const element = blockElement.querySelector(selector);\n            if (element) {\n                return element as HTMLElement;\n            }\n        }\n        \n        // If no specific container found, return the block element itself\n        return blockElement;\n    }\n\n    /**\n     * Applies text alignment class to the container element\n     */\n    private applyTextAlignClass(container: HTMLElement) {\n        if (!this.classToApply) return;\n\n        // Remove existing text alignment classes\n        this.textAlign.forEach((textAlign) => {\n            if (textAlign.class) {\n                container.classList.remove(textAlign.class);\n            }\n        });\n\n        // Add new text alignment class\n        container.classList.add(this.classToApply);\n    }\n\n    // ============================================================================\n    // DROPDOWN METHODS\n    // ============================================================================\n\n    /**\n     * Renders the dropdown actions for text alignment options\n     */\n    renderActions() {\n        let textAlignDropdown = document.createElement('div');\n        textAlignDropdown.className = this.dropdownCss['container' as keyof typeof this.dropdownCss] + ' action-hidden ' + this.CSS.textSelectionModifier;\n        \n        this.textAlign.forEach((textAlign) => {\n            let row = document.createElement('div');\n            row.className = this.dropdownCss['row' as keyof typeof this.dropdownCss] + ' ' + textAlign.class;\n            row.addEventListener('mousedown', (event) => this.applyTextStyle(event, textAlign.class ? textAlign.class : ''));\n            textAlignDropdown.appendChild(row);\n        });\n        \n        if (this.classes === '') {\n            this.textAlign.forEach((textAlign) => {\n                if (this.classes !== '') {\n                    this.classes += ',';\n                }\n                this.classes += textAlign.class;\n            });\n        }\n        \n        return textAlignDropdown;\n    }\n\n    /**\n     * Shows the dropdown actions\n     */\n    showActions(mark: any) {\n        // Implementation for showing actions if needed\n    }\n\n    /**\n     * Hides the dropdown actions\n     */\n    hideActions() {\n        // Implementation for hiding actions if needed\n    }\n\n    /**\n     * Applies text alignment style from dropdown selection\n     */\n    async applyTextStyle(event: MouseEvent, classToApply: string) {\n        event.preventDefault();\n        this.classToApply = classToApply;\n        \n        await this.resetUserSelection();\n        await this.surround(null, true);\n        \n        if (this.currentSelection) {\n            this.checkState(this.currentSelection);\n        }\n        \n        this.hideActions();\n\n        (this.getSelection()?.anchorNode?.parentElement?.closest('.ce-paragraph') as HTMLElement)?.focus();\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the block element\n     */\n    private getBlockElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        return element;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const parentModifier = this.findParentModifier();\n        if (!parentModifier) {\n            return false;\n        }\n        \n        this.textAlign.forEach((textAlign) => {\n            if (textAlign.class) {\n                if (parentModifier.classList.contains(textAlign.class)) {\n                    this.nodes.button?.classList.add(textAlign.class);\n                } else {\n                    this.nodes.button?.classList.remove(textAlign.class);\n                }\n            }\n        });\n\n        return true;\n    }\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { ParagraphTextTool } from './tool-type/text-tool.component';\nimport { TextType, TEXT_TYPES } from '../utils/texts.component';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { editorJSI18nDictionnary } from '../../services/editorjs-translation.service';\nimport { SelectedBlocksService } from '../../services/selected-blocks.service';\n\n/**\n * Text Type formatting tool for EditorJS\n * Allows applying different text types (H1, H2, H3, etc.) to selected text or entire blocks\n */\n// @dynamic\nexport class TextTypeTool extends ParagraphTextTool implements InlineTool {\n    public static title = 'Text Type';\n\n    // Tool configuration\n    private readonly commandName: string = 'textType';\n    override tag = 'P';\n    override hasSeparatorBefore = false;\n\n    // CSS configuration\n    override CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--textType',\n        arrowButtonModifier: 'ce-inline-tool--textType__arrow',\n        textSelectionModifier: 'ce-inline-actions--textType',\n    };\n\n    // Text types configuration\n    textTypes: Array<TextType> = TEXT_TYPES;\n\n    // DOM elements\n    override nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    // Services\n    private selectedBlocksService: SelectedBlocksService;\n\n    // Internal state\n    override api: any;\n    private _state: boolean;\n\n    // ============================================================================\n    // STATIC PROPERTIES\n    // ============================================================================\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            h1: {},\n            h2: {},\n            h3: {},\n            h4: {},\n            h5: {},\n            h6: {},\n            p: {},\n        } as SanitizerConfig;\n    }\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state: boolean) {\n        this._state = state;\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n        \n        // Inject service via editor API if available\n        this.selectedBlocksService = (window as any).selectedBlocksService;\n    }\n\n    // ============================================================================\n    // RENDERING METHODS\n    // ============================================================================\n\n    /**\n     * Creates and configures the tool button with dropdown arrow\n     */\n    render(): HTMLElement {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        \n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n        \n        this.nodes.button.addEventListener('click', () => this.openDropdown(event));\n\n        // Add dropdown arrow\n        let dropdownArrow = document.createElement('span');\n        dropdownArrow.classList.add(this.CSS.arrowButtonModifier);\n        this.nodes.button.appendChild(dropdownArrow);\n\n        return this.nodes.button;\n    }\n\n    /**\n     * Creates the dropdown actions menu\n     */\n    renderActions(): HTMLElement {\n        let dropdownCss = this.dropdownCss;\n        let toolsDictionnary: any = null;\n        \n        if (editorJSI18nDictionnary?.messages && editorJSI18nDictionnary.messages.tools) {\n            toolsDictionnary = editorJSI18nDictionnary.messages.tools;\n        }\n        \n        let textTypeDropdown = document.createElement('div');\n        textTypeDropdown.className = this.dropdownCss['container' as keyof typeof dropdownCss] + ' action-hidden ' + this.CSS.textSelectionModifier;\n        \n        this.textTypes.forEach((textType) => {\n            let row = document.createElement('div');\n            row.className = this.dropdownCss['row' as keyof typeof dropdownCss] + '';\n            \n            if (toolsDictionnary) {\n                row.innerText = toolsDictionnary[textType.name as keyof typeof toolsDictionnary];\n            }\n            \n            row.addEventListener('mousedown', (event) => this.applyTextStyle(event, textType.tag ? textType.tag : ''));\n            textTypeDropdown.appendChild(row);\n        });\n        \n        return textTypeDropdown;\n    }\n\n    // ============================================================================\n    // TEXT TYPE APPLICATION METHODS\n    // ============================================================================\n\n    /**\n     * Applies text type formatting to selected text or selected blocks\n     */\n    async surround(range: Range | null, applyStyle: boolean = false) {\n        if (applyStyle) {\n            const selectedBlocks = this.selectedBlocksService?.getSelectedBlocks() || [];\n\n            // If blocks are selected, apply text type to all blocks\n            if (selectedBlocks && selectedBlocks.length > 0) {\n                this.applyTextTypeToSelectedBlocks(selectedBlocks);\n            } else {\n                await this.execCommandStyle(this.tag);\n            }\n            \n            this.checkState(this.getSelection());\n            this.closeDropdown();\n        }\n    }\n\n    /**\n     * Applies text type formatting to all selected blocks\n     */\n    private applyTextTypeToSelectedBlocks(selectedBlocks: Array<{ blockId: string; index: number }>) {\n        selectedBlocks.forEach(({ blockId }) => {\n            this.applyTextTypeToBlock(blockId);\n        });\n    }\n\n    /**\n     * Applies text type formatting to a specific block\n     */\n    private applyTextTypeToBlock(blockId: string) {\n        const block = this.getBlockById(blockId);\n        if (!block) return;\n\n        const textElement = this.getTextElement(block);\n        if (!textElement) return;\n\n        this.applyTextTypeToTextElement(textElement);\n        if (block.dispatchChange) {\n            block.dispatchChange();\n        }\n    }\n\n    /**\n     * Applies text type formatting to a text element\n     */\n    private applyTextTypeToTextElement(textElement: HTMLElement) {\n        // Find the current container element\n        const currentContainer = this.findCurrentContainer(textElement);\n        if (!currentContainer) return;\n\n        // Change the container tag to the new text type\n        this.changeTextTypeContainer(currentContainer);\n    }\n\n    /**\n     * Finds the current container element within the text element\n     */\n    private findCurrentContainer(textElement: HTMLElement): HTMLElement | null {\n        // Look for common text container elements\n        const containerSelectors = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'div'];\n        \n        for (const selector of containerSelectors) {\n            const element = textElement.querySelector(selector);\n            if (element) {\n                return element as HTMLElement;\n            }\n        }\n        \n        // If no specific container found, return the text element itself\n        return textElement;\n    }\n\n    /**\n     * Changes the container tag to the new text type\n     */\n    private changeTextTypeContainer(currentContainer: HTMLElement) {\n        const newTag = this.tag || 'p';\n        \n        // If the current tag is already the target tag, don't change anything\n        if (currentContainer.tagName.toLowerCase() === newTag.toLowerCase()) {\n            return;\n        }\n\n        // Create new element with the target tag\n        const newElement = document.createElement(newTag);\n        \n        // Copy all attributes from the current container\n        Array.from(currentContainer.attributes).forEach(attr => {\n            newElement.setAttribute(attr.name, attr.value);\n        });\n        \n        // Copy all child nodes\n        while (currentContainer.firstChild) {\n            newElement.appendChild(currentContainer.firstChild);\n        }\n        \n        // Replace the current container with the new element\n        currentContainer.parentNode?.replaceChild(newElement, currentContainer);\n    }\n\n    /**\n     * Applies text style from dropdown selection\n     */\n    async applyTextStyle(event: MouseEvent, tag: string) {\n        event.preventDefault();\n        this.tag = tag;\n        \n        await this.resetUserSelection();\n        await this.surround(null, true);\n        \n        if (this.currentSelection) {\n            this.checkState(this.currentSelection);\n        }\n        \n        this.hideActions();\n\n        // Focus back to the paragraph\n        (this.getSelection()?.anchorNode?.parentElement?.closest('.ce-paragraph') as HTMLElement)?.focus();\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    /**\n     * Gets a block by its ID\n     */\n    private getBlockById(blockId: string) {\n        return this.api.blocks.getById(blockId);\n    }\n\n    /**\n     * Gets the editable text element of a block\n     */\n    private getTextElement(block: any): HTMLElement | null {\n        const element = block.holder;\n        if (!(element instanceof HTMLElement)) return null;\n\n        const textElement = element.querySelector('[contenteditable=true]');\n        if (!(textElement instanceof HTMLElement)) return null;\n\n        return textElement;\n    }\n\n    /**\n     * Checks the tool state based on selection\n     */\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        \n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        \n        const parentModifier = this.findParentModifier();\n        if (!parentModifier) {\n            return false;\n        }\n        \n        let classToApply = parentModifier.tagName.toLowerCase();\n        \n        // Remove all text type classes from button\n        this.textTypes.forEach((textType) => {\n            if (textType.tag) {\n                this.nodes.button?.classList.remove(textType.tag.toLowerCase());\n            }\n        });\n\n        // Add the current text type class to button\n        this.nodes.button?.classList.add(classToApply);\n\n        return true;\n    }\n\n    // ============================================================================\n    // DROPDOWN MANAGEMENT METHODS\n    // ============================================================================\n\n    /**\n     * Shows the dropdown actions\n     */\n    showActions(mark: any) {\n        // Implementation for showing actions if needed\n    }\n\n    /**\n     * Hides the dropdown actions\n     */\n    hideActions() {\n        // Implementation for hiding actions if needed\n    }\n}\n","import { InlineTool, InlineToolConstructorOptions, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus, setIsTextEditionTool } from '../editorjs-tool.component';\nimport { TextEditionTool } from './tool-type/text-edition.component';\n\nexport type UndoToolConfig = {\n    undo: () => void;\n};\n\n// @dynamic\nexport class UndoTool extends TextEditionTool implements InlineTool {\n    public static title = 'Undo';\n\n    private readonly commandName: string = 'undo';\n\n    override CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--undo',\n    };\n\n    override nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    override api: any;\n\n    private _state: boolean;\n\n    override tag = '';\n\n    override hasSeparatorBefore = true;\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state) {\n        this._state = state;\n\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    private config!: UndoToolConfig;\n\n    constructor({ api, config }: InlineToolConstructorOptions) {\n        super();\n        this.api = api;\n        this._state = false;\n        this.config = config;\n    }\n\n    render() {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    async surround(range: Range) {\n        setIsTextEditionTool(true);\n        this.undo();\n    }\n\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        return false;\n    }\n\n    undo() {\n        this.config.undo();\n        \n        // Fermer la toolbar de MultiBlockSelectionPlugin si elle est ouverte\n        if (this.api && this.api.toolbar) {\n            this.api.toolbar.close();\n        }\n        \n        // Fermeture manuelle via les classes CSS pour s'assurer que la toolbar se ferme\n        if (this.parentEditor) {\n            const toolbar = this.parentEditor.querySelector('.ce-inline-toolbar.ce-inline-toolbar--showed') as HTMLElement;\n            if (toolbar) {\n                toolbar.classList.remove('ce-inline-toolbar--showed');\n                toolbar.classList.remove('ce-inline-toolbar--block');\n            }\n        }\n    };\n}\n","import { InlineTool, SanitizerConfig } from '@editorjs/editorjs';\nimport { isBlockFocused, setBlockFocus } from '../editorjs-tool.component';\nimport { ParagraphStyleTool } from './tool-type/paragraph-style-tool.component';\n\n// @dynamic\nexport class UnorderedListTool extends ParagraphStyleTool implements InlineTool {\n    public static title = 'Unordered List';\n\n    private readonly commandName: string = 'unorderedList';\n\n    CSS = {\n        button: 'ce-inline-tool',\n        buttonActive: 'ce-inline-tool--active',\n        buttonModifier: 'ce-inline-tool--unorderedList',\n    };\n\n    nodes: { button: HTMLButtonElement | null } = {\n        button: null,\n    };\n\n    override api: any;\n\n    private _state: boolean;\n\n    override tag = 'UL';\n\n    public static get isInline() {\n        return true;\n    }\n\n    public static get sanitize(): SanitizerConfig {\n        return {\n            b: {},\n        } as SanitizerConfig;\n    }\n\n    get state() {\n        return this._state;\n    }\n\n    set state(state) {\n        this._state = state;\n\n        this.nodes.button?.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n    }\n\n    constructor({ api }: { api: any }) {\n        super();\n        this.api = api;\n        this._state = false;\n    }\n\n    render() {\n        this.nodes.button = document.createElement('button') as HTMLButtonElement;\n        this.nodes.button.type = 'button';\n        this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier);\n        if (this.hasSeparatorBefore) {\n            this.nodes.button.classList.add(this.separatorClass);\n        }\n\n        return this.nodes.button;\n    }\n\n    async surround(range: Range) {\n        await this.execCommandStyle(this.tag);\n        this.checkState(this.getSelection());\n    }\n\n    checkState(selection: Selection | null) {\n        if (!this.parentEditor) {\n            this.parentEditor = this.findParentEditor();\n        }\n        if (!isBlockFocused && this.parentEditor) {\n            setBlockFocus(this.parentEditor);\n        }\n        const parentModifier = this.findParentModifier();\n        if (!parentModifier) {\n            return false;\n        }\n        let isActive = parentModifier.tagName.toLowerCase() === this.tag.toLowerCase();\n        this.nodes.button?.classList.toggle(this.CSS.buttonActive, isActive);\n\n        return isActive;\n    }\n}\n","import { I18nConfig } from '@editorjs/editorjs';\n\nexport const enI18nDictionnary: I18nConfig = {\n    messages: {\n        ui: {\n            blockTunes: {\n                toggler: {\n                    'Click to tune': 'Click to tune',\n                    'or drag to move': 'or drag to move',\n                },\n            },\n            toolbar: {\n                toolbox: {\n                    Add: 'Add',\n                },\n            },\n        },\n        toolNames: {\n            'Text Type': 'Text Type',\n            'Text Size': 'Text Size',\n            Undo: 'Undo',\n            Redo: 'Redo',\n            Bold: 'Bold',\n            Italic: 'Italic',\n            Underline: 'Underline',\n            Strike: 'Strike',\n            Capitalize: 'Capitalize',\n            Subscript: 'Subscript',\n            Superscript: 'Superscript',\n            'Text Color': 'Text Color',\n            'Background Color': 'Background Color',\n            Link: 'Link',\n            Quote: 'Quote',\n            'Text Align': 'Text Align',\n            'Ordered List': 'Ordered List',\n            'Unordered List': 'Unordered List',\n            Indent: 'Indent',\n            Outdent: 'Outdent',\n            'Code Edit': 'Code Edit',\n            Clean: 'Clean formatting',\n        },\n        tools: {\n            linkAdd: 'Add a link',\n            linkPlaceholder: 'https://www.myshop.fr or /mylink/',\n            linkExternal: 'External?',\n            linkExternalInfo: 'Opens the link in a new tab',\n            linkObfuscated: 'Obfuscated link?',\n            linkInfo:\n                'Link obfuscation is an advanced SEO technique that consists in hiding a link from search engine robots, while leaving it available for users.  <a href=\"https://wizishop.com/blog/url-obfuscation\" target=\"_blank\">Read more</a>',\n            textBackgroundColorCustomColor: 'Select a custom color :',\n            textBackgroundColorNone: 'None',\n            textColorRecent: 'Used colors',\n            textBackgroundColorRecent: 'Used colors',\n            'Heading 1': 'Heading 1',\n            'Heading 2': 'Heading 2',\n            'Heading 3': 'Heading 3',\n            'Heading 4': 'Heading 4',\n            'Heading 5': 'Heading 5',\n            'Heading 6': 'Heading 6',\n            Paragraph: 'Paragraph',\n            Small: 'Small',\n            Normal: 'Normal',\n            Large: 'Large',\n            Huge: 'Very large',\n            codeEditNotification: 'DIV tags are not allowed in content. Please remove them.',\n            codeEditContentError: 'Error: %tag% not allowed',\n            codeEditCancel: 'Cancel',\n            codeEditSave: 'Save',\n        },\n        blockTunes: {\n            delete: {\n                Delete: 'Delete',\n            },\n            moveUp: {\n                'Move up': 'Move up',\n            },\n            moveDown: {\n                'Move down': 'Move down',\n            },\n        },\n    },\n};\n","import { I18nConfig } from '@editorjs/editorjs';\n\nexport const frI18nDictionnary: I18nConfig = {\n    messages: {\n        ui: {\n            blockTunes: {\n                toggler: {\n                    'Click to tune': 'Cliquer pour régler',\n                    'or drag to move': 'ou faire glisser pour déplacer',\n                },\n            },\n            toolbar: {\n                toolbox: {\n                    Add: 'Ajouter',\n                },\n            },\n        },\n        toolNames: {\n            'Text Type': 'Type de texte',\n            'Text Size': 'Taille de texte',\n            Undo: 'Annuler',\n            Redo: 'Rétablir',\n            Bold: 'Gras',\n            Italic: 'Italique',\n            Underline: 'Souligner',\n            Strike: 'Barrer',\n            Capitalize: 'Majuscules',\n            Subscript: 'Indice',\n            Superscript: 'Exposant',\n            'Text Color': 'Couleur du texte',\n            'Background Color': 'Couleur de surlignage',\n            Link: 'Lien',\n            Quote: 'Citation',\n            'Text Align': 'Alignement du texte',\n            'Ordered List': 'Liste numérotée',\n            'Unordered List': 'Liste à puces',\n            Indent: 'Augmenter le retrait',\n            Outdent: 'Diminuer le retrait',\n            'Code Edit': 'Edition de code',\n            Clean: 'Effacer la mise en forme',\n        },\n        tools: {\n            linkAdd: 'Ajouter un lien',\n            linkPlaceholder: 'https://www.maboutique.fr ou /monlien/',\n            linkExternal: 'Externe ?',\n            linkExternalInfo: 'Ouvre le lien dans un nouvel onglet',\n            linkObfuscated: 'Lien Obfusqué ?',\n            linkInfo:\n                'L\\'obfuscation de liens est une technique SEO avancée qui consiste à cacher un lien aux robots des moteurs de recherche, tout en le laissant accessible pour les internautes. <a href=\"https://www.wizishop.fr/blog/obfuscation-lien\" target=\"_blank\">Découvrir l\\'article complet.</a>',\n            textBackgroundColorCustomColor: 'Sélectionner une couleur personnalisée :',\n            textBackgroundColorNone: 'Aucune',\n            textColorRecent: 'Couleurs utilisées',\n            textBackgroundColorRecent: 'Couleurs utilisées',\n            'Heading 1': 'Titre de niveau 1',\n            'Heading 2': 'Titre de niveau 2',\n            'Heading 3': 'Titre de niveau 3',\n            'Heading 4': 'Titre de niveau 4',\n            'Heading 5': 'Titre de niveau 5',\n            'Heading 6': 'Titre de niveau 6',\n            Paragraph: 'Paragraphe',\n            Small: 'Petit',\n            Normal: 'Normal',\n            Large: 'Grand',\n            Huge: 'Très grand',\n            codeEditNotification: 'Les balises DIV ne sont pas autorisées dans le contenu. Merci de les supprimer.',\n            codeEditContentError: 'Erreur : le tag %tag% est interdit',\n            codeEditCancel: 'Annuler',\n            codeEditSave: 'Enregistrer',\n        },\n        blockTunes: {\n            delete: {\n                Delete: 'Supprimer',\n            },\n            moveUp: {\n                'Move up': 'Déplacer vers le haut',\n            },\n            moveDown: {\n                'Move down': 'Déplacer vers le bas',\n            },\n        },\n    },\n};\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n  providedIn: 'root',\n})\nexport class EditorJSConversionService {\n  container: HTMLElement | null = null;\n\n  classesToReplace = {\n    'ql-size-small': 'we-size-small',\n    'ql-size-large': 'we-size-large',\n    'ql-size-huge': 'we-size-huge',\n    'ql-align-left': 'we-align-left',\n    'ql-align-center': 'we-align-center',\n    'ql-align-right': 'we-align-right',\n    'ql-align-justify': 'we-align-justify',\n    'ql-indent-{input}': 'we-indent-{input}',\n  };\n\n  paragraphTags: Array<string> = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'ol', 'ul', 'li'];\n  strictParagraphTags: Array<string> = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'ol', 'ul'];\n\n  classesToDelete = [/^ce-block/, /^cdx-block/, /^ce-paragraph/, /^wiziblocks__item/, /^width/, /^medium/, /^wizi-wrapper/, /^wizi-txt/];\n\n  tagToIgnore = ['video', 'source', 'iframe', 'table', 'thead', 'tbody', 'tr', 'th', 'td'];\n\n  constructor() {}\n\n  async convert(content: string | null): Promise<string | null> {\n    if (!content) {\n      return null;\n    }\n    content = content.replace(/<p>\\s*<\\/p>/g, '');\n    this.container = document.createElement('div');\n    let tmp = document.createElement('div');\n    tmp.innerHTML = content.replace(/(?<![>])\\n/g, '<br/>');\n    tmp.innerHTML = tmp.innerHTML.replace(/<p><\\/p>/g, '');\n\n    tmp.innerHTML = tmp.innerHTML.split('<b>').join('<strong>').split('<b ').join('<strong ').split('</b>').join('</strong>');\n\n    let textBlock = tmp.querySelector('.wizi-txt__item');\n    if (textBlock && tmp.firstElementChild?.tagName.toLowerCase() === 'div' && tmp.firstElementChild.classList.contains('wiziblocks__item')) {\n      this.container.innerHTML = textBlock.innerHTML;\n    } else {\n      this.container.innerHTML = tmp.innerHTML;\n    }\n\n    this.container = await this.convertCurrentElement(this.container, true);\n\n    if (this.container) {\n      this.splitBlocksAtLineBreaks(this.container);\n    }\n\n    this.container = await this.cleanupContainer(this.container);\n\n    return this.container ? this.container.innerHTML : null;\n  }\n\n  private splitBlocksAtLineBreaks(container: HTMLElement): void {\n    const splitableTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];\n    const blockElements = Array.from(container.querySelectorAll(splitableTags.join(',')));\n\n    for (const blockEl of blockElements) {\n      const childNodes = Array.from(blockEl.childNodes);\n      const hasDirectBr = childNodes.some((node) => node.nodeName === 'BR');\n      if (!hasDirectBr) continue;\n\n      const isEmptyParagraph = childNodes.length === 1 && childNodes[0].nodeName === 'BR';\n      if (isEmptyParagraph) continue;\n\n      const parent = blockEl.parentNode;\n      if (!parent) continue;\n\n      const tagName = blockEl.tagName;\n      let currentBlock = document.createElement(tagName);\n      Array.from(blockEl.attributes).forEach((attr) => currentBlock.setAttribute(attr.name, attr.value));\n\n      for (const childNode of Array.from(blockEl.childNodes)) {\n        if (childNode.nodeName === 'BR') {\n          parent.insertBefore(currentBlock, blockEl);\n          currentBlock = document.createElement(tagName);\n          Array.from(blockEl.attributes).forEach((attr) => currentBlock.setAttribute(attr.name, attr.value));\n        } else {\n          currentBlock.appendChild(childNode.cloneNode(true));\n        }\n      }\n\n      parent.insertBefore(currentBlock, blockEl);\n      parent.removeChild(blockEl);\n    }\n  }\n\n  private async convertCurrentElement(element: HTMLElement, firstTimeCall: boolean = false): Promise<HTMLElement> {\n    if (!element) {\n      return document.createElement('p');\n    }\n\n    const children: HTMLCollection = element.children;\n    for (let currentElement of Array.from(children)) {\n      for (const [quillClass, editorJSClass] of Object.entries(this.classesToReplace)) {\n        if (currentElement.classList.contains(quillClass)) {\n          currentElement.classList.remove(quillClass);\n          currentElement.classList.add(editorJSClass);\n        }\n      }\n\n      if (currentElement.tagName.toLowerCase() === 'div') {\n        let newElement = document.createElement(firstTimeCall ? 'p' : 'span');\n        newElement.innerHTML = currentElement.innerHTML;\n        if (currentElement.parentElement) {\n          currentElement.parentElement.replaceChild(newElement, currentElement);\n        }\n      }\n\n      if (currentElement.children.length > 0) {\n        await this.convertCurrentElement(<HTMLElement>currentElement, false);\n      }\n    }\n    return element;\n  }\n\n  private async cleanupContainer(container: HTMLElement): Promise<HTMLElement | null> {\n    if (!container) return null;\n\n    container.normalize();\n    const children: Node[] = Array.from(container.childNodes);\n\n    for (let currentNode of children) {\n      if (currentNode.nodeType !== Node.ELEMENT_NODE) continue;\n\n      const el = currentNode as HTMLElement;\n\n      if (\n        this.paragraphTags.includes(el.tagName.toLowerCase()) &&\n        el.innerHTML.trim() === ''\n      ) {\n        container.removeChild(el);\n      }\n    }\n\n    return container;\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n@Injectable({\n    providedIn: 'root'\n})\nexport class SelectedBlocksService {\n    private selectedBlocksSubject = new BehaviorSubject<any[]>([]);\n    public selectedBlocks$: Observable<any[]> = this.selectedBlocksSubject.asObservable();\n    \n    private originalSelectionSubject = new BehaviorSubject<Range | null>(null);\n    public originalSelection$: Observable<Range | null> = this.originalSelectionSubject.asObservable();\n\n    constructor() {}\n\n    /**\n     * Met à jour les blocs sélectionnés\n     */\n    updateSelectedBlocks(blocks: any[]): void {\n        this.selectedBlocksSubject.next(blocks);\n    }\n\n    /**\n     * Récupère les blocs actuellement sélectionnés\n     */\n    getSelectedBlocks(): any[] {\n        return this.selectedBlocksSubject.value;\n    }\n\n    /**\n     * Vérifie s'il y a des blocs sélectionnés\n     */\n    hasSelectedBlocks(): boolean {\n        return this.selectedBlocksSubject.value.length > 0;\n    }\n\n    /**\n     * Efface la sélection\n     */\n    clearSelection(): void {\n        this.selectedBlocksSubject.next([]);\n    }\n\n    /**\n     * Stocke la sélection originale\n     */\n    storeOriginalSelection(range: Range | null): void {\n        this.originalSelectionSubject.next(range);\n    }\n\n    /**\n     * Récupère la sélection originale\n     */\n    getOriginalSelection(): Range | null {\n        return this.originalSelectionSubject.value;\n    }\n\n    /**\n     * Efface la sélection originale\n     */\n    clearOriginalSelection(): void {\n        this.originalSelectionSubject.next(null);\n    }\n} ","// ============================================================================\n// IMPORTS\n// ============================================================================\n\n// Angular Core\nimport { ChangeDetectorRef, Component, HostListener, Input, NgZone, OnInit, ViewEncapsulation } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n// Third-party libraries\nimport { v4 as uuid } from 'uuid';\nimport EditorJS, { I18nConfig, ToolConstructable } from '@editorjs/editorjs';\nimport MultiBlockSelectionPlugin from 'editorjs-multiblock-selection-plugin';\nimport { TranslateService } from '@ngx-translate/core';\n\n// Services\nimport { EditorJSConversionService } from './services/editorjs-conversion.service';\nimport { EditorJSTranslationService } from './services/editorjs-translation.service';\nimport { HistoryService } from './services/history.service';\nimport { SelectedBlocksService } from './services/selected-blocks.service';\n\n// Inline Tools\nimport { BoldTool } from './tools/inline/bold-tool.component';\nimport { CapitalizeTool } from './tools/inline/capitalize-tool.component';\nimport { CleanTool } from './tools/inline/clean-tool.component';\nimport { ItalicTool } from './tools/inline/italic-tool.component';\nimport { LinkTool } from './tools/inline/link-tool.component';\nimport { StrikeTool } from './tools/inline/strike-tool.component';\nimport { SubscriptTool } from './tools/inline/subscript-tool.component';\nimport { SuperscriptTool } from './tools/inline/superscript-tool.component';\nimport { TextBackgroundColorTool } from './tools/inline/text-background-color-tool.component';\nimport { TextColorTool } from './tools/inline/text-color-tool.component';\nimport { textSizeTool } from './tools/inline/text-size-tool.component';\nimport { UnderlineTool } from './tools/inline/underline-tool.component';\n\n// Paragraph Tools\nimport { CodeEditTool } from './tools/paragraph/code-edit-tool.component';\nimport { IndentTool } from './tools/paragraph/indent-tool.component';\nimport { OrderedListTool } from './tools/paragraph/ordered-list-tool.component';\nimport { OutdentTool } from './tools/paragraph/outdent-tool.component';\nimport { QuoteTool } from './tools/paragraph/quote-tool.component';\nimport { RedoTool, RedoToolConfig } from './tools/paragraph/redo-tool.component';\nimport { TextAlignTool } from './tools/paragraph/text-align-tool.component';\nimport { TextTypeTool } from './tools/paragraph/text-type-tool.component';\nimport { UndoTool, UndoToolConfig } from './tools/paragraph/undo-tool.component';\nimport { UnorderedListTool } from './tools/paragraph/unordered-list-tool.component';\n\n// Utilities\nimport { isTextEditionTool, setContainerSelector, setIsTextEditionTool } from './tools/editorjs-tool.component';\nimport { enI18nDictionnary } from './tools/utils/i18n/en-i18n.component';\nimport { frI18nDictionnary } from './tools/utils/i18n/fr-i18n.component';\nimport { onEditList, setlistApiEditor } from './tools/utils/list.component';\nimport { createRange, getCursorPosition, getSelection, isAnchorBeforeFocus, mergeBlocks, resetCursorPosition } from './tools/utils/selection.component';\n\n// ============================================================================\n// GLOBAL VARIABLES\n// ============================================================================\n\nlet windowBlur: boolean = false;\n\n// ============================================================================\n// COMPONENT DECORATOR\n// ============================================================================\n\n@Component({\n    standalone: false,\n    selector: 'wz-editor',\n    templateUrl: './wizi-editor.component.html',\n    styleUrls: ['./wizi-editor.component.scss'],\n    providers: [\n        { provide: NG_VALUE_ACCESSOR, useExisting: WiziEditorComponent, multi: true },\n        HistoryService\n    ],\n    encapsulation: ViewEncapsulation.None,\n    // changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class WiziEditorComponent implements OnInit, ControlValueAccessor {\n\n    // ============================================================================\n    // INPUT PROPERTIES\n    // ============================================================================\n\n    @Input() placeholder: string | null = null;\n    @Input() position: 'top' | 'bottom' = 'bottom';\n    @Input() containerSelector: string | null = null;\n\n    // ============================================================================\n    // PUBLIC PROPERTIES\n    // ============================================================================\n\n    public disabled = false;\n    public textError = '';\n    public editor: any;\n    public uuid = uuid();\n    public blockSelection: any;\n    public selectedBlocks = [];\n\n    // ============================================================================\n    // PRIVATE PROPERTIES\n    // ============================================================================\n\n    private _content: string | null = '';\n    private timeoutHandle: any = null;\n    private timeoutTextEditionHandle: any = null;\n    private onChangeTimeoutHandle: any = null;\n    private editorInitialized: boolean = false;\n    private isInitializing = true;\n    private toolbarRepositionObserver: MutationObserver | null = null;\n    private lastRepositionTime: number = 0;\n    private lastSelectionPosition: { left: number; top: number; right: number; bottom: number; width: number; height: number } | null = null;\n    private lastCalculatedPosition: { left: number; top: number } | null = null;\n    private isUndoRedoing = false;\n\n    // Configuration constants\n    private readonly wrapperTags = 'h1,h2,h3,h4,h5,h6,p,ul,ol,blockquote';\n    private readonly editTimeout = 50;\n    private readonly historyTimeout = 300;\n\n    // Toolbar positioning configuration\n    private readonly TOOLBAR_CONFIG = {\n        MAX_WIDTH_VW: 0.9,        // Maximum width as percentage of viewport\n        BASE_MARGIN: 10,           // Base safety margin in pixels (réduit pour être plus proche)\n        SAFETY_MARGIN: 30,        // Larger safety margin to avoid toolbar being too close (réduit)\n        MINIMAL_MARGIN: 5,        // Marge minimale pour positionner au plus près du texte\n        LEFT_MARGIN_VW: 0.05,     // Left margin as percentage of viewport\n        INIT_DELAY: 100,          // Initialization delay\n        REPOSITION_DELAY: 10,     // Reposition delay\n        STYLE_DELAY: 10           // Style change delay\n    };\n\n    // ============================================================================\n    // GETTERS AND SETTERS\n    // ============================================================================\n\n    get content(): string | null {\n        return this._content;\n    }\n\n    set content(content: string | null) {\n        if (this.disabled) {\n            return;\n        }\n        this._content = content;\n        if (!this.isInitializing) {\n            this.applyContent();\n        }\n    }\n\n    // ============================================================================\n    // CONSTRUCTOR\n    // ============================================================================\n\n    constructor(\n        private translateService: TranslateService,\n        private editorJSConversionService: EditorJSConversionService,\n        private editorJSTranslationService: EditorJSTranslationService,\n        private changeDetectorRef: ChangeDetectorRef,\n        private ngZone: NgZone,\n        public historyService: HistoryService<string>,\n        private selectedBlocksService: SelectedBlocksService\n    ) {}\n\n    // ============================================================================\n    // LIFECYCLE HOOKS\n    // ============================================================================\n\n    async ngOnInit(): Promise<void> {\n        // Make the service globally accessible for tools\n        (window as any).selectedBlocksService = this.selectedBlocksService;\n\n        this.ngZone.runOutsideAngular(() => {\n            this.initEditor();\n        });\n    }\n\n    ngOnDestroy(): void {\n        const editorName = 'editorJs-' + this.uuid;\n        if (this.editor && typeof this.editor.destroy === 'function') {\n            this.editor.destroy();\n        }\n\n        // Clean up the mutation observer to prevent memory leaks\n        if (this.toolbarRepositionObserver) {\n            this.toolbarRepositionObserver.disconnect();\n            this.toolbarRepositionObserver = null;\n        }\n\n        // Nettoyer l'observateur de style\n        if ((this as any).styleObserver) {\n            (this as any).styleObserver.disconnect();\n            (this as any).styleObserver = null;\n        }\n    }\n\n    // ============================================================================\n    // CONTROL VALUE ACCESSOR IMPLEMENTATION\n    // ============================================================================\n\n    private onChange: (content: string) => void = (content) => { };\n\n    writeValue(content: string): void {\n        this.content = content;\n    }\n\n    registerOnChange(onChange: any): void {\n        this.onChange = onChange;\n    }\n\n    onBlur(): void {\n        this.onTouched();\n    }\n\n    private onTouched = () => { };\n\n    registerOnTouched(onTouched: any): void {\n        this.onTouched = onTouched;\n    }\n\n    setDisabledState(disabled: boolean) {\n        this.disabled = disabled;\n        this.changeDetectorRef.markForCheck();\n    }\n\n    // ============================================================================\n    // EVENT HANDLERS\n    // ============================================================================\n\n  @HostListener('document:keydown', ['$event'])\n  async onKeyDown($event: KeyboardEvent) {\n\n    const currentEditor = document.getElementById('editorJs-' + this.uuid);\n    const activeEl = document.activeElement as HTMLElement | null;\n    const isEditorFocused = currentEditor && activeEl && currentEditor.contains(activeEl) && !!activeEl.closest('[contenteditable=\"true\"]');\n\n    // Block native browser undo/redo on this editor's contenteditable even when not focused\n    if (($event.metaKey || $event.ctrlKey) && ($event.key.toLowerCase() === 'z' || $event.key.toLowerCase() === 'y')) {\n      if (!isEditorFocused) return;\n      $event.preventDefault();\n      await this.handleUndoRedo($event);\n      return;\n    }\n\n    if (!isEditorFocused) return;\n\n    if ($event.key === 'Delete') {\n      await this.handleDeleteKey($event);\n      return;\n    }\n\n    if ($event.key === 'Backspace') {\n      await this.handleBackspaceKey($event);\n      return;\n    }\n  }\n\n    // ============================================================================\n    // KEYBOARD EVENT HANDLERS\n    // ============================================================================\n\n    private async handleDeleteKey($event: KeyboardEvent): Promise<void> {\n        let selection = this.getSelection();\n        if (!selection) return;\n\n        const currentEditor = document.querySelectorAll('#editorJs-' + this.uuid)[0];\n\n        // Del key has been pressed when multiple blocks are selected\n        if (!selection.anchorNode && !selection.focusNode) {\n            const blocks = Array.from(currentEditor.querySelectorAll('.ce-block'));\n            let i = -1;\n            while ((i = blocks.findIndex((value: Element) => value.classList.contains('ce-block--selected'))) !== -1) {\n                this.editor.blocks.delete(i);\n                blocks.splice(i, 1);\n            }\n            return;\n        }\n\n        if (selection.anchorNode && selection.anchorNode.parentElement) {\n            let parentModifier = selection.anchorNode.parentElement?.closest('.ce-paragraph')?.children[0];\n            if (parentModifier) {\n                let contentLength = parentModifier.textContent?.length ?? -1;\n                let cursorPos = await getCursorPosition(parentModifier);\n                // del at the end of a line\n                if ((cursorPos === contentLength - 1) || cursorPos === contentLength) {\n                    $event.preventDefault();\n                    mergeBlocks(currentEditor, this.editor, this.editor.blocks.getCurrentBlockIndex(), this.editor.blocks.getCurrentBlockIndex() + 1);\n                }\n            }\n        }\n    }\n\n    private async handleBackspaceKey($event: KeyboardEvent): Promise<void> {\n        let selection = this.getSelection();\n        if (!selection || !selection.anchorNode) return;\n\n        const currentEditor = document.querySelectorAll('#editorJs-' + this.uuid)[0];\n        let parentModifier = selection.anchorNode.parentElement?.closest('.ce-paragraph')?.children[0];\n        if (parentModifier) {\n            let cursorPos = await getCursorPosition(parentModifier);\n            // backspace at the beginning of a line\n            if (cursorPos === 0 && (selection.getRangeAt(0).toString().length === 0)) {\n                $event.preventDefault();\n                let currentBlockIndex = this.editor.blocks.getCurrentBlockIndex();\n                mergeBlocks(currentEditor, this.editor, currentBlockIndex);\n            }\n        }\n    }\n\n    private async handleUndoRedo($event: KeyboardEvent): Promise<void> {\n        const currentEditor = document.querySelectorAll('#editorJs-' + this.uuid)[0];\n        const currentBlockIndex = this.editor.blocks.getCurrentBlockIndex();\n        const currentLength = currentEditor.querySelectorAll('.ce-paragraph')[currentBlockIndex].textContent?.length ?? 0;\n        const cursorPos = await getCursorPosition(currentEditor);\n\n        this.setUndoRedoing(true);\n        if ($event.key === 'z') {\n            this.content = this.historyService.undo();\n        } else {\n            this.content = this.historyService.redo();\n        }\n\n        // Restore cursor after contentChanged/checkWrapper cycle has completed\n        // (onChange fires after editTimeout=50ms, then checkWrapper manipulates DOM)\n        setTimeout(() => {\n            const blocks = currentEditor.querySelectorAll('.ce-block');\n            const blockIndex = Math.min(currentBlockIndex, blocks.length - 1);\n            const focusedBlock = blocks[blockIndex];\n            if (focusedBlock) {\n                const paragraph = focusedBlock.querySelector('.ce-paragraph');\n                if (paragraph) {\n                    const newLength = paragraph.textContent?.length ?? 0;\n                    const pos = Math.min(cursorPos + (newLength - currentLength), newLength);\n                    resetCursorPosition(Math.max(0, pos), Math.max(0, pos), paragraph);\n                }\n            }\n        }, this.editTimeout + 50);\n    }\n\n    // ============================================================================\n    // HISTORY MANAGEMENT\n    // ============================================================================\n\n    private undo = () => {\n        this.setUndoRedoing(true);\n        this.content = this.historyService.undo();\n    }\n\n    private redo = () => {\n        this.setUndoRedoing(true);\n        this.content = this.historyService.redo();\n    }\n\n    private undoRedoTimeout: any = null;\n\n    private setUndoRedoing(value: boolean): void {\n        this.isUndoRedoing = value;\n        if (value) {\n            if (this.undoRedoTimeout) clearTimeout(this.undoRedoTimeout);\n            // Reset after onChange has had time to fire (editTimeout=50 + historyTimeout=300 + margin)\n            this.undoRedoTimeout = setTimeout(() => {\n                this.isUndoRedoing = false;\n            }, 500);\n        }\n    }\n\n    // ============================================================================\n    // EDITOR INITIALIZATION\n    // ============================================================================\n\n    async initEditor() {\n        this.handleDefaultContentTranslation();\n        this.editor = new EditorJS({\n            holder: 'editorJs-' + this.uuid,\n            tools: this.getEditorTools(),\n            placeholder: this.placeholder ? this.placeholder : '',\n            autofocus: false,\n            onChange: (api, event) => {\n                if (this.onChangeTimeoutHandle) {\n                    clearTimeout(this.onChangeTimeoutHandle);\n                }\n                // added timeout here to prevent empty output on paste\n                // see issue https://github.com/codex-team/editor.js/issues/1755\n                this.onChangeTimeoutHandle = setTimeout(() => {\n                    this.contentChanged();\n                }, this.editTimeout);\n            },\n            i18n: this.getI18nDictionnary(),\n        });\n\n        await this.initializeBlockSelection();\n        await this.finalizeEditorInitialization();\n    }\n\n    private getEditorTools() {\n        return {\n            textType: TextTypeTool,\n            textSize: textSizeTool,\n            undo: {\n                class: (UndoTool as unknown as ToolConstructable),\n                config: {\n                    undo: this.undo,\n                } satisfies UndoToolConfig\n            },\n            redo: {\n                class: (RedoTool as unknown as ToolConstructable),\n                config: {\n                    redo: this.redo,\n                } satisfies RedoToolConfig\n            },\n            bold: BoldTool,\n            italic: ItalicTool,\n            underline: UnderlineTool,\n            strike: StrikeTool,\n            capitalize: CapitalizeTool,\n            subscript: SubscriptTool,\n            superscript: SuperscriptTool,\n            textColor: TextColorTool,\n            textBackgroundColor: TextBackgroundColorTool,\n            link: LinkTool,\n            quote: QuoteTool,\n            textAlign: TextAlignTool,\n            orderedList: OrderedListTool,\n            unorderedList: UnorderedListTool,\n            indent: IndentTool,\n            outdent: OutdentTool,\n            clean: CleanTool,\n            codeEdit: CodeEditTool,\n            paragraph: {\n                inlineToolbar: [\n                    'textType',\n                    'textSize',\n                    'undo',\n                    'redo',\n                    'bold',\n                    'italic',\n                    'underline',\n                    'strike',\n                    'capitalize',\n                    'subscript',\n                    'superscript',\n                    'textColor',\n                    'textBackgroundColor',\n                    'link',\n                    'quote',\n                    'textAlign',\n                    'orderedList',\n                    'unorderedList',\n                    'indent',\n                    'outdent',\n                    'clean',\n                    'codeEdit',\n                ],\n            },\n        };\n    }\n\n    private async initializeBlockSelection(): Promise<void> {\n        // Initialize multi-block selection plugin\n        this.blockSelection = new MultiBlockSelectionPlugin({\n            editor: this.editor,\n            version: EditorJS.version,\n            onBeforeToolbarOpen: (toolbar: HTMLElement) => {\n                toolbar.classList.add('ce-inline-toolbar--block');\n                this.repositionToolbarBasedOnSelection(toolbar);\n            },\n            onAfterToolbarClose: (toolbar: HTMLElement) => {\n                toolbar.classList.remove('ce-inline-toolbar--block');\n            }\n        });\n\n        await this.editor.isReady;\n        this.blockSelection.listen();\n\n        window.addEventListener(MultiBlockSelectionPlugin.SELECTION_CHANGE_EVENT, (event: Event) => {\n            const customEvent = event as CustomEvent;\n            this.selectedBlocks = customEvent.detail.selectedBlocks;\n            this.selectedBlocksService.updateSelectedBlocks(this.selectedBlocks);\n        });\n    }\n\n    private async finalizeEditorInitialization(): Promise<void> {\n        try {\n            this.editorJSTranslationService.setDictionnary(this.getI18nDictionnary());\n            this.editorJSConversionService.convert(this._content).then((content) => {\n                this.content = content;\n                this.editor.blocks.clear();\n                this.applyContent();\n                this.setupEditorElement();\n            });\n        } catch (reason) {\n            console.error(`Editor.js initialization failed because of ${reason}`);\n        }\n    }\n\n    private setupEditorElement(): void {\n        const editorElement = document.getElementById('editorJs-' + this.uuid);\n        if (editorElement) {\n            if (this.containerSelector) {\n                setContainerSelector(this.containerSelector);\n            }\n            editorElement.addEventListener('focusin', () => {\n                setlistApiEditor(this.editor, editorElement);\n            });\n\n            // Block native browser undo/redo on contenteditable elements\n            editorElement.addEventListener('beforeinput', (e: InputEvent) => {\n                if (e.inputType === 'historyUndo' || e.inputType === 'historyRedo') {\n                    e.preventDefault();\n                }\n            });\n\n            // Configurer le repositionnement de la toolbar\n            this.setupToolbarRepositioning();\n        } else {\n            console.error(`Error : editorElement not found`);\n        }\n    }\n\n    // ============================================================================\n    // TOOLBAR POSITIONING\n    // ============================================================================\n\n    private setupToolbarRepositioning(): void {\n        const editorElement = document.getElementById('editorJs-' + this.uuid);\n        if (!editorElement) return;\n\n        // Wait for editor to be fully initialized\n        setTimeout(() => {\n            const inlineToolbar = editorElement.querySelector('.ce-inline-toolbar') as HTMLElement;\n            if (!inlineToolbar) return;\n\n            this.setupToolbarObservers(inlineToolbar);\n\n            // Add double-click listener to force repositioning\n            editorElement.addEventListener('dblclick', () => {\n                setTimeout(() => {\n                    if (inlineToolbar.classList.contains('ce-inline-toolbar--showed')) {\n                        this.repositionToolbarBasedOnSelection(inlineToolbar);\n                    }\n                }, this.TOOLBAR_CONFIG.REPOSITION_DELAY);\n            });\n        }, this.TOOLBAR_CONFIG.INIT_DELAY);\n    }\n\n    private setupToolbarObservers(toolbar: HTMLElement): void {\n        // Create mutation observer to reposition toolbar when it becomes visible\n        this.toolbarRepositionObserver = new MutationObserver(() => {\n            if (toolbar.classList.contains('ce-inline-toolbar--showed')) {\n                this.repositionToolbarBasedOnSelection(toolbar);\n            }\n        });\n\n        // Observe class changes to detect when toolbar appears\n        this.toolbarRepositionObserver.observe(toolbar, {\n            attributes: true,\n            attributeFilter: ['class']\n        });\n\n        // Also observe style changes to intercept EditorJS repositioning\n        this.toolbarRepositionObserver.observe(toolbar, {\n            attributes: true,\n            attributeFilter: ['style']\n        });\n    }\n\n    private repositionToolbarBasedOnSelection(toolbar: HTMLElement): void {\n        const positioningInfo = this.getPositioningInfo();\n        if (!positioningInfo) return;\n\n        if (!this.shouldReposition(toolbar, positioningInfo)) return;\n\n        // Store the current selection position for future comparison\n        this.lastSelectionPosition = { ...positioningInfo };\n\n        const toolbarRect = toolbar.getBoundingClientRect();\n        const toolbarContainer = toolbar.offsetParent as HTMLElement;\n        if (!toolbarContainer) return;\n\n        const containerRect = toolbarContainer.getBoundingClientRect();\n        const positioningConstraints = this.calculatePositioningConstraints(toolbarRect);\n\n        const relativeCoordinates = this.convertToContainerCoordinates(positioningInfo, containerRect);\n\n        const horizontalPosition = Math.round(this.calculateHorizontalPosition(relativeCoordinates, positioningConstraints, containerRect));\n        const verticalPosition = Math.round(this.calculateVerticalPosition(relativeCoordinates, positioningConstraints, containerRect));\n\n        // Store the calculated position for future restoration\n        this.lastCalculatedPosition = { left: horizontalPosition, top: verticalPosition };\n        this.applyToolbarPosition(toolbar, horizontalPosition, verticalPosition);\n    }\n\n    private shouldReposition(toolbar: HTMLElement, positioningInfo: { left: number; top: number; right: number; bottom: number; width: number; height: number }): boolean {\n        // Check if the selection position has changed\n        if (this.lastSelectionPosition &&\n            this.lastSelectionPosition.left === positioningInfo.left &&\n            this.lastSelectionPosition.top === positioningInfo.top &&\n            this.lastSelectionPosition.right === positioningInfo.right &&\n            this.lastSelectionPosition.bottom === positioningInfo.bottom &&\n            this.lastSelectionPosition.width === positioningInfo.width &&\n            this.lastSelectionPosition.height === positioningInfo.height) {\n                // Check if toolbar position has changed and restore it if needed\n                const currentTop = parseInt(toolbar.style.top) || 0;\n                const currentLeft = parseInt(toolbar.style.left) || 0;\n\n                if (this.lastCalculatedPosition &&\n                    (currentTop !== this.lastCalculatedPosition.top || currentLeft !== this.lastCalculatedPosition.left)) {\n                    this.applyToolbarPosition(toolbar, this.lastCalculatedPosition.left, this.lastCalculatedPosition.top);\n                }\n                return false; // Selection hasn't changed, no need to reposition\n        }\n        return true;\n    }\n\n    private getPositioningInfo(): { left: number; top: number; right: number; bottom: number; width: number; height: number } | null {\n        // Check for multi-block selection first\n        const multiBlockInfo = this.multiBlockPositions();\n\n        if (multiBlockInfo) {\n            return multiBlockInfo;\n        }\n\n        // Use text selection positioning\n        const selection = window.getSelection();\n        if (!selection || !selection.rangeCount) {\n            return null;\n        }\n\n        const range = selection.getRangeAt(0);\n        const selectionRect = range.getBoundingClientRect();\n\n        return {\n            left: selectionRect.left,\n            top: selectionRect.top,\n            right: selectionRect.right,\n            bottom: selectionRect.bottom,\n            width: selectionRect.width,\n            height: selectionRect.height\n        };\n    }\n\n    private calculatePositioningConstraints(toolbarRect: DOMRect) {\n        return {\n            width: Math.min(toolbarRect.width, window.innerWidth * this.TOOLBAR_CONFIG.MAX_WIDTH_VW),\n            height: toolbarRect.height,\n            baseMargin: this.TOOLBAR_CONFIG.BASE_MARGIN,\n            safetyMargin: this.TOOLBAR_CONFIG.SAFETY_MARGIN,\n            minimalMargin: this.TOOLBAR_CONFIG.MINIMAL_MARGIN,\n            leftMargin: window.innerWidth * this.TOOLBAR_CONFIG.LEFT_MARGIN_VW\n        };\n    }\n\n    private convertToContainerCoordinates(\n        positioningInfo: { left: number; top: number; right: number; bottom: number; width: number; height: number },\n        containerRect: DOMRect\n    ) {\n        return {\n            left: positioningInfo.left - containerRect.left,\n            top: positioningInfo.top - containerRect.top,\n            right: positioningInfo.right - containerRect.left,\n            bottom: positioningInfo.bottom - containerRect.top,\n            width: positioningInfo.width,\n            height: positioningInfo.height\n        };\n    }\n\n    private calculateHorizontalPosition(\n        relativeCoordinates: { left: number; top: number; right: number; bottom: number; width: number; height: number },\n        constraints: { width: number; height: number; baseMargin: number; safetyMargin: number; leftMargin: number },\n        containerRect: DOMRect\n    ): number {\n        let left = relativeCoordinates.left + (relativeCoordinates.width / 2) - (constraints.width / 2);\n\n        if (left < -constraints.baseMargin) {\n            // Too far left, allow overflow from container\n            const containerLeftPosition = containerRect.left;\n            const maxLeftOffset = Math.max(-constraints.width + constraints.leftMargin, -containerLeftPosition + constraints.leftMargin);\n            left = maxLeftOffset;\n        } else if (left + constraints.width > containerRect.width + constraints.baseMargin) {\n            // Too far right, stick to container right edge\n            left = containerRect.width - constraints.width + constraints.baseMargin;\n        }\n\n        return left;\n    }\n\n    private calculateVerticalPosition(\n        relativeCoordinates: { left: number; top: number; right: number; bottom: number; width: number; height: number },\n        constraints: { width: number; height: number; baseMargin: number; safetyMargin: number; minimalMargin: number; leftMargin: number },\n        containerRect: DOMRect\n    ): number {\n        const spaceAbove = relativeCoordinates.top + containerRect.top; // Distance from positioning top to viewport top\n        const spaceBelow = window.innerHeight - (relativeCoordinates.bottom + containerRect.top); // Distance from positioning bottom to viewport bottom\n        const requiredSpace = constraints.height + constraints.baseMargin;\n        const requiredSpaceWithSafety = constraints.height + constraints.safetyMargin;\n\n        // Marge minimale pour positionner la toolbar au plus près du texte\n        const minimalMargin = constraints.minimalMargin;\n\n        let top: number;\n\n        // Priorité 1: Positionner au-dessus du texte avec marge minimale si possible\n        if (spaceAbove >= constraints.height + minimalMargin) {\n            // Assez d'espace au-dessus, positionner avec marge minimale\n            top = relativeCoordinates.top - constraints.height - minimalMargin;\n\n            // Vérifier que la toolbar ne sort pas du viewport\n            const absoluteTop = top + containerRect.top;\n            if (absoluteTop < 0) {\n                // Ajuster pour rester dans le viewport\n                top = -containerRect.top + 5; // 5px de marge du haut du viewport\n            }\n        }\n        // Priorité 2: Positionner au-dessus avec marge de sécurité si espace suffisant\n        else if (spaceAbove >= requiredSpaceWithSafety) {\n            top = relativeCoordinates.top - constraints.height - constraints.safetyMargin;\n        }\n        // Priorité 3: Positionner au-dessus avec marge de base\n        else if (spaceAbove >= requiredSpace) {\n            top = relativeCoordinates.top - constraints.height - constraints.baseMargin;\n        }\n        // Priorité 4: Positionner en dessous avec marge minimale si possible\n        else if (spaceBelow >= constraints.height + minimalMargin) {\n            top = relativeCoordinates.bottom + minimalMargin;\n\n            // Vérifier que la toolbar ne sort pas du viewport\n            const absoluteBottom = top + constraints.height + containerRect.top;\n            if (absoluteBottom > window.innerHeight) {\n                // Ajuster pour rester dans le viewport\n                top = window.innerHeight - containerRect.top - constraints.height - 5; // 5px de marge du bas du viewport\n            }\n        }\n        // Priorité 5: Positionner en dessous avec marge de sécurité\n        else if (spaceBelow >= requiredSpaceWithSafety) {\n            top = relativeCoordinates.bottom + constraints.safetyMargin;\n        }\n        // Priorité 6: Positionner en dessous avec marge de base\n        else if (spaceBelow >= requiredSpace) {\n            top = relativeCoordinates.bottom + constraints.baseMargin;\n        }\n        // Dernière option: Centrer dans le container\n        else {\n            top = (containerRect.height / 2) - (constraints.height / 2);\n\n            // S'assurer que la toolbar reste dans les limites du container\n            if (top < -constraints.baseMargin) {\n                top = -constraints.baseMargin;\n            } else if (top + constraints.height > containerRect.height + constraints.baseMargin) {\n                top = containerRect.height - constraints.height + constraints.baseMargin;\n            }\n        }\n\n        return top;\n    }\n\n    private applyToolbarPosition(toolbar: HTMLElement, left: number, top: number): void {\n        // Check if the current position already matches the new values\n        const currentTop = parseInt(toolbar.style.top) || 0;\n        const currentLeft = parseInt(toolbar.style.left) || 0;\n\n        if (currentTop === top && currentLeft === left) {\n            return;\n        }\n\n        toolbar.style.top = `${top}px`;\n        toolbar.style.left = `${left}px`;\n        toolbar.style.transform = 'none';\n\n        // S'assurer que la toolbar est au-dessus de tous les autres éléments\n        const highestZIndex = this.getHighestZIndex();\n        toolbar.style.zIndex = `${highestZIndex + 1}`;\n    }\n\n    private getHighestZIndex(): number {\n        let highestZIndex = 0;\n\n        // Parcourir tous les éléments de la page\n        const allElements = document.querySelectorAll('*');\n\n        allElements.forEach((element) => {\n            const computedStyle = window.getComputedStyle(element);\n            const zIndex = parseInt(computedStyle.zIndex);\n\n            // Vérifier si le z-index est valide et plus élevé que le maximum actuel\n            if (!isNaN(zIndex) && zIndex > highestZIndex) {\n                highestZIndex = zIndex;\n            }\n        });\n\n        // Retourner au minimum 1000 pour s'assurer que la toolbar soit visible\n        return Math.max(highestZIndex, 1000);\n    }\n\n    private multiBlockPositions(): { left: number; top: number; right: number; bottom: number; width: number; height: number } | null {\n        const selectedBlocks = this.selectedBlocksService.getSelectedBlocks();\n        if (selectedBlocks.length === 0) return null;\n\n        const editorElement = document.getElementById('editorJs-' + this.uuid);\n        if (!editorElement) return null;\n\n        const blockElements = this.findSelectedBlockElements(editorElement, selectedBlocks);\n        if (blockElements.length === 0) return null;\n\n        return this.calculateBoundingBox(blockElements);\n    }\n\n    private findSelectedBlockElements(editorElement: HTMLElement, selectedBlocks: any[]): HTMLElement[] {\n        // Try to find blocks with ce-block--selected class first (most efficient)\n        let blockElements = Array.from(editorElement.querySelectorAll('.ce-block--selected')) as HTMLElement[];\n\n        // If no elements found, try with ce-block class and index\n        if (blockElements.length === 0) {\n            const allBlockElements = editorElement.querySelectorAll('.ce-block');\n\n            blockElements = selectedBlocks.map((block: any) => {\n                // Try to find by index if block has index property\n                if (block.index !== undefined && allBlockElements[block.index]) {\n                    return allBlockElements[block.index] as HTMLElement;\n                }\n                return null;\n            }).filter((element): element is HTMLElement => element !== null);\n        }\n\n        return blockElements;\n    }\n\n    private calculateBoundingBox(blockElements: HTMLElement[]): { left: number; top: number; right: number; bottom: number; width: number; height: number } {\n        let minLeft = Infinity;\n        let minTop = Infinity;\n        let maxRight = -Infinity;\n        let maxBottom = -Infinity;\n\n        blockElements.forEach((element) => {\n            const rect = element.getBoundingClientRect();\n            minLeft = Math.min(minLeft, rect.left);\n            minTop = Math.min(minTop, rect.top);\n            maxRight = Math.max(maxRight, rect.right);\n            maxBottom = Math.max(maxBottom, rect.bottom);\n        });\n\n        return {\n            left: minLeft,\n            top: minTop,\n            right: maxRight,\n            bottom: maxBottom,\n            width: maxRight - minLeft,\n            height: maxBottom - minTop\n        };\n    }\n\n    // ============================================================================\n    // CONTENT MANAGEMENT\n    // ============================================================================\n\n    handleDefaultContentTranslation() {\n        if (!this._content) {\n            return;\n        }\n        this._content = /^wb\\./.test(this._content) ? this.translateService.instant(this._content) : this._content;\n    }\n\n    contentChanged() {\n        if (this.editor) {\n            this.checkSingleChild();\n            this.checkWrapper();\n            this.editor\n                .save()\n                .then(() => {\n                    this._content = this.getEditorContent();\n                    if (!this.editorInitialized) {\n                        this.handleSaveEditor(this._content);\n                        this.editorInitialized = true;\n                    } else {\n                        this.saveEditorContent(this._content);\n                    }\n                    if (!this.isInitializing) {\n                        this.ngZone.run(() => {\n                            this.onChange(this._content ? this._content : '');\n                        });\n                    } else {\n                        setTimeout(() => {\n                            this.isInitializing = false;\n                        }, 500);\n                    }\n                })\n                .catch((error: any) => {\n                    console.error('Saving EditorJS content failed: ', error);\n                });\n        }\n    }\n\n    // ============================================================================\n    // DOM MANIPULATION AND VALIDATION\n    // ============================================================================\n\n    private checkSingleChild() {\n        let currentEditor = document.querySelectorAll('#editorJs-' + this.uuid)[0];\n        let singleBlock = currentEditor.querySelectorAll('.codex-editor__redactor .ce-block:only-child');\n        let toolbar = currentEditor.querySelectorAll('.ce-toolbar__actions')[0];\n        if (singleBlock.length === 1) {\n            if (!toolbar.classList.contains('tools-hidden')) {\n                toolbar.classList.add('tools-hidden');\n            }\n        } else {\n            if (toolbar.classList.contains('tools-hidden')) {\n                toolbar.classList.remove('tools-hidden');\n            }\n        }\n    }\n\n    private async checkWrapper() {\n        let currentEditor = document.querySelector('#editorJs-' + this.uuid);\n        let currentBlockIndex = this.editor.blocks.getCurrentBlockIndex();\n        if (currentEditor) {\n            let editorBlocks = currentEditor.querySelectorAll('.codex-editor__redactor .ce-paragraph');\n            if (editorBlocks.length === 1 && (<HTMLElement>editorBlocks[0]).innerText.length === 0) {\n                return;\n            }\n            editorBlocks.forEach((block, index) => {\n                this.cleanBlockContent(block);\n                if (!this.hasWrapper(block)) {\n                    this.formatBlock(block, index === currentBlockIndex);\n                }\n            });\n        }\n    }\n\n    private cleanBlockContent(block: Element): void {\n        //! Fixes wizi/wizishop-com#25920\n        if (/(\\r\\n|\\n|\\r)/.test(block.innerHTML)) {\n            block.innerHTML = block.innerHTML.replace(/(\\r\\n|\\n|\\r)/gm, \" \");\n        }\n        if (/color:\\s*black;/g.test(block.innerHTML)) {\n          block.innerHTML = block.innerHTML.replace(/color:\\s*black;/g, \"\");\n        }\n        if (/display:\\s*inline\\s*!important;/g.test(block.innerHTML)) {\n          block.innerHTML = block.innerHTML.replace(/display:\\s*inline\\s*!important;/g, \"\")\n        }\n        // remove empty elements from editorjs\n        block.querySelectorAll('.cdx-shadow-caret').forEach(e => e.remove());\n    }\n\n    private async formatBlock(block: Element, blockIsFocused: boolean) {\n        let cursorPosition = 0;\n        if (blockIsFocused) {\n            cursorPosition = await getCursorPosition(block);\n        }\n        let paragraphContainer = document.createElement('p');\n\n        // If content is empty, add a <br/>\n        if (!block.innerHTML.trim()) {\n            paragraphContainer.innerHTML = '<br/>';\n        } else {\n            paragraphContainer.innerHTML = block.innerHTML;\n        }\n\n        block.innerHTML = '';\n        block.appendChild(paragraphContainer);\n\n        if (blockIsFocused) {\n            resetCursorPosition(cursorPosition, cursorPosition, block);\n        }\n    }\n\n    private hasWrapper(block: Element) {\n        let wrapper = block.children[0];\n        if (wrapper && this.wrapperTags.split(',').indexOf(wrapper.tagName.toLowerCase()) > -1) {\n            return true;\n        }\n        return false;\n    }\n\n    // ============================================================================\n    // CONTENT EXTRACTION AND APPLICATION\n    // ============================================================================\n\n    private getEditorContent() {\n        let currentEditor = document.querySelectorAll('#editorJs-' + this.uuid)[0];\n        let editorBlocks = currentEditor.querySelectorAll('.codex-editor__redactor .ce-paragraph');\n        let content = '';\n        editorBlocks.forEach((block) => {\n            let closingTag = '</' + block.children[0]?.tagName.toLowerCase() + '>';\n            let regexp = /((<\\/)\\w+(>))(?![\\s\\S]*((<\\/)\\w+(>))[\\s\\S]*$)/i;\n            let lastContentClosingTag = '';\n            let match = content.match(regexp);\n            if (match && match.length > 0) {\n                lastContentClosingTag = match[0];\n            }\n            if (\n                (block.children[0]?.tagName.toLowerCase() === 'ul' || block.children[0]?.tagName.toLowerCase() === 'ol') &&\n                lastContentClosingTag === closingTag\n            ) {\n                content = content.substring(0, content.length - closingTag.length);\n                content += block.innerHTML.substring(closingTag.replace('/', '').length, block.innerHTML.length);\n            } else {\n                content += block.innerHTML;\n            }\n        });\n        content = JSON.parse(JSON.stringify(content).replace(/\\\\n/g, '<br/>'));\n        return content;\n    }\n\n    private applyContent() {\n        this.editor.blocks.clear();\n        this._content = this._content ?? '';\n        let contentElement = document.createElement('template');\n        contentElement.innerHTML = this._content;\n        let contentElementFragment = contentElement.content;\n        let currentEditor = document.querySelectorAll('#editorJs-' + this.uuid)[0];\n        let paragraph = currentEditor?.querySelectorAll('.ce-paragraph');\n        let contentElementChildNodes = Array.from(contentElementFragment.childNodes);\n        let i = 0;\n        setlistApiEditor(this.editor.api, currentEditor);\n\n        if (!contentElement.firstElementChild && contentElement.innerText.length > 0) {\n            this.applyTextContent(contentElement, currentEditor, paragraph);\n        } else {\n            this.applyStructuredContent(contentElementChildNodes, currentEditor, paragraph);\n        }\n    }\n\n    private applyTextContent(contentElement: HTMLTemplateElement, currentEditor: Element, paragraph: NodeListOf<Element>) {\n        let contentToApply = this._content!.split('\\n');\n        let i = 0;\n        while (i < contentToApply.length && paragraph && this.editor?.blocks) {\n            let newParagraph = document.createElement('p');\n            newParagraph.innerText = contentToApply[i];\n            if (i >= paragraph.length) {\n                this.editor.blocks.insert();\n                let tmpParagraph = currentEditor.querySelectorAll('.ce-paragraph');\n                tmpParagraph[tmpParagraph.length - 1].innerHTML = '';\n                tmpParagraph[tmpParagraph.length - 1].appendChild(newParagraph);\n            } else {\n                paragraph[i].innerHTML = '';\n                paragraph[i].appendChild(newParagraph);\n            }\n            ++i;\n        }\n    }\n\n    private applyStructuredContent(contentElementChildNodes: Node[], currentEditor: Element, paragraph: NodeListOf<Element>) {\n        let i = 0;\n        while (contentElementChildNodes && contentElementChildNodes[0] && paragraph && this.editor?.blocks) {\n            if (contentElementChildNodes[0].nodeType === Node.ELEMENT_NODE) {\n                const element = contentElementChildNodes[0] as Element;\n                if (element.tagName.toLowerCase() === 'ul' || element.tagName.toLowerCase() === 'ol') {\n                    i = this.handleListElement(element, currentEditor, paragraph, i);\n                } else {\n                    i = this.handleRegularElement(element, currentEditor, paragraph, i);\n                }\n            } else {\n                i = this.handleTextNode(contentElementChildNodes[0], currentEditor, paragraph, i);\n            }\n            contentElementChildNodes.shift();\n        }\n        this.cleanupRemainingBlocks(currentEditor, i);\n    }\n\n    private handleListElement(element: Element, currentEditor: Element, paragraph: NodeListOf<Element>, i: number): number {\n        while (element.firstElementChild) {\n            let container = document.createElement(element.tagName);\n            let firstElementChild = element.firstElementChild;\n            if (firstElementChild) {\n                container.appendChild(firstElementChild.cloneNode(true));\n                if (i >= paragraph.length) {\n                    this.editor.blocks.insert();\n                    let tmpParagraph = currentEditor.querySelectorAll('.ce-paragraph');\n                    tmpParagraph[tmpParagraph.length - 1].innerHTML = '';\n                    tmpParagraph[tmpParagraph.length - 1].appendChild(container);\n                    tmpParagraph[tmpParagraph.length - 1].addEventListener('keydown', onEditList, true);\n                } else {\n                    paragraph[i].innerHTML = '';\n                    paragraph[i].appendChild(container);\n                    paragraph[i].addEventListener('keydown', onEditList, true);\n                }\n                firstElementChild.remove();\n            }\n            ++i;\n        }\n        return i;\n    }\n\n    private handleRegularElement(element: Element, currentEditor: Element, paragraph: NodeListOf<Element>, i: number): number {\n        if (i >= paragraph.length) {\n            this.editor.blocks.insert();\n            let tmpParagraph = currentEditor.querySelectorAll('.ce-paragraph');\n            tmpParagraph[tmpParagraph.length - 1].innerHTML = '';\n            tmpParagraph[tmpParagraph.length - 1].appendChild(element.cloneNode(true));\n        } else {\n            paragraph[i].innerHTML = '';\n            paragraph[i].appendChild(element.cloneNode(true));\n        }\n        return ++i;\n    }\n\n    private handleTextNode(node: Node, currentEditor: Element, paragraph: NodeListOf<Element>, i: number): number {\n        let newParagraph = document.createElement('p');\n        newParagraph.appendChild(node);\n        if (i >= paragraph.length) {\n            this.editor.blocks.insert();\n            let tmpParagraph = currentEditor.querySelectorAll('.ce-paragraph');\n            tmpParagraph[tmpParagraph.length - 1].innerHTML = '';\n            tmpParagraph[tmpParagraph.length - 1].appendChild(newParagraph);\n        } else {\n            paragraph[i].innerHTML = '';\n            paragraph[i].appendChild(newParagraph);\n        }\n        return ++i;\n    }\n\n    private cleanupRemainingBlocks(currentEditor: Element, i: number): void {\n        let currentBlockCount = this.editor.blocks.getBlocksCount();\n        if (i === 0) {\n            this.editor.blocks.clear();\n            this.editor.caret.focus();\n        } else {\n            while (i < currentBlockCount) {\n                currentEditor.querySelectorAll('.ce-paragraph')[i]?.remove();\n                --currentBlockCount;\n                if (currentBlockCount === 0) {\n                    this.editor.blocks.insert();\n                    break;\n                }\n            }\n        }\n    }\n\n    // ============================================================================\n    // UTILITY METHODS\n    // ============================================================================\n\n    private getI18nDictionnary(): I18nConfig {\n        return this.translateService.currentLang === 'fr' ? frI18nDictionnary : enI18nDictionnary;\n    }\n\n    private getSelection(): Selection | null {\n        return getSelection();\n    }\n\n    private saveEditorContent(data: string) {\n        if (this.isUndoRedoing) return;\n        if (!isTextEditionTool) {\n            if (this.timeoutHandle) {\n                clearTimeout(this.timeoutHandle);\n            }\n            this.timeoutHandle = setTimeout(() => {\n                this.handleSaveEditor(data);\n            }, this.historyTimeout);\n        } else {\n            if (this.timeoutTextEditionHandle) {\n                clearTimeout(this.timeoutTextEditionHandle);\n            }\n            this.timeoutTextEditionHandle = setTimeout(() => {\n                setIsTextEditionTool(false);\n            }, 100);\n        }\n    }\n\n    private handleSaveEditor(data: string) {\n        this.historyService.addIfDataChanged(data);\n    }\n}\n\n\n\n\n","<div [class]=\"'editorJs editorJs--' + position\" [id]=\"'editorJs-' + uuid\"></div>","import { CommonModule } from '@angular/common';\nimport { HttpClientModule } from '@angular/common/http';\nimport { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { EditorJSTranslationService } from './services/editorjs-translation.service';\nimport { WiziEditorComponent } from './wizi-editor.component';\n\n\n\n@NgModule({\n  declarations: [\n    WiziEditorComponent\n  ],\n  imports: [\n    CommonModule,\n    TranslateModule,\n    HttpClientModule\n  ],\n  exports: [\n    WiziEditorComponent\n  ],\n  providers: [\n    EditorJSTranslationService,\n  ]\n})\nexport class WiziEditorModule { }\n","/*\n * Public API Surface of wizi-editor\n */\n\nexport * from './lib/wizi-editor.service';\nexport * from './lib/wizi-editor.component';\nexport * from './lib/wizi-editor.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["uuid","i2.EditorJSConversionService","i3.EditorJSTranslationService","i4.HistoryService","i5.SelectedBlocksService"],"mappings":";;;;;;;;;;;;;;;;;;MAKa,iBAAiB,CAAA;AAE5B,IAAA,WAAA,GAAA,EAAgB;+GAFL,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFhB,MAAM,EAAA,CAAA,CAAA;;4FAEP,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCGY,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;QAGI,IAAA,CAAA,OAAO,GAAkB,EAAE;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