@ones-editor/editor 0.0.3-beta.102 → 0.0.3-beta.103

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.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document!="undefined"){var t=document.createElement("style");t.appendChild(document.createTextNode(`@charset "UTF-8";@keyframes ones-editor-blink{0%,to{background-color:transparent}50%{background-color:var(--primary-color)}}*{--link-color: #338fe5;--color-0: #e52727;--color-1: #eb6414;--color-2: #f0a100;--color-3: #24b47e;--color-4: #338fe5;--color-5: #9678d3;--color-6: #909090;--background-color-0: #fad4d4;--background-color-1: #fbe0d0;--background-color-2: #fceccc;--background-color-3: #d3f0e5;--background-color-4: #d6e9fa;--background-color-5: #eae4f6;--background-color-6: #dedede;--background-color-7: #e52727;--background-color-8: #eb6414;--background-color-9: #f0a100;--background-color-10: #24b47e;--background-color-11: #338fe5;--background-color-12: #9678d3;--background-color-13: #909090;--background-color-14: #e8e8e8;--font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif}div.editor-root{--text-color: #303030;--primary-color: #338fe5;--background-selection: #338fe533;--background-code: #cdcdcd40}div.editor-root{color:var(--text-color);position:relative;box-sizing:border-box;height:100%;width:100%;z-index:1}div.editor-root.readonly div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] span.text.link{cursor:pointer}div.editor-root *{box-sizing:border-box;font-family:var(--font-family)}div.editor-root button{outline:none}div.editor-root.active div.editor-content .editor-cursor{opacity:1}div.editor-root .safari.mobile div.editor-content .editor-input{pointer-events:all;width:8px}div.editor-root div.editor-content{height:100%;width:100%;padding:0 30px 30px}div.editor-root div.editor-content .editor-cursor{position:absolute;background:var(--primary-color);width:2px;transition:top .1s ease-in,left .1s linear;animation:ones-editor-blink 1s ease-in-out infinite;opacity:0;pointer-events:none}div.editor-root div.editor-content .editor-input{position:absolute;opacity:0;pointer-events:none;width:16px;height:20px;font-size:16px}div.editor-root div.editor-content div[data-type=editor-container]{position:relative}div.editor-root div.editor-content div[data-type=editor-container].root{user-select:none;width:100%;cursor:text}div.editor-root div.editor-content div[data-type=editor-container].root>.container-blocks>*+*{margin-top:1em}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block]:not(:first-of-type){background-color:var(--background-selection)}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block]:not(:first-of-type) div[data-type=block-background]>.editor-selection-background{background-color:transparent!important}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block].embed-block>div[data-type=block-content]:before,div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block].embed-block .embed-selected-content:before{display:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-quoted]+div[data-type=editor-block][data-style-quoted]{margin-top:0}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block]{font-size:var(--font-size);line-height:var(--line-height);position:relative;--font-size: 15px;--line-height: 1.6}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-align=center] div[data-type=block-content]{text-align:center}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-align=right] div[data-type=block-content]{text-align:end}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].block-hidden{display:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=text]{cursor:text}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]{word-break:break-word;position:relative}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span{cursor:text}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text{white-space:pre-wrap}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.link{color:var(--link-color)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.link:hover{text-decoration:underline}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.link.style-strikethrough:hover{text-decoration:underline line-through}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-bold{font-weight:700}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-italic{font-style:italic}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-underline{text-decoration:underline}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-strikethrough{text-decoration:line-through}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-underline.style-strikethrough{text-decoration:underline line-through}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-code{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:var(--background-code);padding:4px;font:.8em Monaco,Consolas,"Andale Mono",DejaVu Sans Mono,monospace}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-subscript{vertical-align:sub;font-size:70%}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-superscript{vertical-align:super;font-size:70%}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="0"]{color:var(--color-0)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="1"]{color:var(--color-1)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="2"]{color:var(--color-2)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="3"]{color:var(--color-3)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="4"]{color:var(--color-4)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="5"]{color:var(--color-5)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="6"]{color:var(--color-6)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="0"]{background-color:var(--background-color-0)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="1"]{background-color:var(--background-color-1)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="2"]{background-color:var(--background-color-2)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="3"]{background-color:var(--background-color-3)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="4"]{background-color:var(--background-color-4)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="5"]{background-color:var(--background-color-5)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="6"]{background-color:var(--background-color-6)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="7"]{background-color:var(--background-color-7)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="8"]{background-color:var(--background-color-8)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="9"]{background-color:var(--background-color-9)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="10"]{background-color:var(--background-color-10)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="11"]{background-color:var(--background-color-11)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="12"]{background-color:var(--background-color-12)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="13"]{background-color:var(--background-color-13)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="14"]{background-color:var(--background-color-14)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].inputting-insertion>span[data-type=insertion-content]{border-bottom:1px solid var(--primary-color)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].remote-cursor-insertion{width:0px;position:relative;display:inline-block;vertical-align:text-bottom;overflow:visible;height:1em}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].remote-cursor-insertion>span[data-type=insertion-content]{position:absolute;color:transparent;width:3px;left:-3px;border-right:var(--cursor-color) 1px solid;text-overflow:clip;display:inline-block;top:-5px;bottom:0}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].remote-cursor-insertion>span[data-type=insertion-content] span[data-cursor-name]{display:inline-block;width:8px;background-color:transparent;border:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].remote-cursor-insertion>span[data-type=insertion-content] span[data-cursor-name]:hover:before,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].remote-cursor-insertion.active>span[data-type=insertion-content] span[data-cursor-name]:before{content:attr(data-cursor-name);position:absolute;top:-12px;height:1.1em;background-color:var(--cursor-color);z-index:27;left:0px;color:#fff;white-space:nowrap;font-size:12px;display:flex;align-items:center;padding:1px 4px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] span[data-type=box-content]{border-radius:2px;margin-left:8px;margin-right:8px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] span[data-type=editor-box].br-box>span[data-type=box-content] img{vertical-align:middle;max-width:1em}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-tools] .editor-block-anchor{position:absolute}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-background] .editor-selection-background{position:absolute;background-color:var(--background-selection);z-index:1;pointer-events:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].unknown-block{cursor:default}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.hover>div[data-type=block-content],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].unknown-block.hover>div[data-type=block-content]{outline:1px solid #338fe5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block>div[data-type=block-content],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].unknown-block>div[data-type=block-content]{display:flex}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.hover .embed-hover-content{outline:1px solid #338fe5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.selected>div[data-type=block-content],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.selected .embed-selected-content{position:relative}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.selected>div[data-type=block-content]:before,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.selected .embed-selected-content:before{content:" ";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:1;background-color:#338fe5;opacity:.1}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].unknown-block{color:#909090;font-size:12px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].unknown-block>div[data-type=block-content]{padding:5px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-quoted]{border-left:4px solid #e8e8e8;color:#909090}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-quoted]:not([data-list-level]){padding-left:8px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="1"]{--font-size: 28px;--line-height: 1.5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="2"]{--font-size: 26px;--line-height: 1.5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="3"]{--font-size: 24px;--line-height: 1.5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="4"]{--font-size: 22px;--line-height: 1.5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="5"]{--font-size: 20px;--line-height: 1.6}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="6"]{--font-size: 18px;--line-height: 1.6}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="7"]{--font-size: 16px;--line-height: 1.6}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="8"]{--font-size: 14px;--line-height: 1.6}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading]{font-size:var(--font-size);line-height:var(--line-height);font-weight:700}.editor-disable-scroll{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:9900;overflow:hidden}div:not(.comment-editor-root)>div.editor-root>div.editor-content>div[data-type=editor-container]>div.container-blocks>div[data-type=editor-block]:first-of-type{font-size:30px;line-height:1.3}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-anchor{position:absolute;pointer-events:none;z-index:-1}.editor-command-bar.toolbar .color-button{width:24px;height:24px;display:flex;padding:0;margin:0;align-items:center;justify-content:center;background-color:transparent;border:0;outline:0;border-radius:3px;cursor:pointer}.editor-command-bar.toolbar .color-button[data-color="0"]{color:var(--color-0)}.editor-command-bar.toolbar .color-button[data-color="1"]{color:var(--color-1)}.editor-command-bar.toolbar .color-button[data-color="2"]{color:var(--color-2)}.editor-command-bar.toolbar .color-button[data-color="3"]{color:var(--color-3)}.editor-command-bar.toolbar .color-button[data-color="4"]{color:var(--color-4)}.editor-command-bar.toolbar .color-button[data-color="5"]{color:var(--color-5)}.editor-command-bar.toolbar .color-button[data-color="6"]{color:var(--color-6)}.editor-command-bar.toolbar .color-button[data-background-color="0"]{background-color:var(--background-color-0)}.editor-command-bar.toolbar .color-button[data-background-color="1"]{background-color:var(--background-color-1)}.editor-command-bar.toolbar .color-button[data-background-color="2"]{background-color:var(--background-color-2)}.editor-command-bar.toolbar .color-button[data-background-color="3"]{background-color:var(--background-color-3)}.editor-command-bar.toolbar .color-button[data-background-color="4"]{background-color:var(--background-color-4)}.editor-command-bar.toolbar .color-button[data-background-color="5"]{background-color:var(--background-color-5)}.editor-command-bar.toolbar .color-button[data-background-color="6"]{background-color:var(--background-color-6)}.editor-command-bar.toolbar .color-button[data-background-color="7"]{background-color:var(--background-color-7)}.editor-command-bar.toolbar .color-button[data-background-color="8"]{background-color:var(--background-color-8)}.editor-command-bar.toolbar .color-button[data-background-color="9"]{background-color:var(--background-color-9)}.editor-command-bar.toolbar .color-button[data-background-color="10"]{background-color:var(--background-color-10)}.editor-command-bar.toolbar .color-button[data-background-color="11"]{background-color:var(--background-color-11)}.editor-command-bar.toolbar .color-button[data-background-color="12"]{background-color:var(--background-color-12)}.editor-command-bar.toolbar .color-button[data-background-color="13"]{background-color:var(--background-color-13)}.editor-command-bar.toolbar .color-button[data-background-color="14"]{background-color:var(--background-color-14)}.tippy-content{white-space:pre-line}.editor-button{min-height:26px;min-width:46px;font-size:12px;font-weight:500;outline:none;background-color:var(--editor-button-bg-color, #338fe5);color:var(--editor-button-color, #fff);border:0;padding:4px 8px;border-radius:4px;margin-right:8px;cursor:pointer}.editor-button:hover{background-color:#5ca5ea}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}[data-theme=dropdown-list]{border-radius:4px;background:white;position:relative;max-width:calc(100vw - 24px);box-shadow:#0f0f0f0d 0 0 0 1px,#0f0f0f1a 0 3px 6px,#0f0f0f33 0 9px 24px;overflow:hidden}[data-theme=dropdown-list] .tippy-content{padding:0;background:white;color:#303030}[data-theme=dropdown-list] .tippy-content .editor-command-bar{max-height:50vh}[data-theme=dropdown-list] .filterable-list{min-width:100px;max-width:300px;display:flex;flex-direction:column;max-height:100%}[data-theme=dropdown-list] .filterable-list .filter{padding:8px}[data-theme=dropdown-list] .filterable-list .filter .filter-container{width:100%;font-size:14px;line-height:20px;padding:3px 6px;position:relative;border-radius:3px;box-shadow:#0f0f0f1a 0 0 0 1px inset;background:rgba(242,241,238,.6);cursor:text;height:28px;box-sizing:border-box;display:flex;align-items:center}[data-theme=dropdown-list] .filterable-list .filter .filter-container input.filter-input{border:none;outline:none;flex-grow:1;background:transparent}[data-theme=dropdown-list] .filterable-list .list{max-height:60vh;overflow-y:auto;padding:8px 0}[data-theme=dropdown-list] .filterable-list .list .list-item{user-select:none;transition:background 20ms ease-in 0s;cursor:pointer;width:calc(100% - 8px);margin-left:4px;margin-right:4px;border-radius:3px;height:24px;padding:4px 8px;display:flex;align-items:center;box-sizing:border-box}[data-theme=dropdown-list] .filterable-list .list .list-item .list-text{white-space:nowrap}[data-theme=dropdown-list] .filterable-list .list .list-item.selected{background-color:#eee}[data-theme=dropdown-list] .filterable-list .list .list-item.disabled{color:#c1c1c1}::placeholder{color:#bbb}.toast{font-family:Avenir,Helvetica,Arial,sans-serif;visibility:hidden;min-width:250px;margin-left:-125px;background-color:#333;color:#fff;text-align:center;border-radius:2px;padding:8px;position:fixed;z-index:1;left:50%;bottom:30px}.toast.show{visibility:visible;animation:toast_fade_in .5s,toast_fade_out .5s 2.5s}.toast.positioned.show{animation:toast_fade_in_positioned .5s,toast_fade_out_positioned .5s 2.5s}.toast.positioned{bottom:unset}@keyframes toast_fade_in{0%{bottom:0;opacity:0}to{bottom:30px;opacity:1}}@keyframes toast_fade_out{0%{bottom:30px;opacity:1}to{bottom:0;opacity:0}}@keyframes toast_fade_in_positioned{0%{opacity:0}to{opacity:1}}@keyframes toast_fade_out_positioned{0%{opacity:1}to{opacity:0}}div.tippy-box[data-theme=toolbar] .tippy-content,div.tippy-box[data-theme=menu] .tippy-content{padding:0}div.tippy-box[data-theme=menu] .tippy-content .editor-command-bar.menu{min-width:180px}div.tippy-box button{outline:none}.editor-command-bar{pointer-events:all;display:flex;box-sizing:border-box;--text-color: #606060;--primary-color: #338fe5;--selected-color: #f8f8f8;--separator-color: #dedede;--warn-color: #fdf4f4}.editor-command-bar.fixed.toolbar{box-shadow:none}.editor-command-bar.menu{display:flex;flex-direction:column;align-items:flex-start;padding:5px 0;background:#ffffff;box-shadow:0 0 1px #30303040,0 12px 24px #30303026;border-radius:2px;max-height:50vh;overflow:auto}.editor-command-bar.menu .command-item.standard{color:var(--text-color);user-select:none;transition:background 20ms ease-in 0s;cursor:pointer;width:100%;height:32px;padding:6px 10px;display:flex;align-items:center;box-sizing:border-box}.editor-command-bar.menu .command-item.standard .menu-item-icon{align-items:center;height:24px;width:24px;margin-right:5px;margin-top:-2px;display:flex;flex-direction:column;justify-content:center}.editor-command-bar.menu .command-item.standard .menu-item-name{white-space:nowrap;flex-grow:1;display:flex;align-items:center}.editor-command-bar.menu .command-item.standard .item-subtext{color:#b2bccd}.editor-command-bar.menu .command-item.standard .menu-item-sub-indicator{display:flex;align-items:center;justify-content:center}.editor-command-bar.menu .command-item.standard .menu-item-sub-indicator svg{width:16px;height:16px}.editor-command-bar.menu .command-item.standard.disabled{color:#c7c7c7;cursor:not-allowed}.editor-command-bar.menu .command-item.separator{height:1px;margin:4px 0;background-color:var(--separator-color);width:100%}.editor-command-bar.menu .command-item.section{font-size:.8em;color:#ccc;padding:5px 5px 5px 10px}.editor-command-bar.menu .command-item.selected{background-color:var(--selected-color)}.editor-command-bar.menu .command-item.selected[data-id=delete]{background-color:var(--warn-color)}.editor-command-bar.menu .command-item.selected.disabled{background-color:transparent}.editor-command-bar.menu .command-item.checked{color:var(--primary-color)}.editor-command-bar.menu .command-item.checked .menu-item-checked-icon{display:flex;align-items:center;justify-content:center;margin-left:10px}.editor-command-bar.menu .command-item.checked.disabled{color:#c7c7c7}.editor-command-bar.menu .command-item span.highlight{color:#e52727}.editor-command-bar.toolbar{display:flex;flex-direction:row;align-items:flex-start;padding:5px 10px;gap:5px;background:#ffffff;box-shadow:0 0 1px #30303033,0 8px 16px #30303026;border-radius:3px}.editor-command-bar.toolbar .command-item{background:transparent;border:none;display:flex;align-items:center;justify-content:center;color:var(--text-color);height:24px;padding:0;cursor:pointer;border-radius:3px;min-width:24px}.editor-command-bar.toolbar .command-item.selected:not(.disabled){background-color:var(--selected-color)}.editor-command-bar.toolbar .command-item.disabled{color:#c7c7c7}.editor-command-bar.toolbar .command-item.checked{color:var(--primary-color)}.editor-command-bar.toolbar .command-item.checked.disabled{color:#c7c7c7}.editor-command-bar.toolbar .command-item.separator{margin:auto 2px;height:20px;min-width:1px;width:1px;background-color:var(--separator-color);padding:0;pointer-events:none;cursor:default}.editor-command-bar.toolbar .command-item .toolbar-item-name-container,.editor-command-bar.toolbar .command-item .toolbar-item-icon-container{display:flex}.editor-command-bar.toolbar .command-item[data-dropdown=true]{padding-left:4px;padding-right:4px}.editor-command-bar.toolbar .command-item[data-dropdown=true] .toolbar-item-icon-container{width:24px;height:24px;align-items:center;justify-content:center}.editor-command-bar.toolbar .command-item .toolbar-item-dropdown-container{display:flex}.editor-command-bar.toolbar .command-item .toolbar-item-dropdown-container svg{transform:rotate(360deg);transition:transform .2s linear}.editor-command-bar.toolbar .command-item.active .toolbar-item-dropdown-container svg{transform:rotate(180deg)}.editor-command-bar.toolbar .editor-button+.editor-button{margin-left:5px}.reference-hidden .tippy-box[data-reference-hidden]{opacity:0;pointer-events:none;transition:none}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.editor-dropdown{display:flex;align-items:center;border:1px solid #f0f0f0;border-radius:3px;font-size:14px;width:200px;height:30px}.editor-dropdown *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.editor-dropdown .dropdown-text,.editor-dropdown .dropdown-input{flex-grow:1;padding:2px 8px;border:none;outline:none;background:transparent;font-size:14px;color:#333;min-width:0;flex-shrink:1}.editor-dropdown .dropdown-text{margin-right:4.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:100%;cursor:text;display:flex;align-items:center}.editor-dropdown:hover{border-color:#338fe5}.editor-dropdown.active{border-color:#338fe5;box-shadow:0 0 0 2px #338fe533}.editor-dropdown.active .dropdown-text{display:none}.editor-dropdown:not(.active) .dropdown-input{display:none}.editor-dropdown .dropdown-labels{display:flex;align-items:center;flex-shrink:0}.editor-dropdown .dropdown-labels .dropdown-label{color:#338fe5;background-color:#eaf3fc;height:20px;padding:0 5px;border-radius:3px;display:flex;align-items:center}.editor-dropdown .dropdown-labels .dropdown-label+.dropdown-label{margin-left:5px}.editor-dropdown .dropdown-clear-icon,.editor-dropdown .dropdown-icon{flex-shrink:0;width:16px;height:16px;margin-left:4px;display:flex;align-items:center;justify-content:center;cursor:pointer}.editor-dropdown .dropdown-clear-icon{color:#909090}.editor-dropdown.empty .dropdown-clear-icon,.editor-dropdown:not(:hover) .dropdown-clear-icon{display:none}.editor-dropdown.empty .dropdown-text{color:#909090}.editor-dropdown .dropdown-icon{margin-right:4px}.scale-border:after,.color-palette .palette-container-row .background-color-button.selected:after,.color-palette .palette-container-row .background-color-button:hover:after{content:"";outline:1px solid #d6e9fa;border-radius:3px;position:absolute;left:0;right:0;top:0;bottom:0;transform:scale(1.1)}.color-palette{display:flex;flex-direction:column;align-items:center;padding-top:5px;background-color:#fff;--active-color: #2872b7}.color-palette .bar-desc{box-sizing:border-box;width:100%;height:24px;padding-left:10px;margin-bottom:10px;line-height:24px;font-size:12px;font-weight:500;background:#F8F8F8;color:#909090}.color-palette .palette-container{padding:0 10px}.color-palette .background-color .palette-container-row:first-child{margin-bottom:5px}.color-palette .palette-container-row{display:flex;flex-direction:row;margin-bottom:20px}.color-palette .palette-container-row .color-button{width:24px;height:24px;border:none;outline:none;cursor:pointer;border-radius:3px;background-color:#fff;border:1px solid #f0f0f0;display:flex;margin:0;padding:0;align-items:center;justify-content:center}.color-palette .palette-container-row .color-button:hover{border:1px solid #d6e9fa}.color-palette .palette-container-row .color-button.selected{border:1px solid var(--primary-color)}.color-palette .palette-container-row .color-button[data-color-index="-1"]{color:var(--text-color)}.color-palette .palette-container-row .color-button[data-color-index="0"]{color:var(--color-0)}.color-palette .palette-container-row .color-button[data-color-index="1"]{color:var(--color-1)}.color-palette .palette-container-row .color-button[data-color-index="2"]{color:var(--color-2)}.color-palette .palette-container-row .color-button[data-color-index="3"]{color:var(--color-3)}.color-palette .palette-container-row .color-button[data-color-index="4"]{color:var(--color-4)}.color-palette .palette-container-row .color-button[data-color-index="5"]{color:var(--color-5)}.color-palette .palette-container-row .color-button[data-color-index="6"]{color:var(--color-6)}.color-palette .palette-container-row .background-color-button{width:24px;height:24px;border:none;outline:none;cursor:pointer;border-radius:3px;position:relative}.color-palette .palette-container-row .background-color-button.selected:after{outline:1px solid var(--primary-color)}.color-palette .palette-container-row .background-color-button[data-color-index="-1"]{position:relative;background-color:#fff;border:1px solid #e8e8e8}.color-palette .palette-container-row .background-color-button[data-color-index="-1"]:after{transform:scale(1.2)}.color-palette .palette-container-row .background-color-button[data-color-index="-1"]:before{content:"";position:absolute;width:1px;height:56px;top:2px;left:22px;background-color:#c7c7c7;transform:rotate(45deg) scale(.5);transform-origin:-1px -2px}.color-palette .palette-container-row .background-color-button[data-color-index="0"]{background-color:var(--background-color-0)}.color-palette .palette-container-row .background-color-button[data-color-index="1"]{background-color:var(--background-color-1)}.color-palette .palette-container-row .background-color-button[data-color-index="2"]{background-color:var(--background-color-2)}.color-palette .palette-container-row .background-color-button[data-color-index="3"]{background-color:var(--background-color-3)}.color-palette .palette-container-row .background-color-button[data-color-index="4"]{background-color:var(--background-color-4)}.color-palette .palette-container-row .background-color-button[data-color-index="5"]{background-color:var(--background-color-5)}.color-palette .palette-container-row .background-color-button[data-color-index="6"]{background-color:var(--background-color-6)}.color-palette .palette-container-row .background-color-button[data-color-index="7"]{background-color:var(--background-color-7)}.color-palette .palette-container-row .background-color-button[data-color-index="8"]{background-color:var(--background-color-8)}.color-palette .palette-container-row .background-color-button[data-color-index="9"]{background-color:var(--background-color-9)}.color-palette .palette-container-row .background-color-button[data-color-index="10"]{background-color:var(--background-color-10)}.color-palette .palette-container-row .background-color-button[data-color-index="11"]{background-color:var(--background-color-11)}.color-palette .palette-container-row .background-color-button[data-color-index="12"]{background-color:var(--background-color-12)}.color-palette .palette-container-row .background-color-button[data-color-index="13"]{background-color:var(--background-color-13)}.color-palette .palette-container-row .background-color-button[data-color-index="14"]{background-color:var(--background-color-14)}.color-palette .palette-container-row .color-button+.color-button{margin-left:5px}.color-palette .palette-container-row .background-color-button+.background-color-button{margin-left:5px}.color-palette .clear-button-container{box-sizing:border-box;width:100%;margin-bottom:5px;padding:0 10px}.color-palette .clear-button-container .clear-button{box-sizing:border-box;padding:3px 10px;width:100%;height:26px;background:#ffffff;color:#606060;border:1px solid #c7c7c7;border-radius:3px;cursor:pointer}.color-palette .clear-button-container .clear-button:hover{border-color:var(--primary-color);color:var(--primary-color)}.color-palette .clear-button-container .clear-button:active{border-color:var(--active-color);color:var(--active-color);background-color:#d6e9fa}.editor-input-wrap .editor-input-label{margin-top:8px;margin-bottom:8px;position:relative}.editor-input-wrap .editor-input-label.required:before{content:"*";color:#e82100;position:absolute;left:-8px;top:3px}.editor-input-wrap .editor-input-label .span{font-size:14px;line-height:1.4;font-weight:700;color:#303030}.editor-input-wrap .editor-input-container{display:flex;border:none;border-radius:4px;padding:4px;background-color:#fff}.editor-input-wrap .editor-input-container .editor-input{outline:none;border:1px solid #c7c7c7;border-radius:3px;padding:4px 10px;font-size:14px;line-height:1.4;color:#000;width:100%}.editor-input-wrap .editor-input-container .editor-input:focus{border-color:#338fe5;box-shadow:0 0 0 2px #338fe533}.editor-input-wrap.error .editor-input-container{border:1px solid #e82100}.editor-input-wrap.error .editor-input-container .editor-input{border:none;outline:none;box-shadow:unset}.editor-input-wrap.error .editor-input-error{margin-top:8px;color:red;display:block}.editor-input-wrap .editor-input-error{display:none}div.scroll-container-root{position:relative}div.scroll-container-root>div.scroll-container{position:relative;overflow-x:auto;overflow-y:hidden;box-sizing:border-box;line-height:0px}div.scroll-container-root>div.scroll-container>.scroll-area{position:relative;display:inline-block;overflow:hidden;line-height:normal}div.scroll-container-root>div.scroll-container{scrollbar-width:none}div.scroll-container-root>div.scroll-container::-webkit-scrollbar{height:0;opacity:0}div.scroll-container-root>div.container-scroll-tool .container-border-shadow{position:absolute;top:0;opacity:0;width:0;border:none;pointer-events:none;transition:opacity 50ms ease-in;z-index:1}div.scroll-container-root>div.container-scroll-tool .container-right-border-shadow{right:0;background:linear-gradient(90deg,rgba(31,35,41,0) 0,rgba(31,35,41,.1));border-right:0px solid #dee0e3}div.scroll-container-root>div.container-scroll-tool .container-left-border-shadow{left:0;background:linear-gradient(270deg,rgba(31,35,41,0) 0,rgba(31,35,41,.1));border-left:0px solid #dee0e3}div.scroll-container-root>div.container-scroll-tool .container-border-shadow.active{width:8px;opacity:1}div.scroll-container-root>div.container-scroll-tool .container-right-border-shadow.active{border-right-width:1px}div.scroll-container-root>div.container-scroll-tool .container-left-border-shadow.active{border-left-width:1px}div.scroll-container-root>div.container-scroll-tool .container-scrollbar{position:absolute;left:0;z-index:1000;visibility:visible;overflow-x:auto;overflow-y:hidden;cursor:auto}div.scroll-container-root>div.container-scroll-tool .container-scrollbar div{height:1px}div.scroll-container-root>div.container-scroll-tool div.container-scrollbar.fixed{position:fixed}div.scroll-container-root.mac>div.container-scroll-tool .container-scrollbar{opacity:.6;transition:opacity .1s ease-in-out}div.scroll-container-root.mac>div.container-scroll-tool .container-scrollbar::-webkit-scrollbar{height:8px}div.scroll-container-root.mac>div.container-scroll-tool .container-scrollbar::-webkit-scrollbar-track{background-color:transparent}div.scroll-container-root.mac>div.container-scroll-tool .container-scrollbar::-webkit-scrollbar-thumb{background-color:#646a73cc;border-radius:8px}div.scroll-container-root.mac>div.container-scroll-tool .container-scrollbar::-webkit-scrollbar-button{display:none}[data-tippy-root]{font-family:Avenir,Helvetica,Arial,sans-serif}[data-command-bar-id=editor-toolbar]{padding-top:10px;padding-bottom:5px}[data-command-bar-id=editor-toolbar] .command-item[data-id=link-text]{height:32px;width:unset}[data-command-bar-id=editor-toolbar] .command-item[data-id=link-text].selected:hover{background-color:transparent}[data-command-bar-id=editor-toolbar] .command-item[data-id=link-text] .link-href-button{max-width:275px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#303030;text-decoration:none}[data-command-bar-id=editor-toolbar] .command-item[data-id=link-text] .link-href-button:hover{text-decoration:underline}[data-command-bar-id=editor-toolbar] .command-item[data-id=edit-link],[data-command-bar-id=editor-toolbar] .command-item[data-id=remove-link]{height:32px}[data-command-bar-id=editor-toolbar] .command-item[data-id=edit-link] svg,[data-command-bar-id=editor-toolbar] .command-item[data-id=remove-link] svg{stroke-width:2}[data-command-bar-id=editor-toolbar] .command-item[data-id=edit-link].selected:hover,[data-command-bar-id=editor-toolbar] .command-item[data-id=remove-link].selected:hover{background-color:transparent;color:#338fe5}[data-command-bar-id=quick-menu],[data-command-bar-id=empty-block-menu]{box-sizing:border-box;width:240px}[data-command-bar-id=quick-menu] .command-item.menu-item,[data-command-bar-id=empty-block-menu] .command-item.menu-item{width:100%;cursor:pointer}[data-command-bar-id=quick-menu] .command-item.menu-item.section,[data-command-bar-id=empty-block-menu] .command-item.menu-item.section{height:24px;padding:2px 10px;font-weight:500;font-size:12px;line-height:20px;color:#909090;background:#F8F8F8;min-height:initial;box-sizing:border-box;margin-bottom:5px}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item{color:#303030;display:flex;width:100%;padding:6px 10px}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-icon-container,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-icon-container{display:flex;align-items:center;justify-content:center;padding-right:6px}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-icon-container .quick-menu-item-icon,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-icon-container .quick-menu-item-icon{width:16px;height:16px;display:flex;align-items:center;justify-content:center}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1{display:flex;align-items:center}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .item-name,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .item-name{flex-grow:1;font-size:14px;line-height:22px;color:#303030}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .item-subtext,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .item-subtext{color:#b2bccd}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .quick-menu-item-submenu-icon,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .quick-menu-item-submenu-icon{display:flex;align-items:center;margin-left:12px}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-2,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-2{margin-top:5px}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-2 .item-markdown,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-2 .item-markdown{color:#b2bccd}[data-command-bar-id=quick-menu] .command-item.menu-item[data-id=placeholder] .quick-menu-item-icon-container,[data-command-bar-id=empty-block-menu] .command-item.menu-item[data-id=placeholder] .quick-menu-item-icon-container{display:none}[data-command-bar-id=quick-menu] .command-item.menu-item[data-id=placeholder] .item-name.text,[data-command-bar-id=empty-block-menu] .command-item.menu-item[data-id=placeholder] .item-name.text{color:#909090!important;padding:5px 0}[data-command-bar-id=block-menu]{width:240px}div.tippy-box .editor-tooltip-desc{display:block;margin-top:2px;color:#a8a9ab}.link-popup-content{padding:10px 7px}.link-popup-content .link-popup-gap{margin-top:16px}.link-popup-content .editor-input-container{padding:4px 0}.link-popup-content .editor-input-container .editor-input{width:330px;line-height:1.5}.link-popup-content .editor-input-wrap .editor-input-label{margin-bottom:4px}.link-popup-content .link-popup-footer{margin:10px 0 5px;text-align:right}.link-popup-content .link-popup-footer button{min-width:58px;min-height:30px;padding:0 10px;border-radius:3px;background-color:#eef3f8;font-size:14px;color:#fff;cursor:pointer;outline:none}.link-popup-content .link-popup-footer .cancel-button{margin:0 8px 0 0;background-color:transparent;border:1px solid #c7c7c7;color:#606060}.link-popup-content .link-popup-footer .cancel-button:hover{color:#303030;background:#eee;border:1px solid #c7c7c7}.link-popup-content .link-popup-footer .submit-button{outline:none;background-color:#338fe5;color:#fff;border:0}.link-popup-content .link-popup-footer .submit-button:disabled{color:#fff;background-color:#338fe580}.link-popup-content .link-popup-footer .submit-button:disabled:hover{background-color:#338fe580}.link-popup-content .link-popup-footer .submit-button:hover{background-color:#5ca5ea}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="1"]{padding-left:24px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="1"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="2"]{padding-left:48px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="2"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="3"]{padding-left:72px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="3"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="4"]{padding-left:96px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="4"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="5"]{padding-left:120px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="5"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="6"]{padding-left:144px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="6"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="7"]{padding-left:168px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="7"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="8"]{padding-left:192px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="8"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="9"]{padding-left:216px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="9"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="10"]{padding-left:240px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="10"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="11"]{padding-left:264px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="11"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="12"]{padding-left:288px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="12"]>div[data-type=block-content]{position:relative}:root{--mindmap-bg-color: #f0f2f4}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block.focused [data-type=block-tools] .editor-mindmap-svg{border-radius:3px;outline:1px solid #338FE5}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block.editor-in-mindmap-first{height:600px;min-width:150px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-content]{margin-right:24px;transition:background-color .25s linear}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-tools] .editor-mindmap-svg{position:absolute;left:0;top:0;right:0;bottom:0;z-index:2;font-size:14px;background-color:var(--mindmap-bg-color)}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-tools] .mindmap-toolbar{position:absolute;top:8px;right:8px;height:24px;z-index:3}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-tools] .mindmap-toolbar .editor-button.mindmap-button{background-color:transparent;outline:none;border:none;fill:none;color:#c1c1c1;cursor:pointer;min-width:initial;margin-right:0}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-tools] .mindmap-toolbar .editor-button.mindmap-button:hover{color:#5587f0}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block.to-mindmap-highlight [data-type=block-content],.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block.to-mindmap-highlight:hover [data-type=block-content]{background-color:#eaf3fc}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap{position:absolute;right:0;top:2px;display:flex;align-items:center;height:calc(var(--font-size) * var(--line-height))}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=list-to-mindmap],.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=mention-button]{flex-grow:0;flex-shrink:0;width:24px;height:24px;min-width:24px;min-height:24px;padding:0;border:0;outline:0;display:flex;align-items:center;justify-content:end;background-color:transparent;color:#07142a}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=list-to-mindmap] svg,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=mention-button] svg{width:16px;height:16px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=list-block-mention]:hover>svg{cursor:initial;background-color:#eee}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button+button[data-button-id=list-block-mention]{right:20px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="1"]{padding-left:0}div.editor-root div.editor-content div[data-block-type=list][data-list-level="2"]{padding-left:24px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="3"]{padding-left:48px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="4"]{padding-left:72px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="5"]{padding-left:96px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="6"]{padding-left:120px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="7"]{padding-left:144px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="8"]{padding-left:168px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="9"]{padding-left:192px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="10"]{padding-left:216px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="11"]{padding-left:240px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="12"]{padding-left:264px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block+div[data-type=editor-block].list-block{margin-top:0}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block{display:flex;padding-bottom:2px;padding-top:2px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=text-only] .list-container{pointer-events:none}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] div[data-type=block-content] span.text{color:#c7c7c7}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unordered] .list-container .list-marker{font-family:PingFangSC-Regular,PingFang SC;justify-content:space-around}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-content]{position:relative;flex-grow:1;padding-left:2px;margin-right:29px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-container{display:flex;min-width:24px;align-items:center;justify-content:center;flex-shrink:0;border-radius:3px;height:calc(var(--font-size) * var(--line-height))}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-container .list-marker{min-width:16px;border:none;background-color:transparent;outline:none;display:flex;align-items:center;justify-content:flex-end;padding:0;overflow:visible;color:var(--primary-color);font-size:var(--font-size)}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block div[data-type=block-tools] .block-helper{top:2px}.editor-root.readonly button[data-button-id=mindmap-close]{display:none}.editor-root:not(.readonly) div[data-type=editor-block].list-block.active [data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover [data-type=block-content]{background-color:#f4f4f4}.editor-root:not(.readonly) div[data-type=editor-block].list-block.active [data-type=block-content] .list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover [data-type=block-content] .list-container{cursor:pointer}.editor-root:not(.readonly) div[data-type=editor-block].list-block .list-container:hover .list-marker{cursor:pointer}.editor-root:not(.readonly) div[data-type=editor-block].list-block:not([data-list-type=unchecked]):not([data-list-type=checked]):not([data-list-type=unordered]) .list-container:hover{background-color:var(--background-selection)}.editor-root:not(.readonly) div[data-type=editor-block].list-block[data-list-type=unordered] .list-container:hover .list-marker{cursor:initial}.editor-root:not(.readonly) div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container:hover .list-marker svg>*{fill:var(--background-selection)}[data-tippy-root] .customize-start-panel{max-width:350px;padding:0 16px;color:#333;font-size:14px;line-height:21px;user-select:none;background-color:#fff!important}[data-tippy-root] .customize-start-panel-input{width:64px;margin:0 8px;border:1px solid #cfd6e1;height:24px;border-radius:3px;padding:1px 0 1px 8px;outline:none;color:inherit;background-color:#fff}[data-tippy-root] .customize-start-panel-button{min-width:40px;font-size:12px;min-height:30px;margin:0 8px 0 0;background-color:var(--primary-color);color:#fff;outline:none;border:none;padding:4px 8px;border-radius:4px;cursor:pointer}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.math-box{display:inline-flex}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.math-box .mathjax-tex-text.mathjax-error{color:var(--color-0)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] img.mathjax{max-width:100%}div.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=math]>div[data-type=block-content]{align-items:center;justify-content:center;min-height:40px}div.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=math]>div[data-type=block-content] img{margin:auto;padding:8px}.mathjax-editor-textarea{border:none;outline:none;width:400px;height:128px}.editor-text-button{border:0;color:var(--text-button-color, #c1c1c1);background-color:var(--text-button-bg-color, transparent);cursor:pointer;border-radius:var(--editor-border-radius, 3px);font-size:14px;padding:1px 6px;display:flex;align-items:center}.editor-text-button:hover{color:var(--text-button-color-hover, #5587F0);background-color:var(--text-button-bg-color-hover, transparent)}div[data-type=editor-block].table-block{--table-bar-width: 6px;--table-bar-left: -6px;--table-bar-top: -6px}div[data-type=editor-block].table-block>div[data-type=block-content]{position:relative;left:-26px}div[data-type=editor-block].table-block.locked-by-self>[data-type=block-content]:after,div[data-type=editor-block].table-block.locked-by-others>[data-type=block-content]:after{display:none}div[data-type=editor-block].table-block.locked-by-self>[data-type=block-content] div[data-type=table-content],div[data-type=editor-block].table-block.locked-by-others>[data-type=block-content] div[data-type=table-content]{position:relative}div[data-type=editor-block].table-block.locked-by-self>[data-type=block-content] div[data-type=table-content]:after,div[data-type=editor-block].table-block.locked-by-others>[data-type=block-content] div[data-type=table-content]:after{content:" ";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:1;background-color:#303030;opacity:.1}div[data-type=editor-block].table-block div[data-type=table-tools] .table-resize-gripper{position:absolute;background-color:transparent;cursor:col-resize;padding:0 2px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-resize-gripper>.table-resize-gripper-indicator{pointer-events:none;background-color:var(--primary-color);width:100%;height:100%}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container{position:absolute;background-color:transparent;z-index:10}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container.top{left:var(--table-bar-left);top:var(--table-bar-top);right:0;height:var(--table-bar-width);flex-direction:row}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container.left{top:0;left:var(--table-bar-left);width:var(--table-bar-width);bottom:0;flex-direction:column}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar{position:absolute;left:0;top:0;right:0;bottom:0;cursor:pointer;display:flex}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar.left{flex-direction:column}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell{background-color:#e8e8e8;position:relative;flex-grow:0;flex-shrink:0}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.corner{width:var(--table-bar-width)}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.top{height:100%}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell:hover{background-color:#dedede}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.selected{background-color:var(--primary-color)}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.danger{background-color:#e52727}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root{position:relative}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root.top{max-width:0;width:0;overflow:visible}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root.top:last-child{margin-left:-2px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root.left{max-height:0;height:0;overflow:visible}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root.left:last-child{margin-top:-2px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container{position:absolute;width:26px;height:26px;display:flex;align-items:center;justify-content:center;z-index:1}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container.top{right:-14px;top:-22px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container.left{transform:rotate(270deg);left:-22px;bottom:-14px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container .insert-indicator{position:absolute;width:3px;height:3px;background:#e8e8e8;border-radius:50%;margin-top:6px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-indicator{display:none}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-column-button{display:unset}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-column-button span.icon{margin-top:2px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .drop-marker{opacity:1;transform:scale(.7)}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker{width:26px;height:26px;border-radius:3px;background:var(--primary-color);cursor:pointer;opacity:0;transform:scale(.4);transition:transform .2s ease-in,opacity .2s ease-in}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker:after{content:"";display:block;width:10px;height:1px;background-color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker:before{content:"";display:block;width:1px;height:10px;background-color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}div[data-type=editor-block].table-block div[data-type=table-tools] .editor-table-chart{padding-top:16px}div[data-type=editor-block].table-block div[data-type=table-content]{position:relative}div[data-type=editor-block].table-block div[data-type=table-content]>.error{color:red;border:1px solid red;padding:8px}div[data-type=editor-block].table-block div[data-type=table-content]>table{border-collapse:collapse;width:max-content;border-spacing:0}div[data-type=editor-block].table-block div[data-type=table-content]>table colgroup col{min-width:40px}div[data-type=editor-block].table-block div[data-type=table-content]>table,div[data-type=editor-block].table-block div[data-type=table-content]>table td,div[data-type=editor-block].table-block div[data-type=table-content]>table th{border:1px solid #c7c7c7;background-color:transparent}div[data-type=editor-block].table-block div[data-type=table-content]>table tr td.danger{background-color:#fce9e9!important}div[data-type=editor-block].table-block div[data-type=table-content]>table td{min-width:40px;padding:0;position:relative}div[data-type=editor-block].table-block div[data-type=table-content]>table td .table-cell-menu-btn{display:none;position:absolute;right:2px;top:2px;padding:0;width:16px;height:16px;border:none;border-radius:3px;background:#eaf3fc;color:#338fe5;cursor:pointer;transform:rotate(0);transition:transform .2s}div[data-type=editor-block].table-block div[data-type=table-content]>table td .table-cell-menu-btn.active{transform:rotate(180deg)}div[data-type=editor-block].table-block div[data-type=table-content]>table td>div[data-type=editor-container].child{padding:8px}div[data-type=editor-block].table-block div[data-type=table-content]>table td>div[data-type=editor-container].child div[data-type=editor-block].table-block>div[data-type=block-content]{pointer-events:none}div[data-type=editor-block].table-block div[data-type=table-content]>table td>div[data-type=editor-container].child div[data-type=editor-block].table-block>div[data-type=block-content] div[data-type=table-content]{pointer-events:auto}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-0{background-color:var(--background-color-0)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-1{background-color:var(--background-color-1)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-2{background-color:var(--background-color-2)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-3{background-color:var(--background-color-3)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-4{background-color:var(--background-color-4)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-5{background-color:var(--background-color-5)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-6{background-color:var(--background-color-6)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-7{background-color:var(--background-color-7)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-8{background-color:var(--background-color-8)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-9{background-color:var(--background-color-9)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-10{background-color:var(--background-color-10)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-11{background-color:var(--background-color-11)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-12{background-color:var(--background-color-12)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-13{background-color:var(--background-color-13)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-14{background-color:var(--background-color-14)}div[data-type=editor-block].table-block div[data-type=table-content]>table.row-title>tbody>tr:first-child>td,div[data-type=editor-block].table-block div[data-type=table-content]>table.col-title td.col-title-item{background-color:#f8f8f8}div[data-type=editor-block].table-block div[data-type=table-content]>table.stripe:not(.row-title)>tbody>tr:nth-of-type(2n),div[data-type=editor-block].table-block div[data-type=table-content]>table.stripe.row-title>tbody>tr:nth-of-type(2n + 1){background-color:#f5f8fb}div[data-type=editor-block].table-block div[data-type=table-content]>table.no-border,div[data-type=editor-block].table-block div[data-type=table-content]>.no-border>tbody>tr>td{border:1px dashed;border-color:transparent}div[data-type=editor-block].table-block.focused div[data-type=table-content]>table.no-border,div[data-type=editor-block].table-block.focused div[data-type=table-content]>table.no-border>tbody>tr>td,div[data-type=editor-block].table-block.child-focused div[data-type=table-content]>table.no-border,div[data-type=editor-block].table-block.child-focused div[data-type=table-content]>table.no-border>tbody>tr>td{border-color:#b9bfc8}div[data-type=editor-block].table-block.full-selected>div[data-type=block-content]>.scroll-container-root>.scroll-container>.scroll-area>div[data-type=table-content]>table{background-color:var(--background-selection)}div[data-type=editor-block].table-block div[data-type=table-content]>table tbody tr td.selected,div[data-type=editor-block].table-block div[data-type=table-content]>table.row-title tbody tr td.selected,div[data-type=editor-block].table-block div[data-type=table-content]>table.col-title tbody tr td.selected{background-color:var(--background-selection)}div[data-type=editor-block].table-block div[data-type=table-content]>table td div[data-type=editor-block].table-block div[data-type=table-content]>table{max-width:100%}.command-item.menu-item .table-creator{background-color:#fff;padding:0 5px}.command-item.menu-item .table-creator .table-creator-row{display:flex}.command-item.menu-item .table-creator .table-creator-row .table-creator-cell{width:16px;height:16px;margin:3px;border:solid 1px #ddd}.command-item.menu-item .table-creator .table-creator-row .table-creator-cell.active{background-color:#99c7f2}div.editor-root div.editor-content div[data-type=editor-container].root div[data-type=editor-block].table-block{margin-top:0}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color]{width:100%}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .bar-desc{display:none}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item{box-sizing:border-box;width:100%;height:32px;padding:5px 10px;display:flex;align-items:center;justify-content:space-between;color:var(--text-color)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-sub-indicator{display:flex;align-items:center;margin-left:5px}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-sub-indicator svg{height:16px;width:16px}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button{width:24px;height:24px;border:none;outline:none;cursor:pointer;border-radius:3px;position:relative;margin-left:auto}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="-1"]{position:relative;background-color:#fff;border:1px solid #e8e8e8}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="-1"]:after{transform:scale(1.2)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="-1"]:before{content:"";position:absolute;width:1px;height:56px;top:2px;left:22px;background-color:#c7c7c7;transform:rotate(45deg) scale(.5);transform-origin:-1px -2px}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="0"]{background-color:var(--background-color-0)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="1"]{background-color:var(--background-color-1)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="2"]{background-color:var(--background-color-2)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="3"]{background-color:var(--background-color-3)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="4"]{background-color:var(--background-color-4)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="5"]{background-color:var(--background-color-5)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="6"]{background-color:var(--background-color-6)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="7"]{background-color:var(--background-color-7)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="8"]{background-color:var(--background-color-8)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="9"]{background-color:var(--background-color-9)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="10"]{background-color:var(--background-color-10)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="11"]{background-color:var(--background-color-11)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="12"]{background-color:var(--background-color-12)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="13"]{background-color:var(--background-color-13)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="14"]{background-color:var(--background-color-14)}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-block-type=table]{background-color:transparent}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-block-type=table] table.row-title>tbody>tr:first-child>td,div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-block-type=table] table.col-title td.col-title-item{background-color:transparent}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-block-type=table] table.stripe:not(.row-title)>tbody>tr:nth-of-type(2n),div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-block-type=table] table.stripe.row-title>tbody>tr:nth-of-type(2n + 1){background-color:transparent}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment{box-shadow:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment table,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment table{box-shadow:0 2px #f8e6ab}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment table table,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment table table{box-shadow:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment.active,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment.active{outline:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment.active table,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment.active table{border-bottom:none;outline:4px solid #f8e6ab}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment.active table table,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment.active table table{box-shadow:none;outline:none}div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block] [data-type=block-content][data-title-placeholder]:before{position:absolute;left:0;top:0;right:0;bottom:0;content:attr(data-title-placeholder);color:#c7c7c7}div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block] [data-type=block-content][data-content-placeholder]:before{position:absolute;left:0;top:0;right:0;bottom:0;content:attr(data-content-placeholder);color:#c7c7c7;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center}div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block] [data-type=block-tools] .block-placeholder-container{position:absolute;left:0;top:0;right:0}div.editor-root.readonly div.editor-content div[data-type=editor-container] div[data-type=editor-block] [data-type=block-content][data-title-placeholder]:before{position:absolute;left:0;top:0;right:0;bottom:0;content:attr(data-title-placeholder-readonly);color:#c7c7c7}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block{min-width:360px;counter-reset:code-line}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block.full-selected{background-color:var(--background-selection)}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block.editing-language div[data-type=block-tools] .code-block-header,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block.child-focused div[data-type=block-tools] .code-block-header,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block:hover div[data-type=block-tools] .code-block-header{opacity:1}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block.wrap>div[data-type=block-tools] .code-block-header button[data-id=wrap] *{color:var(--primary-color)}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block:not(.wrap)>div[data-type=block-content] div[data-type=editor-container].child{overflow-x:auto}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block:not(.wrap)>div[data-type=block-content] div[data-type=editor-container].child div[data-type=block-content]{word-break:keep-all;overflow:visible;white-space:pre}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block:not(.wrap)>div[data-type=block-content] div[data-type=editor-container].child div[data-type=block-content]>span.text,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block:not(.wrap)>div[data-type=block-content] div[data-type=editor-container].child div[data-type=block-content]>span.inputting-insertion{white-space:pre}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header{opacity:0;transition:opacity .3s ease-in 0s;position:absolute;top:0;display:flex;padding-left:16px;padding-right:4px;align-items:center;left:0;right:0;height:32px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .language-select{font-size:14px;color:#999;cursor:pointer;display:flex;align-items:center}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .language-select .arrow-icon{width:16px;height:16px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-spacer{flex-grow:1}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button{display:flex;justify-content:center;align-items:center;border:none;border-radius:2px;margin-left:4px;padding:0;background:none;outline:none;color:#c1c1c1}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button:not(.disabled){cursor:pointer}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button:not(.disabled):hover{color:#5587f0}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button.disabled{cursor:not-allowed}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button[data-id=caption]{margin-right:4px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button .button-icon{height:24px;display:flex;align-items:center;justify-content:center}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button .button-icon>svg{width:24px;height:24px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button .button-label{margin-left:4px;font-size:14px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block.full-selected>div[data-type=block-content]>div.editor-code-root>div.code-text-root{background-color:unset}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root{background-color:var(--background-code)}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container]{padding-left:32px;padding-top:32px;padding-bottom:24px;border-radius:4px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container].selected{background-color:var(--background-selection)}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] *{font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:14px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block+div.text-block{margin-top:4px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block:before{content:counter(code-line);counter-increment:code-line;position:absolute;left:-48px;top:10px;z-index:1;margin-top:-4px;display:block;width:48px;padding-right:8px;text-align:right;color:#aaa;box-sizing:border-box;font-size:12px;font-weight:400;line-height:12px;letter-spacing:0;white-space:nowrap;opacity:1}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-comment,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-prolog,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-doctype,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-cdata{color:#708090}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-punctuation{color:#999}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-namespace{opacity:.7}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-property,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-tag,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-boolean,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-number,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-constant,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-symbol,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-deleted{color:#905}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-selector,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-attr-name,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-string,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-char,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-builtin,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-inserted{color:#690}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-operator,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-entity,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-url,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-string{color:#9a6e3a}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-atrule,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-attr-value,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-keyword{color:#07a}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-function,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-class-name{color:#dd4a68}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-regex,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-important,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-variable{color:#e90}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-important,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-bold{font-weight:700}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-italic{font-style:italic}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-entity{cursor:help}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-caption-root{padding:8px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-caption-root *{color:#aaa}div.editor-root.readonly .container-blocks div[data-block-type=code] div[data-type=block-tools] .code-block-header .code-header-button[data-id=wrap],div.editor-root.readonly .container-blocks div[data-block-type=code] div[data-type=block-tools] .code-block-header .code-header-button[data-id=caption]{display:none}div.editor-root.readonly .container-blocks div[data-block-type=code] div[data-type=block-tools] .code-block-header .language-select{cursor:default!important}div.editor-root.readonly .container-blocks div[data-block-type=code] div[data-type=block-tools] .code-block-header .language-select .arrow-icon{display:none}div.editor-root div.editor-content div[data-type=editor-container].root.select-all div[data-type=block-content]>div.editor-code-root>div.code-text-root{background-color:unset}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer{position:absolute;background-color:transparent;border:1px solid #338FE5;pointer-events:none;z-index:1;display:none}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer.active{display:block}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper{position:absolute;width:16px;height:16px;border:2px solid white;background-color:#338fe5;border-radius:50%;pointer-events:all}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper.bottom{left:calc(50% - 8px);bottom:-8px;cursor:ns-resize}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper.top-left{left:-8px;top:-8px;cursor:nwse-resize}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper.top-right{right:-8px;top:-8px;cursor:nesw-resize}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper.bottom-left{left:-8px;bottom:-8px;cursor:nesw-resize}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper.bottom-right{right:-8px;bottom:-8px;cursor:nwse-resize}div.editor-root.readonly div.editor-content div[data-type=editor-block]>[data-type=block-tools] .block-resizer{display:none}.before-content,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].selected [data-type=block-content] .images .image-container.active:before,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].selected:not(.focused) [data-type=block-content] .images .image-container:before{content:" ";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:1;background-color:#338fe5;opacity:.1}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image]{display:flex}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image][data-style-align=left]{justify-content:flex-start}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image][data-style-align=right]{justify-content:flex-end}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].hover [data-type=block-content]{outline:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].hover [data-type=block-content] .images .image-container.empty:hover,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].hover [data-type=block-content] .images .image-container.error:hover{outline:1px solid #338FE5}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].selected [data-type=block-content]:before{display:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].selected [data-type=block-content]{outline:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].selected [data-type=block-content] .images .image-container.active .image-warning{opacity:0;z-index:-1}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].multi [data-type=block-tools] .block-resizer{display:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image]:not(.multi) [data-type=block-content] .images.empty{min-height:400px}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content]{cursor:default}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images{width:100%;display:flex;align-items:flex-start}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-splitter{width:10px;flex-grow:0;flex-shrink:0;padding:0 4px;cursor:col-resize;height:100%}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-splitter .image-splitter-indicator{width:100%;height:100%}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-splitter:active .image-splitter-indicator,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-splitter:hover .image-splitter-indicator{background-color:#d9d9d9}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container{position:relative;flex:1;background-color:#f8f8f8;display:flex;min-height:inherit;overflow:hidden}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container img{max-width:100%;width:100%;height:auto}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container.empty .upload-image-icon{display:flex;color:#c7c7c7}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container.error{height:100%;outline:1px solid #DEDEDE;border-radius:3px}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container.error img{display:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;z-index:1}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-icon,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-icon{display:flex;color:#c7c7c7}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message{display:flex;flex-direction:column;align-items:center;overflow:hidden}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message .line-1,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message .line-1{margin-top:10px;font-size:18px;font-weight:500;color:#303030;height:26px;vertical-align:middle;line-height:26px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex-shrink:0}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message .line-2,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message .line-3,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message .line-2,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message .line-3{font-size:14px;color:#606060;vertical-align:middle;height:22px;line-height:22px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex-shrink:0}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message .line-2 a,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message .line-3 a,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message .line-2 a,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message .line-3 a{text-decoration:none;color:#338fe5}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .line-3 a{display:inline-flex;align-items:center;text-decoration:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .line-3 a:after{content:" ";display:inline-block;width:16px;height:16px;margin-left:5px;background-image:url("data:image/svg+xml,%3Csvg width='17' height='16' viewBox='0 0 17 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5 2H3.5C2.94772 2 2.5 2.44772 2.5 3V13C2.5 13.5523 2.94772 14 3.5 14H13.5C14.0523 14 14.5 13.5523 14.5 13V10' stroke='%23338FE5'/%3E%3Cpath d='M14.5 2L9 7.5' stroke='%23338FE5'/%3E%3Cpath d='M8.5 2H14.5V8' stroke='%23338FE5'/%3E%3C/svg%3E%0A")}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .uploading-progress-mask{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#303030;opacity:.8;display:flex;align-items:center;justify-content:center}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .uploading-progress-mask .uploading-progress-bar{width:75%;height:6px;border-radius:3px;display:flex;background-color:#fff}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .uploading-progress-mask .uploading-progress-bar .uploading-progress-bar-value{background-color:#338fe5}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .image-warning{position:absolute;right:5px;top:5px;color:#fff;background-color:#333;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:3px;z-index:2;transition:opacity linear .2s;opacity:.7}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container.empty{display:flex;flex-direction:column;align-items:center;outline:1px solid #DEDEDE;border-radius:3px;justify-content:center;height:100%}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container.empty svg{width:48px;height:48px}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-tools] .drag-container{display:flex;box-sizing:content-box;pointer-events:none;position:fixed;z-index:100;background-color:#fff;border:1px solid #338FE5}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-tools] .drag-container .drag-target{width:100%}.editor-root[readonly=true] .image-splitter{visibility:hidden}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].comment{box-shadow:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].comment [data-type=block-content]{box-shadow:0 2px #f8e6ab}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].comment.active{outline:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].comment.active [data-type=block-content]{box-shadow:none;outline:4px solid #f8e6ab}.editor-root .editor-content div[data-type=editor-block].dragging div[data-type=block-tools] .block-helper{opacity:0}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper{position:absolute;right:100%;top:0;padding-right:8px;display:flex;align-items:center}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .helper-sizer{width:0;opacity:0;pointer-events:none}div[data-type=editor-block].locked-by-self>[data-type=block-content],div[data-type=editor-block].locked-by-others>[data-type=block-content]{position:relative}div[data-type=editor-block].locked-by-self>[data-type=block-content]:after,div[data-type=editor-block].locked-by-others>[data-type=block-content]:after{content:" ";position:absolute;left:0;top:0;right:0;bottom:0;z-index:1;background-color:#303030;opacity:.1}div[data-type=editor-block].locked-by-self.text-block>[data-type=block-content]:after,div[data-type=editor-block].locked-by-self.locked-by-self>[data-type=block-content]:after,div[data-type=editor-block].locked-by-others.text-block>[data-type=block-content]:after,div[data-type=editor-block].locked-by-others.locked-by-self>[data-type=block-content]:after{pointer-events:none}div[data-type=editor-block].locked-by-self.text-block>[data-type=block-content]:after,div[data-type=editor-block].locked-by-others.text-block>[data-type=block-content]:after{outline:2px solid #303030}.editor-root{--selected-color: #e8e8e8}.editor-root .editor-content .editor-drop-indicator{position:absolute;background-color:var(--primary-color);pointer-events:none;transition:top .2s linear,left .2s linear,width .2s linear}.editor-root .editor-content div[data-type=editor-block].text-block.highlighted{outline:2px solid var(--background-selection);background-color:var(--background-selection)}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .block-button{width:24px;height:24px;cursor:grab;margin:0;padding:0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;border-radius:3px}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .block-button:hover{background-color:var(--selected-color)}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .block-button svg{width:16px;height:16px;color:#909090}.drag-image-container{position:fixed;z-index:100;box-shadow:0 3px 20px #00000026;background-color:#fff;opacity:.4}.drag-image-container.drag-placeholder{width:500px;height:200px;border:1px solid #dedede;border-radius:3px;background:#e8e8e8}.drag-image-container .drag-image{width:100%;display:none}.drag-image-container[data-status=loaded] .drag-image{display:block}.drag-image-container[data-status=loaded] .drag-loading{display:none}.editor-command-bar-root .editor-command-bar .command-item.menu-item{display:flex;align-items:center;flex:none}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles{padding:5px 10px;background-color:#fff}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section+.text-style-section{margin-top:5px}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section{display:flex;flex-wrap:wrap}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section .style-icon{width:24px;height:24px;padding:0;margin:0 5px 0 0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;outline:none;cursor:pointer;border-radius:3px;color:#606060}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section .style-icon:hover{background-color:var(--selected-color)}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section .style-icon.active{color:#338fe5}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-anchor[data-id=paste-special-button-anchor]{z-index:unset}[data-command-bar-id=paste-special-button] .editor-command-bar.toolbar{padding:0}[data-command-bar-id=paste-special-button] .editor-command-bar.toolbar .command-item[data-dropdown=true]{padding-left:5px;padding-right:5px}.editor-find-dialog{--popover-input-border: 1px solid #CFD6E1;--editor-find-dialog-input-container-border-color: #CFD6E1;--editor-find-dialog-input-container-bg-color: transparent;--editor-border-radius-big: 3px;--editor-color: #07142A;--button-black-text-color: #333;--editor-find-dialog-button-color: #333;--editor-find-dialog-icon-button-color: #333;--editor-find-dialog-button-border-bg-color: rgba(255, 255, 255, .56);--editor-find-dialog-input-placeholder-color: #b9bfc8;--editor-find-dialog-button-disabled-color: #ccc !important;--editor-find-dialog-button-hover-color: rgba(150, 150, 150, .2);--editor-find-dialog-button-border: solid 1px #ccc;box-sizing:border-box;width:400px;background-color:var(--editor-find-dialog-bg-color);border:var(--editor-find-dialog-border);border-radius:var(--editor-border-radius-big);display:flex;padding:8px 8px 0 16px;align-items:flex-start;font-size:14px;font-family:var(--editor-font-family)}.editor-find-dialog .editor-find-content{display:flex;flex-direction:column;flex-grow:1;font-family:inherit}.editor-find-dialog .editor-find-dialog-row{display:flex;margin-bottom:8px;align-items:center}.editor-find-dialog .editor-find-dialog-label{width:80px;flex-grow:0;flex-shrink:0;align-self:center}.editor-find-dialog .editor-find-dialog-input-container{border:var(--popover-input-border);border-color:var(--editor-find-dialog-input-container-border-color);background-color:var(--editor-find-dialog-input-container-bg-color);border-radius:var(--editor-border-radius-big);flex-grow:1;display:flex;padding:2px;align-items:center;height:32px;box-sizing:border-box}.editor-find-dialog .editor-find-dialog-input{border:none;flex-grow:1;width:80px;outline:none;background-color:transparent;color:var(--editor-color)}.editor-find-dialog .editor-find-dialog-input::placeholder{color:var(--editor-find-dialog-input-placeholder-color);opacity:1}.editor-find-dialog .editor-find-dialog-prev{width:24px}.editor-find-dialog .editor-find-dialog-curr{flex-grow:0;text-align:center;flex-shrink:1;display:flex;align-items:center;margin-bottom:2px}.editor-find-dialog .editor-find-dialog-next{width:24px}.editor-find-dialog .editor-find-dialog-icon-button{cursor:pointer;border-radius:4px;color:var(--editor-find-dialog-icon-button-color);background-color:var(--editor-find-dialog-button-border-bg-color);border:none;display:flex;padding:0}.editor-find-dialog .editor-find-dialog-button{padding:6px 16px;cursor:pointer;border-radius:4px;color:var(--editor-find-dialog-button-color);background-color:var(--editor-find-dialog-button-border-bg-color);margin:0 4px;border:none;font-family:inherit;line-height:21px}.editor-find-dialog .editor-find-dialog-button.icon-button{width:32px;height:32px}.editor-find-dialog .editor-find-dialog-button.active,.editor-find-dialog .editor-find-dialog-button:hover{background-color:var(--editor-find-dialog-button-hover-color)}.editor-find-dialog .editor-find-dialog-button:disabled{color:var(--editor-find-dialog-button-disabled-color);cursor:default}.editor-find-dialog .editor-find-dialog-button:disabled:hover{background-color:transparent}.editor-find-dialog .editor-find-dialog-button svg{fill:currentColor}.editor-find-dialog .editor-find-dialog-space{flex-grow:1}.editor-find-dialog .editor-find-dialog-icon-button-border{margin:0 0 0 8px;cursor:pointer;border-radius:4px;color:var(--button-black-text-color);border:var(--editor-find-dialog-button-border);background-color:var(--editor-find-dialog-button-border-bg-color);padding:0;width:32px;display:flex;justify-content:center;align-items:center}.editor-find-dialog .editor-find-dialog-button-close{margin:0 0 0 8px;cursor:pointer;border-radius:4px;color:var(--button-black-text-color);background-color:var(--editor-find-dialog-button-border-bg-color);border:none;padding:0;width:32px;height:32px;display:flex;justify-content:center;align-items:center}.editor-find-dialog .editor-find-dialog-icon-button-border svg,.editor-find-dialog .editor-find-dialog-button-close svg{fill:currentColor}.editor-find-dialog .editor-highlight{opacity:.6;pointer-events:none}.editor-find-dialog .editor-highlight .editor-highlight-child{position:absolute;background-color:bisque}.editor-find-dialog .editor-highlight.active .editor-highlight-child{position:absolute;background-color:tomato}.editor-find-dialog .editor-search-result-highlight{opacity:.6;pointer-events:none}.editor-find-dialog .editor-search-result-highlight .editor-highlight-child{position:absolute;background-color:#40e0d0}.editor-find-dialog .editor-find-dialog-status{display:flex}.editor-highlight{opacity:.6;pointer-events:none}.editor-highlight .editor-highlight-child{position:absolute;background-color:bisque}.editor-highlight.active .editor-highlight-child{position:absolute;background-color:tomato}.editor-search-result-highlight{opacity:.6;pointer-events:none}.editor-search-result-highlight .editor-highlight-child{position:absolute;background-color:#40e0d0}.editor-find-dialog-status{display:flex}.comment-editor{font-size:14px;border:1px solid #c7c7c7;border-radius:3px;padding:1px 10px;margin:6px 10px 0}.comment-editor:after{content:"";height:0;display:block;clear:both}.comment-editor-root{display:inline-block;min-width:calc(100% - 40px);padding-top:2px}.comment-editor-root .editor-root .editor-content{padding:0}.comment-editor-img{float:right;color:#c1c1c1;padding:0}.comment-editor-root:not(.comment-editor-readonly) .editor-root .editor-content [data-type=editor-block]:not([data-block-type=text]){width:248px}.comment-editor-editing{border:1px solid #338fe5}.comment-editor-readonly{border:none;padding-left:37px;margin:0}.comment-editor-readonly .comment-editor-img{display:none}.comment-item-root{position:relative;margin-top:10px}.comment-item-root:not(.last-comment-item):before{content:" ";display:block;position:absolute;left:20px;width:1px;background-color:var(--editor-border-color, #e8e8e8);overflow:hidden;opacity:.8;top:21px;bottom:-12px;transform:scaleX(.5)}.comment-item-root .item-head{padding:0 10px;position:relative;display:flex;align-items:center}.comment-item-root .item-head-avatar{margin-right:5px;width:var(--editor-comment-avatar-width, 21px);height:var(--editor-comment-avatar-width, 21px);border-radius:100%}.comment-item-root .item-head-username{font-size:var(--editor-comment-username-font-size, 12px);color:var(--editor-comment-username-color, #07142a);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.comment-item-root .item-head-modified{margin-left:8px;font-size:12px;color:var(--editor-comment-modified-color, #808080);flex-grow:1;white-space:nowrap}.comment-item-root .item-head-tools{display:flex;align-items:center;visibility:hidden}.comment-item-root .item-head-tools .editor-text-button svg{width:20px;height:20px}.comment-item-root .item-head-tools.active{visibility:visible}.comment-item-root .item-actions{margin-top:10px;display:flex;justify-content:flex-end}.comment-item-root .item-actions.hidden{display:none}.comment-item-root .item-actions .editor-button[data-button-id=comment-item-cancel]{color:#606060;background:transparent;border:1px solid #c7c7c7}.comment-item-root .item-actions .editor-button[data-button-id=comment-item-cancel]:hover{color:#303030;background:#eee;border:1px solid #c7c7c7}.comment-item-root .item-actions .editor-button.disabled[data-button-id=comment-item-ok]{color:#fff;background-color:#338fe580;cursor:default}.comment-item-root:hover:not(.comment-item-editing) .item-head-tools{visibility:visible}.comment-item-root.readonly .item-head-tools{display:none}.mobile-comment-item{margin-top:4px;background-color:var(--editor-comment-layer-bg-color);padding-bottom:20px;color:var(--editor-comment-username-color)}.mobile-comment-item .item-head{padding:12px;display:flex;align-items:center}.mobile-comment-item .item-head-avatar{width:var(--editor-comment-avatar-size);height:var(--editor-comment-avatar-size);flex-grow:0}.mobile-comment-item .item-head-username{margin-left:12px}.mobile-comment-item .item-head-modified{margin-left:12px;color:#999}.mobile-comment-item .item-editor .comment-editor-readonly{padding-left:18px}.mini-comment-item{position:relative;line-height:16px;width:20px;height:16px;text-align:center;font-size:12px;border-radius:1px;background-color:var(--editor-comment-active-color, #FFC328);color:var(--editor-comment-mini-text-color, #ffffff);cursor:pointer}.mini-comment-item:after{content:"";position:absolute;left:50%;bottom:-4px;width:6px;height:6px;background-color:var(--editor-comment-active-color, #FFC328);border-radius:1px;transform:matrix(.71,.61,.82,-.71,0,0) translate(-50%);z-index:-1}.comment-quick-reply .quick-reply-button{position:absolute;left:8px;bottom:3px;z-index:2;color:var(--editor-comment-quick-reply-color, #7084A4);font-size:12px}.comment-quick-reply .quick-reply-button.editor-text-button:hover{color:var(--text-button-color-hover, #5587F0);background-color:var(--text-button-bg-color-hover, transparent)}.comment-quick-reply .quick-reply-editor{display:none}.comment-quick-reply .quick-reply-editor .reply-editor-actions{display:flex;justify-content:flex-end;margin-top:10px}.comment-quick-reply .quick-reply-editor .reply-editor-actions .editor-button[data-button-id=quick-reply-cancel]{color:#606060;background:transparent;border:1px solid #c7c7c7}.comment-quick-reply .quick-reply-editor .reply-editor-actions .editor-button[data-button-id=quick-reply-cancel]:hover{color:#303030;background:#eee;border:1px solid #c7c7c7}.comment-quick-reply .quick-reply-editor .reply-editor-actions .editor-button.disabled[data-button-id=quick-reply-ok]{color:#fff;background-color:#338fe580;cursor:default}.comment-quick-reply.hidden,.comment-quick-reply.reply-editor-editing .quick-reply-button{display:none}.comment-quick-reply.reply-editor-editing .quick-reply-editor{display:block}:root{--editor-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Robot, "Helvetica Neue", Helvetica, Arial, sans-serif;--editor-comment-layer-bg-color:#ffffff;--editor-comment-group-bg-color: #ffffff;--comment-root-border-color: #eaeaea;--editor-comment-layer-active-border-color: #cecece;--editor-box-shadow: 0px 3px 20px rgba(0, 0, 0, .15);--wiz-editor-z-comment-group-active-top-before: 29;--editor-comment-quote-color: #909090;--editor-comment-quote-before-bg-color: #909090;--editor-comment-switch-button-width: 12px;--editor-comment-active-color: #FFC328;--editor-bg-color: #ffffff;--wiz-editor-z-comment-head:11;--text-button-color-hover:#5587f0;--editor-comment-username-color:#07142A;--editor-comment-avatar-size: 32px}.disabled-scroll{overflow:hidden}.editor-root .editor-content div[data-type=editor-block].text-block.comment{box-shadow:none}.editor-root .editor-content div[data-type=editor-block].text-block.comment>div[data-type=block-content]>span{border-bottom:2px solid #f8e6ab}.editor-root .editor-content div[data-type=editor-block].text-block.comment.active{box-shadow:none;outline:none}.editor-root .editor-content div[data-type=editor-block].text-block.comment.active>div[data-type=block-content] span{background-color:#f8e6ab}.editor-root .editor-content div[data-type=editor-block] span.text.comment{border-bottom:2px solid #f8e6ab}.editor-root .editor-content div[data-type=editor-block] span.text.comment.active{background-color:#faf1d1}.editor-root .editor-content div[data-type=editor-block].comment{box-shadow:0 2px #f8e6ab}.editor-root .editor-content div[data-type=editor-block].comment.active{box-shadow:none;outline:4px solid #f8e6ab}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-comment-button{all:unset;position:absolute;right:-28px;top:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center;padding:0;border-radius:3px;color:#07142a;cursor:pointer}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-comment-button:hover{background:#eaeaea}.editor-web-comment-root{position:absolute;right:0;width:300px;top:0;bottom:0;transition:width .16s ease-in;will-change:width;font-family:var(--editor-font-family)}.editor-web-comment-root .comment-groups-container .comment-group-item-root{position:absolute;left:50%;right:0;width:290px;transform:translate(-50%);background-color:var(--editor-comment-group-bg-color);border-radius:2px;border-color:var(--editor-comment-layer-active-border-color);box-shadow:var(--editor-box-shadow);padding-bottom:18px}.editor-web-comment-root .comment-groups-container .comment-group-item-root:not(.no-animation){transition:top .2s ease-in,opacity .35s ease-in}.editor-web-comment-root .comment-groups-container .comment-group-item-root:before{content:"";position:absolute;left:0;right:0;height:6px;background-color:#fff;border-radius:2px 2px 0 0;z-index:var(--wiz-editor-z-comment-group-active-top-before)}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head{display:flex;align-items:center}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-quote{box-sizing:content-box;font-size:12px;line-height:12px;height:12px;color:var(--editor-comment-quote-color);padding:18px 12px 10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:100%;max-width:calc(100% - 80px)}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-quote:before{content:"";display:block;width:2px;height:100%;background-color:var(--editor-comment-quote-before-bg-color);margin-right:6px;float:left;border-radius:10px}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch{display:flex;align-items:center;height:22px;padding-top:6px;visibility:hidden}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button{padding:0;width:var(--editor-comment-switch-button-width);margin:3px 0;color:#606060}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button[data-button-id=switch-up]{margin-right:16px}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button:not(.disabled):hover{color:var(--text-button-color-hover)}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button.disabled{color:#60606080;cursor:not-allowed}.editor-web-comment-root .comment-groups-container .comment-group-item-root.active:before{background-color:var(--editor-comment-active-color)}.editor-web-comment-root .comment-groups-container .comment-group-item-root.active .item-head-switch{visibility:visible}.editor-web-comment-root .comment-groups-container .comment-group-item-root.readonly .comment-quick-reply{display:none}.editor-mobile-comments-root{position:fixed;left:0;right:0;bottom:0;top:0;overflow:hidden;z-index:11}.editor-mobile-comments-root .mobile-comment-mask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:#00000073}.editor-mobile-comments-root .mobile-comment-groups-container{position:absolute;width:100%;height:100vh;z-index:1;overflow:hidden}.editor-mobile-comments-root .mobile-comment-groups-container .mobile-comment-groups-scroll-container{padding:0 12px}.editor-mobile-comments-root .mobile-comment-pull-info-container{position:absolute;right:0;left:0;bottom:100px;z-index:2;text-align:center;display:none}.editor-mobile-comments-root .mobile-comment-pull-info-container .mobile-comment-pull-info{display:inline-block;padding:12px;border-radius:36px;margin:0 auto;background-color:#000c;color:#fff;font-size:12px;opacity:0;transition:opacity .25s cubic-bezier(.65,.05,.36,1)}.editor-mobile-comments-root .mobile-comment-pull-info-container.active{display:block}.editor-mobile-comments-root .mobile-comment-pull-info-container.active .mobile-comment-pull-info{opacity:1}.editor-mobile-comments-root .mobile-group-item-root{margin:0 auto;width:100%;height:100vh;overflow:hidden}.editor-mobile-comments-root .mobile-group-item-root .mobile-group-item{min-height:calc(100vh + 1px);padding-bottom:50px}.editor-mobile-comments-root .mobile-group-item-root .mobile-group-item-space{height:50vh}.editor-mobile-comments-root .mobile-group-item-root .mobile-group-item-abstract{background-color:var(--editor-comment-layer-bg-color);padding:12px;color:#999;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.editor-mini-comment-root{position:absolute;right:0;top:0;bottom:0;width:48px;border-left:1px solid #f0f0f0;transition:width .16s ease-in;will-change:width;font-family:var(--editor-font-family);border:none;background-color:transparent;z-index:11}.editor-mini-comment-root .comment-groups-container{width:100%;height:100%}.editor-mini-comment-root .comment-groups-container .mini-group-item{position:absolute;top:0;left:50%;margin-left:-10px;transition:top .2s cubic-bezier(.65,.05,.36,1)}:is(.editor-web-comment-root,.editor-mobile-comments-root,.editor-mini-comment-root).hidden{display:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] [data-box-type=file] span[data-type=box-content]{margin:0}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] [data-box-type=file] span[data-type=box-content] span.file-icon{display:inline-flex;vertical-align:text-bottom}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] [data-box-type=file] span[data-type=box-content] .file-name{color:var(--primary-color);padding:0;border-radius:12px;margin-right:4px;white-space:wrap;word-break:break-all;cursor:pointer}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office]{justify-content:start}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office].hover [data-type=block-content]{border-radius:3px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content]{max-width:360px;min-width:360px;height:48px;cursor:pointer}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root{display:flex;align-items:center;min-width:360px;max-width:100%;background-color:#f5f6f7;border-radius:3px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root:before{border-radius:3px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-details{display:flex;flex-direction:column;justify-content:center;font-size:14px;flex-grow:1}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-details .file-name{color:#1f2329;max-width:185px;display:flex;flex-direction:row;align-items:center;white-space:nowrap}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-details .file-size{color:#646a73;font-size:12px;margin-top:2px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-details .file-name-pre{text-overflow:ellipsis;overflow:hidden}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-actions button{width:34px;height:34px;background-color:#fff;border:1px solid #dee0e3;border-radius:50%;margin:0 8px;padding:0;background-repeat:no-repeat;background-position:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-actions button svg{width:16px;height:16px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-icon{display:flex;width:36px;height:36px;margin:6px 6px 6px 12px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-icon>svg{width:100%;height:100%}div[data-type=editor-block].block-exclusive:after{content:attr(data-exclusive-tips);position:absolute;top:0px;left:0px;width:100%;background:#f8f8f8;border-radius:var(--editor-border-radius);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:14px;line-height:22px;color:#909090;text-align:center;padding:9px 0}:root{--editor-version-button-border: black;--editor-bg-color: #ffffff;--editor-version-list-bg-color: white;--editor-version-select-bg-color: #F8F8F8}.version-dialog{display:flex;background-color:var(--editor-bg-color);width:100%;height:100%;color:var(--editor-color)}.version-dialog *{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;box-sizing:border-box}.version-dialog .version-viewer{flex:1;display:flex;flex-direction:column;width:0;padding:0}.version-dialog .version-viewer .version-dialog-editor{flex-grow:1;overflow-y:auto}.version-dialog .version-viewer .version-info-container{height:50px;border-bottom:#E8E8E8 1px solid;display:flex;align-items:center;flex-shrink:0;padding-left:20px;font-size:14px;color:#303030}.version-dialog .version-viewer .version-info-container .version-info-left .text-1{color:#909090}.version-dialog .version-viewer .version-info-container .version-info-left .name{font-weight:500}.version-dialog .version-viewer .version-info-container .editor-dropdown{margin-left:10px;margin-right:10px}.version-dialog .version-viewer .version-info-container .command-item[data-id=current-version]{min-width:200px;border:1px solid #f0f0f0}.version-dialog .version-viewer .version-info-container .command-item[data-id=current-version] .toolbar-item-name-container{flex-grow:1}.version-dialog .version-viewer .dialog-button-text{margin-top:1px;margin-left:-4px}.version-dialog .version-viewer .dialog-text-button{outline:none;background:transparent;border:none;display:flex;align-items:center;color:var(--editor-color);font-size:16px;font-weight:500;padding:4px 0;cursor:pointer}.version-dialog .version-viewer .dialog-text-button .dialog-button-icon{margin-right:0;width:24px;height:24px}.version-dialog .version-viewer .dialog-text-button .dialog-button-icon svg{fill:currentColor}.editor-root.history .root-container .editor-block .text-element .inline-plugin.editor-box-loading{display:none}.editor-root.history .editor-content{padding:30px 75px}.editor-root.history .history-inserted-block[data-type=editor-block]:not(.table-block,.list-block,.text-block) [data-type=block-content]{border:4px solid var(--op-selected-color)}.editor-root.history .history-inserted-block[data-type=editor-block]:not(.table-block,.list-block,.text-block){position:relative}.editor-root.history .history-inserted-block[data-type=editor-block]:not(.table-block,.list-block,.text-block):hover:after{content:attr(data-op-description);position:absolute;top:-26px;left:0;line-height:24px;background-color:var(--op-color);min-width:20px;opacity:1;color:#fff;padding:0 8px;z-index:var(--wiz-editor-z-history-op-description, 10);font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history .history-inserted-block[data-type=editor-block].table-block table{border:4px solid var(--op-selected-color)}.editor-root.history .history-inserted-block[data-type=editor-block].table-block table .child{pointer-events:none}.editor-root.history .history-inserted-block[data-type=editor-block].table-block{position:relative}.editor-root.history .history-inserted-block[data-type=editor-block].table-block:hover:after{content:attr(data-op-description);position:absolute;top:-26px;left:0;line-height:24px;background-color:var(--op-color);min-width:20px;opacity:1;color:#fff;padding:0 8px;z-index:var(--wiz-editor-z-history-op-description, 10);font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history .history-inserted-block[data-type=editor-block].table-block:hover:after{top:0}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block) [data-type=block-content]{border:4px solid var(--op-selected-color)}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block) [data-type=block-content]{position:relative}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block) [data-type=block-content]:after,.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block) [data-type=block-content]:before{content:" ";position:absolute;display:flex;z-index:var(--wiz-editor-z-history-delete-marker);color:var(--op-color);justify-items:center;align-items:center;justify-content:center;align-content:center;pointer-events:none;overflow:visible;max-width:100%;max-height:100%;left:calc(50% - 16px);top:calc(50% - 2px);width:32px;height:4px;background-color:var(--op-color);transform:rotate(45deg);opacity:1}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block) [data-type=block-content]:before{transform:rotate(135deg)}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block){position:relative}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block):hover:after{content:attr(data-op-description);position:absolute;top:-26px;left:0;line-height:24px;background-color:var(--op-color);min-width:20px;opacity:1;color:#fff;padding:0 8px;z-index:var(--wiz-editor-z-history-op-description, 10);font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history .history-inserted-text{line-height:revert!important;background-color:var(--op-selected-color)}.editor-root.history .history-inserted-text{position:relative}.editor-root.history .history-inserted-text:hover:after{content:attr(data-op-description);position:absolute;top:-26px;left:0;line-height:24px;background-color:var(--op-color);min-width:20px;opacity:1;color:#fff;padding:0 8px;z-index:var(--wiz-editor-z-history-op-description, 10);font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history .history-deleted-box{background-color:var(--op-selected-color);text-decoration:line-through}.editor-root.history .history-deleted-box{position:relative}.editor-root.history .history-deleted-box:hover:after{content:attr(data-op-description);position:absolute;top:-26px;left:0;line-height:24px;background-color:var(--op-color);min-width:20px;opacity:1;color:#fff;padding:0 8px;z-index:var(--wiz-editor-z-history-op-description, 10);font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history [data-box-type=history-deleted-box]>span[data-type=box-content]{border:none!important;margin:0!important}.editor-root.history [data-type=editor-block].table-block div[data-type=block-content]{overflow-x:revert}.editor-dialog-root{position:absolute;left:0;top:0;bottom:0;right:0;background-color:#639;z-index:100}.size-limit-textarea{display:inline-block;position:relative}.size-limit-textarea .size-limit-textarea-input{width:100%;resize:none;overflow:hidden;color:#303030;outline:none;border:1px solid #f0f0f0;border-radius:3px}.size-limit-textarea .size-limit-textarea-input:focus,.size-limit-textarea .size-limit-textarea-input:hover{border-color:#338fe5}.size-limit-textarea .size-limit-textarea-input:focus{box-shadow:0 0 0 2px #338fe533}.size-limit-textarea .size-limit-textarea-warning{position:absolute;right:0;bottom:10px;color:#909090;z-index:1;font-size:12px;pointer-events:none}.version-list-root{width:320px;background:var(--editor-version-list-bg-color);overflow-y:auto;padding:0;border-left:#E8E8E8 1px solid;display:flex;flex-direction:column}.version-list-root .version-list-header{padding:0 20px;font-size:14px;display:flex;align-items:center;margin-top:8px;margin-bottom:8px;flex-shrink:0;color:#909090}.version-list-root .version-list-header .version-count{flex-grow:1}.version-list-root .version-list-empty{height:100%;display:flex;align-items:center;justify-content:center;font-size:14px;color:#909090}.version-list-root .version-list-content{flex-grow:1;overflow-y:auto}.version-list-root .version-list-content .version-item{padding:15px 10px;cursor:pointer}.version-list-root .version-list-content .version-item.child{padding-left:32px}.version-list-root .version-list-content .version-item:not(.active):hover{background:rgba(112,132,164,.1)}.version-list-root .version-list-content .version-item.active{background-color:var(--editor-version-select-bg-color)}.version-list-root .version-list-content .version-item.active .version-item-title .version-actions{display:flex}.version-list-root .version-list-content .version-item.editing .version-item-memo{display:none}.version-list-root .version-list-content .version-item.active .version-item-memo{cursor:text}.version-list-root .version-list-content .version-item.active .version-item-memo:hover{outline:1px solid #338FE5}.version-list-root .version-list-content .version-item .version-item-restore-from{color:#909090;font-size:12px;line-height:1.5em;height:20px;padding:0 10px 10px}.version-list-root .version-list-content .version-item .version-item-restore-from:empty{display:none}.version-list-root .version-list-content .version-item .memo-input.size-limit-textarea{width:100%;min-height:60px}.version-list-root .version-list-content .version-item .memo-input.size-limit-textarea textarea{padding:5px 10px 10px;box-sizing:border-box;font-size:14px;border:none}.version-list-root .version-list-content .version-item .version-item-title{display:flex;align-items:center;padding-bottom:10px;padding-left:10px;padding-right:10px;height:24px}.version-list-root .version-list-content .version-item .version-item-title .version-item-date{font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.version-list-root .version-list-content .version-item .version-item-title .spacer{flex-grow:1}.version-list-root .version-list-content .version-item .version-item-title .version-actions{display:none}.version-list-root .version-list-content .version-item .version-item-title .version-actions button{display:flex;align-items:center;justify-content:center;height:16px;cursor:pointer;border:none;outline:none;background:transparent;padding:0 0 0 5px;color:#909090}.version-list-root .version-list-content .version-item .version-item-title .version-actions button:hover{color:#338fe5}.version-list-root .version-list-content .version-item .version-item-title .version-actions .revert-button{border-left:1px solid #E8E8E8;margin-left:5px}.version-list-root .version-list-content .version-item .version-item-latest{color:#338fe5;background-color:#eaf3fc;height:20px;padding:0 5px;border-radius:3px;display:flex;align-items:center;font-size:12px;margin-left:10px}.version-list-root .version-list-content .version-item .version-item-authors{list-style:none;margin:0;font-size:12px;padding-left:10px}.version-list-root .version-list-content .version-item .version-item-author{display:flex;align-items:center;margin-top:10px;color:#606060}.version-list-root .version-list-content .version-item .version-item-author-mark{width:6px;height:6px;border-radius:3px;margin-right:5px}.version-list-root .version-list-content .version-item .version-item-memo{font-size:14px;color:#303030;padding:5px 10px 10px;border-radius:3px}.version-list-root .version-list-content .version-item .version-item-memo:empty{display:none}.versions-dropdown-header{color:var(--text-color);height:44px;display:flex;align-items:center;padding-left:10px;border-bottom:1px solid #f0f0f0}.versions-dropdown-header .versions-dropdown-header-info{height:16px;color:#909090}.versions-dropdown-header .versions-dropdown-header-icon{height:16px;padding-left:5px;cursor:pointer}.editor-command-bar.menu .command-item.standard[data-id=prev-version]{height:44px}[data-command-bar-id=versions-dropdown-popup]{width:320px}[data-command-bar-id=versions-dropdown-popup] .tippy-box{color:var(--text-color)}[data-command-bar-id=versions-dropdown-popup] *{box-sizing:border-box}[data-command-bar-id=versions-dropdown-popup] .editor-command-bar-header{width:100%;margin-bottom:5px}[data-command-bar-id=versions-dropdown-popup] .command-item{width:100%;cursor:pointer}[data-command-bar-id=versions-dropdown-popup] .command-item .version-item-container{padding:6px 10px;width:100%}[data-command-bar-id=versions-dropdown-popup] .command-item .version-item-container .version-item-memo{font-size:12px;color:#909090;line-height:20px}[data-command-bar-id=versions-dropdown-popup] .command-item .version-item-container .version-item-line1{line-height:22px;display:flex;align-items:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}[data-command-bar-id=versions-dropdown-popup] .command-item .version-item-container .version-item-line1 .version-item-latest{color:#338fe5;background-color:#eaf3fc;height:20px;padding:0 5px;margin-left:10px;border-radius:3px}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=no-versions]{height:34px;color:#909090;padding-left:10px;justify-content:center}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator]{width:100%;box-sizing:border-box}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator] .filter-memoed-version-item{width:100%}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator] .filter-memoed-version-item .filter-item-info{height:24px;color:#909090;display:flex;align-items:center;padding-left:10px;background-color:#f8f8f8;width:100%;box-sizing:border-box;margin:5px 0}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator] .filter-memoed-version-item .filter-item-input-container{height:44px;display:flex;align-items:center;padding-left:10px;color:#303030}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator] .filter-memoed-version-item .filter-item-input-container .filter-item-input{cursor:pointer;accent-color:#338FE5}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator] .filter-memoed-version-item .filter-item-input-container .filter-item-label{user-select:none;cursor:pointer;line-height:1em}.editor-root.readonly .editor-content div[data-type=editor-block].focused div[data-type=block-tools] .block-helper .heading-marker,.editor-root.readonly .editor-content div[data-type=editor-block].highlighted div[data-type=block-tools] .block-helper .heading-marker{display:flex}.editor-root .editor-content div[data-type=editor-block].heading-collapsed div[data-type=block-tools] .block-helper .heading-collapse-button svg{transform:rotate(270deg)}.editor-root .editor-content div[data-type=editor-block].focused div[data-type=block-tools] .block-helper .heading-marker,.editor-root .editor-content div[data-type=editor-block].highlighted div[data-type=block-tools] .block-helper .heading-marker{display:none}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-marker,.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-collapse-button{width:24px;height:24px;cursor:grab;margin:0;padding:0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;border-radius:3px}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-marker:hover,.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-collapse-button:hover{background-color:var(--selected-color)}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-marker svg,.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-collapse-button svg{transform:rotate(360deg);transition:transform .2s linear}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-marker svg,.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-collapse-button svg{width:16px;height:16px}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-marker:hover{background-color:transparent}.embed-block div[data-type=block-content] .editor-toc-container{display:block;width:100%;background-color:#f0f0f0;padding:20px}.embed-block div[data-type=block-content] .editor-toc-container.loading{margin:0;min-height:100px}.embed-block div[data-type=block-content] .editor-toc-container .toc-node+.toc-node{margin-top:10px}.embed-block div[data-type=block-content] .editor-toc-container .toc-node .toc-text{cursor:pointer;color:var(--primary-color)}.embed-block div[data-type=block-content] .editor-toc-container .toc-node .toc-children{margin-top:10px;padding-left:20px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] [data-box-type=mention] span[data-type=box-content]{margin:0}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] [data-box-type=mention] span[data-type=box-content] .mention-name{color:var(--primary-color);padding:0;border-radius:12px;margin-left:4px;margin-right:4px;white-space:wrap;word-break:break-all;cursor:pointer}[data-command-bar-id=editor-mention] .editor-command-bar.menu .command-item.menu-item .menu-item-icon{width:20px;height:20px;border-radius:50%;overflow:hidden}[data-command-bar-id=editor-mention] .editor-command-bar.menu .command-item.menu-item .menu-item-icon img{width:100%;height:100%}[data-command-bar-id=editor-mention] .editor-command-bar.menu .command-item.menu-item .menu-item-name{flex-grow:0;margin-right:5px}.editor-root .editor-templates{position:fixed;bottom:26px;height:256px;width:auto;max-width:100%;padding-left:30px;padding-right:44px;overflow:hidden}.editor-root .editor-templates .editor-templates-title{color:#909090;font-size:14px;margin-left:0;margin-bottom:20px;line-height:19.6px}.editor-root .editor-templates .editor-templates-cards{display:flex;margin-left:0}.editor-root .editor-templates .editor-templates-cards .editor-template-card{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;cursor:pointer;flex-shrink:0;height:192px;width:188px;background:none;border:1px solid #e8e8e8;border-radius:3px;margin:0 0 0 15px;padding:0;align-items:revert}.editor-root .editor-templates .editor-templates-cards .editor-template-card:first-child{margin-left:0}.editor-root .editor-templates .editor-templates-cards .editor-template-card:hover{box-shadow:0 0 1px #30303033,0 8px 16px #30303026}.editor-root .editor-templates .editor-templates-cards .editor-template-card:hover>.editor-template-name{color:#338fe5}.editor-root .editor-templates .editor-templates-cards .editor-template-card .editor-template-name{display:flex;align-items:center;height:40px;width:100%;border-top:1px solid #dedede;padding-left:20px;padding-right:20px;flex:0 0 50px;font-size:14px;font-weight:500;line-height:22px;color:#303030}.editor-root .editor-templates .editor-templates-cards .editor-template-card .editor-template-name span{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.editor-root .editor-templates .editor-templates-cards .editor-template-card.more .editor-template-name{border-top:none}.editor-root .editor-templates .editor-templates-cards .editor-template-card.more .editor-template-name span{padding-left:0;text-align:center}.editor-root .editor-templates .editor-templates-cards .editor-template-card.more .editor-template-thumb-container{display:flex;align-items:center;justify-content:center;padding:16px 39px 14px}.editor-root .editor-templates .editor-templates-cards .editor-template-card.more .editor-template-thumb-container>img{width:110px;height:112px;max-width:revert}.editor-root .editor-templates .editor-templates-cards .editor-template-card .editor-template-thumb-container{flex:1;position:relative;padding:10px 5px 0;height:142px;margin:0;overflow:revert}.editor-root .editor-templates .editor-templates-cards .editor-template-card .editor-template-thumb-container>img{max-width:100%}.editor-dialog-container{min-width:500px;position:relative;left:-9px}.editor-dialog-container .dialog-header{display:flex;justify-content:space-between;align-items:center;padding:0 20px;border-bottom:1px solid #e8e8e8}.editor-dialog-container .dialog-header .close-icon{cursor:pointer}.editor-dialog-container .dialog-header .dialog-header-title{padding:8px 0 11px;font-size:18px;font-weight:700;flex-grow:1}.editor-dialog-container .dialog-content{padding:20px;border-bottom:1px solid #e8e8e8}.editor-dialog-container .dialog-footer{margin:10px 0 5px;padding:0 20px;text-align:right}.editor-dialog-container .dialog-footer button{min-width:58px;min-height:30px;padding:0 10px;border-radius:3px;background-color:#eef3f8;font-size:14px;color:#fff;cursor:pointer}.editor-dialog-container .dialog-footer .cancel-button{margin:0 8px 0 0;background-color:transparent;border:1px solid #c7c7c7;color:#606060}.editor-dialog-container .dialog-footer .cancel-button:hover{color:#303030;background:#eee;border:1px solid #c7c7c7}.editor-dialog-container .dialog-footer .submit-button{outline:none;background-color:#338fe5;color:#fff;border:0}.editor-dialog-container .dialog-footer .submit-button:hover{background-color:#5ca5ea}.embed-block[data-embed-type=webpage]{height:400px;min-height:100px;max-height:1000px}.embed-block[data-embed-type=webpage] .webpage-mask{position:absolute;left:0;right:0;top:0;bottom:0;z-index:1;background-color:transparent}.embed-block[data-embed-type=webpage].resizing [data-type=block-tools] .block-resizer{pointer-events:all!important}.embed-block[data-embed-type=webpage].hover>div[data-type=block-content]{outline:none!important}.embed-block[data-embed-type=webpage].selected>div[data-type=block-content]{outline:none!important}.embed-block[data-embed-type=webpage]>div[data-type=block-content]{justify-content:center;height:100%}.embed-block[data-embed-type=webpage]>div[data-type=block-content]>.editor-embed{width:100%}.embed-block[data-embed-type=webpage]>div[data-type=block-content]>.editor-embed .editor-preview-iframe{width:100%;max-height:500px;height:100%;border:none;position:relative}.embed-block[data-embed-type=webpage]>div[data-type=block-content]>.editor-embed .editor-preview-iframe-loading{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:center;align-items:center;background-color:#fff}.webpage-content .help-container{color:#303030;border:1px solid #dedede;padding:10px;border-radius:4px;border-left:4px solid #338fe5;margin-top:16px;margin-bottom:16px}.webpage-content .help-container .help-content{display:flex;align-items:center}.webpage-content .help-container .help-content .help-icon{display:flex;align-items:center;height:20px;color:#338fe5;margin-right:12px}.webpage-content .help-link-container{margin-top:8px;display:flex;align-items:center}.webpage-content .help-link-container .help-link-content{display:flex;align-items:center;color:#338fe5;text-decoration:none}.webpage-content .help-link-container .help-link-content .help-link-icon{width:16px;height:16px;margin-left:8px}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-embed-type=webpage]>div[data-type=block-content]:before{display:block}:root{--editor-quoted-color: #7084a4;--editor-drawio-empty-svg: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zOC43MjAzIDI4LjcwOTdIMjUuOTIzM0MyNS4yMTY1IDI4LjcwOTcgMjQuNjQzNSAyOC4xNDgxIDI0LjY0MzUgMjcuNDU1MlYyNS43MzMzSDIwLjUyODNDMjAuNDk4NiAyNS43Njk2IDIwLjQ2NjkgMjUuODA0MiAyMC40MzMzIDI1LjgzN0wxNS45MTkyIDMwLjI2MjFWMzQuNzU1NkgyNC42NDM1VjMzLjcyNzZDMjQuNjQzNSAzMy4wMzQ4IDI1LjIxNjUgMzIuNDczMiAyNS45MjMzIDMyLjQ3MzJIMzguNzIwM0MzOS40MjcgMzIuNDczMiA0MCAzMy4wMzQ4IDQwIDMzLjcyNzZWMzguNzQ1NUM0MCAzOS40MzgzIDM5LjQyNyA0MCAzOC43MjAzIDQwSDI1LjkyMzNDMjUuMjE2NSA0MCAyNC42NDM1IDM5LjQzODMgMjQuNjQzNSAzOC43NDU1VjM3LjMzMzNIMTQuNjI2M0MxMy45MTIyIDM3LjMzMzMgMTMuMzMzMyAzNi43NTYyIDEzLjMzMzMgMzYuMDQ0NFYzMC42OTQxTDguMzc4NTIgMjUuODM3QzguMTM2MjYgMjUuNjAxNCA4IDI1LjI4MDggOCAyNC45NDYzQzggMjQuNjExOCA4LjEzNjI2IDI0LjI5MTEgOC4zNzg1MiAyNC4wNTU2TDEzLjMzMzMgMTkuMTk4NVYxNS43NzJDMTEuNzc5OCAxNS4yMjI5IDEwLjY2NjcgMTMuNzQxNiAxMC42NjY3IDEyQzEwLjY2NjcgOS43OTA4NSAxMi40NTc1IDggMTQuNjY2NyA4QzE2Ljg3NTggOCAxOC42NjY2IDkuNzkwODUgMTguNjY2NiAxMkMxOC42NjY2IDEzLjcyNjUgMTcuNTU4OCAxNS4yNTgxIDE1LjkxOTEgMTUuNzk4OFYxOS4yODg4QzE1LjkxOTEgMTkuMzkxOCAxNS45MDY4IDE5LjQ5NDMgMTUuODgyMyAxOS41OTQzTDE5LjUxNTEgMjMuMTU1NUgyNC42NDM1VjIyLjQzNzNDMjQuNjQzNSAyMS43NDQ1IDI1LjIxNjUgMjEuMTgyOSAyNS45MjMzIDIxLjE4MjlIMzguNzIwM0MzOS40MjcgMjEuMTgyOSA0MCAyMS43NDQ1IDQwIDIyLjQzNzNWMjcuNDU1MkM0MCAyOC4xNDgxIDM5LjQyNyAyOC43MDk3IDM4LjcyMDMgMjguNzA5N1pNMjcuMjAzIDM3LjQ5MUgzNy40NDA2VjM0Ljk4MjFIMjcuMjAzVjM3LjQ5MVpNMTQuNDA1OSAyOC4xOTU0TDExLjA5MTUgMjQuOTQ2M0wxNC40MDU5IDIxLjY5NzJMMTcuNzIwNCAyNC45NDYzTDE0LjQwNTkgMjguMTk1NFpNMjcuMjAzIDI2LjIwMDhIMzcuNDQwNlYyMy42OTE4SDI3LjIwM1YyNi4yMDA4WiIgZmlsbD0iIzA3MTQyQSIvPgo8L3N2Zz4K)}.flex-center,.editor-drawio-iframe-container.loading:before,.embed-block .editor-empty-drawio.editor-drawio-content.editor-embed:after,.embed-block .editor-empty-drawio.editor-drawio-content.editor-embed:before{display:flex;align-items:center;justify-content:center}.full-screen,.editor-drawio-iframe-container.loading:before,.drawio-iframe-element,.editor-drawio-iframe-container{width:100%;height:100%}.editor-drawio-iframe-container{position:fixed;top:0;left:0;z-index:1000}div[data-type=editor-block].embed-block[data-embed-type=drawio]>div[data-type=block-content]{outline:1px solid #DEDEDE}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block[data-embed-type=drawio]>div[data-type=block-content]{justify-content:center;border-radius:3px;padding:10px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block[data-embed-type=drawio]>div[data-type=block-content] .editor-drawio-content{text-align:center}.embed-block .editor-empty-drawio.editor-drawio-content.editor-embed{width:240px;height:80px;display:inline-block;text-align:center}.embed-block .editor-empty-drawio.editor-drawio-content.editor-embed:before{background-image:var(--editor-drawio-empty-svg);position:absolute;content:" ";color:var(--editor-quoted-color);top:8px;left:calc(50% - 24px);width:48px;height:48px}.embed-block .editor-empty-drawio.editor-drawio-content.editor-embed:after{position:absolute;content:attr(data-empty-drawio-content);color:var(--editor-quoted-color);bottom:0;left:0;width:100%;height:32px;top:50%}div.editor-root div.editor-content div[data-type=editor-container] div[data-embed-type=drawio].embed-block>div[data-type=block-content] img{max-width:100%;max-height:100%;width:100%;height:100%}.editor-drawio-iframe-container.loading:before{content:attr(data-placeholder);position:absolute;top:0;left:0;background-color:#f7f6f3;z-index:2}.editor-content .editing{background-color:#cdcdcd40}.editor-content div[data-type=block-tools] .embed-code-editor-container{position:absolute;top:0;left:0px;right:0px;bottom:0;background-color:#cdcdcd40;z-index:var(--wiz-editor-z-embed-code-editor-mask);padding:8px}.editor-content div[data-type=block-tools] .embed-code-editor-container textarea{width:100%;height:100%;resize:none;outline:none;padding:12px;border:1px solid #b9bfc8;border-radius:4px;background-color:#fff;color:#333}.flex-row-center,.embed-block div[data-type=block-content] .graph-embed,div[data-embed-type=mermaid] div[data-type=block-content] .graph-embed,div[data-embed-type=flowchart] div[data-type=block-content] .graph-embed,div[data-embed-type=plantuml] div[data-type=block-content] .graph-embed,.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block div[data-type=block-content] .empty-embed:after,div[data-embed-type=mermaid] div[data-type=block-content] .empty-embed:after,div[data-embed-type=flowchart] div[data-type=block-content] .empty-embed:after,div[data-embed-type=plantuml] div[data-type=block-content] .empty-embed:after,.embed-block,div[data-embed-type=mermaid],div[data-embed-type=flowchart],div[data-embed-type=plantuml]{display:flex;flex-direction:row;align-items:center;justify-content:center}.embed-block div[data-type=block-content],div[data-embed-type=mermaid] div[data-type=block-content],.embed-block div[data-type=block-content],div[data-embed-type=flowchart] div[data-type=block-content],.embed-block div[data-type=block-content],div[data-embed-type=plantuml] div[data-type=block-content]{width:100%;position:relative}.embed-block div[data-type=block-content] .empty-embed,div[data-embed-type=mermaid] div[data-type=block-content] .empty-embed,.embed-block div[data-type=block-content] .empty-embed,div[data-embed-type=flowchart] div[data-type=block-content] .empty-embed,.embed-block div[data-type=block-content] .empty-embed,div[data-embed-type=plantuml] div[data-type=block-content] .empty-embed{width:100%;min-height:106px;background-color:#cdcdcd40}.embed-block div[data-type=block-content] .empty-embed:after,div[data-embed-type=mermaid] div[data-type=block-content] .empty-embed:after,.embed-block div[data-type=block-content] .empty-embed:after,div[data-embed-type=flowchart] div[data-type=block-content] .empty-embed:after,.embed-block div[data-type=block-content] .empty-embed:after,div[data-embed-type=plantuml] div[data-type=block-content] .empty-embed:after{content:attr(data-empty-tips);position:absolute;top:0;right:0;width:100%;height:100%;color:#07142a;white-space:nowrap}.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed){width:100%;height:100px}.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed) img,div[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed) img,.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed) img,div[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed) img,.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed) img,div[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed) img{display:none}.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed):after,div[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed):after,.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed):after,div[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed):after,.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed):after,div[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed):after{content:attr(data-invalid-text);position:absolute;top:0;right:0;width:100%;height:100%;outline:1px solid red;display:flex;flex-direction:row;align-items:center;justify-content:center;color:red}.embed-block div[data-type=block-content] .embed-img-content,div[data-embed-type=mermaid] div[data-type=block-content] .embed-img-content,.embed-block div[data-type=block-content] .embed-img-content,div[data-embed-type=flowchart] div[data-type=block-content] .embed-img-content,.embed-block div[data-type=block-content] .embed-img-content,div[data-embed-type=plantuml] div[data-type=block-content] .embed-img-content{width:100%;text-align:center}.embed-block div[data-type=block-content] .mermaid-embed-img,div[data-embed-type=mermaid] div[data-type=block-content] .mermaid-embed-img,.embed-block div[data-type=block-content] .mermaid-embed-img,div[data-embed-type=flowchart] div[data-type=block-content] .mermaid-embed-img,.embed-block div[data-type=block-content] .mermaid-embed-img,div[data-embed-type=plantuml] div[data-type=block-content] .mermaid-embed-img{max-width:100%;min-width:200px}.embed-block div[data-type=block-content] .editor-plantuml-img,div[data-embed-type=mermaid] div[data-type=block-content] .editor-plantuml-img,.embed-block div[data-type=block-content] .editor-plantuml-img,div[data-embed-type=flowchart] div[data-type=block-content] .editor-plantuml-img,.embed-block div[data-type=block-content] .editor-plantuml-img,div[data-embed-type=plantuml] div[data-type=block-content] .editor-plantuml-img{max-width:100%}.embed-block div[data-type=block-content] .embed-graph-img-content,div[data-embed-type=mermaid] div[data-type=block-content] .embed-graph-img-content,.embed-block div[data-type=block-content] .embed-graph-img-content,div[data-embed-type=flowchart] div[data-type=block-content] .embed-graph-img-content,.embed-block div[data-type=block-content] .embed-graph-img-content,div[data-embed-type=plantuml] div[data-type=block-content] .embed-graph-img-content{width:100%;text-align:center;padding:10px}.embed-block div[data-type=block-content] .embed-graph-img-content img,div[data-embed-type=mermaid] div[data-type=block-content] .embed-graph-img-content img,.embed-block div[data-type=block-content] .embed-graph-img-content img,div[data-embed-type=flowchart] div[data-type=block-content] .embed-graph-img-content img,.embed-block div[data-type=block-content] .embed-graph-img-content img,div[data-embed-type=plantuml] div[data-type=block-content] .embed-graph-img-content img{max-width:100%}.embed-block div[data-type=block-content] .graph-embed,div[data-embed-type=mermaid] div[data-type=block-content] .graph-embed,.embed-block div[data-type=block-content] .graph-embed,div[data-embed-type=flowchart] div[data-type=block-content] .graph-embed,.embed-block div[data-type=block-content] .graph-embed,div[data-embed-type=plantuml] div[data-type=block-content] .graph-embed{width:100%}.hr-transition,.embed-block div[data-type=block-content] .editor-embed-container .editor-embed-hr{transition:border-top ease-in-out .4s}.embed-block div[data-type=block-content] .editor-embed-container{display:flex;align-items:center;width:100%}.embed-block div[data-type=block-content] .editor-embed-container .editor-embed-hr{display:block;width:100%;border:none;margin:0;border-top:2px dashed #cccccc;cursor:pointer}.embed-block:is(.focused) div[data-type=block-content] .editor-embed-container .editor-embed-hr{caret-color:transparent}.embed-block[data-type=editor-block][data-embed-type=hr]>div[data-type=block-content] .editor-embed-container{height:30px}.embed-block[data-type=editor-block][data-embed-type=hr].hover>div[data-type=block-content]{outline:none!important}.embed-block[data-type=editor-block][data-embed-type=hr].selected>div[data-type=block-content]{outline:none!important}:root{--hover-color: #40a9ff}.flex-column-center,.embed-block[data-embed-type=video]>div[data-type=block-content] .media-empty,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-empty,.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error{display:flex;justify-content:center;align-items:center;flex-flow:column}.common{width:400px;height:180px;background-color:#fafafa;border:1px dashed #d9d9d9;border-radius:2px;transition:border-color .3s}.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-empty,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error{height:200px}.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-empty .media-error-icon,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error .media-error-icon{display:flex}.editor-root .editor-content div[data-type=editor-block].embed-block.media-block-uploading div[data-type=block-tools] .block-helper{display:none}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-empty,.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error{height:400px}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-empty .media-error-icon,.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error .media-error-icon{display:flex}.embed-block[data-embed-type=video].locked-by-self>[data-type=block-content]:after,.embed-block[data-embed-type=video].locked-by-others>[data-type=block-content]:after,.embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content]:after,.embed-block[data-embed-type=audio].locked-by-others>[data-type=block-content]:after{display:none}.embed-block[data-embed-type=video].locked-by-self>[data-type=block-content] .media,.embed-block[data-embed-type=video].locked-by-others>[data-type=block-content] .media,.embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content] .media,.embed-block[data-embed-type=audio].locked-by-others>[data-type=block-content] .media{position:relative}.embed-block[data-embed-type=video].locked-by-self>[data-type=block-content] .media:after,.embed-block[data-embed-type=video].locked-by-others>[data-type=block-content] .media:after,.embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content] .media:after,.embed-block[data-embed-type=audio].locked-by-others>[data-type=block-content] .media:after{content:" ";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:1;background-color:#303030;opacity:.1}.embed-block[data-embed-type=video].hover>div[data-type=block-content],.embed-block[data-embed-type=audio].hover>div[data-type=block-content]{outline:none!important}.embed-block[data-embed-type=video].selected>div[data-type=block-content]:before,.embed-block[data-embed-type=audio].selected>div[data-type=block-content]:before{display:none}.embed-block[data-embed-type=video]>div[data-type=block-content],.embed-block[data-embed-type=audio]>div[data-type=block-content]{justify-content:center;max-width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media.full-screen,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media.full-screen{width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media{display:flex;justify-content:center}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress{position:relative;max-width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress audio,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress audio{display:block;width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress video,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress video{display:block;max-width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress .uploading-progress-mask,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress .uploading-progress-mask{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#303030;opacity:.8;display:flex;align-items:center;justify-content:center}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress .uploading-progress-mask .uploading-progress-bar,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress .uploading-progress-mask .uploading-progress-bar{width:75%;height:6px;border-radius:3px;display:flex;background-color:#fff;overflow:hidden}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress .uploading-progress-mask .uploading-progress-bar .uploading-progress-bar-value,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress .uploading-progress-mask .uploading-progress-bar .uploading-progress-bar-value{background-color:#338fe5}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error{width:100%;background:#F8F8F8;outline:1px solid #DEDEDE;border-radius:3px}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error-icon svg,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error-icon svg{width:48px;height:48px;color:#c7c7c7}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error .line-1,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error .line-1{margin-top:10px;font-size:18px;text-align:center;color:#303030}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error .line-2,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error .line-2{margin-top:5px;font-size:14px;text-align:center;color:#606060}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error .retry-upload,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error .retry-upload{margin-left:4px;color:#338fe5;cursor:pointer;text-decoration:none}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-empty,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-empty{width:100%;background:#FFFFFF;outline:1px solid #DEDEDE;border-radius:3px}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-empty svg,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-empty svg{width:48px;height:48px;color:#c7c7c7}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-element,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-element{width:100%;display:flex;justify-content:center}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-element .video-container video,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-element .video-container video{display:block;min-width:50px;max-width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-element .audio-container,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-element .audio-container{width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-element .audio-container audio,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-element .audio-container audio{display:block;width:100%}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=video].comment,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=audio].comment{box-shadow:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=video].comment .media,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=audio].comment .media{box-shadow:0 2px #f8e6ab}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=video].comment.active,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=audio].comment.active{outline:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=video].comment.active .media,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=audio].comment.active .media{box-shadow:none;outline:4px solid #f8e6ab}`)),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
1
+ (function(){"use strict";try{if(typeof document!="undefined"){var t=document.createElement("style");t.appendChild(document.createTextNode(`@charset "UTF-8";@keyframes ones-editor-blink{0%,to{background-color:transparent}50%{background-color:var(--primary-color)}}*{--link-color: #338fe5;--color-0: #e52727;--color-1: #eb6414;--color-2: #f0a100;--color-3: #24b47e;--color-4: #338fe5;--color-5: #9678d3;--color-6: #909090;--background-color-0: #fad4d4;--background-color-1: #fbe0d0;--background-color-2: #fceccc;--background-color-3: #d3f0e5;--background-color-4: #d6e9fa;--background-color-5: #eae4f6;--background-color-6: #dedede;--background-color-7: #e52727;--background-color-8: #eb6414;--background-color-9: #f0a100;--background-color-10: #24b47e;--background-color-11: #338fe5;--background-color-12: #9678d3;--background-color-13: #909090;--background-color-14: #e8e8e8;--font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif}div.editor-root{--text-color: #303030;--primary-color: #338fe5;--background-selection: #338fe533;--background-code: #cdcdcd40}div.editor-root{color:var(--text-color);position:relative;box-sizing:border-box;height:100%;width:100%;z-index:1}div.editor-root.readonly div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] span.text.link{cursor:pointer}div.editor-root *{box-sizing:border-box;font-family:var(--font-family)}div.editor-root button{outline:none}div.editor-root.active div.editor-content .editor-cursor{opacity:1}div.editor-root .safari.mobile div.editor-content .editor-input{pointer-events:all;width:8px}div.editor-root div.editor-content{height:100%;width:100%;padding:0 30px 30px}div.editor-root div.editor-content .editor-cursor{position:absolute;background:var(--primary-color);width:2px;transition:top .1s ease-in,left .1s linear;animation:ones-editor-blink 1s ease-in-out infinite;opacity:0;pointer-events:none}div.editor-root div.editor-content .editor-input{position:absolute;opacity:0;pointer-events:none;width:16px;height:20px;font-size:16px}div.editor-root div.editor-content div[data-type=editor-container]{position:relative}div.editor-root div.editor-content div[data-type=editor-container].root{user-select:none;width:100%;cursor:text}div.editor-root div.editor-content div[data-type=editor-container].root>.container-blocks>*+*{margin-top:1em}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block]:not(:first-of-type){background-color:var(--background-selection)}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block]:not(:first-of-type) div[data-type=block-background]>.editor-selection-background{background-color:transparent!important}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block].embed-block>div[data-type=block-content]:before,div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block].embed-block .embed-selected-content:before{display:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-quoted]+div[data-type=editor-block][data-style-quoted]{margin-top:0}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block]{font-size:var(--font-size);line-height:var(--line-height);position:relative;--font-size: 15px;--line-height: 1.6}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-align=center] div[data-type=block-content]{text-align:center}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-align=right] div[data-type=block-content]{text-align:end}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].block-hidden{display:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=text]{cursor:text}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]{word-break:break-word;position:relative}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span{cursor:text}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text{white-space:pre-wrap}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.link{color:var(--link-color)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.link:hover{text-decoration:underline}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.link.style-strikethrough:hover{text-decoration:underline line-through}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-bold{font-weight:700}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-italic{font-style:italic}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-underline{text-decoration:underline}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-strikethrough{text-decoration:line-through}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-underline.style-strikethrough{text-decoration:underline line-through}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-code{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:var(--background-code);padding:4px;font:.8em Monaco,Consolas,"Andale Mono",DejaVu Sans Mono,monospace}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-subscript{vertical-align:sub;font-size:70%}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text.style-superscript{vertical-align:super;font-size:70%}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="0"]{color:var(--color-0)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="1"]{color:var(--color-1)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="2"]{color:var(--color-2)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="3"]{color:var(--color-3)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="4"]{color:var(--color-4)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="5"]{color:var(--color-5)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-color="6"]{color:var(--color-6)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="0"]{background-color:var(--background-color-0)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="1"]{background-color:var(--background-color-1)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="2"]{background-color:var(--background-color-2)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="3"]{background-color:var(--background-color-3)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="4"]{background-color:var(--background-color-4)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="5"]{background-color:var(--background-color-5)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="6"]{background-color:var(--background-color-6)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="7"]{background-color:var(--background-color-7)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="8"]{background-color:var(--background-color-8)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="9"]{background-color:var(--background-color-9)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="10"]{background-color:var(--background-color-10)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="11"]{background-color:var(--background-color-11)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="12"]{background-color:var(--background-color-12)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="13"]{background-color:var(--background-color-13)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.text[data-style-bg-color="14"]{background-color:var(--background-color-14)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].inputting-insertion>span[data-type=insertion-content]{border-bottom:1px solid var(--primary-color)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].remote-cursor-insertion{width:0px;position:relative;display:inline-block;vertical-align:text-bottom;overflow:visible;height:1em}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].remote-cursor-insertion>span[data-type=insertion-content]{position:absolute;color:transparent;width:3px;left:-3px;border-right:var(--cursor-color) 1px solid;text-overflow:clip;display:inline-block;top:-5px;bottom:0}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].remote-cursor-insertion>span[data-type=insertion-content] span[data-cursor-name]{display:inline-block;width:8px;background-color:transparent;border:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].remote-cursor-insertion>span[data-type=insertion-content] span[data-cursor-name]:hover:before,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span[data-type=editor-insertion].remote-cursor-insertion.active>span[data-type=insertion-content] span[data-cursor-name]:before{content:attr(data-cursor-name);position:absolute;top:-12px;height:1.1em;background-color:var(--cursor-color);z-index:27;left:0px;color:#fff;white-space:nowrap;font-size:12px;display:flex;align-items:center;padding:1px 4px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] span[data-type=box-content]{border-radius:2px;margin-left:8px;margin-right:8px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] span[data-type=editor-box].br-box>span[data-type=box-content] img{vertical-align:middle;max-width:1em}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-tools] .editor-block-anchor{position:absolute}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-background] .editor-selection-background{position:absolute;background-color:var(--background-selection);z-index:1;pointer-events:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].unknown-block{cursor:default}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.hover>div[data-type=block-content],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].unknown-block.hover>div[data-type=block-content]{outline:1px solid #338fe5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block>div[data-type=block-content],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].unknown-block>div[data-type=block-content]{display:flex}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.hover .embed-hover-content{outline:1px solid #338fe5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.selected>div[data-type=block-content],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.selected .embed-selected-content{position:relative}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.selected>div[data-type=block-content]:before,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block.selected .embed-selected-content:before{content:" ";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:1;background-color:#338fe5;opacity:.1}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].unknown-block{color:#909090;font-size:12px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].unknown-block>div[data-type=block-content]{padding:5px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-quoted]{border-left:4px solid #e8e8e8;color:#909090}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-quoted]:not([data-list-level]){padding-left:8px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="1"]{--font-size: 28px;--line-height: 1.5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="2"]{--font-size: 26px;--line-height: 1.5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="3"]{--font-size: 24px;--line-height: 1.5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="4"]{--font-size: 22px;--line-height: 1.5}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="5"]{--font-size: 20px;--line-height: 1.6}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="6"]{--font-size: 18px;--line-height: 1.6}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="7"]{--font-size: 16px;--line-height: 1.6}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading="8"]{--font-size: 14px;--line-height: 1.6}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-heading]{font-size:var(--font-size);line-height:var(--line-height);font-weight:700}.editor-disable-scroll{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:9900;overflow:hidden}div:not(.comment-editor-root)>div.editor-root>div.editor-content>div[data-type=editor-container]>div.container-blocks>div[data-type=editor-block]:first-of-type{font-size:30px;line-height:1.3}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-anchor{position:absolute;pointer-events:none;z-index:-1}.editor-command-bar.toolbar .color-button{width:24px;height:24px;display:flex;padding:0;margin:0;align-items:center;justify-content:center;background-color:transparent;border:0;outline:0;border-radius:3px;cursor:pointer}.editor-command-bar.toolbar .color-button[data-color="0"]{color:var(--color-0)}.editor-command-bar.toolbar .color-button[data-color="1"]{color:var(--color-1)}.editor-command-bar.toolbar .color-button[data-color="2"]{color:var(--color-2)}.editor-command-bar.toolbar .color-button[data-color="3"]{color:var(--color-3)}.editor-command-bar.toolbar .color-button[data-color="4"]{color:var(--color-4)}.editor-command-bar.toolbar .color-button[data-color="5"]{color:var(--color-5)}.editor-command-bar.toolbar .color-button[data-color="6"]{color:var(--color-6)}.editor-command-bar.toolbar .color-button[data-background-color="0"]{background-color:var(--background-color-0)}.editor-command-bar.toolbar .color-button[data-background-color="1"]{background-color:var(--background-color-1)}.editor-command-bar.toolbar .color-button[data-background-color="2"]{background-color:var(--background-color-2)}.editor-command-bar.toolbar .color-button[data-background-color="3"]{background-color:var(--background-color-3)}.editor-command-bar.toolbar .color-button[data-background-color="4"]{background-color:var(--background-color-4)}.editor-command-bar.toolbar .color-button[data-background-color="5"]{background-color:var(--background-color-5)}.editor-command-bar.toolbar .color-button[data-background-color="6"]{background-color:var(--background-color-6)}.editor-command-bar.toolbar .color-button[data-background-color="7"]{background-color:var(--background-color-7)}.editor-command-bar.toolbar .color-button[data-background-color="8"]{background-color:var(--background-color-8)}.editor-command-bar.toolbar .color-button[data-background-color="9"]{background-color:var(--background-color-9)}.editor-command-bar.toolbar .color-button[data-background-color="10"]{background-color:var(--background-color-10)}.editor-command-bar.toolbar .color-button[data-background-color="11"]{background-color:var(--background-color-11)}.editor-command-bar.toolbar .color-button[data-background-color="12"]{background-color:var(--background-color-12)}.editor-command-bar.toolbar .color-button[data-background-color="13"]{background-color:var(--background-color-13)}.editor-command-bar.toolbar .color-button[data-background-color="14"]{background-color:var(--background-color-14)}.tippy-content{white-space:pre-line}.editor-button{min-height:26px;min-width:46px;font-size:12px;font-weight:500;outline:none;background-color:var(--editor-button-bg-color, #338fe5);color:var(--editor-button-color, #fff);border:0;padding:4px 8px;border-radius:4px;margin-right:8px;cursor:pointer}.editor-button:hover{background-color:#5ca5ea}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}[data-theme=dropdown-list]{border-radius:4px;background:white;position:relative;max-width:calc(100vw - 24px);box-shadow:#0f0f0f0d 0 0 0 1px,#0f0f0f1a 0 3px 6px,#0f0f0f33 0 9px 24px;overflow:hidden}[data-theme=dropdown-list] .tippy-content{padding:0;background:white;color:#303030}[data-theme=dropdown-list] .tippy-content .editor-command-bar{max-height:50vh}[data-theme=dropdown-list] .filterable-list{min-width:100px;max-width:300px;display:flex;flex-direction:column;max-height:100%}[data-theme=dropdown-list] .filterable-list .filter{padding:8px}[data-theme=dropdown-list] .filterable-list .filter .filter-container{width:100%;font-size:14px;line-height:20px;padding:3px 6px;position:relative;border-radius:3px;box-shadow:#0f0f0f1a 0 0 0 1px inset;background:rgba(242,241,238,.6);cursor:text;height:28px;box-sizing:border-box;display:flex;align-items:center}[data-theme=dropdown-list] .filterable-list .filter .filter-container input.filter-input{border:none;outline:none;flex-grow:1;background:transparent}[data-theme=dropdown-list] .filterable-list .list{max-height:60vh;overflow-y:auto;padding:8px 0}[data-theme=dropdown-list] .filterable-list .list .list-item{user-select:none;transition:background 20ms ease-in 0s;cursor:pointer;width:calc(100% - 8px);margin-left:4px;margin-right:4px;border-radius:3px;height:24px;padding:4px 8px;display:flex;align-items:center;box-sizing:border-box}[data-theme=dropdown-list] .filterable-list .list .list-item .list-text{white-space:nowrap}[data-theme=dropdown-list] .filterable-list .list .list-item.selected{background-color:#eee}[data-theme=dropdown-list] .filterable-list .list .list-item.disabled{color:#c1c1c1}::placeholder{color:#bbb}.toast{font-family:Avenir,Helvetica,Arial,sans-serif;visibility:hidden;min-width:250px;margin-left:-125px;background-color:#333;color:#fff;text-align:center;border-radius:2px;padding:8px;position:fixed;z-index:1;left:50%;bottom:30px}.toast.show{visibility:visible;animation:toast_fade_in .5s,toast_fade_out .5s 2.5s}.toast.positioned.show{animation:toast_fade_in_positioned .5s,toast_fade_out_positioned .5s 2.5s}.toast.positioned{bottom:unset}@keyframes toast_fade_in{0%{bottom:0;opacity:0}to{bottom:30px;opacity:1}}@keyframes toast_fade_out{0%{bottom:30px;opacity:1}to{bottom:0;opacity:0}}@keyframes toast_fade_in_positioned{0%{opacity:0}to{opacity:1}}@keyframes toast_fade_out_positioned{0%{opacity:1}to{opacity:0}}div.tippy-box[data-theme=toolbar] .tippy-content,div.tippy-box[data-theme=menu] .tippy-content{padding:0}div.tippy-box[data-theme=menu] .tippy-content .editor-command-bar.menu{min-width:180px}div.tippy-box button{outline:none}.editor-command-bar{pointer-events:all;display:flex;box-sizing:border-box;--text-color: #606060;--primary-color: #338fe5;--selected-color: #f8f8f8;--separator-color: #dedede;--warn-color: #fdf4f4}.editor-command-bar.fixed.toolbar{box-shadow:none}.editor-command-bar.menu{display:flex;flex-direction:column;align-items:flex-start;padding:5px 0;background:#ffffff;box-shadow:0 0 1px #30303040,0 12px 24px #30303026;border-radius:2px;max-height:50vh;overflow:auto}.editor-command-bar.menu .command-item.standard{color:var(--text-color);user-select:none;transition:background 20ms ease-in 0s;cursor:pointer;width:100%;height:32px;padding:6px 10px;display:flex;align-items:center;box-sizing:border-box}.editor-command-bar.menu .command-item.standard .menu-item-icon{align-items:center;height:24px;width:24px;margin-right:5px;margin-top:-2px;display:flex;flex-direction:column;justify-content:center}.editor-command-bar.menu .command-item.standard .menu-item-name{white-space:nowrap;flex-grow:1;display:flex;align-items:center}.editor-command-bar.menu .command-item.standard .item-subtext{color:#b2bccd}.editor-command-bar.menu .command-item.standard .menu-item-sub-indicator{display:flex;align-items:center;justify-content:center}.editor-command-bar.menu .command-item.standard .menu-item-sub-indicator svg{width:16px;height:16px}.editor-command-bar.menu .command-item.standard.disabled{color:#c7c7c7;cursor:not-allowed}.editor-command-bar.menu .command-item.separator{height:1px;margin:4px 0;background-color:var(--separator-color);width:100%}.editor-command-bar.menu .command-item.section{font-size:.8em;color:#ccc;padding:5px 5px 5px 10px}.editor-command-bar.menu .command-item.selected{background-color:var(--selected-color)}.editor-command-bar.menu .command-item.selected[data-id=delete]{background-color:var(--warn-color)}.editor-command-bar.menu .command-item.selected.disabled{background-color:transparent}.editor-command-bar.menu .command-item.checked{color:var(--primary-color)}.editor-command-bar.menu .command-item.checked .menu-item-checked-icon{display:flex;align-items:center;justify-content:center;margin-left:10px}.editor-command-bar.menu .command-item.checked.disabled{color:#c7c7c7}.editor-command-bar.menu .command-item span.highlight{color:#e52727}.editor-command-bar.toolbar{display:flex;flex-direction:row;align-items:flex-start;padding:5px 10px;gap:5px;background:#ffffff;box-shadow:0 0 1px #30303033,0 8px 16px #30303026;border-radius:3px}.editor-command-bar.toolbar .command-item{background:transparent;border:none;display:flex;align-items:center;justify-content:center;color:var(--text-color);height:24px;padding:0;cursor:pointer;border-radius:3px;min-width:24px}.editor-command-bar.toolbar .command-item.selected:not(.disabled){background-color:var(--selected-color)}.editor-command-bar.toolbar .command-item.disabled{color:#c7c7c7}.editor-command-bar.toolbar .command-item.checked{color:var(--primary-color)}.editor-command-bar.toolbar .command-item.checked.disabled{color:#c7c7c7}.editor-command-bar.toolbar .command-item.separator{margin:auto 2px;height:20px;min-width:1px;width:1px;background-color:var(--separator-color);padding:0;pointer-events:none;cursor:default}.editor-command-bar.toolbar .command-item .toolbar-item-name-container,.editor-command-bar.toolbar .command-item .toolbar-item-icon-container{display:flex}.editor-command-bar.toolbar .command-item[data-dropdown=true]{padding-left:4px;padding-right:4px}.editor-command-bar.toolbar .command-item[data-dropdown=true] .toolbar-item-icon-container{width:24px;height:24px;align-items:center;justify-content:center}.editor-command-bar.toolbar .command-item .toolbar-item-dropdown-container{display:flex}.editor-command-bar.toolbar .command-item .toolbar-item-dropdown-container svg{transform:rotate(360deg);transition:transform .2s linear}.editor-command-bar.toolbar .command-item.active .toolbar-item-dropdown-container svg{transform:rotate(180deg)}.editor-command-bar.toolbar .editor-button+.editor-button{margin-left:5px}.reference-hidden .tippy-box[data-reference-hidden]{opacity:0;pointer-events:none;transition:none}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.editor-dropdown{display:flex;align-items:center;border:1px solid #f0f0f0;border-radius:3px;font-size:14px;width:200px;height:30px}.editor-dropdown *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.editor-dropdown .dropdown-text,.editor-dropdown .dropdown-input{flex-grow:1;padding:2px 8px;border:none;outline:none;background:transparent;font-size:14px;color:#333;min-width:0;flex-shrink:1}.editor-dropdown .dropdown-text{margin-right:4.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:100%;cursor:text;display:flex;align-items:center}.editor-dropdown:hover{border-color:#338fe5}.editor-dropdown.active{border-color:#338fe5;box-shadow:0 0 0 2px #338fe533}.editor-dropdown.active .dropdown-text{display:none}.editor-dropdown:not(.active) .dropdown-input{display:none}.editor-dropdown .dropdown-labels{display:flex;align-items:center;flex-shrink:0}.editor-dropdown .dropdown-labels .dropdown-label{color:#338fe5;background-color:#eaf3fc;height:20px;padding:0 5px;border-radius:3px;display:flex;align-items:center}.editor-dropdown .dropdown-labels .dropdown-label+.dropdown-label{margin-left:5px}.editor-dropdown .dropdown-clear-icon,.editor-dropdown .dropdown-icon{flex-shrink:0;width:16px;height:16px;margin-left:4px;display:flex;align-items:center;justify-content:center;cursor:pointer}.editor-dropdown .dropdown-clear-icon{color:#909090}.editor-dropdown.empty .dropdown-clear-icon,.editor-dropdown:not(:hover) .dropdown-clear-icon{display:none}.editor-dropdown.empty .dropdown-text{color:#909090}.editor-dropdown .dropdown-icon{margin-right:4px}.scale-border:after,.color-palette .palette-container-row .background-color-button.selected:after,.color-palette .palette-container-row .background-color-button:hover:after{content:"";outline:1px solid #d6e9fa;border-radius:3px;position:absolute;left:0;right:0;top:0;bottom:0;transform:scale(1.1)}.color-palette{display:flex;flex-direction:column;align-items:center;padding-top:5px;background-color:#fff;--active-color: #2872b7}.color-palette .bar-desc{box-sizing:border-box;width:100%;height:24px;padding-left:10px;margin-bottom:10px;line-height:24px;font-size:12px;font-weight:500;background:#F8F8F8;color:#909090}.color-palette .palette-container{padding:0 10px}.color-palette .background-color .palette-container-row:first-child{margin-bottom:5px}.color-palette .palette-container-row{display:flex;flex-direction:row;margin-bottom:20px}.color-palette .palette-container-row .color-button{width:24px;height:24px;border:none;outline:none;cursor:pointer;border-radius:3px;background-color:#fff;border:1px solid #f0f0f0;display:flex;margin:0;padding:0;align-items:center;justify-content:center}.color-palette .palette-container-row .color-button:hover{border:1px solid #d6e9fa}.color-palette .palette-container-row .color-button.selected{border:1px solid var(--primary-color)}.color-palette .palette-container-row .color-button[data-color-index="-1"]{color:var(--text-color)}.color-palette .palette-container-row .color-button[data-color-index="0"]{color:var(--color-0)}.color-palette .palette-container-row .color-button[data-color-index="1"]{color:var(--color-1)}.color-palette .palette-container-row .color-button[data-color-index="2"]{color:var(--color-2)}.color-palette .palette-container-row .color-button[data-color-index="3"]{color:var(--color-3)}.color-palette .palette-container-row .color-button[data-color-index="4"]{color:var(--color-4)}.color-palette .palette-container-row .color-button[data-color-index="5"]{color:var(--color-5)}.color-palette .palette-container-row .color-button[data-color-index="6"]{color:var(--color-6)}.color-palette .palette-container-row .background-color-button{width:24px;height:24px;border:none;outline:none;cursor:pointer;border-radius:3px;position:relative}.color-palette .palette-container-row .background-color-button.selected:after{outline:1px solid var(--primary-color)}.color-palette .palette-container-row .background-color-button[data-color-index="-1"]{position:relative;background-color:#fff;border:1px solid #e8e8e8}.color-palette .palette-container-row .background-color-button[data-color-index="-1"]:after{transform:scale(1.2)}.color-palette .palette-container-row .background-color-button[data-color-index="-1"]:before{content:"";position:absolute;width:1px;height:56px;top:2px;left:22px;background-color:#c7c7c7;transform:rotate(45deg) scale(.5);transform-origin:-1px -2px}.color-palette .palette-container-row .background-color-button[data-color-index="0"]{background-color:var(--background-color-0)}.color-palette .palette-container-row .background-color-button[data-color-index="1"]{background-color:var(--background-color-1)}.color-palette .palette-container-row .background-color-button[data-color-index="2"]{background-color:var(--background-color-2)}.color-palette .palette-container-row .background-color-button[data-color-index="3"]{background-color:var(--background-color-3)}.color-palette .palette-container-row .background-color-button[data-color-index="4"]{background-color:var(--background-color-4)}.color-palette .palette-container-row .background-color-button[data-color-index="5"]{background-color:var(--background-color-5)}.color-palette .palette-container-row .background-color-button[data-color-index="6"]{background-color:var(--background-color-6)}.color-palette .palette-container-row .background-color-button[data-color-index="7"]{background-color:var(--background-color-7)}.color-palette .palette-container-row .background-color-button[data-color-index="8"]{background-color:var(--background-color-8)}.color-palette .palette-container-row .background-color-button[data-color-index="9"]{background-color:var(--background-color-9)}.color-palette .palette-container-row .background-color-button[data-color-index="10"]{background-color:var(--background-color-10)}.color-palette .palette-container-row .background-color-button[data-color-index="11"]{background-color:var(--background-color-11)}.color-palette .palette-container-row .background-color-button[data-color-index="12"]{background-color:var(--background-color-12)}.color-palette .palette-container-row .background-color-button[data-color-index="13"]{background-color:var(--background-color-13)}.color-palette .palette-container-row .background-color-button[data-color-index="14"]{background-color:var(--background-color-14)}.color-palette .palette-container-row .color-button+.color-button{margin-left:5px}.color-palette .palette-container-row .background-color-button+.background-color-button{margin-left:5px}.color-palette .clear-button-container{box-sizing:border-box;width:100%;margin-bottom:5px;padding:0 10px}.color-palette .clear-button-container .clear-button{box-sizing:border-box;padding:3px 10px;width:100%;height:26px;background:#ffffff;color:#606060;border:1px solid #c7c7c7;border-radius:3px;cursor:pointer}.color-palette .clear-button-container .clear-button:hover{border-color:var(--primary-color);color:var(--primary-color)}.color-palette .clear-button-container .clear-button:active{border-color:var(--active-color);color:var(--active-color);background-color:#d6e9fa}.editor-input-wrap .editor-input-label{margin-top:8px;margin-bottom:8px;position:relative}.editor-input-wrap .editor-input-label.required:before{content:"*";color:#e82100;position:absolute;left:-8px;top:3px}.editor-input-wrap .editor-input-label .span{font-size:14px;line-height:1.4;font-weight:700;color:#303030}.editor-input-wrap .editor-input-container{display:flex;border:none;border-radius:4px;padding:4px;background-color:#fff}.editor-input-wrap .editor-input-container .editor-input{outline:none;border:1px solid #c7c7c7;border-radius:3px;padding:4px 10px;font-size:14px;line-height:1.4;color:#000;width:100%}.editor-input-wrap .editor-input-container .editor-input:focus{border-color:#338fe5;box-shadow:0 0 0 2px #338fe533}.editor-input-wrap.error .editor-input-container{border:1px solid #e82100}.editor-input-wrap.error .editor-input-container .editor-input{border:none;outline:none;box-shadow:unset}.editor-input-wrap.error .editor-input-error{margin-top:8px;color:red;display:block}.editor-input-wrap .editor-input-error{display:none}div.scroll-container-root{position:relative}div.scroll-container-root>div.scroll-container{position:relative;overflow-x:auto;overflow-y:hidden;box-sizing:border-box;line-height:0px}div.scroll-container-root>div.scroll-container>.scroll-area{position:relative;display:inline-block;overflow:hidden;line-height:normal}div.scroll-container-root>div.scroll-container{scrollbar-width:none}div.scroll-container-root>div.scroll-container::-webkit-scrollbar{height:0;opacity:0}div.scroll-container-root>div.container-scroll-tool .container-border-shadow{position:absolute;top:0;opacity:0;width:0;border:none;pointer-events:none;transition:opacity 50ms ease-in;z-index:1}div.scroll-container-root>div.container-scroll-tool .container-right-border-shadow{right:0;background:linear-gradient(90deg,rgba(31,35,41,0) 0,rgba(31,35,41,.1));border-right:0px solid #dee0e3}div.scroll-container-root>div.container-scroll-tool .container-left-border-shadow{left:0;background:linear-gradient(270deg,rgba(31,35,41,0) 0,rgba(31,35,41,.1));border-left:0px solid #dee0e3}div.scroll-container-root>div.container-scroll-tool .container-border-shadow.active{width:8px;opacity:1}div.scroll-container-root>div.container-scroll-tool .container-right-border-shadow.active{border-right-width:1px}div.scroll-container-root>div.container-scroll-tool .container-left-border-shadow.active{border-left-width:1px}div.scroll-container-root>div.container-scroll-tool .container-scrollbar{position:absolute;left:0;z-index:1000;visibility:visible;overflow-x:auto;overflow-y:hidden;cursor:auto}div.scroll-container-root>div.container-scroll-tool .container-scrollbar div{height:1px}div.scroll-container-root>div.container-scroll-tool div.container-scrollbar.fixed{position:fixed}div.scroll-container-root.mac>div.container-scroll-tool .container-scrollbar{opacity:.6;transition:opacity .1s ease-in-out}div.scroll-container-root.mac>div.container-scroll-tool .container-scrollbar::-webkit-scrollbar{height:8px}div.scroll-container-root.mac>div.container-scroll-tool .container-scrollbar::-webkit-scrollbar-track{background-color:transparent}div.scroll-container-root.mac>div.container-scroll-tool .container-scrollbar::-webkit-scrollbar-thumb{background-color:#646a73cc;border-radius:8px}div.scroll-container-root.mac>div.container-scroll-tool .container-scrollbar::-webkit-scrollbar-button{display:none}[data-tippy-root]{font-family:Avenir,Helvetica,Arial,sans-serif}[data-command-bar-id=editor-toolbar]{padding-top:10px;padding-bottom:5px}[data-command-bar-id=editor-toolbar] .command-item[data-id=link-text]{height:32px;width:unset}[data-command-bar-id=editor-toolbar] .command-item[data-id=link-text].selected:hover{background-color:transparent}[data-command-bar-id=editor-toolbar] .command-item[data-id=link-text] .link-href-button{max-width:275px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#303030;text-decoration:none}[data-command-bar-id=editor-toolbar] .command-item[data-id=link-text] .link-href-button:hover{text-decoration:underline}[data-command-bar-id=editor-toolbar] .command-item[data-id=edit-link],[data-command-bar-id=editor-toolbar] .command-item[data-id=remove-link]{height:32px}[data-command-bar-id=editor-toolbar] .command-item[data-id=edit-link] svg,[data-command-bar-id=editor-toolbar] .command-item[data-id=remove-link] svg{stroke-width:2}[data-command-bar-id=editor-toolbar] .command-item[data-id=edit-link].selected:hover,[data-command-bar-id=editor-toolbar] .command-item[data-id=remove-link].selected:hover{background-color:transparent;color:#338fe5}[data-command-bar-id=quick-menu],[data-command-bar-id=empty-block-menu]{box-sizing:border-box;width:240px}[data-command-bar-id=quick-menu] .command-item.menu-item,[data-command-bar-id=empty-block-menu] .command-item.menu-item{width:100%;cursor:pointer}[data-command-bar-id=quick-menu] .command-item.menu-item.section,[data-command-bar-id=empty-block-menu] .command-item.menu-item.section{height:24px;padding:2px 10px;font-weight:500;font-size:12px;line-height:20px;color:#909090;background:#F8F8F8;min-height:initial;box-sizing:border-box;margin-bottom:5px}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item{color:#303030;display:flex;width:100%;padding:6px 10px}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-icon-container,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-icon-container{display:flex;align-items:center;justify-content:center;padding-right:6px}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-icon-container .quick-menu-item-icon,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-icon-container .quick-menu-item-icon{width:16px;height:16px;display:flex;align-items:center;justify-content:center}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1{display:flex;align-items:center}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .item-name,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .item-name{flex-grow:1;font-size:14px;line-height:22px;color:#303030}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .item-subtext,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .item-subtext{color:#b2bccd}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .quick-menu-item-submenu-icon,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-1 .quick-menu-item-submenu-icon{display:flex;align-items:center;margin-left:12px}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-2,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-2{margin-top:5px}[data-command-bar-id=quick-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-2 .item-markdown,[data-command-bar-id=empty-block-menu] .command-item.menu-item .quick-menu-item .quick-menu-item-content .item-line-2 .item-markdown{color:#b2bccd}[data-command-bar-id=quick-menu] .command-item.menu-item[data-id=placeholder] .quick-menu-item-icon-container,[data-command-bar-id=empty-block-menu] .command-item.menu-item[data-id=placeholder] .quick-menu-item-icon-container{display:none}[data-command-bar-id=quick-menu] .command-item.menu-item[data-id=placeholder] .item-name.text,[data-command-bar-id=empty-block-menu] .command-item.menu-item[data-id=placeholder] .item-name.text{color:#909090!important;padding:5px 0}[data-command-bar-id=block-menu]{width:240px}div.tippy-box .editor-tooltip-desc{display:block;margin-top:2px;color:#a8a9ab}.link-popup-content{padding:10px 7px}.link-popup-content .link-popup-gap{margin-top:16px}.link-popup-content .editor-input-container{padding:4px 0}.link-popup-content .editor-input-container .editor-input{width:330px;line-height:1.5}.link-popup-content .editor-input-wrap .editor-input-label{margin-bottom:4px}.link-popup-content .link-popup-footer{margin:10px 0 5px;text-align:right}.link-popup-content .link-popup-footer button{min-width:58px;min-height:30px;padding:0 10px;border-radius:3px;background-color:#eef3f8;font-size:14px;color:#fff;cursor:pointer;outline:none}.link-popup-content .link-popup-footer .cancel-button{margin:0 8px 0 0;background-color:transparent;border:1px solid #c7c7c7;color:#606060}.link-popup-content .link-popup-footer .cancel-button:hover{color:#303030;background:#eee;border:1px solid #c7c7c7}.link-popup-content .link-popup-footer .submit-button{outline:none;background-color:#338fe5;color:#fff;border:0}.link-popup-content .link-popup-footer .submit-button:disabled{color:#fff;background-color:#338fe580}.link-popup-content .link-popup-footer .submit-button:disabled:hover{background-color:#338fe580}.link-popup-content .link-popup-footer .submit-button:hover{background-color:#5ca5ea}:root{--mindmap-bg-color: #f0f2f4}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block.focused [data-type=block-tools] .editor-mindmap-svg{border-radius:3px;outline:1px solid #338FE5}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block.editor-in-mindmap-first{height:600px;min-width:150px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-content]{margin-right:24px;transition:background-color .25s linear}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-tools] .editor-mindmap-svg{position:absolute;left:0;top:0;right:0;bottom:0;z-index:2;font-size:14px;background-color:var(--mindmap-bg-color)}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-tools] .mindmap-toolbar{position:absolute;top:8px;right:8px;height:24px;z-index:3}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-tools] .mindmap-toolbar .editor-button.mindmap-button{background-color:transparent;outline:none;border:none;fill:none;color:#c1c1c1;cursor:pointer;min-width:initial;margin-right:0}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-tools] .mindmap-toolbar .editor-button.mindmap-button:hover{color:#5587f0}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block.to-mindmap-highlight [data-type=block-content],.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block.to-mindmap-highlight:hover [data-type=block-content]{background-color:#eaf3fc}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap{position:absolute;right:0;top:2px;display:flex;align-items:center;height:calc(var(--font-size) * var(--line-height))}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=list-to-mindmap],.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=mention-button]{flex-grow:0;flex-shrink:0;width:24px;height:24px;min-width:24px;min-height:24px;padding:0;border:0;outline:0;display:flex;align-items:center;justify-content:end;background-color:transparent;color:#07142a}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=list-to-mindmap] svg,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=mention-button] svg{width:16px;height:16px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button[data-button-id=list-block-mention]:hover>svg{cursor:initial;background-color:#eee}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block button+button[data-button-id=list-block-mention]{right:20px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="1"]{padding-left:24px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="1"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="2"]{padding-left:48px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="2"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="3"]{padding-left:72px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="3"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="4"]{padding-left:96px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="4"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="5"]{padding-left:120px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="5"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="6"]{padding-left:144px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="6"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="7"]{padding-left:168px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="7"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="8"]{padding-left:192px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="8"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="9"]{padding-left:216px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="9"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="10"]{padding-left:240px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="10"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="11"]{padding-left:264px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="11"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="12"]{padding-left:288px}div.editor-root div.editor-content div[data-block-type=text][block-padding-level="12"]>div[data-type=block-content]{position:relative}div.editor-root div.editor-content div[data-block-type=list][data-list-level="1"]{padding-left:0}div.editor-root div.editor-content div[data-block-type=list][data-list-level="2"]{padding-left:24px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="3"]{padding-left:48px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="4"]{padding-left:72px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="5"]{padding-left:96px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="6"]{padding-left:120px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="7"]{padding-left:144px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="8"]{padding-left:168px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="9"]{padding-left:192px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="10"]{padding-left:216px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="11"]{padding-left:240px}div.editor-root div.editor-content div[data-block-type=list][data-list-level="12"]{padding-left:264px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block+div[data-type=editor-block].list-block{margin-top:0}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block{display:flex;padding-bottom:2px;padding-top:2px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=text-only] .list-container{pointer-events:none}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] div[data-type=block-content] span.text{color:#c7c7c7}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unordered] .list-container .list-marker{font-family:PingFangSC-Regular,PingFang SC;justify-content:space-around}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block [data-type=block-content]{position:relative;flex-grow:1;padding-left:2px;margin-right:29px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-container{display:flex;min-width:24px;align-items:center;justify-content:center;flex-shrink:0;border-radius:3px;height:calc(var(--font-size) * var(--line-height))}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-container .list-marker{min-width:16px;border:none;background-color:transparent;outline:none;display:flex;align-items:center;justify-content:flex-end;padding:0;overflow:visible;color:var(--primary-color);font-size:var(--font-size)}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block div[data-type=block-tools] .block-helper{top:2px}.editor-root.readonly button[data-button-id=mindmap-close]{display:none}.editor-root:not(.readonly) div[data-type=editor-block].list-block.active [data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover [data-type=block-content]{background-color:#f4f4f4}.editor-root:not(.readonly) div[data-type=editor-block].list-block.active [data-type=block-content] .list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover [data-type=block-content] .list-container{cursor:pointer}.editor-root:not(.readonly) div[data-type=editor-block].list-block .list-container:hover .list-marker{cursor:pointer}.editor-root:not(.readonly) div[data-type=editor-block].list-block:not([data-list-type=unchecked]):not([data-list-type=checked]):not([data-list-type=unordered]) .list-container:hover{background-color:var(--background-selection)}.editor-root:not(.readonly) div[data-type=editor-block].list-block[data-list-type=unordered] .list-container:hover .list-marker{cursor:initial}.editor-root:not(.readonly) div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container:hover .list-marker svg>*{fill:var(--background-selection)}[data-tippy-root] .customize-start-panel{max-width:350px;padding:0 16px;color:#333;font-size:14px;line-height:21px;user-select:none;background-color:#fff!important}[data-tippy-root] .customize-start-panel-input{width:64px;margin:0 8px;border:1px solid #cfd6e1;height:24px;border-radius:3px;padding:1px 0 1px 8px;outline:none;color:inherit;background-color:#fff}[data-tippy-root] .customize-start-panel-button{min-width:40px;font-size:12px;min-height:30px;margin:0 8px 0 0;background-color:var(--primary-color);color:#fff;outline:none;border:none;padding:4px 8px;border-radius:4px;cursor:pointer}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.math-box{display:inline-flex}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.math-box .mathjax-tex-text.mathjax-error{color:var(--color-0)}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] img.mathjax{max-width:100%}div.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=math]>div[data-type=block-content]{align-items:center;justify-content:center;min-height:40px}div.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-embed-type=math]>div[data-type=block-content] img{margin:auto;padding:8px}.mathjax-editor-textarea{border:none;outline:none;width:400px;height:128px}.editor-text-button{border:0;color:var(--text-button-color, #c1c1c1);background-color:var(--text-button-bg-color, transparent);cursor:pointer;border-radius:var(--editor-border-radius, 3px);font-size:14px;padding:1px 6px;display:flex;align-items:center}.editor-text-button:hover{color:var(--text-button-color-hover, #5587F0);background-color:var(--text-button-bg-color-hover, transparent)}div[data-type=editor-block].table-block{--table-bar-width: 6px;--table-bar-left: -6px;--table-bar-top: -6px}div[data-type=editor-block].table-block>div[data-type=block-content]{position:relative;left:-26px}div[data-type=editor-block].table-block.locked-by-self>[data-type=block-content]:after,div[data-type=editor-block].table-block.locked-by-others>[data-type=block-content]:after{display:none}div[data-type=editor-block].table-block.locked-by-self>[data-type=block-content] div[data-type=table-content],div[data-type=editor-block].table-block.locked-by-others>[data-type=block-content] div[data-type=table-content]{position:relative}div[data-type=editor-block].table-block.locked-by-self>[data-type=block-content] div[data-type=table-content]:after,div[data-type=editor-block].table-block.locked-by-others>[data-type=block-content] div[data-type=table-content]:after{content:" ";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:1;background-color:#303030;opacity:.1}div[data-type=editor-block].table-block div[data-type=table-tools] .table-resize-gripper{position:absolute;background-color:transparent;cursor:col-resize;padding:0 2px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-resize-gripper>.table-resize-gripper-indicator{pointer-events:none;background-color:var(--primary-color);width:100%;height:100%}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container{position:absolute;background-color:transparent;z-index:10}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container.top{left:var(--table-bar-left);top:var(--table-bar-top);right:0;height:var(--table-bar-width);flex-direction:row}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container.left{top:0;left:var(--table-bar-left);width:var(--table-bar-width);bottom:0;flex-direction:column}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar{position:absolute;left:0;top:0;right:0;bottom:0;cursor:pointer;display:flex}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar.left{flex-direction:column}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell{background-color:#e8e8e8;position:relative;flex-grow:0;flex-shrink:0}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.corner{width:var(--table-bar-width)}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.top{height:100%}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell:hover{background-color:#dedede}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.selected{background-color:var(--primary-color)}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.danger{background-color:#e52727}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root{position:relative}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root.top{max-width:0;width:0;overflow:visible}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root.top:last-child{margin-left:-2px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root.left{max-height:0;height:0;overflow:visible}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root.left:last-child{margin-top:-2px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container{position:absolute;width:26px;height:26px;display:flex;align-items:center;justify-content:center;z-index:1}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container.top{right:-14px;top:-22px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container.left{transform:rotate(270deg);left:-22px;bottom:-14px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container .insert-indicator{position:absolute;width:3px;height:3px;background:#e8e8e8;border-radius:50%;margin-top:6px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-indicator{display:none}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-column-button{display:unset}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-column-button span.icon{margin-top:2px}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .drop-marker{opacity:1;transform:scale(.7)}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker{width:26px;height:26px;border-radius:3px;background:var(--primary-color);cursor:pointer;opacity:0;transform:scale(.4);transition:transform .2s ease-in,opacity .2s ease-in}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker:after{content:"";display:block;width:10px;height:1px;background-color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker:before{content:"";display:block;width:1px;height:10px;background-color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}div[data-type=editor-block].table-block div[data-type=table-tools] .editor-table-chart{padding-top:16px}div[data-type=editor-block].table-block div[data-type=table-content]{position:relative}div[data-type=editor-block].table-block div[data-type=table-content]>.error{color:red;border:1px solid red;padding:8px}div[data-type=editor-block].table-block div[data-type=table-content]>table{border-collapse:collapse;width:max-content;border-spacing:0}div[data-type=editor-block].table-block div[data-type=table-content]>table colgroup col{min-width:40px}div[data-type=editor-block].table-block div[data-type=table-content]>table,div[data-type=editor-block].table-block div[data-type=table-content]>table td,div[data-type=editor-block].table-block div[data-type=table-content]>table th{border:1px solid #c7c7c7;background-color:transparent}div[data-type=editor-block].table-block div[data-type=table-content]>table tr td.danger{background-color:#fce9e9!important}div[data-type=editor-block].table-block div[data-type=table-content]>table td{min-width:40px;padding:0;position:relative}div[data-type=editor-block].table-block div[data-type=table-content]>table td .table-cell-menu-btn{display:none;position:absolute;right:2px;top:2px;padding:0;width:16px;height:16px;border:none;border-radius:3px;background:#eaf3fc;color:#338fe5;cursor:pointer;transform:rotate(0);transition:transform .2s}div[data-type=editor-block].table-block div[data-type=table-content]>table td .table-cell-menu-btn.active{transform:rotate(180deg)}div[data-type=editor-block].table-block div[data-type=table-content]>table td>div[data-type=editor-container].child{padding:8px}div[data-type=editor-block].table-block div[data-type=table-content]>table td>div[data-type=editor-container].child div[data-type=editor-block].table-block>div[data-type=block-content]{pointer-events:none}div[data-type=editor-block].table-block div[data-type=table-content]>table td>div[data-type=editor-container].child div[data-type=editor-block].table-block>div[data-type=block-content] div[data-type=table-content]{pointer-events:auto}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-0{background-color:var(--background-color-0)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-1{background-color:var(--background-color-1)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-2{background-color:var(--background-color-2)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-3{background-color:var(--background-color-3)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-4{background-color:var(--background-color-4)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-5{background-color:var(--background-color-5)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-6{background-color:var(--background-color-6)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-7{background-color:var(--background-color-7)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-8{background-color:var(--background-color-8)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-9{background-color:var(--background-color-9)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-10{background-color:var(--background-color-10)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-11{background-color:var(--background-color-11)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-12{background-color:var(--background-color-12)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-13{background-color:var(--background-color-13)}div[data-type=editor-block].table-block div[data-type=table-content]>table td.style-bg-color-14{background-color:var(--background-color-14)}div[data-type=editor-block].table-block div[data-type=table-content]>table.row-title>tbody>tr:first-child>td,div[data-type=editor-block].table-block div[data-type=table-content]>table.col-title td.col-title-item{background-color:#f8f8f8}div[data-type=editor-block].table-block div[data-type=table-content]>table.stripe:not(.row-title)>tbody>tr:nth-of-type(2n),div[data-type=editor-block].table-block div[data-type=table-content]>table.stripe.row-title>tbody>tr:nth-of-type(2n + 1){background-color:#f5f8fb}div[data-type=editor-block].table-block div[data-type=table-content]>table.no-border,div[data-type=editor-block].table-block div[data-type=table-content]>.no-border>tbody>tr>td{border:1px dashed;border-color:transparent}div[data-type=editor-block].table-block.focused div[data-type=table-content]>table.no-border,div[data-type=editor-block].table-block.focused div[data-type=table-content]>table.no-border>tbody>tr>td,div[data-type=editor-block].table-block.child-focused div[data-type=table-content]>table.no-border,div[data-type=editor-block].table-block.child-focused div[data-type=table-content]>table.no-border>tbody>tr>td{border-color:#b9bfc8}div[data-type=editor-block].table-block.full-selected>div[data-type=block-content]>.scroll-container-root>.scroll-container>.scroll-area>div[data-type=table-content]>table{background-color:var(--background-selection)}div[data-type=editor-block].table-block div[data-type=table-content]>table tbody tr td.selected,div[data-type=editor-block].table-block div[data-type=table-content]>table.row-title tbody tr td.selected,div[data-type=editor-block].table-block div[data-type=table-content]>table.col-title tbody tr td.selected{background-color:var(--background-selection)}div[data-type=editor-block].table-block div[data-type=table-content]>table td div[data-type=editor-block].table-block div[data-type=table-content]>table{max-width:100%}.command-item.menu-item .table-creator{background-color:#fff;padding:0 5px}.command-item.menu-item .table-creator .table-creator-row{display:flex}.command-item.menu-item .table-creator .table-creator-row .table-creator-cell{width:16px;height:16px;margin:3px;border:solid 1px #ddd}.command-item.menu-item .table-creator .table-creator-row .table-creator-cell.active{background-color:#99c7f2}div.editor-root div.editor-content div[data-type=editor-container].root div[data-type=editor-block].table-block{margin-top:0}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color]{width:100%}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .bar-desc{display:none}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item{box-sizing:border-box;width:100%;height:32px;padding:5px 10px;display:flex;align-items:center;justify-content:space-between;color:var(--text-color)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-sub-indicator{display:flex;align-items:center;margin-left:5px}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-sub-indicator svg{height:16px;width:16px}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button{width:24px;height:24px;border:none;outline:none;cursor:pointer;border-radius:3px;position:relative;margin-left:auto}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="-1"]{position:relative;background-color:#fff;border:1px solid #e8e8e8}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="-1"]:after{transform:scale(1.2)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="-1"]:before{content:"";position:absolute;width:1px;height:56px;top:2px;left:22px;background-color:#c7c7c7;transform:rotate(45deg) scale(.5);transform-origin:-1px -2px}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="0"]{background-color:var(--background-color-0)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="1"]{background-color:var(--background-color-1)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="2"]{background-color:var(--background-color-2)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="3"]{background-color:var(--background-color-3)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="4"]{background-color:var(--background-color-4)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="5"]{background-color:var(--background-color-5)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="6"]{background-color:var(--background-color-6)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="7"]{background-color:var(--background-color-7)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="8"]{background-color:var(--background-color-8)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="9"]{background-color:var(--background-color-9)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="10"]{background-color:var(--background-color-10)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="11"]{background-color:var(--background-color-11)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="12"]{background-color:var(--background-color-12)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="13"]{background-color:var(--background-color-13)}div.tippy-box[data-theme=menu] .tippy-content div[data-id=cell-background-color] .cell-background-color-item .item-button[data-color-index="14"]{background-color:var(--background-color-14)}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-block-type=table]{background-color:transparent}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-block-type=table] table.row-title>tbody>tr:first-child>td,div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-block-type=table] table.col-title td.col-title-item{background-color:transparent}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-block-type=table] table.stripe:not(.row-title)>tbody>tr:nth-of-type(2n),div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-block-type=table] table.stripe.row-title>tbody>tr:nth-of-type(2n + 1){background-color:transparent}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment{box-shadow:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment table,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment table{box-shadow:0 2px #f8e6ab}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment table table,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment table table{box-shadow:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment.active,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment.active{outline:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment.active table,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment.active table{border-bottom:none;outline:4px solid #f8e6ab}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-block-type=table].comment.active table table,div.editor-root div.editor-content div[data-type=editor-container].child div[data-type=editor-block][data-block-type=table].comment.active table table{box-shadow:none;outline:none}div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block] [data-type=block-content][data-title-placeholder]:before{position:absolute;left:0;top:0;right:0;bottom:0;content:attr(data-title-placeholder);color:#c7c7c7}div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block] [data-type=block-content][data-content-placeholder]:before{position:absolute;left:0;top:0;right:0;bottom:0;content:attr(data-content-placeholder);color:#c7c7c7;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center}div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block] [data-type=block-tools] .block-placeholder-container{position:absolute;left:0;top:0;right:0}div.editor-root.readonly div.editor-content div[data-type=editor-container] div[data-type=editor-block] [data-type=block-content][data-title-placeholder]:before{position:absolute;left:0;top:0;right:0;bottom:0;content:attr(data-title-placeholder-readonly);color:#c7c7c7}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block{min-width:360px;counter-reset:code-line}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block.full-selected{background-color:var(--background-selection)}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block.editing-language div[data-type=block-tools] .code-block-header,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block.child-focused div[data-type=block-tools] .code-block-header,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block:hover div[data-type=block-tools] .code-block-header{opacity:1}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block.wrap>div[data-type=block-tools] .code-block-header button[data-id=wrap] *{color:var(--primary-color)}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block:not(.wrap)>div[data-type=block-content] div[data-type=editor-container].child{overflow-x:auto}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block:not(.wrap)>div[data-type=block-content] div[data-type=editor-container].child div[data-type=block-content]{word-break:keep-all;overflow:visible;white-space:pre}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block:not(.wrap)>div[data-type=block-content] div[data-type=editor-container].child div[data-type=block-content]>span.text,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block:not(.wrap)>div[data-type=block-content] div[data-type=editor-container].child div[data-type=block-content]>span.inputting-insertion{white-space:pre}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header{opacity:0;transition:opacity .3s ease-in 0s;position:absolute;top:0;display:flex;padding-left:16px;padding-right:4px;align-items:center;left:0;right:0;height:32px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .language-select{font-size:14px;color:#999;cursor:pointer;display:flex;align-items:center}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .language-select .arrow-icon{width:16px;height:16px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-spacer{flex-grow:1}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button{display:flex;justify-content:center;align-items:center;border:none;border-radius:2px;margin-left:4px;padding:0;background:none;outline:none;color:#c1c1c1}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button:not(.disabled){cursor:pointer}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button:not(.disabled):hover{color:#5587f0}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button.disabled{cursor:not-allowed}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button[data-id=caption]{margin-right:4px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button .button-icon{height:24px;display:flex;align-items:center;justify-content:center}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button .button-icon>svg{width:24px;height:24px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-tools] .code-block-header .code-header-button .button-label{margin-left:4px;font-size:14px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block.full-selected>div[data-type=block-content]>div.editor-code-root>div.code-text-root{background-color:unset}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root{background-color:var(--background-code)}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container]{padding-left:32px;padding-top:32px;padding-bottom:24px;border-radius:4px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container].selected{background-color:var(--background-selection)}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] *{font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:14px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block+div.text-block{margin-top:4px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block:before{content:counter(code-line);counter-increment:code-line;position:absolute;left:-48px;top:10px;z-index:1;margin-top:-4px;display:block;width:48px;padding-right:8px;text-align:right;color:#aaa;box-sizing:border-box;font-size:12px;font-weight:400;line-height:12px;letter-spacing:0;white-space:nowrap;opacity:1}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-comment,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-prolog,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-doctype,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-cdata{color:#708090}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-punctuation{color:#999}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-namespace{opacity:.7}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-property,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-tag,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-boolean,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-number,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-constant,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-symbol,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-deleted{color:#905}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-selector,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-attr-name,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-string,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-char,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-builtin,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-inserted{color:#690}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-operator,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-entity,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-url,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-string{color:#9a6e3a}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-atrule,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-attr-value,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-keyword{color:#07a}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-function,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-class-name{color:#dd4a68}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-regex,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-important,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-variable{color:#e90}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-important,.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-bold{font-weight:700}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-italic{font-style:italic}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-text-root>div.child[data-type=editor-container] div.text-block>div[data-type=block-content] span.style-code-entity{cursor:help}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-caption-root{padding:8px}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block>div[data-type=block-content]>div.editor-code-root>div.code-caption-root *{color:#aaa}div.editor-root.readonly .container-blocks div[data-block-type=code] div[data-type=block-tools] .code-block-header .code-header-button[data-id=wrap],div.editor-root.readonly .container-blocks div[data-block-type=code] div[data-type=block-tools] .code-block-header .code-header-button[data-id=caption]{display:none}div.editor-root.readonly .container-blocks div[data-block-type=code] div[data-type=block-tools] .code-block-header .language-select{cursor:default!important}div.editor-root.readonly .container-blocks div[data-block-type=code] div[data-type=block-tools] .code-block-header .language-select .arrow-icon{display:none}div.editor-root div.editor-content div[data-type=editor-container].root.select-all div[data-type=block-content]>div.editor-code-root>div.code-text-root{background-color:unset}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer{position:absolute;background-color:transparent;border:1px solid #338FE5;pointer-events:none;z-index:1;display:none}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer.active{display:block}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper{position:absolute;width:16px;height:16px;border:2px solid white;background-color:#338fe5;border-radius:50%;pointer-events:all}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper.bottom{left:calc(50% - 8px);bottom:-8px;cursor:ns-resize}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper.top-left{left:-8px;top:-8px;cursor:nwse-resize}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper.top-right{right:-8px;top:-8px;cursor:nesw-resize}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper.bottom-left{left:-8px;bottom:-8px;cursor:nesw-resize}div.editor-root div.editor-content div[data-type=editor-block] [data-type=block-tools] .block-resizer .resize-gripper.bottom-right{right:-8px;bottom:-8px;cursor:nwse-resize}div.editor-root.readonly div.editor-content div[data-type=editor-block]>[data-type=block-tools] .block-resizer{display:none}.before-content,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].selected [data-type=block-content] .images .image-container.active:before,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].selected:not(.focused) [data-type=block-content] .images .image-container:before{content:" ";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:1;background-color:#338fe5;opacity:.1}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image]{display:flex}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image][data-style-align=left]{justify-content:flex-start}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image][data-style-align=right]{justify-content:flex-end}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].hover [data-type=block-content]{outline:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].hover [data-type=block-content] .images .image-container.empty:hover,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].hover [data-type=block-content] .images .image-container.error:hover{outline:1px solid #338FE5}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].selected [data-type=block-content]:before{display:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].selected [data-type=block-content]{outline:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].selected [data-type=block-content] .images .image-container.active .image-warning{opacity:0;z-index:-1}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].multi [data-type=block-tools] .block-resizer{display:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image]:not(.multi) [data-type=block-content] .images.empty{min-height:400px}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content]{cursor:default}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images{width:100%;display:flex;align-items:flex-start}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-splitter{width:10px;flex-grow:0;flex-shrink:0;padding:0 4px;cursor:col-resize;height:100%}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-splitter .image-splitter-indicator{width:100%;height:100%}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-splitter:active .image-splitter-indicator,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-splitter:hover .image-splitter-indicator{background-color:#d9d9d9}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container{position:relative;flex:1;background-color:#f8f8f8;display:flex;min-height:inherit;overflow:hidden}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container img{max-width:100%;width:100%;height:auto}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container.empty .upload-image-icon{display:flex;color:#c7c7c7}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container.error{height:100%;outline:1px solid #DEDEDE;border-radius:3px}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container.error img{display:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;z-index:1}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-icon,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-icon{display:flex;color:#c7c7c7}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message{display:flex;flex-direction:column;align-items:center;overflow:hidden}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message .line-1,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message .line-1{margin-top:10px;font-size:18px;font-weight:500;color:#303030;height:26px;vertical-align:middle;line-height:26px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex-shrink:0}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message .line-2,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message .line-3,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message .line-2,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message .line-3{font-size:14px;color:#606060;vertical-align:middle;height:22px;line-height:22px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex-shrink:0}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message .line-2 a,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .error-message .line-3 a,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message .line-2 a,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .upload-error .error-message .line-3 a{text-decoration:none;color:#338fe5}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .line-3 a{display:inline-flex;align-items:center;text-decoration:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .load-error .line-3 a:after{content:" ";display:inline-block;width:16px;height:16px;margin-left:5px;background-image:url("data:image/svg+xml,%3Csvg width='17' height='16' viewBox='0 0 17 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5 2H3.5C2.94772 2 2.5 2.44772 2.5 3V13C2.5 13.5523 2.94772 14 3.5 14H13.5C14.0523 14 14.5 13.5523 14.5 13V10' stroke='%23338FE5'/%3E%3Cpath d='M14.5 2L9 7.5' stroke='%23338FE5'/%3E%3Cpath d='M8.5 2H14.5V8' stroke='%23338FE5'/%3E%3C/svg%3E%0A")}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .uploading-progress-mask{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#303030;opacity:.8;display:flex;align-items:center;justify-content:center}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .uploading-progress-mask .uploading-progress-bar{width:75%;height:6px;border-radius:3px;display:flex;background-color:#fff}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .uploading-progress-mask .uploading-progress-bar .uploading-progress-bar-value{background-color:#338fe5}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container .image-warning{position:absolute;right:5px;top:5px;color:#fff;background-color:#333;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:3px;z-index:2;transition:opacity linear .2s;opacity:.7}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container.empty{display:flex;flex-direction:column;align-items:center;outline:1px solid #DEDEDE;border-radius:3px;justify-content:center;height:100%}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-container.empty svg{width:48px;height:48px}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-tools] .drag-container{display:flex;box-sizing:content-box;pointer-events:none;position:fixed;z-index:100;background-color:#fff;border:1px solid #338FE5}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-tools] .drag-container .drag-target{width:100%}.editor-root[readonly=true] .image-splitter{visibility:hidden}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].comment{box-shadow:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].comment [data-type=block-content]{box-shadow:0 2px #f8e6ab}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].comment.active{outline:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=image].comment.active [data-type=block-content]{box-shadow:none;outline:4px solid #f8e6ab}.editor-root .editor-content div[data-type=editor-block].dragging div[data-type=block-tools] .block-helper{opacity:0}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper{position:absolute;right:100%;top:0;padding-right:8px;display:flex;align-items:center}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .helper-sizer{width:0;opacity:0;pointer-events:none}div[data-type=editor-block].locked-by-self>[data-type=block-content],div[data-type=editor-block].locked-by-others>[data-type=block-content]{position:relative}div[data-type=editor-block].locked-by-self>[data-type=block-content]:after,div[data-type=editor-block].locked-by-others>[data-type=block-content]:after{content:" ";position:absolute;left:0;top:0;right:0;bottom:0;z-index:1;background-color:#303030;opacity:.1}div[data-type=editor-block].locked-by-self.text-block>[data-type=block-content]:after,div[data-type=editor-block].locked-by-self.locked-by-self>[data-type=block-content]:after,div[data-type=editor-block].locked-by-others.text-block>[data-type=block-content]:after,div[data-type=editor-block].locked-by-others.locked-by-self>[data-type=block-content]:after{pointer-events:none}div[data-type=editor-block].locked-by-self.text-block>[data-type=block-content]:after,div[data-type=editor-block].locked-by-others.text-block>[data-type=block-content]:after{outline:2px solid #303030}.editor-root{--selected-color: #e8e8e8}.editor-root .editor-content .editor-drop-indicator{position:absolute;background-color:var(--primary-color);pointer-events:none;transition:top .2s linear,left .2s linear,width .2s linear}.editor-root .editor-content div[data-type=editor-block].text-block.highlighted{outline:2px solid var(--background-selection);background-color:var(--background-selection)}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .block-button{width:24px;height:24px;cursor:grab;margin:0;padding:0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;border-radius:3px}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .block-button:hover{background-color:var(--selected-color)}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .block-button svg{width:16px;height:16px;color:#909090}.drag-image-container{position:fixed;z-index:100;box-shadow:0 3px 20px #00000026;background-color:#fff;opacity:.4}.drag-image-container.drag-placeholder{width:500px;height:200px;border:1px solid #dedede;border-radius:3px;background:#e8e8e8}.drag-image-container .drag-image{width:100%;display:none}.drag-image-container[data-status=loaded] .drag-image{display:block}.drag-image-container[data-status=loaded] .drag-loading{display:none}.editor-command-bar-root .editor-command-bar .command-item.menu-item{display:flex;align-items:center;flex:none}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles{padding:5px 10px;background-color:#fff}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section+.text-style-section{margin-top:5px}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section{display:flex;flex-wrap:wrap}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section .style-icon{width:24px;height:24px;padding:0;margin:0 5px 0 0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;outline:none;cursor:pointer;border-radius:3px;color:#606060}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section .style-icon:hover{background-color:var(--selected-color)}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section .style-icon.active{color:#338fe5}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-anchor[data-id=paste-special-button-anchor]{z-index:unset}[data-command-bar-id=paste-special-button] .editor-command-bar.toolbar{padding:0}[data-command-bar-id=paste-special-button] .editor-command-bar.toolbar .command-item[data-dropdown=true]{padding-left:5px;padding-right:5px}.editor-find-dialog{--popover-input-border: 1px solid #CFD6E1;--editor-find-dialog-input-container-border-color: #CFD6E1;--editor-find-dialog-input-container-bg-color: transparent;--editor-border-radius-big: 3px;--editor-color: #07142A;--button-black-text-color: #333;--editor-find-dialog-button-color: #333;--editor-find-dialog-icon-button-color: #333;--editor-find-dialog-button-border-bg-color: rgba(255, 255, 255, .56);--editor-find-dialog-input-placeholder-color: #b9bfc8;--editor-find-dialog-button-disabled-color: #ccc !important;--editor-find-dialog-button-hover-color: rgba(150, 150, 150, .2);--editor-find-dialog-button-border: solid 1px #ccc;box-sizing:border-box;width:400px;background-color:var(--editor-find-dialog-bg-color);border:var(--editor-find-dialog-border);border-radius:var(--editor-border-radius-big);display:flex;padding:8px 8px 0 16px;align-items:flex-start;font-size:14px;font-family:var(--editor-font-family)}.editor-find-dialog .editor-find-content{display:flex;flex-direction:column;flex-grow:1;font-family:inherit}.editor-find-dialog .editor-find-dialog-row{display:flex;margin-bottom:8px;align-items:center}.editor-find-dialog .editor-find-dialog-label{width:80px;flex-grow:0;flex-shrink:0;align-self:center}.editor-find-dialog .editor-find-dialog-input-container{border:var(--popover-input-border);border-color:var(--editor-find-dialog-input-container-border-color);background-color:var(--editor-find-dialog-input-container-bg-color);border-radius:var(--editor-border-radius-big);flex-grow:1;display:flex;padding:2px;align-items:center;height:32px;box-sizing:border-box}.editor-find-dialog .editor-find-dialog-input{border:none;flex-grow:1;width:80px;outline:none;background-color:transparent;color:var(--editor-color)}.editor-find-dialog .editor-find-dialog-input::placeholder{color:var(--editor-find-dialog-input-placeholder-color);opacity:1}.editor-find-dialog .editor-find-dialog-prev{width:24px}.editor-find-dialog .editor-find-dialog-curr{flex-grow:0;text-align:center;flex-shrink:1;display:flex;align-items:center;margin-bottom:2px}.editor-find-dialog .editor-find-dialog-next{width:24px}.editor-find-dialog .editor-find-dialog-icon-button{cursor:pointer;border-radius:4px;color:var(--editor-find-dialog-icon-button-color);background-color:var(--editor-find-dialog-button-border-bg-color);border:none;display:flex;padding:0}.editor-find-dialog .editor-find-dialog-button{padding:6px 16px;cursor:pointer;border-radius:4px;color:var(--editor-find-dialog-button-color);background-color:var(--editor-find-dialog-button-border-bg-color);margin:0 4px;border:none;font-family:inherit;line-height:21px}.editor-find-dialog .editor-find-dialog-button.icon-button{width:32px;height:32px}.editor-find-dialog .editor-find-dialog-button.active,.editor-find-dialog .editor-find-dialog-button:hover{background-color:var(--editor-find-dialog-button-hover-color)}.editor-find-dialog .editor-find-dialog-button:disabled{color:var(--editor-find-dialog-button-disabled-color);cursor:default}.editor-find-dialog .editor-find-dialog-button:disabled:hover{background-color:transparent}.editor-find-dialog .editor-find-dialog-button svg{fill:currentColor}.editor-find-dialog .editor-find-dialog-space{flex-grow:1}.editor-find-dialog .editor-find-dialog-icon-button-border{margin:0 0 0 8px;cursor:pointer;border-radius:4px;color:var(--button-black-text-color);border:var(--editor-find-dialog-button-border);background-color:var(--editor-find-dialog-button-border-bg-color);padding:0;width:32px;display:flex;justify-content:center;align-items:center}.editor-find-dialog .editor-find-dialog-button-close{margin:0 0 0 8px;cursor:pointer;border-radius:4px;color:var(--button-black-text-color);background-color:var(--editor-find-dialog-button-border-bg-color);border:none;padding:0;width:32px;height:32px;display:flex;justify-content:center;align-items:center}.editor-find-dialog .editor-find-dialog-icon-button-border svg,.editor-find-dialog .editor-find-dialog-button-close svg{fill:currentColor}.editor-find-dialog .editor-highlight{opacity:.6;pointer-events:none}.editor-find-dialog .editor-highlight .editor-highlight-child{position:absolute;background-color:bisque}.editor-find-dialog .editor-highlight.active .editor-highlight-child{position:absolute;background-color:tomato}.editor-find-dialog .editor-search-result-highlight{opacity:.6;pointer-events:none}.editor-find-dialog .editor-search-result-highlight .editor-highlight-child{position:absolute;background-color:#40e0d0}.editor-find-dialog .editor-find-dialog-status{display:flex}.editor-highlight{opacity:.6;pointer-events:none}.editor-highlight .editor-highlight-child{position:absolute;background-color:bisque}.editor-highlight.active .editor-highlight-child{position:absolute;background-color:tomato}.editor-search-result-highlight{opacity:.6;pointer-events:none}.editor-search-result-highlight .editor-highlight-child{position:absolute;background-color:#40e0d0}.editor-find-dialog-status{display:flex}.comment-editor{font-size:14px;border:1px solid #c7c7c7;border-radius:3px;padding:1px 10px;margin:6px 10px 0}.comment-editor:after{content:"";height:0;display:block;clear:both}.comment-editor-root{display:inline-block;min-width:calc(100% - 40px);padding-top:2px}.comment-editor-root .editor-root .editor-content{padding:0}.comment-editor-img{float:right;color:#c1c1c1;padding:0}.comment-editor-root:not(.comment-editor-readonly) .editor-root .editor-content [data-type=editor-block]:not([data-block-type=text]){width:248px}.comment-editor-editing{border:1px solid #338fe5}.comment-editor-readonly{border:none;padding-left:37px;margin:0}.comment-editor-readonly .comment-editor-img{display:none}.comment-item-root{position:relative;margin-top:10px}.comment-item-root:not(.last-comment-item):before{content:" ";display:block;position:absolute;left:20px;width:1px;background-color:var(--editor-border-color, #e8e8e8);overflow:hidden;opacity:.8;top:21px;bottom:-12px;transform:scaleX(.5)}.comment-item-root .item-head{padding:0 10px;position:relative;display:flex;align-items:center}.comment-item-root .item-head-avatar{margin-right:5px;width:var(--editor-comment-avatar-width, 21px);height:var(--editor-comment-avatar-width, 21px);border-radius:100%}.comment-item-root .item-head-username{font-size:var(--editor-comment-username-font-size, 12px);color:var(--editor-comment-username-color, #07142a);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.comment-item-root .item-head-modified{margin-left:8px;font-size:12px;color:var(--editor-comment-modified-color, #808080);flex-grow:1;white-space:nowrap}.comment-item-root .item-head-tools{display:flex;align-items:center;visibility:hidden}.comment-item-root .item-head-tools .editor-text-button svg{width:20px;height:20px}.comment-item-root .item-head-tools.active{visibility:visible}.comment-item-root .item-actions{margin-top:10px;display:flex;justify-content:flex-end}.comment-item-root .item-actions.hidden{display:none}.comment-item-root .item-actions .editor-button[data-button-id=comment-item-cancel]{color:#606060;background:transparent;border:1px solid #c7c7c7}.comment-item-root .item-actions .editor-button[data-button-id=comment-item-cancel]:hover{color:#303030;background:#eee;border:1px solid #c7c7c7}.comment-item-root .item-actions .editor-button.disabled[data-button-id=comment-item-ok]{color:#fff;background-color:#338fe580;cursor:default}.comment-item-root:hover:not(.comment-item-editing) .item-head-tools{visibility:visible}.comment-item-root.readonly .item-head-tools{display:none}.mobile-comment-item{margin-top:4px;background-color:var(--editor-comment-layer-bg-color);padding-bottom:20px;color:var(--editor-comment-username-color)}.mobile-comment-item .item-head{padding:12px;display:flex;align-items:center}.mobile-comment-item .item-head-avatar{width:var(--editor-comment-avatar-size);height:var(--editor-comment-avatar-size);flex-grow:0}.mobile-comment-item .item-head-username{margin-left:12px}.mobile-comment-item .item-head-modified{margin-left:12px;color:#999}.mobile-comment-item .item-editor .comment-editor-readonly{padding-left:18px}.mini-comment-item{position:relative;line-height:16px;width:20px;height:16px;text-align:center;font-size:12px;border-radius:1px;background-color:var(--editor-comment-active-color, #FFC328);color:var(--editor-comment-mini-text-color, #ffffff);cursor:pointer}.mini-comment-item:after{content:"";position:absolute;left:50%;bottom:-4px;width:6px;height:6px;background-color:var(--editor-comment-active-color, #FFC328);border-radius:1px;transform:matrix(.71,.61,.82,-.71,0,0) translate(-50%);z-index:-1}.comment-quick-reply .quick-reply-button{position:absolute;left:8px;bottom:3px;z-index:2;color:var(--editor-comment-quick-reply-color, #7084A4);font-size:12px}.comment-quick-reply .quick-reply-button.editor-text-button:hover{color:var(--text-button-color-hover, #5587F0);background-color:var(--text-button-bg-color-hover, transparent)}.comment-quick-reply .quick-reply-editor{display:none}.comment-quick-reply .quick-reply-editor .reply-editor-actions{display:flex;justify-content:flex-end;margin-top:10px}.comment-quick-reply .quick-reply-editor .reply-editor-actions .editor-button[data-button-id=quick-reply-cancel]{color:#606060;background:transparent;border:1px solid #c7c7c7}.comment-quick-reply .quick-reply-editor .reply-editor-actions .editor-button[data-button-id=quick-reply-cancel]:hover{color:#303030;background:#eee;border:1px solid #c7c7c7}.comment-quick-reply .quick-reply-editor .reply-editor-actions .editor-button.disabled[data-button-id=quick-reply-ok]{color:#fff;background-color:#338fe580;cursor:default}.comment-quick-reply.hidden,.comment-quick-reply.reply-editor-editing .quick-reply-button{display:none}.comment-quick-reply.reply-editor-editing .quick-reply-editor{display:block}:root{--editor-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Robot, "Helvetica Neue", Helvetica, Arial, sans-serif;--editor-comment-layer-bg-color:#ffffff;--editor-comment-group-bg-color: #ffffff;--comment-root-border-color: #eaeaea;--editor-comment-layer-active-border-color: #cecece;--editor-box-shadow: 0px 3px 20px rgba(0, 0, 0, .15);--wiz-editor-z-comment-group-active-top-before: 29;--editor-comment-quote-color: #909090;--editor-comment-quote-before-bg-color: #909090;--editor-comment-switch-button-width: 12px;--editor-comment-active-color: #FFC328;--editor-bg-color: #ffffff;--wiz-editor-z-comment-head:11;--text-button-color-hover:#5587f0;--editor-comment-username-color:#07142A;--editor-comment-avatar-size: 32px}.disabled-scroll{overflow:hidden}.editor-root .editor-content div[data-type=editor-block].text-block.comment{box-shadow:none}.editor-root .editor-content div[data-type=editor-block].text-block.comment>div[data-type=block-content]>span{border-bottom:2px solid #f8e6ab}.editor-root .editor-content div[data-type=editor-block].text-block.comment.active{box-shadow:none;outline:none}.editor-root .editor-content div[data-type=editor-block].text-block.comment.active>div[data-type=block-content] span{background-color:#f8e6ab}.editor-root .editor-content div[data-type=editor-block] span.text.comment{border-bottom:2px solid #f8e6ab}.editor-root .editor-content div[data-type=editor-block] span.text.comment.active{background-color:#faf1d1}.editor-root .editor-content div[data-type=editor-block].comment{box-shadow:0 2px #f8e6ab}.editor-root .editor-content div[data-type=editor-block].comment.active{box-shadow:none;outline:4px solid #f8e6ab}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-comment-button{all:unset;position:absolute;right:-28px;top:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center;padding:0;border-radius:3px;color:#07142a;cursor:pointer}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-comment-button:hover{background:#eaeaea}.editor-web-comment-root{position:absolute;right:0;width:300px;top:0;bottom:0;transition:width .16s ease-in;will-change:width;font-family:var(--editor-font-family)}.editor-web-comment-root .comment-groups-container .comment-group-item-root{position:absolute;left:50%;right:0;width:290px;transform:translate(-50%);background-color:var(--editor-comment-group-bg-color);border-radius:2px;border-color:var(--editor-comment-layer-active-border-color);box-shadow:var(--editor-box-shadow);padding-bottom:18px}.editor-web-comment-root .comment-groups-container .comment-group-item-root:not(.no-animation){transition:top .2s ease-in,opacity .35s ease-in}.editor-web-comment-root .comment-groups-container .comment-group-item-root:before{content:"";position:absolute;left:0;right:0;height:6px;background-color:#fff;border-radius:2px 2px 0 0;z-index:var(--wiz-editor-z-comment-group-active-top-before)}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head{display:flex;align-items:center}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-quote{box-sizing:content-box;font-size:12px;line-height:12px;height:12px;color:var(--editor-comment-quote-color);padding:18px 12px 10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;width:100%;max-width:calc(100% - 80px)}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-quote:before{content:"";display:block;width:2px;height:100%;background-color:var(--editor-comment-quote-before-bg-color);margin-right:6px;float:left;border-radius:10px}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch{display:flex;align-items:center;height:22px;padding-top:6px;visibility:hidden}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button{padding:0;width:var(--editor-comment-switch-button-width);margin:3px 0;color:#606060}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button[data-button-id=switch-up]{margin-right:16px}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button:not(.disabled):hover{color:var(--text-button-color-hover)}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch .editor-text-button.disabled{color:#60606080;cursor:not-allowed}.editor-web-comment-root .comment-groups-container .comment-group-item-root.active:before{background-color:var(--editor-comment-active-color)}.editor-web-comment-root .comment-groups-container .comment-group-item-root.active .item-head-switch{visibility:visible}.editor-web-comment-root .comment-groups-container .comment-group-item-root.readonly .comment-quick-reply{display:none}.editor-mobile-comments-root{position:fixed;left:0;right:0;bottom:0;top:0;overflow:hidden;z-index:11}.editor-mobile-comments-root .mobile-comment-mask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:#00000073}.editor-mobile-comments-root .mobile-comment-groups-container{position:absolute;width:100%;height:100vh;z-index:1;overflow:hidden}.editor-mobile-comments-root .mobile-comment-groups-container .mobile-comment-groups-scroll-container{padding:0 12px}.editor-mobile-comments-root .mobile-comment-pull-info-container{position:absolute;right:0;left:0;bottom:100px;z-index:2;text-align:center;display:none}.editor-mobile-comments-root .mobile-comment-pull-info-container .mobile-comment-pull-info{display:inline-block;padding:12px;border-radius:36px;margin:0 auto;background-color:#000c;color:#fff;font-size:12px;opacity:0;transition:opacity .25s cubic-bezier(.65,.05,.36,1)}.editor-mobile-comments-root .mobile-comment-pull-info-container.active{display:block}.editor-mobile-comments-root .mobile-comment-pull-info-container.active .mobile-comment-pull-info{opacity:1}.editor-mobile-comments-root .mobile-group-item-root{margin:0 auto;width:100%;height:100vh;overflow:hidden}.editor-mobile-comments-root .mobile-group-item-root .mobile-group-item{min-height:calc(100vh + 1px);padding-bottom:50px}.editor-mobile-comments-root .mobile-group-item-root .mobile-group-item-space{height:50vh}.editor-mobile-comments-root .mobile-group-item-root .mobile-group-item-abstract{background-color:var(--editor-comment-layer-bg-color);padding:12px;color:#999;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.editor-mini-comment-root{position:absolute;right:0;top:0;bottom:0;width:48px;border-left:1px solid #f0f0f0;transition:width .16s ease-in;will-change:width;font-family:var(--editor-font-family);border:none;background-color:transparent;z-index:11}.editor-mini-comment-root .comment-groups-container{width:100%;height:100%}.editor-mini-comment-root .comment-groups-container .mini-group-item{position:absolute;top:0;left:50%;margin-left:-10px;transition:top .2s cubic-bezier(.65,.05,.36,1)}:is(.editor-web-comment-root,.editor-mobile-comments-root,.editor-mini-comment-root).hidden{display:none}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] [data-box-type=file] span[data-type=box-content]{margin:0}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] [data-box-type=file] span[data-type=box-content] span.file-icon{display:inline-flex;vertical-align:text-bottom}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] [data-box-type=file] span[data-type=box-content] .file-name{color:var(--primary-color);padding:0;border-radius:12px;margin-right:4px;white-space:wrap;word-break:break-all;cursor:pointer}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office]{justify-content:start}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office].hover [data-type=block-content]{border-radius:3px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content]{max-width:360px;min-width:360px;height:48px;cursor:pointer}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root{display:flex;align-items:center;min-width:360px;max-width:100%;background-color:#f5f6f7;border-radius:3px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root:before{border-radius:3px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-details{display:flex;flex-direction:column;justify-content:center;font-size:14px;flex-grow:1}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-details .file-name{color:#1f2329;max-width:185px;display:flex;flex-direction:row;align-items:center;white-space:nowrap}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-details .file-size{color:#646a73;font-size:12px;margin-top:2px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-details .file-name-pre{text-overflow:ellipsis;overflow:hidden}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-actions button{width:34px;height:34px;background-color:#fff;border:1px solid #dee0e3;border-radius:50%;margin:0 8px;padding:0;background-repeat:no-repeat;background-position:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-actions button svg{width:16px;height:16px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-icon{display:flex;width:36px;height:36px;margin:6px 6px 6px 12px}div.editor-root div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content] .card-root .file-icon>svg{width:100%;height:100%}div[data-type=editor-block].block-exclusive:after{content:attr(data-exclusive-tips);position:absolute;top:0px;left:0px;width:100%;background:#f8f8f8;border-radius:var(--editor-border-radius);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:14px;line-height:22px;color:#909090;text-align:center;padding:9px 0}:root{--editor-version-button-border: black;--editor-bg-color: #ffffff;--editor-version-list-bg-color: white;--editor-version-select-bg-color: #F8F8F8}.version-dialog{display:flex;background-color:var(--editor-bg-color);width:100%;height:100%;color:var(--editor-color)}.version-dialog *{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;box-sizing:border-box}.version-dialog .version-viewer{flex:1;display:flex;flex-direction:column;width:0;padding:0}.version-dialog .version-viewer .version-dialog-editor{flex-grow:1;overflow-y:auto}.version-dialog .version-viewer .version-info-container{height:50px;border-bottom:#E8E8E8 1px solid;display:flex;align-items:center;flex-shrink:0;padding-left:20px;font-size:14px;color:#303030}.version-dialog .version-viewer .version-info-container .version-info-left .text-1{color:#909090}.version-dialog .version-viewer .version-info-container .version-info-left .name{font-weight:500}.version-dialog .version-viewer .version-info-container .editor-dropdown{margin-left:10px;margin-right:10px}.version-dialog .version-viewer .version-info-container .command-item[data-id=current-version]{min-width:200px;border:1px solid #f0f0f0}.version-dialog .version-viewer .version-info-container .command-item[data-id=current-version] .toolbar-item-name-container{flex-grow:1}.version-dialog .version-viewer .dialog-button-text{margin-top:1px;margin-left:-4px}.version-dialog .version-viewer .dialog-text-button{outline:none;background:transparent;border:none;display:flex;align-items:center;color:var(--editor-color);font-size:16px;font-weight:500;padding:4px 0;cursor:pointer}.version-dialog .version-viewer .dialog-text-button .dialog-button-icon{margin-right:0;width:24px;height:24px}.version-dialog .version-viewer .dialog-text-button .dialog-button-icon svg{fill:currentColor}.editor-root.history .root-container .editor-block .text-element .inline-plugin.editor-box-loading{display:none}.editor-root.history .editor-content{padding:30px 75px}.editor-root.history .history-inserted-block[data-type=editor-block]:not(.table-block,.list-block,.text-block) [data-type=block-content]{border:4px solid var(--op-selected-color)}.editor-root.history .history-inserted-block[data-type=editor-block]:not(.table-block,.list-block,.text-block){position:relative}.editor-root.history .history-inserted-block[data-type=editor-block]:not(.table-block,.list-block,.text-block):hover:after{content:attr(data-op-description);position:absolute;top:-26px;left:0;line-height:24px;background-color:var(--op-color);min-width:20px;opacity:1;color:#fff;padding:0 8px;z-index:var(--wiz-editor-z-history-op-description, 10);font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history .history-inserted-block[data-type=editor-block].table-block table{border:4px solid var(--op-selected-color)}.editor-root.history .history-inserted-block[data-type=editor-block].table-block table .child{pointer-events:none}.editor-root.history .history-inserted-block[data-type=editor-block].table-block{position:relative}.editor-root.history .history-inserted-block[data-type=editor-block].table-block:hover:after{content:attr(data-op-description);position:absolute;top:-26px;left:0;line-height:24px;background-color:var(--op-color);min-width:20px;opacity:1;color:#fff;padding:0 8px;z-index:var(--wiz-editor-z-history-op-description, 10);font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history .history-inserted-block[data-type=editor-block].table-block:hover:after{top:0}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block) [data-type=block-content]{border:4px solid var(--op-selected-color)}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block) [data-type=block-content]{position:relative}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block) [data-type=block-content]:after,.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block) [data-type=block-content]:before{content:" ";position:absolute;display:flex;z-index:var(--wiz-editor-z-history-delete-marker);color:var(--op-color);justify-items:center;align-items:center;justify-content:center;align-content:center;pointer-events:none;overflow:visible;max-width:100%;max-height:100%;left:calc(50% - 16px);top:calc(50% - 2px);width:32px;height:4px;background-color:var(--op-color);transform:rotate(45deg);opacity:1}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block) [data-type=block-content]:before{transform:rotate(135deg)}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block){position:relative}.editor-root.history .history-deleted-block[data-type=editor-block]:is(.code-block,.table-block,.embed-block):hover:after{content:attr(data-op-description);position:absolute;top:-26px;left:0;line-height:24px;background-color:var(--op-color);min-width:20px;opacity:1;color:#fff;padding:0 8px;z-index:var(--wiz-editor-z-history-op-description, 10);font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history .history-inserted-text{line-height:revert!important;background-color:var(--op-selected-color)}.editor-root.history .history-inserted-text{position:relative}.editor-root.history .history-inserted-text:hover:after{content:attr(data-op-description);position:absolute;top:-26px;left:0;line-height:24px;background-color:var(--op-color);min-width:20px;opacity:1;color:#fff;padding:0 8px;z-index:var(--wiz-editor-z-history-op-description, 10);font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history .history-deleted-box{background-color:var(--op-selected-color);text-decoration:line-through}.editor-root.history .history-deleted-box{position:relative}.editor-root.history .history-deleted-box:hover:after{content:attr(data-op-description);position:absolute;top:-26px;left:0;line-height:24px;background-color:var(--op-color);min-width:20px;opacity:1;color:#fff;padding:0 8px;z-index:var(--wiz-editor-z-history-op-description, 10);font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history [data-box-type=history-deleted-box]>span[data-type=box-content]{border:none!important;margin:0!important}.editor-root.history [data-type=editor-block].table-block div[data-type=block-content]{overflow-x:revert}.editor-dialog-root{position:absolute;left:0;top:0;bottom:0;right:0;background-color:#639;z-index:100}.size-limit-textarea{display:inline-block;position:relative}.size-limit-textarea .size-limit-textarea-input{width:100%;resize:none;overflow:hidden;color:#303030;outline:none;border:1px solid #f0f0f0;border-radius:3px}.size-limit-textarea .size-limit-textarea-input:focus,.size-limit-textarea .size-limit-textarea-input:hover{border-color:#338fe5}.size-limit-textarea .size-limit-textarea-input:focus{box-shadow:0 0 0 2px #338fe533}.size-limit-textarea .size-limit-textarea-warning{position:absolute;right:0;bottom:10px;color:#909090;z-index:1;font-size:12px;pointer-events:none}.version-list-root{width:320px;background:var(--editor-version-list-bg-color);overflow-y:auto;padding:0;border-left:#E8E8E8 1px solid;display:flex;flex-direction:column}.version-list-root .version-list-header{padding:0 20px;font-size:14px;display:flex;align-items:center;margin-top:8px;margin-bottom:8px;flex-shrink:0;color:#909090}.version-list-root .version-list-header .version-count{flex-grow:1}.version-list-root .version-list-empty{height:100%;display:flex;align-items:center;justify-content:center;font-size:14px;color:#909090}.version-list-root .version-list-content{flex-grow:1;overflow-y:auto}.version-list-root .version-list-content .version-item{padding:15px 10px;cursor:pointer}.version-list-root .version-list-content .version-item.child{padding-left:32px}.version-list-root .version-list-content .version-item:not(.active):hover{background:rgba(112,132,164,.1)}.version-list-root .version-list-content .version-item.active{background-color:var(--editor-version-select-bg-color)}.version-list-root .version-list-content .version-item.active .version-item-title .version-actions{display:flex}.version-list-root .version-list-content .version-item.editing .version-item-memo{display:none}.version-list-root .version-list-content .version-item.active .version-item-memo{cursor:text}.version-list-root .version-list-content .version-item.active .version-item-memo:hover{outline:1px solid #338FE5}.version-list-root .version-list-content .version-item .version-item-restore-from{color:#909090;font-size:12px;line-height:1.5em;height:20px;padding:0 10px 10px}.version-list-root .version-list-content .version-item .version-item-restore-from:empty{display:none}.version-list-root .version-list-content .version-item .memo-input.size-limit-textarea{width:100%;min-height:60px}.version-list-root .version-list-content .version-item .memo-input.size-limit-textarea textarea{padding:5px 10px 10px;box-sizing:border-box;font-size:14px;border:none}.version-list-root .version-list-content .version-item .version-item-title{display:flex;align-items:center;padding-bottom:10px;padding-left:10px;padding-right:10px;height:24px}.version-list-root .version-list-content .version-item .version-item-title .version-item-date{font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.version-list-root .version-list-content .version-item .version-item-title .spacer{flex-grow:1}.version-list-root .version-list-content .version-item .version-item-title .version-actions{display:none}.version-list-root .version-list-content .version-item .version-item-title .version-actions button{display:flex;align-items:center;justify-content:center;height:16px;cursor:pointer;border:none;outline:none;background:transparent;padding:0 0 0 5px;color:#909090}.version-list-root .version-list-content .version-item .version-item-title .version-actions button:hover{color:#338fe5}.version-list-root .version-list-content .version-item .version-item-title .version-actions .revert-button{border-left:1px solid #E8E8E8;margin-left:5px}.version-list-root .version-list-content .version-item .version-item-latest{color:#338fe5;background-color:#eaf3fc;height:20px;padding:0 5px;border-radius:3px;display:flex;align-items:center;font-size:12px;margin-left:10px}.version-list-root .version-list-content .version-item .version-item-authors{list-style:none;margin:0;font-size:12px;padding-left:10px}.version-list-root .version-list-content .version-item .version-item-author{display:flex;align-items:center;margin-top:10px;color:#606060}.version-list-root .version-list-content .version-item .version-item-author-mark{width:6px;height:6px;border-radius:3px;margin-right:5px}.version-list-root .version-list-content .version-item .version-item-memo{font-size:14px;color:#303030;padding:5px 10px 10px;border-radius:3px}.version-list-root .version-list-content .version-item .version-item-memo:empty{display:none}.versions-dropdown-header{color:var(--text-color);height:44px;display:flex;align-items:center;padding-left:10px;border-bottom:1px solid #f0f0f0}.versions-dropdown-header .versions-dropdown-header-info{height:16px;color:#909090}.versions-dropdown-header .versions-dropdown-header-icon{height:16px;padding-left:5px;cursor:pointer}.editor-command-bar.menu .command-item.standard[data-id=prev-version]{height:44px}[data-command-bar-id=versions-dropdown-popup]{width:320px}[data-command-bar-id=versions-dropdown-popup] .tippy-box{color:var(--text-color)}[data-command-bar-id=versions-dropdown-popup] *{box-sizing:border-box}[data-command-bar-id=versions-dropdown-popup] .editor-command-bar-header{width:100%;margin-bottom:5px}[data-command-bar-id=versions-dropdown-popup] .command-item{width:100%;cursor:pointer}[data-command-bar-id=versions-dropdown-popup] .command-item .version-item-container{padding:6px 10px;width:100%}[data-command-bar-id=versions-dropdown-popup] .command-item .version-item-container .version-item-memo{font-size:12px;color:#909090;line-height:20px}[data-command-bar-id=versions-dropdown-popup] .command-item .version-item-container .version-item-line1{line-height:22px;display:flex;align-items:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}[data-command-bar-id=versions-dropdown-popup] .command-item .version-item-container .version-item-line1 .version-item-latest{color:#338fe5;background-color:#eaf3fc;height:20px;padding:0 5px;margin-left:10px;border-radius:3px}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=no-versions]{height:34px;color:#909090;padding-left:10px;justify-content:center}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator]{width:100%;box-sizing:border-box}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator] .filter-memoed-version-item{width:100%}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator] .filter-memoed-version-item .filter-item-info{height:24px;color:#909090;display:flex;align-items:center;padding-left:10px;background-color:#f8f8f8;width:100%;box-sizing:border-box;margin:5px 0}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator] .filter-memoed-version-item .filter-item-input-container{height:44px;display:flex;align-items:center;padding-left:10px;color:#303030}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator] .filter-memoed-version-item .filter-item-input-container .filter-item-input{cursor:pointer;accent-color:#338FE5}[data-command-bar-id=versions-dropdown-popup] .command-item[data-id=filter-separator] .filter-memoed-version-item .filter-item-input-container .filter-item-label{user-select:none;cursor:pointer;line-height:1em}.editor-root.readonly .editor-content div[data-type=editor-block].focused div[data-type=block-tools] .block-helper .heading-marker,.editor-root.readonly .editor-content div[data-type=editor-block].highlighted div[data-type=block-tools] .block-helper .heading-marker{display:flex}.editor-root .editor-content div[data-type=editor-block].heading-collapsed div[data-type=block-tools] .block-helper .heading-collapse-button svg{transform:rotate(270deg)}.editor-root .editor-content div[data-type=editor-block].focused div[data-type=block-tools] .block-helper .heading-marker,.editor-root .editor-content div[data-type=editor-block].highlighted div[data-type=block-tools] .block-helper .heading-marker{display:none}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-marker,.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-collapse-button{width:24px;height:24px;cursor:grab;margin:0;padding:0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;border-radius:3px}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-marker:hover,.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-collapse-button:hover{background-color:var(--selected-color)}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-marker svg,.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-collapse-button svg{transform:rotate(360deg);transition:transform .2s linear}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-marker svg,.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-collapse-button svg{width:16px;height:16px}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .heading-marker:hover{background-color:transparent}.embed-block div[data-type=block-content] .editor-toc-container{display:block;width:100%;background-color:#f0f0f0;padding:20px}.embed-block div[data-type=block-content] .editor-toc-container.loading{margin:0;min-height:100px}.embed-block div[data-type=block-content] .editor-toc-container .toc-node+.toc-node{margin-top:10px}.embed-block div[data-type=block-content] .editor-toc-container .toc-node .toc-text{cursor:pointer;color:var(--primary-color)}.embed-block div[data-type=block-content] .editor-toc-container .toc-node .toc-children{margin-top:10px;padding-left:20px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] [data-box-type=mention] span[data-type=box-content]{margin:0}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content] [data-box-type=mention] span[data-type=box-content] .mention-name{color:var(--primary-color);padding:0;border-radius:12px;margin-left:4px;margin-right:4px;white-space:wrap;word-break:break-all;cursor:pointer}[data-command-bar-id=editor-mention] .editor-command-bar.menu .command-item.menu-item .menu-item-icon{width:20px;height:20px;border-radius:50%;overflow:hidden}[data-command-bar-id=editor-mention] .editor-command-bar.menu .command-item.menu-item .menu-item-icon img{width:100%;height:100%}[data-command-bar-id=editor-mention] .editor-command-bar.menu .command-item.menu-item .menu-item-name{flex-grow:0;margin-right:5px}.editor-root .editor-templates{position:fixed;bottom:26px;height:256px;width:auto;max-width:100%;padding-left:30px;padding-right:44px;overflow:hidden}.editor-root .editor-templates .editor-templates-title{color:#909090;font-size:14px;margin-left:0;margin-bottom:20px;line-height:19.6px}.editor-root .editor-templates .editor-templates-cards{display:flex;margin-left:0}.editor-root .editor-templates .editor-templates-cards .editor-template-card{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;cursor:pointer;flex-shrink:0;height:192px;width:188px;background:none;border:1px solid #e8e8e8;border-radius:3px;margin:0 0 0 15px;padding:0;align-items:revert}.editor-root .editor-templates .editor-templates-cards .editor-template-card:first-child{margin-left:0}.editor-root .editor-templates .editor-templates-cards .editor-template-card:hover{box-shadow:0 0 1px #30303033,0 8px 16px #30303026}.editor-root .editor-templates .editor-templates-cards .editor-template-card:hover>.editor-template-name{color:#338fe5}.editor-root .editor-templates .editor-templates-cards .editor-template-card .editor-template-name{display:flex;align-items:center;height:40px;width:100%;border-top:1px solid #dedede;padding-left:20px;padding-right:20px;flex:0 0 50px;font-size:14px;font-weight:500;line-height:22px;color:#303030}.editor-root .editor-templates .editor-templates-cards .editor-template-card .editor-template-name span{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.editor-root .editor-templates .editor-templates-cards .editor-template-card.more .editor-template-name{border-top:none}.editor-root .editor-templates .editor-templates-cards .editor-template-card.more .editor-template-name span{padding-left:0;text-align:center}.editor-root .editor-templates .editor-templates-cards .editor-template-card.more .editor-template-thumb-container{display:flex;align-items:center;justify-content:center;padding:16px 39px 14px}.editor-root .editor-templates .editor-templates-cards .editor-template-card.more .editor-template-thumb-container>img{width:110px;height:112px;max-width:revert}.editor-root .editor-templates .editor-templates-cards .editor-template-card .editor-template-thumb-container{flex:1;position:relative;padding:10px 5px 0;height:142px;margin:0;overflow:revert}.editor-root .editor-templates .editor-templates-cards .editor-template-card .editor-template-thumb-container>img{max-width:100%}.editor-dialog-container{min-width:500px;position:relative;left:-9px}.editor-dialog-container .dialog-header{display:flex;justify-content:space-between;align-items:center;padding:0 20px;border-bottom:1px solid #e8e8e8}.editor-dialog-container .dialog-header .close-icon{cursor:pointer}.editor-dialog-container .dialog-header .dialog-header-title{padding:8px 0 11px;font-size:18px;font-weight:700;flex-grow:1}.editor-dialog-container .dialog-content{padding:20px;border-bottom:1px solid #e8e8e8}.editor-dialog-container .dialog-footer{margin:10px 0 5px;padding:0 20px;text-align:right}.editor-dialog-container .dialog-footer button{min-width:58px;min-height:30px;padding:0 10px;border-radius:3px;background-color:#eef3f8;font-size:14px;color:#fff;cursor:pointer}.editor-dialog-container .dialog-footer .cancel-button{margin:0 8px 0 0;background-color:transparent;border:1px solid #c7c7c7;color:#606060}.editor-dialog-container .dialog-footer .cancel-button:hover{color:#303030;background:#eee;border:1px solid #c7c7c7}.editor-dialog-container .dialog-footer .submit-button{outline:none;background-color:#338fe5;color:#fff;border:0}.editor-dialog-container .dialog-footer .submit-button:hover{background-color:#5ca5ea}.embed-block[data-embed-type=webpage]{height:400px;min-height:100px;max-height:1000px}.embed-block[data-embed-type=webpage] .webpage-mask{position:absolute;left:0;right:0;top:0;bottom:0;z-index:1;background-color:transparent}.embed-block[data-embed-type=webpage].resizing [data-type=block-tools] .block-resizer{pointer-events:all!important}.embed-block[data-embed-type=webpage].hover>div[data-type=block-content]{outline:none!important}.embed-block[data-embed-type=webpage].selected>div[data-type=block-content]{outline:none!important}.embed-block[data-embed-type=webpage]>div[data-type=block-content]{justify-content:center;height:100%}.embed-block[data-embed-type=webpage]>div[data-type=block-content]>.editor-embed{width:100%}.embed-block[data-embed-type=webpage]>div[data-type=block-content]>.editor-embed .editor-preview-iframe{width:100%;max-height:500px;height:100%;border:none;position:relative}.embed-block[data-embed-type=webpage]>div[data-type=block-content]>.editor-embed .editor-preview-iframe-loading{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:center;align-items:center;background-color:#fff}.webpage-content .help-container{color:#303030;border:1px solid #dedede;padding:10px;border-radius:4px;border-left:4px solid #338fe5;margin-top:16px;margin-bottom:16px}.webpage-content .help-container .help-content{display:flex;align-items:center}.webpage-content .help-container .help-content .help-icon{display:flex;align-items:center;height:20px;color:#338fe5;margin-right:12px}.webpage-content .help-link-container{margin-top:8px;display:flex;align-items:center}.webpage-content .help-link-container .help-link-content{display:flex;align-items:center;color:#338fe5;text-decoration:none}.webpage-content .help-link-container .help-link-content .help-link-icon{width:16px;height:16px;margin-left:8px}div.editor-root div.editor-content div[data-type=editor-container].root.select-all>.container-blocks>div[data-type=editor-block][data-embed-type=webpage]>div[data-type=block-content]:before{display:block}:root{--editor-quoted-color: #7084a4;--editor-drawio-empty-svg: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zOC43MjAzIDI4LjcwOTdIMjUuOTIzM0MyNS4yMTY1IDI4LjcwOTcgMjQuNjQzNSAyOC4xNDgxIDI0LjY0MzUgMjcuNDU1MlYyNS43MzMzSDIwLjUyODNDMjAuNDk4NiAyNS43Njk2IDIwLjQ2NjkgMjUuODA0MiAyMC40MzMzIDI1LjgzN0wxNS45MTkyIDMwLjI2MjFWMzQuNzU1NkgyNC42NDM1VjMzLjcyNzZDMjQuNjQzNSAzMy4wMzQ4IDI1LjIxNjUgMzIuNDczMiAyNS45MjMzIDMyLjQ3MzJIMzguNzIwM0MzOS40MjcgMzIuNDczMiA0MCAzMy4wMzQ4IDQwIDMzLjcyNzZWMzguNzQ1NUM0MCAzOS40MzgzIDM5LjQ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IMzcuNDQwNlYyMy42OTE4SDI3LjIwM1YyNi4yMDA4WiIgZmlsbD0iIzA3MTQyQSIvPgo8L3N2Zz4K)}.flex-center,.editor-drawio-iframe-container.loading:before,.embed-block .editor-empty-drawio.editor-drawio-content.editor-embed:after,.embed-block .editor-empty-drawio.editor-drawio-content.editor-embed:before{display:flex;align-items:center;justify-content:center}.full-screen,.editor-drawio-iframe-container.loading:before,.drawio-iframe-element,.editor-drawio-iframe-container{width:100%;height:100%}.editor-drawio-iframe-container{position:fixed;top:0;left:0;z-index:1000}div[data-type=editor-block].embed-block[data-embed-type=drawio]>div[data-type=block-content]{outline:1px solid #DEDEDE}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block[data-embed-type=drawio]>div[data-type=block-content]{justify-content:center;border-radius:3px;padding:10px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block[data-embed-type=drawio]>div[data-type=block-content] .editor-drawio-content{text-align:center}.embed-block .editor-empty-drawio.editor-drawio-content.editor-embed{width:240px;height:80px;display:inline-block;text-align:center}.embed-block .editor-empty-drawio.editor-drawio-content.editor-embed:before{background-image:var(--editor-drawio-empty-svg);position:absolute;content:" ";color:var(--editor-quoted-color);top:8px;left:calc(50% - 24px);width:48px;height:48px}.embed-block .editor-empty-drawio.editor-drawio-content.editor-embed:after{position:absolute;content:attr(data-empty-drawio-content);color:var(--editor-quoted-color);bottom:0;left:0;width:100%;height:32px;top:50%}div.editor-root div.editor-content div[data-type=editor-container] div[data-embed-type=drawio].embed-block>div[data-type=block-content] img{max-width:100%;max-height:100%;width:100%;height:100%}.editor-drawio-iframe-container.loading:before{content:attr(data-placeholder);position:absolute;top:0;left:0;background-color:#f7f6f3;z-index:2}.editor-content .editing{background-color:#cdcdcd40}.editor-content div[data-type=block-tools] .embed-code-editor-container{position:absolute;top:0;left:0px;right:0px;bottom:0;background-color:#cdcdcd40;z-index:var(--wiz-editor-z-embed-code-editor-mask);padding:8px}.editor-content div[data-type=block-tools] .embed-code-editor-container textarea{width:100%;height:100%;resize:none;outline:none;padding:12px;border:1px solid #b9bfc8;border-radius:4px;background-color:#fff;color:#333}.flex-row-center,.embed-block div[data-type=block-content] .graph-embed,div[data-embed-type=mermaid] div[data-type=block-content] .graph-embed,div[data-embed-type=flowchart] div[data-type=block-content] .graph-embed,div[data-embed-type=plantuml] div[data-type=block-content] .graph-embed,.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block div[data-type=block-content] .empty-embed:after,div[data-embed-type=mermaid] div[data-type=block-content] .empty-embed:after,div[data-embed-type=flowchart] div[data-type=block-content] .empty-embed:after,div[data-embed-type=plantuml] div[data-type=block-content] .empty-embed:after,.embed-block,div[data-embed-type=mermaid],div[data-embed-type=flowchart],div[data-embed-type=plantuml]{display:flex;flex-direction:row;align-items:center;justify-content:center}.embed-block div[data-type=block-content],div[data-embed-type=mermaid] div[data-type=block-content],.embed-block div[data-type=block-content],div[data-embed-type=flowchart] div[data-type=block-content],.embed-block div[data-type=block-content],div[data-embed-type=plantuml] div[data-type=block-content]{width:100%;position:relative}.embed-block div[data-type=block-content] .empty-embed,div[data-embed-type=mermaid] div[data-type=block-content] .empty-embed,.embed-block div[data-type=block-content] .empty-embed,div[data-embed-type=flowchart] div[data-type=block-content] .empty-embed,.embed-block div[data-type=block-content] .empty-embed,div[data-embed-type=plantuml] div[data-type=block-content] .empty-embed{width:100%;min-height:106px;background-color:#cdcdcd40}.embed-block div[data-type=block-content] .empty-embed:after,div[data-embed-type=mermaid] div[data-type=block-content] .empty-embed:after,.embed-block div[data-type=block-content] .empty-embed:after,div[data-embed-type=flowchart] div[data-type=block-content] .empty-embed:after,.embed-block div[data-type=block-content] .empty-embed:after,div[data-embed-type=plantuml] div[data-type=block-content] .empty-embed:after{content:attr(data-empty-tips);position:absolute;top:0;right:0;width:100%;height:100%;color:#07142a;white-space:nowrap}.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed),div[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed){width:100%;height:100px}.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed) img,div[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed) img,.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed) img,div[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed) img,.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed) img,div[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed) img{display:none}.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed):after,div[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed):after,.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed):after,div[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed):after,.embed-block div[data-type=block-content] .invalid-code:not(.empty-embed):after,div[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed):after{content:attr(data-invalid-text);position:absolute;top:0;right:0;width:100%;height:100%;outline:1px solid red;display:flex;flex-direction:row;align-items:center;justify-content:center;color:red}.embed-block div[data-type=block-content] .embed-img-content,div[data-embed-type=mermaid] div[data-type=block-content] .embed-img-content,.embed-block div[data-type=block-content] .embed-img-content,div[data-embed-type=flowchart] div[data-type=block-content] .embed-img-content,.embed-block div[data-type=block-content] .embed-img-content,div[data-embed-type=plantuml] div[data-type=block-content] .embed-img-content{width:100%;text-align:center}.embed-block div[data-type=block-content] .mermaid-embed-img,div[data-embed-type=mermaid] div[data-type=block-content] .mermaid-embed-img,.embed-block div[data-type=block-content] .mermaid-embed-img,div[data-embed-type=flowchart] div[data-type=block-content] .mermaid-embed-img,.embed-block div[data-type=block-content] .mermaid-embed-img,div[data-embed-type=plantuml] div[data-type=block-content] .mermaid-embed-img{max-width:100%;min-width:200px}.embed-block div[data-type=block-content] .editor-plantuml-img,div[data-embed-type=mermaid] div[data-type=block-content] .editor-plantuml-img,.embed-block div[data-type=block-content] .editor-plantuml-img,div[data-embed-type=flowchart] div[data-type=block-content] .editor-plantuml-img,.embed-block div[data-type=block-content] .editor-plantuml-img,div[data-embed-type=plantuml] div[data-type=block-content] .editor-plantuml-img{max-width:100%}.embed-block div[data-type=block-content] .embed-graph-img-content,div[data-embed-type=mermaid] div[data-type=block-content] .embed-graph-img-content,.embed-block div[data-type=block-content] .embed-graph-img-content,div[data-embed-type=flowchart] div[data-type=block-content] .embed-graph-img-content,.embed-block div[data-type=block-content] .embed-graph-img-content,div[data-embed-type=plantuml] div[data-type=block-content] .embed-graph-img-content{width:100%;text-align:center;padding:10px}.embed-block div[data-type=block-content] .embed-graph-img-content img,div[data-embed-type=mermaid] div[data-type=block-content] .embed-graph-img-content img,.embed-block div[data-type=block-content] .embed-graph-img-content img,div[data-embed-type=flowchart] div[data-type=block-content] .embed-graph-img-content img,.embed-block div[data-type=block-content] .embed-graph-img-content img,div[data-embed-type=plantuml] div[data-type=block-content] .embed-graph-img-content img{max-width:100%}.embed-block div[data-type=block-content] .graph-embed,div[data-embed-type=mermaid] div[data-type=block-content] .graph-embed,.embed-block div[data-type=block-content] .graph-embed,div[data-embed-type=flowchart] div[data-type=block-content] .graph-embed,.embed-block div[data-type=block-content] .graph-embed,div[data-embed-type=plantuml] div[data-type=block-content] .graph-embed{width:100%}.hr-transition,.embed-block div[data-type=block-content] .editor-embed-container .editor-embed-hr{transition:border-top ease-in-out .4s}.embed-block div[data-type=block-content] .editor-embed-container{display:flex;align-items:center;width:100%}.embed-block div[data-type=block-content] .editor-embed-container .editor-embed-hr{display:block;width:100%;border:none;margin:0;border-top:2px dashed #cccccc;cursor:pointer}.embed-block:is(.focused) div[data-type=block-content] .editor-embed-container .editor-embed-hr{caret-color:transparent}.embed-block[data-type=editor-block][data-embed-type=hr]>div[data-type=block-content] .editor-embed-container{height:30px}.embed-block[data-type=editor-block][data-embed-type=hr].hover>div[data-type=block-content]{outline:none!important}.embed-block[data-type=editor-block][data-embed-type=hr].selected>div[data-type=block-content]{outline:none!important}:root{--hover-color: #40a9ff}.flex-column-center,.embed-block[data-embed-type=video]>div[data-type=block-content] .media-empty,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-empty,.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error{display:flex;justify-content:center;align-items:center;flex-flow:column}.common{width:400px;height:180px;background-color:#fafafa;border:1px dashed #d9d9d9;border-radius:2px;transition:border-color .3s}.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-empty,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error{height:200px}.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-empty .media-error-icon,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error .media-error-icon{display:flex}.editor-root .editor-content div[data-type=editor-block].embed-block.media-block-uploading div[data-type=block-tools] .block-helper{display:none}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-empty,.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error{height:400px}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-empty .media-error-icon,.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error .media-error-icon{display:flex}.embed-block[data-embed-type=video].locked-by-self>[data-type=block-content]:after,.embed-block[data-embed-type=video].locked-by-others>[data-type=block-content]:after,.embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content]:after,.embed-block[data-embed-type=audio].locked-by-others>[data-type=block-content]:after{display:none}.embed-block[data-embed-type=video].locked-by-self>[data-type=block-content] .media,.embed-block[data-embed-type=video].locked-by-others>[data-type=block-content] .media,.embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content] .media,.embed-block[data-embed-type=audio].locked-by-others>[data-type=block-content] .media{position:relative}.embed-block[data-embed-type=video].locked-by-self>[data-type=block-content] .media:after,.embed-block[data-embed-type=video].locked-by-others>[data-type=block-content] .media:after,.embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content] .media:after,.embed-block[data-embed-type=audio].locked-by-others>[data-type=block-content] .media:after{content:" ";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:1;background-color:#303030;opacity:.1}.embed-block[data-embed-type=video].hover>div[data-type=block-content],.embed-block[data-embed-type=audio].hover>div[data-type=block-content]{outline:none!important}.embed-block[data-embed-type=video].selected>div[data-type=block-content]:before,.embed-block[data-embed-type=audio].selected>div[data-type=block-content]:before{display:none}.embed-block[data-embed-type=video]>div[data-type=block-content],.embed-block[data-embed-type=audio]>div[data-type=block-content]{justify-content:center;max-width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media.full-screen,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media.full-screen{width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media{display:flex;justify-content:center}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress{position:relative;max-width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress audio,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress audio{display:block;width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress video,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress video{display:block;max-width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress .uploading-progress-mask,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress .uploading-progress-mask{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#303030;opacity:.8;display:flex;align-items:center;justify-content:center}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress .uploading-progress-mask .uploading-progress-bar,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress .uploading-progress-mask .uploading-progress-bar{width:75%;height:6px;border-radius:3px;display:flex;background-color:#fff;overflow:hidden}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-progress .uploading-progress-mask .uploading-progress-bar .uploading-progress-bar-value,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-progress .uploading-progress-mask .uploading-progress-bar .uploading-progress-bar-value{background-color:#338fe5}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error{width:100%;background:#F8F8F8;outline:1px solid #DEDEDE;border-radius:3px}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error-icon svg,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error-icon svg{width:48px;height:48px;color:#c7c7c7}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error .line-1,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error .line-1{margin-top:10px;font-size:18px;text-align:center;color:#303030}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error .line-2,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error .line-2{margin-top:5px;font-size:14px;text-align:center;color:#606060}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-error .retry-upload,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-error .retry-upload{margin-left:4px;color:#338fe5;cursor:pointer;text-decoration:none}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-empty,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-empty{width:100%;background:#FFFFFF;outline:1px solid #DEDEDE;border-radius:3px}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-empty svg,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-empty svg{width:48px;height:48px;color:#c7c7c7}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-element,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-element{width:100%;display:flex;justify-content:center}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-element .video-container video,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-element .video-container video{display:block;min-width:50px;max-width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-element .audio-container,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-element .audio-container{width:100%}.embed-block[data-embed-type=video]>div[data-type=block-content] .media-element .audio-container audio,.embed-block[data-embed-type=audio]>div[data-type=block-content] .media-element .audio-container audio{display:block;width:100%}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=video].comment,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=audio].comment{box-shadow:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=video].comment .media,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=audio].comment .media{box-shadow:0 2px #f8e6ab}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=video].comment.active,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=audio].comment.active{outline:none}.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=video].comment.active .media,.editor-root div.editor-content div[data-type=editor-container] .embed-block[data-type=editor-block][data-embed-type=audio].comment.active .media{box-shadow:none;outline:4px solid #f8e6ab}`)),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
2
  (function(g,xt){typeof exports=="object"&&typeof module<"u"?xt(exports,require("kiwi-intl"),require("lodash.merge"),require("string-template"),require("nanoid"),require("events"),require("query-string"),require("js-base64"),require("snabbdom"),require("lodash.clonedeep"),require("lodash.isequal"),require("quill-delta"),require("tiny-typed-emitter"),require("lodash.intersection"),require("ot-json1"),require("axios"),require("lodash.findlastindex"),require("reconnecting-websocket"),require("fast-sha256"),require("lodash.debounce"),require("tippy.js"),require("blueimp-md5"),require("css-color-converter"),require("markmap-view"),require("lodash.throttle"),require("prismjs"),require("prismjs/components/prism-c"),require("prismjs/components/prism-cpp"),require("prismjs/components/prism-abap"),require("prismjs/components/prism-arduino"),require("prismjs/components/prism-bash"),require("prismjs/components/prism-basic"),require("prismjs/components/prism-clojure"),require("prismjs/components/prism-coffeescript"),require("prismjs/components/prism-csharp"),require("prismjs/components/prism-css"),require("prismjs/components/prism-dart"),require("prismjs/components/prism-diff"),require("prismjs/components/prism-docker"),require("prismjs/components/prism-elixir"),require("prismjs/components/prism-elm"),require("prismjs/components/prism-erlang"),require("prismjs/components/prism-flow"),require("prismjs/components/prism-fortran"),require("prismjs/components/prism-fsharp"),require("prismjs/components/prism-gherkin"),require("prismjs/components/prism-glsl"),require("prismjs/components/prism-go"),require("prismjs/components/prism-graphql"),require("prismjs/components/prism-groovy"),require("prismjs/components/prism-haskell"),require("prismjs/components/prism-java"),require("prismjs/components/prism-javascript"),require("prismjs/components/prism-json"),require("prismjs/components/prism-julia"),require("prismjs/components/prism-kotlin"),require("prismjs/components/prism-latex"),require("prismjs/components/prism-less"),require("prismjs/components/prism-lisp"),require("prismjs/components/prism-livescript"),require("prismjs/components/prism-lua"),require("prismjs/components/prism-makefile"),require("prismjs/components/prism-markdown"),require("prismjs/components/prism-markup"),require("prismjs/components/prism-matlab"),require("prismjs/components/prism-mermaid"),require("prismjs/components/prism-nix"),require("prismjs/components/prism-objectivec"),require("prismjs/components/prism-ocaml"),require("prismjs/components/prism-pascal"),require("prismjs/components/prism-perl"),require("prismjs/components/prism-php"),require("prismjs/components/prism-powershell"),require("prismjs/components/prism-prolog"),require("prismjs/components/prism-protobuf"),require("prismjs/components/prism-python"),require("prismjs/components/prism-r"),require("prismjs/components/prism-reason"),require("prismjs/components/prism-ruby"),require("prismjs/components/prism-rust"),require("prismjs/components/prism-sass"),require("prismjs/components/prism-scala"),require("prismjs/components/prism-scheme"),require("prismjs/components/prism-scss"),require("prismjs/components/prism-solidity"),require("prismjs/components/prism-sql"),require("prismjs/components/prism-swift"),require("prismjs/components/prism-typescript"),require("prismjs/components/prism-vbnet"),require("prismjs/components/prism-verilog"),require("prismjs/components/prism-vhdl"),require("prismjs/components/prism-visual-basic"),require("prismjs/components/prism-wasm"),require("prismjs/components/prism-yaml"),require("mime-db"),require("dom-to-image"),require("@guyplusplus/turndown-plugin-gfm"),require("turndown"),require("marked"),require("@better-scroll/core"),require("plantuml-encoder"),require("docx")):typeof define=="function"&&define.amd?define(["exports","kiwi-intl","lodash.merge","string-template","nanoid","events","query-string","js-base64","snabbdom","lodash.clonedeep","lodash.isequal","quill-delta","tiny-typed-emitter","lodash.intersection","ot-json1","axios","lodash.findlastindex","reconnecting-websocket","fast-sha256","lodash.debounce","tippy.js","blueimp-md5","css-color-converter","markmap-view","lodash.throttle","prismjs","prismjs/components/prism-c","prismjs/components/prism-cpp","prismjs/components/prism-abap","prismjs/components/prism-arduino","prismjs/components/prism-bash","prismjs/components/prism-basic","prismjs/components/prism-clojure","prismjs/components/prism-coffeescript","prismjs/components/prism-csharp","prismjs/components/prism-css","prismjs/components/prism-dart","prismjs/components/prism-diff","prismjs/components/prism-docker","prismjs/components/prism-elixir","prismjs/components/prism-elm","prismjs/components/prism-erlang","prismjs/components/prism-flow","prismjs/components/prism-fortran","prismjs/components/prism-fsharp","prismjs/components/prism-gherkin","prismjs/components/prism-glsl","prismjs/components/prism-go","prismjs/components/prism-graphql","prismjs/components/prism-groovy","prismjs/components/prism-haskell","prismjs/components/prism-java","prismjs/components/prism-javascript","prismjs/components/prism-json","prismjs/components/prism-julia","prismjs/components/prism-kotlin","prismjs/components/prism-latex","prismjs/components/prism-less","prismjs/components/prism-lisp","prismjs/components/prism-livescript","prismjs/components/prism-lua","prismjs/components/prism-makefile","prismjs/components/prism-markdown","prismjs/components/prism-markup","prismjs/components/prism-matlab","prismjs/components/prism-mermaid","prismjs/components/prism-nix","prismjs/components/prism-objectivec","prismjs/components/prism-ocaml","prismjs/components/prism-pascal","prismjs/components/prism-perl","prismjs/components/prism-php","prismjs/components/prism-powershell","prismjs/components/prism-prolog","prismjs/components/prism-protobuf","prismjs/components/prism-python","prismjs/components/prism-r","prismjs/components/prism-reason","prismjs/components/prism-ruby","prismjs/components/prism-rust","prismjs/components/prism-sass","prismjs/components/prism-scala","prismjs/components/prism-scheme","prismjs/components/prism-scss","prismjs/components/prism-solidity","prismjs/components/prism-sql","prismjs/components/prism-swift","prismjs/components/prism-typescript","prismjs/components/prism-vbnet","prismjs/components/prism-verilog","prismjs/components/prism-vhdl","prismjs/components/prism-visual-basic","prismjs/components/prism-wasm","prismjs/components/prism-yaml","mime-db","dom-to-image","@guyplusplus/turndown-plugin-gfm","turndown","marked","@better-scroll/core","plantuml-encoder","docx"],xt):(g=typeof globalThis<"u"?globalThis:g||self,xt(g["oneseditor-editor"]={},g.KiwiIntl,g.merge,g.stringFormat,g.nanoid$1,g.events,g.queryString,g.jsBase64,g.snabbdom,g.cloneDeep,g.isEqual,g.Delta,g.tinyTypedEmitter,g.intersection,g.json1,g.axios,g.findLastIndex,g.ReconnectingWebSocket,g.sha256,g.debounce,g.tippy$1,g.md5,g.cssColorConverter,g.markmap,g.throttle,g.Prism,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,g.mime,g.domToImage,g.turndownPluginGfm,g.TurndownService,g.marked,g.BetterScroll,g.plantumlEncoder,g.docx))})(this,function(g,xt,Uo,r8,i8,um,s8,Ni,ao,l8,c8,a8,Ve,u8,d8,h8,f8,m8,g8,p8,su,C8,lu,A8,b8,v8,vU,yU,kU,wU,BU,EU,IU,xU,TU,SU,DU,LU,MU,RU,OU,PU,NU,FU,$U,_U,HU,jU,zU,UU,VU,qU,WU,GU,ZU,QU,YU,JU,KU,XU,eV,tV,nV,oV,rV,iV,sV,lV,cV,aV,uV,dV,hV,fV,mV,gV,pV,CV,AV,bV,vV,yV,kV,wV,BV,EV,IV,xV,TV,SV,DV,LV,MV,RV,y8,k8,w8,B8,dm,E8,I8,Y){"use strict";var AU=Object.defineProperty;var bU=(g,xt,Uo)=>xt in g?AU(g,xt,{enumerable:!0,configurable:!0,writable:!0,value:Uo}):g[xt]=Uo;var h=(g,xt,Uo)=>(bU(g,typeof xt!="symbol"?xt+"":xt,Uo),Uo);const Pe=n=>n&&typeof n=="object"&&"default"in n?n:{default:n};function kl(n){if(n&&n.__esModule)return n;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const x8=Pe(xt),cu=Pe(Uo),T8=Pe(r8),hm=Pe(um),Q=Pe(l8),Fi=Pe(c8),ct=Pe(a8),au=Pe(u8),wl=kl(d8),S8=Pe(h8),D8=Pe(f8),L8=Pe(m8),M8=kl(g8),nt=Pe(p8),R8=Pe(su),O8=kl(su),Bl=Pe(C8),P8=kl(A8),N8=Pe(b8),$i=Pe(v8),uu=Pe(y8),fm=Pe(k8),F8=Pe(B8),mm=Pe(E8),$8=Pe(I8);function _8(n){const e=o=>o<10?`0${String(o)}`:String(o),t=o=>o<10?`00${String(o)}`:o<100?`0${String(o)}`:String(o);return`${n.getFullYear()}-${e(n.getMonth()+1)}-${e(n.getDate())} ${e(n.getHours())}:${e(n.getMinutes())}:${e(n.getSeconds())}.${t(n.getMilliseconds())}`}var _i=(n=>(n.DEBUG="DEBUG",n.INFO="INFO ",n.WARN="WARN ",n.ERROR="ERROR",n))(_i||{});const gm=new Map,Ti=class{constructor(e){h(this,"times",new Map);this.category=e}shouldLog(e){const t=Object.values(_i).indexOf(e),o=Object.values(_i).indexOf(Ti.level);return t>=o}_log(e,t,o,r){var b;if(!this.shouldLog(e))return;const i=typeof process>"u"?{}:process;let s="";if(typeof t=="object")try{s="message"in t?t.message:JSON.stringify(t,null,4)}catch{s=""}else typeof t=="string"?t&&(s=t):s=JSON.stringify(t);s=r?`${s} - ${r}`:s;const l=`${this.category}`;let c=console.log;e==="WARN "&&(c=console.warn),e==="ERROR"&&(c=console.error);const a=`${_8(new Date)}`,u=e,f=l,m=Ti.extParams?"[{date}] {level}: [{module} {extParams}] - {msg}":"[{date}] {level}: [{module}] - {msg}",p=[T8.default(((b=i.env)==null?void 0:b.LOG_TEMPLATE)||m,{date:a,level:u,module:f,msg:s,extParams:Ti.extParams})];if(typeof t=="object"){const k=t.stack;k&&p.push(k)}if(c===console.error&&Ti.debugMode){const k=new Error().stack;k&&p.push(k)}c(...p),o&&this._log(e,o)}log(e,t){this._log("INFO ",e,void 0,t)}debug(e,t){this._log("DEBUG",e,void 0,t)}info(e,t){this._log("INFO ",e,void 0,t)}warn(e,t,o){this._log("WARN ",e,t,o)}error(e,t,o){this._log("ERROR",e,t,o)}time(e){this.times.set(e,Date.now())}timeEnd(e){this.timeLog(e),this.times.delete(e)}timeLog(e){const t=this.times.get(e);if(!t){this.warn(`no time label: ${e}`);return}this.debug(`${e}: ${Date.now()-t}`)}static setExtParams(e){this.extParams=e}};let uo=Ti;h(uo,"debugMode",!1),h(uo,"level","DEBUG"),h(uo,"extParams","");function w(n){const e=gm.get(n);if(e)return e;const t=new uo(n);return gm.set(n,t),t}const H8={name:"Ones Editor",date:{dateFromFuture:"From future",dateJustNow:"Just now",dateYesterday:"Yesterday",dateMinutesAgo:"{num} minutes ago",date1HourAgo:"1 hour ago",dateHoursAgo:"{num} hours ago",dateDaysAgo:"{num} days ago",dateWeeksAgo:"{num} weeks ago"},common:{cancel:"cancel"}},j8={name:"Ones Editor",date:{dateFromFuture:"\u6765\u81EA\u672A\u6765",dateJustNow:"\u521A\u521A",dateYesterday:"\u6628\u5929",dateMinutesAgo:"{num}\u5206\u949F\u524D",date1HourAgo:"1\u5C0F\u65F6\u524D",dateHoursAgo:"{num}\u5C0F\u65F6\u524D",dateDaysAgo:"{num}\u5929\u524D",dateWeeksAgo:"{num}\u5468\u524D"},common:{cancel:"\u53D6\u6D88"}},z8={name:"Ones Editor",date:{dateFromFuture:"\u672A\u6765\u304B\u3089",dateJustNow:"\u305F\u3060\u4ECA",dateYesterday:"\u6628\u65E5",dateMinutesAgo:"{num}\u5206\u524D",date1HourAgo:"1\u6642\u9593\u524D",dateHoursAgo:"{num}\u6642\u9593\u524D",dateDaysAgo:"{num}\u65E5\u524D",dateWeeksAgo:"{num}\u9031\u524D"},common:{cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB"}},U8=w("i18n"),V8={"en-US":H8,"zh-CN":j8,"ja-JP":z8},El=x8.default.init("en-US",V8);function q8(n=void 0){El.setLang&&El.setLang(n||"en-US")}function W8(n){cu.default(El.__metas__,n)}function G8(n,e){const t=El.get(n,e);return t===n&&U8.warn(`no locale value for key ${n}`),t}const I=Object.freeze(Object.defineProperty({__proto__:null,setLang:q8,mergeLang:W8,t:G8},Symbol.toStringTag,{value:"Module"})),OV="";class pm{constructor(e,t){this.editor=e,this.data=t}getData(){return this.data}getEditor(){return this.editor}destroy(){}}class Z8 extends Error{constructor(e){if(super(e),this.code="Assert",this.stack){const t=this.stack.split(`
3
3
  `);if(t.length>1)if(this.lineNumber&&this.columnNumber){const o=t[1].match(/(.*)@(.*):(\d+):(\d+)/);o&&(this.lineNumber=+o[3],this.columnNumber=+o[4],this.fileName=o[2]),t.splice(0,1)}else t.splice(1,1);this.stack=t.join(`
4
4
  `)}}}function d(n,e,t){if(!e)throw n.error(`assert failed: ${t}`),new Z8(t)}const Q8=i8.customAlphabet("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_",8),Cm="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Y8(){return Cm[Date.now()%Cm.length]}const F=()=>`${Y8()}${Q8()}`;class Am extends hm.default.EventEmitter{constructor(t=60){super();h(this,"cache",new Map);h(this,"expiredSeconds");this.expiredSeconds=t,this.startAutoClear()}delete(t){const o=this.cache.get(t);o&&this.emit("delete",o.data),this.cache.delete(t)}getSync(t,o){const r=this.cache.get(t),i=Date.now();if(r&&(i-r.lastRead)/1e3<this.expiredSeconds)return r.lastRead=i,r.data;const s=o(t);return this.cache.set(t,{lastRead:i,data:s}),s}async get(t,o){const r=this.cache.get(t),i=Date.now();if(r&&(i-r.lastRead)/1e3<this.expiredSeconds)return r.lastRead=i,r.data;const s=await o(t);return this.cache.set(t,{lastRead:i,data:s}),s}startAutoClear(){setInterval(()=>{const t=Date.now();Array.from(this.cache.entries()).forEach(([o,r])=>{(t-r.lastRead)/1e3>this.expiredSeconds&&this.delete(o)})},10*1e3)}}class Hi{constructor(){h(this,"_callbacks",new Set)}get callbacks(){return Array.from(this._callbacks)}registerCallback(e){this._callbacks.add(e)}unregisterCallback(e){this._callbacks.delete(e)}clearCallbacks(){this._callbacks.clear()}}const J8=w("await-locker");class K8{constructor(){h(this,"_acquired",!1);h(this,"_waitingResolvers",[]);this._acquired=!1,this._waitingResolvers=[]}acquireAsync(e){return this._acquired?new Promise((t,o)=>{this._waitingResolvers.push(t),e&&e>0&&setTimeout(()=>{const r=this._waitingResolvers.indexOf(t);if(r!==-1){this._waitingResolvers.splice(r,1);const i=new Error(`lock timeout: ${e}, waiting resolves: ${this._waitingResolvers.length}`);o(i)}},e)}):(this._acquired=!0,Promise.resolve())}tryAcquire(){return this._acquired?!1:(this._acquired=!0,!0)}release(){if(!this._acquired)throw new Error("Cannot release an unacquired lock");if(this._waitingResolvers.length>0){const e=this._waitingResolvers.shift();d(J8,e,"Resolver missing"),e(void 0)}else this._acquired=!1}acquired(){return this._acquired}debug(){const e=this._waitingResolvers.length;return console.log(`waiting resolves: ${e}`),{waitingCount:e}}}class X8{constructor(){h(this,"_map");this._map=new Map}getLocker(e){let t=this._map.get(e);return t||(t=new K8,this._map.set(e,t)),t}async lock(e,t){await this.getLocker(e).acquireAsync(t)}release(e){this.getLocker(e).release()}remove(e){this.isLocking(e)||this._map.delete(e)}isLocking(e){return this._map.has(e)?this.getLocker(e).acquired():!1}}const Zt=new X8;/**
@@ -342,35 +342,35 @@ xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
342
342
  <path d="M10.4751 5.5249L5.52535 10.4746" stroke="white" stroke-width="2"/>
343
343
  <path d="M10.4751 10.4751L5.52535 5.52535" stroke="white" stroke-width="2"/>
344
344
  </svg>
345
- `;function PB(n,e){var t,o;if(M(e,"menu-item"),!n.element){if(n.type==="section"){const r=A("div",["section-name"],null,n.name);e.appendChild(r)}else if(n.type!=="separator"){if(n.icon){const s=A("div",["menu-item-icon"],null);n.icon&&(s.innerHTML=n.icon),e.appendChild(s)}const r=A("div",["menu-item-name","text"],null),i=A("span",[],r,n.name);if(((t=n.states)==null?void 0:t.includes("disabled"))&&n.disableReason&&(i.setAttribute("data-editor-tooltip-offset-y","25"),i.setAttribute("data-editor-tooltip-maxwidth","800"),i.setAttribute("data-editor-tooltip-placement","right"),i.setAttribute("data-editor-tooltip-common",n.disableReason)),e.appendChild(r),n.subText&&A("div",["item-subtext","text"],e,n.subText),n.children&&!n.element){const s=A("div",["menu-item-sub-indicator"],null);s.innerHTML=k5,e.appendChild(s)}if((o=n.states)!=null&&o.includes("checked")){const s=A("div",["menu-item-checked-icon"],null);s.innerHTML=mB,e.appendChild(s)}}}}class fr extends Sc{constructor(e,t,o){super(e,t,{autoClose:!0,disablePageScroll:!0,...o})}manualShow(e,t){const o={theme:"menu",...t};super.manualShow(e,o)}initCommandBarElement(e){M(e,"menu")}initItemElement(e,t){PB(e,t)}}function NB(n,e,t){var o;return new fr((o=n.children)!=null?o:[],e,{...t,parentItem:n})}function M5(n,e,t){e.setAttribute("data-button-id",n.id),t.tooltipId&&n.name&&!n.disableTooltip&&(e.setAttribute(`data-editor-tooltip-${t.tooltipId}`,n.name),n.desc&&e.setAttribute(`data-editor-tooltip-desc-${t.tooltipId}`,n.desc));const o=e;if(!n.element)if(n.icon){const r=A("span",["toolbar-item-icon-container"],o);n.icon.trim().startsWith("<")?r.innerHTML=n.icon:r.innerText=n.icon}else{const r=A("span",["toolbar-item-name-container"],o);r.innerText=n.name}if(n.dropdown){e.setAttribute("data-dropdown","true");const r=A("span",["toolbar-item-dropdown-container"],o);r.innerHTML=Dc}n.states&&(n.states.indexOf("checked")!==-1&&M(o,"checked"),n.states.indexOf("disabled")!==-1&&(o.disabled=!0))}class Ds extends Sc{constructor(e,t,o){super(e,t,{itemElementTag:"button",tippyArrow:!1,...o})}getSubBarOptions(e){var r,i;const t=()=>{const s=this.getItemElementById(e.id),c=this.content.getBoundingClientRect(),a=s.getBoundingClientRect();return new DOMRect(a.left,c.top,a.width,c.height)};return{placement:(r=e.childrenPlacement)!=null?r:"top",getReferenceClientRect:t,offset:(i=e.childrenOffset)!=null?i:[0,4]}}manualShow(e,t){const o={theme:"toolbar",...t};super.manualShow(e,o)}initCommandBarElement(e){M(e,"toolbar")}initItemElement(e,t){M5(e,t,this.options)}}function FB(n,e,t){var o;return new Ds((o=n.children)!=null?o:[],e,{...t,parentItem:n})}class $B extends hr{constructor(e,t,o){super(t,void 0,o),e.appendChild(this.content),document.addEventListener("keydown",this.handleDocumentKeydown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}initCommandBarElement(e){M(e,"toolbar","fixed")}initItemElement(e,t){M5(e,t,this.options)}close(){this.clearSelectedItem(),this.subBar&&(this.subBar.close(),this.subBar=null)}destroy(){this.content.remove(),super.destroy(),document.removeEventListener("keydown",this.handleDocumentKeydown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}getCommandBarRoot(){return this.content.parentElement}get isVisible(){return!0}}const jV="";hr.registerManualCommandBar("menu",NB),hr.registerManualCommandBar("toolbar",FB);const zV="",R5=w("ui-base");class Ls extends Sc{constructor(t,o){super(Ls.getCommandItems(t,o),void 0,{disablePageScroll:!0,...o});h(this,"handleDocumentMouseDown",t=>{})}initCommandBarElement(t){M(t,"dialog","manual")}initItemElement(t,o){}show(t,o){this.manualShow(t,{...o,theme:"light"})}get dialogContent(){const t=this.items[0];d(R5,t,"no dialog item");const o=t.element;return d(R5,o,"no item element"),o}static getCommandItems(t,o){var s;return[{id:(s=o==null?void 0:o.id)!=null?s:`manual-dialog-${F()}`,name:"",element:t}]}}const UV="",_B=w("ui-base");class O5{constructor(e){h(this,"menu");h(this,"currentText","");h(this,"handleClick",(e,t)=>{this.options.onClickItem(this,t)});h(this,"handleShow",e=>{});h(this,"handleClose",()=>{var e,t;(t=(e=this.options).onClose)==null||t.call(e)});h(this,"handleKeydown",e=>{this.menu.handleDocumentKeydown(e)});this.options=e,this.menu=new fr([],void 0,{id:e.id,header:e.header}),this.menu.addListener("click",this.handleClick),this.menu.addListener("close",this.handleClose),this.menu.addListener("show",this.handleShow)}setItems(e){if(this.menu.updateItems(e),e.length>0){const t=e.find(o=>o.type!=="section"&&o.type!=="separator");t&&this.menu.selectItem(t.id)}}async popup(e,t){var r,i;if(!(t!=null&&t.noEvent)&&((i=(r=this.options).onShow)==null?void 0:i.call(r,this))===!1)return;this.menu.manualShow(e),this.options.placeholder&&this.showPlaceholder();const o=await this.options.queryItems(this,"");this.highlightText(""),this.setItems(o)}showLoading(){!this.options.showLoading||(this.options.loadingElement?this.setItems([{id:"loading",name:"",element:this.options.loadingElement,states:["disabled"]}]):this.setItems([{id:"loading",name:"loading",states:["disabled"]}]))}showPlaceholder(){this.setItems([{id:"placeholder",name:"enter text to search",states:["disabled"]}])}showNoResultMessage(e){if(this.options.noResultMessage){const t={name:"",id:"placeholder",states:["disabled"]};typeof this.options.noResultMessage=="string"?t.name=this.options.noResultMessage:(this.options.noResultMessage instanceof HTMLElement||typeof this.options.noResultMessage=="function")&&(t.element=this.options.noResultMessage),this.setItems([t])}else this.setItems([{id:"placeholder",name:I.t("search.emptyTips"),states:["disabled"]}])}close(){this.menu.close()}get isVisible(){return this.menu.isVisible}destroy(){this.menu.close(),this.menu.removeAllListeners(),this.menu.destroy()}async handleSearchText(e){this.currentText=e;const t="auto-suggest";try{await Zt.lock(t),this.showLoading();const o=this.currentText,r=await this.options.queryItems(this,o);if(this.currentText===o&&(this.currentText=""),r.length===0){this.showNoResultMessage(e);return}this.setItems(r),this.options.highlight&&this.highlightText(o.replace(/^\s+|\s+$/g,""))}finally{Zt.release(t)}}highlightText(e){_B.debug(`highlight menu text: ${e}`);const t=this.menu.content,o=(i,s)=>{if(!s)return i;let l="";const c=s.length,a=s.toLocaleLowerCase();let u=0;for(u=0;u<=i.length-c;u){let f=i.substring(u,u+c);if(f.toLocaleLowerCase()===a){u+=c;const m=i.charAt(u);let p=!1;f.endsWith(" ")&&(p=!0,f=f.trimEnd()),l+=`<span class="highlight">${f}${m===" "||p?"&nbsp":""}</span>`}else l+=i.charAt(u),u++}return u<i.length&&(l+=i.substring(u)),l},r=i=>{if(ne(i,"text")){const s=i.textContent;if(!s)return;const l=o(s,e);i.innerHTML=l;return}Array.from(i.children).forEach(r)};r(t)}}class Sh{constructor(e,t){h(this,"root");h(this,"input");h(this,"text");h(this,"dropdownIcon");h(this,"clearIcon");h(this,"autoSuggest");h(this,"labels");h(this,"items",[]);h(this,"handleClick",()=>{this.autoSuggest.popup(this.root),this.input.focus()});h(this,"handleClickItem",(e,t)=>{var o,r;(r=(o=this.options)==null?void 0:o.onClickItem)==null||r.call(o,t)});h(this,"handleInput",()=>{this.autoSuggest.handleSearchText(this.input.value),this.updatePlaceholder()});h(this,"handleClear",e=>{var t,o;this.clear(),this.autoSuggest.handleSearchText(""),e.preventDefault(),e.stopPropagation(),(o=(t=this.options)==null?void 0:t.onClear)==null||o.call(t)});h(this,"handleQueryItems",async(e,t)=>this.items.filter(r=>{var i;return(i=this.options)!=null&&i.filter?this.options.filter(r,t):!0}));h(this,"handleShow",()=>{M(this.root,"active"),this.input.focus()});h(this,"handleClose",()=>{var e,t;(t=(e=this.options)==null?void 0:e.onClose)==null||t.call(e),_(this.root,"active")});var c,a,u,f,m;this.options=t,this.labels=(a=(c=this.options)==null?void 0:c.labels)!=null?a:[];const{root:o,input:r,text:i,clearIcon:s,dropdownIcon:l}=Sh.createDropdown(e,this.labels);this.root=o,this.input=r,this.text=i,this.clearIcon=s,this.dropdownIcon=l,this.autoSuggest=new O5({id:(t==null?void 0:t.popupId)||"dropdown-auto-suggest",header:(u=this.options)==null?void 0:u.header,onClickItem:this.handleClickItem,queryItems:this.handleQueryItems,onClose:this.handleClose,onShow:this.handleShow}),this.items=(m=(f=this.options)==null?void 0:f.items)!=null?m:[],this.root.addEventListener("click",this.handleClick),this.input.addEventListener("input",this.handleInput),this.clearIcon.addEventListener("click",this.handleClear)}close(){this.autoSuggest.close()}destroy(){this.input.removeEventListener("input",this.handleInput),this.root.removeEventListener("click",this.handleClick),this.clearIcon.removeEventListener("click",this.handleClear),this.autoSuggest.destroy()}updateItems(e){this.items=e,this.autoSuggest.handleSearchText("")}setText(e){this.text.innerText=e,this.input.value=e,this.updatePlaceholder()}clear(){this.setText(""),this.setLabels([])}setLabels(e){this.labels=e,this.updateLabels()}static createDropdown(e,t){const o=A("div",["editor-dropdown","empty"],e),r=A("input",["dropdown-input"],o),i=A("div",["dropdown-text"],o),s=A("div",["dropdown-labels"],o);for(let a=0;a<t.length;a+=1){const u=t[a];A("span",["dropdown-label"],s,u)}const l=A("div",["dropdown-clear-icon"],o);l.innerHTML=OB;const c=A("div",["dropdown-icon"],o);return c.innerHTML=Dc,{root:o,input:r,text:i,clearIcon:l,dropdownIcon:c}}updateLabels(){const e=this.root.querySelector(".dropdown-labels");if(e){e.innerHTML="";for(let t=0;t<this.labels.length;t+=1){const o=this.labels[t];A("span",["dropdown-label"],e,o)}}}updatePlaceholder(){var e;if(this.input.value===""){const t=(e=this.options)==null?void 0:e.placeholder;t&&(this.input.placeholder=t,this.text.textContent=t),M(this.root,"empty")}else _(this.root,"empty")}}const HB=[-1,6,0,1,2,3,4,5],jB=[-1,6,0,1,2,3,4,5,14,13,7,8,9,10,11,12],P5=w("color-palette");function N5(n,e,t,o){d(P5,n>0,"no color in palette");const r=e||1;d(P5,r>0,`invalid palette rows: ${r}`);const i=n/r,s=A("div",["palette-container",o],null);for(let l=0;l<r;l++){const c=A("div",["palette-container-row"],s);for(let a=0;a<i;a++){const u=t(l*i+a);c.appendChild(u)}}return s}function zB(n){const e=A("button",["color-button"],null),t=HB[n];return e.setAttribute("data-color-index",`${t}`),e.innerHTML=y5,e}function UB(n){const e=A("button",["background-color-button"],null),t=jB[n];return e.setAttribute("data-color-index",`${t}`),e}function VB(){const n=A("div",["clear-button-container"],null),e=A("button",["clear-button"],n);return e.innerText=I.t("colorPalette.reset"),n}function qB(n){const e=A("div",["color-palette"],null);return n.color!==!1&&(A("div",["bar-desc"],e,I.t("colorPalette.colorDesc")),e.appendChild(N5(8,1,zB,"color"))),n.backgroundColor!==!1&&(A("div",["bar-desc"],e,I.t("colorPalette.backgroundDesc")),e.appendChild(N5(16,2,UB,"background-color"))),n.clearColorButton!==!1&&e.appendChild(VB()),e}function WB(n,e,t){const o=e==="color"?"color":"background-color",r=n.querySelector(`.${o} button.selected`);r&&_(r,"selected"),t===null&&(t=-1);const i=n.querySelector(`.${o} button[data-color-index="${t}"]`);i&&M(i,"selected")}const VV="",GB={};class ZB extends Ve.TypedEmitter{constructor(t=GB){super();h(this,"root");h(this,"handleClick",t=>{const o=t.target;if(!o||!(o instanceof Element))return;const r=o.closest("button");if(!r)return;if(ne(r,"clear-button")){this.setColor("backgroundColor",null),this.setColor("color",null),this.emit("onClick","clearColor",0);return}const i=r.getAttribute("data-color-index");if(!i)return;const s=Number.parseInt(i,10);Number.isNaN(s)||(ne(r,"color-button")?s===-1?(this.setColor("color",null),this.emit("onClick","clearColor",1)):(this.setColor("color",s),this.emit("onClick","color",s)):s===-1?(this.setColor("backgroundColor",null),this.emit("onClick","clearColor",2)):(this.setColor("backgroundColor",s),this.emit("onClick","backgroundColor",s)))});this.options=t,this.root=qB(t),this.root.addEventListener("click",this.handleClick)}destroy(){this.removeAllListeners(),this.root.removeEventListener("click",this.handleClick)}setColor(t,o){WB(this.root,t,o)}}class F5{constructor(e,t){h(this,"name","Color Palette");h(this,"element");h(this,"palette");h(this,"closeable",null);this.id=e,this.palette=new ZB(t),this.element=this.palette.root}setCloseable(e){this.closeable=e}destroy(){this.palette.destroy(),this.closeable=null}}function QB(){const n=A("button",["color-button"],null);return n.innerHTML=y5,n}function Dh(n,e){const[t,o]=e;t===null?n.removeAttribute("data-color"):n.setAttribute("data-color",`${t}`),o===null?n.removeAttribute("data-background-color"):n.setAttribute("data-background-color",`${o}`)}class YB extends Ve.TypedEmitter{constructor(t){super();h(this,"id","text-color-item");h(this,"name",I.t("colorPalette.name"));h(this,"dropdown",!0);h(this,"manualShowChildren",!0);h(this,"children",[]);h(this,"element");h(this,"colorPaletteItem");h(this,"latestColors",[null,null]);h(this,"handlePaletteClick",(t,o)=>{this.emit("onClick",t,o),t==="color"||t==="backgroundColor"?t==="color"?this.latestColors[0]=o:this.latestColors[1]=o:this.latestColors=[null,null],Dh(this.element,this.latestColors)});h(this,"beforePopup",()=>{this.emit("beforePopup")});this.editor=t,this.colorPaletteItem=new F5("text-color-palette-item"),this.colorPaletteItem.palette.addListener("onClick",this.handlePaletteClick),this.children.push(this.colorPaletteItem),this.element=QB()}destroy(){this.colorPaletteItem.destroy()}updatePaletteColor(t){this.colorPaletteItem.palette.setColor("color",t[0]),this.colorPaletteItem.palette.setColor("backgroundColor",t[1]),this.latestColors=t,Dh(this.element,this.latestColors)}updateButtonColor(t){this.latestColors=t,Dh(this.element,this.latestColors)}}const qV="";function Lh(n,e){const t=A("div",["editor-input-wrap"],n);e!=null&&e.className&&M(t,e==null?void 0:e.className);const o=A("div",["editor-input-label"],t);A("span",[],o,e.label),e.required&&M(o,"required");const r=A("div",["editor-input-container"],t),i=A("input",["editor-input"],r);e.placeholder&&(i.placeholder=e.placeholder),e.defaultValue&&(i.value=e.defaultValue);const s=A("div",["editor-input-error"],t);return i.addEventListener("input",l=>{var c;(c=e.onChange)==null||c.call(e,l),_(t,"error")}),i.addEventListener("keydown",l=>{var c;(c=e.onKeyDown)==null||c.call(e,l)}),{getField:()=>i,getInputValue:()=>i.value,setFieldError:l=>{M(t,"error"),s.innerText=l},focus:()=>{setTimeout(()=>{i.focus()})}}}function Mh(n){const e=document.getSelection();if(!e)return!0;const t=e.focusNode;if(!t)return!0;const o=e.focusOffset,r=t.childNodes[o];if(!r)return!0;if(r instanceof HTMLElement){const i=r.tagName.toLowerCase();if(r===n.input.inputElement)return!0;if(i==="input"||i==="textarea")return!1}return!0}class JB extends O5{constructor(t,o){super(o);h(this,"handleClose",()=>{var t,o;Mh(this.editor)&&this.editor.focus(),(o=(t=this.options).onClose)==null||o.call(t)});this.editor=t,this.editorOptions=o}async popupInEditor(t,o,r){var a,u;if(((u=(a=this.editorOptions).onShow)==null?void 0:u.call(a,this,t,o,r))===!1)return;this.options.showLoading&&this.showLoading();const i=this.editor.getBlockByIndex(t,o);if(!Ce(this.editor.rootContainer,i)||G(this.editor,i)<r)return;const s=ho(this.editor,i,Fe(this.editor,i,r));if(s.length===0)return;const l=s[0],c=go(this.editor,i,"editor-auto-suggest-menu",l);super.popup(c,{noEvent:!0})}}const Rh=w("auto-suggest-menu");class Oh{constructor(e,t){h(this,"menu");h(this,"anchor",null);h(this,"close",()=>{this.menu.close()});h(this,"handleSelectionChanged",e=>{var o,r;if(!((o=this.menu)!=null&&o.isVisible))return;const t=e.selection.range.start;if(t.isSimple()&&t.blockId===((r=this.anchor)==null?void 0:r.blockId)&&t.offset>=this.anchor.offset){const i=e.getBlockById(t.blockId);if(ve(kt(pt(e,i),t.offset).left).startsWith(this.anchor.leftText))return}this.menu.close()});h(this,"deleteTrigger",()=>{const e=this.editor,t=e.selection.range.start;if(!t.isSimple()||!this.anchor)return!1;const{blockId:o,offset:r}=t,i=e.getBlockById(o),s=ve(tc(e,i,r));if(d(Rh,this.anchor,"no anchor"),!s.startsWith(this.anchor.leftText))return!1;const l=this.anchor.offset-this.anchor.trigger.length,c=r-l;return e.selection.selectBlock(i,l),c&&(e.deleteTextFromBlock(i,l,c),this.anchor.offset-=this.anchor.trigger.length),this.anchor.trigger.length||this.menu.close(),!0});h(this,"onClose",()=>{var e,t;(t=(e=this.options).onClose)==null||t.call(e)});h(this,"onShow",(e,t,o,r)=>{var i;if((i=this.options)!=null&&i.onShow)return this.options.onShow(this,t,o,r)});h(this,"onClickItem",(e,t)=>{!this.anchor||(this.options.autoDeleteTrigger&&this.deleteTrigger(),this.options.onClickItem(this,t,this.anchor))});h(this,"queryItems",(e,t)=>this.options.queryItems(this,t));h(this,"renderMenuItem",(e,t)=>{var r,i;return(i=(r=this.options).renderMenuItem)==null?void 0:i.call(r,this,t)});this.editor=e,this.options=t,this.menu=new JB(e,{id:t.id,showLoading:t.showLoading,loadingElement:t.loadingElement,placeholder:t.placeholder,noResultMessage:t.noResultMessage,highlight:t.highlight,onClose:this.onClose,onShow:this.onShow,onClickItem:this.onClickItem,queryItems:this.queryItems,renderMenuItem:this.renderMenuItem}),e.input.addHandler(this),e.addListener("selectionChanged",this.handleSelectionChanged)}handleBeforeKeyDown(e,t){var o;return!((o=this.menu)!=null&&o.isVisible)||yu(t.key)?!1:Hm(t)&&!Zo(t)?(setTimeout(()=>{this.resetItems()}),!1):ku(t)?(this.menu.close(),!0):(this.menu.handleKeydown(t),!0)}popup(e,t,o,r){this.anchor={blockId:j(e),offset:t,leftText:o,trigger:r};const i=q(H(e)),s=K(e);this.menu.popupInEditor(i,s,t)}handleAfterInsertText(e,t,o,r,i){var u;const s=e.selection.range.start;if(!s.isSimple()||!this.options.enableFirstBlock&&t==="root"&&o===0)return!1;const{blockId:l,offset:c}=s,a=e.getBlockByIndex(t,o);if(j(a)!==l)return!1;if((u=this.menu)!=null&&u.isVisible)this.resetItems();else if(this.options.trigger.indexOf(i)!==-1){if(r>0&&this.options.needSpaceBeforeTrigger&&e.getBlockString(a)[r-1]!==" ")return!1;const f=ve(tc(e,a,c));this.popup(a,c,f,i)}return!1}handleUpdateCompositionText(e,t,o,r,i){var a;const s=e.selection.range.start;if(!s.isSimple())return!1;const{blockId:l}=s,c=e.getBlockByIndex(t,o);return j(c)!==l||(a=this.menu)!=null&&a.isVisible&&this.resetItems(),!1}resetItems(){var l;if(!((l=this.menu)!=null&&l.isVisible))return;const e=this.editor,t=e.selection.range.start;if(!t.isSimple())return;const{blockId:o,offset:r}=t,i=e.getBlockById(o),s=ve(tc(e,i,r));if(d(Rh,this.anchor,"no anchor"),s.startsWith(this.anchor.leftText)){const c=s.substring(this.anchor.leftText.length);Rh.debug(`search text: ${c}`),this.menu.handleSearchText(c)}}destroy(){var e;this.editor.input.removeHandler(this),this.editor.removeListener("selectionChanged",this.handleSelectionChanged),(e=this.menu)==null||e.destroy()}}function KB(){const n={};for(let e=1;e<=8;e++)n[`heading-${e}`]={shortcut:`/h${e}`};return n}const XB={"insert-hr":{shortcut:"/hr"},"insert-uml":{shortcut:"/uml"},"insert-table":{shortcut:"/table"},"insert-image":{shortcut:"/image"},"insert-code":{shortcut:"/code"},"insert-link":{shortcut:"/link"},"insert-drawio":{shortcut:"/uml"},"insert-video":{shortcut:"/video"},"insert-audio":{shortcut:"/audio"},"insert-math":{shortcut:"/math"},"insert-webPage":{shortcut:"/web"},"insert-bilibili":{shortcut:"/bilibili"},"insert-youku":{shortcut:"/youku"},"insert-figma":{shortcut:"/figma"},"insert-modao":{shortcut:"/modao"},"insert-tencent":{shortcut:"/tencent"},"insert-unordered":{shortcut:"/bl"},"insert-ordered":{shortcut:"/nu"},"insert-checkbox":{shortcut:"/todo"},"insert-quote":{shortcut:"/quote"},...KB()};function At(n){var e;return(e=XB[n])==null?void 0:e.shortcut}function eE(n){var e;return(e=n.subText)!=null?e:""}const xn=w("table-dom");function Xn(n){return`${j(n)}_scroll`}function je(n){const e=n.querySelector("div[data-type=table-content] >table");return d(xn,e instanceof HTMLTableElement,"invalid table"),e}function Tn(n,e){const o=n.getCustom(Xn(e)).contentElement.firstElementChild;d(xn,o instanceof HTMLElement,"invalid table content");let r=o.querySelector(":scope >div[data-type=table-tools]");return r||(r=A("div",[],o),r.setAttribute("data-type","table-tools")),d(xn,r,"no table tools"),r}function tE(n,e){return n.findCustom(Xn(e))?Tn(n,e):null}function $5(n){const e=[];return Array.from(n.rows).forEach(t=>{e.push(...Array.from(t.cells))}),e}function Ms(n){const e=n.querySelector(":scope div[data-type=editor-container]");return d(xn,e,"no child container in cell"),e}function nE(n){const o=$5(n).map(r=>{const i=Ms(r),s=q(i),l=r.colSpan,c=r.rowSpan;return`${s}/${l}/${c}`}).join();return Bl.default(o)}function Ze(n){return se(n)==="table"}function Ph(n){const e=H(n);if(Ae(e))return null;const t=z(e);return d(xn,t,"no parent block"),Ze(t)?e:Ph(t)}function eo(n){if(Ze(n))return n;const e=H(n);if(Ae(e))return null;const t=z(e);return d(xn,t,"no parent block"),Ze(t)?t:eo(t)}function oE(n,e){const t=n.querySelector("colgroup");d(xn,t,"no colgroup");const o=t.children[e];return d(xn,o,"no col"),d(xn,o instanceof HTMLTableColElement,`invalid col: ${o.tagName}`),o}function _5(n){try{return je(n),!0}catch{return!1}}function rE(n){return Ne(n).querySelector(":scope > .block-helper")}function H5(n){const e=z(n.contentElement);d(xn,e,"no block");const t=rE(e);if(t){const o=Math.min(n.contentElement.offsetLeft,n.rootElement.scrollLeft),r=e.getBoundingClientRect().width;t.style.right=`${o+r}px`}}const Mt=w("doc-table-grid");class iE{constructor(e){h(this,"_cells",[]);for(let t=0;t<e;t++)this._cells.push(void 0)}cols(){return this._cells.length}setCell(e,t){d(Mt,e>=0&&e<this.cols(),`set cell, invalid col: ${e}`),this._cells[e]=t}getCell(e){d(Mt,e>=0&&e<this.cols(),`get cell, invalid col: ${e}`);const t=this._cells[e];return d(Mt,t,"get cell, no cell"),t}getCellAllowEmpty(e){return d(Mt,e>=0&&e<this.cols(),`get cell, invalid col, ${e}`),this._cells[e]}getNextNonVirtualCell(e){return this._cells.slice(e+1).find(t=>!t.virtual)}forEach(e){this._cells.forEach(e)}}class Mc{constructor(e){h(this,"_data");h(this,"_rows");this._data=e,this._rows=[];for(let t=0;t<this.rowCount;t++)this._rows.push(new iE(this.colCount));this.fillGrid(),d(Mt,e.colsWidth,"no colsWidth"),d(Mt,this.colCount===e.colsWidth.length,"invalid col count")}get rowCount(){return this._data.rows}get colCount(){return this._data.cols}getNextEmptyCell(e,t){let o=e,r=t;for(;;){if(o+=1,o===this.colCount&&(o=0,r+=1),r>=this.rowCount)return null;if(this._rows[r].getCellAllowEmpty(o)===void 0)return{col:o,row:r}}}fillGrid(){const e=this._data.children;d(Mt,e,"no children");let t=0,o=0;e.forEach((r,i)=>{const s=this._data[`${r}_colSpan`]||1,l=this._data[`${r}_rowSpan`]||1;for(let a=0;a<l;a++)for(let u=0;u<s;u++)this._rows[o+a].setCell(t+u,{col:t,row:o,containerId:r,virtual:u!==0||a!==0,colSpan:s,rowSpan:l});const c=this.getNextEmptyCell(t,o);c?(t=c.col,o=c.row):d(Mt,i===e.length-1,`invalid table data, no next empty cell: ${JSON.stringify(this._data)}`)}),this._rows.forEach(r=>{r.forEach(i=>{d(Mt,i,"no cell"),d(Mt,i.containerId,"no containerId")})})}getCell(e){const{col:t,row:o}=e,r=this._rows[o];d(Mt,r,`get cell, no row: ${o}`);const i=r.getCell(t);return d(Mt,i,`get cell, no cell: ${t}`),i}getRow(e){const t=this._rows[e];return d(Mt,t,`get row, no row: ${e}`),t}forEach(e){this._rows.forEach(e)}}const Rc=w("table-data");function sE(n){const e=n.firstElementChild;return d(Rc,e,"no child element for cell"),d(Rc,Un(e),"cell first child is not a container"),d(Rc,en(e),"cell first child is not a container"),e}function lE(n){const e=z(n);d(Rc,e,"no parent block for table");const t=[],o={};Array.from(n.rows).forEach(l=>{Array.from(l.cells).forEach(c=>{const a=sE(c),u=q(a);t.push(u),(c.colSpan>1||c.rowSpan>1)&&(o[`${u}_colSpan`]=c.colSpan,o[`${u}_rowSpan`]=c.rowSpan)})});const r=n.rows.length,i=Array.from(n.rows[0].cells).map(l=>l.colSpan).reduce((l,c)=>l+c,0);return{id:j(e),type:se(e),rows:r,cols:i,children:t,colsWidth:Array(i).fill(100),...o}}function mr(n){return new Mc(n)}function cE(n){return mr(lE(n))}const Qe=w("table-grid"),aE=60;class uE{constructor(e,t){h(this,"containerId");h(this,"row");h(this,"col");h(this,"colSpan");h(this,"rowSpan");h(this,"virtual");h(this,"table");this.table=e,this.containerId=t.containerId,this.row=t.row,this.col=t.col,this.colSpan=t.colSpan,this.rowSpan=t.rowSpan,this.virtual=t.virtual}get cell(){const t=this.container.closest("td");return d(Qe,t,"no parent cell for child container"),t}get container(){const e=this.table.querySelectorAll(`[data-container-id=${this.containerId}]`);d(Qe,e.length===1,"containers !== 1"),d(Qe,Un(e[0]),"not a container");const t=e[0];return d(Qe,en(t),"not a child container"),t}}class dE{constructor(e,t){h(this,"_cells",[]);t.forEach(o=>{this._cells.push(new uE(e,o))})}get cells(){return this._cells}getCell(e){return d(Qe,e<this._cells.length,"get cell, invalid col"),this._cells[e]}getNextNonVirtualCell(e){return this._cells.slice(e+1).find(t=>!t.virtual)}getSpannedCell(){return this._cells.find(e=>e.virtual||e.colSpan>1||e.rowSpan>1)}}const Vf=class{constructor(e){h(this,"_rows",[]);this.table=e,cE(e).forEach(r=>{this._rows.push(new dE(e,r))});const o=this.colCount;this._rows.forEach(r=>{d(Qe,r.cells.length===o,"row.cells.length !== colCount")})}get rowCount(){return this._rows.length}get colCount(){return this._rows.length===0?0:(d(Qe,this.rowCount>0,"rowCount <= 0"),this.getRow(0).cells.length)}getRow(e){return this._rows[e]}getCell(e){const t=this.getRow(e.row);return d(Qe,t,"no row"),t.getCell(e.col)}getCellContainer(e){return this.getCell(e).container}getFirstCellContainer(){return this.getCellContainer({row:0,col:0})}getLastCellContainer(){const e=this.rowCount-1,t=this.colCount-1;return this.getCellContainer({row:e,col:t})}getColumnCells(e){d(Qe,e>=0&&e<this.colCount,"colIndex out of range");const t=this.rowCount,o=[];for(let r=0;r<t;r++){const i=this.getCell({row:r,col:e});o.push(i)}return o}toRealCells(e){const t=[];return e.forEach(o=>{const r=this.getRealCell(o);t.findIndex(i=>i.containerId===r.containerId)===-1&&t.push(r)}),t}getColumnRealCells(e){const t=this.getColumnCells(e);return this.toRealCells(t)}getRowRealCells(e){const t=this.getRow(e).cells;return this.toRealCells(t)}getFirstSpannedCell(e){d(Qe,e>=0&&e<this.colCount,"colIndex out of range");const t=this.rowCount;for(let o=0;o<t;o++){const r=this.getCell({row:o,col:e});if(r.virtual||r.colSpan>1||r.rowSpan>1)return r}}getRealCell(e){const t=this.getCell(e);if(!t.virtual)return t;const o=this.getCellById(t.containerId);return d(Qe,!o.virtual,"found a virtual cell"),o}getColumnSpannedRange(e){const t=this.getColumnRealCells(e);let o=1e5,r=-1;return t.forEach(i=>{o=Math.min(i.col,o),r=Math.max(i.col+i.colSpan-1,r)}),d(Qe,o<=r,"min > max"),d(Qe,o>=0,"min < 0"),d(Qe,r<this.colCount,"max >= colCount"),[o,r]}getRowSpannedRange(e){const t=this.getRowRealCells(e);let o=1e5,r=-1;return t.forEach(i=>{o=Math.min(i.row,o),r=Math.max(i.row+i.rowSpan-1,r)}),d(Qe,o<=r,"min > max"),d(Qe,o>=0,"min < 0"),d(Qe,r<this.rowCount,"max >= rowCount"),[o,r]}getSpannedRange(e,t){const o=Math.min(e.row,t.row),r=Math.max(e.row,t.row),i=Math.min(e.col,t.col),s=Math.max(e.col,t.col),l=[];for(let p=o;p<=r;p++)for(let b=i;b<=s;b++)l.push(this.getCell({row:p,col:b}));const c=this.toRealCells(l);let a=1e4,u=1e4,f=-1,m=-1;return c.forEach(p=>{u=Math.min(p.col,u),a=Math.min(p.row,a),m=Math.max(p.col+p.colSpan-1,m),f=Math.max(p.row+p.rowSpan-1,f)}),[{row:a,col:u},{row:f,col:m}]}getAllCells(){return this.getCells({col:0,row:0},{col:this.colCount-1,row:this.rowCount-1})}sub(e,t){const o=[];for(let r=e.row;r<=t.row;r++){const i=[];for(let s=e.col;s<=t.col;s++){const l=this.getCell({row:r,col:s});i.push(l)}o.push(i)}return o}getAllContainers(){return this.getAllCells().map(t=>t.container)}getCells(e,t){const o=[],r=this.getSpannedRange(e,t),i=r[0],s=r[1],l=Math.min(i.row,s.row),c=Math.max(i.row,s.row),a=Math.min(i.col,s.col),u=Math.max(i.col,s.col);for(let f=l;f<=c;f++)for(let m=a;m<=u;m++){const p=this.getCell({row:f,col:m});p.virtual||o.push(p)}return o}map(e){const t=[];for(let o=0;o<this.rowCount;o++){const r=[];for(let i=0;i<this.colCount;i++){const s=this.getCell({row:o,col:i});r.push(e(s))}t.push(r)}return t}getBottomCell(e){const t=this.rowCount;let o=e,r=e.row;for(;o.containerId===e.containerId;){if(r+=1,r>=t)return null;o=this.getCell({row:r,col:e.col})}return this.getRealCell(o)}getTopCell(e){let t=e,o=e.row;for(;t.containerId===e.containerId;){if(o-=1,o<0)return null;t=this.getCell({row:o,col:e.col})}return this.getRealCell(t)}get cells(){let e=[];return this._rows.forEach(t=>{e=e.concat(t.cells)}),e}getVirtualCellContainersGrid(){return this.map(e=>e.containerId)}static virtualCellContainersGridToChildren(e){const t=e,o=[];return t.forEach(r=>{r.forEach(i=>{o.indexOf(i)===-1&&o.push(i)})}),o}getCellById(e){const o=this.cells.find(r=>r.containerId===e);return d(Qe,o,"cell not found"),o}getCellByCellElement(e){const t=Ms(e);return this.getCellByContainerId(q(t))}getCellByContainerId(e){return this.getCellById(e)}static fromTable(e){const t=nE(e),o=this.caches.getSync(t,()=>(Qe.debug("create table grid"),new Vf(e)));return o.table!==e?(this.caches.delete(t),this.fromTable(e)):o}static fromBlock(e){return this.fromTable(je(e))}};let re=Vf;h(re,"caches",new Am(aE));function Oc(n,e){Object.entries(n).forEach(([t])=>{t.startsWith(`${e}/`)&&delete n[t]})}const hE=w("table-selection-range");function hn(n,e,t){var E,R,L,P;const o=re.fromBlock(n),r=e,i=t,s=o.getCellByContainerId(r.childContainerId),l=o.getCellByContainerId(i.childContainerId),c=r.custom,a=i.custom,u=(E=c==null?void 0:c.rowIndex)!=null?E:s.row,f=(R=c==null?void 0:c.colIndex)!=null?R:s.col,m=(L=a==null?void 0:a.rowIndex)!=null?L:l.row+l.rowSpan-1,p=(P=a==null?void 0:a.colIndex)!=null?P:l.col+l.colSpan-1,b=Math.min(u,m),k=Math.max(u,m),v=Math.min(f,p),T=Math.max(f,p);return{fromRow:b,toRow:k,fromCol:v,toCol:T}}function Nh(n,e){const t=new Set,o=new Set,r=n.selection.range;if(!r.isSimple()&&r.start.blockId===j(e)){const i=re.fromBlock(e),{start:s,end:l}=r;d(hE,!s.isSimple()&&!l.isSimple(),"invalid range");const{fromCol:c,toCol:a,fromRow:u,toRow:f}=hn(e,s,l);if(u===0&&f===i.rowCount-1)for(let m=c;m<=a;m++)o.add(m);if(c===0&&a===i.colCount-1)for(let m=u;m<=f;m++)t.add(m)}return{selectedRows:t,selectedColumns:o}}function Rs(n,e){let t=null;if(e.isCollapsed()&&e.isSimple()){const o=n.getBlockById(e.start.blockId);if(Ze(o)){const r=H(o),i=z(r);i&&(t=eo(i))}else t=eo(o)}else{const o=n.getBlockById(e.start.blockId),r=eo(o),i=n.getBlockById(e.end.blockId),s=eo(i);r===s&&(t=r)}return t}const Yr=w("delete-columns");function j5(n,e,t){const{start:o,end:r}=t;if(o.blockId!==r.blockId||t.isSimple()||n.getBlockById(o.blockId)!==e||se(e)!=="table")return!1;const{fromRow:s,toRow:l}=hn(e,t.start,t.end),c=re.fromBlock(e);return s===0&&l===c.rowCount-1}function Fh(n){const e=n.getEditor();e.undoManager.runInGroup(()=>{var R;const t=e.getBlockById(n.start.blockId);if(!j5(e,t,n))return;if(n.isSimple()){e.deleteBlock(t);return}const{fromCol:o,toCol:r}=hn(t,n.start,n.end),i=re.fromBlock(t);if(o===0&&r===i.colCount-1){e.deleteBlock(t);return}const s=new Set,l=i.map(L=>L.containerId);for(let L=0;L<l.length;L++){const P=l[L];for(let V=o;V<=r;V++){const ee=P[V];s.add(ee)}P.splice(o,r-o+1)}const c=new Set(l.flat()),a=new Set(Array.from(s).filter(L=>!c.has(L))),u=r-o+1,f=new Map,m=new Map;s.forEach(L=>{if(a.has(L))return;const P=i.getCellByContainerId(L);if(d(Yr,P.colSpan>1,"invalid effected cell, colSpan === 1"),P.col<o){d(Yr,c.has(L),"invalid effected cell, not exists");let we=P.col+P.colSpan-1;we>r&&(we=r);const ft=we-o+1,lo=P.colSpan-ft;f.set(L,lo);return}d(Yr,P.col<=r,"invalid effected cell, col > endCol");const V=P.col,ee=P.col+P.colSpan-1,ie=P.col-o,pe=ee-V+1-u+ie;d(Yr,pe>0,"invalid effected cell, newSpanned <= 0");const de=Qn(e.doc);m.set(L,{newContainerId:de,colSpan:pe})});for(let L=0;L<l.length;L++){const P=l[L];for(let V=o;V<P.length;V++){const ee=P[V],ie=m.get(ee);ie&&(P[V]=ie.newContainerId)}}const p=Q.default(e.getBlockData(t));p.colsWidth.splice(o,r-o+1),a.forEach(L=>{Oc(p,L)}),f.forEach((L,P)=>{d(Yr,L>=1,"invalid modified colSpan, colSpan < 1"),L===1?p[`${P}_colSpan`]=void 0:p[`${P}_colSpan`]=L}),m.forEach((L,P)=>{Oc(p,P);const{newContainerId:V,colSpan:ee}=L;d(Yr,ee>=1,"invalid newContainerData, colSpan < 1"),ee>1&&(p[`${V}_colSpan`]=ee);const ie=i.getCellByContainerId(P).rowSpan;ie>1&&(p[`${V}_rowSpan`]=ie)});const k=(R=l[0][o])!=null?R:l[0][o-1],v=e.getChildContainerData(k)[0],T=re.virtualCellContainersGridToChildren(l),E={...p,cols:p.cols-u,children:T};mr(E),e.updateBlockData(t,E,Fe(e,v.id,0)),e.deleteChildContainers(Array.from(a)),e.deleteChildContainers(Array.from(m.keys()))})}const Jr=w("delete-rows");function z5(n,e,t){const{start:o,end:r}=t;if(o.blockId!==r.blockId||t.isSimple()||n.getBlockById(o.blockId)!==e||se(e)!=="table")return!1;const{fromCol:s,toCol:l}=hn(e,t.start,t.end),c=re.fromBlock(e);return s===0&&l===c.colCount-1}function $h(n){const e=n.getEditor();e.undoManager.runInGroup(()=>{const t=e.getBlockById(n.start.blockId);if(!z5(e,t,n))return;if(n.isSimple()){e.deleteBlock(t);return}const{fromRow:o,toRow:r}=hn(t,n.start,n.end),i=re.fromBlock(t);if(o===0&&r===i.rowCount-1){e.deleteBlock(t);return}const s=new Set,l=i.map(E=>E.containerId);for(let E=r;E>=o;E--)l[E].forEach(L=>s.add(L)),l.splice(E,1);const c=new Set(l.flat()),a=new Set(Array.from(s).filter(E=>!c.has(E))),u=r-o+1,f=new Map,m=new Map;s.forEach(E=>{if(a.has(E))return;const R=i.getCellByContainerId(E);if(d(Jr,R.rowSpan>1,"invalid effected cell, rowSpan === 1"),R.row<o){d(Jr,c.has(E),"invalid effected cell, not exists");let pe=R.row+R.rowSpan-1;pe>r&&(pe=r);const de=pe-o+1,we=R.rowSpan-de;f.set(E,we);return}d(Jr,R.row<=r,"invalid effected cell, col > endCol");const L=R.row,P=R.row+R.rowSpan-1,V=R.row-o,ee=P-L+1-u+V;d(Jr,ee>0,"invalid effected cell, newSpanned <= 0");const ie=Qn(e.doc);m.set(E,{newContainerId:ie,rowSpan:ee})});for(let E=o;E<l.length;E++){const R=l[E];for(let L=0;L<R.length;L++){const P=R[L],V=m.get(P);V&&(R[L]=V.newContainerId)}}const p=Q.default(e.getBlockData(t));a.forEach(E=>{Oc(p,E)}),f.forEach((E,R)=>{d(Jr,E>=1,"invalid modified rowSpan, rowSpan < 1"),E===1?p[`${R}_rowSpan`]=void 0:p[`${R}_rowSpan`]=E}),m.forEach((E,R)=>{Oc(p,R);const{newContainerId:L,rowSpan:P}=E;d(Jr,P>=1,"invalid newContainerData, rowSpan < 1"),P>1&&(p[`${L}_rowSpan`]=P);const V=i.getCellByContainerId(R).colSpan;V>1&&(p[`${L}_colSpan`]=V)});const b=l[o]?l[o][0]:l[o-1][0],k=e.getChildContainerData(b)[0],v=re.virtualCellContainersGridToChildren(l),T={...p,rows:p.rows-u,children:v};mr(T),e.updateBlockData(t,T,Fe(e,k.id,0)),e.deleteChildContainers(Array.from(a)),e.deleteChildContainers(Array.from(m.keys()))})}const Os=w("table-range");function Pc(n){d(Os,!n.isSimple(),"must be complex selection range");const{anchor:e,focus:t}=n;d(Os,!e.isSimple(),"invalid start pos type"),d(Os,!t.isSimple(),"invalid end pos type");const o=n.getEditor();d(Os,e.blockId===t.blockId,"invalid range, not same block");const r=o.getBlockById(e.blockId);d(Os,se(r)==="table","invalid block type, not a table block");const i=je(r),s=re.fromTable(i),l=s.getCellByContainerId(e.childContainerId),c=s.getCellByContainerId(t.childContainerId),a=Math.min(l.row,c.row),u=Math.max(l.row,c.row),f=Math.min(l.col,c.col),m=Math.max(l.col,c.col),p=s.getCell({row:a,col:f}),b=s.getCell({row:u,col:m});return{editor:o,block:r,table:i,startCell:p,endCell:b,startRow:a,startCol:f,endRow:u,endCol:m}}const _h=w("split-cell");function Hh(n,e,t){n.undoManager.runInGroup(()=>{const o=re.fromBlock(e),r=o.getRealCell(t);d(_h,!r.virtual,"should not split virtual cell"),d(_h,r.colSpan>1||r.rowSpan>1,"cell does not has span data");const i=o.getVirtualCellContainersGrid();for(let f=0;f<r.rowSpan;f++)for(let m=0;m<r.colSpan;m++){if(f===0&&m===0)continue;const p=f+r.row,b=m+r.col,k=Qn(n.doc);i[p][b]=k}const s=n.getBlockData(e),l=Q.default(s);l[`${r.containerId}_colSpan`]=null,l[`${r.containerId}_rowSpan`]=null,l.children=re.virtualCellContainersGridToChildren(i);const a=n.getChildContainerData(r.containerId)[0];d(_h,a,"no child block");const u=Fe(n,a.id,0);mr(l),n.updateBlockData(e,l,u)})}function fE(n,e,t){t.forEach(o=>{const r=re.fromBlock(e).getCell(o);(r.virtual||r.colSpan>1||r.rowSpan>1)&&Hh(n,e,o)})}function U5(n,e,t){if(t.isSimple())return!1;const{start:o,end:r}=t;if(o.blockId!==r.blockId||n.getBlockById(o.blockId)!==e||se(e)!=="table")return!1;const{startCell:s,endCell:l}=Pc(t);return!(s.cell!==l.cell||s.colSpan===1&&s.rowSpan===1)}function jh(n){const{editor:e,block:t,startRow:o,startCol:r,endRow:i,endCol:s}=Pc(n),l=[];for(let c=o;c<=i;c++)for(let a=r;a<=s;a++)l.push({row:c,col:a});return fE(e,t,l),!0}const Kr=w("merge-cells");function V5(n,e,t){if(t.isSimple())return!1;const{start:o,end:r}=t;if(o.blockId!==r.blockId||n.getBlockById(o.blockId)!==e||se(e)!=="table")return!1;const{startCell:s,endCell:l}=Pc(t);return s.cell!==l.cell}function q5(n){const e=Pc(n),t=e.editor;t.undoManager.runInGroup(()=>{const o=e.endCell,r=o.row+o.rowSpan-1,i=o.col+o.colSpan-1,s=j(e.block);jh(n);const l=t.getBlockById(s),c=je(l),{startRow:a,startCol:u}=e,f=Q.default(t.getBlockData(l));d(Kr,f.children,"no table children");const m=re.fromTable(c),p=[];for(let pe=a;pe<=r;pe++)for(let de=u;de<=i;de++){const we=m.getCell({row:pe,col:de});d(Kr,!we.virtual,"cell is virtual"),p.push(we)}d(Kr,p.length>0,"no selected cells");const b=p[0],k=p.slice(1),v=m.getCellByContainerId(b.containerId).container,T=[];k.forEach(pe=>{const de=m.getCellByContainerId(pe.containerId).container,we=q(de);if(!qu(t,de)){const ft=K0(t,we);t.insertDocAt(v,Yt(v),ft)}T.push(we)});const E=q(v),R=i-u+1,L=r-a+1;f[`${E}_colSpan`]=R,f[`${E}_rowSpan`]=L,T.forEach(pe=>{d(Kr,f.children,"no table children");const de=f.children.indexOf(pe);d(Kr,de>0,"no deleted container"),f.children.splice(de,1)});const P=f,ee=t.getChildContainerData(E)[0];d(Kr,ee,"no child block");const ie=Fe(t,ee.id,0);mr(P),t.updateBlockData(l,P,ie),t.deleteChildContainers(T)})}const zh=10,mE=["table/merge-cells","table/split-cell","table/insert-column","table/insert-row","table/delete-rows","table/delete-columns","table/delete"];class Uh{constructor(){h(this,"id","TableBlockCommandProvider")}getAvailableCommands(e,t,o){if(se(t)!=="table")return[];const r={blockId:j(t),blockKind:Kt(e,t),blockType:se(t)},i=[];V5(e,t,o)&&i.push({id:"table/merge-cells",name:I.t("table.mergeCell"),icon:Xw,groupIndex:zh,...r}),U5(e,t,o)&&i.push({id:"table/split-cell",name:I.t("table.splitCell"),icon:eB,groupIndex:zh,...r});const s=j5(e,t,o),l=z5(e,t,o);return s&&l&&i.push({id:"table/delete",name:I.t("table.deleteTable"),icon:tB,groupIndex:zh,...r}),i}executeCommand(e,t,o,r,i,s){return se(t)!=="table"||!new Set(mE).has(r.id)?!1:r.id==="table/merge-cells"?(q5(o),!0):r.id==="table/split-cell"?(jh(o),!0):r.id==="table/delete-columns"?(Fh(o),!0):r.id==="table/delete-rows"?($h(o),!0):r.id==="table/delete"?(e.deleteBlock(t),!0):!1}}var W5=(n=>(n.COL_TITLE_TABLE="col-title-table",n.COL_TITLE_ITEM="col-title-item",n.STRIPE_STYLE_TABLE="stripe-style-table",n.NO_BORDER="table-no-border",n))(W5||{});const Vh=6,Ps=20,qh="table-cell-menu-btn";function gE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),hasColTitle:!0};n.updateBlockData(e,o)}function pE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),hasColTitle:!1};n.updateBlockData(e,o)}function CE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),hasRowTitle:!0};n.updateBlockData(e,o)}function AE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),hasRowTitle:!1};n.updateBlockData(e,o)}function bE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),isStripeStyle:!0};n.updateBlockData(e,o)}function vE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),isStripeStyle:!1};n.updateBlockData(e,o)}function yE(n,e,t){if(!n.isBlockWritable(e))return;const r={...Q.default(n.getBlockData(e)),noBorder:!t};n.updateBlockData(e,r)}const Wh=w("get-selected-containers");function Gh(n,e,t,o){d(Wh,t.blockId===o.blockId,"only allow select in single table block"),d(Wh,j(e)===t.blockId,"only allow select in single table block");const r=re.fromBlock(e),i=r.getCellByContainerId(t.childContainerId),s=r.getCellByContainerId(o.childContainerId);if(t.custom===void 0||o.custom===void 0)return r.getCells(i,s).map(v=>r.getCellContainer(v));const{fromCol:l,toCol:c,fromRow:a,toRow:u}=hn(e,t,o),f=new Set,m=[];return r.sub({row:a,col:l},{row:u,col:c}).forEach(b=>{b.forEach(k=>{const v=r.getCellByContainerId(k.containerId);v.col<l||v.row<a||v.col+v.colSpan-1>c||v.row+v.rowSpan-1>u||f.has(k.containerId)||(f.add(k.containerId),m.push(v.container))})}),m}function kE(n,e,t){d(Wh,e.blockId===t.blockId,"only allow select in single table block");const o=n.getBlockById(e.blockId);return Gh(n,o,e,t)}const gr=w("table-cell-dom");function wE(n,e,t){let o=n.getBlockById(t);for(;o;){const r=o.closest("td");d(gr,r,"no parent cell");const i=z(r);if(d(gr,i,"no parent block"),i===e)return r;o=i}return d(gr,!1,"filed to get cell by child block id"),null}function to(n,e,t){if(n.getBlockById(t.blockId)===e&&!t.isSimple())return d(gr,t.childContainerId,"block position must have childContainerId attribute"),t;const r=wE(n,e,t.blockId),i=q(Ms(r));return xe(e,i)}function Zh(n,e){const t=n.selection.range,o=to(n,e,t.start),r=to(n,e,t.end);return hn(e,o,r)}function G5(n,e,t,o){d(gr,Ze(e),"invalid table block");const r=Tn(n,e),i=()=>{const l=r.querySelector(".table-border-bar-container.top");d(gr,l,"no top border bar container"),l.querySelectorAll(".table-border-bar-cell.top").forEach(a=>{const u=parseInt(a.getAttribute("data-top-index")||"0",10);o.includes(u)?M(a,"danger"):_(a,"danger")})},s=()=>{const l=r.querySelector(".table-border-bar-container.left");d(gr,l,"no left border bar container"),l.querySelectorAll(".table-border-bar-cell.left").forEach(a=>{const u=parseInt(a.getAttribute("data-left-index")||"0",10);t.includes(u)?M(a,"danger"):_(a,"danger")})};i(),s()}function To(n,e,t=!0,o){const i=re.fromBlock(e).map(u=>u),{fromCol:s,toCol:l,fromRow:c,toRow:a}=Zh(n,e);for(let u=0;u<i.length;u++){const f=i[u];for(let m=0;m<f.length;m++){const p=f[m],b=o?m>=s&&m+p.colSpan-1<=l:u>=c&&u+p.rowSpan-1<=a;t&&b?p.virtual||M(p.cell,"danger"):p.virtual||_(p.cell,"danger")}}}function So(n,e,t=!0,o){const r=new Set,i=new Set;if(!t){G5(n,e,Array.from(r),Array.from(i));return}const{fromCol:s,toCol:l,fromRow:c,toRow:a}=Zh(n,e);if(o)for(let u=s;u<=l;u++)i.add(u);else for(let u=c;u<=a;u++)r.add(u);G5(n,e,Array.from(r),Array.from(i))}function Z5(n,e,t){const{fromCol:o,toCol:r,fromRow:i,toRow:s}=Zh(n,e),l=re.fromBlock(e);let c=null,a=null;return t?(c=l.getCell({col:o,row:0}),a=l.getCell({col:r,row:l.rowCount-1}),We(n,{anchor:xe(e,c.containerId,{colIndex:o,rowIndex:0}),focus:xe(e,a.containerId,{colIndex:r,rowIndex:l.rowCount-1})})):(c=l.getCell({col:0,row:i}),a=l.getCell({col:l.colCount-1,row:s}),We(n,{anchor:xe(e,c.containerId,{colIndex:0,rowIndex:i}),focus:xe(e,a.containerId,{colIndex:l.colCount-1,rowIndex:s})}))}function BE(n,e){const t=n.selection.range,o=to(n,e,t.start),r=to(n,e,t.end);return Gh(n,e,o,r)}const Q5=["style-bg-color-0","style-bg-color-1","style-bg-color-2","style-bg-color-3","style-bg-color-4","style-bg-color-5","style-bg-color-6","style-bg-color-7","style-bg-color-8","style-bg-color-9","style-bg-color-10","style-bg-color-11","style-bg-color-12","style-bg-color-13"];function Y5(n){return`style-bg-color-${n}`}function Ns(n){return`${n}_background`}function EE(n,e,t){const o=je(n),s=(t!=null?t:re.fromTable(o)).getCell(e).cell;for(let l=0;l<Q5.length;l++){const c=Q5[l];if(ne(s,c))return c}}function J5(n,e,t){if(!n.isBlockWritable(e))return;const o=n.selection.range,i={...Q.default(n.getBlockData(e))},s=to(n,e,o.start),l=to(n,e,o.end);if(o.isSimple()){const c=s.childContainerId;t===-1?i[Ns(c)]=void 0:i[Ns(c)]=Y5(t)}else{const c=re.fromBlock(e),a=hn(e,s,l),u=new Set;for(let f=a.fromRow;f<=a.toRow;f++)for(let m=a.fromCol;m<=a.toCol;m++){const p=c.getCell({row:f,col:m});!u.has(p.containerId)&&p.col>=a.fromCol&&p.row>=a.fromRow&&p.col+p.colSpan-1<=a.toCol&&p.row+p.rowSpan-1<=a.toRow&&(u.add(p.containerId),t===-1?i[Ns(p.containerId)]=void 0:i[Ns(p.containerId)]=Y5(t))}}n.updateBlockData(e,i)}function IE(n,e,t){if(!n.isBlockWritable(e))return;const r={...Q.default(n.getBlockData(e)),chart:t};n.updateBlockData(e,r)}const K5=w("table-chart");function xE(n,e){const t=tE(n,e);if(t){const o=t.querySelector(".editor-table-chart");if(o){const r=o.chartObject;r&&r.destroy(),o.remove()}}}async function TE(n,e){if(!n.isBlockWritable(e))return;if(!!!n.getBlockData(e).chart){xE(n,e);return}const r=[],i=re.fromBlock(e),s=["line","bar","pie","radar"];let l=i.getCell({row:0,col:0}).container.innerText.trim().toLowerCase();new Set(s).has(l)||(l=s[0]);const c=[];for(let k=1;k<i.colCount;k++)c.push(i.getCell({row:0,col:k}).container.innerText);for(let k=1;k<i.rowCount;k++){const v=i.getCell({row:k,col:0}),E=v.container.innerText,R=[];for(let ft=1;ft<i.colCount;ft++){const lo=i.getCell({row:k,col:ft}).container.innerText,st=Number.parseFloat(lo)||0;R.push(st)}let L;const P=EE(e,v,i);P?L=window.getComputedStyle(n.rootElement).getPropertyValue(`--${P}`).trim():L=window.getComputedStyle(n.rootElement).getPropertyValue("--background-color").trim();let[V,ee,ie,pe]=L?lu.fromString(L).toRgbaArray():[];if(!V&&!ee&&!ie&&!pe){const ft=(k-1)%n.options.colors.length;L=n.options.colors[ft],[V,ee,ie,pe]=lu.fromString(L).toRgbaArray()}const de=L,we=lu.fromRgba([V,ee,ie,pe/3]).toHexString();r.push({label:E,data:R,borderColor:de,backgroundColor:we,borderWidth:2})}const a=Tn(n,e);let u=null,f=a.querySelector(".editor-table-chart");f?u=f.chartObject:f=A("div",["editor-table-chart"],a);const m=f;d(K5,m,"no chart container");const p=n.getComponentOptions("table"),b=(p==null?void 0:p.chartCdn)||"https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js";try{await Wo(b,"editor-chartjs"),u&&l!==u.config.type&&(u.destroy(),u=null,Array.from(f.querySelectorAll(".editor-chartjs-canvas")).forEach(T=>{T.remove()}));const k=cu.default({},{type:l,data:{datasets:r,labels:c},options:{onClick:()=>{n.selection.selectBlock(e,0,0)}}});if(u)cu.default(u.config,k),u.update();else{const T=A("canvas",["editor-chartjs-canvas"],m).getContext("2d");u=new window.Chart(T,k),f.chartObject=u}}catch(k){K5.error(`failed to resolve chart cdn: ${JSON.stringify(k)}`)}}async function X5(n,e){await Zt.lock("updateTableChart");try{await TE(n,e)}finally{Zt.release("updateTableChart")}}const e3=nt.default(X5,1e3);let t3=null;function Qh(n,e,t){if(t3!==e&&(e3.flush(),t3=e),t.updateNow){X5(n,e);return}e3(n,e)}function Yh(n,e){Ze(e)&&Qh(n,e,{updateNow:!1})}function SE(n,e){Ze(e)&&Qh(n,e,{updateNow:!0})}const jt={SCROLL:"container-scroll-tool",COMMON:"container-border-shadow",RIGHT:"container-right-border-shadow",LEFT:"container-left-border-shadow",LAYOUT_SIGN:"container-layout-border-shadow",ACTIVE:"active"},Nc={SCROLL_BAR:"container-scrollbar",FIXED:"fixed"},Do={SCROLL_CONTAINER:"scroll-container",TOOL:"container-scroll-tool",CONTAINER:"scroll-container-root",MAC:"mac",SCROLL_AREA:"scroll-area"};function Fc(n,e){return n.containers.get(e)}function n3(n){return n.closest(`.${Do.SCROLL_CONTAINER}`)}function fn(n){return n.firstElementChild}function Rt(n){return n.closest(`.${Do.CONTAINER}`)}function Fs(n){const e=Rt(n);let t=e.querySelector(`:scope >.${Do.TOOL}`);return t||(t=A("div",[Do.TOOL],e)),t}function DE(n){return Rt(n).firstElementChild}function $c(n){let e;return n instanceof HTMLElement?e=n.offsetWidth:e=Number.parseInt(getComputedStyle(n).width,10),n.getBoundingClientRect().width/e}function zt(n,e){const t=$c(n);return e/t}function $s(n){const e=window.getComputedStyle(n),t=$c(n);return{paddingBottom:parseFloat(e.paddingBottom)*t,paddingTop:parseFloat(e.paddingTop)*t,paddingLeft:parseFloat(e.paddingLeft)*t,paddingRight:parseFloat(e.paddingRight)*t}}function Xr(n){const e=$c(n);return{scrollLeft:n.scrollLeft*e,scrollWidth:n.scrollWidth*e,clientWidth:n.clientWidth*e,clientHeight:n.clientHeight*e}}function LE(n,e){const t=$c(n);return n[e]*t}function Jh(n,e){const t=Rt(e),o=Fc(n,t),r=(o==null?void 0:o.safeRightSpace)||0,i=(o==null?void 0:o.safeLeftSpace)||0,l=(o==null?void 0:o.locatingContainer).getBoundingClientRect(),c=t.getBoundingClientRect(),a=c.width;let u=Math.floor(c.left-l.left-i);u<0&&(u=0);let f=l.right;f-=r;let m=f-c.right;return m<0&&(m=0),u=Math.round(u),m=Math.round(m),{originWidth:a,maxLeft:u,maxRight:m}}function ME(n,e){const t=Jh(n,e),{maxLeft:o}=t;e.style.marginLeft=`${zt(e,0-o)}px`,e.style.paddingLeft=`${zt(e,o)}px`}function RE(n,e){const t=Jh(n,e);e.style.marginRight=`${zt(e,0-t.maxRight)}px`}function OE(n){if(n!==document.documentElement&&n!==document.body)return n.getBoundingClientRect();const e=0,t=0,o=document.documentElement.clientWidth,r=document.documentElement.clientHeight;return new DOMRect(e,t,o,r)}const o3=w("scroll-bar-handle"),PE=2;function ei(n){const e=Fs(n);let t=e.querySelector(`.${Nc.SCROLL_BAR}`);return t||(t=A("div",[Nc.SCROLL_BAR],e)),d(o3,t instanceof HTMLDivElement,"invalid child for container tools"),t.firstElementChild||A("div",[],t),t}function _c(n,e){const t=n3(e),o=ei(t),{scrollWidth:r,clientWidth:i}=Xr(t),{paddingLeft:s,paddingRight:l}=$s(e);t.style.marginLeft="",t.style.paddingLeft="",t.style.marginRight="";const c=Jh(n,t),{originWidth:a,maxRight:u}=c;RE(n,t),ME(n,t);const f=r-i;d(o3,o.firstElementChild instanceof HTMLDivElement,"invalid child for scroll bar"),o.style.width=`${zt(t,a+u-s-l)}px`,o.firstElementChild.style.width=`${zt(t,a+u+f-s-l)}px`}function NE(n,e){const t=fn(n),{paddingLeft:o}=$s(t);if(ne(e,"fixed")){const i=Rt(n).getBoundingClientRect();e.style.left=`${zt(n,i.left+o)}px`}else e.style.left=`${zt(n,o)}px`}function ti(n,e){var E;const t=n.getParentScrollContainer(),o=OE(t),r=e.getBoundingClientRect(),i=ei(e),s=i.getBoundingClientRect(),l=Fc(n,Rt(e)),c=(l==null?void 0:l.barFloatWindowBottom)||0,a=fn(e),{paddingTop:u,paddingBottom:f}=$s(a),{scrollWidth:m,clientWidth:p}=Xr(e),b=document.documentElement.clientHeight-c,k=o.top+Xr(t).clientHeight-b,v=b+Math.min(0,k);if(m>p&&r.top+u<v-s.height&&r.bottom>v-s.height+f&&!((E=l==null?void 0:l.isSetScale)!=null&&E.call(l))){M(i,Nc.FIXED);const R=k>0?c:0;i.style.bottom=`${Math.max(document.documentElement.clientHeight-o.bottom,0)+PE+R}px`}else _(i,Nc.FIXED),i.style.bottom=`${zt(e,f-s.height)}px`;NE(e,i)}class FE{constructor(e,t){h(this,"intersectionObserver");h(this,"handleIntersection",e=>{e.forEach(t=>{this.containers.get(Rt(t.target))?(this.handleIntersectionEntry(t),this.callback(t)):this.intersectionObserver.unobserve(t.target)})});h(this,"handleIntersectionEntry",e=>{const t=e.target;ti(this.scrollCore,t);const o=fn(t);_c(this.scrollCore,o)});this.scrollCore=e,this.callback=t;const r={root:this.scrollCore.getParentScrollContainer(),rootMargin:"20px",threshold:0};this.intersectionObserver=new IntersectionObserver(this.handleIntersection,r)}get containers(){return this.scrollCore.containers}bind(e){this.unbind(e),this.intersectionObserver.observe(e)}unbind(e){this.intersectionObserver.unobserve(e)}destroy(){this.intersectionObserver.disconnect()}}const pr=w("container-scroll-shadow");function r3(n,e,t){const o=n,r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),{paddingTop:s,paddingBottom:l}=$s(t);o.style.top=`${zt(e,i.top-r.top+s)}px`,o.style.bottom=`${zt(e,r.bottom-i.bottom+l)}px`}function i3(n,e){const t=n;e<24?t.style.width=`${(e/3).toFixed(2)}px`:t.style.width=""}function $E(n){const e=Fs(n);d(pr,e,"no container tools");let t=e.querySelector(`.${jt.LEFT}`);if(!t){const l=fn(n),c=[jt.COMMON,jt.LEFT];t=A("div",c,e),d(pr,t instanceof HTMLDivElement,"invalid child for container tools"),r3(t,n,l)}d(pr,t instanceof HTMLElement,"invalid child for container tools");const r=Rt(n).getBoundingClientRect(),i=n.getBoundingClientRect();t.style.left=`${zt(n,i.left-r.left)}px`;const s=Xr(n).scrollLeft;d(pr,t instanceof HTMLDivElement,"invalid child for container tools"),i3(t,s),M(t,jt.ACTIVE)}function _E(n){const e=Fs(n);let t=e.querySelector(`.${jt.RIGHT}`);if(!t){const u=fn(n),f=[jt.COMMON,jt.RIGHT];t=A("div",f,e),d(pr,t instanceof HTMLDivElement,"no div, create shadow failed"),r3(t,n,u)}d(pr,t instanceof HTMLElement,"");const r=Rt(n).getBoundingClientRect(),i=n.getBoundingClientRect();t.style.right=`${zt(n,r.right-i.right)}px`;const{scrollWidth:s,scrollLeft:l,clientWidth:c}=Xr(n),a=s-l-c;d(pr,t instanceof HTMLDivElement,"no shadow element"),i3(t,a),M(t,jt.ACTIVE)}function HE(n){const t=Fs(n).querySelector(`.${jt.LEFT}`);t&&_(t,jt.ACTIVE)}function jE(n){const t=Fs(n).querySelector(`.${jt.RIGHT}`);t&&_(t,jt.ACTIVE)}function _s(n){const{scrollLeft:e,scrollWidth:t,clientWidth:o}=Xr(n),r=fn(n),{paddingLeft:i,paddingRight:s}=$s(r),l=LE(r,"offsetLeft");t-i<=o-s||t-i<=e+o-s?jE(n):_E(n),r&&e>=l+i?$E(n):HE(n)}class zE{constructor(e,t){h(this,"resizeObserver");h(this,"handleResizeEntry",e=>{const t=e.target,o=fn(t);_s(t),_c(this.scrollCore,o),ti(this.scrollCore,t),this.callback(t)});h(this,"handleContentResize",e=>{e.forEach(t=>{this.containers.get(Rt(t.target))?this.handleResizeEntry(t):this.unbind(t.target)})});this.scrollCore=e,this.callback=t,this.resizeObserver=new ResizeObserver(this.handleContentResize)}get containers(){return this.scrollCore.containers}bind(e){this.unbind(e),this.resizeObserver.observe(e)}unbind(e){this.resizeObserver.unobserve(e)}destroy(){this.resizeObserver.disconnect()}}const s3=w("container-scroll-observer");class UE{constructor(e,t){h(this,"handleContentScroll",e=>{const t=e.target;d(s3,t instanceof Element,"invalid target for scroll event");const o=ei(t);o.removeEventListener("scroll",this.handleScroll);const r=!0;this.fixScrollXPos(t,t.scrollLeft,r),this.bind(o),_s(t),this.callback(t)});h(this,"handleScroll",e=>{const t=e.target;d(s3,t instanceof HTMLElement,"");const o=t.scrollLeft,r=!1,i=DE(t);this.unbindContentScroll(i),this.fixScrollXPos(i,o,r),this.bindContentScroll(i),_s(i),this.callback(i)});h(this,"handlePrevent",e=>{e.stopPropagation()});h(this,"bindContentScrollCore",e=>{this.unbindContentScroll(e),e.addEventListener("scroll",this.handleContentScroll)});h(this,"unbindContentScroll",e=>{e.removeEventListener("scroll",this.handleContentScroll)});h(this,"bindContentScroll",nt.default(this.bindContentScrollCore,300));h(this,"bind",nt.default(this.bindCore,200));this.scrollCore=e,this.callback=t}fixScrollXPos(e,t,o){const r=ei(e);o||(e.scrollLeft=t),o&&r.scrollLeft!==t&&(r.scrollLeft=t)}bindCore(e){this.unbind(e),e.addEventListener("scroll",this.handleScroll),e.addEventListener("mousedown",this.handlePrevent)}unbind(e){e.removeEventListener("scroll",this.handleScroll),e.removeEventListener("mousedown",this.handlePrevent)}}class VE{constructor(e){h(this,"scrollContainers",new Set);h(this,"handleParentContainerScroll",()=>{this.scrollContainers.forEach(e=>{ti(this.scrollCore,e)})});h(this,"bindScrollContainer",e=>{const t=this.scrollContainers.size===0;this.scrollContainers.add(e),t&&this.eventTarget.addEventListener("scroll",this.handleParentContainerScroll)});h(this,"unbindScrollContainer",e=>{let t=!1;this.scrollContainers.has(e)&&(this.scrollContainers.delete(e),t=this.scrollContainers.size===0),t&&this.eventTarget.removeEventListener("scroll",this.handleParentContainerScroll)});this.scrollCore=e}get eventTarget(){const e=this.scrollCore.getParentScrollContainer();return e===document.documentElement?document:e}destroy(){this.eventTarget.removeEventListener("scroll",this.handleParentContainerScroll),this.scrollContainers.clear()}}const qE=w("scroll-wrap-resize-observer");class WE{constructor(e){h(this,"resizeObserver");h(this,"handleScrollWrapResize",e=>{e.forEach(t=>{this.containers.get(Rt(t.target))?this.handleScrollWrapResizeEntry(t):this.unbind(t.target)})});h(this,"handleScrollWrapResizeEntry",e=>{const t=e.target;d(qE,t instanceof HTMLElement,"invalid target for observer entry");const o=n3(t);_c(this.scrollCore,t),_s(o),ti(this.scrollCore,o)});this.scrollCore=e,this.resizeObserver=new ResizeObserver(this.handleScrollWrapResize)}get containers(){return this.scrollCore.containers}bind(e){this.unbind(e),this.resizeObserver.observe(e)}unbind(e){this.resizeObserver.unobserve(e)}destroy(){this.resizeObserver.disconnect()}}class GE{constructor(e,t){h(this,"resizeObserver");h(this,"scrollContainersMap",new Map);h(this,"handleResizeEntry",e=>{e==null||e.forEach(t=>{const o=fn(t);_s(t),_c(this.scrollCore,o),ti(this.scrollCore,t),this.callback(t)})});h(this,"handleResize",e=>{e.forEach(t=>{const o=this.scrollContainersMap.get(t.target);o!=null&&o.length&&this.handleResizeEntry(o)})});this.scrollCore=e,this.callback=t,this.resizeObserver=new ResizeObserver(this.handleResize)}bind(e){var r,i;const t=Rt(e),o=(r=Fc(this.scrollCore,t))==null?void 0:r.locatingContainer;this.scrollContainersMap.has(o)?(i=this.scrollContainersMap.get(o))==null||i.push(e):(this.scrollContainersMap.set(o,[e]),this.resizeObserver.observe(o))}unbind(e){var i,s;const t=Rt(e),o=(i=Fc(this.scrollCore,t))==null?void 0:i.locatingContainer;if(!o)return;const r=this.scrollContainersMap.get(o);this.scrollContainersMap.set(o,(r==null?void 0:r.filter(l=>l!==e))||[]),(s=this.scrollContainersMap.get(o))!=null&&s.length||(this.resizeObserver.unobserve(o),this.scrollContainersMap.delete(o))}destroy(){this.scrollContainersMap.clear(),this.resizeObserver.disconnect()}}const WV="";class ZE extends Ve.TypedEmitter{constructor(t){super();h(this,"containerIntersectionObserver",null);h(this,"containerResizeObserver",null);h(this,"containerScrollObserver",null);h(this,"parentContainerScrollObserver",null);h(this,"scrollWrapResizeObserve",null);h(this,"locatingContainerResizeObserver",null);h(this,"isWindowEventBind",!1);h(this,"containers",new Map);h(this,"handleScrollContainerScroll",t=>{this.emit("scroll",this,t)});h(this,"handleResize",t=>{this.emit("resize",this,t)});h(this,"handleIntersection",t=>{const o=t.target,r=fn(o);t.isIntersecting?(this.load(),this.bindCore(o,r)):this.unbindCore(o,r)});h(this,"handleWindowEffect",()=>{var t;(t=this.getScrollContainerInViewable())==null||t.forEach(o=>{ti(this,o)})});this.parentContainer=t}load(){this.containerResizeObserver||(this.containerResizeObserver=new zE(this,this.handleResize)),this.containerScrollObserver||(this.containerScrollObserver=new UE(this,this.handleScrollContainerScroll)),this.parentContainerScrollObserver||(this.parentContainerScrollObserver=new VE(this)),this.scrollWrapResizeObserve||(this.scrollWrapResizeObserve=new WE(this)),this.locatingContainerResizeObserver||(this.locatingContainerResizeObserver=new GE(this,this.handleResize)),this.isWindowEventBind||(window.addEventListener("resize",this.handleWindowEffect),this.getParentScrollContainer()!==document.documentElement&&window.addEventListener("scroll",this.handleWindowEffect))}getParentScrollContainer(){return this.parentContainer}getScrollContainerInViewable(){var t;return(t=this.parentContainerScrollObserver)==null?void 0:t.scrollContainers}unbindCore(t,o){var i,s,l,c,a,u;const r=ei(t);(i=this.containerScrollObserver)==null||i.unbindContentScroll(t),(s=this.containerScrollObserver)==null||s.unbind(r),(l=this.scrollWrapResizeObserve)==null||l.unbind(o),(c=this.containerResizeObserver)==null||c.unbind(t),(a=this.parentContainerScrollObserver)==null||a.unbindScrollContainer(t),(u=this.locatingContainerResizeObserver)==null||u.unbind(t)}bindCore(t,o){var i,s,l,c,a,u;if(this.unbindCore(t,o),!t.closest("body"))return;const r=ei(t);(i=this.containerScrollObserver)==null||i.bindContentScrollCore(t),(s=this.containerScrollObserver)==null||s.bindCore(r),(l=this.scrollWrapResizeObserve)==null||l.bind(o),(c=this.containerResizeObserver)==null||c.bind(t),(a=this.parentContainerScrollObserver)==null||a.bindScrollContainer(t),(u=this.locatingContainerResizeObserver)==null||u.bind(t)}bind(t,o){this.containers.set(t,o);const r=t.firstElementChild;this.containerIntersectionObserver||(this.containerIntersectionObserver=new FE(this,this.handleIntersection)),this.containerIntersectionObserver.bind(r)}unbind(t){var i;const o=t.firstElementChild,r=fn(o);this.unbindCore(o,r),this.containers.delete(t),(i=this.containerIntersectionObserver)==null||i.unbind(o),this.containers.size||this.destroy()}destroy(){var t,o,r,i,s;this.containers.forEach((l,c)=>{this.unbind(c)}),this.containers.clear(),(t=this.parentContainerScrollObserver)==null||t.destroy(),(o=this.containerIntersectionObserver)==null||o.destroy(),(r=this.containerResizeObserver)==null||r.destroy(),(i=this.scrollWrapResizeObserve)==null||i.destroy(),(s=this.locatingContainerResizeObserver)==null||s.destroy(),window.removeEventListener("resize",this.handleWindowEffect),window.removeEventListener("scroll",this.handleWindowEffect)}}const l3=w("scroll-container"),Hc=new Map;class QE extends Ve.TypedEmitter{constructor(){super(...arguments);h(this,"scrollListener");h(this,"options");h(this,"scrollContainerElement");h(this,"init",t=>{this.options=t;const o=A("div",[Do.CONTAINER],t.parentElement);ot.isMac&&M(o,Do.MAC);const r=A("div",[Do.SCROLL_CONTAINER],o),i=A("div",[Do.SCROLL_AREA],r);i.style.paddingLeft=t.paddingLeft?`${t.paddingLeft}px`:"",i.style.paddingTop=t.paddingTop?`${t.paddingTop}px`:"",i.style.paddingBottom=t.paddingBottom?`${t.paddingBottom}px`:"",i.style.paddingRight=t.paddingRight?`${t.paddingRight}px`:"",i.appendChild(t.childElement);const s=t.parentContainer;this.scrollListener=Hc.get(s),this.scrollListener||(this.scrollListener=new ZE(s),Hc.set(s,this.scrollListener)),this.scrollListener.unbind(o),this.scrollListener.bind(o,t),this.scrollListener.on("scroll",this.handleContainerScroll),this.scrollListener.on("resize",this.handleResize),this.scrollContainerElement=r});h(this,"handleContainerScroll",(t,o)=>{o===this.scrollContainerElement&&this.emit("scroll",this)});h(this,"handleResize",(t,o)=>{o===this.scrollContainerElement&&this.emit("scroll",this)})}get rootElement(){return this.scrollContainerElement}get contentElement(){return d(l3,this.scrollContainerElement,"scrollContainerElement cannot be undefined"),fn(this.scrollContainerElement)}get scrollOptions(){return d(l3,this.options,"options cannot be undefined"),{...this.options}}handleBaseListenerDestroy(t){t.destroy()}destroy(){var o;(o=this.scrollListener)==null||o.off("scroll",this.handleContainerScroll);const t=Rt(this.contentElement);t&&Hc.forEach((r,i)=>{r.unbind(t),r.containers.size===0&&(this.handleBaseListenerDestroy(r),Hc.delete(i))})}}function YE(){return new QE}const jc=100,JE=40,Kh=w("column-width");function KE(n,e,t){oE(n,e).style.width=`${t}px`}function XE(n){const t=Array.from(n.querySelector("colgroup").children).map(c=>c.getBoundingClientRect().width);if(t[0]!==0)return t;const o=re.fromTable(n),r=Array(o.colCount).fill(-1),i=n.getBoundingClientRect().left;o.toRealCells(o.cells).forEach(c=>{const a=c.col+c.colSpan-1;r[a]===-1&&(r[a]=c.cell.getBoundingClientRect().right-i)}),Kh.debug(`cellRightOffsets1: ${r.join()}`);for(let c=0;c<r.length;c++){const a=r[c];if(a===-1||c===0)continue;let u=c-1;for(;r[u]===-1&&(u--,u!==-1););const f=u===-1?0:r[u],p=(a-f)/(c-u);for(let b=u+1;b<c;b++)r[b]=f+p*(b-u)}Kh.debug(`cellRightOffsets2: ${r.join()}`);const s=[];let l=0;for(let c=0;c<r.length;c++){const a=r[c];s.push(a-l),l=a}return Kh.debug(`widths: ${s.join()}`),s}function Hs(n){return Array.from(n.querySelector("colgroup").children).map(o=>o.getBoundingClientRect().width||Number.parseInt(o.style.width,10)||100)}const eI=w("table-resize-gripper"),c3=7,Xh=(c3-1)/2,tI=3;function nI(n,e,t){const{rows:o}=n;for(let r=0;r<o.length;r++){const i=o[r],s=Array.from(i.cells);for(let l=0;l<s.length;l++){const c=s[l],a=c.getBoundingClientRect(),u=Math.round(a.right);if(Math.abs(e-u)<=Xh&&a.top<=t&&t<=a.bottom)return c}}return null}function oI(n){return!!n.rootContainer.querySelector(".table-resize-gripper")}function e1(n,e){return Tn(n,e).querySelector(".table-resize-gripper")}function a3(n,e){const t=e1(n,e);d(eI,!t,"resize gripper has already exists");const o=Tn(n,e),r=A("div",["table-resize-gripper","table-indicator"],o);return A("div",["table-resize-gripper-indicator"],r),r}function u3(n,e,t){let o=e1(n,e);o||(o=a3(n,e));const i=je(e).getBoundingClientRect(),s=t.getBoundingClientRect(),l=0,c=i.height,a=n.getCustom(Xn(e)).contentElement.getBoundingClientRect(),u=s.right-a.left;o.style.left=`${u-Xh-Vh-Ps}px`,o.style.top=`${l}px`,o.style.height=`${c}px`,o.style.width=`${c3}px`}function t1(n){n.rootContainer.querySelectorAll(".table-resize-gripper").forEach(e=>{e.remove()})}function rI(n,e,t){const r={...n.getBlockData(e),colsWidth:t};n.updateBlockData(e,r)}function iI(n,e,t,o){const r=e,i=re.fromTable(t),s=i.getCellByCellElement(r),l=s.col+s.colSpan-1,c=Hs(t);let a=o;const u=(m,p)=>{const b=p+1,k=m.col+m.colSpan;return c.slice(b,k).reduce((T,E)=>T+E,0)},f=new Set;for(let m=0;m<i.rowCount;m++){const p=i.getCell({row:m,col:l});if(f.has(p.cell))continue;f.add(p.cell);const b=p.cell,k=b.getBoundingClientRect();let v=o-k.left+Xh-tI;const T=Ms(b),E=Vu(n,T)||JE*p.colSpan,R=u(p,l),L=E-R;v<L&&(v=L);const P=k.left+v;a=Math.max(a,P)}return a}const sI=w("table-resize-drag-drop");class lI{constructor(e,t,o,r){h(this,"cursor","col-resize");this.editor=e,this.elem=t,this.data=o,this.onEnd=r}onDragStart(e,t,o){}onDragging(e,t,o,r,i){const{table:s,block:l,draggingRefCell:c}=e.data,u=iI(this.editor,c,s,t.x-e.dragOffsetX)-s.getBoundingClientRect().left;d(sI,c,"no dragging cell");const m=re.fromTable(s).getCellByCellElement(c),p=m.col+m.colSpan-1,k=Hs(s).slice(0,p).reduce((T,E)=>T+E,0),v=u-k;KE(s,p,v),u3(this.editor,l,c),this.editor.selection.caret.update()}onDragEnd(e,t,o,r,i){const s=Hs(e.data.table);rI(this.editor,e.data.block,s),t1(this.editor),this.onEnd&&(this.onEnd(t),this.onEnd=null)}}function cI(n,e){const t=document.elementFromPoint(e.x,e.y);if(!t)return null;const o=z(t);return!o||!n.contains(o)||!Ze(o)?null:o}w("table-resize");class aI{constructor(e){h(this,"draggingRefCell",null);h(this,"handleMouseMove",(e,t)=>{if(e.readonly||e.selectionHandler.isSelecting()&&!this.draggingRefCell||this.draggingRefCell)return;const o=t.target;if(!(o instanceof Element)||o.closest(".table-indicator"))return;const i=t,s=cI(e,i);if(!s||!_5(s)||!e.isBlockWritable(s)){t1(e);return}this.updateGripper(s,i.x,i.y)});this.editor=e,e.domEvents.addEventListener(document,"mousemove",this.handleMouseMove)}destroy(){this.editor.domEvents.removeEventListener(document,"mousemove",this.handleMouseMove)}updateGripper(e,t,o){const r=je(e),i=nI(r,t,o);if(i){if(!e1(this.editor,e)){if(oI(this.editor))return;const l=a3(this.editor,e),c={block:e,table:r,draggingRefCell:i};Au(new lI(this.editor,l,c,a=>{this.updateGripper(e,a.x,a.y)}))}u3(this.editor,e,i)}else t1(this.editor)}}function d3(n){n.addCustom("table-mouse-event-handler",e=>new aI(e))}const h3=w("table-insert-column");function f3(n,e,t){n.undoManager.runInGroup(()=>{const o=je(e),r=re.fromTable(o),i=r.colCount;d(h3,t>=0&&t<=i,`insert index ${t} is out of range [0, ${i}]`);const s=r.map(m=>m.containerId),l=new Set;n.doc.beginBatchUpdate();for(let m=0;m<s.length;m++){const p=s[m],b=p[t-1],k=p[t];if(t===0||t===p.length||b!==k){const v=Qn(n.doc);p.splice(t,0,v)}else p.splice(t,0,b),l.add(b)}n.doc.endBatchUpdate();const c=Q.default(n.getBlockData(e));l.forEach(m=>{const p=`${m}_colSpan`,b=c[p];d(h3,typeof b=="number"&&b>1,`no colSpan for containerId ${m}, ${b}`),c[p]=b+1});const a=c.colsWidth.concat();a.splice(t,0,jc);const u=re.virtualCellContainersGridToChildren(s),f={...c,cols:c.cols+1,children:u,colsWidth:a};mr(f),n.updateBlockData(e,f)})}const zc=w("table-insert-row");function m3(n,e,t){n.undoManager.runInGroup(()=>{const o=je(e),r=re.fromTable(o),i=r.rowCount;d(zc,t>=0&&t<=i,`insert index ${t} is out of range [0, ${i}]`);const s=r.map(m=>m.containerId),l=new Set;n.doc.beginBatchUpdate();const c=[];for(let m=0;m<r.colCount;m++){const p=t>0&&s[t-1][m],b=t<r.rowCount&&s[t][m];if(d(zc,p||b,"no top and bottom cell"),t===0||t===r.rowCount||p!==b){const k=Qn(n.doc);c.push(k)}else d(zc,p,"no top cell"),c.push(p),l.add(p)}n.doc.endBatchUpdate(),s.splice(t,0,c);const a=Q.default(n.getBlockData(e));l.forEach(m=>{const p=`${m}_rowSpan`,b=a[p];d(zc,typeof b=="number"&&b>1,`no rowSpan for containerId ${m}, ${b}`),a[p]=b+1});const u=re.virtualCellContainersGridToChildren(s),f={...a,rows:a.rows+1,children:u};mr(f),n.updateBlockData(e,f)})}const n1=w("paste-table-in-table-block");function uI(n,e,t,o){let r=re.fromBlock(t);const i=e.blocks.root[0];d(n1,i,"no table data"),d(n1,i.type==="table",`table data type is not table, but ${i.type}`);const s=i,l=r.getCellByCellElement(o),c=s.cols,a=s.rows,u=l.col,f=l.row,m=u+c,p=f+a,b=[];for(let k=u;k<m&&k<r.colCount;k++)for(let v=f;v<p&&v<r.rowCount;v++){const T=r.getCell({col:k,row:v});T.virtual?T.virtual&&b.push({col:k,row:v}):(T.colSpan>1||T.rowSpan>1)&&b.push({col:k,row:v})}n.undoManager.runInGroup(()=>{if(b.forEach(E=>{const R=re.fromBlock(t).getCell(E);(R.colSpan>1||R.rowSpan>1)&&Hh(n,t,E)}),m>r.colCount)for(let E=r.colCount;E<m;E++)f3(n,t,E);if(p>r.rowCount)for(let E=r.rowCount;E<p;E++)m3(n,t,E);r=re.fromBlock(t);const k=new Mc(s);let v;for(let E=0;E<k.colCount;E++)for(let R=0;R<k.rowCount;R++){const L=k.getCell({col:E,row:R});if(!L.virtual){const P=Od(n.editorBlocks,e,L.containerId),V=u+E,ee=f+R,ie={col:V,row:ee},pe=r.getCellContainer(ie);s0(n,pe,P),v=pe}}d(n1,v,"no last container");const T=Je(v);n.selection.selectBlock(T,G(n,T))})}const g3=w("paste-in-table-block");class dI{constructor(e){this.editor=e,setTimeout(()=>{e.input.addHandler(this)})}destroy(){}async handleBeforePasteDoc(e,t){if(!e.selection.range.isSimple()||e.selection.range.start.offset!==0)return!1;const r=e.selection.startBlock,i=H(r);if(Ae(i)||!qu(e,i))return!1;const s=z(i);if(d(g3,s,"no parent block"),!Ze(s)||t.blocks.root.length!==1||t.blocks.root[0].type!=="table")return!1;g3.debug("paste child table in table");const a=re.fromBlock(s).getCellByContainerId(q(i)).cell;return uI(e,t,s,a),!0}}function p3(n){n.addCustom("table-block-paste-event",e=>new dI(e))}const o1=w("table-select-columns");function hI(n,e,t,o,r){d(o1,Ze(e),"is not a table block");const i=re.fromBlock(e);d(o1,t>=0&&t<i.colCount,"invalid from"),d(o1,o>0&&t+o<=i.colCount,"invalid count");const s=i.getCell({row:0,col:t}),l=i.getCell({row:i.rowCount-1,col:t+o-1}),c=xe(e,s.containerId,{colIndex:t,rowIndex:0}),a=xe(e,l.containerId,{colIndex:t+o-1,rowIndex:i.rowCount-1});r!=null&&r.reverse?n.selection.setSelection(a,c):n.selection.setSelection(c,a)}const r1=w("table-select-columns");function fI(n,e,t,o,r){d(r1,Ze(e),"is not a table block");const i=re.fromBlock(e);d(r1,t>=0&&t<i.rowCount,"invalid from"),d(r1,o>0&&t+o<=i.rowCount,"invalid count");const s=i.getCell({row:t,col:0}),l=i.getCell({row:t+o-1,col:i.colCount-1}),c=xe(e,s.containerId,{rowIndex:t,colIndex:0}),a=xe(e,l.containerId,{rowIndex:t+o-1,colIndex:i.colCount-1});r!=null&&r.reverse?n.selection.setSelection(a,c):n.selection.setSelection(c,a)}const GV="",C3=w("get-toolbar-reference-client");function mI(n,e){const t=n.selection.range;if(!t.isSimple()){d(C3,t.start.blockId===t.end.blockId,"invalid selection range");const s=n.getBlockById(t.start.blockId);d(C3,ce(n,s),"not a complex block");const l=me(n,s);if(l.getTextToolbarReferenceClient){const c=l.getTextToolbarReferenceClient(n,s);if(c)return c}}const o=t.isReverse()?e.start:e.end,r=We(n,{anchor:o,focus:o}),i=ho(n,e.block,r);if(i.length!==0)return i[0]}function gI(n){var e,t;if(n.children){let o=!1;const r=[];for(const i of n.children){if((e=i.states)!=null&&e.includes("checked")){o=!0;break}(t=n.defaultCheckedChildren)!=null&&t.includes(i.id)&&r.push(i)}if(!o&&(r==null?void 0:r.length))for(const i of r)Array.isArray(i.states)?i.states.push("checked"):i.states=["checked"]}}function Uc(n){const e=(r,i)=>{const s=r.findIndex(c=>c.id===i.id);if(s===-1){r.push(i);return}const l=r[s];if(l.value!==i.value&&delete l.value,!!l.states){if(!i.states){l.states=[];return}l.states=au.default(l.states,i.states)}},t=[],o=new Map;return n.forEach(r=>{var i,s;(i=r.children)!=null&&i.length&&(o.has(r.id)?(s=o.get(r.id))==null||s.push(...r.children):o.set(r.id,[...r.children])),e(t,r)}),o.forEach((r,i)=>{const s=t.find(l=>l.id===i);s&&(s.children=Uc(r),gI(s))}),t}function Vc(n){return n.getCustom("toolbar-handler")}const ZV="";class pI{constructor(){h(this,"linkPopup",null);h(this,"form",{});h(this,"onFinished",null);h(this,"onClose",null);h(this,"handleOk",async()=>{var e;try{await this.checkValue();const{linkText:t,linkUrl:o}=this.form,r=this.formatUrl(o.getInputValue());(e=this.onFinished)==null||e.call(this,t.getInputValue()||r,r),this._destroy()}catch{}});h(this,"handleClose",()=>{var e;(e=this.onClose)==null||e.call(this),this._destroy()});h(this,"onShow",()=>{setTimeout(()=>{var e;(e=this.form.linkText)==null||e.getField().focus()},400)});h(this,"onChange",()=>{var t;const e=(t=this.linkPopup)==null?void 0:t.content.querySelector(".submit-button");e.disabled=!1});h(this,"handleTextKeyboard",e=>{var t;if(!e.isComposing){if(e.key==="Enter"){(t=this.form.linkUrl)==null||t.getField().focus(),e.stopPropagation();return}e.key==="Escape"&&this.handleClose()}});h(this,"handleUrlKeyboard",e=>{if(!e.isComposing){if(e.key==="Enter"){this.handleOk(),e.preventDefault();return}e.key==="Escape"&&this.handleClose()}})}async checkValue(){const{linkUrl:e}=this.form;if(!e.getInputValue())throw e.setFieldError(I.t("link.urlPlaceholder")),new Error(I.t("link.urlPlaceholder"))}formatUrl(e){if(!e)return"";try{new URL(e)}catch{return`${window.location.protocol}//${e}`}return e}editLink(e){var u,f;const{target:t,linkText:o,linkUrl:r,onFinished:i,onClose:s,placement:l="bottom-start"}=e;this.linkPopup=new xs(this.createPopupContent(o,r)),this.linkPopup.addListener("show",this.onShow),this.linkPopup.manualShow(t,{theme:"light",placement:l}),this.onFinished=i,s&&(this.onClose=s);const c=(u=this.linkPopup)==null?void 0:u.content.querySelector(".submit-button"),a=(f=this.linkPopup)==null?void 0:f.content.querySelector(".cancel-button");c==null||c.addEventListener("click",this.handleOk),a==null||a.addEventListener("click",this.handleClose)}createPopupContent(e,t){const o=A("div",["link-popup-content"],null);this.form.linkText=Lh(o,{label:I.t("link.textLabel"),required:!1,placeholder:I.t("link.textPlaceholder"),defaultValue:e,onChange:this.onChange,onKeyDown:this.handleTextKeyboard}),this.form.linkUrl=Lh(o,{className:"link-popup-gap",label:I.t("link.urlLabel"),required:!0,placeholder:I.t("link.urlPlaceholder"),defaultValue:t,onChange:this.onChange,onKeyDown:this.handleUrlKeyboard});const r=A("div",["link-popup-footer"],o);A("button",["cancel-button"],r,I.t("link.cancelText"));const i=A("button",["submit-button"],r,I.t("link.submitText"));return i.disabled=!0,o}_destroy(){var o,r,i,s;const e=(o=this.linkPopup)==null?void 0:o.content.querySelector(".submit-button"),t=(r=this.linkPopup)==null?void 0:r.content.querySelector(".cancel-button");e==null||e.removeEventListener("click",this.handleOk),t==null||t.removeEventListener("click",this.handleClose),this.onFinished=null,this.onClose=null,this.form={},(i=this.linkPopup)==null||i.removeAllListeners(),(s=this.linkPopup)==null||s.destroy()}destroy(){this._destroy()}}function js(n,e){n.addCustom("link-editor",()=>new pI).editLink(e)}const CI=w("link-popup");function AI(n){return ne(n,"link")}function zs(n){var e,t;return(t=(e=n.getAttribute("link"))!=null?e:n.textContent)!=null?t:""}function bI(n,e,t){var r,i,s,l;if(n.isBlockWritable(e)&&t&&Ft(t)){const c=t,a=(i=(r=n.editorBoxes.getBoxClass(qi(c))).getBoxProperties)==null?void 0:i.call(r,n,c);if(a!=null&&a.boxCommands){const u=(l=(s=a.boxCommands["hovering-toolbar"])==null?void 0:s.commands)!=null?l:[];return{element:t,commands:u}}return{element:null,commands:[]}}if(n.isWritable()&&t&&$(n,e)&&AI(t)){const c=A("a",["link-href-button"],null,zs(t));c.href=zs(t),c.target="_blank",c.rel="noopener noreferrer";const a=[{id:"link-text",name:zs(t),disableTooltip:!0,element:c},{id:"edit-link",name:I.t("link.edit"),icon:Th},{id:"remove-link",name:I.t("link.remove"),icon:uB}];return{element:t,commands:a}}return wg(n,e,"hovering-toolbar")}function vI(n,e,t){var c;const o=po(e,t);n.selection.selectBlock(e,o.start,o.end);const r=(c=t.textContent)!=null?c:"",i=zs(t);js(n,{target:t,linkText:r,linkUrl:i,onFinished:(a,u)=>{try{const f=n.getBlockText(e),m=sd(f,o.start,o.end-o.start),p=Gn(m,o.start,a,{link:u});n.setBlockText(e,p),n.selection.selectBlock(e,o.start+a.length),n.focus()}catch(f){CI.error(f)}},onClose:()=>{n.selection.selectBlock(e,o.end),n.focus()}})}function yI(n,e,t){const o=po(e,t),r=n.getBlockText(e),i=zs(t),s=_r(o.start,o.end-o.start,r,"link",i);n.setBlockText(e,s),n.selection.selectBlock(e,o.end)}function kI(n,e,t,o){var s,l,c;if(t){if(n.isBlockWritable(e)&&Ft(t)){const u=t,f=(l=(s=n.editorBoxes.getBoxClass(qi(u))).getBoxProperties)==null?void 0:l.call(s,n,u);if(f!=null&&f.boxCommands){f.boxCommands["hovering-toolbar"].executeCommand(n,e,u,o);return}return}const a=Vc(n);a.disableTextToolbar(),a.hide(),setTimeout(()=>{a.enableTextToolbar()},1e4),o.id==="edit-link"?vI(n,e,t):o.id==="remove-link"&&yI(n,e,t);return}const r=kg(n,e);if(!r)return;const i=(c=r.blockCommands)==null?void 0:c["hovering-toolbar"];!i||i.executeCommand(n,e,o)}function qc(){let n=8;for(;n>0&&!document.querySelector(`div[data-style-heading='${n}']`);)n--;return n}const wI=[Ah,bh,vh,yh,kh,wh,Bh,Eh];class BI{constructor(e){h(this,"id","BlockTurnIntoCommandProvider");this.editor=e}getHeadingIndex(){let e=qc();return e<=4?e=5:e<8&&(e+=1),e}getAvailableCommands(e,t,o){if($(e,t)){const r=j(t),i=se(t),s=Kt(e,t),c=e.getBlockData(t).heading,a=[];for(let f=0;f<this.getHeadingIndex();f++)a.push({id:`heading-${f+1}`,name:I.t("commands.heading",{name:`${f+1}`}),icon:wI[f],states:c===f+1?["checked"]:[],value:`${f+1}`});const u=f=>{var p;const m=A("span",["toolbar-item-name-container"],null);for(const b of f.children)if((p=b.states)!=null&&p.includes("checked"))return m.innerHTML=b.icon||Lc,m;return m.innerHTML=Lc,m};return[{id:"turn-into",name:I.t("commands.headingGroup"),blockId:r,blockType:i,blockKind:s,element:u,groupIndex:200,dropdown:!0,manualShowChildren:!0,childrenPlacement:"bottom-start",defaultCheckedChildren:["text"],children:[{id:"text",name:I.t("commands.text"),icon:Lc,states:c?[]:["checked"]},...a],childrenType:"menu"}]}return[]}applyHeadingStyle(e,t,o){e.updateBlockData(t,{heading:o})}executeCommand(e,t,o,r){if($(e,t)&&(r.id.startsWith("heading-")||r.id==="text")){const i=r.value?Number(r.value):null;return this.applyHeadingStyle(e,t,i),!0}return!1}}function Wc(n){const e=n.getAttribute("block-padding-level");return e?Number(e):null}function EI(n,e){let t;const o=Wc(e);if(!o)t=1;else{if(o>=12)return t=12,!1;t=o+1}return n.updateBlockData(e,{...n.getBlockData(e),padding:t}),!0}function A3(n,e){const t=Wc(e);if(!t)return!1;const o=n.getBlockData(e);return t>1?(n.updateBlockData(e,{...o,padding:t-1}),!0):(n.updateBlockData(e,{...o,padding:null}),!0)}function i1(n){return n.readonly||!n.isWritable()}function II(n){return n.selection.range.getSelectedBlocks().forEach(t=>{const o=t.block;$(n,o)&&EI(n,o)}),!0}function xI(n){return n.selection.range.getSelectedBlocks().forEach(t=>{const o=t.block;$(n,o)&&A3(n,o)}),!0}function TI(n){return i1(n)?!1:n.undoManager.runInGroup(()=>(II(n),!0))}function SI(n){return i1(n)?!1:n.undoManager.runInGroup(()=>(xI(n),!0))}function DI(n){if(i1(n))return!1;if(!n.selection.range.isCollapsed())return;const e=n.selection.focusedBlock;if(!$(n,e))return;const t=n.selection.range.focus;if(!(!t.isSimple()||t.offset!==0||!Wc(e)))return A3(n,e),!0}class b3{renderBlock(e,t,o){const{padding:r}=o;return r?{attributes:{"block-padding-level":r}}:{}}}const QV="",LI={Tab:TI,"Shift+Tab":SI,Backspace:DI},Gc=w("list-block");function ue(n){return se(n)==="list"}function ze(n){d(Gc,ue(n),"not a list block")}function Ot(n){ze(n);const e=n.getAttribute("data-list-type");return d(Gc,e,"no list type"),e}function Zc(n){return ue(n)&&Ot(n)==="text-only"}function Ut(n){var e,t;return ze(n),(t=Number.parseInt((e=n.getAttribute("data-list-start"))!=null?e:"1",10))!=null?t:1}function bt(n){var e,t;return ze(n),(t=Number.parseInt((e=n.getAttribute("data-list-level"))!=null?e:"1",10))!=null?t:1}function ni(n){ze(n);const e=n.getAttribute("data-list-group-id");return d(Gc,e,"no group id"),e}function Lo(n){var i,s,l,c,a;ze(n);const e=(i=n.getAttribute("data-list-type"))!=null?i:"ordered",t=(l=Number.parseInt((s=n.getAttribute("data-list-start"))!=null?s:"1",10))!=null?l:1,o=(a=Number.parseInt((c=n.getAttribute("data-list-level"))!=null?c:"1",10))!=null?a:1,r=n.getAttribute("data-list-group-id");return d(Gc,r,"no group id"),{type:e,start:t,level:o,groupId:r}}function s1(n){switch(n){case"ordered":return{ordered:!0,checkbox:null,textOnly:null};case"unordered":return{ordered:!1,checkbox:null,textOnly:null};case"checked":return{checkbox:"checked",ordered:!1,textOnly:null};case"unchecked":return{checkbox:"unchecked",ordered:!1,textOnly:null};case"text-only":return{checkbox:null,ordered:!1,textOnly:!0};default:return{checkbox:null,ordered:!0,textOnly:!1}}}function Mo(n,e){ze(n);const{level:t,groupId:o,type:r}=Lo(n);let i=ye(n);for(;i;){if(!ue(i))return null;const{level:s,groupId:l,type:c}=Lo(i);if(s<t)return null;if(t===s&&((e==null?void 0:e.ignoreGroupId)||o===l)&&(c==="text-only"||r==="text-only"||r===c))return i;i=ye(i)}return null}function v3(n){return Mo(n,{ignoreGroupId:!0})}function Cr(n){ze(n);const{level:e,groupId:t,type:o}=Lo(n);let r=fe(n);for(;r;){if(ue(r)){const{level:i,groupId:s,type:l}=Lo(r);if(e===i&&t===s&&(l==="text-only"||o==="text-only"||o===l))return r;if(i<e)return null}r=fe(r)}return null}function y3(n){ze(n);const e=[];let t=Mo(n);for(;t;)e.unshift(t),t=Mo(t);return e}function oi(n){ze(n);const e=[];let t=Cr(n);for(;t;)e.push(t),t=Cr(t);return e}function Us(n){ze(n);let e=Mo(n);for(;e;){const t=Mo(e);if(!t)return e;e=t}return n}function MI(n){ze(n);let e=Cr(n);for(;e;){const t=Cr(e);if(!t)return e;e=t}return null}function k3(n,e){const t=y3(n),o=oi(n);return e.withSelf?[...t,n,...o]:[...t,...o]}function ri(n,e,t,o){var i;const r=(i=o==null?void 0:o.groupId)!=null?i:F();e.forEach(s=>{const l=n.getBlockData(s);if(l.start!==t||(o==null?void 0:o.resetGroupId)){const c={...l,start:t};o!=null&&o.resetGroupId&&(c.groupId=r),n.updateBlockData(s,c)}l.textOnly||(t+=1)})}function l1(n,e,t,o){const r=k3(e,{withSelf:!0});r.length!==0&&ri(n,r,t,o)}function RI(n){const e={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1};let t="",o=n;return Object.entries(e).forEach(([r,i])=>{for(;o>=i;)t+=r,o-=i}),t.toLowerCase()}const OI="abcdefghijklmnopqrstuvwxyz";function w3(n){if(n<=0)return`${n}`;const e=(n-1)%26,t=Math.floor((n-1)/26),o=OI[e];return t?w3(t)+o:o}function PI(n){return`${n}`}const B3=[PI,w3,RI];function NI(n,e){const t=B3[(n-1)%B3.length];return t(e)}function FI(n){return["\u2022","\u25E6","\u25AA"][(n-1)%3]}class Ar{constructor(e,t,o){h(this,"listStart");h(this,"listBrother",null);this.editor=e,this.options=o;const r=Us(t),i=Ut(r);this.listStart=i,this.listBrother=r,o!=null&&o.resetStart&&(this.listStart=1)}fix(){!this.listBrother||l1(this.editor,this.listBrother,this.listStart,this.options)}}class $I{constructor(e,t,o){h(this,"listStart");h(this,"listNextBrothers",[]);this.editor=e,this.listNextBrothers=oi(t);const{start:r,resetStart:i}=o||{};this.listStart=i?1:r!=null?r:1}fix(){!this.listNextBrothers.length||ri(this.editor,this.listNextBrothers,this.listStart)}}function _I(n,e,t=1){if(!e)return null;let o=ye(n);for(;o;){const r=o.getAttribute("data-style-heading"),i=Number(o.getAttribute("data-list-level"));if(r){if(r<e)return null;if(r===e&&i===t)return ue(o)?o:null}o=ye(o)}return null}function HI(n,e){const t=n.getAttribute("data-style-heading"),o=_I(n,t);if(o)return o;const r=ye(n);if(r&&ue(r)&&Ot(r)===e)return r;const i=fe(n);return i&&ue(i)&&Ot(i)===e?i:null}function jI(n,e,t){var k,v,T;const o=(k=t.data)!=null?k:{};let r=1;if(ue(e))r=bt(e);else{const E=Wc(e);E&&(r=E+1),r>8&&(r=8)}const i=(v=o.listType)!=null?v:"ordered";if(i==="text-only")return null;const s=n.getBlockData(e);let l=(T=s.text)!=null?T:[],a=ve(l);const u=t.offset||0;u<=at(l)&&(l=kt(l,u).right,a=a.substring(0,u));let f=1;i==="ordered"&&(f=Number.parseInt(a,10)||1);let m=F();const p=HI(e,i);if(p){if(K(e)>K(p))f=Ut(p)+1;else{const R=Ut(p);R>1&&(f=R-1)}m=ni(p),new $I(n,p,{start:f+1}).fix()}const b={id:F(),type:"list",level:r,start:f,groupId:m,ordered:!1,text:l};return s.quoted&&(b.quoted=!0),s.heading&&(b.heading=s.heading),i==="ordered"?b.ordered=!0:(i==="checked"||i==="unchecked")&&(b.checkbox=i),{blockData:b,onConverted:(E,R)=>{new Ar(E,R).fix()}}}function ii(n){return n.textOnly?"text-only":n.checkbox?n.checkbox:n.ordered?"ordered":"unordered"}function zI(n){var t,o;if(n.checkbox||n.textOnly)return"";const e=(t=n.level)!=null?t:1;return n.ordered?`${NI(e,(o=n.start)!=null?o:1)}.`:FI(e)}function Qc(n){return n==="checked"||n==="unchecked"}function E3(n,e,t,o){const r=e,{containerId:i,blockIndex:s}=o[o.length-1];if(s===0)return!0;const l=t.blocks[i][s-1];if(l.type!=="list")return!0;const c=ii(r),a=ii(l);return c!==a&&(!Qc(c)||!Qc(a))||r.level>l.level}function I3(n,e,t,o){const r=e,{containerId:i,blockIndex:s}=o[o.length-1];if(s===t.blocks[i].length-1)return!0;const l=t.blocks[i][s+1];if(l.type!=="list")return!0;const c=ii(r),a=ii(l);return c!==a&&(!Qc(c)||!Qc(a))||r.level>l.level}function UI(n,e,t,o,r){var s,l,c;const i=e;if(o==="text"){let a=((s=wt.convertTo)==null?void 0:s.call(wt,n,e,t,"text",r))||"";i.checkbox==="checked"?a=`[x] ${a}`:i.checkbox==="unchecked"&&(a=`[ ] ${a}`),i.ordered?a=`${i.start}. ${a}`:a=`- ${a}`;const u=i.level||0;return a=(u>0?" ".repeat(u-1):"")+a,a}if(o==="markdown"){let a=((l=wt.convertTo)==null?void 0:l.call(wt,n,e,t,"markdown",r))||"";i.checkbox==="checked"?a=`[x] ${a}`:i.checkbox==="unchecked"&&(a=`[ ] ${a}`),i.ordered?a=`${i.start}. ${a}`:a=`- ${a}`;const u=i.level||0;return a=(u>0?" ".repeat(u-1):"")+a,E3(n,e,t,r)&&(a=`${a}`),I3(n,e,t,r)&&(a=`${a}`,u<=1&&(a+=`
346
- `)),a}if(o==="html"){let a=((c=wt.convertTo)==null?void 0:c.call(wt,n,e,t,"html",r))||"";a=a.replace("<p>","").replace("</p>",""),i.checkbox==="checked"?a=`<input type="checkbox" checked="checked" disabled="disabled" /> ${a}`:i.checkbox==="unchecked"&&(a=`<input type="checkbox" disabled="disabled" /> ${a}`);let u="ul";return i.ordered?(a=`<li value="${i.start}">${a}</li>`,u="ol"):a=`<li>${a}</li>`,E3(n,e,t,r)&&(a=`<${u}>${a}`),I3(n,e,t,r)&&(a=`${a}</${u}>`),a}return""}const VI=8,Re=w("list-block");class Yc{constructor(e,t){h(this,"listStart",0);h(this,"listBrother",null);if(this.editor=e,Zc(t))return;const o=Us(t),r=Ut(o);this.listStart=r,o===t?this.listBrother=Cr(o):this.listBrother=o}fix(){!this.listBrother||l1(this.editor,this.listBrother,this.listStart)}}function qI(n,e,t){n.getBlockData(e).quoted&&(t.quoted=!0)}function c1(n,e,t,o){if(Re.debug("drag a block on a list block"),!$(n,e))return!1;d(Re,ue(t),"target is not a list block");const{type:r,start:i,level:s,groupId:l}=Lo(t),c=o==="after"?i+1:i,a=n.getBlockData(e),u={id:F(),type:"list",groupId:l,level:s,start:c,text:a.text,...s1(r)};qI(n,t,u);let f=K(t);const m=H(t);o==="after"&&(f+=1);let p=null;ue(e)&&(p=new Yc(n,e));const b=n.insertBlock(q(m),f,u,Xl(u.id,0));return n.deleteBlock(e),new Ar(n,b).fix(),p==null||p.fix(),!0}function WI(n,e,t,o){if(Re.debug("drag a list between text blocks"),o==="after"){const a=fe(t);if(a&&ue(a))return c1(n,e,a,"before")}if(o==="before"){const a=ye(t);if(a&&ue(a))return c1(n,e,a,"after")}const i={...n.getBlockData(e),groupId:F(),start:1,level:1};let s=K(t);const l=H(t);o==="after"&&(s+=1),n.insertBlock(q(l),s,i,Xl(i.id,0));const c=new Yc(n,e);return n.deleteBlock(e),c.fix(),!0}function GI(n,e,t,o,r){if(Ol(t))return!1;const{blockId:i}=t,s=n.getBlockById(i);d(Re,s,"no dragged block");const{isSourceBlock:l,targetBlock:c}=r;return!l&&c?(d(Re,e===c,"block !== target block"),d(Re,ue(c),"target is not a list block"),c1(n,s,c,o)):WI(n,s,c,o)}const ZI=`<?xml version="1.0" ?>
347
- <svg t="1666868766077" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3547" width="16" height="16">
348
- <path d="M864 128H160c-17.6 0-32 14.4-32 32v704c0 17.6 14.4 32 32 32h704c17.6 0 32-14.4 32-32V160c0-17.6-14.4-32-32-32zM428 718.4l-45.6 45.6-45.6-45.6-116-117.6 45.6-45.6L383.2 672l367.2-367.2 45.6 45.6-368 368z" p-id="3548" fill="#1296db"></path>
345
+ `;function PB(n,e){var t,o;if(M(e,"menu-item"),!n.element){if(n.type==="section"){const r=A("div",["section-name"],null,n.name);e.appendChild(r)}else if(n.type!=="separator"){if(n.icon){const s=A("div",["menu-item-icon"],null);n.icon&&(s.innerHTML=n.icon),e.appendChild(s)}const r=A("div",["menu-item-name","text"],null),i=A("span",[],r,n.name);if(((t=n.states)==null?void 0:t.includes("disabled"))&&n.disableReason&&(i.setAttribute("data-editor-tooltip-offset-y","25"),i.setAttribute("data-editor-tooltip-maxwidth","800"),i.setAttribute("data-editor-tooltip-placement","right"),i.setAttribute("data-editor-tooltip-common",n.disableReason)),e.appendChild(r),n.subText&&A("div",["item-subtext","text"],e,n.subText),n.children&&!n.element){const s=A("div",["menu-item-sub-indicator"],null);s.innerHTML=k5,e.appendChild(s)}if((o=n.states)!=null&&o.includes("checked")){const s=A("div",["menu-item-checked-icon"],null);s.innerHTML=mB,e.appendChild(s)}}}}class fr extends Sc{constructor(e,t,o){super(e,t,{autoClose:!0,disablePageScroll:!0,...o})}manualShow(e,t){const o={theme:"menu",...t};super.manualShow(e,o)}initCommandBarElement(e){M(e,"menu")}initItemElement(e,t){PB(e,t)}}function NB(n,e,t){var o;return new fr((o=n.children)!=null?o:[],e,{...t,parentItem:n})}function M5(n,e,t){e.setAttribute("data-button-id",n.id),t.tooltipId&&n.name&&!n.disableTooltip&&(e.setAttribute(`data-editor-tooltip-${t.tooltipId}`,n.name),n.desc&&e.setAttribute(`data-editor-tooltip-desc-${t.tooltipId}`,n.desc));const o=e;if(!n.element)if(n.icon){const r=A("span",["toolbar-item-icon-container"],o);n.icon.trim().startsWith("<")?r.innerHTML=n.icon:r.innerText=n.icon}else{const r=A("span",["toolbar-item-name-container"],o);r.innerText=n.name}if(n.dropdown){e.setAttribute("data-dropdown","true");const r=A("span",["toolbar-item-dropdown-container"],o);r.innerHTML=Dc}n.states&&(n.states.indexOf("checked")!==-1&&M(o,"checked"),n.states.indexOf("disabled")!==-1&&(o.disabled=!0))}class Ds extends Sc{constructor(e,t,o){super(e,t,{itemElementTag:"button",tippyArrow:!1,...o})}getSubBarOptions(e){var r,i;const t=()=>{const s=this.getItemElementById(e.id),c=this.content.getBoundingClientRect(),a=s.getBoundingClientRect();return new DOMRect(a.left,c.top,a.width,c.height)};return{placement:(r=e.childrenPlacement)!=null?r:"top",getReferenceClientRect:t,offset:(i=e.childrenOffset)!=null?i:[0,4]}}manualShow(e,t){const o={theme:"toolbar",...t};super.manualShow(e,o)}initCommandBarElement(e){M(e,"toolbar")}initItemElement(e,t){M5(e,t,this.options)}}function FB(n,e,t){var o;return new Ds((o=n.children)!=null?o:[],e,{...t,parentItem:n})}class $B extends hr{constructor(e,t,o){super(t,void 0,o),e.appendChild(this.content),document.addEventListener("keydown",this.handleDocumentKeydown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}initCommandBarElement(e){M(e,"toolbar","fixed")}initItemElement(e,t){M5(e,t,this.options)}close(){this.clearSelectedItem(),this.subBar&&(this.subBar.close(),this.subBar=null)}destroy(){this.content.remove(),super.destroy(),document.removeEventListener("keydown",this.handleDocumentKeydown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}getCommandBarRoot(){return this.content.parentElement}get isVisible(){return!0}}const jV="";hr.registerManualCommandBar("menu",NB),hr.registerManualCommandBar("toolbar",FB);const zV="",R5=w("ui-base");class Ls extends Sc{constructor(t,o){super(Ls.getCommandItems(t,o),void 0,{disablePageScroll:!0,...o});h(this,"handleDocumentMouseDown",t=>{})}initCommandBarElement(t){M(t,"dialog","manual")}initItemElement(t,o){}show(t,o){this.manualShow(t,{...o,theme:"light"})}get dialogContent(){const t=this.items[0];d(R5,t,"no dialog item");const o=t.element;return d(R5,o,"no item element"),o}static getCommandItems(t,o){var s;return[{id:(s=o==null?void 0:o.id)!=null?s:`manual-dialog-${F()}`,name:"",element:t}]}}const UV="",_B=w("ui-base");class O5{constructor(e){h(this,"menu");h(this,"currentText","");h(this,"handleClick",(e,t)=>{this.options.onClickItem(this,t)});h(this,"handleShow",e=>{});h(this,"handleClose",()=>{var e,t;(t=(e=this.options).onClose)==null||t.call(e)});h(this,"handleKeydown",e=>{this.menu.handleDocumentKeydown(e)});this.options=e,this.menu=new fr([],void 0,{id:e.id,header:e.header}),this.menu.addListener("click",this.handleClick),this.menu.addListener("close",this.handleClose),this.menu.addListener("show",this.handleShow)}setItems(e){if(this.menu.updateItems(e),e.length>0){const t=e.find(o=>o.type!=="section"&&o.type!=="separator");t&&this.menu.selectItem(t.id)}}async popup(e,t){var r,i;if(!(t!=null&&t.noEvent)&&((i=(r=this.options).onShow)==null?void 0:i.call(r,this))===!1)return;this.menu.manualShow(e),this.options.placeholder&&this.showPlaceholder();const o=await this.options.queryItems(this,"");this.highlightText(""),this.setItems(o)}showLoading(){!this.options.showLoading||(this.options.loadingElement?this.setItems([{id:"loading",name:"",element:this.options.loadingElement,states:["disabled"]}]):this.setItems([{id:"loading",name:"loading",states:["disabled"]}]))}showPlaceholder(){this.setItems([{id:"placeholder",name:"enter text to search",states:["disabled"]}])}showNoResultMessage(e){if(this.options.noResultMessage){const t={name:"",id:"placeholder",states:["disabled"]};typeof this.options.noResultMessage=="string"?t.name=this.options.noResultMessage:(this.options.noResultMessage instanceof HTMLElement||typeof this.options.noResultMessage=="function")&&(t.element=this.options.noResultMessage),this.setItems([t])}else this.setItems([{id:"placeholder",name:I.t("search.emptyTips"),states:["disabled"]}])}close(){this.menu.close()}get isVisible(){return this.menu.isVisible}destroy(){this.menu.close(),this.menu.removeAllListeners(),this.menu.destroy()}async handleSearchText(e){this.currentText=e;const t="auto-suggest";try{await Zt.lock(t),this.showLoading();const o=this.currentText,r=await this.options.queryItems(this,o);if(this.currentText===o&&(this.currentText=""),r.length===0){this.showNoResultMessage(e);return}this.setItems(r),this.options.highlight&&this.highlightText(o.replace(/^\s+|\s+$/g,""))}finally{Zt.release(t)}}highlightText(e){_B.debug(`highlight menu text: ${e}`);const t=this.menu.content,o=(i,s)=>{if(!s)return i;let l="";const c=s.length,a=s.toLocaleLowerCase();let u=0;for(u=0;u<=i.length-c;u){let f=i.substring(u,u+c);if(f.toLocaleLowerCase()===a){u+=c;const m=i.charAt(u);let p=!1;f.endsWith(" ")&&(p=!0,f=f.trimEnd()),l+=`<span class="highlight">${f}${m===" "||p?"&nbsp":""}</span>`}else l+=i.charAt(u),u++}return u<i.length&&(l+=i.substring(u)),l},r=i=>{if(ne(i,"text")){const s=i.textContent;if(!s)return;const l=o(s,e);i.innerHTML=l;return}Array.from(i.children).forEach(r)};r(t)}}class Sh{constructor(e,t){h(this,"root");h(this,"input");h(this,"text");h(this,"dropdownIcon");h(this,"clearIcon");h(this,"autoSuggest");h(this,"labels");h(this,"items",[]);h(this,"handleClick",()=>{this.autoSuggest.popup(this.root),this.input.focus()});h(this,"handleClickItem",(e,t)=>{var o,r;(r=(o=this.options)==null?void 0:o.onClickItem)==null||r.call(o,t)});h(this,"handleInput",()=>{this.autoSuggest.handleSearchText(this.input.value),this.updatePlaceholder()});h(this,"handleClear",e=>{var t,o;this.clear(),this.autoSuggest.handleSearchText(""),e.preventDefault(),e.stopPropagation(),(o=(t=this.options)==null?void 0:t.onClear)==null||o.call(t)});h(this,"handleQueryItems",async(e,t)=>this.items.filter(r=>{var i;return(i=this.options)!=null&&i.filter?this.options.filter(r,t):!0}));h(this,"handleShow",()=>{M(this.root,"active"),this.input.focus()});h(this,"handleClose",()=>{var e,t;(t=(e=this.options)==null?void 0:e.onClose)==null||t.call(e),_(this.root,"active")});var c,a,u,f,m;this.options=t,this.labels=(a=(c=this.options)==null?void 0:c.labels)!=null?a:[];const{root:o,input:r,text:i,clearIcon:s,dropdownIcon:l}=Sh.createDropdown(e,this.labels);this.root=o,this.input=r,this.text=i,this.clearIcon=s,this.dropdownIcon=l,this.autoSuggest=new O5({id:(t==null?void 0:t.popupId)||"dropdown-auto-suggest",header:(u=this.options)==null?void 0:u.header,onClickItem:this.handleClickItem,queryItems:this.handleQueryItems,onClose:this.handleClose,onShow:this.handleShow}),this.items=(m=(f=this.options)==null?void 0:f.items)!=null?m:[],this.root.addEventListener("click",this.handleClick),this.input.addEventListener("input",this.handleInput),this.clearIcon.addEventListener("click",this.handleClear)}close(){this.autoSuggest.close()}destroy(){this.input.removeEventListener("input",this.handleInput),this.root.removeEventListener("click",this.handleClick),this.clearIcon.removeEventListener("click",this.handleClear),this.autoSuggest.destroy()}updateItems(e){this.items=e,this.autoSuggest.handleSearchText("")}setText(e){this.text.innerText=e,this.input.value=e,this.updatePlaceholder()}clear(){this.setText(""),this.setLabels([])}setLabels(e){this.labels=e,this.updateLabels()}static createDropdown(e,t){const o=A("div",["editor-dropdown","empty"],e),r=A("input",["dropdown-input"],o),i=A("div",["dropdown-text"],o),s=A("div",["dropdown-labels"],o);for(let a=0;a<t.length;a+=1){const u=t[a];A("span",["dropdown-label"],s,u)}const l=A("div",["dropdown-clear-icon"],o);l.innerHTML=OB;const c=A("div",["dropdown-icon"],o);return c.innerHTML=Dc,{root:o,input:r,text:i,clearIcon:l,dropdownIcon:c}}updateLabels(){const e=this.root.querySelector(".dropdown-labels");if(e){e.innerHTML="";for(let t=0;t<this.labels.length;t+=1){const o=this.labels[t];A("span",["dropdown-label"],e,o)}}}updatePlaceholder(){var e;if(this.input.value===""){const t=(e=this.options)==null?void 0:e.placeholder;t&&(this.input.placeholder=t,this.text.textContent=t),M(this.root,"empty")}else _(this.root,"empty")}}const HB=[-1,6,0,1,2,3,4,5],jB=[-1,6,0,1,2,3,4,5,14,13,7,8,9,10,11,12],P5=w("color-palette");function N5(n,e,t,o){d(P5,n>0,"no color in palette");const r=e||1;d(P5,r>0,`invalid palette rows: ${r}`);const i=n/r,s=A("div",["palette-container",o],null);for(let l=0;l<r;l++){const c=A("div",["palette-container-row"],s);for(let a=0;a<i;a++){const u=t(l*i+a);c.appendChild(u)}}return s}function zB(n){const e=A("button",["color-button"],null),t=HB[n];return e.setAttribute("data-color-index",`${t}`),e.innerHTML=y5,e}function UB(n){const e=A("button",["background-color-button"],null),t=jB[n];return e.setAttribute("data-color-index",`${t}`),e}function VB(){const n=A("div",["clear-button-container"],null),e=A("button",["clear-button"],n);return e.innerText=I.t("colorPalette.reset"),n}function qB(n){const e=A("div",["color-palette"],null);return n.color!==!1&&(A("div",["bar-desc"],e,I.t("colorPalette.colorDesc")),e.appendChild(N5(8,1,zB,"color"))),n.backgroundColor!==!1&&(A("div",["bar-desc"],e,I.t("colorPalette.backgroundDesc")),e.appendChild(N5(16,2,UB,"background-color"))),n.clearColorButton!==!1&&e.appendChild(VB()),e}function WB(n,e,t){const o=e==="color"?"color":"background-color",r=n.querySelector(`.${o} button.selected`);r&&_(r,"selected"),t===null&&(t=-1);const i=n.querySelector(`.${o} button[data-color-index="${t}"]`);i&&M(i,"selected")}const VV="",GB={};class ZB extends Ve.TypedEmitter{constructor(t=GB){super();h(this,"root");h(this,"handleClick",t=>{const o=t.target;if(!o||!(o instanceof Element))return;const r=o.closest("button");if(!r)return;if(ne(r,"clear-button")){this.setColor("backgroundColor",null),this.setColor("color",null),this.emit("onClick","clearColor",0);return}const i=r.getAttribute("data-color-index");if(!i)return;const s=Number.parseInt(i,10);Number.isNaN(s)||(ne(r,"color-button")?s===-1?(this.setColor("color",null),this.emit("onClick","clearColor",1)):(this.setColor("color",s),this.emit("onClick","color",s)):s===-1?(this.setColor("backgroundColor",null),this.emit("onClick","clearColor",2)):(this.setColor("backgroundColor",s),this.emit("onClick","backgroundColor",s)))});this.options=t,this.root=qB(t),this.root.addEventListener("click",this.handleClick)}destroy(){this.removeAllListeners(),this.root.removeEventListener("click",this.handleClick)}setColor(t,o){WB(this.root,t,o)}}class F5{constructor(e,t){h(this,"name","Color Palette");h(this,"element");h(this,"palette");h(this,"closeable",null);this.id=e,this.palette=new ZB(t),this.element=this.palette.root}setCloseable(e){this.closeable=e}destroy(){this.palette.destroy(),this.closeable=null}}function QB(){const n=A("button",["color-button"],null);return n.innerHTML=y5,n}function Dh(n,e){const[t,o]=e;t===null?n.removeAttribute("data-color"):n.setAttribute("data-color",`${t}`),o===null?n.removeAttribute("data-background-color"):n.setAttribute("data-background-color",`${o}`)}class YB extends Ve.TypedEmitter{constructor(t){super();h(this,"id","text-color-item");h(this,"name",I.t("colorPalette.name"));h(this,"dropdown",!0);h(this,"manualShowChildren",!0);h(this,"children",[]);h(this,"element");h(this,"colorPaletteItem");h(this,"latestColors",[null,null]);h(this,"handlePaletteClick",(t,o)=>{this.emit("onClick",t,o),t==="color"||t==="backgroundColor"?t==="color"?this.latestColors[0]=o:this.latestColors[1]=o:this.latestColors=[null,null],Dh(this.element,this.latestColors)});h(this,"beforePopup",()=>{this.emit("beforePopup")});this.editor=t,this.colorPaletteItem=new F5("text-color-palette-item"),this.colorPaletteItem.palette.addListener("onClick",this.handlePaletteClick),this.children.push(this.colorPaletteItem),this.element=QB()}destroy(){this.colorPaletteItem.destroy()}updatePaletteColor(t){this.colorPaletteItem.palette.setColor("color",t[0]),this.colorPaletteItem.palette.setColor("backgroundColor",t[1]),this.latestColors=t,Dh(this.element,this.latestColors)}updateButtonColor(t){this.latestColors=t,Dh(this.element,this.latestColors)}}const qV="";function Lh(n,e){const t=A("div",["editor-input-wrap"],n);e!=null&&e.className&&M(t,e==null?void 0:e.className);const o=A("div",["editor-input-label"],t);A("span",[],o,e.label),e.required&&M(o,"required");const r=A("div",["editor-input-container"],t),i=A("input",["editor-input"],r);e.placeholder&&(i.placeholder=e.placeholder),e.defaultValue&&(i.value=e.defaultValue);const s=A("div",["editor-input-error"],t);return i.addEventListener("input",l=>{var c;(c=e.onChange)==null||c.call(e,l),_(t,"error")}),i.addEventListener("keydown",l=>{var c;(c=e.onKeyDown)==null||c.call(e,l)}),{getField:()=>i,getInputValue:()=>i.value,setFieldError:l=>{M(t,"error"),s.innerText=l},focus:()=>{setTimeout(()=>{i.focus()})}}}function Mh(n){const e=document.getSelection();if(!e)return!0;const t=e.focusNode;if(!t)return!0;const o=e.focusOffset,r=t.childNodes[o];if(!r)return!0;if(r instanceof HTMLElement){const i=r.tagName.toLowerCase();if(r===n.input.inputElement)return!0;if(i==="input"||i==="textarea")return!1}return!0}class JB extends O5{constructor(t,o){super(o);h(this,"handleClose",()=>{var t,o;Mh(this.editor)&&this.editor.focus(),(o=(t=this.options).onClose)==null||o.call(t)});this.editor=t,this.editorOptions=o}async popupInEditor(t,o,r){var a,u;if(((u=(a=this.editorOptions).onShow)==null?void 0:u.call(a,this,t,o,r))===!1)return;this.options.showLoading&&this.showLoading();const i=this.editor.getBlockByIndex(t,o);if(!Ce(this.editor.rootContainer,i)||G(this.editor,i)<r)return;const s=ho(this.editor,i,Fe(this.editor,i,r));if(s.length===0)return;const l=s[0],c=go(this.editor,i,"editor-auto-suggest-menu",l);super.popup(c,{noEvent:!0})}}const Rh=w("auto-suggest-menu");class Oh{constructor(e,t){h(this,"menu");h(this,"anchor",null);h(this,"close",()=>{this.menu.close()});h(this,"handleSelectionChanged",e=>{var o,r;if(!((o=this.menu)!=null&&o.isVisible))return;const t=e.selection.range.start;if(t.isSimple()&&t.blockId===((r=this.anchor)==null?void 0:r.blockId)&&t.offset>=this.anchor.offset){const i=e.getBlockById(t.blockId);if(ve(kt(pt(e,i),t.offset).left).startsWith(this.anchor.leftText))return}this.menu.close()});h(this,"deleteTrigger",()=>{const e=this.editor,t=e.selection.range.start;if(!t.isSimple()||!this.anchor)return!1;const{blockId:o,offset:r}=t,i=e.getBlockById(o),s=ve(tc(e,i,r));if(d(Rh,this.anchor,"no anchor"),!s.startsWith(this.anchor.leftText))return!1;const l=this.anchor.offset-this.anchor.trigger.length,c=r-l;return e.selection.selectBlock(i,l),c&&(e.deleteTextFromBlock(i,l,c),this.anchor.offset-=this.anchor.trigger.length),this.anchor.trigger.length||this.menu.close(),!0});h(this,"onClose",()=>{var e,t;(t=(e=this.options).onClose)==null||t.call(e)});h(this,"onShow",(e,t,o,r)=>{var i;if((i=this.options)!=null&&i.onShow)return this.options.onShow(this,t,o,r)});h(this,"onClickItem",(e,t)=>{!this.anchor||(this.options.autoDeleteTrigger&&this.deleteTrigger(),this.options.onClickItem(this,t,this.anchor))});h(this,"queryItems",(e,t)=>this.options.queryItems(this,t));h(this,"renderMenuItem",(e,t)=>{var r,i;return(i=(r=this.options).renderMenuItem)==null?void 0:i.call(r,this,t)});this.editor=e,this.options=t,this.menu=new JB(e,{id:t.id,showLoading:t.showLoading,loadingElement:t.loadingElement,placeholder:t.placeholder,noResultMessage:t.noResultMessage,highlight:t.highlight,onClose:this.onClose,onShow:this.onShow,onClickItem:this.onClickItem,queryItems:this.queryItems,renderMenuItem:this.renderMenuItem}),e.input.addHandler(this),e.addListener("selectionChanged",this.handleSelectionChanged)}handleBeforeKeyDown(e,t){var o;return!((o=this.menu)!=null&&o.isVisible)||yu(t.key)?!1:Hm(t)&&!Zo(t)?(setTimeout(()=>{this.resetItems()}),!1):ku(t)?(this.menu.close(),!0):(this.menu.handleKeydown(t),!0)}popup(e,t,o,r){this.anchor={blockId:j(e),offset:t,leftText:o,trigger:r};const i=q(H(e)),s=K(e);this.menu.popupInEditor(i,s,t)}handleAfterInsertText(e,t,o,r,i){var u;const s=e.selection.range.start;if(!s.isSimple()||!this.options.enableFirstBlock&&t==="root"&&o===0)return!1;const{blockId:l,offset:c}=s,a=e.getBlockByIndex(t,o);if(j(a)!==l)return!1;if((u=this.menu)!=null&&u.isVisible)this.resetItems();else if(this.options.trigger.indexOf(i)!==-1){if(r>0&&this.options.needSpaceBeforeTrigger&&e.getBlockString(a)[r-1]!==" ")return!1;const f=ve(tc(e,a,c));this.popup(a,c,f,i)}return!1}handleUpdateCompositionText(e,t,o,r,i){var a;const s=e.selection.range.start;if(!s.isSimple())return!1;const{blockId:l}=s,c=e.getBlockByIndex(t,o);return j(c)!==l||(a=this.menu)!=null&&a.isVisible&&this.resetItems(),!1}resetItems(){var l;if(!((l=this.menu)!=null&&l.isVisible))return;const e=this.editor,t=e.selection.range.start;if(!t.isSimple())return;const{blockId:o,offset:r}=t,i=e.getBlockById(o),s=ve(tc(e,i,r));if(d(Rh,this.anchor,"no anchor"),s.startsWith(this.anchor.leftText)){const c=s.substring(this.anchor.leftText.length);Rh.debug(`search text: ${c}`),this.menu.handleSearchText(c)}}destroy(){var e;this.editor.input.removeHandler(this),this.editor.removeListener("selectionChanged",this.handleSelectionChanged),(e=this.menu)==null||e.destroy()}}function KB(){const n={};for(let e=1;e<=8;e++)n[`heading-${e}`]={shortcut:`/h${e}`};return n}const XB={"insert-hr":{shortcut:"/hr"},"insert-uml":{shortcut:"/uml"},"insert-table":{shortcut:"/table"},"insert-image":{shortcut:"/image"},"insert-code":{shortcut:"/code"},"insert-link":{shortcut:"/link"},"insert-drawio":{shortcut:"/uml"},"insert-video":{shortcut:"/video"},"insert-audio":{shortcut:"/audio"},"insert-math":{shortcut:"/math"},"insert-webPage":{shortcut:"/web"},"insert-bilibili":{shortcut:"/bilibili"},"insert-youku":{shortcut:"/youku"},"insert-figma":{shortcut:"/figma"},"insert-modao":{shortcut:"/modao"},"insert-tencent":{shortcut:"/tencent"},"insert-unordered":{shortcut:"/bl"},"insert-ordered":{shortcut:"/nu"},"insert-checkbox":{shortcut:"/todo"},"insert-quote":{shortcut:"/quote"},...KB()};function At(n){var e;return(e=XB[n])==null?void 0:e.shortcut}function eE(n){var e;return(e=n.subText)!=null?e:""}const xn=w("table-dom");function Xn(n){return`${j(n)}_scroll`}function je(n){const e=n.querySelector("div[data-type=table-content] >table");return d(xn,e instanceof HTMLTableElement,"invalid table"),e}function Tn(n,e){const o=n.getCustom(Xn(e)).contentElement.firstElementChild;d(xn,o instanceof HTMLElement,"invalid table content");let r=o.querySelector(":scope >div[data-type=table-tools]");return r||(r=A("div",[],o),r.setAttribute("data-type","table-tools")),d(xn,r,"no table tools"),r}function tE(n,e){return n.findCustom(Xn(e))?Tn(n,e):null}function $5(n){const e=[];return Array.from(n.rows).forEach(t=>{e.push(...Array.from(t.cells))}),e}function Ms(n){const e=n.querySelector(":scope div[data-type=editor-container]");return d(xn,e,"no child container in cell"),e}function nE(n){const o=$5(n).map(r=>{const i=Ms(r),s=q(i),l=r.colSpan,c=r.rowSpan;return`${s}/${l}/${c}`}).join();return Bl.default(o)}function Ze(n){return se(n)==="table"}function Ph(n){const e=H(n);if(Ae(e))return null;const t=z(e);return d(xn,t,"no parent block"),Ze(t)?e:Ph(t)}function eo(n){if(Ze(n))return n;const e=H(n);if(Ae(e))return null;const t=z(e);return d(xn,t,"no parent block"),Ze(t)?t:eo(t)}function oE(n,e){const t=n.querySelector("colgroup");d(xn,t,"no colgroup");const o=t.children[e];return d(xn,o,"no col"),d(xn,o instanceof HTMLTableColElement,`invalid col: ${o.tagName}`),o}function _5(n){try{return je(n),!0}catch{return!1}}function rE(n){return Ne(n).querySelector(":scope > .block-helper")}function H5(n){const e=z(n.contentElement);d(xn,e,"no block");const t=rE(e);if(t){const o=Math.min(n.contentElement.offsetLeft,n.rootElement.scrollLeft),r=e.getBoundingClientRect().width;t.style.right=`${o+r}px`}}const Mt=w("doc-table-grid");class iE{constructor(e){h(this,"_cells",[]);for(let t=0;t<e;t++)this._cells.push(void 0)}cols(){return this._cells.length}setCell(e,t){d(Mt,e>=0&&e<this.cols(),`set cell, invalid col: ${e}`),this._cells[e]=t}getCell(e){d(Mt,e>=0&&e<this.cols(),`get cell, invalid col: ${e}`);const t=this._cells[e];return d(Mt,t,"get cell, no cell"),t}getCellAllowEmpty(e){return d(Mt,e>=0&&e<this.cols(),`get cell, invalid col, ${e}`),this._cells[e]}getNextNonVirtualCell(e){return this._cells.slice(e+1).find(t=>!t.virtual)}forEach(e){this._cells.forEach(e)}}class Mc{constructor(e){h(this,"_data");h(this,"_rows");this._data=e,this._rows=[];for(let t=0;t<this.rowCount;t++)this._rows.push(new iE(this.colCount));this.fillGrid(),d(Mt,e.colsWidth,"no colsWidth"),d(Mt,this.colCount===e.colsWidth.length,"invalid col count")}get rowCount(){return this._data.rows}get colCount(){return this._data.cols}getNextEmptyCell(e,t){let o=e,r=t;for(;;){if(o+=1,o===this.colCount&&(o=0,r+=1),r>=this.rowCount)return null;if(this._rows[r].getCellAllowEmpty(o)===void 0)return{col:o,row:r}}}fillGrid(){const e=this._data.children;d(Mt,e,"no children");let t=0,o=0;e.forEach((r,i)=>{const s=this._data[`${r}_colSpan`]||1,l=this._data[`${r}_rowSpan`]||1;for(let a=0;a<l;a++)for(let u=0;u<s;u++)this._rows[o+a].setCell(t+u,{col:t,row:o,containerId:r,virtual:u!==0||a!==0,colSpan:s,rowSpan:l});const c=this.getNextEmptyCell(t,o);c?(t=c.col,o=c.row):d(Mt,i===e.length-1,`invalid table data, no next empty cell: ${JSON.stringify(this._data)}`)}),this._rows.forEach(r=>{r.forEach(i=>{d(Mt,i,"no cell"),d(Mt,i.containerId,"no containerId")})})}getCell(e){const{col:t,row:o}=e,r=this._rows[o];d(Mt,r,`get cell, no row: ${o}`);const i=r.getCell(t);return d(Mt,i,`get cell, no cell: ${t}`),i}getRow(e){const t=this._rows[e];return d(Mt,t,`get row, no row: ${e}`),t}forEach(e){this._rows.forEach(e)}}const Rc=w("table-data");function sE(n){const e=n.firstElementChild;return d(Rc,e,"no child element for cell"),d(Rc,Un(e),"cell first child is not a container"),d(Rc,en(e),"cell first child is not a container"),e}function lE(n){const e=z(n);d(Rc,e,"no parent block for table");const t=[],o={};Array.from(n.rows).forEach(l=>{Array.from(l.cells).forEach(c=>{const a=sE(c),u=q(a);t.push(u),(c.colSpan>1||c.rowSpan>1)&&(o[`${u}_colSpan`]=c.colSpan,o[`${u}_rowSpan`]=c.rowSpan)})});const r=n.rows.length,i=Array.from(n.rows[0].cells).map(l=>l.colSpan).reduce((l,c)=>l+c,0);return{id:j(e),type:se(e),rows:r,cols:i,children:t,colsWidth:Array(i).fill(100),...o}}function mr(n){return new Mc(n)}function cE(n){return mr(lE(n))}const Qe=w("table-grid"),aE=60;class uE{constructor(e,t){h(this,"containerId");h(this,"row");h(this,"col");h(this,"colSpan");h(this,"rowSpan");h(this,"virtual");h(this,"table");this.table=e,this.containerId=t.containerId,this.row=t.row,this.col=t.col,this.colSpan=t.colSpan,this.rowSpan=t.rowSpan,this.virtual=t.virtual}get cell(){const t=this.container.closest("td");return d(Qe,t,"no parent cell for child container"),t}get container(){const e=this.table.querySelectorAll(`[data-container-id=${this.containerId}]`);d(Qe,e.length===1,"containers !== 1"),d(Qe,Un(e[0]),"not a container");const t=e[0];return d(Qe,en(t),"not a child container"),t}}class dE{constructor(e,t){h(this,"_cells",[]);t.forEach(o=>{this._cells.push(new uE(e,o))})}get cells(){return this._cells}getCell(e){return d(Qe,e<this._cells.length,"get cell, invalid col"),this._cells[e]}getNextNonVirtualCell(e){return this._cells.slice(e+1).find(t=>!t.virtual)}getSpannedCell(){return this._cells.find(e=>e.virtual||e.colSpan>1||e.rowSpan>1)}}const Vf=class{constructor(e){h(this,"_rows",[]);this.table=e,cE(e).forEach(r=>{this._rows.push(new dE(e,r))});const o=this.colCount;this._rows.forEach(r=>{d(Qe,r.cells.length===o,"row.cells.length !== colCount")})}get rowCount(){return this._rows.length}get colCount(){return this._rows.length===0?0:(d(Qe,this.rowCount>0,"rowCount <= 0"),this.getRow(0).cells.length)}getRow(e){return this._rows[e]}getCell(e){const t=this.getRow(e.row);return d(Qe,t,"no row"),t.getCell(e.col)}getCellContainer(e){return this.getCell(e).container}getFirstCellContainer(){return this.getCellContainer({row:0,col:0})}getLastCellContainer(){const e=this.rowCount-1,t=this.colCount-1;return this.getCellContainer({row:e,col:t})}getColumnCells(e){d(Qe,e>=0&&e<this.colCount,"colIndex out of range");const t=this.rowCount,o=[];for(let r=0;r<t;r++){const i=this.getCell({row:r,col:e});o.push(i)}return o}toRealCells(e){const t=[];return e.forEach(o=>{const r=this.getRealCell(o);t.findIndex(i=>i.containerId===r.containerId)===-1&&t.push(r)}),t}getColumnRealCells(e){const t=this.getColumnCells(e);return this.toRealCells(t)}getRowRealCells(e){const t=this.getRow(e).cells;return this.toRealCells(t)}getFirstSpannedCell(e){d(Qe,e>=0&&e<this.colCount,"colIndex out of range");const t=this.rowCount;for(let o=0;o<t;o++){const r=this.getCell({row:o,col:e});if(r.virtual||r.colSpan>1||r.rowSpan>1)return r}}getRealCell(e){const t=this.getCell(e);if(!t.virtual)return t;const o=this.getCellById(t.containerId);return d(Qe,!o.virtual,"found a virtual cell"),o}getColumnSpannedRange(e){const t=this.getColumnRealCells(e);let o=1e5,r=-1;return t.forEach(i=>{o=Math.min(i.col,o),r=Math.max(i.col+i.colSpan-1,r)}),d(Qe,o<=r,"min > max"),d(Qe,o>=0,"min < 0"),d(Qe,r<this.colCount,"max >= colCount"),[o,r]}getRowSpannedRange(e){const t=this.getRowRealCells(e);let o=1e5,r=-1;return t.forEach(i=>{o=Math.min(i.row,o),r=Math.max(i.row+i.rowSpan-1,r)}),d(Qe,o<=r,"min > max"),d(Qe,o>=0,"min < 0"),d(Qe,r<this.rowCount,"max >= rowCount"),[o,r]}getSpannedRange(e,t){const o=Math.min(e.row,t.row),r=Math.max(e.row,t.row),i=Math.min(e.col,t.col),s=Math.max(e.col,t.col),l=[];for(let p=o;p<=r;p++)for(let b=i;b<=s;b++)l.push(this.getCell({row:p,col:b}));const c=this.toRealCells(l);let a=1e4,u=1e4,f=-1,m=-1;return c.forEach(p=>{u=Math.min(p.col,u),a=Math.min(p.row,a),m=Math.max(p.col+p.colSpan-1,m),f=Math.max(p.row+p.rowSpan-1,f)}),[{row:a,col:u},{row:f,col:m}]}getAllCells(){return this.getCells({col:0,row:0},{col:this.colCount-1,row:this.rowCount-1})}sub(e,t){const o=[];for(let r=e.row;r<=t.row;r++){const i=[];for(let s=e.col;s<=t.col;s++){const l=this.getCell({row:r,col:s});i.push(l)}o.push(i)}return o}getAllContainers(){return this.getAllCells().map(t=>t.container)}getCells(e,t){const o=[],r=this.getSpannedRange(e,t),i=r[0],s=r[1],l=Math.min(i.row,s.row),c=Math.max(i.row,s.row),a=Math.min(i.col,s.col),u=Math.max(i.col,s.col);for(let f=l;f<=c;f++)for(let m=a;m<=u;m++){const p=this.getCell({row:f,col:m});p.virtual||o.push(p)}return o}map(e){const t=[];for(let o=0;o<this.rowCount;o++){const r=[];for(let i=0;i<this.colCount;i++){const s=this.getCell({row:o,col:i});r.push(e(s))}t.push(r)}return t}getBottomCell(e){const t=this.rowCount;let o=e,r=e.row;for(;o.containerId===e.containerId;){if(r+=1,r>=t)return null;o=this.getCell({row:r,col:e.col})}return this.getRealCell(o)}getTopCell(e){let t=e,o=e.row;for(;t.containerId===e.containerId;){if(o-=1,o<0)return null;t=this.getCell({row:o,col:e.col})}return this.getRealCell(t)}get cells(){let e=[];return this._rows.forEach(t=>{e=e.concat(t.cells)}),e}getVirtualCellContainersGrid(){return this.map(e=>e.containerId)}static virtualCellContainersGridToChildren(e){const t=e,o=[];return t.forEach(r=>{r.forEach(i=>{o.indexOf(i)===-1&&o.push(i)})}),o}getCellById(e){const o=this.cells.find(r=>r.containerId===e);return d(Qe,o,"cell not found"),o}getCellByCellElement(e){const t=Ms(e);return this.getCellByContainerId(q(t))}getCellByContainerId(e){return this.getCellById(e)}static fromTable(e){const t=nE(e),o=this.caches.getSync(t,()=>(Qe.debug("create table grid"),new Vf(e)));return o.table!==e?(this.caches.delete(t),this.fromTable(e)):o}static fromBlock(e){return this.fromTable(je(e))}};let re=Vf;h(re,"caches",new Am(aE));function Oc(n,e){Object.entries(n).forEach(([t])=>{t.startsWith(`${e}/`)&&delete n[t]})}const hE=w("table-selection-range");function hn(n,e,t){var E,R,L,P;const o=re.fromBlock(n),r=e,i=t,s=o.getCellByContainerId(r.childContainerId),l=o.getCellByContainerId(i.childContainerId),c=r.custom,a=i.custom,u=(E=c==null?void 0:c.rowIndex)!=null?E:s.row,f=(R=c==null?void 0:c.colIndex)!=null?R:s.col,m=(L=a==null?void 0:a.rowIndex)!=null?L:l.row+l.rowSpan-1,p=(P=a==null?void 0:a.colIndex)!=null?P:l.col+l.colSpan-1,b=Math.min(u,m),k=Math.max(u,m),v=Math.min(f,p),T=Math.max(f,p);return{fromRow:b,toRow:k,fromCol:v,toCol:T}}function Nh(n,e){const t=new Set,o=new Set,r=n.selection.range;if(!r.isSimple()&&r.start.blockId===j(e)){const i=re.fromBlock(e),{start:s,end:l}=r;d(hE,!s.isSimple()&&!l.isSimple(),"invalid range");const{fromCol:c,toCol:a,fromRow:u,toRow:f}=hn(e,s,l);if(u===0&&f===i.rowCount-1)for(let m=c;m<=a;m++)o.add(m);if(c===0&&a===i.colCount-1)for(let m=u;m<=f;m++)t.add(m)}return{selectedRows:t,selectedColumns:o}}function Rs(n,e){let t=null;if(e.isCollapsed()&&e.isSimple()){const o=n.getBlockById(e.start.blockId);if(Ze(o)){const r=H(o),i=z(r);i&&(t=eo(i))}else t=eo(o)}else{const o=n.getBlockById(e.start.blockId),r=eo(o),i=n.getBlockById(e.end.blockId),s=eo(i);r===s&&(t=r)}return t}const Yr=w("delete-columns");function j5(n,e,t){const{start:o,end:r}=t;if(o.blockId!==r.blockId||t.isSimple()||n.getBlockById(o.blockId)!==e||se(e)!=="table")return!1;const{fromRow:s,toRow:l}=hn(e,t.start,t.end),c=re.fromBlock(e);return s===0&&l===c.rowCount-1}function Fh(n){const e=n.getEditor();e.undoManager.runInGroup(()=>{var R;const t=e.getBlockById(n.start.blockId);if(!j5(e,t,n))return;if(n.isSimple()){e.deleteBlock(t);return}const{fromCol:o,toCol:r}=hn(t,n.start,n.end),i=re.fromBlock(t);if(o===0&&r===i.colCount-1){e.deleteBlock(t);return}const s=new Set,l=i.map(L=>L.containerId);for(let L=0;L<l.length;L++){const P=l[L];for(let V=o;V<=r;V++){const ee=P[V];s.add(ee)}P.splice(o,r-o+1)}const c=new Set(l.flat()),a=new Set(Array.from(s).filter(L=>!c.has(L))),u=r-o+1,f=new Map,m=new Map;s.forEach(L=>{if(a.has(L))return;const P=i.getCellByContainerId(L);if(d(Yr,P.colSpan>1,"invalid effected cell, colSpan === 1"),P.col<o){d(Yr,c.has(L),"invalid effected cell, not exists");let we=P.col+P.colSpan-1;we>r&&(we=r);const ft=we-o+1,lo=P.colSpan-ft;f.set(L,lo);return}d(Yr,P.col<=r,"invalid effected cell, col > endCol");const V=P.col,ee=P.col+P.colSpan-1,ie=P.col-o,pe=ee-V+1-u+ie;d(Yr,pe>0,"invalid effected cell, newSpanned <= 0");const de=Qn(e.doc);m.set(L,{newContainerId:de,colSpan:pe})});for(let L=0;L<l.length;L++){const P=l[L];for(let V=o;V<P.length;V++){const ee=P[V],ie=m.get(ee);ie&&(P[V]=ie.newContainerId)}}const p=Q.default(e.getBlockData(t));p.colsWidth.splice(o,r-o+1),a.forEach(L=>{Oc(p,L)}),f.forEach((L,P)=>{d(Yr,L>=1,"invalid modified colSpan, colSpan < 1"),L===1?p[`${P}_colSpan`]=void 0:p[`${P}_colSpan`]=L}),m.forEach((L,P)=>{Oc(p,P);const{newContainerId:V,colSpan:ee}=L;d(Yr,ee>=1,"invalid newContainerData, colSpan < 1"),ee>1&&(p[`${V}_colSpan`]=ee);const ie=i.getCellByContainerId(P).rowSpan;ie>1&&(p[`${V}_rowSpan`]=ie)});const k=(R=l[0][o])!=null?R:l[0][o-1],v=e.getChildContainerData(k)[0],T=re.virtualCellContainersGridToChildren(l),E={...p,cols:p.cols-u,children:T};mr(E),e.updateBlockData(t,E,Fe(e,v.id,0)),e.deleteChildContainers(Array.from(a)),e.deleteChildContainers(Array.from(m.keys()))})}const Jr=w("delete-rows");function z5(n,e,t){const{start:o,end:r}=t;if(o.blockId!==r.blockId||t.isSimple()||n.getBlockById(o.blockId)!==e||se(e)!=="table")return!1;const{fromCol:s,toCol:l}=hn(e,t.start,t.end),c=re.fromBlock(e);return s===0&&l===c.colCount-1}function $h(n){const e=n.getEditor();e.undoManager.runInGroup(()=>{const t=e.getBlockById(n.start.blockId);if(!z5(e,t,n))return;if(n.isSimple()){e.deleteBlock(t);return}const{fromRow:o,toRow:r}=hn(t,n.start,n.end),i=re.fromBlock(t);if(o===0&&r===i.rowCount-1){e.deleteBlock(t);return}const s=new Set,l=i.map(E=>E.containerId);for(let E=r;E>=o;E--)l[E].forEach(L=>s.add(L)),l.splice(E,1);const c=new Set(l.flat()),a=new Set(Array.from(s).filter(E=>!c.has(E))),u=r-o+1,f=new Map,m=new Map;s.forEach(E=>{if(a.has(E))return;const R=i.getCellByContainerId(E);if(d(Jr,R.rowSpan>1,"invalid effected cell, rowSpan === 1"),R.row<o){d(Jr,c.has(E),"invalid effected cell, not exists");let pe=R.row+R.rowSpan-1;pe>r&&(pe=r);const de=pe-o+1,we=R.rowSpan-de;f.set(E,we);return}d(Jr,R.row<=r,"invalid effected cell, col > endCol");const L=R.row,P=R.row+R.rowSpan-1,V=R.row-o,ee=P-L+1-u+V;d(Jr,ee>0,"invalid effected cell, newSpanned <= 0");const ie=Qn(e.doc);m.set(E,{newContainerId:ie,rowSpan:ee})});for(let E=o;E<l.length;E++){const R=l[E];for(let L=0;L<R.length;L++){const P=R[L],V=m.get(P);V&&(R[L]=V.newContainerId)}}const p=Q.default(e.getBlockData(t));a.forEach(E=>{Oc(p,E)}),f.forEach((E,R)=>{d(Jr,E>=1,"invalid modified rowSpan, rowSpan < 1"),E===1?p[`${R}_rowSpan`]=void 0:p[`${R}_rowSpan`]=E}),m.forEach((E,R)=>{Oc(p,R);const{newContainerId:L,rowSpan:P}=E;d(Jr,P>=1,"invalid newContainerData, rowSpan < 1"),P>1&&(p[`${L}_rowSpan`]=P);const V=i.getCellByContainerId(R).colSpan;V>1&&(p[`${L}_colSpan`]=V)});const b=l[o]?l[o][0]:l[o-1][0],k=e.getChildContainerData(b)[0],v=re.virtualCellContainersGridToChildren(l),T={...p,rows:p.rows-u,children:v};mr(T),e.updateBlockData(t,T,Fe(e,k.id,0)),e.deleteChildContainers(Array.from(a)),e.deleteChildContainers(Array.from(m.keys()))})}const Os=w("table-range");function Pc(n){d(Os,!n.isSimple(),"must be complex selection range");const{anchor:e,focus:t}=n;d(Os,!e.isSimple(),"invalid start pos type"),d(Os,!t.isSimple(),"invalid end pos type");const o=n.getEditor();d(Os,e.blockId===t.blockId,"invalid range, not same block");const r=o.getBlockById(e.blockId);d(Os,se(r)==="table","invalid block type, not a table block");const i=je(r),s=re.fromTable(i),l=s.getCellByContainerId(e.childContainerId),c=s.getCellByContainerId(t.childContainerId),a=Math.min(l.row,c.row),u=Math.max(l.row,c.row),f=Math.min(l.col,c.col),m=Math.max(l.col,c.col),p=s.getCell({row:a,col:f}),b=s.getCell({row:u,col:m});return{editor:o,block:r,table:i,startCell:p,endCell:b,startRow:a,startCol:f,endRow:u,endCol:m}}const _h=w("split-cell");function Hh(n,e,t){n.undoManager.runInGroup(()=>{const o=re.fromBlock(e),r=o.getRealCell(t);d(_h,!r.virtual,"should not split virtual cell"),d(_h,r.colSpan>1||r.rowSpan>1,"cell does not has span data");const i=o.getVirtualCellContainersGrid();for(let f=0;f<r.rowSpan;f++)for(let m=0;m<r.colSpan;m++){if(f===0&&m===0)continue;const p=f+r.row,b=m+r.col,k=Qn(n.doc);i[p][b]=k}const s=n.getBlockData(e),l=Q.default(s);l[`${r.containerId}_colSpan`]=null,l[`${r.containerId}_rowSpan`]=null,l.children=re.virtualCellContainersGridToChildren(i);const a=n.getChildContainerData(r.containerId)[0];d(_h,a,"no child block");const u=Fe(n,a.id,0);mr(l),n.updateBlockData(e,l,u)})}function fE(n,e,t){t.forEach(o=>{const r=re.fromBlock(e).getCell(o);(r.virtual||r.colSpan>1||r.rowSpan>1)&&Hh(n,e,o)})}function U5(n,e,t){if(t.isSimple())return!1;const{start:o,end:r}=t;if(o.blockId!==r.blockId||n.getBlockById(o.blockId)!==e||se(e)!=="table")return!1;const{startCell:s,endCell:l}=Pc(t);return!(s.cell!==l.cell||s.colSpan===1&&s.rowSpan===1)}function jh(n){const{editor:e,block:t,startRow:o,startCol:r,endRow:i,endCol:s}=Pc(n),l=[];for(let c=o;c<=i;c++)for(let a=r;a<=s;a++)l.push({row:c,col:a});return fE(e,t,l),!0}const Kr=w("merge-cells");function V5(n,e,t){if(t.isSimple())return!1;const{start:o,end:r}=t;if(o.blockId!==r.blockId||n.getBlockById(o.blockId)!==e||se(e)!=="table")return!1;const{startCell:s,endCell:l}=Pc(t);return s.cell!==l.cell}function q5(n){const e=Pc(n),t=e.editor;t.undoManager.runInGroup(()=>{const o=e.endCell,r=o.row+o.rowSpan-1,i=o.col+o.colSpan-1,s=j(e.block);jh(n);const l=t.getBlockById(s),c=je(l),{startRow:a,startCol:u}=e,f=Q.default(t.getBlockData(l));d(Kr,f.children,"no table children");const m=re.fromTable(c),p=[];for(let pe=a;pe<=r;pe++)for(let de=u;de<=i;de++){const we=m.getCell({row:pe,col:de});d(Kr,!we.virtual,"cell is virtual"),p.push(we)}d(Kr,p.length>0,"no selected cells");const b=p[0],k=p.slice(1),v=m.getCellByContainerId(b.containerId).container,T=[];k.forEach(pe=>{const de=m.getCellByContainerId(pe.containerId).container,we=q(de);if(!qu(t,de)){const ft=K0(t,we);t.insertDocAt(v,Yt(v),ft)}T.push(we)});const E=q(v),R=i-u+1,L=r-a+1;f[`${E}_colSpan`]=R,f[`${E}_rowSpan`]=L,T.forEach(pe=>{d(Kr,f.children,"no table children");const de=f.children.indexOf(pe);d(Kr,de>0,"no deleted container"),f.children.splice(de,1)});const P=f,ee=t.getChildContainerData(E)[0];d(Kr,ee,"no child block");const ie=Fe(t,ee.id,0);mr(P),t.updateBlockData(l,P,ie),t.deleteChildContainers(T)})}const zh=10,mE=["table/merge-cells","table/split-cell","table/insert-column","table/insert-row","table/delete-rows","table/delete-columns","table/delete"];class Uh{constructor(){h(this,"id","TableBlockCommandProvider")}getAvailableCommands(e,t,o){if(se(t)!=="table")return[];const r={blockId:j(t),blockKind:Kt(e,t),blockType:se(t)},i=[];V5(e,t,o)&&i.push({id:"table/merge-cells",name:I.t("table.mergeCell"),icon:Xw,groupIndex:zh,...r}),U5(e,t,o)&&i.push({id:"table/split-cell",name:I.t("table.splitCell"),icon:eB,groupIndex:zh,...r});const s=j5(e,t,o),l=z5(e,t,o);return s&&l&&i.push({id:"table/delete",name:I.t("table.deleteTable"),icon:tB,groupIndex:zh,...r}),i}executeCommand(e,t,o,r,i,s){return se(t)!=="table"||!new Set(mE).has(r.id)?!1:r.id==="table/merge-cells"?(q5(o),!0):r.id==="table/split-cell"?(jh(o),!0):r.id==="table/delete-columns"?(Fh(o),!0):r.id==="table/delete-rows"?($h(o),!0):r.id==="table/delete"?(e.deleteBlock(t),!0):!1}}var W5=(n=>(n.COL_TITLE_TABLE="col-title-table",n.COL_TITLE_ITEM="col-title-item",n.STRIPE_STYLE_TABLE="stripe-style-table",n.NO_BORDER="table-no-border",n))(W5||{});const Vh=6,Ps=20,qh="table-cell-menu-btn";function gE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),hasColTitle:!0};n.updateBlockData(e,o)}function pE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),hasColTitle:!1};n.updateBlockData(e,o)}function CE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),hasRowTitle:!0};n.updateBlockData(e,o)}function AE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),hasRowTitle:!1};n.updateBlockData(e,o)}function bE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),isStripeStyle:!0};n.updateBlockData(e,o)}function vE(n,e){if(!n.isBlockWritable(e))return;const o={...Q.default(n.getBlockData(e)),isStripeStyle:!1};n.updateBlockData(e,o)}function yE(n,e,t){if(!n.isBlockWritable(e))return;const r={...Q.default(n.getBlockData(e)),noBorder:!t};n.updateBlockData(e,r)}const Wh=w("get-selected-containers");function Gh(n,e,t,o){d(Wh,t.blockId===o.blockId,"only allow select in single table block"),d(Wh,j(e)===t.blockId,"only allow select in single table block");const r=re.fromBlock(e),i=r.getCellByContainerId(t.childContainerId),s=r.getCellByContainerId(o.childContainerId);if(t.custom===void 0||o.custom===void 0)return r.getCells(i,s).map(v=>r.getCellContainer(v));const{fromCol:l,toCol:c,fromRow:a,toRow:u}=hn(e,t,o),f=new Set,m=[];return r.sub({row:a,col:l},{row:u,col:c}).forEach(b=>{b.forEach(k=>{const v=r.getCellByContainerId(k.containerId);v.col<l||v.row<a||v.col+v.colSpan-1>c||v.row+v.rowSpan-1>u||f.has(k.containerId)||(f.add(k.containerId),m.push(v.container))})}),m}function kE(n,e,t){d(Wh,e.blockId===t.blockId,"only allow select in single table block");const o=n.getBlockById(e.blockId);return Gh(n,o,e,t)}const gr=w("table-cell-dom");function wE(n,e,t){let o=n.getBlockById(t);for(;o;){const r=o.closest("td");d(gr,r,"no parent cell");const i=z(r);if(d(gr,i,"no parent block"),i===e)return r;o=i}return d(gr,!1,"filed to get cell by child block id"),null}function to(n,e,t){if(n.getBlockById(t.blockId)===e&&!t.isSimple())return d(gr,t.childContainerId,"block position must have childContainerId attribute"),t;const r=wE(n,e,t.blockId),i=q(Ms(r));return xe(e,i)}function Zh(n,e){const t=n.selection.range,o=to(n,e,t.start),r=to(n,e,t.end);return hn(e,o,r)}function G5(n,e,t,o){d(gr,Ze(e),"invalid table block");const r=Tn(n,e),i=()=>{const l=r.querySelector(".table-border-bar-container.top");d(gr,l,"no top border bar container"),l.querySelectorAll(".table-border-bar-cell.top").forEach(a=>{const u=parseInt(a.getAttribute("data-top-index")||"0",10);o.includes(u)?M(a,"danger"):_(a,"danger")})},s=()=>{const l=r.querySelector(".table-border-bar-container.left");d(gr,l,"no left border bar container"),l.querySelectorAll(".table-border-bar-cell.left").forEach(a=>{const u=parseInt(a.getAttribute("data-left-index")||"0",10);t.includes(u)?M(a,"danger"):_(a,"danger")})};i(),s()}function To(n,e,t=!0,o){const i=re.fromBlock(e).map(u=>u),{fromCol:s,toCol:l,fromRow:c,toRow:a}=Zh(n,e);for(let u=0;u<i.length;u++){const f=i[u];for(let m=0;m<f.length;m++){const p=f[m],b=o?m>=s&&m+p.colSpan-1<=l:u>=c&&u+p.rowSpan-1<=a;t&&b?p.virtual||M(p.cell,"danger"):p.virtual||_(p.cell,"danger")}}}function So(n,e,t=!0,o){const r=new Set,i=new Set;if(!t){G5(n,e,Array.from(r),Array.from(i));return}const{fromCol:s,toCol:l,fromRow:c,toRow:a}=Zh(n,e);if(o)for(let u=s;u<=l;u++)i.add(u);else for(let u=c;u<=a;u++)r.add(u);G5(n,e,Array.from(r),Array.from(i))}function Z5(n,e,t){const{fromCol:o,toCol:r,fromRow:i,toRow:s}=Zh(n,e),l=re.fromBlock(e);let c=null,a=null;return t?(c=l.getCell({col:o,row:0}),a=l.getCell({col:r,row:l.rowCount-1}),We(n,{anchor:xe(e,c.containerId,{colIndex:o,rowIndex:0}),focus:xe(e,a.containerId,{colIndex:r,rowIndex:l.rowCount-1})})):(c=l.getCell({col:0,row:i}),a=l.getCell({col:l.colCount-1,row:s}),We(n,{anchor:xe(e,c.containerId,{colIndex:0,rowIndex:i}),focus:xe(e,a.containerId,{colIndex:l.colCount-1,rowIndex:s})}))}function BE(n,e){const t=n.selection.range,o=to(n,e,t.start),r=to(n,e,t.end);return Gh(n,e,o,r)}const Q5=["style-bg-color-0","style-bg-color-1","style-bg-color-2","style-bg-color-3","style-bg-color-4","style-bg-color-5","style-bg-color-6","style-bg-color-7","style-bg-color-8","style-bg-color-9","style-bg-color-10","style-bg-color-11","style-bg-color-12","style-bg-color-13"];function Y5(n){return`style-bg-color-${n}`}function Ns(n){return`${n}_background`}function EE(n,e,t){const o=je(n),s=(t!=null?t:re.fromTable(o)).getCell(e).cell;for(let l=0;l<Q5.length;l++){const c=Q5[l];if(ne(s,c))return c}}function J5(n,e,t){if(!n.isBlockWritable(e))return;const o=n.selection.range,i={...Q.default(n.getBlockData(e))},s=to(n,e,o.start),l=to(n,e,o.end);if(o.isSimple()){const c=s.childContainerId;t===-1?i[Ns(c)]=void 0:i[Ns(c)]=Y5(t)}else{const c=re.fromBlock(e),a=hn(e,s,l),u=new Set;for(let f=a.fromRow;f<=a.toRow;f++)for(let m=a.fromCol;m<=a.toCol;m++){const p=c.getCell({row:f,col:m});!u.has(p.containerId)&&p.col>=a.fromCol&&p.row>=a.fromRow&&p.col+p.colSpan-1<=a.toCol&&p.row+p.rowSpan-1<=a.toRow&&(u.add(p.containerId),t===-1?i[Ns(p.containerId)]=void 0:i[Ns(p.containerId)]=Y5(t))}}n.updateBlockData(e,i)}function IE(n,e,t){if(!n.isBlockWritable(e))return;const r={...Q.default(n.getBlockData(e)),chart:t};n.updateBlockData(e,r)}const K5=w("table-chart");function xE(n,e){const t=tE(n,e);if(t){const o=t.querySelector(".editor-table-chart");if(o){const r=o.chartObject;r&&r.destroy(),o.remove()}}}async function TE(n,e){if(!n.isBlockWritable(e))return;if(!!!n.getBlockData(e).chart){xE(n,e);return}const r=[],i=re.fromBlock(e),s=["line","bar","pie","radar"];let l=i.getCell({row:0,col:0}).container.innerText.trim().toLowerCase();new Set(s).has(l)||(l=s[0]);const c=[];for(let k=1;k<i.colCount;k++)c.push(i.getCell({row:0,col:k}).container.innerText);for(let k=1;k<i.rowCount;k++){const v=i.getCell({row:k,col:0}),E=v.container.innerText,R=[];for(let ft=1;ft<i.colCount;ft++){const lo=i.getCell({row:k,col:ft}).container.innerText,st=Number.parseFloat(lo)||0;R.push(st)}let L;const P=EE(e,v,i);P?L=window.getComputedStyle(n.rootElement).getPropertyValue(`--${P}`).trim():L=window.getComputedStyle(n.rootElement).getPropertyValue("--background-color").trim();let[V,ee,ie,pe]=L?lu.fromString(L).toRgbaArray():[];if(!V&&!ee&&!ie&&!pe){const ft=(k-1)%n.options.colors.length;L=n.options.colors[ft],[V,ee,ie,pe]=lu.fromString(L).toRgbaArray()}const de=L,we=lu.fromRgba([V,ee,ie,pe/3]).toHexString();r.push({label:E,data:R,borderColor:de,backgroundColor:we,borderWidth:2})}const a=Tn(n,e);let u=null,f=a.querySelector(".editor-table-chart");f?u=f.chartObject:f=A("div",["editor-table-chart"],a);const m=f;d(K5,m,"no chart container");const p=n.getComponentOptions("table"),b=(p==null?void 0:p.chartCdn)||"https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js";try{await Wo(b,"editor-chartjs"),u&&l!==u.config.type&&(u.destroy(),u=null,Array.from(f.querySelectorAll(".editor-chartjs-canvas")).forEach(T=>{T.remove()}));const k=cu.default({},{type:l,data:{datasets:r,labels:c},options:{onClick:()=>{n.selection.selectBlock(e,0,0)}}});if(u)cu.default(u.config,k),u.update();else{const T=A("canvas",["editor-chartjs-canvas"],m).getContext("2d");u=new window.Chart(T,k),f.chartObject=u}}catch(k){K5.error(`failed to resolve chart cdn: ${JSON.stringify(k)}`)}}async function X5(n,e){await Zt.lock("updateTableChart");try{await TE(n,e)}finally{Zt.release("updateTableChart")}}const e3=nt.default(X5,1e3);let t3=null;function Qh(n,e,t){if(t3!==e&&(e3.flush(),t3=e),t.updateNow){X5(n,e);return}e3(n,e)}function Yh(n,e){Ze(e)&&Qh(n,e,{updateNow:!1})}function SE(n,e){Ze(e)&&Qh(n,e,{updateNow:!0})}const jt={SCROLL:"container-scroll-tool",COMMON:"container-border-shadow",RIGHT:"container-right-border-shadow",LEFT:"container-left-border-shadow",LAYOUT_SIGN:"container-layout-border-shadow",ACTIVE:"active"},Nc={SCROLL_BAR:"container-scrollbar",FIXED:"fixed"},Do={SCROLL_CONTAINER:"scroll-container",TOOL:"container-scroll-tool",CONTAINER:"scroll-container-root",MAC:"mac",SCROLL_AREA:"scroll-area"};function Fc(n,e){return n.containers.get(e)}function n3(n){return n.closest(`.${Do.SCROLL_CONTAINER}`)}function fn(n){return n.firstElementChild}function Rt(n){return n.closest(`.${Do.CONTAINER}`)}function Fs(n){const e=Rt(n);let t=e.querySelector(`:scope >.${Do.TOOL}`);return t||(t=A("div",[Do.TOOL],e)),t}function DE(n){return Rt(n).firstElementChild}function $c(n){let e;return n instanceof HTMLElement?e=n.offsetWidth:e=Number.parseInt(getComputedStyle(n).width,10),n.getBoundingClientRect().width/e}function zt(n,e){const t=$c(n);return e/t}function $s(n){const e=window.getComputedStyle(n),t=$c(n);return{paddingBottom:parseFloat(e.paddingBottom)*t,paddingTop:parseFloat(e.paddingTop)*t,paddingLeft:parseFloat(e.paddingLeft)*t,paddingRight:parseFloat(e.paddingRight)*t}}function Xr(n){const e=$c(n);return{scrollLeft:n.scrollLeft*e,scrollWidth:n.scrollWidth*e,clientWidth:n.clientWidth*e,clientHeight:n.clientHeight*e}}function LE(n,e){const t=$c(n);return n[e]*t}function Jh(n,e){const t=Rt(e),o=Fc(n,t),r=(o==null?void 0:o.safeRightSpace)||0,i=(o==null?void 0:o.safeLeftSpace)||0,l=(o==null?void 0:o.locatingContainer).getBoundingClientRect(),c=t.getBoundingClientRect(),a=c.width;let u=Math.floor(c.left-l.left-i);u<0&&(u=0);let f=l.right;f-=r;let m=f-c.right;return m<0&&(m=0),u=Math.round(u),m=Math.round(m),{originWidth:a,maxLeft:u,maxRight:m}}function ME(n,e){const t=Jh(n,e),{maxLeft:o}=t;e.style.marginLeft=`${zt(e,0-o)}px`,e.style.paddingLeft=`${zt(e,o)}px`}function RE(n,e){const t=Jh(n,e);e.style.marginRight=`${zt(e,0-t.maxRight)}px`}function OE(n){if(n!==document.documentElement&&n!==document.body)return n.getBoundingClientRect();const e=0,t=0,o=document.documentElement.clientWidth,r=document.documentElement.clientHeight;return new DOMRect(e,t,o,r)}const o3=w("scroll-bar-handle"),PE=2;function ei(n){const e=Fs(n);let t=e.querySelector(`.${Nc.SCROLL_BAR}`);return t||(t=A("div",[Nc.SCROLL_BAR],e)),d(o3,t instanceof HTMLDivElement,"invalid child for container tools"),t.firstElementChild||A("div",[],t),t}function _c(n,e){const t=n3(e),o=ei(t),{scrollWidth:r,clientWidth:i}=Xr(t),{paddingLeft:s,paddingRight:l}=$s(e);t.style.marginLeft="",t.style.paddingLeft="",t.style.marginRight="";const c=Jh(n,t),{originWidth:a,maxRight:u}=c;RE(n,t),ME(n,t);const f=r-i;d(o3,o.firstElementChild instanceof HTMLDivElement,"invalid child for scroll bar"),o.style.width=`${zt(t,a+u-s-l)}px`,o.firstElementChild.style.width=`${zt(t,a+u+f-s-l)}px`}function NE(n,e){const t=fn(n),{paddingLeft:o}=$s(t);if(ne(e,"fixed")){const i=Rt(n).getBoundingClientRect();e.style.left=`${zt(n,i.left+o)}px`}else e.style.left=`${zt(n,o)}px`}function ti(n,e){var E;const t=n.getParentScrollContainer(),o=OE(t),r=e.getBoundingClientRect(),i=ei(e),s=i.getBoundingClientRect(),l=Fc(n,Rt(e)),c=(l==null?void 0:l.barFloatWindowBottom)||0,a=fn(e),{paddingTop:u,paddingBottom:f}=$s(a),{scrollWidth:m,clientWidth:p}=Xr(e),b=document.documentElement.clientHeight-c,k=o.top+Xr(t).clientHeight-b,v=b+Math.min(0,k);if(m>p&&r.top+u<v-s.height&&r.bottom>v-s.height+f&&!((E=l==null?void 0:l.isSetScale)!=null&&E.call(l))){M(i,Nc.FIXED);const R=k>0?c:0;i.style.bottom=`${Math.max(document.documentElement.clientHeight-o.bottom,0)+PE+R}px`}else _(i,Nc.FIXED),i.style.bottom=`${zt(e,f-s.height)}px`;NE(e,i)}class FE{constructor(e,t){h(this,"intersectionObserver");h(this,"handleIntersection",e=>{e.forEach(t=>{this.containers.get(Rt(t.target))?(this.handleIntersectionEntry(t),this.callback(t)):this.intersectionObserver.unobserve(t.target)})});h(this,"handleIntersectionEntry",e=>{const t=e.target;ti(this.scrollCore,t);const o=fn(t);_c(this.scrollCore,o)});this.scrollCore=e,this.callback=t;const r={root:this.scrollCore.getParentScrollContainer(),rootMargin:"20px",threshold:0};this.intersectionObserver=new IntersectionObserver(this.handleIntersection,r)}get containers(){return this.scrollCore.containers}bind(e){this.unbind(e),this.intersectionObserver.observe(e)}unbind(e){this.intersectionObserver.unobserve(e)}destroy(){this.intersectionObserver.disconnect()}}const pr=w("container-scroll-shadow");function r3(n,e,t){const o=n,r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),{paddingTop:s,paddingBottom:l}=$s(t);o.style.top=`${zt(e,i.top-r.top+s)}px`,o.style.bottom=`${zt(e,r.bottom-i.bottom+l)}px`}function i3(n,e){const t=n;e<24?t.style.width=`${(e/3).toFixed(2)}px`:t.style.width=""}function $E(n){const e=Fs(n);d(pr,e,"no container tools");let t=e.querySelector(`.${jt.LEFT}`);if(!t){const l=fn(n),c=[jt.COMMON,jt.LEFT];t=A("div",c,e),d(pr,t instanceof HTMLDivElement,"invalid child for container tools"),r3(t,n,l)}d(pr,t instanceof HTMLElement,"invalid child for container tools");const r=Rt(n).getBoundingClientRect(),i=n.getBoundingClientRect();t.style.left=`${zt(n,i.left-r.left)}px`;const s=Xr(n).scrollLeft;d(pr,t instanceof HTMLDivElement,"invalid child for container tools"),i3(t,s),M(t,jt.ACTIVE)}function _E(n){const e=Fs(n);let t=e.querySelector(`.${jt.RIGHT}`);if(!t){const u=fn(n),f=[jt.COMMON,jt.RIGHT];t=A("div",f,e),d(pr,t instanceof HTMLDivElement,"no div, create shadow failed"),r3(t,n,u)}d(pr,t instanceof HTMLElement,"");const r=Rt(n).getBoundingClientRect(),i=n.getBoundingClientRect();t.style.right=`${zt(n,r.right-i.right)}px`;const{scrollWidth:s,scrollLeft:l,clientWidth:c}=Xr(n),a=s-l-c;d(pr,t instanceof HTMLDivElement,"no shadow element"),i3(t,a),M(t,jt.ACTIVE)}function HE(n){const t=Fs(n).querySelector(`.${jt.LEFT}`);t&&_(t,jt.ACTIVE)}function jE(n){const t=Fs(n).querySelector(`.${jt.RIGHT}`);t&&_(t,jt.ACTIVE)}function _s(n){const{scrollLeft:e,scrollWidth:t,clientWidth:o}=Xr(n),r=fn(n),{paddingLeft:i,paddingRight:s}=$s(r),l=LE(r,"offsetLeft");t-i<=o-s||t-i<=e+o-s?jE(n):_E(n),r&&e>=l+i?$E(n):HE(n)}class zE{constructor(e,t){h(this,"resizeObserver");h(this,"handleResizeEntry",e=>{const t=e.target,o=fn(t);_s(t),_c(this.scrollCore,o),ti(this.scrollCore,t),this.callback(t)});h(this,"handleContentResize",e=>{e.forEach(t=>{this.containers.get(Rt(t.target))?this.handleResizeEntry(t):this.unbind(t.target)})});this.scrollCore=e,this.callback=t,this.resizeObserver=new ResizeObserver(this.handleContentResize)}get containers(){return this.scrollCore.containers}bind(e){this.unbind(e),this.resizeObserver.observe(e)}unbind(e){this.resizeObserver.unobserve(e)}destroy(){this.resizeObserver.disconnect()}}const s3=w("container-scroll-observer");class UE{constructor(e,t){h(this,"handleContentScroll",e=>{const t=e.target;d(s3,t instanceof Element,"invalid target for scroll event");const o=ei(t);o.removeEventListener("scroll",this.handleScroll);const r=!0;this.fixScrollXPos(t,t.scrollLeft,r),this.bind(o),_s(t),this.callback(t)});h(this,"handleScroll",e=>{const t=e.target;d(s3,t instanceof HTMLElement,"");const o=t.scrollLeft,r=!1,i=DE(t);this.unbindContentScroll(i),this.fixScrollXPos(i,o,r),this.bindContentScroll(i),_s(i),this.callback(i)});h(this,"handlePrevent",e=>{e.stopPropagation()});h(this,"bindContentScrollCore",e=>{this.unbindContentScroll(e),e.addEventListener("scroll",this.handleContentScroll)});h(this,"unbindContentScroll",e=>{e.removeEventListener("scroll",this.handleContentScroll)});h(this,"bindContentScroll",nt.default(this.bindContentScrollCore,300));h(this,"bind",nt.default(this.bindCore,200));this.scrollCore=e,this.callback=t}fixScrollXPos(e,t,o){const r=ei(e);o||(e.scrollLeft=t),o&&r.scrollLeft!==t&&(r.scrollLeft=t)}bindCore(e){this.unbind(e),e.addEventListener("scroll",this.handleScroll),e.addEventListener("mousedown",this.handlePrevent)}unbind(e){e.removeEventListener("scroll",this.handleScroll),e.removeEventListener("mousedown",this.handlePrevent)}}class VE{constructor(e){h(this,"scrollContainers",new Set);h(this,"handleParentContainerScroll",()=>{this.scrollContainers.forEach(e=>{ti(this.scrollCore,e)})});h(this,"bindScrollContainer",e=>{const t=this.scrollContainers.size===0;this.scrollContainers.add(e),t&&this.eventTarget.addEventListener("scroll",this.handleParentContainerScroll)});h(this,"unbindScrollContainer",e=>{let t=!1;this.scrollContainers.has(e)&&(this.scrollContainers.delete(e),t=this.scrollContainers.size===0),t&&this.eventTarget.removeEventListener("scroll",this.handleParentContainerScroll)});this.scrollCore=e}get eventTarget(){const e=this.scrollCore.getParentScrollContainer();return e===document.documentElement?document:e}destroy(){this.eventTarget.removeEventListener("scroll",this.handleParentContainerScroll),this.scrollContainers.clear()}}const qE=w("scroll-wrap-resize-observer");class WE{constructor(e){h(this,"resizeObserver");h(this,"handleScrollWrapResize",e=>{e.forEach(t=>{this.containers.get(Rt(t.target))?this.handleScrollWrapResizeEntry(t):this.unbind(t.target)})});h(this,"handleScrollWrapResizeEntry",e=>{const t=e.target;d(qE,t instanceof HTMLElement,"invalid target for observer entry");const o=n3(t);_c(this.scrollCore,t),_s(o),ti(this.scrollCore,o)});this.scrollCore=e,this.resizeObserver=new ResizeObserver(this.handleScrollWrapResize)}get containers(){return this.scrollCore.containers}bind(e){this.unbind(e),this.resizeObserver.observe(e)}unbind(e){this.resizeObserver.unobserve(e)}destroy(){this.resizeObserver.disconnect()}}class GE{constructor(e,t){h(this,"resizeObserver");h(this,"scrollContainersMap",new Map);h(this,"handleResizeEntry",e=>{e==null||e.forEach(t=>{const o=fn(t);_s(t),_c(this.scrollCore,o),ti(this.scrollCore,t),this.callback(t)})});h(this,"handleResize",e=>{e.forEach(t=>{const o=this.scrollContainersMap.get(t.target);o!=null&&o.length&&this.handleResizeEntry(o)})});this.scrollCore=e,this.callback=t,this.resizeObserver=new ResizeObserver(this.handleResize)}bind(e){var r,i;const t=Rt(e),o=(r=Fc(this.scrollCore,t))==null?void 0:r.locatingContainer;this.scrollContainersMap.has(o)?(i=this.scrollContainersMap.get(o))==null||i.push(e):(this.scrollContainersMap.set(o,[e]),this.resizeObserver.observe(o))}unbind(e){var i,s;const t=Rt(e),o=(i=Fc(this.scrollCore,t))==null?void 0:i.locatingContainer;if(!o)return;const r=this.scrollContainersMap.get(o);this.scrollContainersMap.set(o,(r==null?void 0:r.filter(l=>l!==e))||[]),(s=this.scrollContainersMap.get(o))!=null&&s.length||(this.resizeObserver.unobserve(o),this.scrollContainersMap.delete(o))}destroy(){this.scrollContainersMap.clear(),this.resizeObserver.disconnect()}}const WV="";class ZE extends Ve.TypedEmitter{constructor(t){super();h(this,"containerIntersectionObserver",null);h(this,"containerResizeObserver",null);h(this,"containerScrollObserver",null);h(this,"parentContainerScrollObserver",null);h(this,"scrollWrapResizeObserve",null);h(this,"locatingContainerResizeObserver",null);h(this,"isWindowEventBind",!1);h(this,"containers",new Map);h(this,"handleScrollContainerScroll",t=>{this.emit("scroll",this,t)});h(this,"handleResize",t=>{this.emit("resize",this,t)});h(this,"handleIntersection",t=>{const o=t.target,r=fn(o);t.isIntersecting?(this.load(),this.bindCore(o,r)):this.unbindCore(o,r)});h(this,"handleWindowEffect",()=>{var t;(t=this.getScrollContainerInViewable())==null||t.forEach(o=>{ti(this,o)})});this.parentContainer=t}load(){this.containerResizeObserver||(this.containerResizeObserver=new zE(this,this.handleResize)),this.containerScrollObserver||(this.containerScrollObserver=new UE(this,this.handleScrollContainerScroll)),this.parentContainerScrollObserver||(this.parentContainerScrollObserver=new VE(this)),this.scrollWrapResizeObserve||(this.scrollWrapResizeObserve=new WE(this)),this.locatingContainerResizeObserver||(this.locatingContainerResizeObserver=new GE(this,this.handleResize)),this.isWindowEventBind||(window.addEventListener("resize",this.handleWindowEffect),this.getParentScrollContainer()!==document.documentElement&&window.addEventListener("scroll",this.handleWindowEffect))}getParentScrollContainer(){return this.parentContainer}getScrollContainerInViewable(){var t;return(t=this.parentContainerScrollObserver)==null?void 0:t.scrollContainers}unbindCore(t,o){var i,s,l,c,a,u;const r=ei(t);(i=this.containerScrollObserver)==null||i.unbindContentScroll(t),(s=this.containerScrollObserver)==null||s.unbind(r),(l=this.scrollWrapResizeObserve)==null||l.unbind(o),(c=this.containerResizeObserver)==null||c.unbind(t),(a=this.parentContainerScrollObserver)==null||a.unbindScrollContainer(t),(u=this.locatingContainerResizeObserver)==null||u.unbind(t)}bindCore(t,o){var i,s,l,c,a,u;if(this.unbindCore(t,o),!t.closest("body"))return;const r=ei(t);(i=this.containerScrollObserver)==null||i.bindContentScrollCore(t),(s=this.containerScrollObserver)==null||s.bindCore(r),(l=this.scrollWrapResizeObserve)==null||l.bind(o),(c=this.containerResizeObserver)==null||c.bind(t),(a=this.parentContainerScrollObserver)==null||a.bindScrollContainer(t),(u=this.locatingContainerResizeObserver)==null||u.bind(t)}bind(t,o){this.containers.set(t,o);const r=t.firstElementChild;this.containerIntersectionObserver||(this.containerIntersectionObserver=new FE(this,this.handleIntersection)),this.containerIntersectionObserver.bind(r)}unbind(t){var i;const o=t.firstElementChild,r=fn(o);this.unbindCore(o,r),this.containers.delete(t),(i=this.containerIntersectionObserver)==null||i.unbind(o),this.containers.size||this.destroy()}destroy(){var t,o,r,i,s;this.containers.forEach((l,c)=>{this.unbind(c)}),this.containers.clear(),(t=this.parentContainerScrollObserver)==null||t.destroy(),(o=this.containerIntersectionObserver)==null||o.destroy(),(r=this.containerResizeObserver)==null||r.destroy(),(i=this.scrollWrapResizeObserve)==null||i.destroy(),(s=this.locatingContainerResizeObserver)==null||s.destroy(),window.removeEventListener("resize",this.handleWindowEffect),window.removeEventListener("scroll",this.handleWindowEffect)}}const l3=w("scroll-container"),Hc=new Map;class QE extends Ve.TypedEmitter{constructor(){super(...arguments);h(this,"scrollListener");h(this,"options");h(this,"scrollContainerElement");h(this,"init",t=>{this.options=t;const o=A("div",[Do.CONTAINER],t.parentElement);ot.isMac&&M(o,Do.MAC);const r=A("div",[Do.SCROLL_CONTAINER],o),i=A("div",[Do.SCROLL_AREA],r);i.style.paddingLeft=t.paddingLeft?`${t.paddingLeft}px`:"",i.style.paddingTop=t.paddingTop?`${t.paddingTop}px`:"",i.style.paddingBottom=t.paddingBottom?`${t.paddingBottom}px`:"",i.style.paddingRight=t.paddingRight?`${t.paddingRight}px`:"",i.appendChild(t.childElement);const s=t.parentContainer;this.scrollListener=Hc.get(s),this.scrollListener||(this.scrollListener=new ZE(s),Hc.set(s,this.scrollListener)),this.scrollListener.unbind(o),this.scrollListener.bind(o,t),this.scrollListener.on("scroll",this.handleContainerScroll),this.scrollListener.on("resize",this.handleResize),this.scrollContainerElement=r});h(this,"handleContainerScroll",(t,o)=>{o===this.scrollContainerElement&&this.emit("scroll",this)});h(this,"handleResize",(t,o)=>{o===this.scrollContainerElement&&this.emit("scroll",this)})}get rootElement(){return this.scrollContainerElement}get contentElement(){return d(l3,this.scrollContainerElement,"scrollContainerElement cannot be undefined"),fn(this.scrollContainerElement)}get scrollOptions(){return d(l3,this.options,"options cannot be undefined"),{...this.options}}handleBaseListenerDestroy(t){t.destroy()}destroy(){var o;(o=this.scrollListener)==null||o.off("scroll",this.handleContainerScroll);const t=Rt(this.contentElement);t&&Hc.forEach((r,i)=>{r.unbind(t),r.containers.size===0&&(this.handleBaseListenerDestroy(r),Hc.delete(i))})}}function YE(){return new QE}const jc=100,JE=40,Kh=w("column-width");function KE(n,e,t){oE(n,e).style.width=`${t}px`}function XE(n){const t=Array.from(n.querySelector("colgroup").children).map(c=>c.getBoundingClientRect().width);if(t[0]!==0)return t;const o=re.fromTable(n),r=Array(o.colCount).fill(-1),i=n.getBoundingClientRect().left;o.toRealCells(o.cells).forEach(c=>{const a=c.col+c.colSpan-1;r[a]===-1&&(r[a]=c.cell.getBoundingClientRect().right-i)}),Kh.debug(`cellRightOffsets1: ${r.join()}`);for(let c=0;c<r.length;c++){const a=r[c];if(a===-1||c===0)continue;let u=c-1;for(;r[u]===-1&&(u--,u!==-1););const f=u===-1?0:r[u],p=(a-f)/(c-u);for(let b=u+1;b<c;b++)r[b]=f+p*(b-u)}Kh.debug(`cellRightOffsets2: ${r.join()}`);const s=[];let l=0;for(let c=0;c<r.length;c++){const a=r[c];s.push(a-l),l=a}return Kh.debug(`widths: ${s.join()}`),s}function Hs(n){return Array.from(n.querySelector("colgroup").children).map(o=>o.getBoundingClientRect().width||Number.parseInt(o.style.width,10)||100)}const eI=w("table-resize-gripper"),c3=7,Xh=(c3-1)/2,tI=3;function nI(n,e,t){const{rows:o}=n;for(let r=0;r<o.length;r++){const i=o[r],s=Array.from(i.cells);for(let l=0;l<s.length;l++){const c=s[l],a=c.getBoundingClientRect(),u=Math.round(a.right);if(Math.abs(e-u)<=Xh&&a.top<=t&&t<=a.bottom)return c}}return null}function oI(n){return!!n.rootContainer.querySelector(".table-resize-gripper")}function e1(n,e){return Tn(n,e).querySelector(".table-resize-gripper")}function a3(n,e){const t=e1(n,e);d(eI,!t,"resize gripper has already exists");const o=Tn(n,e),r=A("div",["table-resize-gripper","table-indicator"],o);return A("div",["table-resize-gripper-indicator"],r),r}function u3(n,e,t){let o=e1(n,e);o||(o=a3(n,e));const i=je(e).getBoundingClientRect(),s=t.getBoundingClientRect(),l=0,c=i.height,a=n.getCustom(Xn(e)).contentElement.getBoundingClientRect(),u=s.right-a.left;o.style.left=`${u-Xh-Vh-Ps}px`,o.style.top=`${l}px`,o.style.height=`${c}px`,o.style.width=`${c3}px`}function t1(n){n.rootContainer.querySelectorAll(".table-resize-gripper").forEach(e=>{e.remove()})}function rI(n,e,t){const r={...n.getBlockData(e),colsWidth:t};n.updateBlockData(e,r)}function iI(n,e,t,o){const r=e,i=re.fromTable(t),s=i.getCellByCellElement(r),l=s.col+s.colSpan-1,c=Hs(t);let a=o;const u=(m,p)=>{const b=p+1,k=m.col+m.colSpan;return c.slice(b,k).reduce((T,E)=>T+E,0)},f=new Set;for(let m=0;m<i.rowCount;m++){const p=i.getCell({row:m,col:l});if(f.has(p.cell))continue;f.add(p.cell);const b=p.cell,k=b.getBoundingClientRect();let v=o-k.left+Xh-tI;const T=Ms(b),E=Vu(n,T)||JE*p.colSpan,R=u(p,l),L=E-R;v<L&&(v=L);const P=k.left+v;a=Math.max(a,P)}return a}const sI=w("table-resize-drag-drop");class lI{constructor(e,t,o,r){h(this,"cursor","col-resize");this.editor=e,this.elem=t,this.data=o,this.onEnd=r}onDragStart(e,t,o){}onDragging(e,t,o,r,i){const{table:s,block:l,draggingRefCell:c}=e.data,u=iI(this.editor,c,s,t.x-e.dragOffsetX)-s.getBoundingClientRect().left;d(sI,c,"no dragging cell");const m=re.fromTable(s).getCellByCellElement(c),p=m.col+m.colSpan-1,k=Hs(s).slice(0,p).reduce((T,E)=>T+E,0),v=u-k;KE(s,p,v),u3(this.editor,l,c),this.editor.selection.caret.update()}onDragEnd(e,t,o,r,i){const s=Hs(e.data.table);rI(this.editor,e.data.block,s),t1(this.editor),this.onEnd&&(this.onEnd(t),this.onEnd=null)}}function cI(n,e){const t=document.elementFromPoint(e.x,e.y);if(!t)return null;const o=z(t);return!o||!n.contains(o)||!Ze(o)?null:o}w("table-resize");class aI{constructor(e){h(this,"draggingRefCell",null);h(this,"handleMouseMove",(e,t)=>{if(e.readonly||e.selectionHandler.isSelecting()&&!this.draggingRefCell||this.draggingRefCell)return;const o=t.target;if(!(o instanceof Element)||o.closest(".table-indicator"))return;const i=t,s=cI(e,i);if(!s||!_5(s)||!e.isBlockWritable(s)){t1(e);return}this.updateGripper(s,i.x,i.y)});this.editor=e,e.domEvents.addEventListener(document,"mousemove",this.handleMouseMove)}destroy(){this.editor.domEvents.removeEventListener(document,"mousemove",this.handleMouseMove)}updateGripper(e,t,o){const r=je(e),i=nI(r,t,o);if(i){if(!e1(this.editor,e)){if(oI(this.editor))return;const l=a3(this.editor,e),c={block:e,table:r,draggingRefCell:i};Au(new lI(this.editor,l,c,a=>{this.updateGripper(e,a.x,a.y)}))}u3(this.editor,e,i)}else t1(this.editor)}}function d3(n){n.addCustom("table-mouse-event-handler",e=>new aI(e))}const h3=w("table-insert-column");function f3(n,e,t){n.undoManager.runInGroup(()=>{const o=je(e),r=re.fromTable(o),i=r.colCount;d(h3,t>=0&&t<=i,`insert index ${t} is out of range [0, ${i}]`);const s=r.map(m=>m.containerId),l=new Set;n.doc.beginBatchUpdate();for(let m=0;m<s.length;m++){const p=s[m],b=p[t-1],k=p[t];if(t===0||t===p.length||b!==k){const v=Qn(n.doc);p.splice(t,0,v)}else p.splice(t,0,b),l.add(b)}n.doc.endBatchUpdate();const c=Q.default(n.getBlockData(e));l.forEach(m=>{const p=`${m}_colSpan`,b=c[p];d(h3,typeof b=="number"&&b>1,`no colSpan for containerId ${m}, ${b}`),c[p]=b+1});const a=c.colsWidth.concat();a.splice(t,0,jc);const u=re.virtualCellContainersGridToChildren(s),f={...c,cols:c.cols+1,children:u,colsWidth:a};mr(f),n.updateBlockData(e,f)})}const zc=w("table-insert-row");function m3(n,e,t){n.undoManager.runInGroup(()=>{const o=je(e),r=re.fromTable(o),i=r.rowCount;d(zc,t>=0&&t<=i,`insert index ${t} is out of range [0, ${i}]`);const s=r.map(m=>m.containerId),l=new Set;n.doc.beginBatchUpdate();const c=[];for(let m=0;m<r.colCount;m++){const p=t>0&&s[t-1][m],b=t<r.rowCount&&s[t][m];if(d(zc,p||b,"no top and bottom cell"),t===0||t===r.rowCount||p!==b){const k=Qn(n.doc);c.push(k)}else d(zc,p,"no top cell"),c.push(p),l.add(p)}n.doc.endBatchUpdate(),s.splice(t,0,c);const a=Q.default(n.getBlockData(e));l.forEach(m=>{const p=`${m}_rowSpan`,b=a[p];d(zc,typeof b=="number"&&b>1,`no rowSpan for containerId ${m}, ${b}`),a[p]=b+1});const u=re.virtualCellContainersGridToChildren(s),f={...a,rows:a.rows+1,children:u};mr(f),n.updateBlockData(e,f)})}const n1=w("paste-table-in-table-block");function uI(n,e,t,o){let r=re.fromBlock(t);const i=e.blocks.root[0];d(n1,i,"no table data"),d(n1,i.type==="table",`table data type is not table, but ${i.type}`);const s=i,l=r.getCellByCellElement(o),c=s.cols,a=s.rows,u=l.col,f=l.row,m=u+c,p=f+a,b=[];for(let k=u;k<m&&k<r.colCount;k++)for(let v=f;v<p&&v<r.rowCount;v++){const T=r.getCell({col:k,row:v});T.virtual?T.virtual&&b.push({col:k,row:v}):(T.colSpan>1||T.rowSpan>1)&&b.push({col:k,row:v})}n.undoManager.runInGroup(()=>{if(b.forEach(E=>{const R=re.fromBlock(t).getCell(E);(R.colSpan>1||R.rowSpan>1)&&Hh(n,t,E)}),m>r.colCount)for(let E=r.colCount;E<m;E++)f3(n,t,E);if(p>r.rowCount)for(let E=r.rowCount;E<p;E++)m3(n,t,E);r=re.fromBlock(t);const k=new Mc(s);let v;for(let E=0;E<k.colCount;E++)for(let R=0;R<k.rowCount;R++){const L=k.getCell({col:E,row:R});if(!L.virtual){const P=Od(n.editorBlocks,e,L.containerId),V=u+E,ee=f+R,ie={col:V,row:ee},pe=r.getCellContainer(ie);s0(n,pe,P),v=pe}}d(n1,v,"no last container");const T=Je(v);n.selection.selectBlock(T,G(n,T))})}const g3=w("paste-in-table-block");class dI{constructor(e){this.editor=e,setTimeout(()=>{e.input.addHandler(this)})}destroy(){}async handleBeforePasteDoc(e,t){if(!e.selection.range.isSimple()||e.selection.range.start.offset!==0)return!1;const r=e.selection.startBlock,i=H(r);if(Ae(i)||!qu(e,i))return!1;const s=z(i);if(d(g3,s,"no parent block"),!Ze(s)||t.blocks.root.length!==1||t.blocks.root[0].type!=="table")return!1;g3.debug("paste child table in table");const a=re.fromBlock(s).getCellByContainerId(q(i)).cell;return uI(e,t,s,a),!0}}function p3(n){n.addCustom("table-block-paste-event",e=>new dI(e))}const o1=w("table-select-columns");function hI(n,e,t,o,r){d(o1,Ze(e),"is not a table block");const i=re.fromBlock(e);d(o1,t>=0&&t<i.colCount,"invalid from"),d(o1,o>0&&t+o<=i.colCount,"invalid count");const s=i.getCell({row:0,col:t}),l=i.getCell({row:i.rowCount-1,col:t+o-1}),c=xe(e,s.containerId,{colIndex:t,rowIndex:0}),a=xe(e,l.containerId,{colIndex:t+o-1,rowIndex:i.rowCount-1});r!=null&&r.reverse?n.selection.setSelection(a,c):n.selection.setSelection(c,a)}const r1=w("table-select-columns");function fI(n,e,t,o,r){d(r1,Ze(e),"is not a table block");const i=re.fromBlock(e);d(r1,t>=0&&t<i.rowCount,"invalid from"),d(r1,o>0&&t+o<=i.rowCount,"invalid count");const s=i.getCell({row:t,col:0}),l=i.getCell({row:t+o-1,col:i.colCount-1}),c=xe(e,s.containerId,{rowIndex:t,colIndex:0}),a=xe(e,l.containerId,{rowIndex:t+o-1,colIndex:i.colCount-1});r!=null&&r.reverse?n.selection.setSelection(a,c):n.selection.setSelection(c,a)}const GV="",C3=w("get-toolbar-reference-client");function mI(n,e){const t=n.selection.range;if(!t.isSimple()){d(C3,t.start.blockId===t.end.blockId,"invalid selection range");const s=n.getBlockById(t.start.blockId);d(C3,ce(n,s),"not a complex block");const l=me(n,s);if(l.getTextToolbarReferenceClient){const c=l.getTextToolbarReferenceClient(n,s);if(c)return c}}const o=t.isReverse()?e.start:e.end,r=We(n,{anchor:o,focus:o}),i=ho(n,e.block,r);if(i.length!==0)return i[0]}function gI(n){var e,t;if(n.children){let o=!1;const r=[];for(const i of n.children){if((e=i.states)!=null&&e.includes("checked")){o=!0;break}(t=n.defaultCheckedChildren)!=null&&t.includes(i.id)&&r.push(i)}if(!o&&(r==null?void 0:r.length))for(const i of r)Array.isArray(i.states)?i.states.push("checked"):i.states=["checked"]}}function Uc(n){const e=(r,i)=>{const s=r.findIndex(c=>c.id===i.id);if(s===-1){r.push(i);return}const l=r[s];if(l.value!==i.value&&delete l.value,!!l.states){if(!i.states){l.states=[];return}l.states=au.default(l.states,i.states)}},t=[],o=new Map;return n.forEach(r=>{var i,s;(i=r.children)!=null&&i.length&&(o.has(r.id)?(s=o.get(r.id))==null||s.push(...r.children):o.set(r.id,[...r.children])),e(t,r)}),o.forEach((r,i)=>{const s=t.find(l=>l.id===i);s&&(s.children=Uc(r),gI(s))}),t}function Vc(n){return n.getCustom("toolbar-handler")}const ZV="";class pI{constructor(){h(this,"linkPopup",null);h(this,"form",{});h(this,"onFinished",null);h(this,"onClose",null);h(this,"handleOk",async()=>{var e;try{await this.checkValue();const{linkText:t,linkUrl:o}=this.form,r=this.formatUrl(o.getInputValue());(e=this.onFinished)==null||e.call(this,t.getInputValue()||r,r),this._destroy()}catch{}});h(this,"handleClose",()=>{var e;(e=this.onClose)==null||e.call(this),this._destroy()});h(this,"onShow",()=>{setTimeout(()=>{var e;(e=this.form.linkText)==null||e.getField().focus()},400)});h(this,"onChange",()=>{var t;const e=(t=this.linkPopup)==null?void 0:t.content.querySelector(".submit-button");e.disabled=!1});h(this,"handleTextKeyboard",e=>{var t;if(!e.isComposing){if(e.key==="Enter"){(t=this.form.linkUrl)==null||t.getField().focus(),e.stopPropagation();return}e.key==="Escape"&&this.handleClose()}});h(this,"handleUrlKeyboard",e=>{if(!e.isComposing){if(e.key==="Enter"){this.handleOk(),e.preventDefault();return}e.key==="Escape"&&this.handleClose()}})}async checkValue(){const{linkUrl:e}=this.form;if(!e.getInputValue())throw e.setFieldError(I.t("link.urlPlaceholder")),new Error(I.t("link.urlPlaceholder"))}formatUrl(e){if(!e)return"";try{new URL(e)}catch{return`${window.location.protocol}//${e}`}return e}editLink(e){var u,f;const{target:t,linkText:o,linkUrl:r,onFinished:i,onClose:s,placement:l="bottom-start"}=e;this.linkPopup=new xs(this.createPopupContent(o,r)),this.linkPopup.addListener("show",this.onShow),this.linkPopup.manualShow(t,{theme:"light",placement:l}),this.onFinished=i,s&&(this.onClose=s);const c=(u=this.linkPopup)==null?void 0:u.content.querySelector(".submit-button"),a=(f=this.linkPopup)==null?void 0:f.content.querySelector(".cancel-button");c==null||c.addEventListener("click",this.handleOk),a==null||a.addEventListener("click",this.handleClose)}createPopupContent(e,t){const o=A("div",["link-popup-content"],null);this.form.linkText=Lh(o,{label:I.t("link.textLabel"),required:!1,placeholder:I.t("link.textPlaceholder"),defaultValue:e,onChange:this.onChange,onKeyDown:this.handleTextKeyboard}),this.form.linkUrl=Lh(o,{className:"link-popup-gap",label:I.t("link.urlLabel"),required:!0,placeholder:I.t("link.urlPlaceholder"),defaultValue:t,onChange:this.onChange,onKeyDown:this.handleUrlKeyboard});const r=A("div",["link-popup-footer"],o);A("button",["cancel-button"],r,I.t("link.cancelText"));const i=A("button",["submit-button"],r,I.t("link.submitText"));return i.disabled=!0,o}_destroy(){var o,r,i,s;const e=(o=this.linkPopup)==null?void 0:o.content.querySelector(".submit-button"),t=(r=this.linkPopup)==null?void 0:r.content.querySelector(".cancel-button");e==null||e.removeEventListener("click",this.handleOk),t==null||t.removeEventListener("click",this.handleClose),this.onFinished=null,this.onClose=null,this.form={},(i=this.linkPopup)==null||i.removeAllListeners(),(s=this.linkPopup)==null||s.destroy()}destroy(){this._destroy()}}function js(n,e){n.addCustom("link-editor",()=>new pI).editLink(e)}const CI=w("link-popup");function AI(n){return ne(n,"link")}function zs(n){var e,t;return(t=(e=n.getAttribute("link"))!=null?e:n.textContent)!=null?t:""}function bI(n,e,t){var r,i,s,l;if(n.isBlockWritable(e)&&t&&Ft(t)){const c=t,a=(i=(r=n.editorBoxes.getBoxClass(qi(c))).getBoxProperties)==null?void 0:i.call(r,n,c);if(a!=null&&a.boxCommands){const u=(l=(s=a.boxCommands["hovering-toolbar"])==null?void 0:s.commands)!=null?l:[];return{element:t,commands:u}}return{element:null,commands:[]}}if(n.isWritable()&&t&&$(n,e)&&AI(t)){const c=A("a",["link-href-button"],null,zs(t));c.href=zs(t),c.target="_blank",c.rel="noopener noreferrer";const a=[{id:"link-text",name:zs(t),disableTooltip:!0,element:c},{id:"edit-link",name:I.t("link.edit"),icon:Th},{id:"remove-link",name:I.t("link.remove"),icon:uB}];return{element:t,commands:a}}return wg(n,e,"hovering-toolbar")}function vI(n,e,t){var c;const o=po(e,t);n.selection.selectBlock(e,o.start,o.end);const r=(c=t.textContent)!=null?c:"",i=zs(t);js(n,{target:t,linkText:r,linkUrl:i,onFinished:(a,u)=>{try{const f=n.getBlockText(e),m=sd(f,o.start,o.end-o.start),p=Gn(m,o.start,a,{link:u});n.setBlockText(e,p),n.selection.selectBlock(e,o.start+a.length),n.focus()}catch(f){CI.error(f)}},onClose:()=>{n.selection.selectBlock(e,o.end),n.focus()}})}function yI(n,e,t){const o=po(e,t),r=n.getBlockText(e),i=zs(t),s=_r(o.start,o.end-o.start,r,"link",i);n.setBlockText(e,s),n.selection.selectBlock(e,o.end)}function kI(n,e,t,o){var s,l,c;if(t){if(n.isBlockWritable(e)&&Ft(t)){const u=t,f=(l=(s=n.editorBoxes.getBoxClass(qi(u))).getBoxProperties)==null?void 0:l.call(s,n,u);if(f!=null&&f.boxCommands){f.boxCommands["hovering-toolbar"].executeCommand(n,e,u,o);return}return}const a=Vc(n);a.disableTextToolbar(),a.hide(),setTimeout(()=>{a.enableTextToolbar()},1e4),o.id==="edit-link"?vI(n,e,t):o.id==="remove-link"&&yI(n,e,t);return}const r=kg(n,e);if(!r)return;const i=(c=r.blockCommands)==null?void 0:c["hovering-toolbar"];!i||i.executeCommand(n,e,o)}function qc(){let n=8;for(;n>0&&!document.querySelector(`div[data-style-heading='${n}']`);)n--;return n}const wI=[Ah,bh,vh,yh,kh,wh,Bh,Eh];class BI{constructor(e){h(this,"id","BlockTurnIntoCommandProvider");this.editor=e}getHeadingIndex(){let e=qc();return e<=4?e=5:e<8&&(e+=1),e}getAvailableCommands(e,t,o){if($(e,t)){const r=j(t),i=se(t),s=Kt(e,t),c=e.getBlockData(t).heading,a=[];for(let f=0;f<this.getHeadingIndex();f++)a.push({id:`heading-${f+1}`,name:I.t("commands.heading",{name:`${f+1}`}),icon:wI[f],states:c===f+1?["checked"]:[],value:`${f+1}`});const u=f=>{var p;const m=A("span",["toolbar-item-name-container"],null);for(const b of f.children)if((p=b.states)!=null&&p.includes("checked"))return m.innerHTML=b.icon||Lc,m;return m.innerHTML=Lc,m};return[{id:"turn-into",name:I.t("commands.headingGroup"),blockId:r,blockType:i,blockKind:s,element:u,groupIndex:200,dropdown:!0,manualShowChildren:!0,childrenPlacement:"bottom-start",defaultCheckedChildren:["text"],children:[{id:"text",name:I.t("commands.text"),icon:Lc,states:c?[]:["checked"]},...a],childrenType:"menu"}]}return[]}applyHeadingStyle(e,t,o){e.updateBlockData(t,{heading:o})}executeCommand(e,t,o,r){if($(e,t)&&(r.id.startsWith("heading-")||r.id==="text")){const i=r.value?Number(r.value):null;return this.applyHeadingStyle(e,t,i),!0}return!1}}const EI=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
346
+ <path d="M8 8H15" stroke="currentColor" stroke-linecap="square" stroke-linejoin="round"></path>
347
+ <path d="M8 14H15" stroke="currentColor" stroke-linecap="square" stroke-linejoin="round"></path>
348
+ <path d="M8 2H15" stroke="currentColor" stroke-linecap="square" stroke-linejoin="round"></path>
349
+ <path d="M4 8H0C0 8 0.552283 8 1.33333 8M4 14C2 13.1429 3.33333 8 1.33333 8M4 2C2 2.85714 3.33333 8 1.33333 8" stroke="currentColor" stroke-linecap="square"></path>
349
350
  </svg>
350
- `,QI=`<?xml version="1.0" ?>
351
- <svg t="1666868691722" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3301" width="16" height="16">
352
- <path d="M832 192v640H192V192h640m32-64H160c-17.6 0-32 14.4-32 32v704c0 17.6 14.4 32 32 32h704c17.6 0 32-14.4 32-32V160c0-17.6-14.4-32-32-32z" p-id="3302" fill="#dbdbdb"></path>
353
- </svg>`;function YI(n,e){const t=ii(e);if(t!=="text-only"){if(t==="checked"){n.innerHTML=ZI;return}if(t==="unchecked"){n.innerHTML=QI;return}n.innerText=zI(e)}}function JI(n){const e=A("div",["list-container"],null),t=A("button",["list-marker"],e);return YI(t,n),e}function a1(n){ze(n);let e=n;const t=y3(n);t.length>0&&(e=t[0]);const o=ye(e);return!o||!ue(o)?null:bt(o)<bt(e)?o:null}function KI(n){let e=Us(n);for(;;){const t=a1(e);if(!t)return e;e=Us(t)}}class XI{constructor(){h(this,"nodeMap",new Map);h(this,"rootNodes",[])}addNode(e,t){const o={block:t,children:[]};if(this.nodeMap.set(t,o),e){const r=this.nodeMap.get(e);d(Re,r,"no parent node"),r.children.push(o)}else this.rootNodes.push(o)}}function x3(n,e){const t=KI(e),o=new XI;o.addNode(null,t);let r=fe(t);for(;r&&ue(r);){if(Zc(r)){o.addNode(null,r),r=fe(r);continue}if(bt(r)===0&&Ot(r)!==Ot(t))break;const s=a1(r);o.addNode(s,r),r=fe(r)}return o.rootNodes}const ex=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
351
+ `,II=8,Re=w("list-block"),Wc=w("list-block");function ue(n){return se(n)==="list"}function ze(n){d(Wc,ue(n),"not a list block")}function Ot(n){ze(n);const e=n.getAttribute("data-list-type");return d(Wc,e,"no list type"),e}function Gc(n){return ue(n)&&Ot(n)==="text-only"}function Ut(n){var e,t;return ze(n),(t=Number.parseInt((e=n.getAttribute("data-list-start"))!=null?e:"1",10))!=null?t:1}function bt(n){var e,t;return ze(n),(t=Number.parseInt((e=n.getAttribute("data-list-level"))!=null?e:"1",10))!=null?t:1}function ni(n){ze(n);const e=n.getAttribute("data-list-group-id");return d(Wc,e,"no group id"),e}function Lo(n){var i,s,l,c,a;ze(n);const e=(i=n.getAttribute("data-list-type"))!=null?i:"ordered",t=(l=Number.parseInt((s=n.getAttribute("data-list-start"))!=null?s:"1",10))!=null?l:1,o=(a=Number.parseInt((c=n.getAttribute("data-list-level"))!=null?c:"1",10))!=null?a:1,r=n.getAttribute("data-list-group-id");return d(Wc,r,"no group id"),{type:e,start:t,level:o,groupId:r}}function i1(n){switch(n){case"ordered":return{ordered:!0,checkbox:null,textOnly:null};case"unordered":return{ordered:!1,checkbox:null,textOnly:null};case"checked":return{checkbox:"checked",ordered:!1,textOnly:null};case"unchecked":return{checkbox:"unchecked",ordered:!1,textOnly:null};case"text-only":return{checkbox:null,ordered:!1,textOnly:!0};default:return{checkbox:null,ordered:!0,textOnly:!1}}}function xI(n){const e={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1};let t="",o=n;return Object.entries(e).forEach(([r,i])=>{for(;o>=i;)t+=r,o-=i}),t.toLowerCase()}const TI="abcdefghijklmnopqrstuvwxyz";function A3(n){if(n<=0)return`${n}`;const e=(n-1)%26,t=Math.floor((n-1)/26),o=TI[e];return t?A3(t)+o:o}function SI(n){return`${n}`}const b3=[SI,A3,xI];function DI(n,e){const t=b3[(n-1)%b3.length];return t(e)}function LI(n){return["\u2022","\u25E6","\u25AA"][(n-1)%3]}function Mo(n,e){ze(n);const{level:t,groupId:o,type:r}=Lo(n);let i=ye(n);for(;i;){if(!ue(i))return null;const{level:s,groupId:l,type:c}=Lo(i);if(s<t)return null;if(t===s&&((e==null?void 0:e.ignoreGroupId)||o===l)&&(c==="text-only"||r==="text-only"||r===c))return i;i=ye(i)}return null}function v3(n){return Mo(n,{ignoreGroupId:!0})}function Cr(n){ze(n);const{level:e,groupId:t,type:o}=Lo(n);let r=fe(n);for(;r;){if(ue(r)){const{level:i,groupId:s,type:l}=Lo(r);if(e===i&&t===s&&(l==="text-only"||o==="text-only"||o===l))return r;if(i<e)return null}r=fe(r)}return null}function y3(n){ze(n);const e=[];let t=Mo(n);for(;t;)e.unshift(t),t=Mo(t);return e}function oi(n){ze(n);const e=[];let t=Cr(n);for(;t;)e.push(t),t=Cr(t);return e}function Us(n){ze(n);let e=Mo(n);for(;e;){const t=Mo(e);if(!t)return e;e=t}return n}function MI(n){ze(n);let e=Cr(n);for(;e;){const t=Cr(e);if(!t)return e;e=t}return null}function k3(n,e){const t=y3(n),o=oi(n);return e.withSelf?[...t,n,...o]:[...t,...o]}function s1(n){ze(n);let e=n;const t=y3(n);t.length>0&&(e=t[0]);const o=ye(e);return!o||!ue(o)?null:bt(o)<bt(e)?o:null}function RI(n){let e=Us(n);for(;;){const t=s1(e);if(!t)return e;e=Us(t)}}class OI{constructor(){h(this,"nodeMap",new Map);h(this,"rootNodes",[])}addNode(e,t){const o={block:t,children:[]};if(this.nodeMap.set(t,o),e){const r=this.nodeMap.get(e);d(Re,r,"no parent node"),r.children.push(o)}else this.rootNodes.push(o)}}function w3(n,e){const t=RI(e),o=new OI;o.addNode(null,t);let r=fe(t);for(;r&&ue(r);){if(Gc(r)){o.addNode(null,r),r=fe(r);continue}if(bt(r)===0&&Ot(r)!==Ot(t))break;const s=s1(r);o.addNode(s,r),r=fe(r)}return o.rootNodes}const PI=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
354
352
  <path fill-rule="evenodd" clip-rule="evenodd" d="M3.59414 14L2 12.4059L6.40586 8L2 3.59414L3.59414 2L8 6.40586L12.4059 2L14 3.59414L9.59414 8L14 12.4059L12.4059 14L8 9.59414L3.59414 14Z" fill="currentColor"/>
355
- </svg>`,tx=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
353
+ </svg>`,NI=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
356
354
  <path d="M2 6V2H14V14H10M2 8H8V14H2V8Z" stroke="currentColor" stroke-width="2"/>
357
- </svg>`,T3=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
355
+ </svg>`,B3=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
358
356
  <path d="M1.99978 13.996L6.5 9.49597" stroke="currentColor" stroke-width="2"/>
359
357
  <path d="M13.9973 1.99986L9.49707 6.49988" stroke="currentColor" stroke-width="2"/>
360
358
  <path d="M7 13.9961H2L2.00129 9" stroke="currentColor" stroke-width="2"/>
361
359
  <path d="M9 1.99998H13.9974L13.9961 7" stroke="currentColor" stroke-width="2"/>
362
- </svg>`;function nx(n){const e=document.fullscreenEnabled||document.mozFullScreenEnabled||document.documentElement.webkitRequestFullScreen,t=o=>{if(o.requestFullscreen)return o.requestFullscreen();if(o.mozRequestFullScreen)return o.mozRequestFullScreen();if(o.webkitRequestFullScreen){try{document.fullscreenElement=n}catch{}return o.webkitRequestFullScreen()}return Promise.resolve(0)};return e?t(n):Promise.resolve(0)}function S3(){const t=(document.exitFullscreen||document.webkitExitFullscreen).bind(document)();try{document.fullscreenElement=null}catch{}return t}function D3(n){if(d(Re,ue(n),"not a list block"),ne(n,"editor-in-mindmap-first")||!Nl(n))return!0;const e=n.classList,t="editor-mindmap-root-";return!!Array.from(e).find(r=>{if(r.startsWith(t))return r})}function ox(n,e,t){const o=H(n);if(e){const s=H(e);d(Re,o===s,"invalid block container")}const r=K(n);if(e){const s=K(e);d(Re,r<=s,"invalid block index")}if(M(n,...t),!e||e===n)return;let i=fe(n);for(;i!==e;)d(Re,i,"no next button"),M(i,...t),i=fe(i);i&&M(i,...t)}const rx=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
360
+ </svg>`;function FI(n){const e=document.fullscreenEnabled||document.mozFullScreenEnabled||document.documentElement.webkitRequestFullScreen,t=o=>{if(o.requestFullscreen)return o.requestFullscreen();if(o.mozRequestFullScreen)return o.mozRequestFullScreen();if(o.webkitRequestFullScreen){try{document.fullscreenElement=n}catch{}return o.webkitRequestFullScreen()}return Promise.resolve(0)};return e?t(n):Promise.resolve(0)}function E3(){const t=(document.exitFullscreen||document.webkitExitFullscreen).bind(document)();try{document.fullscreenElement=null}catch{}return t}function I3(n){if(d(Re,ue(n),"not a list block"),ne(n,"editor-in-mindmap-first")||!Nl(n))return!0;const e=n.classList,t="editor-mindmap-root-";return!!Array.from(e).find(r=>{if(r.startsWith(t))return r})}function $I(n,e,t){const o=H(n);if(e){const s=H(e);d(Re,o===s,"invalid block container")}const r=K(n);if(e){const s=K(e);d(Re,r<=s,"invalid block index")}if(M(n,...t),!e||e===n)return;let i=fe(n);for(;i!==e;)d(Re,i,"no next button"),M(i,...t),i=fe(i);i&&M(i,...t)}const _I=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
363
361
  <path d="M5.99729 10.0039L1.49707 14.5039" stroke="currentColor" stroke-width="2"/>
364
362
  <path d="M9.99978 5.99611L14.5 1.49609" stroke="currentColor" stroke-width="2"/>
365
363
  <path d="M1 10.0039H5.99738L5.99608 15" stroke="currentColor" stroke-width="2"/>
366
364
  <path d="M14.9971 5.99611H9.99969L10.001 1" stroke="currentColor" stroke-width="2"/>
367
- </svg>`;async function ix(n,e,t){const o=Ne(e),r=o.querySelector('[data-button-id="mindmap-fullscreen"]');d(Re,r,"no full screen button");const i=()=>{setTimeout(()=>{t.toMindmap(n,e,{},{reset:!0,mindmapTools:t})},300)},s=()=>{_(o,"fullscreen"),r.innerHTML=T3,f5(r,"Full screen",n.clientId),D3(e)&&setTimeout(()=>{i()},300)};if(document.fullscreenElement===o){try{await S3()}catch(l){Re.error(l)}s()}else{try{M(o,"fullscreen"),await nx(o),i()}catch(l){Re.error(l)}r.innerHTML=rx,f5(r,I.t("mindmap.exitFullscreen"),n.clientId)}o.onfullscreenchange=()=>{document.fullscreenElement||s()}}function u1(n,e,t,o,r){if(e.querySelector(`[data-button-id="${t}"]`))return null;const s=Io(t,o,r,[],n.clientId);return M(s,"mindmap-button"),e.appendChild(s),s}function d1(n,e){return n.querySelector(`[data-button-id="${e}"]`)}function sx(n){return d1(n,"mindmap-fullscreen")}function lx(n){return d1(n,"mindmap-fit")}function cx(n){return d1(n,"mindmap-close")}function ax(n,e,t,o){const r=u1(n,e,"mindmap-close",I.t("mindmap.close"),ex);!r||n.domEvents.addEventListener(r,"click",()=>{o.closeMindmap(n,t)})}function ux(n,e,t,o){const r=u1(n,e,"mindmap-fit",I.t("mindmap.autoFit"),tx);!r||n.domEvents.addEventListener(r,"click",()=>{o.fitMindmap(n,t)})}function dx(n,e,t,o){if(navigator.userAgent.includes("Mobile")&&!navigator.userAgent.includes("iPad"))return;const i=u1(n,e,"mindmap-fullscreen",I.t("mindmap.fullScreen"),T3);!i||n.domEvents.addEventListener(i,"click",()=>{ix(n,t,o)})}function hx(n,e){const t=Fl(e);if(!t)return;const o=lx(t);o&&(o.remove(),n.domEvents.removeAllListeners(o));const r=cx(t);r&&(r.remove(),n.domEvents.removeAllListeners(r));const i=sx(t);i&&(i.remove(),n.domEvents.removeAllListeners(i))}const si=new Map;function h1(n,e,t){const o=(s,l)=>{s.forEach(c=>{l?M(c.block,"to-mindmap-highlight"):_(c.block,"to-mindmap-highlight"),o(c.children,l)})},r=x3(n,e);if(r.length===0)return;const i=r[0].block;if(t){const s=si.get(i);s&&(s.forEach(l=>l.cancel()),si.delete(i)),o(r,!0)}else{const s=setTimeout(()=>{o(r,!1),si.delete(i)},300),l=()=>{clearTimeout(s),si.delete(i)},c=si.get(i);c?c.push({cancel:l}):si.set(i,[{cancel:l}])}}const{Markmap:fx}=P8;function mx(n,e){ze(e);const t=x3(n,e),o=t[0].block,r=a=>({t:"text",v:le(a.block).textContent,d:1,c:a.children.length>0?a.children.map(f=>r(f)):void 0});let i=null;t.length>1?i={t:"root",v:"root",d:0,c:t.length>0?t.map(a=>r(a)):void 0}:i=r(t[0]);const l=a=>{if(a.length===0)return null;const u=a[a.length-1];return u.children&&u.children.length>0?l(u.children):u},c=l(t);return{root:i,block:o,nodes:t,last:c}}function f1(n,e,t,o){const{root:r,block:i,last:s}=mx(n,e);o.selectBlock&&n.selection.selectBlock(i,0,0),h1(n,i,!1),o.saveData&&n.updateBlockData(i,{viewAsMindmap:!0});const l=Ne(i);let c=l.querySelector(".editor-mindmap-svg");if(o.reset&&(c&&c.remove(),c=null),c)c.innerHTML="";else{const T="http://www.w3.org/2000/svg",E=l.getBoundingClientRect(),R=document.fullscreenElement===l,L=R?`${E.width}`:`${e.getBoundingClientRect().width}`,P=R?`${E.height}`:"600",V=document.createElementNS(T,"svg");V.setAttributeNS(null,"viewBox",`0 0 ${L} ${P}`),V.setAttributeNS(null,"width","100%"),V.setAttributeNS(null,"height",P),V.style.display="block",V.style.width="100%",V.style.height=`${P}px`,V.classList.add("editor-mindmap-svg"),l.appendChild(V),c=V}const a=i,f=`editor-mindmap-root-${j(i)}`;M(a,"editor-in-mindmap-first",f,"readonly"),a.contentEditable="false";const m=fe(i);m&&K(m)<=K(s.block)&&ox(m,s.block,["block-hidden",f]);const p=(T,E)=>{if(E.length>0){const R=E[0].parentElement;R&&(R.style.width="100vw",R.style.maxWidth="200px")}E.forEach(R=>{M(R,"editor-mindmap-node")})},b=new fx(c,{...t,autoFit:!0});b.viewHooks.transformHtml.tap(p),b.setData(r),b.fit();const k=Ne(i);let v=k.querySelector(".mindmap-toolbar");v||(v=A("div",["mindmap-toolbar"],k)),ux(n,v,a,o.mindmapTools),dx(n,v,a,o.mindmapTools),ax(n,v,a,o.mindmapTools),n.domEvents.addEventListener(c,"click",()=>{n.selection.selectBlock(i,0),n.input.focus()}),a.mindMap=b}async function L3(n,e){const t=`editor-mindmap-root-${e.id}`,o=H(e);Me(o).forEach(l=>{ne(l,t)&&_(l,t,"editor-in-mindmap-first","block-hidden")});const i=Ne(e);document.fullscreenElement===i&&await S3();const s=i.querySelector(".editor-mindmap-svg");!s||(d(Re,s,"no mindmap svg"),s.remove(),n.domEvents.removeAllListeners(s),hx(n,e))}function gx(n){const e=n.classList,t="editor-mindmap-root-";return Array.from(e).find(r=>{if(r.startsWith(t))return r})}async function M3(n,e){!gx(e)||(n.updateBlockData(e,{viewAsMindmap:null}),L3(n,e),n.selection.selectBlock(e,0))}function px(n,e){const t=e.mindMap;t&&t.fit()}const R3={toMindmap:f1,closeMindmap:M3,fitMindmap:px};function O3(n){let e=fe(n);if(!e)return null;const t=Cr(n);for(;e!==t;){if(d(Re,e,"no next block"),ue(e))return bt(e)>bt(n)?e:null;if(e=fe(e),!e)return null}return null}function m1(n){const e=[];let t=O3(n);if(!t)return e;for(;t;){const o=Cr(t);e.push({block:t,children:m1(t)}),t=o}return e}function Cx(n){const e=(o,r)=>{r.push(o.block),o.children.forEach(i=>e(i,r))},t=[];return n.forEach(o=>e(o,t)),t}function P3(n,e){return bt(e)!==1}function N3(n,e,t){e.forEach(o=>{const r=n.getBlockData(o.block);n.updateBlockData(o.block,{...r,groupId:t,level:r.level-1}),o.children.length&&N3(n,o.children,r.groupId)})}function g1(n,e){if(!P3(n,e))return!1;const t=bt(e);if(t===1)return!1;let o=F(),r=1,i=Ot(e);const s=t-1,l=a1(e);l&&(o=ni(l),r=Ut(l)+1,i!=="text-only"&&(i=Ot(l)));const c=m1(e),a=n.getBlockData(e),u={...a,groupId:o,level:s,start:r,...s1(i)};n.updateBlockData(e,u),n.doc.beginBatchUpdate(),N3(n,c,a.groupId),n.doc.endBatchUpdate(),new Ar(n,e).fix();const m=O3(e);return m&&new Ar(n,m,{resetStart:!0,resetGroupId:!0}).fix(),!0}function li(n,e){ze(e);const t=n.getBlockData(e),o={id:F(),type:"text",text:t.text};t.heading&&(o.heading=t.heading),t.heading&&(o.heading=t.heading);const r=new Yc(n,e),i=H(e),s=K(e);n.deleteBlock(e);const l=Xl(o.id,0);n.insertBlock(q(i),s,o,l),r.fix()}function Ax(n){if(!n.selection.range.isCollapsed())return!1;const e=n.selection.focusedBlock;if(!ue(e))return!1;const t=n.selection.range.focus;return!t.isSimple()||t.offset!==0?!1:bt(e)===1?(li(n,e),!0):(g1(n,e),!0)}const bx=w("list-block");function vx(n,e,t){d(bx,ue(e),"not a list block");const o={...n.getBlockData(e),id:F()};return t!=null&&t.level&&(o.level=t.level),t!=null&&t.start&&(o.start=t.start),t!=null&&t.keepText||delete o.text,o}function yx(n){if(ze(n),!Zc(n))return n;let e=Mo(n);for(;e;){if(!Zc(e))return e;e=Mo(e)}return null}function kx(n,e,t,o){const r=new Ar(n,o),i=Ut(o)+1;zr(n,e,t,{forceInsertAfter:!0,newBlockData:vx(n,o,{start:i})}),r.fix()}function wx(n){var s;if(n.selection.range.isCollapsed()){const l=n.selection.focusedBlock;if(ue(l)&&G(n,l)===0)return li(n,l),!0}n.clearSelectedContents();const e=n.selection.focusedBlock;if(!ue(e))return!1;const t=n.selection.range.focus;if(!t.isSimple())return!1;const o=t.offset,i=(s=o===G(n,e)?yx(e):e)!=null?s:e;return kx(n,e,o,i),!0}function F3(n){d(Re,ue(n),"not a list block");const{level:e}=Lo(n);let t=ye(n);for(;t;){if(ue(t)){const{level:o}=Lo(t);if(e===o)return t;if(o<e)return null}t=ye(t)}return null}function $3(n,e){return ze(e),F3(e)?bt(e)<VI:!1}function Bx(n,e,t){let o=ye(e);d(Re,o,"no prev brother");const r=bt(t);for(;o;){if(o===t)return null;if(ue(o)&&bt(o)===r+1)return o;o=ye(o)}return null}function _3(n,e){if(!$3(n,e))return!1;ze(e);const t=F3(e);d(Re,t,"no list prev brother");const o=t,r=Bx(n,e,o),i=bt(o)+1;let s=F(),l=1,c=Ot(e);r&&(s=ni(r),l=Ut(r)+1,c=Ot(r));const a=m1(e),f={...n.getBlockData(e),groupId:s,level:i,start:l,...s1(c)};return n.updateBlockData(e,f),n.doc.beginBatchUpdate(),Cx(a).forEach(p=>{const b=n.getBlockData(p);n.updateBlockData(p,{...b,level:b.level+1})}),n.doc.endBatchUpdate(),!0}function Ex(n,e,t){return e.length===0||!e.every(o=>ue(o.block))?!1:t==="increase"?$3(n,e[0].block):P3(n,e[0].block)}function H3(n,e,t){if(!Ex(n,e,t))return!1;const o=e[0].block,r=bt(o),i=e.filter(a=>bt(a.block)<=r),s=k3(o,{withSelf:!1}),l=new Set(i.map(a=>a.block)),c=s.filter(a=>!l.has(a));return n.undoManager.runInGroup(()=>{let a=null;c.length>0&&(a=new Ar(n,c[0])),i.forEach(u=>{t==="increase"?_3(n,u.block):g1(n,u.block)}),a==null||a.fix()}),!0}function Ix(n,e){return _3(n,e)}function xx(n,e){return g1(n,e)}function Tx(n){const e=n.selection.range.getSelectedBlocks();if(e.length>1)return H3(n,e,"increase"),!0;const t=e[0].block;if(!ue(t))return!1;const o=new Yc(n,t);return Ix(n,t)&&(o.fix(),new Ar(n,t).fix()),!0}function Sx(n){const e=n.selection.range.getSelectedBlocks();if(e.length>1)return H3(n,e,"decrease"),!0;const t=e[0].block;return ue(t)?(xx(n,t),!0):!1}class Dx{constructor(e){this.editor=e}handleBeforeKeyDown(e,t){const o=e.selection.range.getSelectedBlocks();if(o.length===0||!o.some(i=>ue(i.block)))return!1;switch(t.key){case"Enter":return this.handleEnter(t);case"Backspace":return this.handleBackspace();case"Tab":return this.handleTab(t);default:return!1}}handleEnter(e){const t=this.editor.selection.range.getSelectedBlocks()[0];return!t.block||!ue(t.block)||zn(e,"Shift+Enter")?!1:this.editor.undoManager.runInGroup(()=>wx(this.editor))}handleBackspace(){return this.editor.undoManager.runInGroup(()=>Ax(this.editor))}handleTab(e){return zn(e,"Shift+Tab")?this.editor.undoManager.runInGroup(()=>Sx(this.editor)):this.editor.undoManager.runInGroup(()=>Tx(this.editor))}}class Lx{constructor(e){h(this,"effectedBlockIds",new Map);h(this,"handleBeforeClearSelection",()=>{this.effectedBlockIds.clear();const e=this.editor.selection.range.getSelectedBlocks();if(e.length===0)return;const t=new Set;e.forEach(r=>{const i=r.block;ue(i)&&t.add(i)});const o=new Map;Array.from(t.values()).forEach(r=>{var c;const i=Us(r),{start:s}=Lo(i);o.set(j(i),s);const l=(c=MI(r))!=null?c:r;o.set(j(l),s)}),this.effectedBlockIds=o});h(this,"handleAfterClearSelection",()=>{Array.from(this.effectedBlockIds.entries()).forEach(([e,t])=>{const o=this.editor.findBlockById(e);!o||l1(this.editor,o,t)}),this.effectedBlockIds.clear()});this.editor=e,this.editor.addListener("beforeClearSelection",this.handleBeforeClearSelection),this.editor.addListener("afterClearSelection",this.handleAfterClearSelection)}destroy(){this.editor.removeListener("beforeClearSelection",this.handleBeforeClearSelection),this.editor.removeListener("afterClearSelection",this.handleAfterClearSelection)}}const Mx=w("customize-list-start-menu");class Rx{constructor(e){h(this,"popup");h(this,"block",null);h(this,"show",(e,t)=>{const o=t.querySelector("div.list-container");d(Mx,o,"list-block mark does not exist"),this.block=t,this.popup.manualShow(o,{theme:"light"})});h(this,"createDialogContent",()=>{const e=A("div",["customize-start-panel"],null);A("span",["customize-start-panel-title"],e,I.t("list.numberLabel"));const t=this.createNumericInput();e.appendChild(t);const o=A("button",["customize-start-panel-button"],e,I.t("list.confirm"));return this.editor.domEvents.addEventListener(e,"keydown",this.handleKeydown),this.editor.domEvents.addEventListener(o,"click",this.handleOk),e});h(this,"handleDialogShow",()=>{const e=this.block;if(!e)return;const t=this.popup.popupContent,o=t.querySelector("button.customize-start-panel-button"),r=t.querySelector("input.customize-start-panel-input"),i=Ut(e);!o||!r||requestAnimationFrame(()=>{r.focus(),r.value=String(i)})});h(this,"handleOk",()=>{const t=this.popup.popupContent.querySelector("input.customize-start-panel-input"),o=this.block;if(!o)return;const r=Number(t.value);!r||(this.editor.undoManager.runInGroup(()=>{ri(this.editor,[o,...oi(o)],r,{resetGroupId:!0})}),this.popup.close())});h(this,"handleKeydown",(e,t)=>{const o=t;o.isComposing||(o.key==="Escape"?this.popup.close():o.key==="Enter"&&this.handleOk())});this.editor=e,this.popup=new xs(this.createDialogContent()),this.popup.on("show",this.handleDialogShow)}destroy(){this.popup.destroy()}createNumericInput(){const e=A("input",["customize-start-panel-input"],null);e.type="number",e.min="1";const t=()=>{const r=e.value.replace(/[^\d]/g,"").replace(/^0+/,""),i=parseInt(r,10);i<=0||Number.isNaN(i)?e.value="":e.value=r};return this.editor.domEvents.addEventListener(e,"input",t),e}}function Ox(n,e){return ni(n)===ni(e)}function Px(n,e){const t=v3(e);return t?Ox(t,e)?Ut(t)!==Ut(e)-1:!0:!1}function Nx(n,e){return Mo(e)?!0:Ut(e)!==1}function Fx(n,e){return ze(e),[{id:"continue-numbering",name:I.t("list.continueList"),states:Px(n,e)?[]:["disabled"]},{id:"start-new-list",name:I.t("list.restartList"),states:Nx(n,e)?[]:["disabled"]},{id:"set-numbering-value",name:I.t("list.changeNumber")}]}function $x(n,e,t){var o,r;if(ze(e),t.id==="continue-numbering"){const i=v3(e);i&&ri(n,[e,...oi(e)],Ut(i)+1,{resetGroupId:!0,groupId:ni(i)})}if(t.id==="start-new-list"&&n.undoManager.runInGroup(()=>{ri(n,[e,...oi(e)],1,{resetGroupId:!0})}),t.id==="set-numbering-value"){const i=(o=n.options.componentsOptions)==null?void 0:o.list;if((r=i==null?void 0:i.onChangeStart)!=null&&r.call(i,n,e,t))return;n.addCustom("list-customize-start-dialog",()=>new Rx(n)).show(n,e)}}class _x{constructor(e){h(this,"menu");h(this,"handleClick",(e,t)=>{const o=Lr(t,"div.list-container");if(o&&this.editor.isWritable()){const r=z(o);d(Re,r,"no parent block"),ze(r);const i=e.getBlockData(r);if(i&&i.checkbox){e.updateBlockData(r,{...i,checkbox:i.checkbox==="checked"?"unchecked":"checked"});return}if(Ot(r)==="unordered")return;this.menu.updateItems(this.getCommandItems(r)),this.menu.manualShow(o),this.activeList(o,!0)}});h(this,"handleMenuClose",()=>{var t;const e=(t=this.menu.tippyInstance)==null?void 0:t.reference;e&&this.activeList(e,!1)});h(this,"handleMenuClick",(e,t)=>{var r;const o=(r=this.menu.tippyInstance)==null?void 0:r.reference;if(o){const i=z(o);i&&$x(this.editor,i,t)}});this.editor=e,this.editor.addListener("click",this.handleClick),this.menu=new fr([]),this.menu.addListener("close",this.handleMenuClose),this.menu.addListener("click",this.handleMenuClick)}destroy(){this.editor.removeListener("click",this.handleClick),this.menu.removeListener("close",this.handleMenuClose)}getCommandItems(e){return Fx(this.editor,e)}activeList(e,t){const o=z(e);!o||(t?(M(e,"active"),M(o,"active")):(_(e,"active"),_(o,"active")))}}class Hx{constructor(e){this.editor=e}handleBeforeKeyDown(e,t){const o=e.selection.range.getSelectedBlocks();if(o.length===0)return!1;const r=o[0].block;if(!ue(r)||!D3(r))return!1;if(t.key==="ArrowUp"||t.key==="ArrowLeft"){const i=er(r);return i&&e.selection.selectBlock(i,G(e,i)),!0}if(t.key==="ArrowDown"||t.key==="ArrowRight"){const i=tr(r);return i&&e.selection.selectBlock(i,0),!0}return(t.key==="Delete"||t.key==="Backspace"||t.key==="Escape")&&M3(e,r),!0}}function jx(n,e,t,o,r){Xd(n,"list-block-init",()=>{setTimeout(()=>{n.input.addHandler(new Hx(n)),n.input.addHandler(new Dx(n)),n.addCustom("list-clear-selection-handler",()=>new Lx(n)),n.addCustom("list-marker-menu",()=>new _x(n))})});const i=wt.createBlockContent(n,e,t,o,r),s=r,{level:l,start:c,groupId:a}=s,u=ii(s);o.setAttribute("data-list-level",`${l}`),o.setAttribute("data-list-start",`${c||1}`),o.setAttribute("data-list-group-id",`${a}`),o.setAttribute("data-list-type",u);const f=JI(s);return o.insertBefore(f,i),s.viewAsMindmap?setTimeout(()=>{const m=n.getBlockById(r.id);m&&f1(n,m,{},{mindmapTools:R3,saveData:!1})}):setTimeout(()=>{const m=n.getBlockById(r.id);m&&L3(n,m)}),i}const zx=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
368
- <path d="M8 8H15" stroke="currentColor" stroke-linecap="square" stroke-linejoin="round"></path>
369
- <path d="M8 14H15" stroke="currentColor" stroke-linecap="square" stroke-linejoin="round"></path>
370
- <path d="M8 2H15" stroke="currentColor" stroke-linecap="square" stroke-linejoin="round"></path>
371
- <path d="M4 8H0C0 8 0.552283 8 1.33333 8M4 14C2 13.1429 3.33333 8 1.33333 8M4 2C2 2.85714 3.33333 8 1.33333 8" stroke="currentColor" stroke-linecap="square"></path>
365
+ </svg>`;async function HI(n,e,t){const o=Ne(e),r=o.querySelector('[data-button-id="mindmap-fullscreen"]');d(Re,r,"no full screen button");const i=()=>{setTimeout(()=>{t.toMindmap(n,e,{},{reset:!0,mindmapTools:t})},300)},s=()=>{_(o,"fullscreen"),r.innerHTML=B3,f5(r,"Full screen",n.clientId),I3(e)&&setTimeout(()=>{i()},300)};if(document.fullscreenElement===o){try{await E3()}catch(l){Re.error(l)}s()}else{try{M(o,"fullscreen"),await FI(o),i()}catch(l){Re.error(l)}r.innerHTML=_I,f5(r,I.t("mindmap.exitFullscreen"),n.clientId)}o.onfullscreenchange=()=>{document.fullscreenElement||s()}}function l1(n,e,t,o,r){if(e.querySelector(`[data-button-id="${t}"]`))return null;const s=Io(t,o,r,[],n.clientId);return M(s,"mindmap-button"),e.appendChild(s),s}function c1(n,e){return n.querySelector(`[data-button-id="${e}"]`)}function jI(n){return c1(n,"mindmap-fullscreen")}function zI(n){return c1(n,"mindmap-fit")}function UI(n){return c1(n,"mindmap-close")}function VI(n,e,t,o){const r=l1(n,e,"mindmap-close",I.t("mindmap.close"),PI);!r||n.domEvents.addEventListener(r,"click",()=>{o.closeMindmap(n,t)})}function qI(n,e,t,o){const r=l1(n,e,"mindmap-fit",I.t("mindmap.autoFit"),NI);!r||n.domEvents.addEventListener(r,"click",()=>{o.fitMindmap(n,t)})}function WI(n,e,t,o){if(navigator.userAgent.includes("Mobile")&&!navigator.userAgent.includes("iPad"))return;const i=l1(n,e,"mindmap-fullscreen",I.t("mindmap.fullScreen"),B3);!i||n.domEvents.addEventListener(i,"click",()=>{HI(n,t,o)})}function GI(n,e){const t=Fl(e);if(!t)return;const o=zI(t);o&&(o.remove(),n.domEvents.removeAllListeners(o));const r=UI(t);r&&(r.remove(),n.domEvents.removeAllListeners(r));const i=jI(t);i&&(i.remove(),n.domEvents.removeAllListeners(i))}const ri=new Map;function a1(n,e,t){const o=(s,l)=>{s.forEach(c=>{l?M(c.block,"to-mindmap-highlight"):_(c.block,"to-mindmap-highlight"),o(c.children,l)})},r=w3(n,e);if(r.length===0)return;const i=r[0].block;if(t){const s=ri.get(i);s&&(s.forEach(l=>l.cancel()),ri.delete(i)),o(r,!0)}else{const s=setTimeout(()=>{o(r,!1),ri.delete(i)},300),l=()=>{clearTimeout(s),ri.delete(i)},c=ri.get(i);c?c.push({cancel:l}):ri.set(i,[{cancel:l}])}}const{Markmap:ZI}=P8;function QI(n,e){ze(e);const t=w3(n,e),o=t[0].block,r=a=>({t:"text",v:le(a.block).textContent,d:1,c:a.children.length>0?a.children.map(f=>r(f)):void 0});let i=null;t.length>1?i={t:"root",v:"root",d:0,c:t.length>0?t.map(a=>r(a)):void 0}:i=r(t[0]);const l=a=>{if(a.length===0)return null;const u=a[a.length-1];return u.children&&u.children.length>0?l(u.children):u},c=l(t);return{root:i,block:o,nodes:t,last:c}}function u1(n,e,t,o){const{root:r,block:i,last:s}=QI(n,e);o.selectBlock&&n.selection.selectBlock(i,0,0),a1(n,i,!1),o.saveData&&n.updateBlockData(i,{viewAsMindmap:!0});const l=Ne(i);let c=l.querySelector(".editor-mindmap-svg");if(o.reset&&(c&&c.remove(),c=null),c)c.innerHTML="";else{const T="http://www.w3.org/2000/svg",E=l.getBoundingClientRect(),R=document.fullscreenElement===l,L=R?`${E.width}`:`${e.getBoundingClientRect().width}`,P=R?`${E.height}`:"600",V=document.createElementNS(T,"svg");V.setAttributeNS(null,"viewBox",`0 0 ${L} ${P}`),V.setAttributeNS(null,"width","100%"),V.setAttributeNS(null,"height",P),V.style.display="block",V.style.width="100%",V.style.height=`${P}px`,V.classList.add("editor-mindmap-svg"),l.appendChild(V),c=V}const a=i,f=`editor-mindmap-root-${j(i)}`;M(a,"editor-in-mindmap-first",f,"readonly"),a.contentEditable="false";const m=fe(i);m&&K(m)<=K(s.block)&&$I(m,s.block,["block-hidden",f]);const p=(T,E)=>{if(E.length>0){const R=E[0].parentElement;R&&(R.style.width="100vw",R.style.maxWidth="200px")}E.forEach(R=>{M(R,"editor-mindmap-node")})},b=new ZI(c,{...t,autoFit:!0});b.viewHooks.transformHtml.tap(p),b.setData(r),b.fit();const k=Ne(i);let v=k.querySelector(".mindmap-toolbar");v||(v=A("div",["mindmap-toolbar"],k)),qI(n,v,a,o.mindmapTools),WI(n,v,a,o.mindmapTools),VI(n,v,a,o.mindmapTools),n.domEvents.addEventListener(c,"click",()=>{n.selection.selectBlock(i,0),n.input.focus()}),a.mindMap=b}function YI(n){const e=A("div",["list-to-mindmap-wrap"],null),t=Io("list-to-mindmap",I.t("mindmap.viewAsMindMap"),EI,[],n.clientId);return e.appendChild(t),e}async function x3(n,e){const t=`editor-mindmap-root-${e.id}`,o=H(e);Me(o).forEach(l=>{ne(l,t)&&_(l,t,"editor-in-mindmap-first","block-hidden")});const i=Ne(e);document.fullscreenElement===i&&await E3();const s=i.querySelector(".editor-mindmap-svg");!s||(d(Re,s,"no mindmap svg"),s.remove(),n.domEvents.removeAllListeners(s),GI(n,e))}function JI(n){const e=n.classList,t="editor-mindmap-root-";return Array.from(e).find(r=>{if(r.startsWith(t))return r})}async function T3(n,e){!JI(e)||(n.updateBlockData(e,{viewAsMindmap:null}),x3(n,e),n.selection.selectBlock(e,0))}function KI(n,e){const t=e.mindMap;t&&t.fit()}const S3={toMindmap:u1,closeMindmap:T3,fitMindmap:KI},QV="";class Zc{constructor(e){h(this,"toMindmapButton");h(this,"currentBlock",null);h(this,"handleHoveringBlock",e=>{!this.editor.isWritable()||(e&&ue(e)&&Ot(e)!=="unchecked"&&Ot(e)!=="checked"?Ne(e).appendChild(this.toMindmapButton):this.toMindmapButton.remove())});h(this,"handleMouseEnter",()=>{const e=z(this.toMindmapButton);d(Re,e&&ue(e),"no parent list"),a1(this.editor,e,!0),this.currentBlock=e});h(this,"handleMouseLeave",()=>{this.currentBlock&&(a1(this.editor,this.currentBlock,!1),this.currentBlock=null)});h(this,"handleClick",()=>{const e=z(this.toMindmapButton);d(Re,e&&ue(e),"no parent list"),u1(this.editor,e,{},{saveData:!0,selectBlock:!0,mindmapTools:S3})});this.editor=e,De.get(this.editor).addListener("change",this.handleHoveringBlock),this.toMindmapButton=YI(e),e.domEvents.addEventListener(this.toMindmapButton,"mouseenter",this.handleMouseEnter),e.domEvents.addEventListener(this.toMindmapButton,"mouseleave",this.handleMouseLeave),e.domEvents.addEventListener(this.toMindmapButton,"click",this.handleClick)}static get(e){return e.findCustomByType(Zc)}destroy(){De.get(this.editor).removeListener("change",this.handleHoveringBlock)}hide(){this.currentBlock&&(this.currentBlock=null),this.toMindmapButton.remove()}}function XI(n,e,t){var o;e==="beginDrag"&&((o=Zc.get(n))==null||o.hide())}function ii(n,e,t,o){var i;const r=(i=o==null?void 0:o.groupId)!=null?i:F();e.forEach(s=>{const l=n.getBlockData(s);if(l.start!==t||(o==null?void 0:o.resetGroupId)){const c={...l,start:t};o!=null&&o.resetGroupId&&(c.groupId=r),n.updateBlockData(s,c)}l.textOnly||(t+=1)})}function d1(n,e,t,o){const r=k3(e,{withSelf:!0});r.length!==0&&ii(n,r,t,o)}class Qc{constructor(e,t){h(this,"listStart",0);h(this,"listBrother",null);if(this.editor=e,Gc(t))return;const o=Us(t),r=Ut(o);this.listStart=r,o===t?this.listBrother=Cr(o):this.listBrother=o}fix(){!this.listBrother||d1(this.editor,this.listBrother,this.listStart)}}class Ar{constructor(e,t,o){h(this,"listStart");h(this,"listBrother",null);this.editor=e,this.options=o;const r=Us(t),i=Ut(r);this.listStart=i,this.listBrother=r,o!=null&&o.resetStart&&(this.listStart=1)}fix(){!this.listBrother||d1(this.editor,this.listBrother,this.listStart,this.options)}}class ex{constructor(e,t,o){h(this,"listStart");h(this,"listNextBrothers",[]);this.editor=e,this.listNextBrothers=oi(t);const{start:r,resetStart:i}=o||{};this.listStart=i?1:r!=null?r:1}fix(){!this.listNextBrothers.length||ii(this.editor,this.listNextBrothers,this.listStart)}}function tx(n,e,t){n.getBlockData(e).quoted&&(t.quoted=!0)}function h1(n,e,t,o){if(Re.debug("drag a block on a list block"),!$(n,e))return!1;d(Re,ue(t),"target is not a list block");const{type:r,start:i,level:s,groupId:l}=Lo(t),c=o==="after"?i+1:i,a=n.getBlockData(e),u={id:F(),type:"list",groupId:l,level:s,start:c,text:a.text,...i1(r)};tx(n,t,u);let f=K(t);const m=H(t);o==="after"&&(f+=1);let p=null;ue(e)&&(p=new Qc(n,e));const b=n.insertBlock(q(m),f,u,Xl(u.id,0));return n.deleteBlock(e),new Ar(n,b).fix(),p==null||p.fix(),!0}function nx(n,e,t,o){if(Re.debug("drag a list between text blocks"),o==="after"){const a=fe(t);if(a&&ue(a))return h1(n,e,a,"before")}if(o==="before"){const a=ye(t);if(a&&ue(a))return h1(n,e,a,"after")}const i={...n.getBlockData(e),groupId:F(),start:1,level:1};let s=K(t);const l=H(t);o==="after"&&(s+=1),n.insertBlock(q(l),s,i,Xl(i.id,0));const c=new Qc(n,e);return n.deleteBlock(e),c.fix(),!0}function ox(n,e,t,o,r){if(Ol(t))return!1;const{blockId:i}=t,s=n.getBlockById(i);d(Re,s,"no dragged block");const{isSourceBlock:l,targetBlock:c}=r;return!l&&c?(d(Re,e===c,"block !== target block"),d(Re,ue(c),"target is not a list block"),h1(n,s,c,o)):nx(n,s,c,o)}function Yc(n){const e=n.getAttribute("block-padding-level");return e?Number(e):null}function rx(n,e){let t;const o=Yc(e);if(!o)t=1;else{if(o>=12)return t=12,!1;t=o+1}return n.updateBlockData(e,{...n.getBlockData(e),padding:t}),!0}function D3(n,e){const t=Yc(e);if(!t)return!1;const o=n.getBlockData(e);return t>1?(n.updateBlockData(e,{...o,padding:t-1}),!0):(n.updateBlockData(e,{...o,padding:null}),!0)}function f1(n){return n.readonly||!n.isWritable()}function ix(n){return n.selection.range.getSelectedBlocks().forEach(t=>{const o=t.block;$(n,o)&&rx(n,o)}),!0}function sx(n){return n.selection.range.getSelectedBlocks().forEach(t=>{const o=t.block;$(n,o)&&D3(n,o)}),!0}function lx(n){return f1(n)?!1:n.undoManager.runInGroup(()=>(ix(n),!0))}function cx(n){return f1(n)?!1:n.undoManager.runInGroup(()=>(sx(n),!0))}function ax(n){if(f1(n))return!1;if(!n.selection.range.isCollapsed())return;const e=n.selection.focusedBlock;if(!$(n,e))return;const t=n.selection.range.focus;if(!(!t.isSimple()||t.offset!==0||!Yc(e)))return D3(n,e),!0}class L3{renderBlock(e,t,o){const{padding:r}=o;return r?{attributes:{"block-padding-level":r}}:{}}}const YV="",ux={Tab:lx,"Shift+Tab":cx,Backspace:ax};function dx(n,e,t=1){if(!e)return null;let o=ye(n);for(;o;){const r=o.getAttribute("data-style-heading"),i=Number(o.getAttribute("data-list-level"));if(r){if(r<e)return null;if(r===e&&i===t)return ue(o)?o:null}o=ye(o)}return null}function hx(n,e){const t=n.getAttribute("data-style-heading"),o=dx(n,t);if(o)return o;const r=ye(n);if(r&&ue(r)&&Ot(r)===e)return r;const i=fe(n);return i&&ue(i)&&Ot(i)===e?i:null}function fx(n,e,t){var k,v,T;const o=(k=t.data)!=null?k:{};let r=1;if(ue(e))r=bt(e);else{const E=Yc(e);E&&(r=E+1),r>8&&(r=8)}const i=(v=o.listType)!=null?v:"ordered";if(i==="text-only")return null;const s=n.getBlockData(e);let l=(T=s.text)!=null?T:[],a=ve(l);const u=t.offset||0;u<=at(l)&&(l=kt(l,u).right,a=a.substring(0,u));let f=1;i==="ordered"&&(f=Number.parseInt(a,10)||1);let m=F();const p=hx(e,i);if(p){if(K(e)>K(p))f=Ut(p)+1;else{const R=Ut(p);R>1&&(f=R-1)}m=ni(p),new ex(n,p,{start:f+1}).fix()}const b={id:F(),type:"list",level:r,start:f,groupId:m,ordered:!1,text:l};return s.quoted&&(b.quoted=!0),s.heading&&(b.heading=s.heading),i==="ordered"?b.ordered=!0:(i==="checked"||i==="unchecked")&&(b.checkbox=i),{blockData:b,onConverted:(E,R)=>{new Ar(E,R).fix()}}}function si(n){return n.textOnly?"text-only":n.checkbox?n.checkbox:n.ordered?"ordered":"unordered"}function mx(n){var t,o;if(n.checkbox||n.textOnly)return"";const e=(t=n.level)!=null?t:1;return n.ordered?`${DI(e,(o=n.start)!=null?o:1)}.`:LI(e)}function Jc(n){return n==="checked"||n==="unchecked"}function M3(n,e,t,o){const r=e,{containerId:i,blockIndex:s}=o[o.length-1];if(s===0)return!0;const l=t.blocks[i][s-1];if(l.type!=="list")return!0;const c=si(r),a=si(l);return c!==a&&(!Jc(c)||!Jc(a))||r.level>l.level}function R3(n,e,t,o){const r=e,{containerId:i,blockIndex:s}=o[o.length-1];if(s===t.blocks[i].length-1)return!0;const l=t.blocks[i][s+1];if(l.type!=="list")return!0;const c=si(r),a=si(l);return c!==a&&(!Jc(c)||!Jc(a))||r.level>l.level}function gx(n,e,t,o,r){var s,l,c;const i=e;if(o==="text"){let a=((s=wt.convertTo)==null?void 0:s.call(wt,n,e,t,"text",r))||"";i.checkbox==="checked"?a=`[x] ${a}`:i.checkbox==="unchecked"&&(a=`[ ] ${a}`),i.ordered?a=`${i.start}. ${a}`:a=`- ${a}`;const u=i.level||0;return a=(u>0?" ".repeat(u-1):"")+a,a}if(o==="markdown"){let a=((l=wt.convertTo)==null?void 0:l.call(wt,n,e,t,"markdown",r))||"";i.checkbox==="checked"?a=`[x] ${a}`:i.checkbox==="unchecked"&&(a=`[ ] ${a}`),i.ordered?a=`${i.start}. ${a}`:a=`- ${a}`;const u=i.level||0;return a=(u>0?" ".repeat(u-1):"")+a,M3(n,e,t,r)&&(a=`${a}`),R3(n,e,t,r)&&(a=`${a}`,u<=1&&(a+=`
366
+ `)),a}if(o==="html"){let a=((c=wt.convertTo)==null?void 0:c.call(wt,n,e,t,"html",r))||"";a=a.replace("<p>","").replace("</p>",""),i.checkbox==="checked"?a=`<input type="checkbox" checked="checked" disabled="disabled" /> ${a}`:i.checkbox==="unchecked"&&(a=`<input type="checkbox" disabled="disabled" /> ${a}`);let u="ul";return i.ordered?(a=`<li value="${i.start}">${a}</li>`,u="ol"):a=`<li>${a}</li>`,M3(n,e,t,r)&&(a=`<${u}>${a}`),R3(n,e,t,r)&&(a=`${a}</${u}>`),a}return""}const px=`<?xml version="1.0" ?>
367
+ <svg t="1666868766077" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3547" width="16" height="16">
368
+ <path d="M864 128H160c-17.6 0-32 14.4-32 32v704c0 17.6 14.4 32 32 32h704c17.6 0 32-14.4 32-32V160c0-17.6-14.4-32-32-32zM428 718.4l-45.6 45.6-45.6-45.6-116-117.6 45.6-45.6L383.2 672l367.2-367.2 45.6 45.6-368 368z" p-id="3548" fill="#1296db"></path>
372
369
  </svg>
373
- `;function Ux(n){const e=A("div",["list-to-mindmap-wrap"],null),t=Io("list-to-mindmap",I.t("mindmap.viewAsMindMap"),zx,[],n.clientId);return e.appendChild(t),e}const YV="";class Jc{constructor(e){h(this,"toMindmapButton");h(this,"currentBlock",null);h(this,"handleHoveringBlock",e=>{!this.editor.isWritable()||(e&&ue(e)&&Ot(e)!=="unchecked"&&Ot(e)!=="checked"?Ne(e).appendChild(this.toMindmapButton):this.toMindmapButton.remove())});h(this,"handleMouseEnter",()=>{const e=z(this.toMindmapButton);d(Re,e&&ue(e),"no parent list"),h1(this.editor,e,!0),this.currentBlock=e});h(this,"handleMouseLeave",()=>{this.currentBlock&&(h1(this.editor,this.currentBlock,!1),this.currentBlock=null)});h(this,"handleClick",()=>{const e=z(this.toMindmapButton);d(Re,e&&ue(e),"no parent list"),f1(this.editor,e,{},{saveData:!0,selectBlock:!0,mindmapTools:R3})});this.editor=e,De.get(this.editor).addListener("change",this.handleHoveringBlock),this.toMindmapButton=Ux(e),e.domEvents.addEventListener(this.toMindmapButton,"mouseenter",this.handleMouseEnter),e.domEvents.addEventListener(this.toMindmapButton,"mouseleave",this.handleMouseLeave),e.domEvents.addEventListener(this.toMindmapButton,"click",this.handleClick)}static get(e){return e.findCustomByType(Jc)}destroy(){De.get(this.editor).removeListener("change",this.handleHoveringBlock)}hide(){this.currentBlock&&(this.currentBlock=null),this.toMindmapButton.remove()}}const Vx={list:{confirm:"\u786E\u5B9A",setStart:"\u8BBE\u7F6E\u7F16\u53F7",continueList:"\u7EE7\u7EED\u7F16\u53F7",restartList:"\u5F00\u59CB\u65B0\u5217\u8868",changeNumber:"\u4FEE\u6539\u7F16\u53F7\u503C",numberLabel:"\u7F16\u53F7\u987A\u5E8F",mention:{tooltip:"\u63D0\u53CA\u4EBA\u5458\u5E76\u901A\u77E5"}},mindmap:{viewAsMindMap:"\u663E\u793A\u4E3A\u8111\u56FE",autoFit:"\u81EA\u52A8\u7F29\u653E",fullScreen:"\u5168\u5C4F\u67E5\u770B",close:"\u5173\u95ED",exitFullscreen:"\u9000\u51FA\u5168\u5C4F"}},qx={list:{confirm:"OK",setStart:"Set the number",continueList:"Continue numbering",restartList:"Start a new list",changeNumber:"Set numbering value",numberLabel:"Numbering order",mention:{tooltip:"@Mention someone"}},mindmap:{viewAsMindMap:"View as MindMap",autoFit:"Auto fit",fullScreen:"Fullscreen",close:"Close",exitFullscreen:"Exit fullscreen"}},Wx={list:{confirm:"OK",setStart:"\u756A\u53F7\u3092\u8A2D\u5B9A",continueList:"\u9023\u756A\u3092\u8A2D\u5B9A",restartList:"\u65B0\u3057\u3044\u30EA\u30B9\u30C8\u3092\u4F5C\u6210",changeNumber:"\u756A\u53F7\u3092\u7DE8\u96C6",numberLabel:"\u756A\u53F7",mention:{tooltip:"\u30E1\u30F3\u30B7\u30E7\u30F3\u304A\u3088\u3073\u901A\u77E5"}},mindmap:{viewAsMindMap:"\u30DE\u30A4\u30F3\u30C9\u30DE\u30C3\u30D7\u3067\u8868\u793A",autoFit:"\u81EA\u52D5\u30D5\u30A3\u30C3\u30C8",fullScreen:"\u5168\u753B\u9762\u8868\u793A\u306E\u30AA\u30F3",close:"\u9589\u3058\u308B",exitFullscreen:"\u5168\u753B\u9762\u8868\u793A\u306E\u30AA\u30D5"}};I.mergeLang({"zh-CN":Vx,"en-US":qx,"ja-JP":Wx});const JV="";function Gx(n,e,t){var o;e==="beginDrag"&&((o=Jc.get(n))==null||o.hide())}const j3={...wt,blockType:"list",createBlockContent:jx,convertFrom:jI,convertTo:UI,handleDrop:GI,notify:Gx},p1=w("paragraph");class Zx{constructor(e){h(this,"id","BlockParagraphProvider");this.editor=e}isChecked(e,t){return!!(e[t]||e.level&&(e.ordered===!0&&!e.checkbox&&t==="ordered-list"||e.ordered===!1&&!e.checkbox&&t==="unordered-list")||t==="check-list"&&e.checkbox)}getAvailableCommands(e,t){const o=[],r={"unordered-list":[I.t("commands.unordered"),Qt("CtrlOrCmd+Shift+L"),oB],"ordered-list":[I.t("commands.ordered"),Qt("CtrlOrCmd+Shift+U"),nB],"check-list":[I.t("commands.check"),void 0,rB],link:[I.t("commands.link"),Qt("CtrlOrCmd+K"),x5],quoted:[I.t("commands.quote"),void 0,iB]};if($(e,t)){const i=j(t),s=se(t),l=Kt(e,t),c=e.getBlockData(t);Object.entries(r).forEach(([a,[u,f,m]])=>{const p=[];if(this.isChecked(c,a)&&p.push("checked"),a==="link"){if(!e.selection.range.isSimple())return;e.selection.range.getSelectedBlocks().length!==1&&p.push("disabled")}o.push({blockId:i,blockType:s,blockKind:l,id:a,name:u,desc:f,states:p,icon:m,groupIndex:600})})}return o}convertLink(e,t,o){d(p1,Wn(t.start),""),d(p1,Wn(t.start),"");const r="bottom-start",i=t.start.offset,s=t.end.offset,l=(p,b)=>{e.undoManager.runInGroup(()=>{try{const k=e.selection.range.isCollapsed();let v;if(k){v=Gn(e.getBlockText(o),s,p,{link:b}),e.setBlockText(o,v);return}v=Yl(e.getBlockText(o),i,s,p),v=Xi(i,p.length,v,"link",b),e.setBlockText(o,v),e.selection.selectBlock(o,i+p.length),e.focus()}catch(k){p1.error(k)}})},c=()=>{e.selection.selectBlock(o,s),e.focus()},a=ho(e,o,t)[0];if(!a)return;const u=go(e,o,"link-button-anchor",a),f=e.getBlockText(o),m=es(f,i);js(e,{target:u,linkText:e.getSelectedText(),linkUrl:(m==null?void 0:m.link)||"",onFinished:l,onClose:c,placement:r})}convertToList(e,t,o){const r=$l(e,t,"list",{offset:0,data:{listType:o}});r&&e.undoManager.runInGroup(()=>{const i=K(t),s=H(t);e.insertBlock(q(s),i,r.blockData),e.deleteBlock(t)})}executeCommand(e,t,o,r){var c;if(!$(e,t))return!1;const i=r.id,s=(c=r.states)==null?void 0:c.includes("checked");let l=!1;if(i==="unordered-list"&&(s?li(e,t):this.convertToList(e,t,"unordered"),l=!0),i==="ordered-list"&&(s?li(e,t):this.convertToList(e,t,"ordered"),l=!0),i==="check-list"&&(s?li(e,t):this.convertToList(e,t,"unchecked"),l=!0),i==="quoted"){const u=e.getBlockData(t).quoted;e.updateBlockData(t,{quoted:u?void 0:!0}),l=!0}if(i==="link"){const a=Vc(e);a.disableTextToolbar(),a.hide(),setTimeout(()=>{a.enableTextToolbar()},1e3),this.convertLink(e,o,t),l=!0}return l}}const Qx={left:Ts,right:Ih,center:xh};class Yx{constructor(e){h(this,"id","BlockAlignProvider");this.editor=e}applyAlignStyle(e,t,o){Object.keys(Qx).includes(o)?e.updateBlockData(t,{align:o}):e.updateBlockData(t,{align:null})}isChecked(e,t){return e.align===t}getAvailableCommands(e,t,o){if($(e,t)){const r=j(t),i=se(t),s=Kt(e,t),l=e.getBlockData(t),c=a=>{var f;const u=A("span",["toolbar-item-name-container"],null);for(const m of a.children)if((f=m.states)!=null&&f.includes("checked"))return u.innerHTML=m.icon||Ts,u;return u.innerHTML=Ts,u};return[{id:"align",name:I.t("commands.alignGroup"),blockId:r,blockType:i,blockKind:s,groupIndex:700,dropdown:!0,element:c,manualShowChildren:!0,childrenPlacement:"bottom-start",defaultCheckedChildren:["align-left"],children:[{id:"align-left",name:I.t("commands.alignLeft"),icon:Ts,states:this.isChecked(l,"left")?["checked"]:[]},{id:"align-center",name:I.t("commands.alignCenter"),icon:xh,states:this.isChecked(l,"center")?["checked"]:[]},{id:"align-right",name:I.t("commands.alignRight"),icon:Ih,states:this.isChecked(l,"right")?["checked"]:[]}],childrenType:"menu"}]}return[]}executeCommand(e,t,o,r){if(!$(e,t))return!1;if(r.id.startsWith("align")){const i=r.id.replace(/^align-/,"");return this.applyAlignStyle(e,t,i),!0}return!1}}function Jx(n){const t=n.selection.range;if(t.isCollapsed()||t.start.blockId!==t.end.blockId||!t.start.isSimple()||!t.end.isSimple()||t.end.offset-t.start.offset!==1)return!1;const o=n.getBlockById(t.start.blockId);return ns(n,o,t.start.offset).charType==="box"}const Kx=w("toolbar-handler"),Xx={id:"",name:"",type:"separator"};class ci{constructor(e){h(this,"toolbar");h(this,"toolbarType","object");h(this,"mouseDown",!1);h(this,"oldRange",null);h(this,"hoveringBlock",null);h(this,"hoveringTextChild",null);h(this,"_disableTextToolbar",!1);h(this,"handleButtonClick",(e,t)=>{this.toolbarType==="text"?(this.editor.editorCommandProviders.executeCommand(this.editor.selection.range,t,{}),this.showTextToolbar("click")):this.hoveringBlock&&kI(this.editor,this.hoveringBlock,this.hoveringTextChild,t)});h(this,"handleClose",()=>{Mh(this.editor)&&this.editor.focus()});h(this,"handleClosing",(e,t)=>{if(this.toolbarType==="object"){const o=Bm(t);if(this.hoveringBlock===o)return!1}return!0});h(this,"handleDocumentMouseDown",e=>{e.button===0&&(document.addEventListener("mouseup",this.handleDocumentMouseUp),this.mouseDown=!0)});h(this,"handleDocumentMouseUp",()=>{document.removeEventListener("mouseup",this.handleDocumentMouseUp),this.mouseDown=!1,this.handleSelectionChange(this.editor)});h(this,"handleHoveringBlockChildChange",(e,t,o,r)=>{if(!(this.hoveringBlock===e&&this.hoveringTextChild===t)&&(this.hoveringBlock=e,this.hoveringTextChild=t,!(this.toolbar.isVisible&&this.toolbarType==="text"))){if(!e){this.toolbar.close();return}this.showObjectToolbar()}});h(this,"handleSelectionChange",nt.default(e=>{var o;if(d(Kx,e===this.editor,"editor mismatch"),e.selection.range.isCollapsed()||this.mouseDown){if(this.toolbarType==="object"){const r=(o=this.toolbar.tippyInstance)==null?void 0:o.reference,i=this.editor.selection.focusedBlock;if(r&&Ce(r,i))return}this.toolbar.close(),this.oldRange=null;return}if(!this.editor.isWritable()){this.toolbar.close(),this.oldRange=null;return}if(e.selection.range.getSelectedBlocks().length===0){this.toolbar.close(),this.oldRange=null;return}this.oldRange&&this.oldRange.isEqual(e.selection.range)||(this.oldRange=e.selection.range,this.showTextToolbar("selectionChange"))},50));this.editor=e;const t=e.options.componentsOptions.popover;this.toolbar=new Ds([],void 0,{tooltipId:e.clientId,id:"editor-toolbar",overflowBoundary:t==null?void 0:t.overflowBoundary,refuseOverflow:!0,padding:20}),this.toolbar.on("click",this.handleButtonClick),this.toolbar.on("close",this.handleClose),this.toolbar.on("closing",this.handleClosing),this.bindEvents(),e.addListener("selectionChanged",this.handleSelectionChange),De.get(e).addListener("childChange",this.handleHoveringBlockChildChange),De.get(e).addFilter(this),e.editorCommandProviders.registerCommandProvider(new BI(e)),e.editorCommandProviders.registerCommandProvider(new Zx(e)),e.editorCommandProviders.registerCommandProvider(new Yx(e))}disableTextToolbar(){this._disableTextToolbar=!0}enableTextToolbar(){this._disableTextToolbar=!1}hide(){this.toolbar.close()}destroy(){this.unbindEvents(),this.toolbar.destroy(),this.editor.removeListener("selectionChanged",this.handleSelectionChange),De.get(this.editor).removeListener("childChange",this.handleHoveringBlockChildChange)}isInBlock(e,t){return e!==this.hoveringBlock?!1:!!(t.target&&t.target instanceof Node&&this.toolbar.popper&&Ce(this.toolbar.popper,t.target))}bindEvents(){document.addEventListener("mousedown",this.handleDocumentMouseDown)}unbindEvents(){document.removeEventListener("mousedown",this.handleDocumentMouseDown)}update(e){this.showTextToolbar(e)}showTextToolbar(e){if(this._disableTextToolbar||!this.editor.isWritable())return;const o=this.editor.selection.range.getSelectedBlocks();if(o.length===0)return;const r=o[0];if(!r)return;if(o.length===1&&Ke(r.block)){e==="click"&&this.showObjectToolbar();return}if(Jx(this.editor))return;if(H(r.block)===this.editor.rootContainer&&K(r.block)===0){this.toolbar.close();return}const i=this.editor.editorCommandProviders.getCommands(this.editor.selection.range),s=new Map;i.forEach(u=>{const f=u.groupIndex,m=s.get(f);m?m.push(u):s.set(f,[u])});const l=[[]],c=Array.from(s.entries()).sort((u,f)=>u[0]-f[0]);for(let u=0;u<c.length;u++){const[,f]=c[u];if(f.length===0)continue;let m=l[l.length-1];m.length>0&&m[m.length-1].groupIndex!==f[f.length-1].groupIndex&&(m=[],l.push(m)),m.push(...Uc(f))}if(l.length===0){this.toolbar.close();return}this.toolbarType="text";const a=[];if(l.forEach((u,f)=>{const m=u.sort((p,b)=>{var k,v;return((k=p.order)!=null?k:0)-((v=b.order)!=null?v:0)});a.push(...m),f!==l.length-1&&a.push(Xx)}),a.length===0){this.toolbar.close();return}if(this.toolbar.updateItems(a),!this.toolbar.isVisible){const u=o[o.length-1],f=!this.editor.selection.range.isReverse()&&u!==r,m=f?u:r,p=mI(this.editor,m),b=go(this.editor,m.block,"editor-quick-menu",p);this.toolbar.manualShow(b,{placement:f?"bottom":"top"})}}showObjectToolbar(){var i,s;if(!this.hoveringBlock||this.mouseDown)return;const e=this.hoveringBlock,t=this.hoveringTextChild,{commands:o,element:r}=bI(this.editor,e,t);if(!o.length||!r){this.toolbar.close();return}this.toolbarType="object",this.toolbar.isVisible&&((s=(i=this.toolbar)==null?void 0:i.tippyInstance)==null?void 0:s.reference)!==r&&this.toolbar.close(),this.toolbar.updateItems(o),this.toolbar.isVisible||this.toolbar.manualShow(r,{placement:t?"bottom":"top"})}static register(e){return e.addCustom("toolbar-handler",t=>new ci(t))}static get(e){return e.getCustom("toolbar-handler")}}function Kc(n,e,t){n.getBlockData(e).heading===t?n.updateBlockData(e,{heading:null}):n.updateBlockData(e,{heading:t})}function z3(n,e,t){["left","center","right"].includes(t)?n.updateBlockData(e,{align:t}):n.updateBlockData(e,{align:null})}function C1(n,e){const o=n.getBlockData(e).quoted;n.updateBlockData(e,{quoted:o?void 0:!0})}function A1(n,e){return!!(n[e]||n.level&&(n.ordered===!0&&!n.checkbox&&e==="ordered-list"||n.ordered===!1&&!n.checkbox&&e==="unordered-list")||e==="check-list"&&n.checkbox)}function b1(n,e,t){if(!n.selection.range.focus.isSimple())return;const r=n.getBlockData(e);let i;switch(t){case"unordered-list":i=A1(r,"unordered-list")?void 0:"unordered";break;case"ordered-list":i=A1(r,"ordered-list")?void 0:"ordered";break;case"check-list":i=A1(r,"check-list")?void 0:"unchecked";break}if(i){const s=$l(n,e,"list",{offset:0,data:{listType:i}});s&&n.undoManager.runInGroup(()=>{const l=K(e),c=H(e);n.deleteBlock(e),n.insertBlock(q(c),l,s.blockData)})}else li(n,e)}const eT=Object.freeze(Object.defineProperty({__proto__:null,applyHeadingStyle:Kc,applyAlignStyle:z3,applyQuoteStyle:C1,applyList:b1},Symbol.toStringTag,{value:"Module"})),tT=[Ah,bh,vh,yh,kh,wh,Bh,Eh],nT={Unordered:D5,Ordered:L5,Checkbox:T5,Quote:S5};function U3(n,e){const t=n;t.blockOptions=e,t.itemType="insert-block",n.children&&n.children.forEach(o=>U3(o,e))}function v1(n=1){var r;const e={name:"basic",insertBlockCommandItems:[]};let t=qc();t<=4?t=5:t<8&&(t+=1);let o=n;for(;o<=t;){const i=`heading-${o}`;(r=e.insertBlockCommandItems)==null||r.push({id:i,icon:tT[o-1],name:I.t("quickMenu.basic.heading.title",{heading:String(o)}),order:o,group:"basics",value:String(o),subText:At(i)}),o++}return e}function oT(){const n={name:"basic",insertBlockCommandItems:[]};return["Unordered","Ordered","Checkbox","Quote"].forEach((t,o)=>{var i;const r=`insert-${t.toLocaleLowerCase()}`;(i=n.insertBlockCommandItems)==null||i.push({id:r,name:I.t(`quickMenu.basic.${t.toLocaleLowerCase()}`),icon:nT[t],value:t.toLocaleLowerCase(),group:"basics",order:10+o,subText:At(r)})}),n}class V3{getCommands(){const e=v1(),t=oT();return[...e.insertBlockCommandItems||[],...t.insertBlockCommandItems||[]]}updateBlock(e,t,o,r){const{value:i,id:s}=r;return s.startsWith("heading-")?Kc(e,o,Number.parseInt(i!=null?i:"1",10)||1):i==="ordered"||i==="unordered"||i==="checkbox"?b1(e,o,{ordered:"ordered-list",unordered:"unordered-list",checkbox:"check-list"}[i]):i==="quote"&&C1(e,o),null}async handleUpdateBlockCore(e,t){const o=e.getBlockByIndex(t.containerId,t.blockIndex);return this.updateBlock(e,t.containerId,o,t.item)}async handleInsertEmptyBlockCore(e,t){const{containerId:o,blockIndex:r}=t,i=e.insertTextBlock(void 0,o,r);return this.updateBlock(e,t.containerId,i,t.item)}async executeCommand(e,t,o){if(o.from==="quick-menu"){const r=e.getBlockById(o.blockId),i=e.getParentContainer(r),s=q(i),l=e.getBlockIndex(r);e.undoManager.runInGroup(()=>this.handleUpdateBlockCore(e,{item:t,containerId:s,blockIndex:l}))}else o.from==="block-menu"&&e.undoManager.runInGroup(()=>this.handleInsertEmptyBlockCore(e,{item:t,containerId:o.containerId,blockIndex:o.blockIndex}));return null}}const q3={basics:100,system:200,common:300,thirdParty:400};class y1{constructor(){h(this,"dataUrl","");h(this,"error",null)}destroy(){}setDataUrl(e){this.error=null,this.dataUrl=e}setError(e){this.dataUrl="",this.error=e}}const rT=w("mathjax-converter"),iT="MathJax-script";async function sT(n){var o;window.MathJax||(window.MathJax={options:{skipHtmlTags:["script","noscript","style","textarea","pre","code","annotation","annotation-xml","body"]}});const e=n.getComponentOptions("mathjax"),t=((o=e==null?void 0:e.cdn)==null?void 0:o.mathjax)||"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js";await Wo(t,iT)}function lT(){try{window.MathJax&&window.MathJax.texReset()}catch{}}async function W3(n,e){const t="mathjax2Svg";try{await Zt.lock(t),lT(),await sT(n);const o=await window.MathJax.tex2svgPromise(e),r=o.querySelector("merror");if(r)throw new Error(r.textContent);return o.querySelector("svg").outerHTML}catch(o){throw rT.error(o),o}finally{Zt.release(t)}}async function G3(n,e){const t=await W3(n,e);return t?await Eu(t,"image/svg+xml"):""}async function k1(n,e){const o=await W3(n,e),r=new File([o],"math.svg");return(await n.doc.uploadResource(r)).resourceId}const Z3=w("edit-mathjax");class cT{constructor(){h(this,"editMathjaxPopup",null);h(this,"onChange",null);h(this,"tex","");h(this,"handleShow",()=>{setTimeout(()=>{this.getTextarea().focus()})});h(this,"handleClose",e=>{var o;const t=e.content.querySelector("textarea");if(t){const r=t.value;r!==this.tex&&((o=this.onChange)==null||o.call(this,r,!0))}});h(this,"handleKeyup",e=>{var t;e.isComposing||(e.key==="Escape"&&((t=this.editMathjaxPopup)==null||t.close()),this.handleChange(e.target.value))});h(this,"handleChange",nt.default(e=>{var t;(t=this.onChange)==null||t.call(this,e,!1)},300))}editMathjax(e,t,o){if(!this.editMathjaxPopup)this.editMathjaxPopup=new xs(this.createPopupContent(t));else{const r=this.getTextarea();r.value=t}this.tex=t,this.editMathjaxPopup.addListener("show",this.handleShow),this.editMathjaxPopup.manualShow(e,{theme:"light"}),this.editMathjaxPopup.removeAllListeners("close"),this.editMathjaxPopup.addListener("close",this.handleClose),this.onChange=o}createPopupContent(e){const t=A("textarea",["mathjax-editor-textarea"],null);return t.value=e,t.addEventListener("keyup",this.handleKeyup),t}getTextarea(){d(Z3,this.editMathjaxPopup,"no exists mathjax editor popup");const e=this.editMathjaxPopup.content.querySelector("textarea");return d(Z3,e,"no textarea"),e}destroy(){var e;this.onChange=null,(e=this.editMathjaxPopup)==null||e.removeAllListeners()}}function Q3(n,e,t,o){n.addCustom("mathjax-editor",()=>new cT).editMathjax(e,t.trim(),o)}function Y3(){return{insert:" ",attributes:{id:F(),box:!0,type:"math",tex:" ",src:"",created:Date.now()}}}function Xc(n,e){const t=n.getBoxData(e),o=z(e);if(!o)return;const r=po(o,e);n.selection.selectBlock(o,r.start,r.end);const i=async(s,l)=>{if(!s.trim()){n.updateBoxData({...t,tex:s,src:null});return}try{await Zt.lock("convertAndUploadMathjax");const c=await k1(n,s);n.updateBoxData({...t,tex:s,src:c})}catch(c){const a=n.getBoxData(e);n.addCustom(`mathjax-box-${a.id}`,()=>new y1).setError(c),n.updateBoxData({...t,tex:s,src:""})}finally{Zt.release("convertAndUploadMathjax"),l&&n.focus()}};Q3(n,e,t.tex,i)}const aT=w("mathjax-box");function w1(n,e){n.selection.updateSelection(null);const t=e.target;!t||!(t instanceof HTMLElement)||n.domEvents.removeEventListener(t,null,w1)}async function uT(n,e,t){try{if(!e.tex.trim())return;const o=await G3(n,e.tex),r=n.findBoxById(e.id);if(!r)return;const i=Pu(r);i.innerHTML="";const s=A("img",["mathjax"],i);s.src=o,t.setDataUrl(o),n.domEvents.addEventListener(s,"load",w1)}catch(o){t.setError(o);const r=n.findBoxById(e.id);if(!r)return;const i=r.querySelector(".mathjax-tex-text");M(i,"mathjax-error"),i.innerText=o.message,n.selection.updateSelection(null)}}function dT(n,e,t,o){const r=o,i=n.addCustom(`mathjax-box-${r.id}`,()=>new y1);if(r.src||i.dataUrl){const c=A("img",["mathjax"],t);c.src=n.doc.buildResourceUrl(r.src||i.dataUrl),n.domEvents.addEventListener(c,"load",w1);return}const s=["mathjax-tex-text"];let l=r.tex;l.trim()?i.error&&(l=i.error.message,s.push("mathjax-error")):l=I.t("mathjax.emptyText"),A("span",s,t,l),uT(n,r,i)}function hT(n,e){const t={id:F(),box:!0,type:"math",tex:e,src:"",created:Date.now()};return k1(n,e).then(o=>{if(!n.findBoxById(t.id))return;const i={...t,src:o};n.updateBoxData(i)}).catch(o=>{aT.error(`failed to convert and upload mathjax: ${JSON.stringify(o)}`)}),t}function fT(n,e,t,o){const r=e;return o==="text"?r.tex:o==="markdown"?` $${r.tex}$ `:r.src?`<img src="${n.doc.buildResourceUrl(r.src,{withToken:!0})}" />`:`<code>$${r.tex}$</code>`}function mT(n,e,t){Xc(n,e)}const B1={boxType:"math",updateBoxContent:dT,convertFrom:hT,convertTo:fT,handleClickBox:mT};async function gT(n,e,t){try{const o=e.embedData,r=await G3(n,o.mathjaxText),i=n.findBlockById(e.id);if(!i)return;const s=le(i);s.innerHTML="";const l=A("img",["mathjax"],s);l.src=r,t.setDataUrl(r)}catch(o){t.setError(o)}}function pT(n,e){if(n.readonly||!e.target||!(e.target instanceof Node))return;const t=z(e.target);if(!t||!Ke(t)||Nt(t)!=="math")return;const o=le(t),r=o.querySelector("img")||o.querySelector("span.mathjax-tex-text");if(!r||!Ce(r,e.target))return;const s=n.getBlockData(t).embedData;Q3(n,r,s.mathjaxText,async l=>{const c=await k1(n,l),a={mathjaxText:l,src:c};n.updateEmbedData(t,a)})}function CT(n,e,t){const o=t.embedData,r=n.addCustom(`mathjax-block-${t.id}`,()=>new y1);if(n.domEvents.addEventListener(e,"click",pT),o.src||r.dataUrl){const i=A("img",["mathjax"],e);i.src=n.doc.buildResourceUrl(o.src||r.dataUrl);return}r.error,A("span",["mathjax-tex-text"],e,o.mathjaxText),gT(n,t,r)}function AT(n,e,t){if(!$(n,e))return null;const o=n.getBlockString(e).trim();if(!o||!o.startsWith("$$")||!o.endsWith("$$"))return null;const r=bu(o,"$");if(!r)return null;const i={mathjaxText:r,src:""};return{blockData:{id:F(),type:"embed",embedType:"math",embedData:i}}}function bT(n){return{name:"Mathjax"}}function vT(n,e){const t=le(e);n.domEvents.removeAllListeners(t)}function yT(n,e,t,o){const r=e.embedData;return o==="html"?`<img src="${n.doc.buildResourceUrl(r.src,{withToken:!0})}" />`:o==="markdown"?`
370
+ `,Cx=`<?xml version="1.0" ?>
371
+ <svg t="1666868691722" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3301" width="16" height="16">
372
+ <path d="M832 192v640H192V192h640m32-64H160c-17.6 0-32 14.4-32 32v704c0 17.6 14.4 32 32 32h704c17.6 0 32-14.4 32-32V160c0-17.6-14.4-32-32-32z" p-id="3302" fill="#dbdbdb"></path>
373
+ </svg>`;function Ax(n,e){const t=si(e);if(t!=="text-only"){if(t==="checked"){n.innerHTML=px;return}if(t==="unchecked"){n.innerHTML=Cx;return}n.innerText=mx(e)}}function bx(n){const e=A("div",["list-container"],null),t=A("button",["list-marker"],e);return Ax(t,n),e}function O3(n){let e=fe(n);if(!e)return null;const t=Cr(n);for(;e!==t;){if(d(Re,e,"no next block"),ue(e))return bt(e)>bt(n)?e:null;if(e=fe(e),!e)return null}return null}function m1(n){const e=[];let t=O3(n);if(!t)return e;for(;t;){const o=Cr(t);e.push({block:t,children:m1(t)}),t=o}return e}function vx(n){const e=(o,r)=>{r.push(o.block),o.children.forEach(i=>e(i,r))},t=[];return n.forEach(o=>e(o,t)),t}function P3(n,e){return bt(e)!==1}function N3(n,e,t){e.forEach(o=>{const r=n.getBlockData(o.block);n.updateBlockData(o.block,{...r,groupId:t,level:r.level-1}),o.children.length&&N3(n,o.children,r.groupId)})}function g1(n,e){if(!P3(n,e))return!1;const t=bt(e);if(t===1)return!1;let o=F(),r=1,i=Ot(e);const s=t-1,l=s1(e);l&&(o=ni(l),r=Ut(l)+1,i!=="text-only"&&(i=Ot(l)));const c=m1(e),a=n.getBlockData(e),u={...a,groupId:o,level:s,start:r,...i1(i)};n.updateBlockData(e,u),n.doc.beginBatchUpdate(),N3(n,c,a.groupId),n.doc.endBatchUpdate(),new Ar(n,e).fix();const m=O3(e);return m&&new Ar(n,m,{resetStart:!0,resetGroupId:!0}).fix(),!0}function li(n,e){ze(e);const t=n.getBlockData(e),o={id:F(),type:"text",text:t.text};t.heading&&(o.heading=t.heading),t.heading&&(o.heading=t.heading);const r=new Qc(n,e),i=H(e),s=K(e);n.deleteBlock(e);const l=Xl(o.id,0);n.insertBlock(q(i),s,o,l),r.fix()}function yx(n){if(!n.selection.range.isCollapsed())return!1;const e=n.selection.focusedBlock;if(!ue(e))return!1;const t=n.selection.range.focus;return!t.isSimple()||t.offset!==0?!1:bt(e)===1?(li(n,e),!0):(g1(n,e),!0)}const kx=w("list-block");function wx(n,e,t){d(kx,ue(e),"not a list block");const o={...n.getBlockData(e),id:F()};return t!=null&&t.level&&(o.level=t.level),t!=null&&t.start&&(o.start=t.start),t!=null&&t.keepText||delete o.text,o}function Bx(n){if(ze(n),!Gc(n))return n;let e=Mo(n);for(;e;){if(!Gc(e))return e;e=Mo(e)}return null}function Ex(n,e,t,o){const r=new Ar(n,o),i=Ut(o)+1;zr(n,e,t,{forceInsertAfter:!0,newBlockData:wx(n,o,{start:i})}),r.fix()}function Ix(n){var s;if(n.selection.range.isCollapsed()){const l=n.selection.focusedBlock;if(ue(l)&&G(n,l)===0)return li(n,l),!0}n.clearSelectedContents();const e=n.selection.focusedBlock;if(!ue(e))return!1;const t=n.selection.range.focus;if(!t.isSimple())return!1;const o=t.offset,i=(s=o===G(n,e)?Bx(e):e)!=null?s:e;return Ex(n,e,o,i),!0}function F3(n){d(Re,ue(n),"not a list block");const{level:e}=Lo(n);let t=ye(n);for(;t;){if(ue(t)){const{level:o}=Lo(t);if(e===o)return t;if(o<e)return null}t=ye(t)}return null}function $3(n,e){return ze(e),F3(e)?bt(e)<II:!1}function xx(n,e,t){let o=ye(e);d(Re,o,"no prev brother");const r=bt(t);for(;o;){if(o===t)return null;if(ue(o)&&bt(o)===r+1)return o;o=ye(o)}return null}function _3(n,e){if(!$3(n,e))return!1;ze(e);const t=F3(e);d(Re,t,"no list prev brother");const o=t,r=xx(n,e,o),i=bt(o)+1;let s=F(),l=1,c=Ot(e);r&&(s=ni(r),l=Ut(r)+1,c=Ot(r));const a=m1(e),f={...n.getBlockData(e),groupId:s,level:i,start:l,...i1(c)};return n.updateBlockData(e,f),n.doc.beginBatchUpdate(),vx(a).forEach(p=>{const b=n.getBlockData(p);n.updateBlockData(p,{...b,level:b.level+1})}),n.doc.endBatchUpdate(),!0}function Tx(n,e,t){return e.length===0||!e.every(o=>ue(o.block))?!1:t==="increase"?$3(n,e[0].block):P3(n,e[0].block)}function H3(n,e,t){if(!Tx(n,e,t))return!1;const o=e[0].block,r=bt(o),i=e.filter(a=>bt(a.block)<=r),s=k3(o,{withSelf:!1}),l=new Set(i.map(a=>a.block)),c=s.filter(a=>!l.has(a));return n.undoManager.runInGroup(()=>{let a=null;c.length>0&&(a=new Ar(n,c[0])),i.forEach(u=>{t==="increase"?_3(n,u.block):g1(n,u.block)}),a==null||a.fix()}),!0}function Sx(n,e){return _3(n,e)}function Dx(n,e){return g1(n,e)}function Lx(n){const e=n.selection.range.getSelectedBlocks();if(e.length>1)return H3(n,e,"increase"),!0;const t=e[0].block;if(!ue(t))return!1;const o=new Qc(n,t);return Sx(n,t)&&(o.fix(),new Ar(n,t).fix()),!0}function Mx(n){const e=n.selection.range.getSelectedBlocks();if(e.length>1)return H3(n,e,"decrease"),!0;const t=e[0].block;return ue(t)?(Dx(n,t),!0):!1}class Rx{constructor(e){this.editor=e}handleBeforeKeyDown(e,t){const o=e.selection.range.getSelectedBlocks();if(o.length===0||!o.some(i=>ue(i.block)))return!1;switch(t.key){case"Enter":return this.handleEnter(t);case"Backspace":return this.handleBackspace();case"Tab":return this.handleTab(t);default:return!1}}handleEnter(e){const t=this.editor.selection.range.getSelectedBlocks()[0];return!t.block||!ue(t.block)||zn(e,"Shift+Enter")?!1:this.editor.undoManager.runInGroup(()=>Ix(this.editor))}handleBackspace(){return this.editor.undoManager.runInGroup(()=>yx(this.editor))}handleTab(e){return zn(e,"Shift+Tab")?this.editor.undoManager.runInGroup(()=>Mx(this.editor)):this.editor.undoManager.runInGroup(()=>Lx(this.editor))}}class Ox{constructor(e){h(this,"effectedBlockIds",new Map);h(this,"handleBeforeClearSelection",()=>{this.effectedBlockIds.clear();const e=this.editor.selection.range.getSelectedBlocks();if(e.length===0)return;const t=new Set;e.forEach(r=>{const i=r.block;ue(i)&&t.add(i)});const o=new Map;Array.from(t.values()).forEach(r=>{var c;const i=Us(r),{start:s}=Lo(i);o.set(j(i),s);const l=(c=MI(r))!=null?c:r;o.set(j(l),s)}),this.effectedBlockIds=o});h(this,"handleAfterClearSelection",()=>{Array.from(this.effectedBlockIds.entries()).forEach(([e,t])=>{const o=this.editor.findBlockById(e);!o||d1(this.editor,o,t)}),this.effectedBlockIds.clear()});this.editor=e,this.editor.addListener("beforeClearSelection",this.handleBeforeClearSelection),this.editor.addListener("afterClearSelection",this.handleAfterClearSelection)}destroy(){this.editor.removeListener("beforeClearSelection",this.handleBeforeClearSelection),this.editor.removeListener("afterClearSelection",this.handleAfterClearSelection)}}const Px=w("customize-list-start-menu");class Nx{constructor(e){h(this,"popup");h(this,"block",null);h(this,"show",(e,t)=>{const o=t.querySelector("div.list-container");d(Px,o,"list-block mark does not exist"),this.block=t,this.popup.manualShow(o,{theme:"light"})});h(this,"createDialogContent",()=>{const e=A("div",["customize-start-panel"],null);A("span",["customize-start-panel-title"],e,I.t("list.numberLabel"));const t=this.createNumericInput();e.appendChild(t);const o=A("button",["customize-start-panel-button"],e,I.t("list.confirm"));return this.editor.domEvents.addEventListener(e,"keydown",this.handleKeydown),this.editor.domEvents.addEventListener(o,"click",this.handleOk),e});h(this,"handleDialogShow",()=>{const e=this.block;if(!e)return;const t=this.popup.popupContent,o=t.querySelector("button.customize-start-panel-button"),r=t.querySelector("input.customize-start-panel-input"),i=Ut(e);!o||!r||requestAnimationFrame(()=>{r.focus(),r.value=String(i)})});h(this,"handleOk",()=>{const t=this.popup.popupContent.querySelector("input.customize-start-panel-input"),o=this.block;if(!o)return;const r=Number(t.value);!r||(this.editor.undoManager.runInGroup(()=>{ii(this.editor,[o,...oi(o)],r,{resetGroupId:!0})}),this.popup.close())});h(this,"handleKeydown",(e,t)=>{const o=t;o.isComposing||(o.key==="Escape"?this.popup.close():o.key==="Enter"&&this.handleOk())});this.editor=e,this.popup=new xs(this.createDialogContent()),this.popup.on("show",this.handleDialogShow)}destroy(){this.popup.destroy()}createNumericInput(){const e=A("input",["customize-start-panel-input"],null);e.type="number",e.min="1";const t=()=>{const r=e.value.replace(/[^\d]/g,"").replace(/^0+/,""),i=parseInt(r,10);i<=0||Number.isNaN(i)?e.value="":e.value=r};return this.editor.domEvents.addEventListener(e,"input",t),e}}function Fx(n,e){return ni(n)===ni(e)}function $x(n,e){const t=v3(e);return t?Fx(t,e)?Ut(t)!==Ut(e)-1:!0:!1}function _x(n,e){return Mo(e)?!0:Ut(e)!==1}function Hx(n,e){return ze(e),[{id:"continue-numbering",name:I.t("list.continueList"),states:$x(n,e)?[]:["disabled"]},{id:"start-new-list",name:I.t("list.restartList"),states:_x(n,e)?[]:["disabled"]},{id:"set-numbering-value",name:I.t("list.changeNumber")}]}function jx(n,e,t){var o,r;if(ze(e),t.id==="continue-numbering"){const i=v3(e);i&&ii(n,[e,...oi(e)],Ut(i)+1,{resetGroupId:!0,groupId:ni(i)})}if(t.id==="start-new-list"&&n.undoManager.runInGroup(()=>{ii(n,[e,...oi(e)],1,{resetGroupId:!0})}),t.id==="set-numbering-value"){const i=(o=n.options.componentsOptions)==null?void 0:o.list;if((r=i==null?void 0:i.onChangeStart)!=null&&r.call(i,n,e,t))return;n.addCustom("list-customize-start-dialog",()=>new Nx(n)).show(n,e)}}class zx{constructor(e){h(this,"menu");h(this,"handleClick",(e,t)=>{const o=Lr(t,"div.list-container");if(o&&this.editor.isWritable()){const r=z(o);d(Re,r,"no parent block"),ze(r);const i=e.getBlockData(r);if(i&&i.checkbox){e.updateBlockData(r,{...i,checkbox:i.checkbox==="checked"?"unchecked":"checked"});return}if(Ot(r)==="unordered")return;this.menu.updateItems(this.getCommandItems(r)),this.menu.manualShow(o),this.activeList(o,!0)}});h(this,"handleMenuClose",()=>{var t;const e=(t=this.menu.tippyInstance)==null?void 0:t.reference;e&&this.activeList(e,!1)});h(this,"handleMenuClick",(e,t)=>{var r;const o=(r=this.menu.tippyInstance)==null?void 0:r.reference;if(o){const i=z(o);i&&jx(this.editor,i,t)}});this.editor=e,this.editor.addListener("click",this.handleClick),this.menu=new fr([]),this.menu.addListener("close",this.handleMenuClose),this.menu.addListener("click",this.handleMenuClick)}destroy(){this.editor.removeListener("click",this.handleClick),this.menu.removeListener("close",this.handleMenuClose)}getCommandItems(e){return Hx(this.editor,e)}activeList(e,t){const o=z(e);!o||(t?(M(e,"active"),M(o,"active")):(_(e,"active"),_(o,"active")))}}class Ux{constructor(e){this.editor=e}handleBeforeKeyDown(e,t){const o=e.selection.range.getSelectedBlocks();if(o.length===0)return!1;const r=o[0].block;if(!ue(r)||!I3(r))return!1;if(t.key==="ArrowUp"||t.key==="ArrowLeft"){const i=er(r);return i&&e.selection.selectBlock(i,G(e,i)),!0}if(t.key==="ArrowDown"||t.key==="ArrowRight"){const i=tr(r);return i&&e.selection.selectBlock(i,0),!0}return(t.key==="Delete"||t.key==="Backspace"||t.key==="Escape")&&T3(e,r),!0}}function Vx(n,e,t,o,r){Xd(n,"list-block-init",()=>{setTimeout(()=>{n.input.addHandler(new Ux(n)),n.input.addHandler(new Rx(n)),n.addCustom("list-clear-selection-handler",()=>new Ox(n)),n.addCustom("list-marker-menu",()=>new zx(n))})});const i=wt.createBlockContent(n,e,t,o,r),s=r,{level:l,start:c,groupId:a}=s,u=si(s);o.setAttribute("data-list-level",`${l}`),o.setAttribute("data-list-start",`${c||1}`),o.setAttribute("data-list-group-id",`${a}`),o.setAttribute("data-list-type",u);const f=bx(s);return o.insertBefore(f,i),s.viewAsMindmap?setTimeout(()=>{const m=n.getBlockById(r.id);m&&u1(n,m,{},{mindmapTools:S3,saveData:!1})}):setTimeout(()=>{const m=n.getBlockById(r.id);m&&x3(n,m)}),i}const qx={list:{confirm:"\u786E\u5B9A",setStart:"\u8BBE\u7F6E\u7F16\u53F7",continueList:"\u7EE7\u7EED\u7F16\u53F7",restartList:"\u5F00\u59CB\u65B0\u5217\u8868",changeNumber:"\u4FEE\u6539\u7F16\u53F7\u503C",numberLabel:"\u7F16\u53F7\u987A\u5E8F",mention:{tooltip:"\u63D0\u53CA\u4EBA\u5458\u5E76\u901A\u77E5"}},mindmap:{viewAsMindMap:"\u663E\u793A\u4E3A\u8111\u56FE",autoFit:"\u81EA\u52A8\u7F29\u653E",fullScreen:"\u5168\u5C4F\u67E5\u770B",close:"\u5173\u95ED",exitFullscreen:"\u9000\u51FA\u5168\u5C4F"}},Wx={list:{confirm:"OK",setStart:"Set the number",continueList:"Continue numbering",restartList:"Start a new list",changeNumber:"Set numbering value",numberLabel:"Numbering order",mention:{tooltip:"@Mention someone"}},mindmap:{viewAsMindMap:"View as MindMap",autoFit:"Auto fit",fullScreen:"Fullscreen",close:"Close",exitFullscreen:"Exit fullscreen"}},Gx={list:{confirm:"OK",setStart:"\u756A\u53F7\u3092\u8A2D\u5B9A",continueList:"\u9023\u756A\u3092\u8A2D\u5B9A",restartList:"\u65B0\u3057\u3044\u30EA\u30B9\u30C8\u3092\u4F5C\u6210",changeNumber:"\u756A\u53F7\u3092\u7DE8\u96C6",numberLabel:"\u756A\u53F7",mention:{tooltip:"\u30E1\u30F3\u30B7\u30E7\u30F3\u304A\u3088\u3073\u901A\u77E5"}},mindmap:{viewAsMindMap:"\u30DE\u30A4\u30F3\u30C9\u30DE\u30C3\u30D7\u3067\u8868\u793A",autoFit:"\u81EA\u52D5\u30D5\u30A3\u30C3\u30C8",fullScreen:"\u5168\u753B\u9762\u8868\u793A\u306E\u30AA\u30F3",close:"\u9589\u3058\u308B",exitFullscreen:"\u5168\u753B\u9762\u8868\u793A\u306E\u30AA\u30D5"}};I.mergeLang({"zh-CN":qx,"en-US":Wx,"ja-JP":Gx});const JV="",j3={...wt,blockType:"list",createBlockContent:Vx,convertFrom:fx,convertTo:gx,handleDrop:ox,notify:XI},p1=w("paragraph");class Zx{constructor(e){h(this,"id","BlockParagraphProvider");this.editor=e}isChecked(e,t){return!!(e[t]||e.level&&(e.ordered===!0&&!e.checkbox&&t==="ordered-list"||e.ordered===!1&&!e.checkbox&&t==="unordered-list")||t==="check-list"&&e.checkbox)}getAvailableCommands(e,t){const o=[],r={"unordered-list":[I.t("commands.unordered"),Qt("CtrlOrCmd+Shift+L"),oB],"ordered-list":[I.t("commands.ordered"),Qt("CtrlOrCmd+Shift+U"),nB],"check-list":[I.t("commands.check"),void 0,rB],link:[I.t("commands.link"),Qt("CtrlOrCmd+K"),x5],quoted:[I.t("commands.quote"),void 0,iB]};if($(e,t)){const i=j(t),s=se(t),l=Kt(e,t),c=e.getBlockData(t);Object.entries(r).forEach(([a,[u,f,m]])=>{const p=[];if(this.isChecked(c,a)&&p.push("checked"),a==="link"){if(!e.selection.range.isSimple())return;e.selection.range.getSelectedBlocks().length!==1&&p.push("disabled")}o.push({blockId:i,blockType:s,blockKind:l,id:a,name:u,desc:f,states:p,icon:m,groupIndex:600})})}return o}convertLink(e,t,o){d(p1,Wn(t.start),""),d(p1,Wn(t.start),"");const r="bottom-start",i=t.start.offset,s=t.end.offset,l=(p,b)=>{e.undoManager.runInGroup(()=>{try{const k=e.selection.range.isCollapsed();let v;if(k){v=Gn(e.getBlockText(o),s,p,{link:b}),e.setBlockText(o,v);return}v=Yl(e.getBlockText(o),i,s,p),v=Xi(i,p.length,v,"link",b),e.setBlockText(o,v),e.selection.selectBlock(o,i+p.length),e.focus()}catch(k){p1.error(k)}})},c=()=>{e.selection.selectBlock(o,s),e.focus()},a=ho(e,o,t)[0];if(!a)return;const u=go(e,o,"link-button-anchor",a),f=e.getBlockText(o),m=es(f,i);js(e,{target:u,linkText:e.getSelectedText(),linkUrl:(m==null?void 0:m.link)||"",onFinished:l,onClose:c,placement:r})}convertToList(e,t,o){const r=$l(e,t,"list",{offset:0,data:{listType:o}});r&&e.undoManager.runInGroup(()=>{const i=K(t),s=H(t);e.insertBlock(q(s),i,r.blockData),e.deleteBlock(t)})}executeCommand(e,t,o,r){var c;if(!$(e,t))return!1;const i=r.id,s=(c=r.states)==null?void 0:c.includes("checked");let l=!1;if(i==="unordered-list"&&(s?li(e,t):this.convertToList(e,t,"unordered"),l=!0),i==="ordered-list"&&(s?li(e,t):this.convertToList(e,t,"ordered"),l=!0),i==="check-list"&&(s?li(e,t):this.convertToList(e,t,"unchecked"),l=!0),i==="quoted"){const u=e.getBlockData(t).quoted;e.updateBlockData(t,{quoted:u?void 0:!0}),l=!0}if(i==="link"){const a=Vc(e);a.disableTextToolbar(),a.hide(),setTimeout(()=>{a.enableTextToolbar()},1e3),this.convertLink(e,o,t),l=!0}return l}}const Qx={left:Ts,right:Ih,center:xh};class Yx{constructor(e){h(this,"id","BlockAlignProvider");this.editor=e}applyAlignStyle(e,t,o){Object.keys(Qx).includes(o)?e.updateBlockData(t,{align:o}):e.updateBlockData(t,{align:null})}isChecked(e,t){return e.align===t}getAvailableCommands(e,t,o){if($(e,t)){const r=j(t),i=se(t),s=Kt(e,t),l=e.getBlockData(t),c=a=>{var f;const u=A("span",["toolbar-item-name-container"],null);for(const m of a.children)if((f=m.states)!=null&&f.includes("checked"))return u.innerHTML=m.icon||Ts,u;return u.innerHTML=Ts,u};return[{id:"align",name:I.t("commands.alignGroup"),blockId:r,blockType:i,blockKind:s,groupIndex:700,dropdown:!0,element:c,manualShowChildren:!0,childrenPlacement:"bottom-start",defaultCheckedChildren:["align-left"],children:[{id:"align-left",name:I.t("commands.alignLeft"),icon:Ts,states:this.isChecked(l,"left")?["checked"]:[]},{id:"align-center",name:I.t("commands.alignCenter"),icon:xh,states:this.isChecked(l,"center")?["checked"]:[]},{id:"align-right",name:I.t("commands.alignRight"),icon:Ih,states:this.isChecked(l,"right")?["checked"]:[]}],childrenType:"menu"}]}return[]}executeCommand(e,t,o,r){if(!$(e,t))return!1;if(r.id.startsWith("align")){const i=r.id.replace(/^align-/,"");return this.applyAlignStyle(e,t,i),!0}return!1}}function Jx(n){const t=n.selection.range;if(t.isCollapsed()||t.start.blockId!==t.end.blockId||!t.start.isSimple()||!t.end.isSimple()||t.end.offset-t.start.offset!==1)return!1;const o=n.getBlockById(t.start.blockId);return ns(n,o,t.start.offset).charType==="box"}const Kx=w("toolbar-handler"),Xx={id:"",name:"",type:"separator"};class ci{constructor(e){h(this,"toolbar");h(this,"toolbarType","object");h(this,"mouseDown",!1);h(this,"oldRange",null);h(this,"hoveringBlock",null);h(this,"hoveringTextChild",null);h(this,"_disableTextToolbar",!1);h(this,"handleButtonClick",(e,t)=>{this.toolbarType==="text"?(this.editor.editorCommandProviders.executeCommand(this.editor.selection.range,t,{}),this.showTextToolbar("click")):this.hoveringBlock&&kI(this.editor,this.hoveringBlock,this.hoveringTextChild,t)});h(this,"handleClose",()=>{Mh(this.editor)&&this.editor.focus()});h(this,"handleClosing",(e,t)=>{if(this.toolbarType==="object"){const o=Bm(t);if(this.hoveringBlock===o)return!1}return!0});h(this,"handleDocumentMouseDown",e=>{e.button===0&&(document.addEventListener("mouseup",this.handleDocumentMouseUp),this.mouseDown=!0)});h(this,"handleDocumentMouseUp",()=>{document.removeEventListener("mouseup",this.handleDocumentMouseUp),this.mouseDown=!1,this.handleSelectionChange(this.editor)});h(this,"handleHoveringBlockChildChange",(e,t,o,r)=>{if(!(this.hoveringBlock===e&&this.hoveringTextChild===t)&&(this.hoveringBlock=e,this.hoveringTextChild=t,!(this.toolbar.isVisible&&this.toolbarType==="text"))){if(!e){this.toolbar.close();return}this.showObjectToolbar()}});h(this,"handleSelectionChange",nt.default(e=>{var o;if(d(Kx,e===this.editor,"editor mismatch"),e.selection.range.isCollapsed()||this.mouseDown){if(this.toolbarType==="object"){const r=(o=this.toolbar.tippyInstance)==null?void 0:o.reference,i=this.editor.selection.focusedBlock;if(r&&Ce(r,i))return}this.toolbar.close(),this.oldRange=null;return}if(!this.editor.isWritable()){this.toolbar.close(),this.oldRange=null;return}if(e.selection.range.getSelectedBlocks().length===0){this.toolbar.close(),this.oldRange=null;return}this.oldRange&&this.oldRange.isEqual(e.selection.range)||(this.oldRange=e.selection.range,this.showTextToolbar("selectionChange"))},50));this.editor=e;const t=e.options.componentsOptions.popover;this.toolbar=new Ds([],void 0,{tooltipId:e.clientId,id:"editor-toolbar",overflowBoundary:t==null?void 0:t.overflowBoundary,refuseOverflow:!0,padding:20}),this.toolbar.on("click",this.handleButtonClick),this.toolbar.on("close",this.handleClose),this.toolbar.on("closing",this.handleClosing),this.bindEvents(),e.addListener("selectionChanged",this.handleSelectionChange),De.get(e).addListener("childChange",this.handleHoveringBlockChildChange),De.get(e).addFilter(this),e.editorCommandProviders.registerCommandProvider(new BI(e)),e.editorCommandProviders.registerCommandProvider(new Zx(e)),e.editorCommandProviders.registerCommandProvider(new Yx(e))}disableTextToolbar(){this._disableTextToolbar=!0}enableTextToolbar(){this._disableTextToolbar=!1}hide(){this.toolbar.close()}destroy(){this.unbindEvents(),this.toolbar.destroy(),this.editor.removeListener("selectionChanged",this.handleSelectionChange),De.get(this.editor).removeListener("childChange",this.handleHoveringBlockChildChange)}isInBlock(e,t){return e!==this.hoveringBlock?!1:!!(t.target&&t.target instanceof Node&&this.toolbar.popper&&Ce(this.toolbar.popper,t.target))}bindEvents(){document.addEventListener("mousedown",this.handleDocumentMouseDown)}unbindEvents(){document.removeEventListener("mousedown",this.handleDocumentMouseDown)}update(e){this.showTextToolbar(e)}showTextToolbar(e){if(this._disableTextToolbar||!this.editor.isWritable())return;const o=this.editor.selection.range.getSelectedBlocks();if(o.length===0)return;const r=o[0];if(!r)return;if(o.length===1&&Ke(r.block)){e==="click"&&this.showObjectToolbar();return}if(Jx(this.editor))return;if(H(r.block)===this.editor.rootContainer&&K(r.block)===0){this.toolbar.close();return}const i=this.editor.editorCommandProviders.getCommands(this.editor.selection.range),s=new Map;i.forEach(u=>{const f=u.groupIndex,m=s.get(f);m?m.push(u):s.set(f,[u])});const l=[[]],c=Array.from(s.entries()).sort((u,f)=>u[0]-f[0]);for(let u=0;u<c.length;u++){const[,f]=c[u];if(f.length===0)continue;let m=l[l.length-1];m.length>0&&m[m.length-1].groupIndex!==f[f.length-1].groupIndex&&(m=[],l.push(m)),m.push(...Uc(f))}if(l.length===0){this.toolbar.close();return}this.toolbarType="text";const a=[];if(l.forEach((u,f)=>{const m=u.sort((p,b)=>{var k,v;return((k=p.order)!=null?k:0)-((v=b.order)!=null?v:0)});a.push(...m),f!==l.length-1&&a.push(Xx)}),a.length===0){this.toolbar.close();return}if(this.toolbar.updateItems(a),!this.toolbar.isVisible){const u=o[o.length-1],f=!this.editor.selection.range.isReverse()&&u!==r,m=f?u:r,p=mI(this.editor,m),b=go(this.editor,m.block,"editor-quick-menu",p);this.toolbar.manualShow(b,{placement:f?"bottom":"top"})}}showObjectToolbar(){var i,s;if(!this.hoveringBlock||this.mouseDown)return;const e=this.hoveringBlock,t=this.hoveringTextChild,{commands:o,element:r}=bI(this.editor,e,t);if(!o.length||!r){this.toolbar.close();return}this.toolbarType="object",this.toolbar.isVisible&&((s=(i=this.toolbar)==null?void 0:i.tippyInstance)==null?void 0:s.reference)!==r&&this.toolbar.close(),this.toolbar.updateItems(o),this.toolbar.isVisible||this.toolbar.manualShow(r,{placement:t?"bottom":"top"})}static register(e){return e.addCustom("toolbar-handler",t=>new ci(t))}static get(e){return e.getCustom("toolbar-handler")}}function Kc(n,e,t){n.getBlockData(e).heading===t?n.updateBlockData(e,{heading:null}):n.updateBlockData(e,{heading:t})}function z3(n,e,t){["left","center","right"].includes(t)?n.updateBlockData(e,{align:t}):n.updateBlockData(e,{align:null})}function C1(n,e){const o=n.getBlockData(e).quoted;n.updateBlockData(e,{quoted:o?void 0:!0})}function A1(n,e){return!!(n[e]||n.level&&(n.ordered===!0&&!n.checkbox&&e==="ordered-list"||n.ordered===!1&&!n.checkbox&&e==="unordered-list")||e==="check-list"&&n.checkbox)}function b1(n,e,t){if(!n.selection.range.focus.isSimple())return;const r=n.getBlockData(e);let i;switch(t){case"unordered-list":i=A1(r,"unordered-list")?void 0:"unordered";break;case"ordered-list":i=A1(r,"ordered-list")?void 0:"ordered";break;case"check-list":i=A1(r,"check-list")?void 0:"unchecked";break}if(i){const s=$l(n,e,"list",{offset:0,data:{listType:i}});s&&n.undoManager.runInGroup(()=>{const l=K(e),c=H(e);n.deleteBlock(e),n.insertBlock(q(c),l,s.blockData)})}else li(n,e)}const eT=Object.freeze(Object.defineProperty({__proto__:null,applyHeadingStyle:Kc,applyAlignStyle:z3,applyQuoteStyle:C1,applyList:b1},Symbol.toStringTag,{value:"Module"})),tT=[Ah,bh,vh,yh,kh,wh,Bh,Eh],nT={Unordered:D5,Ordered:L5,Checkbox:T5,Quote:S5};function U3(n,e){const t=n;t.blockOptions=e,t.itemType="insert-block",n.children&&n.children.forEach(o=>U3(o,e))}function v1(n=1){var r;const e={name:"basic",insertBlockCommandItems:[]};let t=qc();t<=4?t=5:t<8&&(t+=1);let o=n;for(;o<=t;){const i=`heading-${o}`;(r=e.insertBlockCommandItems)==null||r.push({id:i,icon:tT[o-1],name:I.t("quickMenu.basic.heading.title",{heading:String(o)}),order:o,group:"basics",value:String(o),subText:At(i)}),o++}return e}function oT(){const n={name:"basic",insertBlockCommandItems:[]};return["Unordered","Ordered","Checkbox","Quote"].forEach((t,o)=>{var i;const r=`insert-${t.toLocaleLowerCase()}`;(i=n.insertBlockCommandItems)==null||i.push({id:r,name:I.t(`quickMenu.basic.${t.toLocaleLowerCase()}`),icon:nT[t],value:t.toLocaleLowerCase(),group:"basics",order:10+o,subText:At(r)})}),n}class V3{getCommands(){const e=v1(),t=oT();return[...e.insertBlockCommandItems||[],...t.insertBlockCommandItems||[]]}updateBlock(e,t,o,r){const{value:i,id:s}=r;return s.startsWith("heading-")?Kc(e,o,Number.parseInt(i!=null?i:"1",10)||1):i==="ordered"||i==="unordered"||i==="checkbox"?b1(e,o,{ordered:"ordered-list",unordered:"unordered-list",checkbox:"check-list"}[i]):i==="quote"&&C1(e,o),null}async handleUpdateBlockCore(e,t){const o=e.getBlockByIndex(t.containerId,t.blockIndex);return this.updateBlock(e,t.containerId,o,t.item)}async handleInsertEmptyBlockCore(e,t){const{containerId:o,blockIndex:r}=t,i=e.insertTextBlock(void 0,o,r);return this.updateBlock(e,t.containerId,i,t.item)}async executeCommand(e,t,o){if(o.from==="quick-menu"){const r=e.getBlockById(o.blockId),i=e.getParentContainer(r),s=q(i),l=e.getBlockIndex(r);e.undoManager.runInGroup(()=>this.handleUpdateBlockCore(e,{item:t,containerId:s,blockIndex:l})),e.focus()}else o.from==="block-menu"&&(e.undoManager.runInGroup(()=>this.handleInsertEmptyBlockCore(e,{item:t,containerId:o.containerId,blockIndex:o.blockIndex})),e.focus());return null}}const q3={basics:100,system:200,common:300,thirdParty:400};class y1{constructor(){h(this,"dataUrl","");h(this,"error",null)}destroy(){}setDataUrl(e){this.error=null,this.dataUrl=e}setError(e){this.dataUrl="",this.error=e}}const rT=w("mathjax-converter"),iT="MathJax-script";async function sT(n){var o;window.MathJax||(window.MathJax={options:{skipHtmlTags:["script","noscript","style","textarea","pre","code","annotation","annotation-xml","body"]}});const e=n.getComponentOptions("mathjax"),t=((o=e==null?void 0:e.cdn)==null?void 0:o.mathjax)||"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js";await Wo(t,iT)}function lT(){try{window.MathJax&&window.MathJax.texReset()}catch{}}async function W3(n,e){const t="mathjax2Svg";try{await Zt.lock(t),lT(),await sT(n);const o=await window.MathJax.tex2svgPromise(e),r=o.querySelector("merror");if(r)throw new Error(r.textContent);return o.querySelector("svg").outerHTML}catch(o){throw rT.error(o),o}finally{Zt.release(t)}}async function G3(n,e){const t=await W3(n,e);return t?await Eu(t,"image/svg+xml"):""}async function k1(n,e){const o=await W3(n,e),r=new File([o],"math.svg");return(await n.doc.uploadResource(r)).resourceId}const Z3=w("edit-mathjax");class cT{constructor(){h(this,"editMathjaxPopup",null);h(this,"onChange",null);h(this,"tex","");h(this,"handleShow",()=>{setTimeout(()=>{this.getTextarea().focus()})});h(this,"handleClose",e=>{var o;const t=e.content.querySelector("textarea");if(t){const r=t.value;r!==this.tex&&((o=this.onChange)==null||o.call(this,r,!0))}});h(this,"handleKeyup",e=>{var t;e.isComposing||(e.key==="Escape"&&((t=this.editMathjaxPopup)==null||t.close()),this.handleChange(e.target.value))});h(this,"handleChange",nt.default(e=>{var t;(t=this.onChange)==null||t.call(this,e,!1)},300))}editMathjax(e,t,o){if(!this.editMathjaxPopup)this.editMathjaxPopup=new xs(this.createPopupContent(t));else{const r=this.getTextarea();r.value=t}this.tex=t,this.editMathjaxPopup.addListener("show",this.handleShow),this.editMathjaxPopup.manualShow(e,{theme:"light"}),this.editMathjaxPopup.removeAllListeners("close"),this.editMathjaxPopup.addListener("close",this.handleClose),this.onChange=o}createPopupContent(e){const t=A("textarea",["mathjax-editor-textarea"],null);return t.value=e,t.addEventListener("keyup",this.handleKeyup),t}getTextarea(){d(Z3,this.editMathjaxPopup,"no exists mathjax editor popup");const e=this.editMathjaxPopup.content.querySelector("textarea");return d(Z3,e,"no textarea"),e}destroy(){var e;this.onChange=null,(e=this.editMathjaxPopup)==null||e.removeAllListeners()}}function Q3(n,e,t,o){n.addCustom("mathjax-editor",()=>new cT).editMathjax(e,t.trim(),o)}function Y3(){return{insert:" ",attributes:{id:F(),box:!0,type:"math",tex:" ",src:"",created:Date.now()}}}function Xc(n,e){const t=n.getBoxData(e),o=z(e);if(!o)return;const r=po(o,e);n.selection.selectBlock(o,r.start,r.end);const i=async(s,l)=>{if(!s.trim()){n.updateBoxData({...t,tex:s,src:null});return}try{await Zt.lock("convertAndUploadMathjax");const c=await k1(n,s);n.updateBoxData({...t,tex:s,src:c})}catch(c){const a=n.getBoxData(e);n.addCustom(`mathjax-box-${a.id}`,()=>new y1).setError(c),n.updateBoxData({...t,tex:s,src:""})}finally{Zt.release("convertAndUploadMathjax"),l&&n.focus()}};Q3(n,e,t.tex,i)}const aT=w("mathjax-box");function w1(n,e){n.selection.updateSelection(null);const t=e.target;!t||!(t instanceof HTMLElement)||n.domEvents.removeEventListener(t,null,w1)}async function uT(n,e,t){try{if(!e.tex.trim())return;const o=await G3(n,e.tex),r=n.findBoxById(e.id);if(!r)return;const i=Pu(r);i.innerHTML="";const s=A("img",["mathjax"],i);s.src=o,t.setDataUrl(o),n.domEvents.addEventListener(s,"load",w1)}catch(o){t.setError(o);const r=n.findBoxById(e.id);if(!r)return;const i=r.querySelector(".mathjax-tex-text");M(i,"mathjax-error"),i.innerText=o.message,n.selection.updateSelection(null)}}function dT(n,e,t,o){const r=o,i=n.addCustom(`mathjax-box-${r.id}`,()=>new y1);if(r.src||i.dataUrl){const c=A("img",["mathjax"],t);c.src=n.doc.buildResourceUrl(r.src||i.dataUrl),n.domEvents.addEventListener(c,"load",w1);return}const s=["mathjax-tex-text"];let l=r.tex;l.trim()?i.error&&(l=i.error.message,s.push("mathjax-error")):l=I.t("mathjax.emptyText"),A("span",s,t,l),uT(n,r,i)}function hT(n,e){const t={id:F(),box:!0,type:"math",tex:e,src:"",created:Date.now()};return k1(n,e).then(o=>{if(!n.findBoxById(t.id))return;const i={...t,src:o};n.updateBoxData(i)}).catch(o=>{aT.error(`failed to convert and upload mathjax: ${JSON.stringify(o)}`)}),t}function fT(n,e,t,o){const r=e;return o==="text"?r.tex:o==="markdown"?` $${r.tex}$ `:r.src?`<img src="${n.doc.buildResourceUrl(r.src,{withToken:!0})}" />`:`<code>$${r.tex}$</code>`}function mT(n,e,t){Xc(n,e)}const B1={boxType:"math",updateBoxContent:dT,convertFrom:hT,convertTo:fT,handleClickBox:mT};async function gT(n,e,t){try{const o=e.embedData,r=await G3(n,o.mathjaxText),i=n.findBlockById(e.id);if(!i)return;const s=le(i);s.innerHTML="";const l=A("img",["mathjax"],s);l.src=r,t.setDataUrl(r)}catch(o){t.setError(o)}}function pT(n,e){if(n.readonly||!e.target||!(e.target instanceof Node))return;const t=z(e.target);if(!t||!Ke(t)||Nt(t)!=="math")return;const o=le(t),r=o.querySelector("img")||o.querySelector("span.mathjax-tex-text");if(!r||!Ce(r,e.target))return;const s=n.getBlockData(t).embedData;Q3(n,r,s.mathjaxText,async l=>{const c=await k1(n,l),a={mathjaxText:l,src:c};n.updateEmbedData(t,a)})}function CT(n,e,t){const o=t.embedData,r=n.addCustom(`mathjax-block-${t.id}`,()=>new y1);if(n.domEvents.addEventListener(e,"click",pT),o.src||r.dataUrl){const i=A("img",["mathjax"],e);i.src=n.doc.buildResourceUrl(o.src||r.dataUrl);return}r.error,A("span",["mathjax-tex-text"],e,o.mathjaxText),gT(n,t,r)}function AT(n,e,t){if(!$(n,e))return null;const o=n.getBlockString(e).trim();if(!o||!o.startsWith("$$")||!o.endsWith("$$"))return null;const r=bu(o,"$");if(!r)return null;const i={mathjaxText:r,src:""};return{blockData:{id:F(),type:"embed",embedType:"math",embedData:i}}}function bT(n){return{name:"Mathjax"}}function vT(n,e){const t=le(e);n.domEvents.removeAllListeners(t)}function yT(n,e,t,o){const r=e.embedData;return o==="html"?`<img src="${n.doc.buildResourceUrl(r.src,{withToken:!0})}" />`:o==="markdown"?`
374
374
  $$${r.mathjaxText}$$
375
375
  `:r.mathjaxText}function kT(){return{abstract:I.t("mathjax.abstract")}}const J3={embedType:"math",createEmbedContent:CT,getOptions:bT,convertFrom:AT,handleDeleteBlock:vT,convertTo:yT,getBlockProperties:kT},KV="",wT={mathjax:{emptyText:"\u7A7A\u7684\u516C\u5F0F",abstract:"\u516C\u5F0F"}},BT={mathjax:{emptyText:"Empty Tex",abstract:"TeX"}};I.mergeLang({"zh-CN":wT,"en-US":BT});function ET(n,e,t,o){const r=n.getBlockByIndex(e,t),i=n.getBlockText(r),{left:s}=kt(i,o);if(!ve(s).endsWith("$$$$"))return!1;const c=o-4,a=o,u={id:F(),box:!0,type:"math",tex:" ",src:"",created:Date.now()};return n.undoManager.runInGroup(()=>{n.deleteTextFromBlock(r,c,a-c),n.insertBoxToBlock(r,c,u),setTimeout(()=>{const f=n.getBoxById(u.id);Xc(n,f)})}),!0}class IT{handleAfterInsertText(e,t,o,r,i){return!!(i===" "&&ET(e,t,o,r))}}const ai=w("inline-box-items");function xT(n,e,t){return n.undoManager.runInGroup(()=>{var s;let o=n.getBlockByIndex(e,t);Ie(n,o)||(o=n.insertTextBlock([],e,t));const r=Y3();n.setBlockText(o,[r]);const i=(s=r.attributes)==null?void 0:s.id;return d(ai,i,"mathjax box id is empty"),setTimeout(()=>{const l=n.getBoxById(i);Xc(n,l)},100),o})}function TT(n,e,t){let o=n.getBlockByIndex(e,t),r="bottom-start";return Ie(n,o)||(r="top-start"),js(n,{target:o,linkText:"",linkUrl:"",onFinished:(l,c)=>{n.undoManager.runInGroup(()=>{try{Ie(n,o)||(o=n.insertTextBlock([],e,t));const a=_t(l,{link:c}),u=_t(" ",null),f=[a,u];n.insertTextToBlock(o,0,f),n.selection.selectBlock(o,at(f)),n.focus()}catch(a){ai.error(a)}})},onClose:()=>{n.focus()},placement:r}),o}function ST(n,e,t){return n.undoManager.runInGroup(()=>{var l;const o=n.getBlockByIndex(e,t),r=n.selection.range;d(ai,Wn(r.start),"invalid block position");const i=Y3();n.insertBoxToBlock(o,r.start.offset,i.attributes);const s=(l=i.attributes)==null?void 0:l.id;return d(ai,s,"mathjax box id is empty"),setTimeout(()=>{const c=n.getBoxById(s);Xc(n,c)},100),o})}function DT(n,e,t){const o=n.getBlockByIndex(e,t),r=n.selection.range;d(ai,Wn(r.start),"invalid block position");const i=ho(n,o,r);if(i.length===0)return;const s=i[0],l=go(n,o,"quick-menu-inline-link",s);js(n,{target:l,linkText:"",linkUrl:"",onFinished:(u,f)=>{n.undoManager.runInGroup(()=>{try{const m=n.getBlockText(o),p=Gn(m,r.start.offset,u,{link:f});n.setBlockText(o,p),n.selection.selectBlock(o,r.start.offset+u.length),n.focus()}catch(m){ai.error(m)}})},onClose:()=>{n.focus()},placement:"bottom-start"})}class LT{getCommands(){return[{id:"insert-math",name:I.t("quickMenu.inlineBox.math"),icon:dB,order:900,group:"common",subText:At("insert-math")},{id:"insert-link",name:I.t("quickMenu.inlineBox.link"),icon:x5,order:400,group:"common",subText:At("insert-link")}]}async handleUpdateBlockCore(e,t){switch(t.item.id){case"insert-math":return ST(e,t.containerId,t.blockIndex);case"insert-link":return DT(e,t.containerId,t.blockIndex);default:return null}}async handleInsertEmptyBlockCore(e,t){switch(t.item.id){case"insert-math":return xT(e,t.containerId,t.blockIndex);case"insert-link":return TT(e,t.containerId,t.blockIndex);default:return null}}async executeCommand(e,t,o){if(o.from==="quick-menu"){const r=e.getBlockById(o.blockId),i=e.getParentContainer(r),s=q(i),l=e.getBlockIndex(r);e.undoManager.runInGroup(()=>this.handleUpdateBlockCore(e,{item:t,containerId:s,blockIndex:l}))}else o.from==="block-menu"&&e.undoManager.runInGroup(()=>this.handleInsertEmptyBlockCore(e,{item:t,containerId:o.containerId,blockIndex:o.blockIndex}));return null}}function MT(n){var o,r;const e=(r=(o=n.options.componentsOptions)==null?void 0:o.quickMenu)==null?void 0:r.commandProviders;if(!e)return[];const t=[];return[...e,new V3,new LT].forEach(i=>{const s=i.getCommands(n);t.push(...s.map(l=>({...l,itemType:"insert-block",commandProvider:i})))}),t}function RT(n){const e=[];return n.editorBlocks.forEach(t=>{if(!t.getOptions)return;const o=t.getOptions(n);!o.insertBlockCommandItems||(o.insertBlockCommandItems.forEach(r=>{U3(r,o)}),e.push(...o.insertBlockCommandItems))}),e.push(...MT(n)),e}function E1(n){const e=RT(n),t=new Map;e.forEach(i=>{var c;const s=(c=i.group)!=null?c:"";let l=t.get(s);l?l.items.push(i):(l={group:s,order:i.groupOrder||q3[s]||1e3,items:[i]},t.set(s,l))});const o=Array.from(t.values());o.sort((i,s)=>i.order-s.order),o.forEach(i=>{i.items.sort((s,l)=>{var c,a;return((c=s.order)!=null?c:0)-((a=l.order)!=null?a:0)})});const r=[];return o.forEach((i,s)=>{const l=`blockMenu.section.${i.group||"common"}`,c=I.t(l),a=c===l?i.group:c;r.push({id:`section-${s}`,name:a,type:"section",group:i.group,itemType:"insert-block"}),r.push(...i.items.map(u=>({...u})))}),r}function OT(n,e,t){const o=n.getFocusedBlock();if(!o)return;const r=n.getParentContainer(o),i=q(r);let l=n.getBlockIndex(o);if(Ie(n,o)||(l+=1),e.commandProvider){e.commandProvider.executeCommand(n,e,{from:"quick-menu",...t});return}!e.blockOptions||!e.blockOptions.handleInsertEmptyBlock||e.blockOptions.handleInsertEmptyBlock(n,{containerId:i,blockIndex:l,item:e})}const K3=w("quick-menu"),PT={id:"quick-menu",trigger:["/"]},NT=3;class ea{constructor(e,t=PT){h(this,"suggest");h(this,"items");h(this,"maxHeading");h(this,"firstEmptyOffset",-1);h(this,"queryItems",async(e,t)=>{if(this.items.length===0?this.initMenuItems():this.refreshMenuItems(),t){const o=new Set,r=t.toLocaleLowerCase().replace(/^\s+|\s+$/g,""),i=this.items.filter(s=>{if(s.type==="section")return!0;if(s.name.toLocaleLowerCase().indexOf(r)!==-1||eE(s).toLocaleLowerCase().indexOf(r)!==-1)return o.add(s.group),!0;const l=`blockMenu.section.${s.group||"common"}`,c=I.t(l),a=c===l?s.group:c;return(a==null?void 0:a.toLocaleLowerCase().indexOf(r))!==-1?(o.add(s.group),!0):!1}).filter(s=>s.type==="section"?o.has(s.group):!0);return i.length||this.handleEmptySearch(),i}return this.items});h(this,"onClose",()=>{this.firstEmptyOffset=-1});h(this,"onShow",(e,t,o,r)=>{const i=this.editor.getBlockByIndex(t,o);if(!Pt(i)){const s=z(H(i));if(s&&se(s)==="code")return!1}return!0});h(this,"onClickItem",(e,t)=>{const o=t;o.itemType==="insert-block"&&(d(K3,o.blockOptions||o.commandProvider,"invalid quick item, no block options or command provider"),d(K3,this.suggest.anchor,"invalid suggest, no anchor"),OT(this.editor,o,this.suggest.anchor))});this.editor=e,this.options=t,this.items=[],this.maxHeading=qc(),this.suggest=new Oh(e,{id:t.id||"quick-menu",trigger:t.trigger,needSpaceBeforeTrigger:!0,autoDeleteTrigger:!0,highlight:!0,onClose:this.onClose,onShow:this.onShow,onClickItem:this.onClickItem,queryItems:this.queryItems})}get menu(){return this.suggest.menu.menu}destroy(){this.suggest.destroy()}initMenuItems(){const e=E1(this.editor);this.items=e}refreshMenuItems(){let e=null,t=0;const o=qc();if(o!==this.maxHeading){const r=new V3,s=r.getCommands().map(l=>({...l,itemType:"insert-block",commandProvider:r}));for(let l=0;l<this.items.length;l++)this.items[l].group==="basics"&&(e||(e=l),e&&t++);e&&t&&this.items.splice(e,t,...s),this.maxHeading=o}}handleEmptySearch(){const e=this.editor.selection.getFocusedPos();if(this.firstEmptyOffset===-1){if(e.isSimple()){const{offset:t}=e;this.firstEmptyOffset=t}}else if(e.isSimple()){const{offset:t}=e;t-this.firstEmptyOffset>=NT&&(this.suggest.close(),this.firstEmptyOffset=-1)}}}class I1{constructor(e){h(this,"instance");h(this,"mousedown",!1);h(this,"currentInstance",null);h(this,"attributeName",[]);h(this,"attributeDesc","");h(this,"observer",null);h(this,"observerCallback",null);h(this,"createContent",e=>{let t="",o=0;for(;o<this.attributeName.length&&!t;)e.hasAttribute(this.attributeName[o])&&(t=e.getAttribute(this.attributeName[o])||""),o++;const r=e.getAttribute(this.attributeDesc);if(!r)return t;const i=A("div",[],null);return A("span",[],i,t),r&&A("span",["editor-tooltip-desc"],i,r),i});h(this,"handleDocumentMouseDown",()=>{this.mousedown=!0,this.editor.domEvents.addEventListener(document,"mouseup",this.handleDocumentMouseUp)});h(this,"handleDocumentMouseUp",()=>{this.mousedown=!1,this.editor.domEvents.removeEventListener(document,"mouseup",this.handleDocumentMouseUp)});h(this,"handleShown",e=>{this.currentInstance&&this.hide(),this.currentInstance=e,this.createObserver()});h(this,"handleHidden",()=>{this.destroyObserver(),this.currentInstance=null});h(this,"handleShow",e=>{var r;const t=e.reference;if(!t||!Ce(document.body,t)||window.isDragging||this.mousedown)return!1;const o=Number.parseInt((r=t.getAttribute("data-tooltip-hide-at"))!=null?r:"",10);if(o&&Date.now()-o<1e3)return!1;if(e.reference){const i={};if(e.reference.hasAttribute("data-editor-tooltip-placement")&&(i.placement=e.reference.getAttribute("data-editor-tooltip-placement")||"top"),e.reference.hasAttribute("data-editor-tooltip-offset-x")||e.reference.hasAttribute("data-editor-tooltip-offset-y")){const s=e.reference.getAttribute("data-editor-tooltip-offset-x"),l=e.reference.getAttribute("data-editor-tooltip-offset-y");i.offset=[s?Number.parseInt(s,10):0,l?Number.parseInt(l,10):0]}e.reference.hasAttribute("data-editor-tooltip-maxwidth")&&(i.maxWidth=Number.parseInt(e.reference.getAttribute("data-editor-tooltip-maxwidth")||"350",10)),Object.keys(i).length&&e.setProps(i)}return!0});this.editor=e;const t=e.clientId;this.attributeName=[`data-editor-tooltip-${t}`,"data-editor-tooltip-common"],this.attributeDesc=`data-editor-tooltip-desc-${t}`,this.instance=su.delegate(document.body,{delay:200,target:this.attributeName.map(o=>`[${o}]`).join(","),content:this.createContent,onShow:this.handleShow,onShown:this.handleShown,onHide:this.handleHidden}),e.domEvents.addEventListener(document,"mousedown",this.handleDocumentMouseDown)}visible(){var e;return(e=this.currentInstance)==null?void 0:e.state.isVisible}hide(){var e;(e=this.currentInstance)!=null&&e.state.isVisible&&this.currentInstance.hide()}destroy(){this.destroyObserver(),this.instance.destroy(),this.editor.domEvents.removeEventListener(document,"mousedown",this.handleDocumentMouseDown),this.editor.domEvents.removeEventListener(document,"mouseup",this.handleDocumentMouseUp)}createObserver(){this.destroyObserver();const e=this.currentInstance;if(!e||!e.reference)return;this.observerCallback=nt.default(()=>{e.reference.closest("body")||(e.hide(),this.destroyObserver())},200),this.observer=new MutationObserver(this.observerCallback);const t=document.body,o={childList:!0,attributes:!1,subtree:!0};this.observer.observe(t,o)}destroyObserver(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observerCallback&&(this.observerCallback.cancel(),this.observerCallback=null)}}const FT={"text/style-bold":"bold","text/style-italic":"italic","text/style-underline":"underline","text/style-strikethrough":"line-through","text/style-code":"code","text/style-subscript":"subscript","text/style-superscript":"superscript"};function $T(n,e){const t=new Set(Object.keys(FT)),o=e.filter(i=>t.has(i.id));return Uc(o)}function ta(n,e){if(!n.isWritable())return!1;const t=n.selection.range,o=n.editorCommandProviders.getCommands(t),i=$T(n,o).find(s=>s.id===`text/${e}`);return i?(n.editorCommandProviders.executeCommand(t,i,{}),ci.get(n).update("selectionChange"),!0):!1}const x1={"CtrlOrCmd+B":n=>ta(n,"style-bold"),"CtrlOrCmd+I":n=>ta(n,"style-italic"),"CtrlOrCmd+U":n=>ta(n,"style-underline"),"CtrlOrCmd+D":n=>ta(n,"style-strikethrough")},_T={quickMenu:{basic:{heading:{title:"\u6807\u9898 {heading}",space:"{markdown}\u7A7A\u683C"},unordered:"\u65E0\u5E8F\u5217\u8868",ordered:"\u6709\u5E8F\u5217\u8868",checkbox:"\u5F85\u529E\u4E8B\u9879",quote:"\u5F15\u7528"},inlineBox:{math:"\u516C\u5F0F",link:"\u94FE\u63A5"}},link:{textLabel:"\u6587\u672C",urlLabel:"\u94FE\u63A5\u5730\u5740",textPlaceholder:"\u8BF7\u8F93\u5165\u6587\u672C",urlPlaceholder:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740",submitText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",edit:"\u7F16\u8F91",remove:"\u53D6\u6D88\u94FE\u63A5"},commands:{unordered:"\u65E0\u5E8F\u5217\u8868",ordered:"\u6709\u5E8F\u5217\u8868",check:"\u5F85\u529E\u5217\u8868",link:"\u94FE\u63A5",quote:"\u5F15\u7528",alignLeft:"\u5DE6\u5BF9\u9F50",alignRight:"\u53F3\u5BF9\u9F50",alignCenter:"\u5C45\u4E2D\u5BF9\u9F50",alignGroup:"\u5BF9\u9F50\u65B9\u5F0F",heading:"\u6807\u9898 {name}",headingGroup:"\u6807\u9898\u6837\u5F0F",text:"\u6B63\u6587"}},HT={quickMenu:{basic:{heading:{title:"Heading {heading}",space:"{markdown}space"},unordered:"Bulleted list",ordered:"Numbered list",checkbox:"Todo list",quote:"Quote"},inlineBox:{math:"Math",link:"Link"},link:{textLabel:"Text",urlLabel:"Link Address",textPlaceholder:"Please enter text",urlPlaceholder:"Please enter the link address",submitText:"Ok",cancelText:"Cancel",edit:"Edit",remove:"Remove link"}},commands:{unordered:"Bulleted list",ordered:"Numberer list",check:"Todo list",link:"Link",quote:"Quote",alignLeft:"Align left",alignRight:"Align right",alignCenter:"Align center",alignGroup:"Alignment",heading:"Heading {name}",headingGroup:"Text style",text:"Text"}},jT={quickMenu:{basic:{heading:{title:"\u898B\u51FA\u3057{heading}",space:"{markdown}\u30B9\u30DA\u30FC\u30B9"},unordered:"\u7B87\u6761\u66F8\u304D\u30EA\u30B9\u30C8",ordered:"\u756A\u53F7\u4ED8\u304D\u30EA\u30B9\u30C8",checkbox:"\u30D0\u30C3\u30AF\u30ED\u30B0",quote:"\u5F15\u7528"},inlineBox:{math:"\u6570\u5F0F",link:"URL"}},link:{textLabel:"\u6587\u672C",urlLabel:"URL",textPlaceholder:"\u30C6\u30AD\u30B9\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",urlPlaceholder:"URL \u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",submitText:"OK",cancelText:"\u30AD\u30E3\u30F3\u30BB\u30EB",edit:"\u7F16\u8F91",remove:"\u53D6\u6D88\u94FE\u63A5"},commands:{unordered:"\u7B87\u6761\u66F8\u304D\u30EA\u30B9\u30C8",ordered:"\u756A\u53F7\u4ED8\u304D\u30EA\u30B9\u30C8",check:"\u30D0\u30C3\u30AF\u30ED\u30B0",link:"URL",quote:"\u5F15\u7528",alignLeft:"\u5DE6\u63C3\u3048",alignRight:"\u53F3\u63C3\u3048",alignCenter:"\u4E2D\u592E\u63C3\u3048",alignGroup:"\u5BF9\u9F50\u65B9\u5F0F",heading:"\u898B\u51FA\u3057{name}",headingGroup:"\u30BF\u30A4\u30C8\u30EB\u30B9\u30BF\u30A4\u30EB",text:"\u672C\u6587"}};I.mergeLang({"zh-CN":_T,"en-US":HT,"ja-JP":jT});const XV="";function br(n,...e){const t=Io(...e);return t.classList.remove("editor-button"),t.classList.add("editor-text-button"),n.append(t),t}function X3(n){Vc(n).hide();const t=n.getCustom("table-border-bar");t==null||t.closeToolbar()}function zT(n){return A("div",["insert-column-button","drop-marker"],n)}const UT=w("row-height");function e4(n){const e=re.fromTable(n),t=n.rows;d(UT,t.length===e.rowCount,"row count mismatch");const o=Array(e.rowCount).fill(0);for(let r=0;r<t.length;){let i=1,l=t[r].getBoundingClientRect().height,c=r+1;for(;c<t.length;){const a=t[c];if(a.cells.length!==0)break;i++,c++,l+=a.getBoundingClientRect().height}for(let a=0;a<i;a++)o[r+a]=l/i;r=c}return o}const Ro=w("table-border-bar-dom");function ui(n,e){d(Ro,Ze(e),"invalid table block");const t=je(e),o=Tn(n,e),r=(a,u,f)=>{const m=A("div",["button-root",u],a),p=A("div",["button-container",u],m);m.setAttribute(`data-${u}-index`,`${f}`),p.setAttribute(`data-editor-tooltip-${n.clientId}`,u==="left"?I.t("table.insertRow"):I.t("table.insertCol")),A("span",["insert-indicator"],p),zT(p)},{selectedRows:i,selectedColumns:s}=Nh(n,e),l=()=>{const a=o.querySelector(".table-border-bar-container.top");d(Ro,a,"no top border bar container");const u=A("div",["table-border-bar-container","top"],null),f=A("div",["table-border-bar","top"],u),m=XE(t);A("span",["table-border-bar-cell","corner"],f);const b=re.fromTable(t).colCount;n.selection.range.isSimple()&&r(f,"top",0);for(let k=0;k<b;k++){const v=k===b-1?m[k]+2:m[k],T=A("span",["table-border-bar-cell","top"],f);s.has(k)&&T.classList.add("selected"),T.setAttribute("data-top-index",`${k}`),T.style.width=`${v}px`,n.selection.range.isSimple()&&r(f,"top",k+1)}Vi(a,u)},c=()=>{const a=o.querySelector(".table-border-bar-container.left");d(Ro,a,"no left border bar container");const u=A("div",["table-border-bar-container","left"],null),f=A("div",["table-border-bar","left"],u),m=e4(t);n.selection.range.isSimple()&&r(f,"left",0),Array.from(t.rows).forEach((p,b,k)=>{const v=A("span",["table-border-bar-cell","left"],f);i.has(b)&&v.classList.add("selected"),v.setAttribute("data-left-index",`${b}`);const T=b===k.length-1?m[b]+2:m[b];v.style.height=`${T}px`,n.selection.range.isSimple()&&r(f,"left",b+1)}),Vi(a,u)};l(),c()}function t4(n,e){const t=e.target;if(!(t instanceof Element))return;const o=z(t);d(Ro,o&&Ze(o),"invalid table block"),ui(n,o),n.selection.caret.update()}function T1(n,e){const t=e.target;if(!(t instanceof Element))return;const o=z(t);d(Ro,o&&Ze(o),"invalid table block");const r=t.closest(".button-root");if(r){if(r.classList.contains("top")){const i=parseInt(r.getAttribute("data-top-index")||"0",10);f3(n,o,i),ui(n,o)}else if(r.classList.contains("left")){const i=parseInt(r.getAttribute("data-left-index")||"0",10);m3(n,o,i),ui(n,o)}}}function S1(n,e){var s;X3(n),e.preventDefault(),e.stopPropagation();let t=null,o,r;const i=l=>{var c;if(l.target instanceof HTMLElement&&o&&t&&r!==void 0){const a=z(l.target),u=l.target.closest(".table-border-bar");if(a===t&&u){const f=parseInt((c=l.target.getAttribute(`data-${o}-index`))!=null?c:"0",10),m=Math.min(r,f),p=Math.abs(r-f)+1;ne(l.target,"top")&&o==="top"?hI(n,a,m,p,{reverse:!0}):ne(l.target,"left")&&o==="left"&&fI(n,a,m,p,{reverse:!0})}}l.type==="mouseup"&&(t=null,r=void 0,o=void 0,document.body.removeEventListener("mousemove",i),document.body.removeEventListener("mouseup",i))};e.target instanceof HTMLElement&&ne(e.target,"table-border-bar-cell")&&(t=z(e.target),ne(e.target,"top")?o="top":ne(e.target,"left")&&(o="left"),o&&t&&(r=parseInt((s=e.target.getAttribute(`data-${o}-index`))!=null?s:"0",10),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",i)))}function n4(n){const e=n.selection.range,t=Rs(n,e);t&&ui(n,t)}function VT(n,e){d(Ro,Ze(e),"invalid table block");const t=Tn(n,e),o=A("div",["table-border-bar-container","top"],t),r=A("div",["table-border-bar-container","left"],t);ui(n,e),n.domEvents.addEventListener(le(e),"scroll",t4),n.domEvents.addEventListener(o,"click",T1),n.domEvents.addEventListener(r,"click",T1),n.domEvents.addEventListener(o,"mousedown",S1),n.domEvents.addEventListener(r,"mousedown",S1),n.addListener("afterClearSelection",n4)}function o4(n,e){if(!n.isWritable())return;if(Tn(n,e).querySelector(".table-border-bar-container")){ui(n,e);return}VT(n,e)}function r4(n,e){d(Ro,Ze(e),"invalid table block"),Tn(n,e).querySelectorAll(".table-border-bar-container").forEach(r=>{n.domEvents.removeEventListener(r,"click",T1),n.domEvents.removeEventListener(r,"mousedown",S1),r.remove()}),n.domEvents.removeEventListener(le(e),"scroll",t4),n.addListener("afterClearSelection",n4)}function qT(n,e){d(Ro,Ze(e),"invalid table block");const o=Tn(n,e).querySelector(".table-border-bar-container.top");return o?o.getBoundingClientRect().height:0}class WT{constructor(e,t){h(this,"toolbar");h(this,"handleSelectionChange",(e,t)=>{!e.isVisible||(t==="delete-columns"?(To(this.editor,this.tableBlock,!0,!0),So(this.editor,this.tableBlock,!0,!0)):t==="delete-rows"?(To(this.editor,this.tableBlock,!0,!1),So(this.editor,this.tableBlock,!0,!1)):(To(this.editor,this.tableBlock,!1),So(this.editor,this.tableBlock,!1)))});h(this,"handleClick",(e,t,o)=>{t.id==="delete-columns"?Fh(this.editor.selection.range):t.id==="delete-rows"&&$h(this.editor.selection.range)});h(this,"handleToolbarClose",()=>{this.tableBlock&&Rs(this.editor,this.editor.selection.range)===this.tableBlock&&(To(this.editor,this.tableBlock,!1),So(this.editor,this.tableBlock,!1))});this.editor=e,this.tableBlock=t;const o=e.options.componentsOptions.popover;this.toolbar=new Ds([],void 0,{overflowBoundary:o==null?void 0:o.overflowBoundary,refuseOverflow:!0,tooltipId:this.editor.clientId}),this.toolbar.addListener("selectionChange",this.handleSelectionChange),this.toolbar.addListener("click",this.handleClick),this.toolbar.addListener("close",this.handleToolbarClose)}close(){this.toolbar.close()}update(){const{selectedColumns:e,selectedRows:t}=Nh(this.editor,this.tableBlock);if(!this.editor.isWritable())return;if(e.size>0&&t.size>0){this.toolbar.close();return}if(e.size===0&&t.size===0){this.toolbar.close();return}const o=ho(this.editor,this.tableBlock,this.editor.selection.range)[0];if(!o){this.toolbar.close();return}if(e.size>0){const r={id:"delete-columns",name:I.t("table.deleteCol"),icon:Kw};this.toolbar.updateItems([r]);const i=go(this.editor,this.tableBlock,"table-row-column-delete",o);this.toolbar.manualShow(i,{placement:"top"})}else{const r={id:"delete-rows",name:I.t("table.deleteRow"),icon:Jw};this.toolbar.updateItems([r]);const i=new DOMRect(o.left-15,o.top,o.width,o.height),s=go(this.editor,this.tableBlock,"table-row-column-delete",i);this.toolbar.manualShow(s,{placement:"left"})}}destroy(){this.toolbar.destroy(),this.toolbar.removeAllListeners()}}const D1=w("table-border-bar");class GT{constructor(e,t){h(this,"toolbar");h(this,"resizeObserver");h(this,"handleReadonlyChanged",e=>{e.isWritable()?this.update():r4(this.editor,this.tableBlock)});h(this,"handleBlockUpdated",()=>{this.resizeObserver.disconnect(),setTimeout(()=>{const e=this.editor.getBlockById(j(this.tableBlock));this.resizeObserver.observe(je(e))})});h(this,"handleTableResize",()=>{!this.editor.isWritable()||(console.log("resize"),this.update())});this.editor=e,this.tableBlock=t,d(D1,this.tableBlock,"no table block"),D1.debug("create table border bar"),o4(this.editor,this.tableBlock),this.resizeObserver=new ResizeObserver(this.handleTableResize),this.resizeObserver.observe(je(this.tableBlock)),this.toolbar=new WT(this.editor,this.tableBlock),this.editor.addListener("readonlyChanged",this.handleReadonlyChanged)}close(){this.toolbar.close()}destroy(){D1.debug("destroy table border bar"),this.resizeObserver.disconnect(),r4(this.editor,this.tableBlock),this.toolbar.destroy(),this.editor.removeListener("readonlyChanged",this.handleReadonlyChanged)}update(){o4(this.editor,this.tableBlock),this.toolbar.update()}}const ZT=w("table-border-bar");class QT{constructor(e){h(this,"activeTableBar",null);h(this,"handleBlockDeleted",(e,t)=>{!this.activeTableBar||(t===this.activeTableBar.tableBlock||Ce(t,this.activeTableBar.tableBlock))&&(this.activeTableBar.destroy(),this.activeTableBar=null)});h(this,"handleSelectionChanged",e=>{var r;const t=e.selection.range,o=Rs(e,t);((r=this.activeTableBar)==null?void 0:r.tableBlock)!==o&&this.activeTableBar&&this.hide(),o&&this.show(o)});this.editor=e,this.editor.addListener("blockDeleted",this.handleBlockDeleted),this.editor.addListener("selectionChanged",this.handleSelectionChanged)}destroy(){this.editor.removeListener("blockDeleted",this.handleBlockDeleted),this.editor.removeListener("selectionChanged",this.handleSelectionChanged)}show(e){this.activeTableBar?(this.activeTableBar.tableBlock!==e&&this.hide(),this.activeTableBar.update()):this.activeTableBar=new GT(this.editor,e)}update(){var e;(e=this.activeTableBar)==null||e.handleBlockUpdated()}closeToolbar(){var e;(e=this.activeTableBar)==null||e.close()}hide(){!this.activeTableBar||(d(ZT,this.activeTableBar,"no active table bar"),this.activeTableBar.destroy(),this.activeTableBar=null)}}function i4(n,e){const t=n.addCustom("table-border-bar",o=>new QT(o));e==="update"&&t.update()}const It=w("table-cell-menu"),YT="style-bg-color-";class JT{constructor(e){h(this,"activeTableBlock",null);h(this,"targetButton",null);h(this,"manualMenu",null);h(this,"colorPaletteItem",null);h(this,"handlePrevent",(e,t)=>{t.stopPropagation()});h(this,"handleReadonlyChanged",e=>{e.isWritable()||this.hide()});h(this,"handleSelectionChanged",e=>{const t=e.selection.range,o=Rs(e,t);if(this.hide(),this.activeTableBlock!==o&&(this.activeTableBlock=o),this.activeTableBlock){const r=re.fromBlock(this.activeTableBlock),i=t.isReverse()?t.start:t.end;let s=null;t.isCollapsed()?s=this.getCellByChildBlockId(r,i.blockId):i instanceof tn&&(e.getBlockById(i.blockId)===this.activeTableBlock?s=r.getCellByContainerId(i.childContainerId):s=this.getCellByChildBlockId(r,i.blockId)),s&&this.editor.isWritable()&&this.showCellMenuButton(s)}});h(this,"handleBeforePopupPalette",()=>{var t;const e=this.getSelectedBkgColorIndex();(t=this.colorPaletteItem)==null||t.palette.setColor("backgroundColor",e)});h(this,"createBkgColorItem",()=>{const e=A("div",["cell-background-color-item"],null);A("span",[],e,I.t("table.cellBackground"));const t=this.getSelectedBkgColorIndex();A("button",["item-button"],e).setAttribute("data-color-index",`${t}`);const r=A("span",["item-sub-indicator"],e);return r.innerHTML=k5,e});h(this,"handleCommand",e=>{var r;d(It,this.activeTableBlock,"no target table block");const t=((r=e.states)==null?void 0:r.includes("checked"))||!1,o=e.value;switch(e.id){case"delete-select-row":$h(Z5(this.editor,this.activeTableBlock,!1));break;case"delete-select-col":Fh(Z5(this.editor,this.activeTableBlock,!0));break;case"merge-cell":q5(this.editor.selection.range);break;case"split-cell":this.handleSplitCell();break;case"row-title":this.handleRowTitle(t);break;case"col-title":this.handleColTitle(t);break;case"stripe-style":this.handleStripeStyle(t);break;case"hide-border":yE(this.editor,this.activeTableBlock,o==="show-border");break;case"show-chart":IE(this.editor,this.activeTableBlock,o==="show-chart"),Qh(this.editor,this.activeTableBlock,{updateNow:!0});break}});h(this,"handleToolbarClose",()=>{this.targetButton&&_(this.targetButton,"active"),this.activeTableBlock&&Rs(this.editor,this.editor.selection.range)===this.activeTableBlock&&(To(this.editor,this.activeTableBlock,!1),So(this.editor,this.activeTableBlock,!1)),this.editor.focus()});h(this,"handleSelectionChange",(e,t)=>{!e.isVisible||(d(It,this.activeTableBlock,"no target table block"),t==="cell-background-color"&&this.handleBeforePopupPalette(),t==="delete-select-row"?(To(this.editor,this.activeTableBlock,!0,!1),So(this.editor,this.activeTableBlock,!0,!1)):t==="delete-select-col"?(To(this.editor,this.activeTableBlock,!0,!0),So(this.editor,this.activeTableBlock,!0,!0)):(To(this.editor,this.activeTableBlock,!1),So(this.editor,this.activeTableBlock,!1)))});h(this,"handleClick",()=>{var e;d(It,this.activeTableBlock,"no target table block"),d(It,this.targetButton,"no target button"),X3(this.editor),ne(this.targetButton,"active")?(_(this.targetButton,"active"),(e=this.manualMenu)==null||e.close()):(M(this.targetButton,"active"),this.manualMenu?this.manualMenu.updateItems(this.createCommandMenu()):(this.manualMenu=new fr(this.createCommandMenu()),this.manualMenu.on("click",(t,o)=>{var r;this.handleCommand(o),(r=this.manualMenu)==null||r.close()}),this.manualMenu.on("selectionChange",this.handleSelectionChange),this.manualMenu.on("close",this.handleToolbarClose)),this.manualMenu.manualShow(this.targetButton,{placement:"right-start"}))});this.editor=e,this.editor.addListener("selectionChanged",this.handleSelectionChanged),this.editor.addListener("readonlyChanged",this.handleReadonlyChanged)}destroy(){var e,t;this.activeTableBlock=null,this.targetButton=null,this.editor.removeListener("selectionChanged",this.handleSelectionChanged),this.editor.removeListener("readonlyChanged",this.handleReadonlyChanged),(e=this.manualMenu)==null||e.destroy(),(t=this.colorPaletteItem)==null||t.destroy()}hide(){var e;(e=this.manualMenu)==null||e.close(),this.targetButton&&(_(this.targetButton,"active"),this.targetButton.style.display="none")}getCellByChildBlockId(e,t){let o=this.editor.getBlockById(t);for(;o;){const r=o.closest("td");d(It,r,"no parent cell");const i=z(r);if(d(It,i,"no parent block"),je(i)===e.table)return e.getCellByCellElement(r);o=i}return d(It,!1,"filed to get cell by child block id"),null}createTargetButton(e){this.targetButton?e.querySelector(`:scope > .${qh}`)||e.appendChild(this.targetButton):(this.targetButton=A("button",[qh],e),this.targetButton.innerHTML=Dc,this.editor.domEvents.addEventListener(this.targetButton,"click",this.handleClick),this.editor.domEvents.addEventListener(this.targetButton,"mousedown",this.handlePrevent))}showCellMenuButton(e){this.createTargetButton(e.cell),d(It,this.targetButton,"no target button"),this.targetButton.style.display="inline-block"}handleSplitCell(){if(this.activeTableBlock){const e=re.fromBlock(this.activeTableBlock),t=this.editor.selection.range;if(t.isSimple()){const{col:o,row:r}=this.getCellByChildBlockId(e,t.start.blockId);Hh(this.editor,this.activeTableBlock,{col:o,row:r})}else jh(this.editor.selection.range)}}getSelectedBkgColorIndex(){var r;d(It,this.activeTableBlock,"no target table block");const e=BE(this.editor,this.activeTableBlock),t=this.editor.getBlockData(this.activeTableBlock),o=new Set;for(const i of e){if(o.size>1)break;const s=q(i),l=t[`${s}_background`];if(l)o.add(Number.parseInt((r=l.substring(YT.length))!=null?r:"0",10));else{o.add(-1);break}}return o.size===1&&[...o][0]!==-1?[...o][0]:-1}createCommandMenu(){d(It,this.activeTableBlock,"no target table block");const e=this.editor.getBlockData(this.activeTableBlock),t=V5(this.editor,this.activeTableBlock,this.editor.selection.range);let o=this.editor.selection.range;if(o.isSimple()){const u=to(this.editor,this.activeTableBlock,o.start);o=We(this.editor,{anchor:u,focus:u})}const r=U5(this.editor,this.activeTableBlock,o),i=e.hasRowTitle,s=e.hasColTitle,l=e.isStripeStyle,c=e.noBorder,a=e.chart;return this.colorPaletteItem=new F5("cell-background-color",{color:!1}),this.colorPaletteItem.palette.on("onClick",(u,f)=>{var m;switch(d(It,this.activeTableBlock,"no target table block"),u){case"clearColor":J5(this.editor,this.activeTableBlock,-1);break;case"backgroundColor":J5(this.editor,this.activeTableBlock,f);break}(m=this.manualMenu)==null||m.close()}),[{id:"cell-background-color",name:I.t("table.cellBackground"),element:this.createBkgColorItem(),children:[this.colorPaletteItem]},{id:"separator",name:"",type:"separator"},{id:"merge-cell",name:I.t("table.mergeCell"),states:t?[]:["disabled"]},{id:"split-cell",name:I.t("table.splitCell"),states:r?[]:["disabled"]},{id:"separator",name:"",type:"separator"},{id:"delete-select-row",name:I.t("table.deleteSelectRow")},{id:"delete-select-col",name:I.t("table.deleteSelectCol")},{id:"separator",name:"",type:"separator"},{id:"table-config",name:I.t("table.tableConfigKey"),children:[{id:"row-title",name:I.t("table.tableConfig.rowTitle"),states:i?["checked"]:[]},{id:"col-title",name:I.t("table.tableConfig.colTitle"),states:s?["checked"]:[]},{id:"stripe-style",name:I.t("table.tableConfig.stripeStyle"),states:l?["checked"]:[]},{id:"hide-border",name:c?I.t("table.tableConfig.showBorder"):I.t("table.tableConfig.hideBorder"),value:c?"show-border":"hide-border"},{id:"show-chart",name:a?I.t("table.tableConfig.hideChart"):I.t("table.tableConfig.showChart"),value:a?"hide-chart":"show-chart"}]}]}handleRowTitle(e){d(It,this.activeTableBlock,"no target table block"),e?AE(this.editor,this.activeTableBlock):CE(this.editor,this.activeTableBlock)}handleColTitle(e){d(It,this.activeTableBlock,"no target table block"),e?pE(this.editor,this.activeTableBlock):gE(this.editor,this.activeTableBlock)}handleStripeStyle(e){d(It,this.activeTableBlock,"no target table block"),e?vE(this.editor,this.activeTableBlock):bE(this.editor,this.activeTableBlock)}}function s4(n){n.addCustom("table-cell-menu",e=>new JT(e))}const na=w("table-container");function L1(n){const e=n.closest("td");return d(na,e,"no parent cell for a table cell container"),e}function l4(n){const e=je(n);return Array.from(e.querySelectorAll(':scope > tbody > tr > td > [data-type="editor-container"].child'))}function M1(n,e,t,o){const r=re.fromBlock(n),i=r.getCellByContainerId(q(e));if(t==="ArrowDown"){const s=r.getBottomCell(i);return s?s.container:null}if(t==="ArrowUp"){const s=r.getTopCell(i);return s?s.container:null}if(t==="ArrowLeft"){const s=r.getAllContainers(),l=s.indexOf(e);if(d(na,l>=0,"not a valid child container"),l===0)return null;const c=s[l-1];return o!=null&&o.noWrap&&r.getCellByContainerId(q(c)).row!==i.row?null:c}if(t==="ArrowRight"){const s=r.getAllContainers(),l=s.indexOf(e);if(d(na,l>=0,"not a valid child container"),l===s.length-1)return null;const c=s[l+1];return o!=null&&o.noWrap&&r.getCellByContainerId(q(c)).row!==i.row?null:c}d(na,!1,`invalid navigation type: ${t}`)}const KT=12,XT=90,oa=23,c4=2;class eS{constructor(e){h(this,"scrollTableBlock",null);h(this,"autoScrollDir",null);h(this,"autoScrollTimer",null);h(this,"handleMouseDown",e=>{const t=document.elementFromPoint(e.clientX,e.clientY);if(t&&t instanceof HTMLElement){const o=z(t);if(o&&Ce(this.editor.rootContainer,o)){const r=eo(o);r&&(this.scrollTableBlock=r,document.addEventListener("mousemove",this.handleAutoScroll))}}});h(this,"handleAutoScroll",N8.default(e=>{if(this.scrollTableBlock){const t=this.editor.getCustom(Xn(this.scrollTableBlock)),o=t.rootElement,r=t.scrollOptions.parentContainer,i=o.getBoundingClientRect(),s=window.innerHeight-(t.scrollOptions.barFloatWindowBottom||0),l=r.getBoundingClientRect(),c=Math.min(l.bottom,s),a=Math.max(l.top,0);i.bottom>c&&e.clientY>=c?this.setAutoScroll("bottom"):i.top<a&&e.clientY<=a?this.setAutoScroll("top"):o.scrollLeft>0&&e.clientX<i.left?this.setAutoScroll("left"):o.scrollLeft<o.scrollWidth-o.offsetWidth&&e.clientX>i.right?this.setAutoScroll("right"):this.clearAutoScroll()}},15));h(this,"handleMouseUp",()=>{document.removeEventListener("mousemove",this.handleAutoScroll),setTimeout(()=>{this.scrollTableBlock=null})});h(this,"handleSelectionChanged",e=>{const t=e.selection.range;if(t.isCollapsed()&&t.isSimple()){const o=e.getBlockById(t.start.blockId),r=eo(o);if(r){const i=e.getCustom(Xn(r)),s=i.rootElement.getBoundingClientRect(),l=Xt(e,o,t.start);if(s.left>l.left){const c=t.start.offset===0?KT:c4;i.rootElement.scrollLeft-=s.left-l.left+c}else if(l.right>s.right){const c=t.start.offset===0?XT:c4;i.rootElement.scrollLeft+=l.right-s.right+c}}}else{const o=e.getBlockById(t.start.blockId),r=eo(o),i=e.getBlockById(t.end.blockId),s=eo(i);if(r&&r===s){const l=e.getCustom(Xn(r)),c=l.rootElement.getBoundingClientRect();let a=null;if(t.isSimple())a=t.isReverse()?Xt(e,o,t.start):Xt(e,i,t.end);else{const u=L1(Nr(e,t.start.childContainerId)),f=L1(Nr(e,t.end.childContainerId));a=t.isReverse()?u.getBoundingClientRect():f.getBoundingClientRect()}c.left>a.left&&t.isReverse()?l.rootElement.scrollLeft-=c.left-a.left:c.right<a.right&&!t.isReverse()&&(l.rootElement.scrollLeft+=a.right-c.right)}}});h(this,"handleScroll",e=>{H5(e),this.editor.selection.caret.update()});h(this,"handleReset",e=>{H5(e),this.editor.selection.caret.update()});this.editor=e,this.editor.addListener("selectionChanged",this.handleSelectionChanged),document.addEventListener("mousedown",this.handleMouseDown),document.addEventListener("mouseup",this.handleMouseUp)}clearAutoScroll(){this.autoScrollTimer&&(clearInterval(this.autoScrollTimer),this.autoScrollTimer=null,this.autoScrollDir=null)}setAutoScroll(e){this.autoScrollDir&&this.autoScrollDir!==e&&this.clearAutoScroll(),this.autoScrollTimer||(this.autoScrollDir=e,this.autoScrollTimer=window.setInterval(()=>{if(this.scrollTableBlock){const t=this.editor.getCustom(Xn(this.scrollTableBlock)),o=t.rootElement,r=t.scrollOptions.parentContainer,i=o.getBoundingClientRect(),s=r===document.documentElement?window.innerHeight:r.offsetHeight,l=window.innerHeight-(t.scrollOptions.barFloatWindowBottom||0),c=r.getBoundingClientRect(),a=Math.min(c.bottom,l),u=Math.max(c.top,0);this.autoScrollDir==="left"&&(o.scrollLeft-=oa,o.scrollLeft<=0&&this.clearAutoScroll()),this.autoScrollDir==="right"&&(o.scrollLeft+=oa,o.scrollLeft>=o.scrollWidth-o.offsetWidth&&this.clearAutoScroll()),this.autoScrollDir==="bottom"&&(r.scrollTop+=oa,(r.scrollTop>=r.scrollHeight-s||i.bottom<=a)&&this.clearAutoScroll()),this.autoScrollDir==="top"&&(r.scrollTop-=oa,(r.scrollTop<=0||i.top>=u)&&this.clearAutoScroll())}},100))}destroy(){document.removeEventListener("mousedown",this.handleMouseDown),document.removeEventListener("mouseup",this.handleMouseUp),this.editor.removeListener("selectionChanged",this.handleSelectionChanged)}}function a4(n){return n.addCustom("table-scroll-events",e=>new eS(e))}const Sn=w("create-content");function u4(n,e,t){const o=new Mc(t),r=t.rows,i=t.cols;d(Sn,r>=1,`invalid rows: ${r}`),d(Sn,i>=1,`invalid cols: ${i}`),d(Sn,t.children,"no table children");const s=A("table",[],null),l=t.colsWidth,c=A("colgroup",[],s);for(let f=0;f<o.colCount;f++){const m=A("col",[],c);m.style.width=`${l[f]||jc}px`}const a=A("tbody",[],s);let u=0;for(let f=0;f<r;f++){const m=A("tr",[],a);for(let p=0;p<i;p++){const b=o.getCell({col:p,row:f});if(b.virtual)d(Sn,b.colSpan>1||b.rowSpan>1,"virtual cell should have colSpan or rowSpan");else{const k=t.children[u],v=A("td",[],m);b.colSpan>1&&(v.colSpan=b.colSpan),b.rowSpan>1&&(v.rowSpan=b.rowSpan);const T=t[Ns(k)];T&&M(v,T),p===0&&t.hasColTitle&&M(v,W5.COL_TITLE_ITEM),n.createChildContainer(e,v,k),u+=1}}}return d(Sn,u===t.children.length,"container count mismatch"),t.noBorder&&M(s,"no-border"),t.chart&&M(s,"editor-table-chart"),t.isStripeStyle&&M(s,"stripe"),t.hasRowTitle&&M(s,"row-title"),t.hasColTitle&&M(s,"col-title"),s}function tS(n,e,t,o,r){d(Sn,r.type==="table","not table data"),d(Sn,q(t)===e[e.length-1].containerId,"invalid path");const i=r,s=Xo(o,"div");try{const l=A("div",[],null);l.setAttribute("data-type","table-content");const c=u4(n,e,i);c.classList.add("drag-preview-element"),l.appendChild(c),d3(n),p3(n),i4(n,"create"),s4(n),_w(n,Yh);const a=n.getComponentOptions("table"),u=n.addCustom(Xn(o),()=>YE());u.init({parentElement:s,childElement:l,safeRightSpace:50,safeLeftSpace:40,parentContainer:Ae(t)?n.scrollContainer:t,locatingContainer:Ae(t)?(a==null?void 0:a.locatingContainer)||n.parent:t,paddingLeft:Vh+Ps,paddingTop:Vh+Ps,paddingBottom:Ps/2,paddingRight:Ps/2,barFloatWindowBottom:a==null?void 0:a.barFloatWindowBottom,isSetScale:a==null?void 0:a.isSetScale});const f=a4(n);u.on("scroll",f.handleReset),u.on("resize",f.handleReset),setTimeout(()=>{SE(n,o)})}catch{const c=`invalid table data: ${JSON.stringify(i)}`;Sn.error(c);const a=A("div",["error"],s);a.innerText=c}return s}function nS(n,e,t){d(Sn,t.type==="table","not table data");const o=t,r=le(e);try{const i=je(e),s=fo(e),l=u4(n,s,o);l.classList.add("drag-preview-element"),i.insertAdjacentElement("afterend",l),i.remove(),d3(n),p3(n),i4(n,"update"),s4(n),Yh(n,e)}catch{const s=`invalid table data: ${JSON.stringify(o)}`;Sn.error(s);const l=A("div",["error"],r);l.innerText=s}}function oS(n,e){let t,o,r=!1;if([...e].every(m=>m==="|")?(o=e.length,t=Array(o).fill(""),r=!0):(t=bu(e,"|").split("|"),o=t.length),o<2)return null;const i=3,s=o,l=[];for(let m=0;m<3;m++)t.forEach(p=>{l.push(Qn(n.doc,m===0?p:""))});const c=Array(s).fill(jc),a=l[r?0:s],u=n.doc.getContainerBlocks(a)[0].id;return{blockData:{id:F(),type:"table",rows:i,cols:s,children:l,colsWidth:c},focusBlockId:u}}function rS(n,e){const t=e.rows,o=e.cols;if(t<1||o<1)return null;const r=[];for(let a=0;a<t;a++)for(let u=0;u<o;u++)r.push(Qn(n.doc));const i=Array(o).fill(jc),s=r[0],l=n.doc.getContainerBlocks(s)[0].id;return{blockData:{id:F(),type:"table",rows:t,cols:o,children:r,colsWidth:i},focusBlockId:l}}const d4=w("table-selection-to-doc");function iS(n,e){const{start:t,end:o,block:r}=e,i=se(r);d(d4,i==="table",`invalid block type: ${i}`);const s=n.getBlockData(r);if(t.isSimple()&&o.isSimple())return yo(n.editorBlocks,n.doc.toJSON(),s);d(d4,!t.isSimple()&&!o.isSimple(),"invalid block pos type");const l=re.fromBlock(r),{fromCol:c,toCol:a,fromRow:u,toRow:f}=hn(r,t,o),m={},p=[],b=n.doc.toJSON();let k={};l.sub({row:u,col:c},{row:f,col:a}).forEach((V,ee)=>{V.forEach((ie,pe)=>{const de=ie.containerId;if(p.indexOf(de)!==-1)return;p.push(de);let we;if(ie.virtual){const st=l.getCellByContainerId(ie.containerId),Wt=c+pe;let $o=st.col+st.colSpan-1;$o>a&&($o=a);const xr=$o-Wt+1;xr>1&&(m[`${de}_colSpan`]=xr);const Tr=u+ee;let _o=st.row+st.rowSpan-1;_o>f&&(_o=f);const Na=_o-Tr+1;Na>1&&(m[`${de}_rowSpan`]=Na),we=bo()}else{if(we=Od(n.editorBlocks,b,de),ie.col+ie.colSpan>a+1){const st=a-ie.col+1;st>1&&(m[`${de}_colSpan`]=st)}else ie.colSpan>1&&(m[`${de}_colSpan`]=ie.colSpan);if(ie.row+ie.rowSpan>f+1){const st=f-ie.row+1;st>1&&(m[`${de}_rowSpan`]=st)}else ie.rowSpan>1&&(m[`${de}_rowSpan`]=ie.rowSpan)}const{root:ft,...lo}=we.blocks;k={...k,...lo,[de]:ft}})});const T=Hs(je(r)).slice(c,a+1);return{blocks:{root:[{id:F(),type:i,children:p,colsWidth:T,rows:f-u+1,cols:a-c+1,...m}],...k},meta:{},comments:{}}}function sS(n,e){if(e.top===0)return!0;for(let t=e.left;t<=e.right;t++)if(n[e.top-1][t]===n[e.top][t])return!1;return!0}function lS(n,e){if(e.left===0)return!0;for(let t=e.top;t<=e.bottom;t++)if(n[t][e.left-1]===n[t][e.left])return!1;return!0}function cS(n,e){if(e.bottom===n.length-1)return!0;for(let t=e.left;t<=e.right;t++)if(n[e.bottom][t]===n[e.bottom+1][t])return!1;return!0}function aS(n,e){if(e.right===n[0].length-1)return!0;for(let t=e.top;t<=e.bottom;t++)if(n[t][e.right]===n[t][e.right+1])return!1;return!0}function uS(n,e,t){const o=e.col,r=e.row,i=t.col,s=t.row,l={left:o,top:r,right:i,bottom:s};let c=!1;do{if(c=!1,!sS(n,l)){l.top--,c=!0;continue}if(!lS(n,l)){l.left--,c=!0;continue}if(!cS(n,l)){l.bottom++,c=!0;continue}if(!aS(n,l)){l.right++,c=!0;continue}}while(c);return l}function dS(n,e,t,o){if(t.custom!==void 0||o.custom!==void 0)return{anchor:t,focus:o};const r=re.fromBlock(e),i=r.map(R=>R.containerId),s=r.getCellByContainerId(t.childContainerId),l=r.getCellByContainerId(o.childContainerId),c=Math.min(s.row,l.row),a=Math.max(s.row,l.row),u=Math.min(s.col,l.col),f=Math.max(s.col,l.col),m=uS(i,{row:c,col:u},{row:a,col:f}),p=r.getCell({row:m.top,col:m.left}),b=r.getCell({row:m.bottom,col:m.right}),k=r.getCell({row:m.top,col:m.right}),v=r.getCell({row:m.bottom,col:m.left});let T,E;return s.row<=l.row?s.col<=l.col?(T=p,E=b):(T=k,E=v):s.col<l.col?(T=v,E=k):(T=b,E=p),console.log(`move ${T.col}, ${T.row}, -> ${E.col}, ${E.row}`),{anchor:xe(e,T.containerId),focus:xe(e,E.containerId)}}function h4(n,e,t){if(t.isSimple())return[je(e).getBoundingClientRect()];const o=je(e),r=o.getBoundingClientRect(),{fromCol:i,fromRow:s,toCol:l,toRow:c}=hn(e,t.start,t.end),a=Hs(o),u=a.slice(0,i).reduce((k,v)=>k+v,0),f=u+a.slice(i,l+1).reduce((k,v)=>k+v,0),m=e4(o);let p=m.slice(0,s).reduce((k,v)=>k+v,0);const b=p+m.slice(s,c+1).reduce((k,v)=>k+v,0);if(s===0){const k=qT(n,e);p-=k}return[new DOMRect(r.left+u,r.top+p,f-u,b-p)]}w("table-size");const hS=40;function ra(n){const e=n.querySelector("td");if(!e)return 0;const t=window.getComputedStyle(e),o=Number.parseInt(t.borderLeft,10),r=Number.parseInt(t.borderRight,10);return(o+r)/2}function fS(n,e,t){const o=Vu(n,t.container);return o!==void 0?o+ra(e):hS*t.colSpan-ra(e)}function mS(n,e,t,o){let r=0;const i=t.colCount;for(let s=0;s<i;s++){const l=t.getRealCell({col:s,row:o});if(l.virtual)continue;let c=fS(n,e,l);const a=Pg(l.container,{withPadding:!0});a&&a>c&&(c=a),r+=c+ra(e)}return r}function gS(n,e){const t=je(e),o=re.fromTable(t);let r=0;for(let s=0;s<o.rowCount;s++)r=Math.max(r,mS(n,t,o,s));const i=ra(t);return r+=i,r}const no=w("table-creator");async function pS(n,e){return n.undoManager.runInGroup(()=>{var c,a;const t=e.item,o=(c=t.colCount)!=null?c:5,r=(a=t.rowCount)!=null?a:3,i=rS(n,{cols:o,rows:r});if(!i)return null;const{blockData:s,focusBlockId:l}=i;return n.insertBlock(e.containerId,e.blockIndex,s,Fe(n,l,0))})}class CS{constructor(){h(this,"id","insert-table");h(this,"name","Create table");h(this,"element");h(this,"closeable",null);h(this,"colCount");h(this,"rowCount");h(this,"setCloseable",e=>{this.closeable=e});h(this,"destroy",()=>{this.closeable=null});h(this,"getTableCreatorCellId",(e,t)=>`table-creator-cell-${e}-${t}`);h(this,"handleTableCreatorClick",e=>{var m,p;e.preventDefault(),e.stopPropagation();const t=e.target;d(no,t instanceof HTMLElement,"invalid event target");const o=t.closest(".table-creator");d(no,o,"no table creator");const r=o.querySelectorAll(".active");if(r.length===0)return;const s=r[r.length-1].id;d(no,s,"no cell id");const l="table-creator-cell-";if(!s.startsWith(l))return;const a=s.substring(l.length).split("-");d(no,a.length===2,"invalid cell id");const u=Number.parseInt(a[0],10)+1,f=Number.parseInt(a[1],10)+1;no.debug(`${u}, ${f}`),this.colCount=f,this.rowCount=u,(m=this.closeable)==null||m.click(this,this.element),(p=this.closeable)==null||p.close(),this.handleTableCreatorLeave()});h(this,"handleTableCreatorLeave",()=>{for(let e=0;e<9;e++)for(let t=0;t<9;t++){const o=this.getTableCreatorCellId(e,t),r=document.getElementById(o);r&&_(r,"active")}});h(this,"handleTableCreatorCellEnter",e=>{const t=e.target;d(no,t instanceof HTMLElement,"invalid event target");const o=t.id,r="table-creator-cell-";d(no,o.startsWith(r),"invalid cell id");const s=o.substring(r.length).split("-");d(no,s.length===2,"invalid cell id");let l=Number.parseInt(s[0],10),c=Number.parseInt(s[1],10);l===0&&c===0&&(l=-1,c=-1);for(let a=0;a<9;a++)for(let u=0;u<9;u++){const f=this.getTableCreatorCellId(a,u),m=document.getElementById(f);d(no,m,"no cell"),a<=l&&u<=c?M(m,"active"):_(m,"active")}});this.element=this.createTableCreatorElement()}createTableCreatorElement(){const e=A("div",["table-creator"],null),t=(o,r,i)=>{const s=A("div",["table-creator-cell"],o);return s.id=this.getTableCreatorCellId(r,i),s};e.addEventListener("click",this.handleTableCreatorClick),e.addEventListener("mouseleave",this.handleTableCreatorLeave);for(let o=0;o<9;o++){const r=A("div",["table-creator-row"],e);for(let i=0;i<9;i++)t(r,o,i).addEventListener("mouseenter",this.handleTableCreatorCellEnter)}return e}}function AS(){return new CS}function bS(n){const e=/[\u4e00-\u9fff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af]/g,t=n.match(e);return t?t.length:0}function f4(n){const e=bS(n);return n.length+e}function vS(n,e){const t=f4(n),o=e-t;return o>0?n+" ".repeat(o):n}function yS(n,e,t,o,r){const i=e,s=new Mc(i);if(o==="markdown"||o==="text"){const l=v=>t.blocks[v].map((R,L)=>o==="markdown"?Bd(n,R,t,[...r,{containerId:v,blockIndex:L}]):oc(n,R,t,[...r,{containerId:v,blockIndex:L}])),c=v=>l(v).join(" ").replace(/\n/g," ").trim(),a=new Map,u=new Map;for(let v=0;v<s.colCount;v++){let T=0;for(let E=0;E<s.rowCount;E++){const R=s.getCell({row:E,col:v});let L="";R.virtual||(L=c(R.containerId)),a.set(`${E},${v}`,L),T=Math.max(T,f4(L))}u.set(v,T)}const f=v=>{const T=a.get(`${v.row},${v.col}`)||"",E=u.get(v.col)||0;return vS(T,E)},m=[];let p="|",b="|";for(let v=0;v<s.colCount;v++){const T=f({row:0,col:v});p+=` ${T} |`;const E="-".repeat((u.get(v)||0)+2);b+=`${E}|`}m.push(p),m.push(b);for(let v=1;v<s.rowCount;v++){let T="|";for(let E=0;E<s.colCount;E++){const R=f({row:v,col:E});T+=` ${R} |`}m.push(T)}return`${m.join(`
376
376
  `)}
@@ -570,7 +570,7 @@ width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
570
570
  </defs>
571
571
  </svg>`,k6={dwg:[],rvt:[],skp:[],img:["image/png","image/jpg","image/jpeg","image/bmp","image/ico","image/icon","image/gif"],txt:["text/plain"],zip:["application/zip","application/x-rar-compressed","application/x-7z-compressed","application/x-tar","application/x-bzip2","application/java-archive"],ppt:["application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation"],excel:["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],pdf:["application/pdf"],word:["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]},kf={dwg:nN,rvt:oN,skp:rN,img:iN,txt:sN,zip:y6,rar:y6,ppt:lN,excel:cN,pdf:aN,word:uN};function w6(n,e){const t=Object.keys(k6);for(let r=0;r<t.length;r+=1){const i=t[r];if(k6[i].includes(e))return kf[i]}const o=xu(n.toLowerCase());return kf[o]?kf[o]:dN}async function hN(n,e,t){var k;const{fileName:o,fileType:r,fileSize:i}=t,s=A("div",["card-root"],e),l=A("div",["file-icon"],s),{renderFileCardIcon:c}=((k=n.options.componentsOptions)==null?void 0:k.file)||{};if(!c)l.innerHTML=w6(o,r);else{const v=c&&await c(n,t);v?l.append(v):l.innerHTML=w6(o,r)}const a=A("div",["file-details"],s),u=xu(o),f=o.length-u.length-3,m=A("div",["file-name"],a);f>0?(A("span",["file-name-pre"],m,o.slice(0,f)),A("span",[],m,o.slice(f))):m.textContent=o,A("div",["file-size"],a,Jm(i));const p=A("div",["file-actions"],s),b=A("button",["download"],p);return b.innerHTML=bf,{card:s,downloadButton:b}}const vq="";function B6(n,e){const o=n.getBlockData(e).embedData,r=n.options.componentsOptions.file;if(r!=null&&r.onDownloadFile){r.onDownloadFile(n,o);return}const i=n.doc.buildResourceUrl(o.src,{downloadFileName:o.fileName});Pl(i,o.fileName)}async function fN(n,e,t){const{embedData:o}=t,r=o,{card:i,downloadButton:s}=await hN(n,e,r);n.domEvents.addEventListener(s,"click",(l,c)=>{if(!c.target)return;const a=z(c.target);!a||B6(l,a)}),n.domEvents.addEventListener(i,"click",(l,c)=>{if(!c.target)return;const a=z(c.target);if(!a||Lr(c,"button"))return;const u=l.options.componentsOptions.file;if(u!=null&&u.onClick){u.onClick(l,a,c);return}const m=l.getBlockData(a).embedData,p=l.doc.buildResourceUrl(m.src,{downloadFileName:m.fileName});Pl(p,m.fileName)})}class mN{constructor(e){h(this,"group","file-card");h(this,"_commands",[{id:"download",name:"Download",icon:bf},{id:"sep",name:"",type:"separator"},{id:"to-link",name:"To link",icon:p6},{id:"to-card",name:"To card",icon:C6,states:["checked"]},{id:"sep",name:"",type:"separator"},{id:"add-comment",name:"Add Comment",icon:Ss}]);this.editor=e}get commands(){return this.editor.readonly?[]:this._commands}executeCommand(e,t,o){if(o.id==="to-link"){const r=H(t),i=q(r),s=K(t),l=e.getBlockData(t),{embedData:c}=l,a=c,u={id:F(),box:!0,type:"file",created:Date.now(),src:a.src,fileName:a.fileName,fileSize:a.fileSize,fileType:a.fileType};e.undoManager.runInGroup(()=>{e.deleteBlock(t);const f=[up(u)];e.insertTextBlock(f,i,s)})}else o.id==="download"?B6(e,t):o.id==="add-comment"&&Sa(e,t)}}function gN(n,e){const t=n.getBlockData(e),{embedData:o}=t,r=o;return{blockCommands:{"hovering-toolbar":new mN(n)},abstract:r.fileName}}function pN(n,e,t,o){const{embedData:r}=e,i=r;return o==="html"?i.src?`<p><a href="${n.doc.buildResourceUrl(i.src,{withToken:!0})}" >${i.fileName}</a></p>`:`<p>[${i.fileName}]</p>`:o==="markdown"?i.src?`[${i.fileName}](${n.doc.buildResourceUrl(i.src,{withToken:!0})})
572
572
  `:`[${i.fileName}]
573
- `:i.src?`[${i.fileName}](${n.doc.buildResourceUrl(i.src,{withToken:!0})})`:`[${i.fileName}]`}const CN={embedType:"office",createEmbedContent:fN,getBlockProperties:gN,convertTo:pN};function AN(n){const e=/(\s|^)(http|https):\/\/[\w\-]+(\.[\w\-]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?$/;return e.test(n)?n.search(e):-1}function bN(n){const e=n.selection.range;if(!e.isCollapsed()||!e.isSimple())return;const{start:t}=e,o=n.getBlockById(t.blockId);if(!$(n,o))return;const r=n.getBlockText(o),s=hd(r).slice(0,t.offset),l=AN(s);if(l===-1)return;const c=s.slice(l),a=s.length;let u=Xi(l,a-l,r,"link",c);return u=Gn(u,a," ",null),n.setBlockText(o,u),n.selection.selectBlock(o,a+1),!0}const vN={Space:bN},yN=w("exclusive-block");function wf(n,e,t,o){var l;e.style.pointerEvents="none",M(e,"block-exclusive");const r=me(n,e),i=(l=r.getBlockProperties)==null?void 0:l.call(r,n,e),{abstract:s}=i||{};e.setAttribute("data-user-name",o),e.setAttribute("data-user-id",t),e.setAttribute("data-exclusive-tips",I.t("exclusive.tips",{editor:o,embedType:s||I.t("exclusive.fallbackAbstract")}))}function E6(n){n.style.pointerEvents="",_(n,"block-exclusive"),n.removeAttribute("data-user-name"),n.removeAttribute("data-user-id"),n.removeAttribute("data-exclusive-tips")}function kN(n,e,t,o,r){yN.debug(`block ${j(e)} ${t?"exclusive":"unexclusive"}, ${o}, ${r}`),t?wf(n,e,o,r):E6(e)}function I6(n){return n.classList.contains("block-exclusive")}function x6(n,e){e.blockIds.forEach(t=>{const o=n.findBlockById(t);o&&kN(n,o,e.exclusive,e.userId,e.displayName)})}class No{constructor(e){h(this,"exclusiveBlockIds",new Set);h(this,"exclusiveBlockTimer",0);h(this,"remoteExclusiveBlockIds",new Map);h(this,"handleUserChanged",e=>{const t=new Set(e.map(r=>r.userId));Array.from(this.remoteExclusiveBlockIds.entries()).forEach(([r,i])=>{if(!t.has(i.userId)){this.remoteExclusiveBlockIds.delete(r);const s={...i,exclusive:!1};x6(this.editor,s)}});const o=Array.from(this.exclusiveBlockIds).map(r=>this.editor.findBlockById(r)).filter(r=>!!r);o.length>0&&this.broadcastExclusiveBlockMessage(o,!0)});this.editor=e,e.doc.registerCallback(this),e.doc.getRemoteUsers().addListener("change",this.handleUserChanged)}destroy(){this.stopExclusiveBlockTimer(),this.editor.doc.unregisterCallback(this),this.editor.doc.getRemoteUsers().addListener("change",this.handleUserChanged)}onCustomMessage(e){if(e.type==="exclusiveBlock"){const t=e;x6(this.editor,t),t.blockIds.forEach(o=>{t.exclusive?this.remoteExclusiveBlockIds.set(o,t):this.remoteExclusiveBlockIds.delete(o)})}}getExclusiveMessage(e){return this.remoteExclusiveBlockIds.get(e)}broadcastExclusiveBlockMessage(e,t){if(this.editor.readonly||e.length===0)return;const o=this.editor.doc.getUser(),r={type:"exclusiveBlock",userId:o.userId,displayName:o.displayName,blockIds:e.map(i=>j(i)),exclusive:t};this.editor.doc.broadcastMessage(r)}exclusiveBlock(e){this.exclusiveBlockIds.has(j(e))||(this.broadcastExclusiveBlockMessage([e],!0),this.exclusiveBlockIds.add(j(e)),this.exclusiveBlockIds.size===1&&this.startExclusiveBlockTimer())}unexclusiveBlock(e){!this.exclusiveBlockIds.has(j(e))||(this.exclusiveBlockIds.delete(j(e)),this.broadcastExclusiveBlockMessage([e],!1),this.exclusiveBlockIds.size===0&&this.stopExclusiveBlockTimer())}startExclusiveBlockTimer(){this.exclusiveBlockTimer=window.setInterval(()=>{Array.from(this.exclusiveBlockIds.keys()).forEach(e=>{this.broadcastExclusiveBlockMessage([this.editor.getBlockById(e)],!0)})},30*1e3)}stopExclusiveBlockTimer(){clearInterval(this.exclusiveBlockTimer),this.exclusiveBlockTimer=0}static get(e){return e.addCustom("exclusiveBlock",()=>new No(e))}static register(e){return this.get(e)}}function T6(n,e){No.get(n).exclusiveBlock(e)}function S6(n,e){No.get(n).unexclusiveBlock(e)}class D6{writable(e,t){if(I6(t))return!1}create(e,t,o,r,i){const s=No.get(e).getExclusiveMessage(i.id);s&&wf(e,r,s.userId,s.displayName)}update(e,t,o,r,i){const s=No.get(e).getExclusiveMessage(i.id);s?wf(e,r,s.userId,s.displayName):E6(r)}}const yq="",wN={exclusive:{tips:"\u300C{editor}\u300D\u6B63\u5728\u7F16\u8F91\uFF0C\u300C{embedType}\u300D\u4E0D\u652F\u6301\u591A\u4EBA\u7F16\u8F91",fallbackAbstract:"\u8BE5 Block"}},BN={exclusive:{tips:"\u300C{editor}\u300Dis editing\uFF0C\u300C{embedType}\u300Ddoes not support multi-person editing",fallbackAbstract:"This Block"}},EN={exclusive:{tips:"\u300C{editor}\u300D\u306F\u7DE8\u96C6\u4E2D\u3067\u3059\u3002\u300C{embedType}\u300D\u306F\u8907\u6570\u4EBA\u3067\u540C\u6642\u7DE8\u96C6\u3067\u304D\u307E\u305B\u3093",fallbackAbstract:"This Block"}};I.mergeLang({"zh-CN":wN,"en-US":BN,"ja-JP":EN});const kq="",IN={version:{latest:"\u5F53\u524D\u7248\u672C",insert:"{name} \u6DFB\u52A0",delete:"{name} \u5220\u9664",goBack:"\u8FD4\u56DE",revertVersion:"\u8FD8\u539F\u5185\u5BB9",play:"\u64AD\u653E\u5386\u53F2\u64CD\u4F5C",versionList:"\u5386\u53F2\u7248\u672C {count}",unknown:"\u672A\u77E5\u7248\u672C",restoreFrom:"\u56DE\u6EDA\u81EA\u7248\u672C {from}",restoreInfo:"\u56DE\u6EDA\u7684\u7248\u672C\u6682\u4E0D\u652F\u6301\u4E0E\u4E0A\u4E00\u7248\u672C\u5BF9\u6BD4",versionInfoLeft:'<span class="text-1">\u5F53\u524D\u7248\u672C: </span><span class="name">{versionName}</span><span class="text-2"> \u4E0E</span>',versionInfoRight:'<span class="text-3">\u5BF9\u6BD4</span>',noSelectedVersion:"\u672A\u9009\u62E9\u7248\u672C",noMemoedVersion:"\u6682\u65E0\u5DF2\u5907\u6CE8\u7684\u5386\u53F2\u7248\u672C",noVersion:"\u6682\u65F6\u5386\u53F2\u7248\u672C"}},xN={version:{latest:"Latest",insert:"Added by {name}",delete:"Deleted by {name}",goBack:"Back",revertVersion:"Revert",play:"Play",versionList:"Historical versions ({count})",unknown:"Unknown version",restoreFrom:"Reverted from {from}",restoreInfo:"The rolled back version does not currently support comparison with the previous version.",versionInfoLeft:'<span class="text-1">\u5F53\u524D\u7248\u672C: </span><span class="name">{versionName}</span><span class="text-2"> \u4E0E</span>',versionInfoRight:'<span class="text-3">\u5BF9\u6BD4</span>',noSelectedVersion:"No version selected",noMemoedVersion:"No version memoed",noVersion:"No version"}};I.mergeLang({"zh-CN":IN,"en-US":xN});var L6=(n=>(n.NEW="history-new",n.NEW_CHILD="history-new-child",n.DELETED="history-deleted",n.UPDATED="history-updated",n.HISTORY="history",n))(L6||{});const vi="--op-color",yi="--op-selected-color",wq="";class TN{constructor(e){h(this,"root");this.content=e;const t=A("div",["editor-dialog-root"],null);t.append(e),this.root=t}show(e=document.body){e.append(this.root)}hide(){this.root.remove()}destroy(){}}function wr(n){var t;let e;if(n.version!==-1){const o=new Date((t=n.created)!=null?t:n.version);e=`${o.toLocaleDateString()} ${o.toLocaleTimeString()}`}else e=I.t("version.latest");return e}function Da(n){return n.source&&typeof n.source=="object"&&!!n.source.restore}const Bq="";class SN{constructor(e,t){h(this,"textArea");h(this,"warning");h(this,"end",!1);h(this,"root");h(this,"handleBlur",()=>{var e,t;this.end||(t=(e=this.options)==null?void 0:e.onend)==null||t.call(e,this.textArea.value,!1)});h(this,"handleKeyDown",e=>{var t,o,r,i;e.isComposing||(e.key==="Enter"||e.key==="Tab"?(e.preventDefault(),(o=(t=this.options)==null?void 0:t.onend)==null||o.call(t,this.textArea.value,!1),this.end=!0):e.key==="Escape"&&(e.preventDefault(),(i=(r=this.options)==null?void 0:r.onend)==null||i.call(r,this.textArea.value,!0),this.end=!0))});h(this,"handleInput",e=>{const t=e.target,{value:o}=t;o.length>this.maxLength-10?this.warning.innerText=`${o.length}/${this.maxLength}`:this.warning.innerText="",this.autoSize()});var o;this.maxLength=e,this.options=t,this.root=A("div",["size-limit-textarea",...(o=t==null?void 0:t.classes)!=null?o:[]],null),this.textArea=A("textarea",["size-limit-textarea-input"],this.root),this.warning=A("div",["size-limit-textarea-warning"],this.root),this.textArea.addEventListener("input",this.handleInput),this.textArea.addEventListener("blur",this.handleBlur),this.textArea.addEventListener("keydown",this.handleKeyDown),this.textArea.maxLength=e}destroy(){this.textArea.removeEventListener("input",this.handleInput),this.textArea.removeEventListener("blur",this.handleBlur),this.textArea.removeEventListener("keydown",this.handleKeyDown)}setValue(e){this.textArea.value=e,this.autoSize()}autoSize(){const e=Math.max(this.textArea.scrollHeight,60);this.textArea.style.height="auto",this.textArea.style.height=`${e}px`}focus(){this.textArea.focus(),this.end=!1}}const Eq="",{t:ll}=I,M6=w("version-list");class DN{constructor(e){h(this,"versionsList");h(this,"versionsListHeader");h(this,"versionFilterToolbar");h(this,"memoInput",null);h(this,"selectedVersion",0);h(this,"handleClickVersionItem",e=>{const t=e.target,o=t.closest(".version-item");if(!this.isVersionElement(o))return;const r=ne(o,"active");if(r&&t.closest(".version-item-memo")){this.editItemMemo(o);return}const i=this.getVersionFromElement(o);if(this.setActiveItem(o),t.closest(".add-memo-button")){this.handleAddMemo(i,o);return}if(t.closest(".revert-button")){this.handleRevert(i,o);return}if(r)return;const{onSelectVersion:s}=this.options;s(i)});h(this,"handleEndEditItemMemo",(e,t)=>{var r;const o=(r=this.memoInput)==null?void 0:r.root.closest(".version-item");if(this.isVersionElement(o)&&(_(o,"editing"),!t)){const i=this.getVersionFromElement(o);i.extra={memo:e},this.options.versionHelper.updateVersionExtra(i.version,i.tagId,i.extra);const s=o.querySelector(".version-item-memo");d(M6,s,"no memo element"),s.textContent=e}setTimeout(()=>{var i;(i=this.memoInput)==null||i.root.remove()})});h(this,"handleRevert",(e,t)=>{const{onRevert:o}=this.options;o(e)});h(this,"handleFilterClick",(e,t)=>{let o=this.options.versions;t.id==="memoed"&&(o=o.filter(i=>{var s;return!!((s=i.extra)!=null&&s.memo)}));const r=this.createVersionItems(o,t.id);this.versionsList.innerHTML="",this.versionsList.append(r)});var u,f;this.options=e;const{versions:t}=e,o=A("div",["version-list-header"],null),r=ll("version.versionList",{count:`${t.length}`});A("span",["version-count"],o,r);const i=A("div",["version-list-filter"],o),s=[{id:"filter",name:"All",dropdown:!0,manualShowChildren:!0,childrenPlacement:"bottom-start",children:[{id:"all",name:"All historical versions"},{id:"memoed",name:"Memoed versions"}]}];this.versionFilterToolbar=new $B(i,s,{tooltipId:"version-viewer"}),this.versionFilterToolbar.addListener("click",this.handleFilterClick),this.selectedVersion=e.selectedVersion||((u=t[0])==null?void 0:u.version)||-1;const l=A("div",["version-list-content"],null),c=this.createVersionItems(t,"all");l.append(c),this.versionsList=l,this.versionsListHeader=o,l.onclick=this.handleClickVersionItem;const a=this.activeVersion;a&&((f=this.options)==null||f.onSelectVersion(a))}createVersionItems(e,t){const o=document.createDocumentFragment();if(e.length===0){const i=A("div",["version-list-empty"],o);return i.textContent=ll(t==="all"?"version.noVersion":"version.noMemoedVersion"),o}const r=(i,s,l,c=!1)=>{var T,E;const a=A("div",["version-item"],o);a.versionData=i,s&&M(a,"child"),i.version===this.selectedVersion&&M(a,"active");const u=A("div",["version-item-title"],a);A("div",["version-item-date"],u,wr(i)),c&&A("div",["version-item-latest"],u,ll("version.latest")),A("div",["spacer"],u);const f=A("div",["version-actions"],u),m=A("button",["add-memo-button"],f),p=A("button",["revert-button"],f);m.textContent="Memo",p.textContent="Revert";let b="";if(typeof i.source=="object"&&((T=i.source)==null?void 0:T.restore)){const R=i.source.restore,L=l.find(V=>V.version==R),P=L?wr(L):ll("version.unknown");b=ll("version.restoreFrom",{from:P})}A("div",["version-item-restore-from"],a,b),A("div",["version-item-memo"],a,((E=i.extra)==null?void 0:E.memo)||"");const k=A("ul",["version-item-authors"],a),v=R=>{const L=A("li",["version-item-author"],k),P=A("span",["version-item-author-mark"],L);P.style.background=this.options.getMarkColor(R),A("span",["version-item-author-name"],L,R.displayName)};if(this.options.useCreatedBy)if(i.createdBy){const R=i.createdBy;v(R)}else i.authors&&i.authors.length>0&&i.authors.forEach(R=>{v(R)});else if(i.authors&&i.authors.length>0)i.authors.forEach(R=>{v(R)});else if(i.createdBy){const R=i.createdBy;v(R)}};return e.forEach((i,s)=>{r(i,!1,e,s===0),i.minorVersions&&i.minorVersions.length>0&&i.minorVersions.forEach(l=>{r(l,!0,e,!1)})}),o}isVersionElement(e){return e?ne(e,"version-item"):!1}getVersionFromElement(e){return e.versionData}get activeVersion(){return this.options.versions.find(e=>e.version===this.selectedVersion)}setActiveItem(e){if(ne(e,"active"))return;const t=this.versionsList.querySelector(".version-item.active");t&&_(t,"active"),M(e,"active"),this.selectedVersion=this.getVersionFromElement(e).version}handleAddMemo(e,t){this.editItemMemo(t)}editItemMemo(e){var o;this.memoInput||(this.memoInput=new SN(256,{onend:this.handleEndEditItemMemo,classes:["memo-input"]}));const t=e.querySelector(".version-item-restore-from");d(M6,t,"no title element"),t.insertAdjacentElement("afterend",this.memoInput.root),M(e,"editing"),this.memoInput.setValue(((o=e.versionData.extra)==null?void 0:o.memo)||""),this.memoInput.focus()}getVersionItemByVersionNum(e){const t=Array.from(this.versionsList.children).find(o=>o.versionData.version===e);return this.isVersionElement(t)?t:null}selectVersionByVersionNum(e){const t=this.getVersionItemByVersionNum(e);return t?(this.setActiveItem(t),this.getVersionFromElement(t)):null}render(e){e.innerHTML="",e.append(this.versionsListHeader,this.versionsList)}destroy(){this.versionsList.onclick=null,this.versionFilterToolbar.destroy()}}class LN{constructor(e,t){this.doc=e,this.user=t}onDeleteBlock(e,t){this.doc.onDeleteBlock(e,t,this.user)}onInsertBlock(e,t,o){this.doc.onInsertBlock(e,t,o,this.user)}onUpdateBlockText(e,t,o){this.doc.onUpdateBlockText(e,t,o,this.user)}onUpdateBlockData(e,t,o){this.doc.onUpdateBlockData(e,t,o,this.user)}onCreateContainer(e,t){this.doc.onCreateContainer(e,t,this.user)}onCreateComment(){}onDeleteComment(){}onDeleteContainer(){}onUpdateComment(){}}async function MN(n,e,t){for(const o of t){const r=new LN(n,o.user);e.parseHistoryData(o,r)}}const vt=w("split-text-actions");function R6(n){return n.length>2?!1:n.length===1?n[0].insert!==void 0:(d(vt,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].insert!==void 0)}function O6(n){return n.length>2?!1:n.length===1?n[0].delete!==void 0:(d(vt,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].delete!==void 0)}function P6(n){return n.length>2?!1:n.length===1?n[0].insert===void 0&&n[0].delete===void 0&&n[0].attributes!==void 0:(d(vt,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].attributes!==void 0)}function RN(n){const e=[],t=Q.default(n);if(t.length===0)return[];if(t.length===1)return[n];if(t.length===2&&(O6(n)||R6(n)||P6(n)))return[n];const o=(i,s)=>i>0?[{retain:i},s]:[s];let r=0;for(;t.length>0;){const i=t[0];if(i.retain!==void 0&&i.attributes===void 0){d(vt,i.retain>0,`invalid text op: ${JSON.stringify(i)}`),d(vt,t.length>1,`invalid text op: ${JSON.stringify(i)}`);const s=t[1];d(vt,s.delete||s.insert!==void 0||s.attributes!==void 0,`invalid next text op: ${JSON.stringify(s)}`),r+=i.retain,e.push(o(r,s)),s.delete!==void 0?r-=s.delete:s.insert!==void 0?r+=s.insert.length:(d(vt,s.attributes!==void 0,`invalid next text op: ${JSON.stringify(s)}`),d(vt,s.retain!==void 0,`invalid next text op: ${JSON.stringify(s)}`),r+=s.retain),t.splice(0,2)}else d(vt,i.delete||i.insert!==void 0||i.attributes!==void 0,`invalid next text op: ${JSON.stringify(i)}`),e.push(o(r,i)),t.shift(),i.retain!==void 0&&(d(vt,i.attributes!==void 0,`invalid next text op: ${JSON.stringify(i)}`),r+=i.retain),i.insert&&(r+=i.insert.length)}return e}function N6(n){if(d(vt,n.length===1||n.length===2,`not a single action op: ${JSON.stringify(n)}`),n.length===1)return 0;const e=n[0].retain;return d(vt,typeof e=="number"&&e>0,`invalid retain: ${JSON.stringify(n)}`),e}let F6=0;function ON(n,e,t){const o=F6;F6+=1;const r=ve(n);return{insert:" ",attributes:{box:!0,id:F(),type:"history-deleted-box",user:t,created:Date.now(),text:r,deletedOffset:e,deletedOrder:o}}}function PN(n,e,t){const o=N6(e),r=e.length===1?e[0].delete:e[1].delete;d(vt,typeof r=="number",`not a delete op: ${JSON.stringify(e)}`);const{left:i,middle:s,right:l}=Ge(n,o,r),c=ON(s,o,t);return[...i,c,...l]}function NN(n,e,t){const o=N6(e),r=e.length===1?e[0].insert:e[1].insert;d(vt,typeof r=="string",`invalid insert op: ${JSON.stringify(e)}`);const i=e.length===1?e[0].attributes:e[1].attributes,l=Ql([{insert:r,attributes:i}],"insertedBy",t);return Gn(n,o,l,null)}function FN(n,e,t){const o=RN(e);let r=n;for(const i of o)O6(i)?r=PN(r,i,t):R6(i)?r=NN(r,i,t):(d(vt,P6(i),`unknown op: ${JSON.stringify(i)}`),r=dt.apply(r,i));return r}const $N=w("history-update-block-text");function $6(n){const e=[],t=[];let o=0;return n.forEach(r=>{var i;if((i=r.attributes)!=null&&i.box){const s=r.attributes;if(s.type==="history-deleted-box"){e.push({boxData:s,offset:o});return}}t.push(r),o+=ld(r)}),e.sort((r,i)=>i.offset-r.offset),{deletedBoxes:e,newText:t}}function _N(n,e,t){let o=n;return e.forEach(r=>{const i=dt.transformCursor(r.offset,t,!1);o=Gn(o,i,[{insert:" ",attributes:r.boxData}],null)}),o}function HN(n){n.sort((e,t)=>e.boxData.deletedOffset!==t.boxData.deletedOffset?e.boxData.deletedOffset-t.boxData.deletedOffset:e.boxData.deletedOrder-t.boxData.deletedOrder)}function jN(n){if(n.length<=1)return n;const e=n[0].offset;n.forEach(t=>{d($N,t.offset===e,`invalid boxes group, ${JSON.stringify(n)}`)}),HN(n);for(let t=n.length-1;t>=1;t--){const o=n[t],r=n[t-1];o.boxData.user.userId===r.boxData.user.userId&&(r.boxData.text+=o.boxData.text,n.splice(t,1))}return n}function zN(n){let{newText:e,deletedBoxes:t}=$6(n);const o=new Map;return t.forEach(i=>{let s=o.get(i.offset);s||(s=[],o.set(i.offset,s)),s.push(i),s.sort((l,c)=>l.boxData.deletedOffset-c.boxData.deletedOffset)}),Array.from(o.values()).sort((i,s)=>s[0].offset-i[0].offset).forEach(i=>{const s=i[0].offset;jN(i).reverse().forEach(l=>{e=Gn(e,s,[{insert:" ",attributes:l.boxData}],null)})}),e}function UN(n,e,t){let{newText:o,deletedBoxes:r}=$6(n);return o=FN(o,e,t),o=_N(o,r,e),o=zN(o),o}const Pn=w("history-doc");function Nn(n){d(Pn,!1,"no local actions for history doc")}class VN extends Hi{constructor(e,t){super(),this.externalDoc=e,this.docObject=t}beginBatchUpdate(){return 0}endBatchUpdate(){return 0}toJSON(){return Q.default(this.docObject)}getContainerBlocks(e){return this.docObject.blocks[e]}getBlockData(e,t){const o=this.getContainerBlocks(e);d(Pn,o,`no container data: ${e}`);const r=o[t];return d(Pn,r,`no block data: ${t}`),r}localUpdateBlockText(){Nn()}localUpdateBlockData(){Nn()}localInsertBlock(){Nn()}localDeleteBlock(){Nn()}localInsertChildContainer(){Nn()}localDeleteChildContainers(){Nn()}uploadResource(){Nn()}async addResources(e){Nn()}getServerMeta(){var e,t,o;return(o=(t=(e=this.externalDoc).getServerMeta)==null?void 0:t.call(e))!=null?o:{}}buildResourceUrl(e){return this.externalDoc.buildResourceUrl(e)}request(){Nn()}broadcastMessage(){Nn()}getUser(){return{permission:"w",userId:"-",displayName:"-",avatarUrl:"-",rainbowIndex:0}}getRemoteUsers(){return new bc}destroy(){this.clearCallbacks()}transformBlockIndex(e,t,o){const r=this.docObject.blocks[e];d(Pn,r,`no container blocks: ${e}`);let i=0;for(let s=0;s<r.length;s++)if(!r[s].deletedBy){if(i===t)return s;i++}return o&&d(Pn,!1,`invalid block index: ${t}, blocks: ${JSON.stringify(r)}`),d(Pn,i===t,`invalid block index: ${t}, blocks: ${JSON.stringify(r)}`),r.length}onDeleteBlock(e,t,o){const r=this.transformBlockIndex(e,t,!0),s=this.docObject.blocks[e][r];d(Pn,!s.deleted,`block has already deleted: ${e}/${t}`),s.deletedBy=o,this.callbacks.forEach(l=>{var c;return(c=l.onUpdateBlockData)==null?void 0:c.call(l,e,r,{insert:{},delete:[]},!0)})}onInsertBlock(e,t,o,r){const i=this.transformBlockIndex(e,t,!1),s=this.docObject.blocks[e],l=Q.default(o);l.insertedBy=r,s.splice(i,0,l),this.callbacks.forEach(c=>{var a;return(a=c.onInsertBlock)==null?void 0:a.call(c,e,i,l,!0)})}onUpdateBlockText(e,t,o,r){const i=this.transformBlockIndex(e,t,!0),l=this.docObject.blocks[e][i];d(Pn,!l.deleted,`block has already deleted: ${e}/${t}`);const c=l.text;d(Pn,c,`no text for block: ${JSON.stringify(l)}`);const a=UN(c,o,r);l.text=a,this.callbacks.forEach(u=>{var f;return(f=u.onUpdateBlockText)==null?void 0:f.call(u,e,t,o,!0)})}onUpdateBlockData(e,t,o,r){const i=this.transformBlockIndex(e,t,!0),s=this.docObject.blocks[e],l=s[i];d(Pn,!l.deleted,`block has already deleted: ${e}/${t}`);const c=Q.default(l);c.updatedBy=r,o.delete.forEach(a=>delete c[a]),Object.entries(o.insert).forEach(([a,u])=>{c[a]=u}),s[i]=c,this.callbacks.forEach(a=>{var u;return(u=a.onUpdateBlockData)==null?void 0:u.call(a,e,i,o,!0)})}onCreateContainer(e,t,o){this.docObject.blocks[e]=Q.default(t),this.callbacks.forEach(r=>{var i;return(i=r.onInsertChildContainer)==null?void 0:i.call(r,e,t,!0)})}}const{t:_6}=I;function ki(n,e){return e==="insert"?_6("version.insert",{name:n.displayName}):_6("version.delete",{name:n.displayName})}function Br(n,e){const{userId:t}=e;return["flag","selection"].reduce((r,i)=>{const s=n.getRemoteUsers().getFixedUserColor(t,i);return r[i]=s,r},{})}class qN{renderText(e,t,o){if(!o.box&&o.insertedBy){const r=o.insertedBy,{flag:i,selection:s}=Br(e.doc,o.insertedBy);return{classes:["history-inserted-text"],attributes:{"history-inserted-by":r.displayName,"data-op-description":ki(r,"insert")},styles:{[vi]:i,[yi]:s}}}return{}}renderBlock(e,t,o){if(o.deletedBy){const r=o.deletedBy,{flag:i,selection:s}=Br(e.doc,r);return{classes:["history-deleted-block"],attributes:{"history-deleted-by":r.displayName,"data-op-description":ki(r,"delete")},styles:{[vi]:i,[yi]:s}}}if(o.insertedBy){const r=o.insertedBy,{flag:i,selection:s}=Br(e.doc,r);return{classes:["history-inserted-block"],attributes:{"history-inserted-by":r.displayName,"data-op-description":ki(r,"insert")},styles:{[vi]:i,[yi]:s}}}return{}}updateBlock(e,t,o,r){if(r.deletedBy){const i=r.deletedBy,{flag:s,selection:l}=Br(e.doc,i);M(o,"history-deleted-block"),mu(o,{"history-inserted-by":i.displayName,"data-op-description":ki(i,"delete")}),gu(o,{[vi]:s,[yi]:l});return}if(r.insertedBy){const i=r.insertedBy,{flag:s,selection:l}=Br(e.doc,i);M(o,"history-inserted-block"),mu(o,{"history-inserted-by":i.displayName,"data-op-description":ki(i,"insert")}),gu(o,{[vi]:s,[yi]:l})}}}const H6=w("history-deleted-box");function WN(n,e,t,o){const r=o;d(H6,r.text,`no text for text box data: ${JSON.stringify(o)}`),d(H6,typeof r.text=="string",`invalid text type for text box data: ${JSON.stringify(o)}`);const i=A("span",["history-deleted-box"],t,r.text),s=r.user,{flag:l,selection:c}=Br(n.doc,s);i.setAttribute("history-deleted-by",s.displayName),i.setAttribute("data-op-description",ki(s,"delete")),i.style.setProperty(vi,l),i.style.setProperty(yi,c)}function GN(n,e,t,o){return e.text}const ZN={boxType:"history-deleted-box",updateBoxContent:WN,convertTo:GN},Iq="",QN=w("versions-dropdown");class YN{constructor(e,t){h(this,"dropdown");h(this,"versions",[]);h(this,"currentVersion",null);h(this,"compareWithVersion",null);h(this,"filterMemoed",!1);h(this,"createFilterMemoedFilterItem",e=>{const t=A("div",["filter-memoed-version-item"],null);e&&A("div",["filter-item-info"],t,"\u6240\u6709\u53EF\u5BF9\u6BD4\u7684\u5386\u53F2\u7248\u672C");const o=A("div",["filter-item-input-container"],t),r=A("input",["filter-item-input"],o);r.id="filter-item-input",r.type="checkbox";const i=A("label",["filter-item-label"],o,"\u7B5B\u9009\u5DF2\u5907\u6CE8\u7684\u7248\u672C");return i.htmlFor=r.id,r.onchange=this.handleInputChange,r.checked=this.filterMemoed,t});h(this,"filterItems",(e,t)=>{var i,s;if(e.id==="filter-separator"||e.id==="last-version"||!t)return!0;const o=t.toLocaleLowerCase();if(e.name.toLocaleLowerCase().indexOf(o)!==-1)return!0;const r=e.data;return!!(r&&((i=r.extra)==null?void 0:i.memo)&&((s=r.extra)==null?void 0:s.memo.toLocaleLowerCase().indexOf(o))!==-1)});h(this,"handleClose",()=>{});h(this,"handleClear",()=>{this.options.onCompareWithVersion(null)});h(this,"handleClickItem",e=>{const t=e.data,o=wr(t);this.dropdown.setText(o),this.options.onCompareWithVersion(t)});h(this,"handleInputChange",e=>{const t=e.target;this.filterMemoed=t.checked,this.resetItems()});this.options=t,this.dropdown=new Sh(e,{placeholder:I.t("version.noSelectedVersion"),popupId:"versions-dropdown-popup",header:this.createHeader(),filter:this.filterItems,onClose:this.handleClose,onClickItem:this.handleClickItem,onClear:this.handleClear})}createHeader(){const e=A("div",["versions-dropdown-header"],null),t=A("div",["versions-dropdown-header-info"],e);t.innerHTML="\u4EC5\u5C55\u793A\u53EF\u4E0E\u5F53\u524D\u7248\u672C\u8FDB\u884C\u5BF9\u6BD4\u7684\u5386\u53F2\u7248\u672C";const o=A("div",["versions-dropdown-header-icon"],e);return o.innerHTML=I5,o.onclick=this.options.onHelp,e}setVersions(e){this.versions=e}setCurrentVersion(e,t){this.dropdown.setText(""),this.dropdown.setLabels([]),t&&(this.dropdown.setText(wr(t)),(t.version===-1||t.version===this.versions[0].version)&&this.dropdown.setLabels(["\u6700\u65B0"])),this.currentVersion=e,this.compareWithVersion=t!=null?t:null,this.resetItems()}resetItems(){var f;if(this.versions.length===0)return;const e=this.currentVersion;if(!e)return;const t=e.version===-1?0:this.versions.findIndex(m=>m.version===e.version);d(QN,t!==-1,"version not found");const o=this.versions[0],r=m=>{var T;const p=m.data,b=A("div",["version-item-container"],null),k=A("div",["version-item-line1"],b),v=m.id==="last-version"?"\u4E0A\u4E00\u7248\u672C":wr(p);if(A("div",["version-item-name"],k,v),p.version===o.version&&A("div",["version-item-latest"],k,"\u6700\u65B0"),(T=p.extra)!=null&&T.memo){const E=A("div",["version-item-line2"],b);A("div",["version-item-memo"],E,p.extra.memo)}return b.onclick=()=>{this.handleClickItem(m),this.dropdown.close()},b},i=[],s=this.versions[t+1];if(s&&!Da(e)){const m={id:"last-version",name:"Last version",data:s,element:r};i.push(m)}const l={id:"filter-separator",name:"",element:this.createFilterMemoedFilterItem(i.length>0),states:["disabled"]};i.push(l);let c=t;for(let m=t-1;m>=0;m-=1){const p=this.versions[m];if(Da(p))break;c=m}let a=t;if(!Da(e))for(let m=t+1;m<this.versions.length;m+=1){const p=this.versions[m];if(a=m,Da(p))break}let u=!1;for(let m=c;m<=a;m+=1){const p=this.versions[m];if(p.version!==e.version&&p.version!==(s==null?void 0:s.version)&&(!this.filterMemoed||((f=p.extra)==null?void 0:f.memo))){u=!0;let b=wr(p),k=`${p.version}`;m===t+1&&(b="Previous version",k="prev-version");const v={id:k,name:b,data:p,element:r};i.push(v)}}if(!u){const m=this.filterMemoed?"\u6CA1\u6709\u5305\u542B\u5907\u6CE8\u7684\u7248\u672C":"\u6CA1\u6709\u53EF\u5BF9\u6BD4\u7684\u7248\u672C",p={id:"no-versions",name:"No versions",states:["disabled"],element:A("div",["version-item-empty"],null,m)};i.push(p)}this.dropdown.updateItems(i)}}class JN{constructor(e,t){h(this,"left");h(this,"right");h(this,"dropdown");const o=A("div",["version-info-container"],e);this.left=A("div",["version-info-left"],o),this.dropdown=new YN(o,t),this.right=A("div",["version-info-right"],o)}setVersion(e,t){const o=wr(e);this.left.innerHTML=I.t("version.versionInfoLeft",{versionName:o}),this.right.innerHTML=I.t("version.versionInfoRight",{versionName:o}),this.dropdown.setCurrentVersion(e,t)}}const Fo=w("version-dialog");class j6{constructor(e,t){h(this,"dialog",null);h(this,"oldViewer",null);h(this,"versionOptions");h(this,"versionList",null);h(this,"provider");h(this,"components");h(this,"handleRevert",async e=>{var o,r;d(Fo,this.versionList,"The versionList did not render");const t=e!=null?e:(o=this.versionList)==null?void 0:o.activeVersion;d(Fo,t,`The version: ${t} is invalid`),await this.versionHelper.revertVersion(t.version),(r=this.dialog)==null||r.hide()});h(this,"handleSelectVersion",e=>{d(Fo,e,`The version: ${e} is invalid`),this.viewVersion(e)});h(this,"handleCompareWithVersion",e=>{var o;const t=(o=this.versionList)==null?void 0:o.activeVersion;d(Fo,t,"no active version"),this.viewVersion(t,e!=null?e:void 0)});h(this,"handleHelp",()=>{var e,t;(t=(e=this.versionOptions)==null?void 0:e.onHelp)==null||t.call(e)});h(this,"viewVersion",async(e,t)=>{var a,u;if(this.components.infoHeader.setVersion(e,t),this.oldViewer&&(this.oldViewer.destroy(),this.oldViewer=null),!this.versionList)return;(a=this.versionOptions)!=null&&a.onWillChangeVersion&&this.versionOptions.onWillChangeVersion(this,e);const o=t==null?void 0:t.version;let r,i;if(o){const f=Math.min(e.version,o),m=Math.max(e.version,o),p=await this.versionHelper.getHistoryData(m,f);r=p.doc,i=p.historyData}else r=await this.versionHelper.getVersion(e.version),i=[];const{editorContainer:s}=this.components;s.innerHTML="";const l=new VN(this.doc,r),c=this.provider.createHistoryEditor(s,l);c.editorBlockRenders.registerRender(new qN),c.editorBoxes.registerBoxClass(ZN),M(c.rootElement,L6.HISTORY);try{await MN(l,this.versionHelper,i)}finally{this.oldViewer=c}(u=this.versionOptions)!=null&&u.onVersionChanged&&this.versionOptions.onVersionChanged(this,c,e)});this.doc=e,this.provider=t;const o=A("div",["version-dialog"],null),r=A("div",["version-viewer"],o),i=new JN(r,{onCompareWithVersion:this.handleCompareWithVersion,onHelp:this.handleHelp}),s=A("div",["version-dialog-editor"],r),l=A("div",["version-list-root"],o);this.components={root:o,editorContainer:s,listContainer:l,infoHeader:i}}get versionHelper(){d(Fo,this.doc.getVersionHelper,"Can not get getVersionHelper from doc");const e=this.doc.getVersionHelper();return d(Fo,e,"current doc does not support version"),e}renderContent(e){var r;const{listContainer:t}=this.components;t.innerHTML="";const o=new DN({versions:e,versionHelper:this.versionHelper,useCreatedBy:(r=this.versionOptions)==null?void 0:r.useCreatedBy,onSelectVersion:this.handleSelectVersion,onRevert:this.handleRevert,getMarkColor:i=>{const{flag:s}=Br(this.doc,i);return s}});o.render(t),this.versionList=o}initViewVersion(){var e;if(d(Fo,this.versionList,"no versionList"),(e=this.versionOptions)!=null&&e.initSelectedVersion){const{initSelectedVersion:t}=this.versionOptions,o=this.versionList.selectVersionByVersionNum(t);d(Fo,o,`version ${t} not found`),this.viewVersion(o)}else{const t=this.versionList.activeVersion;t&&this.viewVersion(t)}}async show(e){this.versionOptions={...this.versionOptions,...e};const t=await this.versionHelper.getVersions();if(this.versionOptions.onVersionsLoaded&&this.versionOptions.onVersionsLoaded(this,t),this.components.infoHeader.dropdown.setVersions(t),this.renderContent(t),this.initViewVersion(),!this.dialog){const{root:o}=this.components;this.dialog=new TN(o)}this.dialog.show(e.container)}destroy(){var e,t;(e=this.dialog)==null||e.destroy(),(t=this.versionList)==null||t.destroy()}}const xq="",KN=w("heading-collapse");function Bf(n){var t;const e=Number.parseInt((t=n.getAttribute("data-style-heading"))!=null?t:"",10);return d(KN,e,"not a heading block"),e}function qt(n){return!!n.getAttribute("data-style-heading")}function XN(n){return!ne(n,"heading-collapsed")}function Er(n){return ne(n,"heading-collapsed")}function z6(n){if(ye(n))return!1;const t=H(n);return Ae(t)}const eF=w("heading-collapse");function Ef(n){d(eF,qt(n),"not a heading block");const e=[],t=Bf(n);let o=fe(n);for(;o&&!(qt(o)&&Bf(o)<=t);)e.push(o),o=fe(o);return e}function U6(n,e){if(!Pt(e))return;n.selection.selectBlock(e,0),Ef(e).forEach(o=>{og(o)}),M(e,"heading-collapsed")}function wi(n,e){Ef(e).forEach(o=>{rg(o)}),_(e,"heading-collapsed")}function tF(n,e){XN(e)?U6(n,e):wi(n,e)}const nF=[Ah,bh,vh,yh,kh,wh,Bh,Eh];function oF(n){const e=A("button",["heading-collapse-button"],null);return e.setAttribute(`data-editor-tooltip-${n.clientId}`,"Collapse / Expand"),e.innerHTML=Dc,e}function V6(n){return fa(n).querySelector("button.heading-collapse-button")}function q6(n,e){V6(e)||z6(e)||!Pt(e)||G1(e,oF(n),-1)}function rF(n){var e;(e=V6(n))==null||e.remove()}function W6(n,e){fa(e).querySelector("button.heading-collapse-button")||q6(n,e)}function iF(n){const e=Bf(n),t=A("button",["heading-marker"],null);return t.innerHTML=nF[e-1],t}function G6(n){return fa(n).querySelector("button.heading-marker")}function If(n){G6(n)||z6(n)||!Pt(n)||G1(n,iF(n),1)}function Z6(n){const e=G6(n);e==null||e.remove()}function Q6(n){Z6(n),qt(n)&&If(n)}class sF{handleDrop(e,t,o,r){if(Ol(t)||!qt(t)||!Er(t))return;const i=Ef(t);i.unshift(t);const s=i.reverse();let l=null;return e.doc.beginBatchUpdate(),s.forEach((c,a,u)=>{const f=e.getBlockData(c),m=yo(e.editorBlocks,e.doc.toJSON(),f),p=e.insertDocAt(o,r,m)[0];a===u.length-1&&(l=p)}),e.doc.endBatchUpdate(),e.doc.beginBatchUpdate(),s.forEach(c=>{e.deleteBlock(c)}),e.doc.endBatchUpdate(),l&&U6(e,l),!0}}const lF=w("heading-collapse");class Y6{constructor(e){h(this,"handleLoad",()=>{this.showCollapseButtons()});h(this,"handleHoverBlock",(e,t)=>{t&&(_(t,"hovering-heading"),qt(t)&&Ae(H(t))&&(If(t),Er(t)||rF(t))),e&&qt(e)&&Ae(H(e))&&(M(e,"hovering-heading"),this.editor.readonly||Z6(e),q6(this.editor,e))});h(this,"handleClick",(e,t)=>{const o=Lr(t,"button.heading-collapse-button");if(!o)return;const r=z(o);!r||(d(lF,qt(r),"not a heading block"),tF(this.editor,r),W6(this.editor,r))});this.editor=e,e.addListener("load",this.handleLoad),e.addListener("click",this.handleClick),De.get(e).addListener("change",this.handleHoverBlock),this.showCollapseButtons(),setTimeout(()=>{var o;(o=el.find(e))==null||o.addHandler(new sF)})}showCollapseButtons(){const e=Me(this.editor.rootContainer).filter(qt);e.length!==0&&(e[0]===_e(this.editor.rootContainer)&&e.splice(0,1),e.forEach(If))}destroy(){this.editor.removeListener("load",this.handleLoad),this.editor.removeListener("click",this.handleClick)}}function La(n){const e=n.selection.range;if(e.isCollapsed()||e.start.blockId===e.end.blockId)return;const t=n.getBlockById(e.start.blockId),o=n.getBlockById(e.end.blockId);Er(t)&&wi(n,t),Er(o)&&wi(n,o)}function cF(n){La(n);const e=n.getFocusedBlock();!qt(e)||Er(e)&&wi(n,e)}function aF(n){La(n);const e=n.getFocusedBlock();if(!qt(e))return;const t=n.selection.range.focus;!t.isSimple()||t.offset===G(n,e)&&Er(e)&&wi(n,e)}function uF(n){La(n);const e=n.getFocusedBlock();if(!qt(e))return;const t=n.selection.range.focus;!t.isSimple()||t.offset===0&&Er(e)&&wi(n,e)}class dF{handleBeforeKeyDown(e,t){return yu(t.key)&&La(e),t.key==="Enter"?(cF(e),!1):t.key==="Delete"?(aF(e),!1):(t.key==="Backspace"&&uF(e),!1)}}class hF{constructor(e){this.editor=e}onInsertBlock(e,t,o,r){this.updateBlockIfNeeded(o.id)}onUpdateBlockData(e,t,o,r){const i=this.editor.doc.getBlockData(e,t);this.updateBlockIfNeeded(i.id,o)}updateBlockIfNeeded(e,t){setTimeout(()=>{const o=this.editor.findBlockById(e);if(!!o){if(!qt(o)){t&&t.delete.includes("heading")&&Q6(o);return}ne(o,"hovering-heading")&&W6(this.editor,o),Q6(o)}},100)}}function fF(n){return!!n.heading}function J6(n){var t;const e=n.heading;return(t=Number.parseInt(`${e}`,10))!=null?t:1}function K6(n,e){var t;return{parentNode:e,children:[],text:ve((t=n.text)!=null?t:[]),level:J6(n),block:n}}class cl{constructor(){h(this,"nodes",[])}appendBlock(e){const t=this.findParent(J6(e),this.nodes);t?t.children.push(K6(e,t)):this.nodes.push(K6(e,null))}findParent(e,t){const o=t[t.length-1];if(!o||e<=1)return null;if(o.level===e-1)return o;const r=this.findParent(e,o.children);return r||(o.level<e?o:null)}static buildToc(e){const t=new cl,o=e.blocks.root;for(let r=0;r<o.length;r++){const i=o[r];fF(i)&&t.appendBlock(i)}return t}}class Ir extends Ve.TypedEmitter{constructor(t){super();h(this,"toc",new cl);h(this,"updateToc",nt.default(()=>{this.updateTocNow()},500));this.editor=t,t.doc.registerCallback(this),this.updateToc()}destroy(){this.editor.doc.unregisterCallback(this)}isHeadingBlock(t){return!!t.heading}onInsertBlock(t,o,r,i){t==="root"&&this.isHeadingBlock(r)&&this.updateToc()}onDeleteBlock(t,o,r){t==="root"&&this.updateToc()}onUpdateBlockText(t,o,r,i){if(t!=="root")return;const s=this.editor.doc.getBlockData(t,o);this.isHeadingBlock(s)&&this.updateToc()}onUpdateBlockData(t,o,r,i){if(t!=="root")return;const s=this.editor.doc.getBlockData(t,o);this.isHeadingBlock(s)&&this.updateToc()}static register(t){return t.addCustom("editor-toc",()=>new Ir(t))}static get(t){return t.getCustom("editor-toc")}updateTocNow(){this.toc=cl.buildToc(this.editor.doc.toJSON()),this.emit("change",this.editor,this.toc)}}const Tq="";function mF(n){return n.nodes.length===0?!0:n.nodes.length>1?!1:n.nodes[0].children.length===0}function X6(n,e){e.forEach(t=>{const o=A("div",["toc-node"],n),r=A("div",["toc-title"],o);if(A("span",["toc-text"],r,t.text).setAttribute("data-block-id",t.block.id),t.children.length>0){const s=A("div",["toc-children"],o);X6(s,t.children)}})}function gF(n,e){const t=Lr(e,".toc-text");if(!t)return;const o=t.getAttribute("data-block-id");if(!o)return;const r=n.findBlockById(o);!r||(e.preventDefault(),e.stopPropagation(),n.selection.selectBlock(r,0))}function e9(n,e,t){if(_(e,"loading"),e.innerHTML="",mF(t)){A("div",["toc-empty-message"],e,I.t("toc.empty"));return}if(t.nodes.length>=1){const[o,...r]=t.nodes,i=[...o.children,...r];X6(e,i)}Xd(n,"toc-click-handler",()=>{n.addListener("click",gF)})}class pF{constructor(e){h(this,"handleUpdateToc",(e,t)=>{Array.from(e.rootContainer.querySelectorAll('.embed-block[data-type="editor-block"][data-embed-type="toc"]')).forEach(r=>{const i=r.querySelector(".editor-toc-container");i&&e9(e,i,t)})});this.editor=e,Ir.register(e).addListener("change",this.handleUpdateToc)}destroy(){Ir.register(this.editor).removeListener("change",this.handleUpdateToc)}get toc(){return Ir.register(this.editor).toc}}function CF(n,e){const t=A("div",["editor-toc-container"],e),r=n.addCustom("init-editor-toc",()=>new pF(n)).toc;r.nodes.length===0?M(t,"loading"):e9(n,t,r)}function AF(n,e,t,o){return o==="markdown"?"[toc]":""}function bF(n,e,t){const{data:o}=t;if(!o||o.embedType!=="toc"||!$(n,e))return null;const r={};return{blockData:{id:F(),type:"embed",embedType:"toc",embedData:r}}}const t9={embedType:"toc",createEmbedContent:CF,convertTo:AF,convertFrom:bF},vF={toc:{empty:"No Toc"}},yF={toc:{empty:"No Toc"}};I.mergeLang({"zh-CN":vF,"en-US":yF});function kF(n){return!!n.getAttribute("data-style-heading")}function xf(n,e){return kF(e)&&G(n,e)>0}function wF(n){const e=bn(n.rootElement);let t=0,o=0,r=0;if(e===document.documentElement){const i=n.rootContainer.getBoundingClientRect();t=i.left+i.width/2,o=10,r=e.offsetHeight}else{const i=e.getBoundingClientRect();t=i.left+i.width/2,o=i.top+10,r=i.bottom}for(;o<r;){const i=document.elementsFromPoint(t,o);for(let s=0;s<i.length;s++){const l=z(i[s]);if(l&&n.rootContainer.contains(l))return l}o+=10}return null}function Tf(n,e){let t=e;for(;t&&!xf(n,t);)t=fe(t);return t}function n9(n){if(ye(n))return!1;const t=H(n);return Ae(t)}function Ma(n,e){let t=e;for(;t&&!xf(n,t);)t=ye(t),t&&n9(t)&&(t=null);return t}const BF=.3;class EF extends Ve.TypedEmitter{constructor(t){super();h(this,"scrollContainer");h(this,"scrollEventTarget");h(this,"scrollStatus",{curHeadingBlock:null,previousHeadingBlock:null,nextHeadingBlock:null});h(this,"handleScroll",nt.default(()=>{const t={curHeadingBlock:null,previousHeadingBlock:null,nextHeadingBlock:null};let o=wF(this.editor);if(o&&(o=_u(o)),!o||!this.scrollContainer){this.setStatus(t);return}if(n9(o)&&(o=fe(o)),!o){this.setStatus(t);return}if(xf(this.editor,o)){t.curHeadingBlock=o,t.previousHeadingBlock=Ma(this.editor,o),t.nextHeadingBlock=Tf(this.editor,o),this.setStatus(t);return}const r=this.scrollContainer.getBoundingClientRect(),i=Tf(this.editor,o);if(i){const l=i.getBoundingClientRect();if(l.top>r.top&&l.top<r.top+r.height*BF){t.curHeadingBlock=i,t.previousHeadingBlock=Ma(this.editor,i),t.nextHeadingBlock=Tf(this.editor,i),this.setStatus(t);return}t.nextHeadingBlock=i}const s=Ma(this.editor,o);s&&(t.curHeadingBlock=s,t.previousHeadingBlock=Ma(this.editor,s)),this.setStatus(t)},200));this.editor=t,setTimeout(()=>{this.start()},50)}setStatus(t){this.scrollStatus.previousHeadingBlock===t.previousHeadingBlock&&this.scrollStatus.nextHeadingBlock===t.nextHeadingBlock&&this.scrollStatus.previousHeadingBlock===t.previousHeadingBlock||(this.scrollStatus=t,this.emit("change",this.editor,t))}start(){this.stop(),this.scrollContainer=bn(this.editor.rootElement),this.scrollEventTarget=this.scrollContainer===document.documentElement?document:this.scrollContainer,this.scrollEventTarget.addEventListener("scroll",this.handleScroll),this.handleScroll()}stop(){this.scrollEventTarget&&this.scrollEventTarget.removeEventListener("scroll",this.handleScroll)}destroy(){this.stop(),this.scrollEventTarget=void 0}}class Sf{constructor(e,t){h(this,"suggest");h(this,"onShow",(e,t,o,r)=>{const i=this.editor.getBlockByIndex(t,o);if(!Pt(i)){const s=z(H(i));if(s&&se(s)==="code")return!1}return!0});h(this,"onClickItem",(e,t,o)=>{const r=t.data,i={id:F(),type:"mention",box:!0,created:Date.now(),iconUrl:r.avatarUrl,text:r.displayName,mentionId:r.userId},s=this.editor.selection.range;if(!s.isCollapsed()||!s.isSimple())return;const l=s.focus,c=this.editor.getBlockById(l.blockId);this.editor.insertBoxToBlock(c,l.offset,i)});h(this,"queryItems",async(e,t)=>(await this.options.queryUsers(this.editor,t)).map(i=>({id:i.userId,name:i.displayName,icon:`<img src="${i.avatarUrl}" class="mention-user-avatar">`,element:i.element,data:i,subText:i.email})));this.editor=e,this.options=t,this.suggest=new Oh(e,{id:"editor-mention",trigger:["@"],autoDeleteTrigger:!0,showLoading:!0,enableFirstBlock:t.enableFirstBlock,onShow:this.onShow,onClickItem:this.onClickItem,queryItems:this.queryItems})}destroy(){}}w("mathjax-box");function IF(n,e,t,o){const r=o,i=A("a",["mention-container"],t);A("span",["mention-name"],i,`@${r.text}`),i.setAttribute("data-mention-id",r.mentionId)}function xF(n,e,t){}function TF(n,e,t,o){return`@${e.text}`}const Df={boxType:"mention",updateBoxContent:IF,handleClickBox:xF,convertTo:TF};function SF(n){const e=A("div",["mention-button-wrap"],null),t=Io("mention-button",I.t("list.mention.tooltip"),RB,[],n.clientId);return e.appendChild(t),e}class DF{constructor(e){h(this,"mentionButton");h(this,"handleHoveringBlock",e=>{var t;!this.editor.isWritable()||(e&&this.shouldBlockShowMention(e)?Ne(e).appendChild(this.mentionButton):(t=this.mentionButton)==null||t.remove())});h(this,"handleMouseDown",(e,t)=>{t.preventDefault(),t.stopPropagation();const o=z(this.mentionButton);if(!o||!$(e,o))return;const r=e.selection.range.focus;if(!r.isSimple())return;let i;e.selection.focusedBlock!==o?i=G(e,o):i=r.offset,setTimeout(()=>{const s=e.insertTextToBlock(o,i,"@");i+=1;const l=ve(kt(s,i).left);this.editor.selection.selectBlock(o,i),this.editor.focus(),e.getCustom("mention").suggest.popup(o,i,l,"@")})});h(this,"destroy",()=>{De.get(this.editor).removeListener("change",this.handleHoveringBlock)});this.editor=e,this.mentionButton=SF(e),De.get(this.editor).addListener("change",this.handleHoveringBlock),e.domEvents.addEventListener(this.mentionButton,"mousedown",this.handleMouseDown)}shouldBlockShowMention(e){if(!$(this.editor,e)||!ue(e))return!1;const t=Ot(e);return!(t==="ordered"||t==="unordered")}}const Sq="",LF={templates:{title:"\u9009\u62E9\u6A21\u677F\uFF0C\u5FEB\u901F\u521B\u5EFA",create:"\u65B0\u5EFA\u6A21\u677F",choose:"\u5168\u90E8\u6A21\u677F",customizedMark:"\u81EA\u5B9A\u4E49"}},MF={templates:{title:"Choose a template",create:"New template",choose:"All templates",customizedMark:"Custom"}};I.mergeLang({"zh-CN":LF,"en-US":MF});const Dq="",RF="data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjEyMCIgaGVpZ2h0PSIxMjAiIHZpZXdCb3g9IjAgMCAxMjAgMTIwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTQ4IDU5QzQ4IDU0LjU4MTcgNTEuNTgxNyA1MSA1NiA1MUg5M0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xwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTAuMDMxOCAxODkuOTU4Qzg4LjM5MjYgMTg5Ljk1OCA4Ny4wNjM3IDE5MS4yODYgODcuMDYzNyAxOTIuOTI2Qzg3LjA2MzcgMTk0LjU2NSA4OC4zOTI2IDE5NS44OTQgOTAuMDMxOCAxOTUuODk0SDk1Ljk2OEM5Ny42MDcyIDE5NS44OTQgOTguOTM2MSAxOTQuNTY1IDk4LjkzNjEgMTkyLjkyNkM5OC45MzYxIDE5MS4yODYgOTcuNjA3MiAxODkuOTU4IDk1Ljk2OCAxODkuOTU4SDkwLjAzMThaTTkwLjAzMTkgMjEzLjcwMkM4OC4zOTI3IDIxMy43MDIgODcuMDYzOCAyMTUuMDMxIDg3LjA2MzggMjE2LjY3Qzg3LjA2MzggMjE4LjMwOSA4OC4zOTI3IDIxOS42MzggOTAuMDMxOSAyMTkuNjM4SDk1Ljk2ODFDOTcuNjA3MyAyMTkuNjM4IDk4LjkzNjIgMjE4LjMwOSA5OC45MzYyIDIxNi42N0M5OC45MzYyIDIxNS4wMzEgOTcuNjA3MyAyMTMuNzAyIDk1Ljk2ODEgMjEzLjcwMkg5MC4wMzE5WiIgZmlsbD0iIzkxRDlCRSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzEyNTZfMzcxNjgiPgo8cmVjdCB3aWR0aD0iMzcyIiBoZWlnaHQ9IjI3OSIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",o9=w("templates");function Lf(n){const e=n.rootElement.querySelector(":scope .editor-templates");if(!e)return null;const t=e.querySelector(":scope .editor-templates-cards");return d(o9,t,"no card container"),{root:e,cardContainer:t}}function PF(n){const e=Lf(n);if(e)return e.cardContainer.innerHTML="",e;const t=A("div",["editor-templates"],n.rootElement);A("div",["editor-templates-title"],t,I.t("templates.title"));const o=A("div",["editor-templates-cards"],t);return{root:t,cardContainer:o}}function r9(n,e,t,o,r){var f;const i=(f=n.options.componentsOptions)==null?void 0:f.templates,s=A("div",["editor-template-card",...o],null),l=A("div",["editor-template-thumb-container"],s),c=A("img",["editor-template-thumb"],l);c.src=e,c.style.display="none",c.onerror=()=>{var p;const m=(p=i==null?void 0:i.placeHolderImageSrc)!=null?p:OF;c.src!==m&&(c.src=m)},c.onload=()=>{c.style.display=""};const a=A("div",["editor-template-name"],s),u=A("span",[],a,t);return i!=null&&i.showTemplateTitleAttr&&u.setAttribute("title",t),s.onclick=()=>r(s),s}function NF(n,e){return e.thumbnailUrl?e.thumbnailUrl:n.doc.buildResourceUrl("thumbnail.png")}function FF(n,e){const t=NF(n,e);return r9(n,t,e.name,[],async()=>{var r,i;const o=(r=n.options.componentsOptions)==null?void 0:r.templates;(i=o==null?void 0:o.onApplyTemplate)==null||i.call(o,n,e)})}function $F(n,e){return r9(n,e,I.t("templates.choose"),["more"],()=>{var o,r;const t=(o=n.options.componentsOptions)==null?void 0:o.templates;(r=t==null?void 0:t.onChooseTemplate)==null||r.call(t,n)})}function _F(n,e){var f,m;const t=(f=n.options.componentsOptions)==null?void 0:f.templates;if(!t)return;const r=Je(n.rootContainer).getBoundingClientRect().width;let i=1;const s=RF,l=Lf(n);if(l){if(e!=null&&e.reset){const p=Array.from(l.cardContainer.children),b=l.cardContainer.firstElementChild;if(d(o9,b,"no first card"),ne(b,"new")||ne(b,"more"))return;const k=window.getComputedStyle(b),v=parseFloat(k.marginLeft),T=parseFloat(k.marginRight),E=b.getBoundingClientRect().width+v+T;i=Math.floor(r/E);const L=Math.max(1,i-1-1),P=p.length-1;p.forEach((V,ee)=>{ee>L&&ee<P?V.style.display="none":(ee>=P&&ne(V,"more"),V.style.display="")})}return}const c=t.templates,{cardContainer:a}=PF(n);c.forEach((p,b)=>{const k=FF(n,p);if(b>0&&b>=i&&(k.style.display="none"),a.appendChild(k),b===0){const v=window.getComputedStyle(k),T=parseFloat(v.marginLeft),E=parseFloat(v.marginRight),R=k.getBoundingClientRect().width+T+E;i=Math.floor(r/R)-1}});const u=$F(n,s);a.appendChild(u),(m=t==null?void 0:t.onTemplateChooserStatusChanged)==null||m.call(t,n,a,"visible")}const i9=nt.default(_F,50);function HF(n){var o,r;const e=Lf(n);if(!e)return;e.root.remove();const t=(o=n.options.componentsOptions)==null?void 0:o.templates;(r=t==null?void 0:t.onTemplateChooserStatusChanged)==null||r.call(t,n,null,"hide")}function jF(n){const e=n.blocks.root;if(e.length===0)return!0;if(e.length>5)return!1;const t=[...e];t[0].type==="text"&&t[0].heading&&t.splice(0,1);const o=r=>{var i;return r.type!=="text"&&r.type!=="list"?!1:r.text?((i=r.text)==null?void 0:i.length)===0:!0};return t.every(r=>o(r))}function Ra(n,e){jF(n.doc.toJSON())?i9(n,e):(i9.cancel(),HF(n))}const zF=800;class UF{constructor(e){h(this,"longPressTimeout",0);h(this,"handleSelectionChange",()=>{});h(this,"handleLongPress",e=>{const t=e.touches[0],o=Ul(this.editor,t.clientX,t.clientY);!o||console.log(o)});h(this,"handleTouchStart",e=>{e.touches.length===1&&(this.longPressTimeout=window.setTimeout(()=>{this.handleLongPress(e)},zF))});h(this,"handleTouchEnd",e=>{this.longPressTimeout&&(window.clearTimeout(this.longPressTimeout),this.longPressTimeout=0)});this.editor=e,this.editor.addListener("selectionChanged",this.handleSelectionChange),document.addEventListener("touchstart",this.handleTouchStart),document.addEventListener("touchend",this.handleTouchEnd)}destroy(){this.editor.removeListener("selectionChanged",this.handleSelectionChange),document.removeEventListener("touchstart",this.handleTouchStart),document.removeEventListener("touchend",this.handleTouchEnd)}}const VF=`<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
573
+ `:i.src?`[${i.fileName}](${n.doc.buildResourceUrl(i.src,{withToken:!0})})`:`[${i.fileName}]`}const CN={embedType:"office",createEmbedContent:fN,getBlockProperties:gN,convertTo:pN};function AN(n){const e=/(\s|^)(http|https):\/\/[\w\-]+(\.[\w\-]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?$/;return e.test(n)?n.search(e):-1}function bN(n){const e=n.selection.range;if(!e.isCollapsed()||!e.isSimple())return;const{start:t}=e,o=n.getBlockById(t.blockId);if(!$(n,o))return;const r=n.getBlockText(o),s=hd(r).slice(0,t.offset),l=AN(s);if(l===-1)return;const c=s.slice(l),a=s.length;let u=Xi(l,a-l,r,"link",c);return u=Gn(u,a," ",null),n.setBlockText(o,u),n.selection.selectBlock(o,a+1),!0}const vN={Space:bN},yN=w("exclusive-block");function wf(n,e,t,o){var l;M(e,"block-exclusive");const r=me(n,e),i=(l=r.getBlockProperties)==null?void 0:l.call(r,n,e),{abstract:s}=i||{};e.setAttribute("data-user-name",o),e.setAttribute("data-user-id",t),e.setAttribute("data-exclusive-tips",I.t("exclusive.tips",{editor:o,embedType:s||I.t("exclusive.fallbackAbstract")}))}function E6(n){_(n,"block-exclusive"),n.removeAttribute("data-user-name"),n.removeAttribute("data-user-id"),n.removeAttribute("data-exclusive-tips")}function kN(n,e,t,o,r){yN.debug(`block ${j(e)} ${t?"exclusive":"unexclusive"}, ${o}, ${r}`),t?wf(n,e,o,r):E6(e)}function I6(n){return n.classList.contains("block-exclusive")}function x6(n,e){e.blockIds.forEach(t=>{const o=n.findBlockById(t);o&&kN(n,o,e.exclusive,e.userId,e.displayName)})}class No{constructor(e){h(this,"exclusiveBlockIds",new Set);h(this,"exclusiveBlockTimer",0);h(this,"remoteExclusiveBlockIds",new Map);h(this,"handleUserChanged",e=>{const t=new Set(e.map(r=>r.userId));Array.from(this.remoteExclusiveBlockIds.entries()).forEach(([r,i])=>{if(!t.has(i.userId)){this.remoteExclusiveBlockIds.delete(r);const s={...i,exclusive:!1};x6(this.editor,s)}});const o=Array.from(this.exclusiveBlockIds).map(r=>this.editor.findBlockById(r)).filter(r=>!!r);o.length>0&&this.broadcastExclusiveBlockMessage(o,!0)});this.editor=e,e.doc.registerCallback(this),e.doc.getRemoteUsers().addListener("change",this.handleUserChanged)}destroy(){this.stopExclusiveBlockTimer(),this.editor.doc.unregisterCallback(this),this.editor.doc.getRemoteUsers().addListener("change",this.handleUserChanged)}onCustomMessage(e){if(e.type==="exclusiveBlock"){const t=e;x6(this.editor,t),t.blockIds.forEach(o=>{t.exclusive?this.remoteExclusiveBlockIds.set(o,t):this.remoteExclusiveBlockIds.delete(o)})}}getExclusiveMessage(e){return this.remoteExclusiveBlockIds.get(e)}broadcastExclusiveBlockMessage(e,t){if(this.editor.readonly||e.length===0)return;const o=this.editor.doc.getUser(),r={type:"exclusiveBlock",userId:o.userId,displayName:o.displayName,blockIds:e.map(i=>j(i)),exclusive:t};this.editor.doc.broadcastMessage(r)}exclusiveBlock(e){this.exclusiveBlockIds.has(j(e))||(this.broadcastExclusiveBlockMessage([e],!0),this.exclusiveBlockIds.add(j(e)),this.exclusiveBlockIds.size===1&&this.startExclusiveBlockTimer())}unexclusiveBlock(e){!this.exclusiveBlockIds.has(j(e))||(this.exclusiveBlockIds.delete(j(e)),this.broadcastExclusiveBlockMessage([e],!1),this.exclusiveBlockIds.size===0&&this.stopExclusiveBlockTimer())}startExclusiveBlockTimer(){this.exclusiveBlockTimer=window.setInterval(()=>{Array.from(this.exclusiveBlockIds.keys()).forEach(e=>{this.broadcastExclusiveBlockMessage([this.editor.getBlockById(e)],!0)})},30*1e3)}stopExclusiveBlockTimer(){clearInterval(this.exclusiveBlockTimer),this.exclusiveBlockTimer=0}static get(e){return e.addCustom("exclusiveBlock",()=>new No(e))}static register(e){return this.get(e)}}function T6(n,e){No.get(n).exclusiveBlock(e)}function S6(n,e){No.get(n).unexclusiveBlock(e)}class D6{writable(e,t){if(I6(t))return!1}create(e,t,o,r,i){const s=No.get(e).getExclusiveMessage(i.id);s&&wf(e,r,s.userId,s.displayName)}update(e,t,o,r,i){const s=No.get(e).getExclusiveMessage(i.id);s?wf(e,r,s.userId,s.displayName):E6(r)}}const yq="",wN={exclusive:{tips:"\u300C{editor}\u300D\u6B63\u5728\u7F16\u8F91\uFF0C\u300C{embedType}\u300D\u4E0D\u652F\u6301\u591A\u4EBA\u7F16\u8F91",fallbackAbstract:"\u8BE5 Block"}},BN={exclusive:{tips:"\u300C{editor}\u300Dis editing\uFF0C\u300C{embedType}\u300Ddoes not support multi-person editing",fallbackAbstract:"This Block"}},EN={exclusive:{tips:"\u300C{editor}\u300D\u306F\u7DE8\u96C6\u4E2D\u3067\u3059\u3002\u300C{embedType}\u300D\u306F\u8907\u6570\u4EBA\u3067\u540C\u6642\u7DE8\u96C6\u3067\u304D\u307E\u305B\u3093",fallbackAbstract:"This Block"}};I.mergeLang({"zh-CN":wN,"en-US":BN,"ja-JP":EN});const kq="",IN={version:{latest:"\u5F53\u524D\u7248\u672C",insert:"{name} \u6DFB\u52A0",delete:"{name} \u5220\u9664",goBack:"\u8FD4\u56DE",revertVersion:"\u8FD8\u539F\u5185\u5BB9",play:"\u64AD\u653E\u5386\u53F2\u64CD\u4F5C",versionList:"\u5386\u53F2\u7248\u672C {count}",unknown:"\u672A\u77E5\u7248\u672C",restoreFrom:"\u56DE\u6EDA\u81EA\u7248\u672C {from}",restoreInfo:"\u56DE\u6EDA\u7684\u7248\u672C\u6682\u4E0D\u652F\u6301\u4E0E\u4E0A\u4E00\u7248\u672C\u5BF9\u6BD4",versionInfoLeft:'<span class="text-1">\u5F53\u524D\u7248\u672C: </span><span class="name">{versionName}</span><span class="text-2"> \u4E0E</span>',versionInfoRight:'<span class="text-3">\u5BF9\u6BD4</span>',noSelectedVersion:"\u672A\u9009\u62E9\u7248\u672C",noMemoedVersion:"\u6682\u65E0\u5DF2\u5907\u6CE8\u7684\u5386\u53F2\u7248\u672C",noVersion:"\u6682\u65F6\u5386\u53F2\u7248\u672C"}},xN={version:{latest:"Latest",insert:"Added by {name}",delete:"Deleted by {name}",goBack:"Back",revertVersion:"Revert",play:"Play",versionList:"Historical versions ({count})",unknown:"Unknown version",restoreFrom:"Reverted from {from}",restoreInfo:"The rolled back version does not currently support comparison with the previous version.",versionInfoLeft:'<span class="text-1">\u5F53\u524D\u7248\u672C: </span><span class="name">{versionName}</span><span class="text-2"> \u4E0E</span>',versionInfoRight:'<span class="text-3">\u5BF9\u6BD4</span>',noSelectedVersion:"No version selected",noMemoedVersion:"No version memoed",noVersion:"No version"}};I.mergeLang({"zh-CN":IN,"en-US":xN});var L6=(n=>(n.NEW="history-new",n.NEW_CHILD="history-new-child",n.DELETED="history-deleted",n.UPDATED="history-updated",n.HISTORY="history",n))(L6||{});const vi="--op-color",yi="--op-selected-color",wq="";class TN{constructor(e){h(this,"root");this.content=e;const t=A("div",["editor-dialog-root"],null);t.append(e),this.root=t}show(e=document.body){e.append(this.root)}hide(){this.root.remove()}destroy(){}}function wr(n){var t;let e;if(n.version!==-1){const o=new Date((t=n.created)!=null?t:n.version);e=`${o.toLocaleDateString()} ${o.toLocaleTimeString()}`}else e=I.t("version.latest");return e}function Da(n){return n.source&&typeof n.source=="object"&&!!n.source.restore}const Bq="";class SN{constructor(e,t){h(this,"textArea");h(this,"warning");h(this,"end",!1);h(this,"root");h(this,"handleBlur",()=>{var e,t;this.end||(t=(e=this.options)==null?void 0:e.onend)==null||t.call(e,this.textArea.value,!1)});h(this,"handleKeyDown",e=>{var t,o,r,i;e.isComposing||(e.key==="Enter"||e.key==="Tab"?(e.preventDefault(),(o=(t=this.options)==null?void 0:t.onend)==null||o.call(t,this.textArea.value,!1),this.end=!0):e.key==="Escape"&&(e.preventDefault(),(i=(r=this.options)==null?void 0:r.onend)==null||i.call(r,this.textArea.value,!0),this.end=!0))});h(this,"handleInput",e=>{const t=e.target,{value:o}=t;o.length>this.maxLength-10?this.warning.innerText=`${o.length}/${this.maxLength}`:this.warning.innerText="",this.autoSize()});var o;this.maxLength=e,this.options=t,this.root=A("div",["size-limit-textarea",...(o=t==null?void 0:t.classes)!=null?o:[]],null),this.textArea=A("textarea",["size-limit-textarea-input"],this.root),this.warning=A("div",["size-limit-textarea-warning"],this.root),this.textArea.addEventListener("input",this.handleInput),this.textArea.addEventListener("blur",this.handleBlur),this.textArea.addEventListener("keydown",this.handleKeyDown),this.textArea.maxLength=e}destroy(){this.textArea.removeEventListener("input",this.handleInput),this.textArea.removeEventListener("blur",this.handleBlur),this.textArea.removeEventListener("keydown",this.handleKeyDown)}setValue(e){this.textArea.value=e,this.autoSize()}autoSize(){const e=Math.max(this.textArea.scrollHeight,60);this.textArea.style.height="auto",this.textArea.style.height=`${e}px`}focus(){this.textArea.focus(),this.end=!1}}const Eq="",{t:ll}=I,M6=w("version-list");class DN{constructor(e){h(this,"versionsList");h(this,"versionsListHeader");h(this,"versionFilterToolbar");h(this,"memoInput",null);h(this,"selectedVersion",0);h(this,"handleClickVersionItem",e=>{const t=e.target,o=t.closest(".version-item");if(!this.isVersionElement(o))return;const r=ne(o,"active");if(r&&t.closest(".version-item-memo")){this.editItemMemo(o);return}const i=this.getVersionFromElement(o);if(this.setActiveItem(o),t.closest(".add-memo-button")){this.handleAddMemo(i,o);return}if(t.closest(".revert-button")){this.handleRevert(i,o);return}if(r)return;const{onSelectVersion:s}=this.options;s(i)});h(this,"handleEndEditItemMemo",(e,t)=>{var r;const o=(r=this.memoInput)==null?void 0:r.root.closest(".version-item");if(this.isVersionElement(o)&&(_(o,"editing"),!t)){const i=this.getVersionFromElement(o);i.extra={memo:e},this.options.versionHelper.updateVersionExtra(i.version,i.tagId,i.extra);const s=o.querySelector(".version-item-memo");d(M6,s,"no memo element"),s.textContent=e}setTimeout(()=>{var i;(i=this.memoInput)==null||i.root.remove()})});h(this,"handleRevert",(e,t)=>{const{onRevert:o}=this.options;o(e)});h(this,"handleFilterClick",(e,t)=>{let o=this.options.versions;t.id==="memoed"&&(o=o.filter(i=>{var s;return!!((s=i.extra)!=null&&s.memo)}));const r=this.createVersionItems(o,t.id);this.versionsList.innerHTML="",this.versionsList.append(r)});var u,f;this.options=e;const{versions:t}=e,o=A("div",["version-list-header"],null),r=ll("version.versionList",{count:`${t.length}`});A("span",["version-count"],o,r);const i=A("div",["version-list-filter"],o),s=[{id:"filter",name:"All",dropdown:!0,manualShowChildren:!0,childrenPlacement:"bottom-start",children:[{id:"all",name:"All historical versions"},{id:"memoed",name:"Memoed versions"}]}];this.versionFilterToolbar=new $B(i,s,{tooltipId:"version-viewer"}),this.versionFilterToolbar.addListener("click",this.handleFilterClick),this.selectedVersion=e.selectedVersion||((u=t[0])==null?void 0:u.version)||-1;const l=A("div",["version-list-content"],null),c=this.createVersionItems(t,"all");l.append(c),this.versionsList=l,this.versionsListHeader=o,l.onclick=this.handleClickVersionItem;const a=this.activeVersion;a&&((f=this.options)==null||f.onSelectVersion(a))}createVersionItems(e,t){const o=document.createDocumentFragment();if(e.length===0){const i=A("div",["version-list-empty"],o);return i.textContent=ll(t==="all"?"version.noVersion":"version.noMemoedVersion"),o}const r=(i,s,l,c=!1)=>{var T,E;const a=A("div",["version-item"],o);a.versionData=i,s&&M(a,"child"),i.version===this.selectedVersion&&M(a,"active");const u=A("div",["version-item-title"],a);A("div",["version-item-date"],u,wr(i)),c&&A("div",["version-item-latest"],u,ll("version.latest")),A("div",["spacer"],u);const f=A("div",["version-actions"],u),m=A("button",["add-memo-button"],f),p=A("button",["revert-button"],f);m.textContent="Memo",p.textContent="Revert";let b="";if(typeof i.source=="object"&&((T=i.source)==null?void 0:T.restore)){const R=i.source.restore,L=l.find(V=>V.version==R),P=L?wr(L):ll("version.unknown");b=ll("version.restoreFrom",{from:P})}A("div",["version-item-restore-from"],a,b),A("div",["version-item-memo"],a,((E=i.extra)==null?void 0:E.memo)||"");const k=A("ul",["version-item-authors"],a),v=R=>{const L=A("li",["version-item-author"],k),P=A("span",["version-item-author-mark"],L);P.style.background=this.options.getMarkColor(R),A("span",["version-item-author-name"],L,R.displayName)};if(this.options.useCreatedBy)if(i.createdBy){const R=i.createdBy;v(R)}else i.authors&&i.authors.length>0&&i.authors.forEach(R=>{v(R)});else if(i.authors&&i.authors.length>0)i.authors.forEach(R=>{v(R)});else if(i.createdBy){const R=i.createdBy;v(R)}};return e.forEach((i,s)=>{r(i,!1,e,s===0),i.minorVersions&&i.minorVersions.length>0&&i.minorVersions.forEach(l=>{r(l,!0,e,!1)})}),o}isVersionElement(e){return e?ne(e,"version-item"):!1}getVersionFromElement(e){return e.versionData}get activeVersion(){return this.options.versions.find(e=>e.version===this.selectedVersion)}setActiveItem(e){if(ne(e,"active"))return;const t=this.versionsList.querySelector(".version-item.active");t&&_(t,"active"),M(e,"active"),this.selectedVersion=this.getVersionFromElement(e).version}handleAddMemo(e,t){this.editItemMemo(t)}editItemMemo(e){var o;this.memoInput||(this.memoInput=new SN(256,{onend:this.handleEndEditItemMemo,classes:["memo-input"]}));const t=e.querySelector(".version-item-restore-from");d(M6,t,"no title element"),t.insertAdjacentElement("afterend",this.memoInput.root),M(e,"editing"),this.memoInput.setValue(((o=e.versionData.extra)==null?void 0:o.memo)||""),this.memoInput.focus()}getVersionItemByVersionNum(e){const t=Array.from(this.versionsList.children).find(o=>o.versionData.version===e);return this.isVersionElement(t)?t:null}selectVersionByVersionNum(e){const t=this.getVersionItemByVersionNum(e);return t?(this.setActiveItem(t),this.getVersionFromElement(t)):null}render(e){e.innerHTML="",e.append(this.versionsListHeader,this.versionsList)}destroy(){this.versionsList.onclick=null,this.versionFilterToolbar.destroy()}}class LN{constructor(e,t){this.doc=e,this.user=t}onDeleteBlock(e,t){this.doc.onDeleteBlock(e,t,this.user)}onInsertBlock(e,t,o){this.doc.onInsertBlock(e,t,o,this.user)}onUpdateBlockText(e,t,o){this.doc.onUpdateBlockText(e,t,o,this.user)}onUpdateBlockData(e,t,o){this.doc.onUpdateBlockData(e,t,o,this.user)}onCreateContainer(e,t){this.doc.onCreateContainer(e,t,this.user)}onCreateComment(){}onDeleteComment(){}onDeleteContainer(){}onUpdateComment(){}}async function MN(n,e,t){for(const o of t){const r=new LN(n,o.user);e.parseHistoryData(o,r)}}const vt=w("split-text-actions");function R6(n){return n.length>2?!1:n.length===1?n[0].insert!==void 0:(d(vt,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].insert!==void 0)}function O6(n){return n.length>2?!1:n.length===1?n[0].delete!==void 0:(d(vt,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].delete!==void 0)}function P6(n){return n.length>2?!1:n.length===1?n[0].insert===void 0&&n[0].delete===void 0&&n[0].attributes!==void 0:(d(vt,n.length===2,`invalid text actions: ${JSON.stringify(n)}`),n[0].retain===void 0?!1:n[1].attributes!==void 0)}function RN(n){const e=[],t=Q.default(n);if(t.length===0)return[];if(t.length===1)return[n];if(t.length===2&&(O6(n)||R6(n)||P6(n)))return[n];const o=(i,s)=>i>0?[{retain:i},s]:[s];let r=0;for(;t.length>0;){const i=t[0];if(i.retain!==void 0&&i.attributes===void 0){d(vt,i.retain>0,`invalid text op: ${JSON.stringify(i)}`),d(vt,t.length>1,`invalid text op: ${JSON.stringify(i)}`);const s=t[1];d(vt,s.delete||s.insert!==void 0||s.attributes!==void 0,`invalid next text op: ${JSON.stringify(s)}`),r+=i.retain,e.push(o(r,s)),s.delete!==void 0?r-=s.delete:s.insert!==void 0?r+=s.insert.length:(d(vt,s.attributes!==void 0,`invalid next text op: ${JSON.stringify(s)}`),d(vt,s.retain!==void 0,`invalid next text op: ${JSON.stringify(s)}`),r+=s.retain),t.splice(0,2)}else d(vt,i.delete||i.insert!==void 0||i.attributes!==void 0,`invalid next text op: ${JSON.stringify(i)}`),e.push(o(r,i)),t.shift(),i.retain!==void 0&&(d(vt,i.attributes!==void 0,`invalid next text op: ${JSON.stringify(i)}`),r+=i.retain),i.insert&&(r+=i.insert.length)}return e}function N6(n){if(d(vt,n.length===1||n.length===2,`not a single action op: ${JSON.stringify(n)}`),n.length===1)return 0;const e=n[0].retain;return d(vt,typeof e=="number"&&e>0,`invalid retain: ${JSON.stringify(n)}`),e}let F6=0;function ON(n,e,t){const o=F6;F6+=1;const r=ve(n);return{insert:" ",attributes:{box:!0,id:F(),type:"history-deleted-box",user:t,created:Date.now(),text:r,deletedOffset:e,deletedOrder:o}}}function PN(n,e,t){const o=N6(e),r=e.length===1?e[0].delete:e[1].delete;d(vt,typeof r=="number",`not a delete op: ${JSON.stringify(e)}`);const{left:i,middle:s,right:l}=Ge(n,o,r),c=ON(s,o,t);return[...i,c,...l]}function NN(n,e,t){const o=N6(e),r=e.length===1?e[0].insert:e[1].insert;d(vt,typeof r=="string",`invalid insert op: ${JSON.stringify(e)}`);const i=e.length===1?e[0].attributes:e[1].attributes,l=Ql([{insert:r,attributes:i}],"insertedBy",t);return Gn(n,o,l,null)}function FN(n,e,t){const o=RN(e);let r=n;for(const i of o)O6(i)?r=PN(r,i,t):R6(i)?r=NN(r,i,t):(d(vt,P6(i),`unknown op: ${JSON.stringify(i)}`),r=dt.apply(r,i));return r}const $N=w("history-update-block-text");function $6(n){const e=[],t=[];let o=0;return n.forEach(r=>{var i;if((i=r.attributes)!=null&&i.box){const s=r.attributes;if(s.type==="history-deleted-box"){e.push({boxData:s,offset:o});return}}t.push(r),o+=ld(r)}),e.sort((r,i)=>i.offset-r.offset),{deletedBoxes:e,newText:t}}function _N(n,e,t){let o=n;return e.forEach(r=>{const i=dt.transformCursor(r.offset,t,!1);o=Gn(o,i,[{insert:" ",attributes:r.boxData}],null)}),o}function HN(n){n.sort((e,t)=>e.boxData.deletedOffset!==t.boxData.deletedOffset?e.boxData.deletedOffset-t.boxData.deletedOffset:e.boxData.deletedOrder-t.boxData.deletedOrder)}function jN(n){if(n.length<=1)return n;const e=n[0].offset;n.forEach(t=>{d($N,t.offset===e,`invalid boxes group, ${JSON.stringify(n)}`)}),HN(n);for(let t=n.length-1;t>=1;t--){const o=n[t],r=n[t-1];o.boxData.user.userId===r.boxData.user.userId&&(r.boxData.text+=o.boxData.text,n.splice(t,1))}return n}function zN(n){let{newText:e,deletedBoxes:t}=$6(n);const o=new Map;return t.forEach(i=>{let s=o.get(i.offset);s||(s=[],o.set(i.offset,s)),s.push(i),s.sort((l,c)=>l.boxData.deletedOffset-c.boxData.deletedOffset)}),Array.from(o.values()).sort((i,s)=>s[0].offset-i[0].offset).forEach(i=>{const s=i[0].offset;jN(i).reverse().forEach(l=>{e=Gn(e,s,[{insert:" ",attributes:l.boxData}],null)})}),e}function UN(n,e,t){let{newText:o,deletedBoxes:r}=$6(n);return o=FN(o,e,t),o=_N(o,r,e),o=zN(o),o}const Pn=w("history-doc");function Nn(n){d(Pn,!1,"no local actions for history doc")}class VN extends Hi{constructor(e,t){super(),this.externalDoc=e,this.docObject=t}beginBatchUpdate(){return 0}endBatchUpdate(){return 0}toJSON(){return Q.default(this.docObject)}getContainerBlocks(e){return this.docObject.blocks[e]}getBlockData(e,t){const o=this.getContainerBlocks(e);d(Pn,o,`no container data: ${e}`);const r=o[t];return d(Pn,r,`no block data: ${t}`),r}localUpdateBlockText(){Nn()}localUpdateBlockData(){Nn()}localInsertBlock(){Nn()}localDeleteBlock(){Nn()}localInsertChildContainer(){Nn()}localDeleteChildContainers(){Nn()}uploadResource(){Nn()}async addResources(e){Nn()}getServerMeta(){var e,t,o;return(o=(t=(e=this.externalDoc).getServerMeta)==null?void 0:t.call(e))!=null?o:{}}buildResourceUrl(e){return this.externalDoc.buildResourceUrl(e)}request(){Nn()}broadcastMessage(){Nn()}getUser(){return{permission:"w",userId:"-",displayName:"-",avatarUrl:"-",rainbowIndex:0}}getRemoteUsers(){return new bc}destroy(){this.clearCallbacks()}transformBlockIndex(e,t,o){const r=this.docObject.blocks[e];d(Pn,r,`no container blocks: ${e}`);let i=0;for(let s=0;s<r.length;s++)if(!r[s].deletedBy){if(i===t)return s;i++}return o&&d(Pn,!1,`invalid block index: ${t}, blocks: ${JSON.stringify(r)}`),d(Pn,i===t,`invalid block index: ${t}, blocks: ${JSON.stringify(r)}`),r.length}onDeleteBlock(e,t,o){const r=this.transformBlockIndex(e,t,!0),s=this.docObject.blocks[e][r];d(Pn,!s.deleted,`block has already deleted: ${e}/${t}`),s.deletedBy=o,this.callbacks.forEach(l=>{var c;return(c=l.onUpdateBlockData)==null?void 0:c.call(l,e,r,{insert:{},delete:[]},!0)})}onInsertBlock(e,t,o,r){const i=this.transformBlockIndex(e,t,!1),s=this.docObject.blocks[e],l=Q.default(o);l.insertedBy=r,s.splice(i,0,l),this.callbacks.forEach(c=>{var a;return(a=c.onInsertBlock)==null?void 0:a.call(c,e,i,l,!0)})}onUpdateBlockText(e,t,o,r){const i=this.transformBlockIndex(e,t,!0),l=this.docObject.blocks[e][i];d(Pn,!l.deleted,`block has already deleted: ${e}/${t}`);const c=l.text;d(Pn,c,`no text for block: ${JSON.stringify(l)}`);const a=UN(c,o,r);l.text=a,this.callbacks.forEach(u=>{var f;return(f=u.onUpdateBlockText)==null?void 0:f.call(u,e,t,o,!0)})}onUpdateBlockData(e,t,o,r){const i=this.transformBlockIndex(e,t,!0),s=this.docObject.blocks[e],l=s[i];d(Pn,!l.deleted,`block has already deleted: ${e}/${t}`);const c=Q.default(l);c.updatedBy=r,o.delete.forEach(a=>delete c[a]),Object.entries(o.insert).forEach(([a,u])=>{c[a]=u}),s[i]=c,this.callbacks.forEach(a=>{var u;return(u=a.onUpdateBlockData)==null?void 0:u.call(a,e,i,o,!0)})}onCreateContainer(e,t,o){this.docObject.blocks[e]=Q.default(t),this.callbacks.forEach(r=>{var i;return(i=r.onInsertChildContainer)==null?void 0:i.call(r,e,t,!0)})}}const{t:_6}=I;function ki(n,e){return e==="insert"?_6("version.insert",{name:n.displayName}):_6("version.delete",{name:n.displayName})}function Br(n,e){const{userId:t}=e;return["flag","selection"].reduce((r,i)=>{const s=n.getRemoteUsers().getFixedUserColor(t,i);return r[i]=s,r},{})}class qN{renderText(e,t,o){if(!o.box&&o.insertedBy){const r=o.insertedBy,{flag:i,selection:s}=Br(e.doc,o.insertedBy);return{classes:["history-inserted-text"],attributes:{"history-inserted-by":r.displayName,"data-op-description":ki(r,"insert")},styles:{[vi]:i,[yi]:s}}}return{}}renderBlock(e,t,o){if(o.deletedBy){const r=o.deletedBy,{flag:i,selection:s}=Br(e.doc,r);return{classes:["history-deleted-block"],attributes:{"history-deleted-by":r.displayName,"data-op-description":ki(r,"delete")},styles:{[vi]:i,[yi]:s}}}if(o.insertedBy){const r=o.insertedBy,{flag:i,selection:s}=Br(e.doc,r);return{classes:["history-inserted-block"],attributes:{"history-inserted-by":r.displayName,"data-op-description":ki(r,"insert")},styles:{[vi]:i,[yi]:s}}}return{}}updateBlock(e,t,o,r){if(r.deletedBy){const i=r.deletedBy,{flag:s,selection:l}=Br(e.doc,i);M(o,"history-deleted-block"),mu(o,{"history-inserted-by":i.displayName,"data-op-description":ki(i,"delete")}),gu(o,{[vi]:s,[yi]:l});return}if(r.insertedBy){const i=r.insertedBy,{flag:s,selection:l}=Br(e.doc,i);M(o,"history-inserted-block"),mu(o,{"history-inserted-by":i.displayName,"data-op-description":ki(i,"insert")}),gu(o,{[vi]:s,[yi]:l})}}}const H6=w("history-deleted-box");function WN(n,e,t,o){const r=o;d(H6,r.text,`no text for text box data: ${JSON.stringify(o)}`),d(H6,typeof r.text=="string",`invalid text type for text box data: ${JSON.stringify(o)}`);const i=A("span",["history-deleted-box"],t,r.text),s=r.user,{flag:l,selection:c}=Br(n.doc,s);i.setAttribute("history-deleted-by",s.displayName),i.setAttribute("data-op-description",ki(s,"delete")),i.style.setProperty(vi,l),i.style.setProperty(yi,c)}function GN(n,e,t,o){return e.text}const ZN={boxType:"history-deleted-box",updateBoxContent:WN,convertTo:GN},Iq="",QN=w("versions-dropdown");class YN{constructor(e,t){h(this,"dropdown");h(this,"versions",[]);h(this,"currentVersion",null);h(this,"compareWithVersion",null);h(this,"filterMemoed",!1);h(this,"createFilterMemoedFilterItem",e=>{const t=A("div",["filter-memoed-version-item"],null);e&&A("div",["filter-item-info"],t,"\u6240\u6709\u53EF\u5BF9\u6BD4\u7684\u5386\u53F2\u7248\u672C");const o=A("div",["filter-item-input-container"],t),r=A("input",["filter-item-input"],o);r.id="filter-item-input",r.type="checkbox";const i=A("label",["filter-item-label"],o,"\u7B5B\u9009\u5DF2\u5907\u6CE8\u7684\u7248\u672C");return i.htmlFor=r.id,r.onchange=this.handleInputChange,r.checked=this.filterMemoed,t});h(this,"filterItems",(e,t)=>{var i,s;if(e.id==="filter-separator"||e.id==="last-version"||!t)return!0;const o=t.toLocaleLowerCase();if(e.name.toLocaleLowerCase().indexOf(o)!==-1)return!0;const r=e.data;return!!(r&&((i=r.extra)==null?void 0:i.memo)&&((s=r.extra)==null?void 0:s.memo.toLocaleLowerCase().indexOf(o))!==-1)});h(this,"handleClose",()=>{});h(this,"handleClear",()=>{this.options.onCompareWithVersion(null)});h(this,"handleClickItem",e=>{const t=e.data,o=wr(t);this.dropdown.setText(o),this.options.onCompareWithVersion(t)});h(this,"handleInputChange",e=>{const t=e.target;this.filterMemoed=t.checked,this.resetItems()});this.options=t,this.dropdown=new Sh(e,{placeholder:I.t("version.noSelectedVersion"),popupId:"versions-dropdown-popup",header:this.createHeader(),filter:this.filterItems,onClose:this.handleClose,onClickItem:this.handleClickItem,onClear:this.handleClear})}createHeader(){const e=A("div",["versions-dropdown-header"],null),t=A("div",["versions-dropdown-header-info"],e);t.innerHTML="\u4EC5\u5C55\u793A\u53EF\u4E0E\u5F53\u524D\u7248\u672C\u8FDB\u884C\u5BF9\u6BD4\u7684\u5386\u53F2\u7248\u672C";const o=A("div",["versions-dropdown-header-icon"],e);return o.innerHTML=I5,o.onclick=this.options.onHelp,e}setVersions(e){this.versions=e}setCurrentVersion(e,t){this.dropdown.setText(""),this.dropdown.setLabels([]),t&&(this.dropdown.setText(wr(t)),(t.version===-1||t.version===this.versions[0].version)&&this.dropdown.setLabels(["\u6700\u65B0"])),this.currentVersion=e,this.compareWithVersion=t!=null?t:null,this.resetItems()}resetItems(){var f;if(this.versions.length===0)return;const e=this.currentVersion;if(!e)return;const t=e.version===-1?0:this.versions.findIndex(m=>m.version===e.version);d(QN,t!==-1,"version not found");const o=this.versions[0],r=m=>{var T;const p=m.data,b=A("div",["version-item-container"],null),k=A("div",["version-item-line1"],b),v=m.id==="last-version"?"\u4E0A\u4E00\u7248\u672C":wr(p);if(A("div",["version-item-name"],k,v),p.version===o.version&&A("div",["version-item-latest"],k,"\u6700\u65B0"),(T=p.extra)!=null&&T.memo){const E=A("div",["version-item-line2"],b);A("div",["version-item-memo"],E,p.extra.memo)}return b.onclick=()=>{this.handleClickItem(m),this.dropdown.close()},b},i=[],s=this.versions[t+1];if(s&&!Da(e)){const m={id:"last-version",name:"Last version",data:s,element:r};i.push(m)}const l={id:"filter-separator",name:"",element:this.createFilterMemoedFilterItem(i.length>0),states:["disabled"]};i.push(l);let c=t;for(let m=t-1;m>=0;m-=1){const p=this.versions[m];if(Da(p))break;c=m}let a=t;if(!Da(e))for(let m=t+1;m<this.versions.length;m+=1){const p=this.versions[m];if(a=m,Da(p))break}let u=!1;for(let m=c;m<=a;m+=1){const p=this.versions[m];if(p.version!==e.version&&p.version!==(s==null?void 0:s.version)&&(!this.filterMemoed||((f=p.extra)==null?void 0:f.memo))){u=!0;let b=wr(p),k=`${p.version}`;m===t+1&&(b="Previous version",k="prev-version");const v={id:k,name:b,data:p,element:r};i.push(v)}}if(!u){const m=this.filterMemoed?"\u6CA1\u6709\u5305\u542B\u5907\u6CE8\u7684\u7248\u672C":"\u6CA1\u6709\u53EF\u5BF9\u6BD4\u7684\u7248\u672C",p={id:"no-versions",name:"No versions",states:["disabled"],element:A("div",["version-item-empty"],null,m)};i.push(p)}this.dropdown.updateItems(i)}}class JN{constructor(e,t){h(this,"left");h(this,"right");h(this,"dropdown");const o=A("div",["version-info-container"],e);this.left=A("div",["version-info-left"],o),this.dropdown=new YN(o,t),this.right=A("div",["version-info-right"],o)}setVersion(e,t){const o=wr(e);this.left.innerHTML=I.t("version.versionInfoLeft",{versionName:o}),this.right.innerHTML=I.t("version.versionInfoRight",{versionName:o}),this.dropdown.setCurrentVersion(e,t)}}const Fo=w("version-dialog");class j6{constructor(e,t){h(this,"dialog",null);h(this,"oldViewer",null);h(this,"versionOptions");h(this,"versionList",null);h(this,"provider");h(this,"components");h(this,"handleRevert",async e=>{var o,r;d(Fo,this.versionList,"The versionList did not render");const t=e!=null?e:(o=this.versionList)==null?void 0:o.activeVersion;d(Fo,t,`The version: ${t} is invalid`),await this.versionHelper.revertVersion(t.version),(r=this.dialog)==null||r.hide()});h(this,"handleSelectVersion",e=>{d(Fo,e,`The version: ${e} is invalid`),this.viewVersion(e)});h(this,"handleCompareWithVersion",e=>{var o;const t=(o=this.versionList)==null?void 0:o.activeVersion;d(Fo,t,"no active version"),this.viewVersion(t,e!=null?e:void 0)});h(this,"handleHelp",()=>{var e,t;(t=(e=this.versionOptions)==null?void 0:e.onHelp)==null||t.call(e)});h(this,"viewVersion",async(e,t)=>{var a,u;if(this.components.infoHeader.setVersion(e,t),this.oldViewer&&(this.oldViewer.destroy(),this.oldViewer=null),!this.versionList)return;(a=this.versionOptions)!=null&&a.onWillChangeVersion&&this.versionOptions.onWillChangeVersion(this,e);const o=t==null?void 0:t.version;let r,i;if(o){const f=Math.min(e.version,o),m=Math.max(e.version,o),p=await this.versionHelper.getHistoryData(m,f);r=p.doc,i=p.historyData}else r=await this.versionHelper.getVersion(e.version),i=[];const{editorContainer:s}=this.components;s.innerHTML="";const l=new VN(this.doc,r),c=this.provider.createHistoryEditor(s,l);c.editorBlockRenders.registerRender(new qN),c.editorBoxes.registerBoxClass(ZN),M(c.rootElement,L6.HISTORY);try{await MN(l,this.versionHelper,i)}finally{this.oldViewer=c}(u=this.versionOptions)!=null&&u.onVersionChanged&&this.versionOptions.onVersionChanged(this,c,e)});this.doc=e,this.provider=t;const o=A("div",["version-dialog"],null),r=A("div",["version-viewer"],o),i=new JN(r,{onCompareWithVersion:this.handleCompareWithVersion,onHelp:this.handleHelp}),s=A("div",["version-dialog-editor"],r),l=A("div",["version-list-root"],o);this.components={root:o,editorContainer:s,listContainer:l,infoHeader:i}}get versionHelper(){d(Fo,this.doc.getVersionHelper,"Can not get getVersionHelper from doc");const e=this.doc.getVersionHelper();return d(Fo,e,"current doc does not support version"),e}renderContent(e){var r;const{listContainer:t}=this.components;t.innerHTML="";const o=new DN({versions:e,versionHelper:this.versionHelper,useCreatedBy:(r=this.versionOptions)==null?void 0:r.useCreatedBy,onSelectVersion:this.handleSelectVersion,onRevert:this.handleRevert,getMarkColor:i=>{const{flag:s}=Br(this.doc,i);return s}});o.render(t),this.versionList=o}initViewVersion(){var e;if(d(Fo,this.versionList,"no versionList"),(e=this.versionOptions)!=null&&e.initSelectedVersion){const{initSelectedVersion:t}=this.versionOptions,o=this.versionList.selectVersionByVersionNum(t);d(Fo,o,`version ${t} not found`),this.viewVersion(o)}else{const t=this.versionList.activeVersion;t&&this.viewVersion(t)}}async show(e){this.versionOptions={...this.versionOptions,...e};const t=await this.versionHelper.getVersions();if(this.versionOptions.onVersionsLoaded&&this.versionOptions.onVersionsLoaded(this,t),this.components.infoHeader.dropdown.setVersions(t),this.renderContent(t),this.initViewVersion(),!this.dialog){const{root:o}=this.components;this.dialog=new TN(o)}this.dialog.show(e.container)}destroy(){var e,t;(e=this.dialog)==null||e.destroy(),(t=this.versionList)==null||t.destroy()}}const xq="",KN=w("heading-collapse");function Bf(n){var t;const e=Number.parseInt((t=n.getAttribute("data-style-heading"))!=null?t:"",10);return d(KN,e,"not a heading block"),e}function qt(n){return!!n.getAttribute("data-style-heading")}function XN(n){return!ne(n,"heading-collapsed")}function Er(n){return ne(n,"heading-collapsed")}function z6(n){if(ye(n))return!1;const t=H(n);return Ae(t)}const eF=w("heading-collapse");function Ef(n){d(eF,qt(n),"not a heading block");const e=[],t=Bf(n);let o=fe(n);for(;o&&!(qt(o)&&Bf(o)<=t);)e.push(o),o=fe(o);return e}function U6(n,e){if(!Pt(e))return;n.selection.selectBlock(e,0),Ef(e).forEach(o=>{og(o)}),M(e,"heading-collapsed")}function wi(n,e){Ef(e).forEach(o=>{rg(o)}),_(e,"heading-collapsed")}function tF(n,e){XN(e)?U6(n,e):wi(n,e)}const nF=[Ah,bh,vh,yh,kh,wh,Bh,Eh];function oF(n){const e=A("button",["heading-collapse-button"],null);return e.setAttribute(`data-editor-tooltip-${n.clientId}`,"Collapse / Expand"),e.innerHTML=Dc,e}function V6(n){return fa(n).querySelector("button.heading-collapse-button")}function q6(n,e){V6(e)||z6(e)||!Pt(e)||G1(e,oF(n),-1)}function rF(n){var e;(e=V6(n))==null||e.remove()}function W6(n,e){fa(e).querySelector("button.heading-collapse-button")||q6(n,e)}function iF(n){const e=Bf(n),t=A("button",["heading-marker"],null);return t.innerHTML=nF[e-1],t}function G6(n){return fa(n).querySelector("button.heading-marker")}function If(n){G6(n)||z6(n)||!Pt(n)||G1(n,iF(n),1)}function Z6(n){const e=G6(n);e==null||e.remove()}function Q6(n){Z6(n),qt(n)&&If(n)}class sF{handleDrop(e,t,o,r){if(Ol(t)||!qt(t)||!Er(t))return;const i=Ef(t);i.unshift(t);const s=i.reverse();let l=null;return e.doc.beginBatchUpdate(),s.forEach((c,a,u)=>{const f=e.getBlockData(c),m=yo(e.editorBlocks,e.doc.toJSON(),f),p=e.insertDocAt(o,r,m)[0];a===u.length-1&&(l=p)}),e.doc.endBatchUpdate(),e.doc.beginBatchUpdate(),s.forEach(c=>{e.deleteBlock(c)}),e.doc.endBatchUpdate(),l&&U6(e,l),!0}}const lF=w("heading-collapse");class Y6{constructor(e){h(this,"handleLoad",()=>{this.showCollapseButtons()});h(this,"handleHoverBlock",(e,t)=>{t&&(_(t,"hovering-heading"),qt(t)&&Ae(H(t))&&(If(t),Er(t)||rF(t))),e&&qt(e)&&Ae(H(e))&&(M(e,"hovering-heading"),this.editor.readonly||Z6(e),q6(this.editor,e))});h(this,"handleClick",(e,t)=>{const o=Lr(t,"button.heading-collapse-button");if(!o)return;const r=z(o);!r||(d(lF,qt(r),"not a heading block"),tF(this.editor,r),W6(this.editor,r))});this.editor=e,e.addListener("load",this.handleLoad),e.addListener("click",this.handleClick),De.get(e).addListener("change",this.handleHoverBlock),this.showCollapseButtons(),setTimeout(()=>{var o;(o=el.find(e))==null||o.addHandler(new sF)})}showCollapseButtons(){const e=Me(this.editor.rootContainer).filter(qt);e.length!==0&&(e[0]===_e(this.editor.rootContainer)&&e.splice(0,1),e.forEach(If))}destroy(){this.editor.removeListener("load",this.handleLoad),this.editor.removeListener("click",this.handleClick)}}function La(n){const e=n.selection.range;if(e.isCollapsed()||e.start.blockId===e.end.blockId)return;const t=n.getBlockById(e.start.blockId),o=n.getBlockById(e.end.blockId);Er(t)&&wi(n,t),Er(o)&&wi(n,o)}function cF(n){La(n);const e=n.getFocusedBlock();!qt(e)||Er(e)&&wi(n,e)}function aF(n){La(n);const e=n.getFocusedBlock();if(!qt(e))return;const t=n.selection.range.focus;!t.isSimple()||t.offset===G(n,e)&&Er(e)&&wi(n,e)}function uF(n){La(n);const e=n.getFocusedBlock();if(!qt(e))return;const t=n.selection.range.focus;!t.isSimple()||t.offset===0&&Er(e)&&wi(n,e)}class dF{handleBeforeKeyDown(e,t){return yu(t.key)&&La(e),t.key==="Enter"?(cF(e),!1):t.key==="Delete"?(aF(e),!1):(t.key==="Backspace"&&uF(e),!1)}}class hF{constructor(e){this.editor=e}onInsertBlock(e,t,o,r){this.updateBlockIfNeeded(o.id)}onUpdateBlockData(e,t,o,r){const i=this.editor.doc.getBlockData(e,t);this.updateBlockIfNeeded(i.id,o)}updateBlockIfNeeded(e,t){setTimeout(()=>{const o=this.editor.findBlockById(e);if(!!o){if(!qt(o)){t&&t.delete.includes("heading")&&Q6(o);return}ne(o,"hovering-heading")&&W6(this.editor,o),Q6(o)}},100)}}function fF(n){return!!n.heading}function J6(n){var t;const e=n.heading;return(t=Number.parseInt(`${e}`,10))!=null?t:1}function K6(n,e){var t;return{parentNode:e,children:[],text:ve((t=n.text)!=null?t:[]),level:J6(n),block:n}}class cl{constructor(){h(this,"nodes",[])}appendBlock(e){const t=this.findParent(J6(e),this.nodes);t?t.children.push(K6(e,t)):this.nodes.push(K6(e,null))}findParent(e,t){const o=t[t.length-1];if(!o||e<=1)return null;if(o.level===e-1)return o;const r=this.findParent(e,o.children);return r||(o.level<e?o:null)}static buildToc(e){const t=new cl,o=e.blocks.root;for(let r=0;r<o.length;r++){const i=o[r];fF(i)&&t.appendBlock(i)}return t}}class Ir extends Ve.TypedEmitter{constructor(t){super();h(this,"toc",new cl);h(this,"updateToc",nt.default(()=>{this.updateTocNow()},500));this.editor=t,t.doc.registerCallback(this),this.updateToc()}destroy(){this.editor.doc.unregisterCallback(this)}isHeadingBlock(t){return!!t.heading}onInsertBlock(t,o,r,i){t==="root"&&this.isHeadingBlock(r)&&this.updateToc()}onDeleteBlock(t,o,r){t==="root"&&this.updateToc()}onUpdateBlockText(t,o,r,i){if(t!=="root")return;const s=this.editor.doc.getBlockData(t,o);this.isHeadingBlock(s)&&this.updateToc()}onUpdateBlockData(t,o,r,i){if(t!=="root")return;const s=this.editor.doc.getBlockData(t,o);this.isHeadingBlock(s)&&this.updateToc()}static register(t){return t.addCustom("editor-toc",()=>new Ir(t))}static get(t){return t.getCustom("editor-toc")}updateTocNow(){this.toc=cl.buildToc(this.editor.doc.toJSON()),this.emit("change",this.editor,this.toc)}}const Tq="";function mF(n){return n.nodes.length===0?!0:n.nodes.length>1?!1:n.nodes[0].children.length===0}function X6(n,e){e.forEach(t=>{const o=A("div",["toc-node"],n),r=A("div",["toc-title"],o);if(A("span",["toc-text"],r,t.text).setAttribute("data-block-id",t.block.id),t.children.length>0){const s=A("div",["toc-children"],o);X6(s,t.children)}})}function gF(n,e){const t=Lr(e,".toc-text");if(!t)return;const o=t.getAttribute("data-block-id");if(!o)return;const r=n.findBlockById(o);!r||(e.preventDefault(),e.stopPropagation(),n.selection.selectBlock(r,0))}function e9(n,e,t){if(_(e,"loading"),e.innerHTML="",mF(t)){A("div",["toc-empty-message"],e,I.t("toc.empty"));return}if(t.nodes.length>=1){const[o,...r]=t.nodes,i=[...o.children,...r];X6(e,i)}Xd(n,"toc-click-handler",()=>{n.addListener("click",gF)})}class pF{constructor(e){h(this,"handleUpdateToc",(e,t)=>{Array.from(e.rootContainer.querySelectorAll('.embed-block[data-type="editor-block"][data-embed-type="toc"]')).forEach(r=>{const i=r.querySelector(".editor-toc-container");i&&e9(e,i,t)})});this.editor=e,Ir.register(e).addListener("change",this.handleUpdateToc)}destroy(){Ir.register(this.editor).removeListener("change",this.handleUpdateToc)}get toc(){return Ir.register(this.editor).toc}}function CF(n,e){const t=A("div",["editor-toc-container"],e),r=n.addCustom("init-editor-toc",()=>new pF(n)).toc;r.nodes.length===0?M(t,"loading"):e9(n,t,r)}function AF(n,e,t,o){return o==="markdown"?"[toc]":""}function bF(n,e,t){const{data:o}=t;if(!o||o.embedType!=="toc"||!$(n,e))return null;const r={};return{blockData:{id:F(),type:"embed",embedType:"toc",embedData:r}}}const t9={embedType:"toc",createEmbedContent:CF,convertTo:AF,convertFrom:bF},vF={toc:{empty:"No Toc"}},yF={toc:{empty:"No Toc"}};I.mergeLang({"zh-CN":vF,"en-US":yF});function kF(n){return!!n.getAttribute("data-style-heading")}function xf(n,e){return kF(e)&&G(n,e)>0}function wF(n){const e=bn(n.rootElement);let t=0,o=0,r=0;if(e===document.documentElement){const i=n.rootContainer.getBoundingClientRect();t=i.left+i.width/2,o=10,r=e.offsetHeight}else{const i=e.getBoundingClientRect();t=i.left+i.width/2,o=i.top+10,r=i.bottom}for(;o<r;){const i=document.elementsFromPoint(t,o);for(let s=0;s<i.length;s++){const l=z(i[s]);if(l&&n.rootContainer.contains(l))return l}o+=10}return null}function Tf(n,e){let t=e;for(;t&&!xf(n,t);)t=fe(t);return t}function n9(n){if(ye(n))return!1;const t=H(n);return Ae(t)}function Ma(n,e){let t=e;for(;t&&!xf(n,t);)t=ye(t),t&&n9(t)&&(t=null);return t}const BF=.3;class EF extends Ve.TypedEmitter{constructor(t){super();h(this,"scrollContainer");h(this,"scrollEventTarget");h(this,"scrollStatus",{curHeadingBlock:null,previousHeadingBlock:null,nextHeadingBlock:null});h(this,"handleScroll",nt.default(()=>{const t={curHeadingBlock:null,previousHeadingBlock:null,nextHeadingBlock:null};let o=wF(this.editor);if(o&&(o=_u(o)),!o||!this.scrollContainer){this.setStatus(t);return}if(n9(o)&&(o=fe(o)),!o){this.setStatus(t);return}if(xf(this.editor,o)){t.curHeadingBlock=o,t.previousHeadingBlock=Ma(this.editor,o),t.nextHeadingBlock=Tf(this.editor,o),this.setStatus(t);return}const r=this.scrollContainer.getBoundingClientRect(),i=Tf(this.editor,o);if(i){const l=i.getBoundingClientRect();if(l.top>r.top&&l.top<r.top+r.height*BF){t.curHeadingBlock=i,t.previousHeadingBlock=Ma(this.editor,i),t.nextHeadingBlock=Tf(this.editor,i),this.setStatus(t);return}t.nextHeadingBlock=i}const s=Ma(this.editor,o);s&&(t.curHeadingBlock=s,t.previousHeadingBlock=Ma(this.editor,s)),this.setStatus(t)},200));this.editor=t,setTimeout(()=>{this.start()},50)}setStatus(t){this.scrollStatus.previousHeadingBlock===t.previousHeadingBlock&&this.scrollStatus.nextHeadingBlock===t.nextHeadingBlock&&this.scrollStatus.previousHeadingBlock===t.previousHeadingBlock||(this.scrollStatus=t,this.emit("change",this.editor,t))}start(){this.stop(),this.scrollContainer=bn(this.editor.rootElement),this.scrollEventTarget=this.scrollContainer===document.documentElement?document:this.scrollContainer,this.scrollEventTarget.addEventListener("scroll",this.handleScroll),this.handleScroll()}stop(){this.scrollEventTarget&&this.scrollEventTarget.removeEventListener("scroll",this.handleScroll)}destroy(){this.stop(),this.scrollEventTarget=void 0}}class Sf{constructor(e,t){h(this,"suggest");h(this,"onShow",(e,t,o,r)=>{const i=this.editor.getBlockByIndex(t,o);if(!Pt(i)){const s=z(H(i));if(s&&se(s)==="code")return!1}return!0});h(this,"onClickItem",(e,t,o)=>{const r=t.data,i={id:F(),type:"mention",box:!0,created:Date.now(),iconUrl:r.avatarUrl,text:r.displayName,mentionId:r.userId},s=this.editor.selection.range;if(!s.isCollapsed()||!s.isSimple())return;const l=s.focus,c=this.editor.getBlockById(l.blockId);this.editor.insertBoxToBlock(c,l.offset,i)});h(this,"queryItems",async(e,t)=>(await this.options.queryUsers(this.editor,t)).map(i=>({id:i.userId,name:i.displayName,icon:`<img src="${i.avatarUrl}" class="mention-user-avatar">`,element:i.element,data:i,subText:i.email})));this.editor=e,this.options=t,this.suggest=new Oh(e,{id:"editor-mention",trigger:["@"],autoDeleteTrigger:!0,showLoading:!0,enableFirstBlock:t.enableFirstBlock,onShow:this.onShow,onClickItem:this.onClickItem,queryItems:this.queryItems})}destroy(){}}w("mathjax-box");function IF(n,e,t,o){const r=o,i=A("a",["mention-container"],t);A("span",["mention-name"],i,`@${r.text}`),i.setAttribute("data-mention-id",r.mentionId)}function xF(n,e,t){}function TF(n,e,t,o){return`@${e.text}`}const Df={boxType:"mention",updateBoxContent:IF,handleClickBox:xF,convertTo:TF};function SF(n){const e=A("div",["mention-button-wrap"],null),t=Io("mention-button",I.t("list.mention.tooltip"),RB,[],n.clientId);return e.appendChild(t),e}class DF{constructor(e){h(this,"mentionButton");h(this,"handleHoveringBlock",e=>{var t;!this.editor.isWritable()||(e&&this.shouldBlockShowMention(e)?Ne(e).appendChild(this.mentionButton):(t=this.mentionButton)==null||t.remove())});h(this,"handleMouseDown",(e,t)=>{t.preventDefault(),t.stopPropagation();const o=z(this.mentionButton);if(!o||!$(e,o))return;const r=e.selection.range.focus;if(!r.isSimple())return;let i;e.selection.focusedBlock!==o?i=G(e,o):i=r.offset,setTimeout(()=>{const s=e.insertTextToBlock(o,i,"@");i+=1;const l=ve(kt(s,i).left);this.editor.selection.selectBlock(o,i),this.editor.focus(),e.getCustom("mention").suggest.popup(o,i,l,"@")})});h(this,"destroy",()=>{De.get(this.editor).removeListener("change",this.handleHoveringBlock)});this.editor=e,this.mentionButton=SF(e),De.get(this.editor).addListener("change",this.handleHoveringBlock),e.domEvents.addEventListener(this.mentionButton,"mousedown",this.handleMouseDown)}shouldBlockShowMention(e){if(!$(this.editor,e)||!ue(e))return!1;const t=Ot(e);return!(t==="ordered"||t==="unordered")}}const Sq="",LF={templates:{title:"\u9009\u62E9\u6A21\u677F\uFF0C\u5FEB\u901F\u521B\u5EFA",create:"\u65B0\u5EFA\u6A21\u677F",choose:"\u5168\u90E8\u6A21\u677F",customizedMark:"\u81EA\u5B9A\u4E49"}},MF={templates:{title:"Choose a template",create:"New template",choose:"All templates",customizedMark:"Custom"}};I.mergeLang({"zh-CN":LF,"en-US":MF});const Dq="",RF="data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjEyMCIgaGVpZ2h0PSIxMjAiIHZpZXdCb3g9IjAgMCAxMjAgMTIwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTQ4IDU5QzQ4IDU0LjU4MTcgNTEuNTgxNyA1MSA1NiA1MUg5M0M5OC41MjI4IDUxIDEwMyA1NS40NzcyIDEwMyA2MVY4OEMxMDMgOTEuODY2IDk5Ljg2NiA5NSA5NiA5NUg1NkM1MS41ODE3IDk1IDQ4IDkxLjQxODMgNDggODdWNTlaIiBmaWxsPSIjRDZFOUZBIi8+CjxwYXRoIGQ9Ik0xOCA2NEMxOCA2Mi4zNDMxIDE5LjM0MzEgNjEgMjEgNjFINTZDNjAuNDE4MyA2MSA2NCA2NC41ODE3IDY0IDY5VjgzQzY0IDg1LjIwOTEgNjIuMjA5MSA4NyA2MCA4N0gyNkMyMS41ODE3IDg3IDE4IDgzLjQxODMgMTggNzlWNjRaIiBmaWxsPSIjRUFFNEY2Ii8+CjxyZWN0IHg9IjI0IiB5PSIzMSIgd2lkdGg9IjY1IiBoZWlnaHQ9IjUwIiByeD0iNSIgZmlsbD0iIzk5QzdGMiIvPgo8cmVjdCB4PSIzMy41IiB5PSI0MyIgd2lkdGg9IjQ2IiBoZWlnaHQ9IjUiIHJ4PSIyLjUiIGZpbGw9IndoaXRlIi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jkzNjIgMjE4LjMwOSA5OC45MzYyIDIxNi42N0M5OC45MzYyIDIxNS4wMzEgOTcuNjA3MyAyMTMuNzAyIDk1Ljk2ODEgMjEzLjcwMkg5MC4wMzE5WiIgZmlsbD0iIzkxRDlCRSIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzEyNTZfMzcxNjgiPgo8cmVjdCB3aWR0aD0iMzcyIiBoZWlnaHQ9IjI3OSIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K",o9=w("templates");function Lf(n){const e=n.rootElement.querySelector(":scope .editor-templates");if(!e)return null;const t=e.querySelector(":scope .editor-templates-cards");return d(o9,t,"no card container"),{root:e,cardContainer:t}}function PF(n){const e=Lf(n);if(e)return e.cardContainer.innerHTML="",e;const t=A("div",["editor-templates"],n.rootElement);A("div",["editor-templates-title"],t,I.t("templates.title"));const o=A("div",["editor-templates-cards"],t);return{root:t,cardContainer:o}}function r9(n,e,t,o,r){var f;const i=(f=n.options.componentsOptions)==null?void 0:f.templates,s=A("div",["editor-template-card",...o],null),l=A("div",["editor-template-thumb-container"],s),c=A("img",["editor-template-thumb"],l);c.src=e,c.style.display="none",c.onerror=()=>{var p;const m=(p=i==null?void 0:i.placeHolderImageSrc)!=null?p:OF;c.src!==m&&(c.src=m)},c.onload=()=>{c.style.display=""};const a=A("div",["editor-template-name"],s),u=A("span",[],a,t);return i!=null&&i.showTemplateTitleAttr&&u.setAttribute("title",t),s.onclick=()=>r(s),s}function NF(n,e){return e.thumbnailUrl?e.thumbnailUrl:n.doc.buildResourceUrl("thumbnail.png")}function FF(n,e){const t=NF(n,e);return r9(n,t,e.name,[],async()=>{var r,i;const o=(r=n.options.componentsOptions)==null?void 0:r.templates;(i=o==null?void 0:o.onApplyTemplate)==null||i.call(o,n,e)})}function $F(n,e){return r9(n,e,I.t("templates.choose"),["more"],()=>{var o,r;const t=(o=n.options.componentsOptions)==null?void 0:o.templates;(r=t==null?void 0:t.onChooseTemplate)==null||r.call(t,n)})}function _F(n,e){var f,m;const t=(f=n.options.componentsOptions)==null?void 0:f.templates;if(!t)return;const r=Je(n.rootContainer).getBoundingClientRect().width;let i=1;const s=RF,l=Lf(n);if(l){if(e!=null&&e.reset){const p=Array.from(l.cardContainer.children),b=l.cardContainer.firstElementChild;if(d(o9,b,"no first card"),ne(b,"new")||ne(b,"more"))return;const k=window.getComputedStyle(b),v=parseFloat(k.marginLeft),T=parseFloat(k.marginRight),E=b.getBoundingClientRect().width+v+T;i=Math.floor(r/E);const L=Math.max(1,i-1-1),P=p.length-1;p.forEach((V,ee)=>{ee>L&&ee<P?V.style.display="none":(ee>=P&&ne(V,"more"),V.style.display="")})}return}const c=t.templates,{cardContainer:a}=PF(n);c.forEach((p,b)=>{const k=FF(n,p);if(b>0&&b>=i&&(k.style.display="none"),a.appendChild(k),b===0){const v=window.getComputedStyle(k),T=parseFloat(v.marginLeft),E=parseFloat(v.marginRight),R=k.getBoundingClientRect().width+T+E;i=Math.floor(r/R)-1}});const u=$F(n,s);a.appendChild(u),(m=t==null?void 0:t.onTemplateChooserStatusChanged)==null||m.call(t,n,a,"visible")}const i9=nt.default(_F,50);function HF(n){var o,r;const e=Lf(n);if(!e)return;e.root.remove();const t=(o=n.options.componentsOptions)==null?void 0:o.templates;(r=t==null?void 0:t.onTemplateChooserStatusChanged)==null||r.call(t,n,null,"hide")}function jF(n){const e=n.blocks.root;if(e.length===0)return!0;if(e.length>5)return!1;const t=[...e];t[0].type==="text"&&t[0].heading&&t.splice(0,1);const o=r=>{var i;return r.type!=="text"&&r.type!=="list"?!1:r.text?((i=r.text)==null?void 0:i.length)===0:!0};return t.every(r=>o(r))}function Ra(n,e){jF(n.doc.toJSON())?i9(n,e):(i9.cancel(),HF(n))}const zF=800;class UF{constructor(e){h(this,"longPressTimeout",0);h(this,"handleSelectionChange",()=>{});h(this,"handleLongPress",e=>{const t=e.touches[0],o=Ul(this.editor,t.clientX,t.clientY);!o||console.log(o)});h(this,"handleTouchStart",e=>{e.touches.length===1&&(this.longPressTimeout=window.setTimeout(()=>{this.handleLongPress(e)},zF))});h(this,"handleTouchEnd",e=>{this.longPressTimeout&&(window.clearTimeout(this.longPressTimeout),this.longPressTimeout=0)});this.editor=e,this.editor.addListener("selectionChanged",this.handleSelectionChange),document.addEventListener("touchstart",this.handleTouchStart),document.addEventListener("touchend",this.handleTouchEnd)}destroy(){this.editor.removeListener("selectionChanged",this.handleSelectionChange),document.removeEventListener("touchstart",this.handleTouchStart),document.removeEventListener("touchend",this.handleTouchEnd)}}const VF=`<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
574
574
  <g>
575
575
  <path fill-rule="evenodd" clip-rule="evenodd" d="M12 7.61719C11.4477 7.61719 11 7.16947 11 6.61719V3.61719C11 3.0649 11.4477 2.61719 12 2.61719C12.5523 2.61719 13 3.0649 13 3.61719V6.61719C13 7.16947 12.5523 7.61719 12 7.61719ZM4.92893 5.54612C5.31946 5.15559 5.95262 5.1556 6.34315 5.54612L8.46447 7.66744C8.85499 8.05796 8.85499 8.69113 8.46447 9.08165C8.07394 9.47218 7.44078 9.47218 7.05025 9.08165L4.92893 6.96033C4.53841 6.56981 4.53841 5.93664 4.92893 5.54612ZM15.5355 9.08165C15.145 8.69113 15.145 8.05796 15.5355 7.66744L17.6569 5.54612C18.0474 5.1556 18.6805 5.1556 19.0711 5.54612C19.4616 5.93664 19.4616 6.56981 19.0711 6.96033L16.9497 9.08165C16.5592 9.47218 15.9261 9.47218 15.5355 9.08165ZM2 12.6172C2 12.0649 2.44772 11.6172 3 11.6172L6 11.6172C6.55229 11.6172 7 12.0649 7 12.6172C7 13.1695 6.55228 13.6172 6 13.6172L3 13.6172C2.44772 13.6172 2 13.1695 2 12.6172ZM17 12.6172C17 12.0649 17.4477 11.6172 18 11.6172L21 11.6172C21.5523 11.6172 22 12.0649 22 12.6172C22 13.1695 21.5523 13.6172 21 13.6172L18 13.6172C17.4477 13.6172 17 13.1695 17 12.6172ZM15.5355 16.1527C15.9261 15.7622 16.5592 15.7622 16.9497 16.1527L19.0711 18.274C19.4616 18.6646 19.4616 19.2977 19.0711 19.6883C18.6805 20.0788 18.0474 20.0788 17.6569 19.6883L15.5355 17.5669C15.145 17.1764 15.145 16.5432 15.5355 16.1527ZM4.92893 19.6883C4.53841 19.2977 4.53841 18.6646 4.92893 18.274L7.05025 16.1527C7.44078 15.7622 8.07394 15.7622 8.46447 16.1527C8.85499 16.5432 8.85499 17.1764 8.46447 17.5669L6.34315 19.6883C5.95262 20.0788 5.31946 20.0788 4.92893 19.6883ZM12 22.6172C11.4477 22.6172 11 22.1695 11 21.6172V18.6172C11 18.0649 11.4477 17.6172 12 17.6172C12.5523 17.6172 13 18.0649 13 18.6172V21.6172C13 22.1695 12.5523 22.6172 12 22.6172Z" fill="#5587F0"/>
576
576
  <animateTransform attributeType="xml" attributeName="transform" type="rotate" values="0 12 12.5;360 12 12.5" dur="2s" repeatCount="indefinite" />
@@ -691,4 +691,4 @@ ${i.mermaidText}
691
691
  ${i.flowchartText}
692
692
  \`\`\`\`\`\``}return"[flowchart]"}const y9={embedType:"flowchart",convertFrom:v_,handleUpdateBlock:b_,createEmbedContent:A_,getBlockProperties:y_,convertTo:k_},w_=w("plantuml-helper");function k9(n,e){var l;let o=((l=(n.getComponentOptions("plantuml")||{}).cdn)==null?void 0:l.plantuml)||n_;o.endsWith("/")||(o+="/");const r=$8.default.encode(e);d(w_,r,r),o+=r;const s=new URLSearchParams(document.location.search).get("doc");return wu(o,{id:`${s}-${F()}`})}async function B_(n,e){const t=await Of(n,e);return(await n.doc.uploadResource(t)).resourceId}class xi extends _f{constructor(e){super(e,"plantuml","plantumlText")}static get(e,t){return e.addCustom(`plantuml-${t.id}`,()=>new xi(e))}code2ObjectUrl(e){return Promise.resolve(k9(this.editor,e))}code2ResourceId(e){const t=k9(this.editor,e);return B_(this.editor,t)}destroy(){}}function E_(n,e,t){xi.get(n,t).createEmbedContent(e,t)}function I_(n,e,t){const o=xi.get(n,t),r=le(e);return o.updateEmbedContent(r,t),!0}function x_(n,e,t){const{data:o}=t,r=n.getBlockString(e).trim();if(!o||o.embedType!=="plantuml"||r!=="```plantuml"||!$(n,e))return null;const i={src:"",plantumlText:""};return{blockData:{id:F(),type:"embed",embedType:"plantuml",embedData:i},onConverted:(c,a)=>{xi.get(c,c.getBlockData(a)).editGraph(le(a))}}}function T_(n,e){return xi.get(n,n.getBlockData(e)).getBlockProperties(e)}function S_(n,e,t,o){const{embedData:r}=e,i=r;if(o==="html")return i.src?`<img src="${n.doc.buildResourceUrl(i.src,{withToken:!0})}" />`:i.flowchartText?`<div>${i.flowchartText}</div>`:"<p>[plantuml]</p>";if(o==="markdown"){if(i.src)return`![plantuml](${n.doc.buildResourceUrl(i.src,{withToken:!0})})`;if(i.flowchartText)return`\`\`\`plantuml\`\`\`
693
693
  ${i.flowchartText}
694
- \`\`\`\`\`\``}return"[plantuml]"}const w9={embedType:"plantuml",convertFrom:x_,handleUpdateBlock:I_,createEmbedContent:E_,getBlockProperties:T_,convertTo:S_},$q="",D_="hr",L_={dividingLine:{type:"\u5206\u5272\u7EBF",abstract:"\u5206\u5272\u7EBF"}},M_={dividingLine:{type:"Separation line",abstract:"Line"}},R_={dividingLine:{type:"\u533A\u5207\u308A\u7DDA",abstract:"\u533A\u5207\u308A\u7DDA"}};I.mergeLang({"zh-CN":L_,"en-US":M_,"ja-JP":R_});function O_(n,e){const t=A("div",["editor-embed-container"],e);A("hr",["editor-embed-hr"],t)}function P_(n,e,t,o){return o==="html"?"<hr />":o==="markdown"?"---":"------------"}function N_(){return{name:"hr",insertEmbedCommandItems:[{id:"insert-hr",name:I.t("dividingLine.type"),icon:BB,order:500,group:"common",subText:At("insert-hr")}],handleInsertEmptyEmbed:async(n,e)=>{const{containerId:t,blockIndex:o}=e;return n.insertEmbed(t,o,D_,{})}}}function F_(n,e,t){const{data:o}=t;if(!o||o.embedType!=="dividing-line"||!$(n,e))return null;const r={};return{blockData:{id:F(),type:"embed",embedType:"hr",embedData:r}}}function $_(){return{abstract:I.t("dividingLine.abstract")}}const B9={embedType:"hr",createEmbedContent:O_,convertTo:P_,getOptions:N_,convertFrom:F_,getBlockProperties:$_},_q="",Hq="",__={media:{upload:{failed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>'},load:{failed:'<div class="line-1">{name}\u52A0\u8F7D\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>'},audio:{menuItem:"\u97F3\u9891",abstract:"\u97F3\u9891"},video:{menuItem:"\u89C6\u9891",abstract:"\u89C6\u9891"}}},H_={media:{upload:{failed:'<div class="line-1">{name} upload failed</div><div class="line-2">The network service is abnormal, you can <span class="retry-upload">Try again</span></div>'},load:{failed:'<div class="line-1">{name} loading failed</div><div class="line-2">The network service is abnormal, you can <span class="retry-upload">Try again</span></div>'},audio:{menuItem:"Audio",abstract:"Audio"},video:{menuItem:"Video",abstract:"Video"}}};I.mergeLang({"zh-CN":__,"en-US":H_});var gn=(n=>(n.AUDIO="audio",n.VIDEO="video",n))(gn||{}),ul=(n=>(n.Empty="empty",n.Progress="progress",n.Error="error",n))(ul||{});const E9=10*1024*1024,j_=["wav","mp3","aac","ogg","webm","flac"],z_=["ogg","mp4","webm"],U_=()=>{};function I9(n){var u,f,m,p,b,k;const e=(u=n.getComponentOptions("media"))!=null?u:{},{allowedMedias:t,maxSize:o,callbacks:r}=e,i=(f=t==null?void 0:t.audio)!=null?f:j_,s=(m=t==null?void 0:t.video)!=null?m:z_,l=(p=o==null?void 0:o.audio)!=null?p:E9,c=(b=o==null?void 0:o.video)!=null?b:E9,a=(k=r==null?void 0:r.onError)!=null?k:U_;return{allowedMedias:{audio:i,video:s},maxSize:{audio:l,video:c},callbacks:{onError:a}}}const V_=w("file-utils");function q_(n){d(V_,n instanceof File,`The file: ${n} isn't instance of File`);const{name:e}=n;if(!e)return"";const t=e.lastIndexOf(".");return t===-1?"":e.slice(t+1)}function W_(n,e){const t=i=>i.map(s=>`.${s}`).join(","),{allowedMedias:o}=I9(n),r=o[e];return r?t(r):"*"}function G_(n,e,t){const{maxSize:o,callbacks:r,allowedMedias:i}=I9(e),{[t]:s}=o,{[t]:l}=i;if(s&&n.size>s){const a=new Error("media is too large");throw a.code=`MaxMediaSize-${t}`,r!=null&&r.onError&&(r==null||r.onError(e,a)),a}const c=q_(n);if(l&&!l.includes(c)){const a=new Error(`media file is not allowed: ${c}`);throw a.code="NotAllowedFile",r!=null&&r.onError&&(r==null||r.onError(e,a)),a}}function Z_(n){return n===ul.Empty||n===ul.Error}const Ye=w("media");class Q_ extends Ve.TypedEmitter{constructor(t){super();h(this,"mediaContainer",null);h(this,"media",null);h(this,"abstract",null);h(this,"handleMediaLoadError",(t,o)=>{if(!o.target||!(o.target instanceof Node)||!(o.target instanceof Element?o.target:o.target.parentElement))return;const i=z(o.target);if(!i||!i.contains(this.mediaContainer))return;const s=this.renderError();this.updateMediaContent(s),this.emit("mediaError",t,"load_error",j(i))});h(this,"handleUploadFile",async t=>{d(Ye,this.abstract,"no abstract"),d(Ye,this.mediaContainer,"The media element not exist");const{editor:o}=this.options,r=z(this.mediaContainer);d(Ye,r,"The block element not exist");const i=o.getBlockData(r);try{const{resourceId:s}=await o.doc.uploadResource(t,{onProgress:f=>{this.renderProgress(f,t)}}),{name:l,type:c,size:a}=t,u={...i,embedData:{...i.embedData,src:s,fileName:l,fileSize:a,fileType:c}};o.updateBlockData(r,u)}catch(s){Ye.error(s),this.emit("mediaError",o,"upload_error",i.id),this.renderRetry(t)}_(r,"media-block-uploading")});h(this,"destroy",()=>{this.mediaContainer=null});this.options=t}bindMediaEvent(){const{editor:t}=this.options;this.media&&t.domEvents.addEventListener(this.media,"error",this.handleMediaLoadError)}unbindMediaEvent(){const{editor:t}=this.options;this.media&&t.domEvents.removeEventListener(this.media,"error",this.handleMediaLoadError)}updateMediaContent(t){d(Ye,this.mediaContainer,"The media element not exist"),this.mediaContainer.innerHTML="",this.mediaContainer.append(t)}renderError(){d(Ye,this.abstract,"no abstract");const{editor:t,createMediaElement:o}=this.options,{mediaIcon:r,mediaName:i}=this.abstract;d(Ye,this.mediaContainer,"The media element not exist");const s=z(this.mediaContainer);d(Ye,s,"The block element not exist");const l=t.getBlockData(s),c=l.embedData.src,a=A("div",["media-error","embed-selected-content","embed-hover-content"],null),u=A("span",["media-error-icon"],a);u.innerHTML=r;const f=A("div",[],a);f.innerHTML=I.t("media.load.failed",{name:i}),a.appendChild(f);const m=f.querySelector(".retry-upload");return d(Ye,m,"The element not exist"),t.domEvents.addEventListener(m,"click",(p,b)=>{const k=A("div",["media-element"],null),v=this.getResourceUrl(c),T=o(p,k,l,v);this.unbindMediaEvent(),this.media=T,this.bindMediaEvent(),this.updateMediaContent(k)}),this.setFullScreen(),a}renderRetry(t){d(Ye,this.abstract,"no abstract");const{editor:o}=this.options,{mediaIcon:r,mediaName:i}=this.abstract,s=A("div",["media-error","embed-selected-content","embed-hover-content"],null),l=A("span",["media-error-icon"],s);l.innerHTML=r;const c=A("div",[],s);c.innerHTML=I.t("media.upload.failed",{name:i}),s.appendChild(c);const a=c.querySelector(".retry-upload");d(Ye,a,"The element not exist"),o.domEvents.addEventListener(a,"click",()=>{o.readonly||(d(Ye,this.abstract,"no abstract"),this.handleUploadFile(t))}),this.updateMediaContent(s),this.setFullScreen()}renderProgress(t,o){d(Ye,this.mediaContainer,"The media element not exist");const r=this.mediaContainer.querySelector(":scope .media-progress"),i=t===-1||t===100?100:t;if(r){const{updateProgressElement:s}=this.options;s(r,i)}else{const{createProgressElement:s}=this.options,l=z(this.mediaContainer);d(Ye,l,"The element not exist"),M(l,"media-block-uploading");const c=A("div",["media-progress"],null);s(c,i,o),this.updateMediaContent(c)}this.setFullScreen()}renderMediaElement(t){d(Ye,this.mediaContainer,"The media element not exist");const o=this.mediaContainer.querySelector(":scope > .media-element"),{createMediaElement:r,updateMediaElement:i,editor:s}=this.options,l=this.getResourceUrl(t.embedData.src);if(o){const c=i(s,o,t,l);this.unbindMediaEvent(),this.media=c,this.bindMediaEvent()}else{const c=A("div",["media-element"],null),a=r(s,c,t,l);this.unbindMediaEvent(),this.media=a,this.bindMediaEvent(),this.updateMediaContent(c)}}renderEmpty(t){d(Ye,this.abstract,"no abstract"),d(Ye,this.mediaContainer,"The media element not exist");const o=A("div",["media-empty","embed-selected-content","embed-hover-content"],this.mediaContainer);o.innerHTML=this.abstract.mediaIcon,this.updateMediaContent(o);const{editor:r}=this.options;r.findBlockById(t.id)&&this.emit("mediaError",r,"empty",t.id),this.setFullScreen()}getResourceUrl(t){const{editor:o}=this.options;return o.doc.buildResourceUrl(t)}setFullScreen(){d(Ye,this.mediaContainer,"The media element not exist"),M(this.mediaContainer,"full-screen")}removeFullScreen(){d(Ye,this.mediaContainer,"The media element not exist"),_(this.mediaContainer,"full-screen")}render(t,o){const{src:r}=t.embedData;(!this.mediaContainer||!o.contains(this.mediaContainer))&&(this.mediaContainer=A("div",["media"],o)),Z_(r)?r===ul.Empty&&this.renderEmpty(t):this.renderMediaElement(t)}setAbstract(t){this.abstract=t}}w("media-embed");class x9{constructor(){h(this,"handleInsertEmptyEmbed",async(e,t)=>{var f;const{containerId:o,blockIndex:r}=t;let i;(f=t.data)!=null&&f.file&&(i=t.data.file);const s=W_(e,this.embedType);if(i=i!=null?i:await Rr(s,{}),!i)return null;const{mediaType:l}=this.getAbstract();try{G_(i,e,l)}catch{return null}const c={id:F(),type:"embed",embedType:this.embedType,embedData:{src:ul.Empty}},a=e.insertBlock(o,r,c);return await this.getMedia(e,c.id).handleUploadFile(i),a})}getMedia(e,t){const o=e.addCustom(`media-${t}`,()=>new Q_({editor:e,createMediaElement:this.createMediaElement,updateMediaElement:this.updateMediaElement,createProgressElement:this.createProgressElement,updateProgressElement:this.updateProgressElement}));return o.setAbstract({...this.getAbstract()}),o}getOptions(){const{menuItem:e,mediaIcon:t,mediaName:o,order:r,group:i}=this.getAbstract();return{name:o,insertEmbedCommandItems:[{id:`insert-${this.embedType}`,name:e,icon:t,order:r,group:i,subText:At(`insert-${this.embedType}`)}],handleInsertEmptyEmbed:this.handleInsertEmptyEmbed}}createEmbedContent(e,t,o){const{id:r}=o;this.getMedia(e,r).render(o,t)}handleUpdateBlock(e,t,o){const{id:r}=o,i=this.getMedia(e,r),s=le(t);return i.render(o,s),!0}handleDeleteBlock(e,t){const o=t.id,r=this.getMedia(e,o);r.removeAllListeners(),r.destroy()}convertTo(e,t,o,r){const i=t.embedData,s=e.doc.buildResourceUrl(i.src,{withToken:!0});return r==="html"?`<${i.type} src="${s}" />`:r==="markdown"?`![${i.src}](${s})`:s}}function T9(n,e){const t=A("div",["uploading-progress-mask"],n),o=A("div",["uploading-progress-bar"],t),r=A("div",["uploading-progress-bar-value"],o);r.style.width=`${e}%`}function S9(n,e){const t=n.querySelector(".uploading-progress-bar-value");t&&(t.style.width=`${e}%`)}const Y_=w("media-audio");class J_ extends x9{constructor(){super(...arguments);h(this,"embedType",gn.AUDIO);h(this,"updateProgressElement",S9);h(this,"createMediaElement",(t,o,r,i)=>{const s=A("div",["audio-container","embed-hover-content","embed-selected-content"],o),l=A("audio",[],s);return l.innerHTML="Your browser does not support the <code>audio</code> element.",l.controls=!0,l.src=i,setTimeout(()=>{this.getMedia(t,r.id).setFullScreen()}),l})}getAbstract(){return{mediaIcon:yB,mediaName:I.t(`media.${gn.AUDIO}.menuItem`),menuItem:I.t(`media.${gn.AUDIO}.menuItem`),order:800,mediaType:gn.AUDIO,group:"common"}}getBlockProperties(){return{abstract:`[${I.t(`media.${gn.AUDIO}.abstract`)}]`}}updateMediaElement(t,o,r,i){const s=o.querySelector(":scope .audio-container > audio");return d(Y_,s,"The media element not exist"),s.src!==i&&(s.src=i),s}createProgressElement(t,o){const r=A("audio",[],t);r.innerHTML="Your browser does not support the <code>audio</code> element.",r.controls=!0,r.src="about:blank",T9(t,o)}}const D9=new J_;w("video-resizer");function L9(n){return n&&Ke(n)&&Nt(n)==="video"}const K_=50;class M9{constructor(e){h(this,"currentResizableElement",null);h(this,"resizing",!1);h(this,"handleHoveringBlockChange",(e,t)=>{if(!this.resizing&&(t&&L9(t)&&this.disableBlockResize(t),e&&L9(e))){const o=this.getVideoElement(e);if(!o)return;this.enableBlockResize(e,o)}});h(this,"handleResizing",(e,t)=>{if(this.resizing=!0,!this.currentResizableElement)return;const o=e.getBlock();if(!o)return;const r=o.getBoundingClientRect().width,i=Math.min(Math.max(t.width,K_),r);this.currentResizableElement.style.width=`${i}px`});h(this,"handleResized",e=>{this.resizing=!1;const t=e.getBlock();if(!this.currentResizableElement||!t)return;const o=this.editor.getBlockData(t),{width:r}=this.currentResizableElement.getBoundingClientRect();this.editor.updateBlockData(t,{...o,width:r})});this.editor=e,De.get(e).addListener("change",this.handleHoveringBlockChange)}destroy(){this.currentResizableElement=null,De.get(this.editor).removeListener("change",this.handleHoveringBlockChange)}getVideoElement(e){return le(e).querySelector(":scope .video-container > video")}disableBlockResize(e){const t=this.editor.findCustom(`${j(e)}-resizer`);t&&t.disableResize()}enableBlockResize(e,t){const o=this.editor.addCustom(`${j(e)}-resizer`,()=>new Qs(this.editor,{resize:["top-left","top-right","bottom-left","bottom-right"]}));o.enableResize(e,t),o.removeListener("resizing",this.handleResizing),o.removeListener("resized",this.handleResized),o.addListener("resizing",this.handleResizing),o.addListener("resized",this.handleResized),this.currentResizableElement=t}}const X_=w("video");class eH extends x9{constructor(){super(...arguments);h(this,"embedType",gn.VIDEO);h(this,"updateProgressElement",S9);h(this,"createMediaElement",(t,o,r,i)=>{const s=A("div",["video-container","embed-selected-content","drag-preview-element"],o),l=A("video",[],s);return l.innerHTML="Your browser does not support the <code>video</code> element.",l.controls=!0,l.src=i,l.addEventListener("canplay",()=>{t.addCustom("video-resizer",()=>new M9(t)),this.getMedia(t,r.id).removeListener("mediaError",this.handleMediaError),this.getMedia(t,r.id).addListener("mediaError",this.handleMediaError),this.getMedia(t,r.id).removeFullScreen()}),r.width&&(l.style.width=`${r.width}px`),l});h(this,"createProgressElement",(t,o,r)=>{const i=A("video",["progress-video"],t);i.innerHTML="Your browser does not support the <code>audio</code> element.",i.controls=!0,T9(t,o),Mr(r).then(s=>{const l=t.querySelector(".progress-video");l&&Fu(t)&&(l.src=s)})})}getAbstract(){return{mediaName:I.t(`media.${gn.VIDEO}.menuItem`),mediaIcon:kB,menuItem:I.t(`media.${gn.VIDEO}.menuItem`),order:700,mediaType:gn.VIDEO,group:"common"}}getBlockProperties(){return{abstract:`[${I.t(`media.${gn.VIDEO}.abstract`)}]`}}handleMediaError(t,o,r){const i=t.addCustom("video-resizer",()=>new M9(t)),s=t.getBlockById(r);i.disableBlockResize(s)}updateMediaElement(t,o,r,i){const s=o.querySelector(":scope .video-container > video");return d(X_,s,"The media element not exist"),s.src!==i&&(s.src=i),s}}const R9=new eH,O9=[ia,ua,z1,j3],Hf=[Ff,c9,A9,y9,w9,J3,B9,R9,D9,uC,t9,CN],P9=[B1,Df,b6];function tH(n,e,t){var r,i,s;const o=fs(n,e,{components:{blocks:[...O9,...((r=t==null?void 0:t.components)==null?void 0:r.blocks)||[]],embeds:[...Hf,...((i=t.components)==null?void 0:i.embeds)||[]],boxes:[...P9,...((s=t.components)==null?void 0:s.boxes)||[]],textRenders:[new b3],options:{...t.componentsOptions}}});return o.readonly=!0,o.addCustom("heading-collapse",()=>new Y6(o)),o}class nH{constructor(e){this.createOptions=e}createHistoryEditor(e,t){return tH(e,t,this.createOptions)}}w("create-editor");function N9({root:n,childDoc:e,doc:t}){e.uploadResource=t.uploadResource.bind(t),e.buildResourceUrl=t.buildResourceUrl.bind(t);const o=fs(n,e,{shortcuts:[mc],components:{blocks:[ia,ua],decorators:[new da],embeds:[uC,Ff,c9,A9,y9,w9,J3,B9,R9,D9],boxes:[B1,Df],options:{image:{defaultAlign:"left"}}}});return o.input.addHandler(new sa),o.input.addHandler(new tf(o)),o.input.addHandler(new DP(o)),o.input.addHandler(new Y1),o}function oH(n,e){const t=Array.from(n.rootContainer.querySelectorAll(`[comment-${e.toLocaleLowerCase()}="${e}"]`)),o=new Set;t.forEach(r=>{const i=z(r);i&&o.add(i)}),o.forEach(r=>{LP(n,r,e)})}class rH{constructor(e){h(this,"listeners",new Set);h(this,"doc");this.editor=e,this.doc=this.editor.doc.externalDoc,this.doc.registerCallback(this)}getComments(){return this.doc.getComments()}getComment(e){return this.doc.getComment(e)}getCommentDoc(e){return this.doc.getCommentDoc(e)}localCreateComment(e,t){this.doc.localCreateComment(e,t)}localDeleteComment(e){const t=this.getComment(e);this.doc.localDeleteComment(e);const o=t.groupId;this.getComments().filter(i=>i.groupId===o).length===0&&oH(this.editor,o)}localUpdateComment(e,t){this.doc.localUpdateComment(e,t)}onCreateComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onCreateComment(e,t))}onDeleteComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onDeleteComment(e,t))}onUpdateComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onUpdateComment(e,t))}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}createCommentEditor(e,t){var r,i;const o=N9({root:e,childDoc:t,doc:this.doc});if((r=this.editor.options.componentsOptions)!=null&&r.mention){const s=this.editor.options.componentsOptions.mention;o.addCustom("mention",()=>new Sf(o,{...s,enableFirstBlock:!0}))}if((i=this.editor.options.componentsOptions)!=null&&i.comment){const s=this.editor.options.componentsOptions.comment;s.onCommentEditorClick&&o.addListener("click",s.onCommentEditorClick)}return o}allowEdit(e){return e.userId===this.doc.getUser().userId}}class iH{constructor(e,t){h(this,"listeners",new Set);this.editor=e,this.localDoc=t}get doc(){return this.localDoc.toJSON()}getComments(){return Object.values(this.doc.comments)}getComment(e){return this.doc.comments[e]}getCommentDoc(e){const t=this.doc.comments[e];return gh(t)}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}localCreateComment(e,t){}localDeleteComment(e){}localUpdateComment(e,t){}createCommentEditor(e,t){var r,i;const o=N9({root:e,childDoc:t,doc:this.localDoc});if((r=this.editor.options.componentsOptions)!=null&&r.mention){const s=this.editor.options.componentsOptions.mention;o.addCustom("mention",()=>new Sf(o,{...s,enableFirstBlock:!0}))}if((i=this.editor.options.componentsOptions)!=null&&i.comment){const s=this.editor.options.componentsOptions.comment;s.onCommentEditorClick&&o.addListener("click",s.onCommentEditorClick)}return o}allowEdit(e){return e.userId===this.localDoc.getUser().userId}}const sH={placeholder:{common:{title:"\u8BF7\u8F93\u5165\u6807\u9898",readonlyTitle:"\u8BF7\u8F93\u5165\u6807\u9898",content:"\u70B9\u51FB + \uFF0C\u6216\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6",contentInTable:"\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6"},local:{readonlyTitle:"\u672A\u547D\u540D"}},copyCutProperty:{copy:"\u590D\u5236",cut:"\u526A\u5207",unsafeEnvTips:"\u7531\u4E8E\u5F53\u524D http \u8BBF\u95EE\u73AF\u5883\u4E0B\u7684\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528\u5FEB\u6377\u952E({shortCut}) {operation}"}},lH={placeholder:{common:{title:"Enter a title",readonlyTitle:"Enter a title",content:'Click "+", or enter "/" to insert components quickly',contentInTable:'Enter "/" to insert components quickly'},local:{readonlyTitle:"Untitled"}},copyCutProperty:{copy:"copy",cut:"cut",unsafeEnvTips:"\u7531\u4E8E\u5F53\u524D http \u8BBF\u95EE\u73AF\u5883\u4E0B\u7684\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528\u5FEB\u6377\u952E({shortCut}) {operation}"}},cH={placeholder:{common:{title:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",readonlyTitle:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",content:"\u300C+\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u304B\u3001\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059",contentInTable:"\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059"},local:{readonlyTitle:"\u7121\u984C"}},copyCutProperty:{copy:"copy",cut:"cut",unsafeEnvTips:"\u7531\u4E8E\u5F53\u524D http \u8BBF\u95EE\u73AF\u5883\u4E0B\u7684\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528\u5FEB\u6377\u952E({shortCut}) {operation}"}};I.mergeLang({"zh-CN":sH,"en-US":lH,"ja-JP":cH});const aH="UEsDBBQABgAIAAAAIQBk9WPugQEAACkGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAMsaAAB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQA520VMuQUAACdaAAASAAAAAAAAAAAAAAAAADYcAAB3b3JkL251bWJlcmluZy54bWxQSwECLQAUAAYACAAAACEA+JXI7/wOAADzmQAADwAAAAAAAAAAAAAAAAAfIgAAd29yZC9zdHlsZXMueG1sUEsBAi0AFAAGAAgAAAAhAMySUFR9AQAA8QIAABEAAAAAAAAAAAAAAAAASDEAAGRvY1Byb3BzL2NvcmUueG1sUEsBAi0AFAAGAAgAAAAhACJREfHVAQAA3gMAABAAAAAAAAAAAAAAAAAA/DMAAGRvY1Byb3BzL2FwcC54bWxQSwECLQAUAAYACAAAACEAiD+lv+EAAABVAQAAGAAAAAAAAAAAAAAAAAAHNwAAY3VzdG9tWG1sL2l0ZW1Qcm9wczEueG1sUEsBAi0AFAAGAAgAAAAhAMEnywi2AAAAIQEAABMAAAAAAAAAAAAAAAAARjgAAGN1c3RvbVhtbC9pdGVtMS54bWxQSwECLQAUAAYACAAAACEAdD85esIAAAAoAQAAHgAAAAAAAAAAAAAAAABVOQAAY3VzdG9tWG1sL19yZWxzL2l0ZW0xLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAOuAYExTAwAAjw4AABIAAAAAAAAAAAAAAAAAWzsAAHdvcmQvZm9udFRhYmxlLnhtbFBLBQYAAAAADwAPANQDAADePgAAAAA=",uH=()=>Bu(aH);async function dH(n){return new Promise((e,t)=>{const o=new Image;o.onload=()=>{e({width:o.naturalWidth,height:o.naturalHeight})},o.onerror=t,o.src=n})}async function F9(n,e){if(n.width&&n.height)return{width:n.width,height:n.height,buffer:e};const t=await Mr(new File([e],"",{})),o=await dH(t);return o.width===void 0||o.height===void 0?{width:345,height:230,buffer:e}:n.width||n.height?{width:n.width||o.width*n.height/o.height,height:n.height||o.height*n.width/o.width,buffer:e}:{width:o.width,height:o.height,buffer:e}}function hH(n,e){let t=n.filter(s=>s!=null);const o=e-(t.length-1)*20,r=.87,i=t.reduce((s,l)=>s+l.width,0);return i>o&&(t=t.map(s=>({width:s.width*o/i,height:s.height*o/i,buffer:s.buffer}))),t.map(s=>({width:s.width*r,height:s.height*r,buffer:s.buffer}))}function $9(n=[0,1,2,3,4,5,6,7],e=1){return n.map(t=>{let o;switch(t%3){case 0:o=Y.LevelFormat.DECIMAL;break;case 1:o=Y.LevelFormat.LOWER_LETTER;break;default:o=Y.LevelFormat.LOWER_ROMAN;break}return{level:t,format:o,text:`%${t+1}. `,alignment:Y.AlignmentType.START,start:e,style:{paragraph:{indent:{left:Y.convertInchesToTwip(.3*(t+1)),hanging:Y.convertInchesToTwip(.2)}}}}})}function fH(){return[0,1,2,3,4,5,6,7].map(n=>{let e;switch(n%3){case 0:e="\u2022";break;case 1:e="\u25E6";break;default:e="\u25AA";break}return{level:n,format:Y.LevelFormat.BULLET,text:e,alignment:Y.AlignmentType.START,style:{paragraph:{indent:{left:Y.convertInchesToTwip(.3*(n+1)),hanging:Y.convertInchesToTwip(.2)}}}}})}function mH(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:Y.LevelFormat.BULLET,text:"\u2611",alignment:Y.AlignmentType.START,style:{paragraph:{indent:{left:Y.convertInchesToTwip(.3*(n+1)),hanging:Y.convertInchesToTwip(.2)}}}}))}function gH(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:Y.LevelFormat.BULLET,text:"\u2610",alignment:Y.AlignmentType.START,style:{paragraph:{indent:{left:Y.convertInchesToTwip(.3*(n+1)),hanging:Y.convertInchesToTwip(.2)}}}}))}var dl=(n=>(n.NUMBERING="number-numbering-reference",n.BULLET="number-bullet-reference",n.CHECKED="checked-bullet-reference",n.UNCHECKED="unchecked-bullet-reference",n))(dl||{});const pH=[{levels:$9(),reference:"number-numbering-reference"},{levels:fH(),reference:"number-bullet-reference"},{levels:mH(),reference:"checked-bullet-reference"},{levels:gH(),reference:"unchecked-bullet-reference"}];function CH(n){switch(n){case"style-color-0":return"d83931";case"style-color-1":return"de7802";case"style-color-2":return"dc9b04";case"style-color-3":return"2ea121";case"style-color-4":return"245bdb";case"style-color-5":return"6425d0";case"style-color-6":return"8f959e";default:return}}function AH(n){switch(n){case"style-bg-color-1":case"style-bg-color-2":case"style-bg-color-8":case"style-bg-color-9":return"yellow";case"style-bg-color-0":case"style-bg-color-5":return"magenta";case"style-bg-color-3":return"green";case"style-bg-color-4":case"style-bg-color-11":return"blue";case"style-bg-color-6":return"lightGray";case"style-bg-color-7":return"red";case"style-bg-color-10":return"darkGreen";case"style-bg-color-12":return"darkMagenta";case"style-bg-color-13":return"darkGray";default:return}}function bH(n){switch(n){case"style-bg-color-0":return"fbbab6";case"style-bg-color-1":return"ffdcb0";case"style-bg-color-2":return"fff7a0";case"style-bg-color-3":return"ceefc5";case"style-bg-color-4":return"d1ddfb";case"style-bg-color-5":return"d9cbf8";case"style-bg-color-6":return"eaeaea";case"style-bg-color-7":return"fe837c";case"style-bg-color-8":return"ffbd6a";case"style-bg-color-9":return"ffe662";case"style-bg-color-10":return"a8f393";case"style-bg-color-11":return"98b5ff";case"style-bg-color-12":return"b394f8";case"style-bg-color-13":return"b1b1b1";default:return}}const vH=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/;function _9(n){if(typeof n=="string"&&n.length>0){if(n[0]==="#")return n.substring(1);const e=n.match(vH);if(e){const t=s=>{let l=Number(s).toString(16);return l.length<2&&(l=`0${l}`),l},o=t(e[1]),r=t(e[2]),i=t(e[3]);return`${o}${r}${i}`}if(n==="red")return"FF0000";if(n==="green")return"00FF00";if(n==="blue")return"0000FF"}}function it(n,e){if(n&&n.attributes&&n.attributes[e])return n.attributes[e];if(n&&n.attributes&&n.attributes.box&&n.attributes.inputType&&e==="style-underline")return!0}function H9(n,e,t){for(let o=0;o<=t;++o){const r=`${e}${o}`;if(it(n,r))return r}}function Oa(n,e,t){n.attributes=n.attributes||{},n.attributes[e]=t}function jf(n){return n==="image"||n==="drawio"||n==="plantuml"||n==="mermaid"}function j9(n){return n&&n.startsWith("//")?`https:${n}`:n&&!n.startsWith("http://")&&!n.startsWith("https://")?`https://${n}`:n}function yH(n){const e=it(n,"inlineStyle");if(e==null)return;const t=e.split(";");for(const o of t){const r=o.split(":");if(r.length!==2)continue;const i=r[0].trim().toLowerCase(),s=r[1].trim().toLowerCase();i==="font-size"&&Oa(n,"inline-style-font-size",s),i==="color"&&Oa(n,"inline-style-color",s),i==="background-color"&&Oa(n,"inline-style-background-color",s),i==="font-family"&&Oa(n,"inline-style-font-family",s)}}function kH(n,e){if(e==null)return n==null?void 0:n.normal;if(n)return n[`heading${e}`]}function wH(n){const e=`${it(n,"inline-style-font-size")}`;if(e&&e.indexOf("px")>0)return+e.replace(/px/g,"")}function BH(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` ${n.attributes.text} `;if(n.attributes&&n.attributes.box&&n.attributes.inputType)return n.attributes.value?`${n.attributes.value}`:" "}function EH(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` @${n.attributes.text} `}function IH(n){return it(n,"inline-style-font-family")}function xH(n){const e=it(n,"inline-style-background-color");return _9(e)}function TH(n){const e=it(n,"inline-style-color");return _9(e)}function SH(n){yH(n);const e=it(n,"type")==="mention";return{box:n.attributes&&n.attributes.box?n.attributes:void 0,inlineCode:!!it(n,"style-code"),link:j9(it(n,"link")),size:wH(n),text:e?EH(n):BH(n)||n.insert,bold:!!it(n,"style-bold"),underline:!!it(n,"style-underline"),italics:!!it(n,"style-italic"),strike:!!it(n,"style-strikethrough"),superScript:!!it(n,"style-super"),subScript:!!it(n,"style-sub"),math:it(n,"type")==="math"?it(n,"src"):void 0,mention:e,fontFamily:IH(n),background:xH(n),color:e?"338fe5":CH(H9(n,"style-color-",6))||TH(n),highlight:H9(n,"style-bg-color-",13)}}function DH(){return[new Y.Paragraph({border:{top:{color:"auto",style:Y.BorderStyle.DASHED,size:4,space:1}},spacing:{before:300}}),new Y.Paragraph({spacing:{line:0}})]}function LH(){return new Y.Paragraph({children:[new Y.TextRun({text:"[\u89C6\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:Y.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function MH(){return new Y.Paragraph({children:[new Y.TextRun({text:"[\u97F3\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:Y.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function RH(n,e){return new Y.Paragraph({children:[new Y.ExternalHyperlink({children:[new Y.TextRun({style:"Hyperlink",text:e||n})],link:n})]})}function z9(n){if(n.heading!=null)return`Heading${n.heading}`}function U9(n){if(n.alignment!=null){if(n.alignment==="center")return Y.AlignmentType.CENTER;if(n.alignment==="right")return Y.AlignmentType.RIGHT;if(n.alignment==="left")return Y.AlignmentType.LEFT}}function OH(n){if(n.indent)return{left:Y.convertInchesToTwip(.3*n.indent-.2)};if(n.padding)return{left:Y.convertInchesToTwip(.3*n.padding)}}function PH(n){return{type:Y.ShadingType.CLEAR,color:"FFFFFF",fill:n}}function NH(n){const e=n.split(",");if(e.length!==0)return e[0].trim()}function V9(n,e){let t;t=n.inlineCode?"InlineCode":void 0,t=n.link?"Hyperlink":t;const o=n.size||e,r=o!=null?Math.floor(o*1.5+.5):void 0;return new Y.TextRun({text:n.text,bold:n.bold||void 0,underline:n.underline?{type:Y.UnderlineType.SINGLE}:void 0,italics:n.italics||void 0,strike:n.strike||void 0,superScript:n.superScript||void 0,subScript:n.subScript||void 0,size:r,style:t,font:n.fontFamily?NH(n.fontFamily):void 0,shading:n.background?PH(n.background):void 0,color:n.color,highlight:AH(n.highlight)})}function FH(n,e){if(n.link)return new Y.ExternalHyperlink({children:[V9(n,e)],link:n.link})}async function q9(n,e,t,o,r){const i=await r(n,e,t);if(i==null)return;const s=await F9({width:o||0,height:0,src:t},i);return new Y.ImageRun({data:i,transformation:{width:s.width||100,height:s.height||20}})}function $H(n){if(n.heading||n.heading)return n.heading}function _H(n){if(n.align&&(n.align==="center"||n.align==="right"||n.align==="left"))return n.align}function HH(n){if(n.textOnly===!0&&n.level!=null)return n.level}async function jH(n,e){var o;const t=[];if(n.text&&Array.isArray(n.text)){for(let r=0;r<n.text.length;r++){const i=n.text[r];if(((o=i.attributes)==null?void 0:o.box)===!0&&e){const s=await e(i);if(s){n.text.splice(r+1,0,...s);continue}}t.push(SH(i))}return t}}function zH(n){if(n.type==="list"&&n.textOnly!==!0)return{checkbox:n.checkbox,groupId:n.groupId,ordered:!!n.ordered,level:n.level||1,start:n.start||0}}function UH(n,e){if(n.type==="embed"&&n.embedType&&jf(n.embedType)&&n.embedData&&n.embedData.src)return n.embedData.src.split("|").map(o=>{const r=e(o),i=n.embedData[`${r}_width`],s=n.embedData[`${r}_height`];return{src:o,width:i,height:s}})}function VH(n){if(n.padding)return n.padding}function qH(n){return!!(n.type==="embed"&&n.embedType&&jf(n.embedType)&&n.embedData&&n.embedData.src)}async function Pa(n,e,t){return{quoted:!!n.quoted,heading:$H(n),alignment:_H(n),indent:HH(n),padding:VH(n),texts:await jH(n,t),list:zH(n),images:UH(n,e),border:qH(n)}}async function WH(n,e,t,o){const r=[];if(!n.children)return[];for(const i of n.children){const s=[];for(const l of e.blocks[i])s.push(await Pa(l,t,o));r.push(s)}return r}const GH=w("to-docx");function ZH(n,e){return Array(n).fill(0).map(()=>Array(e).fill(0).map(()=>({cellId:void 0,color:void 0,from:void 0,rowSpan:1,colSpan:1,width:0,originalWidth:void 0,align:void 0})))}function QH(n,e,t,o){const r=!!n.hasColTitle,i=!!n.hasRowTitle,s=!!n.isStripeStyle,l="F5F8FB";for(let c=0;c<e;c++)for(let a=0;a<t;a++)(r&&a===0||i&&c===0||s&&c%2===1)&&(o[c][a].color=l)}function YH(n){d(GH,n.children,"no table children");const e=n.rows,t=n.cols,o=n.colsWidth;if(o)for(let s=0;s<o.length;s++)o[s]===0&&(o[s]=100);const r=ZH(e,t);let i=0;for(let s=0;s<e;++s)for(let l=0;l<t;++l){if(r[s][l].originalWidth=o?o[l]:void 0,r[s][l].from!==void 0)continue;const c=n.children[i];i+=1,r[s][l].cellId=c,r[s][l].color=bH(n[`${c}_background`]),r[s][l].width=o?o[l]:100,r[s][l].align=n[`${c}_align`];const a=n[`${c}_rowSpan`]||1,u=n[`${c}_colSpan`]||1;if(r[s][l].rowSpan=a,r[s][l].colSpan=u,a>1||u>1){let f=0;for(let m=0;m<a;m++)for(let p=0;p<u;p++)m===0&&(f+=o?o[l+p]:80),!(m===0&&p===0)&&(r[s+m][l+p].from=[s,l]);r[s][l].width=f}}return QH(n,e,t,r),r}async function JH(n,e,t,o,r,i,s,l,c,a){async function u(p){if(l){const b=await l(r,i,p);if(b){await o.addDoc(n,b,a);return}}if(p.type==="text"||p.textOnly===!0){const b=await Pa(p,s,c);await o.addTextBlock(b);return}if(p.type==="code"){const b=await WH(p,t,s,c);await o.addCodeBlockObject(b);return}if(p.type==="list"&&p.textOnly!==!0){const b=await Pa(p,s,c);await o.addListBlockObject(n,b);return}if(p.type==="embed"&&p.embedType){const b=p,k=b.embedData,v=b.embedType;if(jf(v)){const T=await Pa(p,s,c);await o.addImagesBlockObject(T,a)}else p.embedType==="hr"?o.addSeparatorBlock():p.embedType==="video"?o.addVideoPlaceholder():p.embedType==="audio"?o.addAudioPlaceholder():p.embedType==="webpage"?o.addHyperlinkParagraph(j9(k.src),k.title):o.addOtherEmbedBlock(v,p.embedData);return}if(p.type==="table"){let b=[];if(p.colsWidth)b=p.colsWidth;else{const v=p.cols;b=new Array(v);for(let T=0;T<b.length;T++)b[T]=100;p.colsWidth=b}const k=YH(p);await o.addTableMatrix(b,k,t),o.addEmptyParagraph()}}function f(p){const b=[];for(const{type:k,data:v}of p.embedData.exportSpec){if(k==="text"){const T={id:F(),text:[{insert:v}],type:"text"};b.push(T);continue}if(k==="image"){const T={id:F(),type:"embed",embedType:"image",align:"left",embedData:{src:v}};b.push(T);continue}if(k==="link"){const T={id:F(),type:"embed",embedType:"webpage",embedData:{src:v.url,title:v.title}};b.push(T);continue}}return b}function m(p){var b;return(b=p==null?void 0:p.embedData)!=null&&b.exportSpec?f(p):[p]}for(const p of e)for(const b of m(p))await u(b)}function KH(){return{listMaxInst:1,listInstMap:{},listRefMap:{},levelConfigs:[]}}const XH=w("to-docx");class ej{constructor(e,t,o,r,i,s){h(this,"paragraphs");this.appId=e,this.docId=t,this.state=o,this.readImageFunc=r,this.convertBlocksFunc=i,this.defaultFontSize=s,this.paragraphs=[]}async addTextBlock(e){this.paragraphs.push(new Y.Paragraph({heading:z9(e),alignment:U9(e),children:await this.paragraphsFromBlockTexts(e),indent:OH(e)}))}async paragraphsFromBlockTexts(e){if(e.texts==null)return;const t=kH(this.defaultFontSize,e.heading),o=[];for(const r of e.texts){if(r.link){const i=FH(r,t);i&&o.push(i);continue}if(r.box&&r.box.type&&r.box.type==="br"){o.push(new Y.TextRun({text:"",break:1}));continue}if(r.box&&r.box.type&&r.box.type==="image"){const i=await q9(this.appId,this.docId,r.box.src,r.box.width,this.readImageFunc);i&&o.push(i);continue}if(r.math){const i=await q9(this.appId,this.docId,r.math,0,this.readImageFunc);i&&o.push(i);continue}o.push(V9(r,t))}return o}async addCodeBlockObject(e){for(const t of e)for(const o of t){const r={style:Y.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new Y.Paragraph({style:"Code",border:{left:{...r},right:{...r},top:{...r},bottom:{...r}},children:await this.paragraphsFromBlockTexts(o)}))}}async addListBlockObject(e,t){if(t.list==null)return;let o;const r=t.list.checkbox?`${e}-${t.list.groupId}-${t.list.checkbox}`:`${e}-${t.list.groupId}`;if(this.state.listInstMap[r])o=this.state.listInstMap[r];else if(o=this.state.listMaxInst,this.state.listMaxInst+=1,this.state.listInstMap[r]=o,t.list.start>0&&t.list.ordered){const s=`number-numbering-reference-${o}`,l=$9([t.list.level-1],t.list.start);this.state.levelConfigs.push({levels:l,reference:s,inst:o}),this.state.listRefMap[r]=s}else t.list.ordered?this.state.listRefMap[r]=dl.NUMBERING:t.list.checkbox&&t.list.checkbox==="checked"?this.state.listRefMap[r]=dl.CHECKED:t.list.checkbox&&t.list.checkbox==="unchecked"?this.state.listRefMap[r]=dl.UNCHECKED:this.state.listRefMap[r]=dl.BULLET;const i=z9(t);t.texts&&this.paragraphs.push(new Y.Paragraph({heading:i,children:await this.paragraphsFromBlockTexts(t),numbering:{reference:this.state.listRefMap[r],level:t.list.level-1,instance:o}}))}imageDimWithBufferToImageRun(e){return new Y.ImageRun({data:e.buffer,transformation:{width:e.width,height:e.height}})}async addImagesBlockObject(e,t){if(e.images==null)return;const o=await Promise.all(e.images.map(async s=>{const l=await this.readImageFunc(this.appId,this.docId,s.src);if(l)return F9(s,l)})),r=hH(o,t),i={style:Y.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new Y.Paragraph({border:e.border?{left:{...i},right:{...i},top:{...i},bottom:{...i}}:void 0,alignment:U9(e)||Y.AlignmentType.CENTER,children:r.map(s=>this.imageDimWithBufferToImageRun(s)).flatMap((s,l,c)=>s==null?[]:c.length-1!==l?[s,new Y.TextRun({text:" "})]:s)}))}addSeparatorBlock(){DH().forEach(e=>this.paragraphs.push(e))}addEmptyParagraph(){this.paragraphs.push(new Y.Paragraph(""))}addVideoPlaceholder(){this.paragraphs.push(LH())}addAudioPlaceholder(){this.paragraphs.push(MH())}addHyperlinkParagraph(e,t){e!=null&&this.paragraphs.push(RH(e,t))}async addTableMatrix(e,t,o){const r=e.map(i=>i!==0?i*15:1500);this.paragraphs.push(new Y.Table({rows:await this.generateTableRows(t,o),columnWidths:r}))}async generateRowCells(e,t){const o=[];for(const r of e){const i=r.cellId;if(i===void 0)continue;const s=r.width*.9;o.push(new Y.TableCell({children:await this.convertBlocksFunc(i,t.blocks[i],t,this.appId,this.docId,this.state,s),columnSpan:r.colSpan,rowSpan:r.rowSpan,width:{type:Y.WidthType.DXA,size:r.width*15},shading:r.color?{fill:r.color,type:Y.ShadingType.CLEAR,color:"auto"}:void 0}))}return o}async generateTableRows(e,t){const o=[];for(const r of e)o.push(new Y.TableRow({children:await this.generateRowCells(r,t)}));return o}async addDoc(e,t,o){const r=await this.convertBlocksFunc(e,t.blocks.root,t,this.appId,this.docId,this.state,o);r&&(this.paragraphs=this.paragraphs.concat(r))}async addOtherEmbedBlock(){}}class tj{constructor(e,t,o,r,i,s,l,c){h(this,"convertBlocks",async(e,t,o,r,i,s,l=720)=>{const c=new ej(r,i,s,this.readImage,this.convertBlocks,this.defaultFontSize);return await JH(e,t,o,c,r,i,this.md5HexFunc,this.getDocByBlock,this.getTextsByBox,l||720),c.paragraphs});this.templateData=e,this.docData=t,this.md5HexFunc=o,this.readImage=r,this.defaultFontSize=i,this.getDocByBlock=s,this.getTextsByBox=l,this.backgroundImageOptions=c}async convert(e,t){return this.snapshot2docx(this.docData,e,t)}async snapshot2docx(e,t,o){const r=new Y.ImportDotx,i=this.templateData?await r.extract(this.templateData):void 0,s=e.blocks.root;d(XH,s,"data must have blocks");const l=KH(),c=await this.convertBlocks("blocks",s,e,t,o,l),a=this.backgroundImageOptions?{default:new Y.Header({children:[new Y.Paragraph({children:[new Y.ImageRun(this.backgroundImageOptions)]})]})}:{},u=new Y.Document({numbering:{config:[...pH,...l.levelConfigs]},sections:[{headers:a,children:c,properties:{page:{size:{width:12240,height:15840},margin:{top:1440,bottom:1440,left:1440,right:1440}}}}]},{template:i});return Y.Packer.toBlob(u)}}async function nj(n,e,t,o){const r=n.doc.buildResourceUrl(o,{withToken:!0});let i=await T4(r);if(!i)return;if(i.type.indexOf("/svg")!==-1){const l=await E4(i);l&&(i=new File([l],i.name))}return await i.arrayBuffer()}async function oj(n,e,t){const o=n.editorBlocks.getBlockClass(t.type);if(o.toStandardDoc)return o.toStandardDoc(n,t,e)}async function rj(n,e){const t=e.attributes,o=n.editorBoxes.getBoxClass(t.type);if(o.toStandardText)return o.toStandardText(n,t)}async function ij(n,e){let{template:t,download:o,backgroundImageOptions:r}=e!=null?e:{};t||(t=uH());const i=n.doc.toJSON(),s=(f,m,p)=>nj(n,f,m,p),l=async(f,m,p)=>oj(n,i,p),c=async f=>rj(n,f),u=await new tj(t,i,Bl.default,s,void 0,l,c,r).convert("_appId","_docId");if(o){const f=URL.createObjectURL(u),m=document.createElement("a");m.setAttribute("download",`${x4(n)}.docx`),m.setAttribute("href",`${f}`),m.click(),m.remove()}return u}const zf=w("create-editor");async function sj(n,e){var s,l,c,a,u,f,m,p,b,k,v,T,E,R;d(zf,n,"app does not exists"),e.lang&&I.setLang(e.lang),uo.level=(s=e.logLevel)!=null?s:_i.DEBUG;const t=e.onReauth?async()=>{var ee;const L=e.user.userId,P=e.docId,V=await((ee=e.onReauth)==null?void 0:ee.call(e,L,P,e.permission));return{userId:L,docId:P,permission:e.permission,appId:e.appId,token:V,displayName:e.user.displayName,avatarUrl:e.user.avatarUrl}}:void 0,o={auth:{appId:e.appId,docId:e.docId,userId:e.user.userId,permission:e.permission,token:e.token,displayName:e.user.displayName,avatarUrl:e.user.avatarUrl},serverUrl:e.serverUrl,reauthFunc:t,disableLogout:e.disableLogout},r=await Is.load(o),i=fs(n,r,{id:e.id,scrollContainer:e==null?void 0:e.scrollContainer,components:{blocks:[...O9,...((l=e==null?void 0:e.components)==null?void 0:l.blocks)||[]],embeds:[...Hf,...((c=e.components)==null?void 0:c.embeds)||[]],boxes:[...P9,...((a=e.components)==null?void 0:a.boxes)||[]],commandProviders:[new Uh,...((u=e.components)==null?void 0:u.commandProviders)||[]],decorators:[new da,new Ch],insertions:[bd],blockHooks:[new eC,new D6,...((f=e.components)==null?void 0:f.blockHooks)||[]],textRenders:[new f6,new b3],options:{...e.componentsOptions}},shortcuts:[sL,ZM,R1,UC,LI,x1,vN,mc,...e.shortcuts||[]],colors:["#338FE5","#24B47E","#F0A100","#E52727","#9678D3","#2CB2AE","#EB6414","#8AAB3F"]});if(i.editorCommandProviders.registerCommandProvider(new On(i)),i.input.addHandler(new dF),i.input.addHandler(new sa),i.input.addHandler(new IT),i.input.addHandler(new _M),i.input.addHandler(new Ws(i,{headingLevel:1,titlePlaceholder:I.t("placeholder.common.title"),contentPlaceholder:I.t("placeholder.common.content"),readonlyTitlePlaceholder:I.t("placeholder.common.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),i.input.addHandler(new ea(i,(m=e.componentsOptions)==null?void 0:m.quickMenu)),i.input.addHandler(new tf(i)),i.input.addHandler(new OC(i)),i.input.addHandler(new nL),i.input.addHandler(new Y1),i.doc.registerCallback(new hF(i)),i.addCustom("remote-cursor",()=>new u5(i)),i.addCustom("block-menu",L=>new rC(L)),i.addCustom("editor-tooltip",()=>new I1(i)),e!=null&&e.enableComments&&i.addCustom("editor-comments",L=>new h6(L,new rH(L))),i.addCustom("create-options",()=>new pm(i,e)),i.addCustom("drop-target",()=>new el(i)),i.addCustom("list-to-mindmap",()=>new Jc(i)),i.addCustom("list-to-mention",()=>new DF(i)),i.addCustom("mobile-helper",()=>new UF(i)),i.addCustom("code-caret",()=>new tL(i)),(p=e.componentsOptions)!=null&&p.mention){const L=e.componentsOptions.mention;i.addCustom("mention",()=>new Sf(i,L))}if(i.addCustom("heading-collapse",()=>new Y6(i)),ci.register(i),el.register(i),Ir.register(i),No.register(i),i.addListener("clickLink",(L,P,V)=>{var ie;if((ie=e==null?void 0:e.events)!=null&&ie.onClickLink){e.events.onClickLink(L,P,V);return}const ee=V.getAttribute("link");ee&&(L.readonly||P.ctrlKey||P.metaKey)&&window.open(ee,"_blank")}),(k=(b=e.componentsOptions)==null?void 0:b.remoteCarets)!=null&&k.onUserChanged){const L=(T=(v=e.componentsOptions)==null?void 0:v.remoteCarets)==null?void 0:T.onUserChanged;i.doc.getRemoteUsers().on("change",P=>{L(i,P)})}return(R=(E=e.componentsOptions)==null?void 0:E.templates)!=null&&R.templates.length&&(i.addListener("docChanged",()=>{Ra(i)}),i.addListener("resize",()=>{Ra(i,{reset:!0})}),setTimeout(()=>{Ra(i)},100)),i.doc.registerCallback({onError:async L=>{if(L.code==="ResetDoc"){zf.error(`reset doc: ${L.message}`);const P=await Is.load(o);i.doc.reset(P)}}}),i}function lj(n){return n.toJSON!==void 0}async function cj(n,e,t){var i,s,l,c;d(zf,n,"app does not exists");const o=lj(e)?e:new Kd(e,{serverUrl:t.serverUrl||""});t.lang&&I.setLang(t.lang);const r=fs(n,o,{id:t.id,scrollContainer:t==null?void 0:t.scrollContainer,components:{blocks:[ia,ua,z1,j3],commandProviders:[new Uh],decorators:[new da,new Ch],embeds:[...Hf,...((i=t.components)==null?void 0:i.embeds)||[]],boxes:[B1,Df,b6,...((s=t.components)==null?void 0:s.boxes)||[]],insertions:[bd],blockHooks:[new eC,...((l=t.components)==null?void 0:l.blockHooks)||[]],textRenders:[new f6],options:{...t.componentsOptions}},shortcuts:[R1,UC,x1,mc]});return r.editorCommandProviders.registerCommandProvider(new On(r)),r.input.addHandler(new sa),r.input.addHandler(new Ws(r,{headingLevel:1,titlePlaceholder:I.t("placeholder.common.title"),contentPlaceholder:I.t("placeholder.common.content"),readonlyTitlePlaceholder:I.t("placeholder.local.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),r.input.addHandler(new ea(r,(c=t.componentsOptions)==null?void 0:c.quickMenu)),r.input.addHandler(new tf(r)),r.input.addHandler(new OC(r)),r.input.addHandler(new Y1),r.addCustom("block-menu",a=>new rC(a)),r.addCustom("editor-tooltip",()=>new I1(r)),t!=null&&t.enableComments&&r.addCustom("editor-comments",a=>new h6(a,new iH(a,o))),r.addListener("clickLink",(a,u,f)=>{var p;if((p=t==null?void 0:t.events)!=null&&p.onClickLink){t.events.onClickLink(a,u,f);return}const m=f.getAttribute("link");m&&(a.readonly||u.ctrlKey||u.metaKey)&&window.open(m,"_blank")}),ci.register(r),r}function aj(n,e){var c;const t=n.doc;if(!((c=t.getVersionHelper)==null?void 0:c.call(t)))throw new Error("the editor does not support to show versions");const r=n.getCustom("create-options");if(!r)throw new Error("the editor does not support to show versions");const i=r.getData(),s=new nH(i),l=n.addCustom("version-dialog",()=>new j6(n.doc,s));return l.show(e),l}g.tippy=O8,g.AuthError=xc,g.AuthHeader=Es,g.AutoScroll=Ym,g.BaseURLHeader=Tc,g.BasicCommands=eT,g.BlockExclusiveHook=D6,g.BlockResizer=Qs,g.BrBox=Dp,g.CodeBlock=ua,g.CodeLineBlock=z1,g.CodeTextDecorator=da,g.DefaultShortcuts=mc,g.DocIdError=Bw,g.DragDrop=Lm,g.DrawioEmbed=Ff,g.EditorBlocks=Ng,g.EditorBoxes=Mp,g.EditorCommandProviders=k2,g.EditorComplexBlockPosition=tn,g.EditorComplexSelectionRange=yn,g.EditorDecorators=Np,g.EditorEmbeds=$g,g.EditorInsertions=Pp,g.EditorSimpleBlockPosition=qe,g.EditorSimpleSelectionRange=Xe,g.EmbedBlock=Hg,g.EmbedBlockResizer=sl,g.EnforceWithDocumentTitleHandler=Ws,g.EventCallbacks=Hi,g.FILL_CHAR=Jb,g.FileExtError=Ew,g.GroupOrder=q3,g.HeadingBlockScrollListener=EF,g.InputtingInsertion=Rp,g.LocalDoc=Kd,g.LogLevel=_i,g.Logger=uo,g.MIN_DISTANCE_THRESHOLD=Sm,g.ManualCloseDialog=Ls,g.ManualMenu=fr,g.ManualToolbar=Ds,g.MarkdownInputHandler=sa,g.MaxUserError=uh,g.OnesEditorAutoSuggest=Oh,g.OnesEditorCustomDataWrapper=pm,g.OnesEditorExclusiveBlock=No,g.OnesEditorHoveringBlock=De,g.OnesEditorQuickMenu=ea,g.OnesEditorToc=cl,g.OnesEditorTocProvider=Ir,g.OnesEditorToolbar=ci,g.OnesEditorTooltip=I1,g.OnesEditorVersionsDialog=j6,g.PermissionError=ww,g.Popup=xs,g.RemoteCarets=u5,g.RemoteCaretsDecorator=Ch,g.RemoteCaretsInsertion=bd,g.RemoteUsers=bc,g.RequestReloadError=Bs,g.RichText=dt,g.ShareDBDoc=Is,g.SimpleCache=Am,g.StandardEmbedBlockCommands=vf,g.TEXT_STYLE_BACKGROUND_COLOR_PREFIX=ad,g.TEXT_STYLE_COLOR_PREFIX=cd,g.TableBlock=ia,g.TableBlockCommandProvider=Uh,g.TableShortcuts=R1,g.TextBlock=wt,g.TextBox=Sp,g.TextStyleShortcuts=x1,g.TocEmbed=t9,g.ZERO_WIDTH_SPACE_CHAR=ji,g.addAttribute=Ql,g.addClass=M,g.addCommentToBlock=Sa,g.addDays=wA,g.addMetaToDoc=pc,g.addMonths=kA,g.animateScrollTo=Cu,g.applyPlaceholderToBlock=la,g.assert=d,g.autoShowHideTemplates=Ra,g.blockToDoc=Zd,g.blockToHtml=wd,g.blockToMarkdown=Bd,g.blockToText=oc,g.blocksToDoc=dy,g.clearAllSelection=Cg,g.clientType=ot,g.cloneBlock=yo,g.cloneChildContainer=Od,g.cloneDoc=Pd,g.cloneText=bp,g.commentToShareDbComment=ph,g.compareElement=Tl,g.comparePosition=Zu,g.complexBlockAdjustSelectionPos=zl,g.complexBlockFindNearestChildBlock=Vg,g.complexBlockGeFirstSimpleChild=Yu,g.complexBlockGetAllChildContainers=yt,g.complexBlockGetBottomChildContainers=Ug,g.complexBlockGetLastSimpleChild=Fr,g.complexBlockGetSelectedContainers=or,g.complexBlockGetTopChildContainers=zg,g.containerToDoc=K0,g.continuousScroll=Qm,g.convertBlockFrom=$l,g.convertImageFileToPng=E4,g.convertImageSrcToPng=wD,g.copyBlockAttributes=Yp,g.createBlockAnchor=go,g.createBlockCaretAnchor=Zg,g.createBlockContentElement=Xo,g.createBlockElement=sg,g.createBlockSimpleDocRange=Xl,g.createBlockSimpleRange=Fe,g.createBoxContentElement=ag,g.createBoxElement=lg,g.createBoxOp=up,g.createChildContainer=Og,g.createComplexBlockPosition=xe,g.createComplexDocPos=Ep,g.createComplexDocRange=ev,g.createContainer=kp,g.createContainerElement=zu,g.createDeleteOps=sp,g.createEditor=fs,g.createEditorSelectionRange=We,g.createElement=A,g.createEmptyContainer=Qn,g.createEmptyDoc=bo,g.createEmptyTextBlockData=Jl,g.createExpandedRange=Il,g.createIconButton=Dr,g.createImage=bm,g.createInsertOps=Zl,g.createInsertionContentElement=hg,g.createInsertionElement=ug,g.createLocalEditor=cj,g.createOnesEditor=sj,g.createRange=vm,g.createRichText=Ao,g.createRootContainer=Rg,g.createSimpleBlockPosition=U,g.createSimpleDocPos=Bp,g.createTextBlockData=Zn,g.createTextButton=br,g.createTextOp=_t,g.createTextWithReplaceSoftReturn=rd,g.daysAfter=Su,g.deleteText=sd,g.diffDays=BA,g.disablePageScroll=Um,g.docToHtml=Vp,g.docToHtmlFragment=rc,g.docToMarkdown=rs,g.docToText=os,g.downloadImageToFile=T4,g.downloadObjectToFile=Of,g.downloadSvgToString=a9,g.editLink=js,g.editorAddComment=RP,g.editorAddTextAttribute=l0,g.editorAutoInsertBlock=Jp,g.editorBreakTextBlock=zr,g.editorClearCompositionText=Qp,g.editorClearSelectedContents=Md,g.editorCopyBlock=Cc,g.editorDeleteBlock=Dd,g.editorDeleteBlockText=xd,g.editorDeleteBlockWithoutChildren=Sd,g.editorDeleteChildContainer=Vv,g.editorDeleteChildContainers=Kp,g.editorFocusToBlock=Rd,g.editorFocusToEnd=Y0,g.editorGetBlockData=vo,g.editorGetBlockText=pt,g.editorGetBlockTextEx=tc,g.editorGetBoxData=xp,g.editorHandleKeyboardEvent=n2,g.editorInsertBlock=jr,g.editorInsertBoxToBlock=Gp,g.editorInsertDoc=i0,g.editorInsertDocAt=Nd,g.editorInsertText=Id,g.editorInsertTextToBlock=Wp,g.editorInsertTextToBlockEx=Ed,g.editorMergeTextBlock=Xp,g.editorMoveDown=b0,g.editorMoveEnd=S0,g.editorMoveHome=D0,g.editorMoveLeft=p0,g.editorMoveLineEnd=$0,g.editorMoveLineHome=F0,g.editorMovePageDown=V0,g.editorMovePageUp=U0,g.editorMoveRight=C0,g.editorMoveUp=A0,g.editorMoveWordEnd=I0,g.editorMoveWordLeft=E0,g.editorRangeClearColor=a0,g.editorRangeGetColor=Fd,g.editorRangeSetColor=c0,g.editorRemoveTextAttribute=Zv,g.editorReplaceBlockText=cc,g.editorReplaceContainer=s0,g.editorRunOnce=Xd,g.editorSelectAll=Q0,g.editorSelectContainer=Wd,g.editorSelectDown=v0,g.editorSelectEnd=Vd,g.editorSelectHome=L0,g.editorSelectLeft=y0,g.editorSelectLineEnd=N0,g.editorSelectLineHome=P0,g.editorSelectPageDown=W0,g.editorSelectPageUp=q0,g.editorSelectRight=k0,g.editorSelectUp=w0,g.editorSelectWordEnd=T0,g.editorSelectWordLeft=x0,g.editorSetTextColor=Ur,g.editorShowFindDialog=HO,g.editorToDocx=ij,g.editorUpdateBlockData=ac,g.editorUpdateCompositionText=Zp,g.editorUpdateEmbedData=o0,g.enablePageScroll=Vm,g.escapeHtmlText=Im,g.escapeRegExp=Mu,g.escapeSpace=sA,g.exclusiveBlock=T6,g.executeBlockCommand=Ig,g.executeEmbedBlockCommand=Eg,g.executeRangeCommand=y2,g.fileToDataUrl=Mr,g.findAfterOffsetNotType=pd,g.findAllText=fd,g.findEventTargetBlock=Bm,g.findInsertionById=dg,g.findNextOffset=Cv,g.findNextVisibleSimpleBlock=x2,g.findPrevOffset=pv,g.findPrevOffsetNotType=gd,g.findPrevSimpleBlockBeforeChildContainer=jg,g.findPrevVisibleSimpleBlock=I2,g.findTarget=Lr,g.findWordEnd=Ad,g.findWordLeft=Cd,g.format=Tu,g.formatBytes=Jm,g.formatDate=eg,g.fragmentToHtml=qm,g.fromBase64=Dl,g.fromBase64ToBlob=Bu,g.fromBase64ToUint8Array=CA,g.fromDocRange=mo,g.fromNowString=Lu,g.genId=F,g.getAllChildBlocks=Ku,g.getAllQuickMenuItems=E1,g.getAllSelectedBlocks=nn,g.getAttributesAt=es,g.getBlockBackground=ig,g.getBlockByIndex=Or,g.getBlockCaretRect=Xt,g.getBlockClass=me,g.getBlockClassByType=Pr,g.getBlockClientRects=ho,g.getBlockCommandsWithHook=Hu,g.getBlockContent=le,g.getBlockId=j,g.getBlockIndex=K,g.getBlockKind=Kt,g.getBlockMinWidth=bg,g.getBlockNearestRangeFromPoint=Gg,g.getBlockOptions=SA,g.getBlockPath=fo,g.getBlockProperties=kg,g.getBlockRangeFromPoint=Ul,g.getBlockStyles=TA,g.getBlockTextLength=G,g.getBlockTools=Ne,g.getBlockType=se,g.getBoxContent=Pu,g.getBoxId=cg,g.getBoxTypeFromElement=qi,g.getChildBlockCount=Yt,g.getChildBlocks=Me,g.getChildOffset=po,g.getColorFromAttributes=dd,g.getComplexBlockClass=Tt,g.getContainerBlockPath=Dg,g.getContainerBlocks=pg,g.getContainerBlocksElement=Hl,g.getContainerById=Nr,g.getContainerId=q,g.getContainerMinWidth=Vu,g.getContainerToolsElement=OA,g.getContainerWidth=Pg,g.getDistanceSquare=An,g.getElementOffset=zi,g.getEmbedType=Nt,g.getExistsBlockTools=Fl,g.getExistsContainerById=Sg,g.getFileExt=xu,g.getFirstChildBlock=_e,g.getFirstClientRect=xl,g.getHeadingMenuOptions=v1,g.getHorizontalPadding=hu,g.getInsertionContent=Nu,g.getLastChildBlock=Je,g.getLastClientRect=qo,g.getListAllNextBrothers=oi,g.getLogger=w,g.getNextBlock=fe,g.getNextValidOffset=ir,g.getNextVisibleBlock=tr,g.getOffsetInfoAfter=ns,g.getOffsetInfoBefore=nc,g.getOpAt=hp,g.getOpLength=ld,g.getParentBlock=z,g.getParentBlockExcludeSelf=Ko,g.getParentBox=Ou,g.getParentContainer=H,g.getPrevBlock=ye,g.getPrevValidOffset=Co,g.getPrevVisibleBlock=er,g.getRangeCommands=b2,g.getRootBlock=_u,g.getScrollContainer=bn,g.getSpecialBlockCommands=wg,g.getStandardEmbedBlockProperties=yf,g.getTextAfterOffset=mv,g.getTextBeforeOffset=gv,g.getTextBlockChild=_l,g.getTextBlockClass=mg,g.getTextBlockContentChildTextLength=$t,g.getTextBlockContentChildType=xg,g.getTextBlockContentChildren=vn,g.getTextLength=at,g.getTextOpLength=Xu,g.getTextWidth=Ml,g.getToolbar=Vc,g.handleBlockElementUpdated=vg,g.hasAltOnly=hA,g.hasClass=ne,g.hasCtrlOrCmd=$m,g.hasCtrlOrCmdOnly=dA,g.hideBlock=og,g.htmlToFragment=Ll,g.i18n=I,g.injectDocToHtmlFragment=gc,g.injectStyle=Tm,g.insertEmptyBlock=MA,g.insertEmptyEmbedBlock=ju,g.insertText=Gn,g.intersectionCommands=pk,g.isBackspace=Hm,g.isBlock=Jo,g.isBlockTools=ng,g.isBox=Ru,g.isCJK=Pm,g.isChildContainer=en,g.isChildNode=Ce,g.isCollapsedRange=Xb,g.isComplexBlockPosition=Gu,g.isComplexKindBlock=ce,g.isContainer=Un,g.isContainerSelectedAllChildBlocks=G0,g.isControlEvent=Zo,g.isDelete=mA,g.isDraggingFiles=Ol,g.isElementVisible=pu,g.isEmbedBlock=Ke,g.isEmptyContainer=qu,g.isEmptyDoc=md,g.isEmptyTextBlock=Ie,g.isEmptyTextBlockWithoutCompositionText=qs,g.isEnterOnly=_m,g.isEscape=ku,g.isExclusiveBlock=I6,g.isFirefox=vu,g.isFirstChildBlockInComplexBlock=hb,g.isHighSurrogate=eA,g.isInBlock=Fu,g.isInBlockTools=Wi,g.isLetter=Om,g.isLowSurrogate=du,g.isMatchShortcut=zn,g.isMoveForward=aA,g.isNavigationEvent=cA,g.isNavigationKey=Fm,g.isNodeRemoved=km,g.isNumber=Rm,g.isPrintableKey=yu,g.isRootBlock=Pt,g.isRootContainer=Ae,g.isSafari=Nm,g.isSameDay=Du,g.isSecureEnv=H1,g.isShiftEnter=fA,g.isShiftTab=pA,g.isShortcutEvent=uA,g.isSimpleBlock=xA,g.isSimpleBlockPosition=Wn,g.isSimplePos=wp,g.isSimpleRange=Kl,g.isSpace=Sl,g.isTab=gA,g.isTextBlockContentBoxChild=Ft,g.isTextBlockContentChild=Zi,g.isTextBlockContentInsertionChild=qn,g.isTextBlockContentTextChild=Qi,g.isTextKindBlock=$,g.isTextKindBlockType=Gi,g.isToday=Km,g.isValidOffset=ut,g.isVisibleBlock=Nl,g.isYesterday=Xm,g.loadJs=wm,g.loadJsPromise=Wo,g.lockers=Zt,g.mergeCommands=Uc,g.mergeDocs=cr,g.mergeOps=id,g.mergeText=Gb,g.multiSplitText=Jg,g.parseShortcut=jm,g.patchNode=Vi,g.pointInRect=Go,g.rangeAddAttribute=Xi,g.rangeGetTextColor=Ap,g.rangeRemoveAttribute=_r,g.rangeSetTextColor=gp,g.rangeTransformText=fp,g.registerDragDrop=Au,g.removeAttribute=ud,g.removeClass=_,g.removeLastBr=Ub,g.removePlaceholderFromBlock=b4,g.removeStyle=xm,g.replaceAll=EA,g.replaceAllCaseInsensitive=IA,g.replaceAllText=yp,g.replaceText=Yl,g.requestDownload=Pl,g.resetListStart=ri,g.scrollable=Zm,g.selectFile=Rr,g.selectedBlockToDoc=dc,g.selectionToDoc=hc,g.setAttributes=mu,g.setClipboardData=Rl,g.setClipboardDataByEvent=yA,g.setColorToAttributes=pp,g.setDataset=fu,g.setDefaultCursor=Ui,g.setStyles=gu,g.shareDBCommentToDocObject=gh,g.shareDBDocCommentToComment=c5,g.shortcutToDisplayText=Qt,g.showBlock=rg,g.showDocVersions=aj,g.splitText=kt,g.splitToThree=Ge,g.stringToDataUrl=Eu,g.stringToObjectUrl=Iu,g.subText=Kg,g.textNodeOffsetFromPoint=ym,g.titleFromEditor=x4,g.toBase64URL=Qo,g.toPlainText=ve,g.toPlainTextKeepLength=hd,g.trimChar=bu,g.unexclusiveBlock=S6,g.unicodeLength=tA,g.unicodeSubstr=nA,g.updateBlockSelection=Ag,g.updateOpAttributes=vp,g.updateTextBlockContent=fv,g.updateUrl=wu,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
694
+ \`\`\`\`\`\``}return"[plantuml]"}const w9={embedType:"plantuml",convertFrom:x_,handleUpdateBlock:I_,createEmbedContent:E_,getBlockProperties:T_,convertTo:S_},$q="",D_="hr",L_={dividingLine:{type:"\u5206\u5272\u7EBF",abstract:"\u5206\u5272\u7EBF"}},M_={dividingLine:{type:"Separation line",abstract:"Line"}},R_={dividingLine:{type:"\u533A\u5207\u308A\u7DDA",abstract:"\u533A\u5207\u308A\u7DDA"}};I.mergeLang({"zh-CN":L_,"en-US":M_,"ja-JP":R_});function O_(n,e){const t=A("div",["editor-embed-container"],e);A("hr",["editor-embed-hr"],t)}function P_(n,e,t,o){return o==="html"?"<hr />":o==="markdown"?"---":"------------"}function N_(){return{name:"hr",insertEmbedCommandItems:[{id:"insert-hr",name:I.t("dividingLine.type"),icon:BB,order:500,group:"common",subText:At("insert-hr")}],handleInsertEmptyEmbed:async(n,e)=>{const{containerId:t,blockIndex:o}=e;return n.insertEmbed(t,o,D_,{})}}}function F_(n,e,t){const{data:o}=t;if(!o||o.embedType!=="dividing-line"||!$(n,e))return null;const r={};return{blockData:{id:F(),type:"embed",embedType:"hr",embedData:r}}}function $_(){return{abstract:I.t("dividingLine.abstract")}}const B9={embedType:"hr",createEmbedContent:O_,convertTo:P_,getOptions:N_,convertFrom:F_,getBlockProperties:$_},_q="",Hq="",__={media:{upload:{failed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>'},load:{failed:'<div class="line-1">{name}\u52A0\u8F7D\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>'},audio:{menuItem:"\u97F3\u9891",abstract:"\u97F3\u9891"},video:{menuItem:"\u89C6\u9891",abstract:"\u89C6\u9891"}}},H_={media:{upload:{failed:'<div class="line-1">{name} upload failed</div><div class="line-2">The network service is abnormal, you can <span class="retry-upload">Try again</span></div>'},load:{failed:'<div class="line-1">{name} loading failed</div><div class="line-2">The network service is abnormal, you can <span class="retry-upload">Try again</span></div>'},audio:{menuItem:"Audio",abstract:"Audio"},video:{menuItem:"Video",abstract:"Video"}}};I.mergeLang({"zh-CN":__,"en-US":H_});var gn=(n=>(n.AUDIO="audio",n.VIDEO="video",n))(gn||{}),ul=(n=>(n.Empty="empty",n.Progress="progress",n.Error="error",n))(ul||{});const E9=10*1024*1024,j_=["wav","mp3","aac","ogg","webm","flac"],z_=["ogg","mp4","webm"],U_=()=>{};function I9(n){var u,f,m,p,b,k;const e=(u=n.getComponentOptions("media"))!=null?u:{},{allowedMedias:t,maxSize:o,callbacks:r}=e,i=(f=t==null?void 0:t.audio)!=null?f:j_,s=(m=t==null?void 0:t.video)!=null?m:z_,l=(p=o==null?void 0:o.audio)!=null?p:E9,c=(b=o==null?void 0:o.video)!=null?b:E9,a=(k=r==null?void 0:r.onError)!=null?k:U_;return{allowedMedias:{audio:i,video:s},maxSize:{audio:l,video:c},callbacks:{onError:a}}}const V_=w("file-utils");function q_(n){d(V_,n instanceof File,`The file: ${n} isn't instance of File`);const{name:e}=n;if(!e)return"";const t=e.lastIndexOf(".");return t===-1?"":e.slice(t+1)}function W_(n,e){const t=i=>i.map(s=>`.${s}`).join(","),{allowedMedias:o}=I9(n),r=o[e];return r?t(r):"*"}function G_(n,e,t){const{maxSize:o,callbacks:r,allowedMedias:i}=I9(e),{[t]:s}=o,{[t]:l}=i;if(s&&n.size>s){const a=new Error("media is too large");throw a.code=`MaxMediaSize-${t}`,r!=null&&r.onError&&(r==null||r.onError(e,a)),a}const c=q_(n);if(l&&!l.includes(c)){const a=new Error(`media file is not allowed: ${c}`);throw a.code="NotAllowedFile",r!=null&&r.onError&&(r==null||r.onError(e,a)),a}}function Z_(n){return n===ul.Empty||n===ul.Error}const Ye=w("media");class Q_ extends Ve.TypedEmitter{constructor(t){super();h(this,"mediaContainer",null);h(this,"media",null);h(this,"abstract",null);h(this,"handleMediaLoadError",(t,o)=>{if(!o.target||!(o.target instanceof Node)||!(o.target instanceof Element?o.target:o.target.parentElement))return;const i=z(o.target);if(!i||!i.contains(this.mediaContainer))return;const s=this.renderError();this.updateMediaContent(s),this.emit("mediaError",t,"load_error",j(i))});h(this,"handleUploadFile",async t=>{d(Ye,this.abstract,"no abstract"),d(Ye,this.mediaContainer,"The media element not exist");const{editor:o}=this.options,r=z(this.mediaContainer);d(Ye,r,"The block element not exist");const i=o.getBlockData(r);try{const{resourceId:s}=await o.doc.uploadResource(t,{onProgress:f=>{this.renderProgress(f,t)}}),{name:l,type:c,size:a}=t,u={...i,embedData:{...i.embedData,src:s,fileName:l,fileSize:a,fileType:c}};o.updateBlockData(r,u)}catch(s){Ye.error(s),this.emit("mediaError",o,"upload_error",i.id),this.renderRetry(t)}_(r,"media-block-uploading")});h(this,"destroy",()=>{this.mediaContainer=null});this.options=t}bindMediaEvent(){const{editor:t}=this.options;this.media&&t.domEvents.addEventListener(this.media,"error",this.handleMediaLoadError)}unbindMediaEvent(){const{editor:t}=this.options;this.media&&t.domEvents.removeEventListener(this.media,"error",this.handleMediaLoadError)}updateMediaContent(t){d(Ye,this.mediaContainer,"The media element not exist"),this.mediaContainer.innerHTML="",this.mediaContainer.append(t)}renderError(){d(Ye,this.abstract,"no abstract");const{editor:t,createMediaElement:o}=this.options,{mediaIcon:r,mediaName:i}=this.abstract;d(Ye,this.mediaContainer,"The media element not exist");const s=z(this.mediaContainer);d(Ye,s,"The block element not exist");const l=t.getBlockData(s),c=l.embedData.src,a=A("div",["media-error","embed-selected-content","embed-hover-content"],null),u=A("span",["media-error-icon"],a);u.innerHTML=r;const f=A("div",[],a);f.innerHTML=I.t("media.load.failed",{name:i}),a.appendChild(f);const m=f.querySelector(".retry-upload");return d(Ye,m,"The element not exist"),t.domEvents.addEventListener(m,"click",(p,b)=>{const k=A("div",["media-element"],null),v=this.getResourceUrl(c),T=o(p,k,l,v);this.unbindMediaEvent(),this.media=T,this.bindMediaEvent(),this.updateMediaContent(k)}),this.setFullScreen(),a}renderRetry(t){d(Ye,this.abstract,"no abstract");const{editor:o}=this.options,{mediaIcon:r,mediaName:i}=this.abstract,s=A("div",["media-error","embed-selected-content","embed-hover-content"],null),l=A("span",["media-error-icon"],s);l.innerHTML=r;const c=A("div",[],s);c.innerHTML=I.t("media.upload.failed",{name:i}),s.appendChild(c);const a=c.querySelector(".retry-upload");d(Ye,a,"The element not exist"),o.domEvents.addEventListener(a,"click",()=>{o.readonly||(d(Ye,this.abstract,"no abstract"),this.handleUploadFile(t))}),this.updateMediaContent(s),this.setFullScreen()}renderProgress(t,o){d(Ye,this.mediaContainer,"The media element not exist");const r=this.mediaContainer.querySelector(":scope .media-progress"),i=t===-1||t===100?100:t;if(r){const{updateProgressElement:s}=this.options;s(r,i)}else{const{createProgressElement:s}=this.options,l=z(this.mediaContainer);d(Ye,l,"The element not exist"),M(l,"media-block-uploading");const c=A("div",["media-progress"],null);s(c,i,o),this.updateMediaContent(c)}this.setFullScreen()}renderMediaElement(t){d(Ye,this.mediaContainer,"The media element not exist");const o=this.mediaContainer.querySelector(":scope > .media-element"),{createMediaElement:r,updateMediaElement:i,editor:s}=this.options,l=this.getResourceUrl(t.embedData.src);if(o){const c=i(s,o,t,l);this.unbindMediaEvent(),this.media=c,this.bindMediaEvent()}else{const c=A("div",["media-element"],null),a=r(s,c,t,l);this.unbindMediaEvent(),this.media=a,this.bindMediaEvent(),this.updateMediaContent(c)}}renderEmpty(t){d(Ye,this.abstract,"no abstract"),d(Ye,this.mediaContainer,"The media element not exist");const o=A("div",["media-empty","embed-selected-content","embed-hover-content"],this.mediaContainer);o.innerHTML=this.abstract.mediaIcon,this.updateMediaContent(o);const{editor:r}=this.options;r.findBlockById(t.id)&&this.emit("mediaError",r,"empty",t.id),this.setFullScreen()}getResourceUrl(t){const{editor:o}=this.options;return o.doc.buildResourceUrl(t)}setFullScreen(){d(Ye,this.mediaContainer,"The media element not exist"),M(this.mediaContainer,"full-screen")}removeFullScreen(){d(Ye,this.mediaContainer,"The media element not exist"),_(this.mediaContainer,"full-screen")}render(t,o){const{src:r}=t.embedData;(!this.mediaContainer||!o.contains(this.mediaContainer))&&(this.mediaContainer=A("div",["media"],o)),Z_(r)?r===ul.Empty&&this.renderEmpty(t):this.renderMediaElement(t)}setAbstract(t){this.abstract=t}}w("media-embed");class x9{constructor(){h(this,"handleInsertEmptyEmbed",async(e,t)=>{var f;const{containerId:o,blockIndex:r}=t;let i;(f=t.data)!=null&&f.file&&(i=t.data.file);const s=W_(e,this.embedType);if(i=i!=null?i:await Rr(s,{}),!i)return null;const{mediaType:l}=this.getAbstract();try{G_(i,e,l)}catch{return null}const c={id:F(),type:"embed",embedType:this.embedType,embedData:{src:ul.Empty}},a=e.insertBlock(o,r,c);return await this.getMedia(e,c.id).handleUploadFile(i),a})}getMedia(e,t){const o=e.addCustom(`media-${t}`,()=>new Q_({editor:e,createMediaElement:this.createMediaElement,updateMediaElement:this.updateMediaElement,createProgressElement:this.createProgressElement,updateProgressElement:this.updateProgressElement}));return o.setAbstract({...this.getAbstract()}),o}getOptions(){const{menuItem:e,mediaIcon:t,mediaName:o,order:r,group:i}=this.getAbstract();return{name:o,insertEmbedCommandItems:[{id:`insert-${this.embedType}`,name:e,icon:t,order:r,group:i,subText:At(`insert-${this.embedType}`)}],handleInsertEmptyEmbed:this.handleInsertEmptyEmbed}}createEmbedContent(e,t,o){const{id:r}=o;this.getMedia(e,r).render(o,t)}handleUpdateBlock(e,t,o){const{id:r}=o,i=this.getMedia(e,r),s=le(t);return i.render(o,s),!0}handleDeleteBlock(e,t){const o=t.id,r=this.getMedia(e,o);r.removeAllListeners(),r.destroy()}convertTo(e,t,o,r){const i=t.embedData,s=e.doc.buildResourceUrl(i.src,{withToken:!0});return r==="html"?`<${i.type} src="${s}" />`:r==="markdown"?`![${i.src}](${s})`:s}}function T9(n,e){const t=A("div",["uploading-progress-mask"],n),o=A("div",["uploading-progress-bar"],t),r=A("div",["uploading-progress-bar-value"],o);r.style.width=`${e}%`}function S9(n,e){const t=n.querySelector(".uploading-progress-bar-value");t&&(t.style.width=`${e}%`)}const Y_=w("media-audio");class J_ extends x9{constructor(){super(...arguments);h(this,"embedType",gn.AUDIO);h(this,"updateProgressElement",S9);h(this,"createMediaElement",(t,o,r,i)=>{const s=A("div",["audio-container","embed-hover-content","embed-selected-content"],o),l=A("audio",[],s);return l.innerHTML="Your browser does not support the <code>audio</code> element.",l.controls=!0,l.src=i,setTimeout(()=>{this.getMedia(t,r.id).setFullScreen()}),l})}getAbstract(){return{mediaIcon:yB,mediaName:I.t(`media.${gn.AUDIO}.menuItem`),menuItem:I.t(`media.${gn.AUDIO}.menuItem`),order:800,mediaType:gn.AUDIO,group:"common"}}getBlockProperties(){return{abstract:`[${I.t(`media.${gn.AUDIO}.abstract`)}]`}}updateMediaElement(t,o,r,i){const s=o.querySelector(":scope .audio-container > audio");return d(Y_,s,"The media element not exist"),s.src!==i&&(s.src=i),s}createProgressElement(t,o){const r=A("audio",[],t);r.innerHTML="Your browser does not support the <code>audio</code> element.",r.controls=!0,r.src="about:blank",T9(t,o)}}const D9=new J_;w("video-resizer");function L9(n){return n&&Ke(n)&&Nt(n)==="video"}const K_=50;class M9{constructor(e){h(this,"currentResizableElement",null);h(this,"resizing",!1);h(this,"handleHoveringBlockChange",(e,t)=>{if(!this.resizing&&(t&&L9(t)&&this.disableBlockResize(t),e&&L9(e))){const o=this.getVideoElement(e);if(!o)return;this.enableBlockResize(e,o)}});h(this,"handleResizing",(e,t)=>{if(this.resizing=!0,!this.currentResizableElement)return;const o=e.getBlock();if(!o)return;const r=o.getBoundingClientRect().width,i=Math.min(Math.max(t.width,K_),r);this.currentResizableElement.style.width=`${i}px`});h(this,"handleResized",e=>{this.resizing=!1;const t=e.getBlock();if(!this.currentResizableElement||!t)return;const o=this.editor.getBlockData(t),{width:r}=this.currentResizableElement.getBoundingClientRect();this.editor.updateBlockData(t,{...o,width:r})});this.editor=e,De.get(e).addListener("change",this.handleHoveringBlockChange)}destroy(){this.currentResizableElement=null,De.get(this.editor).removeListener("change",this.handleHoveringBlockChange)}getVideoElement(e){return le(e).querySelector(":scope .video-container > video")}disableBlockResize(e){const t=this.editor.findCustom(`${j(e)}-resizer`);t&&t.disableResize()}enableBlockResize(e,t){const o=this.editor.addCustom(`${j(e)}-resizer`,()=>new Qs(this.editor,{resize:["top-left","top-right","bottom-left","bottom-right"]}));o.enableResize(e,t),o.removeListener("resizing",this.handleResizing),o.removeListener("resized",this.handleResized),o.addListener("resizing",this.handleResizing),o.addListener("resized",this.handleResized),this.currentResizableElement=t}}const X_=w("video");class eH extends x9{constructor(){super(...arguments);h(this,"embedType",gn.VIDEO);h(this,"updateProgressElement",S9);h(this,"createMediaElement",(t,o,r,i)=>{const s=A("div",["video-container","embed-selected-content","drag-preview-element"],o),l=A("video",[],s);return l.innerHTML="Your browser does not support the <code>video</code> element.",l.controls=!0,l.src=i,l.addEventListener("canplay",()=>{t.addCustom("video-resizer",()=>new M9(t)),this.getMedia(t,r.id).removeListener("mediaError",this.handleMediaError),this.getMedia(t,r.id).addListener("mediaError",this.handleMediaError),this.getMedia(t,r.id).removeFullScreen()}),r.width&&(l.style.width=`${r.width}px`),l});h(this,"createProgressElement",(t,o,r)=>{const i=A("video",["progress-video"],t);i.innerHTML="Your browser does not support the <code>audio</code> element.",i.controls=!0,T9(t,o),Mr(r).then(s=>{const l=t.querySelector(".progress-video");l&&Fu(t)&&(l.src=s)})})}getAbstract(){return{mediaName:I.t(`media.${gn.VIDEO}.menuItem`),mediaIcon:kB,menuItem:I.t(`media.${gn.VIDEO}.menuItem`),order:700,mediaType:gn.VIDEO,group:"common"}}getBlockProperties(){return{abstract:`[${I.t(`media.${gn.VIDEO}.abstract`)}]`}}handleMediaError(t,o,r){const i=t.addCustom("video-resizer",()=>new M9(t)),s=t.getBlockById(r);i.disableBlockResize(s)}updateMediaElement(t,o,r,i){const s=o.querySelector(":scope .video-container > video");return d(X_,s,"The media element not exist"),s.src!==i&&(s.src=i),s}}const R9=new eH,O9=[ia,ua,z1,j3],Hf=[Ff,c9,A9,y9,w9,J3,B9,R9,D9,uC,t9,CN],P9=[B1,Df,b6];function tH(n,e,t){var r,i,s;const o=fs(n,e,{components:{blocks:[...O9,...((r=t==null?void 0:t.components)==null?void 0:r.blocks)||[]],embeds:[...Hf,...((i=t.components)==null?void 0:i.embeds)||[]],boxes:[...P9,...((s=t.components)==null?void 0:s.boxes)||[]],textRenders:[new L3],options:{...t.componentsOptions}}});return o.readonly=!0,o.addCustom("heading-collapse",()=>new Y6(o)),o}class nH{constructor(e){this.createOptions=e}createHistoryEditor(e,t){return tH(e,t,this.createOptions)}}w("create-editor");function N9({root:n,childDoc:e,doc:t}){e.uploadResource=t.uploadResource.bind(t),e.buildResourceUrl=t.buildResourceUrl.bind(t);const o=fs(n,e,{shortcuts:[mc],components:{blocks:[ia,ua],decorators:[new da],embeds:[uC,Ff,c9,A9,y9,w9,J3,B9,R9,D9],boxes:[B1,Df],options:{image:{defaultAlign:"left"}}}});return o.input.addHandler(new sa),o.input.addHandler(new tf(o)),o.input.addHandler(new DP(o)),o.input.addHandler(new Y1),o}function oH(n,e){const t=Array.from(n.rootContainer.querySelectorAll(`[comment-${e.toLocaleLowerCase()}="${e}"]`)),o=new Set;t.forEach(r=>{const i=z(r);i&&o.add(i)}),o.forEach(r=>{LP(n,r,e)})}class rH{constructor(e){h(this,"listeners",new Set);h(this,"doc");this.editor=e,this.doc=this.editor.doc.externalDoc,this.doc.registerCallback(this)}getComments(){return this.doc.getComments()}getComment(e){return this.doc.getComment(e)}getCommentDoc(e){return this.doc.getCommentDoc(e)}localCreateComment(e,t){this.doc.localCreateComment(e,t)}localDeleteComment(e){const t=this.getComment(e);this.doc.localDeleteComment(e);const o=t.groupId;this.getComments().filter(i=>i.groupId===o).length===0&&oH(this.editor,o)}localUpdateComment(e,t){this.doc.localUpdateComment(e,t)}onCreateComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onCreateComment(e,t))}onDeleteComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onDeleteComment(e,t))}onUpdateComment(e,t){Array.from(this.listeners.values()).forEach(o=>o.onUpdateComment(e,t))}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}createCommentEditor(e,t){var r,i;const o=N9({root:e,childDoc:t,doc:this.doc});if((r=this.editor.options.componentsOptions)!=null&&r.mention){const s=this.editor.options.componentsOptions.mention;o.addCustom("mention",()=>new Sf(o,{...s,enableFirstBlock:!0}))}if((i=this.editor.options.componentsOptions)!=null&&i.comment){const s=this.editor.options.componentsOptions.comment;s.onCommentEditorClick&&o.addListener("click",s.onCommentEditorClick)}return o}allowEdit(e){return e.userId===this.doc.getUser().userId}}class iH{constructor(e,t){h(this,"listeners",new Set);this.editor=e,this.localDoc=t}get doc(){return this.localDoc.toJSON()}getComments(){return Object.values(this.doc.comments)}getComment(e){return this.doc.comments[e]}getCommentDoc(e){const t=this.doc.comments[e];return gh(t)}addListener(e){this.listeners.add(e)}removeListener(e){this.listeners.delete(e)}localCreateComment(e,t){}localDeleteComment(e){}localUpdateComment(e,t){}createCommentEditor(e,t){var r,i;const o=N9({root:e,childDoc:t,doc:this.localDoc});if((r=this.editor.options.componentsOptions)!=null&&r.mention){const s=this.editor.options.componentsOptions.mention;o.addCustom("mention",()=>new Sf(o,{...s,enableFirstBlock:!0}))}if((i=this.editor.options.componentsOptions)!=null&&i.comment){const s=this.editor.options.componentsOptions.comment;s.onCommentEditorClick&&o.addListener("click",s.onCommentEditorClick)}return o}allowEdit(e){return e.userId===this.localDoc.getUser().userId}}const sH={placeholder:{common:{title:"\u8BF7\u8F93\u5165\u6807\u9898",readonlyTitle:"\u8BF7\u8F93\u5165\u6807\u9898",content:"\u70B9\u51FB + \uFF0C\u6216\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6",contentInTable:"\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6"},local:{readonlyTitle:"\u672A\u547D\u540D"}},copyCutProperty:{copy:"\u590D\u5236",cut:"\u526A\u5207",unsafeEnvTips:"\u7531\u4E8E\u5F53\u524D http \u8BBF\u95EE\u73AF\u5883\u4E0B\u7684\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528\u5FEB\u6377\u952E({shortCut}) {operation}"}},lH={placeholder:{common:{title:"Enter a title",readonlyTitle:"Enter a title",content:'Click "+", or enter "/" to insert components quickly',contentInTable:'Enter "/" to insert components quickly'},local:{readonlyTitle:"Untitled"}},copyCutProperty:{copy:"copy",cut:"cut",unsafeEnvTips:"\u7531\u4E8E\u5F53\u524D http \u8BBF\u95EE\u73AF\u5883\u4E0B\u7684\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528\u5FEB\u6377\u952E({shortCut}) {operation}"}},cH={placeholder:{common:{title:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",readonlyTitle:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",content:"\u300C+\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u304B\u3001\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059",contentInTable:"\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059"},local:{readonlyTitle:"\u7121\u984C"}},copyCutProperty:{copy:"copy",cut:"cut",unsafeEnvTips:"\u7531\u4E8E\u5F53\u524D http \u8BBF\u95EE\u73AF\u5883\u4E0B\u7684\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528\u5FEB\u6377\u952E({shortCut}) {operation}"}};I.mergeLang({"zh-CN":sH,"en-US":lH,"ja-JP":cH});const aH="UEsDBBQABgAIAAAAIQBk9WPugQEAACkGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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PANQDAADePgAAAAA=",uH=()=>Bu(aH);async function dH(n){return new Promise((e,t)=>{const o=new Image;o.onload=()=>{e({width:o.naturalWidth,height:o.naturalHeight})},o.onerror=t,o.src=n})}async function F9(n,e){if(n.width&&n.height)return{width:n.width,height:n.height,buffer:e};const t=await Mr(new File([e],"",{})),o=await dH(t);return o.width===void 0||o.height===void 0?{width:345,height:230,buffer:e}:n.width||n.height?{width:n.width||o.width*n.height/o.height,height:n.height||o.height*n.width/o.width,buffer:e}:{width:o.width,height:o.height,buffer:e}}function hH(n,e){let t=n.filter(s=>s!=null);const o=e-(t.length-1)*20,r=.87,i=t.reduce((s,l)=>s+l.width,0);return i>o&&(t=t.map(s=>({width:s.width*o/i,height:s.height*o/i,buffer:s.buffer}))),t.map(s=>({width:s.width*r,height:s.height*r,buffer:s.buffer}))}function $9(n=[0,1,2,3,4,5,6,7],e=1){return n.map(t=>{let o;switch(t%3){case 0:o=Y.LevelFormat.DECIMAL;break;case 1:o=Y.LevelFormat.LOWER_LETTER;break;default:o=Y.LevelFormat.LOWER_ROMAN;break}return{level:t,format:o,text:`%${t+1}. `,alignment:Y.AlignmentType.START,start:e,style:{paragraph:{indent:{left:Y.convertInchesToTwip(.3*(t+1)),hanging:Y.convertInchesToTwip(.2)}}}}})}function fH(){return[0,1,2,3,4,5,6,7].map(n=>{let e;switch(n%3){case 0:e="\u2022";break;case 1:e="\u25E6";break;default:e="\u25AA";break}return{level:n,format:Y.LevelFormat.BULLET,text:e,alignment:Y.AlignmentType.START,style:{paragraph:{indent:{left:Y.convertInchesToTwip(.3*(n+1)),hanging:Y.convertInchesToTwip(.2)}}}}})}function mH(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:Y.LevelFormat.BULLET,text:"\u2611",alignment:Y.AlignmentType.START,style:{paragraph:{indent:{left:Y.convertInchesToTwip(.3*(n+1)),hanging:Y.convertInchesToTwip(.2)}}}}))}function gH(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:Y.LevelFormat.BULLET,text:"\u2610",alignment:Y.AlignmentType.START,style:{paragraph:{indent:{left:Y.convertInchesToTwip(.3*(n+1)),hanging:Y.convertInchesToTwip(.2)}}}}))}var dl=(n=>(n.NUMBERING="number-numbering-reference",n.BULLET="number-bullet-reference",n.CHECKED="checked-bullet-reference",n.UNCHECKED="unchecked-bullet-reference",n))(dl||{});const pH=[{levels:$9(),reference:"number-numbering-reference"},{levels:fH(),reference:"number-bullet-reference"},{levels:mH(),reference:"checked-bullet-reference"},{levels:gH(),reference:"unchecked-bullet-reference"}];function CH(n){switch(n){case"style-color-0":return"d83931";case"style-color-1":return"de7802";case"style-color-2":return"dc9b04";case"style-color-3":return"2ea121";case"style-color-4":return"245bdb";case"style-color-5":return"6425d0";case"style-color-6":return"8f959e";default:return}}function AH(n){switch(n){case"style-bg-color-1":case"style-bg-color-2":case"style-bg-color-8":case"style-bg-color-9":return"yellow";case"style-bg-color-0":case"style-bg-color-5":return"magenta";case"style-bg-color-3":return"green";case"style-bg-color-4":case"style-bg-color-11":return"blue";case"style-bg-color-6":return"lightGray";case"style-bg-color-7":return"red";case"style-bg-color-10":return"darkGreen";case"style-bg-color-12":return"darkMagenta";case"style-bg-color-13":return"darkGray";default:return}}function bH(n){switch(n){case"style-bg-color-0":return"fbbab6";case"style-bg-color-1":return"ffdcb0";case"style-bg-color-2":return"fff7a0";case"style-bg-color-3":return"ceefc5";case"style-bg-color-4":return"d1ddfb";case"style-bg-color-5":return"d9cbf8";case"style-bg-color-6":return"eaeaea";case"style-bg-color-7":return"fe837c";case"style-bg-color-8":return"ffbd6a";case"style-bg-color-9":return"ffe662";case"style-bg-color-10":return"a8f393";case"style-bg-color-11":return"98b5ff";case"style-bg-color-12":return"b394f8";case"style-bg-color-13":return"b1b1b1";default:return}}const vH=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/;function _9(n){if(typeof n=="string"&&n.length>0){if(n[0]==="#")return n.substring(1);const e=n.match(vH);if(e){const t=s=>{let l=Number(s).toString(16);return l.length<2&&(l=`0${l}`),l},o=t(e[1]),r=t(e[2]),i=t(e[3]);return`${o}${r}${i}`}if(n==="red")return"FF0000";if(n==="green")return"00FF00";if(n==="blue")return"0000FF"}}function it(n,e){if(n&&n.attributes&&n.attributes[e])return n.attributes[e];if(n&&n.attributes&&n.attributes.box&&n.attributes.inputType&&e==="style-underline")return!0}function H9(n,e,t){for(let o=0;o<=t;++o){const r=`${e}${o}`;if(it(n,r))return r}}function Oa(n,e,t){n.attributes=n.attributes||{},n.attributes[e]=t}function jf(n){return n==="image"||n==="drawio"||n==="plantuml"||n==="mermaid"}function j9(n){return n&&n.startsWith("//")?`https:${n}`:n&&!n.startsWith("http://")&&!n.startsWith("https://")?`https://${n}`:n}function yH(n){const e=it(n,"inlineStyle");if(e==null)return;const t=e.split(";");for(const o of t){const r=o.split(":");if(r.length!==2)continue;const i=r[0].trim().toLowerCase(),s=r[1].trim().toLowerCase();i==="font-size"&&Oa(n,"inline-style-font-size",s),i==="color"&&Oa(n,"inline-style-color",s),i==="background-color"&&Oa(n,"inline-style-background-color",s),i==="font-family"&&Oa(n,"inline-style-font-family",s)}}function kH(n,e){if(e==null)return n==null?void 0:n.normal;if(n)return n[`heading${e}`]}function wH(n){const e=`${it(n,"inline-style-font-size")}`;if(e&&e.indexOf("px")>0)return+e.replace(/px/g,"")}function BH(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` ${n.attributes.text} `;if(n.attributes&&n.attributes.box&&n.attributes.inputType)return n.attributes.value?`${n.attributes.value}`:" "}function EH(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` @${n.attributes.text} `}function IH(n){return it(n,"inline-style-font-family")}function xH(n){const e=it(n,"inline-style-background-color");return _9(e)}function TH(n){const e=it(n,"inline-style-color");return _9(e)}function SH(n){yH(n);const e=it(n,"type")==="mention";return{box:n.attributes&&n.attributes.box?n.attributes:void 0,inlineCode:!!it(n,"style-code"),link:j9(it(n,"link")),size:wH(n),text:e?EH(n):BH(n)||n.insert,bold:!!it(n,"style-bold"),underline:!!it(n,"style-underline"),italics:!!it(n,"style-italic"),strike:!!it(n,"style-strikethrough"),superScript:!!it(n,"style-super"),subScript:!!it(n,"style-sub"),math:it(n,"type")==="math"?it(n,"src"):void 0,mention:e,fontFamily:IH(n),background:xH(n),color:e?"338fe5":CH(H9(n,"style-color-",6))||TH(n),highlight:H9(n,"style-bg-color-",13)}}function DH(){return[new Y.Paragraph({border:{top:{color:"auto",style:Y.BorderStyle.DASHED,size:4,space:1}},spacing:{before:300}}),new Y.Paragraph({spacing:{line:0}})]}function LH(){return new Y.Paragraph({children:[new Y.TextRun({text:"[\u89C6\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:Y.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function MH(){return new Y.Paragraph({children:[new Y.TextRun({text:"[\u97F3\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:Y.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function RH(n,e){return new Y.Paragraph({children:[new Y.ExternalHyperlink({children:[new Y.TextRun({style:"Hyperlink",text:e||n})],link:n})]})}function z9(n){if(n.heading!=null)return`Heading${n.heading}`}function U9(n){if(n.alignment!=null){if(n.alignment==="center")return Y.AlignmentType.CENTER;if(n.alignment==="right")return Y.AlignmentType.RIGHT;if(n.alignment==="left")return Y.AlignmentType.LEFT}}function OH(n){if(n.indent)return{left:Y.convertInchesToTwip(.3*n.indent-.2)};if(n.padding)return{left:Y.convertInchesToTwip(.3*n.padding)}}function PH(n){return{type:Y.ShadingType.CLEAR,color:"FFFFFF",fill:n}}function NH(n){const e=n.split(",");if(e.length!==0)return e[0].trim()}function V9(n,e){let t;t=n.inlineCode?"InlineCode":void 0,t=n.link?"Hyperlink":t;const o=n.size||e,r=o!=null?Math.floor(o*1.5+.5):void 0;return new Y.TextRun({text:n.text,bold:n.bold||void 0,underline:n.underline?{type:Y.UnderlineType.SINGLE}:void 0,italics:n.italics||void 0,strike:n.strike||void 0,superScript:n.superScript||void 0,subScript:n.subScript||void 0,size:r,style:t,font:n.fontFamily?NH(n.fontFamily):void 0,shading:n.background?PH(n.background):void 0,color:n.color,highlight:AH(n.highlight)})}function FH(n,e){if(n.link)return new Y.ExternalHyperlink({children:[V9(n,e)],link:n.link})}async function q9(n,e,t,o,r){const i=await r(n,e,t);if(i==null)return;const s=await F9({width:o||0,height:0,src:t},i);return new Y.ImageRun({data:i,transformation:{width:s.width||100,height:s.height||20}})}function $H(n){if(n.heading||n.heading)return n.heading}function _H(n){if(n.align&&(n.align==="center"||n.align==="right"||n.align==="left"))return n.align}function HH(n){if(n.textOnly===!0&&n.level!=null)return n.level}async function jH(n,e){var o;const t=[];if(n.text&&Array.isArray(n.text)){for(let r=0;r<n.text.length;r++){const i=n.text[r];if(((o=i.attributes)==null?void 0:o.box)===!0&&e){const s=await e(i);if(s){n.text.splice(r+1,0,...s);continue}}t.push(SH(i))}return t}}function zH(n){if(n.type==="list"&&n.textOnly!==!0)return{checkbox:n.checkbox,groupId:n.groupId,ordered:!!n.ordered,level:n.level||1,start:n.start||0}}function UH(n,e){if(n.type==="embed"&&n.embedType&&jf(n.embedType)&&n.embedData&&n.embedData.src)return n.embedData.src.split("|").map(o=>{const r=e(o),i=n.embedData[`${r}_width`],s=n.embedData[`${r}_height`];return{src:o,width:i,height:s}})}function VH(n){if(n.padding)return n.padding}function qH(n){return!!(n.type==="embed"&&n.embedType&&jf(n.embedType)&&n.embedData&&n.embedData.src)}async function Pa(n,e,t){return{quoted:!!n.quoted,heading:$H(n),alignment:_H(n),indent:HH(n),padding:VH(n),texts:await jH(n,t),list:zH(n),images:UH(n,e),border:qH(n)}}async function WH(n,e,t,o){const r=[];if(!n.children)return[];for(const i of n.children){const s=[];for(const l of e.blocks[i])s.push(await Pa(l,t,o));r.push(s)}return r}const GH=w("to-docx");function ZH(n,e){return Array(n).fill(0).map(()=>Array(e).fill(0).map(()=>({cellId:void 0,color:void 0,from:void 0,rowSpan:1,colSpan:1,width:0,originalWidth:void 0,align:void 0})))}function QH(n,e,t,o){const r=!!n.hasColTitle,i=!!n.hasRowTitle,s=!!n.isStripeStyle,l="F5F8FB";for(let c=0;c<e;c++)for(let a=0;a<t;a++)(r&&a===0||i&&c===0||s&&c%2===1)&&(o[c][a].color=l)}function YH(n){d(GH,n.children,"no table children");const e=n.rows,t=n.cols,o=n.colsWidth;if(o)for(let s=0;s<o.length;s++)o[s]===0&&(o[s]=100);const r=ZH(e,t);let i=0;for(let s=0;s<e;++s)for(let l=0;l<t;++l){if(r[s][l].originalWidth=o?o[l]:void 0,r[s][l].from!==void 0)continue;const c=n.children[i];i+=1,r[s][l].cellId=c,r[s][l].color=bH(n[`${c}_background`]),r[s][l].width=o?o[l]:100,r[s][l].align=n[`${c}_align`];const a=n[`${c}_rowSpan`]||1,u=n[`${c}_colSpan`]||1;if(r[s][l].rowSpan=a,r[s][l].colSpan=u,a>1||u>1){let f=0;for(let m=0;m<a;m++)for(let p=0;p<u;p++)m===0&&(f+=o?o[l+p]:80),!(m===0&&p===0)&&(r[s+m][l+p].from=[s,l]);r[s][l].width=f}}return QH(n,e,t,r),r}async function JH(n,e,t,o,r,i,s,l,c,a){async function u(p){if(l){const b=await l(r,i,p);if(b){await o.addDoc(n,b,a);return}}if(p.type==="text"||p.textOnly===!0){const b=await Pa(p,s,c);await o.addTextBlock(b);return}if(p.type==="code"){const b=await WH(p,t,s,c);await o.addCodeBlockObject(b);return}if(p.type==="list"&&p.textOnly!==!0){const b=await Pa(p,s,c);await o.addListBlockObject(n,b);return}if(p.type==="embed"&&p.embedType){const b=p,k=b.embedData,v=b.embedType;if(jf(v)){const T=await Pa(p,s,c);await o.addImagesBlockObject(T,a)}else p.embedType==="hr"?o.addSeparatorBlock():p.embedType==="video"?o.addVideoPlaceholder():p.embedType==="audio"?o.addAudioPlaceholder():p.embedType==="webpage"?o.addHyperlinkParagraph(j9(k.src),k.title):o.addOtherEmbedBlock(v,p.embedData);return}if(p.type==="table"){let b=[];if(p.colsWidth)b=p.colsWidth;else{const v=p.cols;b=new Array(v);for(let T=0;T<b.length;T++)b[T]=100;p.colsWidth=b}const k=YH(p);await o.addTableMatrix(b,k,t),o.addEmptyParagraph()}}function f(p){const b=[];for(const{type:k,data:v}of p.embedData.exportSpec){if(k==="text"){const T={id:F(),text:[{insert:v}],type:"text"};b.push(T);continue}if(k==="image"){const T={id:F(),type:"embed",embedType:"image",align:"left",embedData:{src:v}};b.push(T);continue}if(k==="link"){const T={id:F(),type:"embed",embedType:"webpage",embedData:{src:v.url,title:v.title}};b.push(T);continue}}return b}function m(p){var b;return(b=p==null?void 0:p.embedData)!=null&&b.exportSpec?f(p):[p]}for(const p of e)for(const b of m(p))await u(b)}function KH(){return{listMaxInst:1,listInstMap:{},listRefMap:{},levelConfigs:[]}}const XH=w("to-docx");class ej{constructor(e,t,o,r,i,s){h(this,"paragraphs");this.appId=e,this.docId=t,this.state=o,this.readImageFunc=r,this.convertBlocksFunc=i,this.defaultFontSize=s,this.paragraphs=[]}async addTextBlock(e){this.paragraphs.push(new Y.Paragraph({heading:z9(e),alignment:U9(e),children:await this.paragraphsFromBlockTexts(e),indent:OH(e)}))}async paragraphsFromBlockTexts(e){if(e.texts==null)return;const t=kH(this.defaultFontSize,e.heading),o=[];for(const r of e.texts){if(r.link){const i=FH(r,t);i&&o.push(i);continue}if(r.box&&r.box.type&&r.box.type==="br"){o.push(new Y.TextRun({text:"",break:1}));continue}if(r.box&&r.box.type&&r.box.type==="image"){const i=await q9(this.appId,this.docId,r.box.src,r.box.width,this.readImageFunc);i&&o.push(i);continue}if(r.math){const i=await q9(this.appId,this.docId,r.math,0,this.readImageFunc);i&&o.push(i);continue}o.push(V9(r,t))}return o}async addCodeBlockObject(e){for(const t of e)for(const o of t){const r={style:Y.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new Y.Paragraph({style:"Code",border:{left:{...r},right:{...r},top:{...r},bottom:{...r}},children:await this.paragraphsFromBlockTexts(o)}))}}async addListBlockObject(e,t){if(t.list==null)return;let o;const r=t.list.checkbox?`${e}-${t.list.groupId}-${t.list.checkbox}`:`${e}-${t.list.groupId}`;if(this.state.listInstMap[r])o=this.state.listInstMap[r];else if(o=this.state.listMaxInst,this.state.listMaxInst+=1,this.state.listInstMap[r]=o,t.list.start>0&&t.list.ordered){const s=`number-numbering-reference-${o}`,l=$9([t.list.level-1],t.list.start);this.state.levelConfigs.push({levels:l,reference:s,inst:o}),this.state.listRefMap[r]=s}else t.list.ordered?this.state.listRefMap[r]=dl.NUMBERING:t.list.checkbox&&t.list.checkbox==="checked"?this.state.listRefMap[r]=dl.CHECKED:t.list.checkbox&&t.list.checkbox==="unchecked"?this.state.listRefMap[r]=dl.UNCHECKED:this.state.listRefMap[r]=dl.BULLET;const i=z9(t);t.texts&&this.paragraphs.push(new Y.Paragraph({heading:i,children:await this.paragraphsFromBlockTexts(t),numbering:{reference:this.state.listRefMap[r],level:t.list.level-1,instance:o}}))}imageDimWithBufferToImageRun(e){return new Y.ImageRun({data:e.buffer,transformation:{width:e.width,height:e.height}})}async addImagesBlockObject(e,t){if(e.images==null)return;const o=await Promise.all(e.images.map(async s=>{const l=await this.readImageFunc(this.appId,this.docId,s.src);if(l)return F9(s,l)})),r=hH(o,t),i={style:Y.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new Y.Paragraph({border:e.border?{left:{...i},right:{...i},top:{...i},bottom:{...i}}:void 0,alignment:U9(e)||Y.AlignmentType.CENTER,children:r.map(s=>this.imageDimWithBufferToImageRun(s)).flatMap((s,l,c)=>s==null?[]:c.length-1!==l?[s,new Y.TextRun({text:" "})]:s)}))}addSeparatorBlock(){DH().forEach(e=>this.paragraphs.push(e))}addEmptyParagraph(){this.paragraphs.push(new Y.Paragraph(""))}addVideoPlaceholder(){this.paragraphs.push(LH())}addAudioPlaceholder(){this.paragraphs.push(MH())}addHyperlinkParagraph(e,t){e!=null&&this.paragraphs.push(RH(e,t))}async addTableMatrix(e,t,o){const r=e.map(i=>i!==0?i*15:1500);this.paragraphs.push(new Y.Table({rows:await this.generateTableRows(t,o),columnWidths:r}))}async generateRowCells(e,t){const o=[];for(const r of e){const i=r.cellId;if(i===void 0)continue;const s=r.width*.9;o.push(new Y.TableCell({children:await this.convertBlocksFunc(i,t.blocks[i],t,this.appId,this.docId,this.state,s),columnSpan:r.colSpan,rowSpan:r.rowSpan,width:{type:Y.WidthType.DXA,size:r.width*15},shading:r.color?{fill:r.color,type:Y.ShadingType.CLEAR,color:"auto"}:void 0}))}return o}async generateTableRows(e,t){const o=[];for(const r of e)o.push(new Y.TableRow({children:await this.generateRowCells(r,t)}));return o}async addDoc(e,t,o){const r=await this.convertBlocksFunc(e,t.blocks.root,t,this.appId,this.docId,this.state,o);r&&(this.paragraphs=this.paragraphs.concat(r))}async addOtherEmbedBlock(){}}class tj{constructor(e,t,o,r,i,s,l,c){h(this,"convertBlocks",async(e,t,o,r,i,s,l=720)=>{const c=new ej(r,i,s,this.readImage,this.convertBlocks,this.defaultFontSize);return await JH(e,t,o,c,r,i,this.md5HexFunc,this.getDocByBlock,this.getTextsByBox,l||720),c.paragraphs});this.templateData=e,this.docData=t,this.md5HexFunc=o,this.readImage=r,this.defaultFontSize=i,this.getDocByBlock=s,this.getTextsByBox=l,this.backgroundImageOptions=c}async convert(e,t){return this.snapshot2docx(this.docData,e,t)}async snapshot2docx(e,t,o){const r=new Y.ImportDotx,i=this.templateData?await r.extract(this.templateData):void 0,s=e.blocks.root;d(XH,s,"data must have blocks");const l=KH(),c=await this.convertBlocks("blocks",s,e,t,o,l),a=this.backgroundImageOptions?{default:new Y.Header({children:[new Y.Paragraph({children:[new Y.ImageRun(this.backgroundImageOptions)]})]})}:{},u=new Y.Document({numbering:{config:[...pH,...l.levelConfigs]},sections:[{headers:a,children:c,properties:{page:{size:{width:12240,height:15840},margin:{top:1440,bottom:1440,left:1440,right:1440}}}}]},{template:i});return Y.Packer.toBlob(u)}}async function nj(n,e,t,o){const r=n.doc.buildResourceUrl(o,{withToken:!0});let i=await T4(r);if(!i)return;if(i.type.indexOf("/svg")!==-1){const l=await E4(i);l&&(i=new File([l],i.name))}return await i.arrayBuffer()}async function oj(n,e,t){const o=n.editorBlocks.getBlockClass(t.type);if(o.toStandardDoc)return o.toStandardDoc(n,t,e)}async function rj(n,e){const t=e.attributes,o=n.editorBoxes.getBoxClass(t.type);if(o.toStandardText)return o.toStandardText(n,t)}async function ij(n,e){let{template:t,download:o,backgroundImageOptions:r}=e!=null?e:{};t||(t=uH());const i=n.doc.toJSON(),s=(f,m,p)=>nj(n,f,m,p),l=async(f,m,p)=>oj(n,i,p),c=async f=>rj(n,f),u=await new tj(t,i,Bl.default,s,void 0,l,c,r).convert("_appId","_docId");if(o){const f=URL.createObjectURL(u),m=document.createElement("a");m.setAttribute("download",`${x4(n)}.docx`),m.setAttribute("href",`${f}`),m.click(),m.remove()}return u}const zf=w("create-editor");async function sj(n,e){var s,l,c,a,u,f,m,p,b,k,v,T,E,R;d(zf,n,"app does not exists"),e.lang&&I.setLang(e.lang),uo.level=(s=e.logLevel)!=null?s:_i.DEBUG;const t=e.onReauth?async()=>{var ee;const L=e.user.userId,P=e.docId,V=await((ee=e.onReauth)==null?void 0:ee.call(e,L,P,e.permission));return{userId:L,docId:P,permission:e.permission,appId:e.appId,token:V,displayName:e.user.displayName,avatarUrl:e.user.avatarUrl}}:void 0,o={auth:{appId:e.appId,docId:e.docId,userId:e.user.userId,permission:e.permission,token:e.token,displayName:e.user.displayName,avatarUrl:e.user.avatarUrl},serverUrl:e.serverUrl,reauthFunc:t,disableLogout:e.disableLogout},r=await Is.load(o),i=fs(n,r,{id:e.id,scrollContainer:e==null?void 0:e.scrollContainer,components:{blocks:[...O9,...((l=e==null?void 0:e.components)==null?void 0:l.blocks)||[]],embeds:[...Hf,...((c=e.components)==null?void 0:c.embeds)||[]],boxes:[...P9,...((a=e.components)==null?void 0:a.boxes)||[]],commandProviders:[new Uh,...((u=e.components)==null?void 0:u.commandProviders)||[]],decorators:[new da,new Ch],insertions:[bd],blockHooks:[new eC,new D6,...((f=e.components)==null?void 0:f.blockHooks)||[]],textRenders:[new f6,new L3],options:{...e.componentsOptions}},shortcuts:[sL,ZM,R1,UC,ux,x1,vN,mc,...e.shortcuts||[]],colors:["#338FE5","#24B47E","#F0A100","#E52727","#9678D3","#2CB2AE","#EB6414","#8AAB3F"]});if(i.editorCommandProviders.registerCommandProvider(new On(i)),i.input.addHandler(new dF),i.input.addHandler(new sa),i.input.addHandler(new IT),i.input.addHandler(new _M),i.input.addHandler(new Ws(i,{headingLevel:1,titlePlaceholder:I.t("placeholder.common.title"),contentPlaceholder:I.t("placeholder.common.content"),readonlyTitlePlaceholder:I.t("placeholder.common.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),i.input.addHandler(new ea(i,(m=e.componentsOptions)==null?void 0:m.quickMenu)),i.input.addHandler(new tf(i)),i.input.addHandler(new OC(i)),i.input.addHandler(new nL),i.input.addHandler(new Y1),i.doc.registerCallback(new hF(i)),i.addCustom("remote-cursor",()=>new u5(i)),i.addCustom("block-menu",L=>new rC(L)),i.addCustom("editor-tooltip",()=>new I1(i)),e!=null&&e.enableComments&&i.addCustom("editor-comments",L=>new h6(L,new rH(L))),i.addCustom("create-options",()=>new pm(i,e)),i.addCustom("drop-target",()=>new el(i)),i.addCustom("list-to-mindmap",()=>new Zc(i)),i.addCustom("list-to-mention",()=>new DF(i)),i.addCustom("mobile-helper",()=>new UF(i)),i.addCustom("code-caret",()=>new tL(i)),(p=e.componentsOptions)!=null&&p.mention){const L=e.componentsOptions.mention;i.addCustom("mention",()=>new Sf(i,L))}if(i.addCustom("heading-collapse",()=>new Y6(i)),ci.register(i),el.register(i),Ir.register(i),No.register(i),i.addListener("clickLink",(L,P,V)=>{var ie;if((ie=e==null?void 0:e.events)!=null&&ie.onClickLink){e.events.onClickLink(L,P,V);return}const ee=V.getAttribute("link");ee&&(L.readonly||P.ctrlKey||P.metaKey)&&window.open(ee,"_blank")}),(k=(b=e.componentsOptions)==null?void 0:b.remoteCarets)!=null&&k.onUserChanged){const L=(T=(v=e.componentsOptions)==null?void 0:v.remoteCarets)==null?void 0:T.onUserChanged;i.doc.getRemoteUsers().on("change",P=>{L(i,P)})}return(R=(E=e.componentsOptions)==null?void 0:E.templates)!=null&&R.templates.length&&(i.addListener("docChanged",()=>{Ra(i)}),i.addListener("resize",()=>{Ra(i,{reset:!0})}),setTimeout(()=>{Ra(i)},100)),i.doc.registerCallback({onError:async L=>{if(L.code==="ResetDoc"){zf.error(`reset doc: ${L.message}`);const P=await Is.load(o);i.doc.reset(P)}}}),i}function lj(n){return n.toJSON!==void 0}async function cj(n,e,t){var i,s,l,c;d(zf,n,"app does not exists");const o=lj(e)?e:new Kd(e,{serverUrl:t.serverUrl||""});t.lang&&I.setLang(t.lang);const r=fs(n,o,{id:t.id,scrollContainer:t==null?void 0:t.scrollContainer,components:{blocks:[ia,ua,z1,j3],commandProviders:[new Uh],decorators:[new da,new Ch],embeds:[...Hf,...((i=t.components)==null?void 0:i.embeds)||[]],boxes:[B1,Df,b6,...((s=t.components)==null?void 0:s.boxes)||[]],insertions:[bd],blockHooks:[new eC,...((l=t.components)==null?void 0:l.blockHooks)||[]],textRenders:[new f6],options:{...t.componentsOptions}},shortcuts:[R1,UC,x1,mc]});return r.editorCommandProviders.registerCommandProvider(new On(r)),r.input.addHandler(new sa),r.input.addHandler(new Ws(r,{headingLevel:1,titlePlaceholder:I.t("placeholder.common.title"),contentPlaceholder:I.t("placeholder.common.content"),readonlyTitlePlaceholder:I.t("placeholder.local.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),r.input.addHandler(new ea(r,(c=t.componentsOptions)==null?void 0:c.quickMenu)),r.input.addHandler(new tf(r)),r.input.addHandler(new OC(r)),r.input.addHandler(new Y1),r.addCustom("block-menu",a=>new rC(a)),r.addCustom("editor-tooltip",()=>new I1(r)),t!=null&&t.enableComments&&r.addCustom("editor-comments",a=>new h6(a,new iH(a,o))),r.addListener("clickLink",(a,u,f)=>{var p;if((p=t==null?void 0:t.events)!=null&&p.onClickLink){t.events.onClickLink(a,u,f);return}const m=f.getAttribute("link");m&&(a.readonly||u.ctrlKey||u.metaKey)&&window.open(m,"_blank")}),ci.register(r),r}function aj(n,e){var c;const t=n.doc;if(!((c=t.getVersionHelper)==null?void 0:c.call(t)))throw new Error("the editor does not support to show versions");const r=n.getCustom("create-options");if(!r)throw new Error("the editor does not support to show versions");const i=r.getData(),s=new nH(i),l=n.addCustom("version-dialog",()=>new j6(n.doc,s));return l.show(e),l}g.tippy=O8,g.AuthError=xc,g.AuthHeader=Es,g.AutoScroll=Ym,g.BaseURLHeader=Tc,g.BasicCommands=eT,g.BlockExclusiveHook=D6,g.BlockResizer=Qs,g.BrBox=Dp,g.CodeBlock=ua,g.CodeLineBlock=z1,g.CodeTextDecorator=da,g.DefaultShortcuts=mc,g.DocIdError=Bw,g.DragDrop=Lm,g.DrawioEmbed=Ff,g.EditorBlocks=Ng,g.EditorBoxes=Mp,g.EditorCommandProviders=k2,g.EditorComplexBlockPosition=tn,g.EditorComplexSelectionRange=yn,g.EditorDecorators=Np,g.EditorEmbeds=$g,g.EditorInsertions=Pp,g.EditorSimpleBlockPosition=qe,g.EditorSimpleSelectionRange=Xe,g.EmbedBlock=Hg,g.EmbedBlockResizer=sl,g.EnforceWithDocumentTitleHandler=Ws,g.EventCallbacks=Hi,g.FILL_CHAR=Jb,g.FileExtError=Ew,g.GroupOrder=q3,g.HeadingBlockScrollListener=EF,g.InputtingInsertion=Rp,g.LocalDoc=Kd,g.LogLevel=_i,g.Logger=uo,g.MIN_DISTANCE_THRESHOLD=Sm,g.ManualCloseDialog=Ls,g.ManualMenu=fr,g.ManualToolbar=Ds,g.MarkdownInputHandler=sa,g.MaxUserError=uh,g.OnesEditorAutoSuggest=Oh,g.OnesEditorCustomDataWrapper=pm,g.OnesEditorExclusiveBlock=No,g.OnesEditorHoveringBlock=De,g.OnesEditorQuickMenu=ea,g.OnesEditorToc=cl,g.OnesEditorTocProvider=Ir,g.OnesEditorToolbar=ci,g.OnesEditorTooltip=I1,g.OnesEditorVersionsDialog=j6,g.PermissionError=ww,g.Popup=xs,g.RemoteCarets=u5,g.RemoteCaretsDecorator=Ch,g.RemoteCaretsInsertion=bd,g.RemoteUsers=bc,g.RequestReloadError=Bs,g.RichText=dt,g.ShareDBDoc=Is,g.SimpleCache=Am,g.StandardEmbedBlockCommands=vf,g.TEXT_STYLE_BACKGROUND_COLOR_PREFIX=ad,g.TEXT_STYLE_COLOR_PREFIX=cd,g.TableBlock=ia,g.TableBlockCommandProvider=Uh,g.TableShortcuts=R1,g.TextBlock=wt,g.TextBox=Sp,g.TextStyleShortcuts=x1,g.TocEmbed=t9,g.ZERO_WIDTH_SPACE_CHAR=ji,g.addAttribute=Ql,g.addClass=M,g.addCommentToBlock=Sa,g.addDays=wA,g.addMetaToDoc=pc,g.addMonths=kA,g.animateScrollTo=Cu,g.applyPlaceholderToBlock=la,g.assert=d,g.autoShowHideTemplates=Ra,g.blockToDoc=Zd,g.blockToHtml=wd,g.blockToMarkdown=Bd,g.blockToText=oc,g.blocksToDoc=dy,g.clearAllSelection=Cg,g.clientType=ot,g.cloneBlock=yo,g.cloneChildContainer=Od,g.cloneDoc=Pd,g.cloneText=bp,g.commentToShareDbComment=ph,g.compareElement=Tl,g.comparePosition=Zu,g.complexBlockAdjustSelectionPos=zl,g.complexBlockFindNearestChildBlock=Vg,g.complexBlockGeFirstSimpleChild=Yu,g.complexBlockGetAllChildContainers=yt,g.complexBlockGetBottomChildContainers=Ug,g.complexBlockGetLastSimpleChild=Fr,g.complexBlockGetSelectedContainers=or,g.complexBlockGetTopChildContainers=zg,g.containerToDoc=K0,g.continuousScroll=Qm,g.convertBlockFrom=$l,g.convertImageFileToPng=E4,g.convertImageSrcToPng=wD,g.copyBlockAttributes=Yp,g.createBlockAnchor=go,g.createBlockCaretAnchor=Zg,g.createBlockContentElement=Xo,g.createBlockElement=sg,g.createBlockSimpleDocRange=Xl,g.createBlockSimpleRange=Fe,g.createBoxContentElement=ag,g.createBoxElement=lg,g.createBoxOp=up,g.createChildContainer=Og,g.createComplexBlockPosition=xe,g.createComplexDocPos=Ep,g.createComplexDocRange=ev,g.createContainer=kp,g.createContainerElement=zu,g.createDeleteOps=sp,g.createEditor=fs,g.createEditorSelectionRange=We,g.createElement=A,g.createEmptyContainer=Qn,g.createEmptyDoc=bo,g.createEmptyTextBlockData=Jl,g.createExpandedRange=Il,g.createIconButton=Dr,g.createImage=bm,g.createInsertOps=Zl,g.createInsertionContentElement=hg,g.createInsertionElement=ug,g.createLocalEditor=cj,g.createOnesEditor=sj,g.createRange=vm,g.createRichText=Ao,g.createRootContainer=Rg,g.createSimpleBlockPosition=U,g.createSimpleDocPos=Bp,g.createTextBlockData=Zn,g.createTextButton=br,g.createTextOp=_t,g.createTextWithReplaceSoftReturn=rd,g.daysAfter=Su,g.deleteText=sd,g.diffDays=BA,g.disablePageScroll=Um,g.docToHtml=Vp,g.docToHtmlFragment=rc,g.docToMarkdown=rs,g.docToText=os,g.downloadImageToFile=T4,g.downloadObjectToFile=Of,g.downloadSvgToString=a9,g.editLink=js,g.editorAddComment=RP,g.editorAddTextAttribute=l0,g.editorAutoInsertBlock=Jp,g.editorBreakTextBlock=zr,g.editorClearCompositionText=Qp,g.editorClearSelectedContents=Md,g.editorCopyBlock=Cc,g.editorDeleteBlock=Dd,g.editorDeleteBlockText=xd,g.editorDeleteBlockWithoutChildren=Sd,g.editorDeleteChildContainer=Vv,g.editorDeleteChildContainers=Kp,g.editorFocusToBlock=Rd,g.editorFocusToEnd=Y0,g.editorGetBlockData=vo,g.editorGetBlockText=pt,g.editorGetBlockTextEx=tc,g.editorGetBoxData=xp,g.editorHandleKeyboardEvent=n2,g.editorInsertBlock=jr,g.editorInsertBoxToBlock=Gp,g.editorInsertDoc=i0,g.editorInsertDocAt=Nd,g.editorInsertText=Id,g.editorInsertTextToBlock=Wp,g.editorInsertTextToBlockEx=Ed,g.editorMergeTextBlock=Xp,g.editorMoveDown=b0,g.editorMoveEnd=S0,g.editorMoveHome=D0,g.editorMoveLeft=p0,g.editorMoveLineEnd=$0,g.editorMoveLineHome=F0,g.editorMovePageDown=V0,g.editorMovePageUp=U0,g.editorMoveRight=C0,g.editorMoveUp=A0,g.editorMoveWordEnd=I0,g.editorMoveWordLeft=E0,g.editorRangeClearColor=a0,g.editorRangeGetColor=Fd,g.editorRangeSetColor=c0,g.editorRemoveTextAttribute=Zv,g.editorReplaceBlockText=cc,g.editorReplaceContainer=s0,g.editorRunOnce=Xd,g.editorSelectAll=Q0,g.editorSelectContainer=Wd,g.editorSelectDown=v0,g.editorSelectEnd=Vd,g.editorSelectHome=L0,g.editorSelectLeft=y0,g.editorSelectLineEnd=N0,g.editorSelectLineHome=P0,g.editorSelectPageDown=W0,g.editorSelectPageUp=q0,g.editorSelectRight=k0,g.editorSelectUp=w0,g.editorSelectWordEnd=T0,g.editorSelectWordLeft=x0,g.editorSetTextColor=Ur,g.editorShowFindDialog=HO,g.editorToDocx=ij,g.editorUpdateBlockData=ac,g.editorUpdateCompositionText=Zp,g.editorUpdateEmbedData=o0,g.enablePageScroll=Vm,g.escapeHtmlText=Im,g.escapeRegExp=Mu,g.escapeSpace=sA,g.exclusiveBlock=T6,g.executeBlockCommand=Ig,g.executeEmbedBlockCommand=Eg,g.executeRangeCommand=y2,g.fileToDataUrl=Mr,g.findAfterOffsetNotType=pd,g.findAllText=fd,g.findEventTargetBlock=Bm,g.findInsertionById=dg,g.findNextOffset=Cv,g.findNextVisibleSimpleBlock=x2,g.findPrevOffset=pv,g.findPrevOffsetNotType=gd,g.findPrevSimpleBlockBeforeChildContainer=jg,g.findPrevVisibleSimpleBlock=I2,g.findTarget=Lr,g.findWordEnd=Ad,g.findWordLeft=Cd,g.format=Tu,g.formatBytes=Jm,g.formatDate=eg,g.fragmentToHtml=qm,g.fromBase64=Dl,g.fromBase64ToBlob=Bu,g.fromBase64ToUint8Array=CA,g.fromDocRange=mo,g.fromNowString=Lu,g.genId=F,g.getAllChildBlocks=Ku,g.getAllQuickMenuItems=E1,g.getAllSelectedBlocks=nn,g.getAttributesAt=es,g.getBlockBackground=ig,g.getBlockByIndex=Or,g.getBlockCaretRect=Xt,g.getBlockClass=me,g.getBlockClassByType=Pr,g.getBlockClientRects=ho,g.getBlockCommandsWithHook=Hu,g.getBlockContent=le,g.getBlockId=j,g.getBlockIndex=K,g.getBlockKind=Kt,g.getBlockMinWidth=bg,g.getBlockNearestRangeFromPoint=Gg,g.getBlockOptions=SA,g.getBlockPath=fo,g.getBlockProperties=kg,g.getBlockRangeFromPoint=Ul,g.getBlockStyles=TA,g.getBlockTextLength=G,g.getBlockTools=Ne,g.getBlockType=se,g.getBoxContent=Pu,g.getBoxId=cg,g.getBoxTypeFromElement=qi,g.getChildBlockCount=Yt,g.getChildBlocks=Me,g.getChildOffset=po,g.getColorFromAttributes=dd,g.getComplexBlockClass=Tt,g.getContainerBlockPath=Dg,g.getContainerBlocks=pg,g.getContainerBlocksElement=Hl,g.getContainerById=Nr,g.getContainerId=q,g.getContainerMinWidth=Vu,g.getContainerToolsElement=OA,g.getContainerWidth=Pg,g.getDistanceSquare=An,g.getElementOffset=zi,g.getEmbedType=Nt,g.getExistsBlockTools=Fl,g.getExistsContainerById=Sg,g.getFileExt=xu,g.getFirstChildBlock=_e,g.getFirstClientRect=xl,g.getHeadingMenuOptions=v1,g.getHorizontalPadding=hu,g.getInsertionContent=Nu,g.getLastChildBlock=Je,g.getLastClientRect=qo,g.getListAllNextBrothers=oi,g.getLogger=w,g.getNextBlock=fe,g.getNextValidOffset=ir,g.getNextVisibleBlock=tr,g.getOffsetInfoAfter=ns,g.getOffsetInfoBefore=nc,g.getOpAt=hp,g.getOpLength=ld,g.getParentBlock=z,g.getParentBlockExcludeSelf=Ko,g.getParentBox=Ou,g.getParentContainer=H,g.getPrevBlock=ye,g.getPrevValidOffset=Co,g.getPrevVisibleBlock=er,g.getRangeCommands=b2,g.getRootBlock=_u,g.getScrollContainer=bn,g.getSpecialBlockCommands=wg,g.getStandardEmbedBlockProperties=yf,g.getTextAfterOffset=mv,g.getTextBeforeOffset=gv,g.getTextBlockChild=_l,g.getTextBlockClass=mg,g.getTextBlockContentChildTextLength=$t,g.getTextBlockContentChildType=xg,g.getTextBlockContentChildren=vn,g.getTextLength=at,g.getTextOpLength=Xu,g.getTextWidth=Ml,g.getToolbar=Vc,g.handleBlockElementUpdated=vg,g.hasAltOnly=hA,g.hasClass=ne,g.hasCtrlOrCmd=$m,g.hasCtrlOrCmdOnly=dA,g.hideBlock=og,g.htmlToFragment=Ll,g.i18n=I,g.injectDocToHtmlFragment=gc,g.injectStyle=Tm,g.insertEmptyBlock=MA,g.insertEmptyEmbedBlock=ju,g.insertText=Gn,g.intersectionCommands=pk,g.isBackspace=Hm,g.isBlock=Jo,g.isBlockTools=ng,g.isBox=Ru,g.isCJK=Pm,g.isChildContainer=en,g.isChildNode=Ce,g.isCollapsedRange=Xb,g.isComplexBlockPosition=Gu,g.isComplexKindBlock=ce,g.isContainer=Un,g.isContainerSelectedAllChildBlocks=G0,g.isControlEvent=Zo,g.isDelete=mA,g.isDraggingFiles=Ol,g.isElementVisible=pu,g.isEmbedBlock=Ke,g.isEmptyContainer=qu,g.isEmptyDoc=md,g.isEmptyTextBlock=Ie,g.isEmptyTextBlockWithoutCompositionText=qs,g.isEnterOnly=_m,g.isEscape=ku,g.isExclusiveBlock=I6,g.isFirefox=vu,g.isFirstChildBlockInComplexBlock=hb,g.isHighSurrogate=eA,g.isInBlock=Fu,g.isInBlockTools=Wi,g.isLetter=Om,g.isLowSurrogate=du,g.isMatchShortcut=zn,g.isMoveForward=aA,g.isNavigationEvent=cA,g.isNavigationKey=Fm,g.isNodeRemoved=km,g.isNumber=Rm,g.isPrintableKey=yu,g.isRootBlock=Pt,g.isRootContainer=Ae,g.isSafari=Nm,g.isSameDay=Du,g.isSecureEnv=H1,g.isShiftEnter=fA,g.isShiftTab=pA,g.isShortcutEvent=uA,g.isSimpleBlock=xA,g.isSimpleBlockPosition=Wn,g.isSimplePos=wp,g.isSimpleRange=Kl,g.isSpace=Sl,g.isTab=gA,g.isTextBlockContentBoxChild=Ft,g.isTextBlockContentChild=Zi,g.isTextBlockContentInsertionChild=qn,g.isTextBlockContentTextChild=Qi,g.isTextKindBlock=$,g.isTextKindBlockType=Gi,g.isToday=Km,g.isValidOffset=ut,g.isVisibleBlock=Nl,g.isYesterday=Xm,g.loadJs=wm,g.loadJsPromise=Wo,g.lockers=Zt,g.mergeCommands=Uc,g.mergeDocs=cr,g.mergeOps=id,g.mergeText=Gb,g.multiSplitText=Jg,g.parseShortcut=jm,g.patchNode=Vi,g.pointInRect=Go,g.rangeAddAttribute=Xi,g.rangeGetTextColor=Ap,g.rangeRemoveAttribute=_r,g.rangeSetTextColor=gp,g.rangeTransformText=fp,g.registerDragDrop=Au,g.removeAttribute=ud,g.removeClass=_,g.removeLastBr=Ub,g.removePlaceholderFromBlock=b4,g.removeStyle=xm,g.replaceAll=EA,g.replaceAllCaseInsensitive=IA,g.replaceAllText=yp,g.replaceText=Yl,g.requestDownload=Pl,g.resetListStart=ii,g.scrollable=Zm,g.selectFile=Rr,g.selectedBlockToDoc=dc,g.selectionToDoc=hc,g.setAttributes=mu,g.setClipboardData=Rl,g.setClipboardDataByEvent=yA,g.setColorToAttributes=pp,g.setDataset=fu,g.setDefaultCursor=Ui,g.setStyles=gu,g.shareDBCommentToDocObject=gh,g.shareDBDocCommentToComment=c5,g.shortcutToDisplayText=Qt,g.showBlock=rg,g.showDocVersions=aj,g.splitText=kt,g.splitToThree=Ge,g.stringToDataUrl=Eu,g.stringToObjectUrl=Iu,g.subText=Kg,g.textNodeOffsetFromPoint=ym,g.titleFromEditor=x4,g.toBase64URL=Qo,g.toPlainText=ve,g.toPlainTextKeepLength=hd,g.trimChar=bu,g.unexclusiveBlock=S6,g.unicodeLength=tA,g.unicodeSubstr=nA,g.updateBlockSelection=Ag,g.updateOpAttributes=vp,g.updateTextBlockContent=fv,g.updateUrl=wu,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});