@ebl-vue/editor-full 2.31.13 → 2.31.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,20 +1,20 @@
1
1
  (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode(':root{--color-border: #EFF0F1}.ebl-editor{cursor:text;font-size:16px;font-weight:400;background-color:#fff;height:100%;overflow:hidden;position:relative}.codex-editor{height:100%;overflow:auto}.ebl-editor.outline{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ebl-editor.outline .codex-editor{-webkit-box-flex:1;-ms-flex:1;flex:1}.ebl-editor .outline-holder{width:200px;border-right:1px solid #EFF0F1;overflow:auto}@media (max-width:1240px){.ebl-outline{display:none}}.ce-block__content{width:var(--content-width)}.ce-toolbar,.ce-inline-toolbar{z-index:1000}.ce-toolbar__plus{border:1px solid #EFF0F1}.ce-toolbar .ce-popover__items{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-toolbar .ce-popover__items .ce-popover-item{position:relative}.ce-toolbar .ce-popover__items .ce-popover-item__title{display:none}.ce-toolbar .ce-popover-item-html,.ce-toolbar .ce-popover-item-separator,.ce-toolbar .ce-popover-item[data-item-name=convert-to]{width:100%}.ce-toolbar .ce-popover-item[data-item-name=convert-to] .ce-popover-item__title{display:block}.ce-inline-toolbar .ce-popover__items{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important}.ce-inline-toolbar .ce-popover__items{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.ce-inline-toolbar .ce-popover__items .ce-popover-item__title{display:none}.ebl-editor ::-webkit-scrollbar{width:10px;height:12px}.ebl-editor ::-webkit-scrollbar-track{background:#f1f1f1;border-radius:1px}.ebl-editor ::-webkit-scrollbar-thumb{background:#C0C0C0;border-radius:10px;border:2px solid #fff}.ebl-editor ::-webkit-scrollbar-thumb:hover{background:#555}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:50%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #a0a0a0;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{background:none}.ce-header{padding:15px 0 3px;margin:0;line-height:1.25;outline:none}.ce-header p,.ce-header div{padding:0!important;margin:0!important}.ce-tune-alignment--right{text-align:right}.ce-tune-alignment--center{text-align:center}.ce-tune-alignment--left{text-align:left}.ce-paragraph{line-height:2!important}.ce-paragraph{outline:none}.ce-block:only-of-type .ce-paragraph[data-placeholder-active]:empty:before,.ce-block:only-of-type .ce-paragraph[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active)}.ce-paragraph p:first-of-type{margin-top:0}.ce-paragraph p:last-of-type{margin-bottom:0}.ce-editorjs-x-shiki{border-radius:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:10px 0}.ce-editorjs-x-shiki__code{position:relative;float:left;min-width:100%;overflow-x:auto}.ce-editorjs-x-shiki__selector{display:-webkit-box;display:-ms-flexbox;display:flex;gap:15px;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;z-index:12;border-bottom-style:solid;border-color:#9ca3af0d;border-bottom-width:1px;padding:8px}.ce-editorjs-x-shiki__selector-language,.ce-editorjs-x-shiki__selector-theme{font-size:13px;font-family:inherit}.ce-editorjs-x-shiki__selector-language{width:90px}.ce-editorjs-x-shiki__selector select{border:none;outline:none}.ce-editorjs-x-shiki__span{position:relative;z-index:0;padding:20px 20px 20px 55px;margin:0;white-space:pre;font-size:13px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__textarea{white-space:pre;overflow:hidden;background-color:transparent;position:absolute;padding:20px 20px 20px 55px;inset:0;color:transparent;z-index:0;font-size:13px;caret-color:#999;resize:none;border:none;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.ce-editorjs-x-shiki__copy{width:24px;height:24px;cursor:pointer;position:relative;margin-right:0}.ce-editorjs-x-shiki__copy_tip{font-size:12px;width:60px;margin-left:-20px;background-color:#0c0c0c;color:#ececec;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;z-index:1;top:125%;-webkit-transition:opacity .3s;transition:opacity .3s;visibility:hidden;opacity:0}.ce-editorjs-x-shiki__copy_tip:after{content:"";position:absolute;bottom:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:transparent transparent #0c0c0c transparent}.ce-editorjs-x-shiki__copy_tip.visible{visibility:visible;opacity:1}.ce-editorjs-x-shiki__span.shiki .line:before{content:attr(data-line);width:40px;display:inline-block;text-align:right;color:#888;position:absolute;left:0}.cdx-quote{overflow:hidden;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;word-wrap:break-word;word-break:break-all}.cdx-quote blockquote{margin:0}.cdx-block-quote{border:solid #acacac;border-width:0 0 0 3px;-webkit-box-shadow:none;box-shadow:none;color:#666;line-height:1.6em;padding:1px 0 0 12px;text-align:left}.ce-delimiter__line__wrapper{height:24px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-delimiter__line{-webkit-box-flex:1;-ms-flex:1;flex:1;height:2px;background-color:#eff0f1}.cdx-list{margin:0;padding:0;outline:none;display:grid;counter-reset:item;grid-gap:var(--spacing-s);padding:var(--spacing-xs);--spacing-s: 8px;--spacing-xs: 6px;--list-counter-type: numeric;--radius-border: 5px;--checkbox-background: #fff;--color-border: #C9C9C9;--color-bg-checked: #369FFF;--line-height: 1.45em;--color-bg-checked-hover: #0059AB;--color-tick: #fff;--size-checkbox: 1.2em}.cdx-list ol{padding-left:0}.cdx-list__item{line-height:var(--line-height);display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;grid-template-areas:"checkbox content" ". child"}.cdx-list__item-children{display:grid;grid-area:child;grid-gap:var(--spacing-s);padding-top:var(--spacing-s)}.cdx-list__item [contenteditable]{outline:none}.cdx-list__item-content{word-break:break-word;white-space:pre-wrap;grid-area:content;padding-left:var(--spacing-s)}.cdx-list__item:before{counter-increment:item;white-space:nowrap}.cdx-list-ordered .cdx-list__item:before{content:counters(item,".",var(--list-counter-type)) "."}.cdx-list-ordered{counter-reset:item}.cdx-list-unordered{padding-left:0}.cdx-list-unordered .cdx-list__item:before{content:"•"}.cdx-list-checklist .cdx-list__item:before{content:""}.cdx-list__settings .cdx-settings-button{width:50%}.cdx-list__checkbox{padding-top:calc((var(--line-height) - var(--size-checkbox)) / 2);grid-area:checkbox;width:var(--size-checkbox);height:var(--size-checkbox);display:-webkit-box;display:-ms-flexbox;display:flex;cursor:pointer}.cdx-list__checkbox svg{opacity:0;height:var(--size-checkbox);width:var(--size-checkbox);left:-1px;top:-1px;position:absolute}@media (hover: hover){.cdx-list__checkbox:not(.cdx-list__checkbox--no-hover):hover .cdx-list__checkbox-check svg{opacity:1}}.cdx-list__checkbox--checked{line-height:var(--line-height)}@media (hover: hover){.cdx-list__checkbox--checked:not(.cdx-list__checkbox--checked--no-hover):hover .cdx-checklist__checkbox-check{background:var(--color-bg-checked-hover);border-color:var(--color-bg-checked-hover)}}.cdx-list__checkbox--checked .cdx-list__checkbox-check{background:var(--color-bg-checked);border-color:var(--color-bg-checked)}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg{opacity:1}.cdx-list__checkbox--checked .cdx-list__checkbox-check svg path{stroke:var(--color-tick)}.cdx-list__checkbox--checked .cdx-list__checkbox-check:before{opacity:0;visibility:visible;-webkit-transform:scale(2.5);transform:scale(2.5)}.cdx-list__checkbox-check{cursor:pointer;display:inline-block;position:relative;margin:0 auto;width:var(--size-checkbox);height:var(--size-checkbox);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:var(--radius-border);border:1px solid var(--color-border);background:var(--checkbox-background)}.cdx-list__checkbox-check:before{content:"";position:absolute;inset:0;border-radius:100%;background-color:var(--color-bg-checked);visibility:hidden;pointer-events:none;-webkit-transform:scale(1);transform:scale(1);-webkit-transition:opacity .4s,-webkit-transform .4s ease-out;transition:opacity .4s,-webkit-transform .4s ease-out;transition:transform .4s ease-out,opacity .4s;transition:transform .4s ease-out,opacity .4s,-webkit-transform .4s ease-out}.cdx-list__checkbox-check--disabled{pointer-events:none}.cdx-list-start-with-field{background:#F8F8F8;border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-list-start-with-field--invalid{background:#FFECED;border:1px solid #E13F3F}.cdx-list-start-with-field--invalid .cdx-list-start-with-field__input{color:#e13f3f}.cdx-list-start-with-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - var(--toolbox-buttons-size) - var(--icon-margin-right))}.cdx-list-start-with-field__input::-webkit-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-moz-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input:-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::-ms-input-placeholder{color:var(--grayText);font-weight:500}.cdx-list-start-with-field__input::placeholder{color:var(--grayText);font-weight:500}.cdx-alert{position:relative;padding:10px;border-radius:5px;margin-bottom:10px}.cdx-alert-primary{background-color:#ebf8ff;border:1px solid #4299e1;color:#2b6cb0}.cdx-alert-secondary{background-color:#f7fafc;border:1px solid #cbd5e0;color:#222731}.cdx-alert-info{background-color:#e6fdff;border:1px solid #4cd4ce;color:#00727c}.cdx-alert-success{background-color:#f0fff4;border:1px solid #68d391;color:#2f855a}.cdx-alert-warning{background-color:#fffaf0;border:1px solid #ed8936;color:#c05621}.cdx-alert-danger{background-color:#fff5f5;border:1px solid #fc8181;color:#c53030}.cdx-alert-light{background-color:#fff;border:1px solid #edf2f7;color:#1a202c}.cdx-alert-dark{background-color:#2d3748;border:1px solid #1a202c;color:#d3d3d3}.cdx-alert-align-left{text-align:left}.cdx-alert-align-center{text-align:center}.cdx-alert-align-right{text-align:right}.cdx-alert__message{outline:none}.cdx-alert [contentEditable=true][data-placeholder]:before{position:absolute;content:attr(data-placeholder);color:#707684;font-weight:400;opacity:0}.cdx-alert [contentEditable=true][data-placeholder]:empty:before{opacity:1}.cdx-alert [contentEditable=true][data-placeholder]:empty:focus:before{opacity:0}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #background{fill:#ebf8ff;stroke:#4299e1}.ce-popover__item[data-item-name=alert-primary] .ce-popover__item-icon svg #content{fill:#2b6cb0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #background{fill:#f7fafc;stroke:#cbd5e0}.ce-popover__item[data-item-name=alert-secondary] .ce-popover__item-icon svg #content{fill:#222731}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #background{fill:#e6fdff;stroke:#4cd4ce}.ce-popover__item[data-item-name=alert-info] .ce-popover__item-icon svg #content{fill:#00727c}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #background{fill:#f0fff4;stroke:#68d391}.ce-popover__item[data-item-name=alert-success] .ce-popover__item-icon svg #content{fill:#2f855a}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #background{fill:#fffaf0;stroke:#ed8936}.ce-popover__item[data-item-name=alert-warning] .ce-popover__item-icon svg #content{fill:#c05621}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #background{fill:#fff5f5;stroke:#fc8181}.ce-popover__item[data-item-name=alert-danger] .ce-popover__item-icon svg #content{fill:#c53030}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #background{fill:#fff;stroke:#edf2f7}.ce-popover__item[data-item-name=alert-light] .ce-popover__item-icon svg #content{fill:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #background{fill:#2d3748;stroke:#1a202c}.ce-popover__item[data-item-name=alert-dark] .ce-popover__item-icon svg #content{fill:#d3d3d3}.cdx-alert_setting__icon_wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:10px}.cdx-alert_setting__icon_wrapper_align{margin-top:10px}.cdx-alert_setting__icon{display:inline-block;width:24px;height:24px;text-align:center;line-height:24px;cursor:pointer}.cdx-alert_setting__icon_active{opacity:.3}.ce-popover-indent-item{cursor:default!important}.ce-popover-indent-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px}.ce-popover-indent-item[version^="2.26"]{gap:10px}.ce-popover-indent-item:hover{background-color:transparent!important}.ce-popover-indent-item .ce-popover-item__icon{width:26px;height:26px;cursor:pointer;will-change:background-color,color;transition:.3s background-color,.3s color;padding:0;border-width:0px;color:#000;background-color:#fff;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;-webkit-transition:.3s background-color,.3s color;-moz-transition:.3s background-color,.3s color;-ms-transition:.3s background-color,.3s color;-o-transition:.3s background-color,.3s color}.ce-popover-indent-item .ce-popover-item--disabled{color:#707684;opacity:.3;cursor:default}.ce-popover-indent-item .ce-popover-item__icon:focus{outline:none}.ce-popover-indent-item[version^="2.26"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"]:hover .ce-popover-item__icon,.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon{box-shadow:0 0 0 1px #c9c9cc7a!important;-webkit-box-shadow:0 0 0 1px rgba(201,201,204,.48)!important}.ce-popover-indent-item[version^="2.26"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.27"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.28"] .ce-popover-item__icon:hover,.ce-popover-indent-item[version^="2.29"] .ce-popover-item__icon:hover{background-color:#eff2f5}.ce-highlight-indent{display:inline-block;height:1.6em;top:50%;position:absolute;transform:translateY(-50%);-webkit-transform:translate(0px,-50%);-moz-transform:translate(0px,-50%);-ms-transform:translate(0px,-50%);-o-transform:translate(0px,-50%)}.ce-popover-indent-item[version^="2.3"] .ce-popover-item__title{margin-left:4px}.cdx-marker{background:rgba(245,235,111,.29);padding:3px 0}.ce-popover--inline .ce-popover--nested .ce-popover__container{width:-webkit-min-content!important;width:-moz-min-content!important;width:min-content!important;min-width:0!important;min-width:initial!important}.ce-popover--inline .ce-popover--nested .ce-popover__items{width:-webkit-max-content;width:-moz-max-content;width:max-content}.editorjs__color-selector-container{display:grid;grid-gap:10px;padding:4px}.editorjs__color-selector__container-item{width:30px;height:30px;display:block;cursor:pointer;border-radius:100%;-webkit-transition:-webkit-transform .2s ease;transition:-webkit-transform .2s ease;transition:transform .2s ease;transition:transform .2s ease,-webkit-transform .2s ease}.editorjs__color-selector__container-item:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.cdx-underline{-webkit-text-decoration:underline;text-decoration:underline}.inline-code{background:rgba(250,239,240,.78);color:#b44437;padding:3px 4px;border-radius:5px;margin:0 1px;font-family:inherit;font-size:.86em;font-weight:500;letter-spacing:.3px}.tc-wrap{--color-background: #f9f9fb;--color-text-secondary: #7b7e89;--color-border: #e8e8eb;--cell-size: 34px;--toolbox-icon-size: 18px;--toolbox-padding: 6px;--toolbox-aiming-field-size: calc(var(--toolbox-icon-size) + var(--toolbox-padding)*2);--col-width: 100px 100px 100px;position:relative;height:100%;margin-top:var(--toolbox-icon-size);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-grid;z-index:0}.tc-wrap svg{vertical-align:top}@media print{.tc-wrap{border-left-color:var(--color-border);border-left-style:solid;border-left-width:1px}}@media print{.tc-wrap .tc-row:after{display:none}}.tc-table{position:relative;width:100%;height:100%;display:grid;font-size:14px;border-top:1px solid var(--color-border);border-left:1px solid var(--color-border);line-height:1.4;overflow-x:auto}.tc-table:after{width:calc(var(--cell-size));height:100%;left:calc(var(--cell-size)*-1);top:0}.tc-table:after,.tc-table:before{position:absolute;content:""}.tc-table:before{width:100%;height:var(--toolbox-aiming-field-size);top:calc(var(--toolbox-aiming-field-size)*-1);left:0}.tc-table--heading .tc-row:first-child{font-weight:600;border-bottom:2px solid var(--color-border);position:sticky;top:0;z-index:2;background:var(--color-background)}.tc-table--heading .tc-row:first-child [contenteditable]:empty:before{content:attr(heading);color:var(--color-text-secondary)}.tc-table--heading .tc-row:first-child:after{bottom:-2px;border-bottom:2px solid var(--color-border)}.tc-add-column,.tc-add-row{display:-webkit-box;display:-ms-flexbox;display:flex;color:var(--color-text-secondary)}@media print{.tc-add{display:none}}.tc-add-column{display:grid;border-top:1px solid var(--color-border);grid-auto-rows:var(--cell-size);-webkit-box-align:center;-ms-flex-align:center;align-items:center;justify-items:center}.tc-add-column svg{padding:5px;position:sticky;top:0;background-color:var(--color-background)}.tc-add-column--disabled{visibility:hidden}@media print{.tc-add-column{display:none}}.tc-add-row{height:var(--cell-size);-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:4px;position:relative}.tc-add-row--disabled{display:none}.tc-add-row:before{content:"";position:absolute;right:calc(var(--cell-size)*-1);width:var(--cell-size);height:100%}@media print{.tc-add-row{display:none}}.tc-add-column,.tc-add-row{-webkit-transition:0s;transition:0s;cursor:pointer;will-change:background-color}.tc-add-column:hover,.tc-add-row:hover{-webkit-transition:background-color .1s ease;transition:background-color .1s ease;background-color:var(--color-background)}.tc-add-row{margin-top:1px}.tc-add-row:hover:before{-webkit-transition:.1s;transition:.1s;background-color:var(--color-background)}.tc-row{display:grid;grid-template-columns:var(--col-width);position:relative;border-bottom:1px solid var(--color-border)}.tc-row--selected{background:var(--color-background)}.tc-row--selected:after{background:var(--color-background)}.tc-cell{border-right:1px solid var(--color-border);padding:6px 12px;overflow:hidden;outline:none;line-break:normal}.tc-cell--selected{background:var(--color-background)}.tc-wrap--readonly .tc-row:after{display:none}.tc-toolbox{--toolbox-padding: 6px;--popover-margin: 30px;--toggler-click-zone-size: 30px;--toggler-dots-color: #7b7e89;--toggler-dots-color-hovered: #1d202b;position:absolute;cursor:pointer;z-index:1;opacity:0;-webkit-transition:opacity .1s;transition:opacity .1s;will-change:left,opacity}.tc-toolbox--column{top:calc(var(--toggler-click-zone-size)*-1);-webkit-transform:translate(calc(var(--toggler-click-zone-size)*-1/2));transform:translate(calc(var(--toggler-click-zone-size)*-1/2));will-change:left,opacity}.tc-toolbox--row{left:calc(var(--popover-margin)*-1);-webkit-transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));transform:translateY(calc(var(--toggler-click-zone-size)*-1/2));margin-top:-1px;will-change:top,opacity}.tc-toolbox--showed{opacity:1}.tc-toolbox .tc-popover{position:absolute;top:0;left:var(--popover-margin)}.tc-toolbox__toggler{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:var(--toggler-click-zone-size);height:var(--toggler-click-zone-size);color:var(--toggler-dots-color);opacity:0;-webkit-transition:opacity .15s ease;transition:opacity .15s ease;will-change:opacity}.tc-toolbox__toggler:hover{color:var(--toggler-dots-color-hovered)}.tc-toolbox__toggler svg{fill:currentColor}.tc-wrap:hover .tc-toolbox__toggler{opacity:1}.tc-settings .cdx-settings-button{width:50%;margin:0}.tc-popover{--color-border: #eaeaea;--color-background: #fff;--color-background-hover: rgba(232, 232, 235, .49);--color-background-confirm: #e24a4a;--color-background-confirm-hover: #d54040;--color-text-confirm: #fff;background:var(--color-background);border:1px solid var(--color-border);-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.12941);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;padding:6px;display:none;will-change:opacity,transform}.tc-popover--opened{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards;animation:menuShowing .1s cubic-bezier(.215,.61,.355,1) forwards}.tc-popover__item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:2px 14px 2px 2px;border-radius:5px;cursor:pointer;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tc-popover__item:hover{background:var(--color-background-hover)}.tc-popover__item:not(:last-of-type){margin-bottom:2px}.tc-popover__item-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:26px;height:26px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:var(--color-background);border-radius:5px;border:1px solid var(--color-border);margin-right:8px}.tc-popover__item-label{line-height:22px;font-size:14px;font-weight:500}.tc-popover__item--confirm{background:var(--color-background-confirm);color:var(--color-text-confirm)}.tc-popover__item--confirm:hover{background-color:var(--color-background-confirm-hover)}.tc-popover__item--confirm .tc-popover__item-icon{background:var(--color-background-confirm);border-color:#0000001a}.tc-popover__item--confirm .tc-popover__item-icon svg{-webkit-transition:-webkit-transform .2s ease-in;transition:-webkit-transform .2s ease-in;transition:transform .2s ease-in;transition:transform .2s ease-in,-webkit-transform .2s ease-in;-webkit-transform:rotate(90deg) scale(1.2);transform:rotate(90deg) scale(1.2)}.tc-popover__item--hidden{display:none}@-webkit-keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes menuShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cell-resizable{cursor:col-resize}.image-tool{--bg-color: #cdd1e0;--front-color: #388ae5;--border-color: #e8e8eb;display:inline-block}.image-tool__image{border-radius:3px;overflow:hidden;margin-bottom:10px;padding-bottom:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.image-tool__image-picture{max-width:100%;vertical-align:bottom;display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.image-tool__image-preloader{width:150px;height:150px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--bg-color);background-position:center center}.image-tool__image-preloader:after{content:"";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--bg-color);border-top-color:var(--front-color);left:50%;top:50%;margin-top:-30px;margin-left:-30px;-webkit-animation:image-preloader-spin 2s infinite linear;animation:image-preloader-spin 2s infinite linear;-webkit-box-sizing:border-box;box-sizing:border-box}.image-tool__caption{visibility:hidden;position:absolute;bottom:0;left:0;margin-bottom:10px}.image-tool__caption[contentEditable=true][data-placeholder]:before{position:absolute!important}.image-tool__caption[contentEditable=true][data-placeholder]:before{content:attr(data-placeholder);color:#707684;font-weight:400;display:none}.image-tool__caption[contentEditable=true][data-placeholder]:empty:before{display:block}.image-tool__caption[contentEditable=true][data-placeholder]:empty:focus:before{display:none}.image-tool--empty .image-tool__image,.image-tool--empty .image-tool__image-preloader{display:none}.image-tool--empty .image-tool__caption,.image-tool--uploading .image-tool__caption{visibility:hidden!important}.image-tool .cdx-button{display:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.image-tool .cdx-button svg{height:auto;margin:0 6px 0 0}.image-tool--filled .cdx-button,.image-tool--filled .image-tool__image-preloader{display:none}.image-tool--uploading{width:100%}.image-tool--uploading .resizable{display:none!important}.image-tool--uploading .image-tool__image{min-height:200px;display:-webkit-box;display:-ms-flexbox;display:flex;background-color:#fff}.image-tool--uploading .image-tool__image-picture,.image-tool--uploading .cdx-button{display:none}.image-tool--withBorder .image-tool__image{border:1px solid var(--border-color)}.image-tool--withBackground .image-tool__image{padding:15px;background:var(--bg-color)}.image-tool--withBackground .image-tool__image-picture{max-width:60%;margin:0 auto}.image-tool--stretched .image-tool__image-picture{width:100%}.image-tool--caption .image-tool__caption{visibility:visible}.image-tool--caption{padding-bottom:50px}@-webkit-keyframes image-preloader-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes image-preloader-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cdx-image-tool-tune--floatLeft .cdx-block,.cdx-image-tool-tune--center .cdx-block,.cdx-image-tool-tune--floatRight .cdx-block,.cdx-image-tool-tune--floatLeft .image-tool__image,.cdx-image-tool-tune--center .image-tool__image,.cdx-image-tool-tune--floatRight .image-tool__image{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}:root{--primary: #2492F5;--primary-content: #E9F4FE}.cdx-settings-button--active{background:#E9F4FE;color:#2492f5}.cdx-settings-button:hover{background:#E9F4FE}.cdx-image-tool-tune--center{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@media all and (min-width: 470px){.codex-editor:not(.read-only) .cdx-image-tool-tune--floatLeft.ce-block__content,.codex-editor:not(.read-only) .cdx-image-tool-tune--floatRight.ce-block__content{min-height:20px}.cdx-image-tool-tune--floatLeft.ce-block__content .image-tool__image,.cdx-image-tool-tune--floatRight.ce-block__content .image-tool__image{margin-top:40px}.cdx-image-tool-tune--floatLeft.ce-block__content .image-tool__image{margin-left:20px}.cdx-image-tool-tune--floatRight.ce-block__content .image-tool__image{margin-right:20px}.cdx-image-tool-tune--floatLeft.ce-block__content .cdx-input,.cdx-image-tool-tune--floatRight.ce-block__content .cdx-input{width:calc(100% - 20px)}.cdx-image-tool-tune--floatLeft.ce-block__content .cdx-input{margin-left:20px}.cdx-image-tool-tune--floatRight.ce-block__content .cdx-input{margin-right:20px}.cdx-image-tool-tune--floatLeft .cdx-block{float:left;margin-right:10px}.cdx-image-tool-tune--floatRight .cdx-block{float:right;margin-left:10px}.cdx-image-tool-tune--sizeSmall .cdx-block{max-width:25%!important}.cdx-image-tool-tune--sizeMiddle .cdx-block{max-width:50%!important}.cdx-image-tool-tune--sizeLarge .cdx-block{max-width:75%!important}}.cdx-image-tool-tune--sizeLarge img,.cdx-image-tool-tune--sizeSmall img,.cdx-image-tool-tune--sizeMiddle img{-o-object-fit:cover;object-fit:cover;max-width:100%}.codex-editor.read-only .cdx-input.image-tool__caption:empty,.read-only>.codex-editor .cdx-input.image-tool__caption:empty{display:none}.cdx-image-tool-tune--resize .cdx-block{position:relative;overflow:visible}.cdx-image-tool-tune--resize .cdx-block .resizable{display:none}.cdx-image-tool-tune--resize .image-tool__image-picture{width:100%!important}.cdx-image-tool-tune--resize .cdx-block:hover .resizable{display:block}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer{width:8px;height:8px;border-radius:50%;background:#E9F4FE;border:3px solid #2492F5;position:absolute}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.top-left{left:-8px;top:2px;cursor:nwse-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.top-right{right:-8px;top:1px;cursor:nesw-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.bottom-left{left:-9px;bottom:10px;cursor:nesw-resize}.cdx-image-tool-tune--resize .cdx-block .resizable .resizers .resizer.bottom-right{right:-9px;bottom:10px;cursor:nwse-resize}.cdx-image-tool-tune--crop:hover,.cdx-image-tool-tune--crop.isCropping,.cdx-image-tool-tune--resize:hover{z-index:2}.cdx-image-tool-tune--crop .image-tool__image{position:relative}.cdx-image-tool-tune--crop .isCropping .image-tool__image{min-height:600px;min-width:100%}.cdx-image-tool-tune--crop .image-tool__image .crop-btn,.cdx-image-tool-tune--crop .image-tool__image .crop-save{position:absolute;top:0;left:0;padding:7px;background:#2492F5;color:#e9f4fe;text-align:center;line-height:20px;cursor:pointer;display:none}.cdx-image-tool-tune--crop .image-tool__image:hover .crop-btn,.cdx-image-tool-tune--crop .image-tool__image:hover .crop-save{display:block}.cdx-image-tool-tune--crop .image-tool__image img.isCropped{position:absolute;min-width:0;min-width:initial;max-width:none;max-width:initial;min-height:0;min-height:initial;max-height:none;max-height:initial}.cdx-image-tool-tune--crop .cdx-block.image-tool.isCropping{min-width:0!important;min-width:initial!important;max-width:none!important;max-width:initial!important;min-height:0!important;min-height:initial!important;max-height:none!important;max-height:initial!important}.image-tool__caption{background-color:#fff}.image-tool{position:relative;z-index:1}.cdx-image-tool-tune{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:4px;width:100%}.ebl-outline{padding:15px 12px 50px;width:280px;overflow:hidden;font-family:Qihei Lenovo,Microsoft YaHei,微软雅黑,宋体,sans-serif;color:#606266;font-size:14px}.ebl-outline:hover{overflow:auto}.ebl-outline__item{cursor:pointer;height:36px;line-height:36px;padding:0 24px;word-break:break-word;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ebl-outline .level_1{padding-left:24px}.ebl-outline .level_2{padding-left:42px}.ebl-outline .level_3{padding-left:60px}.ebl-outline__item.active{color:#222;font-weight:700;background-color:#ebebeb}.ebl-outline__item:hover{background-color:#ebebeb}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { defineComponent as Ut, inject as Vt, toRaw as J, onMounted as Kt, onUnmounted as Yt, watch as Gt, openBlock as Xt, createElementBlock as Jt } from "vue";
2
+ import { defineComponent as Ut, inject as Vt, toRaw as Q, onMounted as Kt, onUnmounted as Yt, watch as Gt, openBlock as Xt, createElementBlock as Jt } from "vue";
3
3
  import Qt from "@ebl-vue/editorjs";
4
4
  import { bundledLanguagesInfo as Zt, codeToHtml as te } from "shiki";
5
- import * as dt from "@editorjs/dom";
6
- import { make as w, isEmpty as ot } from "@editorjs/dom";
5
+ import * as ht from "@editorjs/dom";
6
+ import { make as S, isEmpty as at } from "@editorjs/dom";
7
7
  import { focus as ee, isCaretAtStartOfInput as ie, getCaretNodeAndOffset as se, getContenteditableSlice as ne } from "@editorjs/caret";
8
- import ht from "vanilla-caret-js";
9
- import ct from "axios";
10
- const pt = Symbol("INSTALLED_KEY"), re = (p, t) => {
11
- if (p.install = (e) => {
12
- for (const i of [p, ...Object.values(t != null ? t : {})])
8
+ import ct from "vanilla-caret-js";
9
+ import V from "axios";
10
+ const pt = Symbol("INSTALLED_KEY"), re = (u, t) => {
11
+ if (u.install = (e) => {
12
+ for (const i of [u, ...Object.values(t != null ? t : {})])
13
13
  e.component(i.name, i);
14
14
  }, t)
15
15
  for (const [e, i] of Object.entries(t))
16
- p[e] = i;
17
- return p;
16
+ u[e] = i;
17
+ return u;
18
18
  };
19
19
  class oe {
20
20
  constructor(t, e, i, s) {
@@ -593,7 +593,7 @@ class pe {
593
593
  return { icon: vt, title: "H6" };
594
594
  }
595
595
  }
596
- class at {
596
+ class lt {
597
597
  static get DEFAULT_ALIGNMENT() {
598
598
  return "left";
599
599
  }
@@ -602,7 +602,7 @@ class at {
602
602
  }
603
603
  getAlignment() {
604
604
  var t, e;
605
- return (t = this.settings) != null && t.blocks && this.settings.blocks.hasOwnProperty(this.block.name) ? this.settings.blocks[this.block.name] : (e = this.settings) != null && e.default ? this.settings.default : at.DEFAULT_ALIGNMENT;
605
+ return (t = this.settings) != null && t.blocks && this.settings.blocks.hasOwnProperty(this.block.name) ? this.settings.blocks[this.block.name] : (e = this.settings) != null && e.default ? this.settings.default : lt.DEFAULT_ALIGNMENT;
606
606
  }
607
607
  constructor({ api: t, data: e, config: i, block: s }) {
608
608
  this.api = t, this.block = s, this.settings = i, this.data = e || { alignment: this.getAlignment() }, this.alignmentSettings = [{ name: "left", icon: Nt }, { name: "center", icon: zt }, { name: "right", icon: Wt }], this._CSS = { alignment: { left: "ce-tune-alignment--left", center: "ce-tune-alignment--center", right: "ce-tune-alignment--right" } };
@@ -630,13 +630,13 @@ class at {
630
630
  return this.data;
631
631
  }
632
632
  }
633
- class lt {
633
+ class dt {
634
634
  static get DEFAULT_PLACEHOLDER() {
635
635
  return "";
636
636
  }
637
637
  constructor({ data: t, config: e, api: i, readOnly: s }) {
638
638
  var n;
639
- this.api = i, this.readOnly = s, this._CSS = { block: this.api.styles.block, wrapper: "ce-paragraph" }, this.readOnly || (this.onKeyUp = this.onKeyUp.bind(this)), this._placeholder = e.placeholder ? e.placeholder : lt.DEFAULT_PLACEHOLDER, this._data = t != null ? t : {}, this._element = null, this._preserveBlank = (n = e.preserveBlank) != null ? n : !1;
639
+ this.api = i, this.readOnly = s, this._CSS = { block: this.api.styles.block, wrapper: "ce-paragraph" }, this.readOnly || (this.onKeyUp = this.onKeyUp.bind(this)), this._placeholder = e.placeholder ? e.placeholder : dt.DEFAULT_PLACEHOLDER, this._data = t != null ? t : {}, this._element = null, this._preserveBlank = (n = e.preserveBlank) != null ? n : !1;
640
640
  }
641
641
  onKeyUp(t) {
642
642
  if (t.code !== "Backspace" && t.code !== "Delete" || !this._element)
@@ -744,13 +744,13 @@ class U {
744
744
  const e = t.target, i = t.shiftKey, s = e.selectionStart, n = e.value, r = " ";
745
745
  let o;
746
746
  if (i) {
747
- const a = function(l, d) {
747
+ const a = function(d, l) {
748
748
  let c = "";
749
749
  for (; c !== `
750
- ` && d > 0; )
751
- d -= 1, c = l.substr(d, 1);
750
+ ` && l > 0; )
751
+ l -= 1, c = d.substr(l, 1);
752
752
  return c === `
753
- ` && (d += 1), d;
753
+ ` && (l += 1), l;
754
754
  }(n, s);
755
755
  if (n.substr(a, 2) !== r)
756
756
  return;
@@ -760,33 +760,33 @@ class U {
760
760
  e.setSelectionRange(o, o);
761
761
  }
762
762
  drawView() {
763
- const t = document.createElement("div"), e = document.createElement("div"), i = document.createElement("div"), s = document.createElement("div"), n = document.createElement("div"), r = document.createElement("div"), o = document.createElement("select"), a = document.createElement("select"), l = document.createElement("span"), d = document.createElement("textarea");
764
- return t.classList.add(this.CSS.baseClass, this.CSS.wrapper), e.classList.add("ce-editorjs-x-shiki__code"), i.classList.add("ce-editorjs-x-shiki__selector"), s.classList.add("ce-editorjs-x-shiki__lang"), n.classList.add("ce-editorjs-x-shiki__copy"), r.classList.add("ce-editorjs-x-shiki__copy_tip"), o.classList.add(this.CSS.selectorLanguage), d.classList.add(this.CSS.textarea, this.CSS.input), s.innerHTML = this.data.lang, n.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.25 8.5H10.25C9.2835 8.5 8.5 9.2835 8.5 10.25V17.25C8.5 18.2165 9.2835 19 10.25 19H17.25C18.2165 19 19 18.2165 19 17.25V10.25C19 9.2835 18.2165 8.5 17.25 8.5Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.5 8.5V6.75C15.5 6.28587 15.3156 5.84075 14.9874 5.51256C14.6592 5.18437 14.2141 5 13.75 5H6.75C6.28587 5 5.84075 5.18437 5.51256 5.51256C5.18437 5.84075 5 6.28587 5 6.75V13.75C5 14.2141 5.18437 14.6592 5.51256 14.9874C5.84075 15.3156 6.28587 15.5 6.75 15.5H8.5"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 12L15.5 12"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15.5L15.5 15.5"/></svg>', r.innerText = this.api.i18n.t("Copied"), Zt.forEach((c) => {
763
+ const t = document.createElement("div"), e = document.createElement("div"), i = document.createElement("div"), s = document.createElement("div"), n = document.createElement("div"), r = document.createElement("div"), o = document.createElement("select"), a = document.createElement("select"), d = document.createElement("span"), l = document.createElement("textarea");
764
+ return t.classList.add(this.CSS.baseClass, this.CSS.wrapper), e.classList.add("ce-editorjs-x-shiki__code"), i.classList.add("ce-editorjs-x-shiki__selector"), s.classList.add("ce-editorjs-x-shiki__lang"), n.classList.add("ce-editorjs-x-shiki__copy"), r.classList.add("ce-editorjs-x-shiki__copy_tip"), o.classList.add(this.CSS.selectorLanguage), l.classList.add(this.CSS.textarea, this.CSS.input), s.innerHTML = this.data.lang, n.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.25 8.5H10.25C9.2835 8.5 8.5 9.2835 8.5 10.25V17.25C8.5 18.2165 9.2835 19 10.25 19H17.25C18.2165 19 19 18.2165 19 17.25V10.25C19 9.2835 18.2165 8.5 17.25 8.5Z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.5 8.5V6.75C15.5 6.28587 15.3156 5.84075 14.9874 5.51256C14.6592 5.18437 14.2141 5 13.75 5H6.75C6.28587 5 5.84075 5.18437 5.51256 5.51256C5.18437 5.84075 5 6.28587 5 6.75V13.75C5 14.2141 5.18437 14.6592 5.51256 14.9874C5.84075 15.3156 6.28587 15.5 6.75 15.5H8.5"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 12L15.5 12"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15.5L15.5 15.5"/></svg>', r.innerText = this.api.i18n.t("Copied"), Zt.forEach((c) => {
765
765
  const h = document.createElement("option");
766
766
  h.value = c.id, h.text = c.name, o.appendChild(h);
767
- }), o.value = this.data.lang, d.value = this.data.code, d.placeholder = this.placeholder, d.spellcheck = !1, d.autocomplete = "off", d.autocapitalize = "off", this.readOnly && (d.disabled = !0), e.appendChild(l), e.appendChild(d), this.readOnly ? i.appendChild(s) : i.appendChild(o), n.appendChild(r), i.appendChild(n), t.appendChild(i), t.appendChild(e), this.runShiki().then(({ html: c, preStyle: h }) => {
768
- l.innerHTML = c, t == null || t.setAttribute("style", h), o.setAttribute("style", h), a.setAttribute("style", h);
767
+ }), o.value = this.data.lang, l.value = this.data.code, l.placeholder = this.placeholder, l.spellcheck = !1, l.autocomplete = "off", l.autocapitalize = "off", this.readOnly && (l.disabled = !0), e.appendChild(d), e.appendChild(l), this.readOnly ? i.appendChild(s) : i.appendChild(o), n.appendChild(r), i.appendChild(n), t.appendChild(i), t.appendChild(e), this.runShiki().then(({ html: c, preStyle: h }) => {
768
+ d.innerHTML = c, t == null || t.setAttribute("style", h), o.setAttribute("style", h), a.setAttribute("style", h);
769
769
  }), o.addEventListener("change", (c) => {
770
770
  const h = c.target.value;
771
- this._selectorLanguage = h, this.runShiki().then(({ html: u, preStyle: g }) => {
772
- l.innerHTML = u, s.innerHTML = h;
771
+ this._selectorLanguage = h, this.runShiki().then(({ html: p, preStyle: g }) => {
772
+ d.innerHTML = p, s.innerHTML = h;
773
773
  });
774
774
  }), a.addEventListener("change", (c) => {
775
775
  const h = c.target.value;
776
- this._selectorTheme = h, this.runShiki().then(({ html: u, preStyle: g }) => {
777
- l.innerHTML = u, t == null || t.setAttribute("style", g), o.setAttribute("style", g), a.setAttribute("style", g);
776
+ this._selectorTheme = h, this.runShiki().then(({ html: p, preStyle: g }) => {
777
+ d.innerHTML = p, t == null || t.setAttribute("style", g), o.setAttribute("style", g), a.setAttribute("style", g);
778
778
  });
779
- }), d.addEventListener("input", () => {
780
- this.data.code = d.value, this.runShiki().then(({ html: c, preStyle: h }) => {
781
- l.innerHTML = c, t == null || t.setAttribute("style", h), o.setAttribute("style", h), a.setAttribute("style", h);
779
+ }), l.addEventListener("input", () => {
780
+ this.data.code = l.value, this.runShiki().then(({ html: c, preStyle: h }) => {
781
+ d.innerHTML = c, t == null || t.setAttribute("style", h), o.setAttribute("style", h), a.setAttribute("style", h);
782
782
  });
783
- }), d.addEventListener("keydown", (c) => {
784
- c.code === "Tab" && (this.tabHandler(c), this.data.code = d.value, this.runShiki().then(({ html: h, preStyle: u }) => {
785
- l.innerHTML = h;
783
+ }), l.addEventListener("keydown", (c) => {
784
+ c.code === "Tab" && (this.tabHandler(c), this.data.code = l.value, this.runShiki().then(({ html: h, preStyle: p }) => {
785
+ d.innerHTML = h;
786
786
  }));
787
787
  }), n.addEventListener("click", (c) => {
788
788
  this.copyCode(this.data.code, c);
789
- }), this.nodes.textarea = d, t;
789
+ }), this.nodes.textarea = l, t;
790
790
  }
791
791
  async runShiki() {
792
792
  let t = "";
@@ -839,8 +839,8 @@ class ue {
839
839
  return { baseClass: this.api.styles.block, wrapper: "cdx-quote", text: "cdx-quote__text", input: this.api.styles.input };
840
840
  }
841
841
  render() {
842
- const t = w("div", [this._CSS.baseClass, this._CSS.wrapper]);
843
- return this._quoteElement = w("blockquote", [this._CSS.input, this._CSS.text, "cdx-block-quote"], { contentEditable: !this.readOnly, innerHTML: this._data.text }), this._quoteElement.addEventListener("keydown", (e) => this.handleKeydown(e)), t.appendChild(this._quoteElement), t;
842
+ const t = S("div", [this._CSS.baseClass, this._CSS.wrapper]);
843
+ return this._quoteElement = S("blockquote", [this._CSS.input, this._CSS.text, "cdx-block-quote"], { contentEditable: !this.readOnly, innerHTML: this._data.text }), this._quoteElement.addEventListener("keydown", (e) => this.handleKeydown(e)), t.appendChild(this._quoteElement), t;
844
844
  }
845
845
  get currentItem() {
846
846
  let t = window.getSelection().anchorNode;
@@ -897,25 +897,25 @@ class ge {
897
897
  this.data = {};
898
898
  }
899
899
  }
900
- const C = "cdx-list", f = { wrapper: C, item: `${C}__item`, itemContent: `${C}__item-content`, itemChildren: `${C}__item-children` };
901
- class T {
900
+ const b = "cdx-list", k = { wrapper: b, item: `${b}__item`, itemContent: `${b}__item-content`, itemChildren: `${b}__item-children` };
901
+ class E {
902
902
  static get CSS() {
903
- return { ...f, orderedList: `${C}-ordered` };
903
+ return { ...k, orderedList: `${b}-ordered` };
904
904
  }
905
905
  constructor(t, e) {
906
906
  this.config = e, this.readOnly = t;
907
907
  }
908
908
  renderWrapper(t) {
909
909
  let e;
910
- return e = w("ol", t === !0 ? [T.CSS.wrapper, T.CSS.orderedList] : [T.CSS.orderedList, T.CSS.itemChildren]), e;
910
+ return e = S("ol", t === !0 ? [E.CSS.wrapper, E.CSS.orderedList] : [E.CSS.orderedList, E.CSS.itemChildren]), e;
911
911
  }
912
912
  renderItem(t, e) {
913
- const i = w("li", T.CSS.item), s = w("div", T.CSS.itemContent, { innerHTML: t, contentEditable: (!this.readOnly).toString() });
913
+ const i = S("li", E.CSS.item), s = S("div", E.CSS.itemContent, { innerHTML: t, contentEditable: (!this.readOnly).toString() });
914
914
  return i.appendChild(s), i;
915
915
  }
916
916
  getItemContent(t) {
917
- const e = t.querySelector(`.${T.CSS.itemContent}`);
918
- return e ? ot(e) ? "" : e.innerHTML : "";
917
+ const e = t.querySelector(`.${E.CSS.itemContent}`);
918
+ return e ? at(e) ? "" : e.innerHTML : "";
919
919
  }
920
920
  getItemMeta() {
921
921
  return {};
@@ -924,24 +924,24 @@ class T {
924
924
  return {};
925
925
  }
926
926
  }
927
- class E {
927
+ class M {
928
928
  static get CSS() {
929
- return { ...f, unorderedList: `${C}-unordered` };
929
+ return { ...k, unorderedList: `${b}-unordered` };
930
930
  }
931
931
  constructor(t, e) {
932
932
  this.config = e, this.readOnly = t;
933
933
  }
934
934
  renderWrapper(t) {
935
935
  let e;
936
- return e = w("ul", t === !0 ? [E.CSS.wrapper, E.CSS.unorderedList] : [E.CSS.unorderedList, E.CSS.itemChildren]), e;
936
+ return e = S("ul", t === !0 ? [M.CSS.wrapper, M.CSS.unorderedList] : [M.CSS.unorderedList, M.CSS.itemChildren]), e;
937
937
  }
938
938
  renderItem(t, e) {
939
- const i = w("li", E.CSS.item), s = w("div", E.CSS.itemContent, { innerHTML: t, contentEditable: (!this.readOnly).toString() });
939
+ const i = S("li", M.CSS.item), s = S("div", M.CSS.itemContent, { innerHTML: t, contentEditable: (!this.readOnly).toString() });
940
940
  return i.appendChild(s), i;
941
941
  }
942
942
  getItemContent(t) {
943
- const e = t.querySelector(`.${E.CSS.itemContent}`);
944
- return e ? ot(e) ? "" : e.innerHTML : "";
943
+ const e = t.querySelector(`.${M.CSS.itemContent}`);
944
+ return e ? at(e) ? "" : e.innerHTML : "";
945
945
  }
946
946
  getItemMeta() {
947
947
  return {};
@@ -950,49 +950,49 @@ class E {
950
950
  return {};
951
951
  }
952
952
  }
953
- function A(p) {
954
- return p.nodeType === Node.ELEMENT_NODE;
953
+ function R(u) {
954
+ return u.nodeType === Node.ELEMENT_NODE;
955
955
  }
956
- class m {
956
+ class C {
957
957
  static get CSS() {
958
- return { ...f, checklist: `${C}-checklist`, itemChecked: `${C}__checkbox--checked`, noHover: `${C}__checkbox--no-hover`, checkbox: `${C}__checkbox-check`, checkboxContainer: `${C}__checkbox`, checkboxCheckDisabled: `${C}__checkbox-check--disabled` };
958
+ return { ...k, checklist: `${b}-checklist`, itemChecked: `${b}__checkbox--checked`, noHover: `${b}__checkbox--no-hover`, checkbox: `${b}__checkbox-check`, checkboxContainer: `${b}__checkbox`, checkboxCheckDisabled: `${b}__checkbox-check--disabled` };
959
959
  }
960
960
  constructor(t, e) {
961
961
  this.config = e, this.readOnly = t;
962
962
  }
963
963
  renderWrapper(t) {
964
964
  let e;
965
- return t === !0 ? (e = w("ul", [m.CSS.wrapper, m.CSS.checklist]), e.addEventListener("click", (i) => {
965
+ return t === !0 ? (e = S("ul", [C.CSS.wrapper, C.CSS.checklist]), e.addEventListener("click", (i) => {
966
966
  const s = i.target;
967
967
  if (s) {
968
- const n = s.closest(`.${m.CSS.checkboxContainer}`);
968
+ const n = s.closest(`.${C.CSS.checkboxContainer}`);
969
969
  n && n.contains(s) && this.toggleCheckbox(n);
970
970
  }
971
- })) : e = w("ul", [m.CSS.checklist, m.CSS.itemChildren]), e;
971
+ })) : e = S("ul", [C.CSS.checklist, C.CSS.itemChildren]), e;
972
972
  }
973
973
  renderItem(t, e) {
974
- const i = w("li", [m.CSS.item, m.CSS.item]), s = w("div", m.CSS.itemContent, { innerHTML: t, contentEditable: (!this.readOnly).toString() }), n = w("span", m.CSS.checkbox), r = w("div", m.CSS.checkboxContainer);
975
- return e.checked === !0 && r.classList.add(m.CSS.itemChecked), this.readOnly && r.classList.add(m.CSS.checkboxCheckDisabled), n.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 12L10.4884 15.8372C10.5677 15.9245 10.705 15.9245 10.7844 15.8372L17 9"/></svg>', r.appendChild(n), i.appendChild(r), i.appendChild(s), i;
974
+ const i = S("li", [C.CSS.item, C.CSS.item]), s = S("div", C.CSS.itemContent, { innerHTML: t, contentEditable: (!this.readOnly).toString() }), n = S("span", C.CSS.checkbox), r = S("div", C.CSS.checkboxContainer);
975
+ return e.checked === !0 && r.classList.add(C.CSS.itemChecked), this.readOnly && r.classList.add(C.CSS.checkboxCheckDisabled), n.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7 12L10.4884 15.8372C10.5677 15.9245 10.705 15.9245 10.7844 15.8372L17 9"/></svg>', r.appendChild(n), i.appendChild(r), i.appendChild(s), i;
976
976
  }
977
977
  getItemContent(t) {
978
- const e = t.querySelector(`.${m.CSS.itemContent}`);
979
- return e ? ot(e) ? "" : e.innerHTML : "";
978
+ const e = t.querySelector(`.${C.CSS.itemContent}`);
979
+ return e ? at(e) ? "" : e.innerHTML : "";
980
980
  }
981
981
  getItemMeta(t) {
982
- const e = t.querySelector(`.${m.CSS.checkboxContainer}`);
983
- return { checked: !!e && e.classList.contains(m.CSS.itemChecked) };
982
+ const e = t.querySelector(`.${C.CSS.checkboxContainer}`);
983
+ return { checked: !!e && e.classList.contains(C.CSS.itemChecked) };
984
984
  }
985
985
  composeDefaultMeta() {
986
986
  return { checked: !1 };
987
987
  }
988
988
  toggleCheckbox(t) {
989
- t.classList.toggle(m.CSS.itemChecked), t.classList.add(m.CSS.noHover), t.addEventListener("mouseleave", () => this.removeSpecialHoverBehavior(t), { once: !0 });
989
+ t.classList.toggle(C.CSS.itemChecked), t.classList.add(C.CSS.noHover), t.addEventListener("mouseleave", () => this.removeSpecialHoverBehavior(t), { once: !0 });
990
990
  }
991
991
  removeSpecialHoverBehavior(t) {
992
- t.classList.remove(m.CSS.noHover);
992
+ t.classList.remove(C.CSS.noHover);
993
993
  }
994
994
  }
995
- function Q(p, t = "after") {
995
+ function Z(u, t = "after") {
996
996
  const e = [];
997
997
  let i;
998
998
  function s(n) {
@@ -1003,35 +1003,35 @@ function Q(p, t = "after") {
1003
1003
  return n.previousElementSibling;
1004
1004
  }
1005
1005
  }
1006
- for (i = s(p); i !== null; )
1006
+ for (i = s(u); i !== null; )
1007
1007
  e.push(i), i = s(i);
1008
1008
  return e.length !== 0 ? e : null;
1009
1009
  }
1010
- function M(p, t = !0) {
1011
- let e = p;
1012
- return p.classList.contains(f.item) && (e = p.querySelector(`.${f.itemChildren}`)), e === null ? [] : t ? Array.from(e.querySelectorAll(`:scope > .${f.item}`)) : Array.from(e.querySelectorAll(`.${f.item}`));
1010
+ function I(u, t = !0) {
1011
+ let e = u;
1012
+ return u.classList.contains(k.item) && (e = u.querySelector(`.${k.itemChildren}`)), e === null ? [] : t ? Array.from(e.querySelectorAll(`:scope > .${k.item}`)) : Array.from(e.querySelectorAll(`.${k.item}`));
1013
1013
  }
1014
- function I(p) {
1015
- return p.querySelector(`.${f.itemChildren}`);
1014
+ function A(u) {
1015
+ return u.querySelector(`.${k.itemChildren}`);
1016
1016
  }
1017
- function Z(p) {
1018
- let t = p;
1019
- p.classList.contains(f.item) && (t = I(p)), t !== null && M(t).length === 0 && t.remove();
1017
+ function tt(u) {
1018
+ let t = u;
1019
+ u.classList.contains(k.item) && (t = A(u)), t !== null && I(t).length === 0 && t.remove();
1020
1020
  }
1021
- function V(p) {
1022
- return p.querySelector(`.${f.itemContent}`);
1021
+ function K(u) {
1022
+ return u.querySelector(`.${k.itemContent}`);
1023
1023
  }
1024
- function N(p, t = !0) {
1025
- const e = V(p);
1024
+ function N(u, t = !0) {
1025
+ const e = K(u);
1026
1026
  e && ee(e, t);
1027
1027
  }
1028
- class tt {
1028
+ class et {
1029
1029
  get currentItem() {
1030
1030
  const t = window.getSelection();
1031
1031
  if (!t)
1032
1032
  return null;
1033
1033
  let e = t.anchorNode;
1034
- return e ? (A(e) || (e = e.parentNode), e && A(e) ? e.closest(`.${f.item}`) : null) : null;
1034
+ return e ? (R(e) || (e = e.parentNode), e && R(e) ? e.closest(`.${k.item}`) : null) : null;
1035
1035
  }
1036
1036
  get currentItemLevel() {
1037
1037
  const t = this.currentItem;
@@ -1039,7 +1039,7 @@ class tt {
1039
1039
  return null;
1040
1040
  let e = t.parentNode, i = 0;
1041
1041
  for (; e !== null && e !== this.listWrapper; )
1042
- A(e) && e.classList.contains(f.item) && (i += 1), e = e.parentNode;
1042
+ R(e) && e.classList.contains(k.item) && (i += 1), e = e.parentNode;
1043
1043
  return i + 1;
1044
1044
  }
1045
1045
  constructor({ data: t, config: e, api: i, readOnly: s, block: n }, r) {
@@ -1060,8 +1060,8 @@ class tt {
1060
1060
  }, !1), "start" in this.data.meta && this.data.meta.start !== void 0 && this.changeStartWith(this.data.meta.start), "counterType" in this.data.meta && this.data.meta.counterType !== void 0 && this.changeCounters(this.data.meta.counterType), this.listWrapper;
1061
1061
  }
1062
1062
  save(t) {
1063
- const e = t != null ? t : this.listWrapper, i = (r) => M(r).map((o) => {
1064
- const a = I(o);
1063
+ const e = t != null ? t : this.listWrapper, i = (r) => I(r).map((o) => {
1064
+ const a = A(o);
1065
1065
  return { content: this.renderer.getItemContent(o), meta: this.renderer.getItemMeta(o), items: a ? i(a) : [] };
1066
1066
  }), s = e ? i(e) : [];
1067
1067
  let n = { style: this.data.style, meta: {}, items: s };
@@ -1071,13 +1071,13 @@ class tt {
1071
1071
  return { tags: ["OL", "UL", "LI"] };
1072
1072
  }
1073
1073
  merge(t) {
1074
- const e = this.block.holder.querySelectorAll(`.${f.item}`), i = e[e.length - 1], s = V(i);
1074
+ const e = this.block.holder.querySelectorAll(`.${k.item}`), i = e[e.length - 1], s = K(i);
1075
1075
  if (i === null || s === null || (s.insertAdjacentHTML("beforeend", t.items[0].content), this.listWrapper === void 0))
1076
1076
  return;
1077
- const n = M(this.listWrapper);
1077
+ const n = I(this.listWrapper);
1078
1078
  if (n.length === 0)
1079
1079
  return;
1080
- let r = I(n[n.length - 1]);
1080
+ let r = A(n[n.length - 1]);
1081
1081
  const o = t.items.shift();
1082
1082
  o !== void 0 && (o.items.length !== 0 && (r === null && (r = this.renderer.renderWrapper(!1)), this.appendItems(o.items, r)), t.items.length > 0 && this.appendItems(t.items, this.listWrapper));
1083
1083
  }
@@ -1102,8 +1102,8 @@ class tt {
1102
1102
  s === "ordered" && (this.data.meta.counterType = "numeric", this.data.meta.start = 1);
1103
1103
  const r = (o) => Array.from(o.querySelectorAll(":scope > li")).map((a) => {
1104
1104
  var c;
1105
- const l = a.querySelector(`:scope > ${i}`), d = l ? r(l) : [];
1106
- return { content: (c = a.innerHTML) != null ? c : "", meta: {}, items: d };
1105
+ const d = a.querySelector(`:scope > ${i}`), l = d ? r(d) : [];
1106
+ return { content: (c = a.innerHTML) != null ? c : "", meta: {}, items: l };
1107
1107
  });
1108
1108
  return n.items = r(t), n;
1109
1109
  }
@@ -1121,7 +1121,7 @@ class tt {
1121
1121
  const i = ((o = this.renderer) == null ? void 0 : o.getItemContent(e).trim().length) === 0, s = e.parentNode === this.listWrapper, n = e.previousElementSibling === null, r = this.api.blocks.getCurrentBlockIndex();
1122
1122
  if (s && i)
1123
1123
  return e.nextElementSibling !== null || function(a) {
1124
- return a.querySelector(`.${f.itemChildren}`) !== null;
1124
+ return a.querySelector(`.${k.itemChildren}`) !== null;
1125
1125
  }(e) ? void this.splitList(e) : void (n ? this.convertItemToDefaultBlock(r, !0) : this.convertItemToDefaultBlock());
1126
1126
  i ? this.unshiftItem(e) : this.splitItem(e);
1127
1127
  }
@@ -1134,28 +1134,28 @@ class tt {
1134
1134
  t.stopPropagation(), t.preventDefault(), this.currentItem !== null && this.unshiftItem(this.currentItem);
1135
1135
  }
1136
1136
  unshiftItem(t) {
1137
- if (!t.parentNode || !A(t.parentNode))
1137
+ if (!t.parentNode || !R(t.parentNode))
1138
1138
  return;
1139
- const e = t.parentNode.closest(`.${f.item}`);
1139
+ const e = t.parentNode.closest(`.${k.item}`);
1140
1140
  if (!e)
1141
1141
  return;
1142
- let i = I(t);
1142
+ let i = A(t);
1143
1143
  if (t.parentElement === null)
1144
1144
  return;
1145
- const s = Q(t);
1145
+ const s = Z(t);
1146
1146
  s !== null && (i === null && (i = this.renderer.renderWrapper(!1)), s.forEach((n) => {
1147
1147
  i.appendChild(n);
1148
- }), t.appendChild(i)), e.after(t), N(t, !1), Z(e);
1148
+ }), t.appendChild(i)), e.after(t), N(t, !1), tt(e);
1149
1149
  }
1150
1150
  splitList(t) {
1151
- const e = M(t), i = this.block, s = this.api.blocks.getCurrentBlockIndex();
1151
+ const e = I(t), i = this.block, s = this.api.blocks.getCurrentBlockIndex();
1152
1152
  if (e.length !== 0) {
1153
1153
  const a = e[0];
1154
1154
  this.unshiftItem(a), N(t, !1);
1155
1155
  }
1156
1156
  if (t.previousElementSibling === null && t.parentNode === this.listWrapper)
1157
1157
  return void this.convertItemToDefaultBlock(s);
1158
- const n = Q(t);
1158
+ const n = Z(t);
1159
1159
  if (n === null)
1160
1160
  return;
1161
1161
  const r = this.renderer.renderWrapper(!0);
@@ -1169,23 +1169,23 @@ class tt {
1169
1169
  const [e, i] = se();
1170
1170
  if (e === null)
1171
1171
  return;
1172
- const s = V(t);
1172
+ const s = K(t);
1173
1173
  let n;
1174
1174
  n = s === null ? "" : ne(s, e, i, "right", !0);
1175
- const r = I(t), o = this.renderItem(n);
1175
+ const r = A(t), o = this.renderItem(n);
1176
1176
  t == null || t.after(o), r && o.appendChild(r), N(o);
1177
1177
  }
1178
1178
  mergeItemWithPrevious(t) {
1179
1179
  var c;
1180
1180
  const e = t.previousElementSibling, i = t.parentNode;
1181
- if (i === null || !A(i))
1181
+ if (i === null || !R(i))
1182
1182
  return;
1183
- const s = i.closest(`.${f.item}`);
1184
- if (!e && !s || e && !A(e))
1183
+ const s = i.closest(`.${k.item}`);
1184
+ if (!e && !s || e && !R(e))
1185
1185
  return;
1186
1186
  let n;
1187
1187
  if (e) {
1188
- const h = M(e, !1);
1188
+ const h = I(e, !1);
1189
1189
  n = h.length !== 0 && h.length !== 0 ? h[h.length - 1] : e;
1190
1190
  } else
1191
1191
  n = s;
@@ -1193,19 +1193,19 @@ class tt {
1193
1193
  if (!n)
1194
1194
  return;
1195
1195
  N(n, !1);
1196
- const o = V(n);
1196
+ const o = K(n);
1197
1197
  if (o === null)
1198
1198
  return;
1199
1199
  o.insertAdjacentHTML("beforeend", r);
1200
- const a = M(t);
1200
+ const a = I(t);
1201
1201
  if (a.length === 0)
1202
- return t.remove(), void Z(n);
1203
- const l = e || s, d = (c = I(l)) != null ? c : this.renderer.renderWrapper(!1);
1202
+ return t.remove(), void tt(n);
1203
+ const d = e || s, l = (c = A(d)) != null ? c : this.renderer.renderWrapper(!1);
1204
1204
  e ? a.forEach((h) => {
1205
- d.appendChild(h);
1205
+ l.appendChild(h);
1206
1206
  }) : a.forEach((h) => {
1207
- d.prepend(h);
1208
- }), I(l) === null && n.appendChild(d), t.remove();
1207
+ l.prepend(h);
1208
+ }), A(d) === null && n.appendChild(l), t.remove();
1209
1209
  }
1210
1210
  addTab(t) {
1211
1211
  var n;
@@ -1219,20 +1219,20 @@ class tt {
1219
1219
  return;
1220
1220
  }
1221
1221
  const i = e.previousSibling;
1222
- if (i === null || !A(i))
1222
+ if (i === null || !R(i))
1223
1223
  return;
1224
- const s = I(i);
1224
+ const s = A(i);
1225
1225
  if (s)
1226
- s.appendChild(e), M(e).forEach((r) => {
1226
+ s.appendChild(e), I(e).forEach((r) => {
1227
1227
  s.appendChild(r);
1228
1228
  });
1229
1229
  else {
1230
1230
  const r = this.renderer.renderWrapper(!1);
1231
- r.appendChild(e), M(e).forEach((o) => {
1231
+ r.appendChild(e), I(e).forEach((o) => {
1232
1232
  r.appendChild(o);
1233
1233
  }), i.appendChild(r);
1234
1234
  }
1235
- Z(e), N(e, !1);
1235
+ tt(e), N(e, !1);
1236
1236
  }
1237
1237
  convertItemToDefaultBlock(t, e) {
1238
1238
  let i;
@@ -1243,19 +1243,19 @@ class tt {
1243
1243
  const t = this.currentItem;
1244
1244
  if (t === null)
1245
1245
  return;
1246
- const e = M(t);
1246
+ const e = I(t);
1247
1247
  if (e.length !== 0) {
1248
1248
  const r = e[0];
1249
1249
  this.unshiftItem(r), N(t);
1250
1250
  }
1251
- const i = Q(t), s = this.api.blocks.getCurrentBlockIndex(), n = i === null;
1251
+ const i = Z(t), s = this.api.blocks.getCurrentBlockIndex(), n = i === null;
1252
1252
  this.convertItemToDefaultBlock(s, n);
1253
1253
  }
1254
1254
  renderItem(t, e) {
1255
1255
  const i = e != null ? e : this.renderer.composeDefaultMeta();
1256
1256
  switch (!0) {
1257
- case this.renderer instanceof T:
1258
1257
  case this.renderer instanceof E:
1258
+ case this.renderer instanceof M:
1259
1259
  }
1260
1260
  return this.renderer.renderItem(t, i);
1261
1261
  }
@@ -1270,8 +1270,8 @@ class tt {
1270
1270
  });
1271
1271
  }
1272
1272
  }
1273
- const W = { wrapper: `${C}-start-with-field`, input: `${C}-start-with-field__input`, startWithElementWrapperInvalid: `${C}-start-with-field--invalid` }, q = /* @__PURE__ */ new Map([["Numeric", "numeric"], ["Lower Roman", "lower-roman"], ["Upper Roman", "upper-roman"], ["Lower Alpha", "lower-alpha"], ["Upper Alpha", "upper-alpha"]]), Tt = /* @__PURE__ */ new Map([["numeric", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 14.2L10 7.4135C10 7.32872 9.90111 7.28241 9.83598 7.33668L7 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["lower-roman", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 9.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 7.01L10 7" stroke="black" stroke-width="1.8" stroke-linecap="round"/></svg>'], ["upper-roman", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 7.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["lower-alpha", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.2087 14.2H14.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M11.5 14.5C11.5 14.5 11 13.281 11 12.5M7 9.5C7 9.5 7.5 8.5 9 8.5C10.5 8.5 11 9.5 11 10.5L11 11.5M11 11.5L11 12.5M11 11.5C11 11.5 7 11 7 13C7 15.3031 11 15 11 12.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["upper-alpha", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.0087 14.2H16" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M7 14.2L7.78865 12M13 14.2L12.1377 12M7.78865 12C7.78865 12 9.68362 7 10 7C10.3065 7 12.1377 12 12.1377 12M7.78865 12L12.1377 12" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>']]);
1274
- class G {
1273
+ const W = { wrapper: `${b}-start-with-field`, input: `${b}-start-with-field__input`, startWithElementWrapperInvalid: `${b}-start-with-field--invalid` }, j = /* @__PURE__ */ new Map([["Numeric", "numeric"], ["Lower Roman", "lower-roman"], ["Upper Roman", "upper-roman"], ["Lower Alpha", "lower-alpha"], ["Upper Alpha", "upper-alpha"]]), Tt = /* @__PURE__ */ new Map([["numeric", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 14.2L10 7.4135C10 7.32872 9.90111 7.28241 9.83598 7.33668L7 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["lower-roman", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 9.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 7.01L10 7" stroke="black" stroke-width="1.8" stroke-linecap="round"/></svg>'], ["upper-roman", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2087 14.2H13.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M10 14.2L10 7.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["lower-alpha", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.2087 14.2H14.2" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M11.5 14.5C11.5 14.5 11 13.281 11 12.5M7 9.5C7 9.5 7.5 8.5 9 8.5C10.5 8.5 11 9.5 11 10.5L11 11.5M11 11.5L11 12.5M11 11.5C11 11.5 7 11 7 13C7 15.3031 11 15 11 12.5" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>'], ["upper-alpha", '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.0087 14.2H16" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M7 14.2L7.78865 12M13 14.2L12.1377 12M7.78865 12C7.78865 12 9.68362 7 10 7C10.3065 7 12.1377 12 12.1377 12M7.78865 12L12.1377 12" stroke="black" stroke-width="1.6" stroke-linecap="round"/></svg>']]);
1274
+ class X {
1275
1275
  static get isReadOnlySupported() {
1276
1276
  return !0;
1277
1277
  }
@@ -1285,7 +1285,7 @@ class G {
1285
1285
  return { tags: ["OL", "UL", "LI"] };
1286
1286
  }
1287
1287
  static get conversionConfig() {
1288
- return { export: (t) => G.joinRecursive(t), import: (t, e) => ({ meta: {}, items: [{ content: t, meta: {}, items: [] }], style: (e == null ? void 0 : e.defaultStyle) !== void 0 ? e.defaultStyle : "unordered" }) };
1288
+ return { export: (t) => X.joinRecursive(t), import: (t, e) => ({ meta: {}, items: [{ content: t, meta: {}, items: [] }], style: (e == null ? void 0 : e.defaultStyle) !== void 0 ? e.defaultStyle : "unordered" }) };
1289
1289
  }
1290
1290
  get listStyle() {
1291
1291
  return this.data.style || this.defaultListStyle;
@@ -1298,25 +1298,25 @@ class G {
1298
1298
  }
1299
1299
  constructor({ data: t, config: e, api: i, readOnly: s, block: n }) {
1300
1300
  var o;
1301
- this.api = i, this.readOnly = s, this.config = e, this.block = n, this.defaultListStyle = ((o = this.config) == null ? void 0 : o.defaultStyle) || "unordered", this.defaultCounterTypes = this.config.counterTypes || Array.from(q.values());
1301
+ this.api = i, this.readOnly = s, this.config = e, this.block = n, this.defaultListStyle = ((o = this.config) == null ? void 0 : o.defaultStyle) || "unordered", this.defaultCounterTypes = this.config.counterTypes || Array.from(j.values());
1302
1302
  const r = { style: this.defaultListStyle, meta: {}, items: [] };
1303
1303
  this.data = Object.keys(t).length ? function(a) {
1304
- const l = [];
1305
- return function(d) {
1306
- return typeof d.items[0] == "string";
1307
- }(a) ? (a.items.forEach((d) => {
1308
- l.push({ content: d, meta: {}, items: [] });
1309
- }), { style: a.style, meta: {}, items: l }) : function(d) {
1310
- return typeof d.items[0] != "string" && "text" in d.items[0] && "checked" in d.items[0] && typeof d.items[0].text == "string" && typeof d.items[0].checked == "boolean";
1311
- }(a) ? (a.items.forEach((d) => {
1312
- l.push({ content: d.text, meta: { checked: d.checked }, items: [] });
1313
- }), { style: "checklist", meta: {}, items: l }) : function(d) {
1314
- return !("meta" in d);
1304
+ const d = [];
1305
+ return function(l) {
1306
+ return typeof l.items[0] == "string";
1307
+ }(a) ? (a.items.forEach((l) => {
1308
+ d.push({ content: l, meta: {}, items: [] });
1309
+ }), { style: a.style, meta: {}, items: d }) : function(l) {
1310
+ return typeof l.items[0] != "string" && "text" in l.items[0] && "checked" in l.items[0] && typeof l.items[0].text == "string" && typeof l.items[0].checked == "boolean";
1311
+ }(a) ? (a.items.forEach((l) => {
1312
+ d.push({ content: l.text, meta: { checked: l.checked }, items: [] });
1313
+ }), { style: "checklist", meta: {}, items: d }) : function(l) {
1314
+ return !("meta" in l);
1315
1315
  }(a) ? { style: a.style, meta: {}, items: a.items } : structuredClone(a);
1316
1316
  }(t) : r, this.listStyle === "ordered" && this.data.meta.counterType === void 0 && (this.data.meta.counterType = "numeric"), this.changeTabulatorByStyle();
1317
1317
  }
1318
1318
  static joinRecursive(t) {
1319
- return t.items.map((e) => `${e.content} ${G.joinRecursive(e)}`).join("");
1319
+ return t.items.map((e) => `${e.content} ${X.joinRecursive(e)}`).join("");
1320
1320
  }
1321
1321
  render() {
1322
1322
  return this.listElement = this.list.render(), this.listElement;
@@ -1337,22 +1337,22 @@ class G {
1337
1337
  this.listStyle = "checklist";
1338
1338
  } }];
1339
1339
  if (this.listStyle === "ordered") {
1340
- const i = function(r, { value: o, placeholder: a, attributes: l, sanitize: d }) {
1341
- const c = dt.make("div", W.wrapper), h = dt.make("input", W.input, { placeholder: a, tabIndex: -1, value: o });
1342
- for (const u in l)
1343
- h.setAttribute(u, l[u]);
1340
+ const i = function(r, { value: o, placeholder: a, attributes: d, sanitize: l }) {
1341
+ const c = ht.make("div", W.wrapper), h = ht.make("input", W.input, { placeholder: a, tabIndex: -1, value: o });
1342
+ for (const p in d)
1343
+ h.setAttribute(p, d[p]);
1344
1344
  return c.appendChild(h), h.addEventListener("input", () => {
1345
- d !== void 0 && (h.value = d(h.value));
1346
- const u = h.checkValidity();
1347
- u || c.classList.contains(W.startWithElementWrapperInvalid) || c.classList.add(W.startWithElementWrapperInvalid), u && c.classList.contains(W.startWithElementWrapperInvalid) && c.classList.remove(W.startWithElementWrapperInvalid), u && r(h.value);
1345
+ l !== void 0 && (h.value = l(h.value));
1346
+ const p = h.checkValidity();
1347
+ p || c.classList.contains(W.startWithElementWrapperInvalid) || c.classList.add(W.startWithElementWrapperInvalid), p && c.classList.contains(W.startWithElementWrapperInvalid) && c.classList.remove(W.startWithElementWrapperInvalid), p && r(h.value);
1348
1348
  }), c;
1349
1349
  }((r) => this.changeStartWith(Number(r)), { value: String((e = this.data.meta.start) != null ? e : 1), placeholder: "", attributes: { required: "true" }, sanitize: (r) => function(o) {
1350
1350
  return o.replace(/\D+/g, "");
1351
1351
  }(r) }), s = [{ label: this.api.i18n.t("Start with"), icon: '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 14.2L8 7.4135C8 7.32872 7.90111 7.28241 7.83598 7.33668L5 9.7" stroke="black" stroke-width="1.6" stroke-linecap="round"/><path d="M14 13L16.4167 10.7778M16.4167 10.7778L14 8.5M16.4167 10.7778H11.6562" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>', children: { items: [{ element: i, type: "html" }] } }], n = { label: this.api.i18n.t("Counter type"), icon: Tt.get(this.data.meta.counterType), children: { items: [] } };
1352
- q.forEach((r, o) => {
1353
- const a = q.get(o);
1354
- this.defaultCounterTypes.includes(a) && n.children.items.push({ title: this.api.i18n.t(o), icon: Tt.get(a), isActive: this.data.meta.counterType === q.get(o), closeOnActivate: !0, onActivate: () => {
1355
- this.changeCounters(q.get(o));
1352
+ j.forEach((r, o) => {
1353
+ const a = j.get(o);
1354
+ this.defaultCounterTypes.includes(a) && n.children.items.push({ title: this.api.i18n.t(o), icon: Tt.get(a), isActive: this.data.meta.counterType === j.get(o), closeOnActivate: !0, onActivate: () => {
1355
+ this.changeCounters(j.get(o));
1356
1356
  } });
1357
1357
  }), n.children.items.length > 1 && s.push(n), t.push({ type: "separator" }, ...s);
1358
1358
  }
@@ -1384,13 +1384,13 @@ class G {
1384
1384
  changeTabulatorByStyle() {
1385
1385
  switch (this.listStyle) {
1386
1386
  case "ordered":
1387
- this.list = new tt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new T(this.readOnly, this.config));
1387
+ this.list = new et({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new E(this.readOnly, this.config));
1388
1388
  break;
1389
1389
  case "unordered":
1390
- this.list = new tt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new E(this.readOnly, this.config));
1390
+ this.list = new et({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new M(this.readOnly, this.config));
1391
1391
  break;
1392
1392
  case "checklist":
1393
- this.list = new tt({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new m(this.readOnly, this.config));
1393
+ this.list = new et({ data: this.data, readOnly: this.readOnly, api: this.api, config: this.config, block: this.block }, new C(this.readOnly, this.config));
1394
1394
  }
1395
1395
  }
1396
1396
  }
@@ -1438,8 +1438,8 @@ class fe {
1438
1438
  constructor({ editor: t, config: e = {}, onUpdate: i, maxLength: s }) {
1439
1439
  this.position = 0;
1440
1440
  const n = { maxLength: 30, onUpdate() {
1441
- }, config: { debounceTimer: 200, shortcuts: { undo: ["CMD+Z"], redo: ["CMD+Y", "CMD+SHIFT+Z"] } } }, { blocks: r, caret: o } = t, { configuration: a } = t, { holder: l, defaultBlock: d } = a, c = n.config.shortcuts, { shortcuts: h } = e, u = { ...c, ...h }, g = Array.isArray(u.undo) ? u.undo : [u.undo], v = Array.isArray(u.redo) ? u.redo : [u.redo], b = n.config.debounceTimer, { debounceTimer: y = b } = e;
1442
- this.holder = typeof l == "string" ? document.getElementById(l) : l, this.editor = t, this.defaultBlock = d, this.blocks = r, this.caret = o, this.shouldSaveHistory = !0, this.readOnly = a.readOnly, this.maxLength = s || n.maxLength, this.onUpdate = i || n.onUpdate, this.config = { debounceTimer: y, shortcuts: { undo: g, redo: v } }, new me(() => this.registerChange(), this.holder, this.config.debounceTimer).setMutationObserver(), this.setEventListeners(), this.initialItem = null, this.clear();
1441
+ }, config: { debounceTimer: 200, shortcuts: { undo: ["CMD+Z"], redo: ["CMD+Y", "CMD+SHIFT+Z"] } } }, { blocks: r, caret: o } = t, { configuration: a } = t, { holder: d, defaultBlock: l } = a, c = n.config.shortcuts, { shortcuts: h } = e, p = { ...c, ...h }, g = Array.isArray(p.undo) ? p.undo : [p.undo], m = Array.isArray(p.redo) ? p.redo : [p.redo], f = n.config.debounceTimer, { debounceTimer: v = f } = e;
1442
+ this.holder = typeof d == "string" ? document.getElementById(d) : d, this.editor = t, this.defaultBlock = l, this.blocks = r, this.caret = o, this.shouldSaveHistory = !0, this.readOnly = a.readOnly, this.maxLength = s || n.maxLength, this.onUpdate = i || n.onUpdate, this.config = { debounceTimer: v, shortcuts: { undo: g, redo: m } }, new me(() => this.registerChange(), this.holder, this.config.debounceTimer).setMutationObserver(), this.setEventListeners(), this.initialItem = null, this.clear();
1443
1443
  }
1444
1444
  static get isReadOnlySupported() {
1445
1445
  return !0;
@@ -1478,7 +1478,7 @@ class fe {
1478
1478
  }
1479
1479
  getCaretIndex(t) {
1480
1480
  const e = this.holder.getElementsByClassName("ce-block__content");
1481
- return new ht(e[t].firstChild).getPos();
1481
+ return new ct(e[t].firstChild).getPos();
1482
1482
  }
1483
1483
  insertDeletedBlock(t, e, i) {
1484
1484
  for (let s = 0; s < t.length; s += 1)
@@ -1530,7 +1530,7 @@ class fe {
1530
1530
  }
1531
1531
  setCaretIndex(t, e) {
1532
1532
  if (e && e !== -1) {
1533
- const i = this.holder.getElementsByClassName("ce-block__content"), s = new ht(i[t].firstChild);
1533
+ const i = this.holder.getElementsByClassName("ce-block__content"), s = new ct(i[t].firstChild);
1534
1534
  setTimeout(() => s.setPos(e), 50);
1535
1535
  } else
1536
1536
  this.caret.setToBlock(t, "end");
@@ -1570,17 +1570,17 @@ class fe {
1570
1570
  return i.push(s), i;
1571
1571
  }
1572
1572
  setEventListeners() {
1573
- const { holder: t } = this, { shortcuts: e } = this.config, { undo: i, redo: s } = e, n = i.map((u) => u.replace(/ /g, "").split("+")), r = s.map((u) => u.replace(/ /g, "").split("+")), o = n.map((u) => this.parseKeys(u)), a = r.map((u) => this.parseKeys(u)), l = (u, g) => g.reduce((v, b) => v || ((y, S) => S.length === 3 && y[S[0]] && y[S[1]] && y.key.toLowerCase() === S[2])(u, b), !1), d = (u, g, v) => !(!((b, y) => y.reduce((S, D) => S || ((B, z) => z.length === 2 && B[z[0]] && B.key.toLowerCase() === z[1])(b, D), !1))(u, g) || l(u, v)) || !!l(u, g), c = (u) => {
1574
- d(u, o, a) && (u.preventDefault(), this.undo());
1575
- }, h = (u) => {
1576
- d(u, a, o) && (u.preventDefault(), this.redo());
1573
+ const { holder: t } = this, { shortcuts: e } = this.config, { undo: i, redo: s } = e, n = i.map((p) => p.replace(/ /g, "").split("+")), r = s.map((p) => p.replace(/ /g, "").split("+")), o = n.map((p) => this.parseKeys(p)), a = r.map((p) => this.parseKeys(p)), d = (p, g) => g.reduce((m, f) => m || ((v, L) => L.length === 3 && v[L[0]] && v[L[1]] && v.key.toLowerCase() === L[2])(p, f), !1), l = (p, g, m) => !(!((f, v) => v.reduce((L, w) => L || ((_, B) => B.length === 2 && _[B[0]] && _.key.toLowerCase() === B[1])(f, w), !1))(p, g) || d(p, m)) || !!d(p, g), c = (p) => {
1574
+ l(p, o, a) && (p.preventDefault(), this.undo());
1575
+ }, h = (p) => {
1576
+ l(p, a, o) && (p.preventDefault(), this.redo());
1577
1577
  };
1578
1578
  t.addEventListener("keydown", c), t.addEventListener("keydown", h), t.addEventListener("destroy", () => {
1579
1579
  t.removeEventListener("keydown", c), t.removeEventListener("keydown", h);
1580
1580
  });
1581
1581
  }
1582
1582
  }
1583
- class _ {
1583
+ class H {
1584
1584
  static get toolbox() {
1585
1585
  return { icon: '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M83.2 147.2V448c0 25.6 19.2 44.8 44.8 44.8h768c25.6 0 44.8-19.2 44.8-44.8V147.2c0-25.6-19.2-44.8-44.8-44.8H128c-25.6 6.4-44.8 25.6-44.8 44.8z m89.6 256V192h684.8v211.2H172.8zM810.24 642.56c0-25.6-19.2-44.8-44.8-44.8h-640c-25.6 0-44.8 19.2-44.8 44.8 0 25.6 19.2 44.8 44.8 44.8h640c25.6 6.4 44.8-12.8 44.8-44.8zM554.56 866.24c0-25.6-19.2-44.8-44.8-44.8h-384c-25.6 0-44.8 19.2-44.8 44.8 0 25.6 19.2 44.8 44.8 44.8h384c25.6 6.4 44.8-12.8 44.8-44.8z" fill="#000000" ></path></svg>', title: "Alert" };
1586
1586
  }
@@ -1606,7 +1606,7 @@ class _ {
1606
1606
  return { wrapper: "cdx-alert", wrapperForType: (t) => `cdx-alert-${t}`, wrapperForAlignType: (t) => `cdx-alert-align-${t}`, message: "cdx-alert__message" };
1607
1607
  }
1608
1608
  constructor({ data: t, config: e, api: i, readOnly: s }) {
1609
- this.api = i, this.alertTypes = e.alertTypes || _.ALERT_TYPES, this.defaultType = e.defaultType || _.DEFAULT_TYPE, this.defaultAlign = e.defaultAlign || _.DEFAULT_ALIGN_TYPE, this.messagePlaceholder = this.api.i18n.t(e.messagePlaceholder || _.DEFAULT_MESSAGE_PLACEHOLDER), this.data = { type: this.alertTypes.includes(t.type) ? t.type : this.defaultType, align: _.ALIGN_TYPES.includes(t.align) ? t.align : this.defaultAlign, message: t.message || "" }, this.container = void 0, this.readOnly = s;
1609
+ this.api = i, this.alertTypes = e.alertTypes || H.ALERT_TYPES, this.defaultType = e.defaultType || H.DEFAULT_TYPE, this.defaultAlign = e.defaultAlign || H.DEFAULT_ALIGN_TYPE, this.messagePlaceholder = this.api.i18n.t(e.messagePlaceholder || H.DEFAULT_MESSAGE_PLACEHOLDER), this.data = { type: this.alertTypes.includes(t.type) ? t.type : this.defaultType, align: H.ALIGN_TYPES.includes(t.align) ? t.align : this.defaultAlign, message: t.message || "" }, this.container = void 0, this.readOnly = s;
1610
1610
  }
1611
1611
  static get isReadOnlySupported() {
1612
1612
  return !0;
@@ -1654,20 +1654,20 @@ class _ {
1654
1654
  }).forEach((s, n, r) => {
1655
1655
  const o = s.getAttribute("data-type") || "";
1656
1656
  s.addEventListener("click", () => {
1657
- this._changeAlertType(o), r.forEach((a, l) => {
1658
- const d = a.getAttribute("data-type");
1659
- a.classList.toggle("cdx-alert_setting__icon_active", d === this.data.type);
1657
+ this._changeAlertType(o), r.forEach((a, d) => {
1658
+ const l = a.getAttribute("data-type");
1659
+ a.classList.toggle("cdx-alert_setting__icon_active", l === this.data.type);
1660
1660
  });
1661
1661
  });
1662
- }), _.ALIGN_TYPES.map((s) => {
1662
+ }), H.ALIGN_TYPES.map((s) => {
1663
1663
  let n;
1664
1664
  return s === "left" && (n = document.createElement("div"), n.classList.add("cdx-alert_setting__icon"), n.innerHTML = Nt), s === "right" && (n = document.createElement("div"), n.classList.add("cdx-alert_setting__icon"), n.innerHTML = Wt), s === "center" && (n = document.createElement("div"), n.classList.add("cdx-alert_setting__icon"), n.innerHTML = zt), n == null || n.setAttribute("data-align", s), this.api.tooltip.onHover(n, this.api.i18n.t(`align-${s}`), { placement: "top" }), i.appendChild(n), n;
1665
1665
  }).forEach((s, n, r) => {
1666
1666
  const o = s.getAttribute("data-align") || "";
1667
1667
  s.addEventListener("click", () => {
1668
- this._changeAlignType(o), r.forEach((a, l) => {
1669
- const d = a == null ? void 0 : a.getAttribute("data-align");
1670
- a == null || a.classList.toggle("cdx-alert_setting__icon_active", d === this.data.align);
1668
+ this._changeAlignType(o), r.forEach((a, d) => {
1669
+ const l = a == null ? void 0 : a.getAttribute("data-align");
1670
+ a == null || a.classList.toggle("cdx-alert_setting__icon_active", l === this.data.align);
1671
1671
  });
1672
1672
  });
1673
1673
  }), t.appendChild(e), t.appendChild(i), t;
@@ -1682,7 +1682,7 @@ class _ {
1682
1682
  });
1683
1683
  }
1684
1684
  _changeAlignType(t) {
1685
- this.data.align = t, _.ALIGN_TYPES.forEach((e) => {
1685
+ this.data.align = t, H.ALIGN_TYPES.forEach((e) => {
1686
1686
  const i = this.CSS.wrapperForAlignType(e);
1687
1687
  this.container.classList.remove(i), t === e && this.container.classList.add(i);
1688
1688
  });
@@ -1709,15 +1709,15 @@ class _ {
1709
1709
  return { message: !0, type: !1, alignType: !1 };
1710
1710
  }
1711
1711
  }
1712
- const Et = { orientation: !1 }, K = class L {
1712
+ const Et = { orientation: !1 }, Y = class x {
1713
1713
  constructor({ api: t, data: e, config: i, block: s, ...n }) {
1714
- var o, a, l, d, c, h;
1714
+ var o, a, d, l, c, h;
1715
1715
  this.wrapper = document.createElement("div"), this.DEFAULT_INDENT_KEY = "Tab", this.lastResizeTimeout = null, this.cachedMaxWidthForContent = null, this.api = t, this.block = s, !i && "settings" in n && (i = (o = n.settings) != null ? o : {}), this.config = { indentSize: 24, maxIndent: 8, minIndent: 0, multiblock: !1, autoIndent: !1, tuneName: null, orientation: "horizontal", customBlockIndentLimits: {}, handleShortcut: void 0, direction: "ltr", directionChangeHandler: null, version: "2.30", ...i != null ? i : {} }, this.changeConfigBasedOnVersionIfNeeded(), (a = this.config) != null && a.directionChangeHandler && this.config.directionChangeHandler(this.alignmentChangeListener.bind(this));
1716
- const r = (h = (c = this.config.customBlockIndentLimits[(d = (l = this.block) == null ? void 0 : l.name) != null ? d : ""]) == null ? void 0 : c.min) != null ? h : this.config.minIndent;
1717
- this.data = { indentLevel: r, ...e != null ? e : {} }, this.config.multiblock && this.config.tuneName, window.addEventListener("resize", (u) => this.onResize.call(this, u)), this.api.events.on("block changed", ({ event: u }) => {
1718
- var b;
1719
- const g = u.detail.target.id;
1720
- ((b = this.block) == null ? void 0 : b.id) === g && this.shouldApplyAutoIndent && queueMicrotask(() => this.autoIndentBlock());
1716
+ const r = (h = (c = this.config.customBlockIndentLimits[(l = (d = this.block) == null ? void 0 : d.name) != null ? l : ""]) == null ? void 0 : c.min) != null ? h : this.config.minIndent;
1717
+ this.data = { indentLevel: r, ...e != null ? e : {} }, this.config.multiblock && this.config.tuneName, window.addEventListener("resize", (p) => this.onResize.call(this, p)), this.api.events.on("block changed", ({ event: p }) => {
1718
+ var f;
1719
+ const g = p.detail.target.id;
1720
+ ((f = this.block) == null ? void 0 : f.id) === g && this.shouldApplyAutoIndent && queueMicrotask(() => this.autoIndentBlock());
1721
1721
  });
1722
1722
  }
1723
1723
  static get isTune() {
@@ -1744,11 +1744,11 @@ const Et = { orientation: !1 }, K = class L {
1744
1744
  if (queueMicrotask(() => {
1745
1745
  t() && setTimeout(t, 300);
1746
1746
  }), this.config.orientation === "vertical") {
1747
- const a = `${this.TuneNames.indentLeft}-${(r = this.block) == null ? void 0 : r.id}`, l = `${this.TuneNames.indentRight}-${(o = this.block) == null ? void 0 : o.id}`;
1748
- return [{ title: this.rightText, hint: { title: this.api.i18n.t(this.rightText) }, onActivate: (d, c) => {
1749
- this.handleIndentRight(), d.title = this.rightText;
1750
- }, icon: xt, name: l }, { title: this.leftText, hint: { title: this.api.i18n.t(this.leftText) }, onActivate: (d, c) => {
1751
- this.handleIndentLeft(), d.title = this.leftText;
1747
+ const a = `${this.TuneNames.indentLeft}-${(r = this.block) == null ? void 0 : r.id}`, d = `${this.TuneNames.indentRight}-${(o = this.block) == null ? void 0 : o.id}`;
1748
+ return [{ title: this.rightText, hint: { title: this.api.i18n.t(this.rightText) }, onActivate: (l, c) => {
1749
+ this.handleIndentRight(), l.title = this.rightText;
1750
+ }, icon: xt, name: d }, { title: this.leftText, hint: { title: this.api.i18n.t(this.leftText) }, onActivate: (l, c) => {
1751
+ this.handleIndentLeft(), l.title = this.leftText;
1752
1752
  }, icon: Lt, name: a }];
1753
1753
  }
1754
1754
  const e = `
@@ -1762,14 +1762,14 @@ const Et = { orientation: !1 }, K = class L {
1762
1762
  }
1763
1763
  wrap(t) {
1764
1764
  var i, s, n, r, o;
1765
- this.wrapper.appendChild(t), this.wrapper.setAttribute(L.DATA_WRAPPER_NAME, "");
1765
+ this.wrapper.appendChild(t), this.wrapper.setAttribute(x.DATA_WRAPPER_NAME, "");
1766
1766
  let e = !!this.config.highlightIndent;
1767
1767
  if ((i = this.config.highlightIndent) != null && i.tuneNames && !this.config.highlightIndent.tuneNames.includes((n = (s = this.block) == null ? void 0 : s.name) != null ? n : "") && (e = !1), e) {
1768
1768
  const a = this.createElementFromTemplate(`
1769
1769
  <div class="${(o = (r = this.config.highlightIndent) == null ? void 0 : r.className) != null ? o : ""} ${this.CSS.highlightIndent}">
1770
1770
  </div>
1771
- `), l = t.classList.contains(this.EditorCSS.content) ? t : t.querySelector(`.${this.EditorCSS.content}`);
1772
- l == null || l.appendChild(a);
1771
+ `), d = t.classList.contains(this.EditorCSS.content) ? t : t.querySelector(`.${this.EditorCSS.content}`);
1772
+ d == null || d.appendChild(a);
1773
1773
  }
1774
1774
  return this.applyStylesToWrapper(this.wrapper, this.data.indentLevel), this.wrapper.addEventListener("keydown", (...a) => this.onKeyDown.apply(this, a), { capture: !0 }), this.wrapper.addEventListener("focus", (a) => this.onFocus.call(this, a), { capture: !0 }), this.wrapper.addEventListener("blur", (a) => this.onBlur.call(this, a), { capture: !0 }), this.wrapper;
1775
1775
  }
@@ -1859,16 +1859,16 @@ const Et = { orientation: !1 }, K = class L {
1859
1859
  if (!this.config.multiblock || s.length < 2)
1860
1860
  return i ? this.indentBlock() : this.unIndentBlock(), void ((o = (r = this.block).dispatchChange) == null ? void 0 : o.call(r));
1861
1861
  this.config.tuneName && s.forEach(async (a) => {
1862
- var h, u, g, v;
1863
- const l = await a.save();
1864
- if (!l || !("tunes" in l) || typeof l.tunes != "object" || !l.tunes)
1862
+ var h, p, g, m;
1863
+ const d = await a.save();
1864
+ if (!d || !("tunes" in d) || typeof d.tunes != "object" || !d.tunes)
1865
1865
  return;
1866
- const d = l.tunes[(h = this.config.tuneName) != null ? h : ""];
1867
- if (!d)
1866
+ const l = d.tunes[(h = this.config.tuneName) != null ? h : ""];
1867
+ if (!l)
1868
1868
  return;
1869
- d.indentLevel = i ? Math.min(this.config.maxIndent, ((u = d.indentLevel) != null ? u : 0) + 1) : Math.max(0, ((g = d.indentLevel) != null ? g : 0) - 1), (v = a.dispatchChange) == null || v.call(a);
1869
+ l.indentLevel = i ? Math.min(this.config.maxIndent, ((p = l.indentLevel) != null ? p : 0) + 1) : Math.max(0, ((g = l.indentLevel) != null ? g : 0) - 1), (m = a.dispatchChange) == null || m.call(a);
1870
1870
  const c = this.getWrapperBlockById(a.id);
1871
- c instanceof HTMLElement && this.applyStylesToWrapper(c, d.indentLevel);
1871
+ c instanceof HTMLElement && this.applyStylesToWrapper(c, l.indentLevel);
1872
1872
  });
1873
1873
  }
1874
1874
  handleIndentLeft() {
@@ -1890,7 +1890,7 @@ const Et = { orientation: !1 }, K = class L {
1890
1890
  const t = this.api.blocks.getBlockIndex(this.block.id), e = this.api.blocks.getBlockByIndex(t - 1);
1891
1891
  if (!e)
1892
1892
  return;
1893
- const i = (o = (r = e.holder) == null ? void 0 : r.querySelector(`[${L.DATA_WRAPPER_NAME}]`)) == null ? void 0 : o.getAttribute(L.DATA_INDENT_LEVEL), s = Number(i != null ? i : 0), n = Math.min(Math.max(s, this.minIndent), this.maxIndent);
1893
+ const i = (o = (r = e.holder) == null ? void 0 : r.querySelector(`[${x.DATA_WRAPPER_NAME}]`)) == null ? void 0 : o.getAttribute(x.DATA_INDENT_LEVEL), s = Number(i != null ? i : 0), n = Math.min(Math.max(s, this.minIndent), this.maxIndent);
1894
1894
  this.data.indentLevel = n, this.applyStylesToWrapper(this.wrapper, this.data.indentLevel);
1895
1895
  }
1896
1896
  toggleDisableStateForButtons() {
@@ -1909,29 +1909,29 @@ const Et = { orientation: !1 }, K = class L {
1909
1909
  var e;
1910
1910
  return (e = this.getTuneByName(t)) == null ? void 0 : e.querySelector(`.${this.CSS.popoverItemTitle}`);
1911
1911
  }
1912
- applyStylesToWrapper(t, e = parseInt(t.getAttribute(L.DATA_INDENT_LEVEL) || "0")) {
1912
+ applyStylesToWrapper(t, e = parseInt(t.getAttribute(x.DATA_INDENT_LEVEL) || "0")) {
1913
1913
  const i = e * this.config.indentSize;
1914
- t.setAttribute(L.DATA_INDENT_LEVEL, e.toString());
1914
+ t.setAttribute(x.DATA_INDENT_LEVEL, e.toString());
1915
1915
  const s = t.querySelector(`.${this.EditorCSS.content}`), n = this.getBlockForWrapper(t) || document.querySelector(`.${this.EditorCSS.redactor}`);
1916
1916
  if (!(s instanceof HTMLElement && n))
1917
1917
  return;
1918
1918
  const r = n.getBoundingClientRect().width;
1919
1919
  if (r === 0)
1920
1920
  return void queueMicrotask(() => this.applyStylesToWrapper.bind(this)(t, e));
1921
- const o = (r - this.maxWidthForContent(t)) / 2, a = Math.max(0, Math.min(o, i)), l = 2 * a + "px", d = `${a}px`;
1922
- this.isDirectionInverted ? (t.style.paddingLeft = "0px", t.style.paddingRight = l) : (t.style.paddingLeft = l, t.style.paddingRight = "0px");
1921
+ const o = (r - this.maxWidthForContent(t)) / 2, a = Math.max(0, Math.min(o, i)), d = 2 * a + "px", l = `${a}px`;
1922
+ this.isDirectionInverted ? (t.style.paddingLeft = "0px", t.style.paddingRight = d) : (t.style.paddingLeft = d, t.style.paddingRight = "0px");
1923
1923
  const c = t.querySelector(`.${this.CSS.highlightIndent}`);
1924
- c instanceof HTMLElement && (this.isDirectionInverted ? (c.style.width = d, c.style.left = "100%", c.style.right = "") : (c.style.width = d, c.style.left = "", c.style.right = "100%"));
1924
+ c instanceof HTMLElement && (this.isDirectionInverted ? (c.style.width = l, c.style.left = "100%", c.style.right = "") : (c.style.width = l, c.style.left = "", c.style.right = "100%"));
1925
1925
  }
1926
1926
  onFocus(t) {
1927
- t.target instanceof HTMLElement && this.wrapper.contains(t.target) && this.wrapper.setAttribute(L.DATA_FOCUSED, "");
1927
+ t.target instanceof HTMLElement && this.wrapper.contains(t.target) && this.wrapper.setAttribute(x.DATA_FOCUSED, "");
1928
1928
  }
1929
1929
  onBlur(t) {
1930
- t.target instanceof HTMLElement && this.wrapper.contains(t.target) && this.wrapper.removeAttribute(L.DATA_FOCUSED);
1930
+ t.target instanceof HTMLElement && this.wrapper.contains(t.target) && this.wrapper.removeAttribute(x.DATA_FOCUSED);
1931
1931
  }
1932
1932
  onResize(t) {
1933
1933
  this.lastResizeTimeout && clearTimeout(this.lastResizeTimeout), this.lastResizeTimeout = setTimeout(() => {
1934
- document.querySelectorAll(`[${L.DATA_WRAPPER_NAME}]`).forEach((e) => {
1934
+ document.querySelectorAll(`[${x.DATA_WRAPPER_NAME}]`).forEach((e) => {
1935
1935
  e instanceof HTMLElement && this.applyStylesToWrapper(e);
1936
1936
  });
1937
1937
  }, 500);
@@ -1941,8 +1941,8 @@ const Et = { orientation: !1 }, K = class L {
1941
1941
  }
1942
1942
  getWrapperBlockById(t) {
1943
1943
  var i, s, n;
1944
- const e = `.${this.EditorCSS.block}[data-id="${t}"] [${L.DATA_WRAPPER_NAME}]`;
1945
- return (n = (s = document.querySelector(e)) != null ? s : (i = this.api.blocks.getById(t)) == null ? void 0 : i.holder.querySelector(`[${L.DATA_WRAPPER_NAME}]`)) != null ? n : null;
1944
+ const e = `.${this.EditorCSS.block}[data-id="${t}"] [${x.DATA_WRAPPER_NAME}]`;
1945
+ return (n = (s = document.querySelector(e)) != null ? s : (i = this.api.blocks.getById(t)) == null ? void 0 : i.holder.querySelector(`[${x.DATA_WRAPPER_NAME}]`)) != null ? n : null;
1946
1946
  }
1947
1947
  getBlockForWrapper(t) {
1948
1948
  let e = t;
@@ -1978,8 +1978,8 @@ const Et = { orientation: !1 }, K = class L {
1978
1978
  return this.cachedMaxWidthForContent !== null || (this.cachedMaxWidthForContent = 650), this.cachedMaxWidthForContent;
1979
1979
  }
1980
1980
  };
1981
- K.DATA_WRAPPER_NAME = "data-block-indent-wrapper", K.DATA_FOCUSED = "data-focused", K.DATA_INDENT_LEVEL = "data-indent-level";
1982
- let Ce = K;
1981
+ Y.DATA_WRAPPER_NAME = "data-block-indent-wrapper", Y.DATA_FOCUSED = "data-focused", Y.DATA_INDENT_LEVEL = "data-indent-level";
1982
+ let Ce = Y;
1983
1983
  class P {
1984
1984
  static get toolboxIcon() {
1985
1985
  return St;
@@ -2068,7 +2068,7 @@ class ke extends ve {
2068
2068
  static get sanitize() {
2069
2069
  }
2070
2070
  }
2071
- const $t = class j {
2071
+ const $t = class q {
2072
2072
  constructor(t) {
2073
2073
  this.tag = "U", this.api = t.api, this.iconClasses = { base: this.api.styles.inlineToolButton, active: this.api.styles.inlineToolButtonActive };
2074
2074
  }
@@ -2081,12 +2081,12 @@ const $t = class j {
2081
2081
  surround(t) {
2082
2082
  if (!t)
2083
2083
  return;
2084
- const e = this.api.selection.findParentTag(this.tag, j.CSS);
2084
+ const e = this.api.selection.findParentTag(this.tag, q.CSS);
2085
2085
  e ? this.unwrap(e) : this.wrap(t);
2086
2086
  }
2087
2087
  wrap(t) {
2088
2088
  const e = document.createElement(this.tag);
2089
- e.classList.add(j.CSS), e.appendChild(t.extractContents()), t.insertNode(e), this.api.selection.expandToTag(e);
2089
+ e.classList.add(q.CSS), e.appendChild(t.extractContents()), t.insertNode(e), this.api.selection.expandToTag(e);
2090
2090
  }
2091
2091
  unwrap(t) {
2092
2092
  var n;
@@ -2102,14 +2102,14 @@ const $t = class j {
2102
2102
  }
2103
2103
  checkState() {
2104
2104
  var e;
2105
- const t = this.api.selection.findParentTag(this.tag, j.CSS);
2105
+ const t = this.api.selection.findParentTag(this.tag, q.CSS);
2106
2106
  return (e = this.button) == null || e.classList.toggle(this.iconClasses.active, !!t), !!t;
2107
2107
  }
2108
2108
  get toolboxIcon() {
2109
2109
  return '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 7.5V11.5C9 12.2956 9.31607 13.0587 9.87868 13.6213C10.4413 14.1839 11.2044 14.5 12 14.5C12.7956 14.5 13.5587 14.1839 14.1213 13.6213C14.6839 13.0587 15 12.2956 15 11.5V7.5"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7.71429 18H16.2857"/></svg>';
2110
2110
  }
2111
2111
  static get sanitize() {
2112
- return { u: { class: j.CSS } };
2112
+ return { u: { class: q.CSS } };
2113
2113
  }
2114
2114
  };
2115
2115
  $t.isInline = !0;
@@ -2158,30 +2158,30 @@ class $ {
2158
2158
  return { code: { class: $.CSS } };
2159
2159
  }
2160
2160
  }
2161
- function x(p, t, e = {}) {
2162
- const i = document.createElement(p);
2161
+ function T(u, t, e = {}) {
2162
+ const i = document.createElement(u);
2163
2163
  Array.isArray(t) ? i.classList.add(...t) : t && i.classList.add(t);
2164
2164
  for (const s in e)
2165
2165
  Object.prototype.hasOwnProperty.call(e, s) && (i[s] = e[s]);
2166
2166
  return i;
2167
2167
  }
2168
- function Mt(p) {
2169
- const t = p.getBoundingClientRect();
2168
+ function Mt(u) {
2169
+ const t = u.getBoundingClientRect();
2170
2170
  return { y1: Math.floor(t.top + window.pageYOffset), x1: Math.floor(t.left + window.pageXOffset), x2: Math.floor(t.right + window.pageXOffset), y2: Math.floor(t.bottom + window.pageYOffset) };
2171
2171
  }
2172
- function et(p, t) {
2173
- const e = Mt(p), i = Mt(t);
2172
+ function it(u, t) {
2173
+ const e = Mt(u), i = Mt(t);
2174
2174
  return { fromTopBorder: i.y1 - e.y1, fromLeftBorder: i.x1 - e.x1, fromRightBorder: e.x2 - i.x2, fromBottomBorder: e.y2 - i.y2 };
2175
2175
  }
2176
- function _t(p, t) {
2176
+ function _t(u, t) {
2177
2177
  var e;
2178
- return (e = t == null ? void 0 : t.parentNode) == null ? void 0 : e.insertBefore(p, t);
2178
+ return (e = t == null ? void 0 : t.parentNode) == null ? void 0 : e.insertBefore(u, t);
2179
2179
  }
2180
- function It(p, t = !0) {
2180
+ function It(u, t = !0) {
2181
2181
  const e = document.createRange(), i = window.getSelection();
2182
- e.selectNodeContents(p), e.collapse(t), i == null || i.removeAllRanges(), i == null || i.addRange(e);
2182
+ e.selectNodeContents(u), e.collapse(t), i == null || i.removeAllRanges(), i == null || i.addRange(e);
2183
2183
  }
2184
- class k {
2184
+ class y {
2185
2185
  constructor({ items: t }) {
2186
2186
  this.items = t, this.wrapper = void 0, this.itemEls = [];
2187
2187
  }
@@ -2189,16 +2189,16 @@ class k {
2189
2189
  return { popover: "tc-popover", popoverOpened: "tc-popover--opened", item: "tc-popover__item", itemHidden: "tc-popover__item--hidden", itemConfirmState: "tc-popover__item--confirm", itemIcon: "tc-popover__item-icon", itemLabel: "tc-popover__item-label" };
2190
2190
  }
2191
2191
  render() {
2192
- return this.wrapper = x("div", k.CSS.popover), this.items.forEach((t, e) => {
2192
+ return this.wrapper = T("div", y.CSS.popover), this.items.forEach((t, e) => {
2193
2193
  var r;
2194
- const i = x("div", k.CSS.item), s = x("div", k.CSS.itemIcon, { innerHTML: t.icon }), n = x("div", k.CSS.itemLabel, { textContent: t.label });
2194
+ const i = T("div", y.CSS.item), s = T("div", y.CSS.itemIcon, { innerHTML: t.icon }), n = T("div", y.CSS.itemLabel, { textContent: t.label });
2195
2195
  i.dataset.index = e + "", i.appendChild(s), i.appendChild(n), (r = this.wrapper) == null || r.appendChild(i), this.itemEls.push(i);
2196
2196
  }), this.wrapper.addEventListener("click", (t) => {
2197
2197
  this.popoverClicked(t);
2198
2198
  }), this.wrapper;
2199
2199
  }
2200
2200
  popoverClicked(t) {
2201
- const e = t.target.closest(`.${k.CSS.item}`);
2201
+ const e = t.target.closest(`.${y.CSS.item}`);
2202
2202
  if (!e)
2203
2203
  return;
2204
2204
  const i = e.dataset.index;
@@ -2208,32 +2208,32 @@ class k {
2208
2208
  !s.confirmationRequired || this.hasConfirmationState(e) ? s.onClick() : this.setConfirmationState(e);
2209
2209
  }
2210
2210
  setConfirmationState(t) {
2211
- t.classList.add(k.CSS.itemConfirmState);
2211
+ t.classList.add(y.CSS.itemConfirmState);
2212
2212
  }
2213
2213
  clearConfirmationState(t) {
2214
- t.classList.remove(k.CSS.itemConfirmState);
2214
+ t.classList.remove(y.CSS.itemConfirmState);
2215
2215
  }
2216
2216
  hasConfirmationState(t) {
2217
- return t.classList.contains(k.CSS.itemConfirmState);
2217
+ return t.classList.contains(y.CSS.itemConfirmState);
2218
2218
  }
2219
2219
  get opened() {
2220
2220
  var t;
2221
- return ((t = this.wrapper) == null ? void 0 : t.classList.contains(k.CSS.popoverOpened)) || !1;
2221
+ return ((t = this.wrapper) == null ? void 0 : t.classList.contains(y.CSS.popoverOpened)) || !1;
2222
2222
  }
2223
2223
  open() {
2224
2224
  var t;
2225
2225
  this.items.forEach((e, i) => {
2226
- typeof e.hideIf == "function" && this.itemEls[i].classList.toggle(k.CSS.itemHidden, e.hideIf());
2227
- }), (t = this.wrapper) == null || t.classList.add(k.CSS.popoverOpened);
2226
+ typeof e.hideIf == "function" && this.itemEls[i].classList.toggle(y.CSS.itemHidden, e.hideIf());
2227
+ }), (t = this.wrapper) == null || t.classList.add(y.CSS.popoverOpened);
2228
2228
  }
2229
2229
  close() {
2230
2230
  var t;
2231
- (t = this.wrapper) == null || t.classList.remove(k.CSS.popoverOpened), this.itemEls.forEach((e) => {
2231
+ (t = this.wrapper) == null || t.classList.remove(y.CSS.popoverOpened), this.itemEls.forEach((e) => {
2232
2232
  this.clearConfirmationState(e);
2233
2233
  });
2234
2234
  }
2235
2235
  }
2236
- class H {
2236
+ class O {
2237
2237
  constructor({ items: t, onOpen: e, onClose: i, cssModifier: s = "" }) {
2238
2238
  this.items = t, this.onOpen = e, this.onClose = i, this.cssModifier = s, this.popover = null, this.wrapper = this.createToolbox();
2239
2239
  }
@@ -2244,19 +2244,19 @@ class H {
2244
2244
  return this.wrapper;
2245
2245
  }
2246
2246
  createToolbox() {
2247
- const t = x("div", [H.CSS.toolbox, this.cssModifier ? `${H.CSS.toolbox}--${this.cssModifier}` : ""]);
2247
+ const t = T("div", [O.CSS.toolbox, this.cssModifier ? `${O.CSS.toolbox}--${this.cssModifier}` : ""]);
2248
2248
  t.dataset.mutationFree = "true";
2249
2249
  const e = this.createPopover(), i = this.createToggler();
2250
2250
  return t.appendChild(i), t.appendChild(e), t;
2251
2251
  }
2252
2252
  createToggler() {
2253
- const t = x("div", H.CSS.toggler, { innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.41 9.66H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 9.66H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.31 14.36H9.3"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 14.36H14.59"/></svg>' });
2253
+ const t = T("div", O.CSS.toggler, { innerHTML: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.41 9.66H9.4"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 9.66H14.59"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M9.31 14.36H9.3"/><path stroke="currentColor" stroke-linecap="round" stroke-width="2.6" d="M14.6 14.36H14.59"/></svg>' });
2254
2254
  return t.addEventListener("click", () => {
2255
2255
  this.togglerClicked();
2256
2256
  }), t;
2257
2257
  }
2258
2258
  createPopover() {
2259
- return this.popover = new k({ items: this.items }), this.popover.render();
2259
+ return this.popover = new y({ items: this.items }), this.popover.render();
2260
2260
  }
2261
2261
  togglerClicked() {
2262
2262
  var t, e;
@@ -2266,14 +2266,14 @@ class H {
2266
2266
  const e = t();
2267
2267
  Object.entries(e).forEach(([i, s]) => {
2268
2268
  this.wrapper.style.setProperty(i, s);
2269
- }), this.wrapper.classList.add(H.CSS.toolboxShowed);
2269
+ }), this.wrapper.classList.add(O.CSS.toolboxShowed);
2270
2270
  }
2271
2271
  hide() {
2272
2272
  var t;
2273
- (t = this.popover) == null || t.close(), this.wrapper.classList.remove(H.CSS.toolboxShowed);
2273
+ (t = this.popover) == null || t.close(), this.wrapper.classList.remove(O.CSS.toolboxShowed);
2274
2274
  }
2275
2275
  }
2276
- const Ht = "tc-wrap", be = "tc-wrap--readonly", Bt = "tc-table", O = "tc-row", At = "tc-table--heading", it = "tc-row--selected", R = "tc-cell", st = "tc-cell--selected", nt = "tc-add-row", Ot = "tc-add-row--disabled", rt = "tc-add-column", Rt = "tc-add-column--disabled";
2276
+ const Ht = "tc-wrap", be = "tc-wrap--readonly", Bt = "tc-table", D = "tc-row", At = "tc-table--heading", st = "tc-row--selected", z = "tc-cell", nt = "tc-cell--selected", rt = "tc-add-row", Ot = "tc-add-row--disabled", ot = "tc-add-column", Rt = "tc-add-column--disabled";
2277
2277
  class ye {
2278
2278
  constructor(t, e, i, s) {
2279
2279
  this.minCellWidhth = 50, this.defaultCellWidth = 100, this.handleDocumentMousedown = (n) => {
@@ -2289,8 +2289,8 @@ class ye {
2289
2289
  let r = n.target;
2290
2290
  const o = r.closest(`.${Bt}`) !== null, a = r.closest(`.${Ht}`) === null;
2291
2291
  (o || a) && this.hideToolboxes();
2292
- const l = r.closest(`.${nt}`), d = r.closest(`.${rt}`);
2293
- l && l.parentNode === this.wrapper ? (this.addRow(void 0, !0), this.hideToolboxes()) : d && d.parentNode === this.wrapper && (this.addColumn(void 0, !0), this.hideToolboxes());
2292
+ const d = r.closest(`.${rt}`), l = r.closest(`.${ot}`);
2293
+ d && d.parentNode === this.wrapper ? (this.addRow(void 0, !0), this.hideToolboxes()) : l && l.parentNode === this.wrapper && (this.addColumn(void 0, !0), this.hideToolboxes());
2294
2294
  }, this.readOnly || this.bindEvents();
2295
2295
  }
2296
2296
  getWrapper() {
@@ -2308,13 +2308,13 @@ class ye {
2308
2308
  }
2309
2309
  getCellInCol(t) {
2310
2310
  const e = [];
2311
- return this.table.querySelectorAll(`.${O}`).forEach((i) => {
2312
- const s = i.querySelector(`.${R}:nth-child(${t})`);
2311
+ return this.table.querySelectorAll(`.${D}`).forEach((i) => {
2312
+ const s = i.querySelector(`.${z}:nth-child(${t})`);
2313
2313
  s && e.push(s);
2314
2314
  }), e;
2315
2315
  }
2316
2316
  createColumnToolbox() {
2317
- return new H({ api: this.api, cssModifier: "column", items: [{ label: this.api.i18n.t("Add column to left"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.9167 14.9167L11.5833 18.25M11.5833 18.25L8.25 14.9167M11.5833 18.25L11.5833 10.0833C11.5833 9.19928 11.9345 8.35143 12.5596 7.72631C13.1848 7.10119 14.0326 6.75 14.9167 6.75"/></svg>', hideIf: () => this.numberOfColumns === this.config.maxcols, onClick: () => {
2317
+ return new O({ api: this.api, cssModifier: "column", items: [{ label: this.api.i18n.t("Add column to left"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.9167 14.9167L11.5833 18.25M11.5833 18.25L8.25 14.9167M11.5833 18.25L11.5833 10.0833C11.5833 9.19928 11.9345 8.35143 12.5596 7.72631C13.1848 7.10119 14.0326 6.75 14.9167 6.75"/></svg>', hideIf: () => this.numberOfColumns === this.config.maxcols, onClick: () => {
2318
2318
  this.addColumn(this.selectedColumn, !0), this.hideToolboxes(), this.updateColWidth();
2319
2319
  } }, { label: this.api.i18n.t("Add column to right"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.13333 14.9167L12.4667 18.25M12.4667 18.25L15.8 14.9167M12.4667 18.25L12.4667 10.0833C12.4667 9.19928 12.1155 8.35143 11.4904 7.72631C10.8652 7.10119 10.0174 6.75 9.13333 6.75"/></svg>', hideIf: () => this.numberOfColumns === this.config.maxcols, onClick: () => {
2320
2320
  this.addColumn(this.selectedColumn + 1, !0), this.hideToolboxes(), this.updateColWidth();
@@ -2327,7 +2327,7 @@ class ye {
2327
2327
  } });
2328
2328
  }
2329
2329
  createRowToolbox() {
2330
- return new H({ api: this.api, cssModifier: "row", items: [{ label: this.api.i18n.t("Add row above"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.8833 15.8333L18.2167 12.5M18.2167 12.5L14.8833 9.16667M18.2167 12.5L10.05 12.5C9.16595 12.5 8.31811 12.8512 7.69299 13.4763C7.06787 14.1014 6.71667 14.9493 6.71667 15.8333"/></svg>', hideIf: () => this.numberOfRows === this.config.maxrows, onClick: () => {
2330
+ return new O({ api: this.api, cssModifier: "row", items: [{ label: this.api.i18n.t("Add row above"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.8833 15.8333L18.2167 12.5M18.2167 12.5L14.8833 9.16667M18.2167 12.5L10.05 12.5C9.16595 12.5 8.31811 12.8512 7.69299 13.4763C7.06787 14.1014 6.71667 14.9493 6.71667 15.8333"/></svg>', hideIf: () => this.numberOfRows === this.config.maxrows, onClick: () => {
2331
2331
  this.addRow(this.selectedRow, !0), this.hideToolboxes();
2332
2332
  } }, { label: this.api.i18n.t("Add row below"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.8833 9.16666L18.2167 12.5M18.2167 12.5L14.8833 15.8333M18.2167 12.5H10.05C9.16594 12.5 8.31809 12.1488 7.69297 11.5237C7.06785 10.8986 6.71666 10.0507 6.71666 9.16666"/></svg>', hideIf: () => this.numberOfRows === this.config.maxrows, onClick: () => {
2333
2333
  this.addRow(this.selectedRow + 1, !0), this.hideToolboxes();
@@ -2343,16 +2343,16 @@ class ye {
2343
2343
  this.focusedCell.row !== this.numberOfRows ? (this.focusedCell.row += 1, this.focusCell()) : (this.addRow(), this.focusedCell.row += 1, this.focusCell(), this.updateToolboxesPosition(0, 0));
2344
2344
  }
2345
2345
  getCell(t, e) {
2346
- return this.table.querySelectorAll(`.${O}:nth-child(${t}) .${R}`)[e - 1];
2346
+ return this.table.querySelectorAll(`.${D}:nth-child(${t}) .${z}`)[e - 1];
2347
2347
  }
2348
2348
  getRow(t) {
2349
- return this.table.querySelector(`.${O}:nth-child(${t})`);
2349
+ return this.table.querySelector(`.${D}:nth-child(${t})`);
2350
2350
  }
2351
2351
  getRowByCell(t) {
2352
2352
  return t.parentElement;
2353
2353
  }
2354
2354
  getRowFirstCell(t) {
2355
- return t.querySelector(`.${R}:first-child`);
2355
+ return t.querySelector(`.${z}:first-child`);
2356
2356
  }
2357
2357
  setCellContent(t, e, i) {
2358
2358
  this.getCell(t, e).innerHTML = i;
@@ -2366,15 +2366,15 @@ class ye {
2366
2366
  let o;
2367
2367
  const a = this.createCell();
2368
2368
  if (t > 0 && t <= i ? (o = this.getCell(r, t), _t(a, o)) : o = this.getRow(r).appendChild(a), r === 1) {
2369
- const l = this.getCell(r, t > 0 ? t : i + 1);
2370
- l && e && It(l);
2369
+ const d = this.getCell(r, t > 0 ? t : i + 1);
2370
+ d && e && It(d);
2371
2371
  }
2372
2372
  }
2373
- const s = this.wrapper.querySelector(`.${rt}`);
2373
+ const s = this.wrapper.querySelector(`.${ot}`);
2374
2374
  (n = this.config) != null && n.maxcols && this.numberOfColumns > this.config.maxcols - 1 && s && s.classList.add(Rt), this.addHeadingAttrToFirstRow(), this.colWidthArr.splice(t - 1, 0, this.defaultCellWidth);
2375
2375
  }
2376
2376
  addRow(t = -1, e = !1) {
2377
- let i, s = x("div", O);
2377
+ let i, s = T("div", D);
2378
2378
  this.tunes.withHeadings && this.removeHeadingAttrFromFirstRow();
2379
2379
  let n = this.numberOfColumns;
2380
2380
  if (this.config && this.config.maxrows && this.numberOfRows >= this.config.maxrows)
@@ -2382,7 +2382,7 @@ class ye {
2382
2382
  t > 0 && t <= this.numberOfRows ? i = _t(s, this.getRow(t)) : i = this.table.appendChild(s), this.fillRow(i, n), this.tunes.withHeadings && this.addHeadingAttrToFirstRow();
2383
2383
  const r = this.getRowFirstCell(i);
2384
2384
  r && e && It(r);
2385
- const o = this.wrapper.querySelector(`.${nt}`);
2385
+ const o = this.wrapper.querySelector(`.${rt}`);
2386
2386
  return this.config && this.config.maxrows && this.numberOfRows >= this.config.maxrows && o && o.classList.add(Ot), i;
2387
2387
  }
2388
2388
  deleteColumn(t) {
@@ -2392,20 +2392,20 @@ class ye {
2392
2392
  return;
2393
2393
  s.remove();
2394
2394
  }
2395
- const e = this.wrapper.querySelector(`.${rt}`);
2395
+ const e = this.wrapper.querySelector(`.${ot}`);
2396
2396
  e && e.classList.remove(Rt), this.colWidthArr.splice(t - 1, 1);
2397
2397
  }
2398
2398
  deleteRow(t) {
2399
2399
  this.getRow(t).remove();
2400
- const e = this.wrapper.querySelector(`.${nt}`);
2400
+ const e = this.wrapper.querySelector(`.${rt}`);
2401
2401
  e && e.classList.remove(Ot), this.addHeadingAttrToFirstRow();
2402
2402
  }
2403
2403
  createTableWrapper() {
2404
- this.wrapper = x("div", Ht), this.table = x("div", Bt), this.readOnly && this.wrapper.classList.add(be), this.wrapper.appendChild(this.toolboxRow.element), this.wrapper.appendChild(this.toolboxColumn.element), this.wrapper.appendChild(this.table);
2404
+ this.wrapper = T("div", Ht), this.table = T("div", Bt), this.readOnly && this.wrapper.classList.add(be), this.wrapper.appendChild(this.toolboxRow.element), this.wrapper.appendChild(this.toolboxColumn.element), this.wrapper.appendChild(this.table);
2405
2405
  }
2406
2406
  computeInitialSize() {
2407
- const t = this.data && this.data.content, e = Array.isArray(t), i = !!e && t.length, s = e ? t.length : void 0, n = i ? t[0].length : void 0, r = Number.parseInt(this.config && this.config.rows), o = Number.parseInt(this.config && this.config.cols), a = !isNaN(r) && r > 0 ? r : void 0, l = !isNaN(o) && o > 0 ? o : void 0;
2408
- return { rows: s || a || 2, cols: n || l || 2 };
2407
+ const t = this.data && this.data.content, e = Array.isArray(t), i = !!e && t.length, s = e ? t.length : void 0, n = i ? t[0].length : void 0, r = Number.parseInt(this.config && this.config.rows), o = Number.parseInt(this.config && this.config.cols), a = !isNaN(r) && r > 0 ? r : void 0, d = !isNaN(o) && o > 0 ? o : void 0;
2408
+ return { rows: s || a || 2, cols: n || d || 2 };
2409
2409
  }
2410
2410
  resize() {
2411
2411
  const { rows: t, cols: e } = this.computeInitialSize();
@@ -2435,13 +2435,13 @@ class ye {
2435
2435
  }
2436
2436
  }
2437
2437
  createCell() {
2438
- return x("div", R, { contentEditable: !this.readOnly });
2438
+ return T("div", z, { contentEditable: !this.readOnly });
2439
2439
  }
2440
2440
  get numberOfRows() {
2441
2441
  return this.table.childElementCount;
2442
2442
  }
2443
2443
  get numberOfColumns() {
2444
- return this.numberOfRows ? this.table.querySelectorAll(`.${O}:first-child .${R}`).length : 0;
2444
+ return this.numberOfRows ? this.table.querySelectorAll(`.${D}:first-child .${z}`).length : 0;
2445
2445
  }
2446
2446
  get isColumnMenuShowing() {
2447
2447
  return this.selectedColumn !== 0;
@@ -2469,7 +2469,7 @@ class ye {
2469
2469
  }
2470
2470
  focusInTableListener(t) {
2471
2471
  const e = t.target, i = this.getRowByCell(e);
2472
- i && (this.focusedCell = { row: Array.from(this.table.querySelectorAll(`.${O}`)).indexOf(i) + 1, column: Array.from(i.querySelectorAll(`.${R}`)).indexOf(e) + 1 });
2472
+ i && (this.focusedCell = { row: Array.from(this.table.querySelectorAll(`.${D}`)).indexOf(i) + 1, column: Array.from(i.querySelectorAll(`.${z}`)).indexOf(e) + 1 });
2473
2473
  }
2474
2474
  hideToolboxes() {
2475
2475
  this.hideRowToolbox(), this.hideColumnToolbox(), this.updateToolboxesPosition();
@@ -2489,7 +2489,7 @@ class ye {
2489
2489
  }
2490
2490
  updateToolboxesPosition(t = this.hoveredRow, e = this.hoveredColumn) {
2491
2491
  this.isColumnMenuShowing || e > 0 && e <= this.numberOfColumns && this.toolboxColumn.show(() => ({ left: `calc((100% - var(--cell-size)) / (${this.numberOfColumns} * 2) * (1 + (${e} - 1) * 2))` })), this.isRowMenuShowing || t > 0 && t <= this.numberOfRows && this.toolboxRow.show(() => {
2492
- const i = this.getRow(t), { fromTopBorder: s } = et(this.table, i), { height: n } = i.getBoundingClientRect();
2492
+ const i = this.getRow(t), { fromTopBorder: s } = it(this.table, i), { height: n } = i.getBoundingClientRect();
2493
2493
  return { top: `${Math.ceil(s + n / 2)}px` };
2494
2494
  });
2495
2495
  }
@@ -2510,59 +2510,59 @@ class ye {
2510
2510
  }
2511
2511
  selectRow(t) {
2512
2512
  const e = this.getRow(t);
2513
- e && (this.selectedRow = t, e.classList.add(it));
2513
+ e && (this.selectedRow = t, e.classList.add(st));
2514
2514
  }
2515
2515
  unselectRow() {
2516
2516
  if (this.selectedRow <= 0)
2517
2517
  return;
2518
- const t = this.table.querySelector(`.${it}`);
2519
- t && t.classList.remove(it), this.selectedRow = 0;
2518
+ const t = this.table.querySelector(`.${st}`);
2519
+ t && t.classList.remove(st), this.selectedRow = 0;
2520
2520
  }
2521
2521
  selectColumn(t) {
2522
2522
  for (let e = 1; e <= this.numberOfRows; e++) {
2523
2523
  const i = this.getCell(e, t);
2524
- i && i.classList.add(st);
2524
+ i && i.classList.add(nt);
2525
2525
  }
2526
2526
  this.selectedColumn = t;
2527
2527
  }
2528
2528
  unselectColumn() {
2529
2529
  if (this.selectedColumn <= 0)
2530
2530
  return;
2531
- let t = this.table.querySelectorAll(`.${st}`);
2531
+ let t = this.table.querySelectorAll(`.${nt}`);
2532
2532
  Array.from(t).forEach((e) => {
2533
- e.classList.remove(st);
2533
+ e.classList.remove(nt);
2534
2534
  }), this.selectedColumn = 0;
2535
2535
  }
2536
2536
  getHoveredCell(t) {
2537
2537
  let e = this.hoveredRow, i = this.hoveredColumn;
2538
- const { width: s, height: n, x: r, y: o } = function(h, u) {
2539
- const g = h.getBoundingClientRect(), { width: v, height: b, x: y, y: S } = g, { clientX: D, clientY: B } = u;
2540
- return { width: v, height: b, x: D - y, y: B - S };
2538
+ const { width: s, height: n, x: r, y: o } = function(h, p) {
2539
+ const g = h.getBoundingClientRect(), { width: m, height: f, x: v, y: L } = g, { clientX: w, clientY: _ } = p;
2540
+ return { width: m, height: f, x: w - v, y: _ - L };
2541
2541
  }(this.table, t);
2542
2542
  if (r >= 0) {
2543
- const h = ({ fromLeftBorder: g }) => r < g, u = ({ fromRightBorder: g }) => r > s - g;
2544
- i = this.binSearch(this.numberOfColumns, (g) => this.getCell(1, g), h, u);
2543
+ const h = ({ fromLeftBorder: g }) => r < g, p = ({ fromRightBorder: g }) => r > s - g;
2544
+ i = this.binSearch(this.numberOfColumns, (g) => this.getCell(1, g), h, p);
2545
2545
  }
2546
2546
  if (o >= 0) {
2547
- const h = ({ fromTopBorder: g }) => o < g, u = ({ fromBottomBorder: g }) => o > n - g;
2548
- e = this.binSearch(this.numberOfRows, (g) => this.getCell(g, 1), h, u);
2547
+ const h = ({ fromTopBorder: g }) => o < g, p = ({ fromBottomBorder: g }) => o > n - g;
2548
+ e = this.binSearch(this.numberOfRows, (g) => this.getCell(g, 1), h, p);
2549
2549
  }
2550
- const a = e || this.hoveredRow, l = i || this.hoveredColumn, { deltaXCell: d, deltaYCell: c } = this.getMousePositionRelateToCell(a, l, r, o);
2551
- return { row: a, column: l, deltaXCell: d, deltaYCell: c };
2550
+ const a = e || this.hoveredRow, d = i || this.hoveredColumn, { deltaXCell: l, deltaYCell: c } = this.getMousePositionRelateToCell(a, d, r, o);
2551
+ return { row: a, column: d, deltaXCell: l, deltaYCell: c };
2552
2552
  }
2553
2553
  getMousePositionRelateToCell(t, e, i, s) {
2554
- const n = this.getCell(t, e), { fromTopBorder: r, fromLeftBorder: o } = et(this.table, n);
2554
+ const n = this.getCell(t, e), { fromTopBorder: r, fromLeftBorder: o } = it(this.table, n);
2555
2555
  return { deltaXCell: i - o, deltaYCell: s - r };
2556
2556
  }
2557
2557
  binSearch(t, e, i, s) {
2558
2558
  let n, r = 0, o = t + 1, a = 0;
2559
2559
  for (; r < o - 1 && a < 10; ) {
2560
2560
  n = Math.ceil((r + o) / 2);
2561
- const l = e(n), d = et(this.table, l);
2562
- if (i(d))
2561
+ const d = e(n), l = it(this.table, d);
2562
+ if (i(l))
2563
2563
  o = n;
2564
2564
  else {
2565
- if (!s(d))
2565
+ if (!s(l))
2566
2566
  break;
2567
2567
  r = n;
2568
2568
  }
@@ -2573,7 +2573,7 @@ class ye {
2573
2573
  getData() {
2574
2574
  const t = [];
2575
2575
  for (let e = 1; e <= this.numberOfRows; e++) {
2576
- const i = this.table.querySelector(`.${O}:nth-child(${e})`), s = Array.from(i.querySelectorAll(`.${R}`));
2576
+ const i = this.table.querySelector(`.${D}:nth-child(${e})`), s = Array.from(i.querySelectorAll(`.${z}`));
2577
2577
  s.every((n) => !n.textContent.trim()) || t.push(s.map((n) => n.innerHTML));
2578
2578
  }
2579
2579
  return t;
@@ -2596,7 +2596,7 @@ class Se {
2596
2596
  return { icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M10 5V18.5"/><path stroke="currentColor" stroke-width="2" d="M5 10H19"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>', title: "Table" };
2597
2597
  }
2598
2598
  render() {
2599
- return this.table = new ye(this.readOnly, this.api, this.data, this.config), this.container = x("div", this.api.styles.block), this.container.appendChild(this.table.getWrapper()), this.table.setHeadingsSetting(this.data.withHeadings), this.container;
2599
+ return this.table = new ye(this.readOnly, this.api, this.data, this.config), this.container = T("div", this.api.styles.block), this.container.appendChild(this.table.getWrapper()), this.table.setHeadingsSetting(this.data.withHeadings), this.container;
2600
2600
  }
2601
2601
  renderSettings() {
2602
2602
  return [{ label: this.api.i18n.t("With headings"), icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-width="2" d="M5 10H19"/><rect width="14" height="14" x="5" y="5" stroke="currentColor" stroke-width="2" rx="4"/></svg>', isActive: this.data.withHeadings, closeOnActivate: !0, toggle: !0, hint: { title: this.api.i18n.t("With headings") }, onActivate: () => {
@@ -2626,14 +2626,14 @@ class Se {
2626
2626
  }
2627
2627
  }
2628
2628
  }
2629
- function F(p, t = null, e = {}) {
2630
- const i = document.createElement(p);
2629
+ function F(u, t = null, e = {}) {
2630
+ const i = document.createElement(u);
2631
2631
  Array.isArray(t) ? i.classList.add(...t) : t !== null && i.classList.add(t);
2632
2632
  for (const s in e)
2633
2633
  e.hasOwnProperty(s) && (i[s] = e[s]);
2634
2634
  return i;
2635
2635
  }
2636
- var Y = ((p) => (p.Empty = "empty", p.Uploading = "uploading", p.Filled = "filled", p))(Y || {});
2636
+ var G = ((u) => (u.Empty = "empty", u.Uploading = "uploading", u.Filled = "filled", u))(G || {});
2637
2637
  class Le {
2638
2638
  constructor({ api: t, config: e, onSelectFile: i, readOnly: s }) {
2639
2639
  this.api = t, this.config = e, this.onSelectFile = i, this.readOnly = s, this.nodes = { wrapper: F("div", [this.CSS.baseClass, this.CSS.wrapper]), imageContainer: F("div", [this.CSS.imageContainer]), fileButton: this.createFileButton(), imageEl: void 0, imagePreloader: F("div", this.CSS.imagePreloader), caption: F("div", [this.CSS.input, this.CSS.caption], { contentEditable: !this.readOnly }) }, this.nodes.caption.dataset.placeholder = this.config.captionPlaceholder, this.nodes.imageContainer.appendChild(this.nodes.imagePreloader), this.nodes.wrapper.appendChild(this.nodes.imageContainer), this.nodes.wrapper.appendChild(this.nodes.caption), this.nodes.wrapper.appendChild(this.nodes.fileButton);
@@ -2661,9 +2661,9 @@ class Le {
2661
2661
  this.nodes.caption !== void 0 && (this.nodes.caption.innerHTML = t);
2662
2662
  }
2663
2663
  toggleStatus(t) {
2664
- for (const e in Y)
2665
- if (Object.prototype.hasOwnProperty.call(Y, e)) {
2666
- const i = Y[e];
2664
+ for (const e in G)
2665
+ if (Object.prototype.hasOwnProperty.call(G, e)) {
2666
+ const i = G[e];
2667
2667
  this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${i}`, i === t);
2668
2668
  }
2669
2669
  }
@@ -2683,28 +2683,52 @@ class xe {
2683
2683
  this.config = t, this.onUpload = e, this.onError = i;
2684
2684
  }
2685
2685
  async uploadSelectedFile({ onPreview: t, noSelectedFile: e }) {
2686
- var s;
2687
- const i = await function(n = {}) {
2688
- let r = !0;
2689
- return new Promise((o, a) => {
2690
- let l = document.createElement("INPUT");
2691
- l.type = "file", n.multiple && l.setAttribute("multiple", "multiple"), n.accept && l.setAttribute("accept", n.accept), l.style.display = "none", document.body.appendChild(l), l.addEventListener("change", (d) => {
2692
- r = !1;
2693
- const c = d.target.files;
2694
- o(c), document.body.removeChild(l);
2686
+ var g;
2687
+ let i = "", s = "";
2688
+ const n = await function(m = {}) {
2689
+ let f = !0;
2690
+ return new Promise((v, L) => {
2691
+ let w = document.createElement("INPUT");
2692
+ w.type = "file", m.multiple && w.setAttribute("multiple", "multiple"), m.accept && w.setAttribute("accept", m.accept), w.style.display = "none", document.body.appendChild(w), w.addEventListener("change", (_) => {
2693
+ f = !1;
2694
+ const B = _.target.files;
2695
+ v(B), document.body.removeChild(w);
2695
2696
  }, !1), window.addEventListener("focus", () => {
2696
2697
  setTimeout(() => {
2697
- r && o([]);
2698
+ f && v([]);
2698
2699
  }, 1e3);
2699
- }, { once: !0 }), l.click();
2700
+ }, { once: !0 }), w.click();
2700
2701
  });
2701
- }({ accept: (s = this.config.types) != null ? s : "image/*" });
2702
- i && i.length > 0 ? function(n) {
2703
- const r = new FileReader();
2704
- r.readAsDataURL(n), r.onload = (o) => {
2705
- t(o.target.result);
2702
+ }({ accept: (g = this.config.types) != null ? g : "image/*" });
2703
+ if (!(n && n.length > 0))
2704
+ return void e();
2705
+ (function(m) {
2706
+ const f = new FileReader();
2707
+ f.readAsDataURL(m), f.onload = (v) => {
2708
+ t(v.target.result);
2706
2709
  };
2707
- }(i[0]) : e();
2710
+ })(n[0]);
2711
+ const r = n[0], o = this.config.types.split(",");
2712
+ let a = r.name.lastIndexOf("."), d = r.name.slice(a);
2713
+ if (!o.includes(d.toLowerCase()))
2714
+ return void this.onError("文件类型不支持");
2715
+ let l = {};
2716
+ if (this.config.userStore) {
2717
+ const m = this.config.userStore.token, f = this.config.userStore.tokenName, v = this.config.userStore.tokenPrefix;
2718
+ m && f && (l[f] = v + " " + m);
2719
+ }
2720
+ l["Content-Type"] = "application/json";
2721
+ const c = V.create({ timeout: 18e5, headers: l }), h = await c.post(this.config.endpoints.byFile, { fileName: r.name, contentType: r.type });
2722
+ if (h.status !== 200)
2723
+ return void this.onError(h.statusText);
2724
+ const p = h.data;
2725
+ if (!p.success)
2726
+ return void this.onError(p.message);
2727
+ i = p.data.cdn, s = p.data.objectKey, V.create({ timeout: 18e5, headers: { "Content-Type": r.type } }).put(p.data.presignedUrl, r).then((m) => {
2728
+ m.status === 200 && (m = { success: 1, file: { url: i + s } }), this.onUpload(m);
2729
+ }).catch((m) => {
2730
+ this.onError(m);
2731
+ });
2708
2732
  }
2709
2733
  uploadByUrl(t) {
2710
2734
  let e, i = { "Content-Type": "application/json" };
@@ -2712,7 +2736,7 @@ class xe {
2712
2736
  const s = this.config.userStore.token, n = this.config.userStore.tokenName, r = this.config.userStore.tokenPrefix;
2713
2737
  s && n && (i[n] = r + " " + s);
2714
2738
  }
2715
- e = ct.create({ timeout: 18e5, headers: i }).post(this.config.endpoints.byUrl, { url: t, accept: ".jpg,.jpeg,.gif,.png,.webp" }), e.then((s) => {
2739
+ e = V.create({ timeout: 18e5, headers: i }).post(this.config.endpoints.byUrl, { url: t, accept: ".jpg,.jpeg,.gif,.png,.webp" }), e.then((s) => {
2716
2740
  if (s.status !== 200 || s.data.success === !1)
2717
2741
  return void this.onError(s.data.message);
2718
2742
  let n = { success: 1, file: { url: s.data.data.cdn + s.data.data.objectKey } };
@@ -2728,26 +2752,26 @@ class xe {
2728
2752
  return void this.onError("文件类型不支持");
2729
2753
  let r = {};
2730
2754
  if (this.config.userStore) {
2731
- const h = this.config.userStore.token, u = this.config.userStore.tokenName, g = this.config.userStore.tokenPrefix;
2732
- h && u && (r[u] = g + " " + h);
2755
+ const h = this.config.userStore.token, p = this.config.userStore.tokenName, g = this.config.userStore.tokenPrefix;
2756
+ h && p && (r[p] = g + " " + h);
2733
2757
  }
2734
- const o = ct.create({ timeout: 18e5, headers: r });
2758
+ const o = V.create({ timeout: 18e5, headers: r });
2735
2759
  r["Content-Type"] = "application/json";
2736
2760
  const a = await o.post(this.config.endpoints.byFile, { fileName: t.name, contentType: t.type });
2737
2761
  if (a.status !== 200)
2738
2762
  return void this.onError(a.statusText);
2739
- const l = a.data;
2740
- if (!l.success)
2741
- return void this.onError(l.message);
2742
- let d = l.data.cdn, c = l.data.objectKey;
2743
- r["Content-Type"] = t.type, o.put(l.data.presignedUrl, t).then((h) => {
2744
- h.status === 200 && (h = { success: 1, file: { url: d + c } }), this.onUpload(h);
2763
+ const d = a.data;
2764
+ if (!d.success)
2765
+ return void this.onError(d.message);
2766
+ let l = d.data.cdn, c = d.data.objectKey;
2767
+ r["Content-Type"] = t.type, o.put(d.data.presignedUrl, t).then((h) => {
2768
+ h.status === 200 && (h = { success: 1, file: { url: l + c } }), this.onUpload(h);
2745
2769
  }).catch((h) => {
2746
2770
  this.onError(h);
2747
2771
  });
2748
2772
  }
2749
2773
  }
2750
- class X {
2774
+ class J {
2751
2775
  constructor({ data: t, config: e, api: i, readOnly: s, block: n }) {
2752
2776
  var r;
2753
2777
  this.isCaptionEnabled = null, this.api = i, this.block = n, this.userStore = e == null ? void 0 : e.userStore, this.config = { endpoints: e.endpoints, additionalRequestData: e.additionalRequestData, additionalRequestHeaders: e.additionalRequestHeaders, field: e.field, types: e.types, captionPlaceholder: this.api.i18n.t((r = e.captionPlaceholder) != null ? r : "Caption"), buttonContent: e.buttonContent, uploader: e.uploader, actions: e.actions, features: e.features || {}, userStore: e.userStore }, this.uploader = new xe({ config: this.config, onUpload: (o) => this.onUpload(o), onError: (o) => this.uploadingFailed(o) }), this.ui = new Le({ api: i, config: this.config, onSelectFile: () => {
@@ -2786,12 +2810,12 @@ class X {
2786
2810
  }
2787
2811
  renderSettings() {
2788
2812
  var n;
2789
- const t = X.tunes.concat(this.config.actions || []), e = { border: "withBorder", background: "withBackground", stretch: "stretched", caption: "caption" };
2813
+ const t = J.tunes.concat(this.config.actions || []), e = { border: "withBorder", background: "withBackground", stretch: "stretched", caption: "caption" };
2790
2814
  ((n = this.config.features) == null ? void 0 : n.caption) === "optional" && t.push({ name: "caption", icon: Pt, title: "With caption", toggle: !0 });
2791
2815
  const i = t.filter((r) => {
2792
- var a, l;
2793
- const o = Object.keys(e).find((d) => e[d] === r.name);
2794
- return o === "caption" ? ((a = this.config.features) == null ? void 0 : a.caption) !== !1 : o == null || ((l = this.config.features) == null ? void 0 : l[o]) !== !1;
2816
+ var a, d;
2817
+ const o = Object.keys(e).find((l) => e[l] === r.name);
2818
+ return o === "caption" ? ((a = this.config.features) == null ? void 0 : a.caption) !== !1 : o == null || ((d = this.config.features) == null ? void 0 : d[o]) !== !1;
2795
2819
  }), s = (r) => {
2796
2820
  var a;
2797
2821
  let o = this.data[r.name];
@@ -2831,7 +2855,7 @@ class X {
2831
2855
  }
2832
2856
  set data(t) {
2833
2857
  var e;
2834
- this.image = t.file, this._data.caption = t.caption || "", this.ui.fillCaption(this._data.caption), X.tunes.forEach(({ name: i }) => {
2858
+ this.image = t.file, this._data.caption = t.caption || "", this.ui.fillCaption(this._data.caption), J.tunes.forEach(({ name: i }) => {
2835
2859
  const s = t[i] !== void 0 && (t[i] === !0 || t[i] === "true");
2836
2860
  this.setTune(i, s);
2837
2861
  }), (t.caption || ((e = this.config.features) == null ? void 0 : e.caption) === !0) && this.setTune("caption", !0);
@@ -2869,8 +2893,8 @@ class X {
2869
2893
  }
2870
2894
  class Te {
2871
2895
  constructor({ api: t, data: e, config: i, block: s }) {
2872
- var n, r, o, a, l, d, c, h, u, g, v, b, y, S, D, B, z;
2873
- this.settings = [], this.api = t, this.block = s, this.data = { floatLeft: (n = e == null ? void 0 : e.floatLeft) != null ? n : !1, floatRight: (r = e == null ? void 0 : e.floatRight) != null ? r : !1, center: (o = e == null ? void 0 : e.center) != null ? o : !1, sizeSmall: (a = e == null ? void 0 : e.sizeSmall) != null ? a : !1, sizeMiddle: (l = e == null ? void 0 : e.sizeMiddle) != null ? l : !1, sizeLarge: (d = e == null ? void 0 : e.sizeLarge) != null ? d : !1, resize: (h = (c = e == null ? void 0 : e.resize) != null ? c : i == null ? void 0 : i.resize) != null ? h : !1, resizeSize: (u = e == null ? void 0 : e.resizeSize) != null ? u : 0, crop: (v = (g = e == null ? void 0 : e.crop) != null ? g : i == null ? void 0 : i.crop) != null ? v : !1, cropperFrameHeight: (b = e == null ? void 0 : e.cropperFrameHeight) != null ? b : 0, cropperFrameWidth: (y = e == null ? void 0 : e.cropperFrameWidth) != null ? y : 0, cropperFrameLeft: (S = e == null ? void 0 : e.cropperFrameLeft) != null ? S : 0, cropperFrameTop: (D = e == null ? void 0 : e.cropperFrameTop) != null ? D : 0, cropperImageHeight: (B = e == null ? void 0 : e.cropperImageHeight) != null ? B : 0, cropperImageWidth: (z = e == null ? void 0 : e.cropperImageWidth) != null ? z : 0, cropperInterface: void 0 }, this.wrapper = void 0, this.buttons = [], this.styles = { settingsButton: "cdx-settings-button", settingsButtonActive: "cdx-settings-button--active", settingsButtonModifier: "", settingsButtonModifierActive: "" };
2896
+ var n, r, o, a, d, l, c, h, p, g, m, f, v, L, w, _, B;
2897
+ this.settings = [], this.api = t, this.block = s, this.data = { floatLeft: (n = e == null ? void 0 : e.floatLeft) != null ? n : !1, floatRight: (r = e == null ? void 0 : e.floatRight) != null ? r : !1, center: (o = e == null ? void 0 : e.center) != null ? o : !1, sizeSmall: (a = e == null ? void 0 : e.sizeSmall) != null ? a : !1, sizeMiddle: (d = e == null ? void 0 : e.sizeMiddle) != null ? d : !1, sizeLarge: (l = e == null ? void 0 : e.sizeLarge) != null ? l : !1, resize: (h = (c = e == null ? void 0 : e.resize) != null ? c : i == null ? void 0 : i.resize) != null ? h : !1, resizeSize: (p = e == null ? void 0 : e.resizeSize) != null ? p : 0, crop: (m = (g = e == null ? void 0 : e.crop) != null ? g : i == null ? void 0 : i.crop) != null ? m : !1, cropperFrameHeight: (f = e == null ? void 0 : e.cropperFrameHeight) != null ? f : 0, cropperFrameWidth: (v = e == null ? void 0 : e.cropperFrameWidth) != null ? v : 0, cropperFrameLeft: (L = e == null ? void 0 : e.cropperFrameLeft) != null ? L : 0, cropperFrameTop: (w = e == null ? void 0 : e.cropperFrameTop) != null ? w : 0, cropperImageHeight: (_ = e == null ? void 0 : e.cropperImageHeight) != null ? _ : 0, cropperImageWidth: (B = e == null ? void 0 : e.cropperImageWidth) != null ? B : 0, cropperInterface: void 0 }, this.wrapper = void 0, this.buttons = [], this.styles = { settingsButton: "cdx-settings-button", settingsButtonActive: "cdx-settings-button--active", settingsButtonModifier: "", settingsButtonModifierActive: "" };
2874
2898
  }
2875
2899
  static get isTune() {
2876
2900
  return !0;
@@ -3016,13 +3040,13 @@ class Te {
3016
3040
  resizeClick(t, e, i) {
3017
3041
  const s = document.getElementsByClassName("ce-block__content")[0].clientWidth;
3018
3042
  let n = 0, r = 0;
3019
- const o = (l) => {
3020
- const d = l.clientX - n;
3043
+ const o = (d) => {
3044
+ const l = d.clientX - n;
3021
3045
  let c = r;
3022
- e === "right" && (c += d), e === "left" && (c -= d), c > 50 && c < s && (t.style.width = c + "px");
3046
+ e === "right" && (c += l), e === "left" && (c -= l), c > 50 && c < s && (t.style.width = c + "px");
3023
3047
  }, a = () => {
3024
- const l = parseInt(window.getComputedStyle(t).width, 10);
3025
- l > 0 && (this.data.resizeSize = l), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", a), this.block.dispatchChange();
3048
+ const d = parseInt(window.getComputedStyle(t).width, 10);
3049
+ d > 0 && (this.data.resizeSize = d), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", a), this.block.dispatchChange();
3026
3050
  };
3027
3051
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", a), n = i.clientX, r = parseInt(window.getComputedStyle(t).width, 10);
3028
3052
  }
@@ -3109,50 +3133,50 @@ class Ee {
3109
3133
  }), e;
3110
3134
  }
3111
3135
  }
3112
- const Me = { class: "ebl-editor", id: "holder" }, _e = Ut({ name: "EblEditor", inheritAttrs: !1, __name: "Editor", props: { readOnly: { type: Boolean, default: !1 }, placeholder: { default: "Enter something" }, data: { default: () => ({ blocks: [] }) }, locale: { default: {} }, userStore: {}, showOutline: { type: Boolean, default: !1 } }, emits: ["onReady", "onChange"], setup(p, { expose: t, emit: e }) {
3136
+ const Me = { class: "ebl-editor", id: "holder" }, _e = Ut({ name: "EblEditor", inheritAttrs: !1, __name: "Editor", props: { readOnly: { type: Boolean, default: !1 }, placeholder: { default: "Enter something" }, data: { default: () => ({ blocks: [] }) }, locale: { default: {} }, userStore: {}, showOutline: { type: Boolean, default: !1 } }, emits: ["onReady", "onChange"], setup(u, { expose: t, emit: e }) {
3113
3137
  const i = Vt("EblEditorSettings");
3114
3138
  let s = e;
3115
- const n = p;
3116
- let r = J(n.data), o = !1, a = null, l = null, d = null;
3139
+ const n = u;
3140
+ let r = Q(n.data), o = !1, a = null, d = null, l = null;
3117
3141
  const c = ["indent", "blockAlignment"];
3118
3142
  return Kt(() => {
3119
- a = new Qt({ minHeight: 100, holder: "holder", autofocus: !0, defaultBlock: "paragraph", placeholder: n.placeholder, tunes: c, tools: { inlineCode: $, underline: we, Color: { class: ke }, marker: { class: P }, indent: { class: Ce }, alert: { class: _, inlineToolbar: !0 }, List: { class: G, inlineToolbar: !0, config: { defaultStyle: "checklist", maxLevel: 4 } }, h1: { class: ae, inlineToolbar: !0 }, h2: { class: le, inlineToolbar: !0 }, h3: { class: de, inlineToolbar: !0 }, h4: { class: he, inlineToolbar: !0 }, h5: { class: ce, inlineToolbar: !0 }, h6: { class: pe, inlineToolbar: !0 }, paragraph: { class: lt, inlineToolbar: !0 }, blockAlignment: { class: at, inlineToolbar: !0 }, code: { class: U, config: { lang: "javascript", theme: "github-dark-dimmed" } }, quote: { class: ue, inlineToolbar: !0 }, delimiter: ge, table: { class: Se, inlineToolbar: !0, config: { rows: 2, cols: 3 } }, image: { class: X, inlineToolbar: !0, tunes: c.concat(["imageResize"]), config: { types: ".png,.jpeg,.jpg,.gif,.webp", userStore: n.userStore, endpoints: { byFile: i == null ? void 0 : i.fileUploadEndpoint }, features: { caption: !1, stretch: !1, border: !1, background: !1 } } }, imageResize: { class: Te, config: { resize: !0, crop: !1 } } }, data: r, readOnly: n.readOnly, i18n: n.locale, onChange: (h, u) => {
3120
- s("onChange", h, u);
3143
+ a = new Qt({ minHeight: 100, holder: "holder", autofocus: !0, defaultBlock: "paragraph", placeholder: n.placeholder, tunes: c, tools: { inlineCode: $, underline: we, Color: { class: ke }, marker: { class: P }, indent: { class: Ce }, alert: { class: H, inlineToolbar: !0 }, List: { class: X, inlineToolbar: !0, config: { defaultStyle: "checklist", maxLevel: 4 } }, h1: { class: ae, inlineToolbar: !0 }, h2: { class: le, inlineToolbar: !0 }, h3: { class: de, inlineToolbar: !0 }, h4: { class: he, inlineToolbar: !0 }, h5: { class: ce, inlineToolbar: !0 }, h6: { class: pe, inlineToolbar: !0 }, paragraph: { class: dt, inlineToolbar: !0 }, blockAlignment: { class: lt, inlineToolbar: !0 }, code: { class: U, config: { lang: "javascript", theme: "github-dark-dimmed" } }, quote: { class: ue, inlineToolbar: !0 }, delimiter: ge, table: { class: Se, inlineToolbar: !0, config: { rows: 2, cols: 3 } }, image: { class: J, inlineToolbar: !0, tunes: c.concat(["imageResize"]), config: { types: ".png,.jpeg,.jpg,.gif,.webp", userStore: n.userStore, endpoints: { byFile: i == null ? void 0 : i.fileUploadEndpoint }, features: { caption: !1, stretch: !1, border: !1, background: !1 } } }, imageResize: { class: Te, config: { resize: !0, crop: !1 } } }, data: r, readOnly: n.readOnly, i18n: n.locale, onChange: (h, p) => {
3144
+ s("onChange", h, p);
3121
3145
  }, onReady: () => {
3122
- o = !0, new oe("holder", n.readOnly, a, "1px solid #999"), l = new fe({ editor: a, config: { debounceTimer: 200, maxLength: 100 }, onUpdate: () => {
3123
- } }), r = J(n.data), l.initialize(r), n.data && n.data.blocks && n.data.blocks.length > 0 && a.render(r), n.showOutline && (d = new Ee("holder", a), d.render(r)), s("onReady");
3146
+ o = !0, new oe("holder", n.readOnly, a, "1px solid #999"), d = new fe({ editor: a, config: { debounceTimer: 200, maxLength: 100 }, onUpdate: () => {
3147
+ } }), r = Q(n.data), d.initialize(r), n.data && n.data.blocks && n.data.blocks.length > 0 && a.render(r), n.showOutline && (l = new Ee("holder", a), l.render(r)), s("onReady");
3124
3148
  } });
3125
3149
  }), Yt(() => {
3126
3150
  a !== null && (a.destroy(), a = null);
3127
- }), Gt(() => n.data, (h, u) => {
3128
- r = J(h), a != null && o && a.render(r).then(() => {
3129
- d != null && n.showOutline && d.render(r);
3130
- }), l != null && (l.clear(), l.initialize(r));
3151
+ }), Gt(() => n.data, (h, p) => {
3152
+ r = Q(h), a != null && o && a.render(r).then(() => {
3153
+ l != null && n.showOutline && l.render(r);
3154
+ }), d != null && (d.clear(), d.initialize(r));
3131
3155
  }, { deep: !0 }), t({ validate: function() {
3132
- return new Promise((h, u) => {
3156
+ return new Promise((h, p) => {
3133
3157
  if (a === null)
3134
3158
  return h(!1);
3135
3159
  a.save().then((g) => g.blocks.length > 0 ? h(!0) : h(!1));
3136
3160
  });
3137
3161
  }, getData: function() {
3138
- return new Promise((h, u) => {
3162
+ return new Promise((h, p) => {
3139
3163
  if (a === null)
3140
3164
  return h(null);
3141
3165
  a.save().then((g) => h(g));
3142
3166
  });
3143
- } }), (h, u) => (Xt(), Jt("div", Me));
3167
+ } }), (h, p) => (Xt(), Jt("div", Me));
3144
3168
  } }), Dt = [_e];
3145
- let qt = [];
3146
- for (let p in Dt) {
3147
- const t = re(Dt[p]);
3148
- qt.push(t);
3169
+ let jt = [];
3170
+ for (let u in Dt) {
3171
+ const t = re(Dt[u]);
3172
+ jt.push(t);
3149
3173
  }
3150
- const ze = { messages: { ui: { blockTunes: { toggler: { "Click to tune": "可拖拽和点击" } }, toolbar: { toolbox: { Add: "添加", Filter: "过滤", "Nothing found": "无内容" }, popover: { Filter: "过滤", "Nothing found": "无内容" } }, popover: { Filter: "筛选", "Nothing found": "未找到任何内容", "Convert to": "转化为" } }, toolNames: { Text: "段落", H1: "一级标题", H2: "二级标题", H3: "三级标题", H4: "四级标题", H5: "五级标题", H6: "六级标题", "Ordered List": "有序列表", "Unordered List": "无序列表", Checklist: "任务列表", Quote: "引用", Code: "代码块", Delimiter: "分割线", Link: "链接", Bold: "加粗", Italic: "倾斜", Alert: "高亮块", indent: "缩进", Marker: "突出显示", Color: "文本颜色", Underline: "下划线", InlineCode: "行内代码", Table: "表格", Image: "图片" }, tools: { image: { "Couldn’t upload image. Please try another.": "上传图片失败,请稍后重试。" }, table: { "Add row above": "在下面插入行", "Add row below": "在下面插入行", "Delete row": "删除行", "Add column to left": "在左边插入列", "Add column to right": "在右边插入列", "Delete column": "删除列", "With headings": "使用标题行", "Without headings": "不使用标题行" }, marker: { Marker: "突出显示" }, link: { "Add a link": "添加链接", Save: "保存", "Pasted link is not valid.": "链接地址无效" }, List: { Unordered: "无序", Ordered: "有序", Checklist: "任务列表", "Counter type": "计数器类型", Numeric: "阿拉伯数字", "Lower Roman": "小写罗马数字", "Upper Roman": "大写罗马数字", "Lower Alpha": "小写字母", "Upper Alpha": "大写字母", "Start with": "从" }, paragraph: { "Enter something": "请输入内容" }, stub: { "The block can not be displayed correctly.": "该模块不能放置在这里" }, code: { "Enter your code": "输入代码", Copied: "已复制" }, convertTo: { "Convert to": "转化为" }, alert: { "alert-primary": "主要样式", "alert-secondary": "次要样式", "alert-info": "信息", "alert-success": "成功", "alert-warning": "警告", "alert-danger": "危险", "alert-light": "浅色", "alert-dark": "深色", "align-left": "左对齐", "align-center": "居中", "align-right": "右对齐", "Type here...": "输入内容" } }, blockTunes: { delete: { Delete: "删除", "Click to delete": "点击删除" }, moveUp: { "Move up": "向上移" }, moveDown: { "Move down": "向下移" }, filter: { Filter: "过滤" }, blockAlignment: { "left align": "左对齐", "center align": "居中对齐", "right align": "右对齐", "justify align": "两端对齐" }, indent: { "Indent right": "向右缩进", "Indent left": "向左缩进" } } } }, jt = ((p = []) => ({ version: "2.31.13", install: (t, e) => {
3151
- t[pt] || (t[pt] = !0, p.forEach((i) => t.use(i)), t.provide("EblEditorSettings", e));
3152
- } }))(qt), Ne = jt.install, We = jt.version;
3174
+ const ze = { messages: { ui: { blockTunes: { toggler: { "Click to tune": "可拖拽和点击" } }, toolbar: { toolbox: { Add: "添加", Filter: "过滤", "Nothing found": "无内容" }, popover: { Filter: "过滤", "Nothing found": "无内容" } }, popover: { Filter: "筛选", "Nothing found": "未找到任何内容", "Convert to": "转化为" } }, toolNames: { Text: "段落", H1: "一级标题", H2: "二级标题", H3: "三级标题", H4: "四级标题", H5: "五级标题", H6: "六级标题", "Ordered List": "有序列表", "Unordered List": "无序列表", Checklist: "任务列表", Quote: "引用", Code: "代码块", Delimiter: "分割线", Link: "链接", Bold: "加粗", Italic: "倾斜", Alert: "高亮块", indent: "缩进", Marker: "突出显示", Color: "文本颜色", Underline: "下划线", InlineCode: "行内代码", Table: "表格", Image: "图片" }, tools: { image: { "Couldn’t upload image. Please try another.": "上传图片失败,请稍后重试。" }, table: { "Add row above": "在下面插入行", "Add row below": "在下面插入行", "Delete row": "删除行", "Add column to left": "在左边插入列", "Add column to right": "在右边插入列", "Delete column": "删除列", "With headings": "使用标题行", "Without headings": "不使用标题行" }, marker: { Marker: "突出显示" }, link: { "Add a link": "添加链接", Save: "保存", "Pasted link is not valid.": "链接地址无效" }, List: { Unordered: "无序", Ordered: "有序", Checklist: "任务列表", "Counter type": "计数器类型", Numeric: "阿拉伯数字", "Lower Roman": "小写罗马数字", "Upper Roman": "大写罗马数字", "Lower Alpha": "小写字母", "Upper Alpha": "大写字母", "Start with": "从" }, paragraph: { "Enter something": "请输入内容" }, stub: { "The block can not be displayed correctly.": "该模块不能放置在这里" }, code: { "Enter your code": "输入代码", Copied: "已复制" }, convertTo: { "Convert to": "转化为" }, alert: { "alert-primary": "主要样式", "alert-secondary": "次要样式", "alert-info": "信息", "alert-success": "成功", "alert-warning": "警告", "alert-danger": "危险", "alert-light": "浅色", "alert-dark": "深色", "align-left": "左对齐", "align-center": "居中", "align-right": "右对齐", "Type here...": "输入内容" } }, blockTunes: { delete: { Delete: "删除", "Click to delete": "点击删除" }, moveUp: { "Move up": "向上移" }, moveDown: { "Move down": "向下移" }, filter: { Filter: "过滤" }, blockAlignment: { "left align": "左对齐", "center align": "居中对齐", "right align": "右对齐", "justify align": "两端对齐" }, indent: { "Indent right": "向右缩进", "Indent left": "向左缩进" } } } }, qt = ((u = []) => ({ version: "2.31.14", install: (t, e) => {
3175
+ t[pt] || (t[pt] = !0, u.forEach((i) => t.use(i)), t.provide("EblEditorSettings", e));
3176
+ } }))(jt), Ne = qt.install, We = qt.version;
3153
3177
  export {
3154
3178
  _e as EblEditor,
3155
- jt as default,
3179
+ qt as default,
3156
3180
  Ne as install,
3157
3181
  We as version,
3158
3182
  ze as zhCn